hash
stringlengths
64
64
content
stringlengths
0
1.51M
2dee0c28dc53daa18e9cff894788057f07b4c6467139673dfe4cc1842768176d
from sympy.core import (S, pi, oo, symbols, Function, Rational, Integer, Tuple, Symbol, Eq, Ne, Le, Lt, Gt, Ge) from sympy.core import EulerGamma, GoldenRatio, Catalan, Lambda, Mul, Pow from sympy.functions import Piecewise, sqrt, ceiling, exp, sin, cos from sympy.testing.pytest import raises from sympy.utilities.lambdify import implemented_function from sympy.matrices import (eye, Matrix, MatrixSymbol, Identity, HadamardProduct, SparseMatrix) from sympy.functions.special.bessel import (jn, yn, besselj, bessely, besseli, besselk, hankel1, hankel2, airyai, airybi, airyaiprime, airybiprime) from sympy.testing.pytest import XFAIL from sympy.printing.julia import julia_code x, y, z = symbols('x,y,z') def test_Integer(): assert julia_code(Integer(67)) == "67" assert julia_code(Integer(-1)) == "-1" def test_Rational(): assert julia_code(Rational(3, 7)) == "3/7" assert julia_code(Rational(18, 9)) == "2" assert julia_code(Rational(3, -7)) == "-3/7" assert julia_code(Rational(-3, -7)) == "3/7" assert julia_code(x + Rational(3, 7)) == "x + 3/7" assert julia_code(Rational(3, 7)*x) == "3*x/7" def test_Relational(): assert julia_code(Eq(x, y)) == "x == y" assert julia_code(Ne(x, y)) == "x != y" assert julia_code(Le(x, y)) == "x <= y" assert julia_code(Lt(x, y)) == "x < y" assert julia_code(Gt(x, y)) == "x > y" assert julia_code(Ge(x, y)) == "x >= y" def test_Function(): assert julia_code(sin(x) ** cos(x)) == "sin(x).^cos(x)" assert julia_code(abs(x)) == "abs(x)" assert julia_code(ceiling(x)) == "ceil(x)" def test_Pow(): assert julia_code(x**3) == "x.^3" assert julia_code(x**(y**3)) == "x.^(y.^3)" assert julia_code(x**Rational(2, 3)) == 'x.^(2/3)' g = implemented_function('g', Lambda(x, 2*x)) assert julia_code(1/(g(x)*3.5)**(x - y**x)/(x**2 + y)) == \ "(3.5*2*x).^(-x + y.^x)./(x.^2 + y)" # For issue 14160 assert julia_code(Mul(-2, x, Pow(Mul(y,y,evaluate=False), -1, evaluate=False), evaluate=False)) == '-2*x./(y.*y)' def test_basic_ops(): assert julia_code(x*y) == "x.*y" assert julia_code(x + y) == "x + y" assert julia_code(x - y) == "x - y" assert julia_code(-x) == "-x" def test_1_over_x_and_sqrt(): # 1.0 and 0.5 would do something different in regular StrPrinter, # but these are exact in IEEE floating point so no different here. assert julia_code(1/x) == '1./x' assert julia_code(x**-1) == julia_code(x**-1.0) == '1./x' assert julia_code(1/sqrt(x)) == '1./sqrt(x)' assert julia_code(x**-S.Half) == julia_code(x**-0.5) == '1./sqrt(x)' assert julia_code(sqrt(x)) == 'sqrt(x)' assert julia_code(x**S.Half) == julia_code(x**0.5) == 'sqrt(x)' assert julia_code(1/pi) == '1/pi' assert julia_code(pi**-1) == julia_code(pi**-1.0) == '1/pi' assert julia_code(pi**-0.5) == '1/sqrt(pi)' def test_mix_number_mult_symbols(): assert julia_code(3*x) == "3*x" assert julia_code(pi*x) == "pi*x" assert julia_code(3/x) == "3./x" assert julia_code(pi/x) == "pi./x" assert julia_code(x/3) == "x/3" assert julia_code(x/pi) == "x/pi" assert julia_code(x*y) == "x.*y" assert julia_code(3*x*y) == "3*x.*y" assert julia_code(3*pi*x*y) == "3*pi*x.*y" assert julia_code(x/y) == "x./y" assert julia_code(3*x/y) == "3*x./y" assert julia_code(x*y/z) == "x.*y./z" assert julia_code(x/y*z) == "x.*z./y" assert julia_code(1/x/y) == "1./(x.*y)" assert julia_code(2*pi*x/y/z) == "2*pi*x./(y.*z)" assert julia_code(3*pi/x) == "3*pi./x" assert julia_code(S(3)/5) == "3/5" assert julia_code(S(3)/5*x) == "3*x/5" assert julia_code(x/y/z) == "x./(y.*z)" assert julia_code((x+y)/z) == "(x + y)./z" assert julia_code((x+y)/(z+x)) == "(x + y)./(x + z)" assert julia_code((x+y)/EulerGamma) == "(x + y)/eulergamma" assert julia_code(x/3/pi) == "x/(3*pi)" assert julia_code(S(3)/5*x*y/pi) == "3*x.*y/(5*pi)" def test_mix_number_pow_symbols(): assert julia_code(pi**3) == 'pi^3' assert julia_code(x**2) == 'x.^2' assert julia_code(x**(pi**3)) == 'x.^(pi^3)' assert julia_code(x**y) == 'x.^y' assert julia_code(x**(y**z)) == 'x.^(y.^z)' assert julia_code((x**y)**z) == '(x.^y).^z' def test_imag(): I = S('I') assert julia_code(I) == "im" assert julia_code(5*I) == "5im" assert julia_code((S(3)/2)*I) == "3*im/2" assert julia_code(3+4*I) == "3 + 4im" def test_constants(): assert julia_code(pi) == "pi" assert julia_code(oo) == "Inf" assert julia_code(-oo) == "-Inf" assert julia_code(S.NegativeInfinity) == "-Inf" assert julia_code(S.NaN) == "NaN" assert julia_code(S.Exp1) == "e" assert julia_code(exp(1)) == "e" def test_constants_other(): assert julia_code(2*GoldenRatio) == "2*golden" assert julia_code(2*Catalan) == "2*catalan" assert julia_code(2*EulerGamma) == "2*eulergamma" def test_boolean(): assert julia_code(x & y) == "x && y" assert julia_code(x | y) == "x || y" assert julia_code(~x) == "!x" assert julia_code(x & y & z) == "x && y && z" assert julia_code(x | y | z) == "x || y || z" assert julia_code((x & y) | z) == "z || x && y" assert julia_code((x | y) & z) == "z && (x || y)" def test_Matrices(): assert julia_code(Matrix(1, 1, [10])) == "[10]" A = Matrix([[1, sin(x/2), abs(x)], [0, 1, pi], [0, exp(1), ceiling(x)]]); expected = ("[1 sin(x/2) abs(x);\n" "0 1 pi;\n" "0 e ceil(x)]") assert julia_code(A) == expected # row and columns assert julia_code(A[:,0]) == "[1, 0, 0]" assert julia_code(A[0,:]) == "[1 sin(x/2) abs(x)]" # empty matrices assert julia_code(Matrix(0, 0, [])) == 'zeros(0, 0)' assert julia_code(Matrix(0, 3, [])) == 'zeros(0, 3)' # annoying to read but correct assert julia_code(Matrix([[x, x - y, -y]])) == "[x x - y -y]" def test_vector_entries_hadamard(): # For a row or column, user might to use the other dimension A = Matrix([[1, sin(2/x), 3*pi/x/5]]) assert julia_code(A) == "[1 sin(2./x) 3*pi./(5*x)]" assert julia_code(A.T) == "[1, sin(2./x), 3*pi./(5*x)]" @XFAIL def test_Matrices_entries_not_hadamard(): # For Matrix with col >= 2, row >= 2, they need to be scalars # FIXME: is it worth worrying about this? Its not wrong, just # leave it user's responsibility to put scalar data for x. A = Matrix([[1, sin(2/x), 3*pi/x/5], [1, 2, x*y]]) expected = ("[1 sin(2/x) 3*pi/(5*x);\n" "1 2 x*y]") # <- we give x.*y assert julia_code(A) == expected def test_MatrixSymbol(): n = Symbol('n', integer=True) A = MatrixSymbol('A', n, n) B = MatrixSymbol('B', n, n) assert julia_code(A*B) == "A*B" assert julia_code(B*A) == "B*A" assert julia_code(2*A*B) == "2*A*B" assert julia_code(B*2*A) == "2*B*A" assert julia_code(A*(B + 3*Identity(n))) == "A*(3*eye(n) + B)" assert julia_code(A**(x**2)) == "A^(x.^2)" assert julia_code(A**3) == "A^3" assert julia_code(A**S.Half) == "A^(1/2)" def test_special_matrices(): assert julia_code(6*Identity(3)) == "6*eye(3)" def test_containers(): assert julia_code([1, 2, 3, [4, 5, [6, 7]], 8, [9, 10], 11]) == \ "Any[1, 2, 3, Any[4, 5, Any[6, 7]], 8, Any[9, 10], 11]" assert julia_code((1, 2, (3, 4))) == "(1, 2, (3, 4))" assert julia_code([1]) == "Any[1]" assert julia_code((1,)) == "(1,)" assert julia_code(Tuple(*[1, 2, 3])) == "(1, 2, 3)" assert julia_code((1, x*y, (3, x**2))) == "(1, x.*y, (3, x.^2))" # scalar, matrix, empty matrix and empty list assert julia_code((1, eye(3), Matrix(0, 0, []), [])) == "(1, [1 0 0;\n0 1 0;\n0 0 1], zeros(0, 0), Any[])" def test_julia_noninline(): source = julia_code((x+y)/Catalan, assign_to='me', inline=False) expected = ( "const Catalan = %s\n" "me = (x + y)/Catalan" ) % Catalan.evalf(17) assert source == expected def test_julia_piecewise(): expr = Piecewise((x, x < 1), (x**2, True)) assert julia_code(expr) == "((x < 1) ? (x) : (x.^2))" assert julia_code(expr, assign_to="r") == ( "r = ((x < 1) ? (x) : (x.^2))") assert julia_code(expr, assign_to="r", inline=False) == ( "if (x < 1)\n" " r = x\n" "else\n" " r = x.^2\n" "end") expr = Piecewise((x**2, x < 1), (x**3, x < 2), (x**4, x < 3), (x**5, True)) expected = ("((x < 1) ? (x.^2) :\n" "(x < 2) ? (x.^3) :\n" "(x < 3) ? (x.^4) : (x.^5))") assert julia_code(expr) == expected assert julia_code(expr, assign_to="r") == "r = " + expected assert julia_code(expr, assign_to="r", inline=False) == ( "if (x < 1)\n" " r = x.^2\n" "elseif (x < 2)\n" " r = x.^3\n" "elseif (x < 3)\n" " r = x.^4\n" "else\n" " r = x.^5\n" "end") # Check that Piecewise without a True (default) condition error expr = Piecewise((x, x < 1), (x**2, x > 1), (sin(x), x > 0)) raises(ValueError, lambda: julia_code(expr)) def test_julia_piecewise_times_const(): pw = Piecewise((x, x < 1), (x**2, True)) assert julia_code(2*pw) == "2*((x < 1) ? (x) : (x.^2))" assert julia_code(pw/x) == "((x < 1) ? (x) : (x.^2))./x" assert julia_code(pw/(x*y)) == "((x < 1) ? (x) : (x.^2))./(x.*y)" assert julia_code(pw/3) == "((x < 1) ? (x) : (x.^2))/3" def test_julia_matrix_assign_to(): A = Matrix([[1, 2, 3]]) assert julia_code(A, assign_to='a') == "a = [1 2 3]" A = Matrix([[1, 2], [3, 4]]) assert julia_code(A, assign_to='A') == "A = [1 2;\n3 4]" def test_julia_matrix_assign_to_more(): # assigning to Symbol or MatrixSymbol requires lhs/rhs match A = Matrix([[1, 2, 3]]) B = MatrixSymbol('B', 1, 3) C = MatrixSymbol('C', 2, 3) assert julia_code(A, assign_to=B) == "B = [1 2 3]" raises(ValueError, lambda: julia_code(A, assign_to=x)) raises(ValueError, lambda: julia_code(A, assign_to=C)) def test_julia_matrix_1x1(): A = Matrix([[3]]) B = MatrixSymbol('B', 1, 1) C = MatrixSymbol('C', 1, 2) assert julia_code(A, assign_to=B) == "B = [3]" # FIXME? #assert julia_code(A, assign_to=x) == "x = [3]" raises(ValueError, lambda: julia_code(A, assign_to=C)) def test_julia_matrix_elements(): A = Matrix([[x, 2, x*y]]) assert julia_code(A[0, 0]**2 + A[0, 1] + A[0, 2]) == "x.^2 + x.*y + 2" A = MatrixSymbol('AA', 1, 3) assert julia_code(A) == "AA" assert julia_code(A[0, 0]**2 + sin(A[0,1]) + A[0,2]) == \ "sin(AA[1,2]) + AA[1,1].^2 + AA[1,3]" assert julia_code(sum(A)) == "AA[1,1] + AA[1,2] + AA[1,3]" def test_julia_boolean(): assert julia_code(True) == "true" assert julia_code(S.true) == "true" assert julia_code(False) == "false" assert julia_code(S.false) == "false" def test_julia_not_supported(): assert julia_code(S.ComplexInfinity) == ( "# Not supported in Julia:\n" "# ComplexInfinity\n" "zoo" ) f = Function('f') assert julia_code(f(x).diff(x)) == ( "# Not supported in Julia:\n" "# Derivative\n" "Derivative(f(x), x)" ) def test_trick_indent_with_end_else_words(): # words starting with "end" or "else" do not confuse the indenter t1 = S('endless'); t2 = S('elsewhere'); pw = Piecewise((t1, x < 0), (t2, x <= 1), (1, True)) assert julia_code(pw, inline=False) == ( "if (x < 0)\n" " endless\n" "elseif (x <= 1)\n" " elsewhere\n" "else\n" " 1\n" "end") def test_haramard(): A = MatrixSymbol('A', 3, 3) B = MatrixSymbol('B', 3, 3) v = MatrixSymbol('v', 3, 1) h = MatrixSymbol('h', 1, 3) C = HadamardProduct(A, B) assert julia_code(C) == "A.*B" assert julia_code(C*v) == "(A.*B)*v" assert julia_code(h*C*v) == "h*(A.*B)*v" assert julia_code(C*A) == "(A.*B)*A" # mixing Hadamard and scalar strange b/c we vectorize scalars assert julia_code(C*x*y) == "(x.*y)*(A.*B)" def test_sparse(): M = SparseMatrix(5, 6, {}) M[2, 2] = 10; M[1, 2] = 20; M[1, 3] = 22; M[0, 3] = 30; M[3, 0] = x*y; assert julia_code(M) == ( "sparse([4, 2, 3, 1, 2], [1, 3, 3, 4, 4], [x.*y, 20, 10, 30, 22], 5, 6)" ) def test_specfun(): n = Symbol('n') for f in [besselj, bessely, besseli, besselk]: assert julia_code(f(n, x)) == f.__name__ + '(n, x)' for f in [airyai, airyaiprime, airybi, airybiprime]: assert julia_code(f(x)) == f.__name__ + '(x)' assert julia_code(hankel1(n, x)) == 'hankelh1(n, x)' assert julia_code(hankel2(n, x)) == 'hankelh2(n, x)' assert julia_code(jn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*besselj(n + 1/2, x)/2' assert julia_code(yn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*bessely(n + 1/2, x)/2' def test_MatrixElement_printing(): # test cases for issue #11821 A = MatrixSymbol("A", 1, 3) B = MatrixSymbol("B", 1, 3) C = MatrixSymbol("C", 1, 3) assert(julia_code(A[0, 0]) == "A[1,1]") assert(julia_code(3 * A[0, 0]) == "3*A[1,1]") F = C[0, 0].subs(C, A - B) assert(julia_code(F) == "(A - B)[1,1]")
6e9bfe5bb7a862722814a302fb2d2e0ca0627095385d72ebea8659f5416bed09
from sympy.core import (S, pi, oo, Symbol, symbols, Rational, Integer, GoldenRatio, EulerGamma, Catalan, Lambda, Dummy) from sympy.functions import (Piecewise, sin, cos, Abs, exp, ceiling, sqrt, gamma, sign, Max, Min, factorial, beta) from sympy.core.relational import (Eq, Ge, Gt, Le, Lt, Ne) from sympy.sets import Range from sympy.logic import ITE from sympy.codegen import For, aug_assign, Assignment from sympy.testing.pytest import raises from sympy.printing.rcode import RCodePrinter from sympy.utilities.lambdify import implemented_function from sympy.tensor import IndexedBase, Idx from sympy.matrices import Matrix, MatrixSymbol from sympy.printing.rcode import rcode x, y, z = symbols('x,y,z') def test_printmethod(): class fabs(Abs): def _rcode(self, printer): return "abs(%s)" % printer._print(self.args[0]) assert rcode(fabs(x)) == "abs(x)" def test_rcode_sqrt(): assert rcode(sqrt(x)) == "sqrt(x)" assert rcode(x**0.5) == "sqrt(x)" assert rcode(sqrt(x)) == "sqrt(x)" def test_rcode_Pow(): assert rcode(x**3) == "x^3" assert rcode(x**(y**3)) == "x^(y^3)" g = implemented_function('g', Lambda(x, 2*x)) assert rcode(1/(g(x)*3.5)**(x - y**x)/(x**2 + y)) == \ "(3.5*2*x)^(-x + y^x)/(x^2 + y)" assert rcode(x**-1.0) == '1.0/x' assert rcode(x**Rational(2, 3)) == 'x^(2.0/3.0)' _cond_cfunc = [(lambda base, exp: exp.is_integer, "dpowi"), (lambda base, exp: not exp.is_integer, "pow")] assert rcode(x**3, user_functions={'Pow': _cond_cfunc}) == 'dpowi(x, 3)' assert rcode(x**3.2, user_functions={'Pow': _cond_cfunc}) == 'pow(x, 3.2)' def test_rcode_Max(): # Test for gh-11926 assert rcode(Max(x,x*x),user_functions={"Max":"my_max", "Pow":"my_pow"}) == 'my_max(x, my_pow(x, 2))' def test_rcode_constants_mathh(): assert rcode(exp(1)) == "exp(1)" assert rcode(pi) == "pi" assert rcode(oo) == "Inf" assert rcode(-oo) == "-Inf" def test_rcode_constants_other(): assert rcode(2*GoldenRatio) == "GoldenRatio = 1.61803398874989;\n2*GoldenRatio" assert rcode( 2*Catalan) == "Catalan = 0.915965594177219;\n2*Catalan" assert rcode(2*EulerGamma) == "EulerGamma = 0.577215664901533;\n2*EulerGamma" def test_rcode_Rational(): assert rcode(Rational(3, 7)) == "3.0/7.0" assert rcode(Rational(18, 9)) == "2" assert rcode(Rational(3, -7)) == "-3.0/7.0" assert rcode(Rational(-3, -7)) == "3.0/7.0" assert rcode(x + Rational(3, 7)) == "x + 3.0/7.0" assert rcode(Rational(3, 7)*x) == "(3.0/7.0)*x" def test_rcode_Integer(): assert rcode(Integer(67)) == "67" assert rcode(Integer(-1)) == "-1" def test_rcode_functions(): assert rcode(sin(x) ** cos(x)) == "sin(x)^cos(x)" assert rcode(factorial(x) + gamma(y)) == "factorial(x) + gamma(y)" assert rcode(beta(Min(x, y), Max(x, y))) == "beta(min(x, y), max(x, y))" def test_rcode_inline_function(): x = symbols('x') g = implemented_function('g', Lambda(x, 2*x)) assert rcode(g(x)) == "2*x" g = implemented_function('g', Lambda(x, 2*x/Catalan)) assert rcode( g(x)) == "Catalan = %s;\n2*x/Catalan" % Catalan.n() A = IndexedBase('A') i = Idx('i', symbols('n', integer=True)) g = implemented_function('g', Lambda(x, x*(1 + x)*(2 + x))) res=rcode(g(A[i]), assign_to=A[i]) ref=( "for (i in 1:n){\n" " A[i] = (A[i] + 1)*(A[i] + 2)*A[i];\n" "}" ) assert res == ref def test_rcode_exceptions(): assert rcode(ceiling(x)) == "ceiling(x)" assert rcode(Abs(x)) == "abs(x)" assert rcode(gamma(x)) == "gamma(x)" def test_rcode_user_functions(): x = symbols('x', integer=False) n = symbols('n', integer=True) custom_functions = { "ceiling": "myceil", "Abs": [(lambda x: not x.is_integer, "fabs"), (lambda x: x.is_integer, "abs")], } assert rcode(ceiling(x), user_functions=custom_functions) == "myceil(x)" assert rcode(Abs(x), user_functions=custom_functions) == "fabs(x)" assert rcode(Abs(n), user_functions=custom_functions) == "abs(n)" def test_rcode_boolean(): assert rcode(True) == "True" assert rcode(S.true) == "True" assert rcode(False) == "False" assert rcode(S.false) == "False" assert rcode(x & y) == "x & y" assert rcode(x | y) == "x | y" assert rcode(~x) == "!x" assert rcode(x & y & z) == "x & y & z" assert rcode(x | y | z) == "x | y | z" assert rcode((x & y) | z) == "z | x & y" assert rcode((x | y) & z) == "z & (x | y)" def test_rcode_Relational(): assert rcode(Eq(x, y)) == "x == y" assert rcode(Ne(x, y)) == "x != y" assert rcode(Le(x, y)) == "x <= y" assert rcode(Lt(x, y)) == "x < y" assert rcode(Gt(x, y)) == "x > y" assert rcode(Ge(x, y)) == "x >= y" def test_rcode_Piecewise(): expr = Piecewise((x, x < 1), (x**2, True)) res=rcode(expr) ref="ifelse(x < 1,x,x^2)" assert res == ref tau=Symbol("tau") res=rcode(expr,tau) ref="tau = ifelse(x < 1,x,x^2);" assert res == ref expr = 2*Piecewise((x, x < 1), (x**2, x<2), (x**3,True)) assert rcode(expr) == "2*ifelse(x < 1,x,ifelse(x < 2,x^2,x^3))" res = rcode(expr, assign_to='c') assert res == "c = 2*ifelse(x < 1,x,ifelse(x < 2,x^2,x^3));" # Check that Piecewise without a True (default) condition error #expr = Piecewise((x, x < 1), (x**2, x > 1), (sin(x), x > 0)) #raises(ValueError, lambda: rcode(expr)) expr = 2*Piecewise((x, x < 1), (x**2, x<2)) assert(rcode(expr))== "2*ifelse(x < 1,x,ifelse(x < 2,x^2,NA))" def test_rcode_sinc(): from sympy.functions.elementary.trigonometric import sinc expr = sinc(x) res = rcode(expr) ref = "ifelse(x != 0,sin(x)/x,1)" assert res == ref def test_rcode_Piecewise_deep(): p = rcode(2*Piecewise((x, x < 1), (x + 1, x < 2), (x**2, True))) assert p == "2*ifelse(x < 1,x,ifelse(x < 2,x + 1,x^2))" expr = x*y*z + x**2 + y**2 + Piecewise((0, x < 0.5), (1, True)) + cos(z) - 1 p = rcode(expr) ref="x^2 + x*y*z + y^2 + ifelse(x < 0.5,0,1) + cos(z) - 1" assert p == ref ref="c = x^2 + x*y*z + y^2 + ifelse(x < 0.5,0,1) + cos(z) - 1;" p = rcode(expr, assign_to='c') assert p == ref def test_rcode_ITE(): expr = ITE(x < 1, y, z) p = rcode(expr) ref="ifelse(x < 1,y,z)" assert p == ref def test_rcode_settings(): raises(TypeError, lambda: rcode(sin(x), method="garbage")) def test_rcode_Indexed(): n, m, o = symbols('n m o', integer=True) i, j, k = Idx('i', n), Idx('j', m), Idx('k', o) p = RCodePrinter() p._not_r = set() x = IndexedBase('x')[j] assert p._print_Indexed(x) == 'x[j]' A = IndexedBase('A')[i, j] assert p._print_Indexed(A) == 'A[i, j]' B = IndexedBase('B')[i, j, k] assert p._print_Indexed(B) == 'B[i, j, k]' assert p._not_r == set() def test_rcode_Indexed_without_looking_for_contraction(): len_y = 5 y = IndexedBase('y', shape=(len_y,)) x = IndexedBase('x', shape=(len_y,)) Dy = IndexedBase('Dy', shape=(len_y-1,)) i = Idx('i', len_y-1) e=Eq(Dy[i], (y[i+1]-y[i])/(x[i+1]-x[i])) code0 = rcode(e.rhs, assign_to=e.lhs, contract=False) assert code0 == 'Dy[i] = (y[%s] - y[i])/(x[%s] - x[i]);' % (i + 1, i + 1) def test_rcode_loops_matrix_vector(): n, m = symbols('n m', integer=True) A = IndexedBase('A') x = IndexedBase('x') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) s = ( 'for (i in 1:m){\n' ' y[i] = 0;\n' '}\n' 'for (i in 1:m){\n' ' for (j in 1:n){\n' ' y[i] = A[i, j]*x[j] + y[i];\n' ' }\n' '}' ) c = rcode(A[i, j]*x[j], assign_to=y[i]) assert c == s def test_dummy_loops(): # the following line could also be # [Dummy(s, integer=True) for s in 'im'] # or [Dummy(integer=True) for s in 'im'] i, m = symbols('i m', integer=True, cls=Dummy) x = IndexedBase('x') y = IndexedBase('y') i = Idx(i, m) expected = ( 'for (i_%(icount)i in 1:m_%(mcount)i){\n' ' y[i_%(icount)i] = x[i_%(icount)i];\n' '}' ) % {'icount': i.label.dummy_index, 'mcount': m.dummy_index} code = rcode(x[i], assign_to=y[i]) assert code == expected def test_rcode_loops_add(): n, m = symbols('n m', integer=True) A = IndexedBase('A') x = IndexedBase('x') y = IndexedBase('y') z = IndexedBase('z') i = Idx('i', m) j = Idx('j', n) s = ( 'for (i in 1:m){\n' ' y[i] = x[i] + z[i];\n' '}\n' 'for (i in 1:m){\n' ' for (j in 1:n){\n' ' y[i] = A[i, j]*x[j] + y[i];\n' ' }\n' '}' ) c = rcode(A[i, j]*x[j] + x[i] + z[i], assign_to=y[i]) assert c == s def test_rcode_loops_multiple_contractions(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) l = Idx('l', p) s = ( 'for (i in 1:m){\n' ' y[i] = 0;\n' '}\n' 'for (i in 1:m){\n' ' for (j in 1:n){\n' ' for (k in 1:o){\n' ' for (l in 1:p){\n' ' y[i] = a[i, j, k, l]*b[j, k, l] + y[i];\n' ' }\n' ' }\n' ' }\n' '}' ) c = rcode(b[j, k, l]*a[i, j, k, l], assign_to=y[i]) assert c == s def test_rcode_loops_addfactor(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') c = IndexedBase('c') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) l = Idx('l', p) s = ( 'for (i in 1:m){\n' ' y[i] = 0;\n' '}\n' 'for (i in 1:m){\n' ' for (j in 1:n){\n' ' for (k in 1:o){\n' ' for (l in 1:p){\n' ' y[i] = (a[i, j, k, l] + b[i, j, k, l])*c[j, k, l] + y[i];\n' ' }\n' ' }\n' ' }\n' '}' ) c = rcode((a[i, j, k, l] + b[i, j, k, l])*c[j, k, l], assign_to=y[i]) assert c == s def test_rcode_loops_multiple_terms(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') c = IndexedBase('c') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) s0 = ( 'for (i in 1:m){\n' ' y[i] = 0;\n' '}\n' ) s1 = ( 'for (i in 1:m){\n' ' for (j in 1:n){\n' ' for (k in 1:o){\n' ' y[i] = b[j]*b[k]*c[i, j, k] + y[i];\n' ' }\n' ' }\n' '}\n' ) s2 = ( 'for (i in 1:m){\n' ' for (k in 1:o){\n' ' y[i] = a[i, k]*b[k] + y[i];\n' ' }\n' '}\n' ) s3 = ( 'for (i in 1:m){\n' ' for (j in 1:n){\n' ' y[i] = a[i, j]*b[j] + y[i];\n' ' }\n' '}\n' ) c = rcode( b[j]*a[i, j] + b[k]*a[i, k] + b[j]*b[k]*c[i, j, k], assign_to=y[i]) ref=dict() ref[0] = s0 + s1 + s2 + s3[:-1] ref[1] = s0 + s1 + s3 + s2[:-1] ref[2] = s0 + s2 + s1 + s3[:-1] ref[3] = s0 + s2 + s3 + s1[:-1] ref[4] = s0 + s3 + s1 + s2[:-1] ref[5] = s0 + s3 + s2 + s1[:-1] assert (c == ref[0] or c == ref[1] or c == ref[2] or c == ref[3] or c == ref[4] or c == ref[5]) def test_dereference_printing(): expr = x + y + sin(z) + z assert rcode(expr, dereference=[z]) == "x + y + (*z) + sin((*z))" def test_Matrix_printing(): # Test returning a Matrix mat = Matrix([x*y, Piecewise((2 + x, y>0), (y, True)), sin(z)]) A = MatrixSymbol('A', 3, 1) p = rcode(mat, A) assert p == ( "A[0] = x*y;\n" "A[1] = ifelse(y > 0,x + 2,y);\n" "A[2] = sin(z);") # Test using MatrixElements in expressions expr = Piecewise((2*A[2, 0], x > 0), (A[2, 0], True)) + sin(A[1, 0]) + A[0, 0] p = rcode(expr) assert p == ("ifelse(x > 0,2*A[2],A[2]) + sin(A[1]) + A[0]") # Test using MatrixElements in a Matrix q = MatrixSymbol('q', 5, 1) M = MatrixSymbol('M', 3, 3) m = Matrix([[sin(q[1,0]), 0, cos(q[2,0])], [q[1,0] + q[2,0], q[3, 0], 5], [2*q[4, 0]/q[1,0], sqrt(q[0,0]) + 4, 0]]) assert rcode(m, M) == ( "M[0] = sin(q[1]);\n" "M[1] = 0;\n" "M[2] = cos(q[2]);\n" "M[3] = q[1] + q[2];\n" "M[4] = q[3];\n" "M[5] = 5;\n" "M[6] = 2*q[4]/q[1];\n" "M[7] = sqrt(q[0]) + 4;\n" "M[8] = 0;") def test_rcode_sgn(): expr = sign(x) * y assert rcode(expr) == 'y*sign(x)' p = rcode(expr, 'z') assert p == 'z = y*sign(x);' p = rcode(sign(2 * x + x**2) * x + x**2) assert p == "x^2 + x*sign(x^2 + 2*x)" expr = sign(cos(x)) p = rcode(expr) assert p == 'sign(cos(x))' def test_rcode_Assignment(): assert rcode(Assignment(x, y + z)) == 'x = y + z;' assert rcode(aug_assign(x, '+', y + z)) == 'x += y + z;' def test_rcode_For(): f = For(x, Range(0, 10, 2), [aug_assign(y, '*', x)]) sol = rcode(f) assert sol == ("for (x = 0; x < 10; x += 2) {\n" " y *= x;\n" "}") def test_MatrixElement_printing(): # test cases for issue #11821 A = MatrixSymbol("A", 1, 3) B = MatrixSymbol("B", 1, 3) C = MatrixSymbol("C", 1, 3) assert(rcode(A[0, 0]) == "A[0]") assert(rcode(3 * A[0, 0]) == "3*A[0]") F = C[0, 0].subs(C, A - B) assert(rcode(F) == "(A - B)[0]")
c10eac20cf7a2d44467e1fc8ea75360104347ac1b9553f52f16bf62dfb99650e
from sympy.core.function import (Derivative, Function) from sympy.core.numbers import (I, Rational, oo, pi) from sympy.core.relational import (Eq, Ge, Gt, Le, Lt, Ne) from sympy.core.symbol import (Symbol, symbols) from sympy.functions.elementary.complexes import (Abs, conjugate) from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import sin from sympy.integrals.integrals import Integral from sympy.matrices.dense import Matrix from sympy.series.limits import limit from sympy.printing.python import python from sympy.testing.pytest import raises, XFAIL, skip from sympy.parsing.latex import parse_latex from sympy.external import import_module # To test latex to Python printing antlr4 = import_module("antlr4") x, y = symbols('x,y') th = Symbol('theta') ph = Symbol('phi') def test_python_basic(): # Simple numbers/symbols assert python(-Rational(1)/2) == "e = Rational(-1, 2)" assert python(-Rational(13)/22) == "e = Rational(-13, 22)" assert python(oo) == "e = oo" # Powers assert python(x**2) == "x = Symbol(\'x\')\ne = x**2" assert python(1/x) == "x = Symbol('x')\ne = 1/x" assert python(y*x**-2) == "y = Symbol('y')\nx = Symbol('x')\ne = y/x**2" assert python( x**Rational(-5, 2)) == "x = Symbol('x')\ne = x**Rational(-5, 2)" # Sums of terms assert python(x**2 + x + 1) in [ "x = Symbol('x')\ne = 1 + x + x**2", "x = Symbol('x')\ne = x + x**2 + 1", "x = Symbol('x')\ne = x**2 + x + 1", ] assert python(1 - x) in [ "x = Symbol('x')\ne = 1 - x", "x = Symbol('x')\ne = -x + 1"] assert python(1 - 2*x) in [ "x = Symbol('x')\ne = 1 - 2*x", "x = Symbol('x')\ne = -2*x + 1"] assert python(1 - Rational(3, 2)*y/x) in [ "y = Symbol('y')\nx = Symbol('x')\ne = 1 - 3/2*y/x", "y = Symbol('y')\nx = Symbol('x')\ne = -3/2*y/x + 1", "y = Symbol('y')\nx = Symbol('x')\ne = 1 - 3*y/(2*x)"] # Multiplication assert python(x/y) == "x = Symbol('x')\ny = Symbol('y')\ne = x/y" assert python(-x/y) == "x = Symbol('x')\ny = Symbol('y')\ne = -x/y" assert python((x + 2)/y) in [ "y = Symbol('y')\nx = Symbol('x')\ne = 1/y*(2 + x)", "y = Symbol('y')\nx = Symbol('x')\ne = 1/y*(x + 2)", "x = Symbol('x')\ny = Symbol('y')\ne = 1/y*(2 + x)", "x = Symbol('x')\ny = Symbol('y')\ne = (2 + x)/y", "x = Symbol('x')\ny = Symbol('y')\ne = (x + 2)/y"] assert python((1 + x)*y) in [ "y = Symbol('y')\nx = Symbol('x')\ne = y*(1 + x)", "y = Symbol('y')\nx = Symbol('x')\ne = y*(x + 1)", ] # Check for proper placement of negative sign assert python(-5*x/(x + 10)) == "x = Symbol('x')\ne = -5*x/(x + 10)" assert python(1 - Rational(3, 2)*(x + 1)) in [ "x = Symbol('x')\ne = Rational(-3, 2)*x + Rational(-1, 2)", "x = Symbol('x')\ne = -3*x/2 + Rational(-1, 2)", "x = Symbol('x')\ne = -3*x/2 + Rational(-1, 2)" ] def test_python_keyword_symbol_name_escaping(): # Check for escaping of keywords assert python( 5*Symbol("lambda")) == "lambda_ = Symbol('lambda')\ne = 5*lambda_" assert (python(5*Symbol("lambda") + 7*Symbol("lambda_")) == "lambda__ = Symbol('lambda')\nlambda_ = Symbol('lambda_')\ne = 7*lambda_ + 5*lambda__") assert (python(5*Symbol("for") + Function("for_")(8)) == "for__ = Symbol('for')\nfor_ = Function('for_')\ne = 5*for__ + for_(8)") def test_python_keyword_function_name_escaping(): assert python( 5*Function("for")(8)) == "for_ = Function('for')\ne = 5*for_(8)" def test_python_relational(): assert python(Eq(x, y)) == "x = Symbol('x')\ny = Symbol('y')\ne = Eq(x, y)" assert python(Ge(x, y)) == "x = Symbol('x')\ny = Symbol('y')\ne = x >= y" assert python(Le(x, y)) == "x = Symbol('x')\ny = Symbol('y')\ne = x <= y" assert python(Gt(x, y)) == "x = Symbol('x')\ny = Symbol('y')\ne = x > y" assert python(Lt(x, y)) == "x = Symbol('x')\ny = Symbol('y')\ne = x < y" assert python(Ne(x/(y + 1), y**2)) in [ "x = Symbol('x')\ny = Symbol('y')\ne = Ne(x/(1 + y), y**2)", "x = Symbol('x')\ny = Symbol('y')\ne = Ne(x/(y + 1), y**2)"] def test_python_functions(): # Simple assert python(2*x + exp(x)) in "x = Symbol('x')\ne = 2*x + exp(x)" assert python(sqrt(2)) == 'e = sqrt(2)' assert python(2**Rational(1, 3)) == 'e = 2**Rational(1, 3)' assert python(sqrt(2 + pi)) == 'e = sqrt(2 + pi)' assert python((2 + pi)**Rational(1, 3)) == 'e = (2 + pi)**Rational(1, 3)' assert python(2**Rational(1, 4)) == 'e = 2**Rational(1, 4)' assert python(Abs(x)) == "x = Symbol('x')\ne = Abs(x)" assert python( Abs(x/(x**2 + 1))) in ["x = Symbol('x')\ne = Abs(x/(1 + x**2))", "x = Symbol('x')\ne = Abs(x/(x**2 + 1))"] # Univariate/Multivariate functions f = Function('f') assert python(f(x)) == "x = Symbol('x')\nf = Function('f')\ne = f(x)" assert python(f(x, y)) == "x = Symbol('x')\ny = Symbol('y')\nf = Function('f')\ne = f(x, y)" assert python(f(x/(y + 1), y)) in [ "x = Symbol('x')\ny = Symbol('y')\nf = Function('f')\ne = f(x/(1 + y), y)", "x = Symbol('x')\ny = Symbol('y')\nf = Function('f')\ne = f(x/(y + 1), y)"] # Nesting of square roots assert python(sqrt((sqrt(x + 1)) + 1)) in [ "x = Symbol('x')\ne = sqrt(1 + sqrt(1 + x))", "x = Symbol('x')\ne = sqrt(sqrt(x + 1) + 1)"] # Nesting of powers assert python((((x + 1)**Rational(1, 3)) + 1)**Rational(1, 3)) in [ "x = Symbol('x')\ne = (1 + (1 + x)**Rational(1, 3))**Rational(1, 3)", "x = Symbol('x')\ne = ((x + 1)**Rational(1, 3) + 1)**Rational(1, 3)"] # Function powers assert python(sin(x)**2) == "x = Symbol('x')\ne = sin(x)**2" @XFAIL def test_python_functions_conjugates(): a, b = map(Symbol, 'ab') assert python( conjugate(a + b*I) ) == '_ _\na - I*b' assert python( conjugate(exp(a + b*I)) ) == ' _ _\n a - I*b\ne ' def test_python_derivatives(): # Simple f_1 = Derivative(log(x), x, evaluate=False) assert python(f_1) == "x = Symbol('x')\ne = Derivative(log(x), x)" f_2 = Derivative(log(x), x, evaluate=False) + x assert python(f_2) == "x = Symbol('x')\ne = x + Derivative(log(x), x)" # Multiple symbols f_3 = Derivative(log(x) + x**2, x, y, evaluate=False) assert python(f_3) == \ "x = Symbol('x')\ny = Symbol('y')\ne = Derivative(x**2 + log(x), x, y)" f_4 = Derivative(2*x*y, y, x, evaluate=False) + x**2 assert python(f_4) in [ "x = Symbol('x')\ny = Symbol('y')\ne = x**2 + Derivative(2*x*y, y, x)", "x = Symbol('x')\ny = Symbol('y')\ne = Derivative(2*x*y, y, x) + x**2"] def test_python_integrals(): # Simple f_1 = Integral(log(x), x) assert python(f_1) == "x = Symbol('x')\ne = Integral(log(x), x)" f_2 = Integral(x**2, x) assert python(f_2) == "x = Symbol('x')\ne = Integral(x**2, x)" # Double nesting of pow f_3 = Integral(x**(2**x), x) assert python(f_3) == "x = Symbol('x')\ne = Integral(x**(2**x), x)" # Definite integrals f_4 = Integral(x**2, (x, 1, 2)) assert python(f_4) == "x = Symbol('x')\ne = Integral(x**2, (x, 1, 2))" f_5 = Integral(x**2, (x, Rational(1, 2), 10)) assert python( f_5) == "x = Symbol('x')\ne = Integral(x**2, (x, Rational(1, 2), 10))" # Nested integrals f_6 = Integral(x**2*y**2, x, y) assert python(f_6) == "x = Symbol('x')\ny = Symbol('y')\ne = Integral(x**2*y**2, x, y)" def test_python_matrix(): p = python(Matrix([[x**2+1, 1], [y, x+y]])) s = "x = Symbol('x')\ny = Symbol('y')\ne = MutableDenseMatrix([[x**2 + 1, 1], [y, x + y]])" assert p == s def test_python_limits(): assert python(limit(x, x, oo)) == 'e = oo' assert python(limit(x**2, x, 0)) == 'e = 0' def test_issue_20762(): if not antlr4: skip('antlr not installed') # Make sure Python removes curly braces from subscripted variables expr = parse_latex(r'a_b \cdot b') assert python(expr) == "a_b = Symbol('a_{b}')\nb = Symbol('b')\ne = a_b*b" def test_settings(): raises(TypeError, lambda: python(x, method="garbage"))
15fe65d502f61f1377d964bf4dd16150056ace8a7c628598dd4cf54d386f5483
from sympy.core.singleton import S from sympy.printing.tableform import TableForm from sympy.printing.latex import latex from sympy.abc import x from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import sin from sympy.testing.pytest import raises from textwrap import dedent def test_TableForm(): s = str(TableForm([["a", "b"], ["c", "d"], ["e", 0]], headings="automatic")) assert s == ( ' | 1 2\n' '-------\n' '1 | a b\n' '2 | c d\n' '3 | e ' ) s = str(TableForm([["a", "b"], ["c", "d"], ["e", 0]], headings="automatic", wipe_zeros=False)) assert s == dedent('''\ | 1 2 ------- 1 | a b 2 | c d 3 | e 0''') s = str(TableForm([[x**2, "b"], ["c", x**2], ["e", "f"]], headings=("automatic", None))) assert s == ( '1 | x**2 b \n' '2 | c x**2\n' '3 | e f ' ) s = str(TableForm([["a", "b"], ["c", "d"], ["e", "f"]], headings=(None, "automatic"))) assert s == dedent('''\ 1 2 --- a b c d e f''') s = str(TableForm([[5, 7], [4, 2], [10, 3]], headings=[["Group A", "Group B", "Group C"], ["y1", "y2"]])) assert s == ( ' | y1 y2\n' '---------------\n' 'Group A | 5 7 \n' 'Group B | 4 2 \n' 'Group C | 10 3 ' ) raises( ValueError, lambda: TableForm( [[5, 7], [4, 2], [10, 3]], headings=[["Group A", "Group B", "Group C"], ["y1", "y2"]], alignments="middle") ) s = str(TableForm([[5, 7], [4, 2], [10, 3]], headings=[["Group A", "Group B", "Group C"], ["y1", "y2"]], alignments="right")) assert s == dedent('''\ | y1 y2 --------------- Group A | 5 7 Group B | 4 2 Group C | 10 3''') # other alignment permutations d = [[1, 100], [100, 1]] s = TableForm(d, headings=(('xxx', 'x'), None), alignments='l') assert str(s) == ( 'xxx | 1 100\n' ' x | 100 1 ' ) s = TableForm(d, headings=(('xxx', 'x'), None), alignments='lr') assert str(s) == dedent('''\ xxx | 1 100 x | 100 1''') s = TableForm(d, headings=(('xxx', 'x'), None), alignments='clr') assert str(s) == dedent('''\ xxx | 1 100 x | 100 1''') s = TableForm(d, headings=(('xxx', 'x'), None)) assert str(s) == ( 'xxx | 1 100\n' ' x | 100 1 ' ) raises(ValueError, lambda: TableForm(d, alignments='clr')) #pad s = str(TableForm([[None, "-", 2], [1]], pad='?')) assert s == dedent('''\ ? - 2 1 ? ?''') def test_TableForm_latex(): s = latex(TableForm([[0, x**3], ["c", S.One/4], [sqrt(x), sin(x**2)]], wipe_zeros=True, headings=("automatic", "automatic"))) assert s == ( '\\begin{tabular}{r l l}\n' ' & 1 & 2 \\\\\n' '\\hline\n' '1 & & $x^{3}$ \\\\\n' '2 & $c$ & $\\frac{1}{4}$ \\\\\n' '3 & $\\sqrt{x}$ & $\\sin{\\left(x^{2} \\right)}$ \\\\\n' '\\end{tabular}' ) s = latex(TableForm([[0, x**3], ["c", S.One/4], [sqrt(x), sin(x**2)]], wipe_zeros=True, headings=("automatic", "automatic"), alignments='l')) assert s == ( '\\begin{tabular}{r l l}\n' ' & 1 & 2 \\\\\n' '\\hline\n' '1 & & $x^{3}$ \\\\\n' '2 & $c$ & $\\frac{1}{4}$ \\\\\n' '3 & $\\sqrt{x}$ & $\\sin{\\left(x^{2} \\right)}$ \\\\\n' '\\end{tabular}' ) s = latex(TableForm([[0, x**3], ["c", S.One/4], [sqrt(x), sin(x**2)]], wipe_zeros=True, headings=("automatic", "automatic"), alignments='l'*3)) assert s == ( '\\begin{tabular}{l l l}\n' ' & 1 & 2 \\\\\n' '\\hline\n' '1 & & $x^{3}$ \\\\\n' '2 & $c$ & $\\frac{1}{4}$ \\\\\n' '3 & $\\sqrt{x}$ & $\\sin{\\left(x^{2} \\right)}$ \\\\\n' '\\end{tabular}' ) s = latex(TableForm([["a", x**3], ["c", S.One/4], [sqrt(x), sin(x**2)]], headings=("automatic", "automatic"))) assert s == ( '\\begin{tabular}{r l l}\n' ' & 1 & 2 \\\\\n' '\\hline\n' '1 & $a$ & $x^{3}$ \\\\\n' '2 & $c$ & $\\frac{1}{4}$ \\\\\n' '3 & $\\sqrt{x}$ & $\\sin{\\left(x^{2} \\right)}$ \\\\\n' '\\end{tabular}' ) s = latex(TableForm([["a", x**3], ["c", S.One/4], [sqrt(x), sin(x**2)]], formats=['(%s)', None], headings=("automatic", "automatic"))) assert s == ( '\\begin{tabular}{r l l}\n' ' & 1 & 2 \\\\\n' '\\hline\n' '1 & (a) & $x^{3}$ \\\\\n' '2 & (c) & $\\frac{1}{4}$ \\\\\n' '3 & (sqrt(x)) & $\\sin{\\left(x^{2} \\right)}$ \\\\\n' '\\end{tabular}' ) def neg_in_paren(x, i, j): if i % 2: return ('(%s)' if x < 0 else '%s') % x else: pass # use default print s = latex(TableForm([[-1, 2], [-3, 4]], formats=[neg_in_paren]*2, headings=("automatic", "automatic"))) assert s == ( '\\begin{tabular}{r l l}\n' ' & 1 & 2 \\\\\n' '\\hline\n' '1 & -1 & 2 \\\\\n' '2 & (-3) & 4 \\\\\n' '\\end{tabular}' ) s = latex(TableForm([["a", x**3], ["c", S.One/4], [sqrt(x), sin(x**2)]])) assert s == ( '\\begin{tabular}{l l}\n' '$a$ & $x^{3}$ \\\\\n' '$c$ & $\\frac{1}{4}$ \\\\\n' '$\\sqrt{x}$ & $\\sin{\\left(x^{2} \\right)}$ \\\\\n' '\\end{tabular}' )
3749211b4a298371865a21a10f182ae768e1ab49a898843981272cc17185dc49
from sympy.calculus.util import AccumBounds from sympy.concrete.summations import Sum from sympy.core.basic import Basic from sympy.core.containers import Tuple from sympy.core.function import Derivative, Lambda, diff, Function from sympy.core.numbers import (zoo, Float, Integer, I, oo, pi, E, Rational) from sympy.core.relational import Lt, Ge, Ne, Eq from sympy.core.singleton import S from sympy.core.symbol import symbols, Symbol from sympy.core.sympify import sympify from sympy.functions.combinatorial.factorials import (factorial2, binomial, factorial) from sympy.functions.combinatorial.numbers import (lucas, bell, catalan, euler, tribonacci, fibonacci, bernoulli) from sympy.functions.elementary.complexes import re, im, conjugate, Abs from sympy.functions.elementary.exponential import exp, LambertW, log from sympy.functions.elementary.hyperbolic import (tanh, acoth, atanh, coth, asinh, acsch, asech, acosh, csch, sinh, cosh, sech) from sympy.functions.elementary.integers import ceiling, floor from sympy.functions.elementary.miscellaneous import Max, Min from sympy.functions.elementary.trigonometric import (csc, sec, tan, atan, sin, asec, cot, cos, acot, acsc, asin, acos) from sympy.functions.special.delta_functions import Heaviside from sympy.functions.special.elliptic_integrals import (elliptic_pi, elliptic_f, elliptic_k, elliptic_e) from sympy.functions.special.error_functions import (fresnelc, fresnels, Ei, expint) from sympy.functions.special.gamma_functions import (gamma, uppergamma, lowergamma) from sympy.functions.special.mathieu_functions import (mathieusprime, mathieus, mathieucprime, mathieuc) from sympy.functions.special.polynomials import (jacobi, chebyshevu, chebyshevt, hermite, assoc_legendre, gegenbauer, assoc_laguerre, legendre, laguerre) from sympy.functions.special.singularity_functions import SingularityFunction from sympy.functions.special.zeta_functions import (polylog, stieltjes, lerchphi, dirichlet_eta, zeta) from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (Xor, Or, false, true, And, Equivalent, Implies, Not) from sympy.matrices.dense import Matrix from sympy.matrices.expressions.determinant import Determinant from sympy.matrices.expressions.matexpr import MatrixSymbol from sympy.ntheory.factor_ import (totient, reduced_totient, primenu, primeomega) from sympy.physics.quantum import (ComplexSpace, FockSpace, hbar, HilbertSpace, Dagger) from sympy.printing.mathml import (MathMLPresentationPrinter, MathMLPrinter, MathMLContentPrinter, mathml) from sympy.series.limits import Limit from sympy.sets.contains import Contains from sympy.sets.fancysets import Range from sympy.sets.sets import (Interval, Union, SymmetricDifference, Complement, FiniteSet, Intersection, ProductSet) from sympy.stats.rv import RandomSymbol from sympy.tensor.indexed import IndexedBase from sympy.vector import (Divergence, CoordSys3D, Cross, Curl, Dot, Laplacian, Gradient) from sympy.testing.pytest import raises x, y, z, a, b, c, d, e, n = symbols('x:z a:e n') mp = MathMLContentPrinter() mpp = MathMLPresentationPrinter() def test_mathml_printer(): m = MathMLPrinter() assert m.doprint(1+x) == mp.doprint(1+x) def test_content_printmethod(): assert mp.doprint(1 + x) == '<apply><plus/><ci>x</ci><cn>1</cn></apply>' def test_content_mathml_core(): mml_1 = mp._print(1 + x) assert mml_1.nodeName == 'apply' nodes = mml_1.childNodes assert len(nodes) == 3 assert nodes[0].nodeName == 'plus' assert nodes[0].hasChildNodes() is False assert nodes[0].nodeValue is None assert nodes[1].nodeName in ['cn', 'ci'] if nodes[1].nodeName == 'cn': assert nodes[1].childNodes[0].nodeValue == '1' assert nodes[2].childNodes[0].nodeValue == 'x' else: assert nodes[1].childNodes[0].nodeValue == 'x' assert nodes[2].childNodes[0].nodeValue == '1' mml_2 = mp._print(x**2) assert mml_2.nodeName == 'apply' nodes = mml_2.childNodes assert nodes[1].childNodes[0].nodeValue == 'x' assert nodes[2].childNodes[0].nodeValue == '2' mml_3 = mp._print(2*x) assert mml_3.nodeName == 'apply' nodes = mml_3.childNodes assert nodes[0].nodeName == 'times' assert nodes[1].childNodes[0].nodeValue == '2' assert nodes[2].childNodes[0].nodeValue == 'x' mml = mp._print(Float(1.0, 2)*x) assert mml.nodeName == 'apply' nodes = mml.childNodes assert nodes[0].nodeName == 'times' assert nodes[1].childNodes[0].nodeValue == '1.0' assert nodes[2].childNodes[0].nodeValue == 'x' def test_content_mathml_functions(): mml_1 = mp._print(sin(x)) assert mml_1.nodeName == 'apply' assert mml_1.childNodes[0].nodeName == 'sin' assert mml_1.childNodes[1].nodeName == 'ci' mml_2 = mp._print(diff(sin(x), x, evaluate=False)) assert mml_2.nodeName == 'apply' assert mml_2.childNodes[0].nodeName == 'diff' assert mml_2.childNodes[1].nodeName == 'bvar' assert mml_2.childNodes[1].childNodes[ 0].nodeName == 'ci' # below bvar there's <ci>x/ci> mml_3 = mp._print(diff(cos(x*y), x, evaluate=False)) assert mml_3.nodeName == 'apply' assert mml_3.childNodes[0].nodeName == 'partialdiff' assert mml_3.childNodes[1].nodeName == 'bvar' assert mml_3.childNodes[1].childNodes[ 0].nodeName == 'ci' # below bvar there's <ci>x/ci> def test_content_mathml_limits(): # XXX No unevaluated limits lim_fun = sin(x)/x mml_1 = mp._print(Limit(lim_fun, x, 0)) assert mml_1.childNodes[0].nodeName == 'limit' assert mml_1.childNodes[1].nodeName == 'bvar' assert mml_1.childNodes[2].nodeName == 'lowlimit' assert mml_1.childNodes[3].toxml() == mp._print(lim_fun).toxml() def test_content_mathml_integrals(): integrand = x mml_1 = mp._print(Integral(integrand, (x, 0, 1))) assert mml_1.childNodes[0].nodeName == 'int' assert mml_1.childNodes[1].nodeName == 'bvar' assert mml_1.childNodes[2].nodeName == 'lowlimit' assert mml_1.childNodes[3].nodeName == 'uplimit' assert mml_1.childNodes[4].toxml() == mp._print(integrand).toxml() def test_content_mathml_matrices(): A = Matrix([1, 2, 3]) B = Matrix([[0, 5, 4], [2, 3, 1], [9, 7, 9]]) mll_1 = mp._print(A) assert mll_1.childNodes[0].nodeName == 'matrixrow' assert mll_1.childNodes[0].childNodes[0].nodeName == 'cn' assert mll_1.childNodes[0].childNodes[0].childNodes[0].nodeValue == '1' assert mll_1.childNodes[1].nodeName == 'matrixrow' assert mll_1.childNodes[1].childNodes[0].nodeName == 'cn' assert mll_1.childNodes[1].childNodes[0].childNodes[0].nodeValue == '2' assert mll_1.childNodes[2].nodeName == 'matrixrow' assert mll_1.childNodes[2].childNodes[0].nodeName == 'cn' assert mll_1.childNodes[2].childNodes[0].childNodes[0].nodeValue == '3' mll_2 = mp._print(B) assert mll_2.childNodes[0].nodeName == 'matrixrow' assert mll_2.childNodes[0].childNodes[0].nodeName == 'cn' assert mll_2.childNodes[0].childNodes[0].childNodes[0].nodeValue == '0' assert mll_2.childNodes[0].childNodes[1].nodeName == 'cn' assert mll_2.childNodes[0].childNodes[1].childNodes[0].nodeValue == '5' assert mll_2.childNodes[0].childNodes[2].nodeName == 'cn' assert mll_2.childNodes[0].childNodes[2].childNodes[0].nodeValue == '4' assert mll_2.childNodes[1].nodeName == 'matrixrow' assert mll_2.childNodes[1].childNodes[0].nodeName == 'cn' assert mll_2.childNodes[1].childNodes[0].childNodes[0].nodeValue == '2' assert mll_2.childNodes[1].childNodes[1].nodeName == 'cn' assert mll_2.childNodes[1].childNodes[1].childNodes[0].nodeValue == '3' assert mll_2.childNodes[1].childNodes[2].nodeName == 'cn' assert mll_2.childNodes[1].childNodes[2].childNodes[0].nodeValue == '1' assert mll_2.childNodes[2].nodeName == 'matrixrow' assert mll_2.childNodes[2].childNodes[0].nodeName == 'cn' assert mll_2.childNodes[2].childNodes[0].childNodes[0].nodeValue == '9' assert mll_2.childNodes[2].childNodes[1].nodeName == 'cn' assert mll_2.childNodes[2].childNodes[1].childNodes[0].nodeValue == '7' assert mll_2.childNodes[2].childNodes[2].nodeName == 'cn' assert mll_2.childNodes[2].childNodes[2].childNodes[0].nodeValue == '9' def test_content_mathml_sums(): summand = x mml_1 = mp._print(Sum(summand, (x, 1, 10))) assert mml_1.childNodes[0].nodeName == 'sum' assert mml_1.childNodes[1].nodeName == 'bvar' assert mml_1.childNodes[2].nodeName == 'lowlimit' assert mml_1.childNodes[3].nodeName == 'uplimit' assert mml_1.childNodes[4].toxml() == mp._print(summand).toxml() def test_content_mathml_tuples(): mml_1 = mp._print([2]) assert mml_1.nodeName == 'list' assert mml_1.childNodes[0].nodeName == 'cn' assert len(mml_1.childNodes) == 1 mml_2 = mp._print([2, Integer(1)]) assert mml_2.nodeName == 'list' assert mml_2.childNodes[0].nodeName == 'cn' assert mml_2.childNodes[1].nodeName == 'cn' assert len(mml_2.childNodes) == 2 def test_content_mathml_add(): mml = mp._print(x**5 - x**4 + x) assert mml.childNodes[0].nodeName == 'plus' assert mml.childNodes[1].childNodes[0].nodeName == 'minus' assert mml.childNodes[1].childNodes[1].nodeName == 'apply' def test_content_mathml_Rational(): mml_1 = mp._print(Rational(1, 1)) """should just return a number""" assert mml_1.nodeName == 'cn' mml_2 = mp._print(Rational(2, 5)) assert mml_2.childNodes[0].nodeName == 'divide' def test_content_mathml_constants(): mml = mp._print(I) assert mml.nodeName == 'imaginaryi' mml = mp._print(E) assert mml.nodeName == 'exponentiale' mml = mp._print(oo) assert mml.nodeName == 'infinity' mml = mp._print(pi) assert mml.nodeName == 'pi' assert mathml(hbar) == '<hbar/>' assert mathml(S.TribonacciConstant) == '<tribonacciconstant/>' assert mathml(S.GoldenRatio) == '<cn>&#966;</cn>' mml = mathml(S.EulerGamma) assert mml == '<eulergamma/>' mml = mathml(S.EmptySet) assert mml == '<emptyset/>' mml = mathml(S.true) assert mml == '<true/>' mml = mathml(S.false) assert mml == '<false/>' mml = mathml(S.NaN) assert mml == '<notanumber/>' def test_content_mathml_trig(): mml = mp._print(sin(x)) assert mml.childNodes[0].nodeName == 'sin' mml = mp._print(cos(x)) assert mml.childNodes[0].nodeName == 'cos' mml = mp._print(tan(x)) assert mml.childNodes[0].nodeName == 'tan' mml = mp._print(cot(x)) assert mml.childNodes[0].nodeName == 'cot' mml = mp._print(csc(x)) assert mml.childNodes[0].nodeName == 'csc' mml = mp._print(sec(x)) assert mml.childNodes[0].nodeName == 'sec' mml = mp._print(asin(x)) assert mml.childNodes[0].nodeName == 'arcsin' mml = mp._print(acos(x)) assert mml.childNodes[0].nodeName == 'arccos' mml = mp._print(atan(x)) assert mml.childNodes[0].nodeName == 'arctan' mml = mp._print(acot(x)) assert mml.childNodes[0].nodeName == 'arccot' mml = mp._print(acsc(x)) assert mml.childNodes[0].nodeName == 'arccsc' mml = mp._print(asec(x)) assert mml.childNodes[0].nodeName == 'arcsec' mml = mp._print(sinh(x)) assert mml.childNodes[0].nodeName == 'sinh' mml = mp._print(cosh(x)) assert mml.childNodes[0].nodeName == 'cosh' mml = mp._print(tanh(x)) assert mml.childNodes[0].nodeName == 'tanh' mml = mp._print(coth(x)) assert mml.childNodes[0].nodeName == 'coth' mml = mp._print(csch(x)) assert mml.childNodes[0].nodeName == 'csch' mml = mp._print(sech(x)) assert mml.childNodes[0].nodeName == 'sech' mml = mp._print(asinh(x)) assert mml.childNodes[0].nodeName == 'arcsinh' mml = mp._print(atanh(x)) assert mml.childNodes[0].nodeName == 'arctanh' mml = mp._print(acosh(x)) assert mml.childNodes[0].nodeName == 'arccosh' mml = mp._print(acoth(x)) assert mml.childNodes[0].nodeName == 'arccoth' mml = mp._print(acsch(x)) assert mml.childNodes[0].nodeName == 'arccsch' mml = mp._print(asech(x)) assert mml.childNodes[0].nodeName == 'arcsech' def test_content_mathml_relational(): mml_1 = mp._print(Eq(x, 1)) assert mml_1.nodeName == 'apply' assert mml_1.childNodes[0].nodeName == 'eq' assert mml_1.childNodes[1].nodeName == 'ci' assert mml_1.childNodes[1].childNodes[0].nodeValue == 'x' assert mml_1.childNodes[2].nodeName == 'cn' assert mml_1.childNodes[2].childNodes[0].nodeValue == '1' mml_2 = mp._print(Ne(1, x)) assert mml_2.nodeName == 'apply' assert mml_2.childNodes[0].nodeName == 'neq' assert mml_2.childNodes[1].nodeName == 'cn' assert mml_2.childNodes[1].childNodes[0].nodeValue == '1' assert mml_2.childNodes[2].nodeName == 'ci' assert mml_2.childNodes[2].childNodes[0].nodeValue == 'x' mml_3 = mp._print(Ge(1, x)) assert mml_3.nodeName == 'apply' assert mml_3.childNodes[0].nodeName == 'geq' assert mml_3.childNodes[1].nodeName == 'cn' assert mml_3.childNodes[1].childNodes[0].nodeValue == '1' assert mml_3.childNodes[2].nodeName == 'ci' assert mml_3.childNodes[2].childNodes[0].nodeValue == 'x' mml_4 = mp._print(Lt(1, x)) assert mml_4.nodeName == 'apply' assert mml_4.childNodes[0].nodeName == 'lt' assert mml_4.childNodes[1].nodeName == 'cn' assert mml_4.childNodes[1].childNodes[0].nodeValue == '1' assert mml_4.childNodes[2].nodeName == 'ci' assert mml_4.childNodes[2].childNodes[0].nodeValue == 'x' def test_content_symbol(): mml = mp._print(x) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeValue == 'x' del mml mml = mp._print(Symbol("x^2")) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeName == 'mml:msup' assert mml.childNodes[0].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeValue == '2' del mml mml = mp._print(Symbol("x__2")) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeName == 'mml:msup' assert mml.childNodes[0].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeValue == '2' del mml mml = mp._print(Symbol("x_2")) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeName == 'mml:msub' assert mml.childNodes[0].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeValue == '2' del mml mml = mp._print(Symbol("x^3_2")) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeName == 'mml:msubsup' assert mml.childNodes[0].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeValue == '2' assert mml.childNodes[0].childNodes[2].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[2].childNodes[0].nodeValue == '3' del mml mml = mp._print(Symbol("x__3_2")) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeName == 'mml:msubsup' assert mml.childNodes[0].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeValue == '2' assert mml.childNodes[0].childNodes[2].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[2].childNodes[0].nodeValue == '3' del mml mml = mp._print(Symbol("x_2_a")) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeName == 'mml:msub' assert mml.childNodes[0].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].nodeName == 'mml:mrow' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[0].childNodes[ 0].nodeValue == '2' assert mml.childNodes[0].childNodes[1].childNodes[1].nodeName == 'mml:mo' assert mml.childNodes[0].childNodes[1].childNodes[1].childNodes[ 0].nodeValue == ' ' assert mml.childNodes[0].childNodes[1].childNodes[2].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[2].childNodes[ 0].nodeValue == 'a' del mml mml = mp._print(Symbol("x^2^a")) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeName == 'mml:msup' assert mml.childNodes[0].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].nodeName == 'mml:mrow' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[0].childNodes[ 0].nodeValue == '2' assert mml.childNodes[0].childNodes[1].childNodes[1].nodeName == 'mml:mo' assert mml.childNodes[0].childNodes[1].childNodes[1].childNodes[ 0].nodeValue == ' ' assert mml.childNodes[0].childNodes[1].childNodes[2].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[2].childNodes[ 0].nodeValue == 'a' del mml mml = mp._print(Symbol("x__2__a")) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeName == 'mml:msup' assert mml.childNodes[0].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].nodeName == 'mml:mrow' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[0].childNodes[ 0].nodeValue == '2' assert mml.childNodes[0].childNodes[1].childNodes[1].nodeName == 'mml:mo' assert mml.childNodes[0].childNodes[1].childNodes[1].childNodes[ 0].nodeValue == ' ' assert mml.childNodes[0].childNodes[1].childNodes[2].nodeName == 'mml:mi' assert mml.childNodes[0].childNodes[1].childNodes[2].childNodes[ 0].nodeValue == 'a' del mml def test_content_mathml_greek(): mml = mp._print(Symbol('alpha')) assert mml.nodeName == 'ci' assert mml.childNodes[0].nodeValue == '\N{GREEK SMALL LETTER ALPHA}' assert mp.doprint(Symbol('alpha')) == '<ci>&#945;</ci>' assert mp.doprint(Symbol('beta')) == '<ci>&#946;</ci>' assert mp.doprint(Symbol('gamma')) == '<ci>&#947;</ci>' assert mp.doprint(Symbol('delta')) == '<ci>&#948;</ci>' assert mp.doprint(Symbol('epsilon')) == '<ci>&#949;</ci>' assert mp.doprint(Symbol('zeta')) == '<ci>&#950;</ci>' assert mp.doprint(Symbol('eta')) == '<ci>&#951;</ci>' assert mp.doprint(Symbol('theta')) == '<ci>&#952;</ci>' assert mp.doprint(Symbol('iota')) == '<ci>&#953;</ci>' assert mp.doprint(Symbol('kappa')) == '<ci>&#954;</ci>' assert mp.doprint(Symbol('lambda')) == '<ci>&#955;</ci>' assert mp.doprint(Symbol('mu')) == '<ci>&#956;</ci>' assert mp.doprint(Symbol('nu')) == '<ci>&#957;</ci>' assert mp.doprint(Symbol('xi')) == '<ci>&#958;</ci>' assert mp.doprint(Symbol('omicron')) == '<ci>&#959;</ci>' assert mp.doprint(Symbol('pi')) == '<ci>&#960;</ci>' assert mp.doprint(Symbol('rho')) == '<ci>&#961;</ci>' assert mp.doprint(Symbol('varsigma')) == '<ci>&#962;</ci>' assert mp.doprint(Symbol('sigma')) == '<ci>&#963;</ci>' assert mp.doprint(Symbol('tau')) == '<ci>&#964;</ci>' assert mp.doprint(Symbol('upsilon')) == '<ci>&#965;</ci>' assert mp.doprint(Symbol('phi')) == '<ci>&#966;</ci>' assert mp.doprint(Symbol('chi')) == '<ci>&#967;</ci>' assert mp.doprint(Symbol('psi')) == '<ci>&#968;</ci>' assert mp.doprint(Symbol('omega')) == '<ci>&#969;</ci>' assert mp.doprint(Symbol('Alpha')) == '<ci>&#913;</ci>' assert mp.doprint(Symbol('Beta')) == '<ci>&#914;</ci>' assert mp.doprint(Symbol('Gamma')) == '<ci>&#915;</ci>' assert mp.doprint(Symbol('Delta')) == '<ci>&#916;</ci>' assert mp.doprint(Symbol('Epsilon')) == '<ci>&#917;</ci>' assert mp.doprint(Symbol('Zeta')) == '<ci>&#918;</ci>' assert mp.doprint(Symbol('Eta')) == '<ci>&#919;</ci>' assert mp.doprint(Symbol('Theta')) == '<ci>&#920;</ci>' assert mp.doprint(Symbol('Iota')) == '<ci>&#921;</ci>' assert mp.doprint(Symbol('Kappa')) == '<ci>&#922;</ci>' assert mp.doprint(Symbol('Lambda')) == '<ci>&#923;</ci>' assert mp.doprint(Symbol('Mu')) == '<ci>&#924;</ci>' assert mp.doprint(Symbol('Nu')) == '<ci>&#925;</ci>' assert mp.doprint(Symbol('Xi')) == '<ci>&#926;</ci>' assert mp.doprint(Symbol('Omicron')) == '<ci>&#927;</ci>' assert mp.doprint(Symbol('Pi')) == '<ci>&#928;</ci>' assert mp.doprint(Symbol('Rho')) == '<ci>&#929;</ci>' assert mp.doprint(Symbol('Sigma')) == '<ci>&#931;</ci>' assert mp.doprint(Symbol('Tau')) == '<ci>&#932;</ci>' assert mp.doprint(Symbol('Upsilon')) == '<ci>&#933;</ci>' assert mp.doprint(Symbol('Phi')) == '<ci>&#934;</ci>' assert mp.doprint(Symbol('Chi')) == '<ci>&#935;</ci>' assert mp.doprint(Symbol('Psi')) == '<ci>&#936;</ci>' assert mp.doprint(Symbol('Omega')) == '<ci>&#937;</ci>' def test_content_mathml_order(): expr = x**3 + x**2*y + 3*x*y**3 + y**4 mp = MathMLContentPrinter({'order': 'lex'}) mml = mp._print(expr) assert mml.childNodes[1].childNodes[0].nodeName == 'power' assert mml.childNodes[1].childNodes[1].childNodes[0].data == 'x' assert mml.childNodes[1].childNodes[2].childNodes[0].data == '3' assert mml.childNodes[4].childNodes[0].nodeName == 'power' assert mml.childNodes[4].childNodes[1].childNodes[0].data == 'y' assert mml.childNodes[4].childNodes[2].childNodes[0].data == '4' mp = MathMLContentPrinter({'order': 'rev-lex'}) mml = mp._print(expr) assert mml.childNodes[1].childNodes[0].nodeName == 'power' assert mml.childNodes[1].childNodes[1].childNodes[0].data == 'y' assert mml.childNodes[1].childNodes[2].childNodes[0].data == '4' assert mml.childNodes[4].childNodes[0].nodeName == 'power' assert mml.childNodes[4].childNodes[1].childNodes[0].data == 'x' assert mml.childNodes[4].childNodes[2].childNodes[0].data == '3' def test_content_settings(): raises(TypeError, lambda: mathml(x, method="garbage")) def test_content_mathml_logic(): assert mathml(And(x, y)) == '<apply><and/><ci>x</ci><ci>y</ci></apply>' assert mathml(Or(x, y)) == '<apply><or/><ci>x</ci><ci>y</ci></apply>' assert mathml(Xor(x, y)) == '<apply><xor/><ci>x</ci><ci>y</ci></apply>' assert mathml(Implies(x, y)) == '<apply><implies/><ci>x</ci><ci>y</ci></apply>' assert mathml(Not(x)) == '<apply><not/><ci>x</ci></apply>' def test_content_finite_sets(): assert mathml(FiniteSet(a)) == '<set><ci>a</ci></set>' assert mathml(FiniteSet(a, b)) == '<set><ci>a</ci><ci>b</ci></set>' assert mathml(FiniteSet(FiniteSet(a, b), c)) == \ '<set><ci>c</ci><set><ci>a</ci><ci>b</ci></set></set>' A = FiniteSet(a) B = FiniteSet(b) C = FiniteSet(c) D = FiniteSet(d) U1 = Union(A, B, evaluate=False) U2 = Union(C, D, evaluate=False) I1 = Intersection(A, B, evaluate=False) I2 = Intersection(C, D, evaluate=False) C1 = Complement(A, B, evaluate=False) C2 = Complement(C, D, evaluate=False) # XXX ProductSet does not support evaluate keyword P1 = ProductSet(A, B) P2 = ProductSet(C, D) assert mathml(U1) == \ '<apply><union/><set><ci>a</ci></set><set><ci>b</ci></set></apply>' assert mathml(I1) == \ '<apply><intersect/><set><ci>a</ci></set><set><ci>b</ci></set>' \ '</apply>' assert mathml(C1) == \ '<apply><setdiff/><set><ci>a</ci></set><set><ci>b</ci></set></apply>' assert mathml(P1) == \ '<apply><cartesianproduct/><set><ci>a</ci></set><set><ci>b</ci>' \ '</set></apply>' assert mathml(Intersection(A, U2, evaluate=False)) == \ '<apply><intersect/><set><ci>a</ci></set><apply><union/><set>' \ '<ci>c</ci></set><set><ci>d</ci></set></apply></apply>' assert mathml(Intersection(U1, U2, evaluate=False)) == \ '<apply><intersect/><apply><union/><set><ci>a</ci></set><set>' \ '<ci>b</ci></set></apply><apply><union/><set><ci>c</ci></set>' \ '<set><ci>d</ci></set></apply></apply>' # XXX Does the parenthesis appear correctly for these examples in mathjax? assert mathml(Intersection(C1, C2, evaluate=False)) == \ '<apply><intersect/><apply><setdiff/><set><ci>a</ci></set><set>' \ '<ci>b</ci></set></apply><apply><setdiff/><set><ci>c</ci></set>' \ '<set><ci>d</ci></set></apply></apply>' assert mathml(Intersection(P1, P2, evaluate=False)) == \ '<apply><intersect/><apply><cartesianproduct/><set><ci>a</ci></set>' \ '<set><ci>b</ci></set></apply><apply><cartesianproduct/><set>' \ '<ci>c</ci></set><set><ci>d</ci></set></apply></apply>' assert mathml(Union(A, I2, evaluate=False)) == \ '<apply><union/><set><ci>a</ci></set><apply><intersect/><set>' \ '<ci>c</ci></set><set><ci>d</ci></set></apply></apply>' assert mathml(Union(I1, I2, evaluate=False)) == \ '<apply><union/><apply><intersect/><set><ci>a</ci></set><set>' \ '<ci>b</ci></set></apply><apply><intersect/><set><ci>c</ci></set>' \ '<set><ci>d</ci></set></apply></apply>' assert mathml(Union(C1, C2, evaluate=False)) == \ '<apply><union/><apply><setdiff/><set><ci>a</ci></set><set>' \ '<ci>b</ci></set></apply><apply><setdiff/><set><ci>c</ci></set>' \ '<set><ci>d</ci></set></apply></apply>' assert mathml(Union(P1, P2, evaluate=False)) == \ '<apply><union/><apply><cartesianproduct/><set><ci>a</ci></set>' \ '<set><ci>b</ci></set></apply><apply><cartesianproduct/><set>' \ '<ci>c</ci></set><set><ci>d</ci></set></apply></apply>' assert mathml(Complement(A, C2, evaluate=False)) == \ '<apply><setdiff/><set><ci>a</ci></set><apply><setdiff/><set>' \ '<ci>c</ci></set><set><ci>d</ci></set></apply></apply>' assert mathml(Complement(U1, U2, evaluate=False)) == \ '<apply><setdiff/><apply><union/><set><ci>a</ci></set><set>' \ '<ci>b</ci></set></apply><apply><union/><set><ci>c</ci></set>' \ '<set><ci>d</ci></set></apply></apply>' assert mathml(Complement(I1, I2, evaluate=False)) == \ '<apply><setdiff/><apply><intersect/><set><ci>a</ci></set><set>' \ '<ci>b</ci></set></apply><apply><intersect/><set><ci>c</ci></set>' \ '<set><ci>d</ci></set></apply></apply>' assert mathml(Complement(P1, P2, evaluate=False)) == \ '<apply><setdiff/><apply><cartesianproduct/><set><ci>a</ci></set>' \ '<set><ci>b</ci></set></apply><apply><cartesianproduct/><set>' \ '<ci>c</ci></set><set><ci>d</ci></set></apply></apply>' assert mathml(ProductSet(A, P2)) == \ '<apply><cartesianproduct/><set><ci>a</ci></set>' \ '<apply><cartesianproduct/><set><ci>c</ci></set>' \ '<set><ci>d</ci></set></apply></apply>' assert mathml(ProductSet(U1, U2)) == \ '<apply><cartesianproduct/><apply><union/><set><ci>a</ci></set>' \ '<set><ci>b</ci></set></apply><apply><union/><set><ci>c</ci></set>' \ '<set><ci>d</ci></set></apply></apply>' assert mathml(ProductSet(I1, I2)) == \ '<apply><cartesianproduct/><apply><intersect/><set><ci>a</ci></set>' \ '<set><ci>b</ci></set></apply><apply><intersect/><set>' \ '<ci>c</ci></set><set><ci>d</ci></set></apply></apply>' assert mathml(ProductSet(C1, C2)) == \ '<apply><cartesianproduct/><apply><setdiff/><set><ci>a</ci></set>' \ '<set><ci>b</ci></set></apply><apply><setdiff/><set>' \ '<ci>c</ci></set><set><ci>d</ci></set></apply></apply>' def test_presentation_printmethod(): assert mpp.doprint(1 + x) == '<mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow>' assert mpp.doprint(x**2) == '<msup><mi>x</mi><mn>2</mn></msup>' assert mpp.doprint(x**-1) == '<mfrac><mn>1</mn><mi>x</mi></mfrac>' assert mpp.doprint(x**-2) == \ '<mfrac><mn>1</mn><msup><mi>x</mi><mn>2</mn></msup></mfrac>' assert mpp.doprint(2*x) == \ '<mrow><mn>2</mn><mo>&InvisibleTimes;</mo><mi>x</mi></mrow>' def test_presentation_mathml_core(): mml_1 = mpp._print(1 + x) assert mml_1.nodeName == 'mrow' nodes = mml_1.childNodes assert len(nodes) == 3 assert nodes[0].nodeName in ['mi', 'mn'] assert nodes[1].nodeName == 'mo' if nodes[0].nodeName == 'mn': assert nodes[0].childNodes[0].nodeValue == '1' assert nodes[2].childNodes[0].nodeValue == 'x' else: assert nodes[0].childNodes[0].nodeValue == 'x' assert nodes[2].childNodes[0].nodeValue == '1' mml_2 = mpp._print(x**2) assert mml_2.nodeName == 'msup' nodes = mml_2.childNodes assert nodes[0].childNodes[0].nodeValue == 'x' assert nodes[1].childNodes[0].nodeValue == '2' mml_3 = mpp._print(2*x) assert mml_3.nodeName == 'mrow' nodes = mml_3.childNodes assert nodes[0].childNodes[0].nodeValue == '2' assert nodes[1].childNodes[0].nodeValue == '&InvisibleTimes;' assert nodes[2].childNodes[0].nodeValue == 'x' mml = mpp._print(Float(1.0, 2)*x) assert mml.nodeName == 'mrow' nodes = mml.childNodes assert nodes[0].childNodes[0].nodeValue == '1.0' assert nodes[1].childNodes[0].nodeValue == '&InvisibleTimes;' assert nodes[2].childNodes[0].nodeValue == 'x' def test_presentation_mathml_functions(): mml_1 = mpp._print(sin(x)) assert mml_1.childNodes[0].childNodes[0 ].nodeValue == 'sin' assert mml_1.childNodes[1].childNodes[0 ].childNodes[0].nodeValue == 'x' mml_2 = mpp._print(diff(sin(x), x, evaluate=False)) assert mml_2.nodeName == 'mrow' assert mml_2.childNodes[0].childNodes[0 ].childNodes[0].childNodes[0].nodeValue == '&dd;' assert mml_2.childNodes[1].childNodes[1 ].nodeName == 'mfenced' assert mml_2.childNodes[0].childNodes[1 ].childNodes[0].childNodes[0].nodeValue == '&dd;' mml_3 = mpp._print(diff(cos(x*y), x, evaluate=False)) assert mml_3.childNodes[0].nodeName == 'mfrac' assert mml_3.childNodes[0].childNodes[0 ].childNodes[0].childNodes[0].nodeValue == '&#x2202;' assert mml_3.childNodes[1].childNodes[0 ].childNodes[0].nodeValue == 'cos' def test_print_derivative(): f = Function('f') d = Derivative(f(x, y, z), x, z, x, z, z, y) assert mathml(d) == \ '<apply><partialdiff/><bvar><ci>y</ci><ci>z</ci><degree><cn>2</cn></degree><ci>x</ci><ci>z</ci><ci>x</ci></bvar><apply><f/><ci>x</ci><ci>y</ci><ci>z</ci></apply></apply>' assert mathml(d, printer='presentation') == \ '<mrow><mfrac><mrow><msup><mo>&#x2202;</mo><mn>6</mn></msup></mrow><mrow><mo>&#x2202;</mo><mi>y</mi><msup><mo>&#x2202;</mo><mn>2</mn></msup><mi>z</mi><mo>&#x2202;</mo><mi>x</mi><mo>&#x2202;</mo><mi>z</mi><mo>&#x2202;</mo><mi>x</mi></mrow></mfrac><mrow><mi>f</mi><mfenced><mi>x</mi><mi>y</mi><mi>z</mi></mfenced></mrow></mrow>' def test_presentation_mathml_limits(): lim_fun = sin(x)/x mml_1 = mpp._print(Limit(lim_fun, x, 0)) assert mml_1.childNodes[0].nodeName == 'munder' assert mml_1.childNodes[0].childNodes[0 ].childNodes[0].nodeValue == 'lim' assert mml_1.childNodes[0].childNodes[1 ].childNodes[0].childNodes[0 ].nodeValue == 'x' assert mml_1.childNodes[0].childNodes[1 ].childNodes[1].childNodes[0 ].nodeValue == '&#x2192;' assert mml_1.childNodes[0].childNodes[1 ].childNodes[2].childNodes[0 ].nodeValue == '0' def test_presentation_mathml_integrals(): assert mpp.doprint(Integral(x, (x, 0, 1))) == \ '<mrow><msubsup><mo>&#x222B;</mo><mn>0</mn><mn>1</mn></msubsup>'\ '<mi>x</mi><mo>&dd;</mo><mi>x</mi></mrow>' assert mpp.doprint(Integral(log(x), x)) == \ '<mrow><mo>&#x222B;</mo><mrow><mi>log</mi><mfenced><mi>x</mi>'\ '</mfenced></mrow><mo>&dd;</mo><mi>x</mi></mrow>' assert mpp.doprint(Integral(x*y, x, y)) == \ '<mrow><mo>&#x222C;</mo><mrow><mi>x</mi><mo>&InvisibleTimes;</mo>'\ '<mi>y</mi></mrow><mo>&dd;</mo><mi>y</mi><mo>&dd;</mo><mi>x</mi></mrow>' z, w = symbols('z w') assert mpp.doprint(Integral(x*y*z, x, y, z)) == \ '<mrow><mo>&#x222D;</mo><mrow><mi>x</mi><mo>&InvisibleTimes;</mo>'\ '<mi>y</mi><mo>&InvisibleTimes;</mo><mi>z</mi></mrow><mo>&dd;</mo>'\ '<mi>z</mi><mo>&dd;</mo><mi>y</mi><mo>&dd;</mo><mi>x</mi></mrow>' assert mpp.doprint(Integral(x*y*z*w, x, y, z, w)) == \ '<mrow><mo>&#x222B;</mo><mo>&#x222B;</mo><mo>&#x222B;</mo>'\ '<mo>&#x222B;</mo><mrow><mi>w</mi><mo>&InvisibleTimes;</mo>'\ '<mi>x</mi><mo>&InvisibleTimes;</mo><mi>y</mi>'\ '<mo>&InvisibleTimes;</mo><mi>z</mi></mrow><mo>&dd;</mo><mi>w</mi>'\ '<mo>&dd;</mo><mi>z</mi><mo>&dd;</mo><mi>y</mi><mo>&dd;</mo><mi>x</mi></mrow>' assert mpp.doprint(Integral(x, x, y, (z, 0, 1))) == \ '<mrow><msubsup><mo>&#x222B;</mo><mn>0</mn><mn>1</mn></msubsup>'\ '<mo>&#x222B;</mo><mo>&#x222B;</mo><mi>x</mi><mo>&dd;</mo><mi>z</mi>'\ '<mo>&dd;</mo><mi>y</mi><mo>&dd;</mo><mi>x</mi></mrow>' assert mpp.doprint(Integral(x, (x, 0))) == \ '<mrow><msup><mo>&#x222B;</mo><mn>0</mn></msup><mi>x</mi><mo>&dd;</mo>'\ '<mi>x</mi></mrow>' def test_presentation_mathml_matrices(): A = Matrix([1, 2, 3]) B = Matrix([[0, 5, 4], [2, 3, 1], [9, 7, 9]]) mll_1 = mpp._print(A) assert mll_1.childNodes[0].nodeName == 'mtable' assert mll_1.childNodes[0].childNodes[0].nodeName == 'mtr' assert len(mll_1.childNodes[0].childNodes) == 3 assert mll_1.childNodes[0].childNodes[0].childNodes[0].nodeName == 'mtd' assert len(mll_1.childNodes[0].childNodes[0].childNodes) == 1 assert mll_1.childNodes[0].childNodes[0].childNodes[0 ].childNodes[0].childNodes[0].nodeValue == '1' assert mll_1.childNodes[0].childNodes[1].childNodes[0 ].childNodes[0].childNodes[0].nodeValue == '2' assert mll_1.childNodes[0].childNodes[2].childNodes[0 ].childNodes[0].childNodes[0].nodeValue == '3' mll_2 = mpp._print(B) assert mll_2.childNodes[0].nodeName == 'mtable' assert mll_2.childNodes[0].childNodes[0].nodeName == 'mtr' assert len(mll_2.childNodes[0].childNodes) == 3 assert mll_2.childNodes[0].childNodes[0].childNodes[0].nodeName == 'mtd' assert len(mll_2.childNodes[0].childNodes[0].childNodes) == 3 assert mll_2.childNodes[0].childNodes[0].childNodes[0 ].childNodes[0].childNodes[0].nodeValue == '0' assert mll_2.childNodes[0].childNodes[0].childNodes[1 ].childNodes[0].childNodes[0].nodeValue == '5' assert mll_2.childNodes[0].childNodes[0].childNodes[2 ].childNodes[0].childNodes[0].nodeValue == '4' assert mll_2.childNodes[0].childNodes[1].childNodes[0 ].childNodes[0].childNodes[0].nodeValue == '2' assert mll_2.childNodes[0].childNodes[1].childNodes[1 ].childNodes[0].childNodes[0].nodeValue == '3' assert mll_2.childNodes[0].childNodes[1].childNodes[2 ].childNodes[0].childNodes[0].nodeValue == '1' assert mll_2.childNodes[0].childNodes[2].childNodes[0 ].childNodes[0].childNodes[0].nodeValue == '9' assert mll_2.childNodes[0].childNodes[2].childNodes[1 ].childNodes[0].childNodes[0].nodeValue == '7' assert mll_2.childNodes[0].childNodes[2].childNodes[2 ].childNodes[0].childNodes[0].nodeValue == '9' def test_presentation_mathml_sums(): summand = x mml_1 = mpp._print(Sum(summand, (x, 1, 10))) assert mml_1.childNodes[0].nodeName == 'munderover' assert len(mml_1.childNodes[0].childNodes) == 3 assert mml_1.childNodes[0].childNodes[0].childNodes[0 ].nodeValue == '&#x2211;' assert len(mml_1.childNodes[0].childNodes[1].childNodes) == 3 assert mml_1.childNodes[0].childNodes[2].childNodes[0 ].nodeValue == '10' assert mml_1.childNodes[1].childNodes[0].nodeValue == 'x' def test_presentation_mathml_add(): mml = mpp._print(x**5 - x**4 + x) assert len(mml.childNodes) == 5 assert mml.childNodes[0].childNodes[0].childNodes[0 ].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].childNodes[0 ].nodeValue == '5' assert mml.childNodes[1].childNodes[0].nodeValue == '-' assert mml.childNodes[2].childNodes[0].childNodes[0 ].nodeValue == 'x' assert mml.childNodes[2].childNodes[1].childNodes[0 ].nodeValue == '4' assert mml.childNodes[3].childNodes[0].nodeValue == '+' assert mml.childNodes[4].childNodes[0].nodeValue == 'x' def test_presentation_mathml_Rational(): mml_1 = mpp._print(Rational(1, 1)) assert mml_1.nodeName == 'mn' mml_2 = mpp._print(Rational(2, 5)) assert mml_2.nodeName == 'mfrac' assert mml_2.childNodes[0].childNodes[0].nodeValue == '2' assert mml_2.childNodes[1].childNodes[0].nodeValue == '5' def test_presentation_mathml_constants(): mml = mpp._print(I) assert mml.childNodes[0].nodeValue == '&ImaginaryI;' mml = mpp._print(E) assert mml.childNodes[0].nodeValue == '&ExponentialE;' mml = mpp._print(oo) assert mml.childNodes[0].nodeValue == '&#x221E;' mml = mpp._print(pi) assert mml.childNodes[0].nodeValue == '&pi;' assert mathml(hbar, printer='presentation') == '<mi>&#x210F;</mi>' assert mathml(S.TribonacciConstant, printer='presentation' ) == '<mi>TribonacciConstant</mi>' assert mathml(S.EulerGamma, printer='presentation' ) == '<mi>&#x3B3;</mi>' assert mathml(S.GoldenRatio, printer='presentation' ) == '<mi>&#x3A6;</mi>' assert mathml(zoo, printer='presentation') == \ '<mover><mo>&#x221E;</mo><mo>~</mo></mover>' assert mathml(S.NaN, printer='presentation') == '<mi>NaN</mi>' def test_presentation_mathml_trig(): mml = mpp._print(sin(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'sin' mml = mpp._print(cos(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'cos' mml = mpp._print(tan(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'tan' mml = mpp._print(asin(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'arcsin' mml = mpp._print(acos(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'arccos' mml = mpp._print(atan(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'arctan' mml = mpp._print(sinh(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'sinh' mml = mpp._print(cosh(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'cosh' mml = mpp._print(tanh(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'tanh' mml = mpp._print(asinh(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'arcsinh' mml = mpp._print(atanh(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'arctanh' mml = mpp._print(acosh(x)) assert mml.childNodes[0].childNodes[0].nodeValue == 'arccosh' def test_presentation_mathml_relational(): mml_1 = mpp._print(Eq(x, 1)) assert len(mml_1.childNodes) == 3 assert mml_1.childNodes[0].nodeName == 'mi' assert mml_1.childNodes[0].childNodes[0].nodeValue == 'x' assert mml_1.childNodes[1].nodeName == 'mo' assert mml_1.childNodes[1].childNodes[0].nodeValue == '=' assert mml_1.childNodes[2].nodeName == 'mn' assert mml_1.childNodes[2].childNodes[0].nodeValue == '1' mml_2 = mpp._print(Ne(1, x)) assert len(mml_2.childNodes) == 3 assert mml_2.childNodes[0].nodeName == 'mn' assert mml_2.childNodes[0].childNodes[0].nodeValue == '1' assert mml_2.childNodes[1].nodeName == 'mo' assert mml_2.childNodes[1].childNodes[0].nodeValue == '&#x2260;' assert mml_2.childNodes[2].nodeName == 'mi' assert mml_2.childNodes[2].childNodes[0].nodeValue == 'x' mml_3 = mpp._print(Ge(1, x)) assert len(mml_3.childNodes) == 3 assert mml_3.childNodes[0].nodeName == 'mn' assert mml_3.childNodes[0].childNodes[0].nodeValue == '1' assert mml_3.childNodes[1].nodeName == 'mo' assert mml_3.childNodes[1].childNodes[0].nodeValue == '&#x2265;' assert mml_3.childNodes[2].nodeName == 'mi' assert mml_3.childNodes[2].childNodes[0].nodeValue == 'x' mml_4 = mpp._print(Lt(1, x)) assert len(mml_4.childNodes) == 3 assert mml_4.childNodes[0].nodeName == 'mn' assert mml_4.childNodes[0].childNodes[0].nodeValue == '1' assert mml_4.childNodes[1].nodeName == 'mo' assert mml_4.childNodes[1].childNodes[0].nodeValue == '<' assert mml_4.childNodes[2].nodeName == 'mi' assert mml_4.childNodes[2].childNodes[0].nodeValue == 'x' def test_presentation_symbol(): mml = mpp._print(x) assert mml.nodeName == 'mi' assert mml.childNodes[0].nodeValue == 'x' del mml mml = mpp._print(Symbol("x^2")) assert mml.nodeName == 'msup' assert mml.childNodes[0].nodeName == 'mi' assert mml.childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[1].nodeName == 'mi' assert mml.childNodes[1].childNodes[0].nodeValue == '2' del mml mml = mpp._print(Symbol("x__2")) assert mml.nodeName == 'msup' assert mml.childNodes[0].nodeName == 'mi' assert mml.childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[1].nodeName == 'mi' assert mml.childNodes[1].childNodes[0].nodeValue == '2' del mml mml = mpp._print(Symbol("x_2")) assert mml.nodeName == 'msub' assert mml.childNodes[0].nodeName == 'mi' assert mml.childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[1].nodeName == 'mi' assert mml.childNodes[1].childNodes[0].nodeValue == '2' del mml mml = mpp._print(Symbol("x^3_2")) assert mml.nodeName == 'msubsup' assert mml.childNodes[0].nodeName == 'mi' assert mml.childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[1].nodeName == 'mi' assert mml.childNodes[1].childNodes[0].nodeValue == '2' assert mml.childNodes[2].nodeName == 'mi' assert mml.childNodes[2].childNodes[0].nodeValue == '3' del mml mml = mpp._print(Symbol("x__3_2")) assert mml.nodeName == 'msubsup' assert mml.childNodes[0].nodeName == 'mi' assert mml.childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[1].nodeName == 'mi' assert mml.childNodes[1].childNodes[0].nodeValue == '2' assert mml.childNodes[2].nodeName == 'mi' assert mml.childNodes[2].childNodes[0].nodeValue == '3' del mml mml = mpp._print(Symbol("x_2_a")) assert mml.nodeName == 'msub' assert mml.childNodes[0].nodeName == 'mi' assert mml.childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[1].nodeName == 'mrow' assert mml.childNodes[1].childNodes[0].nodeName == 'mi' assert mml.childNodes[1].childNodes[0].childNodes[0].nodeValue == '2' assert mml.childNodes[1].childNodes[1].nodeName == 'mo' assert mml.childNodes[1].childNodes[1].childNodes[0].nodeValue == ' ' assert mml.childNodes[1].childNodes[2].nodeName == 'mi' assert mml.childNodes[1].childNodes[2].childNodes[0].nodeValue == 'a' del mml mml = mpp._print(Symbol("x^2^a")) assert mml.nodeName == 'msup' assert mml.childNodes[0].nodeName == 'mi' assert mml.childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[1].nodeName == 'mrow' assert mml.childNodes[1].childNodes[0].nodeName == 'mi' assert mml.childNodes[1].childNodes[0].childNodes[0].nodeValue == '2' assert mml.childNodes[1].childNodes[1].nodeName == 'mo' assert mml.childNodes[1].childNodes[1].childNodes[0].nodeValue == ' ' assert mml.childNodes[1].childNodes[2].nodeName == 'mi' assert mml.childNodes[1].childNodes[2].childNodes[0].nodeValue == 'a' del mml mml = mpp._print(Symbol("x__2__a")) assert mml.nodeName == 'msup' assert mml.childNodes[0].nodeName == 'mi' assert mml.childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[1].nodeName == 'mrow' assert mml.childNodes[1].childNodes[0].nodeName == 'mi' assert mml.childNodes[1].childNodes[0].childNodes[0].nodeValue == '2' assert mml.childNodes[1].childNodes[1].nodeName == 'mo' assert mml.childNodes[1].childNodes[1].childNodes[0].nodeValue == ' ' assert mml.childNodes[1].childNodes[2].nodeName == 'mi' assert mml.childNodes[1].childNodes[2].childNodes[0].nodeValue == 'a' del mml def test_presentation_mathml_greek(): mml = mpp._print(Symbol('alpha')) assert mml.nodeName == 'mi' assert mml.childNodes[0].nodeValue == '\N{GREEK SMALL LETTER ALPHA}' assert mpp.doprint(Symbol('alpha')) == '<mi>&#945;</mi>' assert mpp.doprint(Symbol('beta')) == '<mi>&#946;</mi>' assert mpp.doprint(Symbol('gamma')) == '<mi>&#947;</mi>' assert mpp.doprint(Symbol('delta')) == '<mi>&#948;</mi>' assert mpp.doprint(Symbol('epsilon')) == '<mi>&#949;</mi>' assert mpp.doprint(Symbol('zeta')) == '<mi>&#950;</mi>' assert mpp.doprint(Symbol('eta')) == '<mi>&#951;</mi>' assert mpp.doprint(Symbol('theta')) == '<mi>&#952;</mi>' assert mpp.doprint(Symbol('iota')) == '<mi>&#953;</mi>' assert mpp.doprint(Symbol('kappa')) == '<mi>&#954;</mi>' assert mpp.doprint(Symbol('lambda')) == '<mi>&#955;</mi>' assert mpp.doprint(Symbol('mu')) == '<mi>&#956;</mi>' assert mpp.doprint(Symbol('nu')) == '<mi>&#957;</mi>' assert mpp.doprint(Symbol('xi')) == '<mi>&#958;</mi>' assert mpp.doprint(Symbol('omicron')) == '<mi>&#959;</mi>' assert mpp.doprint(Symbol('pi')) == '<mi>&#960;</mi>' assert mpp.doprint(Symbol('rho')) == '<mi>&#961;</mi>' assert mpp.doprint(Symbol('varsigma')) == '<mi>&#962;</mi>' assert mpp.doprint(Symbol('sigma')) == '<mi>&#963;</mi>' assert mpp.doprint(Symbol('tau')) == '<mi>&#964;</mi>' assert mpp.doprint(Symbol('upsilon')) == '<mi>&#965;</mi>' assert mpp.doprint(Symbol('phi')) == '<mi>&#966;</mi>' assert mpp.doprint(Symbol('chi')) == '<mi>&#967;</mi>' assert mpp.doprint(Symbol('psi')) == '<mi>&#968;</mi>' assert mpp.doprint(Symbol('omega')) == '<mi>&#969;</mi>' assert mpp.doprint(Symbol('Alpha')) == '<mi>&#913;</mi>' assert mpp.doprint(Symbol('Beta')) == '<mi>&#914;</mi>' assert mpp.doprint(Symbol('Gamma')) == '<mi>&#915;</mi>' assert mpp.doprint(Symbol('Delta')) == '<mi>&#916;</mi>' assert mpp.doprint(Symbol('Epsilon')) == '<mi>&#917;</mi>' assert mpp.doprint(Symbol('Zeta')) == '<mi>&#918;</mi>' assert mpp.doprint(Symbol('Eta')) == '<mi>&#919;</mi>' assert mpp.doprint(Symbol('Theta')) == '<mi>&#920;</mi>' assert mpp.doprint(Symbol('Iota')) == '<mi>&#921;</mi>' assert mpp.doprint(Symbol('Kappa')) == '<mi>&#922;</mi>' assert mpp.doprint(Symbol('Lambda')) == '<mi>&#923;</mi>' assert mpp.doprint(Symbol('Mu')) == '<mi>&#924;</mi>' assert mpp.doprint(Symbol('Nu')) == '<mi>&#925;</mi>' assert mpp.doprint(Symbol('Xi')) == '<mi>&#926;</mi>' assert mpp.doprint(Symbol('Omicron')) == '<mi>&#927;</mi>' assert mpp.doprint(Symbol('Pi')) == '<mi>&#928;</mi>' assert mpp.doprint(Symbol('Rho')) == '<mi>&#929;</mi>' assert mpp.doprint(Symbol('Sigma')) == '<mi>&#931;</mi>' assert mpp.doprint(Symbol('Tau')) == '<mi>&#932;</mi>' assert mpp.doprint(Symbol('Upsilon')) == '<mi>&#933;</mi>' assert mpp.doprint(Symbol('Phi')) == '<mi>&#934;</mi>' assert mpp.doprint(Symbol('Chi')) == '<mi>&#935;</mi>' assert mpp.doprint(Symbol('Psi')) == '<mi>&#936;</mi>' assert mpp.doprint(Symbol('Omega')) == '<mi>&#937;</mi>' def test_presentation_mathml_order(): expr = x**3 + x**2*y + 3*x*y**3 + y**4 mp = MathMLPresentationPrinter({'order': 'lex'}) mml = mp._print(expr) assert mml.childNodes[0].nodeName == 'msup' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeValue == '3' assert mml.childNodes[6].nodeName == 'msup' assert mml.childNodes[6].childNodes[0].childNodes[0].nodeValue == 'y' assert mml.childNodes[6].childNodes[1].childNodes[0].nodeValue == '4' mp = MathMLPresentationPrinter({'order': 'rev-lex'}) mml = mp._print(expr) assert mml.childNodes[0].nodeName == 'msup' assert mml.childNodes[0].childNodes[0].childNodes[0].nodeValue == 'y' assert mml.childNodes[0].childNodes[1].childNodes[0].nodeValue == '4' assert mml.childNodes[6].nodeName == 'msup' assert mml.childNodes[6].childNodes[0].childNodes[0].nodeValue == 'x' assert mml.childNodes[6].childNodes[1].childNodes[0].nodeValue == '3' def test_print_intervals(): a = Symbol('a', real=True) assert mpp.doprint(Interval(0, a)) == \ '<mrow><mfenced close="]" open="["><mn>0</mn><mi>a</mi></mfenced></mrow>' assert mpp.doprint(Interval(0, a, False, False)) == \ '<mrow><mfenced close="]" open="["><mn>0</mn><mi>a</mi></mfenced></mrow>' assert mpp.doprint(Interval(0, a, True, False)) == \ '<mrow><mfenced close="]" open="("><mn>0</mn><mi>a</mi></mfenced></mrow>' assert mpp.doprint(Interval(0, a, False, True)) == \ '<mrow><mfenced close=")" open="["><mn>0</mn><mi>a</mi></mfenced></mrow>' assert mpp.doprint(Interval(0, a, True, True)) == \ '<mrow><mfenced close=")" open="("><mn>0</mn><mi>a</mi></mfenced></mrow>' def test_print_tuples(): assert mpp.doprint(Tuple(0,)) == \ '<mrow><mfenced><mn>0</mn></mfenced></mrow>' assert mpp.doprint(Tuple(0, a)) == \ '<mrow><mfenced><mn>0</mn><mi>a</mi></mfenced></mrow>' assert mpp.doprint(Tuple(0, a, a)) == \ '<mrow><mfenced><mn>0</mn><mi>a</mi><mi>a</mi></mfenced></mrow>' assert mpp.doprint(Tuple(0, 1, 2, 3, 4)) == \ '<mrow><mfenced><mn>0</mn><mn>1</mn><mn>2</mn><mn>3</mn><mn>4</mn></mfenced></mrow>' assert mpp.doprint(Tuple(0, 1, Tuple(2, 3, 4))) == \ '<mrow><mfenced><mn>0</mn><mn>1</mn><mrow><mfenced><mn>2</mn><mn>3'\ '</mn><mn>4</mn></mfenced></mrow></mfenced></mrow>' def test_print_re_im(): assert mpp.doprint(re(x)) == \ '<mrow><mi mathvariant="fraktur">R</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(im(x)) == \ '<mrow><mi mathvariant="fraktur">I</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(re(x + 1)) == \ '<mrow><mrow><mi mathvariant="fraktur">R</mi><mfenced><mi>x</mi>'\ '</mfenced></mrow><mo>+</mo><mn>1</mn></mrow>' assert mpp.doprint(im(x + 1)) == \ '<mrow><mi mathvariant="fraktur">I</mi><mfenced><mi>x</mi></mfenced></mrow>' def test_print_Abs(): assert mpp.doprint(Abs(x)) == \ '<mrow><mfenced close="|" open="|"><mi>x</mi></mfenced></mrow>' assert mpp.doprint(Abs(x + 1)) == \ '<mrow><mfenced close="|" open="|"><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow></mfenced></mrow>' def test_print_Determinant(): assert mpp.doprint(Determinant(Matrix([[1, 2], [3, 4]]))) == \ '<mrow><mfenced close="|" open="|"><mfenced close="]" open="["><mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr><mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr></mtable></mfenced></mfenced></mrow>' def test_presentation_settings(): raises(TypeError, lambda: mathml(x, printer='presentation', method="garbage")) def test_toprettyxml_hooking(): # test that the patch doesn't influence the behavior of the standard # library import xml.dom.minidom doc1 = xml.dom.minidom.parseString( "<apply><plus/><ci>x</ci><cn>1</cn></apply>") doc2 = xml.dom.minidom.parseString( "<mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow>") prettyxml_old1 = doc1.toprettyxml() prettyxml_old2 = doc2.toprettyxml() mp.apply_patch() mp.restore_patch() assert prettyxml_old1 == doc1.toprettyxml() assert prettyxml_old2 == doc2.toprettyxml() def test_print_domains(): from sympy.sets import Integers, Naturals, Naturals0, Reals, Complexes assert mpp.doprint(Complexes) == '<mi mathvariant="normal">&#x2102;</mi>' assert mpp.doprint(Integers) == '<mi mathvariant="normal">&#x2124;</mi>' assert mpp.doprint(Naturals) == '<mi mathvariant="normal">&#x2115;</mi>' assert mpp.doprint(Naturals0) == \ '<msub><mi mathvariant="normal">&#x2115;</mi><mn>0</mn></msub>' assert mpp.doprint(Reals) == '<mi mathvariant="normal">&#x211D;</mi>' def test_print_expression_with_minus(): assert mpp.doprint(-x) == '<mrow><mo>-</mo><mi>x</mi></mrow>' assert mpp.doprint(-x/y) == \ '<mrow><mo>-</mo><mfrac><mi>x</mi><mi>y</mi></mfrac></mrow>' assert mpp.doprint(-Rational(1, 2)) == \ '<mrow><mo>-</mo><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow>' def test_print_AssocOp(): from sympy.core.operations import AssocOp class TestAssocOp(AssocOp): identity = 0 expr = TestAssocOp(1, 2) mpp.doprint(expr) == \ '<mrow><mi>testassocop</mi><mn>2</mn><mn>1</mn></mrow>' def test_print_basic(): expr = Basic(1, 2) assert mpp.doprint(expr) == \ '<mrow><mi>basic</mi><mfenced><mn>1</mn><mn>2</mn></mfenced></mrow>' assert mp.doprint(expr) == '<basic><cn>1</cn><cn>2</cn></basic>' def test_mat_delim_print(): expr = Matrix([[1, 2], [3, 4]]) assert mathml(expr, printer='presentation', mat_delim='[') == \ '<mfenced close="]" open="["><mtable><mtr><mtd><mn>1</mn></mtd><mtd>'\ '<mn>2</mn></mtd></mtr><mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn>'\ '</mtd></mtr></mtable></mfenced>' assert mathml(expr, printer='presentation', mat_delim='(') == \ '<mfenced><mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd>'\ '</mtr><mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr></mtable></mfenced>' assert mathml(expr, printer='presentation', mat_delim='') == \ '<mtable><mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr><mtr>'\ '<mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr></mtable>' def test_ln_notation_print(): expr = log(x) assert mathml(expr, printer='presentation') == \ '<mrow><mi>log</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mathml(expr, printer='presentation', ln_notation=False) == \ '<mrow><mi>log</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mathml(expr, printer='presentation', ln_notation=True) == \ '<mrow><mi>ln</mi><mfenced><mi>x</mi></mfenced></mrow>' def test_mul_symbol_print(): expr = x * y assert mathml(expr, printer='presentation') == \ '<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mi>y</mi></mrow>' assert mathml(expr, printer='presentation', mul_symbol=None) == \ '<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mi>y</mi></mrow>' assert mathml(expr, printer='presentation', mul_symbol='dot') == \ '<mrow><mi>x</mi><mo>&#xB7;</mo><mi>y</mi></mrow>' assert mathml(expr, printer='presentation', mul_symbol='ldot') == \ '<mrow><mi>x</mi><mo>&#x2024;</mo><mi>y</mi></mrow>' assert mathml(expr, printer='presentation', mul_symbol='times') == \ '<mrow><mi>x</mi><mo>&#xD7;</mo><mi>y</mi></mrow>' def test_print_lerchphi(): assert mpp.doprint(lerchphi(1, 2, 3)) == \ '<mrow><mi>&#x3A6;</mi><mfenced><mn>1</mn><mn>2</mn><mn>3</mn></mfenced></mrow>' def test_print_polylog(): assert mp.doprint(polylog(x, y)) == \ '<apply><polylog/><ci>x</ci><ci>y</ci></apply>' assert mpp.doprint(polylog(x, y)) == \ '<mrow><msub><mi>Li</mi><mi>x</mi></msub><mfenced><mi>y</mi></mfenced></mrow>' def test_print_set_frozenset(): f = frozenset({1, 5, 3}) assert mpp.doprint(f) == \ '<mfenced close="}" open="{"><mn>1</mn><mn>3</mn><mn>5</mn></mfenced>' s = set({1, 2, 3}) assert mpp.doprint(s) == \ '<mfenced close="}" open="{"><mn>1</mn><mn>2</mn><mn>3</mn></mfenced>' def test_print_FiniteSet(): f1 = FiniteSet(x, 1, 3) assert mpp.doprint(f1) == \ '<mfenced close="}" open="{"><mn>1</mn><mn>3</mn><mi>x</mi></mfenced>' def test_print_LambertW(): assert mpp.doprint(LambertW(x)) == '<mrow><mi>W</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(LambertW(x, y)) == '<mrow><mi>W</mi><mfenced><mi>x</mi><mi>y</mi></mfenced></mrow>' def test_print_EmptySet(): assert mpp.doprint(S.EmptySet) == '<mo>&#x2205;</mo>' def test_print_UniversalSet(): assert mpp.doprint(S.UniversalSet) == '<mo>&#x1D54C;</mo>' def test_print_spaces(): assert mpp.doprint(HilbertSpace()) == '<mi>&#x210B;</mi>' assert mpp.doprint(ComplexSpace(2)) == '<msup>&#x1D49E;<mn>2</mn></msup>' assert mpp.doprint(FockSpace()) == '<mi>&#x2131;</mi>' def test_print_constants(): assert mpp.doprint(hbar) == '<mi>&#x210F;</mi>' assert mpp.doprint(S.TribonacciConstant) == '<mi>TribonacciConstant</mi>' assert mpp.doprint(S.GoldenRatio) == '<mi>&#x3A6;</mi>' assert mpp.doprint(S.EulerGamma) == '<mi>&#x3B3;</mi>' def test_print_Contains(): assert mpp.doprint(Contains(x, S.Naturals)) == \ '<mrow><mi>x</mi><mo>&#x2208;</mo><mi mathvariant="normal">&#x2115;</mi></mrow>' def test_print_Dagger(): assert mpp.doprint(Dagger(x)) == '<msup><mi>x</mi>&#x2020;</msup>' def test_print_SetOp(): f1 = FiniteSet(x, 1, 3) f2 = FiniteSet(y, 2, 4) prntr = lambda x: mathml(x, printer='presentation') assert prntr(Union(f1, f2, evaluate=False)) == \ '<mrow><mfenced close="}" open="{"><mn>1</mn><mn>3</mn><mi>x</mi>'\ '</mfenced><mo>&#x222A;</mo><mfenced close="}" open="{"><mn>2</mn>'\ '<mn>4</mn><mi>y</mi></mfenced></mrow>' assert prntr(Intersection(f1, f2, evaluate=False)) == \ '<mrow><mfenced close="}" open="{"><mn>1</mn><mn>3</mn><mi>x</mi>'\ '</mfenced><mo>&#x2229;</mo><mfenced close="}" open="{"><mn>2</mn>'\ '<mn>4</mn><mi>y</mi></mfenced></mrow>' assert prntr(Complement(f1, f2, evaluate=False)) == \ '<mrow><mfenced close="}" open="{"><mn>1</mn><mn>3</mn><mi>x</mi>'\ '</mfenced><mo>&#x2216;</mo><mfenced close="}" open="{"><mn>2</mn>'\ '<mn>4</mn><mi>y</mi></mfenced></mrow>' assert prntr(SymmetricDifference(f1, f2, evaluate=False)) == \ '<mrow><mfenced close="}" open="{"><mn>1</mn><mn>3</mn><mi>x</mi>'\ '</mfenced><mo>&#x2206;</mo><mfenced close="}" open="{"><mn>2</mn>'\ '<mn>4</mn><mi>y</mi></mfenced></mrow>' A = FiniteSet(a) C = FiniteSet(c) D = FiniteSet(d) U1 = Union(C, D, evaluate=False) I1 = Intersection(C, D, evaluate=False) C1 = Complement(C, D, evaluate=False) D1 = SymmetricDifference(C, D, evaluate=False) # XXX ProductSet does not support evaluate keyword P1 = ProductSet(C, D) assert prntr(Union(A, I1, evaluate=False)) == \ '<mrow><mfenced close="}" open="{"><mi>a</mi></mfenced>' \ '<mo>&#x222A;</mo><mfenced><mrow><mfenced close="}" open="{">' \ '<mi>c</mi></mfenced><mo>&#x2229;</mo><mfenced close="}" open="{">' \ '<mi>d</mi></mfenced></mrow></mfenced></mrow>' assert prntr(Intersection(A, C1, evaluate=False)) == \ '<mrow><mfenced close="}" open="{"><mi>a</mi></mfenced>' \ '<mo>&#x2229;</mo><mfenced><mrow><mfenced close="}" open="{">' \ '<mi>c</mi></mfenced><mo>&#x2216;</mo><mfenced close="}" open="{">' \ '<mi>d</mi></mfenced></mrow></mfenced></mrow>' assert prntr(Complement(A, D1, evaluate=False)) == \ '<mrow><mfenced close="}" open="{"><mi>a</mi></mfenced>' \ '<mo>&#x2216;</mo><mfenced><mrow><mfenced close="}" open="{">' \ '<mi>c</mi></mfenced><mo>&#x2206;</mo><mfenced close="}" open="{">' \ '<mi>d</mi></mfenced></mrow></mfenced></mrow>' assert prntr(SymmetricDifference(A, P1, evaluate=False)) == \ '<mrow><mfenced close="}" open="{"><mi>a</mi></mfenced>' \ '<mo>&#x2206;</mo><mfenced><mrow><mfenced close="}" open="{">' \ '<mi>c</mi></mfenced><mo>&#x00d7;</mo><mfenced close="}" open="{">' \ '<mi>d</mi></mfenced></mrow></mfenced></mrow>' assert prntr(ProductSet(A, U1)) == \ '<mrow><mfenced close="}" open="{"><mi>a</mi></mfenced>' \ '<mo>&#x00d7;</mo><mfenced><mrow><mfenced close="}" open="{">' \ '<mi>c</mi></mfenced><mo>&#x222A;</mo><mfenced close="}" open="{">' \ '<mi>d</mi></mfenced></mrow></mfenced></mrow>' def test_print_logic(): assert mpp.doprint(And(x, y)) == \ '<mrow><mi>x</mi><mo>&#x2227;</mo><mi>y</mi></mrow>' assert mpp.doprint(Or(x, y)) == \ '<mrow><mi>x</mi><mo>&#x2228;</mo><mi>y</mi></mrow>' assert mpp.doprint(Xor(x, y)) == \ '<mrow><mi>x</mi><mo>&#x22BB;</mo><mi>y</mi></mrow>' assert mpp.doprint(Implies(x, y)) == \ '<mrow><mi>x</mi><mo>&#x21D2;</mo><mi>y</mi></mrow>' assert mpp.doprint(Equivalent(x, y)) == \ '<mrow><mi>x</mi><mo>&#x21D4;</mo><mi>y</mi></mrow>' assert mpp.doprint(And(Eq(x, y), x > 4)) == \ '<mrow><mrow><mi>x</mi><mo>=</mo><mi>y</mi></mrow><mo>&#x2227;</mo>'\ '<mrow><mi>x</mi><mo>></mo><mn>4</mn></mrow></mrow>' assert mpp.doprint(And(Eq(x, 3), y < 3, x > y + 1)) == \ '<mrow><mrow><mi>x</mi><mo>=</mo><mn>3</mn></mrow><mo>&#x2227;</mo>'\ '<mrow><mi>x</mi><mo>></mo><mrow><mi>y</mi><mo>+</mo><mn>1</mn></mrow>'\ '</mrow><mo>&#x2227;</mo><mrow><mi>y</mi><mo><</mo><mn>3</mn></mrow></mrow>' assert mpp.doprint(Or(Eq(x, y), x > 4)) == \ '<mrow><mrow><mi>x</mi><mo>=</mo><mi>y</mi></mrow><mo>&#x2228;</mo>'\ '<mrow><mi>x</mi><mo>></mo><mn>4</mn></mrow></mrow>' assert mpp.doprint(And(Eq(x, 3), Or(y < 3, x > y + 1))) == \ '<mrow><mrow><mi>x</mi><mo>=</mo><mn>3</mn></mrow><mo>&#x2227;</mo>'\ '<mfenced><mrow><mrow><mi>x</mi><mo>></mo><mrow><mi>y</mi><mo>+</mo>'\ '<mn>1</mn></mrow></mrow><mo>&#x2228;</mo><mrow><mi>y</mi><mo><</mo>'\ '<mn>3</mn></mrow></mrow></mfenced></mrow>' assert mpp.doprint(Not(x)) == '<mrow><mo>&#xAC;</mo><mi>x</mi></mrow>' assert mpp.doprint(Not(And(x, y))) == \ '<mrow><mo>&#xAC;</mo><mfenced><mrow><mi>x</mi><mo>&#x2227;</mo>'\ '<mi>y</mi></mrow></mfenced></mrow>' def test_root_notation_print(): assert mathml(x**(S.One/3), printer='presentation') == \ '<mroot><mi>x</mi><mn>3</mn></mroot>' assert mathml(x**(S.One/3), printer='presentation', root_notation=False) ==\ '<msup><mi>x</mi><mfrac><mn>1</mn><mn>3</mn></mfrac></msup>' assert mathml(x**(S.One/3), printer='content') == \ '<apply><root/><degree><cn>3</cn></degree><ci>x</ci></apply>' assert mathml(x**(S.One/3), printer='content', root_notation=False) == \ '<apply><power/><ci>x</ci><apply><divide/><cn>1</cn><cn>3</cn></apply></apply>' assert mathml(x**(Rational(-1, 3)), printer='presentation') == \ '<mfrac><mn>1</mn><mroot><mi>x</mi><mn>3</mn></mroot></mfrac>' assert mathml(x**(Rational(-1, 3)), printer='presentation', root_notation=False) \ == '<mfrac><mn>1</mn><msup><mi>x</mi><mfrac><mn>1</mn><mn>3</mn></mfrac></msup></mfrac>' def test_fold_frac_powers_print(): expr = x ** Rational(5, 2) assert mathml(expr, printer='presentation') == \ '<msup><mi>x</mi><mfrac><mn>5</mn><mn>2</mn></mfrac></msup>' assert mathml(expr, printer='presentation', fold_frac_powers=True) == \ '<msup><mi>x</mi><mfrac bevelled="true"><mn>5</mn><mn>2</mn></mfrac></msup>' assert mathml(expr, printer='presentation', fold_frac_powers=False) == \ '<msup><mi>x</mi><mfrac><mn>5</mn><mn>2</mn></mfrac></msup>' def test_fold_short_frac_print(): expr = Rational(2, 5) assert mathml(expr, printer='presentation') == \ '<mfrac><mn>2</mn><mn>5</mn></mfrac>' assert mathml(expr, printer='presentation', fold_short_frac=True) == \ '<mfrac bevelled="true"><mn>2</mn><mn>5</mn></mfrac>' assert mathml(expr, printer='presentation', fold_short_frac=False) == \ '<mfrac><mn>2</mn><mn>5</mn></mfrac>' def test_print_factorials(): assert mpp.doprint(factorial(x)) == '<mrow><mi>x</mi><mo>!</mo></mrow>' assert mpp.doprint(factorial(x + 1)) == \ '<mrow><mfenced><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow></mfenced><mo>!</mo></mrow>' assert mpp.doprint(factorial2(x)) == '<mrow><mi>x</mi><mo>!!</mo></mrow>' assert mpp.doprint(factorial2(x + 1)) == \ '<mrow><mfenced><mrow><mi>x</mi><mo>+</mo><mn>1</mn></mrow></mfenced><mo>!!</mo></mrow>' assert mpp.doprint(binomial(x, y)) == \ '<mfenced><mfrac linethickness="0"><mi>x</mi><mi>y</mi></mfrac></mfenced>' assert mpp.doprint(binomial(4, x + y)) == \ '<mfenced><mfrac linethickness="0"><mn>4</mn><mrow><mi>x</mi>'\ '<mo>+</mo><mi>y</mi></mrow></mfrac></mfenced>' def test_print_floor(): expr = floor(x) assert mathml(expr, printer='presentation') == \ '<mrow><mfenced close="&#8971;" open="&#8970;"><mi>x</mi></mfenced></mrow>' def test_print_ceiling(): expr = ceiling(x) assert mathml(expr, printer='presentation') == \ '<mrow><mfenced close="&#8969;" open="&#8968;"><mi>x</mi></mfenced></mrow>' def test_print_Lambda(): expr = Lambda(x, x+1) assert mathml(expr, printer='presentation') == \ '<mfenced><mrow><mi>x</mi><mo>&#x21A6;</mo><mrow><mi>x</mi><mo>+</mo>'\ '<mn>1</mn></mrow></mrow></mfenced>' expr = Lambda((x, y), x + y) assert mathml(expr, printer='presentation') == \ '<mfenced><mrow><mrow><mfenced><mi>x</mi><mi>y</mi></mfenced></mrow>'\ '<mo>&#x21A6;</mo><mrow><mi>x</mi><mo>+</mo><mi>y</mi></mrow></mrow></mfenced>' def test_print_conjugate(): assert mpp.doprint(conjugate(x)) == \ '<menclose notation="top"><mi>x</mi></menclose>' assert mpp.doprint(conjugate(x + 1)) == \ '<mrow><menclose notation="top"><mi>x</mi></menclose><mo>+</mo><mn>1</mn></mrow>' def test_print_AccumBounds(): a = Symbol('a', real=True) assert mpp.doprint(AccumBounds(0, 1)) == '<mfenced close="&#10217;" open="&#10216;"><mn>0</mn><mn>1</mn></mfenced>' assert mpp.doprint(AccumBounds(0, a)) == '<mfenced close="&#10217;" open="&#10216;"><mn>0</mn><mi>a</mi></mfenced>' assert mpp.doprint(AccumBounds(a + 1, a + 2)) == '<mfenced close="&#10217;" open="&#10216;"><mrow><mi>a</mi><mo>+</mo><mn>1</mn></mrow><mrow><mi>a</mi><mo>+</mo><mn>2</mn></mrow></mfenced>' def test_print_Float(): assert mpp.doprint(Float(1e100)) == '<mrow><mn>1.0</mn><mo>&#xB7;</mo><msup><mn>10</mn><mn>100</mn></msup></mrow>' assert mpp.doprint(Float(1e-100)) == '<mrow><mn>1.0</mn><mo>&#xB7;</mo><msup><mn>10</mn><mn>-100</mn></msup></mrow>' assert mpp.doprint(Float(-1e100)) == '<mrow><mn>-1.0</mn><mo>&#xB7;</mo><msup><mn>10</mn><mn>100</mn></msup></mrow>' assert mpp.doprint(Float(1.0*oo)) == '<mi>&#x221E;</mi>' assert mpp.doprint(Float(-1.0*oo)) == '<mrow><mo>-</mo><mi>&#x221E;</mi></mrow>' def test_print_different_functions(): assert mpp.doprint(gamma(x)) == '<mrow><mi>&#x393;</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(lowergamma(x, y)) == '<mrow><mi>&#x3B3;</mi><mfenced><mi>x</mi><mi>y</mi></mfenced></mrow>' assert mpp.doprint(uppergamma(x, y)) == '<mrow><mi>&#x393;</mi><mfenced><mi>x</mi><mi>y</mi></mfenced></mrow>' assert mpp.doprint(zeta(x)) == '<mrow><mi>&#x3B6;</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(zeta(x, y)) == '<mrow><mi>&#x3B6;</mi><mfenced><mi>x</mi><mi>y</mi></mfenced></mrow>' assert mpp.doprint(dirichlet_eta(x)) == '<mrow><mi>&#x3B7;</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(elliptic_k(x)) == '<mrow><mi>&#x39A;</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(totient(x)) == '<mrow><mi>&#x3D5;</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(reduced_totient(x)) == '<mrow><mi>&#x3BB;</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(primenu(x)) == '<mrow><mi>&#x3BD;</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(primeomega(x)) == '<mrow><mi>&#x3A9;</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(fresnels(x)) == '<mrow><mi>S</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(fresnelc(x)) == '<mrow><mi>C</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mpp.doprint(Heaviside(x)) == '<mrow><mi>&#x398;</mi><mfenced><mi>x</mi><mfrac><mn>1</mn><mn>2</mn></mfrac></mfenced></mrow>' def test_mathml_builtins(): assert mpp.doprint(None) == '<mi>None</mi>' assert mpp.doprint(true) == '<mi>True</mi>' assert mpp.doprint(false) == '<mi>False</mi>' def test_mathml_Range(): assert mpp.doprint(Range(1, 51)) == \ '<mfenced close="}" open="{"><mn>1</mn><mn>2</mn><mi>&#8230;</mi><mn>50</mn></mfenced>' assert mpp.doprint(Range(1, 4)) == \ '<mfenced close="}" open="{"><mn>1</mn><mn>2</mn><mn>3</mn></mfenced>' assert mpp.doprint(Range(0, 3, 1)) == \ '<mfenced close="}" open="{"><mn>0</mn><mn>1</mn><mn>2</mn></mfenced>' assert mpp.doprint(Range(0, 30, 1)) == \ '<mfenced close="}" open="{"><mn>0</mn><mn>1</mn><mi>&#8230;</mi><mn>29</mn></mfenced>' assert mpp.doprint(Range(30, 1, -1)) == \ '<mfenced close="}" open="{"><mn>30</mn><mn>29</mn><mi>&#8230;</mi>'\ '<mn>2</mn></mfenced>' assert mpp.doprint(Range(0, oo, 2)) == \ '<mfenced close="}" open="{"><mn>0</mn><mn>2</mn><mi>&#8230;</mi></mfenced>' assert mpp.doprint(Range(oo, -2, -2)) == \ '<mfenced close="}" open="{"><mi>&#8230;</mi><mn>2</mn><mn>0</mn></mfenced>' assert mpp.doprint(Range(-2, -oo, -1)) == \ '<mfenced close="}" open="{"><mn>-2</mn><mn>-3</mn><mi>&#8230;</mi></mfenced>' def test_print_exp(): assert mpp.doprint(exp(x)) == \ '<msup><mi>&ExponentialE;</mi><mi>x</mi></msup>' assert mpp.doprint(exp(1) + exp(2)) == \ '<mrow><mi>&ExponentialE;</mi><mo>+</mo><msup><mi>&ExponentialE;</mi><mn>2</mn></msup></mrow>' def test_print_MinMax(): assert mpp.doprint(Min(x, y)) == \ '<mrow><mo>min</mo><mfenced><mi>x</mi><mi>y</mi></mfenced></mrow>' assert mpp.doprint(Min(x, 2, x**3)) == \ '<mrow><mo>min</mo><mfenced><mn>2</mn><mi>x</mi><msup><mi>x</mi>'\ '<mn>3</mn></msup></mfenced></mrow>' assert mpp.doprint(Max(x, y)) == \ '<mrow><mo>max</mo><mfenced><mi>x</mi><mi>y</mi></mfenced></mrow>' assert mpp.doprint(Max(x, 2, x**3)) == \ '<mrow><mo>max</mo><mfenced><mn>2</mn><mi>x</mi><msup><mi>x</mi>'\ '<mn>3</mn></msup></mfenced></mrow>' def test_mathml_presentation_numbers(): n = Symbol('n') assert mathml(catalan(n), printer='presentation') == \ '<msub><mi>C</mi><mi>n</mi></msub>' assert mathml(bernoulli(n), printer='presentation') == \ '<msub><mi>B</mi><mi>n</mi></msub>' assert mathml(bell(n), printer='presentation') == \ '<msub><mi>B</mi><mi>n</mi></msub>' assert mathml(euler(n), printer='presentation') == \ '<msub><mi>E</mi><mi>n</mi></msub>' assert mathml(fibonacci(n), printer='presentation') == \ '<msub><mi>F</mi><mi>n</mi></msub>' assert mathml(lucas(n), printer='presentation') == \ '<msub><mi>L</mi><mi>n</mi></msub>' assert mathml(tribonacci(n), printer='presentation') == \ '<msub><mi>T</mi><mi>n</mi></msub>' assert mathml(bernoulli(n, x), printer='presentation') == \ '<mrow><msub><mi>B</mi><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' assert mathml(bell(n, x), printer='presentation') == \ '<mrow><msub><mi>B</mi><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' assert mathml(euler(n, x), printer='presentation') == \ '<mrow><msub><mi>E</mi><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' assert mathml(fibonacci(n, x), printer='presentation') == \ '<mrow><msub><mi>F</mi><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' assert mathml(tribonacci(n, x), printer='presentation') == \ '<mrow><msub><mi>T</mi><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' def test_mathml_presentation_mathieu(): assert mathml(mathieuc(x, y, z), printer='presentation') == \ '<mrow><mi>C</mi><mfenced><mi>x</mi><mi>y</mi><mi>z</mi></mfenced></mrow>' assert mathml(mathieus(x, y, z), printer='presentation') == \ '<mrow><mi>S</mi><mfenced><mi>x</mi><mi>y</mi><mi>z</mi></mfenced></mrow>' assert mathml(mathieucprime(x, y, z), printer='presentation') == \ '<mrow><mi>C&#x2032;</mi><mfenced><mi>x</mi><mi>y</mi><mi>z</mi></mfenced></mrow>' assert mathml(mathieusprime(x, y, z), printer='presentation') == \ '<mrow><mi>S&#x2032;</mi><mfenced><mi>x</mi><mi>y</mi><mi>z</mi></mfenced></mrow>' def test_mathml_presentation_stieltjes(): assert mathml(stieltjes(n), printer='presentation') == \ '<msub><mi>&#x03B3;</mi><mi>n</mi></msub>' assert mathml(stieltjes(n, x), printer='presentation') == \ '<mrow><msub><mi>&#x03B3;</mi><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' def test_print_matrix_symbol(): A = MatrixSymbol('A', 1, 2) assert mpp.doprint(A) == '<mi>A</mi>' assert mp.doprint(A) == '<ci>A</ci>' assert mathml(A, printer='presentation', mat_symbol_style="bold") == \ '<mi mathvariant="bold">A</mi>' # No effect in content printer assert mathml(A, mat_symbol_style="bold") == '<ci>A</ci>' def test_print_hadamard(): from sympy.matrices.expressions import HadamardProduct from sympy.matrices.expressions import Transpose X = MatrixSymbol('X', 2, 2) Y = MatrixSymbol('Y', 2, 2) assert mathml(HadamardProduct(X, Y*Y), printer="presentation") == \ '<mrow>' \ '<mi>X</mi>' \ '<mo>&#x2218;</mo>' \ '<msup><mi>Y</mi><mn>2</mn></msup>' \ '</mrow>' assert mathml(HadamardProduct(X, Y)*Y, printer="presentation") == \ '<mrow>' \ '<mfenced>' \ '<mrow><mi>X</mi><mo>&#x2218;</mo><mi>Y</mi></mrow>' \ '</mfenced>' \ '<mo>&InvisibleTimes;</mo><mi>Y</mi>' \ '</mrow>' assert mathml(HadamardProduct(X, Y, Y), printer="presentation") == \ '<mrow>' \ '<mi>X</mi><mo>&#x2218;</mo>' \ '<mi>Y</mi><mo>&#x2218;</mo>' \ '<mi>Y</mi>' \ '</mrow>' assert mathml( Transpose(HadamardProduct(X, Y)), printer="presentation") == \ '<msup>' \ '<mfenced>' \ '<mrow><mi>X</mi><mo>&#x2218;</mo><mi>Y</mi></mrow>' \ '</mfenced>' \ '<mo>T</mo>' \ '</msup>' def test_print_random_symbol(): R = RandomSymbol(Symbol('R')) assert mpp.doprint(R) == '<mi>R</mi>' assert mp.doprint(R) == '<ci>R</ci>' def test_print_IndexedBase(): assert mathml(IndexedBase(a)[b], printer='presentation') == \ '<msub><mi>a</mi><mi>b</mi></msub>' assert mathml(IndexedBase(a)[b, c, d], printer='presentation') == \ '<msub><mi>a</mi><mfenced><mi>b</mi><mi>c</mi><mi>d</mi></mfenced></msub>' assert mathml(IndexedBase(a)[b]*IndexedBase(c)[d]*IndexedBase(e), printer='presentation') == \ '<mrow><msub><mi>a</mi><mi>b</mi></msub><mo>&InvisibleTimes;'\ '</mo><msub><mi>c</mi><mi>d</mi></msub><mo>&InvisibleTimes;</mo><mi>e</mi></mrow>' def test_print_Indexed(): assert mathml(IndexedBase(a), printer='presentation') == '<mi>a</mi>' assert mathml(IndexedBase(a/b), printer='presentation') == \ '<mrow><mfrac><mi>a</mi><mi>b</mi></mfrac></mrow>' assert mathml(IndexedBase((a, b)), printer='presentation') == \ '<mrow><mfenced><mi>a</mi><mi>b</mi></mfenced></mrow>' def test_print_MatrixElement(): i, j = symbols('i j') A = MatrixSymbol('A', i, j) assert mathml(A[0,0],printer = 'presentation') == \ '<msub><mi>A</mi><mfenced close="" open=""><mn>0</mn><mn>0</mn></mfenced></msub>' assert mathml(A[i,j], printer = 'presentation') == \ '<msub><mi>A</mi><mfenced close="" open=""><mi>i</mi><mi>j</mi></mfenced></msub>' assert mathml(A[i*j,0], printer = 'presentation') == \ '<msub><mi>A</mi><mfenced close="" open=""><mrow><mi>i</mi><mo>&InvisibleTimes;</mo><mi>j</mi></mrow><mn>0</mn></mfenced></msub>' def test_print_Vector(): ACS = CoordSys3D('A') assert mathml(Cross(ACS.i, ACS.j*ACS.x*3 + ACS.k), printer='presentation') == \ '<mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><mfenced><mrow>'\ '<mfenced><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub>'\ '<mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub>'\ '</mrow></mfenced><mo>&InvisibleTimes;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>+</mo><msub><mover>'\ '<mi mathvariant="bold">k</mi><mo>^</mo></mover><mi mathvariant="bold">'\ 'A</mi></msub></mrow></mfenced></mrow>' assert mathml(Cross(ACS.i, ACS.j), printer='presentation') == \ '<mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow>' assert mathml(x*Cross(ACS.i, ACS.j), printer='presentation') == \ '<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mfenced><mrow><msub><mover>'\ '<mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(Cross(x*ACS.i, ACS.j), printer='presentation') == \ '<mrow><mo>-</mo><mrow><msub><mover><mi mathvariant="bold">j</mi>'\ '<mo>^</mo></mover><mi mathvariant="bold">A</mi></msub>'\ '<mo>&#xD7;</mo><mfenced><mrow><mfenced><mi>x</mi></mfenced>'\ '<mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">i</mi>'\ '<mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow>'\ '</mfenced></mrow></mrow>' assert mathml(Curl(3*ACS.x*ACS.j), printer='presentation') == \ '<mrow><mo>&#x2207;</mo><mo>&#xD7;</mo><mfenced><mrow><mfenced><mrow>'\ '<mn>3</mn><mo>&InvisibleTimes;</mo><msub>'\ '<mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub>'\ '</mrow></mfenced><mo>&InvisibleTimes;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(Curl(3*x*ACS.x*ACS.j), printer='presentation') == \ '<mrow><mo>&#x2207;</mo><mo>&#xD7;</mo><mfenced><mrow><mfenced><mrow>'\ '<mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x'\ '</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo>'\ '<mi>x</mi></mrow></mfenced><mo>&InvisibleTimes;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(x*Curl(3*ACS.x*ACS.j), printer='presentation') == \ '<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mfenced><mrow><mo>&#x2207;</mo>'\ '<mo>&#xD7;</mo><mfenced><mrow><mfenced><mrow><mn>3</mn>'\ '<mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced>'\ '<mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi>'\ '<mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow>'\ '</mfenced></mrow></mfenced></mrow>' assert mathml(Curl(3*x*ACS.x*ACS.j + ACS.i), printer='presentation') == \ '<mrow><mo>&#x2207;</mo><mo>&#xD7;</mo><mfenced><mrow><msub><mover>'\ '<mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>+</mo><mfenced><mrow>'\ '<mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x'\ '</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo>'\ '<mi>x</mi></mrow></mfenced><mo>&InvisibleTimes;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(Divergence(3*ACS.x*ACS.j), printer='presentation') == \ '<mrow><mo>&#x2207;</mo><mo>&#xB7;</mo><mfenced><mrow><mfenced><mrow>'\ '<mn>3</mn><mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x'\ '</mi><mi mathvariant="bold">A</mi></msub></mrow></mfenced>'\ '<mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi>'\ '<mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(x*Divergence(3*ACS.x*ACS.j), printer='presentation') == \ '<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mfenced><mrow><mo>&#x2207;</mo>'\ '<mo>&#xB7;</mo><mfenced><mrow><mfenced><mrow><mn>3</mn>'\ '<mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">x</mi>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced>'\ '<mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi>'\ '<mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow>'\ '</mfenced></mrow></mfenced></mrow>' assert mathml(Divergence(3*x*ACS.x*ACS.j + ACS.i), printer='presentation') == \ '<mrow><mo>&#x2207;</mo><mo>&#xB7;</mo><mfenced><mrow><msub><mover>'\ '<mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>+</mo><mfenced><mrow>'\ '<mn>3</mn><mo>&InvisibleTimes;</mo><msub>'\ '<mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub>'\ '<mo>&InvisibleTimes;</mo><mi>x</mi></mrow></mfenced>'\ '<mo>&InvisibleTimes;</mo><msub><mover><mi mathvariant="bold">j</mi>'\ '<mo>^</mo></mover><mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(Dot(ACS.i, ACS.j*ACS.x*3+ACS.k), printer='presentation') == \ '<mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>&#xB7;</mo><mfenced><mrow>'\ '<mfenced><mrow><mn>3</mn><mo>&InvisibleTimes;</mo><msub>'\ '<mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi></msub>'\ '</mrow></mfenced><mo>&InvisibleTimes;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>+</mo><msub><mover>'\ '<mi mathvariant="bold">k</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(Dot(ACS.i, ACS.j), printer='presentation') == \ '<mrow><msub><mover><mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>&#xB7;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow>' assert mathml(Dot(x*ACS.i, ACS.j), printer='presentation') == \ '<mrow><msub><mover><mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>&#xB7;</mo><mfenced><mrow>'\ '<mfenced><mi>x</mi></mfenced><mo>&InvisibleTimes;</mo><msub><mover>'\ '<mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(x*Dot(ACS.i, ACS.j), printer='presentation') == \ '<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mfenced><mrow><msub><mover>'\ '<mi mathvariant="bold">i</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub><mo>&#xB7;</mo><msub><mover>'\ '<mi mathvariant="bold">j</mi><mo>^</mo></mover>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mfenced></mrow>' assert mathml(Gradient(ACS.x), printer='presentation') == \ '<mrow><mo>&#x2207;</mo><msub><mi mathvariant="bold">x</mi>'\ '<mi mathvariant="bold">A</mi></msub></mrow>' assert mathml(Gradient(ACS.x + 3*ACS.y), printer='presentation') == \ '<mrow><mo>&#x2207;</mo><mfenced><mrow><msub><mi mathvariant="bold">'\ 'x</mi><mi mathvariant="bold">A</mi></msub><mo>+</mo><mrow><mn>3</mn>'\ '<mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">y</mi>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mrow></mfenced></mrow>' assert mathml(x*Gradient(ACS.x), printer='presentation') == \ '<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mfenced><mrow><mo>&#x2207;</mo>'\ '<msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi>'\ '</msub></mrow></mfenced></mrow>' assert mathml(Gradient(x*ACS.x), printer='presentation') == \ '<mrow><mo>&#x2207;</mo><mfenced><mrow><msub><mi mathvariant="bold">'\ 'x</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo>'\ '<mi>x</mi></mrow></mfenced></mrow>' assert mathml(Cross(ACS.x, ACS.z) + Cross(ACS.z, ACS.x), printer='presentation') == \ '<mover><mi mathvariant="bold">0</mi><mo>^</mo></mover>' assert mathml(Cross(ACS.z, ACS.x), printer='presentation') == \ '<mrow><mo>-</mo><mrow><msub><mi mathvariant="bold">x</mi>'\ '<mi mathvariant="bold">A</mi></msub><mo>&#xD7;</mo><msub>'\ '<mi mathvariant="bold">z</mi><mi mathvariant="bold">A</mi></msub></mrow></mrow>' assert mathml(Laplacian(ACS.x), printer='presentation') == \ '<mrow><mo>&#x2206;</mo><msub><mi mathvariant="bold">x</mi>'\ '<mi mathvariant="bold">A</mi></msub></mrow>' assert mathml(Laplacian(ACS.x + 3*ACS.y), printer='presentation') == \ '<mrow><mo>&#x2206;</mo><mfenced><mrow><msub><mi mathvariant="bold">'\ 'x</mi><mi mathvariant="bold">A</mi></msub><mo>+</mo><mrow><mn>3</mn>'\ '<mo>&InvisibleTimes;</mo><msub><mi mathvariant="bold">y</mi>'\ '<mi mathvariant="bold">A</mi></msub></mrow></mrow></mfenced></mrow>' assert mathml(x*Laplacian(ACS.x), printer='presentation') == \ '<mrow><mi>x</mi><mo>&InvisibleTimes;</mo><mfenced><mrow><mo>&#x2206;</mo>'\ '<msub><mi mathvariant="bold">x</mi><mi mathvariant="bold">A</mi>'\ '</msub></mrow></mfenced></mrow>' assert mathml(Laplacian(x*ACS.x), printer='presentation') == \ '<mrow><mo>&#x2206;</mo><mfenced><mrow><msub><mi mathvariant="bold">'\ 'x</mi><mi mathvariant="bold">A</mi></msub><mo>&InvisibleTimes;</mo>'\ '<mi>x</mi></mrow></mfenced></mrow>' def test_print_elliptic_f(): assert mathml(elliptic_f(x, y), printer = 'presentation') == \ '<mrow><mi>&#x1d5a5;</mi><mfenced separators="|"><mi>x</mi><mi>y</mi></mfenced></mrow>' assert mathml(elliptic_f(x/y, y), printer = 'presentation') == \ '<mrow><mi>&#x1d5a5;</mi><mfenced separators="|"><mrow><mfrac><mi>x</mi><mi>y</mi></mfrac></mrow><mi>y</mi></mfenced></mrow>' def test_print_elliptic_e(): assert mathml(elliptic_e(x), printer = 'presentation') == \ '<mrow><mi>&#x1d5a4;</mi><mfenced separators="|"><mi>x</mi></mfenced></mrow>' assert mathml(elliptic_e(x, y), printer = 'presentation') == \ '<mrow><mi>&#x1d5a4;</mi><mfenced separators="|"><mi>x</mi><mi>y</mi></mfenced></mrow>' def test_print_elliptic_pi(): assert mathml(elliptic_pi(x, y), printer = 'presentation') == \ '<mrow><mi>&#x1d6f1;</mi><mfenced separators="|"><mi>x</mi><mi>y</mi></mfenced></mrow>' assert mathml(elliptic_pi(x, y, z), printer = 'presentation') == \ '<mrow><mi>&#x1d6f1;</mi><mfenced separators=";|"><mi>x</mi><mi>y</mi><mi>z</mi></mfenced></mrow>' def test_print_Ei(): assert mathml(Ei(x), printer = 'presentation') == \ '<mrow><mi>Ei</mi><mfenced><mi>x</mi></mfenced></mrow>' assert mathml(Ei(x**y), printer = 'presentation') == \ '<mrow><mi>Ei</mi><mfenced><msup><mi>x</mi><mi>y</mi></msup></mfenced></mrow>' def test_print_expint(): assert mathml(expint(x, y), printer = 'presentation') == \ '<mrow><msub><mo>E</mo><mi>x</mi></msub><mfenced><mi>y</mi></mfenced></mrow>' assert mathml(expint(IndexedBase(x)[1], IndexedBase(x)[2]), printer = 'presentation') == \ '<mrow><msub><mo>E</mo><msub><mi>x</mi><mn>1</mn></msub></msub><mfenced><msub><mi>x</mi><mn>2</mn></msub></mfenced></mrow>' def test_print_jacobi(): assert mathml(jacobi(n, a, b, x), printer = 'presentation') == \ '<mrow><msubsup><mo>P</mo><mi>n</mi><mfenced><mi>a</mi><mi>b</mi></mfenced></msubsup><mfenced><mi>x</mi></mfenced></mrow>' def test_print_gegenbauer(): assert mathml(gegenbauer(n, a, x), printer = 'presentation') == \ '<mrow><msubsup><mo>C</mo><mi>n</mi><mfenced><mi>a</mi></mfenced></msubsup><mfenced><mi>x</mi></mfenced></mrow>' def test_print_chebyshevt(): assert mathml(chebyshevt(n, x), printer = 'presentation') == \ '<mrow><msub><mo>T</mo><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' def test_print_chebyshevu(): assert mathml(chebyshevu(n, x), printer = 'presentation') == \ '<mrow><msub><mo>U</mo><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' def test_print_legendre(): assert mathml(legendre(n, x), printer = 'presentation') == \ '<mrow><msub><mo>P</mo><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' def test_print_assoc_legendre(): assert mathml(assoc_legendre(n, a, x), printer = 'presentation') == \ '<mrow><msubsup><mo>P</mo><mi>n</mi><mfenced><mi>a</mi></mfenced></msubsup><mfenced><mi>x</mi></mfenced></mrow>' def test_print_laguerre(): assert mathml(laguerre(n, x), printer = 'presentation') == \ '<mrow><msub><mo>L</mo><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' def test_print_assoc_laguerre(): assert mathml(assoc_laguerre(n, a, x), printer = 'presentation') == \ '<mrow><msubsup><mo>L</mo><mi>n</mi><mfenced><mi>a</mi></mfenced></msubsup><mfenced><mi>x</mi></mfenced></mrow>' def test_print_hermite(): assert mathml(hermite(n, x), printer = 'presentation') == \ '<mrow><msub><mo>H</mo><mi>n</mi></msub><mfenced><mi>x</mi></mfenced></mrow>' def test_mathml_SingularityFunction(): assert mathml(SingularityFunction(x, 4, 5), printer='presentation') == \ '<msup><mfenced close="&#10217;" open="&#10216;"><mrow><mi>x</mi>' \ '<mo>-</mo><mn>4</mn></mrow></mfenced><mn>5</mn></msup>' assert mathml(SingularityFunction(x, -3, 4), printer='presentation') == \ '<msup><mfenced close="&#10217;" open="&#10216;"><mrow><mi>x</mi>' \ '<mo>+</mo><mn>3</mn></mrow></mfenced><mn>4</mn></msup>' assert mathml(SingularityFunction(x, 0, 4), printer='presentation') == \ '<msup><mfenced close="&#10217;" open="&#10216;"><mi>x</mi></mfenced>' \ '<mn>4</mn></msup>' assert mathml(SingularityFunction(x, a, n), printer='presentation') == \ '<msup><mfenced close="&#10217;" open="&#10216;"><mrow><mrow>' \ '<mo>-</mo><mi>a</mi></mrow><mo>+</mo><mi>x</mi></mrow></mfenced>' \ '<mi>n</mi></msup>' assert mathml(SingularityFunction(x, 4, -2), printer='presentation') == \ '<msup><mfenced close="&#10217;" open="&#10216;"><mrow><mi>x</mi>' \ '<mo>-</mo><mn>4</mn></mrow></mfenced><mn>-2</mn></msup>' assert mathml(SingularityFunction(x, 4, -1), printer='presentation') == \ '<msup><mfenced close="&#10217;" open="&#10216;"><mrow><mi>x</mi>' \ '<mo>-</mo><mn>4</mn></mrow></mfenced><mn>-1</mn></msup>' def test_mathml_matrix_functions(): from sympy.matrices import Adjoint, Inverse, Transpose X = MatrixSymbol('X', 2, 2) Y = MatrixSymbol('Y', 2, 2) assert mathml(Adjoint(X), printer='presentation') == \ '<msup><mi>X</mi><mo>&#x2020;</mo></msup>' assert mathml(Adjoint(X + Y), printer='presentation') == \ '<msup><mfenced><mrow><mi>X</mi><mo>+</mo><mi>Y</mi></mrow></mfenced><mo>&#x2020;</mo></msup>' assert mathml(Adjoint(X) + Adjoint(Y), printer='presentation') == \ '<mrow><msup><mi>X</mi><mo>&#x2020;</mo></msup><mo>+</mo><msup>' \ '<mi>Y</mi><mo>&#x2020;</mo></msup></mrow>' assert mathml(Adjoint(X*Y), printer='presentation') == \ '<msup><mfenced><mrow><mi>X</mi><mo>&InvisibleTimes;</mo>' \ '<mi>Y</mi></mrow></mfenced><mo>&#x2020;</mo></msup>' assert mathml(Adjoint(Y)*Adjoint(X), printer='presentation') == \ '<mrow><msup><mi>Y</mi><mo>&#x2020;</mo></msup><mo>&InvisibleTimes;' \ '</mo><msup><mi>X</mi><mo>&#x2020;</mo></msup></mrow>' assert mathml(Adjoint(X**2), printer='presentation') == \ '<msup><mfenced><msup><mi>X</mi><mn>2</mn></msup></mfenced><mo>&#x2020;</mo></msup>' assert mathml(Adjoint(X)**2, printer='presentation') == \ '<msup><mfenced><msup><mi>X</mi><mo>&#x2020;</mo></msup></mfenced><mn>2</mn></msup>' assert mathml(Adjoint(Inverse(X)), printer='presentation') == \ '<msup><mfenced><msup><mi>X</mi><mn>-1</mn></msup></mfenced><mo>&#x2020;</mo></msup>' assert mathml(Inverse(Adjoint(X)), printer='presentation') == \ '<msup><mfenced><msup><mi>X</mi><mo>&#x2020;</mo></msup></mfenced><mn>-1</mn></msup>' assert mathml(Adjoint(Transpose(X)), printer='presentation') == \ '<msup><mfenced><msup><mi>X</mi><mo>T</mo></msup></mfenced><mo>&#x2020;</mo></msup>' assert mathml(Transpose(Adjoint(X)), printer='presentation') == \ '<msup><mfenced><msup><mi>X</mi><mo>&#x2020;</mo></msup></mfenced><mo>T</mo></msup>' assert mathml(Transpose(Adjoint(X) + Y), printer='presentation') == \ '<msup><mfenced><mrow><msup><mi>X</mi><mo>&#x2020;</mo></msup>' \ '<mo>+</mo><mi>Y</mi></mrow></mfenced><mo>T</mo></msup>' assert mathml(Transpose(X), printer='presentation') == \ '<msup><mi>X</mi><mo>T</mo></msup>' assert mathml(Transpose(X + Y), printer='presentation') == \ '<msup><mfenced><mrow><mi>X</mi><mo>+</mo><mi>Y</mi></mrow></mfenced><mo>T</mo></msup>' def test_mathml_special_matrices(): from sympy.matrices import Identity, ZeroMatrix, OneMatrix assert mathml(Identity(4), printer='presentation') == '<mi>&#x1D540;</mi>' assert mathml(ZeroMatrix(2, 2), printer='presentation') == '<mn>&#x1D7D8</mn>' assert mathml(OneMatrix(2, 2), printer='presentation') == '<mn>&#x1D7D9</mn>' def test_mathml_piecewise(): from sympy.functions.elementary.piecewise import Piecewise # Content MathML assert mathml(Piecewise((x, x <= 1), (x**2, True))) == \ '<piecewise><piece><ci>x</ci><apply><leq/><ci>x</ci><cn>1</cn></apply></piece><otherwise><apply><power/><ci>x</ci><cn>2</cn></apply></otherwise></piecewise>' raises(ValueError, lambda: mathml(Piecewise((x, x <= 1)))) def test_issue_17857(): assert mathml(Range(-oo, oo), printer='presentation') == \ '<mfenced close="}" open="{"><mi>&#8230;</mi><mn>-1</mn><mn>0</mn><mn>1</mn><mi>&#8230;</mi></mfenced>' assert mathml(Range(oo, -oo, -1), printer='presentation') == \ '<mfenced close="}" open="{"><mi>&#8230;</mi><mn>1</mn><mn>0</mn><mn>-1</mn><mi>&#8230;</mi></mfenced>' def test_float_roundtrip(): x = sympify(0.8975979010256552) y = float(mp.doprint(x).strip('</cn>')) assert x == y
39b6a16677bd9506c1897c8964ba218d019d1ec1b60a758214e07c29b14e02a4
from sympy.core import (pi, oo, symbols, Rational, Integer, GoldenRatio, EulerGamma, Catalan, Lambda, Dummy, S, Eq, Ne, Le, Lt, Gt, Ge, Mod) from sympy.functions import (Piecewise, sin, cos, Abs, exp, ceiling, sqrt, sinh, cosh, tanh, asin, acos, acosh, Max, Min) from sympy.testing.pytest import raises from sympy.printing.jscode import JavascriptCodePrinter from sympy.utilities.lambdify import implemented_function from sympy.tensor import IndexedBase, Idx from sympy.matrices import Matrix, MatrixSymbol from sympy.printing.jscode import jscode x, y, z = symbols('x,y,z') def test_printmethod(): assert jscode(Abs(x)) == "Math.abs(x)" def test_jscode_sqrt(): assert jscode(sqrt(x)) == "Math.sqrt(x)" assert jscode(x**0.5) == "Math.sqrt(x)" assert jscode(x**(S.One/3)) == "Math.cbrt(x)" def test_jscode_Pow(): g = implemented_function('g', Lambda(x, 2*x)) assert jscode(x**3) == "Math.pow(x, 3)" assert jscode(x**(y**3)) == "Math.pow(x, Math.pow(y, 3))" assert jscode(1/(g(x)*3.5)**(x - y**x)/(x**2 + y)) == \ "Math.pow(3.5*2*x, -x + Math.pow(y, x))/(Math.pow(x, 2) + y)" assert jscode(x**-1.0) == '1/x' def test_jscode_constants_mathh(): assert jscode(exp(1)) == "Math.E" assert jscode(pi) == "Math.PI" assert jscode(oo) == "Number.POSITIVE_INFINITY" assert jscode(-oo) == "Number.NEGATIVE_INFINITY" def test_jscode_constants_other(): assert jscode( 2*GoldenRatio) == "var GoldenRatio = %s;\n2*GoldenRatio" % GoldenRatio.evalf(17) assert jscode(2*Catalan) == "var Catalan = %s;\n2*Catalan" % Catalan.evalf(17) assert jscode( 2*EulerGamma) == "var EulerGamma = %s;\n2*EulerGamma" % EulerGamma.evalf(17) def test_jscode_Rational(): assert jscode(Rational(3, 7)) == "3/7" assert jscode(Rational(18, 9)) == "2" assert jscode(Rational(3, -7)) == "-3/7" assert jscode(Rational(-3, -7)) == "3/7" def test_Relational(): assert jscode(Eq(x, y)) == "x == y" assert jscode(Ne(x, y)) == "x != y" assert jscode(Le(x, y)) == "x <= y" assert jscode(Lt(x, y)) == "x < y" assert jscode(Gt(x, y)) == "x > y" assert jscode(Ge(x, y)) == "x >= y" def test_Mod(): assert jscode(Mod(x, y)) == '((x % y) + y) % y' assert jscode(Mod(x, x + y)) == '((x % (x + y)) + (x + y)) % (x + y)' p1, p2 = symbols('p1 p2', positive=True) assert jscode(Mod(p1, p2)) == 'p1 % p2' assert jscode(Mod(p1, p2 + 3)) == 'p1 % (p2 + 3)' assert jscode(Mod(-3, -7, evaluate=False)) == '(-3) % (-7)' assert jscode(-Mod(p1, p2)) == '-(p1 % p2)' assert jscode(x*Mod(p1, p2)) == 'x*(p1 % p2)' def test_jscode_Integer(): assert jscode(Integer(67)) == "67" assert jscode(Integer(-1)) == "-1" def test_jscode_functions(): assert jscode(sin(x) ** cos(x)) == "Math.pow(Math.sin(x), Math.cos(x))" assert jscode(sinh(x) * cosh(x)) == "Math.sinh(x)*Math.cosh(x)" assert jscode(Max(x, y) + Min(x, y)) == "Math.max(x, y) + Math.min(x, y)" assert jscode(tanh(x)*acosh(y)) == "Math.tanh(x)*Math.acosh(y)" assert jscode(asin(x)-acos(y)) == "-Math.acos(y) + Math.asin(x)" def test_jscode_inline_function(): x = symbols('x') g = implemented_function('g', Lambda(x, 2*x)) assert jscode(g(x)) == "2*x" g = implemented_function('g', Lambda(x, 2*x/Catalan)) assert jscode(g(x)) == "var Catalan = %s;\n2*x/Catalan" % Catalan.evalf(17) A = IndexedBase('A') i = Idx('i', symbols('n', integer=True)) g = implemented_function('g', Lambda(x, x*(1 + x)*(2 + x))) assert jscode(g(A[i]), assign_to=A[i]) == ( "for (var i=0; i<n; i++){\n" " A[i] = (A[i] + 1)*(A[i] + 2)*A[i];\n" "}" ) def test_jscode_exceptions(): assert jscode(ceiling(x)) == "Math.ceil(x)" assert jscode(Abs(x)) == "Math.abs(x)" def test_jscode_boolean(): assert jscode(x & y) == "x && y" assert jscode(x | y) == "x || y" assert jscode(~x) == "!x" assert jscode(x & y & z) == "x && y && z" assert jscode(x | y | z) == "x || y || z" assert jscode((x & y) | z) == "z || x && y" assert jscode((x | y) & z) == "z && (x || y)" def test_jscode_Piecewise(): expr = Piecewise((x, x < 1), (x**2, True)) p = jscode(expr) s = \ """\ ((x < 1) ? ( x ) : ( Math.pow(x, 2) ))\ """ assert p == s assert jscode(expr, assign_to="c") == ( "if (x < 1) {\n" " c = x;\n" "}\n" "else {\n" " c = Math.pow(x, 2);\n" "}") # Check that Piecewise without a True (default) condition error expr = Piecewise((x, x < 1), (x**2, x > 1), (sin(x), x > 0)) raises(ValueError, lambda: jscode(expr)) def test_jscode_Piecewise_deep(): p = jscode(2*Piecewise((x, x < 1), (x**2, True))) s = \ """\ 2*((x < 1) ? ( x ) : ( Math.pow(x, 2) ))\ """ assert p == s def test_jscode_settings(): raises(TypeError, lambda: jscode(sin(x), method="garbage")) def test_jscode_Indexed(): n, m, o = symbols('n m o', integer=True) i, j, k = Idx('i', n), Idx('j', m), Idx('k', o) p = JavascriptCodePrinter() p._not_c = set() x = IndexedBase('x')[j] assert p._print_Indexed(x) == 'x[j]' A = IndexedBase('A')[i, j] assert p._print_Indexed(A) == 'A[%s]' % (m*i+j) B = IndexedBase('B')[i, j, k] assert p._print_Indexed(B) == 'B[%s]' % (i*o*m+j*o+k) assert p._not_c == set() def test_jscode_loops_matrix_vector(): n, m = symbols('n m', integer=True) A = IndexedBase('A') x = IndexedBase('x') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) s = ( 'for (var i=0; i<m; i++){\n' ' y[i] = 0;\n' '}\n' 'for (var i=0; i<m; i++){\n' ' for (var j=0; j<n; j++){\n' ' y[i] = A[n*i + j]*x[j] + y[i];\n' ' }\n' '}' ) c = jscode(A[i, j]*x[j], assign_to=y[i]) assert c == s def test_dummy_loops(): i, m = symbols('i m', integer=True, cls=Dummy) x = IndexedBase('x') y = IndexedBase('y') i = Idx(i, m) expected = ( 'for (var i_%(icount)i=0; i_%(icount)i<m_%(mcount)i; i_%(icount)i++){\n' ' y[i_%(icount)i] = x[i_%(icount)i];\n' '}' ) % {'icount': i.label.dummy_index, 'mcount': m.dummy_index} code = jscode(x[i], assign_to=y[i]) assert code == expected def test_jscode_loops_add(): n, m = symbols('n m', integer=True) A = IndexedBase('A') x = IndexedBase('x') y = IndexedBase('y') z = IndexedBase('z') i = Idx('i', m) j = Idx('j', n) s = ( 'for (var i=0; i<m; i++){\n' ' y[i] = x[i] + z[i];\n' '}\n' 'for (var i=0; i<m; i++){\n' ' for (var j=0; j<n; j++){\n' ' y[i] = A[n*i + j]*x[j] + y[i];\n' ' }\n' '}' ) c = jscode(A[i, j]*x[j] + x[i] + z[i], assign_to=y[i]) assert c == s def test_jscode_loops_multiple_contractions(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) l = Idx('l', p) s = ( 'for (var i=0; i<m; i++){\n' ' y[i] = 0;\n' '}\n' 'for (var i=0; i<m; i++){\n' ' for (var j=0; j<n; j++){\n' ' for (var k=0; k<o; k++){\n' ' for (var l=0; l<p; l++){\n' ' y[i] = a[%s]*b[%s] + y[i];\n' % (i*n*o*p + j*o*p + k*p + l, j*o*p + k*p + l) +\ ' }\n' ' }\n' ' }\n' '}' ) c = jscode(b[j, k, l]*a[i, j, k, l], assign_to=y[i]) assert c == s def test_jscode_loops_addfactor(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') c = IndexedBase('c') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) l = Idx('l', p) s = ( 'for (var i=0; i<m; i++){\n' ' y[i] = 0;\n' '}\n' 'for (var i=0; i<m; i++){\n' ' for (var j=0; j<n; j++){\n' ' for (var k=0; k<o; k++){\n' ' for (var l=0; l<p; l++){\n' ' y[i] = (a[%s] + b[%s])*c[%s] + y[i];\n' % (i*n*o*p + j*o*p + k*p + l, i*n*o*p + j*o*p + k*p + l, j*o*p + k*p + l) +\ ' }\n' ' }\n' ' }\n' '}' ) c = jscode((a[i, j, k, l] + b[i, j, k, l])*c[j, k, l], assign_to=y[i]) assert c == s def test_jscode_loops_multiple_terms(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') c = IndexedBase('c') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) s0 = ( 'for (var i=0; i<m; i++){\n' ' y[i] = 0;\n' '}\n' ) s1 = ( 'for (var i=0; i<m; i++){\n' ' for (var j=0; j<n; j++){\n' ' for (var k=0; k<o; k++){\n' ' y[i] = b[j]*b[k]*c[%s] + y[i];\n' % (i*n*o + j*o + k) +\ ' }\n' ' }\n' '}\n' ) s2 = ( 'for (var i=0; i<m; i++){\n' ' for (var k=0; k<o; k++){\n' ' y[i] = a[%s]*b[k] + y[i];\n' % (i*o + k) +\ ' }\n' '}\n' ) s3 = ( 'for (var i=0; i<m; i++){\n' ' for (var j=0; j<n; j++){\n' ' y[i] = a[%s]*b[j] + y[i];\n' % (i*n + j) +\ ' }\n' '}\n' ) c = jscode( b[j]*a[i, j] + b[k]*a[i, k] + b[j]*b[k]*c[i, j, k], assign_to=y[i]) assert (c == s0 + s1 + s2 + s3[:-1] or c == s0 + s1 + s3 + s2[:-1] or c == s0 + s2 + s1 + s3[:-1] or c == s0 + s2 + s3 + s1[:-1] or c == s0 + s3 + s1 + s2[:-1] or c == s0 + s3 + s2 + s1[:-1]) def test_Matrix_printing(): # Test returning a Matrix mat = Matrix([x*y, Piecewise((2 + x, y>0), (y, True)), sin(z)]) A = MatrixSymbol('A', 3, 1) assert jscode(mat, A) == ( "A[0] = x*y;\n" "if (y > 0) {\n" " A[1] = x + 2;\n" "}\n" "else {\n" " A[1] = y;\n" "}\n" "A[2] = Math.sin(z);") # Test using MatrixElements in expressions expr = Piecewise((2*A[2, 0], x > 0), (A[2, 0], True)) + sin(A[1, 0]) + A[0, 0] assert jscode(expr) == ( "((x > 0) ? (\n" " 2*A[2]\n" ")\n" ": (\n" " A[2]\n" ")) + Math.sin(A[1]) + A[0]") # Test using MatrixElements in a Matrix q = MatrixSymbol('q', 5, 1) M = MatrixSymbol('M', 3, 3) m = Matrix([[sin(q[1,0]), 0, cos(q[2,0])], [q[1,0] + q[2,0], q[3, 0], 5], [2*q[4, 0]/q[1,0], sqrt(q[0,0]) + 4, 0]]) assert jscode(m, M) == ( "M[0] = Math.sin(q[1]);\n" "M[1] = 0;\n" "M[2] = Math.cos(q[2]);\n" "M[3] = q[1] + q[2];\n" "M[4] = q[3];\n" "M[5] = 5;\n" "M[6] = 2*q[4]/q[1];\n" "M[7] = Math.sqrt(q[0]) + 4;\n" "M[8] = 0;") def test_MatrixElement_printing(): # test cases for issue #11821 A = MatrixSymbol("A", 1, 3) B = MatrixSymbol("B", 1, 3) C = MatrixSymbol("C", 1, 3) assert(jscode(A[0, 0]) == "A[0]") assert(jscode(3 * A[0, 0]) == "3*A[0]") F = C[0, 0].subs(C, A - B) assert(jscode(F) == "(A - B)[0]")
be28e0ef17e87a5cb02fe66136e5c57c38ccd4581a5bfe25893071d70ce99169
from sympy.core import (S, pi, oo, symbols, Function, Rational, Integer, Tuple, Derivative, Eq, Ne, Le, Lt, Gt, Ge) from sympy.integrals import Integral from sympy.concrete import Sum from sympy.functions import (exp, sin, cos, fresnelc, fresnels, conjugate, Max, Min, gamma, polygamma, loggamma, erf, erfi, erfc, erf2, expint, erfinv, erfcinv, Ei, Si, Ci, li, Shi, Chi, uppergamma, beta, subfactorial, erf2inv, factorial, factorial2, catalan, RisingFactorial, FallingFactorial, harmonic, atan2, sec, acsc, hermite, laguerre, assoc_laguerre, jacobi, gegenbauer, chebyshevt, chebyshevu, legendre, assoc_legendre, Li, LambertW) from sympy.printing.mathematica import mathematica_code as mcode x, y, z, w = symbols('x,y,z,w') f = Function('f') def test_Integer(): assert mcode(Integer(67)) == "67" assert mcode(Integer(-1)) == "-1" def test_Rational(): assert mcode(Rational(3, 7)) == "3/7" assert mcode(Rational(18, 9)) == "2" assert mcode(Rational(3, -7)) == "-3/7" assert mcode(Rational(-3, -7)) == "3/7" assert mcode(x + Rational(3, 7)) == "x + 3/7" assert mcode(Rational(3, 7)*x) == "(3/7)*x" def test_Relational(): assert mcode(Eq(x, y)) == "x == y" assert mcode(Ne(x, y)) == "x != y" assert mcode(Le(x, y)) == "x <= y" assert mcode(Lt(x, y)) == "x < y" assert mcode(Gt(x, y)) == "x > y" assert mcode(Ge(x, y)) == "x >= y" def test_Function(): assert mcode(f(x, y, z)) == "f[x, y, z]" assert mcode(sin(x) ** cos(x)) == "Sin[x]^Cos[x]" assert mcode(sec(x) * acsc(x)) == "ArcCsc[x]*Sec[x]" assert mcode(atan2(x, y)) == "ArcTan[x, y]" assert mcode(conjugate(x)) == "Conjugate[x]" assert mcode(Max(x, y, z)*Min(y, z)) == "Max[x, y, z]*Min[y, z]" assert mcode(fresnelc(x)) == "FresnelC[x]" assert mcode(fresnels(x)) == "FresnelS[x]" assert mcode(gamma(x)) == "Gamma[x]" assert mcode(uppergamma(x, y)) == "Gamma[x, y]" assert mcode(polygamma(x, y)) == "PolyGamma[x, y]" assert mcode(loggamma(x)) == "LogGamma[x]" assert mcode(erf(x)) == "Erf[x]" assert mcode(erfc(x)) == "Erfc[x]" assert mcode(erfi(x)) == "Erfi[x]" assert mcode(erf2(x, y)) == "Erf[x, y]" assert mcode(expint(x, y)) == "ExpIntegralE[x, y]" assert mcode(erfcinv(x)) == "InverseErfc[x]" assert mcode(erfinv(x)) == "InverseErf[x]" assert mcode(erf2inv(x, y)) == "InverseErf[x, y]" assert mcode(Ei(x)) == "ExpIntegralEi[x]" assert mcode(Ci(x)) == "CosIntegral[x]" assert mcode(li(x)) == "LogIntegral[x]" assert mcode(Si(x)) == "SinIntegral[x]" assert mcode(Shi(x)) == "SinhIntegral[x]" assert mcode(Chi(x)) == "CoshIntegral[x]" assert mcode(beta(x, y)) == "Beta[x, y]" assert mcode(factorial(x)) == "Factorial[x]" assert mcode(factorial2(x)) == "Factorial2[x]" assert mcode(subfactorial(x)) == "Subfactorial[x]" assert mcode(FallingFactorial(x, y)) == "FactorialPower[x, y]" assert mcode(RisingFactorial(x, y)) == "Pochhammer[x, y]" assert mcode(catalan(x)) == "CatalanNumber[x]" assert mcode(harmonic(x)) == "HarmonicNumber[x]" assert mcode(harmonic(x, y)) == "HarmonicNumber[x, y]" assert mcode(Li(x)) == "LogIntegral[x] - LogIntegral[2]" assert mcode(LambertW(x)) == "ProductLog[x]" assert mcode(LambertW(x, -1)) == "ProductLog[-1, x]" assert mcode(LambertW(x, y)) == "ProductLog[y, x]" def test_special_polynomials(): assert mcode(hermite(x, y)) == "HermiteH[x, y]" assert mcode(laguerre(x, y)) == "LaguerreL[x, y]" assert mcode(assoc_laguerre(x, y, z)) == "LaguerreL[x, y, z]" assert mcode(jacobi(x, y, z, w)) == "JacobiP[x, y, z, w]" assert mcode(gegenbauer(x, y, z)) == "GegenbauerC[x, y, z]" assert mcode(chebyshevt(x, y)) == "ChebyshevT[x, y]" assert mcode(chebyshevu(x, y)) == "ChebyshevU[x, y]" assert mcode(legendre(x, y)) == "LegendreP[x, y]" assert mcode(assoc_legendre(x, y, z)) == "LegendreP[x, y, z]" def test_Pow(): assert mcode(x**3) == "x^3" assert mcode(x**(y**3)) == "x^(y^3)" assert mcode(1/(f(x)*3.5)**(x - y**x)/(x**2 + y)) == \ "(3.5*f[x])^(-x + y^x)/(x^2 + y)" assert mcode(x**-1.0) == 'x^(-1.0)' assert mcode(x**Rational(2, 3)) == 'x^(2/3)' def test_Mul(): A, B, C, D = symbols('A B C D', commutative=False) assert mcode(x*y*z) == "x*y*z" assert mcode(x*y*A) == "x*y*A" assert mcode(x*y*A*B) == "x*y*A**B" assert mcode(x*y*A*B*C) == "x*y*A**B**C" assert mcode(x*A*B*(C + D)*A*y) == "x*y*A**B**(C + D)**A" def test_constants(): assert mcode(S.Zero) == "0" assert mcode(S.One) == "1" assert mcode(S.NegativeOne) == "-1" assert mcode(S.Half) == "1/2" assert mcode(S.ImaginaryUnit) == "I" assert mcode(oo) == "Infinity" assert mcode(S.NegativeInfinity) == "-Infinity" assert mcode(S.ComplexInfinity) == "ComplexInfinity" assert mcode(S.NaN) == "Indeterminate" assert mcode(S.Exp1) == "E" assert mcode(pi) == "Pi" assert mcode(S.GoldenRatio) == "GoldenRatio" assert mcode(S.TribonacciConstant) == \ "(1/3 + (1/3)*(19 - 3*33^(1/2))^(1/3) + " \ "(1/3)*(3*33^(1/2) + 19)^(1/3))" assert mcode(2*S.TribonacciConstant) == \ "2*(1/3 + (1/3)*(19 - 3*33^(1/2))^(1/3) + " \ "(1/3)*(3*33^(1/2) + 19)^(1/3))" assert mcode(S.EulerGamma) == "EulerGamma" assert mcode(S.Catalan) == "Catalan" def test_containers(): assert mcode([1, 2, 3, [4, 5, [6, 7]], 8, [9, 10], 11]) == \ "{1, 2, 3, {4, 5, {6, 7}}, 8, {9, 10}, 11}" assert mcode((1, 2, (3, 4))) == "{1, 2, {3, 4}}" assert mcode([1]) == "{1}" assert mcode((1,)) == "{1}" assert mcode(Tuple(*[1, 2, 3])) == "{1, 2, 3}" def test_matrices(): from sympy.matrices import MutableDenseMatrix, MutableSparseMatrix, \ ImmutableDenseMatrix, ImmutableSparseMatrix A = MutableDenseMatrix( [[1, -1, 0, 0], [0, 1, -1, 0], [0, 0, 1, -1], [0, 0, 0, 1]] ) B = MutableSparseMatrix(A) C = ImmutableDenseMatrix(A) D = ImmutableSparseMatrix(A) assert mcode(C) == mcode(A) == \ "{{1, -1, 0, 0}, " \ "{0, 1, -1, 0}, " \ "{0, 0, 1, -1}, " \ "{0, 0, 0, 1}}" assert mcode(D) == mcode(B) == \ "SparseArray[{" \ "{1, 1} -> 1, {1, 2} -> -1, {2, 2} -> 1, {2, 3} -> -1, " \ "{3, 3} -> 1, {3, 4} -> -1, {4, 4} -> 1" \ "}, {4, 4}]" # Trivial cases of matrices assert mcode(MutableDenseMatrix(0, 0, [])) == '{}' assert mcode(MutableSparseMatrix(0, 0, [])) == 'SparseArray[{}, {0, 0}]' assert mcode(MutableDenseMatrix(0, 3, [])) == '{}' assert mcode(MutableSparseMatrix(0, 3, [])) == 'SparseArray[{}, {0, 3}]' assert mcode(MutableDenseMatrix(3, 0, [])) == '{{}, {}, {}}' assert mcode(MutableSparseMatrix(3, 0, [])) == 'SparseArray[{}, {3, 0}]' def test_NDArray(): from sympy.tensor.array import ( MutableDenseNDimArray, ImmutableDenseNDimArray, MutableSparseNDimArray, ImmutableSparseNDimArray) example = MutableDenseNDimArray( [[[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]], [[13, 14, 15, 16], [17, 18, 19, 20], [21, 22, 23, 24]]] ) assert mcode(example) == \ "{{{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}, " \ "{{13, 14, 15, 16}, {17, 18, 19, 20}, {21, 22, 23, 24}}}" example = ImmutableDenseNDimArray(example) assert mcode(example) == \ "{{{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}}, " \ "{{13, 14, 15, 16}, {17, 18, 19, 20}, {21, 22, 23, 24}}}" example = MutableSparseNDimArray(example) assert mcode(example) == \ "SparseArray[{" \ "{1, 1, 1} -> 1, {1, 1, 2} -> 2, {1, 1, 3} -> 3, " \ "{1, 1, 4} -> 4, {1, 2, 1} -> 5, {1, 2, 2} -> 6, " \ "{1, 2, 3} -> 7, {1, 2, 4} -> 8, {1, 3, 1} -> 9, " \ "{1, 3, 2} -> 10, {1, 3, 3} -> 11, {1, 3, 4} -> 12, " \ "{2, 1, 1} -> 13, {2, 1, 2} -> 14, {2, 1, 3} -> 15, " \ "{2, 1, 4} -> 16, {2, 2, 1} -> 17, {2, 2, 2} -> 18, " \ "{2, 2, 3} -> 19, {2, 2, 4} -> 20, {2, 3, 1} -> 21, " \ "{2, 3, 2} -> 22, {2, 3, 3} -> 23, {2, 3, 4} -> 24" \ "}, {2, 3, 4}]" example = ImmutableSparseNDimArray(example) assert mcode(example) == \ "SparseArray[{" \ "{1, 1, 1} -> 1, {1, 1, 2} -> 2, {1, 1, 3} -> 3, " \ "{1, 1, 4} -> 4, {1, 2, 1} -> 5, {1, 2, 2} -> 6, " \ "{1, 2, 3} -> 7, {1, 2, 4} -> 8, {1, 3, 1} -> 9, " \ "{1, 3, 2} -> 10, {1, 3, 3} -> 11, {1, 3, 4} -> 12, " \ "{2, 1, 1} -> 13, {2, 1, 2} -> 14, {2, 1, 3} -> 15, " \ "{2, 1, 4} -> 16, {2, 2, 1} -> 17, {2, 2, 2} -> 18, " \ "{2, 2, 3} -> 19, {2, 2, 4} -> 20, {2, 3, 1} -> 21, " \ "{2, 3, 2} -> 22, {2, 3, 3} -> 23, {2, 3, 4} -> 24" \ "}, {2, 3, 4}]" def test_Integral(): assert mcode(Integral(sin(sin(x)), x)) == "Hold[Integrate[Sin[Sin[x]], x]]" assert mcode(Integral(exp(-x**2 - y**2), (x, -oo, oo), (y, -oo, oo))) == \ "Hold[Integrate[Exp[-x^2 - y^2], {x, -Infinity, Infinity}, " \ "{y, -Infinity, Infinity}]]" def test_Derivative(): assert mcode(Derivative(sin(x), x)) == "Hold[D[Sin[x], x]]" assert mcode(Derivative(x, x)) == "Hold[D[x, x]]" assert mcode(Derivative(sin(x)*y**4, x, 2)) == "Hold[D[y^4*Sin[x], {x, 2}]]" assert mcode(Derivative(sin(x)*y**4, x, y, x)) == "Hold[D[y^4*Sin[x], x, y, x]]" assert mcode(Derivative(sin(x)*y**4, x, y, 3, x)) == "Hold[D[y^4*Sin[x], x, {y, 3}, x]]" def test_Sum(): assert mcode(Sum(sin(x), (x, 0, 10))) == "Hold[Sum[Sin[x], {x, 0, 10}]]" assert mcode(Sum(exp(-x**2 - y**2), (x, -oo, oo), (y, -oo, oo))) == \ "Hold[Sum[Exp[-x^2 - y^2], {x, -Infinity, Infinity}, " \ "{y, -Infinity, Infinity}]]" def test_comment(): from sympy.printing.mathematica import MCodePrinter assert MCodePrinter()._get_comment("Hello World") == \ "(* Hello World *)" def test_userfuncs(): # Dictionary mutation test some_function = symbols("some_function", cls=Function) my_user_functions = {"some_function": "SomeFunction"} assert mcode( some_function(z), user_functions=my_user_functions) == \ 'SomeFunction[z]' assert mcode( some_function(z), user_functions=my_user_functions) == \ 'SomeFunction[z]' # List argument test my_user_functions = \ {"some_function": [(lambda x: True, "SomeOtherFunction")]} assert mcode( some_function(z), user_functions=my_user_functions) == \ 'SomeOtherFunction[z]'
8f8ef0c603ec4eee8ca8239a93c4c74f89cc6bd92745c82db7e1e9a15a30e8d0
""" Important note on tests in this module - the Aesara printing functions use a global cache by default, which means that tests using it will modify global state and thus not be independent from each other. Instead of using the "cache" keyword argument each time, this module uses the aesara_code_ and aesara_function_ functions defined below which default to using a new, empty cache instead. """ import logging from sympy.external import import_module from sympy.testing.pytest import raises, SKIP aesaralogger = logging.getLogger('aesara.configdefaults') aesaralogger.setLevel(logging.CRITICAL) aesara = import_module('aesara') aesaralogger.setLevel(logging.WARNING) if aesara: import numpy as np aet = aesara.tensor from aesara.scalar.basic import Scalar from aesara.graph.basic import Variable from aesara.tensor.var import TensorVariable from aesara.tensor.elemwise import Elemwise, DimShuffle from aesara.tensor.math import Dot xt, yt, zt = [aet.scalar(name, 'floatX') for name in 'xyz'] Xt, Yt, Zt = [aet.tensor('floatX', (False, False), name=n) for n in 'XYZ'] else: #bin/test will not execute any tests now disabled = True import sympy as sy from sympy.core.singleton import S from sympy.abc import x, y, z, t from sympy.printing.aesaracode import (aesara_code, dim_handling, aesara_function) # Default set of matrix symbols for testing - make square so we can both # multiply and perform elementwise operations between them. X, Y, Z = [sy.MatrixSymbol(n, 4, 4) for n in 'XYZ'] # For testing AppliedUndef f_t = sy.Function('f')(t) def aesara_code_(expr, **kwargs): """ Wrapper for aesara_code that uses a new, empty cache by default. """ kwargs.setdefault('cache', {}) return aesara_code(expr, **kwargs) def aesara_function_(inputs, outputs, **kwargs): """ Wrapper for aesara_function that uses a new, empty cache by default. """ kwargs.setdefault('cache', {}) return aesara_function(inputs, outputs, **kwargs) def fgraph_of(*exprs): """ Transform SymPy expressions into Aesara Computation. Parameters ========== exprs SymPy expressions Returns ======= aesara.graph.fg.FunctionGraph """ outs = list(map(aesara_code_, exprs)) ins = list(aesara.graph.basic.graph_inputs(outs)) ins, outs = aesara.graph.basic.clone(ins, outs) return aesara.graph.fg.FunctionGraph(ins, outs) def aesara_simplify(fgraph): """ Simplify a Aesara Computation. Parameters ========== fgraph : aesara.graph.fg.FunctionGraph Returns ======= aesara.graph.fg.FunctionGraph """ mode = aesara.compile.get_default_mode().excluding("fusion") fgraph = fgraph.clone() mode.optimizer.optimize(fgraph) return fgraph def theq(a, b): """ Test two Aesara objects for equality. Also accepts numeric types and lists/tuples of supported types. Note - debugprint() has a bug where it will accept numeric types but does not respect the "file" argument and in this case and instead prints the number to stdout and returns an empty string. This can lead to tests passing where they should fail because any two numbers will always compare as equal. To prevent this we treat numbers as a separate case. """ numeric_types = (int, float, np.number) a_is_num = isinstance(a, numeric_types) b_is_num = isinstance(b, numeric_types) # Compare numeric types using regular equality if a_is_num or b_is_num: if not (a_is_num and b_is_num): return False return a == b # Compare sequences element-wise a_is_seq = isinstance(a, (tuple, list)) b_is_seq = isinstance(b, (tuple, list)) if a_is_seq or b_is_seq: if not (a_is_seq and b_is_seq) or type(a) != type(b): return False return list(map(theq, a)) == list(map(theq, b)) # Otherwise, assume debugprint() can handle it astr = aesara.printing.debugprint(a, file='str') bstr = aesara.printing.debugprint(b, file='str') # Check for bug mentioned above for argname, argval, argstr in [('a', a, astr), ('b', b, bstr)]: if argstr == '': raise TypeError( 'aesara.printing.debugprint(%s) returned empty string ' '(%s is instance of %r)' % (argname, argname, type(argval)) ) return astr == bstr def test_example_symbols(): """ Check that the example symbols in this module print to their Aesara equivalents, as many of the other tests depend on this. """ assert theq(xt, aesara_code_(x)) assert theq(yt, aesara_code_(y)) assert theq(zt, aesara_code_(z)) assert theq(Xt, aesara_code_(X)) assert theq(Yt, aesara_code_(Y)) assert theq(Zt, aesara_code_(Z)) def test_Symbol(): """ Test printing a Symbol to a aesara variable. """ xx = aesara_code_(x) assert isinstance(xx, Variable) assert xx.broadcastable == () assert xx.name == x.name xx2 = aesara_code_(x, broadcastables={x: (False,)}) assert xx2.broadcastable == (False,) assert xx2.name == x.name def test_MatrixSymbol(): """ Test printing a MatrixSymbol to a aesara variable. """ XX = aesara_code_(X) assert isinstance(XX, TensorVariable) assert XX.broadcastable == (False, False) @SKIP # TODO - this is currently not checked but should be implemented def test_MatrixSymbol_wrong_dims(): """ Test MatrixSymbol with invalid broadcastable. """ bcs = [(), (False,), (True,), (True, False), (False, True,), (True, True)] for bc in bcs: with raises(ValueError): aesara_code_(X, broadcastables={X: bc}) def test_AppliedUndef(): """ Test printing AppliedUndef instance, which works similarly to Symbol. """ ftt = aesara_code_(f_t) assert isinstance(ftt, TensorVariable) assert ftt.broadcastable == () assert ftt.name == 'f_t' def test_add(): expr = x + y comp = aesara_code_(expr) assert comp.owner.op == aesara.tensor.add def test_trig(): assert theq(aesara_code_(sy.sin(x)), aet.sin(xt)) assert theq(aesara_code_(sy.tan(x)), aet.tan(xt)) def test_many(): """ Test printing a complex expression with multiple symbols. """ expr = sy.exp(x**2 + sy.cos(y)) * sy.log(2*z) comp = aesara_code_(expr) expected = aet.exp(xt**2 + aet.cos(yt)) * aet.log(2*zt) assert theq(comp, expected) def test_dtype(): """ Test specifying specific data types through the dtype argument. """ for dtype in ['float32', 'float64', 'int8', 'int16', 'int32', 'int64']: assert aesara_code_(x, dtypes={x: dtype}).type.dtype == dtype # "floatX" type assert aesara_code_(x, dtypes={x: 'floatX'}).type.dtype in ('float32', 'float64') # Type promotion assert aesara_code_(x + 1, dtypes={x: 'float32'}).type.dtype == 'float32' assert aesara_code_(x + y, dtypes={x: 'float64', y: 'float32'}).type.dtype == 'float64' def test_broadcastables(): """ Test the "broadcastables" argument when printing symbol-like objects. """ # No restrictions on shape for s in [x, f_t]: for bc in [(), (False,), (True,), (False, False), (True, False)]: assert aesara_code_(s, broadcastables={s: bc}).broadcastable == bc # TODO - matrix broadcasting? def test_broadcasting(): """ Test "broadcastable" attribute after applying element-wise binary op. """ expr = x + y cases = [ [(), (), ()], [(False,), (False,), (False,)], [(True,), (False,), (False,)], [(False, True), (False, False), (False, False)], [(True, False), (False, False), (False, False)], ] for bc1, bc2, bc3 in cases: comp = aesara_code_(expr, broadcastables={x: bc1, y: bc2}) assert comp.broadcastable == bc3 def test_MatMul(): expr = X*Y*Z expr_t = aesara_code_(expr) assert isinstance(expr_t.owner.op, Dot) assert theq(expr_t, Xt.dot(Yt).dot(Zt)) def test_Transpose(): assert isinstance(aesara_code_(X.T).owner.op, DimShuffle) def test_MatAdd(): expr = X+Y+Z assert isinstance(aesara_code_(expr).owner.op, Elemwise) def test_Rationals(): assert theq(aesara_code_(sy.Integer(2) / 3), aet.true_div(2, 3)) assert theq(aesara_code_(S.Half), aet.true_div(1, 2)) def test_Integers(): assert aesara_code_(sy.Integer(3)) == 3 def test_factorial(): n = sy.Symbol('n') assert aesara_code_(sy.factorial(n)) def test_Derivative(): simp = lambda expr: aesara_simplify(fgraph_of(expr)) assert theq(simp(aesara_code_(sy.Derivative(sy.sin(x), x, evaluate=False))), simp(aesara.grad(aet.sin(xt), xt))) def test_aesara_function_simple(): """ Test aesara_function() with single output. """ f = aesara_function_([x, y], [x+y]) assert f(2, 3) == 5 def test_aesara_function_multi(): """ Test aesara_function() with multiple outputs. """ f = aesara_function_([x, y], [x+y, x-y]) o1, o2 = f(2, 3) assert o1 == 5 assert o2 == -1 def test_aesara_function_numpy(): """ Test aesara_function() vs Numpy implementation. """ f = aesara_function_([x, y], [x+y], dim=1, dtypes={x: 'float64', y: 'float64'}) assert np.linalg.norm(f([1, 2], [3, 4]) - np.asarray([4, 6])) < 1e-9 f = aesara_function_([x, y], [x+y], dtypes={x: 'float64', y: 'float64'}, dim=1) xx = np.arange(3).astype('float64') yy = 2*np.arange(3).astype('float64') assert np.linalg.norm(f(xx, yy) - 3*np.arange(3)) < 1e-9 def test_aesara_function_matrix(): m = sy.Matrix([[x, y], [z, x + y + z]]) expected = np.array([[1.0, 2.0], [3.0, 1.0 + 2.0 + 3.0]]) f = aesara_function_([x, y, z], [m]) np.testing.assert_allclose(f(1.0, 2.0, 3.0), expected) f = aesara_function_([x, y, z], [m], scalar=True) np.testing.assert_allclose(f(1.0, 2.0, 3.0), expected) f = aesara_function_([x, y, z], [m, m]) assert isinstance(f(1.0, 2.0, 3.0), type([])) np.testing.assert_allclose(f(1.0, 2.0, 3.0)[0], expected) np.testing.assert_allclose(f(1.0, 2.0, 3.0)[1], expected) def test_dim_handling(): assert dim_handling([x], dim=2) == {x: (False, False)} assert dim_handling([x, y], dims={x: 1, y: 2}) == {x: (False, True), y: (False, False)} assert dim_handling([x], broadcastables={x: (False,)}) == {x: (False,)} def test_aesara_function_kwargs(): """ Test passing additional kwargs from aesara_function() to aesara.function(). """ import numpy as np f = aesara_function_([x, y, z], [x+y], dim=1, on_unused_input='ignore', dtypes={x: 'float64', y: 'float64', z: 'float64'}) assert np.linalg.norm(f([1, 2], [3, 4], [0, 0]) - np.asarray([4, 6])) < 1e-9 f = aesara_function_([x, y, z], [x+y], dtypes={x: 'float64', y: 'float64', z: 'float64'}, dim=1, on_unused_input='ignore') xx = np.arange(3).astype('float64') yy = 2*np.arange(3).astype('float64') zz = 2*np.arange(3).astype('float64') assert np.linalg.norm(f(xx, yy, zz) - 3*np.arange(3)) < 1e-9 def test_aesara_function_scalar(): """ Test the "scalar" argument to aesara_function(). """ from aesara.compile.function.types import Function args = [ ([x, y], [x + y], None, [0]), # Single 0d output ([X, Y], [X + Y], None, [2]), # Single 2d output ([x, y], [x + y], {x: 0, y: 1}, [1]), # Single 1d output ([x, y], [x + y, x - y], None, [0, 0]), # Two 0d outputs ([x, y, X, Y], [x + y, X + Y], None, [0, 2]), # One 0d output, one 2d ] # Create and test functions with and without the scalar setting for inputs, outputs, in_dims, out_dims in args: for scalar in [False, True]: f = aesara_function_(inputs, outputs, dims=in_dims, scalar=scalar) # Check the aesara_function attribute is set whether wrapped or not assert isinstance(f.aesara_function, Function) # Feed in inputs of the appropriate size and get outputs in_values = [ np.ones([1 if bc else 5 for bc in i.type.broadcastable]) for i in f.aesara_function.input_storage ] out_values = f(*in_values) if not isinstance(out_values, list): out_values = [out_values] # Check output types and shapes assert len(out_dims) == len(out_values) for d, value in zip(out_dims, out_values): if scalar and d == 0: # Should have been converted to a scalar value assert isinstance(value, np.number) else: # Otherwise should be an array assert isinstance(value, np.ndarray) assert value.ndim == d def test_aesara_function_bad_kwarg(): """ Passing an unknown keyword argument to aesara_function() should raise an exception. """ raises(Exception, lambda : aesara_function_([x], [x+1], foobar=3)) def test_slice(): assert aesara_code_(slice(1, 2, 3)) == slice(1, 2, 3) def theq_slice(s1, s2): for attr in ['start', 'stop', 'step']: a1 = getattr(s1, attr) a2 = getattr(s2, attr) if a1 is None or a2 is None: if not (a1 is None or a2 is None): return False elif not theq(a1, a2): return False return True dtypes = {x: 'int32', y: 'int32'} assert theq_slice(aesara_code_(slice(x, y), dtypes=dtypes), slice(xt, yt)) assert theq_slice(aesara_code_(slice(1, x, 3), dtypes=dtypes), slice(1, xt, 3)) def test_MatrixSlice(): from aesara.graph.basic import Constant cache = {} n = sy.Symbol('n', integer=True) X = sy.MatrixSymbol('X', n, n) Y = X[1:2:3, 4:5:6] Yt = aesara_code_(Y, cache=cache) s = Scalar('int64') assert tuple(Yt.owner.op.idx_list) == (slice(s, s, s), slice(s, s, s)) assert Yt.owner.inputs[0] == aesara_code_(X, cache=cache) # == doesn't work in Aesara like it does in SymPy. You have to use # equals. assert all(Yt.owner.inputs[i].equals(Constant(s, i)) for i in range(1, 7)) k = sy.Symbol('k') aesara_code_(k, dtypes={k: 'int32'}) start, stop, step = 4, k, 2 Y = X[start:stop:step] Yt = aesara_code_(Y, dtypes={n: 'int32', k: 'int32'}) # assert Yt.owner.op.idx_list[0].stop == kt def test_BlockMatrix(): n = sy.Symbol('n', integer=True) A, B, C, D = [sy.MatrixSymbol(name, n, n) for name in 'ABCD'] At, Bt, Ct, Dt = map(aesara_code_, (A, B, C, D)) Block = sy.BlockMatrix([[A, B], [C, D]]) Blockt = aesara_code_(Block) solutions = [aet.join(0, aet.join(1, At, Bt), aet.join(1, Ct, Dt)), aet.join(1, aet.join(0, At, Ct), aet.join(0, Bt, Dt))] assert any(theq(Blockt, solution) for solution in solutions) @SKIP def test_BlockMatrix_Inverse_execution(): k, n = 2, 4 dtype = 'float32' A = sy.MatrixSymbol('A', n, k) B = sy.MatrixSymbol('B', n, n) inputs = A, B output = B.I*A cutsizes = {A: [(n//2, n//2), (k//2, k//2)], B: [(n//2, n//2), (n//2, n//2)]} cutinputs = [sy.blockcut(i, *cutsizes[i]) for i in inputs] cutoutput = output.subs(dict(zip(inputs, cutinputs))) dtypes = dict(zip(inputs, [dtype]*len(inputs))) f = aesara_function_(inputs, [output], dtypes=dtypes, cache={}) fblocked = aesara_function_(inputs, [sy.block_collapse(cutoutput)], dtypes=dtypes, cache={}) ninputs = [np.random.rand(*x.shape).astype(dtype) for x in inputs] ninputs = [np.arange(n*k).reshape(A.shape).astype(dtype), np.eye(n).astype(dtype)] ninputs[1] += np.ones(B.shape)*1e-5 assert np.allclose(f(*ninputs), fblocked(*ninputs), rtol=1e-5) def test_DenseMatrix(): from aesara.tensor.basic import Join t = sy.Symbol('theta') for MatrixType in [sy.Matrix, sy.ImmutableMatrix]: X = MatrixType([[sy.cos(t), -sy.sin(t)], [sy.sin(t), sy.cos(t)]]) tX = aesara_code_(X) assert isinstance(tX, TensorVariable) assert isinstance(tX.owner.op, Join) def test_cache_basic(): """ Test single symbol-like objects are cached when printed by themselves. """ # Pairs of objects which should be considered equivalent with respect to caching pairs = [ (x, sy.Symbol('x')), (X, sy.MatrixSymbol('X', *X.shape)), (f_t, sy.Function('f')(sy.Symbol('t'))), ] for s1, s2 in pairs: cache = {} st = aesara_code_(s1, cache=cache) # Test hit with same instance assert aesara_code_(s1, cache=cache) is st # Test miss with same instance but new cache assert aesara_code_(s1, cache={}) is not st # Test hit with different but equivalent instance assert aesara_code_(s2, cache=cache) is st def test_global_cache(): """ Test use of the global cache. """ from sympy.printing.aesaracode import global_cache backup = dict(global_cache) try: # Temporarily empty global cache global_cache.clear() for s in [x, X, f_t]: st = aesara_code(s) assert aesara_code(s) is st finally: # Restore global cache global_cache.update(backup) def test_cache_types_distinct(): """ Test that symbol-like objects of different types (Symbol, MatrixSymbol, AppliedUndef) are distinguished by the cache even if they have the same name. """ symbols = [sy.Symbol('f_t'), sy.MatrixSymbol('f_t', 4, 4), f_t] cache = {} # Single shared cache printed = {} for s in symbols: st = aesara_code_(s, cache=cache) assert st not in printed.values() printed[s] = st # Check all printed objects are distinct assert len(set(map(id, printed.values()))) == len(symbols) # Check retrieving for s, st in printed.items(): assert aesara_code(s, cache=cache) is st def test_symbols_are_created_once(): """ Test that a symbol is cached and reused when it appears in an expression more than once. """ expr = sy.Add(x, x, evaluate=False) comp = aesara_code_(expr) assert theq(comp, xt + xt) assert not theq(comp, xt + aesara_code_(x)) def test_cache_complex(): """ Test caching on a complicated expression with multiple symbols appearing multiple times. """ expr = x ** 2 + (y - sy.exp(x)) * sy.sin(z - x * y) symbol_names = {s.name for s in expr.free_symbols} expr_t = aesara_code_(expr) # Iterate through variables in the Aesara computational graph that the # printed expression depends on seen = set() for v in aesara.graph.basic.ancestors([expr_t]): # Owner-less, non-constant variables should be our symbols if v.owner is None and not isinstance(v, aesara.graph.basic.Constant): # Check it corresponds to a symbol and appears only once assert v.name in symbol_names assert v.name not in seen seen.add(v.name) # Check all were present assert seen == symbol_names def test_Piecewise(): # A piecewise linear expr = sy.Piecewise((0, x<0), (x, x<2), (1, True)) # ___/III result = aesara_code_(expr) assert result.owner.op == aet.switch expected = aet.switch(xt<0, 0, aet.switch(xt<2, xt, 1)) assert theq(result, expected) expr = sy.Piecewise((x, x < 0)) result = aesara_code_(expr) expected = aet.switch(xt < 0, xt, np.nan) assert theq(result, expected) expr = sy.Piecewise((0, sy.And(x>0, x<2)), \ (x, sy.Or(x>2, x<0))) result = aesara_code_(expr) expected = aet.switch(aet.and_(xt>0,xt<2), 0, \ aet.switch(aet.or_(xt>2, xt<0), xt, np.nan)) assert theq(result, expected) def test_Relationals(): assert theq(aesara_code_(sy.Eq(x, y)), aet.eq(xt, yt)) # assert theq(aesara_code_(sy.Ne(x, y)), aet.neq(xt, yt)) # TODO - implement assert theq(aesara_code_(x > y), xt > yt) assert theq(aesara_code_(x < y), xt < yt) assert theq(aesara_code_(x >= y), xt >= yt) assert theq(aesara_code_(x <= y), xt <= yt) def test_complexfunctions(): xt, yt = aesara_code(x, dtypes={x:'complex128'}), aesara_code(y, dtypes={y: 'complex128'}) from sympy.functions.elementary.complexes import conjugate from aesara.tensor import as_tensor_variable as atv from aesara.tensor import complex as cplx assert theq(aesara_code(y*conjugate(x)), yt*(xt.conj())) assert theq(aesara_code((1+2j)*x), xt*(atv(1.0)+atv(2.0)*cplx(0,1))) def test_constantfunctions(): tf = aesara_function([],[1+1j]) assert(tf()==1+1j)
7713234589234e08fe977ac7b802c040073ab1d76b7f27972aed4429a98e9789
""" Important note on tests in this module - the Theano printing functions use a global cache by default, which means that tests using it will modify global state and thus not be independent from each other. Instead of using the "cache" keyword argument each time, this module uses the theano_code_ and theano_function_ functions defined below which default to using a new, empty cache instead. """ import logging from sympy.external import import_module from sympy.testing.pytest import raises, SKIP, warns_deprecated_sympy theanologger = logging.getLogger('theano.configdefaults') theanologger.setLevel(logging.CRITICAL) theano = import_module('theano') theanologger.setLevel(logging.WARNING) if theano: import numpy as np ts = theano.scalar tt = theano.tensor xt, yt, zt = [tt.scalar(name, 'floatX') for name in 'xyz'] Xt, Yt, Zt = [tt.tensor('floatX', (False, False), name=n) for n in 'XYZ'] else: #bin/test will not execute any tests now disabled = True import sympy as sy from sympy.core.singleton import S from sympy.abc import x, y, z, t from sympy.printing.theanocode import (theano_code, dim_handling, theano_function) # Default set of matrix symbols for testing - make square so we can both # multiply and perform elementwise operations between them. X, Y, Z = [sy.MatrixSymbol(n, 4, 4) for n in 'XYZ'] # For testing AppliedUndef f_t = sy.Function('f')(t) def theano_code_(expr, **kwargs): """ Wrapper for theano_code that uses a new, empty cache by default. """ kwargs.setdefault('cache', {}) with warns_deprecated_sympy(): return theano_code(expr, **kwargs) def theano_function_(inputs, outputs, **kwargs): """ Wrapper for theano_function that uses a new, empty cache by default. """ kwargs.setdefault('cache', {}) with warns_deprecated_sympy(): return theano_function(inputs, outputs, **kwargs) def fgraph_of(*exprs): """ Transform SymPy expressions into Theano Computation. Parameters ========== exprs SymPy expressions Returns ======= theano.gof.FunctionGraph """ outs = list(map(theano_code_, exprs)) ins = theano.gof.graph.inputs(outs) ins, outs = theano.gof.graph.clone(ins, outs) return theano.gof.FunctionGraph(ins, outs) def theano_simplify(fgraph): """ Simplify a Theano Computation. Parameters ========== fgraph : theano.gof.FunctionGraph Returns ======= theano.gof.FunctionGraph """ mode = theano.compile.get_default_mode().excluding("fusion") fgraph = fgraph.clone() mode.optimizer.optimize(fgraph) return fgraph def theq(a, b): """ Test two Theano objects for equality. Also accepts numeric types and lists/tuples of supported types. Note - debugprint() has a bug where it will accept numeric types but does not respect the "file" argument and in this case and instead prints the number to stdout and returns an empty string. This can lead to tests passing where they should fail because any two numbers will always compare as equal. To prevent this we treat numbers as a separate case. """ numeric_types = (int, float, np.number) a_is_num = isinstance(a, numeric_types) b_is_num = isinstance(b, numeric_types) # Compare numeric types using regular equality if a_is_num or b_is_num: if not (a_is_num and b_is_num): return False return a == b # Compare sequences element-wise a_is_seq = isinstance(a, (tuple, list)) b_is_seq = isinstance(b, (tuple, list)) if a_is_seq or b_is_seq: if not (a_is_seq and b_is_seq) or type(a) != type(b): return False return list(map(theq, a)) == list(map(theq, b)) # Otherwise, assume debugprint() can handle it astr = theano.printing.debugprint(a, file='str') bstr = theano.printing.debugprint(b, file='str') # Check for bug mentioned above for argname, argval, argstr in [('a', a, astr), ('b', b, bstr)]: if argstr == '': raise TypeError( 'theano.printing.debugprint(%s) returned empty string ' '(%s is instance of %r)' % (argname, argname, type(argval)) ) return astr == bstr def test_example_symbols(): """ Check that the example symbols in this module print to their Theano equivalents, as many of the other tests depend on this. """ assert theq(xt, theano_code_(x)) assert theq(yt, theano_code_(y)) assert theq(zt, theano_code_(z)) assert theq(Xt, theano_code_(X)) assert theq(Yt, theano_code_(Y)) assert theq(Zt, theano_code_(Z)) def test_Symbol(): """ Test printing a Symbol to a theano variable. """ xx = theano_code_(x) assert isinstance(xx, (tt.TensorVariable, ts.ScalarVariable)) assert xx.broadcastable == () assert xx.name == x.name xx2 = theano_code_(x, broadcastables={x: (False,)}) assert xx2.broadcastable == (False,) assert xx2.name == x.name def test_MatrixSymbol(): """ Test printing a MatrixSymbol to a theano variable. """ XX = theano_code_(X) assert isinstance(XX, tt.TensorVariable) assert XX.broadcastable == (False, False) @SKIP # TODO - this is currently not checked but should be implemented def test_MatrixSymbol_wrong_dims(): """ Test MatrixSymbol with invalid broadcastable. """ bcs = [(), (False,), (True,), (True, False), (False, True,), (True, True)] for bc in bcs: with raises(ValueError): theano_code_(X, broadcastables={X: bc}) def test_AppliedUndef(): """ Test printing AppliedUndef instance, which works similarly to Symbol. """ ftt = theano_code_(f_t) assert isinstance(ftt, tt.TensorVariable) assert ftt.broadcastable == () assert ftt.name == 'f_t' def test_add(): expr = x + y comp = theano_code_(expr) assert comp.owner.op == theano.tensor.add def test_trig(): assert theq(theano_code_(sy.sin(x)), tt.sin(xt)) assert theq(theano_code_(sy.tan(x)), tt.tan(xt)) def test_many(): """ Test printing a complex expression with multiple symbols. """ expr = sy.exp(x**2 + sy.cos(y)) * sy.log(2*z) comp = theano_code_(expr) expected = tt.exp(xt**2 + tt.cos(yt)) * tt.log(2*zt) assert theq(comp, expected) def test_dtype(): """ Test specifying specific data types through the dtype argument. """ for dtype in ['float32', 'float64', 'int8', 'int16', 'int32', 'int64']: assert theano_code_(x, dtypes={x: dtype}).type.dtype == dtype # "floatX" type assert theano_code_(x, dtypes={x: 'floatX'}).type.dtype in ('float32', 'float64') # Type promotion assert theano_code_(x + 1, dtypes={x: 'float32'}).type.dtype == 'float32' assert theano_code_(x + y, dtypes={x: 'float64', y: 'float32'}).type.dtype == 'float64' def test_broadcastables(): """ Test the "broadcastables" argument when printing symbol-like objects. """ # No restrictions on shape for s in [x, f_t]: for bc in [(), (False,), (True,), (False, False), (True, False)]: assert theano_code_(s, broadcastables={s: bc}).broadcastable == bc # TODO - matrix broadcasting? def test_broadcasting(): """ Test "broadcastable" attribute after applying element-wise binary op. """ expr = x + y cases = [ [(), (), ()], [(False,), (False,), (False,)], [(True,), (False,), (False,)], [(False, True), (False, False), (False, False)], [(True, False), (False, False), (False, False)], ] for bc1, bc2, bc3 in cases: comp = theano_code_(expr, broadcastables={x: bc1, y: bc2}) assert comp.broadcastable == bc3 def test_MatMul(): expr = X*Y*Z expr_t = theano_code_(expr) assert isinstance(expr_t.owner.op, tt.Dot) assert theq(expr_t, Xt.dot(Yt).dot(Zt)) def test_Transpose(): assert isinstance(theano_code_(X.T).owner.op, tt.DimShuffle) def test_MatAdd(): expr = X+Y+Z assert isinstance(theano_code_(expr).owner.op, tt.Elemwise) def test_Rationals(): assert theq(theano_code_(sy.Integer(2) / 3), tt.true_div(2, 3)) assert theq(theano_code_(S.Half), tt.true_div(1, 2)) def test_Integers(): assert theano_code_(sy.Integer(3)) == 3 def test_factorial(): n = sy.Symbol('n') assert theano_code_(sy.factorial(n)) def test_Derivative(): simp = lambda expr: theano_simplify(fgraph_of(expr)) assert theq(simp(theano_code_(sy.Derivative(sy.sin(x), x, evaluate=False))), simp(theano.grad(tt.sin(xt), xt))) def test_theano_function_simple(): """ Test theano_function() with single output. """ f = theano_function_([x, y], [x+y]) assert f(2, 3) == 5 def test_theano_function_multi(): """ Test theano_function() with multiple outputs. """ f = theano_function_([x, y], [x+y, x-y]) o1, o2 = f(2, 3) assert o1 == 5 assert o2 == -1 def test_theano_function_numpy(): """ Test theano_function() vs Numpy implementation. """ f = theano_function_([x, y], [x+y], dim=1, dtypes={x: 'float64', y: 'float64'}) assert np.linalg.norm(f([1, 2], [3, 4]) - np.asarray([4, 6])) < 1e-9 f = theano_function_([x, y], [x+y], dtypes={x: 'float64', y: 'float64'}, dim=1) xx = np.arange(3).astype('float64') yy = 2*np.arange(3).astype('float64') assert np.linalg.norm(f(xx, yy) - 3*np.arange(3)) < 1e-9 def test_theano_function_matrix(): m = sy.Matrix([[x, y], [z, x + y + z]]) expected = np.array([[1.0, 2.0], [3.0, 1.0 + 2.0 + 3.0]]) f = theano_function_([x, y, z], [m]) np.testing.assert_allclose(f(1.0, 2.0, 3.0), expected) f = theano_function_([x, y, z], [m], scalar=True) np.testing.assert_allclose(f(1.0, 2.0, 3.0), expected) f = theano_function_([x, y, z], [m, m]) assert isinstance(f(1.0, 2.0, 3.0), type([])) np.testing.assert_allclose(f(1.0, 2.0, 3.0)[0], expected) np.testing.assert_allclose(f(1.0, 2.0, 3.0)[1], expected) def test_dim_handling(): assert dim_handling([x], dim=2) == {x: (False, False)} assert dim_handling([x, y], dims={x: 1, y: 2}) == {x: (False, True), y: (False, False)} assert dim_handling([x], broadcastables={x: (False,)}) == {x: (False,)} def test_theano_function_kwargs(): """ Test passing additional kwargs from theano_function() to theano.function(). """ import numpy as np f = theano_function_([x, y, z], [x+y], dim=1, on_unused_input='ignore', dtypes={x: 'float64', y: 'float64', z: 'float64'}) assert np.linalg.norm(f([1, 2], [3, 4], [0, 0]) - np.asarray([4, 6])) < 1e-9 f = theano_function_([x, y, z], [x+y], dtypes={x: 'float64', y: 'float64', z: 'float64'}, dim=1, on_unused_input='ignore') xx = np.arange(3).astype('float64') yy = 2*np.arange(3).astype('float64') zz = 2*np.arange(3).astype('float64') assert np.linalg.norm(f(xx, yy, zz) - 3*np.arange(3)) < 1e-9 def test_theano_function_scalar(): """ Test the "scalar" argument to theano_function(). """ args = [ ([x, y], [x + y], None, [0]), # Single 0d output ([X, Y], [X + Y], None, [2]), # Single 2d output ([x, y], [x + y], {x: 0, y: 1}, [1]), # Single 1d output ([x, y], [x + y, x - y], None, [0, 0]), # Two 0d outputs ([x, y, X, Y], [x + y, X + Y], None, [0, 2]), # One 0d output, one 2d ] # Create and test functions with and without the scalar setting for inputs, outputs, in_dims, out_dims in args: for scalar in [False, True]: f = theano_function_(inputs, outputs, dims=in_dims, scalar=scalar) # Check the theano_function attribute is set whether wrapped or not assert isinstance(f.theano_function, theano.compile.function_module.Function) # Feed in inputs of the appropriate size and get outputs in_values = [ np.ones([1 if bc else 5 for bc in i.type.broadcastable]) for i in f.theano_function.input_storage ] out_values = f(*in_values) if not isinstance(out_values, list): out_values = [out_values] # Check output types and shapes assert len(out_dims) == len(out_values) for d, value in zip(out_dims, out_values): if scalar and d == 0: # Should have been converted to a scalar value assert isinstance(value, np.number) else: # Otherwise should be an array assert isinstance(value, np.ndarray) assert value.ndim == d def test_theano_function_bad_kwarg(): """ Passing an unknown keyword argument to theano_function() should raise an exception. """ raises(Exception, lambda : theano_function_([x], [x+1], foobar=3)) def test_slice(): assert theano_code_(slice(1, 2, 3)) == slice(1, 2, 3) def theq_slice(s1, s2): for attr in ['start', 'stop', 'step']: a1 = getattr(s1, attr) a2 = getattr(s2, attr) if a1 is None or a2 is None: if not (a1 is None or a2 is None): return False elif not theq(a1, a2): return False return True dtypes = {x: 'int32', y: 'int32'} assert theq_slice(theano_code_(slice(x, y), dtypes=dtypes), slice(xt, yt)) assert theq_slice(theano_code_(slice(1, x, 3), dtypes=dtypes), slice(1, xt, 3)) def test_MatrixSlice(): from theano import Constant cache = {} n = sy.Symbol('n', integer=True) X = sy.MatrixSymbol('X', n, n) Y = X[1:2:3, 4:5:6] Yt = theano_code_(Y, cache=cache) s = ts.Scalar('int64') assert tuple(Yt.owner.op.idx_list) == (slice(s, s, s), slice(s, s, s)) assert Yt.owner.inputs[0] == theano_code_(X, cache=cache) # == doesn't work in theano like it does in SymPy. You have to use # equals. assert all(Yt.owner.inputs[i].equals(Constant(s, i)) for i in range(1, 7)) k = sy.Symbol('k') theano_code_(k, dtypes={k: 'int32'}) start, stop, step = 4, k, 2 Y = X[start:stop:step] Yt = theano_code_(Y, dtypes={n: 'int32', k: 'int32'}) # assert Yt.owner.op.idx_list[0].stop == kt def test_BlockMatrix(): n = sy.Symbol('n', integer=True) A, B, C, D = [sy.MatrixSymbol(name, n, n) for name in 'ABCD'] At, Bt, Ct, Dt = map(theano_code_, (A, B, C, D)) Block = sy.BlockMatrix([[A, B], [C, D]]) Blockt = theano_code_(Block) solutions = [tt.join(0, tt.join(1, At, Bt), tt.join(1, Ct, Dt)), tt.join(1, tt.join(0, At, Ct), tt.join(0, Bt, Dt))] assert any(theq(Blockt, solution) for solution in solutions) @SKIP def test_BlockMatrix_Inverse_execution(): k, n = 2, 4 dtype = 'float32' A = sy.MatrixSymbol('A', n, k) B = sy.MatrixSymbol('B', n, n) inputs = A, B output = B.I*A cutsizes = {A: [(n//2, n//2), (k//2, k//2)], B: [(n//2, n//2), (n//2, n//2)]} cutinputs = [sy.blockcut(i, *cutsizes[i]) for i in inputs] cutoutput = output.subs(dict(zip(inputs, cutinputs))) dtypes = dict(zip(inputs, [dtype]*len(inputs))) f = theano_function_(inputs, [output], dtypes=dtypes, cache={}) fblocked = theano_function_(inputs, [sy.block_collapse(cutoutput)], dtypes=dtypes, cache={}) ninputs = [np.random.rand(*x.shape).astype(dtype) for x in inputs] ninputs = [np.arange(n*k).reshape(A.shape).astype(dtype), np.eye(n).astype(dtype)] ninputs[1] += np.ones(B.shape)*1e-5 assert np.allclose(f(*ninputs), fblocked(*ninputs), rtol=1e-5) def test_DenseMatrix(): t = sy.Symbol('theta') for MatrixType in [sy.Matrix, sy.ImmutableMatrix]: X = MatrixType([[sy.cos(t), -sy.sin(t)], [sy.sin(t), sy.cos(t)]]) tX = theano_code_(X) assert isinstance(tX, tt.TensorVariable) assert tX.owner.op == tt.join_ def test_cache_basic(): """ Test single symbol-like objects are cached when printed by themselves. """ # Pairs of objects which should be considered equivalent with respect to caching pairs = [ (x, sy.Symbol('x')), (X, sy.MatrixSymbol('X', *X.shape)), (f_t, sy.Function('f')(sy.Symbol('t'))), ] for s1, s2 in pairs: cache = {} st = theano_code_(s1, cache=cache) # Test hit with same instance assert theano_code_(s1, cache=cache) is st # Test miss with same instance but new cache assert theano_code_(s1, cache={}) is not st # Test hit with different but equivalent instance assert theano_code_(s2, cache=cache) is st def test_global_cache(): """ Test use of the global cache. """ from sympy.printing.theanocode import global_cache backup = dict(global_cache) try: # Temporarily empty global cache global_cache.clear() for s in [x, X, f_t]: with warns_deprecated_sympy(): st = theano_code(s) assert theano_code(s) is st finally: # Restore global cache global_cache.update(backup) def test_cache_types_distinct(): """ Test that symbol-like objects of different types (Symbol, MatrixSymbol, AppliedUndef) are distinguished by the cache even if they have the same name. """ symbols = [sy.Symbol('f_t'), sy.MatrixSymbol('f_t', 4, 4), f_t] cache = {} # Single shared cache printed = {} for s in symbols: st = theano_code_(s, cache=cache) assert st not in printed.values() printed[s] = st # Check all printed objects are distinct assert len(set(map(id, printed.values()))) == len(symbols) # Check retrieving for s, st in printed.items(): with warns_deprecated_sympy(): assert theano_code(s, cache=cache) is st def test_symbols_are_created_once(): """ Test that a symbol is cached and reused when it appears in an expression more than once. """ expr = sy.Add(x, x, evaluate=False) comp = theano_code_(expr) assert theq(comp, xt + xt) assert not theq(comp, xt + theano_code_(x)) def test_cache_complex(): """ Test caching on a complicated expression with multiple symbols appearing multiple times. """ expr = x ** 2 + (y - sy.exp(x)) * sy.sin(z - x * y) symbol_names = {s.name for s in expr.free_symbols} expr_t = theano_code_(expr) # Iterate through variables in the Theano computational graph that the # printed expression depends on seen = set() for v in theano.gof.graph.ancestors([expr_t]): # Owner-less, non-constant variables should be our symbols if v.owner is None and not isinstance(v, theano.gof.graph.Constant): # Check it corresponds to a symbol and appears only once assert v.name in symbol_names assert v.name not in seen seen.add(v.name) # Check all were present assert seen == symbol_names def test_Piecewise(): # A piecewise linear expr = sy.Piecewise((0, x<0), (x, x<2), (1, True)) # ___/III result = theano_code_(expr) assert result.owner.op == tt.switch expected = tt.switch(xt<0, 0, tt.switch(xt<2, xt, 1)) assert theq(result, expected) expr = sy.Piecewise((x, x < 0)) result = theano_code_(expr) expected = tt.switch(xt < 0, xt, np.nan) assert theq(result, expected) expr = sy.Piecewise((0, sy.And(x>0, x<2)), \ (x, sy.Or(x>2, x<0))) result = theano_code_(expr) expected = tt.switch(tt.and_(xt>0,xt<2), 0, \ tt.switch(tt.or_(xt>2, xt<0), xt, np.nan)) assert theq(result, expected) def test_Relationals(): assert theq(theano_code_(sy.Eq(x, y)), tt.eq(xt, yt)) # assert theq(theano_code_(sy.Ne(x, y)), tt.neq(xt, yt)) # TODO - implement assert theq(theano_code_(x > y), xt > yt) assert theq(theano_code_(x < y), xt < yt) assert theq(theano_code_(x >= y), xt >= yt) assert theq(theano_code_(x <= y), xt <= yt) def test_complexfunctions(): with warns_deprecated_sympy(): xt, yt = theano_code_(x, dtypes={x:'complex128'}), theano_code_(y, dtypes={y: 'complex128'}) from sympy.functions.elementary.complexes import conjugate from theano.tensor import as_tensor_variable as atv from theano.tensor import complex as cplx with warns_deprecated_sympy(): assert theq(theano_code_(y*conjugate(x)), yt*(xt.conj())) assert theq(theano_code_((1+2j)*x), xt*(atv(1.0)+atv(2.0)*cplx(0,1))) def test_constantfunctions(): with warns_deprecated_sympy(): tf = theano_function_([],[1+1j]) assert(tf()==1+1j) def test_Exp1(): """ Test that exp(1) prints without error and evaluates close to SymPy's E """ # sy.exp(1) should yield same instance of E as sy.E (singleton), but extra # check added for sanity e_a = sy.exp(1) e_b = sy.E np.testing.assert_allclose(float(e_a), np.e) np.testing.assert_allclose(float(e_b), np.e) e = theano_code_(e_a) np.testing.assert_allclose(float(e_a), e.eval()) e = theano_code_(e_b) np.testing.assert_allclose(float(e_b), e.eval())
4f61a0d5bb6a850d45664ddf4b34f21c89afcc36ae54092476ce437e125d0e6e
from sympy.core import (S, pi, oo, symbols, Function, Rational, Integer, Tuple, Symbol, EulerGamma, GoldenRatio, Catalan, Lambda, Mul, Pow, Mod, Eq, Ne, Le, Lt, Gt, Ge) from sympy.codegen.matrix_nodes import MatrixSolve from sympy.functions import (arg, atan2, bernoulli, beta, ceiling, chebyshevu, chebyshevt, conjugate, DiracDelta, exp, expint, factorial, floor, harmonic, Heaviside, im, laguerre, LambertW, log, Max, Min, Piecewise, polylog, re, RisingFactorial, sign, sinc, sqrt, zeta, binomial, legendre, dirichlet_eta, riemann_xi) from sympy.functions import (sin, cos, tan, cot, sec, csc, asin, acos, acot, atan, asec, acsc, sinh, cosh, tanh, coth, csch, sech, asinh, acosh, atanh, acoth, asech, acsch) from sympy.testing.pytest import raises, XFAIL from sympy.utilities.lambdify import implemented_function from sympy.matrices import (eye, Matrix, MatrixSymbol, Identity, HadamardProduct, SparseMatrix, HadamardPower) from sympy.functions.special.bessel import (jn, yn, besselj, bessely, besseli, besselk, hankel1, hankel2, airyai, airybi, airyaiprime, airybiprime) from sympy.functions.special.gamma_functions import (gamma, lowergamma, uppergamma, loggamma, polygamma) from sympy.functions.special.error_functions import (Chi, Ci, erf, erfc, erfi, erfcinv, erfinv, fresnelc, fresnels, li, Shi, Si, Li, erf2, Ei) from sympy.printing.octave import octave_code, octave_code as mcode x, y, z = symbols('x,y,z') def test_Integer(): assert mcode(Integer(67)) == "67" assert mcode(Integer(-1)) == "-1" def test_Rational(): assert mcode(Rational(3, 7)) == "3/7" assert mcode(Rational(18, 9)) == "2" assert mcode(Rational(3, -7)) == "-3/7" assert mcode(Rational(-3, -7)) == "3/7" assert mcode(x + Rational(3, 7)) == "x + 3/7" assert mcode(Rational(3, 7)*x) == "3*x/7" def test_Relational(): assert mcode(Eq(x, y)) == "x == y" assert mcode(Ne(x, y)) == "x != y" assert mcode(Le(x, y)) == "x <= y" assert mcode(Lt(x, y)) == "x < y" assert mcode(Gt(x, y)) == "x > y" assert mcode(Ge(x, y)) == "x >= y" def test_Function(): assert mcode(sin(x) ** cos(x)) == "sin(x).^cos(x)" assert mcode(sign(x)) == "sign(x)" assert mcode(exp(x)) == "exp(x)" assert mcode(log(x)) == "log(x)" assert mcode(factorial(x)) == "factorial(x)" assert mcode(floor(x)) == "floor(x)" assert mcode(atan2(y, x)) == "atan2(y, x)" assert mcode(beta(x, y)) == 'beta(x, y)' assert mcode(polylog(x, y)) == 'polylog(x, y)' assert mcode(harmonic(x)) == 'harmonic(x)' assert mcode(bernoulli(x)) == "bernoulli(x)" assert mcode(bernoulli(x, y)) == "bernoulli(x, y)" assert mcode(legendre(x, y)) == "legendre(x, y)" def test_Function_change_name(): assert mcode(abs(x)) == "abs(x)" assert mcode(ceiling(x)) == "ceil(x)" assert mcode(arg(x)) == "angle(x)" assert mcode(im(x)) == "imag(x)" assert mcode(re(x)) == "real(x)" assert mcode(conjugate(x)) == "conj(x)" assert mcode(chebyshevt(y, x)) == "chebyshevT(y, x)" assert mcode(chebyshevu(y, x)) == "chebyshevU(y, x)" assert mcode(laguerre(x, y)) == "laguerreL(x, y)" assert mcode(Chi(x)) == "coshint(x)" assert mcode(Shi(x)) == "sinhint(x)" assert mcode(Ci(x)) == "cosint(x)" assert mcode(Si(x)) == "sinint(x)" assert mcode(li(x)) == "logint(x)" assert mcode(loggamma(x)) == "gammaln(x)" assert mcode(polygamma(x, y)) == "psi(x, y)" assert mcode(RisingFactorial(x, y)) == "pochhammer(x, y)" assert mcode(DiracDelta(x)) == "dirac(x)" assert mcode(DiracDelta(x, 3)) == "dirac(3, x)" assert mcode(Heaviside(x)) == "heaviside(x, 1/2)" assert mcode(Heaviside(x, y)) == "heaviside(x, y)" assert mcode(binomial(x, y)) == "bincoeff(x, y)" assert mcode(Mod(x, y)) == "mod(x, y)" def test_minmax(): assert mcode(Max(x, y) + Min(x, y)) == "max(x, y) + min(x, y)" assert mcode(Max(x, y, z)) == "max(x, max(y, z))" assert mcode(Min(x, y, z)) == "min(x, min(y, z))" def test_Pow(): assert mcode(x**3) == "x.^3" assert mcode(x**(y**3)) == "x.^(y.^3)" assert mcode(x**Rational(2, 3)) == 'x.^(2/3)' g = implemented_function('g', Lambda(x, 2*x)) assert mcode(1/(g(x)*3.5)**(x - y**x)/(x**2 + y)) == \ "(3.5*2*x).^(-x + y.^x)./(x.^2 + y)" # For issue 14160 assert mcode(Mul(-2, x, Pow(Mul(y,y,evaluate=False), -1, evaluate=False), evaluate=False)) == '-2*x./(y.*y)' def test_basic_ops(): assert mcode(x*y) == "x.*y" assert mcode(x + y) == "x + y" assert mcode(x - y) == "x - y" assert mcode(-x) == "-x" def test_1_over_x_and_sqrt(): # 1.0 and 0.5 would do something different in regular StrPrinter, # but these are exact in IEEE floating point so no different here. assert mcode(1/x) == '1./x' assert mcode(x**-1) == mcode(x**-1.0) == '1./x' assert mcode(1/sqrt(x)) == '1./sqrt(x)' assert mcode(x**-S.Half) == mcode(x**-0.5) == '1./sqrt(x)' assert mcode(sqrt(x)) == 'sqrt(x)' assert mcode(x**S.Half) == mcode(x**0.5) == 'sqrt(x)' assert mcode(1/pi) == '1/pi' assert mcode(pi**-1) == mcode(pi**-1.0) == '1/pi' assert mcode(pi**-0.5) == '1/sqrt(pi)' def test_mix_number_mult_symbols(): assert mcode(3*x) == "3*x" assert mcode(pi*x) == "pi*x" assert mcode(3/x) == "3./x" assert mcode(pi/x) == "pi./x" assert mcode(x/3) == "x/3" assert mcode(x/pi) == "x/pi" assert mcode(x*y) == "x.*y" assert mcode(3*x*y) == "3*x.*y" assert mcode(3*pi*x*y) == "3*pi*x.*y" assert mcode(x/y) == "x./y" assert mcode(3*x/y) == "3*x./y" assert mcode(x*y/z) == "x.*y./z" assert mcode(x/y*z) == "x.*z./y" assert mcode(1/x/y) == "1./(x.*y)" assert mcode(2*pi*x/y/z) == "2*pi*x./(y.*z)" assert mcode(3*pi/x) == "3*pi./x" assert mcode(S(3)/5) == "3/5" assert mcode(S(3)/5*x) == "3*x/5" assert mcode(x/y/z) == "x./(y.*z)" assert mcode((x+y)/z) == "(x + y)./z" assert mcode((x+y)/(z+x)) == "(x + y)./(x + z)" assert mcode((x+y)/EulerGamma) == "(x + y)/%s" % EulerGamma.evalf(17) assert mcode(x/3/pi) == "x/(3*pi)" assert mcode(S(3)/5*x*y/pi) == "3*x.*y/(5*pi)" def test_mix_number_pow_symbols(): assert mcode(pi**3) == 'pi^3' assert mcode(x**2) == 'x.^2' assert mcode(x**(pi**3)) == 'x.^(pi^3)' assert mcode(x**y) == 'x.^y' assert mcode(x**(y**z)) == 'x.^(y.^z)' assert mcode((x**y)**z) == '(x.^y).^z' def test_imag(): I = S('I') assert mcode(I) == "1i" assert mcode(5*I) == "5i" assert mcode((S(3)/2)*I) == "3*1i/2" assert mcode(3+4*I) == "3 + 4i" assert mcode(sqrt(3)*I) == "sqrt(3)*1i" def test_constants(): assert mcode(pi) == "pi" assert mcode(oo) == "inf" assert mcode(-oo) == "-inf" assert mcode(S.NegativeInfinity) == "-inf" assert mcode(S.NaN) == "NaN" assert mcode(S.Exp1) == "exp(1)" assert mcode(exp(1)) == "exp(1)" def test_constants_other(): assert mcode(2*GoldenRatio) == "2*(1+sqrt(5))/2" assert mcode(2*Catalan) == "2*%s" % Catalan.evalf(17) assert mcode(2*EulerGamma) == "2*%s" % EulerGamma.evalf(17) def test_boolean(): assert mcode(x & y) == "x & y" assert mcode(x | y) == "x | y" assert mcode(~x) == "~x" assert mcode(x & y & z) == "x & y & z" assert mcode(x | y | z) == "x | y | z" assert mcode((x & y) | z) == "z | x & y" assert mcode((x | y) & z) == "z & (x | y)" def test_KroneckerDelta(): from sympy.functions import KroneckerDelta assert mcode(KroneckerDelta(x, y)) == "double(x == y)" assert mcode(KroneckerDelta(x, y + 1)) == "double(x == (y + 1))" assert mcode(KroneckerDelta(2**x, y)) == "double((2.^x) == y)" def test_Matrices(): assert mcode(Matrix(1, 1, [10])) == "10" A = Matrix([[1, sin(x/2), abs(x)], [0, 1, pi], [0, exp(1), ceiling(x)]]); expected = "[1 sin(x/2) abs(x); 0 1 pi; 0 exp(1) ceil(x)]" assert mcode(A) == expected # row and columns assert mcode(A[:,0]) == "[1; 0; 0]" assert mcode(A[0,:]) == "[1 sin(x/2) abs(x)]" # empty matrices assert mcode(Matrix(0, 0, [])) == '[]' assert mcode(Matrix(0, 3, [])) == 'zeros(0, 3)' # annoying to read but correct assert mcode(Matrix([[x, x - y, -y]])) == "[x x - y -y]" def test_vector_entries_hadamard(): # For a row or column, user might to use the other dimension A = Matrix([[1, sin(2/x), 3*pi/x/5]]) assert mcode(A) == "[1 sin(2./x) 3*pi./(5*x)]" assert mcode(A.T) == "[1; sin(2./x); 3*pi./(5*x)]" @XFAIL def test_Matrices_entries_not_hadamard(): # For Matrix with col >= 2, row >= 2, they need to be scalars # FIXME: is it worth worrying about this? Its not wrong, just # leave it user's responsibility to put scalar data for x. A = Matrix([[1, sin(2/x), 3*pi/x/5], [1, 2, x*y]]) expected = ("[1 sin(2/x) 3*pi/(5*x);\n" "1 2 x*y]") # <- we give x.*y assert mcode(A) == expected def test_MatrixSymbol(): n = Symbol('n', integer=True) A = MatrixSymbol('A', n, n) B = MatrixSymbol('B', n, n) assert mcode(A*B) == "A*B" assert mcode(B*A) == "B*A" assert mcode(2*A*B) == "2*A*B" assert mcode(B*2*A) == "2*B*A" assert mcode(A*(B + 3*Identity(n))) == "A*(3*eye(n) + B)" assert mcode(A**(x**2)) == "A^(x.^2)" assert mcode(A**3) == "A^3" assert mcode(A**S.Half) == "A^(1/2)" def test_MatrixSolve(): n = Symbol('n', integer=True) A = MatrixSymbol('A', n, n) x = MatrixSymbol('x', n, 1) assert mcode(MatrixSolve(A, x)) == "A \\ x" def test_special_matrices(): assert mcode(6*Identity(3)) == "6*eye(3)" def test_containers(): assert mcode([1, 2, 3, [4, 5, [6, 7]], 8, [9, 10], 11]) == \ "{1, 2, 3, {4, 5, {6, 7}}, 8, {9, 10}, 11}" assert mcode((1, 2, (3, 4))) == "{1, 2, {3, 4}}" assert mcode([1]) == "{1}" assert mcode((1,)) == "{1}" assert mcode(Tuple(*[1, 2, 3])) == "{1, 2, 3}" assert mcode((1, x*y, (3, x**2))) == "{1, x.*y, {3, x.^2}}" # scalar, matrix, empty matrix and empty list assert mcode((1, eye(3), Matrix(0, 0, []), [])) == "{1, [1 0 0; 0 1 0; 0 0 1], [], {}}" def test_octave_noninline(): source = mcode((x+y)/Catalan, assign_to='me', inline=False) expected = ( "Catalan = %s;\n" "me = (x + y)/Catalan;" ) % Catalan.evalf(17) assert source == expected def test_octave_piecewise(): expr = Piecewise((x, x < 1), (x**2, True)) assert mcode(expr) == "((x < 1).*(x) + (~(x < 1)).*(x.^2))" assert mcode(expr, assign_to="r") == ( "r = ((x < 1).*(x) + (~(x < 1)).*(x.^2));") assert mcode(expr, assign_to="r", inline=False) == ( "if (x < 1)\n" " r = x;\n" "else\n" " r = x.^2;\n" "end") expr = Piecewise((x**2, x < 1), (x**3, x < 2), (x**4, x < 3), (x**5, True)) expected = ("((x < 1).*(x.^2) + (~(x < 1)).*( ...\n" "(x < 2).*(x.^3) + (~(x < 2)).*( ...\n" "(x < 3).*(x.^4) + (~(x < 3)).*(x.^5))))") assert mcode(expr) == expected assert mcode(expr, assign_to="r") == "r = " + expected + ";" assert mcode(expr, assign_to="r", inline=False) == ( "if (x < 1)\n" " r = x.^2;\n" "elseif (x < 2)\n" " r = x.^3;\n" "elseif (x < 3)\n" " r = x.^4;\n" "else\n" " r = x.^5;\n" "end") # Check that Piecewise without a True (default) condition error expr = Piecewise((x, x < 1), (x**2, x > 1), (sin(x), x > 0)) raises(ValueError, lambda: mcode(expr)) def test_octave_piecewise_times_const(): pw = Piecewise((x, x < 1), (x**2, True)) assert mcode(2*pw) == "2*((x < 1).*(x) + (~(x < 1)).*(x.^2))" assert mcode(pw/x) == "((x < 1).*(x) + (~(x < 1)).*(x.^2))./x" assert mcode(pw/(x*y)) == "((x < 1).*(x) + (~(x < 1)).*(x.^2))./(x.*y)" assert mcode(pw/3) == "((x < 1).*(x) + (~(x < 1)).*(x.^2))/3" def test_octave_matrix_assign_to(): A = Matrix([[1, 2, 3]]) assert mcode(A, assign_to='a') == "a = [1 2 3];" A = Matrix([[1, 2], [3, 4]]) assert mcode(A, assign_to='A') == "A = [1 2; 3 4];" def test_octave_matrix_assign_to_more(): # assigning to Symbol or MatrixSymbol requires lhs/rhs match A = Matrix([[1, 2, 3]]) B = MatrixSymbol('B', 1, 3) C = MatrixSymbol('C', 2, 3) assert mcode(A, assign_to=B) == "B = [1 2 3];" raises(ValueError, lambda: mcode(A, assign_to=x)) raises(ValueError, lambda: mcode(A, assign_to=C)) def test_octave_matrix_1x1(): A = Matrix([[3]]) B = MatrixSymbol('B', 1, 1) C = MatrixSymbol('C', 1, 2) assert mcode(A, assign_to=B) == "B = 3;" # FIXME? #assert mcode(A, assign_to=x) == "x = 3;" raises(ValueError, lambda: mcode(A, assign_to=C)) def test_octave_matrix_elements(): A = Matrix([[x, 2, x*y]]) assert mcode(A[0, 0]**2 + A[0, 1] + A[0, 2]) == "x.^2 + x.*y + 2" A = MatrixSymbol('AA', 1, 3) assert mcode(A) == "AA" assert mcode(A[0, 0]**2 + sin(A[0,1]) + A[0,2]) == \ "sin(AA(1, 2)) + AA(1, 1).^2 + AA(1, 3)" assert mcode(sum(A)) == "AA(1, 1) + AA(1, 2) + AA(1, 3)" def test_octave_boolean(): assert mcode(True) == "true" assert mcode(S.true) == "true" assert mcode(False) == "false" assert mcode(S.false) == "false" def test_octave_not_supported(): assert mcode(S.ComplexInfinity) == ( "% Not supported in Octave:\n" "% ComplexInfinity\n" "zoo" ) f = Function('f') assert mcode(f(x).diff(x)) == ( "% Not supported in Octave:\n" "% Derivative\n" "Derivative(f(x), x)" ) def test_octave_not_supported_not_on_whitelist(): from sympy.functions.special.polynomials import assoc_laguerre assert mcode(assoc_laguerre(x, y, z)) == ( "% Not supported in Octave:\n" "% assoc_laguerre\n" "assoc_laguerre(x, y, z)" ) def test_octave_expint(): assert mcode(expint(1, x)) == "expint(x)" assert mcode(expint(2, x)) == ( "% Not supported in Octave:\n" "% expint\n" "expint(2, x)" ) assert mcode(expint(y, x)) == ( "% Not supported in Octave:\n" "% expint\n" "expint(y, x)" ) def test_trick_indent_with_end_else_words(): # words starting with "end" or "else" do not confuse the indenter t1 = S('endless'); t2 = S('elsewhere'); pw = Piecewise((t1, x < 0), (t2, x <= 1), (1, True)) assert mcode(pw, inline=False) == ( "if (x < 0)\n" " endless\n" "elseif (x <= 1)\n" " elsewhere\n" "else\n" " 1\n" "end") def test_hadamard(): A = MatrixSymbol('A', 3, 3) B = MatrixSymbol('B', 3, 3) v = MatrixSymbol('v', 3, 1) h = MatrixSymbol('h', 1, 3) C = HadamardProduct(A, B) n = Symbol('n') assert mcode(C) == "A.*B" assert mcode(C*v) == "(A.*B)*v" assert mcode(h*C*v) == "h*(A.*B)*v" assert mcode(C*A) == "(A.*B)*A" # mixing Hadamard and scalar strange b/c we vectorize scalars assert mcode(C*x*y) == "(x.*y)*(A.*B)" # Testing HadamardPower: assert mcode(HadamardPower(A, n)) == "A.**n" assert mcode(HadamardPower(A, 1+n)) == "A.**(n + 1)" assert mcode(HadamardPower(A*B.T, 1+n)) == "(A*B.T).**(n + 1)" def test_sparse(): M = SparseMatrix(5, 6, {}) M[2, 2] = 10; M[1, 2] = 20; M[1, 3] = 22; M[0, 3] = 30; M[3, 0] = x*y; assert mcode(M) == ( "sparse([4 2 3 1 2], [1 3 3 4 4], [x.*y 20 10 30 22], 5, 6)" ) def test_sinc(): assert mcode(sinc(x)) == 'sinc(x/pi)' assert mcode(sinc(x + 3)) == 'sinc((x + 3)/pi)' assert mcode(sinc(pi*(x + 3))) == 'sinc(x + 3)' def test_trigfun(): for f in (sin, cos, tan, cot, sec, csc, asin, acos, acot, atan, asec, acsc, sinh, cosh, tanh, coth, csch, sech, asinh, acosh, atanh, acoth, asech, acsch): assert octave_code(f(x) == f.__name__ + '(x)') def test_specfun(): n = Symbol('n') for f in [besselj, bessely, besseli, besselk]: assert octave_code(f(n, x)) == f.__name__ + '(n, x)' for f in (erfc, erfi, erf, erfinv, erfcinv, fresnelc, fresnels, gamma): assert octave_code(f(x)) == f.__name__ + '(x)' assert octave_code(hankel1(n, x)) == 'besselh(n, 1, x)' assert octave_code(hankel2(n, x)) == 'besselh(n, 2, x)' assert octave_code(airyai(x)) == 'airy(0, x)' assert octave_code(airyaiprime(x)) == 'airy(1, x)' assert octave_code(airybi(x)) == 'airy(2, x)' assert octave_code(airybiprime(x)) == 'airy(3, x)' assert octave_code(uppergamma(n, x)) == '(gammainc(x, n, \'upper\').*gamma(n))' assert octave_code(lowergamma(n, x)) == '(gammainc(x, n).*gamma(n))' assert octave_code(z**lowergamma(n, x)) == 'z.^(gammainc(x, n).*gamma(n))' assert octave_code(jn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*besselj(n + 1/2, x)/2' assert octave_code(yn(n, x)) == 'sqrt(2)*sqrt(pi)*sqrt(1./x).*bessely(n + 1/2, x)/2' assert octave_code(LambertW(x)) == 'lambertw(x)' assert octave_code(LambertW(x, n)) == 'lambertw(n, x)' # Automatic rewrite assert octave_code(Ei(x)) == 'logint(exp(x))' assert octave_code(dirichlet_eta(x)) == '(1 - 2.^(1 - x)).*zeta(x)' assert octave_code(riemann_xi(x)) == 'pi.^(-x/2).*x.*(x - 1).*gamma(x/2).*zeta(x)/2' def test_MatrixElement_printing(): # test cases for issue #11821 A = MatrixSymbol("A", 1, 3) B = MatrixSymbol("B", 1, 3) C = MatrixSymbol("C", 1, 3) assert mcode(A[0, 0]) == "A(1, 1)" assert mcode(3 * A[0, 0]) == "3*A(1, 1)" F = C[0, 0].subs(C, A - B) assert mcode(F) == "(A - B)(1, 1)" def test_zeta_printing_issue_14820(): assert octave_code(zeta(x)) == 'zeta(x)' assert octave_code(zeta(x, y)) == '% Not supported in Octave:\n% zeta\nzeta(x, y)' def test_automatic_rewrite(): assert octave_code(Li(x)) == 'logint(x) - logint(2)' assert octave_code(erf2(x, y)) == '-erf(x) + erf(y)'
1d76866caa8f5a092e730572d9455aae81e50c3e99a34a462b2208656e1ecd61
from sympy.core import (S, pi, oo, symbols, Function, Rational, Integer, Tuple, Symbol, Eq, Ne, Le, Lt, Gt, Ge) from sympy.core import EulerGamma, GoldenRatio, Catalan, Lambda, Mul, Pow from sympy.functions import Piecewise, sqrt, ceiling, exp, sin, cos, sinc, lucas from sympy.testing.pytest import raises from sympy.utilities.lambdify import implemented_function from sympy.matrices import (eye, Matrix, MatrixSymbol, Identity, HadamardProduct, SparseMatrix) from sympy.functions.special.bessel import besseli from sympy.printing.maple import maple_code x, y, z = symbols('x,y,z') def test_Integer(): assert maple_code(Integer(67)) == "67" assert maple_code(Integer(-1)) == "-1" def test_Rational(): assert maple_code(Rational(3, 7)) == "3/7" assert maple_code(Rational(18, 9)) == "2" assert maple_code(Rational(3, -7)) == "-3/7" assert maple_code(Rational(-3, -7)) == "3/7" assert maple_code(x + Rational(3, 7)) == "x + 3/7" assert maple_code(Rational(3, 7) * x) == '(3/7)*x' def test_Relational(): assert maple_code(Eq(x, y)) == "x = y" assert maple_code(Ne(x, y)) == "x <> y" assert maple_code(Le(x, y)) == "x <= y" assert maple_code(Lt(x, y)) == "x < y" assert maple_code(Gt(x, y)) == "x > y" assert maple_code(Ge(x, y)) == "x >= y" def test_Function(): assert maple_code(sin(x) ** cos(x)) == "sin(x)^cos(x)" assert maple_code(abs(x)) == "abs(x)" assert maple_code(ceiling(x)) == "ceil(x)" def test_Pow(): assert maple_code(x ** 3) == "x^3" assert maple_code(x ** (y ** 3)) == "x^(y^3)" assert maple_code((x ** 3) ** y) == "(x^3)^y" assert maple_code(x ** Rational(2, 3)) == 'x^(2/3)' g = implemented_function('g', Lambda(x, 2 * x)) assert maple_code(1 / (g(x) * 3.5) ** (x - y ** x) / (x ** 2 + y)) == \ "(3.5*2*x)^(-x + y^x)/(x^2 + y)" # For issue 14160 assert maple_code(Mul(-2, x, Pow(Mul(y, y, evaluate=False), -1, evaluate=False), evaluate=False)) == '-2*x/(y*y)' def test_basic_ops(): assert maple_code(x * y) == "x*y" assert maple_code(x + y) == "x + y" assert maple_code(x - y) == "x - y" assert maple_code(-x) == "-x" def test_1_over_x_and_sqrt(): # 1.0 and 0.5 would do something different in regular StrPrinter, # but these are exact in IEEE floating point so no different here. assert maple_code(1 / x) == '1/x' assert maple_code(x ** -1) == maple_code(x ** -1.0) == '1/x' assert maple_code(1 / sqrt(x)) == '1/sqrt(x)' assert maple_code(x ** -S.Half) == maple_code(x ** -0.5) == '1/sqrt(x)' assert maple_code(sqrt(x)) == 'sqrt(x)' assert maple_code(x ** S.Half) == maple_code(x ** 0.5) == 'sqrt(x)' assert maple_code(1 / pi) == '1/Pi' assert maple_code(pi ** -1) == maple_code(pi ** -1.0) == '1/Pi' assert maple_code(pi ** -0.5) == '1/sqrt(Pi)' def test_mix_number_mult_symbols(): assert maple_code(3 * x) == "3*x" assert maple_code(pi * x) == "Pi*x" assert maple_code(3 / x) == "3/x" assert maple_code(pi / x) == "Pi/x" assert maple_code(x / 3) == '(1/3)*x' assert maple_code(x / pi) == "x/Pi" assert maple_code(x * y) == "x*y" assert maple_code(3 * x * y) == "3*x*y" assert maple_code(3 * pi * x * y) == "3*Pi*x*y" assert maple_code(x / y) == "x/y" assert maple_code(3 * x / y) == "3*x/y" assert maple_code(x * y / z) == "x*y/z" assert maple_code(x / y * z) == "x*z/y" assert maple_code(1 / x / y) == "1/(x*y)" assert maple_code(2 * pi * x / y / z) == "2*Pi*x/(y*z)" assert maple_code(3 * pi / x) == "3*Pi/x" assert maple_code(S(3) / 5) == "3/5" assert maple_code(S(3) / 5 * x) == '(3/5)*x' assert maple_code(x / y / z) == "x/(y*z)" assert maple_code((x + y) / z) == "(x + y)/z" assert maple_code((x + y) / (z + x)) == "(x + y)/(x + z)" assert maple_code((x + y) / EulerGamma) == '(x + y)/gamma' assert maple_code(x / 3 / pi) == '(1/3)*x/Pi' assert maple_code(S(3) / 5 * x * y / pi) == '(3/5)*x*y/Pi' def test_mix_number_pow_symbols(): assert maple_code(pi ** 3) == 'Pi^3' assert maple_code(x ** 2) == 'x^2' assert maple_code(x ** (pi ** 3)) == 'x^(Pi^3)' assert maple_code(x ** y) == 'x^y' assert maple_code(x ** (y ** z)) == 'x^(y^z)' assert maple_code((x ** y) ** z) == '(x^y)^z' def test_imag(): I = S('I') assert maple_code(I) == "I" assert maple_code(5 * I) == "5*I" assert maple_code((S(3) / 2) * I) == "(3/2)*I" assert maple_code(3 + 4 * I) == "3 + 4*I" def test_constants(): assert maple_code(pi) == "Pi" assert maple_code(oo) == "infinity" assert maple_code(-oo) == "-infinity" assert maple_code(S.NegativeInfinity) == "-infinity" assert maple_code(S.NaN) == "undefined" assert maple_code(S.Exp1) == "exp(1)" assert maple_code(exp(1)) == "exp(1)" def test_constants_other(): assert maple_code(2 * GoldenRatio) == '2*(1/2 + (1/2)*sqrt(5))' assert maple_code(2 * Catalan) == '2*Catalan' assert maple_code(2 * EulerGamma) == "2*gamma" def test_boolean(): assert maple_code(x & y) == "x && y" assert maple_code(x | y) == "x || y" assert maple_code(~x) == "!x" assert maple_code(x & y & z) == "x && y && z" assert maple_code(x | y | z) == "x || y || z" assert maple_code((x & y) | z) == "z || x && y" assert maple_code((x | y) & z) == "z && (x || y)" def test_Matrices(): assert maple_code(Matrix(1, 1, [10])) == \ 'Matrix([[10]], storage = rectangular)' A = Matrix([[1, sin(x / 2), abs(x)], [0, 1, pi], [0, exp(1), ceiling(x)]]) expected = \ 'Matrix(' \ '[[1, sin((1/2)*x), abs(x)],' \ ' [0, 1, Pi],' \ ' [0, exp(1), ceil(x)]], ' \ 'storage = rectangular)' assert maple_code(A) == expected # row and columns assert maple_code(A[:, 0]) == \ 'Matrix([[1], [0], [0]], storage = rectangular)' assert maple_code(A[0, :]) == \ 'Matrix([[1, sin((1/2)*x), abs(x)]], storage = rectangular)' assert maple_code(Matrix([[x, x - y, -y]])) == \ 'Matrix([[x, x - y, -y]], storage = rectangular)' # empty matrices assert maple_code(Matrix(0, 0, [])) == \ 'Matrix([], storage = rectangular)' assert maple_code(Matrix(0, 3, [])) == \ 'Matrix([], storage = rectangular)' def test_SparseMatrices(): assert maple_code(SparseMatrix(Identity(2))) == 'Matrix([[1, 0], [0, 1]], storage = sparse)' def test_vector_entries_hadamard(): # For a row or column, user might to use the other dimension A = Matrix([[1, sin(2 / x), 3 * pi / x / 5]]) assert maple_code(A) == \ 'Matrix([[1, sin(2/x), (3/5)*Pi/x]], storage = rectangular)' assert maple_code(A.T) == \ 'Matrix([[1], [sin(2/x)], [(3/5)*Pi/x]], storage = rectangular)' def test_Matrices_entries_not_hadamard(): A = Matrix([[1, sin(2 / x), 3 * pi / x / 5], [1, 2, x * y]]) expected = \ 'Matrix([[1, sin(2/x), (3/5)*Pi/x], [1, 2, x*y]], ' \ 'storage = rectangular)' assert maple_code(A) == expected def test_MatrixSymbol(): n = Symbol('n', integer=True) A = MatrixSymbol('A', n, n) B = MatrixSymbol('B', n, n) assert maple_code(A * B) == "A.B" assert maple_code(B * A) == "B.A" assert maple_code(2 * A * B) == "2*A.B" assert maple_code(B * 2 * A) == "2*B.A" assert maple_code( A * (B + 3 * Identity(n))) == "A.(3*Matrix(n, shape = identity) + B)" assert maple_code(A ** (x ** 2)) == "MatrixPower(A, x^2)" assert maple_code(A ** 3) == "MatrixPower(A, 3)" assert maple_code(A ** (S.Half)) == "MatrixPower(A, 1/2)" def test_special_matrices(): assert maple_code(6 * Identity(3)) == "6*Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]], storage = sparse)" assert maple_code(Identity(x)) == 'Matrix(x, shape = identity)' def test_containers(): assert maple_code([1, 2, 3, [4, 5, [6, 7]], 8, [9, 10], 11]) == \ "[1, 2, 3, [4, 5, [6, 7]], 8, [9, 10], 11]" assert maple_code((1, 2, (3, 4))) == "[1, 2, [3, 4]]" assert maple_code([1]) == "[1]" assert maple_code((1,)) == "[1]" assert maple_code(Tuple(*[1, 2, 3])) == "[1, 2, 3]" assert maple_code((1, x * y, (3, x ** 2))) == "[1, x*y, [3, x^2]]" # scalar, matrix, empty matrix and empty list assert maple_code((1, eye(3), Matrix(0, 0, []), [])) == \ "[1, Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]], storage = rectangular), Matrix([], storage = rectangular), []]" def test_maple_noninline(): source = maple_code((x + y)/Catalan, assign_to='me', inline=False) expected = "me := (x + y)/Catalan" assert source == expected def test_maple_matrix_assign_to(): A = Matrix([[1, 2, 3]]) assert maple_code(A, assign_to='a') == "a := Matrix([[1, 2, 3]], storage = rectangular)" A = Matrix([[1, 2], [3, 4]]) assert maple_code(A, assign_to='A') == "A := Matrix([[1, 2], [3, 4]], storage = rectangular)" def test_maple_matrix_assign_to_more(): # assigning to Symbol or MatrixSymbol requires lhs/rhs match A = Matrix([[1, 2, 3]]) B = MatrixSymbol('B', 1, 3) C = MatrixSymbol('C', 2, 3) assert maple_code(A, assign_to=B) == "B := Matrix([[1, 2, 3]], storage = rectangular)" raises(ValueError, lambda: maple_code(A, assign_to=x)) raises(ValueError, lambda: maple_code(A, assign_to=C)) def test_maple_matrix_1x1(): A = Matrix([[3]]) assert maple_code(A, assign_to='B') == "B := Matrix([[3]], storage = rectangular)" def test_maple_matrix_elements(): A = Matrix([[x, 2, x * y]]) assert maple_code(A[0, 0] ** 2 + A[0, 1] + A[0, 2]) == "x^2 + x*y + 2" AA = MatrixSymbol('AA', 1, 3) assert maple_code(AA) == "AA" assert maple_code(AA[0, 0] ** 2 + sin(AA[0, 1]) + AA[0, 2]) == \ "sin(AA[1, 2]) + AA[1, 1]^2 + AA[1, 3]" assert maple_code(sum(AA)) == "AA[1, 1] + AA[1, 2] + AA[1, 3]" def test_maple_boolean(): assert maple_code(True) == "true" assert maple_code(S.true) == "true" assert maple_code(False) == "false" assert maple_code(S.false) == "false" def test_sparse(): M = SparseMatrix(5, 6, {}) M[2, 2] = 10 M[1, 2] = 20 M[1, 3] = 22 M[0, 3] = 30 M[3, 0] = x * y assert maple_code(M) == \ 'Matrix([[0, 0, 0, 30, 0, 0],' \ ' [0, 0, 20, 22, 0, 0],' \ ' [0, 0, 10, 0, 0, 0],' \ ' [x*y, 0, 0, 0, 0, 0],' \ ' [0, 0, 0, 0, 0, 0]], ' \ 'storage = sparse)' # Not an important point. def test_maple_not_supported(): assert maple_code(S.ComplexInfinity) == ( "# Not supported in maple:\n" "# ComplexInfinity\n" "zoo" ) # PROBLEM def test_MatrixElement_printing(): # test cases for issue #11821 A = MatrixSymbol("A", 1, 3) B = MatrixSymbol("B", 1, 3) assert (maple_code(A[0, 0]) == "A[1, 1]") assert (maple_code(3 * A[0, 0]) == "3*A[1, 1]") F = A-B assert (maple_code(F[0,0]) == "A[1, 1] - B[1, 1]") def test_hadamard(): A = MatrixSymbol('A', 3, 3) B = MatrixSymbol('B', 3, 3) v = MatrixSymbol('v', 3, 1) h = MatrixSymbol('h', 1, 3) C = HadamardProduct(A, B) assert maple_code(C) == "A*B" assert maple_code(C * v) == "(A*B).v" # HadamardProduct is higher than dot product. assert maple_code(h * C * v) == "h.(A*B).v" assert maple_code(C * A) == "(A*B).A" # mixing Hadamard and scalar strange b/c we vectorize scalars assert maple_code(C * x * y) == "x*y*(A*B)" def test_maple_piecewise(): expr = Piecewise((x, x < 1), (x ** 2, True)) assert maple_code(expr) == "piecewise(x < 1, x, x^2)" assert maple_code(expr, assign_to="r") == ( "r := piecewise(x < 1, x, x^2)") expr = Piecewise((x ** 2, x < 1), (x ** 3, x < 2), (x ** 4, x < 3), (x ** 5, True)) expected = "piecewise(x < 1, x^2, x < 2, x^3, x < 3, x^4, x^5)" assert maple_code(expr) == expected assert maple_code(expr, assign_to="r") == "r := " + expected # Check that Piecewise without a True (default) condition error expr = Piecewise((x, x < 1), (x ** 2, x > 1), (sin(x), x > 0)) raises(ValueError, lambda: maple_code(expr)) def test_maple_piecewise_times_const(): pw = Piecewise((x, x < 1), (x ** 2, True)) assert maple_code(2 * pw) == "2*piecewise(x < 1, x, x^2)" assert maple_code(pw / x) == "piecewise(x < 1, x, x^2)/x" assert maple_code(pw / (x * y)) == "piecewise(x < 1, x, x^2)/(x*y)" assert maple_code(pw / 3) == "(1/3)*piecewise(x < 1, x, x^2)" def test_maple_derivatives(): f = Function('f') assert maple_code(f(x).diff(x)) == 'diff(f(x), x)' assert maple_code(f(x).diff(x, 2)) == 'diff(f(x), x$2)' def test_automatic_rewrites(): assert maple_code(lucas(x)) == '2^(-x)*((1 - sqrt(5))^x + (1 + sqrt(5))^x)' assert maple_code(sinc(x)) == 'piecewise(x <> 0, sin(x)/x, 1)' def test_specfun(): assert maple_code('asin(x)') == 'arcsin(x)' assert maple_code(besseli(x, y)) == 'BesselI(x, y)'
f78829d714653eb16200b406baa1e79a1f712ab331479d9141590dd0c5db51d0
from sympy.functions.elementary.trigonometric import sin from sympy.printing.gtk import print_gtk from sympy.testing.pytest import XFAIL, raises # this test fails if python-lxml isn't installed. We don't want to depend on # anything with SymPy @XFAIL def test_1(): from sympy.abc import x print_gtk(x**2, start_viewer=False) print_gtk(x**2 + sin(x)/4, start_viewer=False) def test_settings(): from sympy.abc import x raises(TypeError, lambda: print_gtk(x, method="garbage"))
71fa20f5fa7f10e166fe9889c2a51c4af00827bf1b4709058de730af7a1c09a9
from sympy.core import (pi, symbols, Rational, Integer, GoldenRatio, EulerGamma, Catalan, Lambda, Dummy, Eq, Ne, Le, Lt, Gt, Ge) from sympy.functions import Piecewise, sin, cos, Abs, exp, ceiling, sqrt from sympy.testing.pytest import raises, warns_deprecated_sympy from sympy.printing.glsl import GLSLPrinter from sympy.printing.str import StrPrinter from sympy.utilities.lambdify import implemented_function from sympy.tensor import IndexedBase, Idx from sympy.matrices import Matrix, MatrixSymbol from sympy.core import Tuple from sympy.printing.glsl import glsl_code import textwrap x, y, z = symbols('x,y,z') def test_printmethod(): assert glsl_code(Abs(x)) == "abs(x)" def test_print_without_operators(): assert glsl_code(x*y,use_operators = False) == 'mul(x, y)' assert glsl_code(x**y+z,use_operators = False) == 'add(pow(x, y), z)' assert glsl_code(x*(y+z),use_operators = False) == 'mul(x, add(y, z))' assert glsl_code(x*(y+z),use_operators = False) == 'mul(x, add(y, z))' assert glsl_code(x*(y+z**y**0.5),use_operators = False) == 'mul(x, add(y, pow(z, sqrt(y))))' assert glsl_code(-x-y, use_operators=False, zero='zero()') == 'sub(zero(), add(x, y))' assert glsl_code(-x-y, use_operators=False) == 'sub(0.0, add(x, y))' def test_glsl_code_sqrt(): assert glsl_code(sqrt(x)) == "sqrt(x)" assert glsl_code(x**0.5) == "sqrt(x)" assert glsl_code(sqrt(x)) == "sqrt(x)" def test_glsl_code_Pow(): g = implemented_function('g', Lambda(x, 2*x)) assert glsl_code(x**3) == "pow(x, 3.0)" assert glsl_code(x**(y**3)) == "pow(x, pow(y, 3.0))" assert glsl_code(1/(g(x)*3.5)**(x - y**x)/(x**2 + y)) == \ "pow(3.5*2*x, -x + pow(y, x))/(pow(x, 2.0) + y)" assert glsl_code(x**-1.0) == '1.0/x' def test_glsl_code_Relational(): assert glsl_code(Eq(x, y)) == "x == y" assert glsl_code(Ne(x, y)) == "x != y" assert glsl_code(Le(x, y)) == "x <= y" assert glsl_code(Lt(x, y)) == "x < y" assert glsl_code(Gt(x, y)) == "x > y" assert glsl_code(Ge(x, y)) == "x >= y" def test_glsl_code_constants_mathh(): assert glsl_code(exp(1)) == "float E = 2.71828183;\nE" assert glsl_code(pi) == "float pi = 3.14159265;\npi" # assert glsl_code(oo) == "Number.POSITIVE_INFINITY" # assert glsl_code(-oo) == "Number.NEGATIVE_INFINITY" def test_glsl_code_constants_other(): assert glsl_code(2*GoldenRatio) == "float GoldenRatio = 1.61803399;\n2*GoldenRatio" assert glsl_code(2*Catalan) == "float Catalan = 0.915965594;\n2*Catalan" assert glsl_code(2*EulerGamma) == "float EulerGamma = 0.577215665;\n2*EulerGamma" def test_glsl_code_Rational(): assert glsl_code(Rational(3, 7)) == "3.0/7.0" assert glsl_code(Rational(18, 9)) == "2" assert glsl_code(Rational(3, -7)) == "-3.0/7.0" assert glsl_code(Rational(-3, -7)) == "3.0/7.0" def test_glsl_code_Integer(): assert glsl_code(Integer(67)) == "67" assert glsl_code(Integer(-1)) == "-1" def test_glsl_code_functions(): assert glsl_code(sin(x) ** cos(x)) == "pow(sin(x), cos(x))" def test_glsl_code_inline_function(): x = symbols('x') g = implemented_function('g', Lambda(x, 2*x)) assert glsl_code(g(x)) == "2*x" g = implemented_function('g', Lambda(x, 2*x/Catalan)) assert glsl_code(g(x)) == "float Catalan = 0.915965594;\n2*x/Catalan" A = IndexedBase('A') i = Idx('i', symbols('n', integer=True)) g = implemented_function('g', Lambda(x, x*(1 + x)*(2 + x))) assert glsl_code(g(A[i]), assign_to=A[i]) == ( "for (int i=0; i<n; i++){\n" " A[i] = (A[i] + 1)*(A[i] + 2)*A[i];\n" "}" ) def test_glsl_code_exceptions(): assert glsl_code(ceiling(x)) == "ceil(x)" assert glsl_code(Abs(x)) == "abs(x)" def test_glsl_code_boolean(): assert glsl_code(x & y) == "x && y" assert glsl_code(x | y) == "x || y" assert glsl_code(~x) == "!x" assert glsl_code(x & y & z) == "x && y && z" assert glsl_code(x | y | z) == "x || y || z" assert glsl_code((x & y) | z) == "z || x && y" assert glsl_code((x | y) & z) == "z && (x || y)" def test_glsl_code_Piecewise(): expr = Piecewise((x, x < 1), (x**2, True)) p = glsl_code(expr) s = \ """\ ((x < 1) ? ( x ) : ( pow(x, 2.0) ))\ """ assert p == s assert glsl_code(expr, assign_to="c") == ( "if (x < 1) {\n" " c = x;\n" "}\n" "else {\n" " c = pow(x, 2.0);\n" "}") # Check that Piecewise without a True (default) condition error expr = Piecewise((x, x < 1), (x**2, x > 1), (sin(x), x > 0)) raises(ValueError, lambda: glsl_code(expr)) def test_glsl_code_Piecewise_deep(): p = glsl_code(2*Piecewise((x, x < 1), (x**2, True))) s = \ """\ 2*((x < 1) ? ( x ) : ( pow(x, 2.0) ))\ """ assert p == s def test_glsl_code_settings(): raises(TypeError, lambda: glsl_code(sin(x), method="garbage")) def test_glsl_code_Indexed(): n, m, o = symbols('n m o', integer=True) i, j, k = Idx('i', n), Idx('j', m), Idx('k', o) p = GLSLPrinter() p._not_c = set() x = IndexedBase('x')[j] assert p._print_Indexed(x) == 'x[j]' A = IndexedBase('A')[i, j] assert p._print_Indexed(A) == 'A[%s]' % (m*i+j) B = IndexedBase('B')[i, j, k] assert p._print_Indexed(B) == 'B[%s]' % (i*o*m+j*o+k) assert p._not_c == set() def test_glsl_code_list_tuple_Tuple(): assert glsl_code([1,2,3,4]) == 'vec4(1, 2, 3, 4)' assert glsl_code([1,2,3],glsl_types=False) == 'float[3](1, 2, 3)' assert glsl_code([1,2,3]) == glsl_code((1,2,3)) assert glsl_code([1,2,3]) == glsl_code(Tuple(1,2,3)) m = MatrixSymbol('A',3,4) assert glsl_code([m[0],m[1]]) def test_glsl_code_loops_matrix_vector(): n, m = symbols('n m', integer=True) A = IndexedBase('A') x = IndexedBase('x') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) s = ( 'for (int i=0; i<m; i++){\n' ' y[i] = 0.0;\n' '}\n' 'for (int i=0; i<m; i++){\n' ' for (int j=0; j<n; j++){\n' ' y[i] = A[n*i + j]*x[j] + y[i];\n' ' }\n' '}' ) c = glsl_code(A[i, j]*x[j], assign_to=y[i]) assert c == s def test_dummy_loops(): i, m = symbols('i m', integer=True, cls=Dummy) x = IndexedBase('x') y = IndexedBase('y') i = Idx(i, m) expected = ( 'for (int i_%(icount)i=0; i_%(icount)i<m_%(mcount)i; i_%(icount)i++){\n' ' y[i_%(icount)i] = x[i_%(icount)i];\n' '}' ) % {'icount': i.label.dummy_index, 'mcount': m.dummy_index} code = glsl_code(x[i], assign_to=y[i]) assert code == expected def test_glsl_code_loops_add(): n, m = symbols('n m', integer=True) A = IndexedBase('A') x = IndexedBase('x') y = IndexedBase('y') z = IndexedBase('z') i = Idx('i', m) j = Idx('j', n) s = ( 'for (int i=0; i<m; i++){\n' ' y[i] = x[i] + z[i];\n' '}\n' 'for (int i=0; i<m; i++){\n' ' for (int j=0; j<n; j++){\n' ' y[i] = A[n*i + j]*x[j] + y[i];\n' ' }\n' '}' ) c = glsl_code(A[i, j]*x[j] + x[i] + z[i], assign_to=y[i]) assert c == s def test_glsl_code_loops_multiple_contractions(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) l = Idx('l', p) s = ( 'for (int i=0; i<m; i++){\n' ' y[i] = 0.0;\n' '}\n' 'for (int i=0; i<m; i++){\n' ' for (int j=0; j<n; j++){\n' ' for (int k=0; k<o; k++){\n' ' for (int l=0; l<p; l++){\n' ' y[i] = a[%s]*b[%s] + y[i];\n' % (i*n*o*p + j*o*p + k*p + l, j*o*p + k*p + l) +\ ' }\n' ' }\n' ' }\n' '}' ) c = glsl_code(b[j, k, l]*a[i, j, k, l], assign_to=y[i]) assert c == s def test_glsl_code_loops_addfactor(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') c = IndexedBase('c') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) l = Idx('l', p) s = ( 'for (int i=0; i<m; i++){\n' ' y[i] = 0.0;\n' '}\n' 'for (int i=0; i<m; i++){\n' ' for (int j=0; j<n; j++){\n' ' for (int k=0; k<o; k++){\n' ' for (int l=0; l<p; l++){\n' ' y[i] = (a[%s] + b[%s])*c[%s] + y[i];\n' % (i*n*o*p + j*o*p + k*p + l, i*n*o*p + j*o*p + k*p + l, j*o*p + k*p + l) +\ ' }\n' ' }\n' ' }\n' '}' ) c = glsl_code((a[i, j, k, l] + b[i, j, k, l])*c[j, k, l], assign_to=y[i]) assert c == s def test_glsl_code_loops_multiple_terms(): n, m, o, p = symbols('n m o p', integer=True) a = IndexedBase('a') b = IndexedBase('b') c = IndexedBase('c') y = IndexedBase('y') i = Idx('i', m) j = Idx('j', n) k = Idx('k', o) s0 = ( 'for (int i=0; i<m; i++){\n' ' y[i] = 0.0;\n' '}\n' ) s1 = ( 'for (int i=0; i<m; i++){\n' ' for (int j=0; j<n; j++){\n' ' for (int k=0; k<o; k++){\n' ' y[i] = b[j]*b[k]*c[%s] + y[i];\n' % (i*n*o + j*o + k) +\ ' }\n' ' }\n' '}\n' ) s2 = ( 'for (int i=0; i<m; i++){\n' ' for (int k=0; k<o; k++){\n' ' y[i] = a[%s]*b[k] + y[i];\n' % (i*o + k) +\ ' }\n' '}\n' ) s3 = ( 'for (int i=0; i<m; i++){\n' ' for (int j=0; j<n; j++){\n' ' y[i] = a[%s]*b[j] + y[i];\n' % (i*n + j) +\ ' }\n' '}\n' ) c = glsl_code( b[j]*a[i, j] + b[k]*a[i, k] + b[j]*b[k]*c[i, j, k], assign_to=y[i]) assert (c == s0 + s1 + s2 + s3[:-1] or c == s0 + s1 + s3 + s2[:-1] or c == s0 + s2 + s1 + s3[:-1] or c == s0 + s2 + s3 + s1[:-1] or c == s0 + s3 + s1 + s2[:-1] or c == s0 + s3 + s2 + s1[:-1]) def test_Matrix_printing(): # Test returning a Matrix mat = Matrix([x*y, Piecewise((2 + x, y>0), (y, True)), sin(z)]) A = MatrixSymbol('A', 3, 1) assert glsl_code(mat, assign_to=A) == ( '''A[0][0] = x*y; if (y > 0) { A[1][0] = x + 2; } else { A[1][0] = y; } A[2][0] = sin(z);''' ) assert glsl_code(Matrix([A[0],A[1]])) # Test using MatrixElements in expressions expr = Piecewise((2*A[2, 0], x > 0), (A[2, 0], True)) + sin(A[1, 0]) + A[0, 0] assert glsl_code(expr) == ( '''((x > 0) ? ( 2*A[2][0] ) : ( A[2][0] )) + sin(A[1][0]) + A[0][0]''' ) # Test using MatrixElements in a Matrix q = MatrixSymbol('q', 5, 1) M = MatrixSymbol('M', 3, 3) m = Matrix([[sin(q[1,0]), 0, cos(q[2,0])], [q[1,0] + q[2,0], q[3, 0], 5], [2*q[4, 0]/q[1,0], sqrt(q[0,0]) + 4, 0]]) assert glsl_code(m,M) == ( '''M[0][0] = sin(q[1]); M[0][1] = 0; M[0][2] = cos(q[2]); M[1][0] = q[1] + q[2]; M[1][1] = q[3]; M[1][2] = 5; M[2][0] = 2*q[4]/q[1]; M[2][1] = sqrt(q[0]) + 4; M[2][2] = 0;''' ) def test_Matrices_1x7(): gl = glsl_code A = Matrix([1,2,3,4,5,6,7]) assert gl(A) == 'float[7](1, 2, 3, 4, 5, 6, 7)' assert gl(A.transpose()) == 'float[7](1, 2, 3, 4, 5, 6, 7)' def test_Matrices_1x7_array_type_int(): gl = glsl_code A = Matrix([1,2,3,4,5,6,7]) assert gl(A, array_type='int') == 'int[7](1, 2, 3, 4, 5, 6, 7)' def test_Tuple_array_type_custom(): gl = glsl_code A = symbols('a b c') assert gl(A, array_type='AbcType', glsl_types=False) == 'AbcType[3](a, b, c)' def test_Matrices_1x7_spread_assign_to_symbols(): gl = glsl_code A = Matrix([1,2,3,4,5,6,7]) assign_to = symbols('x.a x.b x.c x.d x.e x.f x.g') assert gl(A, assign_to=assign_to) == textwrap.dedent('''\ x.a = 1; x.b = 2; x.c = 3; x.d = 4; x.e = 5; x.f = 6; x.g = 7;''' ) def test_spread_assign_to_nested_symbols(): gl = glsl_code expr = ((1,2,3), (1,2,3)) assign_to = (symbols('a b c'), symbols('x y z')) assert gl(expr, assign_to=assign_to) == textwrap.dedent('''\ a = 1; b = 2; c = 3; x = 1; y = 2; z = 3;''' ) def test_spread_assign_to_deeply_nested_symbols(): gl = glsl_code a, b, c, x, y, z = symbols('a b c x y z') expr = (((1,2),3), ((1,2),3)) assign_to = (((a, b), c), ((x, y), z)) assert gl(expr, assign_to=assign_to) == textwrap.dedent('''\ a = 1; b = 2; c = 3; x = 1; y = 2; z = 3;''' ) def test_matrix_of_tuples_spread_assign_to_symbols(): gl = glsl_code with warns_deprecated_sympy(): expr = Matrix([[(1,2),(3,4)],[(5,6),(7,8)]]) assign_to = (symbols('a b'), symbols('c d'), symbols('e f'), symbols('g h')) assert gl(expr, assign_to) == textwrap.dedent('''\ a = 1; b = 2; c = 3; d = 4; e = 5; f = 6; g = 7; h = 8;''' ) def test_cannot_assign_to_cause_mismatched_length(): expr = (1, 2) assign_to = symbols('x y z') raises(ValueError, lambda: glsl_code(expr, assign_to)) def test_matrix_4x4_assign(): gl = glsl_code expr = MatrixSymbol('A',4,4) * MatrixSymbol('B',4,4) + MatrixSymbol('C',4,4) assign_to = MatrixSymbol('X',4,4) assert gl(expr, assign_to=assign_to) == textwrap.dedent('''\ X[0][0] = A[0][0]*B[0][0] + A[0][1]*B[1][0] + A[0][2]*B[2][0] + A[0][3]*B[3][0] + C[0][0]; X[0][1] = A[0][0]*B[0][1] + A[0][1]*B[1][1] + A[0][2]*B[2][1] + A[0][3]*B[3][1] + C[0][1]; X[0][2] = A[0][0]*B[0][2] + A[0][1]*B[1][2] + A[0][2]*B[2][2] + A[0][3]*B[3][2] + C[0][2]; X[0][3] = A[0][0]*B[0][3] + A[0][1]*B[1][3] + A[0][2]*B[2][3] + A[0][3]*B[3][3] + C[0][3]; X[1][0] = A[1][0]*B[0][0] + A[1][1]*B[1][0] + A[1][2]*B[2][0] + A[1][3]*B[3][0] + C[1][0]; X[1][1] = A[1][0]*B[0][1] + A[1][1]*B[1][1] + A[1][2]*B[2][1] + A[1][3]*B[3][1] + C[1][1]; X[1][2] = A[1][0]*B[0][2] + A[1][1]*B[1][2] + A[1][2]*B[2][2] + A[1][3]*B[3][2] + C[1][2]; X[1][3] = A[1][0]*B[0][3] + A[1][1]*B[1][3] + A[1][2]*B[2][3] + A[1][3]*B[3][3] + C[1][3]; X[2][0] = A[2][0]*B[0][0] + A[2][1]*B[1][0] + A[2][2]*B[2][0] + A[2][3]*B[3][0] + C[2][0]; X[2][1] = A[2][0]*B[0][1] + A[2][1]*B[1][1] + A[2][2]*B[2][1] + A[2][3]*B[3][1] + C[2][1]; X[2][2] = A[2][0]*B[0][2] + A[2][1]*B[1][2] + A[2][2]*B[2][2] + A[2][3]*B[3][2] + C[2][2]; X[2][3] = A[2][0]*B[0][3] + A[2][1]*B[1][3] + A[2][2]*B[2][3] + A[2][3]*B[3][3] + C[2][3]; X[3][0] = A[3][0]*B[0][0] + A[3][1]*B[1][0] + A[3][2]*B[2][0] + A[3][3]*B[3][0] + C[3][0]; X[3][1] = A[3][0]*B[0][1] + A[3][1]*B[1][1] + A[3][2]*B[2][1] + A[3][3]*B[3][1] + C[3][1]; X[3][2] = A[3][0]*B[0][2] + A[3][1]*B[1][2] + A[3][2]*B[2][2] + A[3][3]*B[3][2] + C[3][2]; X[3][3] = A[3][0]*B[0][3] + A[3][1]*B[1][3] + A[3][2]*B[2][3] + A[3][3]*B[3][3] + C[3][3];''' ) def test_1xN_vecs(): gl = glsl_code for i in range(1,10): A = Matrix(range(i)) assert gl(A.transpose()) == gl(A) assert gl(A,mat_transpose=True) == gl(A) if i > 1: if i <= 4: assert gl(A) == 'vec%s(%s)' % (i,', '.join(str(s) for s in range(i))) else: assert gl(A) == 'float[%s](%s)' % (i,', '.join(str(s) for s in range(i))) def test_MxN_mats(): generatedAssertions='def test_misc_mats():\n' for i in range(1,6): for j in range(1,6): A = Matrix([[x + y*j for x in range(j)] for y in range(i)]) gl = glsl_code(A) glTransposed = glsl_code(A,mat_transpose=True) generatedAssertions+=' mat = '+StrPrinter()._print(A)+'\n\n' generatedAssertions+=' gl = \'\'\''+gl+'\'\'\'\n' generatedAssertions+=' glTransposed = \'\'\''+glTransposed+'\'\'\'\n\n' generatedAssertions+=' assert glsl_code(mat) == gl\n' generatedAssertions+=' assert glsl_code(mat,mat_transpose=True) == glTransposed\n' if i == 1 and j == 1: assert gl == '0' elif i <= 4 and j <= 4 and i>1 and j>1: assert gl.startswith('mat%s' % j) assert glTransposed.startswith('mat%s' % i) elif i == 1 and j <= 4: assert gl.startswith('vec') elif j == 1 and i <= 4: assert gl.startswith('vec') elif i == 1: assert gl.startswith('float[%s]('% j*i) assert glTransposed.startswith('float[%s]('% j*i) elif j == 1: assert gl.startswith('float[%s]('% i*j) assert glTransposed.startswith('float[%s]('% i*j) else: assert gl.startswith('float[%s](' % (i*j)) assert glTransposed.startswith('float[%s](' % (i*j)) glNested = glsl_code(A,mat_nested=True) glNestedTransposed = glsl_code(A,mat_transpose=True,mat_nested=True) assert glNested.startswith('float[%s][%s]' % (i,j)) assert glNestedTransposed.startswith('float[%s][%s]' % (j,i)) generatedAssertions+=' glNested = \'\'\''+glNested+'\'\'\'\n' generatedAssertions+=' glNestedTransposed = \'\'\''+glNestedTransposed+'\'\'\'\n\n' generatedAssertions+=' assert glsl_code(mat,mat_nested=True) == glNested\n' generatedAssertions+=' assert glsl_code(mat,mat_nested=True,mat_transpose=True) == glNestedTransposed\n\n' generateAssertions = False # set this to true to write bake these generated tests to a file if generateAssertions: gen = open('test_glsl_generated_matrices.py','w') gen.write(generatedAssertions) gen.close() # these assertions were generated from the previous function # glsl has complicated rules and this makes it easier to look over all the cases def test_misc_mats(): mat = Matrix([[0]]) gl = '''0''' glTransposed = '''0''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([[0, 1]]) gl = '''vec2(0, 1)''' glTransposed = '''vec2(0, 1)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([[0, 1, 2]]) gl = '''vec3(0, 1, 2)''' glTransposed = '''vec3(0, 1, 2)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([[0, 1, 2, 3]]) gl = '''vec4(0, 1, 2, 3)''' glTransposed = '''vec4(0, 1, 2, 3)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([[0, 1, 2, 3, 4]]) gl = '''float[5](0, 1, 2, 3, 4)''' glTransposed = '''float[5](0, 1, 2, 3, 4)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0], [1]]) gl = '''vec2(0, 1)''' glTransposed = '''vec2(0, 1)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1], [2, 3]]) gl = '''mat2(0, 1, 2, 3)''' glTransposed = '''mat2(0, 2, 1, 3)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1, 2], [3, 4, 5]]) gl = '''mat3x2(0, 1, 2, 3, 4, 5)''' glTransposed = '''mat2x3(0, 3, 1, 4, 2, 5)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1, 2, 3], [4, 5, 6, 7]]) gl = '''mat4x2(0, 1, 2, 3, 4, 5, 6, 7)''' glTransposed = '''mat2x4(0, 4, 1, 5, 2, 6, 3, 7)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]) gl = '''float[10]( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ) /* a 2x5 matrix */''' glTransposed = '''float[10]( 0, 5, 1, 6, 2, 7, 3, 8, 4, 9 ) /* a 5x2 matrix */''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed glNested = '''float[2][5]( float[](0, 1, 2, 3, 4), float[](5, 6, 7, 8, 9) )''' glNestedTransposed = '''float[5][2]( float[](0, 5), float[](1, 6), float[](2, 7), float[](3, 8), float[](4, 9) )''' assert glsl_code(mat,mat_nested=True) == glNested assert glsl_code(mat,mat_nested=True,mat_transpose=True) == glNestedTransposed mat = Matrix([ [0], [1], [2]]) gl = '''vec3(0, 1, 2)''' glTransposed = '''vec3(0, 1, 2)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1], [2, 3], [4, 5]]) gl = '''mat2x3(0, 1, 2, 3, 4, 5)''' glTransposed = '''mat3x2(0, 2, 4, 1, 3, 5)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1, 2], [3, 4, 5], [6, 7, 8]]) gl = '''mat3(0, 1, 2, 3, 4, 5, 6, 7, 8)''' glTransposed = '''mat3(0, 3, 6, 1, 4, 7, 2, 5, 8)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11]]) gl = '''mat4x3(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)''' glTransposed = '''mat3x4(0, 4, 8, 1, 5, 9, 2, 6, 10, 3, 7, 11)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) gl = '''float[15]( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ) /* a 3x5 matrix */''' glTransposed = '''float[15]( 0, 5, 10, 1, 6, 11, 2, 7, 12, 3, 8, 13, 4, 9, 14 ) /* a 5x3 matrix */''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed glNested = '''float[3][5]( float[]( 0, 1, 2, 3, 4), float[]( 5, 6, 7, 8, 9), float[](10, 11, 12, 13, 14) )''' glNestedTransposed = '''float[5][3]( float[](0, 5, 10), float[](1, 6, 11), float[](2, 7, 12), float[](3, 8, 13), float[](4, 9, 14) )''' assert glsl_code(mat,mat_nested=True) == glNested assert glsl_code(mat,mat_nested=True,mat_transpose=True) == glNestedTransposed mat = Matrix([ [0], [1], [2], [3]]) gl = '''vec4(0, 1, 2, 3)''' glTransposed = '''vec4(0, 1, 2, 3)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1], [2, 3], [4, 5], [6, 7]]) gl = '''mat2x4(0, 1, 2, 3, 4, 5, 6, 7)''' glTransposed = '''mat4x2(0, 2, 4, 6, 1, 3, 5, 7)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11]]) gl = '''mat3x4(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)''' glTransposed = '''mat4x3(0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [12, 13, 14, 15]]) gl = '''mat4( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)''' glTransposed = '''mat4(0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]) gl = '''float[20]( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ) /* a 4x5 matrix */''' glTransposed = '''float[20]( 0, 5, 10, 15, 1, 6, 11, 16, 2, 7, 12, 17, 3, 8, 13, 18, 4, 9, 14, 19 ) /* a 5x4 matrix */''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed glNested = '''float[4][5]( float[]( 0, 1, 2, 3, 4), float[]( 5, 6, 7, 8, 9), float[](10, 11, 12, 13, 14), float[](15, 16, 17, 18, 19) )''' glNestedTransposed = '''float[5][4]( float[](0, 5, 10, 15), float[](1, 6, 11, 16), float[](2, 7, 12, 17), float[](3, 8, 13, 18), float[](4, 9, 14, 19) )''' assert glsl_code(mat,mat_nested=True) == glNested assert glsl_code(mat,mat_nested=True,mat_transpose=True) == glNestedTransposed mat = Matrix([ [0], [1], [2], [3], [4]]) gl = '''float[5](0, 1, 2, 3, 4)''' glTransposed = '''float[5](0, 1, 2, 3, 4)''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed mat = Matrix([ [0, 1], [2, 3], [4, 5], [6, 7], [8, 9]]) gl = '''float[10]( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ) /* a 5x2 matrix */''' glTransposed = '''float[10]( 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 ) /* a 2x5 matrix */''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed glNested = '''float[5][2]( float[](0, 1), float[](2, 3), float[](4, 5), float[](6, 7), float[](8, 9) )''' glNestedTransposed = '''float[2][5]( float[](0, 2, 4, 6, 8), float[](1, 3, 5, 7, 9) )''' assert glsl_code(mat,mat_nested=True) == glNested assert glsl_code(mat,mat_nested=True,mat_transpose=True) == glNestedTransposed mat = Matrix([ [ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8], [ 9, 10, 11], [12, 13, 14]]) gl = '''float[15]( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 ) /* a 5x3 matrix */''' glTransposed = '''float[15]( 0, 3, 6, 9, 12, 1, 4, 7, 10, 13, 2, 5, 8, 11, 14 ) /* a 3x5 matrix */''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed glNested = '''float[5][3]( float[]( 0, 1, 2), float[]( 3, 4, 5), float[]( 6, 7, 8), float[]( 9, 10, 11), float[](12, 13, 14) )''' glNestedTransposed = '''float[3][5]( float[](0, 3, 6, 9, 12), float[](1, 4, 7, 10, 13), float[](2, 5, 8, 11, 14) )''' assert glsl_code(mat,mat_nested=True) == glNested assert glsl_code(mat,mat_nested=True,mat_transpose=True) == glNestedTransposed mat = Matrix([ [ 0, 1, 2, 3], [ 4, 5, 6, 7], [ 8, 9, 10, 11], [12, 13, 14, 15], [16, 17, 18, 19]]) gl = '''float[20]( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ) /* a 5x4 matrix */''' glTransposed = '''float[20]( 0, 4, 8, 12, 16, 1, 5, 9, 13, 17, 2, 6, 10, 14, 18, 3, 7, 11, 15, 19 ) /* a 4x5 matrix */''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed glNested = '''float[5][4]( float[]( 0, 1, 2, 3), float[]( 4, 5, 6, 7), float[]( 8, 9, 10, 11), float[](12, 13, 14, 15), float[](16, 17, 18, 19) )''' glNestedTransposed = '''float[4][5]( float[](0, 4, 8, 12, 16), float[](1, 5, 9, 13, 17), float[](2, 6, 10, 14, 18), float[](3, 7, 11, 15, 19) )''' assert glsl_code(mat,mat_nested=True) == glNested assert glsl_code(mat,mat_nested=True,mat_transpose=True) == glNestedTransposed mat = Matrix([ [ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19], [20, 21, 22, 23, 24]]) gl = '''float[25]( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ) /* a 5x5 matrix */''' glTransposed = '''float[25]( 0, 5, 10, 15, 20, 1, 6, 11, 16, 21, 2, 7, 12, 17, 22, 3, 8, 13, 18, 23, 4, 9, 14, 19, 24 ) /* a 5x5 matrix */''' assert glsl_code(mat) == gl assert glsl_code(mat,mat_transpose=True) == glTransposed glNested = '''float[5][5]( float[]( 0, 1, 2, 3, 4), float[]( 5, 6, 7, 8, 9), float[](10, 11, 12, 13, 14), float[](15, 16, 17, 18, 19), float[](20, 21, 22, 23, 24) )''' glNestedTransposed = '''float[5][5]( float[](0, 5, 10, 15, 20), float[](1, 6, 11, 16, 21), float[](2, 7, 12, 17, 22), float[](3, 8, 13, 18, 23), float[](4, 9, 14, 19, 24) )''' assert glsl_code(mat,mat_nested=True) == glNested assert glsl_code(mat,mat_nested=True,mat_transpose=True) == glNestedTransposed
79edeb373c7c72cd5564a917592f70257f2654d0d7c02fdc189a952bce559257
import random from sympy.core.function import Derivative from sympy.core.symbol import symbols from sympy.tensor.array.expressions.array_expressions import ArrayTensorProduct, ArrayAdd, \ PermuteDims, ArrayDiagonal from sympy.core.relational import Eq, Ne, Ge, Gt, Le, Lt from sympy.external import import_module from sympy.functions import \ Abs, ceiling, exp, floor, sign, sin, asin, sqrt, cos, \ acos, tan, atan, atan2, cosh, acosh, sinh, asinh, tanh, atanh, \ re, im, arg, erf, loggamma, log from sympy.matrices import Matrix, MatrixBase, eye, randMatrix from sympy.matrices.expressions import \ Determinant, HadamardProduct, Inverse, MatrixSymbol, Trace from sympy.printing.tensorflow import tensorflow_code from sympy.tensor.array.expressions.conv_matrix_to_array import convert_matrix_to_array from sympy.utilities.lambdify import lambdify from sympy.testing.pytest import skip from sympy.testing.pytest import XFAIL tf = tensorflow = import_module("tensorflow") if tensorflow: # Hide Tensorflow warnings import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' M = MatrixSymbol("M", 3, 3) N = MatrixSymbol("N", 3, 3) P = MatrixSymbol("P", 3, 3) Q = MatrixSymbol("Q", 3, 3) x, y, z, t = symbols("x y z t") if tf is not None: llo = [[j for j in range(i, i+3)] for i in range(0, 9, 3)] m3x3 = tf.constant(llo) m3x3sympy = Matrix(llo) def _compare_tensorflow_matrix(variables, expr, use_float=False): f = lambdify(variables, expr, 'tensorflow') if not use_float: random_matrices = [randMatrix(v.rows, v.cols) for v in variables] else: random_matrices = [randMatrix(v.rows, v.cols)/100. for v in variables] graph = tf.Graph() r = None with graph.as_default(): random_variables = [eval(tensorflow_code(i)) for i in random_matrices] session = tf.compat.v1.Session(graph=graph) r = session.run(f(*random_variables)) e = expr.subs({k: v for k, v in zip(variables, random_matrices)}) e = e.doit() if e.is_Matrix: if not isinstance(e, MatrixBase): e = e.as_explicit() e = e.tolist() if not use_float: assert (r == e).all() else: r = [i for row in r for i in row] e = [i for row in e for i in row] assert all( abs(a-b) < 10**-(4-int(log(abs(a), 10))) for a, b in zip(r, e)) # Creating a custom inverse test. # See https://github.com/sympy/sympy/issues/18469 def _compare_tensorflow_matrix_inverse(variables, expr, use_float=False): f = lambdify(variables, expr, 'tensorflow') if not use_float: random_matrices = [eye(v.rows, v.cols)*4 for v in variables] else: random_matrices = [eye(v.rows, v.cols)*3.14 for v in variables] graph = tf.Graph() r = None with graph.as_default(): random_variables = [eval(tensorflow_code(i)) for i in random_matrices] session = tf.compat.v1.Session(graph=graph) r = session.run(f(*random_variables)) e = expr.subs({k: v for k, v in zip(variables, random_matrices)}) e = e.doit() if e.is_Matrix: if not isinstance(e, MatrixBase): e = e.as_explicit() e = e.tolist() if not use_float: assert (r == e).all() else: r = [i for row in r for i in row] e = [i for row in e for i in row] assert all( abs(a-b) < 10**-(4-int(log(abs(a), 10))) for a, b in zip(r, e)) def _compare_tensorflow_matrix_scalar(variables, expr): f = lambdify(variables, expr, 'tensorflow') random_matrices = [ randMatrix(v.rows, v.cols).evalf() / 100 for v in variables] graph = tf.Graph() r = None with graph.as_default(): random_variables = [eval(tensorflow_code(i)) for i in random_matrices] session = tf.compat.v1.Session(graph=graph) r = session.run(f(*random_variables)) e = expr.subs({k: v for k, v in zip(variables, random_matrices)}) e = e.doit() assert abs(r-e) < 10**-6 def _compare_tensorflow_scalar( variables, expr, rng=lambda: random.randint(0, 10)): f = lambdify(variables, expr, 'tensorflow') rvs = [rng() for v in variables] graph = tf.Graph() r = None with graph.as_default(): tf_rvs = [eval(tensorflow_code(i)) for i in rvs] session = tf.compat.v1.Session(graph=graph) r = session.run(f(*tf_rvs)) e = expr.subs({k: v for k, v in zip(variables, rvs)}).evalf().doit() assert abs(r-e) < 10**-6 def _compare_tensorflow_relational( variables, expr, rng=lambda: random.randint(0, 10)): f = lambdify(variables, expr, 'tensorflow') rvs = [rng() for v in variables] graph = tf.Graph() r = None with graph.as_default(): tf_rvs = [eval(tensorflow_code(i)) for i in rvs] session = tf.compat.v1.Session(graph=graph) r = session.run(f(*tf_rvs)) e = expr.subs({k: v for k, v in zip(variables, rvs)}).doit() assert r == e def test_tensorflow_printing(): assert tensorflow_code(eye(3)) == \ "tensorflow.constant([[1, 0, 0], [0, 1, 0], [0, 0, 1]])" expr = Matrix([[x, sin(y)], [exp(z), -t]]) assert tensorflow_code(expr) == \ "tensorflow.Variable(" \ "[[x, tensorflow.math.sin(y)]," \ " [tensorflow.math.exp(z), -t]])" # This (random) test is XFAIL because it fails occasionally # See https://github.com/sympy/sympy/issues/18469 @XFAIL def test_tensorflow_math(): if not tf: skip("TensorFlow not installed") expr = Abs(x) assert tensorflow_code(expr) == "tensorflow.math.abs(x)" _compare_tensorflow_scalar((x,), expr) expr = sign(x) assert tensorflow_code(expr) == "tensorflow.math.sign(x)" _compare_tensorflow_scalar((x,), expr) expr = ceiling(x) assert tensorflow_code(expr) == "tensorflow.math.ceil(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = floor(x) assert tensorflow_code(expr) == "tensorflow.math.floor(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = exp(x) assert tensorflow_code(expr) == "tensorflow.math.exp(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = sqrt(x) assert tensorflow_code(expr) == "tensorflow.math.sqrt(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = x ** 4 assert tensorflow_code(expr) == "tensorflow.math.pow(x, 4)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = cos(x) assert tensorflow_code(expr) == "tensorflow.math.cos(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = acos(x) assert tensorflow_code(expr) == "tensorflow.math.acos(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.uniform(0, 0.95)) expr = sin(x) assert tensorflow_code(expr) == "tensorflow.math.sin(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = asin(x) assert tensorflow_code(expr) == "tensorflow.math.asin(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = tan(x) assert tensorflow_code(expr) == "tensorflow.math.tan(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = atan(x) assert tensorflow_code(expr) == "tensorflow.math.atan(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = atan2(y, x) assert tensorflow_code(expr) == "tensorflow.math.atan2(y, x)" _compare_tensorflow_scalar((y, x), expr, rng=lambda: random.random()) expr = cosh(x) assert tensorflow_code(expr) == "tensorflow.math.cosh(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.random()) expr = acosh(x) assert tensorflow_code(expr) == "tensorflow.math.acosh(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.uniform(1, 2)) expr = sinh(x) assert tensorflow_code(expr) == "tensorflow.math.sinh(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.uniform(1, 2)) expr = asinh(x) assert tensorflow_code(expr) == "tensorflow.math.asinh(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.uniform(1, 2)) expr = tanh(x) assert tensorflow_code(expr) == "tensorflow.math.tanh(x)" _compare_tensorflow_scalar((x,), expr, rng=lambda: random.uniform(1, 2)) expr = atanh(x) assert tensorflow_code(expr) == "tensorflow.math.atanh(x)" _compare_tensorflow_scalar( (x,), expr, rng=lambda: random.uniform(-.5, .5)) expr = erf(x) assert tensorflow_code(expr) == "tensorflow.math.erf(x)" _compare_tensorflow_scalar( (x,), expr, rng=lambda: random.random()) expr = loggamma(x) assert tensorflow_code(expr) == "tensorflow.math.lgamma(x)" _compare_tensorflow_scalar( (x,), expr, rng=lambda: random.random()) def test_tensorflow_complexes(): assert tensorflow_code(re(x)) == "tensorflow.math.real(x)" assert tensorflow_code(im(x)) == "tensorflow.math.imag(x)" assert tensorflow_code(arg(x)) == "tensorflow.math.angle(x)" def test_tensorflow_relational(): if not tf: skip("TensorFlow not installed") expr = Eq(x, y) assert tensorflow_code(expr) == "tensorflow.math.equal(x, y)" _compare_tensorflow_relational((x, y), expr) expr = Ne(x, y) assert tensorflow_code(expr) == "tensorflow.math.not_equal(x, y)" _compare_tensorflow_relational((x, y), expr) expr = Ge(x, y) assert tensorflow_code(expr) == "tensorflow.math.greater_equal(x, y)" _compare_tensorflow_relational((x, y), expr) expr = Gt(x, y) assert tensorflow_code(expr) == "tensorflow.math.greater(x, y)" _compare_tensorflow_relational((x, y), expr) expr = Le(x, y) assert tensorflow_code(expr) == "tensorflow.math.less_equal(x, y)" _compare_tensorflow_relational((x, y), expr) expr = Lt(x, y) assert tensorflow_code(expr) == "tensorflow.math.less(x, y)" _compare_tensorflow_relational((x, y), expr) # This (random) test is XFAIL because it fails occasionally # See https://github.com/sympy/sympy/issues/18469 @XFAIL def test_tensorflow_matrices(): if not tf: skip("TensorFlow not installed") expr = M assert tensorflow_code(expr) == "M" _compare_tensorflow_matrix((M,), expr) expr = M + N assert tensorflow_code(expr) == "tensorflow.math.add(M, N)" _compare_tensorflow_matrix((M, N), expr) expr = M * N assert tensorflow_code(expr) == "tensorflow.linalg.matmul(M, N)" _compare_tensorflow_matrix((M, N), expr) expr = HadamardProduct(M, N) assert tensorflow_code(expr) == "tensorflow.math.multiply(M, N)" _compare_tensorflow_matrix((M, N), expr) expr = M*N*P*Q assert tensorflow_code(expr) == \ "tensorflow.linalg.matmul(" \ "tensorflow.linalg.matmul(" \ "tensorflow.linalg.matmul(M, N), P), Q)" _compare_tensorflow_matrix((M, N, P, Q), expr) expr = M**3 assert tensorflow_code(expr) == \ "tensorflow.linalg.matmul(tensorflow.linalg.matmul(M, M), M)" _compare_tensorflow_matrix((M,), expr) expr = Trace(M) assert tensorflow_code(expr) == "tensorflow.linalg.trace(M)" _compare_tensorflow_matrix((M,), expr) expr = Determinant(M) assert tensorflow_code(expr) == "tensorflow.linalg.det(M)" _compare_tensorflow_matrix_scalar((M,), expr) expr = Inverse(M) assert tensorflow_code(expr) == "tensorflow.linalg.inv(M)" _compare_tensorflow_matrix_inverse((M,), expr, use_float=True) expr = M.T assert tensorflow_code(expr, tensorflow_version='1.14') == \ "tensorflow.linalg.matrix_transpose(M)" assert tensorflow_code(expr, tensorflow_version='1.13') == \ "tensorflow.matrix_transpose(M)" _compare_tensorflow_matrix((M,), expr) def test_codegen_einsum(): if not tf: skip("TensorFlow not installed") graph = tf.Graph() with graph.as_default(): session = tf.compat.v1.Session(graph=graph) M = MatrixSymbol("M", 2, 2) N = MatrixSymbol("N", 2, 2) cg = convert_matrix_to_array(M * N) f = lambdify((M, N), cg, 'tensorflow') ma = tf.constant([[1, 2], [3, 4]]) mb = tf.constant([[1,-2], [-1, 3]]) y = session.run(f(ma, mb)) c = session.run(tf.matmul(ma, mb)) assert (y == c).all() def test_codegen_extra(): if not tf: skip("TensorFlow not installed") graph = tf.Graph() with graph.as_default(): session = tf.compat.v1.Session() M = MatrixSymbol("M", 2, 2) N = MatrixSymbol("N", 2, 2) P = MatrixSymbol("P", 2, 2) Q = MatrixSymbol("Q", 2, 2) ma = tf.constant([[1, 2], [3, 4]]) mb = tf.constant([[1,-2], [-1, 3]]) mc = tf.constant([[2, 0], [1, 2]]) md = tf.constant([[1,-1], [4, 7]]) cg = ArrayTensorProduct(M, N) assert tensorflow_code(cg) == \ 'tensorflow.linalg.einsum("ab,cd", M, N)' f = lambdify((M, N), cg, 'tensorflow') y = session.run(f(ma, mb)) c = session.run(tf.einsum("ij,kl", ma, mb)) assert (y == c).all() cg = ArrayAdd(M, N) assert tensorflow_code(cg) == 'tensorflow.math.add(M, N)' f = lambdify((M, N), cg, 'tensorflow') y = session.run(f(ma, mb)) c = session.run(ma + mb) assert (y == c).all() cg = ArrayAdd(M, N, P) assert tensorflow_code(cg) == \ 'tensorflow.math.add(tensorflow.math.add(M, N), P)' f = lambdify((M, N, P), cg, 'tensorflow') y = session.run(f(ma, mb, mc)) c = session.run(ma + mb + mc) assert (y == c).all() cg = ArrayAdd(M, N, P, Q) assert tensorflow_code(cg) == \ 'tensorflow.math.add(' \ 'tensorflow.math.add(tensorflow.math.add(M, N), P), Q)' f = lambdify((M, N, P, Q), cg, 'tensorflow') y = session.run(f(ma, mb, mc, md)) c = session.run(ma + mb + mc + md) assert (y == c).all() cg = PermuteDims(M, [1, 0]) assert tensorflow_code(cg) == 'tensorflow.transpose(M, [1, 0])' f = lambdify((M,), cg, 'tensorflow') y = session.run(f(ma)) c = session.run(tf.transpose(ma)) assert (y == c).all() cg = PermuteDims(ArrayTensorProduct(M, N), [1, 2, 3, 0]) assert tensorflow_code(cg) == \ 'tensorflow.transpose(' \ 'tensorflow.linalg.einsum("ab,cd", M, N), [1, 2, 3, 0])' f = lambdify((M, N), cg, 'tensorflow') y = session.run(f(ma, mb)) c = session.run(tf.transpose(tf.einsum("ab,cd", ma, mb), [1, 2, 3, 0])) assert (y == c).all() cg = ArrayDiagonal(ArrayTensorProduct(M, N), (1, 2)) assert tensorflow_code(cg) == \ 'tensorflow.linalg.einsum("ab,bc->acb", M, N)' f = lambdify((M, N), cg, 'tensorflow') y = session.run(f(ma, mb)) c = session.run(tf.einsum("ab,bc->acb", ma, mb)) assert (y == c).all() def test_MatrixElement_printing(): A = MatrixSymbol("A", 1, 3) B = MatrixSymbol("B", 1, 3) C = MatrixSymbol("C", 1, 3) assert tensorflow_code(A[0, 0]) == "A[0, 0]" assert tensorflow_code(3 * A[0, 0]) == "3*A[0, 0]" F = C[0, 0].subs(C, A - B) assert tensorflow_code(F) == "(tensorflow.math.add((-1)*B, A))[0, 0]" def test_tensorflow_Derivative(): expr = Derivative(sin(x), x) assert tensorflow_code(expr) == \ "tensorflow.gradients(tensorflow.math.sin(x), x)[0]"
d2c40abc9494820bb4b61039a1a2a764fd1fd795dfd1ba54598ac78b51f6a886
from sympy.concrete.summations import Sum from sympy.core.mod import Mod from sympy.core.relational import (Equality, Unequality) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.piecewise import Piecewise from sympy.matrices.expressions.blockmatrix import BlockMatrix from sympy.matrices.expressions.matexpr import MatrixSymbol from sympy.matrices.expressions.special import Identity from sympy.utilities.lambdify import lambdify from sympy.matrices.dense import eye from sympy.abc import x, i, j, a, b, c, d from sympy.core import Pow from sympy.codegen.matrix_nodes import MatrixSolve from sympy.codegen.numpy_nodes import logaddexp, logaddexp2 from sympy.codegen.cfunctions import log1p, expm1, hypot, log10, exp2, log2, Sqrt from sympy.tensor.array.expressions.array_expressions import ArrayTensorProduct, ArrayAdd, \ PermuteDims, ArrayDiagonal from sympy.printing.numpy import NumPyPrinter, SciPyPrinter, _numpy_known_constants, \ _numpy_known_functions, _scipy_known_constants, _scipy_known_functions from sympy.tensor.array.expressions.conv_matrix_to_array import convert_matrix_to_array from sympy.testing.pytest import warns_deprecated_sympy from sympy.testing.pytest import skip, raises from sympy.external import import_module np = import_module('numpy') def test_numpy_piecewise_regression(): """ NumPyPrinter needs to print Piecewise()'s choicelist as a list to avoid breaking compatibility with numpy 1.8. This is not necessary in numpy 1.9+. See gh-9747 and gh-9749 for details. """ printer = NumPyPrinter() p = Piecewise((1, x < 0), (0, True)) assert printer.doprint(p) == \ 'numpy.select([numpy.less(x, 0),True], [1,0], default=numpy.nan)' assert printer.module_imports == {'numpy': {'select', 'less', 'nan'}} def test_numpy_logaddexp(): lae = logaddexp(a, b) assert NumPyPrinter().doprint(lae) == 'numpy.logaddexp(a, b)' lae2 = logaddexp2(a, b) assert NumPyPrinter().doprint(lae2) == 'numpy.logaddexp2(a, b)' def test_sum(): if not np: skip("NumPy not installed") s = Sum(x ** i, (i, a, b)) f = lambdify((a, b, x), s, 'numpy') a_, b_ = 0, 10 x_ = np.linspace(-1, +1, 10) assert np.allclose(f(a_, b_, x_), sum(x_ ** i_ for i_ in range(a_, b_ + 1))) s = Sum(i * x, (i, a, b)) f = lambdify((a, b, x), s, 'numpy') a_, b_ = 0, 10 x_ = np.linspace(-1, +1, 10) assert np.allclose(f(a_, b_, x_), sum(i_ * x_ for i_ in range(a_, b_ + 1))) def test_multiple_sums(): if not np: skip("NumPy not installed") s = Sum((x + j) * i, (i, a, b), (j, c, d)) f = lambdify((a, b, c, d, x), s, 'numpy') a_, b_ = 0, 10 c_, d_ = 11, 21 x_ = np.linspace(-1, +1, 10) assert np.allclose(f(a_, b_, c_, d_, x_), sum((x_ + j_) * i_ for i_ in range(a_, b_ + 1) for j_ in range(c_, d_ + 1))) def test_codegen_einsum(): if not np: skip("NumPy not installed") M = MatrixSymbol("M", 2, 2) N = MatrixSymbol("N", 2, 2) cg = convert_matrix_to_array(M * N) f = lambdify((M, N), cg, 'numpy') ma = np.matrix([[1, 2], [3, 4]]) mb = np.matrix([[1,-2], [-1, 3]]) assert (f(ma, mb) == ma*mb).all() def test_codegen_extra(): if not np: skip("NumPy not installed") M = MatrixSymbol("M", 2, 2) N = MatrixSymbol("N", 2, 2) P = MatrixSymbol("P", 2, 2) Q = MatrixSymbol("Q", 2, 2) ma = np.matrix([[1, 2], [3, 4]]) mb = np.matrix([[1,-2], [-1, 3]]) mc = np.matrix([[2, 0], [1, 2]]) md = np.matrix([[1,-1], [4, 7]]) cg = ArrayTensorProduct(M, N) f = lambdify((M, N), cg, 'numpy') assert (f(ma, mb) == np.einsum(ma, [0, 1], mb, [2, 3])).all() cg = ArrayAdd(M, N) f = lambdify((M, N), cg, 'numpy') assert (f(ma, mb) == ma+mb).all() cg = ArrayAdd(M, N, P) f = lambdify((M, N, P), cg, 'numpy') assert (f(ma, mb, mc) == ma+mb+mc).all() cg = ArrayAdd(M, N, P, Q) f = lambdify((M, N, P, Q), cg, 'numpy') assert (f(ma, mb, mc, md) == ma+mb+mc+md).all() cg = PermuteDims(M, [1, 0]) f = lambdify((M,), cg, 'numpy') assert (f(ma) == ma.T).all() cg = PermuteDims(ArrayTensorProduct(M, N), [1, 2, 3, 0]) f = lambdify((M, N), cg, 'numpy') assert (f(ma, mb) == np.transpose(np.einsum(ma, [0, 1], mb, [2, 3]), (1, 2, 3, 0))).all() cg = ArrayDiagonal(ArrayTensorProduct(M, N), (1, 2)) f = lambdify((M, N), cg, 'numpy') assert (f(ma, mb) == np.diagonal(np.einsum(ma, [0, 1], mb, [2, 3]), axis1=1, axis2=2)).all() def test_relational(): if not np: skip("NumPy not installed") e = Equality(x, 1) f = lambdify((x,), e) x_ = np.array([0, 1, 2]) assert np.array_equal(f(x_), [False, True, False]) e = Unequality(x, 1) f = lambdify((x,), e) x_ = np.array([0, 1, 2]) assert np.array_equal(f(x_), [True, False, True]) e = (x < 1) f = lambdify((x,), e) x_ = np.array([0, 1, 2]) assert np.array_equal(f(x_), [True, False, False]) e = (x <= 1) f = lambdify((x,), e) x_ = np.array([0, 1, 2]) assert np.array_equal(f(x_), [True, True, False]) e = (x > 1) f = lambdify((x,), e) x_ = np.array([0, 1, 2]) assert np.array_equal(f(x_), [False, False, True]) e = (x >= 1) f = lambdify((x,), e) x_ = np.array([0, 1, 2]) assert np.array_equal(f(x_), [False, True, True]) def test_mod(): if not np: skip("NumPy not installed") e = Mod(a, b) f = lambdify((a, b), e) a_ = np.array([0, 1, 2, 3]) b_ = 2 assert np.array_equal(f(a_, b_), [0, 1, 0, 1]) a_ = np.array([0, 1, 2, 3]) b_ = np.array([2, 2, 2, 2]) assert np.array_equal(f(a_, b_), [0, 1, 0, 1]) a_ = np.array([2, 3, 4, 5]) b_ = np.array([2, 3, 4, 5]) assert np.array_equal(f(a_, b_), [0, 0, 0, 0]) def test_pow(): if not np: skip('NumPy not installed') expr = Pow(2, -1, evaluate=False) f = lambdify([], expr, 'numpy') assert f() == 0.5 def test_expm1(): if not np: skip("NumPy not installed") f = lambdify((a,), expm1(a), 'numpy') assert abs(f(1e-10) - 1e-10 - 5e-21) < 1e-22 def test_log1p(): if not np: skip("NumPy not installed") f = lambdify((a,), log1p(a), 'numpy') assert abs(f(1e-99) - 1e-99) < 1e-100 def test_hypot(): if not np: skip("NumPy not installed") assert abs(lambdify((a, b), hypot(a, b), 'numpy')(3, 4) - 5) < 1e-16 def test_log10(): if not np: skip("NumPy not installed") assert abs(lambdify((a,), log10(a), 'numpy')(100) - 2) < 1e-16 def test_exp2(): if not np: skip("NumPy not installed") assert abs(lambdify((a,), exp2(a), 'numpy')(5) - 32) < 1e-16 def test_log2(): if not np: skip("NumPy not installed") assert abs(lambdify((a,), log2(a), 'numpy')(256) - 8) < 1e-16 def test_Sqrt(): if not np: skip("NumPy not installed") assert abs(lambdify((a,), Sqrt(a), 'numpy')(4) - 2) < 1e-16 def test_sqrt(): if not np: skip("NumPy not installed") assert abs(lambdify((a,), sqrt(a), 'numpy')(4) - 2) < 1e-16 def test_matsolve(): if not np: skip("NumPy not installed") M = MatrixSymbol("M", 3, 3) x = MatrixSymbol("x", 3, 1) expr = M**(-1) * x + x matsolve_expr = MatrixSolve(M, x) + x f = lambdify((M, x), expr) f_matsolve = lambdify((M, x), matsolve_expr) m0 = np.array([[1, 2, 3], [3, 2, 5], [5, 6, 7]]) assert np.linalg.matrix_rank(m0) == 3 x0 = np.array([3, 4, 5]) assert np.allclose(f_matsolve(m0, x0), f(m0, x0)) def test_issue_15601(): if not np: skip("Numpy not installed") M = MatrixSymbol("M", 3, 3) N = MatrixSymbol("N", 3, 3) expr = M*N f = lambdify((M, N), expr, "numpy") with warns_deprecated_sympy(): ans = f(eye(3), eye(3)) assert np.array_equal(ans, np.array([1, 0, 0, 0, 1, 0, 0, 0, 1])) def test_16857(): if not np: skip("NumPy not installed") a_1 = MatrixSymbol('a_1', 10, 3) a_2 = MatrixSymbol('a_2', 10, 3) a_3 = MatrixSymbol('a_3', 10, 3) a_4 = MatrixSymbol('a_4', 10, 3) A = BlockMatrix([[a_1, a_2], [a_3, a_4]]) assert A.shape == (20, 6) printer = NumPyPrinter() assert printer.doprint(A) == 'numpy.block([[a_1, a_2], [a_3, a_4]])' def test_issue_17006(): if not np: skip("NumPy not installed") M = MatrixSymbol("M", 2, 2) f = lambdify(M, M + Identity(2)) ma = np.array([[1, 2], [3, 4]]) mr = np.array([[2, 2], [3, 5]]) assert (f(ma) == mr).all() from sympy.core.symbol import symbols n = symbols('n', integer=True) N = MatrixSymbol("M", n, n) raises(NotImplementedError, lambda: lambdify(N, N + Identity(n))) def test_numpy_known_funcs_consts(): assert _numpy_known_constants['NaN'] == 'numpy.nan' assert _numpy_known_constants['EulerGamma'] == 'numpy.euler_gamma' assert _numpy_known_functions['acos'] == 'numpy.arccos' assert _numpy_known_functions['log'] == 'numpy.log' def test_scipy_known_funcs_consts(): assert _scipy_known_constants['GoldenRatio'] == 'scipy.constants.golden_ratio' assert _scipy_known_constants['Pi'] == 'scipy.constants.pi' assert _scipy_known_functions['erf'] == 'scipy.special.erf' assert _scipy_known_functions['factorial'] == 'scipy.special.factorial' def test_numpy_print_methods(): prntr = NumPyPrinter() assert hasattr(prntr, '_print_acos') assert hasattr(prntr, '_print_log') def test_scipy_print_methods(): prntr = SciPyPrinter() assert hasattr(prntr, '_print_acos') assert hasattr(prntr, '_print_log') assert hasattr(prntr, '_print_erf') assert hasattr(prntr, '_print_factorial') assert hasattr(prntr, '_print_chebyshevt')
fc45a7acc7b1bafa202b79e617510d028e04faa1180f0bfd34d10ce2be9ebeb4
from sympy.printing.dot import (purestr, styleof, attrprint, dotnode, dotedges, dotprint) from sympy.core.basic import Basic from sympy.core.expr import Expr from sympy.core.numbers import (Float, Integer) from sympy.core.symbol import (Symbol, symbols) from sympy.printing.repr import srepr from sympy.abc import x def test_purestr(): assert purestr(Symbol('x')) == "Symbol('x')" assert purestr(Basic(1, 2)) == "Basic(1, 2)" assert purestr(Float(2)) == "Float('2.0', precision=53)" assert purestr(Symbol('x'), with_args=True) == ("Symbol('x')", ()) assert purestr(Basic(1, 2), with_args=True) == ('Basic(1, 2)', ('1', '2')) assert purestr(Float(2), with_args=True) == \ ("Float('2.0', precision=53)", ()) def test_styleof(): styles = [(Basic, {'color': 'blue', 'shape': 'ellipse'}), (Expr, {'color': 'black'})] assert styleof(Basic(1), styles) == {'color': 'blue', 'shape': 'ellipse'} assert styleof(x + 1, styles) == {'color': 'black', 'shape': 'ellipse'} def test_attrprint(): assert attrprint({'color': 'blue', 'shape': 'ellipse'}) == \ '"color"="blue", "shape"="ellipse"' def test_dotnode(): assert dotnode(x, repeat=False) == \ '"Symbol(\'x\')" ["color"="black", "label"="x", "shape"="ellipse"];' assert dotnode(x+2, repeat=False) == \ '"Add(Integer(2), Symbol(\'x\'))" ' \ '["color"="black", "label"="Add", "shape"="ellipse"];', \ dotnode(x+2,repeat=0) assert dotnode(x + x**2, repeat=False) == \ '"Add(Symbol(\'x\'), Pow(Symbol(\'x\'), Integer(2)))" ' \ '["color"="black", "label"="Add", "shape"="ellipse"];' assert dotnode(x + x**2, repeat=True) == \ '"Add(Symbol(\'x\'), Pow(Symbol(\'x\'), Integer(2)))_()" ' \ '["color"="black", "label"="Add", "shape"="ellipse"];' def test_dotedges(): assert sorted(dotedges(x+2, repeat=False)) == [ '"Add(Integer(2), Symbol(\'x\'))" -> "Integer(2)";', '"Add(Integer(2), Symbol(\'x\'))" -> "Symbol(\'x\')";' ] assert sorted(dotedges(x + 2, repeat=True)) == [ '"Add(Integer(2), Symbol(\'x\'))_()" -> "Integer(2)_(0,)";', '"Add(Integer(2), Symbol(\'x\'))_()" -> "Symbol(\'x\')_(1,)";' ] def test_dotprint(): text = dotprint(x+2, repeat=False) assert all(e in text for e in dotedges(x+2, repeat=False)) assert all( n in text for n in [dotnode(expr, repeat=False) for expr in (x, Integer(2), x+2)]) assert 'digraph' in text text = dotprint(x+x**2, repeat=False) assert all(e in text for e in dotedges(x+x**2, repeat=False)) assert all( n in text for n in [dotnode(expr, repeat=False) for expr in (x, Integer(2), x**2)]) assert 'digraph' in text text = dotprint(x+x**2, repeat=True) assert all(e in text for e in dotedges(x+x**2, repeat=True)) assert all( n in text for n in [dotnode(expr, pos=()) for expr in [x + x**2]]) text = dotprint(x**x, repeat=True) assert all(e in text for e in dotedges(x**x, repeat=True)) assert all( n in text for n in [dotnode(x, pos=(0,)), dotnode(x, pos=(1,))]) assert 'digraph' in text def test_dotprint_depth(): text = dotprint(3*x+2, depth=1) assert dotnode(3*x+2) in text assert dotnode(x) not in text text = dotprint(3*x+2) assert "depth" not in text def test_Matrix_and_non_basics(): from sympy.matrices.expressions.matexpr import MatrixSymbol n = Symbol('n') assert dotprint(MatrixSymbol('X', n, n)) == \ """digraph{ # Graph style "ordering"="out" "rankdir"="TD" ######### # Nodes # ######### "MatrixSymbol(Str('X'), Symbol('n'), Symbol('n'))_()" ["color"="black", "label"="MatrixSymbol", "shape"="ellipse"]; "Str('X')_(0,)" ["color"="blue", "label"="X", "shape"="ellipse"]; "Symbol('n')_(1,)" ["color"="black", "label"="n", "shape"="ellipse"]; "Symbol('n')_(2,)" ["color"="black", "label"="n", "shape"="ellipse"]; ######### # Edges # ######### "MatrixSymbol(Str('X'), Symbol('n'), Symbol('n'))_()" -> "Str('X')_(0,)"; "MatrixSymbol(Str('X'), Symbol('n'), Symbol('n'))_()" -> "Symbol('n')_(1,)"; "MatrixSymbol(Str('X'), Symbol('n'), Symbol('n'))_()" -> "Symbol('n')_(2,)"; }""" def test_labelfunc(): text = dotprint(x + 2, labelfunc=srepr) assert "Symbol('x')" in text assert "Integer(2)" in text def test_commutative(): x, y = symbols('x y', commutative=False) assert dotprint(x + y) == dotprint(y + x) assert dotprint(x*y) != dotprint(y*x)
5d374ccd99894e0a9e9dc39cbc4b947e87b271df7a6cb5de3099e4c3d3e6bb7c
# -*- coding: utf-8 -*- from sympy.concrete.products import Product from sympy.concrete.summations import Sum from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.containers import (Dict, Tuple) from sympy.core.function import (Derivative, Function, Lambda, Subs) from sympy.core.mul import Mul from sympy.core import (EulerGamma, GoldenRatio) from sympy.core.numbers import (I, Rational, oo, pi) from sympy.core.power import Pow from sympy.core.relational import (Eq, Ge, Gt, Le, Lt, Ne) from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.functions.elementary.complexes import conjugate from sympy.functions.elementary.exponential import LambertW from sympy.functions.special.bessel import (airyai, airyaiprime, airybi, airybiprime) from sympy.functions.special.delta_functions import Heaviside from sympy.functions.special.error_functions import (fresnelc, fresnels) from sympy.functions.special.singularity_functions import SingularityFunction from sympy.functions.special.zeta_functions import dirichlet_eta from sympy.geometry.line import (Ray, Segment) from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Equivalent, ITE, Implies, Nand, Nor, Not, Or, Xor) from sympy.matrices.dense import (Matrix, diag) from sympy.matrices.expressions.slice import MatrixSlice from sympy.matrices.expressions.trace import Trace from sympy.polys.domains.finitefield import FF from sympy.polys.domains.integerring import ZZ from sympy.polys.domains.rationalfield import QQ from sympy.polys.domains.realfield import RR from sympy.polys.orderings import (grlex, ilex) from sympy.polys.polytools import groebner from sympy.polys.rootoftools import (RootSum, rootof) from sympy.series.formal import fps from sympy.series.fourier import fourier_series from sympy.series.limits import Limit from sympy.series.order import O from sympy.series.sequences import (SeqAdd, SeqFormula, SeqMul, SeqPer) from sympy.sets.contains import Contains from sympy.sets.fancysets import Range from sympy.sets.sets import (Complement, FiniteSet, Intersection, Interval, Union) from sympy.codegen.ast import (Assignment, AddAugmentedAssignment, SubAugmentedAssignment, MulAugmentedAssignment, DivAugmentedAssignment, ModAugmentedAssignment) from sympy.core.expr import UnevaluatedExpr from sympy.physics.quantum.trace import Tr from sympy.functions import (Abs, Chi, Ci, Ei, KroneckerDelta, Piecewise, Shi, Si, atan2, beta, binomial, catalan, ceiling, cos, euler, exp, expint, factorial, factorial2, floor, gamma, hyper, log, meijerg, sin, sqrt, subfactorial, tan, uppergamma, lerchphi, elliptic_k, elliptic_f, elliptic_e, elliptic_pi, DiracDelta, bell, bernoulli, fibonacci, tribonacci, lucas, stieltjes, mathieuc, mathieus, mathieusprime, mathieucprime) from sympy.matrices import Adjoint, Inverse, MatrixSymbol, Transpose, KroneckerProduct from sympy.matrices.expressions import hadamard_power from sympy.physics import mechanics from sympy.physics.control.lti import (TransferFunction, Feedback, TransferFunctionMatrix, Series, Parallel, MIMOSeries, MIMOParallel, MIMOFeedback) from sympy.physics.units import joule, degree from sympy.printing.pretty import pprint, pretty as xpretty from sympy.printing.pretty.pretty_symbology import center_accent, is_combining from sympy.sets.conditionset import ConditionSet from sympy.sets import ImageSet, ProductSet from sympy.sets.setexpr import SetExpr from sympy.tensor.array import (ImmutableDenseNDimArray, ImmutableSparseNDimArray, MutableDenseNDimArray, MutableSparseNDimArray, tensorproduct) from sympy.tensor.functions import TensorProduct from sympy.tensor.tensor import (TensorIndexType, tensor_indices, TensorHead, TensorElement, tensor_heads) from sympy.testing.pytest import raises, _both_exp_pow from sympy.vector import CoordSys3D, Gradient, Curl, Divergence, Dot, Cross, Laplacian import sympy as sym class lowergamma(sym.lowergamma): pass # testing notation inheritance by a subclass with same name a, b, c, d, x, y, z, k, n, s, p = symbols('a,b,c,d,x,y,z,k,n,s,p') f = Function("f") th = Symbol('theta') ph = Symbol('phi') """ Expressions whose pretty-printing is tested here: (A '#' to the right of an expression indicates that its various acceptable orderings are accounted for by the tests.) BASIC EXPRESSIONS: oo (x**2) 1/x y*x**-2 x**Rational(-5,2) (-2)**x Pow(3, 1, evaluate=False) (x**2 + x + 1) # 1-x # 1-2*x # x/y -x/y (x+2)/y # (1+x)*y #3 -5*x/(x+10) # correct placement of negative sign 1 - Rational(3,2)*(x+1) -(-x + 5)*(-x - 2*sqrt(2) + 5) - (-y + 5)*(-y + 5) # issue 5524 ORDERING: x**2 + x + 1 1 - x 1 - 2*x 2*x**4 + y**2 - x**2 + y**3 RELATIONAL: Eq(x, y) Lt(x, y) Gt(x, y) Le(x, y) Ge(x, y) Ne(x/(y+1), y**2) # RATIONAL NUMBERS: y*x**-2 y**Rational(3,2) * x**Rational(-5,2) sin(x)**3/tan(x)**2 FUNCTIONS (ABS, CONJ, EXP, FUNCTION BRACES, FACTORIAL, FLOOR, CEILING): (2*x + exp(x)) # Abs(x) Abs(x/(x**2+1)) # Abs(1 / (y - Abs(x))) factorial(n) factorial(2*n) subfactorial(n) subfactorial(2*n) factorial(factorial(factorial(n))) factorial(n+1) # conjugate(x) conjugate(f(x+1)) # f(x) f(x, y) f(x/(y+1), y) # f(x**x**x**x**x**x) sin(x)**2 conjugate(a+b*I) conjugate(exp(a+b*I)) conjugate( f(1 + conjugate(f(x))) ) # f(x/(y+1), y) # denom of first arg floor(1 / (y - floor(x))) ceiling(1 / (y - ceiling(x))) SQRT: sqrt(2) 2**Rational(1,3) 2**Rational(1,1000) sqrt(x**2 + 1) (1 + sqrt(5))**Rational(1,3) 2**(1/x) sqrt(2+pi) (2+(1+x**2)/(2+x))**Rational(1,4)+(1+x**Rational(1,1000))/sqrt(3+x**2) DERIVATIVES: Derivative(log(x), x, evaluate=False) Derivative(log(x), x, evaluate=False) + x # Derivative(log(x) + x**2, x, y, evaluate=False) Derivative(2*x*y, y, x, evaluate=False) + x**2 # beta(alpha).diff(alpha) INTEGRALS: Integral(log(x), x) Integral(x**2, x) Integral((sin(x))**2 / (tan(x))**2) Integral(x**(2**x), x) Integral(x**2, (x,1,2)) Integral(x**2, (x,Rational(1,2),10)) Integral(x**2*y**2, x,y) Integral(x**2, (x, None, 1)) Integral(x**2, (x, 1, None)) Integral(sin(th)/cos(ph), (th,0,pi), (ph, 0, 2*pi)) MATRICES: Matrix([[x**2+1, 1], [y, x+y]]) # Matrix([[x/y, y, th], [0, exp(I*k*ph), 1]]) PIECEWISE: Piecewise((x,x<1),(x**2,True)) ITE: ITE(x, y, z) SEQUENCES (TUPLES, LISTS, DICTIONARIES): () [] {} (1/x,) [x**2, 1/x, x, y, sin(th)**2/cos(ph)**2] (x**2, 1/x, x, y, sin(th)**2/cos(ph)**2) {x: sin(x)} {1/x: 1/y, x: sin(x)**2} # [x**2] (x**2,) {x**2: 1} LIMITS: Limit(x, x, oo) Limit(x**2, x, 0) Limit(1/x, x, 0) Limit(sin(x)/x, x, 0) UNITS: joule => kg*m**2/s SUBS: Subs(f(x), x, ph**2) Subs(f(x).diff(x), x, 0) Subs(f(x).diff(x)/y, (x, y), (0, Rational(1, 2))) ORDER: O(1) O(1/x) O(x**2 + y**2) """ def pretty(expr, order=None): """ASCII pretty-printing""" return xpretty(expr, order=order, use_unicode=False, wrap_line=False) def upretty(expr, order=None): """Unicode pretty-printing""" return xpretty(expr, order=order, use_unicode=True, wrap_line=False) def test_pretty_ascii_str(): assert pretty( 'xxx' ) == 'xxx' assert pretty( "xxx" ) == 'xxx' assert pretty( 'xxx\'xxx' ) == 'xxx\'xxx' assert pretty( 'xxx"xxx' ) == 'xxx\"xxx' assert pretty( 'xxx\"xxx' ) == 'xxx\"xxx' assert pretty( "xxx'xxx" ) == 'xxx\'xxx' assert pretty( "xxx\'xxx" ) == 'xxx\'xxx' assert pretty( "xxx\"xxx" ) == 'xxx\"xxx' assert pretty( "xxx\"xxx\'xxx" ) == 'xxx"xxx\'xxx' assert pretty( "xxx\nxxx" ) == 'xxx\nxxx' def test_pretty_unicode_str(): assert pretty( 'xxx' ) == 'xxx' assert pretty( 'xxx' ) == 'xxx' assert pretty( 'xxx\'xxx' ) == 'xxx\'xxx' assert pretty( 'xxx"xxx' ) == 'xxx\"xxx' assert pretty( 'xxx\"xxx' ) == 'xxx\"xxx' assert pretty( "xxx'xxx" ) == 'xxx\'xxx' assert pretty( "xxx\'xxx" ) == 'xxx\'xxx' assert pretty( "xxx\"xxx" ) == 'xxx\"xxx' assert pretty( "xxx\"xxx\'xxx" ) == 'xxx"xxx\'xxx' assert pretty( "xxx\nxxx" ) == 'xxx\nxxx' def test_upretty_greek(): assert upretty( oo ) == '∞' assert upretty( Symbol('alpha^+_1') ) == 'α⁺₁' assert upretty( Symbol('beta') ) == 'β' assert upretty(Symbol('lambda')) == 'λ' def test_upretty_multiindex(): assert upretty( Symbol('beta12') ) == 'β₁₂' assert upretty( Symbol('Y00') ) == 'Y₀₀' assert upretty( Symbol('Y_00') ) == 'Y₀₀' assert upretty( Symbol('F^+-') ) == 'F⁺⁻' def test_upretty_sub_super(): assert upretty( Symbol('beta_1_2') ) == 'β₁ ₂' assert upretty( Symbol('beta^1^2') ) == 'β¹ ²' assert upretty( Symbol('beta_1^2') ) == 'β²₁' assert upretty( Symbol('beta_10_20') ) == 'β₁₀ ₂₀' assert upretty( Symbol('beta_ax_gamma^i') ) == 'βⁱₐₓ ᵧ' assert upretty( Symbol("F^1^2_3_4") ) == 'F¹ ²₃ ₄' assert upretty( Symbol("F_1_2^3^4") ) == 'F³ ⁴₁ ₂' assert upretty( Symbol("F_1_2_3_4") ) == 'F₁ ₂ ₃ ₄' assert upretty( Symbol("F^1^2^3^4") ) == 'F¹ ² ³ ⁴' def test_upretty_subs_missing_in_24(): assert upretty( Symbol('F_beta') ) == 'Fᵦ' assert upretty( Symbol('F_gamma') ) == 'Fᵧ' assert upretty( Symbol('F_rho') ) == 'Fᵨ' assert upretty( Symbol('F_phi') ) == 'Fᵩ' assert upretty( Symbol('F_chi') ) == 'Fᵪ' assert upretty( Symbol('F_a') ) == 'Fₐ' assert upretty( Symbol('F_e') ) == 'Fₑ' assert upretty( Symbol('F_i') ) == 'Fᵢ' assert upretty( Symbol('F_o') ) == 'Fₒ' assert upretty( Symbol('F_u') ) == 'Fᵤ' assert upretty( Symbol('F_r') ) == 'Fᵣ' assert upretty( Symbol('F_v') ) == 'Fᵥ' assert upretty( Symbol('F_x') ) == 'Fₓ' def test_missing_in_2X_issue_9047(): assert upretty( Symbol('F_h') ) == 'Fₕ' assert upretty( Symbol('F_k') ) == 'Fₖ' assert upretty( Symbol('F_l') ) == 'Fₗ' assert upretty( Symbol('F_m') ) == 'Fₘ' assert upretty( Symbol('F_n') ) == 'Fₙ' assert upretty( Symbol('F_p') ) == 'Fₚ' assert upretty( Symbol('F_s') ) == 'Fₛ' assert upretty( Symbol('F_t') ) == 'Fₜ' def test_upretty_modifiers(): # Accents assert upretty( Symbol('Fmathring') ) == 'F̊' assert upretty( Symbol('Fddddot') ) == 'F⃜' assert upretty( Symbol('Fdddot') ) == 'F⃛' assert upretty( Symbol('Fddot') ) == 'F̈' assert upretty( Symbol('Fdot') ) == 'Ḟ' assert upretty( Symbol('Fcheck') ) == 'F̌' assert upretty( Symbol('Fbreve') ) == 'F̆' assert upretty( Symbol('Facute') ) == 'F́' assert upretty( Symbol('Fgrave') ) == 'F̀' assert upretty( Symbol('Ftilde') ) == 'F̃' assert upretty( Symbol('Fhat') ) == 'F̂' assert upretty( Symbol('Fbar') ) == 'F̅' assert upretty( Symbol('Fvec') ) == 'F⃗' assert upretty( Symbol('Fprime') ) == 'F′' assert upretty( Symbol('Fprm') ) == 'F′' # No faces are actually implemented, but test to make sure the modifiers are stripped assert upretty( Symbol('Fbold') ) == 'Fbold' assert upretty( Symbol('Fbm') ) == 'Fbm' assert upretty( Symbol('Fcal') ) == 'Fcal' assert upretty( Symbol('Fscr') ) == 'Fscr' assert upretty( Symbol('Ffrak') ) == 'Ffrak' # Brackets assert upretty( Symbol('Fnorm') ) == '‖F‖' assert upretty( Symbol('Favg') ) == '⟨F⟩' assert upretty( Symbol('Fabs') ) == '|F|' assert upretty( Symbol('Fmag') ) == '|F|' # Combinations assert upretty( Symbol('xvecdot') ) == 'x⃗̇' assert upretty( Symbol('xDotVec') ) == 'ẋ⃗' assert upretty( Symbol('xHATNorm') ) == '‖x̂‖' assert upretty( Symbol('xMathring_yCheckPRM__zbreveAbs') ) == 'x̊_y̌′__|z̆|' assert upretty( Symbol('alphadothat_nVECDOT__tTildePrime') ) == 'α̇̂_n⃗̇__t̃′' assert upretty( Symbol('x_dot') ) == 'x_dot' assert upretty( Symbol('x__dot') ) == 'x__dot' def test_pretty_Cycle(): from sympy.combinatorics.permutations import Cycle assert pretty(Cycle(1, 2)) == '(1 2)' assert pretty(Cycle(2)) == '(2)' assert pretty(Cycle(1, 3)(4, 5)) == '(1 3)(4 5)' assert pretty(Cycle()) == '()' def test_pretty_Permutation(): from sympy.combinatorics.permutations import Permutation p1 = Permutation(1, 2)(3, 4) assert xpretty(p1, perm_cyclic=True, use_unicode=True) == "(1 2)(3 4)" assert xpretty(p1, perm_cyclic=True, use_unicode=False) == "(1 2)(3 4)" assert xpretty(p1, perm_cyclic=False, use_unicode=True) == \ '⎛0 1 2 3 4⎞\n'\ '⎝0 2 1 4 3⎠' assert xpretty(p1, perm_cyclic=False, use_unicode=False) == \ "/0 1 2 3 4\\\n"\ "\\0 2 1 4 3/" def test_pretty_basic(): assert pretty( -Rational(1)/2 ) == '-1/2' assert pretty( -Rational(13)/22 ) == \ """\ -13 \n\ ----\n\ 22 \ """ expr = oo ascii_str = \ """\ oo\ """ ucode_str = \ """\ ∞\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (x**2) ascii_str = \ """\ 2\n\ x \ """ ucode_str = \ """\ 2\n\ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = 1/x ascii_str = \ """\ 1\n\ -\n\ x\ """ ucode_str = \ """\ 1\n\ ─\n\ x\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str # not the same as 1/x expr = x**-1.0 ascii_str = \ """\ -1.0\n\ x \ """ ucode_str = \ """\ -1.0\n\ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str # see issue #2860 expr = Pow(S(2), -1.0, evaluate=False) ascii_str = \ """\ -1.0\n\ 2 \ """ ucode_str = \ """\ -1.0\n\ 2 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = y*x**-2 ascii_str = \ """\ y \n\ --\n\ 2\n\ x \ """ ucode_str = \ """\ y \n\ ──\n\ 2\n\ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str #see issue #14033 expr = x**Rational(1, 3) ascii_str = \ """\ 1/3\n\ x \ """ ucode_str = \ """\ 1/3\n\ x \ """ assert xpretty(expr, use_unicode=False, wrap_line=False,\ root_notation = False) == ascii_str assert xpretty(expr, use_unicode=True, wrap_line=False,\ root_notation = False) == ucode_str expr = x**Rational(-5, 2) ascii_str = \ """\ 1 \n\ ----\n\ 5/2\n\ x \ """ ucode_str = \ """\ 1 \n\ ────\n\ 5/2\n\ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (-2)**x ascii_str = \ """\ x\n\ (-2) \ """ ucode_str = \ """\ x\n\ (-2) \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str # See issue 4923 expr = Pow(3, 1, evaluate=False) ascii_str = \ """\ 1\n\ 3 \ """ ucode_str = \ """\ 1\n\ 3 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (x**2 + x + 1) ascii_str_1 = \ """\ 2\n\ 1 + x + x \ """ ascii_str_2 = \ """\ 2 \n\ x + x + 1\ """ ascii_str_3 = \ """\ 2 \n\ x + 1 + x\ """ ucode_str_1 = \ """\ 2\n\ 1 + x + x \ """ ucode_str_2 = \ """\ 2 \n\ x + x + 1\ """ ucode_str_3 = \ """\ 2 \n\ x + 1 + x\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2, ascii_str_3] assert upretty(expr) in [ucode_str_1, ucode_str_2, ucode_str_3] expr = 1 - x ascii_str_1 = \ """\ 1 - x\ """ ascii_str_2 = \ """\ -x + 1\ """ ucode_str_1 = \ """\ 1 - x\ """ ucode_str_2 = \ """\ -x + 1\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = 1 - 2*x ascii_str_1 = \ """\ 1 - 2*x\ """ ascii_str_2 = \ """\ -2*x + 1\ """ ucode_str_1 = \ """\ 1 - 2⋅x\ """ ucode_str_2 = \ """\ -2⋅x + 1\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = x/y ascii_str = \ """\ x\n\ -\n\ y\ """ ucode_str = \ """\ x\n\ ─\n\ y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -x/y ascii_str = \ """\ -x \n\ ---\n\ y \ """ ucode_str = \ """\ -x \n\ ───\n\ y \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (x + 2)/y ascii_str_1 = \ """\ 2 + x\n\ -----\n\ y \ """ ascii_str_2 = \ """\ x + 2\n\ -----\n\ y \ """ ucode_str_1 = \ """\ 2 + x\n\ ─────\n\ y \ """ ucode_str_2 = \ """\ x + 2\n\ ─────\n\ y \ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = (1 + x)*y ascii_str_1 = \ """\ y*(1 + x)\ """ ascii_str_2 = \ """\ (1 + x)*y\ """ ascii_str_3 = \ """\ y*(x + 1)\ """ ucode_str_1 = \ """\ y⋅(1 + x)\ """ ucode_str_2 = \ """\ (1 + x)⋅y\ """ ucode_str_3 = \ """\ y⋅(x + 1)\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2, ascii_str_3] assert upretty(expr) in [ucode_str_1, ucode_str_2, ucode_str_3] # Test for correct placement of the negative sign expr = -5*x/(x + 10) ascii_str_1 = \ """\ -5*x \n\ ------\n\ 10 + x\ """ ascii_str_2 = \ """\ -5*x \n\ ------\n\ x + 10\ """ ucode_str_1 = \ """\ -5⋅x \n\ ──────\n\ 10 + x\ """ ucode_str_2 = \ """\ -5⋅x \n\ ──────\n\ x + 10\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = -S.Half - 3*x ascii_str = \ """\ -3*x - 1/2\ """ ucode_str = \ """\ -3⋅x - 1/2\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = S.Half - 3*x ascii_str = \ """\ 1/2 - 3*x\ """ ucode_str = \ """\ 1/2 - 3⋅x\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -S.Half - 3*x/2 ascii_str = \ """\ 3*x 1\n\ - --- - -\n\ 2 2\ """ ucode_str = \ """\ 3⋅x 1\n\ - ─── - ─\n\ 2 2\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = S.Half - 3*x/2 ascii_str = \ """\ 1 3*x\n\ - - ---\n\ 2 2 \ """ ucode_str = \ """\ 1 3⋅x\n\ ─ - ───\n\ 2 2 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_negative_fractions(): expr = -x/y ascii_str =\ """\ -x \n\ ---\n\ y \ """ ucode_str =\ """\ -x \n\ ───\n\ y \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -x*z/y ascii_str =\ """\ -x*z \n\ -----\n\ y \ """ ucode_str =\ """\ -x⋅z \n\ ─────\n\ y \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = x**2/y ascii_str =\ """\ 2\n\ x \n\ --\n\ y \ """ ucode_str =\ """\ 2\n\ x \n\ ──\n\ y \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -x**2/y ascii_str =\ """\ 2 \n\ -x \n\ ----\n\ y \ """ ucode_str =\ """\ 2 \n\ -x \n\ ────\n\ y \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -x/(y*z) ascii_str =\ """\ -x \n\ ---\n\ y*z\ """ ucode_str =\ """\ -x \n\ ───\n\ y⋅z\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -a/y**2 ascii_str =\ """\ -a \n\ ---\n\ 2\n\ y \ """ ucode_str =\ """\ -a \n\ ───\n\ 2\n\ y \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = y**(-a/b) ascii_str =\ """\ -a \n\ ---\n\ b \n\ y \ """ ucode_str =\ """\ -a \n\ ───\n\ b \n\ y \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -1/y**2 ascii_str =\ """\ -1 \n\ ---\n\ 2\n\ y \ """ ucode_str =\ """\ -1 \n\ ───\n\ 2\n\ y \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -10/b**2 ascii_str =\ """\ -10 \n\ ----\n\ 2 \n\ b \ """ ucode_str =\ """\ -10 \n\ ────\n\ 2 \n\ b \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Rational(-200, 37) ascii_str =\ """\ -200 \n\ -----\n\ 37 \ """ ucode_str =\ """\ -200 \n\ ─────\n\ 37 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Mul(0, 1, evaluate=False) assert pretty(expr) == "0*1" assert upretty(expr) == "0⋅1" expr = Mul(1, 0, evaluate=False) assert pretty(expr) == "1*0" assert upretty(expr) == "1⋅0" expr = Mul(1, 1, evaluate=False) assert pretty(expr) == "1*1" assert upretty(expr) == "1⋅1" expr = Mul(1, 1, 1, evaluate=False) assert pretty(expr) == "1*1*1" assert upretty(expr) == "1⋅1⋅1" expr = Mul(1, 2, evaluate=False) assert pretty(expr) == "1*2" assert upretty(expr) == "1⋅2" expr = Add(0, 1, evaluate=False) assert pretty(expr) == "0 + 1" assert upretty(expr) == "0 + 1" expr = Mul(1, 1, 2, evaluate=False) assert pretty(expr) == "1*1*2" assert upretty(expr) == "1⋅1⋅2" expr = Add(0, 0, 1, evaluate=False) assert pretty(expr) == "0 + 0 + 1" assert upretty(expr) == "0 + 0 + 1" expr = Mul(1, -1, evaluate=False) assert pretty(expr) == "1*(-1)" assert upretty(expr) == "1⋅(-1)" expr = Mul(1.0, x, evaluate=False) assert pretty(expr) == "1.0*x" assert upretty(expr) == "1.0⋅x" expr = Mul(1, 1, 2, 3, x, evaluate=False) assert pretty(expr) == "1*1*2*3*x" assert upretty(expr) == "1⋅1⋅2⋅3⋅x" expr = Mul(-1, 1, evaluate=False) assert pretty(expr) == "-1*1" assert upretty(expr) == "-1⋅1" expr = Mul(4, 3, 2, 1, 0, y, x, evaluate=False) assert pretty(expr) == "4*3*2*1*0*y*x" assert upretty(expr) == "4⋅3⋅2⋅1⋅0⋅y⋅x" expr = Mul(4, 3, 2, 1+z, 0, y, x, evaluate=False) assert pretty(expr) == "4*3*2*(z + 1)*0*y*x" assert upretty(expr) == "4⋅3⋅2⋅(z + 1)⋅0⋅y⋅x" expr = Mul(Rational(2, 3), Rational(5, 7), evaluate=False) assert pretty(expr) == "2/3*5/7" assert upretty(expr) == "2/3⋅5/7" def test_issue_5524(): assert pretty(-(-x + 5)*(-x - 2*sqrt(2) + 5) - (-y + 5)*(-y + 5)) == \ """\ 2 / ___ \\\n\ - (5 - y) + (x - 5)*\\-x - 2*\\/ 2 + 5/\ """ assert upretty(-(-x + 5)*(-x - 2*sqrt(2) + 5) - (-y + 5)*(-y + 5)) == \ """\ 2 \n\ - (5 - y) + (x - 5)⋅(-x - 2⋅√2 + 5)\ """ def test_pretty_ordering(): assert pretty(x**2 + x + 1, order='lex') == \ """\ 2 \n\ x + x + 1\ """ assert pretty(x**2 + x + 1, order='rev-lex') == \ """\ 2\n\ 1 + x + x \ """ assert pretty(1 - x, order='lex') == '-x + 1' assert pretty(1 - x, order='rev-lex') == '1 - x' assert pretty(1 - 2*x, order='lex') == '-2*x + 1' assert pretty(1 - 2*x, order='rev-lex') == '1 - 2*x' f = 2*x**4 + y**2 - x**2 + y**3 assert pretty(f, order=None) == \ """\ 4 2 3 2\n\ 2*x - x + y + y \ """ assert pretty(f, order='lex') == \ """\ 4 2 3 2\n\ 2*x - x + y + y \ """ assert pretty(f, order='rev-lex') == \ """\ 2 3 2 4\n\ y + y - x + 2*x \ """ expr = x - x**3/6 + x**5/120 + O(x**6) ascii_str = \ """\ 3 5 \n\ x x / 6\\\n\ x - -- + --- + O\\x /\n\ 6 120 \ """ ucode_str = \ """\ 3 5 \n\ x x ⎛ 6⎞\n\ x - ── + ─── + O⎝x ⎠\n\ 6 120 \ """ assert pretty(expr, order=None) == ascii_str assert upretty(expr, order=None) == ucode_str assert pretty(expr, order='lex') == ascii_str assert upretty(expr, order='lex') == ucode_str assert pretty(expr, order='rev-lex') == ascii_str assert upretty(expr, order='rev-lex') == ucode_str def test_EulerGamma(): assert pretty(EulerGamma) == str(EulerGamma) == "EulerGamma" assert upretty(EulerGamma) == "γ" def test_GoldenRatio(): assert pretty(GoldenRatio) == str(GoldenRatio) == "GoldenRatio" assert upretty(GoldenRatio) == "φ" def test_pretty_relational(): expr = Eq(x, y) ascii_str = \ """\ x = y\ """ ucode_str = \ """\ x = y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Lt(x, y) ascii_str = \ """\ x < y\ """ ucode_str = \ """\ x < y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Gt(x, y) ascii_str = \ """\ x > y\ """ ucode_str = \ """\ x > y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Le(x, y) ascii_str = \ """\ x <= y\ """ ucode_str = \ """\ x ≤ y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Ge(x, y) ascii_str = \ """\ x >= y\ """ ucode_str = \ """\ x ≥ y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Ne(x/(y + 1), y**2) ascii_str_1 = \ """\ x 2\n\ ----- != y \n\ 1 + y \ """ ascii_str_2 = \ """\ x 2\n\ ----- != y \n\ y + 1 \ """ ucode_str_1 = \ """\ x 2\n\ ───── ≠ y \n\ 1 + y \ """ ucode_str_2 = \ """\ x 2\n\ ───── ≠ y \n\ y + 1 \ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] def test_Assignment(): expr = Assignment(x, y) ascii_str = \ """\ x := y\ """ ucode_str = \ """\ x := y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_AugmentedAssignment(): expr = AddAugmentedAssignment(x, y) ascii_str = \ """\ x += y\ """ ucode_str = \ """\ x += y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = SubAugmentedAssignment(x, y) ascii_str = \ """\ x -= y\ """ ucode_str = \ """\ x -= y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = MulAugmentedAssignment(x, y) ascii_str = \ """\ x *= y\ """ ucode_str = \ """\ x *= y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = DivAugmentedAssignment(x, y) ascii_str = \ """\ x /= y\ """ ucode_str = \ """\ x /= y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = ModAugmentedAssignment(x, y) ascii_str = \ """\ x %= y\ """ ucode_str = \ """\ x %= y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_rational(): expr = y*x**-2 ascii_str = \ """\ y \n\ --\n\ 2\n\ x \ """ ucode_str = \ """\ y \n\ ──\n\ 2\n\ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = y**Rational(3, 2) * x**Rational(-5, 2) ascii_str = \ """\ 3/2\n\ y \n\ ----\n\ 5/2\n\ x \ """ ucode_str = \ """\ 3/2\n\ y \n\ ────\n\ 5/2\n\ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = sin(x)**3/tan(x)**2 ascii_str = \ """\ 3 \n\ sin (x)\n\ -------\n\ 2 \n\ tan (x)\ """ ucode_str = \ """\ 3 \n\ sin (x)\n\ ───────\n\ 2 \n\ tan (x)\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str @_both_exp_pow def test_pretty_functions(): """Tests for Abs, conjugate, exp, function braces, and factorial.""" expr = (2*x + exp(x)) ascii_str_1 = \ """\ x\n\ 2*x + e \ """ ascii_str_2 = \ """\ x \n\ e + 2*x\ """ ucode_str_1 = \ """\ x\n\ 2⋅x + ℯ \ """ ucode_str_2 = \ """\ x \n\ ℯ + 2⋅x\ """ ucode_str_3 = \ """\ x \n\ ℯ + 2⋅x\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2, ucode_str_3] expr = Abs(x) ascii_str = \ """\ |x|\ """ ucode_str = \ """\ │x│\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Abs(x/(x**2 + 1)) ascii_str_1 = \ """\ | x |\n\ |------|\n\ | 2|\n\ |1 + x |\ """ ascii_str_2 = \ """\ | x |\n\ |------|\n\ | 2 |\n\ |x + 1|\ """ ucode_str_1 = \ """\ │ x │\n\ │──────│\n\ │ 2│\n\ │1 + x │\ """ ucode_str_2 = \ """\ │ x │\n\ │──────│\n\ │ 2 │\n\ │x + 1│\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = Abs(1 / (y - Abs(x))) ascii_str = \ """\ 1 \n\ ---------\n\ |y - |x||\ """ ucode_str = \ """\ 1 \n\ ─────────\n\ │y - │x││\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str n = Symbol('n', integer=True) expr = factorial(n) ascii_str = \ """\ n!\ """ ucode_str = \ """\ n!\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = factorial(2*n) ascii_str = \ """\ (2*n)!\ """ ucode_str = \ """\ (2⋅n)!\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = factorial(factorial(factorial(n))) ascii_str = \ """\ ((n!)!)!\ """ ucode_str = \ """\ ((n!)!)!\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = factorial(n + 1) ascii_str_1 = \ """\ (1 + n)!\ """ ascii_str_2 = \ """\ (n + 1)!\ """ ucode_str_1 = \ """\ (1 + n)!\ """ ucode_str_2 = \ """\ (n + 1)!\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = subfactorial(n) ascii_str = \ """\ !n\ """ ucode_str = \ """\ !n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = subfactorial(2*n) ascii_str = \ """\ !(2*n)\ """ ucode_str = \ """\ !(2⋅n)\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str n = Symbol('n', integer=True) expr = factorial2(n) ascii_str = \ """\ n!!\ """ ucode_str = \ """\ n!!\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = factorial2(2*n) ascii_str = \ """\ (2*n)!!\ """ ucode_str = \ """\ (2⋅n)!!\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = factorial2(factorial2(factorial2(n))) ascii_str = \ """\ ((n!!)!!)!!\ """ ucode_str = \ """\ ((n!!)!!)!!\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = factorial2(n + 1) ascii_str_1 = \ """\ (1 + n)!!\ """ ascii_str_2 = \ """\ (n + 1)!!\ """ ucode_str_1 = \ """\ (1 + n)!!\ """ ucode_str_2 = \ """\ (n + 1)!!\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = 2*binomial(n, k) ascii_str = \ """\ /n\\\n\ 2*| |\n\ \\k/\ """ ucode_str = \ """\ ⎛n⎞\n\ 2⋅⎜ ⎟\n\ ⎝k⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = 2*binomial(2*n, k) ascii_str = \ """\ /2*n\\\n\ 2*| |\n\ \\ k /\ """ ucode_str = \ """\ ⎛2⋅n⎞\n\ 2⋅⎜ ⎟\n\ ⎝ k ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = 2*binomial(n**2, k) ascii_str = \ """\ / 2\\\n\ |n |\n\ 2*| |\n\ \\k /\ """ ucode_str = \ """\ ⎛ 2⎞\n\ ⎜n ⎟\n\ 2⋅⎜ ⎟\n\ ⎝k ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = catalan(n) ascii_str = \ """\ C \n\ n\ """ ucode_str = \ """\ C \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = catalan(n) ascii_str = \ """\ C \n\ n\ """ ucode_str = \ """\ C \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = bell(n) ascii_str = \ """\ B \n\ n\ """ ucode_str = \ """\ B \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = bernoulli(n) ascii_str = \ """\ B \n\ n\ """ ucode_str = \ """\ B \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = bernoulli(n, x) ascii_str = \ """\ B (x)\n\ n \ """ ucode_str = \ """\ B (x)\n\ n \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = fibonacci(n) ascii_str = \ """\ F \n\ n\ """ ucode_str = \ """\ F \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = lucas(n) ascii_str = \ """\ L \n\ n\ """ ucode_str = \ """\ L \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = tribonacci(n) ascii_str = \ """\ T \n\ n\ """ ucode_str = \ """\ T \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = stieltjes(n) ascii_str = \ """\ stieltjes \n\ n\ """ ucode_str = \ """\ γ \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = stieltjes(n, x) ascii_str = \ """\ stieltjes (x)\n\ n \ """ ucode_str = \ """\ γ (x)\n\ n \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = mathieuc(x, y, z) ascii_str = 'C(x, y, z)' ucode_str = 'C(x, y, z)' assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = mathieus(x, y, z) ascii_str = 'S(x, y, z)' ucode_str = 'S(x, y, z)' assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = mathieucprime(x, y, z) ascii_str = "C'(x, y, z)" ucode_str = "C'(x, y, z)" assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = mathieusprime(x, y, z) ascii_str = "S'(x, y, z)" ucode_str = "S'(x, y, z)" assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = conjugate(x) ascii_str = \ """\ _\n\ x\ """ ucode_str = \ """\ _\n\ x\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str f = Function('f') expr = conjugate(f(x + 1)) ascii_str_1 = \ """\ ________\n\ f(1 + x)\ """ ascii_str_2 = \ """\ ________\n\ f(x + 1)\ """ ucode_str_1 = \ """\ ________\n\ f(1 + x)\ """ ucode_str_2 = \ """\ ________\n\ f(x + 1)\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = f(x) ascii_str = \ """\ f(x)\ """ ucode_str = \ """\ f(x)\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = f(x, y) ascii_str = \ """\ f(x, y)\ """ ucode_str = \ """\ f(x, y)\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = f(x/(y + 1), y) ascii_str_1 = \ """\ / x \\\n\ f|-----, y|\n\ \\1 + y /\ """ ascii_str_2 = \ """\ / x \\\n\ f|-----, y|\n\ \\y + 1 /\ """ ucode_str_1 = \ """\ ⎛ x ⎞\n\ f⎜─────, y⎟\n\ ⎝1 + y ⎠\ """ ucode_str_2 = \ """\ ⎛ x ⎞\n\ f⎜─────, y⎟\n\ ⎝y + 1 ⎠\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = f(x**x**x**x**x**x) ascii_str = \ """\ / / / / / x\\\\\\\\\\ | | | | \\x /|||| | | | \\x /||| | | \\x /|| | \\x /| f\\x /\ """ ucode_str = \ """\ ⎛ ⎛ ⎛ ⎛ ⎛ x⎞⎞⎞⎞⎞ ⎜ ⎜ ⎜ ⎜ ⎝x ⎠⎟⎟⎟⎟ ⎜ ⎜ ⎜ ⎝x ⎠⎟⎟⎟ ⎜ ⎜ ⎝x ⎠⎟⎟ ⎜ ⎝x ⎠⎟ f⎝x ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = sin(x)**2 ascii_str = \ """\ 2 \n\ sin (x)\ """ ucode_str = \ """\ 2 \n\ sin (x)\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = conjugate(a + b*I) ascii_str = \ """\ _ _\n\ a - I*b\ """ ucode_str = \ """\ _ _\n\ a - ⅈ⋅b\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = conjugate(exp(a + b*I)) ascii_str = \ """\ _ _\n\ a - I*b\n\ e \ """ ucode_str = \ """\ _ _\n\ a - ⅈ⋅b\n\ ℯ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = conjugate( f(1 + conjugate(f(x))) ) ascii_str_1 = \ """\ ___________\n\ / ____\\\n\ f\\1 + f(x)/\ """ ascii_str_2 = \ """\ ___________\n\ /____ \\\n\ f\\f(x) + 1/\ """ ucode_str_1 = \ """\ ___________\n\ ⎛ ____⎞\n\ f⎝1 + f(x)⎠\ """ ucode_str_2 = \ """\ ___________\n\ ⎛____ ⎞\n\ f⎝f(x) + 1⎠\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = f(x/(y + 1), y) ascii_str_1 = \ """\ / x \\\n\ f|-----, y|\n\ \\1 + y /\ """ ascii_str_2 = \ """\ / x \\\n\ f|-----, y|\n\ \\y + 1 /\ """ ucode_str_1 = \ """\ ⎛ x ⎞\n\ f⎜─────, y⎟\n\ ⎝1 + y ⎠\ """ ucode_str_2 = \ """\ ⎛ x ⎞\n\ f⎜─────, y⎟\n\ ⎝y + 1 ⎠\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = floor(1 / (y - floor(x))) ascii_str = \ """\ / 1 \\\n\ floor|------------|\n\ \\y - floor(x)/\ """ ucode_str = \ """\ ⎢ 1 ⎥\n\ ⎢───────⎥\n\ ⎣y - ⌊x⌋⎦\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = ceiling(1 / (y - ceiling(x))) ascii_str = \ """\ / 1 \\\n\ ceiling|--------------|\n\ \\y - ceiling(x)/\ """ ucode_str = \ """\ ⎡ 1 ⎤\n\ ⎢───────⎥\n\ ⎢y - ⌈x⌉⎥\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = euler(n) ascii_str = \ """\ E \n\ n\ """ ucode_str = \ """\ E \n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = euler(1/(1 + 1/(1 + 1/n))) ascii_str = \ """\ E \n\ 1 \n\ ---------\n\ 1 \n\ 1 + -----\n\ 1\n\ 1 + -\n\ n\ """ ucode_str = \ """\ E \n\ 1 \n\ ─────────\n\ 1 \n\ 1 + ─────\n\ 1\n\ 1 + ─\n\ n\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = euler(n, x) ascii_str = \ """\ E (x)\n\ n \ """ ucode_str = \ """\ E (x)\n\ n \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = euler(n, x/2) ascii_str = \ """\ /x\\\n\ E |-|\n\ n\\2/\ """ ucode_str = \ """\ ⎛x⎞\n\ E ⎜─⎟\n\ n⎝2⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_sqrt(): expr = sqrt(2) ascii_str = \ """\ ___\n\ \\/ 2 \ """ ucode_str = \ "√2" assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = 2**Rational(1, 3) ascii_str = \ """\ 3 ___\n\ \\/ 2 \ """ ucode_str = \ """\ 3 ___\n\ ╲╱ 2 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = 2**Rational(1, 1000) ascii_str = \ """\ 1000___\n\ \\/ 2 \ """ ucode_str = \ """\ 1000___\n\ ╲╱ 2 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = sqrt(x**2 + 1) ascii_str = \ """\ ________\n\ / 2 \n\ \\/ x + 1 \ """ ucode_str = \ """\ ________\n\ ╱ 2 \n\ ╲╱ x + 1 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (1 + sqrt(5))**Rational(1, 3) ascii_str = \ """\ ___________\n\ 3 / ___ \n\ \\/ 1 + \\/ 5 \ """ ucode_str = \ """\ 3 ________\n\ ╲╱ 1 + √5 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = 2**(1/x) ascii_str = \ """\ x ___\n\ \\/ 2 \ """ ucode_str = \ """\ x ___\n\ ╲╱ 2 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = sqrt(2 + pi) ascii_str = \ """\ ________\n\ \\/ 2 + pi \ """ ucode_str = \ """\ _______\n\ ╲╱ 2 + π \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (2 + ( 1 + x**2)/(2 + x))**Rational(1, 4) + (1 + x**Rational(1, 1000))/sqrt(3 + x**2) ascii_str = \ """\ ____________ \n\ / 2 1000___ \n\ / x + 1 \\/ x + 1\n\ 4 / 2 + ------ + -----------\n\ \\/ x + 2 ________\n\ / 2 \n\ \\/ x + 3 \ """ ucode_str = \ """\ ____________ \n\ ╱ 2 1000___ \n\ ╱ x + 1 ╲╱ x + 1\n\ 4 ╱ 2 + ────── + ───────────\n\ ╲╱ x + 2 ________\n\ ╱ 2 \n\ ╲╱ x + 3 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_sqrt_char_knob(): # See PR #9234. expr = sqrt(2) ucode_str1 = \ """\ ___\n\ ╲╱ 2 \ """ ucode_str2 = \ "√2" assert xpretty(expr, use_unicode=True, use_unicode_sqrt_char=False) == ucode_str1 assert xpretty(expr, use_unicode=True, use_unicode_sqrt_char=True) == ucode_str2 def test_pretty_sqrt_longsymbol_no_sqrt_char(): # Do not use unicode sqrt char for long symbols (see PR #9234). expr = sqrt(Symbol('C1')) ucode_str = \ """\ ____\n\ ╲╱ C₁ \ """ assert upretty(expr) == ucode_str def test_pretty_KroneckerDelta(): x, y = symbols("x, y") expr = KroneckerDelta(x, y) ascii_str = \ """\ d \n\ x,y\ """ ucode_str = \ """\ δ \n\ x,y\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_product(): n, m, k, l = symbols('n m k l') f = symbols('f', cls=Function) expr = Product(f((n/3)**2), (n, k**2, l)) unicode_str = \ """\ l \n\ ─┬──────┬─ \n\ │ │ ⎛ 2⎞\n\ │ │ ⎜n ⎟\n\ │ │ f⎜──⎟\n\ │ │ ⎝9 ⎠\n\ │ │ \n\ 2 \n\ n = k """ ascii_str = \ """\ l \n\ __________ \n\ | | / 2\\\n\ | | |n |\n\ | | f|--|\n\ | | \\9 /\n\ | | \n\ 2 \n\ n = k """ expr = Product(f((n/3)**2), (n, k**2, l), (l, 1, m)) unicode_str = \ """\ m l \n\ ─┬──────┬─ ─┬──────┬─ \n\ │ │ │ │ ⎛ 2⎞\n\ │ │ │ │ ⎜n ⎟\n\ │ │ │ │ f⎜──⎟\n\ │ │ │ │ ⎝9 ⎠\n\ │ │ │ │ \n\ l = 1 2 \n\ n = k """ ascii_str = \ """\ m l \n\ __________ __________ \n\ | | | | / 2\\\n\ | | | | |n |\n\ | | | | f|--|\n\ | | | | \\9 /\n\ | | | | \n\ l = 1 2 \n\ n = k """ assert pretty(expr) == ascii_str assert upretty(expr) == unicode_str def test_pretty_Lambda(): # S.IdentityFunction is a special case expr = Lambda(y, y) assert pretty(expr) == "x -> x" assert upretty(expr) == "x ↦ x" expr = Lambda(x, x+1) assert pretty(expr) == "x -> x + 1" assert upretty(expr) == "x ↦ x + 1" expr = Lambda(x, x**2) ascii_str = \ """\ 2\n\ x -> x \ """ ucode_str = \ """\ 2\n\ x ↦ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Lambda(x, x**2)**2 ascii_str = \ """\ 2 / 2\\ \n\ \\x -> x / \ """ ucode_str = \ """\ 2 ⎛ 2⎞ \n\ ⎝x ↦ x ⎠ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Lambda((x, y), x) ascii_str = "(x, y) -> x" ucode_str = "(x, y) ↦ x" assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Lambda((x, y), x**2) ascii_str = \ """\ 2\n\ (x, y) -> x \ """ ucode_str = \ """\ 2\n\ (x, y) ↦ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Lambda(((x, y),), x**2) ascii_str = \ """\ 2\n\ ((x, y),) -> x \ """ ucode_str = \ """\ 2\n\ ((x, y),) ↦ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_TransferFunction(): tf1 = TransferFunction(s - 1, s + 1, s) assert upretty(tf1) == "s - 1\n─────\ns + 1" tf2 = TransferFunction(2*s + 1, 3 - p, s) assert upretty(tf2) == "2⋅s + 1\n───────\n 3 - p " tf3 = TransferFunction(p, p + 1, p) assert upretty(tf3) == " p \n─────\np + 1" def test_pretty_Series(): tf1 = TransferFunction(x + y, x - 2*y, y) tf2 = TransferFunction(x - y, x + y, y) tf3 = TransferFunction(x**2 + y, y - x, y) tf4 = TransferFunction(2, 3, y) tfm1 = TransferFunctionMatrix([[tf1, tf2], [tf3, tf4]]) tfm2 = TransferFunctionMatrix([[tf3], [-tf4]]) tfm3 = TransferFunctionMatrix([[tf1, -tf2, -tf3], [tf3, -tf4, tf2]]) tfm4 = TransferFunctionMatrix([[tf1, tf2], [tf3, -tf4], [-tf2, -tf1]]) tfm5 = TransferFunctionMatrix([[-tf2, -tf1], [tf4, -tf3], [tf1, tf2]]) expected1 = \ """\ ⎛ 2 ⎞\n\ ⎛ x + y ⎞ ⎜x + y⎟\n\ ⎜───────⎟⋅⎜──────⎟\n\ ⎝x - 2⋅y⎠ ⎝-x + y⎠\ """ expected2 = \ """\ ⎛-x + y⎞ ⎛ -x - y⎞\n\ ⎜──────⎟⋅⎜───────⎟\n\ ⎝x + y ⎠ ⎝x - 2⋅y⎠\ """ expected3 = \ """\ ⎛ 2 ⎞ \n\ ⎜x + y⎟ ⎛ x + y ⎞ ⎛ -x - y x - y⎞\n\ ⎜──────⎟⋅⎜───────⎟⋅⎜─────── + ─────⎟\n\ ⎝-x + y⎠ ⎝x - 2⋅y⎠ ⎝x - 2⋅y x + y⎠\ """ expected4 = \ """\ ⎛ 2 ⎞\n\ ⎛ x + y x - y⎞ ⎜x - y x + y⎟\n\ ⎜─────── + ─────⎟⋅⎜───── + ──────⎟\n\ ⎝x - 2⋅y x + y⎠ ⎝x + y -x + y⎠\ """ expected5 = \ """\ ⎡ x + y x - y⎤ ⎡ 2 ⎤ \n\ ⎢─────── ─────⎥ ⎢x + y⎥ \n\ ⎢x - 2⋅y x + y⎥ ⎢──────⎥ \n\ ⎢ ⎥ ⎢-x + y⎥ \n\ ⎢ 2 ⎥ ⋅⎢ ⎥ \n\ ⎢x + y 2 ⎥ ⎢ -2 ⎥ \n\ ⎢────── ─ ⎥ ⎢ ─── ⎥ \n\ ⎣-x + y 3 ⎦τ ⎣ 3 ⎦τ\ """ expected6 = \ """\ ⎛⎡ x + y x - y ⎤ ⎡ x - y x + y ⎤ ⎞\n\ ⎜⎢─────── ───── ⎥ ⎢ ───── ───────⎥ ⎟\n\ ⎡ x + y x - y⎤ ⎡ 2 ⎤ ⎜⎢x - 2⋅y x + y ⎥ ⎢ x + y x - 2⋅y⎥ ⎟\n\ ⎢─────── ─────⎥ ⎢ x + y -x + y - x - y⎥ ⎜⎢ ⎥ ⎢ ⎥ ⎟\n\ ⎢x - 2⋅y x + y⎥ ⎢─────── ────── ────────⎥ ⎜⎢ 2 ⎥ ⎢ 2 ⎥ ⎟\n\ ⎢ ⎥ ⎢x - 2⋅y x + y -x + y ⎥ ⎜⎢x + y -2 ⎥ ⎢ -2 x + y ⎥ ⎟\n\ ⎢ 2 ⎥ ⋅⎢ ⎥ ⋅⎜⎢────── ─── ⎥ + ⎢ ─── ────── ⎥ ⎟\n\ ⎢x + y 2 ⎥ ⎢ 2 ⎥ ⎜⎢-x + y 3 ⎥ ⎢ 3 -x + y ⎥ ⎟\n\ ⎢────── ─ ⎥ ⎢x + y -2 x - y ⎥ ⎜⎢ ⎥ ⎢ ⎥ ⎟\n\ ⎣-x + y 3 ⎦τ ⎢────── ─── ───── ⎥ ⎜⎢-x + y -x - y⎥ ⎢ -x - y -x + y ⎥ ⎟\n\ ⎣-x + y 3 x + y ⎦τ ⎜⎢────── ───────⎥ ⎢─────── ────── ⎥ ⎟\n\ ⎝⎣x + y x - 2⋅y⎦τ ⎣x - 2⋅y x + y ⎦τ⎠\ """ assert upretty(Series(tf1, tf3)) == expected1 assert upretty(Series(-tf2, -tf1)) == expected2 assert upretty(Series(tf3, tf1, Parallel(-tf1, tf2))) == expected3 assert upretty(Series(Parallel(tf1, tf2), Parallel(tf2, tf3))) == expected4 assert upretty(MIMOSeries(tfm2, tfm1)) == expected5 assert upretty(MIMOSeries(MIMOParallel(tfm4, -tfm5), tfm3, tfm1)) == expected6 def test_pretty_Parallel(): tf1 = TransferFunction(x + y, x - 2*y, y) tf2 = TransferFunction(x - y, x + y, y) tf3 = TransferFunction(x**2 + y, y - x, y) tf4 = TransferFunction(y**2 - x, x**3 + x, y) tfm1 = TransferFunctionMatrix([[tf1, tf2], [tf3, -tf4], [-tf2, -tf1]]) tfm2 = TransferFunctionMatrix([[-tf2, -tf1], [tf4, -tf3], [tf1, tf2]]) tfm3 = TransferFunctionMatrix([[-tf1, tf2], [-tf3, tf4], [tf2, tf1]]) tfm4 = TransferFunctionMatrix([[-tf1, -tf2], [-tf3, -tf4]]) expected1 = \ """\ x + y x - y\n\ ─────── + ─────\n\ x - 2⋅y x + y\ """ expected2 = \ """\ -x + y -x - y\n\ ────── + ───────\n\ x + y x - 2⋅y\ """ expected3 = \ """\ 2 \n\ x + y x + y ⎛ -x - y⎞ ⎛x - y⎞\n\ ────── + ─────── + ⎜───────⎟⋅⎜─────⎟\n\ -x + y x - 2⋅y ⎝x - 2⋅y⎠ ⎝x + y⎠\ """ expected4 = \ """\ ⎛ 2 ⎞\n\ ⎛ x + y ⎞ ⎛x - y⎞ ⎛x - y⎞ ⎜x + y⎟\n\ ⎜───────⎟⋅⎜─────⎟ + ⎜─────⎟⋅⎜──────⎟\n\ ⎝x - 2⋅y⎠ ⎝x + y⎠ ⎝x + y⎠ ⎝-x + y⎠\ """ expected5 = \ """\ ⎡ x + y -x + y ⎤ ⎡ x - y x + y ⎤ ⎡ x + y x - y ⎤ \n\ ⎢─────── ────── ⎥ ⎢ ───── ───────⎥ ⎢─────── ───── ⎥ \n\ ⎢x - 2⋅y x + y ⎥ ⎢ x + y x - 2⋅y⎥ ⎢x - 2⋅y x + y ⎥ \n\ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ \n\ ⎢ 2 2 ⎥ ⎢ 2 2 ⎥ ⎢ 2 2 ⎥ \n\ ⎢x + y x - y ⎥ ⎢x - y x + y ⎥ ⎢x + y x - y ⎥ \n\ ⎢────── ────── ⎥ + ⎢────── ────── ⎥ + ⎢────── ────── ⎥ \n\ ⎢-x + y 3 ⎥ ⎢ 3 -x + y ⎥ ⎢-x + y 3 ⎥ \n\ ⎢ x + x ⎥ ⎢x + x ⎥ ⎢ x + x ⎥ \n\ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ \n\ ⎢-x + y -x - y⎥ ⎢ -x - y -x + y ⎥ ⎢-x + y -x - y⎥ \n\ ⎢────── ───────⎥ ⎢─────── ────── ⎥ ⎢────── ───────⎥ \n\ ⎣x + y x - 2⋅y⎦τ ⎣x - 2⋅y x + y ⎦τ ⎣x + y x - 2⋅y⎦τ\ """ expected6 = \ """\ ⎡ x - y x + y ⎤ ⎡-x + y -x - y ⎤ \n\ ⎢ ───── ───────⎥ ⎢────── ─────── ⎥ \n\ ⎢ x + y x - 2⋅y⎥ ⎡ -x - y -x + y⎤ ⎢x + y x - 2⋅y ⎥ \n\ ⎢ ⎥ ⎢─────── ──────⎥ ⎢ ⎥ \n\ ⎢ 2 2 ⎥ ⎢x - 2⋅y x + y ⎥ ⎢ 2 2 ⎥ \n\ ⎢x - y x + y ⎥ ⎢ ⎥ ⎢-x + y - x - y⎥ \n\ ⎢────── ────── ⎥ ⋅⎢ 2 2⎥ + ⎢─────── ────────⎥ \n\ ⎢ 3 -x + y ⎥ ⎢- x - y x - y ⎥ ⎢ 3 -x + y ⎥ \n\ ⎢x + x ⎥ ⎢──────── ──────⎥ ⎢ x + x ⎥ \n\ ⎢ ⎥ ⎢ -x + y 3 ⎥ ⎢ ⎥ \n\ ⎢ -x - y -x + y ⎥ ⎣ x + x⎦τ ⎢ x + y x - y ⎥ \n\ ⎢─────── ────── ⎥ ⎢─────── ───── ⎥ \n\ ⎣x - 2⋅y x + y ⎦τ ⎣x - 2⋅y x + y ⎦τ\ """ assert upretty(Parallel(tf1, tf2)) == expected1 assert upretty(Parallel(-tf2, -tf1)) == expected2 assert upretty(Parallel(tf3, tf1, Series(-tf1, tf2))) == expected3 assert upretty(Parallel(Series(tf1, tf2), Series(tf2, tf3))) == expected4 assert upretty(MIMOParallel(-tfm3, -tfm2, tfm1)) == expected5 assert upretty(MIMOParallel(MIMOSeries(tfm4, -tfm2), tfm2)) == expected6 def test_pretty_Feedback(): tf = TransferFunction(1, 1, y) tf1 = TransferFunction(x + y, x - 2*y, y) tf2 = TransferFunction(x - y, x + y, y) tf3 = TransferFunction(y**2 - 2*y + 1, y + 5, y) tf4 = TransferFunction(x - 2*y**3, x + y, x) tf5 = TransferFunction(1 - x, x - y, y) tf6 = TransferFunction(2, 2, x) expected1 = \ """\ ⎛1⎞ \n\ ⎜─⎟ \n\ ⎝1⎠ \n\ ─────────────\n\ 1 ⎛ x + y ⎞\n\ ─ + ⎜───────⎟\n\ 1 ⎝x - 2⋅y⎠\ """ expected2 = \ """\ ⎛1⎞ \n\ ⎜─⎟ \n\ ⎝1⎠ \n\ ────────────────────────────────────\n\ ⎛ 2 ⎞\n\ 1 ⎛x - y⎞ ⎛ x + y ⎞ ⎜y - 2⋅y + 1⎟\n\ ─ + ⎜─────⎟⋅⎜───────⎟⋅⎜────────────⎟\n\ 1 ⎝x + y⎠ ⎝x - 2⋅y⎠ ⎝ y + 5 ⎠\ """ expected3 = \ """\ ⎛ x + y ⎞ \n\ ⎜───────⎟ \n\ ⎝x - 2⋅y⎠ \n\ ────────────────────────────────────────────\n\ ⎛ 2 ⎞ \n\ 1 ⎛ x + y ⎞ ⎛x - y⎞ ⎜y - 2⋅y + 1⎟ ⎛1 - x⎞\n\ ─ + ⎜───────⎟⋅⎜─────⎟⋅⎜────────────⎟⋅⎜─────⎟\n\ 1 ⎝x - 2⋅y⎠ ⎝x + y⎠ ⎝ y + 5 ⎠ ⎝x - y⎠\ """ expected4 = \ """\ ⎛ x + y ⎞ ⎛x - y⎞ \n\ ⎜───────⎟⋅⎜─────⎟ \n\ ⎝x - 2⋅y⎠ ⎝x + y⎠ \n\ ─────────────────────\n\ 1 ⎛ x + y ⎞ ⎛x - y⎞\n\ ─ + ⎜───────⎟⋅⎜─────⎟\n\ 1 ⎝x - 2⋅y⎠ ⎝x + y⎠\ """ expected5 = \ """\ ⎛ x + y ⎞ ⎛x - y⎞ \n\ ⎜───────⎟⋅⎜─────⎟ \n\ ⎝x - 2⋅y⎠ ⎝x + y⎠ \n\ ─────────────────────────────\n\ 1 ⎛ x + y ⎞ ⎛x - y⎞ ⎛1 - x⎞\n\ ─ + ⎜───────⎟⋅⎜─────⎟⋅⎜─────⎟\n\ 1 ⎝x - 2⋅y⎠ ⎝x + y⎠ ⎝x - y⎠\ """ expected6 = \ """\ ⎛ 2 ⎞ \n\ ⎜y - 2⋅y + 1⎟ ⎛1 - x⎞ \n\ ⎜────────────⎟⋅⎜─────⎟ \n\ ⎝ y + 5 ⎠ ⎝x - y⎠ \n\ ────────────────────────────────────────────\n\ ⎛ 2 ⎞ \n\ 1 ⎜y - 2⋅y + 1⎟ ⎛1 - x⎞ ⎛x - y⎞ ⎛ x + y ⎞\n\ ─ + ⎜────────────⎟⋅⎜─────⎟⋅⎜─────⎟⋅⎜───────⎟\n\ 1 ⎝ y + 5 ⎠ ⎝x - y⎠ ⎝x + y⎠ ⎝x - 2⋅y⎠\ """ expected7 = \ """\ ⎛ 3⎞ \n\ ⎜x - 2⋅y ⎟ \n\ ⎜────────⎟ \n\ ⎝ x + y ⎠ \n\ ──────────────────\n\ ⎛ 3⎞ \n\ 1 ⎜x - 2⋅y ⎟ ⎛2⎞\n\ ─ + ⎜────────⎟⋅⎜─⎟\n\ 1 ⎝ x + y ⎠ ⎝2⎠\ """ expected8 = \ """\ ⎛1 - x⎞ \n\ ⎜─────⎟ \n\ ⎝x - y⎠ \n\ ───────────\n\ 1 ⎛1 - x⎞\n\ ─ + ⎜─────⎟\n\ 1 ⎝x - y⎠\ """ expected9 = \ """\ ⎛ x + y ⎞ ⎛x - y⎞ \n\ ⎜───────⎟⋅⎜─────⎟ \n\ ⎝x - 2⋅y⎠ ⎝x + y⎠ \n\ ─────────────────────────────\n\ 1 ⎛ x + y ⎞ ⎛x - y⎞ ⎛1 - x⎞\n\ ─ - ⎜───────⎟⋅⎜─────⎟⋅⎜─────⎟\n\ 1 ⎝x - 2⋅y⎠ ⎝x + y⎠ ⎝x - y⎠\ """ expected10 = \ """\ ⎛1 - x⎞ \n\ ⎜─────⎟ \n\ ⎝x - y⎠ \n\ ───────────\n\ 1 ⎛1 - x⎞\n\ ─ - ⎜─────⎟\n\ 1 ⎝x - y⎠\ """ assert upretty(Feedback(tf, tf1)) == expected1 assert upretty(Feedback(tf, tf2*tf1*tf3)) == expected2 assert upretty(Feedback(tf1, tf2*tf3*tf5)) == expected3 assert upretty(Feedback(tf1*tf2, tf)) == expected4 assert upretty(Feedback(tf1*tf2, tf5)) == expected5 assert upretty(Feedback(tf3*tf5, tf2*tf1)) == expected6 assert upretty(Feedback(tf4, tf6)) == expected7 assert upretty(Feedback(tf5, tf)) == expected8 assert upretty(Feedback(tf1*tf2, tf5, 1)) == expected9 assert upretty(Feedback(tf5, tf, 1)) == expected10 def test_pretty_MIMOFeedback(): tf1 = TransferFunction(x + y, x - 2*y, y) tf2 = TransferFunction(x - y, x + y, y) tfm_1 = TransferFunctionMatrix([[tf1, tf2], [tf2, tf1]]) tfm_2 = TransferFunctionMatrix([[tf2, tf1], [tf1, tf2]]) tfm_3 = TransferFunctionMatrix([[tf1, tf1], [tf2, tf2]]) expected1 = \ """\ ⎛ ⎡ x + y x - y ⎤ ⎡ x - y x + y ⎤ ⎞-1 ⎡ x + y x - y ⎤ \n\ ⎜ ⎢─────── ───── ⎥ ⎢ ───── ───────⎥ ⎟ ⎢─────── ───── ⎥ \n\ ⎜ ⎢x - 2⋅y x + y ⎥ ⎢ x + y x - 2⋅y⎥ ⎟ ⎢x - 2⋅y x + y ⎥ \n\ ⎜I - ⎢ ⎥ ⋅⎢ ⎥ ⎟ ⋅ ⎢ ⎥ \n\ ⎜ ⎢ x - y x + y ⎥ ⎢ x + y x - y ⎥ ⎟ ⎢ x - y x + y ⎥ \n\ ⎜ ⎢ ───── ───────⎥ ⎢─────── ───── ⎥ ⎟ ⎢ ───── ───────⎥ \n\ ⎝ ⎣ x + y x - 2⋅y⎦τ ⎣x - 2⋅y x + y ⎦τ⎠ ⎣ x + y x - 2⋅y⎦τ\ """ expected2 = \ """\ ⎛ ⎡ x + y x - y ⎤ ⎡ x - y x + y ⎤ ⎡ x + y x + y ⎤ ⎞-1 ⎡ x + y x - y ⎤ ⎡ x - y x + y ⎤ \n\ ⎜ ⎢─────── ───── ⎥ ⎢ ───── ───────⎥ ⎢─────── ───────⎥ ⎟ ⎢─────── ───── ⎥ ⎢ ───── ───────⎥ \n\ ⎜ ⎢x - 2⋅y x + y ⎥ ⎢ x + y x - 2⋅y⎥ ⎢x - 2⋅y x - 2⋅y⎥ ⎟ ⎢x - 2⋅y x + y ⎥ ⎢ x + y x - 2⋅y⎥ \n\ ⎜I + ⎢ ⎥ ⋅⎢ ⎥ ⋅⎢ ⎥ ⎟ ⋅ ⎢ ⎥ ⋅⎢ ⎥ \n\ ⎜ ⎢ x - y x + y ⎥ ⎢ x + y x - y ⎥ ⎢ x - y x - y ⎥ ⎟ ⎢ x - y x + y ⎥ ⎢ x + y x - y ⎥ \n\ ⎜ ⎢ ───── ───────⎥ ⎢─────── ───── ⎥ ⎢ ───── ───── ⎥ ⎟ ⎢ ───── ───────⎥ ⎢─────── ───── ⎥ \n\ ⎝ ⎣ x + y x - 2⋅y⎦τ ⎣x - 2⋅y x + y ⎦τ ⎣ x + y x + y ⎦τ⎠ ⎣ x + y x - 2⋅y⎦τ ⎣x - 2⋅y x + y ⎦τ\ """ assert upretty(MIMOFeedback(tfm_1, tfm_2, 1)) == \ expected1 # Positive MIMOFeedback assert upretty(MIMOFeedback(tfm_1*tfm_2, tfm_3)) == \ expected2 # Negative MIMOFeedback (Default) def test_pretty_TransferFunctionMatrix(): tf1 = TransferFunction(x + y, x - 2*y, y) tf2 = TransferFunction(x - y, x + y, y) tf3 = TransferFunction(y**2 - 2*y + 1, y + 5, y) tf4 = TransferFunction(y, x**2 + x + 1, y) tf5 = TransferFunction(1 - x, x - y, y) tf6 = TransferFunction(2, 2, y) expected1 = \ """\ ⎡ x + y ⎤ \n\ ⎢───────⎥ \n\ ⎢x - 2⋅y⎥ \n\ ⎢ ⎥ \n\ ⎢ x - y ⎥ \n\ ⎢ ───── ⎥ \n\ ⎣ x + y ⎦τ\ """ expected2 = \ """\ ⎡ x + y ⎤ \n\ ⎢ ─────── ⎥ \n\ ⎢ x - 2⋅y ⎥ \n\ ⎢ ⎥ \n\ ⎢ x - y ⎥ \n\ ⎢ ───── ⎥ \n\ ⎢ x + y ⎥ \n\ ⎢ ⎥ \n\ ⎢ 2 ⎥ \n\ ⎢- y + 2⋅y - 1⎥ \n\ ⎢──────────────⎥ \n\ ⎣ y + 5 ⎦τ\ """ expected3 = \ """\ ⎡ x + y x - y ⎤ \n\ ⎢ ─────── ───── ⎥ \n\ ⎢ x - 2⋅y x + y ⎥ \n\ ⎢ ⎥ \n\ ⎢ 2 ⎥ \n\ ⎢y - 2⋅y + 1 y ⎥ \n\ ⎢──────────── ──────────⎥ \n\ ⎢ y + 5 2 ⎥ \n\ ⎢ x + x + 1⎥ \n\ ⎢ ⎥ \n\ ⎢ 1 - x 2 ⎥ \n\ ⎢ ───── ─ ⎥ \n\ ⎣ x - y 2 ⎦τ\ """ expected4 = \ """\ ⎡ x - y x + y y ⎤ \n\ ⎢ ───── ─────── ──────────⎥ \n\ ⎢ x + y x - 2⋅y 2 ⎥ \n\ ⎢ x + x + 1⎥ \n\ ⎢ ⎥ \n\ ⎢ 2 ⎥ \n\ ⎢- y + 2⋅y - 1 x - 1 -2 ⎥ \n\ ⎢────────────── ───── ─── ⎥ \n\ ⎣ y + 5 x - y 2 ⎦τ\ """ expected5 = \ """\ ⎡ x + y x - y x + y y ⎤ \n\ ⎢───────⋅───── ─────── ──────────⎥ \n\ ⎢x - 2⋅y x + y x - 2⋅y 2 ⎥ \n\ ⎢ x + x + 1⎥ \n\ ⎢ ⎥ \n\ ⎢ 1 - x 2 x + y -2 ⎥ \n\ ⎢ ───── + ─ ─────── ─── ⎥ \n\ ⎣ x - y 2 x - 2⋅y 2 ⎦τ\ """ assert upretty(TransferFunctionMatrix([[tf1], [tf2]])) == expected1 assert upretty(TransferFunctionMatrix([[tf1], [tf2], [-tf3]])) == expected2 assert upretty(TransferFunctionMatrix([[tf1, tf2], [tf3, tf4], [tf5, tf6]])) == expected3 assert upretty(TransferFunctionMatrix([[tf2, tf1, tf4], [-tf3, -tf5, -tf6]])) == expected4 assert upretty(TransferFunctionMatrix([[Series(tf2, tf1), tf1, tf4], [Parallel(tf6, tf5), tf1, -tf6]])) == \ expected5 def test_pretty_order(): expr = O(1) ascii_str = \ """\ O(1)\ """ ucode_str = \ """\ O(1)\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = O(1/x) ascii_str = \ """\ /1\\\n\ O|-|\n\ \\x/\ """ ucode_str = \ """\ ⎛1⎞\n\ O⎜─⎟\n\ ⎝x⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = O(x**2 + y**2) ascii_str = \ """\ / 2 2 \\\n\ O\\x + y ; (x, y) -> (0, 0)/\ """ ucode_str = \ """\ ⎛ 2 2 ⎞\n\ O⎝x + y ; (x, y) → (0, 0)⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = O(1, (x, oo)) ascii_str = \ """\ O(1; x -> oo)\ """ ucode_str = \ """\ O(1; x → ∞)\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = O(1/x, (x, oo)) ascii_str = \ """\ /1 \\\n\ O|-; x -> oo|\n\ \\x /\ """ ucode_str = \ """\ ⎛1 ⎞\n\ O⎜─; x → ∞⎟\n\ ⎝x ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = O(x**2 + y**2, (x, oo), (y, oo)) ascii_str = \ """\ / 2 2 \\\n\ O\\x + y ; (x, y) -> (oo, oo)/\ """ ucode_str = \ """\ ⎛ 2 2 ⎞\n\ O⎝x + y ; (x, y) → (∞, ∞)⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_derivatives(): # Simple expr = Derivative(log(x), x, evaluate=False) ascii_str = \ """\ d \n\ --(log(x))\n\ dx \ """ ucode_str = \ """\ d \n\ ──(log(x))\n\ dx \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Derivative(log(x), x, evaluate=False) + x ascii_str_1 = \ """\ d \n\ x + --(log(x))\n\ dx \ """ ascii_str_2 = \ """\ d \n\ --(log(x)) + x\n\ dx \ """ ucode_str_1 = \ """\ d \n\ x + ──(log(x))\n\ dx \ """ ucode_str_2 = \ """\ d \n\ ──(log(x)) + x\n\ dx \ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] # basic partial derivatives expr = Derivative(log(x + y) + x, x) ascii_str_1 = \ """\ d \n\ --(log(x + y) + x)\n\ dx \ """ ascii_str_2 = \ """\ d \n\ --(x + log(x + y))\n\ dx \ """ ucode_str_1 = \ """\ ∂ \n\ ──(log(x + y) + x)\n\ ∂x \ """ ucode_str_2 = \ """\ ∂ \n\ ──(x + log(x + y))\n\ ∂x \ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2], upretty(expr) # Multiple symbols expr = Derivative(log(x) + x**2, x, y) ascii_str_1 = \ """\ 2 \n\ d / 2\\\n\ -----\\log(x) + x /\n\ dy dx \ """ ascii_str_2 = \ """\ 2 \n\ d / 2 \\\n\ -----\\x + log(x)/\n\ dy dx \ """ ucode_str_1 = \ """\ 2 \n\ d ⎛ 2⎞\n\ ─────⎝log(x) + x ⎠\n\ dy dx \ """ ucode_str_2 = \ """\ 2 \n\ d ⎛ 2 ⎞\n\ ─────⎝x + log(x)⎠\n\ dy dx \ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = Derivative(2*x*y, y, x) + x**2 ascii_str_1 = \ """\ 2 \n\ d 2\n\ -----(2*x*y) + x \n\ dx dy \ """ ascii_str_2 = \ """\ 2 \n\ 2 d \n\ x + -----(2*x*y)\n\ dx dy \ """ ucode_str_1 = \ """\ 2 \n\ ∂ 2\n\ ─────(2⋅x⋅y) + x \n\ ∂x ∂y \ """ ucode_str_2 = \ """\ 2 \n\ 2 ∂ \n\ x + ─────(2⋅x⋅y)\n\ ∂x ∂y \ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = Derivative(2*x*y, x, x) ascii_str = \ """\ 2 \n\ d \n\ ---(2*x*y)\n\ 2 \n\ dx \ """ ucode_str = \ """\ 2 \n\ ∂ \n\ ───(2⋅x⋅y)\n\ 2 \n\ ∂x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Derivative(2*x*y, x, 17) ascii_str = \ """\ 17 \n\ d \n\ ----(2*x*y)\n\ 17 \n\ dx \ """ ucode_str = \ """\ 17 \n\ ∂ \n\ ────(2⋅x⋅y)\n\ 17 \n\ ∂x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Derivative(2*x*y, x, x, y) ascii_str = \ """\ 3 \n\ d \n\ ------(2*x*y)\n\ 2 \n\ dy dx \ """ ucode_str = \ """\ 3 \n\ ∂ \n\ ──────(2⋅x⋅y)\n\ 2 \n\ ∂y ∂x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str # Greek letters alpha = Symbol('alpha') beta = Function('beta') expr = beta(alpha).diff(alpha) ascii_str = \ """\ d \n\ ------(beta(alpha))\n\ dalpha \ """ ucode_str = \ """\ d \n\ ──(β(α))\n\ dα \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Derivative(f(x), (x, n)) ascii_str = \ """\ n \n\ d \n\ ---(f(x))\n\ n \n\ dx \ """ ucode_str = \ """\ n \n\ d \n\ ───(f(x))\n\ n \n\ dx \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_integrals(): expr = Integral(log(x), x) ascii_str = \ """\ / \n\ | \n\ | log(x) dx\n\ | \n\ / \ """ ucode_str = \ """\ ⌠ \n\ ⎮ log(x) dx\n\ ⌡ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Integral(x**2, x) ascii_str = \ """\ / \n\ | \n\ | 2 \n\ | x dx\n\ | \n\ / \ """ ucode_str = \ """\ ⌠ \n\ ⎮ 2 \n\ ⎮ x dx\n\ ⌡ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Integral((sin(x))**2 / (tan(x))**2) ascii_str = \ """\ / \n\ | \n\ | 2 \n\ | sin (x) \n\ | ------- dx\n\ | 2 \n\ | tan (x) \n\ | \n\ / \ """ ucode_str = \ """\ ⌠ \n\ ⎮ 2 \n\ ⎮ sin (x) \n\ ⎮ ─────── dx\n\ ⎮ 2 \n\ ⎮ tan (x) \n\ ⌡ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Integral(x**(2**x), x) ascii_str = \ """\ / \n\ | \n\ | / x\\ \n\ | \\2 / \n\ | x dx\n\ | \n\ / \ """ ucode_str = \ """\ ⌠ \n\ ⎮ ⎛ x⎞ \n\ ⎮ ⎝2 ⎠ \n\ ⎮ x dx\n\ ⌡ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Integral(x**2, (x, 1, 2)) ascii_str = \ """\ 2 \n\ / \n\ | \n\ | 2 \n\ | x dx\n\ | \n\ / \n\ 1 \ """ ucode_str = \ """\ 2 \n\ ⌠ \n\ ⎮ 2 \n\ ⎮ x dx\n\ ⌡ \n\ 1 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Integral(x**2, (x, Rational(1, 2), 10)) ascii_str = \ """\ 10 \n\ / \n\ | \n\ | 2 \n\ | x dx\n\ | \n\ / \n\ 1/2 \ """ ucode_str = \ """\ 10 \n\ ⌠ \n\ ⎮ 2 \n\ ⎮ x dx\n\ ⌡ \n\ 1/2 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Integral(x**2*y**2, x, y) ascii_str = \ """\ / / \n\ | | \n\ | | 2 2 \n\ | | x *y dx dy\n\ | | \n\ / / \ """ ucode_str = \ """\ ⌠ ⌠ \n\ ⎮ ⎮ 2 2 \n\ ⎮ ⎮ x ⋅y dx dy\n\ ⌡ ⌡ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Integral(sin(th)/cos(ph), (th, 0, pi), (ph, 0, 2*pi)) ascii_str = \ """\ 2*pi pi \n\ / / \n\ | | \n\ | | sin(theta) \n\ | | ---------- d(theta) d(phi)\n\ | | cos(phi) \n\ | | \n\ / / \n\ 0 0 \ """ ucode_str = \ """\ 2⋅π π \n\ ⌠ ⌠ \n\ ⎮ ⎮ sin(θ) \n\ ⎮ ⎮ ────── dθ dφ\n\ ⎮ ⎮ cos(φ) \n\ ⌡ ⌡ \n\ 0 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_matrix(): # Empty Matrix expr = Matrix() ascii_str = "[]" unicode_str = "[]" assert pretty(expr) == ascii_str assert upretty(expr) == unicode_str expr = Matrix(2, 0, lambda i, j: 0) ascii_str = "[]" unicode_str = "[]" assert pretty(expr) == ascii_str assert upretty(expr) == unicode_str expr = Matrix(0, 2, lambda i, j: 0) ascii_str = "[]" unicode_str = "[]" assert pretty(expr) == ascii_str assert upretty(expr) == unicode_str expr = Matrix([[x**2 + 1, 1], [y, x + y]]) ascii_str_1 = \ """\ [ 2 ] [1 + x 1 ] [ ] [ y x + y]\ """ ascii_str_2 = \ """\ [ 2 ] [x + 1 1 ] [ ] [ y x + y]\ """ ucode_str_1 = \ """\ ⎡ 2 ⎤ ⎢1 + x 1 ⎥ ⎢ ⎥ ⎣ y x + y⎦\ """ ucode_str_2 = \ """\ ⎡ 2 ⎤ ⎢x + 1 1 ⎥ ⎢ ⎥ ⎣ y x + y⎦\ """ assert pretty(expr) in [ascii_str_1, ascii_str_2] assert upretty(expr) in [ucode_str_1, ucode_str_2] expr = Matrix([[x/y, y, th], [0, exp(I*k*ph), 1]]) ascii_str = \ """\ [x ] [- y theta] [y ] [ ] [ I*k*phi ] [0 e 1 ]\ """ ucode_str = \ """\ ⎡x ⎤ ⎢─ y θ⎥ ⎢y ⎥ ⎢ ⎥ ⎢ ⅈ⋅k⋅φ ⎥ ⎣0 ℯ 1⎦\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str unicode_str = \ """\ ⎡v̇_msc_00 0 0 ⎤ ⎢ ⎥ ⎢ 0 v̇_msc_01 0 ⎥ ⎢ ⎥ ⎣ 0 0 v̇_msc_02⎦\ """ expr = diag(*MatrixSymbol('vdot_msc',1,3)) assert upretty(expr) == unicode_str def test_pretty_ndim_arrays(): x, y, z, w = symbols("x y z w") for ArrayType in (ImmutableDenseNDimArray, ImmutableSparseNDimArray, MutableDenseNDimArray, MutableSparseNDimArray): # Basic: scalar array M = ArrayType(x) assert pretty(M) == "x" assert upretty(M) == "x" M = ArrayType([[1/x, y], [z, w]]) M1 = ArrayType([1/x, y, z]) M2 = tensorproduct(M1, M) M3 = tensorproduct(M, M) ascii_str = \ """\ [1 ]\n\ [- y]\n\ [x ]\n\ [ ]\n\ [z w]\ """ ucode_str = \ """\ ⎡1 ⎤\n\ ⎢─ y⎥\n\ ⎢x ⎥\n\ ⎢ ⎥\n\ ⎣z w⎦\ """ assert pretty(M) == ascii_str assert upretty(M) == ucode_str ascii_str = \ """\ [1 ]\n\ [- y z]\n\ [x ]\ """ ucode_str = \ """\ ⎡1 ⎤\n\ ⎢─ y z⎥\n\ ⎣x ⎦\ """ assert pretty(M1) == ascii_str assert upretty(M1) == ucode_str ascii_str = \ """\ [[1 y] ]\n\ [[-- -] [z ]]\n\ [[ 2 x] [ y 2 ] [- y*z]]\n\ [[x ] [ - y ] [x ]]\n\ [[ ] [ x ] [ ]]\n\ [[z w] [ ] [ 2 ]]\n\ [[- -] [y*z w*y] [z w*z]]\n\ [[x x] ]\ """ ucode_str = \ """\ ⎡⎡1 y⎤ ⎤\n\ ⎢⎢── ─⎥ ⎡z ⎤⎥\n\ ⎢⎢ 2 x⎥ ⎡ y 2 ⎤ ⎢─ y⋅z⎥⎥\n\ ⎢⎢x ⎥ ⎢ ─ y ⎥ ⎢x ⎥⎥\n\ ⎢⎢ ⎥ ⎢ x ⎥ ⎢ ⎥⎥\n\ ⎢⎢z w⎥ ⎢ ⎥ ⎢ 2 ⎥⎥\n\ ⎢⎢─ ─⎥ ⎣y⋅z w⋅y⎦ ⎣z w⋅z⎦⎥\n\ ⎣⎣x x⎦ ⎦\ """ assert pretty(M2) == ascii_str assert upretty(M2) == ucode_str ascii_str = \ """\ [ [1 y] ]\n\ [ [-- -] ]\n\ [ [ 2 x] [ y 2 ]]\n\ [ [x ] [ - y ]]\n\ [ [ ] [ x ]]\n\ [ [z w] [ ]]\n\ [ [- -] [y*z w*y]]\n\ [ [x x] ]\n\ [ ]\n\ [[z ] [ w ]]\n\ [[- y*z] [ - w*y]]\n\ [[x ] [ x ]]\n\ [[ ] [ ]]\n\ [[ 2 ] [ 2 ]]\n\ [[z w*z] [w*z w ]]\ """ ucode_str = \ """\ ⎡ ⎡1 y⎤ ⎤\n\ ⎢ ⎢── ─⎥ ⎥\n\ ⎢ ⎢ 2 x⎥ ⎡ y 2 ⎤⎥\n\ ⎢ ⎢x ⎥ ⎢ ─ y ⎥⎥\n\ ⎢ ⎢ ⎥ ⎢ x ⎥⎥\n\ ⎢ ⎢z w⎥ ⎢ ⎥⎥\n\ ⎢ ⎢─ ─⎥ ⎣y⋅z w⋅y⎦⎥\n\ ⎢ ⎣x x⎦ ⎥\n\ ⎢ ⎥\n\ ⎢⎡z ⎤ ⎡ w ⎤⎥\n\ ⎢⎢─ y⋅z⎥ ⎢ ─ w⋅y⎥⎥\n\ ⎢⎢x ⎥ ⎢ x ⎥⎥\n\ ⎢⎢ ⎥ ⎢ ⎥⎥\n\ ⎢⎢ 2 ⎥ ⎢ 2 ⎥⎥\n\ ⎣⎣z w⋅z⎦ ⎣w⋅z w ⎦⎦\ """ assert pretty(M3) == ascii_str assert upretty(M3) == ucode_str Mrow = ArrayType([[x, y, 1 / z]]) Mcolumn = ArrayType([[x], [y], [1 / z]]) Mcol2 = ArrayType([Mcolumn.tolist()]) ascii_str = \ """\ [[ 1]]\n\ [[x y -]]\n\ [[ z]]\ """ ucode_str = \ """\ ⎡⎡ 1⎤⎤\n\ ⎢⎢x y ─⎥⎥\n\ ⎣⎣ z⎦⎦\ """ assert pretty(Mrow) == ascii_str assert upretty(Mrow) == ucode_str ascii_str = \ """\ [x]\n\ [ ]\n\ [y]\n\ [ ]\n\ [1]\n\ [-]\n\ [z]\ """ ucode_str = \ """\ ⎡x⎤\n\ ⎢ ⎥\n\ ⎢y⎥\n\ ⎢ ⎥\n\ ⎢1⎥\n\ ⎢─⎥\n\ ⎣z⎦\ """ assert pretty(Mcolumn) == ascii_str assert upretty(Mcolumn) == ucode_str ascii_str = \ """\ [[x]]\n\ [[ ]]\n\ [[y]]\n\ [[ ]]\n\ [[1]]\n\ [[-]]\n\ [[z]]\ """ ucode_str = \ """\ ⎡⎡x⎤⎤\n\ ⎢⎢ ⎥⎥\n\ ⎢⎢y⎥⎥\n\ ⎢⎢ ⎥⎥\n\ ⎢⎢1⎥⎥\n\ ⎢⎢─⎥⎥\n\ ⎣⎣z⎦⎦\ """ assert pretty(Mcol2) == ascii_str assert upretty(Mcol2) == ucode_str def test_tensor_TensorProduct(): A = MatrixSymbol("A", 3, 3) B = MatrixSymbol("B", 3, 3) assert upretty(TensorProduct(A, B)) == "A\u2297B" assert upretty(TensorProduct(A, B, A)) == "A\u2297B\u2297A" def test_diffgeom_print_WedgeProduct(): from sympy.diffgeom.rn import R2 from sympy.diffgeom import WedgeProduct wp = WedgeProduct(R2.dx, R2.dy) assert upretty(wp) == "ⅆ x∧ⅆ y" def test_Adjoint(): X = MatrixSymbol('X', 2, 2) Y = MatrixSymbol('Y', 2, 2) assert pretty(Adjoint(X)) == " +\nX " assert pretty(Adjoint(X + Y)) == " +\n(X + Y) " assert pretty(Adjoint(X) + Adjoint(Y)) == " + +\nX + Y " assert pretty(Adjoint(X*Y)) == " +\n(X*Y) " assert pretty(Adjoint(Y)*Adjoint(X)) == " + +\nY *X " assert pretty(Adjoint(X**2)) == " +\n/ 2\\ \n\\X / " assert pretty(Adjoint(X)**2) == " 2\n/ +\\ \n\\X / " assert pretty(Adjoint(Inverse(X))) == " +\n/ -1\\ \n\\X / " assert pretty(Inverse(Adjoint(X))) == " -1\n/ +\\ \n\\X / " assert pretty(Adjoint(Transpose(X))) == " +\n/ T\\ \n\\X / " assert pretty(Transpose(Adjoint(X))) == " T\n/ +\\ \n\\X / " assert upretty(Adjoint(X)) == " †\nX " assert upretty(Adjoint(X + Y)) == " †\n(X + Y) " assert upretty(Adjoint(X) + Adjoint(Y)) == " † †\nX + Y " assert upretty(Adjoint(X*Y)) == " †\n(X⋅Y) " assert upretty(Adjoint(Y)*Adjoint(X)) == " † †\nY ⋅X " assert upretty(Adjoint(X**2)) == \ " †\n⎛ 2⎞ \n⎝X ⎠ " assert upretty(Adjoint(X)**2) == \ " 2\n⎛ †⎞ \n⎝X ⎠ " assert upretty(Adjoint(Inverse(X))) == \ " †\n⎛ -1⎞ \n⎝X ⎠ " assert upretty(Inverse(Adjoint(X))) == \ " -1\n⎛ †⎞ \n⎝X ⎠ " assert upretty(Adjoint(Transpose(X))) == \ " †\n⎛ T⎞ \n⎝X ⎠ " assert upretty(Transpose(Adjoint(X))) == \ " T\n⎛ †⎞ \n⎝X ⎠ " def test_pretty_Trace_issue_9044(): X = Matrix([[1, 2], [3, 4]]) Y = Matrix([[2, 4], [6, 8]]) ascii_str_1 = \ """\ /[1 2]\\ tr|[ ]| \\[3 4]/\ """ ucode_str_1 = \ """\ ⎛⎡1 2⎤⎞ tr⎜⎢ ⎥⎟ ⎝⎣3 4⎦⎠\ """ ascii_str_2 = \ """\ /[1 2]\\ /[2 4]\\ tr|[ ]| + tr|[ ]| \\[3 4]/ \\[6 8]/\ """ ucode_str_2 = \ """\ ⎛⎡1 2⎤⎞ ⎛⎡2 4⎤⎞ tr⎜⎢ ⎥⎟ + tr⎜⎢ ⎥⎟ ⎝⎣3 4⎦⎠ ⎝⎣6 8⎦⎠\ """ assert pretty(Trace(X)) == ascii_str_1 assert upretty(Trace(X)) == ucode_str_1 assert pretty(Trace(X) + Trace(Y)) == ascii_str_2 assert upretty(Trace(X) + Trace(Y)) == ucode_str_2 def test_MatrixSlice(): n = Symbol('n', integer=True) x, y, z, w, t, = symbols('x y z w t') X = MatrixSymbol('X', n, n) Y = MatrixSymbol('Y', 10, 10) Z = MatrixSymbol('Z', 10, 10) expr = MatrixSlice(X, (None, None, None), (None, None, None)) assert pretty(expr) == upretty(expr) == 'X[:, :]' expr = X[x:x + 1, y:y + 1] assert pretty(expr) == upretty(expr) == 'X[x:x + 1, y:y + 1]' expr = X[x:x + 1:2, y:y + 1:2] assert pretty(expr) == upretty(expr) == 'X[x:x + 1:2, y:y + 1:2]' expr = X[:x, y:] assert pretty(expr) == upretty(expr) == 'X[:x, y:]' expr = X[:x, y:] assert pretty(expr) == upretty(expr) == 'X[:x, y:]' expr = X[x:, :y] assert pretty(expr) == upretty(expr) == 'X[x:, :y]' expr = X[x:y, z:w] assert pretty(expr) == upretty(expr) == 'X[x:y, z:w]' expr = X[x:y:t, w:t:x] assert pretty(expr) == upretty(expr) == 'X[x:y:t, w:t:x]' expr = X[x::y, t::w] assert pretty(expr) == upretty(expr) == 'X[x::y, t::w]' expr = X[:x:y, :t:w] assert pretty(expr) == upretty(expr) == 'X[:x:y, :t:w]' expr = X[::x, ::y] assert pretty(expr) == upretty(expr) == 'X[::x, ::y]' expr = MatrixSlice(X, (0, None, None), (0, None, None)) assert pretty(expr) == upretty(expr) == 'X[:, :]' expr = MatrixSlice(X, (None, n, None), (None, n, None)) assert pretty(expr) == upretty(expr) == 'X[:, :]' expr = MatrixSlice(X, (0, n, None), (0, n, None)) assert pretty(expr) == upretty(expr) == 'X[:, :]' expr = MatrixSlice(X, (0, n, 2), (0, n, 2)) assert pretty(expr) == upretty(expr) == 'X[::2, ::2]' expr = X[1:2:3, 4:5:6] assert pretty(expr) == upretty(expr) == 'X[1:2:3, 4:5:6]' expr = X[1:3:5, 4:6:8] assert pretty(expr) == upretty(expr) == 'X[1:3:5, 4:6:8]' expr = X[1:10:2] assert pretty(expr) == upretty(expr) == 'X[1:10:2, :]' expr = Y[:5, 1:9:2] assert pretty(expr) == upretty(expr) == 'Y[:5, 1:9:2]' expr = Y[:5, 1:10:2] assert pretty(expr) == upretty(expr) == 'Y[:5, 1::2]' expr = Y[5, :5:2] assert pretty(expr) == upretty(expr) == 'Y[5:6, :5:2]' expr = X[0:1, 0:1] assert pretty(expr) == upretty(expr) == 'X[:1, :1]' expr = X[0:1:2, 0:1:2] assert pretty(expr) == upretty(expr) == 'X[:1:2, :1:2]' expr = (Y + Z)[2:, 2:] assert pretty(expr) == upretty(expr) == '(Y + Z)[2:, 2:]' def test_MatrixExpressions(): n = Symbol('n', integer=True) X = MatrixSymbol('X', n, n) assert pretty(X) == upretty(X) == "X" # Apply function elementwise (`ElementwiseApplyFunc`): expr = (X.T*X).applyfunc(sin) ascii_str = """\ / T \\\n\ (d -> sin(d)).\\X *X/\ """ ucode_str = """\ ⎛ T ⎞\n\ (d ↦ sin(d))˳⎝X ⋅X⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str lamda = Lambda(x, 1/x) expr = (n*X).applyfunc(lamda) ascii_str = """\ / 1\\ \n\ |x -> -|.(n*X)\n\ \\ x/ \ """ ucode_str = """\ ⎛ 1⎞ \n\ ⎜x ↦ ─⎟˳(n⋅X)\n\ ⎝ x⎠ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_dotproduct(): from sympy.matrices.expressions.dotproduct import DotProduct n = symbols("n", integer=True) A = MatrixSymbol('A', n, 1) B = MatrixSymbol('B', n, 1) C = Matrix(1, 3, [1, 2, 3]) D = Matrix(1, 3, [1, 3, 4]) assert pretty(DotProduct(A, B)) == "A*B" assert pretty(DotProduct(C, D)) == "[1 2 3]*[1 3 4]" assert upretty(DotProduct(A, B)) == "A⋅B" assert upretty(DotProduct(C, D)) == "[1 2 3]⋅[1 3 4]" def test_pretty_piecewise(): expr = Piecewise((x, x < 1), (x**2, True)) ascii_str = \ """\ /x for x < 1\n\ | \n\ < 2 \n\ |x otherwise\n\ \\ \ """ ucode_str = \ """\ ⎧x for x < 1\n\ ⎪ \n\ ⎨ 2 \n\ ⎪x otherwise\n\ ⎩ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -Piecewise((x, x < 1), (x**2, True)) ascii_str = \ """\ //x for x < 1\\\n\ || |\n\ -|< 2 |\n\ ||x otherwise|\n\ \\\\ /\ """ ucode_str = \ """\ ⎛⎧x for x < 1⎞\n\ ⎜⎪ ⎟\n\ -⎜⎨ 2 ⎟\n\ ⎜⎪x otherwise⎟\n\ ⎝⎩ ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = x + Piecewise((x, x > 0), (y, True)) + Piecewise((x/y, x < 2), (y**2, x > 2), (1, True)) + 1 ascii_str = \ """\ //x \\ \n\ ||- for x < 2| \n\ ||y | \n\ //x for x > 0\\ || | \n\ x + |< | + |< 2 | + 1\n\ \\\\y otherwise/ ||y for x > 2| \n\ || | \n\ ||1 otherwise| \n\ \\\\ / \ """ ucode_str = \ """\ ⎛⎧x ⎞ \n\ ⎜⎪─ for x < 2⎟ \n\ ⎜⎪y ⎟ \n\ ⎛⎧x for x > 0⎞ ⎜⎪ ⎟ \n\ x + ⎜⎨ ⎟ + ⎜⎨ 2 ⎟ + 1\n\ ⎝⎩y otherwise⎠ ⎜⎪y for x > 2⎟ \n\ ⎜⎪ ⎟ \n\ ⎜⎪1 otherwise⎟ \n\ ⎝⎩ ⎠ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = x - Piecewise((x, x > 0), (y, True)) + Piecewise((x/y, x < 2), (y**2, x > 2), (1, True)) + 1 ascii_str = \ """\ //x \\ \n\ ||- for x < 2| \n\ ||y | \n\ //x for x > 0\\ || | \n\ x - |< | + |< 2 | + 1\n\ \\\\y otherwise/ ||y for x > 2| \n\ || | \n\ ||1 otherwise| \n\ \\\\ / \ """ ucode_str = \ """\ ⎛⎧x ⎞ \n\ ⎜⎪─ for x < 2⎟ \n\ ⎜⎪y ⎟ \n\ ⎛⎧x for x > 0⎞ ⎜⎪ ⎟ \n\ x - ⎜⎨ ⎟ + ⎜⎨ 2 ⎟ + 1\n\ ⎝⎩y otherwise⎠ ⎜⎪y for x > 2⎟ \n\ ⎜⎪ ⎟ \n\ ⎜⎪1 otherwise⎟ \n\ ⎝⎩ ⎠ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = x*Piecewise((x, x > 0), (y, True)) ascii_str = \ """\ //x for x > 0\\\n\ x*|< |\n\ \\\\y otherwise/\ """ ucode_str = \ """\ ⎛⎧x for x > 0⎞\n\ x⋅⎜⎨ ⎟\n\ ⎝⎩y otherwise⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Piecewise((x, x > 0), (y, True))*Piecewise((x/y, x < 2), (y**2, x > 2), (1, True)) ascii_str = \ """\ //x \\\n\ ||- for x < 2|\n\ ||y |\n\ //x for x > 0\\ || |\n\ |< |*|< 2 |\n\ \\\\y otherwise/ ||y for x > 2|\n\ || |\n\ ||1 otherwise|\n\ \\\\ /\ """ ucode_str = \ """\ ⎛⎧x ⎞\n\ ⎜⎪─ for x < 2⎟\n\ ⎜⎪y ⎟\n\ ⎛⎧x for x > 0⎞ ⎜⎪ ⎟\n\ ⎜⎨ ⎟⋅⎜⎨ 2 ⎟\n\ ⎝⎩y otherwise⎠ ⎜⎪y for x > 2⎟\n\ ⎜⎪ ⎟\n\ ⎜⎪1 otherwise⎟\n\ ⎝⎩ ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -Piecewise((x, x > 0), (y, True))*Piecewise((x/y, x < 2), (y**2, x > 2), (1, True)) ascii_str = \ """\ //x \\\n\ ||- for x < 2|\n\ ||y |\n\ //x for x > 0\\ || |\n\ -|< |*|< 2 |\n\ \\\\y otherwise/ ||y for x > 2|\n\ || |\n\ ||1 otherwise|\n\ \\\\ /\ """ ucode_str = \ """\ ⎛⎧x ⎞\n\ ⎜⎪─ for x < 2⎟\n\ ⎜⎪y ⎟\n\ ⎛⎧x for x > 0⎞ ⎜⎪ ⎟\n\ -⎜⎨ ⎟⋅⎜⎨ 2 ⎟\n\ ⎝⎩y otherwise⎠ ⎜⎪y for x > 2⎟\n\ ⎜⎪ ⎟\n\ ⎜⎪1 otherwise⎟\n\ ⎝⎩ ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Piecewise((0, Abs(1/y) < 1), (1, Abs(y) < 1), (y*meijerg(((2, 1), ()), ((), (1, 0)), 1/y), True)) ascii_str = \ """\ / 1 \n\ | 0 for --- < 1\n\ | |y| \n\ | \n\ < 1 for |y| < 1\n\ | \n\ | __0, 2 /2, 1 | 1\\ \n\ |y*/__ | | -| otherwise \n\ \\ \\_|2, 2 \\ 1, 0 | y/ \ """ ucode_str = \ """\ ⎧ 1 \n\ ⎪ 0 for ─── < 1\n\ ⎪ │y│ \n\ ⎪ \n\ ⎨ 1 for │y│ < 1\n\ ⎪ \n\ ⎪ ╭─╮0, 2 ⎛2, 1 │ 1⎞ \n\ ⎪y⋅│╶┐ ⎜ │ ─⎟ otherwise \n\ ⎩ ╰─╯2, 2 ⎝ 1, 0 │ y⎠ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str # XXX: We have to use evaluate=False here because Piecewise._eval_power # denests the power. expr = Pow(Piecewise((x, x > 0), (y, True)), 2, evaluate=False) ascii_str = \ """\ 2\n\ //x for x > 0\\ \n\ |< | \n\ \\\\y otherwise/ \ """ ucode_str = \ """\ 2\n\ ⎛⎧x for x > 0⎞ \n\ ⎜⎨ ⎟ \n\ ⎝⎩y otherwise⎠ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_ITE(): expr = ITE(x, y, z) assert pretty(expr) == ( '/y for x \n' '< \n' '\\z otherwise' ) assert upretty(expr) == """\ ⎧y for x \n\ ⎨ \n\ ⎩z otherwise\ """ def test_pretty_seq(): expr = () ascii_str = \ """\ ()\ """ ucode_str = \ """\ ()\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = [] ascii_str = \ """\ []\ """ ucode_str = \ """\ []\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = {} expr_2 = {} ascii_str = \ """\ {}\ """ ucode_str = \ """\ {}\ """ assert pretty(expr) == ascii_str assert pretty(expr_2) == ascii_str assert upretty(expr) == ucode_str assert upretty(expr_2) == ucode_str expr = (1/x,) ascii_str = \ """\ 1 \n\ (-,)\n\ x \ """ ucode_str = \ """\ ⎛1 ⎞\n\ ⎜─,⎟\n\ ⎝x ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = [x**2, 1/x, x, y, sin(th)**2/cos(ph)**2] ascii_str = \ """\ 2 \n\ 2 1 sin (theta) \n\ [x , -, x, y, -----------]\n\ x 2 \n\ cos (phi) \ """ ucode_str = \ """\ ⎡ 2 ⎤\n\ ⎢ 2 1 sin (θ)⎥\n\ ⎢x , ─, x, y, ───────⎥\n\ ⎢ x 2 ⎥\n\ ⎣ cos (φ)⎦\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (x**2, 1/x, x, y, sin(th)**2/cos(ph)**2) ascii_str = \ """\ 2 \n\ 2 1 sin (theta) \n\ (x , -, x, y, -----------)\n\ x 2 \n\ cos (phi) \ """ ucode_str = \ """\ ⎛ 2 ⎞\n\ ⎜ 2 1 sin (θ)⎟\n\ ⎜x , ─, x, y, ───────⎟\n\ ⎜ x 2 ⎟\n\ ⎝ cos (φ)⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Tuple(x**2, 1/x, x, y, sin(th)**2/cos(ph)**2) ascii_str = \ """\ 2 \n\ 2 1 sin (theta) \n\ (x , -, x, y, -----------)\n\ x 2 \n\ cos (phi) \ """ ucode_str = \ """\ ⎛ 2 ⎞\n\ ⎜ 2 1 sin (θ)⎟\n\ ⎜x , ─, x, y, ───────⎟\n\ ⎜ x 2 ⎟\n\ ⎝ cos (φ)⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = {x: sin(x)} expr_2 = Dict({x: sin(x)}) ascii_str = \ """\ {x: sin(x)}\ """ ucode_str = \ """\ {x: sin(x)}\ """ assert pretty(expr) == ascii_str assert pretty(expr_2) == ascii_str assert upretty(expr) == ucode_str assert upretty(expr_2) == ucode_str expr = {1/x: 1/y, x: sin(x)**2} expr_2 = Dict({1/x: 1/y, x: sin(x)**2}) ascii_str = \ """\ 1 1 2 \n\ {-: -, x: sin (x)}\n\ x y \ """ ucode_str = \ """\ ⎧1 1 2 ⎫\n\ ⎨─: ─, x: sin (x)⎬\n\ ⎩x y ⎭\ """ assert pretty(expr) == ascii_str assert pretty(expr_2) == ascii_str assert upretty(expr) == ucode_str assert upretty(expr_2) == ucode_str # There used to be a bug with pretty-printing sequences of even height. expr = [x**2] ascii_str = \ """\ 2 \n\ [x ]\ """ ucode_str = \ """\ ⎡ 2⎤\n\ ⎣x ⎦\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (x**2,) ascii_str = \ """\ 2 \n\ (x ,)\ """ ucode_str = \ """\ ⎛ 2 ⎞\n\ ⎝x ,⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Tuple(x**2) ascii_str = \ """\ 2 \n\ (x ,)\ """ ucode_str = \ """\ ⎛ 2 ⎞\n\ ⎝x ,⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = {x**2: 1} expr_2 = Dict({x**2: 1}) ascii_str = \ """\ 2 \n\ {x : 1}\ """ ucode_str = \ """\ ⎧ 2 ⎫\n\ ⎨x : 1⎬\n\ ⎩ ⎭\ """ assert pretty(expr) == ascii_str assert pretty(expr_2) == ascii_str assert upretty(expr) == ucode_str assert upretty(expr_2) == ucode_str def test_any_object_in_sequence(): # Cf. issue 5306 b1 = Basic() b2 = Basic(Basic()) expr = [b2, b1] assert pretty(expr) == "[Basic(Basic()), Basic()]" assert upretty(expr) == "[Basic(Basic()), Basic()]" expr = {b2, b1} assert pretty(expr) == "{Basic(), Basic(Basic())}" assert upretty(expr) == "{Basic(), Basic(Basic())}" expr = {b2: b1, b1: b2} expr2 = Dict({b2: b1, b1: b2}) assert pretty(expr) == "{Basic(): Basic(Basic()), Basic(Basic()): Basic()}" assert pretty( expr2) == "{Basic(): Basic(Basic()), Basic(Basic()): Basic()}" assert upretty( expr) == "{Basic(): Basic(Basic()), Basic(Basic()): Basic()}" assert upretty( expr2) == "{Basic(): Basic(Basic()), Basic(Basic()): Basic()}" def test_print_builtin_set(): assert pretty(set()) == 'set()' assert upretty(set()) == 'set()' assert pretty(frozenset()) == 'frozenset()' assert upretty(frozenset()) == 'frozenset()' s1 = {1/x, x} s2 = frozenset(s1) assert pretty(s1) == \ """\ 1 \n\ {-, x} x \ """ assert upretty(s1) == \ """\ ⎧1 ⎫ ⎨─, x⎬ ⎩x ⎭\ """ assert pretty(s2) == \ """\ 1 \n\ frozenset({-, x}) x \ """ assert upretty(s2) == \ """\ ⎛⎧1 ⎫⎞ frozenset⎜⎨─, x⎬⎟ ⎝⎩x ⎭⎠\ """ def test_pretty_sets(): s = FiniteSet assert pretty(s(*[x*y, x**2])) == \ """\ 2 \n\ {x , x*y}\ """ assert pretty(s(*range(1, 6))) == "{1, 2, 3, 4, 5}" assert pretty(s(*range(1, 13))) == "{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}" assert pretty({x*y, x**2}) == \ """\ 2 \n\ {x , x*y}\ """ assert pretty(set(range(1, 6))) == "{1, 2, 3, 4, 5}" assert pretty(set(range(1, 13))) == \ "{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}" assert pretty(frozenset([x*y, x**2])) == \ """\ 2 \n\ frozenset({x , x*y})\ """ assert pretty(frozenset(range(1, 6))) == "frozenset({1, 2, 3, 4, 5})" assert pretty(frozenset(range(1, 13))) == \ "frozenset({1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12})" assert pretty(Range(0, 3, 1)) == '{0, 1, 2}' ascii_str = '{0, 1, ..., 29}' ucode_str = '{0, 1, …, 29}' assert pretty(Range(0, 30, 1)) == ascii_str assert upretty(Range(0, 30, 1)) == ucode_str ascii_str = '{30, 29, ..., 2}' ucode_str = '{30, 29, …, 2}' assert pretty(Range(30, 1, -1)) == ascii_str assert upretty(Range(30, 1, -1)) == ucode_str ascii_str = '{0, 2, ...}' ucode_str = '{0, 2, …}' assert pretty(Range(0, oo, 2)) == ascii_str assert upretty(Range(0, oo, 2)) == ucode_str ascii_str = '{..., 2, 0}' ucode_str = '{…, 2, 0}' assert pretty(Range(oo, -2, -2)) == ascii_str assert upretty(Range(oo, -2, -2)) == ucode_str ascii_str = '{-2, -3, ...}' ucode_str = '{-2, -3, …}' assert pretty(Range(-2, -oo, -1)) == ascii_str assert upretty(Range(-2, -oo, -1)) == ucode_str def test_pretty_SetExpr(): iv = Interval(1, 3) se = SetExpr(iv) ascii_str = "SetExpr([1, 3])" ucode_str = "SetExpr([1, 3])" assert pretty(se) == ascii_str assert upretty(se) == ucode_str def test_pretty_ImageSet(): imgset = ImageSet(Lambda((x, y), x + y), {1, 2, 3}, {3, 4}) ascii_str = '{x + y | x in {1, 2, 3}, y in {3, 4}}' ucode_str = '{x + y │ x ∊ {1, 2, 3}, y ∊ {3, 4}}' assert pretty(imgset) == ascii_str assert upretty(imgset) == ucode_str imgset = ImageSet(Lambda(((x, y),), x + y), ProductSet({1, 2, 3}, {3, 4})) ascii_str = '{x + y | (x, y) in {1, 2, 3} x {3, 4}}' ucode_str = '{x + y │ (x, y) ∊ {1, 2, 3} × {3, 4}}' assert pretty(imgset) == ascii_str assert upretty(imgset) == ucode_str imgset = ImageSet(Lambda(x, x**2), S.Naturals) ascii_str = '''\ 2 \n\ {x | x in Naturals}''' ucode_str = '''\ ⎧ 2 │ ⎫\n\ ⎨x │ x ∊ ℕ⎬\n\ ⎩ │ ⎭''' assert pretty(imgset) == ascii_str assert upretty(imgset) == ucode_str # TODO: The "x in N" parts below should be centered independently of the # 1/x**2 fraction imgset = ImageSet(Lambda(x, 1/x**2), S.Naturals) ascii_str = '''\ 1 \n\ {-- | x in Naturals} 2 \n\ x ''' ucode_str = '''\ ⎧1 │ ⎫\n\ ⎪── │ x ∊ ℕ⎪\n\ ⎨ 2 │ ⎬\n\ ⎪x │ ⎪\n\ ⎩ │ ⎭''' assert pretty(imgset) == ascii_str assert upretty(imgset) == ucode_str imgset = ImageSet(Lambda((x, y), 1/(x + y)**2), S.Naturals, S.Naturals) ascii_str = '''\ 1 \n\ {-------- | x in Naturals, y in Naturals} 2 \n\ (x + y) ''' ucode_str = '''\ ⎧ 1 │ ⎫ ⎪──────── │ x ∊ ℕ, y ∊ ℕ⎪ ⎨ 2 │ ⎬ ⎪(x + y) │ ⎪ ⎩ │ ⎭''' assert pretty(imgset) == ascii_str assert upretty(imgset) == ucode_str def test_pretty_ConditionSet(): ascii_str = '{x | x in (-oo, oo) and sin(x) = 0}' ucode_str = '{x │ x ∊ ℝ ∧ (sin(x) = 0)}' assert pretty(ConditionSet(x, Eq(sin(x), 0), S.Reals)) == ascii_str assert upretty(ConditionSet(x, Eq(sin(x), 0), S.Reals)) == ucode_str assert pretty(ConditionSet(x, Contains(x, S.Reals, evaluate=False), FiniteSet(1))) == '{1}' assert upretty(ConditionSet(x, Contains(x, S.Reals, evaluate=False), FiniteSet(1))) == '{1}' assert pretty(ConditionSet(x, And(x > 1, x < -1), FiniteSet(1, 2, 3))) == "EmptySet" assert upretty(ConditionSet(x, And(x > 1, x < -1), FiniteSet(1, 2, 3))) == "∅" assert pretty(ConditionSet(x, Or(x > 1, x < -1), FiniteSet(1, 2))) == '{2}' assert upretty(ConditionSet(x, Or(x > 1, x < -1), FiniteSet(1, 2))) == '{2}' condset = ConditionSet(x, 1/x**2 > 0) ascii_str = '''\ 1 \n\ {x | -- > 0} 2 \n\ x ''' ucode_str = '''\ ⎧ │ ⎛1 ⎞⎫ ⎪x │ ⎜── > 0⎟⎪ ⎨ │ ⎜ 2 ⎟⎬ ⎪ │ ⎝x ⎠⎪ ⎩ │ ⎭''' assert pretty(condset) == ascii_str assert upretty(condset) == ucode_str condset = ConditionSet(x, 1/x**2 > 0, S.Reals) ascii_str = '''\ 1 \n\ {x | x in (-oo, oo) and -- > 0} 2 \n\ x ''' ucode_str = '''\ ⎧ │ ⎛1 ⎞⎫ ⎪x │ x ∊ ℝ ∧ ⎜── > 0⎟⎪ ⎨ │ ⎜ 2 ⎟⎬ ⎪ │ ⎝x ⎠⎪ ⎩ │ ⎭''' assert pretty(condset) == ascii_str assert upretty(condset) == ucode_str def test_pretty_ComplexRegion(): from sympy.sets.fancysets import ComplexRegion cregion = ComplexRegion(Interval(3, 5)*Interval(4, 6)) ascii_str = '{x + y*I | x, y in [3, 5] x [4, 6]}' ucode_str = '{x + y⋅ⅈ │ x, y ∊ [3, 5] × [4, 6]}' assert pretty(cregion) == ascii_str assert upretty(cregion) == ucode_str cregion = ComplexRegion(Interval(0, 1)*Interval(0, 2*pi), polar=True) ascii_str = '{r*(I*sin(theta) + cos(theta)) | r, theta in [0, 1] x [0, 2*pi)}' ucode_str = '{r⋅(ⅈ⋅sin(θ) + cos(θ)) │ r, θ ∊ [0, 1] × [0, 2⋅π)}' assert pretty(cregion) == ascii_str assert upretty(cregion) == ucode_str cregion = ComplexRegion(Interval(3, 1/a**2)*Interval(4, 6)) ascii_str = '''\ 1 \n\ {x + y*I | x, y in [3, --] x [4, 6]} 2 \n\ a ''' ucode_str = '''\ ⎧ │ ⎡ 1 ⎤ ⎫ ⎪x + y⋅ⅈ │ x, y ∊ ⎢3, ──⎥ × [4, 6]⎪ ⎨ │ ⎢ 2⎥ ⎬ ⎪ │ ⎣ a ⎦ ⎪ ⎩ │ ⎭''' assert pretty(cregion) == ascii_str assert upretty(cregion) == ucode_str cregion = ComplexRegion(Interval(0, 1/a**2)*Interval(0, 2*pi), polar=True) ascii_str = '''\ 1 \n\ {r*(I*sin(theta) + cos(theta)) | r, theta in [0, --] x [0, 2*pi)} 2 \n\ a ''' ucode_str = '''\ ⎧ │ ⎡ 1 ⎤ ⎫ ⎪r⋅(ⅈ⋅sin(θ) + cos(θ)) │ r, θ ∊ ⎢0, ──⎥ × [0, 2⋅π)⎪ ⎨ │ ⎢ 2⎥ ⎬ ⎪ │ ⎣ a ⎦ ⎪ ⎩ │ ⎭''' assert pretty(cregion) == ascii_str assert upretty(cregion) == ucode_str def test_pretty_Union_issue_10414(): a, b = Interval(2, 3), Interval(4, 7) ucode_str = '[2, 3] ∪ [4, 7]' ascii_str = '[2, 3] U [4, 7]' assert upretty(Union(a, b)) == ucode_str assert pretty(Union(a, b)) == ascii_str def test_pretty_Intersection_issue_10414(): x, y, z, w = symbols('x, y, z, w') a, b = Interval(x, y), Interval(z, w) ucode_str = '[x, y] ∩ [z, w]' ascii_str = '[x, y] n [z, w]' assert upretty(Intersection(a, b)) == ucode_str assert pretty(Intersection(a, b)) == ascii_str def test_ProductSet_exponent(): ucode_str = ' 1\n[0, 1] ' assert upretty(Interval(0, 1)**1) == ucode_str ucode_str = ' 2\n[0, 1] ' assert upretty(Interval(0, 1)**2) == ucode_str def test_ProductSet_parenthesis(): ucode_str = '([4, 7] × {1, 2}) ∪ ([2, 3] × [4, 7])' a, b = Interval(2, 3), Interval(4, 7) assert upretty(Union(a*b, b*FiniteSet(1, 2))) == ucode_str def test_ProductSet_prod_char_issue_10413(): ascii_str = '[2, 3] x [4, 7]' ucode_str = '[2, 3] × [4, 7]' a, b = Interval(2, 3), Interval(4, 7) assert pretty(a*b) == ascii_str assert upretty(a*b) == ucode_str def test_pretty_sequences(): s1 = SeqFormula(a**2, (0, oo)) s2 = SeqPer((1, 2)) ascii_str = '[0, 1, 4, 9, ...]' ucode_str = '[0, 1, 4, 9, …]' assert pretty(s1) == ascii_str assert upretty(s1) == ucode_str ascii_str = '[1, 2, 1, 2, ...]' ucode_str = '[1, 2, 1, 2, …]' assert pretty(s2) == ascii_str assert upretty(s2) == ucode_str s3 = SeqFormula(a**2, (0, 2)) s4 = SeqPer((1, 2), (0, 2)) ascii_str = '[0, 1, 4]' ucode_str = '[0, 1, 4]' assert pretty(s3) == ascii_str assert upretty(s3) == ucode_str ascii_str = '[1, 2, 1]' ucode_str = '[1, 2, 1]' assert pretty(s4) == ascii_str assert upretty(s4) == ucode_str s5 = SeqFormula(a**2, (-oo, 0)) s6 = SeqPer((1, 2), (-oo, 0)) ascii_str = '[..., 9, 4, 1, 0]' ucode_str = '[…, 9, 4, 1, 0]' assert pretty(s5) == ascii_str assert upretty(s5) == ucode_str ascii_str = '[..., 2, 1, 2, 1]' ucode_str = '[…, 2, 1, 2, 1]' assert pretty(s6) == ascii_str assert upretty(s6) == ucode_str ascii_str = '[1, 3, 5, 11, ...]' ucode_str = '[1, 3, 5, 11, …]' assert pretty(SeqAdd(s1, s2)) == ascii_str assert upretty(SeqAdd(s1, s2)) == ucode_str ascii_str = '[1, 3, 5]' ucode_str = '[1, 3, 5]' assert pretty(SeqAdd(s3, s4)) == ascii_str assert upretty(SeqAdd(s3, s4)) == ucode_str ascii_str = '[..., 11, 5, 3, 1]' ucode_str = '[…, 11, 5, 3, 1]' assert pretty(SeqAdd(s5, s6)) == ascii_str assert upretty(SeqAdd(s5, s6)) == ucode_str ascii_str = '[0, 2, 4, 18, ...]' ucode_str = '[0, 2, 4, 18, …]' assert pretty(SeqMul(s1, s2)) == ascii_str assert upretty(SeqMul(s1, s2)) == ucode_str ascii_str = '[0, 2, 4]' ucode_str = '[0, 2, 4]' assert pretty(SeqMul(s3, s4)) == ascii_str assert upretty(SeqMul(s3, s4)) == ucode_str ascii_str = '[..., 18, 4, 2, 0]' ucode_str = '[…, 18, 4, 2, 0]' assert pretty(SeqMul(s5, s6)) == ascii_str assert upretty(SeqMul(s5, s6)) == ucode_str # Sequences with symbolic limits, issue 12629 s7 = SeqFormula(a**2, (a, 0, x)) raises(NotImplementedError, lambda: pretty(s7)) raises(NotImplementedError, lambda: upretty(s7)) b = Symbol('b') s8 = SeqFormula(b*a**2, (a, 0, 2)) ascii_str = '[0, b, 4*b]' ucode_str = '[0, b, 4⋅b]' assert pretty(s8) == ascii_str assert upretty(s8) == ucode_str def test_pretty_FourierSeries(): f = fourier_series(x, (x, -pi, pi)) ascii_str = \ """\ 2*sin(3*x) \n\ 2*sin(x) - sin(2*x) + ---------- + ...\n\ 3 \ """ ucode_str = \ """\ 2⋅sin(3⋅x) \n\ 2⋅sin(x) - sin(2⋅x) + ────────── + …\n\ 3 \ """ assert pretty(f) == ascii_str assert upretty(f) == ucode_str def test_pretty_FormalPowerSeries(): f = fps(log(1 + x)) ascii_str = \ """\ oo \n\ ____ \n\ \\ ` \n\ \\ -k k \n\ \\ -(-1) *x \n\ / -----------\n\ / k \n\ /___, \n\ k = 1 \ """ ucode_str = \ """\ ∞ \n\ ____ \n\ ╲ \n\ ╲ -k k \n\ ╲ -(-1) ⋅x \n\ ╱ ───────────\n\ ╱ k \n\ ╱ \n\ ‾‾‾‾ \n\ k = 1 \ """ assert pretty(f) == ascii_str assert upretty(f) == ucode_str def test_pretty_limits(): expr = Limit(x, x, oo) ascii_str = \ """\ lim x\n\ x->oo \ """ ucode_str = \ """\ lim x\n\ x─→∞ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Limit(x**2, x, 0) ascii_str = \ """\ 2\n\ lim x \n\ x->0+ \ """ ucode_str = \ """\ 2\n\ lim x \n\ x─→0⁺ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Limit(1/x, x, 0) ascii_str = \ """\ 1\n\ lim -\n\ x->0+x\ """ ucode_str = \ """\ 1\n\ lim ─\n\ x─→0⁺x\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Limit(sin(x)/x, x, 0) ascii_str = \ """\ /sin(x)\\\n\ lim |------|\n\ x->0+\\ x /\ """ ucode_str = \ """\ ⎛sin(x)⎞\n\ lim ⎜──────⎟\n\ x─→0⁺⎝ x ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Limit(sin(x)/x, x, 0, "-") ascii_str = \ """\ /sin(x)\\\n\ lim |------|\n\ x->0-\\ x /\ """ ucode_str = \ """\ ⎛sin(x)⎞\n\ lim ⎜──────⎟\n\ x─→0⁻⎝ x ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Limit(x + sin(x), x, 0) ascii_str = \ """\ lim (x + sin(x))\n\ x->0+ \ """ ucode_str = \ """\ lim (x + sin(x))\n\ x─→0⁺ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Limit(x, x, 0)**2 ascii_str = \ """\ 2\n\ / lim x\\ \n\ \\x->0+ / \ """ ucode_str = \ """\ 2\n\ ⎛ lim x⎞ \n\ ⎝x─→0⁺ ⎠ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Limit(x*Limit(y/2,y,0), x, 0) ascii_str = \ """\ / /y\\\\\n\ lim |x* lim |-||\n\ x->0+\\ y->0+\\2//\ """ ucode_str = \ """\ ⎛ ⎛y⎞⎞\n\ lim ⎜x⋅ lim ⎜─⎟⎟\n\ x─→0⁺⎝ y─→0⁺⎝2⎠⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = 2*Limit(x*Limit(y/2,y,0), x, 0) ascii_str = \ """\ / /y\\\\\n\ 2* lim |x* lim |-||\n\ x->0+\\ y->0+\\2//\ """ ucode_str = \ """\ ⎛ ⎛y⎞⎞\n\ 2⋅ lim ⎜x⋅ lim ⎜─⎟⎟\n\ x─→0⁺⎝ y─→0⁺⎝2⎠⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Limit(sin(x), x, 0, dir='+-') ascii_str = \ """\ lim sin(x)\n\ x->0 \ """ ucode_str = \ """\ lim sin(x)\n\ x─→0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_ComplexRootOf(): expr = rootof(x**5 + 11*x - 2, 0) ascii_str = \ """\ / 5 \\\n\ CRootOf\\x + 11*x - 2, 0/\ """ ucode_str = \ """\ ⎛ 5 ⎞\n\ CRootOf⎝x + 11⋅x - 2, 0⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_RootSum(): expr = RootSum(x**5 + 11*x - 2, auto=False) ascii_str = \ """\ / 5 \\\n\ RootSum\\x + 11*x - 2/\ """ ucode_str = \ """\ ⎛ 5 ⎞\n\ RootSum⎝x + 11⋅x - 2⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = RootSum(x**5 + 11*x - 2, Lambda(z, exp(z))) ascii_str = \ """\ / 5 z\\\n\ RootSum\\x + 11*x - 2, z -> e /\ """ ucode_str = \ """\ ⎛ 5 z⎞\n\ RootSum⎝x + 11⋅x - 2, z ↦ ℯ ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_GroebnerBasis(): expr = groebner([], x, y) ascii_str = \ """\ GroebnerBasis([], x, y, domain=ZZ, order=lex)\ """ ucode_str = \ """\ GroebnerBasis([], x, y, domain=ℤ, order=lex)\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str F = [x**2 - 3*y - x + 1, y**2 - 2*x + y - 1] expr = groebner(F, x, y, order='grlex') ascii_str = \ """\ /[ 2 2 ] \\\n\ GroebnerBasis\\[x - x - 3*y + 1, y - 2*x + y - 1], x, y, domain=ZZ, order=grlex/\ """ ucode_str = \ """\ ⎛⎡ 2 2 ⎤ ⎞\n\ GroebnerBasis⎝⎣x - x - 3⋅y + 1, y - 2⋅x + y - 1⎦, x, y, domain=ℤ, order=grlex⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = expr.fglm('lex') ascii_str = \ """\ /[ 2 4 3 2 ] \\\n\ GroebnerBasis\\[2*x - y - y + 1, y + 2*y - 3*y - 16*y + 7], x, y, domain=ZZ, order=lex/\ """ ucode_str = \ """\ ⎛⎡ 2 4 3 2 ⎤ ⎞\n\ GroebnerBasis⎝⎣2⋅x - y - y + 1, y + 2⋅y - 3⋅y - 16⋅y + 7⎦, x, y, domain=ℤ, order=lex⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_UniversalSet(): assert pretty(S.UniversalSet) == "UniversalSet" assert upretty(S.UniversalSet) == '𝕌' def test_pretty_Boolean(): expr = Not(x, evaluate=False) assert pretty(expr) == "Not(x)" assert upretty(expr) == "¬x" expr = And(x, y) assert pretty(expr) == "And(x, y)" assert upretty(expr) == "x ∧ y" expr = Or(x, y) assert pretty(expr) == "Or(x, y)" assert upretty(expr) == "x ∨ y" syms = symbols('a:f') expr = And(*syms) assert pretty(expr) == "And(a, b, c, d, e, f)" assert upretty(expr) == "a ∧ b ∧ c ∧ d ∧ e ∧ f" expr = Or(*syms) assert pretty(expr) == "Or(a, b, c, d, e, f)" assert upretty(expr) == "a ∨ b ∨ c ∨ d ∨ e ∨ f" expr = Xor(x, y, evaluate=False) assert pretty(expr) == "Xor(x, y)" assert upretty(expr) == "x ⊻ y" expr = Nand(x, y, evaluate=False) assert pretty(expr) == "Nand(x, y)" assert upretty(expr) == "x ⊼ y" expr = Nor(x, y, evaluate=False) assert pretty(expr) == "Nor(x, y)" assert upretty(expr) == "x ⊽ y" expr = Implies(x, y, evaluate=False) assert pretty(expr) == "Implies(x, y)" assert upretty(expr) == "x → y" # don't sort args expr = Implies(y, x, evaluate=False) assert pretty(expr) == "Implies(y, x)" assert upretty(expr) == "y → x" expr = Equivalent(x, y, evaluate=False) assert pretty(expr) == "Equivalent(x, y)" assert upretty(expr) == "x ⇔ y" expr = Equivalent(y, x, evaluate=False) assert pretty(expr) == "Equivalent(x, y)" assert upretty(expr) == "x ⇔ y" def test_pretty_Domain(): expr = FF(23) assert pretty(expr) == "GF(23)" assert upretty(expr) == "ℤ₂₃" expr = ZZ assert pretty(expr) == "ZZ" assert upretty(expr) == "ℤ" expr = QQ assert pretty(expr) == "QQ" assert upretty(expr) == "ℚ" expr = RR assert pretty(expr) == "RR" assert upretty(expr) == "ℝ" expr = QQ[x] assert pretty(expr) == "QQ[x]" assert upretty(expr) == "ℚ[x]" expr = QQ[x, y] assert pretty(expr) == "QQ[x, y]" assert upretty(expr) == "ℚ[x, y]" expr = ZZ.frac_field(x) assert pretty(expr) == "ZZ(x)" assert upretty(expr) == "ℤ(x)" expr = ZZ.frac_field(x, y) assert pretty(expr) == "ZZ(x, y)" assert upretty(expr) == "ℤ(x, y)" expr = QQ.poly_ring(x, y, order=grlex) assert pretty(expr) == "QQ[x, y, order=grlex]" assert upretty(expr) == "ℚ[x, y, order=grlex]" expr = QQ.poly_ring(x, y, order=ilex) assert pretty(expr) == "QQ[x, y, order=ilex]" assert upretty(expr) == "ℚ[x, y, order=ilex]" def test_pretty_prec(): assert xpretty(S("0.3"), full_prec=True, wrap_line=False) == "0.300000000000000" assert xpretty(S("0.3"), full_prec="auto", wrap_line=False) == "0.300000000000000" assert xpretty(S("0.3"), full_prec=False, wrap_line=False) == "0.3" assert xpretty(S("0.3")*x, full_prec=True, use_unicode=False, wrap_line=False) in [ "0.300000000000000*x", "x*0.300000000000000" ] assert xpretty(S("0.3")*x, full_prec="auto", use_unicode=False, wrap_line=False) in [ "0.3*x", "x*0.3" ] assert xpretty(S("0.3")*x, full_prec=False, use_unicode=False, wrap_line=False) in [ "0.3*x", "x*0.3" ] def test_pprint(): import sys from io import StringIO fd = StringIO() sso = sys.stdout sys.stdout = fd try: pprint(pi, use_unicode=False, wrap_line=False) finally: sys.stdout = sso assert fd.getvalue() == 'pi\n' def test_pretty_class(): """Test that the printer dispatcher correctly handles classes.""" class C: pass # C has no .__class__ and this was causing problems class D: pass assert pretty( C ) == str( C ) assert pretty( D ) == str( D ) def test_pretty_no_wrap_line(): huge_expr = 0 for i in range(20): huge_expr += i*sin(i + x) assert xpretty(huge_expr ).find('\n') != -1 assert xpretty(huge_expr, wrap_line=False).find('\n') == -1 def test_settings(): raises(TypeError, lambda: pretty(S(4), method="garbage")) def test_pretty_sum(): from sympy.abc import x, a, b, k, m, n expr = Sum(k**k, (k, 0, n)) ascii_str = \ """\ n \n\ ___ \n\ \\ ` \n\ \\ k\n\ / k \n\ /__, \n\ k = 0 \ """ ucode_str = \ """\ n \n\ ___ \n\ ╲ \n\ ╲ k\n\ ╱ k \n\ ╱ \n\ ‾‾‾ \n\ k = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(k**k, (k, oo, n)) ascii_str = \ """\ n \n\ ___ \n\ \\ ` \n\ \\ k\n\ / k \n\ /__, \n\ k = oo \ """ ucode_str = \ """\ n \n\ ___ \n\ ╲ \n\ ╲ k\n\ ╱ k \n\ ╱ \n\ ‾‾‾ \n\ k = ∞ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(k**(Integral(x**n, (x, -oo, oo))), (k, 0, n**n)) ascii_str = \ """\ n \n\ n \n\ ______ \n\ \\ ` \n\ \\ oo \n\ \\ / \n\ \\ | \n\ \\ | n \n\ ) | x dx\n\ / | \n\ / / \n\ / -oo \n\ / k \n\ /_____, \n\ k = 0 \ """ ucode_str = \ """\ n \n\ n \n\ ______ \n\ ╲ \n\ ╲ \n\ ╲ ∞ \n\ ╲ ⌠ \n\ ╲ ⎮ n \n\ ╱ ⎮ x dx\n\ ╱ ⌡ \n\ ╱ -∞ \n\ ╱ k \n\ ╱ \n\ ‾‾‾‾‾‾ \n\ k = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(k**( Integral(x**n, (x, -oo, oo))), (k, 0, Integral(x**x, (x, -oo, oo)))) ascii_str = \ """\ oo \n\ / \n\ | \n\ | x \n\ | x dx \n\ | \n\ / \n\ -oo \n\ ______ \n\ \\ ` \n\ \\ oo \n\ \\ / \n\ \\ | \n\ \\ | n \n\ ) | x dx\n\ / | \n\ / / \n\ / -oo \n\ / k \n\ /_____, \n\ k = 0 \ """ ucode_str = \ """\ ∞ \n\ ⌠ \n\ ⎮ x \n\ ⎮ x dx \n\ ⌡ \n\ -∞ \n\ ______ \n\ ╲ \n\ ╲ \n\ ╲ ∞ \n\ ╲ ⌠ \n\ ╲ ⎮ n \n\ ╱ ⎮ x dx\n\ ╱ ⌡ \n\ ╱ -∞ \n\ ╱ k \n\ ╱ \n\ ‾‾‾‾‾‾ \n\ k = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(k**(Integral(x**n, (x, -oo, oo))), ( k, x + n + x**2 + n**2 + (x/n) + (1/x), Integral(x**x, (x, -oo, oo)))) ascii_str = \ """\ oo \n\ / \n\ | \n\ | x \n\ | x dx \n\ | \n\ / \n\ -oo \n\ ______ \n\ \\ ` \n\ \\ oo \n\ \\ / \n\ \\ | \n\ \\ | n \n\ ) | x dx\n\ / | \n\ / / \n\ / -oo \n\ / k \n\ /_____, \n\ 2 2 1 x \n\ k = n + n + x + x + - + - \n\ x n \ """ ucode_str = \ """\ ∞ \n\ ⌠ \n\ ⎮ x \n\ ⎮ x dx \n\ ⌡ \n\ -∞ \n\ ______ \n\ ╲ \n\ ╲ \n\ ╲ ∞ \n\ ╲ ⌠ \n\ ╲ ⎮ n \n\ ╱ ⎮ x dx\n\ ╱ ⌡ \n\ ╱ -∞ \n\ ╱ k \n\ ╱ \n\ ‾‾‾‾‾‾ \n\ 2 2 1 x \n\ k = n + n + x + x + ─ + ─ \n\ x n \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(k**( Integral(x**n, (x, -oo, oo))), (k, 0, x + n + x**2 + n**2 + (x/n) + (1/x))) ascii_str = \ """\ 2 2 1 x \n\ n + n + x + x + - + - \n\ x n \n\ ______ \n\ \\ ` \n\ \\ oo \n\ \\ / \n\ \\ | \n\ \\ | n \n\ ) | x dx\n\ / | \n\ / / \n\ / -oo \n\ / k \n\ /_____, \n\ k = 0 \ """ ucode_str = \ """\ 2 2 1 x \n\ n + n + x + x + ─ + ─ \n\ x n \n\ ______ \n\ ╲ \n\ ╲ \n\ ╲ ∞ \n\ ╲ ⌠ \n\ ╲ ⎮ n \n\ ╱ ⎮ x dx\n\ ╱ ⌡ \n\ ╱ -∞ \n\ ╱ k \n\ ╱ \n\ ‾‾‾‾‾‾ \n\ k = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(x, (x, 0, oo)) ascii_str = \ """\ oo \n\ __ \n\ \\ ` \n\ ) x\n\ /_, \n\ x = 0 \ """ ucode_str = \ """\ ∞ \n\ ___ \n\ ╲ \n\ ╲ \n\ ╱ x\n\ ╱ \n\ ‾‾‾ \n\ x = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(x**2, (x, 0, oo)) ascii_str = \ """\ oo \n\ ___ \n\ \\ ` \n\ \\ 2\n\ / x \n\ /__, \n\ x = 0 \ """ ucode_str = \ """\ ∞ \n\ ___ \n\ ╲ \n\ ╲ 2\n\ ╱ x \n\ ╱ \n\ ‾‾‾ \n\ x = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(x/2, (x, 0, oo)) ascii_str = \ """\ oo \n\ ___ \n\ \\ ` \n\ \\ x\n\ ) -\n\ / 2\n\ /__, \n\ x = 0 \ """ ucode_str = \ """\ ∞ \n\ ____ \n\ ╲ \n\ ╲ \n\ ╲ x\n\ ╱ ─\n\ ╱ 2\n\ ╱ \n\ ‾‾‾‾ \n\ x = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(x**3/2, (x, 0, oo)) ascii_str = \ """\ oo \n\ ____ \n\ \\ ` \n\ \\ 3\n\ \\ x \n\ / --\n\ / 2 \n\ /___, \n\ x = 0 \ """ ucode_str = \ """\ ∞ \n\ ____ \n\ ╲ \n\ ╲ 3\n\ ╲ x \n\ ╱ ──\n\ ╱ 2 \n\ ╱ \n\ ‾‾‾‾ \n\ x = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum((x**3*y**(x/2))**n, (x, 0, oo)) ascii_str = \ """\ oo \n\ ____ \n\ \\ ` \n\ \\ n\n\ \\ / x\\ \n\ ) | -| \n\ / | 3 2| \n\ / \\x *y / \n\ /___, \n\ x = 0 \ """ ucode_str = \ """\ ∞ \n\ _____ \n\ ╲ \n\ ╲ \n\ ╲ n\n\ ╲ ⎛ x⎞ \n\ ╱ ⎜ ─⎟ \n\ ╱ ⎜ 3 2⎟ \n\ ╱ ⎝x ⋅y ⎠ \n\ ╱ \n\ ‾‾‾‾‾ \n\ x = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(1/x**2, (x, 0, oo)) ascii_str = \ """\ oo \n\ ____ \n\ \\ ` \n\ \\ 1 \n\ \\ --\n\ / 2\n\ / x \n\ /___, \n\ x = 0 \ """ ucode_str = \ """\ ∞ \n\ ____ \n\ ╲ \n\ ╲ 1 \n\ ╲ ──\n\ ╱ 2\n\ ╱ x \n\ ╱ \n\ ‾‾‾‾ \n\ x = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(1/y**(a/b), (x, 0, oo)) ascii_str = \ """\ oo \n\ ____ \n\ \\ ` \n\ \\ -a \n\ \\ ---\n\ / b \n\ / y \n\ /___, \n\ x = 0 \ """ ucode_str = \ """\ ∞ \n\ ____ \n\ ╲ \n\ ╲ -a \n\ ╲ ───\n\ ╱ b \n\ ╱ y \n\ ╱ \n\ ‾‾‾‾ \n\ x = 0 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Sum(1/y**(a/b), (x, 0, oo), (y, 1, 2)) ascii_str = \ """\ 2 oo \n\ ____ ____ \n\ \\ ` \\ ` \n\ \\ \\ -a\n\ \\ \\ --\n\ / / b \n\ / / y \n\ /___, /___, \n\ y = 1 x = 0 \ """ ucode_str = \ """\ 2 ∞ \n\ ____ ____ \n\ ╲ ╲ \n\ ╲ ╲ -a\n\ ╲ ╲ ──\n\ ╱ ╱ b \n\ ╱ ╱ y \n\ ╱ ╱ \n\ ‾‾‾‾ ‾‾‾‾ \n\ y = 1 x = 0 \ """ expr = Sum(1/(1 + 1/( 1 + 1/k)) + 1, (k, 111, 1 + 1/n), (k, 1/(1 + m), oo)) + 1/(1 + 1/k) ascii_str = \ """\ 1 \n\ 1 + - \n\ oo n \n\ _____ _____ \n\ \\ ` \\ ` \n\ \\ \\ / 1 \\ \n\ \\ \\ |1 + ---------| \n\ \\ \\ | 1 | 1 \n\ ) ) | 1 + -----| + -----\n\ / / | 1| 1\n\ / / | 1 + -| 1 + -\n\ / / \\ k/ k\n\ /____, /____, \n\ 1 k = 111 \n\ k = ----- \n\ m + 1 \ """ ucode_str = \ """\ 1 \n\ 1 + ─ \n\ ∞ n \n\ ______ ______ \n\ ╲ ╲ \n\ ╲ ╲ \n\ ╲ ╲ ⎛ 1 ⎞ \n\ ╲ ╲ ⎜1 + ─────────⎟ \n\ ╲ ╲ ⎜ 1 ⎟ 1 \n\ ╱ ╱ ⎜ 1 + ─────⎟ + ─────\n\ ╱ ╱ ⎜ 1⎟ 1\n\ ╱ ╱ ⎜ 1 + ─⎟ 1 + ─\n\ ╱ ╱ ⎝ k⎠ k\n\ ╱ ╱ \n\ ‾‾‾‾‾‾ ‾‾‾‾‾‾ \n\ 1 k = 111 \n\ k = ───── \n\ m + 1 \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_units(): expr = joule ascii_str1 = \ """\ 2\n\ kilogram*meter \n\ ---------------\n\ 2 \n\ second \ """ unicode_str1 = \ """\ 2\n\ kilogram⋅meter \n\ ───────────────\n\ 2 \n\ second \ """ ascii_str2 = \ """\ 2\n\ 3*x*y*kilogram*meter \n\ ---------------------\n\ 2 \n\ second \ """ unicode_str2 = \ """\ 2\n\ 3⋅x⋅y⋅kilogram⋅meter \n\ ─────────────────────\n\ 2 \n\ second \ """ from sympy.physics.units import kg, m, s assert upretty(expr) == "joule" assert pretty(expr) == "joule" assert upretty(expr.convert_to(kg*m**2/s**2)) == unicode_str1 assert pretty(expr.convert_to(kg*m**2/s**2)) == ascii_str1 assert upretty(3*kg*x*m**2*y/s**2) == unicode_str2 assert pretty(3*kg*x*m**2*y/s**2) == ascii_str2 def test_pretty_Subs(): f = Function('f') expr = Subs(f(x), x, ph**2) ascii_str = \ """\ (f(x))| 2\n\ |x=phi \ """ unicode_str = \ """\ (f(x))│ 2\n\ │x=φ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == unicode_str expr = Subs(f(x).diff(x), x, 0) ascii_str = \ """\ /d \\| \n\ |--(f(x))|| \n\ \\dx /|x=0\ """ unicode_str = \ """\ ⎛d ⎞│ \n\ ⎜──(f(x))⎟│ \n\ ⎝dx ⎠│x=0\ """ assert pretty(expr) == ascii_str assert upretty(expr) == unicode_str expr = Subs(f(x).diff(x)/y, (x, y), (0, Rational(1, 2))) ascii_str = \ """\ /d \\| \n\ |--(f(x))|| \n\ |dx || \n\ |--------|| \n\ \\ y /|x=0, y=1/2\ """ unicode_str = \ """\ ⎛d ⎞│ \n\ ⎜──(f(x))⎟│ \n\ ⎜dx ⎟│ \n\ ⎜────────⎟│ \n\ ⎝ y ⎠│x=0, y=1/2\ """ assert pretty(expr) == ascii_str assert upretty(expr) == unicode_str def test_gammas(): assert upretty(lowergamma(x, y)) == "γ(x, y)" assert upretty(uppergamma(x, y)) == "Γ(x, y)" assert xpretty(gamma(x), use_unicode=True) == 'Γ(x)' assert xpretty(gamma, use_unicode=True) == 'Γ' assert xpretty(symbols('gamma', cls=Function)(x), use_unicode=True) == 'γ(x)' assert xpretty(symbols('gamma', cls=Function), use_unicode=True) == 'γ' def test_beta(): assert xpretty(beta(x,y), use_unicode=True) == 'Β(x, y)' assert xpretty(beta(x,y), use_unicode=False) == 'B(x, y)' assert xpretty(beta, use_unicode=True) == 'Β' assert xpretty(beta, use_unicode=False) == 'B' mybeta = Function('beta') assert xpretty(mybeta(x), use_unicode=True) == 'β(x)' assert xpretty(mybeta(x, y, z), use_unicode=False) == 'beta(x, y, z)' assert xpretty(mybeta, use_unicode=True) == 'β' # test that notation passes to subclasses of the same name only def test_function_subclass_different_name(): class mygamma(gamma): pass assert xpretty(mygamma, use_unicode=True) == r"mygamma" assert xpretty(mygamma(x), use_unicode=True) == r"mygamma(x)" def test_SingularityFunction(): assert xpretty(SingularityFunction(x, 0, n), use_unicode=True) == ( """\ n\n\ <x> \ """) assert xpretty(SingularityFunction(x, 1, n), use_unicode=True) == ( """\ n\n\ <x - 1> \ """) assert xpretty(SingularityFunction(x, -1, n), use_unicode=True) == ( """\ n\n\ <x + 1> \ """) assert xpretty(SingularityFunction(x, a, n), use_unicode=True) == ( """\ n\n\ <-a + x> \ """) assert xpretty(SingularityFunction(x, y, n), use_unicode=True) == ( """\ n\n\ <x - y> \ """) assert xpretty(SingularityFunction(x, 0, n), use_unicode=False) == ( """\ n\n\ <x> \ """) assert xpretty(SingularityFunction(x, 1, n), use_unicode=False) == ( """\ n\n\ <x - 1> \ """) assert xpretty(SingularityFunction(x, -1, n), use_unicode=False) == ( """\ n\n\ <x + 1> \ """) assert xpretty(SingularityFunction(x, a, n), use_unicode=False) == ( """\ n\n\ <-a + x> \ """) assert xpretty(SingularityFunction(x, y, n), use_unicode=False) == ( """\ n\n\ <x - y> \ """) def test_deltas(): assert xpretty(DiracDelta(x), use_unicode=True) == 'δ(x)' assert xpretty(DiracDelta(x, 1), use_unicode=True) == \ """\ (1) \n\ δ (x)\ """ assert xpretty(x*DiracDelta(x, 1), use_unicode=True) == \ """\ (1) \n\ x⋅δ (x)\ """ def test_hyper(): expr = hyper((), (), z) ucode_str = \ """\ ┌─ ⎛ │ ⎞\n\ ├─ ⎜ │ z⎟\n\ 0╵ 0 ⎝ │ ⎠\ """ ascii_str = \ """\ _ \n\ |_ / | \\\n\ | | | z|\n\ 0 0 \\ | /\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = hyper((), (1,), x) ucode_str = \ """\ ┌─ ⎛ │ ⎞\n\ ├─ ⎜ │ x⎟\n\ 0╵ 1 ⎝1 │ ⎠\ """ ascii_str = \ """\ _ \n\ |_ / | \\\n\ | | | x|\n\ 0 1 \\1 | /\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = hyper([2], [1], x) ucode_str = \ """\ ┌─ ⎛2 │ ⎞\n\ ├─ ⎜ │ x⎟\n\ 1╵ 1 ⎝1 │ ⎠\ """ ascii_str = \ """\ _ \n\ |_ /2 | \\\n\ | | | x|\n\ 1 1 \\1 | /\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = hyper((pi/3, -2*k), (3, 4, 5, -3), x) ucode_str = \ """\ ⎛ π │ ⎞\n\ ┌─ ⎜ ─, -2⋅k │ ⎟\n\ ├─ ⎜ 3 │ x⎟\n\ 2╵ 4 ⎜ │ ⎟\n\ ⎝3, 4, 5, -3 │ ⎠\ """ ascii_str = \ """\ \n\ _ / pi | \\\n\ |_ | --, -2*k | |\n\ | | 3 | x|\n\ 2 4 | | |\n\ \\3, 4, 5, -3 | /\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = hyper((pi, S('2/3'), -2*k), (3, 4, 5, -3), x**2) ucode_str = \ """\ ┌─ ⎛π, 2/3, -2⋅k │ 2⎞\n\ ├─ ⎜ │ x ⎟\n\ 3╵ 4 ⎝3, 4, 5, -3 │ ⎠\ """ ascii_str = \ """\ _ \n\ |_ /pi, 2/3, -2*k | 2\\\n\ | | | x |\n\ 3 4 \\ 3, 4, 5, -3 | /\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = hyper([1, 2], [3, 4], 1/(1/(1/(1/x + 1) + 1) + 1)) ucode_str = \ """\ ⎛ │ 1 ⎞\n\ ⎜ │ ─────────────⎟\n\ ⎜ │ 1 ⎟\n\ ┌─ ⎜1, 2 │ 1 + ─────────⎟\n\ ├─ ⎜ │ 1 ⎟\n\ 2╵ 2 ⎜3, 4 │ 1 + ─────⎟\n\ ⎜ │ 1⎟\n\ ⎜ │ 1 + ─⎟\n\ ⎝ │ x⎠\ """ ascii_str = \ """\ \n\ / | 1 \\\n\ | | -------------|\n\ _ | | 1 |\n\ |_ |1, 2 | 1 + ---------|\n\ | | | 1 |\n\ 2 2 |3, 4 | 1 + -----|\n\ | | 1|\n\ | | 1 + -|\n\ \\ | x/\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_meijerg(): expr = meijerg([pi, pi, x], [1], [0, 1], [1, 2, 3], z) ucode_str = \ """\ ╭─╮2, 3 ⎛π, π, x 1 │ ⎞\n\ │╶┐ ⎜ │ z⎟\n\ ╰─╯4, 5 ⎝ 0, 1 1, 2, 3 │ ⎠\ """ ascii_str = \ """\ __2, 3 /pi, pi, x 1 | \\\n\ /__ | | z|\n\ \\_|4, 5 \\ 0, 1 1, 2, 3 | /\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = meijerg([1, pi/7], [2, pi, 5], [], [], z**2) ucode_str = \ """\ ⎛ π │ ⎞\n\ ╭─╮0, 2 ⎜1, ─ 2, π, 5 │ 2⎟\n\ │╶┐ ⎜ 7 │ z ⎟\n\ ╰─╯5, 0 ⎜ │ ⎟\n\ ⎝ │ ⎠\ """ ascii_str = \ """\ / pi | \\\n\ __0, 2 |1, -- 2, pi, 5 | 2|\n\ /__ | 7 | z |\n\ \\_|5, 0 | | |\n\ \\ | /\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str ucode_str = \ """\ ╭─╮ 1, 10 ⎛1, 1, 1, 1, 1, 1, 1, 1, 1, 1 1 │ ⎞\n\ │╶┐ ⎜ │ z⎟\n\ ╰─╯11, 2 ⎝ 1 1 │ ⎠\ """ ascii_str = \ """\ __ 1, 10 /1, 1, 1, 1, 1, 1, 1, 1, 1, 1 1 | \\\n\ /__ | | z|\n\ \\_|11, 2 \\ 1 1 | /\ """ expr = meijerg([1]*10, [1], [1], [1], z) assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = meijerg([1, 2, ], [4, 3], [3], [4, 5], 1/(1/(1/(1/x + 1) + 1) + 1)) ucode_str = \ """\ ⎛ │ 1 ⎞\n\ ⎜ │ ─────────────⎟\n\ ⎜ │ 1 ⎟\n\ ╭─╮1, 2 ⎜1, 2 4, 3 │ 1 + ─────────⎟\n\ │╶┐ ⎜ │ 1 ⎟\n\ ╰─╯4, 3 ⎜ 3 4, 5 │ 1 + ─────⎟\n\ ⎜ │ 1⎟\n\ ⎜ │ 1 + ─⎟\n\ ⎝ │ x⎠\ """ ascii_str = \ """\ / | 1 \\\n\ | | -------------|\n\ | | 1 |\n\ __1, 2 |1, 2 4, 3 | 1 + ---------|\n\ /__ | | 1 |\n\ \\_|4, 3 | 3 4, 5 | 1 + -----|\n\ | | 1|\n\ | | 1 + -|\n\ \\ | x/\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = Integral(expr, x) ucode_str = \ """\ ⌠ \n\ ⎮ ⎛ │ 1 ⎞ \n\ ⎮ ⎜ │ ─────────────⎟ \n\ ⎮ ⎜ │ 1 ⎟ \n\ ⎮ ╭─╮1, 2 ⎜1, 2 4, 3 │ 1 + ─────────⎟ \n\ ⎮ │╶┐ ⎜ │ 1 ⎟ dx\n\ ⎮ ╰─╯4, 3 ⎜ 3 4, 5 │ 1 + ─────⎟ \n\ ⎮ ⎜ │ 1⎟ \n\ ⎮ ⎜ │ 1 + ─⎟ \n\ ⎮ ⎝ │ x⎠ \n\ ⌡ \ """ ascii_str = \ """\ / \n\ | \n\ | / | 1 \\ \n\ | | | -------------| \n\ | | | 1 | \n\ | __1, 2 |1, 2 4, 3 | 1 + ---------| \n\ | /__ | | 1 | dx\n\ | \\_|4, 3 | 3 4, 5 | 1 + -----| \n\ | | | 1| \n\ | | | 1 + -| \n\ | \\ | x/ \n\ | \n\ / \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_noncommutative(): A, B, C = symbols('A,B,C', commutative=False) expr = A*B*C**-1 ascii_str = \ """\ -1\n\ A*B*C \ """ ucode_str = \ """\ -1\n\ A⋅B⋅C \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = C**-1*A*B ascii_str = \ """\ -1 \n\ C *A*B\ """ ucode_str = \ """\ -1 \n\ C ⋅A⋅B\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = A*C**-1*B ascii_str = \ """\ -1 \n\ A*C *B\ """ ucode_str = \ """\ -1 \n\ A⋅C ⋅B\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = A*C**-1*B/x ascii_str = \ """\ -1 \n\ A*C *B\n\ -------\n\ x \ """ ucode_str = \ """\ -1 \n\ A⋅C ⋅B\n\ ───────\n\ x \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_special_functions(): x, y = symbols("x y") # atan2 expr = atan2(y/sqrt(200), sqrt(x)) ascii_str = \ """\ / ___ \\\n\ |\\/ 2 *y ___|\n\ atan2|-------, \\/ x |\n\ \\ 20 /\ """ ucode_str = \ """\ ⎛√2⋅y ⎞\n\ atan2⎜────, √x⎟\n\ ⎝ 20 ⎠\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_geometry(): e = Segment((0, 1), (0, 2)) assert pretty(e) == 'Segment2D(Point2D(0, 1), Point2D(0, 2))' e = Ray((1, 1), angle=4.02*pi) assert pretty(e) == 'Ray2D(Point2D(1, 1), Point2D(2, tan(pi/50) + 1))' def test_expint(): expr = Ei(x) string = 'Ei(x)' assert pretty(expr) == string assert upretty(expr) == string expr = expint(1, z) ucode_str = "E₁(z)" ascii_str = "expint(1, z)" assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str assert pretty(Shi(x)) == 'Shi(x)' assert pretty(Si(x)) == 'Si(x)' assert pretty(Ci(x)) == 'Ci(x)' assert pretty(Chi(x)) == 'Chi(x)' assert upretty(Shi(x)) == 'Shi(x)' assert upretty(Si(x)) == 'Si(x)' assert upretty(Ci(x)) == 'Ci(x)' assert upretty(Chi(x)) == 'Chi(x)' def test_elliptic_functions(): ascii_str = \ """\ / 1 \\\n\ K|-----|\n\ \\z + 1/\ """ ucode_str = \ """\ ⎛ 1 ⎞\n\ K⎜─────⎟\n\ ⎝z + 1⎠\ """ expr = elliptic_k(1/(z + 1)) assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str ascii_str = \ """\ / | 1 \\\n\ F|1|-----|\n\ \\ |z + 1/\ """ ucode_str = \ """\ ⎛ │ 1 ⎞\n\ F⎜1│─────⎟\n\ ⎝ │z + 1⎠\ """ expr = elliptic_f(1, 1/(1 + z)) assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str ascii_str = \ """\ / 1 \\\n\ E|-----|\n\ \\z + 1/\ """ ucode_str = \ """\ ⎛ 1 ⎞\n\ E⎜─────⎟\n\ ⎝z + 1⎠\ """ expr = elliptic_e(1/(z + 1)) assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str ascii_str = \ """\ / | 1 \\\n\ E|1|-----|\n\ \\ |z + 1/\ """ ucode_str = \ """\ ⎛ │ 1 ⎞\n\ E⎜1│─────⎟\n\ ⎝ │z + 1⎠\ """ expr = elliptic_e(1, 1/(1 + z)) assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str ascii_str = \ """\ / |4\\\n\ Pi|3|-|\n\ \\ |x/\ """ ucode_str = \ """\ ⎛ │4⎞\n\ Π⎜3│─⎟\n\ ⎝ │x⎠\ """ expr = elliptic_pi(3, 4/x) assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str ascii_str = \ """\ / 4| \\\n\ Pi|3; -|6|\n\ \\ x| /\ """ ucode_str = \ """\ ⎛ 4│ ⎞\n\ Π⎜3; ─│6⎟\n\ ⎝ x│ ⎠\ """ expr = elliptic_pi(3, 4/x, 6) assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_RandomDomain(): from sympy.stats import Normal, Die, Exponential, pspace, where X = Normal('x1', 0, 1) assert upretty(where(X > 0)) == "Domain: 0 < x₁ ∧ x₁ < ∞" D = Die('d1', 6) assert upretty(where(D > 4)) == 'Domain: d₁ = 5 ∨ d₁ = 6' A = Exponential('a', 1) B = Exponential('b', 1) assert upretty(pspace(Tuple(A, B)).domain) == \ 'Domain: 0 ≤ a ∧ 0 ≤ b ∧ a < ∞ ∧ b < ∞' def test_PrettyPoly(): F = QQ.frac_field(x, y) R = QQ.poly_ring(x, y) expr = F.convert(x/(x + y)) assert pretty(expr) == "x/(x + y)" assert upretty(expr) == "x/(x + y)" expr = R.convert(x + y) assert pretty(expr) == "x + y" assert upretty(expr) == "x + y" def test_issue_6285(): assert pretty(Pow(2, -5, evaluate=False)) == '1 \n--\n 5\n2 ' assert pretty(Pow(x, (1/pi))) == \ ' 1 \n'\ ' --\n'\ ' pi\n'\ 'x ' def test_issue_6359(): assert pretty(Integral(x**2, x)**2) == \ """\ 2 / / \\ \n\ | | | \n\ | | 2 | \n\ | | x dx| \n\ | | | \n\ \\/ / \ """ assert upretty(Integral(x**2, x)**2) == \ """\ 2 ⎛⌠ ⎞ \n\ ⎜⎮ 2 ⎟ \n\ ⎜⎮ x dx⎟ \n\ ⎝⌡ ⎠ \ """ assert pretty(Sum(x**2, (x, 0, 1))**2) == \ """\ 2 / 1 \\ \n\ | ___ | \n\ | \\ ` | \n\ | \\ 2| \n\ | / x | \n\ | /__, | \n\ \\x = 0 / \ """ assert upretty(Sum(x**2, (x, 0, 1))**2) == \ """\ 2 ⎛ 1 ⎞ \n\ ⎜ ___ ⎟ \n\ ⎜ ╲ ⎟ \n\ ⎜ ╲ 2⎟ \n\ ⎜ ╱ x ⎟ \n\ ⎜ ╱ ⎟ \n\ ⎜ ‾‾‾ ⎟ \n\ ⎝x = 0 ⎠ \ """ assert pretty(Product(x**2, (x, 1, 2))**2) == \ """\ 2 / 2 \\ \n\ |______ | \n\ | | | 2| \n\ | | | x | \n\ | | | | \n\ \\x = 1 / \ """ assert upretty(Product(x**2, (x, 1, 2))**2) == \ """\ 2 ⎛ 2 ⎞ \n\ ⎜─┬──┬─ ⎟ \n\ ⎜ │ │ 2⎟ \n\ ⎜ │ │ x ⎟ \n\ ⎜ │ │ ⎟ \n\ ⎝x = 1 ⎠ \ """ f = Function('f') assert pretty(Derivative(f(x), x)**2) == \ """\ 2 /d \\ \n\ |--(f(x))| \n\ \\dx / \ """ assert upretty(Derivative(f(x), x)**2) == \ """\ 2 ⎛d ⎞ \n\ ⎜──(f(x))⎟ \n\ ⎝dx ⎠ \ """ def test_issue_6739(): ascii_str = \ """\ 1 \n\ -----\n\ ___\n\ \\/ x \ """ ucode_str = \ """\ 1 \n\ ──\n\ √x\ """ assert pretty(1/sqrt(x)) == ascii_str assert upretty(1/sqrt(x)) == ucode_str def test_complicated_symbol_unchanged(): for symb_name in ["dexpr2_d1tau", "dexpr2^d1tau"]: assert pretty(Symbol(symb_name)) == symb_name def test_categories(): from sympy.categories import (Object, IdentityMorphism, NamedMorphism, Category, Diagram, DiagramGrid) A1 = Object("A1") A2 = Object("A2") A3 = Object("A3") f1 = NamedMorphism(A1, A2, "f1") f2 = NamedMorphism(A2, A3, "f2") id_A1 = IdentityMorphism(A1) K1 = Category("K1") assert pretty(A1) == "A1" assert upretty(A1) == "A₁" assert pretty(f1) == "f1:A1-->A2" assert upretty(f1) == "f₁:A₁——▶A₂" assert pretty(id_A1) == "id:A1-->A1" assert upretty(id_A1) == "id:A₁——▶A₁" assert pretty(f2*f1) == "f2*f1:A1-->A3" assert upretty(f2*f1) == "f₂∘f₁:A₁——▶A₃" assert pretty(K1) == "K1" assert upretty(K1) == "K₁" # Test how diagrams are printed. d = Diagram() assert pretty(d) == "EmptySet" assert upretty(d) == "∅" d = Diagram({f1: "unique", f2: S.EmptySet}) assert pretty(d) == "{f2*f1:A1-->A3: EmptySet, id:A1-->A1: " \ "EmptySet, id:A2-->A2: EmptySet, id:A3-->A3: " \ "EmptySet, f1:A1-->A2: {unique}, f2:A2-->A3: EmptySet}" assert upretty(d) == "{f₂∘f₁:A₁——▶A₃: ∅, id:A₁——▶A₁: ∅, " \ "id:A₂——▶A₂: ∅, id:A₃——▶A₃: ∅, f₁:A₁——▶A₂: {unique}, f₂:A₂——▶A₃: ∅}" d = Diagram({f1: "unique", f2: S.EmptySet}, {f2 * f1: "unique"}) assert pretty(d) == "{f2*f1:A1-->A3: EmptySet, id:A1-->A1: " \ "EmptySet, id:A2-->A2: EmptySet, id:A3-->A3: " \ "EmptySet, f1:A1-->A2: {unique}, f2:A2-->A3: EmptySet}" \ " ==> {f2*f1:A1-->A3: {unique}}" assert upretty(d) == "{f₂∘f₁:A₁——▶A₃: ∅, id:A₁——▶A₁: ∅, id:A₂——▶A₂: " \ "∅, id:A₃——▶A₃: ∅, f₁:A₁——▶A₂: {unique}, f₂:A₂——▶A₃: ∅}" \ " ══▶ {f₂∘f₁:A₁——▶A₃: {unique}}" grid = DiagramGrid(d) assert pretty(grid) == "A1 A2\n \nA3 " assert upretty(grid) == "A₁ A₂\n \nA₃ " def test_PrettyModules(): R = QQ.old_poly_ring(x, y) F = R.free_module(2) M = F.submodule([x, y], [1, x**2]) ucode_str = \ """\ 2\n\ ℚ[x, y] \ """ ascii_str = \ """\ 2\n\ QQ[x, y] \ """ assert upretty(F) == ucode_str assert pretty(F) == ascii_str ucode_str = \ """\ ╱ ⎡ 2⎤╲\n\ ╲[x, y], ⎣1, x ⎦╱\ """ ascii_str = \ """\ 2 \n\ <[x, y], [1, x ]>\ """ assert upretty(M) == ucode_str assert pretty(M) == ascii_str I = R.ideal(x**2, y) ucode_str = \ """\ ╱ 2 ╲\n\ ╲x , y╱\ """ ascii_str = \ """\ 2 \n\ <x , y>\ """ assert upretty(I) == ucode_str assert pretty(I) == ascii_str Q = F / M ucode_str = \ """\ 2 \n\ ℚ[x, y] \n\ ─────────────────\n\ ╱ ⎡ 2⎤╲\n\ ╲[x, y], ⎣1, x ⎦╱\ """ ascii_str = \ """\ 2 \n\ QQ[x, y] \n\ -----------------\n\ 2 \n\ <[x, y], [1, x ]>\ """ assert upretty(Q) == ucode_str assert pretty(Q) == ascii_str ucode_str = \ """\ ╱⎡ 3⎤ ╲\n\ │⎢ x ⎥ ╱ ⎡ 2⎤╲ ╱ ⎡ 2⎤╲│\n\ │⎢1, ──⎥ + ╲[x, y], ⎣1, x ⎦╱, [2, y] + ╲[x, y], ⎣1, x ⎦╱│\n\ ╲⎣ 2 ⎦ ╱\ """ ascii_str = \ """\ 3 \n\ x 2 2 \n\ <[1, --] + <[x, y], [1, x ]>, [2, y] + <[x, y], [1, x ]>>\n\ 2 \ """ def test_QuotientRing(): R = QQ.old_poly_ring(x)/[x**2 + 1] ucode_str = \ """\ ℚ[x] \n\ ────────\n\ ╱ 2 ╲\n\ ╲x + 1╱\ """ ascii_str = \ """\ QQ[x] \n\ --------\n\ 2 \n\ <x + 1>\ """ assert upretty(R) == ucode_str assert pretty(R) == ascii_str ucode_str = \ """\ ╱ 2 ╲\n\ 1 + ╲x + 1╱\ """ ascii_str = \ """\ 2 \n\ 1 + <x + 1>\ """ assert upretty(R.one) == ucode_str assert pretty(R.one) == ascii_str def test_Homomorphism(): from sympy.polys.agca import homomorphism R = QQ.old_poly_ring(x) expr = homomorphism(R.free_module(1), R.free_module(1), [0]) ucode_str = \ """\ 1 1\n\ [0] : ℚ[x] ──> ℚ[x] \ """ ascii_str = \ """\ 1 1\n\ [0] : QQ[x] --> QQ[x] \ """ assert upretty(expr) == ucode_str assert pretty(expr) == ascii_str expr = homomorphism(R.free_module(2), R.free_module(2), [0, 0]) ucode_str = \ """\ ⎡0 0⎤ 2 2\n\ ⎢ ⎥ : ℚ[x] ──> ℚ[x] \n\ ⎣0 0⎦ \ """ ascii_str = \ """\ [0 0] 2 2\n\ [ ] : QQ[x] --> QQ[x] \n\ [0 0] \ """ assert upretty(expr) == ucode_str assert pretty(expr) == ascii_str expr = homomorphism(R.free_module(1), R.free_module(1) / [[x]], [0]) ucode_str = \ """\ 1\n\ 1 ℚ[x] \n\ [0] : ℚ[x] ──> ─────\n\ <[x]>\ """ ascii_str = \ """\ 1\n\ 1 QQ[x] \n\ [0] : QQ[x] --> ------\n\ <[x]> \ """ assert upretty(expr) == ucode_str assert pretty(expr) == ascii_str def test_Tr(): A, B = symbols('A B', commutative=False) t = Tr(A*B) assert pretty(t) == r'Tr(A*B)' assert upretty(t) == 'Tr(A⋅B)' def test_pretty_Add(): eq = Mul(-2, x - 2, evaluate=False) + 5 assert pretty(eq) == '5 - 2*(x - 2)' def test_issue_7179(): assert upretty(Not(Equivalent(x, y))) == 'x ⇎ y' assert upretty(Not(Implies(x, y))) == 'x ↛ y' def test_issue_7180(): assert upretty(Equivalent(x, y)) == 'x ⇔ y' def test_pretty_Complement(): assert pretty(S.Reals - S.Naturals) == '(-oo, oo) \\ Naturals' assert upretty(S.Reals - S.Naturals) == 'ℝ \\ ℕ' assert pretty(S.Reals - S.Naturals0) == '(-oo, oo) \\ Naturals0' assert upretty(S.Reals - S.Naturals0) == 'ℝ \\ ℕ₀' def test_pretty_SymmetricDifference(): from sympy.sets.sets import SymmetricDifference assert upretty(SymmetricDifference(Interval(2,3), Interval(3,5), \ evaluate = False)) == '[2, 3] ∆ [3, 5]' with raises(NotImplementedError): pretty(SymmetricDifference(Interval(2,3), Interval(3,5), evaluate = False)) def test_pretty_Contains(): assert pretty(Contains(x, S.Integers)) == 'Contains(x, Integers)' assert upretty(Contains(x, S.Integers)) == 'x ∈ ℤ' def test_issue_8292(): from sympy.core import sympify e = sympify('((x+x**4)/(x-1))-(2*(x-1)**4/(x-1)**4)', evaluate=False) ucode_str = \ """\ 4 4 \n\ 2⋅(x - 1) x + x\n\ - ────────── + ──────\n\ 4 x - 1 \n\ (x - 1) \ """ ascii_str = \ """\ 4 4 \n\ 2*(x - 1) x + x\n\ - ---------- + ------\n\ 4 x - 1 \n\ (x - 1) \ """ assert pretty(e) == ascii_str assert upretty(e) == ucode_str def test_issue_4335(): y = Function('y') expr = -y(x).diff(x) ucode_str = \ """\ d \n\ -──(y(x))\n\ dx \ """ ascii_str = \ """\ d \n\ - --(y(x))\n\ dx \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_issue_8344(): from sympy.core import sympify e = sympify('2*x*y**2/1**2 + 1', evaluate=False) ucode_str = \ """\ 2 \n\ 2⋅x⋅y \n\ ────── + 1\n\ 2 \n\ 1 \ """ assert upretty(e) == ucode_str def test_issue_6324(): x = Pow(2, 3, evaluate=False) y = Pow(10, -2, evaluate=False) e = Mul(x, y, evaluate=False) ucode_str = \ """\ 3\n\ 2 \n\ ───\n\ 2\n\ 10 \ """ assert upretty(e) == ucode_str def test_issue_7927(): e = sin(x/2)**cos(x/2) ucode_str = \ """\ ⎛x⎞\n\ cos⎜─⎟\n\ ⎝2⎠\n\ ⎛ ⎛x⎞⎞ \n\ ⎜sin⎜─⎟⎟ \n\ ⎝ ⎝2⎠⎠ \ """ assert upretty(e) == ucode_str e = sin(x)**(S(11)/13) ucode_str = \ """\ 11\n\ ──\n\ 13\n\ (sin(x)) \ """ assert upretty(e) == ucode_str def test_issue_6134(): from sympy.abc import lamda, t phi = Function('phi') e = lamda*x*Integral(phi(t)*pi*sin(pi*t), (t, 0, 1)) + lamda*x**2*Integral(phi(t)*2*pi*sin(2*pi*t), (t, 0, 1)) ucode_str = \ """\ 1 1 \n\ 2 ⌠ ⌠ \n\ λ⋅x ⋅⎮ 2⋅π⋅φ(t)⋅sin(2⋅π⋅t) dt + λ⋅x⋅⎮ π⋅φ(t)⋅sin(π⋅t) dt\n\ ⌡ ⌡ \n\ 0 0 \ """ assert upretty(e) == ucode_str def test_issue_9877(): ucode_str1 = '(2, 3) ∪ ([1, 2] \\ {x})' a, b, c = Interval(2, 3, True, True), Interval(1, 2), FiniteSet(x) assert upretty(Union(a, Complement(b, c))) == ucode_str1 ucode_str2 = '{x} ∩ {y} ∩ ({z} \\ [1, 2])' d, e, f, g = FiniteSet(x), FiniteSet(y), FiniteSet(z), Interval(1, 2) assert upretty(Intersection(d, e, Complement(f, g))) == ucode_str2 def test_issue_13651(): expr1 = c + Mul(-1, a + b, evaluate=False) assert pretty(expr1) == 'c - (a + b)' expr2 = c + Mul(-1, a - b + d, evaluate=False) assert pretty(expr2) == 'c - (a - b + d)' def test_pretty_primenu(): from sympy.ntheory.factor_ import primenu ascii_str1 = "nu(n)" ucode_str1 = "ν(n)" n = symbols('n', integer=True) assert pretty(primenu(n)) == ascii_str1 assert upretty(primenu(n)) == ucode_str1 def test_pretty_primeomega(): from sympy.ntheory.factor_ import primeomega ascii_str1 = "Omega(n)" ucode_str1 = "Ω(n)" n = symbols('n', integer=True) assert pretty(primeomega(n)) == ascii_str1 assert upretty(primeomega(n)) == ucode_str1 def test_pretty_Mod(): from sympy.core import Mod ascii_str1 = "x mod 7" ucode_str1 = "x mod 7" ascii_str2 = "(x + 1) mod 7" ucode_str2 = "(x + 1) mod 7" ascii_str3 = "2*x mod 7" ucode_str3 = "2⋅x mod 7" ascii_str4 = "(x mod 7) + 1" ucode_str4 = "(x mod 7) + 1" ascii_str5 = "2*(x mod 7)" ucode_str5 = "2⋅(x mod 7)" x = symbols('x', integer=True) assert pretty(Mod(x, 7)) == ascii_str1 assert upretty(Mod(x, 7)) == ucode_str1 assert pretty(Mod(x + 1, 7)) == ascii_str2 assert upretty(Mod(x + 1, 7)) == ucode_str2 assert pretty(Mod(2 * x, 7)) == ascii_str3 assert upretty(Mod(2 * x, 7)) == ucode_str3 assert pretty(Mod(x, 7) + 1) == ascii_str4 assert upretty(Mod(x, 7) + 1) == ucode_str4 assert pretty(2 * Mod(x, 7)) == ascii_str5 assert upretty(2 * Mod(x, 7)) == ucode_str5 def test_issue_11801(): assert pretty(Symbol("")) == "" assert upretty(Symbol("")) == "" def test_pretty_UnevaluatedExpr(): x = symbols('x') he = UnevaluatedExpr(1/x) ucode_str = \ """\ 1\n\ ─\n\ x\ """ assert upretty(he) == ucode_str ucode_str = \ """\ 2\n\ ⎛1⎞ \n\ ⎜─⎟ \n\ ⎝x⎠ \ """ assert upretty(he**2) == ucode_str ucode_str = \ """\ 1\n\ 1 + ─\n\ x\ """ assert upretty(he + 1) == ucode_str ucode_str = \ ('''\ 1\n\ x⋅─\n\ x\ ''') assert upretty(x*he) == ucode_str def test_issue_10472(): M = (Matrix([[0, 0], [0, 0]]), Matrix([0, 0])) ucode_str = \ """\ ⎛⎡0 0⎤ ⎡0⎤⎞ ⎜⎢ ⎥, ⎢ ⎥⎟ ⎝⎣0 0⎦ ⎣0⎦⎠\ """ assert upretty(M) == ucode_str def test_MatrixElement_printing(): # test cases for issue #11821 A = MatrixSymbol("A", 1, 3) B = MatrixSymbol("B", 1, 3) C = MatrixSymbol("C", 1, 3) ascii_str1 = "A_00" ucode_str1 = "A₀₀" assert pretty(A[0, 0]) == ascii_str1 assert upretty(A[0, 0]) == ucode_str1 ascii_str1 = "3*A_00" ucode_str1 = "3⋅A₀₀" assert pretty(3*A[0, 0]) == ascii_str1 assert upretty(3*A[0, 0]) == ucode_str1 ascii_str1 = "(-B + A)[0, 0]" ucode_str1 = "(-B + A)[0, 0]" F = C[0, 0].subs(C, A - B) assert pretty(F) == ascii_str1 assert upretty(F) == ucode_str1 def test_issue_12675(): x, y, t, j = symbols('x y t j') e = CoordSys3D('e') ucode_str = \ """\ ⎛ t⎞ \n\ ⎜⎛x⎞ ⎟ j_e\n\ ⎜⎜─⎟ ⎟ \n\ ⎝⎝y⎠ ⎠ \ """ assert upretty((x/y)**t*e.j) == ucode_str ucode_str = \ """\ ⎛1⎞ \n\ ⎜─⎟ j_e\n\ ⎝y⎠ \ """ assert upretty((1/y)*e.j) == ucode_str def test_MatrixSymbol_printing(): # test cases for issue #14237 A = MatrixSymbol("A", 3, 3) B = MatrixSymbol("B", 3, 3) C = MatrixSymbol("C", 3, 3) assert pretty(-A*B*C) == "-A*B*C" assert pretty(A - B) == "-B + A" assert pretty(A*B*C - A*B - B*C) == "-A*B -B*C + A*B*C" # issue #14814 x = MatrixSymbol('x', n, n) y = MatrixSymbol('y*', n, n) assert pretty(x + y) == "x + y*" ascii_str = \ """\ 2 \n\ -2*y* -a*x\ """ assert pretty(-a*x + -2*y*y) == ascii_str def test_degree_printing(): expr1 = 90*degree assert pretty(expr1) == '90°' expr2 = x*degree assert pretty(expr2) == 'x°' expr3 = cos(x*degree + 90*degree) assert pretty(expr3) == 'cos(x° + 90°)' def test_vector_expr_pretty_printing(): A = CoordSys3D('A') assert upretty(Cross(A.i, A.x*A.i+3*A.y*A.j)) == "(i_A)×((x_A) i_A + (3⋅y_A) j_A)" assert upretty(x*Cross(A.i, A.j)) == 'x⋅(i_A)×(j_A)' assert upretty(Curl(A.x*A.i + 3*A.y*A.j)) == "∇×((x_A) i_A + (3⋅y_A) j_A)" assert upretty(Divergence(A.x*A.i + 3*A.y*A.j)) == "∇⋅((x_A) i_A + (3⋅y_A) j_A)" assert upretty(Dot(A.i, A.x*A.i+3*A.y*A.j)) == "(i_A)⋅((x_A) i_A + (3⋅y_A) j_A)" assert upretty(Gradient(A.x+3*A.y)) == "∇(x_A + 3⋅y_A)" assert upretty(Laplacian(A.x+3*A.y)) == "∆(x_A + 3⋅y_A)" # TODO: add support for ASCII pretty. def test_pretty_print_tensor_expr(): L = TensorIndexType("L") i, j, k = tensor_indices("i j k", L) i0 = tensor_indices("i_0", L) A, B, C, D = tensor_heads("A B C D", [L]) H = TensorHead("H", [L, L]) expr = -i ascii_str = \ """\ -i\ """ ucode_str = \ """\ -i\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = A(i) ascii_str = \ """\ i\n\ A \n\ \ """ ucode_str = \ """\ i\n\ A \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = A(i0) ascii_str = \ """\ i_0\n\ A \n\ \ """ ucode_str = \ """\ i₀\n\ A \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = A(-i) ascii_str = \ """\ \n\ A \n\ i\ """ ucode_str = \ """\ \n\ A \n\ i\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = -3*A(-i) ascii_str = \ """\ \n\ -3*A \n\ i\ """ ucode_str = \ """\ \n\ -3⋅A \n\ i\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = H(i, -j) ascii_str = \ """\ i \n\ H \n\ j\ """ ucode_str = \ """\ i \n\ H \n\ j\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = H(i, -i) ascii_str = \ """\ L_0 \n\ H \n\ L_0\ """ ucode_str = \ """\ L₀ \n\ H \n\ L₀\ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = H(i, -j)*A(j)*B(k) ascii_str = \ """\ i L_0 k\n\ H *A *B \n\ L_0 \ """ ucode_str = \ """\ i L₀ k\n\ H ⋅A ⋅B \n\ L₀ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (1+x)*A(i) ascii_str = \ """\ i\n\ (x + 1)*A \n\ \ """ ucode_str = \ """\ i\n\ (x + 1)⋅A \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = A(i) + 3*B(i) ascii_str = \ """\ i i\n\ 3*B + A \n\ \ """ ucode_str = \ """\ i i\n\ 3⋅B + A \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_pretty_print_tensor_partial_deriv(): from sympy.tensor.toperators import PartialDerivative L = TensorIndexType("L") i, j, k = tensor_indices("i j k", L) A, B, C, D = tensor_heads("A B C D", [L]) H = TensorHead("H", [L, L]) expr = PartialDerivative(A(i), A(j)) ascii_str = \ """\ d / i\\\n\ ---|A |\n\ j\\ /\n\ dA \n\ \ """ ucode_str = \ """\ ∂ ⎛ i⎞\n\ ───⎜A ⎟\n\ j⎝ ⎠\n\ ∂A \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = A(i)*PartialDerivative(H(k, -i), A(j)) ascii_str = \ """\ L_0 d / k \\\n\ A *---|H |\n\ j\\ L_0/\n\ dA \n\ \ """ ucode_str = \ """\ L₀ ∂ ⎛ k ⎞\n\ A ⋅───⎜H ⎟\n\ j⎝ L₀⎠\n\ ∂A \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = A(i)*PartialDerivative(B(k)*C(-i) + 3*H(k, -i), A(j)) ascii_str = \ """\ L_0 d / k k \\\n\ A *---|3*H + B *C |\n\ j\\ L_0 L_0/\n\ dA \n\ \ """ ucode_str = \ """\ L₀ ∂ ⎛ k k ⎞\n\ A ⋅───⎜3⋅H + B ⋅C ⎟\n\ j⎝ L₀ L₀⎠\n\ ∂A \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (A(i) + B(i))*PartialDerivative(C(j), D(j)) ascii_str = \ """\ / i i\\ d / L_0\\\n\ |A + B |*-----|C |\n\ \\ / L_0\\ /\n\ dD \n\ \ """ ucode_str = \ """\ ⎛ i i⎞ ∂ ⎛ L₀⎞\n\ ⎜A + B ⎟⋅────⎜C ⎟\n\ ⎝ ⎠ L₀⎝ ⎠\n\ ∂D \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = (A(i) + B(i))*PartialDerivative(C(-i), D(j)) ascii_str = \ """\ / L_0 L_0\\ d / \\\n\ |A + B |*---|C |\n\ \\ / j\\ L_0/\n\ dD \n\ \ """ ucode_str = \ """\ ⎛ L₀ L₀⎞ ∂ ⎛ ⎞\n\ ⎜A + B ⎟⋅───⎜C ⎟\n\ ⎝ ⎠ j⎝ L₀⎠\n\ ∂D \n\ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = PartialDerivative(B(-i) + A(-i), A(-j), A(-n)) ucode_str = """\ 2 \n\ ∂ ⎛ ⎞\n\ ───────⎜A + B ⎟\n\ ⎝ i i⎠\n\ ∂A ∂A \n\ n j \ """ assert upretty(expr) == ucode_str expr = PartialDerivative(3*A(-i), A(-j), A(-n)) ucode_str = """\ 2 \n\ ∂ ⎛ ⎞\n\ ───────⎜3⋅A ⎟\n\ ⎝ i⎠\n\ ∂A ∂A \n\ n j \ """ assert upretty(expr) == ucode_str expr = TensorElement(H(i, j), {i:1}) ascii_str = \ """\ i=1,j\n\ H \n\ \ """ ucode_str = ascii_str assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = TensorElement(H(i, j), {i: 1, j: 1}) ascii_str = \ """\ i=1,j=1\n\ H \n\ \ """ ucode_str = ascii_str assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = TensorElement(H(i, j), {j: 1}) ascii_str = \ """\ i,j=1\n\ H \n\ \ """ ucode_str = ascii_str expr = TensorElement(H(-i, j), {-i: 1}) ascii_str = \ """\ j\n\ H \n\ i=1 \ """ ucode_str = ascii_str assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_issue_15560(): a = MatrixSymbol('a', 1, 1) e = pretty(a*(KroneckerProduct(a, a))) result = 'a*(a x a)' assert e == result def test_print_lerchphi(): # Part of issue 6013 a = Symbol('a') pretty(lerchphi(a, 1, 2)) uresult = 'Φ(a, 1, 2)' aresult = 'lerchphi(a, 1, 2)' assert pretty(lerchphi(a, 1, 2)) == aresult assert upretty(lerchphi(a, 1, 2)) == uresult def test_issue_15583(): N = mechanics.ReferenceFrame('N') result = '(n_x, n_y, n_z)' e = pretty((N.x, N.y, N.z)) assert e == result def test_matrixSymbolBold(): # Issue 15871 def boldpretty(expr): return xpretty(expr, use_unicode=True, wrap_line=False, mat_symbol_style="bold") from sympy.matrices.expressions.trace import trace A = MatrixSymbol("A", 2, 2) assert boldpretty(trace(A)) == 'tr(𝐀)' A = MatrixSymbol("A", 3, 3) B = MatrixSymbol("B", 3, 3) C = MatrixSymbol("C", 3, 3) assert boldpretty(-A) == '-𝐀' assert boldpretty(A - A*B - B) == '-𝐁 -𝐀⋅𝐁 + 𝐀' assert boldpretty(-A*B - A*B*C - B) == '-𝐁 -𝐀⋅𝐁 -𝐀⋅𝐁⋅𝐂' A = MatrixSymbol("Addot", 3, 3) assert boldpretty(A) == '𝐀̈' omega = MatrixSymbol("omega", 3, 3) assert boldpretty(omega) == 'ω' omega = MatrixSymbol("omeganorm", 3, 3) assert boldpretty(omega) == '‖ω‖' a = Symbol('alpha') b = Symbol('b') c = MatrixSymbol("c", 3, 1) d = MatrixSymbol("d", 3, 1) assert boldpretty(a*B*c+b*d) == 'b⋅𝐝 + α⋅𝐁⋅𝐜' d = MatrixSymbol("delta", 3, 1) B = MatrixSymbol("Beta", 3, 3) assert boldpretty(a*B*c+b*d) == 'b⋅δ + α⋅Β⋅𝐜' A = MatrixSymbol("A_2", 3, 3) assert boldpretty(A) == '𝐀₂' def test_center_accent(): assert center_accent('a', '\N{COMBINING TILDE}') == 'ã' assert center_accent('aa', '\N{COMBINING TILDE}') == 'aã' assert center_accent('aaa', '\N{COMBINING TILDE}') == 'aãa' assert center_accent('aaaa', '\N{COMBINING TILDE}') == 'aaãa' assert center_accent('aaaaa', '\N{COMBINING TILDE}') == 'aaãaa' assert center_accent('abcdefg', '\N{COMBINING FOUR DOTS ABOVE}') == 'abcd⃜efg' def test_imaginary_unit(): from sympy.printing.pretty import pretty # b/c it was redefined above assert pretty(1 + I, use_unicode=False) == '1 + I' assert pretty(1 + I, use_unicode=True) == '1 + ⅈ' assert pretty(1 + I, use_unicode=False, imaginary_unit='j') == '1 + I' assert pretty(1 + I, use_unicode=True, imaginary_unit='j') == '1 + ⅉ' raises(TypeError, lambda: pretty(I, imaginary_unit=I)) raises(ValueError, lambda: pretty(I, imaginary_unit="kkk")) def test_str_special_matrices(): from sympy.matrices import Identity, ZeroMatrix, OneMatrix assert pretty(Identity(4)) == 'I' assert upretty(Identity(4)) == '𝕀' assert pretty(ZeroMatrix(2, 2)) == '0' assert upretty(ZeroMatrix(2, 2)) == '𝟘' assert pretty(OneMatrix(2, 2)) == '1' assert upretty(OneMatrix(2, 2)) == '𝟙' def test_pretty_misc_functions(): assert pretty(LambertW(x)) == 'W(x)' assert upretty(LambertW(x)) == 'W(x)' assert pretty(LambertW(x, y)) == 'W(x, y)' assert upretty(LambertW(x, y)) == 'W(x, y)' assert pretty(airyai(x)) == 'Ai(x)' assert upretty(airyai(x)) == 'Ai(x)' assert pretty(airybi(x)) == 'Bi(x)' assert upretty(airybi(x)) == 'Bi(x)' assert pretty(airyaiprime(x)) == "Ai'(x)" assert upretty(airyaiprime(x)) == "Ai'(x)" assert pretty(airybiprime(x)) == "Bi'(x)" assert upretty(airybiprime(x)) == "Bi'(x)" assert pretty(fresnelc(x)) == 'C(x)' assert upretty(fresnelc(x)) == 'C(x)' assert pretty(fresnels(x)) == 'S(x)' assert upretty(fresnels(x)) == 'S(x)' assert pretty(Heaviside(x)) == 'Heaviside(x)' assert upretty(Heaviside(x)) == 'θ(x)' assert pretty(Heaviside(x, y)) == 'Heaviside(x, y)' assert upretty(Heaviside(x, y)) == 'θ(x, y)' assert pretty(dirichlet_eta(x)) == 'dirichlet_eta(x)' assert upretty(dirichlet_eta(x)) == 'η(x)' def test_hadamard_power(): m, n, p = symbols('m, n, p', integer=True) A = MatrixSymbol('A', m, n) B = MatrixSymbol('B', m, n) # Testing printer: expr = hadamard_power(A, n) ascii_str = \ """\ .n\n\ A \ """ ucode_str = \ """\ ∘n\n\ A \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = hadamard_power(A, 1+n) ascii_str = \ """\ .(n + 1)\n\ A \ """ ucode_str = \ """\ ∘(n + 1)\n\ A \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str expr = hadamard_power(A*B.T, 1+n) ascii_str = \ """\ .(n + 1)\n\ / T\\ \n\ \\A*B / \ """ ucode_str = \ """\ ∘(n + 1)\n\ ⎛ T⎞ \n\ ⎝A⋅B ⎠ \ """ assert pretty(expr) == ascii_str assert upretty(expr) == ucode_str def test_issue_17258(): n = Symbol('n', integer=True) assert pretty(Sum(n, (n, -oo, 1))) == \ ' 1 \n'\ ' __ \n'\ ' \\ ` \n'\ ' ) n\n'\ ' /_, \n'\ 'n = -oo ' assert upretty(Sum(n, (n, -oo, 1))) == \ """\ 1 \n\ ___ \n\ ╲ \n\ ╲ \n\ ╱ n\n\ ╱ \n\ ‾‾‾ \n\ n = -∞ \ """ def test_is_combining(): line = "v̇_m" assert [is_combining(sym) for sym in line] == \ [False, True, False, False] def test_issue_17616(): assert pretty(pi**(1/exp(1))) == \ ' / -1\\\n'\ ' \\e /\n'\ 'pi ' assert upretty(pi**(1/exp(1))) == \ ' ⎛ -1⎞\n'\ ' ⎝ℯ ⎠\n'\ 'π ' assert pretty(pi**(1/pi)) == \ ' 1 \n'\ ' --\n'\ ' pi\n'\ 'pi ' assert upretty(pi**(1/pi)) == \ ' 1\n'\ ' ─\n'\ ' π\n'\ 'π ' assert pretty(pi**(1/EulerGamma)) == \ ' 1 \n'\ ' ----------\n'\ ' EulerGamma\n'\ 'pi ' assert upretty(pi**(1/EulerGamma)) == \ ' 1\n'\ ' ─\n'\ ' γ\n'\ 'π ' z = Symbol("x_17") assert upretty(7**(1/z)) == \ 'x₁₇___\n'\ ' ╲╱ 7 ' assert pretty(7**(1/z)) == \ 'x_17___\n'\ ' \\/ 7 ' def test_issue_17857(): assert pretty(Range(-oo, oo)) == '{..., -1, 0, 1, ...}' assert pretty(Range(oo, -oo, -1)) == '{..., 1, 0, -1, ...}' def test_issue_18272(): x = Symbol('x') n = Symbol('n') assert upretty(ConditionSet(x, Eq(-x + exp(x), 0), S.Complexes)) == \ '⎧ │ ⎛ x ⎞⎫\n'\ '⎨x │ x ∊ ℂ ∧ ⎝-x + ℯ = 0⎠⎬\n'\ '⎩ │ ⎭' assert upretty(ConditionSet(x, Contains(n/2, Interval(0, oo)), FiniteSet(-n/2, n/2))) == \ '⎧ │ ⎧-n n⎫ ⎛n ⎞⎫\n'\ '⎨x │ x ∊ ⎨───, ─⎬ ∧ ⎜─ ∈ [0, ∞)⎟⎬\n'\ '⎩ │ ⎩ 2 2⎭ ⎝2 ⎠⎭' assert upretty(ConditionSet(x, Eq(Piecewise((1, x >= 3), (x/2 - 1/2, x >= 2), (1/2, x >= 1), (x/2, True)) - 1/2, 0), Interval(0, 3))) == \ '⎧ │ ⎛⎛⎧ 1 for x ≥ 3⎞ ⎞⎫\n'\ '⎪ │ ⎜⎜⎪ ⎟ ⎟⎪\n'\ '⎪ │ ⎜⎜⎪x ⎟ ⎟⎪\n'\ '⎪ │ ⎜⎜⎪─ - 0.5 for x ≥ 2⎟ ⎟⎪\n'\ '⎪ │ ⎜⎜⎪2 ⎟ ⎟⎪\n'\ '⎨x │ x ∊ [0, 3] ∧ ⎜⎜⎨ ⎟ - 0.5 = 0⎟⎬\n'\ '⎪ │ ⎜⎜⎪ 0.5 for x ≥ 1⎟ ⎟⎪\n'\ '⎪ │ ⎜⎜⎪ ⎟ ⎟⎪\n'\ '⎪ │ ⎜⎜⎪ x ⎟ ⎟⎪\n'\ '⎪ │ ⎜⎜⎪ ─ otherwise⎟ ⎟⎪\n'\ '⎩ │ ⎝⎝⎩ 2 ⎠ ⎠⎭' def test_Str(): from sympy.core.symbol import Str assert pretty(Str('x')) == 'x' def test_diffgeom(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseScalarField x,y = symbols('x y', real=True) m = Manifold('M', 2) assert pretty(m) == 'M' p = Patch('P', m) assert pretty(p) == "P" rect = CoordSystem('rect', p, [x, y]) assert pretty(rect) == "rect" b = BaseScalarField(rect, 0) assert pretty(b) == "x"
be4eb000ed5bab3153f685b8aac5bb9ca19f73f80fd17681e4f3182b1e77dfd4
from sympy.core.symbol import Symbol from sympy.functions.elementary.trigonometric import sin from sympy.integrals.integrals import integrate x = Symbol('x') def bench_integrate_sin(): integrate(sin(x), x) def bench_integrate_x1sin(): integrate(x**1*sin(x), x) def bench_integrate_x2sin(): integrate(x**2*sin(x), x) def bench_integrate_x3sin(): integrate(x**3*sin(x), x)
f17537b81de671abe282fcc741903b1f5b07237db3813fbd4644a72daf98dd57
from sympy.core.symbol import Symbol from sympy.functions.elementary.trigonometric import sin from sympy.integrals.trigonometry import trigintegrate x = Symbol('x') def timeit_trigintegrate_sin3x(): trigintegrate(sin(x)**3, x) def timeit_trigintegrate_x2(): trigintegrate(x**2, x) # -> None
c031b29dc7b61d384bfe134e4773a8f16822bfa02b841ed02631b353a2a973d1
''' Rule Based Integration(RUBI) module in SymPy uses set of transformation rules to integrate an expression. All the transformation rules are compiled as a discrimination-net which helps in matching expression with the rule efficiently. Due to large number of rules, the module would normally take lot of time to load. Hence, it is better to use Rubi while doing multiple integrations. Rules are taken from Rubi version 4.10.8. Note: This module has dependency on MatchPy library. Basic Structure =============== All rules in matchpy format are in rules folder. They are in separate files. While matching a pattern, there are constraints that need to be checked. These constraints are placed in a single file `constraints.py`. A complete rule look like this: ``` def cons_f1(m, x): return FreeQ(m, x) cons1 = CustomConstraint(cons_f1) def cons_f2(m): return NonzeroQ(m + S(1)) cons2 = CustomConstraint(cons_f2) pattern1 = Pattern(Integral(x_**WC('m', S(1)), x_), cons1, cons2) def replacement1(m, x): rubi.append(1) return Simp(x**(m + S(1))/(m + S(1)), x) rule1 = ReplacementRule(pattern1, replacement1) ``` As seen in the above example, a rule has 3 parts 1. Pattern with constraints. Expression is matched against this pattern. 2. Replacement function, which gives the resulting expression with which the original expression has to be replaced with. There is also `rubi.append(1)`. This (rubi) is a list which keeps track of rules applied to an expression. This can be accessed by `rules_applied` in `rubi.py` 3. Rule, which combines pattern and replacement function. (For more details refer to matchpy documents) Note: The name of arguments of function for constraints and replacement should be taken care of. They need to be exactly same as wildcard in the `Pattern`. Like, in the above example, if `cons_f1` is written something like this: ``` def cons_f1(a, x): return FreeQ(a, x) ``` This is not going to work because in the Pattern, `m` has been used as a wildcard. So only thing is naming of arguments matters. TODO ==== * Use code generation to implement all rules. * Testing of all the tests from rubi test suit. See: http://www.apmaths.uwo.ca/~arich/IntegrationProblems/MathematicaSyntaxFiles/MathematicaSyntaxFiles.html * Add support for `Piecewise` functions. Debugging ========= When an integration is not successful. We can see which rule is matching the expression by using `get_matching_rule_definition()` function. We can cross-check if correct rule is being applied by evaluating the same expression in Mathematica. If the applied rule is same, then we need to check the `ReplacementRule` and the utility functions used in the `ReplacementRule`. Parsing Rules and Tests ======================= Code for parsing rule and tests are included in sympy. They have been properly explained with steps in `sympy/integrals/rubi/parsetools/rubi_parsing_guide.md`. Running Tests ============= The tests for rubi in `rubi_tests` have been blacklisted as it takes a very long time to run all the tests. To run a test run the following in a Python terminal: ``` >>> import sympy >>> sympy.test("rubi_tests", blacklist = []) # doctest: +SKIP ``` For specific tests like `test_sine.py` use this `sympy.test("rubi_tests/tests/test_sine.py", blacklist = [])`. References ========== [1] http://www.apmaths.uwo.ca/~arich/ [2] https://github.com/sympy/sympy/issues/7749 [3] https://github.com/sympy/sympy/pull/12978 '''
a88f54a1f0e6c6203a8f02b1f286ebf03ef4270c9dbd61a271e191e2dd83ca57
from sympy.external import import_module from sympy.utilities.decorator import doctest_depends_on from sympy.core import Integer, Float from sympy.core.add import Add from sympy.core.function import Function from sympy.core.mul import Mul from sympy.core.numbers import E from sympy.core.power import Pow from sympy.core.singleton import S from sympy.integrals.integrals import Integral from sympy.functions import exp as sym_exp import inspect import re from sympy.simplify.powsimp import powsimp matchpy = import_module("matchpy") if matchpy: from matchpy import ManyToOneReplacer, ManyToOneMatcher from sympy.integrals.rubi.utility_function import ( rubi_exp, rubi_unevaluated_expr, process_trig ) from sympy.utilities.matchpy_connector import op_iter, op_len @doctest_depends_on(modules=('matchpy',)) def get_rubi_object(): """ Returns rubi ManyToOneReplacer by adding all rules from different modules. Uncomment the lines to add integration capabilities of that module. Currently, there are parsing issues with special_function, derivative and miscellaneous_integration. Hence they are commented. """ from sympy.integrals.rubi.rules.integrand_simplification import integrand_simplification from sympy.integrals.rubi.rules.linear_products import linear_products from sympy.integrals.rubi.rules.quadratic_products import quadratic_products from sympy.integrals.rubi.rules.binomial_products import binomial_products from sympy.integrals.rubi.rules.trinomial_products import trinomial_products from sympy.integrals.rubi.rules.miscellaneous_algebraic import miscellaneous_algebraic from sympy.integrals.rubi.rules.exponential import exponential from sympy.integrals.rubi.rules.logarithms import logarithms from sympy.integrals.rubi.rules.sine import sine from sympy.integrals.rubi.rules.tangent import tangent from sympy.integrals.rubi.rules.secant import secant from sympy.integrals.rubi.rules.miscellaneous_trig import miscellaneous_trig from sympy.integrals.rubi.rules.inverse_trig import inverse_trig from sympy.integrals.rubi.rules.hyperbolic import hyperbolic from sympy.integrals.rubi.rules.inverse_hyperbolic import inverse_hyperbolic from sympy.integrals.rubi.rules.special_functions import special_functions #from sympy.integrals.rubi.rules.derivative import derivative #from sympy.integrals.rubi.rules.piecewise_linear import piecewise_linear from sympy.integrals.rubi.rules.miscellaneous_integration import miscellaneous_integration rules = [] rules += integrand_simplification() rules += linear_products() rules += quadratic_products() rules += binomial_products() rules += trinomial_products() rules += miscellaneous_algebraic() rules += exponential() rules += logarithms() rules += special_functions() rules += sine() rules += tangent() rules += secant() rules += miscellaneous_trig() rules += inverse_trig() rules += hyperbolic() rules += inverse_hyperbolic() #rubi = piecewise_linear(rubi) rules += miscellaneous_integration() rubi = ManyToOneReplacer(*rules) return rubi, rules _E = rubi_unevaluated_expr(E) class LoadRubiReplacer: """ Class trick to load RUBI only once. """ _instance = None def __new__(cls): if matchpy is None: print("MatchPy library not found") return None if LoadRubiReplacer._instance is not None: return LoadRubiReplacer._instance obj = object.__new__(cls) obj._rubi = None obj._rules = None LoadRubiReplacer._instance = obj return obj def load(self): if self._rubi is not None: return self._rubi rubi, rules = get_rubi_object() self._rubi = rubi self._rules = rules return rubi def to_pickle(self, filename): import pickle rubi = self.load() with open(filename, "wb") as fout: pickle.dump(rubi, fout) def to_dill(self, filename): import dill rubi = self.load() with open(filename, "wb") as fout: dill.dump(rubi, fout) def from_pickle(self, filename): import pickle with open(filename, "rb") as fin: self._rubi = pickle.load(fin) return self._rubi def from_dill(self, filename): import dill with open(filename, "rb") as fin: self._rubi = dill.load(fin) return self._rubi @doctest_depends_on(modules=('matchpy',)) def process_final_integral(expr): """ Rubi's `rubi_exp` need to be replaced back to SymPy's general `exp`. Examples ======== >>> from sympy import Function, E, Integral >>> from sympy.integrals.rubi.rubimain import process_final_integral >>> from sympy.integrals.rubi.utility_function import rubi_unevaluated_expr >>> from sympy.abc import a, x >>> _E = rubi_unevaluated_expr(E) >>> process_final_integral(Integral(a, x)) Integral(a, x) >>> process_final_integral(_E**5) exp(5) """ if expr.has(_E): expr = expr.replace(_E, E) return expr @doctest_depends_on(modules=('matchpy',)) def rubi_powsimp(expr): """ This function is needed to preprocess an expression as done in matchpy `x^a*x^b` in matchpy auotmatically transforms to `x^(a+b)` Examples ======== >>> from sympy.integrals.rubi.rubimain import rubi_powsimp >>> from sympy.abc import a, b, x >>> rubi_powsimp(x**a*x**b) x**(a + b) """ lst_pow = [] lst_non_pow = [] if isinstance(expr, Mul): for i in expr.args: if isinstance(i, (Pow, rubi_exp, sym_exp)): lst_pow.append(i) else: lst_non_pow.append(i) return powsimp(Mul(*lst_pow))*Mul(*lst_non_pow) return expr @doctest_depends_on(modules=('matchpy',)) def rubi_integrate(expr, var, showsteps=False): """ Rule based algorithm for integration. Integrates the expression by applying transformation rules to the expression. Returns `Integrate` if an expression cannot be integrated. Parameters ========== expr : integrand expression var : variable of integration Returns Integral object if unable to integrate. """ rubi = LoadRubiReplacer().load() expr = expr.replace(sym_exp, rubi_exp) expr = process_trig(expr) expr = rubi_powsimp(expr) if isinstance(expr, (int, Integer, float, Float)): return S(expr)*var if isinstance(expr, Add): results = 0 for ex in expr.args: results += rubi.replace(Integral(ex, var)) return process_final_integral(results) results = util_rubi_integrate(Integral(expr, var)) return process_final_integral(results) @doctest_depends_on(modules=('matchpy',)) def util_rubi_integrate(expr, showsteps=False, max_loop=10): rubi = LoadRubiReplacer().load() expr = process_trig(expr) expr = expr.replace(sym_exp, rubi_exp) for i in range(max_loop): results = expr.replace( lambda x: isinstance(x, Integral), lambda x: rubi.replace(x, max_count=10) ) if expr == results: return results return results @doctest_depends_on(modules=('matchpy',)) def get_matching_rule_definition(expr, var): """ Prints the list or rules which match to `expr`. Parameters ========== expr : integrand expression var : variable of integration """ rubi = LoadRubiReplacer() matcher = rubi.matcher miter = matcher.match(Integral(expr, var)) for fun, e in miter: print("Rule matching: ") print(inspect.getsourcefile(fun)) code, lineno = inspect.getsourcelines(fun) print("On line: ", lineno) print("\n".join(code)) print("Pattern matching: ") pattno = int(re.match(r"^\s*rule(\d+)", code[0]).group(1)) print(matcher.patterns[pattno-1]) print(e) print()
80d096c45af7e246c22edf075d98b5965dae111030d6839e88cef5aaa320ced2
""" Utility functions for Rubi integration. See: http://www.apmaths.uwo.ca/~arich/IntegrationRules/PortableDocumentFiles/Integration%20utility%20functions.pdf """ from sympy.external import import_module matchpy = import_module("matchpy") from sympy.concrete.summations import Sum from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.containers import Dict from sympy.core.evalf import N from sympy.core.expr import UnevaluatedExpr from sympy.core.exprtools import factor_terms from sympy.core.function import (Function, WildFunction, expand, expand_trig) from sympy.core.mul import Mul from sympy.core.numbers import (E, Float, I, Integer, Rational, oo, pi, zoo) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.core.symbol import (Dummy, Symbol, Wild, symbols) from sympy.core.sympify import sympify from sympy.core.traversal import postorder_traversal from sympy.functions.combinatorial.factorials import factorial from sympy.functions.elementary.complexes import im, re, Abs, sign from sympy.functions.elementary.exponential import exp as sym_exp, log as sym_log, LambertW from sympy.functions.elementary.hyperbolic import acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch from sympy.functions.elementary.integers import floor, frac from sympy.functions.elementary.miscellaneous import (Max, Min, sqrt) from sympy.functions.elementary.trigonometric import atan, acsc, asin, acot, acos, asec, atan2, sin, cos, tan, cot, csc, sec from sympy.functions.special.elliptic_integrals import elliptic_f, elliptic_e, elliptic_pi from sympy.functions.special.error_functions import erf, fresnelc, fresnels, erfc, erfi, Ei, expint, li, Si, Ci, Shi, Chi from sympy.functions.special.gamma_functions import (digamma, gamma, loggamma, polygamma, uppergamma) from sympy.functions.special.hyper import (appellf1, hyper, TupleArg) from sympy.functions.special.zeta_functions import polylog, zeta from sympy.integrals.integrals import Integral from sympy.logic.boolalg import And, Or from sympy.ntheory.factor_ import (factorint, factorrat) from sympy.polys.partfrac import apart from sympy.polys.polyerrors import (PolynomialDivisionFailed, PolynomialError, UnificationFailed) from sympy.polys.polytools import (discriminant, factor, gcd, lcm, poly, sqf, sqf_list, Poly, degree, quo, rem, total_degree) from sympy.sets.sets import FiniteSet from sympy.simplify.powsimp import powdenest from sympy.simplify.radsimp import collect from sympy.simplify.simplify import fraction, simplify, cancel, powsimp, nsimplify from sympy.utilities.decorator import doctest_depends_on from sympy.utilities.iterables import flatten from random import randint class rubi_unevaluated_expr(UnevaluatedExpr): """ This is needed to convert `exp` as `Pow`. SymPy's UnevaluatedExpr has an issue with `is_commutative`. """ @property def is_commutative(self): from sympy.core.logic import fuzzy_and return fuzzy_and(a.is_commutative for a in self.args) _E = rubi_unevaluated_expr(E) class rubi_exp(Function): """ SymPy's exp is not identified as `Pow`. So it is not matched with `Pow`. Like `a = exp(2)` is not identified as `Pow(E, 2)`. Rubi rules need it. So, another exp has been created only for rubi module. Examples ======== >>> from sympy import Pow, exp as sym_exp >>> isinstance(sym_exp(2), Pow) False >>> from sympy.integrals.rubi.utility_function import rubi_exp >>> isinstance(rubi_exp(2), Pow) True """ @classmethod def eval(cls, *args): return Pow(_E, args[0]) class rubi_log(Function): """ For rule matching different `exp` has been used. So for proper results, `log` is modified little only for case when it encounters rubi's `exp`. For other cases it is same. Examples ======== >>> from sympy.integrals.rubi.utility_function import rubi_exp, rubi_log >>> a = rubi_exp(2) >>> rubi_log(a) 2 """ @classmethod def eval(cls, *args): if args[0].has(_E): return sym_log(args[0]).doit() else: return sym_log(args[0]) if matchpy: from matchpy import Arity, Operation, CustomConstraint, Pattern, ReplacementRule, ManyToOneReplacer from sympy.integrals.rubi.symbol import WC from matchpy import is_match, replace_all class UtilityOperator(Operation): name = 'UtilityOperator' arity = Arity.variadic commutative = False associative = True Operation.register(rubi_log) Operation.register(rubi_exp) A_, B_, C_, F_, G_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, \ n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, z_ = [WC(i) for i in 'ABCFGabcdefghijklmnpqrtuvswxz'] a, b, c, d, e = symbols('a b c d e') Int = Integral def replace_pow_exp(z): """ This function converts back rubi's `exp` to general SymPy's `exp`. Examples ======== >>> from sympy.integrals.rubi.utility_function import rubi_exp, replace_pow_exp >>> expr = rubi_exp(5) >>> expr E**5 >>> replace_pow_exp(expr) exp(5) """ z = S(z) if z.has(_E): z = z.replace(_E, E) return z def Simplify(expr): expr = simplify(expr) return expr def Set(expr, value): return {expr: value} def With(subs, expr): if isinstance(subs, dict): k = list(subs.keys())[0] expr = expr.xreplace({k: subs[k]}) else: for i in subs: k = list(i.keys())[0] expr = expr.xreplace({k: i[k]}) return expr def Module(subs, expr): return With(subs, expr) def Scan(f, expr): # evaluates f applied to each element of expr in turn. for i in expr: yield f(i) def MapAnd(f, l, x=None): # MapAnd[f,l] applies f to the elements of list l until False is returned; else returns True if x: for i in l: if f(i, x) == False: return False return True else: for i in l: if f(i) == False: return False return True def FalseQ(u): if isinstance(u, (Dict, dict)): return FalseQ(*list(u.values())) return u == False def ZeroQ(*expr): if len(expr) == 1: if isinstance(expr[0], list): return list(ZeroQ(i) for i in expr[0]) else: return Simplify(expr[0]) == 0 else: return all(ZeroQ(i) for i in expr) def OneQ(a): if a == S(1): return True return False def NegativeQ(u): u = Simplify(u) if u in (zoo, oo): return False if u.is_comparable: res = u < 0 if not res.is_Relational: return res return False def NonzeroQ(expr): return Simplify(expr) != 0 def FreeQ(nodes, var): if isinstance(nodes, list): return not any(S(expr).has(var) for expr in nodes) else: nodes = S(nodes) return not nodes.has(var) def NFreeQ(nodes, var): """ Note that in rubi 4.10.8 this function was not defined in `Integration Utility Functions.m`, but was used in rules. So explicitly its returning `False` """ return False # return not FreeQ(nodes, var) def List(*var): return list(var) def PositiveQ(var): var = Simplify(var) if var in (zoo, oo): return False if var.is_comparable: res = var > 0 if not res.is_Relational: return res return False def PositiveIntegerQ(*args): return all(var.is_Integer and PositiveQ(var) for var in args) def NegativeIntegerQ(*args): return all(var.is_Integer and NegativeQ(var) for var in args) def IntegerQ(var): var = Simplify(var) if isinstance(var, (int, Integer)): return True else: return var.is_Integer def IntegersQ(*var): return all(IntegerQ(i) for i in var) def _ComplexNumberQ(var): i = S(im(var)) if isinstance(i, (Integer, Float)): return i != 0 else: return False def ComplexNumberQ(*var): """ ComplexNumberQ(m, n,...) returns True if m, n, ... are all explicit complex numbers, else it returns False. Examples ======== >>> from sympy.integrals.rubi.utility_function import ComplexNumberQ >>> from sympy import I >>> ComplexNumberQ(1 + I*2, I) True >>> ComplexNumberQ(2, I) False """ return all(_ComplexNumberQ(i) for i in var) def PureComplexNumberQ(*var): return all((_ComplexNumberQ(i) and re(i)==0) for i in var) def RealNumericQ(u): return u.is_real def PositiveOrZeroQ(u): return u.is_real and u >= 0 def NegativeOrZeroQ(u): return u.is_real and u <= 0 def FractionOrNegativeQ(u): return FractionQ(u) or NegativeQ(u) def NegQ(var): return Not(PosQ(var)) and NonzeroQ(var) def Equal(a, b): return a == b def Unequal(a, b): return a != b def IntPart(u): # IntPart[u] returns the sum of the integer terms of u. if ProductQ(u): if IntegerQ(First(u)): return First(u)*IntPart(Rest(u)) elif IntegerQ(u): return u elif FractionQ(u): return IntegerPart(u) elif SumQ(u): res = 0 for i in u.args: res += IntPart(i) return res return 0 def FracPart(u): # FracPart[u] returns the sum of the non-integer terms of u. if ProductQ(u): if IntegerQ(First(u)): return First(u)*FracPart(Rest(u)) if IntegerQ(u): return 0 elif FractionQ(u): return FractionalPart(u) elif SumQ(u): res = 0 for i in u.args: res += FracPart(i) return res else: return u def RationalQ(*nodes): return all(var.is_Rational for var in nodes) def ProductQ(expr): return S(expr).is_Mul def SumQ(expr): return expr.is_Add def NonsumQ(expr): return not SumQ(expr) def Subst(a, x, y): if None in [a, x, y]: return None if a.has(Function('Integrate')): # substituting in `Function(Integrate)` won't take care of properties of Integral a = a.replace(Function('Integrate'), Integral) return a.subs(x, y) # return a.xreplace({x: y}) def First(expr, d=None): """ Gives the first element if it exists, or d otherwise. Examples ======== >>> from sympy.integrals.rubi.utility_function import First >>> from sympy.abc import a, b, c >>> First(a + b + c) a >>> First(a*b*c) a """ if isinstance(expr, list): return expr[0] if isinstance(expr, Symbol): return expr else: if SumQ(expr) or ProductQ(expr): l = Sort(expr.args) return l[0] else: return expr.args[0] def Rest(expr): """ Gives rest of the elements if it exists Examples ======== >>> from sympy.integrals.rubi.utility_function import Rest >>> from sympy.abc import a, b, c >>> Rest(a + b + c) b + c >>> Rest(a*b*c) b*c """ if isinstance(expr, list): return expr[1:] else: if SumQ(expr) or ProductQ(expr): l = Sort(expr.args) return expr.func(*l[1:]) else: return expr.args[1] def SqrtNumberQ(expr): # SqrtNumberQ[u] returns True if u^2 is a rational number; else it returns False. if PowerQ(expr): m = expr.base n = expr.exp return (IntegerQ(n) and SqrtNumberQ(m)) or (IntegerQ(n-S(1)/2) and RationalQ(m)) elif expr.is_Mul: return all(SqrtNumberQ(i) for i in expr.args) else: return RationalQ(expr) or expr == I def SqrtNumberSumQ(u): return SumQ(u) and SqrtNumberQ(First(u)) and SqrtNumberQ(Rest(u)) or ProductQ(u) and SqrtNumberQ(First(u)) and SqrtNumberSumQ(Rest(u)) def LinearQ(expr, x): """ LinearQ(expr, x) returns True iff u is a polynomial of degree 1. Examples ======== >>> from sympy.integrals.rubi.utility_function import LinearQ >>> from sympy.abc import x, y, a >>> LinearQ(a, x) False >>> LinearQ(3*x + y**2, x) True >>> LinearQ(3*x + y**2, y) False """ if isinstance(expr, list): return all(LinearQ(i, x) for i in expr) elif expr.is_polynomial(x): if degree(Poly(expr, x), gen=x) == 1: return True return False def Sqrt(a): return sqrt(a) def ArcCosh(a): return acosh(a) class Util_Coefficient(Function): def doit(self): if len(self.args) == 2: n = 1 else: n = Simplify(self.args[2]) if NumericQ(n): expr = expand(self.args[0]) if isinstance(n, (int, Integer)): return expr.coeff(self.args[1], n) else: return expr.coeff(self.args[1]**n) else: return self def Coefficient(expr, var, n=1): """ Coefficient(expr, var) gives the coefficient of form in the polynomial expr. Coefficient(expr, var, n) gives the coefficient of var**n in expr. Examples ======== >>> from sympy.integrals.rubi.utility_function import Coefficient >>> from sympy.abc import x, a, b, c >>> Coefficient(7 + 2*x + 4*x**3, x, 1) 2 >>> Coefficient(a + b*x + c*x**3, x, 0) a >>> Coefficient(a + b*x + c*x**3, x, 4) 0 >>> Coefficient(b*x + c*x**3, x, 3) c """ if NumericQ(n): if expr == 0 or n in (zoo, oo): return 0 expr = expand(expr) if isinstance(n, (int, Integer)): return expr.coeff(var, n) else: return expr.coeff(var**n) return Util_Coefficient(expr, var, n) def Denominator(var): var = Simplify(var) if isinstance(var, Pow): if isinstance(var.exp, Integer): if var.exp > 0: return Pow(Denominator(var.base), var.exp) elif var.exp < 0: return Pow(Numerator(var.base), -1*var.exp) elif isinstance(var, Add): var = factor(var) return fraction(var)[1] def Hypergeometric2F1(a, b, c, z): return hyper([a, b], [c], z) def Not(var): if isinstance(var, bool): return not var elif var.is_Relational: var = False return not var def FractionalPart(a): return frac(a) def IntegerPart(a): return floor(a) def AppellF1(a, b1, b2, c, x, y): return appellf1(a, b1, b2, c, x, y) def EllipticPi(*args): return elliptic_pi(*args) def EllipticE(*args): return elliptic_e(*args) def EllipticF(Phi, m): return elliptic_f(Phi, m) def ArcTan(a, b = None): if b is None: return atan(a) else: return atan2(a, b) def ArcCot(a): return acot(a) def ArcCoth(a): return acoth(a) def ArcTanh(a): return atanh(a) def ArcSin(a): return asin(a) def ArcSinh(a): return asinh(a) def ArcCos(a): return acos(a) def ArcCsc(a): return acsc(a) def ArcSec(a): return asec(a) def ArcCsch(a): return acsch(a) def ArcSech(a): return asech(a) def Sinh(u): return sinh(u) def Tanh(u): return tanh(u) def Cosh(u): return cosh(u) def Sech(u): return sech(u) def Csch(u): return csch(u) def Coth(u): return coth(u) def LessEqual(*args): for i in range(0, len(args) - 1): try: if args[i] > args[i + 1]: return False except (IndexError, NotImplementedError): return False return True def Less(*args): for i in range(0, len(args) - 1): try: if args[i] >= args[i + 1]: return False except (IndexError, NotImplementedError): return False return True def Greater(*args): for i in range(0, len(args) - 1): try: if args[i] <= args[i + 1]: return False except (IndexError, NotImplementedError): return False return True def GreaterEqual(*args): for i in range(0, len(args) - 1): try: if args[i] < args[i + 1]: return False except (IndexError, NotImplementedError): return False return True def FractionQ(*args): """ FractionQ(m, n,...) returns True if m, n, ... are all explicit fractions, else it returns False. Examples ======== >>> from sympy import S >>> from sympy.integrals.rubi.utility_function import FractionQ >>> FractionQ(S('3')) False >>> FractionQ(S('3')/S('2')) True """ return all(i.is_Rational for i in args) and all(Denominator(i) != S(1) for i in args) def IntLinearcQ(a, b, c, d, m, n, x): # returns True iff (a+b*x)^m*(c+d*x)^n is integrable wrt x in terms of non-hypergeometric functions. return IntegerQ(m) or IntegerQ(n) or IntegersQ(S(3)*m, S(3)*n) or IntegersQ(S(4)*m, S(4)*n) or IntegersQ(S(2)*m, S(6)*n) or IntegersQ(S(6)*m, S(2)*n) or IntegerQ(m + n) Defer = UnevaluatedExpr def Expand(expr): return expr.expand() def IndependentQ(u, x): """ If u is free from x IndependentQ(u, x) returns True else False. Examples ======== >>> from sympy.integrals.rubi.utility_function import IndependentQ >>> from sympy.abc import x, a, b >>> IndependentQ(a + b*x, x) False >>> IndependentQ(a + b, x) True """ return FreeQ(u, x) def PowerQ(expr): return expr.is_Pow or ExpQ(expr) def IntegerPowerQ(u): if isinstance(u, sym_exp): #special case for exp return IntegerQ(u.args[0]) return PowerQ(u) and IntegerQ(u.args[1]) def PositiveIntegerPowerQ(u): if isinstance(u, sym_exp): return IntegerQ(u.args[0]) and PositiveQ(u.args[0]) return PowerQ(u) and IntegerQ(u.args[1]) and PositiveQ(u.args[1]) def FractionalPowerQ(u): if isinstance(u, sym_exp): return FractionQ(u.args[0]) return PowerQ(u) and FractionQ(u.args[1]) def AtomQ(expr): expr = sympify(expr) if isinstance(expr, list): return False if expr in [None, True, False, _E]: # [None, True, False] are atoms in mathematica and _E is also an atom return True # elif isinstance(expr, list): # return all(AtomQ(i) for i in expr) else: return expr.is_Atom def ExpQ(u): u = replace_pow_exp(u) return Head(u) in (sym_exp, rubi_exp) def LogQ(u): return u.func in (sym_log, Log) def Head(u): return u.func def MemberQ(l, u): if isinstance(l, list): return u in l else: return u in l.args def TrigQ(u): if AtomQ(u): x = u else: x = Head(u) return MemberQ([sin, cos, tan, cot, sec, csc], x) def SinQ(u): return Head(u) == sin def CosQ(u): return Head(u) == cos def TanQ(u): return Head(u) == tan def CotQ(u): return Head(u) == cot def SecQ(u): return Head(u) == sec def CscQ(u): return Head(u) == csc def Sin(u): return sin(u) def Cos(u): return cos(u) def Tan(u): return tan(u) def Cot(u): return cot(u) def Sec(u): return sec(u) def Csc(u): return csc(u) def HyperbolicQ(u): if AtomQ(u): x = u else: x = Head(u) return MemberQ([sinh, cosh, tanh, coth, sech, csch], x) def SinhQ(u): return Head(u) == sinh def CoshQ(u): return Head(u) == cosh def TanhQ(u): return Head(u) == tanh def CothQ(u): return Head(u) == coth def SechQ(u): return Head(u) == sech def CschQ(u): return Head(u) == csch def InverseTrigQ(u): if AtomQ(u): x = u else: x = Head(u) return MemberQ([asin, acos, atan, acot, asec, acsc], x) def SinCosQ(f): return MemberQ([sin, cos, sec, csc], Head(f)) def SinhCoshQ(f): return MemberQ([sinh, cosh, sech, csch], Head(f)) def LeafCount(expr): return len(list(postorder_traversal(expr))) def Numerator(u): u = Simplify(u) if isinstance(u, Pow): if isinstance(u.exp, Integer): if u.exp > 0: return Pow(Numerator(u.base), u.exp) elif u.exp < 0: return Pow(Denominator(u.base), -1*u.exp) elif isinstance(u, Add): u = factor(u) return fraction(u)[0] def NumberQ(u): if isinstance(u, (int, float)): return True return u.is_number def NumericQ(u): return N(u).is_number def Length(expr): """ Returns number of elements in the expression just as SymPy's len. Examples ======== >>> from sympy.integrals.rubi.utility_function import Length >>> from sympy.abc import x, a, b >>> from sympy import cos, sin >>> Length(a + b) 2 >>> Length(sin(a)*cos(a)) 2 """ if isinstance(expr, list): return len(expr) return len(expr.args) def ListQ(u): return isinstance(u, list) def Im(u): u = S(u) return im(u.doit()) def Re(u): u = S(u) return re(u.doit()) def InverseHyperbolicQ(u): if not u.is_Atom: u = Head(u) return u in [acosh, asinh, atanh, acoth, acsch, acsch] def InverseFunctionQ(u): # returns True if u is a call on an inverse function; else returns False. return LogQ(u) or InverseTrigQ(u) and Length(u) <= 1 or InverseHyperbolicQ(u) or u.func == polylog def TrigHyperbolicFreeQ(u, x): # If u is free of trig, hyperbolic and calculus functions involving x, TrigHyperbolicFreeQ[u,x] returns true; else it returns False. if AtomQ(u): return True else: if TrigQ(u) | HyperbolicQ(u) | CalculusQ(u): return FreeQ(u, x) else: for i in u.args: if not TrigHyperbolicFreeQ(i, x): return False return True def InverseFunctionFreeQ(u, x): # If u is free of inverse, calculus and hypergeometric functions involving x, InverseFunctionFreeQ[u,x] returns true; else it returns False. if AtomQ(u): return True else: if InverseFunctionQ(u) or CalculusQ(u) or u.func in (hyper, appellf1): return FreeQ(u, x) else: for i in u.args: if not ElementaryFunctionQ(i): return False return True def RealQ(u): if ListQ(u): return MapAnd(RealQ, u) elif NumericQ(u): return ZeroQ(Im(N(u))) elif PowerQ(u): u = u.base v = u.exp return RealQ(u) & RealQ(v) & (IntegerQ(v) | PositiveOrZeroQ(u)) elif u.is_Mul: return all(RealQ(i) for i in u.args) elif u.is_Add: return all(RealQ(i) for i in u.args) elif u.is_Function: f = u.func u = u.args[0] if f in [sin, cos, tan, cot, sec, csc, atan, acot, erf]: return RealQ(u) else: if f in [asin, acos]: return LE(-1, u, 1) else: if f == sym_log: return PositiveOrZeroQ(u) else: return False else: return False def EqQ(u, v): return ZeroQ(u - v) def FractionalPowerFreeQ(u): if AtomQ(u): return True elif FractionalPowerQ(u): return False def ComplexFreeQ(u): if AtomQ(u) and Not(ComplexNumberQ(u)): return True else: return False def PolynomialQ(u, x = None): if x is None : return u.is_polynomial() if isinstance(x, Pow): if isinstance(x.exp, Integer): deg = degree(u, x.base) if u.is_polynomial(x): if deg % x.exp !=0 : return False try: p = Poly(u, x.base) except PolynomialError: return False c_list = p.all_coeffs() coeff_list = c_list[:-1:x.exp] coeff_list += [c_list[-1]] for i in coeff_list: if not i == 0: index = c_list.index(i) c_list[index] = 0 if all(i == 0 for i in c_list): return True else: return False else: return False elif isinstance(x.exp, (Float, Rational)): #not full - proof if FreeQ(simplify(u), x.base) and Exponent(u, x.base) == 0: if not all(FreeQ(u, i) for i in x.base.free_symbols): return False if isinstance(x, Mul): return all(PolynomialQ(u, i) for i in x.args) return u.is_polynomial(x) def FactorSquareFree(u): return sqf(u) def PowerOfLinearQ(expr, x): u = Wild('u') w = Wild('w') m = Wild('m') n = Wild('n') Match = expr.match(u**m) if PolynomialQ(Match[u], x) and FreeQ(Match[m], x): if IntegerQ(Match[m]): e = FactorSquareFree(Match[u]).match(w**n) if FreeQ(e[n], x) and LinearQ(e[w], x): return True else: return False else: return LinearQ(Match[u], x) else: return False def Exponent(expr, x): expr = Expand(S(expr)) if S(expr).is_number or (not expr.has(x)): return 0 if PolynomialQ(expr, x): if isinstance(x, Rational): return degree(Poly(expr, x), x) return degree(expr, gen = x) else: return 0 def ExponentList(expr, x): expr = Expand(S(expr)) if S(expr).is_number or (not expr.has(x)): return [0] if expr.is_Add: expr = collect(expr, x) lst = [] k = 1 for t in expr.args: if t.has(x): if isinstance(x, Rational): lst += [degree(Poly(t, x), x)] else: lst += [degree(t, gen = x)] else: if k == 1: lst += [0] k += 1 lst.sort() return lst else: if isinstance(x, Rational): return [degree(Poly(expr, x), x)] else: return [degree(expr, gen = x)] def QuadraticQ(u, x): # QuadraticQ(u, x) returns True iff u is a polynomial of degree 2 and not a monomial of the form a x^2 if ListQ(u): for expr in u: if Not(PolyQ(expr, x, 2) and Not(Coefficient(expr, x, 0) == 0 and Coefficient(expr, x, 1) == 0)): return False return True else: return PolyQ(u, x, 2) and Not(Coefficient(u, x, 0) == 0 and Coefficient(u, x, 1) == 0) def LinearPairQ(u, v, x): # LinearPairQ(u, v, x) returns True iff u and v are linear not equal x but u/v is a constant wrt x return LinearQ(u, x) and LinearQ(v, x) and NonzeroQ(u-x) and ZeroQ(Coefficient(u, x, 0)*Coefficient(v, x, 1)-Coefficient(u, x, 1)*Coefficient(v, x, 0)) def BinomialParts(u, x): if PolynomialQ(u, x): if Exponent(u, x) > 0: lst = ExponentList(u, x) if len(lst)==1: return [0, Coefficient(u, x, Exponent(u, x)), Exponent(u, x)] elif len(lst) == 2 and lst[0] == 0: return [Coefficient(u, x, 0), Coefficient(u, x, Exponent(u, x)), Exponent(u, x)] else: return False else: return False elif PowerQ(u): if u.base == x and FreeQ(u.exp, x): return [0, 1, u.exp] else: return False elif ProductQ(u): if FreeQ(First(u), x): lst2 = BinomialParts(Rest(u), x) if AtomQ(lst2): return False else: return [First(u)*lst2[0], First(u)*lst2[1], lst2[2]] elif FreeQ(Rest(u), x): lst1 = BinomialParts(First(u), x) if AtomQ(lst1): return False else: return [Rest(u)*lst1[0], Rest(u)*lst1[1], lst1[2]] lst1 = BinomialParts(First(u), x) if AtomQ(lst1): return False lst2 = BinomialParts(Rest(u), x) if AtomQ(lst2): return False a = lst1[0] b = lst1[1] m = lst1[2] c = lst2[0] d = lst2[1] n = lst2[2] if ZeroQ(a): if ZeroQ(c): return [0, b*d, m + n] elif ZeroQ(m + n): return [b*d, b*c, m] else: return False if ZeroQ(c): if ZeroQ(m + n): return [b*d, a*d, n] else: return False if EqQ(m, n) and ZeroQ(a*d + b*c): return [a*c, b*d, 2*m] else: return False elif SumQ(u): if FreeQ(First(u),x): lst2 = BinomialParts(Rest(u), x) if AtomQ(lst2): return False else: return [First(u) + lst2[0], lst2[1], lst2[2]] elif FreeQ(Rest(u), x): lst1 = BinomialParts(First(u), x) if AtomQ(lst1): return False else: return[Rest(u) + lst1[0], lst1[1], lst1[2]] lst1 = BinomialParts(First(u), x) if AtomQ(lst1): return False lst2 = BinomialParts(Rest(u),x) if AtomQ(lst2): return False if EqQ(lst1[2], lst2[2]): return [lst1[0] + lst2[0], lst1[1] + lst2[1], lst1[2]] else: return False else: return False def TrinomialParts(u, x): # If u is equivalent to a trinomial of the form a + b*x^n + c*x^(2*n) where n!=0, b!=0 and c!=0, TrinomialParts[u,x] returns the list {a,b,c,n}; else it returns False. u = sympify(u) if PolynomialQ(u, x): lst = CoefficientList(u, x) if len(lst)<3 or EvenQ(sympify(len(lst))) or ZeroQ((len(lst)+1)/2): return False #Catch( # Scan(Function(if ZeroQ(lst), Null, Throw(False), Drop(Drop(Drop(lst, [(len(lst)+1)/2]), 1), -1]; # [First(lst), lst[(len(lst)+1)/2], Last(lst), (len(lst)-1)/2]): if PowerQ(u): if EqQ(u.exp, 2): lst = BinomialParts(u.base, x) if not lst or ZeroQ(lst[0]): return False else: return [lst[0]**2, 2*lst[0]*lst[1], lst[1]**2, lst[2]] else: return False if ProductQ(u): if FreeQ(First(u), x): lst2 = TrinomialParts(Rest(u), x) if not lst2: return False else: return [First(u)*lst2[0], First(u)*lst2[1], First(u)*lst2[2], lst2[3]] if FreeQ(Rest(u), x): lst1 = TrinomialParts(First(u), x) if not lst1: return False else: return [Rest(u)*lst1[0], Rest(u)*lst1[1], Rest(u)*lst1[2], lst1[3]] lst1 = BinomialParts(First(u), x) if not lst1: return False lst2 = BinomialParts(Rest(u), x) if not lst2: return False a = lst1[0] b = lst1[1] m = lst1[2] c = lst2[0] d = lst2[1] n = lst2[2] if EqQ(m, n) and NonzeroQ(a*d+b*c): return [a*c, a*d + b*c, b*d, m] else: return False if SumQ(u): if FreeQ(First(u), x): lst2 = TrinomialParts(Rest(u), x) if not lst2: return False else: return [First(u)+lst2[0], lst2[1], lst2[2], lst2[3]] if FreeQ(Rest(u), x): lst1 = TrinomialParts(First(u), x) if not lst1: return False else: return [Rest(u)+lst1[0], lst1[1], lst1[2], lst1[3]] lst1 = TrinomialParts(First(u), x) if not lst1: lst3 = BinomialParts(First(u), x) if not lst3: return False lst2 = TrinomialParts(Rest(u), x) if not lst2: lst4 = BinomialParts(Rest(u), x) if not lst4: return False if EqQ(lst3[2], 2*lst4[2]): return [lst3[0]+lst4[0], lst4[1], lst3[1], lst4[2]] if EqQ(lst4[2], 2*lst3[2]): return [lst3[0]+lst4[0], lst3[1], lst4[1], lst3[2]] else: return False if EqQ(lst3[2], lst2[3]) and NonzeroQ(lst3[1]+lst2[1]): return [lst3[0]+lst2[0], lst3[1]+lst2[1], lst2[2], lst2[3]] if EqQ(lst3[2], 2*lst2[3]) and NonzeroQ(lst3[1]+lst2[2]): return [lst3[0]+lst2[0], lst2[1], lst3[1]+lst2[2], lst2[3]] else: return False lst2 = TrinomialParts(Rest(u), x) if AtomQ(lst2): lst4 = BinomialParts(Rest(u), x) if not lst4: return False if EqQ(lst4[2], lst1[3]) and NonzeroQ(lst1[1]+lst4[0]): return [lst1[0]+lst4[0], lst1[1]+lst4[1], lst1[2], lst1[3]] if EqQ(lst4[2], 2*lst1[3]) and NonzeroQ(lst1[2]+lst4[1]): return [lst1[0]+lst4[0], lst1[1], lst1[2]+lst4[1], lst1[3]] else: return False if EqQ(lst1[3], lst2[3]) and NonzeroQ(lst1[1]+lst2[1]) and NonzeroQ(lst1[2]+lst2[2]): return [lst1[0]+lst2[0], lst1[1]+lst2[1], lst1[2]+lst2[2], lst1[3]] else: return False else: return False def PolyQ(u, x, n=None): # returns True iff u is a polynomial of degree n. if ListQ(u): return all(PolyQ(i, x) for i in u) if n is None: if u == x: return False elif isinstance(x, Pow): n = x.exp x_base = x.base if FreeQ(n, x_base): if PositiveIntegerQ(n): return PolyQ(u, x_base) and (PolynomialQ(u, x) or PolynomialQ(Together(u), x)) elif AtomQ(n): return PolynomialQ(u, x) and FreeQ(CoefficientList(u, x), x_base) else: return False return PolynomialQ(u, x) or PolynomialQ(u, Together(x)) else: return PolynomialQ(u, x) and Coefficient(u, x, n) != 0 and Exponent(u, x) == n def EvenQ(u): # gives True if expr is an even integer, and False otherwise. return isinstance(u, (Integer, int)) and u%2 == 0 def OddQ(u): # gives True if expr is an odd integer, and False otherwise. return isinstance(u, (Integer, int)) and u%2 == 1 def PerfectSquareQ(u): # (* If u is a rational number whose squareroot is rational or if u is of the form u1^n1 u2^n2 ... # and n1, n2, ... are even, PerfectSquareQ[u] returns True; else it returns False. *) if RationalQ(u): return Greater(u, 0) and RationalQ(Sqrt(u)) elif PowerQ(u): return EvenQ(u.exp) elif ProductQ(u): return PerfectSquareQ(First(u)) and PerfectSquareQ(Rest(u)) elif SumQ(u): s = Simplify(u) if NonsumQ(s): return PerfectSquareQ(s) return False else: return False def NiceSqrtAuxQ(u): if RationalQ(u): return u > 0 elif PowerQ(u): return EvenQ(u.exp) elif ProductQ(u): return NiceSqrtAuxQ(First(u)) and NiceSqrtAuxQ(Rest(u)) elif SumQ(u): s = Simplify(u) return NonsumQ(s) and NiceSqrtAuxQ(s) else: return False def NiceSqrtQ(u): return Not(NegativeQ(u)) and NiceSqrtAuxQ(u) def Together(u): return factor(u) def PosAux(u): if RationalQ(u): return u>0 elif NumberQ(u): if ZeroQ(Re(u)): return Im(u) > 0 else: return Re(u) > 0 elif NumericQ(u): v = N(u) if ZeroQ(Re(v)): return Im(v) > 0 else: return Re(v) > 0 elif PowerQ(u): if OddQ(u.exp): return PosAux(u.base) else: return True elif ProductQ(u): if PosAux(First(u)): return PosAux(Rest(u)) else: return not PosAux(Rest(u)) elif SumQ(u): return PosAux(First(u)) else: res = u > 0 if res in(True, False): return res return True def PosQ(u): # If u is not 0 and has a positive form, PosQ[u] returns True, else it returns False. return PosAux(TogetherSimplify(u)) def CoefficientList(u, x): if PolynomialQ(u, x): return list(reversed(Poly(u, x).all_coeffs())) else: return [] def ReplaceAll(expr, args): if isinstance(args, list): n_args = {} for i in args: n_args.update(i) return expr.subs(n_args) return expr.subs(args) def ExpandLinearProduct(v, u, a, b, x): # If u is a polynomial in x, ExpandLinearProduct[v,u,a,b,x] expands v*u into a sum of terms of the form c*v*(a+b*x)^n. if FreeQ([a, b], x) and PolynomialQ(u, x): lst = CoefficientList(ReplaceAll(u, {x: (x - a)/b}), x) lst = [SimplifyTerm(i, x) for i in lst] res = 0 for k in range(1, len(lst)+1): res = res + Simplify(v*lst[k-1]*(a + b*x)**(k - 1)) return res return u*v def GCD(*args): args = S(args) if len(args) == 1: if isinstance(args[0], (int, Integer)): return args[0] else: return S(1) return gcd(*args) def ContentFactor(expn): return factor_terms(expn) def NumericFactor(u): # returns the real numeric factor of u. if NumberQ(u): if ZeroQ(Im(u)): return u elif ZeroQ(Re(u)): return Im(u) else: return S(1) elif PowerQ(u): if RationalQ(u.base) and RationalQ(u.exp): if u.exp > 0: return 1/Denominator(u.base) else: return 1/(1/Denominator(u.base)) else: return S(1) elif ProductQ(u): return Mul(*[NumericFactor(i) for i in u.args]) elif SumQ(u): if LeafCount(u) < 50: c = ContentFactor(u) if SumQ(c): return S(1) else: return NumericFactor(c) else: m = NumericFactor(First(u)) n = NumericFactor(Rest(u)) if m < 0 and n < 0: return -GCD(-m, -n) else: return GCD(m, n) return S(1) def NonnumericFactors(u): if NumberQ(u): if ZeroQ(Im(u)): return S(1) elif ZeroQ(Re(u)): return I return u elif PowerQ(u): if RationalQ(u.base) and FractionQ(u.exp): return u/NumericFactor(u) return u elif ProductQ(u): result = 1 for i in u.args: result *= NonnumericFactors(i) return result elif SumQ(u): if LeafCount(u) < 50: i = ContentFactor(u) if SumQ(i): return u else: return NonnumericFactors(i) n = NumericFactor(u) result = 0 for i in u.args: result += i/n return result return u def MakeAssocList(u, x, alst=None): # (* MakeAssocList[u,x,alst] returns an association list of gensymed symbols with the nonatomic # parameters of a u that are not integer powers, products or sums. *) if alst is None: alst = [] u = replace_pow_exp(u) x = replace_pow_exp(x) if AtomQ(u): return alst elif IntegerPowerQ(u): return MakeAssocList(u.base, x, alst) elif ProductQ(u) or SumQ(u): return MakeAssocList(Rest(u), x, MakeAssocList(First(u), x, alst)) elif FreeQ(u, x): tmp = [] for i in alst: if PowerQ(i): if i.exp == u: tmp.append(i) break elif len(i.args) > 1: # make sure args has length > 1, else causes index error some times if i.args[1] == u: tmp.append(i) break if tmp == []: alst.append(u) return alst return alst def GensymSubst(u, x, alst=None): # (* GensymSubst[u,x,alst] returns u with the kernels in alst free of x replaced by gensymed names. *) if alst is None: alst =[] u = replace_pow_exp(u) x = replace_pow_exp(x) if AtomQ(u): return u elif IntegerPowerQ(u): return GensymSubst(u.base, x, alst)**u.exp elif ProductQ(u) or SumQ(u): return u.func(*[GensymSubst(i, x, alst) for i in u.args]) elif FreeQ(u, x): tmp = [] for i in alst: if PowerQ(i): if i.exp == u: tmp.append(i) break elif len(i.args) > 1: # make sure args has length > 1, else causes index error some times if i.args[1] == u: tmp.append(i) break if tmp == []: return u return tmp[0][0] return u def KernelSubst(u, x, alst): # (* KernelSubst[u,x,alst] returns u with the gensymed names in alst replaced by kernels free of x. *) if AtomQ(u): tmp = [] for i in alst: if i.args[0] == u: tmp.append(i) break if tmp == []: return u elif len(tmp[0].args) > 1: # make sure args has length > 1, else causes index error some times return tmp[0].args[1] elif IntegerPowerQ(u): tmp = KernelSubst(u.base, x, alst) if u.exp < 0 and ZeroQ(tmp): return 'Indeterminate' return tmp**u.exp elif ProductQ(u) or SumQ(u): return u.func(*[KernelSubst(i, x, alst) for i in u.args]) return u def ExpandExpression(u, x): if AlgebraicFunctionQ(u, x) and Not(RationalFunctionQ(u, x)): v = ExpandAlgebraicFunction(u, x) else: v = S(0) if SumQ(v): return ExpandCleanup(v, x) v = SmartApart(u, x) if SumQ(v): return ExpandCleanup(v, x) v = SmartApart(RationalFunctionFactors(u, x), x, x) if SumQ(v): w = NonrationalFunctionFactors(u, x) return ExpandCleanup(v.func(*[i*w for i in v.args]), x) v = Expand(u) if SumQ(v): return ExpandCleanup(v, x) v = Expand(u) if SumQ(v): return ExpandCleanup(v, x) return SimplifyTerm(u, x) def Apart(u, x): if RationalFunctionQ(u, x): return apart(u, x) return u def SmartApart(*args): if len(args) == 2: u, x = args alst = MakeAssocList(u, x) tmp = KernelSubst(Apart(GensymSubst(u, x, alst), x), x, alst) if tmp == 'Indeterminate': return u return tmp u, v, x = args alst = MakeAssocList(u, x) tmp = KernelSubst(Apart(GensymSubst(u, x, alst), x), x, alst) if tmp == 'Indeterminate': return u return tmp def MatchQ(expr, pattern, *var): # returns the matched arguments after matching pattern with expression match = expr.match(pattern) if match: return tuple(match[i] for i in var) else: return None def PolynomialQuotientRemainder(p, q, x): return [PolynomialQuotient(p, q, x), PolynomialRemainder(p, q, x)] def FreeFactors(u, x): # returns the product of the factors of u free of x. if ProductQ(u): result = 1 for i in u.args: if FreeQ(i, x): result *= i return result elif FreeQ(u, x): return u else: return S(1) def NonfreeFactors(u, x): """ Returns the product of the factors of u not free of x. Examples ======== >>> from sympy.integrals.rubi.utility_function import NonfreeFactors >>> from sympy.abc import x, a, b >>> NonfreeFactors(a, x) 1 >>> NonfreeFactors(x + a, x) a + x >>> NonfreeFactors(a*b*x, x) x """ if ProductQ(u): result = 1 for i in u.args: if not FreeQ(i, x): result *= i return result elif FreeQ(u, x): return 1 else: return u def RemoveContentAux(expr, x): return RemoveContentAux_replacer.replace(UtilityOperator(expr, x)) def RemoveContent(u, x): v = NonfreeFactors(u, x) w = Together(v) if EqQ(FreeFactors(w, x), 1): return RemoveContentAux(v, x) else: return RemoveContentAux(NonfreeFactors(w, x), x) def FreeTerms(u, x): """ Returns the sum of the terms of u free of x. Examples ======== >>> from sympy.integrals.rubi.utility_function import FreeTerms >>> from sympy.abc import x, a, b >>> FreeTerms(a, x) a >>> FreeTerms(x*a, x) 0 >>> FreeTerms(a*x + b, x) b """ if SumQ(u): result = 0 for i in u.args: if FreeQ(i, x): result += i return result elif FreeQ(u, x): return u else: return 0 def NonfreeTerms(u, x): # returns the sum of the terms of u free of x. if SumQ(u): result = S(0) for i in u.args: if not FreeQ(i, x): result += i return result elif not FreeQ(u, x): return u else: return S(0) def ExpandAlgebraicFunction(expr, x): if ProductQ(expr): u_ = Wild('u', exclude=[x]) n_ = Wild('n', exclude=[x]) v_ = Wild('v') pattern = u_*v_ match = expr.match(pattern) if match: keys = [u_, v_] if len(keys) == len(match): u, v = tuple([match[i] for i in keys]) if SumQ(v): u, v = v, u if not FreeQ(u, x) and SumQ(u): result = 0 for i in u.args: result += i*v return result pattern = u_**n_*v_ match = expr.match(pattern) if match: keys = [u_, n_, v_] if len(keys) == len(match): u, n, v = tuple([match[i] for i in keys]) if PositiveIntegerQ(n) and SumQ(u): w = Expand(u**n) result = 0 for i in w.args: result += i*v return result return expr def CollectReciprocals(expr, x): # Basis: e/(a+b x)+f/(c+d x)==(c e+a f+(d e+b f) x)/(a c+(b c+a d) x+b d x^2) if SumQ(expr): u_ = Wild('u') a_ = Wild('a', exclude=[x]) b_ = Wild('b', exclude=[x]) c_ = Wild('c', exclude=[x]) d_ = Wild('d', exclude=[x]) e_ = Wild('e', exclude=[x]) f_ = Wild('f', exclude=[x]) pattern = u_ + e_/(a_ + b_*x) + f_/(c_+d_*x) match = expr.match(pattern) if match: try: # .match() does not work peoperly always keys = [u_, a_, b_, c_, d_, e_, f_] u, a, b, c, d, e, f = tuple([match[i] for i in keys]) if ZeroQ(b*c + a*d) & ZeroQ(d*e + b*f): return CollectReciprocals(u + (c*e + a*f)/(a*c + b*d*x**2),x) elif ZeroQ(b*c + a*d) & ZeroQ(c*e + a*f): return CollectReciprocals(u + (d*e + b*f)*x/(a*c + b*d*x**2),x) except: pass return expr def ExpandCleanup(u, x): v = CollectReciprocals(u, x) if SumQ(v): res = 0 for i in v.args: res += SimplifyTerm(i, x) v = res if SumQ(v): return UnifySum(v, x) else: return v else: return v def AlgebraicFunctionQ(u, x, flag=False): if ListQ(u): if u == []: return True elif AlgebraicFunctionQ(First(u), x, flag): return AlgebraicFunctionQ(Rest(u), x, flag) else: return False elif AtomQ(u) or FreeQ(u, x): return True elif PowerQ(u): if RationalQ(u.exp) | flag & FreeQ(u.exp, x): return AlgebraicFunctionQ(u.base, x, flag) elif ProductQ(u) | SumQ(u): for i in u.args: if not AlgebraicFunctionQ(i, x, flag): return False return True return False def Coeff(expr, form, n=1): if n == 1: return Coefficient(Together(expr), form, n) else: coef1 = Coefficient(expr, form, n) coef2 = Coefficient(Together(expr), form, n) if Simplify(coef1 - coef2) == 0: return coef1 else: return coef2 def LeadTerm(u): if SumQ(u): return First(u) return u def RemainingTerms(u): if SumQ(u): return Rest(u) return u def LeadFactor(u): # returns the leading factor of u. if ComplexNumberQ(u) and Re(u) == 0: if Im(u) == S(1): return u else: return LeadFactor(Im(u)) elif ProductQ(u): return LeadFactor(First(u)) return u def RemainingFactors(u): # returns the remaining factors of u. if ComplexNumberQ(u) and Re(u) == 0: if Im(u) == 1: return S(1) else: return I*RemainingFactors(Im(u)) elif ProductQ(u): return RemainingFactors(First(u))*Rest(u) return S(1) def LeadBase(u): """ returns the base of the leading factor of u. Examples ======== >>> from sympy.integrals.rubi.utility_function import LeadBase >>> from sympy.abc import a, b, c >>> LeadBase(a**b) a >>> LeadBase(a**b*c) a """ v = LeadFactor(u) if PowerQ(v): return v.base return v def LeadDegree(u): # returns the degree of the leading factor of u. v = LeadFactor(u) if PowerQ(v): return v.exp return v def Numer(expr): # returns the numerator of u. if PowerQ(expr): if expr.exp < 0: return 1 if ProductQ(expr): return Mul(*[Numer(i) for i in expr.args]) return Numerator(expr) def Denom(u): # returns the denominator of u if PowerQ(u): if u.exp < 0: return u.args[0]**(-u.args[1]) elif ProductQ(u): return Mul(*[Denom(i) for i in u.args]) return Denominator(u) def hypergeom(n, d, z): return hyper(n, d, z) def Expon(expr, form): return Exponent(Together(expr), form) def MergeMonomials(expr, x): u_ = Wild('u') p_ = Wild('p', exclude=[x, 1, 0]) a_ = Wild('a', exclude=[x]) b_ = Wild('b', exclude=[x, 0]) c_ = Wild('c', exclude=[x]) d_ = Wild('d', exclude=[x, 0]) n_ = Wild('n', exclude=[x]) m_ = Wild('m', exclude=[x]) # Basis: If m/n\[Element]\[DoubleStruckCapitalZ], then z^m (c z^n)^p==(c z^n)^(m/n+p)/c^(m/n) pattern = u_*(a_ + b_*x)**m_*(c_*(a_ + b_*x)**n_)**p_ match = expr.match(pattern) if match: keys = [u_, a_, b_, m_, c_, n_, p_] if len(keys) == len(match): u, a, b, m, c, n, p = tuple([match[i] for i in keys]) if IntegerQ(m/n): if u*(c*(a + b*x)**n)**(m/n + p)/c**(m/n) is S.NaN: return expr else: return u*(c*(a + b*x)**n)**(m/n + p)/c**(m/n) # Basis: If m\[Element]\[DoubleStruckCapitalZ] \[And] b c-a d==0, then (a+b z)^m==b^m/d^m (c+d z)^m pattern = u_*(a_ + b_*x)**m_*(c_ + d_*x)**n_ match = expr.match(pattern) if match: keys = [u_, a_, b_, m_, c_, d_, n_] if len(keys) == len(match): u, a, b, m, c, d, n = tuple([match[i] for i in keys]) if IntegerQ(m) and ZeroQ(b*c - a*d): if u*b**m/d**m*(c + d*x)**(m + n) is S.NaN: return expr else: return u*b**m/d**m*(c + d*x)**(m + n) return expr def PolynomialDivide(u, v, x): quo = PolynomialQuotient(u, v, x) rem = PolynomialRemainder(u, v, x) s = 0 for i in ExponentList(quo, x): s += Simp(Together(Coefficient(quo, x, i)*x**i), x) quo = s rem = Together(rem) free = FreeFactors(rem, x) rem = NonfreeFactors(rem, x) monomial = x**Min(ExponentList(rem, x)) if NegQ(Coefficient(rem, x, 0)): monomial = -monomial s = 0 for i in ExponentList(rem, x): s += Simp(Together(Coefficient(rem, x, i)*x**i/monomial), x) rem = s if BinomialQ(v, x): return quo + free*monomial*rem/ExpandToSum(v, x) else: return quo + free*monomial*rem/v def BinomialQ(u, x, n=None): """ If u is equivalent to an expression of the form a + b*x**n, BinomialQ(u, x, n) returns True, else it returns False. Examples ======== >>> from sympy.integrals.rubi.utility_function import BinomialQ >>> from sympy.abc import x >>> BinomialQ(x**9, x) True >>> BinomialQ((1 + x)**3, x) False """ if ListQ(u): for i in u: if Not(BinomialQ(i, x, n)): return False return True elif NumberQ(x): return False return ListQ(BinomialParts(u, x)) def TrinomialQ(u, x): """ If u is equivalent to an expression of the form a + b*x**n + c*x**(2*n) where n, b and c are not 0, TrinomialQ(u, x) returns True, else it returns False. Examples ======== >>> from sympy.integrals.rubi.utility_function import TrinomialQ >>> from sympy.abc import x >>> TrinomialQ((7 + 2*x**6 + 3*x**12), x) True >>> TrinomialQ(x**2, x) False """ if ListQ(u): for i in u.args: if Not(TrinomialQ(i, x)): return False return True check = False u = replace_pow_exp(u) if PowerQ(u): if u.exp == 2 and BinomialQ(u.base, x): check = True return ListQ(TrinomialParts(u,x)) and Not(QuadraticQ(u, x)) and Not(check) def GeneralizedBinomialQ(u, x): """ If u is equivalent to an expression of the form a*x**q+b*x**n where n, q and b are not 0, GeneralizedBinomialQ(u, x) returns True, else it returns False. Examples ======== >>> from sympy.integrals.rubi.utility_function import GeneralizedBinomialQ >>> from sympy.abc import a, x, q, b, n >>> GeneralizedBinomialQ(a*x**q, x) False """ if ListQ(u): return all(GeneralizedBinomialQ(i, x) for i in u) return ListQ(GeneralizedBinomialParts(u, x)) def GeneralizedTrinomialQ(u, x): """ If u is equivalent to an expression of the form a*x**q+b*x**n+c*x**(2*n-q) where n, q, b and c are not 0, GeneralizedTrinomialQ(u, x) returns True, else it returns False. Examples ======== >>> from sympy.integrals.rubi.utility_function import GeneralizedTrinomialQ >>> from sympy.abc import x >>> GeneralizedTrinomialQ(7 + 2*x**6 + 3*x**12, x) False """ if ListQ(u): return all(GeneralizedTrinomialQ(i, x) for i in u) return ListQ(GeneralizedTrinomialParts(u, x)) def FactorSquareFreeList(poly): r = sqf_list(poly) result = [[1, 1]] for i in r[1]: result.append(list(i)) return result def PerfectPowerTest(u, x): # If u (x) is equivalent to a polynomial raised to an integer power greater than 1, # PerfectPowerTest[u,x] returns u (x) as an expanded polynomial raised to the power; # else it returns False. if PolynomialQ(u, x): lst = FactorSquareFreeList(u) gcd = 0 v = 1 if lst[0] == [1, 1]: lst = Rest(lst) for i in lst: gcd = GCD(gcd, i[1]) if gcd > 1: for i in lst: v = v*i[0]**(i[1]/gcd) return Expand(v)**gcd else: return False return False def SquareFreeFactorTest(u, x): # If u (x) can be square free factored, SquareFreeFactorTest[u,x] returns u (x) in # factored form; else it returns False. if PolynomialQ(u, x): v = FactorSquareFree(u) if PowerQ(v) or ProductQ(v): return v return False return False def RationalFunctionQ(u, x): # If u is a rational function of x, RationalFunctionQ[u,x] returns True; else it returns False. if AtomQ(u) or FreeQ(u, x): return True elif IntegerPowerQ(u): return RationalFunctionQ(u.base, x) elif ProductQ(u) or SumQ(u): for i in u.args: if Not(RationalFunctionQ(i, x)): return False return True return False def RationalFunctionFactors(u, x): # RationalFunctionFactors[u,x] returns the product of the factors of u that are rational functions of x. if ProductQ(u): res = 1 for i in u.args: if RationalFunctionQ(i, x): res *= i return res elif RationalFunctionQ(u, x): return u return S(1) def NonrationalFunctionFactors(u, x): if ProductQ(u): res = 1 for i in u.args: if not RationalFunctionQ(i, x): res *= i return res elif RationalFunctionQ(u, x): return S(1) return u def Reverse(u): if isinstance(u, list): return list(reversed(u)) else: l = list(u.args) return u.func(*list(reversed(l))) def RationalFunctionExponents(u, x): """ u is a polynomial or rational function of x. RationalFunctionExponents(u, x) returns a list of the exponent of the numerator of u and the exponent of the denominator of u. Examples ======== >>> from sympy.integrals.rubi.utility_function import RationalFunctionExponents >>> from sympy.abc import x, a >>> RationalFunctionExponents(x, x) [1, 0] >>> RationalFunctionExponents(x**(-1), x) [0, 1] >>> RationalFunctionExponents(x**(-1)*a, x) [0, 1] """ if PolynomialQ(u, x): return [Exponent(u, x), 0] elif IntegerPowerQ(u): if PositiveQ(u.exp): return u.exp*RationalFunctionExponents(u.base, x) return (-u.exp)*Reverse(RationalFunctionExponents(u.base, x)) elif ProductQ(u): lst1 = RationalFunctionExponents(First(u), x) lst2 = RationalFunctionExponents(Rest(u), x) return [lst1[0] + lst2[0], lst1[1] + lst2[1]] elif SumQ(u): v = Together(u) if SumQ(v): lst1 = RationalFunctionExponents(First(u), x) lst2 = RationalFunctionExponents(Rest(u), x) return [Max(lst1[0] + lst2[1], lst2[0] + lst1[1]), lst1[1] + lst2[1]] else: return RationalFunctionExponents(v, x) return [0, 0] def RationalFunctionExpand(expr, x): # expr is a polynomial or rational function of x. # RationalFunctionExpand[u,x] returns the expansion of the factors of u that are rational functions times the other factors. def cons_f1(n): return FractionQ(n) cons1 = CustomConstraint(cons_f1) def cons_f2(x, v): if not isinstance(x, Symbol): return False return UnsameQ(v, x) cons2 = CustomConstraint(cons_f2) def With1(n, u, x, v): w = RationalFunctionExpand(u, x) return If(SumQ(w), Add(*[i*v**n for i in w.args]), v**n*w) pattern1 = Pattern(UtilityOperator(u_*v_**n_, x_), cons1, cons2) rule1 = ReplacementRule(pattern1, With1) def With2(u, x): v = ExpandIntegrand(u, x) def _consf_u(a, b, c, d, p, m, n, x): return And(FreeQ(List(a, b, c, d, p), x), IntegersQ(m, n), Equal(m, Add(n, S(-1)))) cons_u = CustomConstraint(_consf_u) pat = Pattern(UtilityOperator(x_**WC('m', S(1))*(x_*WC('d', S(1)) + c_)**p_/(x_**n_*WC('b', S(1)) + a_), x_), cons_u) result_matchq = is_match(UtilityOperator(u, x), pat) if UnsameQ(v, u) and not result_matchq: return v else: v = ExpandIntegrand(RationalFunctionFactors(u, x), x) w = NonrationalFunctionFactors(u, x) if SumQ(v): return Add(*[i*w for i in v.args]) else: return v*w pattern2 = Pattern(UtilityOperator(u_, x_)) rule2 = ReplacementRule(pattern2, With2) expr = expr.replace(sym_exp, rubi_exp) res = replace_all(UtilityOperator(expr, x), [rule1, rule2]) return replace_pow_exp(res) def ExpandIntegrand(expr, x, extra=None): expr = replace_pow_exp(expr) if not extra is None: extra, x = x, extra w = ExpandIntegrand(extra, x) r = NonfreeTerms(w, x) if SumQ(r): result = [expr*FreeTerms(w, x)] for i in r.args: result.append(MergeMonomials(expr*i, x)) return r.func(*result) else: return expr*FreeTerms(w, x) + MergeMonomials(expr*r, x) else: u_ = Wild('u', exclude=[0, 1]) a_ = Wild('a', exclude=[x]) b_ = Wild('b', exclude=[x, 0]) F_ = Wild('F', exclude=[0]) c_ = Wild('c', exclude=[x]) d_ = Wild('d', exclude=[x, 0]) n_ = Wild('n', exclude=[0, 1]) pattern = u_*(a_ + b_*F_)**n_ match = expr.match(pattern) if match: if MemberQ([asin, acos, asinh, acosh], match[F_].func): keys = [u_, a_, b_, F_, n_] if len(match) == len(keys): u, a, b, F, n = tuple([match[i] for i in keys]) match = F.args[0].match(c_ + d_*x) if match: keys = c_, d_ if len(keys) == len(match): c, d = tuple([match[i] for i in keys]) if PolynomialQ(u, x): F = F.func return ExpandLinearProduct((a + b*F(c + d*x))**n, u, c, d, x) expr = expr.replace(sym_exp, rubi_exp) res = replace_all(UtilityOperator(expr, x), ExpandIntegrand_rules, max_count = 1) return replace_pow_exp(res) def SimplerQ(u, v): # If u is simpler than v, SimplerQ(u, v) returns True, else it returns False. SimplerQ(u, u) returns False if IntegerQ(u): if IntegerQ(v): if Abs(u)==Abs(v): return v<0 else: return Abs(u)<Abs(v) else: return True elif IntegerQ(v): return False elif FractionQ(u): if FractionQ(v): if Denominator(u) == Denominator(v): return SimplerQ(Numerator(u), Numerator(v)) else: return Denominator(u)<Denominator(v) else: return True elif FractionQ(v): return False elif (Re(u)==0 or Re(u) == 0) and (Re(v)==0 or Re(v) == 0): return SimplerQ(Im(u), Im(v)) elif ComplexNumberQ(u): if ComplexNumberQ(v): if Re(u) == Re(v): return SimplerQ(Im(u), Im(v)) else: return SimplerQ(Re(u),Re(v)) else: return False elif NumberQ(u): if NumberQ(v): return OrderedQ([u,v]) else: return True elif NumberQ(v): return False elif AtomQ(u) or (Head(u) == re) or (Head(u) == im): if AtomQ(v) or (Head(u) == re) or (Head(u) == im): return OrderedQ([u,v]) else: return True elif AtomQ(v) or (Head(u) == re) or (Head(u) == im): return False elif Head(u) == Head(v): if Length(u) == Length(v): for i in range(len(u.args)): if not u.args[i] == v.args[i]: return SimplerQ(u.args[i], v.args[i]) return False return Length(u) < Length(v) elif LeafCount(u) < LeafCount(v): return True elif LeafCount(v) < LeafCount(u): return False return Not(OrderedQ([v,u])) def SimplerSqrtQ(u, v): # If Rt(u, 2) is simpler than Rt(v, 2), SimplerSqrtQ(u, v) returns True, else it returns False. SimplerSqrtQ(u, u) returns False if NegativeQ(v) and Not(NegativeQ(u)): return True if NegativeQ(u) and Not(NegativeQ(v)): return False sqrtu = Rt(u, S(2)) sqrtv = Rt(v, S(2)) if IntegerQ(sqrtu): if IntegerQ(sqrtv): return sqrtu<sqrtv else: return True if IntegerQ(sqrtv): return False if RationalQ(sqrtu): if RationalQ(sqrtv): return sqrtu<sqrtv else: return True if RationalQ(sqrtv): return False if PosQ(u): if PosQ(v): return LeafCount(sqrtu)<LeafCount(sqrtv) else: return True if PosQ(v): return False if LeafCount(sqrtu)<LeafCount(sqrtv): return True if LeafCount(sqrtv)<LeafCount(sqrtu): return False else: return Not(OrderedQ([v, u])) def SumSimplerQ(u, v): """ If u + v is simpler than u, SumSimplerQ(u, v) returns True, else it returns False. If for every term w of v there is a term of u equal to n*w where n<-1/2, u + v will be simpler than u. Examples ======== >>> from sympy.integrals.rubi.utility_function import SumSimplerQ >>> from sympy.abc import x >>> from sympy import S >>> SumSimplerQ(S(4 + x),S(3 + x**3)) False """ if RationalQ(u, v): if v == S(0): return False elif v > S(0): return u < -S(1) else: return u >= -v else: return SumSimplerAuxQ(Expand(u), Expand(v)) def BinomialDegree(u, x): # if u is a binomial. BinomialDegree[u,x] returns the degree of x in u. bp = BinomialParts(u, x) if bp == False: return bp return bp[2] def TrinomialDegree(u, x): # If u is equivalent to a trinomial of the form a + b*x^n + c*x^(2*n) where n!=0, b!=0 and c!=0, TrinomialDegree[u,x] returns n t = TrinomialParts(u, x) if t: return t[3] return t def CancelCommonFactors(u, v): def _delete_cases(a, b): # only for CancelCommonFactors lst = [] deleted = False for i in a.args: if i == b and not deleted: deleted = True continue lst.append(i) return a.func(*lst) # CancelCommonFactors[u,v] returns {u',v'} are the noncommon factors of u and v respectively. if ProductQ(u): if ProductQ(v): if MemberQ(v, First(u)): return CancelCommonFactors(Rest(u), _delete_cases(v, First(u))) else: lst = CancelCommonFactors(Rest(u), v) return [First(u)*lst[0], lst[1]] else: if MemberQ(u, v): return [_delete_cases(u, v), 1] else: return[u, v] elif ProductQ(v): if MemberQ(v, u): return [1, _delete_cases(v, u)] else: return [u, v] return[u, v] def SimplerIntegrandQ(u, v, x): lst = CancelCommonFactors(u, v) u1 = lst[0] v1 = lst[1] if Head(u1) == Head(v1) and Length(u1) == 1 and Length(v1) == 1: return SimplerIntegrandQ(u1.args[0], v1.args[0], x) if 4*LeafCount(u1) < 3*LeafCount(v1): return True if RationalFunctionQ(u1, x): if RationalFunctionQ(v1, x): t1 = 0 t2 = 0 for i in RationalFunctionExponents(u1, x): t1 += i for i in RationalFunctionExponents(v1, x): t2 += i return t1 < t2 else: return True else: return False def GeneralizedBinomialDegree(u, x): b = GeneralizedBinomialParts(u, x) if b: return b[2] - b[3] def GeneralizedBinomialParts(expr, x): expr = Expand(expr) if GeneralizedBinomialMatchQ(expr, x): a = Wild('a', exclude=[x]) b = Wild('b', exclude=[x]) n = Wild('n', exclude=[x]) q = Wild('q', exclude=[x]) Match = expr.match(a*x**q + b*x**n) if Match and PosQ(Match[q] - Match[n]): return [Match[b], Match[a], Match[q], Match[n]] else: return False def GeneralizedTrinomialDegree(u, x): t = GeneralizedTrinomialParts(u, x) if t: return t[3] - t[4] def GeneralizedTrinomialParts(expr, x): expr = Expand(expr) if GeneralizedTrinomialMatchQ(expr, x): a = Wild('a', exclude=[x, 0]) b = Wild('b', exclude=[x, 0]) c = Wild('c', exclude=[x]) n = Wild('n', exclude=[x, 0]) q = Wild('q', exclude=[x]) Match = expr.match(a*x**q + b*x**n+c*x**(2*n-q)) if Match and expr.is_Add: return [Match[c], Match[b], Match[a], Match[n], 2*Match[n]-Match[q]] else: return False def MonomialQ(u, x): # If u is of the form a*x^n where n!=0 and a!=0, MonomialQ[u,x] returns True; else False if isinstance(u, list): return all(MonomialQ(i, x) for i in u) else: a = Wild('a', exclude=[x]) b = Wild('b', exclude=[x]) re = u.match(a*x**b) if re: return True return False def MonomialSumQ(u, x): # if u(x) is a sum and each term is free of x or an expression of the form a*x^n, MonomialSumQ(u, x) returns True; else it returns False if SumQ(u): for i in u.args: if Not(FreeQ(i, x) or MonomialQ(i, x)): return False return True @doctest_depends_on(modules=('matchpy',)) def MinimumMonomialExponent(u, x): """ u is sum whose terms are monomials. MinimumMonomialExponent(u, x) returns the exponent of the term having the smallest exponent Examples ======== >>> from sympy.integrals.rubi.utility_function import MinimumMonomialExponent >>> from sympy.abc import x >>> MinimumMonomialExponent(x**2 + 5*x**2 + 3*x**5, x) 2 >>> MinimumMonomialExponent(x**2 + 5*x**2 + 1, x) 0 """ n =MonomialExponent(First(u), x) for i in u.args: if PosQ(n - MonomialExponent(i, x)): n = MonomialExponent(i, x) return n def MonomialExponent(u, x): # u is a monomial. MonomialExponent(u, x) returns the exponent of x in u a = Wild('a', exclude=[x]) b = Wild('b', exclude=[x]) re = u.match(a*x**b) if re: return re[b] def LinearMatchQ(u, x): # LinearMatchQ(u, x) returns True iff u matches patterns of the form a+b*x where a and b are free of x if isinstance(u, list): return all(LinearMatchQ(i, x) for i in u) else: a = Wild('a', exclude=[x]) b = Wild('b', exclude=[x]) re = u.match(a + b*x) if re: return True return False def PowerOfLinearMatchQ(u, x): if isinstance(u, list): for i in u: if not PowerOfLinearMatchQ(i, x): return False return True else: a = Wild('a', exclude=[x]) b = Wild('b', exclude=[x, 0]) m = Wild('m', exclude=[x, 0]) Match = u.match((a + b*x)**m) if Match: return True else: return False def QuadraticMatchQ(u, x): if ListQ(u): return all(QuadraticMatchQ(i, x) for i in u) pattern1 = Pattern(UtilityOperator(x_**2*WC('c', 1) + x_*WC('b', 1) + WC('a', 0), x_), CustomConstraint(lambda a, b, c, x: FreeQ([a, b, c], x))) pattern2 = Pattern(UtilityOperator(x_**2*WC('c', 1) + WC('a', 0), x_), CustomConstraint(lambda a, c, x: FreeQ([a, c], x))) u1 = UtilityOperator(u, x) return is_match(u1, pattern1) or is_match(u1, pattern2) def CubicMatchQ(u, x): if isinstance(u, list): return all(CubicMatchQ(i, x) for i in u) else: pattern1 = Pattern(UtilityOperator(x_**3*WC('d', 1) + x_**2*WC('c', 1) + x_*WC('b', 1) + WC('a', 0), x_), CustomConstraint(lambda a, b, c, d, x: FreeQ([a, b, c, d], x))) pattern2 = Pattern(UtilityOperator(x_**3*WC('d', 1) + x_*WC('b', 1) + WC('a', 0), x_), CustomConstraint(lambda a, b, d, x: FreeQ([a, b, d], x))) pattern3 = Pattern(UtilityOperator(x_**3*WC('d', 1) + x_**2*WC('c', 1) + WC('a', 0), x_), CustomConstraint(lambda a, c, d, x: FreeQ([a, c, d], x))) pattern4 = Pattern(UtilityOperator(x_**3*WC('d', 1) + WC('a', 0), x_), CustomConstraint(lambda a, d, x: FreeQ([a, d], x))) u1 = UtilityOperator(u, x) if is_match(u1, pattern1) or is_match(u1, pattern2) or is_match(u1, pattern3) or is_match(u1, pattern4): return True else: return False def BinomialMatchQ(u, x): if isinstance(u, list): return all(BinomialMatchQ(i, x) for i in u) else: pattern = Pattern(UtilityOperator(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)), x_) , CustomConstraint(lambda a, b, n, x: FreeQ([a,b,n],x))) u = UtilityOperator(u, x) return is_match(u, pattern) def TrinomialMatchQ(u, x): if isinstance(u, list): return all(TrinomialMatchQ(i, x) for i in u) else: pattern = Pattern(UtilityOperator(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)), x_) , CustomConstraint(lambda a, b, c, n, x: FreeQ([a, b, c, n], x)), CustomConstraint(lambda j, n: ZeroQ(j-2*n) )) u = UtilityOperator(u, x) return is_match(u, pattern) def GeneralizedBinomialMatchQ(u, x): if isinstance(u, list): return all(GeneralizedBinomialMatchQ(i, x) for i in u) else: a = Wild('a', exclude=[x, 0]) b = Wild('b', exclude=[x, 0]) n = Wild('n', exclude=[x, 0]) q = Wild('q', exclude=[x, 0]) Match = u.match(a*x**q + b*x**n) if Match and len(Match) == 4 and Match[q] != 0 and Match[n] != 0: return True else: return False def GeneralizedTrinomialMatchQ(u, x): if isinstance(u, list): return all(GeneralizedTrinomialMatchQ(i, x) for i in u) else: a = Wild('a', exclude=[x, 0]) b = Wild('b', exclude=[x, 0]) n = Wild('n', exclude=[x, 0]) c = Wild('c', exclude=[x, 0]) q = Wild('q', exclude=[x, 0]) Match = u.match(a*x**q + b*x**n + c*x**(2*n - q)) if Match and len(Match) == 5 and 2*Match[n] - Match[q] != 0 and Match[n] != 0: return True else: return False def QuotientOfLinearsMatchQ(u, x): if isinstance(u, list): return all(QuotientOfLinearsMatchQ(i, x) for i in u) else: a = Wild('a', exclude=[x]) b = Wild('b', exclude=[x]) d = Wild('d', exclude=[x]) c = Wild('c', exclude=[x]) e = Wild('e') Match = u.match(e*(a + b*x)/(c + d*x)) if Match and len(Match) == 5: return True else: return False def PolynomialTermQ(u, x): a = Wild('a', exclude=[x]) n = Wild('n', exclude=[x]) Match = u.match(a*x**n) if Match and IntegerQ(Match[n]) and Greater(Match[n], S(0)): return True else: return False def PolynomialTerms(u, x): s = 0 for i in u.args: if PolynomialTermQ(i, x): s = s + i return s def NonpolynomialTerms(u, x): s = 0 for i in u.args: if not PolynomialTermQ(i, x): s = s + i return s def PseudoBinomialParts(u, x): if PolynomialQ(u, x) and Greater(Expon(u, x), S(2)): n = Expon(u, x) d = Rt(Coefficient(u, x, n), n) c = d**(-n + S(1))*Coefficient(u, x, n + S(-1))/n a = Simplify(u - (c + d*x)**n) if NonzeroQ(a) and FreeQ(a, x): return [a, S(1), c, d, n] else: return False else: return False def NormalizePseudoBinomial(u, x): lst = PseudoBinomialParts(u, x) if lst: return (lst[0] + lst[1]*(lst[2] + lst[3]*x)**lst[4]) def PseudoBinomialPairQ(u, v, x): lst1 = PseudoBinomialParts(u, x) if AtomQ(lst1): return False else: lst2 = PseudoBinomialParts(v, x) if AtomQ(lst2): return False else: return Drop(lst1, 2) == Drop(lst2, 2) def PseudoBinomialQ(u, x): lst = PseudoBinomialParts(u, x) if lst: return True else: return False def PolynomialGCD(f, g): return gcd(f, g) def PolyGCD(u, v, x): # (* u and v are polynomials in x. *) # (* PolyGCD[u,v,x] returns the factors of the gcd of u and v dependent on x. *) return NonfreeFactors(PolynomialGCD(u, v), x) def AlgebraicFunctionFactors(u, x, flag=False): # (* AlgebraicFunctionFactors[u,x] returns the product of the factors of u that are algebraic functions of x. *) if ProductQ(u): result = 1 for i in u.args: if AlgebraicFunctionQ(i, x, flag): result *= i return result if AlgebraicFunctionQ(u, x, flag): return u return 1 def NonalgebraicFunctionFactors(u, x): """ NonalgebraicFunctionFactors[u,x] returns the product of the factors of u that are not algebraic functions of x. Examples ======== >>> from sympy.integrals.rubi.utility_function import NonalgebraicFunctionFactors >>> from sympy.abc import x >>> from sympy import sin >>> NonalgebraicFunctionFactors(sin(x), x) sin(x) >>> NonalgebraicFunctionFactors(x, x) 1 """ if ProductQ(u): result = 1 for i in u.args: if not AlgebraicFunctionQ(i, x): result *= i return result if AlgebraicFunctionQ(u, x): return 1 return u def QuotientOfLinearsP(u, x): if LinearQ(u, x): return True elif SumQ(u): if FreeQ(u.args[0], x): return QuotientOfLinearsP(Rest(u), x) elif LinearQ(Numerator(u), x) and LinearQ(Denominator(u), x): return True elif ProductQ(u): if FreeQ(First(u), x): return QuotientOfLinearsP(Rest(u), x) elif Numerator(u) == 1 and PowerQ(u): return QuotientOfLinearsP(Denominator(u), x) return u == x or FreeQ(u, x) def QuotientOfLinearsParts(u, x): # If u is equivalent to an expression of the form (a+b*x)/(c+d*x), QuotientOfLinearsParts[u,x] # returns the list {a, b, c, d}. if LinearQ(u, x): return [Coefficient(u, x, 0), Coefficient(u, x, 1), 1, 0] elif PowerQ(u): if Numerator(u) == 1: u = Denominator(u) r = QuotientOfLinearsParts(u, x) return [r[2], r[3], r[0], r[1]] elif SumQ(u): a = First(u) if FreeQ(a, x): u = Rest(u) r = QuotientOfLinearsParts(u, x) return [r[0] + a*r[2], r[1] + a*r[3], r[2], r[3]] elif ProductQ(u): a = First(u) if FreeQ(a, x): r = QuotientOfLinearsParts(Rest(u), x) return [a*r[0], a*r[1], r[2], r[3]] a = Numerator(u) d = Denominator(u) if LinearQ(a, x) and LinearQ(d, x): return [Coefficient(a, x, 0), Coefficient(a, x, 1), Coefficient(d, x, 0), Coefficient(d, x, 1)] elif u == x: return [0, 1, 1, 0] elif FreeQ(u, x): return [u, 0, 1, 0] return [u, 0, 1, 0] def QuotientOfLinearsQ(u, x): # (*QuotientOfLinearsQ[u,x] returns True iff u is equivalent to an expression of the form (a+b x)/(c+d x) where b!=0 and d!=0.*) if ListQ(u): for i in u: if not QuotientOfLinearsQ(i, x): return False return True q = QuotientOfLinearsParts(u, x) return QuotientOfLinearsP(u, x) and NonzeroQ(q[1]) and NonzeroQ(q[3]) def Flatten(l): return flatten(l) def Sort(u, r=False): return sorted(u, key=lambda x: x.sort_key(), reverse=r) # (*Definition: A number is absurd if it is a rational number, a positive rational number raised to a fractional power, or a product of absurd numbers.*) def AbsurdNumberQ(u): # (* AbsurdNumberQ[u] returns True if u is an absurd number, else it returns False. *) if PowerQ(u): v = u.exp u = u.base return RationalQ(u) and u > 0 and FractionQ(v) elif ProductQ(u): return all(AbsurdNumberQ(i) for i in u.args) return RationalQ(u) def AbsurdNumberFactors(u): # (* AbsurdNumberFactors[u] returns the product of the factors of u that are absurd numbers. *) if AbsurdNumberQ(u): return u elif ProductQ(u): result = S(1) for i in u.args: if AbsurdNumberQ(i): result *= i return result return NumericFactor(u) def NonabsurdNumberFactors(u): # (* NonabsurdNumberFactors[u] returns the product of the factors of u that are not absurd numbers. *) if AbsurdNumberQ(u): return S(1) elif ProductQ(u): result = 1 for i in u.args: result *= NonabsurdNumberFactors(i) return result return NonnumericFactors(u) def SumSimplerAuxQ(u, v): if SumQ(v): return (RationalQ(First(v)) or SumSimplerAuxQ(u,First(v))) and (RationalQ(Rest(v)) or SumSimplerAuxQ(u,Rest(v))) elif SumQ(u): return SumSimplerAuxQ(First(u), v) or SumSimplerAuxQ(Rest(u), v) else: return v!=0 and NonnumericFactors(u)==NonnumericFactors(v) and (NumericFactor(u)/NumericFactor(v)<-1/2 or NumericFactor(u)/NumericFactor(v)==-1/2 and NumericFactor(u)<0) def Prepend(l1, l2): if not isinstance(l2, list): return [l2] + l1 return l2 + l1 def Drop(lst, n): if isinstance(lst, list): if isinstance(n, list): lst = lst[:(n[0]-1)] + lst[n[1]:] elif n > 0: lst = lst[n:] elif n < 0: lst = lst[:-n] else: return lst return lst return lst.func(*[i for i in Drop(list(lst.args), n)]) def CombineExponents(lst): if Length(lst) < 2: return lst elif lst[0][0] == lst[1][0]: return CombineExponents(Prepend(Drop(lst,2),[lst[0][0], lst[0][1] + lst[1][1]])) return Prepend(CombineExponents(Rest(lst)), First(lst)) def FactorInteger(n, l=None): if isinstance(n, (int, Integer)): return sorted(factorint(n, limit=l).items()) else: return sorted(factorrat(n, limit=l).items()) def FactorAbsurdNumber(m): # (* m must be an absurd number. FactorAbsurdNumber[m] returns the prime factorization of m *) # (* as list of base-degree pairs where the bases are prime numbers and the degrees are rational. *) if RationalQ(m): return FactorInteger(m) elif PowerQ(m): r = FactorInteger(m.base) return [r[0], r[1]*m.exp] # CombineExponents[Sort[Flatten[Map[FactorAbsurdNumber,Apply[List,m]],1], Function[i1[[1]]<i2[[1]]]]] return list((m.as_base_exp(),)) def SubstForInverseFunction(*args): """ SubstForInverseFunction(u, v, w, x) returns u with subexpressions equal to v replaced by x and x replaced by w. Examples ======== >>> from sympy.integrals.rubi.utility_function import SubstForInverseFunction >>> from sympy.abc import x, a, b >>> SubstForInverseFunction(a, a, b, x) a >>> SubstForInverseFunction(x**a, x**a, b, x) x >>> SubstForInverseFunction(a*x**a, a, b, x) a*b**a """ if len(args) == 3: u, v, x = args[0], args[1], args[2] return SubstForInverseFunction(u, v, (-Coefficient(v.args[0], x, 0) + InverseFunction(Head(v))(x))/Coefficient(v.args[0], x, 1), x) elif len(args) == 4: u, v, w, x = args[0], args[1], args[2], args[3] if AtomQ(u): if u == x: return w return u elif Head(u) == Head(v) and ZeroQ(u.args[0] - v.args[0]): return x res = [SubstForInverseFunction(i, v, w, x) for i in u.args] return u.func(*res) def SubstForFractionalPower(u, v, n, w, x): # (* SubstForFractionalPower[u,v,n,w,x] returns u with subexpressions equal to v^(m/n) replaced # by x^m and x replaced by w. *) if AtomQ(u): if u == x: return w return u elif FractionalPowerQ(u): if ZeroQ(u.base - v): return x**(n*u.exp) res = [SubstForFractionalPower(i, v, n, w, x) for i in u.args] return u.func(*res) def SubstForFractionalPowerOfQuotientOfLinears(u, x): # (* If u has a subexpression of the form ((a+b*x)/(c+d*x))^(m/n) where m and n>1 are integers, # SubstForFractionalPowerOfQuotientOfLinears[u,x] returns the list {v,n,(a+b*x)/(c+d*x),b*c-a*d} where v is u # with subexpressions of the form ((a+b*x)/(c+d*x))^(m/n) replaced by x^m and x replaced lst = FractionalPowerOfQuotientOfLinears(u, 1, False, x) if AtomQ(lst) or AtomQ(lst[1]): return False n = lst[0] tmp = lst[1] lst = QuotientOfLinearsParts(tmp, x) a, b, c, d = lst[0], lst[1], lst[2], lst[3] if ZeroQ(d): return False lst = Simplify(x**(n - 1)*SubstForFractionalPower(u, tmp, n, (-a + c*x**n)/(b - d*x**n), x)/(b - d*x**n)**2) return [NonfreeFactors(lst, x), n, tmp, FreeFactors(lst, x)*(b*c - a*d)] def FractionalPowerOfQuotientOfLinears(u, n, v, x): # (* If u has a subexpression of the form ((a+b*x)/(c+d*x))^(m/n), # FractionalPowerOfQuotientOfLinears[u,1,False,x] returns {n,(a+b*x)/(c+d*x)}; else it returns False. *) if AtomQ(u) or FreeQ(u, x): return [n, v] elif CalculusQ(u): return False elif FractionalPowerQ(u): if QuotientOfLinearsQ(u.base, x) and Not(LinearQ(u.base, x)) and (FalseQ(v) or ZeroQ(u.base - v)): return [LCM(Denominator(u.exp), n), u.base] lst = [n, v] for i in u.args: lst = FractionalPowerOfQuotientOfLinears(i, lst[0], lst[1],x) if AtomQ(lst): return False return lst def SubstForFractionalPowerQ(u, v, x): # (* If the substitution x=v^(1/n) will not complicate algebraic subexpressions of u, # SubstForFractionalPowerQ[u,v,x] returns True; else it returns False. *) if AtomQ(u) or FreeQ(u, x): return True elif FractionalPowerQ(u): return SubstForFractionalPowerAuxQ(u, v, x) return all(SubstForFractionalPowerQ(i, v, x) for i in u.args) def SubstForFractionalPowerAuxQ(u, v, x): if AtomQ(u): return False elif FractionalPowerQ(u): if ZeroQ(u.base - v): return True return any(SubstForFractionalPowerAuxQ(i, v, x) for i in u.args) def FractionalPowerOfSquareQ(u): # (* If a subexpression of u is of the form ((v+w)^2)^n where n is a fraction, *) # (* FractionalPowerOfSquareQ[u] returns (v+w)^2; else it returns False. *) if AtomQ(u): return False elif FractionalPowerQ(u): a_ = Wild('a', exclude=[0]) b_ = Wild('b', exclude=[0]) c_ = Wild('c', exclude=[0]) match = u.base.match(a_*(b_ + c_)**(S(2))) if match: keys = [a_, b_, c_] if len(keys) == len(match): a, b, c = tuple(match[i] for i in keys) if NonsumQ(a): return (b + c)**S(2) for i in u.args: tmp = FractionalPowerOfSquareQ(i) if Not(FalseQ(tmp)): return tmp return False def FractionalPowerSubexpressionQ(u, v, w): # (* If a subexpression of u is of the form w^n where n is a fraction but not equal to v, *) # (* FractionalPowerSubexpressionQ[u,v,w] returns True; else it returns False. *) if AtomQ(u): return False elif FractionalPowerQ(u): if PositiveQ(u.base/w): return Not(u.base == v) and LeafCount(w) < 3*LeafCount(v) for i in u.args: if FractionalPowerSubexpressionQ(i, v, w): return True return False def Apply(f, lst): return f(*lst) def FactorNumericGcd(u): # (* FactorNumericGcd[u] returns u with the gcd of the numeric coefficients of terms of sums factored out. *) if PowerQ(u): if RationalQ(u.exp): return FactorNumericGcd(u.base)**u.exp elif ProductQ(u): res = [FactorNumericGcd(i) for i in u.args] return Mul(*res) elif SumQ(u): g = GCD([NumericFactor(i) for i in u.args]) r = Add(*[i/g for i in u.args]) return g*r return u def MergeableFactorQ(bas, deg, v): # (* MergeableFactorQ[bas,deg,v] returns True iff bas equals the base of a factor of v or bas is a factor of every term of v. *) if bas == v: return RationalQ(deg + S(1)) and (deg + 1>=0 or RationalQ(deg) and deg>0) elif PowerQ(v): if bas == v.base: return RationalQ(deg+v.exp) and (deg+v.exp>=0 or RationalQ(deg) and deg>0) return SumQ(v.base) and IntegerQ(v.exp) and (Not(IntegerQ(deg) or IntegerQ(deg/v.exp))) and MergeableFactorQ(bas, deg/v.exp, v.base) elif ProductQ(v): return MergeableFactorQ(bas, deg, First(v)) or MergeableFactorQ(bas, deg, Rest(v)) return SumQ(v) and MergeableFactorQ(bas, deg, First(v)) and MergeableFactorQ(bas, deg, Rest(v)) def MergeFactor(bas, deg, v): # (* If MergeableFactorQ[bas,deg,v], MergeFactor[bas,deg,v] return the product of bas^deg and v, # but with bas^deg merged into the factor of v whose base equals bas. *) if bas == v: return bas**(deg + 1) elif PowerQ(v): if bas == v.base: return bas**(deg + v.exp) return MergeFactor(bas, deg/v.exp, v.base**v.exp) elif ProductQ(v): if MergeableFactorQ(bas, deg, First(v)): return MergeFactor(bas, deg, First(v))*Rest(v) return First(v)*MergeFactor(bas, deg, Rest(v)) return MergeFactor(bas, deg, First(v)) + MergeFactor(bas, deg, Rest(v)) def MergeFactors(u, v): # (* MergeFactors[u,v] returns the product of u and v, but with the mergeable factors of u merged into v. *) if ProductQ(u): return MergeFactors(Rest(u), MergeFactors(First(u), v)) elif PowerQ(u): if MergeableFactorQ(u.base, u.exp, v): return MergeFactor(u.base, u.exp, v) elif RationalQ(u.exp) and u.exp < -1 and MergeableFactorQ(u.base, -S(1), v): return MergeFactors(u.base**(u.exp + 1), MergeFactor(u.base, -S(1), v)) return u*v elif MergeableFactorQ(u, S(1), v): return MergeFactor(u, S(1), v) return u*v def TrigSimplifyQ(u): # (* TrigSimplifyQ[u] returns True if TrigSimplify[u] actually simplifies u; else False. *) return ActivateTrig(u) != TrigSimplify(u) def TrigSimplify(u): # (* TrigSimplify[u] returns a bottom-up trig simplification of u. *) return ActivateTrig(TrigSimplifyRecur(u)) def TrigSimplifyRecur(u): if AtomQ(u): return u return TrigSimplifyAux(u.func(*[TrigSimplifyRecur(i) for i in u.args])) def Order(expr1, expr2): if expr1 == expr2: return 0 elif expr1.sort_key() > expr2.sort_key(): return -1 return 1 def FactorOrder(u, v): if u == 1: if v == 1: return 0 return -1 elif v == 1: return 1 return Order(u, v) def Smallest(num1, num2=None): if num2 is None: lst = num1 num = lst[0] for i in Rest(lst): num = Smallest(num, i) return num return Min(num1, num2) def OrderedQ(l): return l == Sort(l) def MinimumDegree(deg1, deg2): if RationalQ(deg1): if RationalQ(deg2): return Min(deg1, deg2) return deg1 elif RationalQ(deg2): return deg2 deg = Simplify(deg1- deg2) if RationalQ(deg): if deg > 0: return deg2 return deg1 elif OrderedQ([deg1, deg2]): return deg1 return deg2 def PositiveFactors(u): # (* PositiveFactors[u] returns the positive factors of u *) if ZeroQ(u): return S(1) elif RationalQ(u): return Abs(u) elif PositiveQ(u): return u elif ProductQ(u): res = 1 for i in u.args: res *= PositiveFactors(i) return res return 1 def Sign(u): return sign(u) def NonpositiveFactors(u): # (* NonpositiveFactors[u] returns the nonpositive factors of u *) if ZeroQ(u): return u elif RationalQ(u): return Sign(u) elif PositiveQ(u): return S(1) elif ProductQ(u): res = S(1) for i in u.args: res *= NonpositiveFactors(i) return res return u def PolynomialInAuxQ(u, v, x): if u == v: return True elif AtomQ(u): return u != x elif PowerQ(u): if PowerQ(v): if u.base == v.base: return PositiveIntegerQ(u.exp/v.exp) return PositiveIntegerQ(u.exp) and PolynomialInAuxQ(u.base, v, x) elif SumQ(u) or ProductQ(u): for i in u.args: if Not(PolynomialInAuxQ(i, v, x)): return False return True return False def PolynomialInQ(u, v, x): """ If u is a polynomial in v(x), PolynomialInQ(u, v, x) returns True, else it returns False. Examples ======== >>> from sympy.integrals.rubi.utility_function import PolynomialInQ >>> from sympy.abc import x >>> from sympy import log, S >>> PolynomialInQ(S(1), log(x), x) True >>> PolynomialInQ(log(x), log(x), x) True >>> PolynomialInQ(1 + log(x)**2, log(x), x) True """ return PolynomialInAuxQ(u, NonfreeFactors(NonfreeTerms(v, x), x), x) def ExponentInAux(u, v, x): if u == v: return S(1) elif AtomQ(u): return S(0) elif PowerQ(u): if PowerQ(v): if u.base == v.base: return u.exp/v.exp return u.exp*ExponentInAux(u.base, v, x) elif ProductQ(u): return Add(*[ExponentInAux(i, v, x) for i in u.args]) return Max(*[ExponentInAux(i, v, x) for i in u.args]) def ExponentIn(u, v, x): return ExponentInAux(u, NonfreeFactors(NonfreeTerms(v, x), x), x) def PolynomialInSubstAux(u, v, x): if u == v: return x elif AtomQ(u): return u elif PowerQ(u): if PowerQ(v): if u.base == v.base: return x**(u.exp/v.exp) return PolynomialInSubstAux(u.base, v, x)**u.exp return u.func(*[PolynomialInSubstAux(i, v, x) for i in u.args]) def PolynomialInSubst(u, v, x): # If u is a polynomial in v[x], PolynomialInSubst[u,v,x] returns the polynomial u in x. w = NonfreeTerms(v, x) return ReplaceAll(PolynomialInSubstAux(u, NonfreeFactors(w, x), x), {x: x - FreeTerms(v, x)/FreeFactors(w, x)}) def Distrib(u, v): # Distrib[u,v] returns the sum of u times each term of v. if SumQ(v): return Add(*[u*i for i in v.args]) return u*v def DistributeDegree(u, m): # DistributeDegree[u,m] returns the product of the factors of u each raised to the mth degree. if AtomQ(u): return u**m elif PowerQ(u): return u.base**(u.exp*m) elif ProductQ(u): return Mul(*[DistributeDegree(i, m) for i in u.args]) return u**m def FunctionOfPower(*args): """ FunctionOfPower[u,x] returns the gcd of the integer degrees of x in u. Examples ======== >>> from sympy.integrals.rubi.utility_function import FunctionOfPower >>> from sympy.abc import x >>> FunctionOfPower(x, x) 1 >>> FunctionOfPower(x**3, x) 3 """ if len(args) == 2: return FunctionOfPower(args[0], None, args[1]) u, n, x = args if FreeQ(u, x): return n elif u == x: return S(1) elif PowerQ(u): if u.base == x and IntegerQ(u.exp): if n is None: return u.exp return GCD(n, u.exp) tmp = n for i in u.args: tmp = FunctionOfPower(i, tmp, x) return tmp def DivideDegreesOfFactors(u, n): """ DivideDegreesOfFactors[u,n] returns the product of the base of the factors of u raised to the degree of the factors divided by n. Examples ======== >>> from sympy import S >>> from sympy.integrals.rubi.utility_function import DivideDegreesOfFactors >>> from sympy.abc import a, b >>> DivideDegreesOfFactors(a**b, S(3)) a**(b/3) """ if ProductQ(u): return Mul(*[LeadBase(i)**(LeadDegree(i)/n) for i in u.args]) return LeadBase(u)**(LeadDegree(u)/n) def MonomialFactor(u, x): # MonomialFactor[u,x] returns the list {n,v} where x^n*v==u and n is free of x. if AtomQ(u): if u == x: return [S(1), S(1)] return [S(0), u] elif PowerQ(u): if IntegerQ(u.exp): lst = MonomialFactor(u.base, x) return [lst[0]*u.exp, lst[1]**u.exp] elif u.base == x and FreeQ(u.exp, x): return [u.exp, S(1)] return [S(0), u] elif ProductQ(u): lst1 = MonomialFactor(First(u), x) lst2 = MonomialFactor(Rest(u), x) return [lst1[0] + lst2[0], lst1[1]*lst2[1]] elif SumQ(u): lst = [MonomialFactor(i, x) for i in u.args] deg = lst[0][0] for i in Rest(lst): deg = MinimumDegree(deg, i[0]) if ZeroQ(deg) or RationalQ(deg) and deg < 0: return [S(0), u] return [deg, Add(*[x**(i[0] - deg)*i[1] for i in lst])] return [S(0), u] def FullSimplify(expr): return Simplify(expr) def FunctionOfLinearSubst(u, a, b, x): if FreeQ(u, x): return u elif LinearQ(u, x): tmp = Coefficient(u, x, 1) if tmp == b: tmp = S(1) else: tmp = tmp/b return Coefficient(u, x, S(0)) - a*tmp + tmp*x elif PowerQ(u): if FreeQ(u.base, x): return E**(FullSimplify(FunctionOfLinearSubst(Log(u.base)*u.exp, a, b, x))) lst = MonomialFactor(u, x) if ProductQ(u) and NonzeroQ(lst[0]): if RationalQ(LeadFactor(lst[1])) and LeadFactor(lst[1]) < 0: return -FunctionOfLinearSubst(DivideDegreesOfFactors(-lst[1], lst[0])*x, a, b, x)**lst[0] return FunctionOfLinearSubst(DivideDegreesOfFactors(lst[1], lst[0])*x, a, b, x)**lst[0] return u.func(*[FunctionOfLinearSubst(i, a, b, x) for i in u.args]) def FunctionOfLinear(*args): # (* If u (x) is equivalent to an expression of the form f (a+b*x) and not the case that a==0 and # b==1, FunctionOfLinear[u,x] returns the list {f (x),a,b}; else it returns False. *) if len(args) == 2: u, x = args lst = FunctionOfLinear(u, False, False, x, False) if AtomQ(lst) or FalseQ(lst[0]) or (lst[0] == 0 and lst[1] == 1): return False return [FunctionOfLinearSubst(u, lst[0], lst[1], x), lst[0], lst[1]] u, a, b, x, flag = args if FreeQ(u, x): return [a, b] elif CalculusQ(u): return False elif LinearQ(u, x): if FalseQ(a): return [Coefficient(u, x, 0), Coefficient(u, x, 1)] lst = CommonFactors([b, Coefficient(u, x, 1)]) if ZeroQ(Coefficient(u, x, 0)) and Not(flag): return [0, lst[0]] elif ZeroQ(b*Coefficient(u, x, 0) - a*Coefficient(u, x, 1)): return [a/lst[1], lst[0]] return [0, 1] elif PowerQ(u): if FreeQ(u.base, x): return FunctionOfLinear(Log(u.base)*u.exp, a, b, x, False) lst = MonomialFactor(u, x) if ProductQ(u) and NonzeroQ(lst[0]): if False and IntegerQ(lst[0]) and lst[0] != -1 and FreeQ(lst[1], x): if RationalQ(LeadFactor(lst[1])) and LeadFactor(lst[1]) < 0: return FunctionOfLinear(DivideDegreesOfFactors(-lst[1], lst[0])*x, a, b, x, False) return FunctionOfLinear(DivideDegreesOfFactors(lst[1], lst[0])*x, a, b, x, False) return False lst = [a, b] for i in u.args: lst = FunctionOfLinear(i, lst[0], lst[1], x, SumQ(u)) if AtomQ(lst): return False return lst def NormalizeIntegrand(u, x): v = NormalizeLeadTermSigns(NormalizeIntegrandAux(u, x)) if v == NormalizeLeadTermSigns(u): return u else: return v def NormalizeIntegrandAux(u, x): if SumQ(u): l = 0 for i in u.args: l += NormalizeIntegrandAux(i, x) return l if ProductQ(MergeMonomials(u, x)): l = 1 for i in MergeMonomials(u, x).args: l *= NormalizeIntegrandFactor(i, x) return l else: return NormalizeIntegrandFactor(MergeMonomials(u, x), x) def NormalizeIntegrandFactor(u, x): if PowerQ(u): if FreeQ(u.exp, x): bas = NormalizeIntegrandFactorBase(u.base, x) deg = u.exp if IntegerQ(deg) and SumQ(bas): if all(MonomialQ(i, x) for i in bas.args): mi = MinimumMonomialExponent(bas, x) q = 0 for i in bas.args: q += Simplify(i/x**mi) return x**(mi*deg)*q**deg else: return bas**deg else: return bas**deg if PowerQ(u): if FreeQ(u.base, x): return u.base**NormalizeIntegrandFactorBase(u.exp, x) bas = NormalizeIntegrandFactorBase(u, x) if SumQ(bas): if all(MonomialQ(i, x) for i in bas.args): mi = MinimumMonomialExponent(bas, x) z = 0 for j in bas.args: z += j/x**mi return x**mi*z else: return bas else: return bas def NormalizeIntegrandFactorBase(expr, x): m = Wild('m', exclude=[x]) u = Wild('u') match = expr.match(x**m*u) if match and SumQ(u): l = 0 for i in u.args: l += NormalizeIntegrandFactorBase((x**m*i), x) return l if BinomialQ(expr, x): if BinomialMatchQ(expr, x): return expr else: return ExpandToSum(expr, x) elif TrinomialQ(expr, x): if TrinomialMatchQ(expr, x): return expr else: return ExpandToSum(expr, x) elif ProductQ(expr): l = 1 for i in expr.args: l *= NormalizeIntegrandFactor(i, x) return l elif PolynomialQ(expr, x) and Exponent(expr, x) <= 4: return ExpandToSum(expr, x) elif SumQ(expr): w = Wild('w') m = Wild('m', exclude=[x]) v = TogetherSimplify(expr) if SumQ(v) or v.match(x**m*w) and SumQ(w) or LeafCount(v) > LeafCount(expr) + 2: return UnifySum(expr, x) else: return NormalizeIntegrandFactorBase(v, x) else: return expr def NormalizeTogether(u): return NormalizeLeadTermSigns(Together(u)) def NormalizeLeadTermSigns(u): if ProductQ(u): t = 1 for i in u.args: lst = SignOfFactor(i) if lst[0] == 1: t *= lst[1] else: t *= AbsorbMinusSign(lst[1]) return t else: lst = SignOfFactor(u) if lst[0] == 1: return lst[1] else: return AbsorbMinusSign(lst[1]) def AbsorbMinusSign(expr, *x): m = Wild('m', exclude=[x]) u = Wild('u') v = Wild('v') match = expr.match(u*v**m) if match: if len(match) == 3: if SumQ(match[v]) and OddQ(match[m]): return match[u]*(-match[v])**match[m] return -expr def NormalizeSumFactors(u): if AtomQ(u): return u elif ProductQ(u): k = 1 for i in u.args: k *= NormalizeSumFactors(i) return SignOfFactor(k)[0]*SignOfFactor(k)[1] elif SumQ(u): k = 0 for i in u.args: k += NormalizeSumFactors(i) return k else: return u def SignOfFactor(u): if RationalQ(u) and u < 0 or SumQ(u) and NumericFactor(First(u)) < 0: return [-1, -u] elif IntegerPowerQ(u): if SumQ(u.base) and NumericFactor(First(u.base)) < 0: return [(-1)**u.exp, (-u.base)**u.exp] elif ProductQ(u): k = 1 h = 1 for i in u.args: k *= SignOfFactor(i)[0] h *= SignOfFactor(i)[1] return [k, h] return [1, u] def NormalizePowerOfLinear(u, x): v = FactorSquareFree(u) if PowerQ(v): if LinearQ(v.base, x) and FreeQ(v.exp, x): return ExpandToSum(v.base, x)**v.exp return ExpandToSum(v, x) def SimplifyIntegrand(u, x): v = NormalizeLeadTermSigns(NormalizeIntegrandAux(Simplify(u), x)) if 5*LeafCount(v) < 4*LeafCount(u): return v if v != NormalizeLeadTermSigns(u): return v else: return u def SimplifyTerm(u, x): v = Simplify(u) w = Together(v) if LeafCount(v) < LeafCount(w): return NormalizeIntegrand(v, x) else: return NormalizeIntegrand(w, x) def TogetherSimplify(u): v = Together(Simplify(Together(u))) return FixSimplify(v) def SmartSimplify(u): v = Simplify(u) w = factor(v) if LeafCount(w) < LeafCount(v): v = w if Not(FalseQ(w == FractionalPowerOfSquareQ(v))) and FractionalPowerSubexpressionQ(u, w, Expand(w)): v = SubstForExpn(v, w, Expand(w)) else: v = FactorNumericGcd(v) return FixSimplify(v) def SubstForExpn(u, v, w): if u == v: return w if AtomQ(u): return u else: k = 0 for i in u.args: k += SubstForExpn(i, v, w) return k def ExpandToSum(u, *x): if len(x) == 1: x = x[0] expr = 0 if PolyQ(S(u), x): for t in ExponentList(u, x): expr += Coeff(u, x, t)*x**t return expr if BinomialQ(u, x): i = BinomialParts(u, x) expr += i[0] + i[1]*x**i[2] return expr if TrinomialQ(u, x): i = TrinomialParts(u, x) expr += i[0] + i[1]*x**i[3] + i[2]*x**(2*i[3]) return expr if GeneralizedBinomialMatchQ(u, x): i = GeneralizedBinomialParts(u, x) expr += i[0]*x**i[3] + i[1]*x**i[2] return expr if GeneralizedTrinomialMatchQ(u, x): i = GeneralizedTrinomialParts(u, x) expr += i[0]*x**i[4] + i[1]*x**i[3] + i[2]*x**(2*i[3]-i[4]) return expr else: return Expand(u) else: v = x[0] x = x[1] w = ExpandToSum(v, x) r = NonfreeTerms(w, x) if SumQ(r): k = u*FreeTerms(w, x) for i in r.args: k += MergeMonomials(u*i, x) return k else: return u*FreeTerms(w, x) + MergeMonomials(u*r, x) def UnifySum(u, x): if SumQ(u): t = 0 lst = [] for i in u.args: lst += [i] for j in UnifyTerms(lst, x): t += j return t else: return SimplifyTerm(u, x) def UnifyTerms(lst, x): if lst==[]: return lst else: return UnifyTerm(First(lst), UnifyTerms(Rest(lst), x), x) def UnifyTerm(term, lst, x): if lst==[]: return [term] tmp = Simplify(First(lst)/term) if FreeQ(tmp, x): return Prepend(Rest(lst), [(1+tmp)*term]) else: return Prepend(UnifyTerm(term, Rest(lst), x), [First(lst)]) def CalculusQ(u): return False def FunctionOfInverseLinear(*args): # (* If u is a function of an inverse linear binomial of the form 1/(a+b*x), # FunctionOfInverseLinear[u,x] returns the list {a,b}; else it returns False. *) if len(args) == 2: u, x = args return FunctionOfInverseLinear(u, None, x) u, lst, x = args if FreeQ(u, x): return lst elif u == x: return False elif QuotientOfLinearsQ(u, x): tmp = Drop(QuotientOfLinearsParts(u, x), 2) if tmp[1] == 0: return False elif lst is None: return tmp elif ZeroQ(lst[0]*tmp[1] - lst[1]*tmp[0]): return lst return False elif CalculusQ(u): return False tmp = lst for i in u.args: tmp = FunctionOfInverseLinear(i, tmp, x) if AtomQ(tmp): return False return tmp def PureFunctionOfSinhQ(u, v, x): # (* If u is a pure function of Sinh[v] and/or Csch[v], PureFunctionOfSinhQ[u,v,x] returns True; # else it returns False. *) if AtomQ(u): return u != x elif CalculusQ(u): return False elif HyperbolicQ(u) and ZeroQ(u.args[0] - v): return SinhQ(u) or CschQ(u) for i in u.args: if Not(PureFunctionOfSinhQ(i, v, x)): return False return True def PureFunctionOfTanhQ(u, v , x): # (* If u is a pure function of Tanh[v] and/or Coth[v], PureFunctionOfTanhQ[u,v,x] returns True; # else it returns False. *) if AtomQ(u): return u != x elif CalculusQ(u): return False elif HyperbolicQ(u) and ZeroQ(u.args[0] - v): return TanhQ(u) or CothQ(u) for i in u.args: if Not(PureFunctionOfTanhQ(i, v, x)): return False return True def PureFunctionOfCoshQ(u, v, x): # (* If u is a pure function of Cosh[v] and/or Sech[v], PureFunctionOfCoshQ[u,v,x] returns True; # else it returns False. *) if AtomQ(u): return u != x elif CalculusQ(u): return False elif HyperbolicQ(u) and ZeroQ(u.args[0] - v): return CoshQ(u) or SechQ(u) for i in u.args: if Not(PureFunctionOfCoshQ(i, v, x)): return False return True def IntegerQuotientQ(u, v): # (* If u/v is an integer, IntegerQuotientQ[u,v] returns True; else it returns False. *) return IntegerQ(Simplify(u/v)) def OddQuotientQ(u, v): # (* If u/v is odd, OddQuotientQ[u,v] returns True; else it returns False. *) return OddQ(Simplify(u/v)) def EvenQuotientQ(u, v): # (* If u/v is even, EvenQuotientQ[u,v] returns True; else it returns False. *) return EvenQ(Simplify(u/v)) def FindTrigFactor(func1, func2, u, v, flag): # (* If func[w]^m is a factor of u where m is odd and w is an integer multiple of v, # FindTrigFactor[func1,func2,u,v,True] returns the list {w,u/func[w]^n}; else it returns False. *) # (* If func[w]^m is a factor of u where m is odd and w is an integer multiple of v not equal to v, # FindTrigFactor[func1,func2,u,v,False] returns the list {w,u/func[w]^n}; else it returns False. *) if u == 1: return False elif (Head(LeadBase(u)) == func1 or Head(LeadBase(u)) == func2) and OddQ(LeadDegree(u)) and IntegerQuotientQ(LeadBase(u).args[0], v) and (flag or NonzeroQ(LeadBase(u).args[0] - v)): return [LeadBase[u].args[0], RemainingFactors(u)] lst = FindTrigFactor(func1, func2, RemainingFactors(u), v, flag) if AtomQ(lst): return False return [lst[0], LeadFactor(u)*lst[1]] def FunctionOfSinhQ(u, v, x): # (* If u is a function of Sinh[v], FunctionOfSinhQ[u,v,x] returns True; else it returns False. *) if AtomQ(u): return u != x elif CalculusQ(u): return False elif HyperbolicQ(u) and IntegerQuotientQ(u.args[0], v): if OddQuotientQ(u.args[0], v): # (* Basis: If m odd, Sinh[m*v]^n is a function of Sinh[v]. *) return SinhQ(u) or CschQ(u) # (* Basis: If m even, Cos[m*v]^n is a function of Sinh[v]. *) return CoshQ(u) or SechQ(u) elif IntegerPowerQ(u): if HyperbolicQ(u.base) and IntegerQuotientQ(u.base.args[0], v): if EvenQ(u.exp): # (* Basis: If m integer and n even, Hyper[m*v]^n is a function of Sinh[v]. *) return True return FunctionOfSinhQ(u.base, v, x) elif ProductQ(u): if CoshQ(u.args[0]) and SinhQ(u.args[1]) and ZeroQ(u.args[0].args[0] - v/2) and ZeroQ(u.args[1].args[0] - v/2): return FunctionOfSinhQ(Drop(u, 2), v, x) lst = FindTrigFactor(Sinh, Csch, u, v, False) if ListQ(lst) and EvenQuotientQ(lst[0], v): # (* Basis: If m even and n odd, Sinh[m*v]^n == Cosh[v]*u where u is a function of Sinh[v]. *) return FunctionOfSinhQ(Cosh(v)*lst[1], v, x) lst = FindTrigFactor(Cosh, Sech, u, v, False) if ListQ(lst) and OddQuotientQ(lst[0], v): # (* Basis: If m odd and n odd, Cosh[m*v]^n == Cosh[v]*u where u is a function of Sinh[v]. *) return FunctionOfSinhQ(Cosh(v)*lst[1], v, x) lst = FindTrigFactor(Tanh, Coth, u, v, True) if ListQ(lst): # (* Basis: If m integer and n odd, Tanh[m*v]^n == Cosh[v]*u where u is a function of Sinh[v]. *) return FunctionOfSinhQ(Cosh(v)*lst[1], v, x) return all(FunctionOfSinhQ(i, v, x) for i in u.args) return all(FunctionOfSinhQ(i, v, x) for i in u.args) def FunctionOfCoshQ(u, v, x): #(* If u is a function of Cosh[v], FunctionOfCoshQ[u,v,x] returns True; else it returns False. *) if AtomQ(u): return u != x elif CalculusQ(u): return False elif HyperbolicQ(u) and IntegerQuotientQ(u.args[0], v): # (* Basis: If m integer, Cosh[m*v]^n is a function of Cosh[v]. *) return CoshQ(u) or SechQ(u) elif IntegerPowerQ(u): if HyperbolicQ(u.base) and IntegerQuotientQ(u.base.args[0], v): if EvenQ(u.exp): # (* Basis: If m integer and n even, Hyper[m*v]^n is a function of Cosh[v]. *) return True return FunctionOfCoshQ(u.base, v, x) elif ProductQ(u): lst = FindTrigFactor(Sinh, Csch, u, v, False) if ListQ(lst): # (* Basis: If m integer and n odd, Sinh[m*v]^n == Sinh[v]*u where u is a function of Cosh[v]. *) return FunctionOfCoshQ(Sinh(v)*lst[1], v, x) lst = FindTrigFactor(Tanh, Coth, u, v, True) if ListQ(lst): # (* Basis: If m integer and n odd, Tanh[m*v]^n == Sinh[v]*u where u is a function of Cosh[v]. *) return FunctionOfCoshQ(Sinh(v)*lst[1], v, x) return all(FunctionOfCoshQ(i, v, x) for i in u.args) return all(FunctionOfCoshQ(i, v, x) for i in u.args) def OddHyperbolicPowerQ(u, v, x): if SinhQ(u) or CoshQ(u) or SechQ(u) or CschQ(u): return OddQuotientQ(u.args[0], v) if PowerQ(u): return OddQ(u.exp) and OddHyperbolicPowerQ(u.base, v, x) if ProductQ(u): if Not(EqQ(FreeFactors(u, x), 1)): return OddHyperbolicPowerQ(NonfreeFactors(u, x), v, x) lst = [] for i in u.args: if Not(FunctionOfTanhQ(i, v, x)): lst.append(i) if lst == []: return True return Length(lst)==1 and OddHyperbolicPowerQ(lst[0], v, x) if SumQ(u): return all(OddHyperbolicPowerQ(i, v, x) for i in u.args) return False def FunctionOfTanhQ(u, v, x): #(* If u is a function of the form f[Tanh[v],Coth[v]] where f is independent of x, # FunctionOfTanhQ[u,v,x] returns True; else it returns False. *) if AtomQ(u): return u != x elif CalculusQ(u): return False elif HyperbolicQ(u) and IntegerQuotientQ(u.args[0], v): return TanhQ(u) or CothQ(u) or EvenQuotientQ(u.args[0], v) elif PowerQ(u): if EvenQ(u.exp) and HyperbolicQ(u.base) and IntegerQuotientQ(u.base.args[0], v): return True elif EvenQ(u.args[1]) and SumQ(u.args[0]): return FunctionOfTanhQ(Expand(u.args[0]**2, v, x)) if ProductQ(u): lst = [] for i in u.args: if Not(FunctionOfTanhQ(i, v, x)): lst.append(i) if lst == []: return True return Length(lst)==2 and OddHyperbolicPowerQ(lst[0], v, x) and OddHyperbolicPowerQ(lst[1], v, x) return all(FunctionOfTanhQ(i, v, x) for i in u.args) def FunctionOfTanhWeight(u, v, x): """ u is a function of the form f(tanh(v), coth(v)) where f is independent of x. FunctionOfTanhWeight(u, v, x) returns a nonnegative number if u is best considered a function of tanh(v), else it returns a negative number. Examples ======== >>> from sympy import sinh, log, tanh >>> from sympy.abc import x >>> from sympy.integrals.rubi.utility_function import FunctionOfTanhWeight >>> FunctionOfTanhWeight(x, log(x), x) 0 >>> FunctionOfTanhWeight(sinh(log(x)), log(x), x) 0 >>> FunctionOfTanhWeight(tanh(log(x)), log(x), x) 1 """ if AtomQ(u): return S(0) elif CalculusQ(u): return S(0) elif HyperbolicQ(u) and IntegerQuotientQ(u.args[0], v): if TanhQ(u) and ZeroQ(u.args[0] - v): return S(1) elif CothQ(u) and ZeroQ(u.args[0] - v): return S(-1) return S(0) elif PowerQ(u): if EvenQ(u.exp) and HyperbolicQ(u.base) and IntegerQuotientQ(u.base.args[0], v): if TanhQ(u.base) or CoshQ(u.base) or SechQ(u.base): return S(1) return S(-1) if ProductQ(u): if all(FunctionOfTanhQ(i, v, x) for i in u.args): return Add(*[FunctionOfTanhWeight(i, v, x) for i in u.args]) return S(0) return Add(*[FunctionOfTanhWeight(i, v, x) for i in u.args]) def FunctionOfHyperbolicQ(u, v, x): # (* If u (x) is equivalent to a function of the form f (Sinh[v],Cosh[v],Tanh[v],Coth[v],Sech[v],Csch[v]) # where f is independent of x, FunctionOfHyperbolicQ[u,v,x] returns True; else it returns False. *) if AtomQ(u): return u != x elif CalculusQ(u): return False elif HyperbolicQ(u) and IntegerQuotientQ(u.args[0], v): return True return all(FunctionOfHyperbolicQ(i, v, x) for i in u.args) def SmartNumerator(expr): if PowerQ(expr): n = expr.exp u = expr.base if RationalQ(n) and n < 0: return SmartDenominator(u**(-n)) elif ProductQ(expr): return Mul(*[SmartNumerator(i) for i in expr.args]) return Numerator(expr) def SmartDenominator(expr): if PowerQ(expr): u = expr.base n = expr.exp if RationalQ(n) and n < 0: return SmartNumerator(u**(-n)) elif ProductQ(expr): return Mul(*[SmartDenominator(i) for i in expr.args]) return Denominator(expr) def ActivateTrig(u): return u def ExpandTrig(*args): if len(args) == 2: u, x = args return ActivateTrig(ExpandIntegrand(u, x)) u, v, x = args w = ExpandTrig(v, x) z = ActivateTrig(u) if SumQ(w): return w.func(*[z*i for i in w.args]) return z*w def TrigExpand(u): return expand_trig(u) # SubstForTrig[u_,sin_,cos_,v_,x_] := # If[AtomQ[u], # u, # If[TrigQ[u] && IntegerQuotientQ[u[[1]],v], # If[u[[1]]===v || ZeroQ[u[[1]]-v], # If[SinQ[u], # sin, # If[CosQ[u], # cos, # If[TanQ[u], # sin/cos, # If[CotQ[u], # cos/sin, # If[SecQ[u], # 1/cos, # 1/sin]]]]], # Map[Function[SubstForTrig[#,sin,cos,v,x]], # ReplaceAll[TrigExpand[Head[u][Simplify[u[[1]]/v]*x]],x->v]]], # If[ProductQ[u] && CosQ[u[[1]]] && SinQ[u[[2]]] && ZeroQ[u[[1,1]]-v/2] && ZeroQ[u[[2,1]]-v/2], # sin/2*SubstForTrig[Drop[u,2],sin,cos,v,x], # Map[Function[SubstForTrig[#,sin,cos,v,x]],u]]]] def SubstForTrig(u, sin_ , cos_, v, x): # (* u (v) is an expression of the form f (Sin[v],Cos[v],Tan[v],Cot[v],Sec[v],Csc[v]). *) # (* SubstForTrig[u,sin,cos,v,x] returns the expression f (sin,cos,sin/cos,cos/sin,1/cos,1/sin). *) if AtomQ(u): return u elif TrigQ(u) and IntegerQuotientQ(u.args[0], v): if u.args[0] == v or ZeroQ(u.args[0] - v): if SinQ(u): return sin_ elif CosQ(u): return cos_ elif TanQ(u): return sin_/cos_ elif CotQ(u): return cos_/sin_ elif SecQ(u): return 1/cos_ return 1/sin_ r = ReplaceAll(TrigExpand(Head(u)(Simplify(u.args[0]/v*x))), {x: v}) return r.func(*[SubstForTrig(i, sin_, cos_, v, x) for i in r.args]) if ProductQ(u) and CosQ(u.args[0]) and SinQ(u.args[1]) and ZeroQ(u.args[0].args[0] - v/2) and ZeroQ(u.args[1].args[0] - v/2): return sin(x)/2*SubstForTrig(Drop(u, 2), sin_, cos_, v, x) return u.func(*[SubstForTrig(i, sin_, cos_, v, x) for i in u.args]) def SubstForHyperbolic(u, sinh_, cosh_, v, x): # (* u (v) is an expression of the form f (Sinh[v],Cosh[v],Tanh[v],Coth[v],Sech[v],Csch[v]). *) # (* SubstForHyperbolic[u,sinh,cosh,v,x] returns the expression # f (sinh,cosh,sinh/cosh,cosh/sinh,1/cosh,1/sinh). *) if AtomQ(u): return u elif HyperbolicQ(u) and IntegerQuotientQ(u.args[0], v): if u.args[0] == v or ZeroQ(u.args[0] - v): if SinhQ(u): return sinh_ elif CoshQ(u): return cosh_ elif TanhQ(u): return sinh_/cosh_ elif CothQ(u): return cosh_/sinh_ if SechQ(u): return 1/cosh_ return 1/sinh_ r = ReplaceAll(TrigExpand(Head(u)(Simplify(u.args[0]/v)*x)), {x: v}) return r.func(*[SubstForHyperbolic(i, sinh_, cosh_, v, x) for i in r.args]) elif ProductQ(u) and CoshQ(u.args[0]) and SinhQ(u.args[1]) and ZeroQ(u.args[0].args[0] - v/2) and ZeroQ(u.args[1].args[0] - v/2): return sinh(x)/2*SubstForHyperbolic(Drop(u, 2), sinh_, cosh_, v, x) return u.func(*[SubstForHyperbolic(i, sinh_, cosh_, v, x) for i in u.args]) def InertTrigFreeQ(u): return FreeQ(u, sin) and FreeQ(u, cos) and FreeQ(u, tan) and FreeQ(u, cot) and FreeQ(u, sec) and FreeQ(u, csc) def LCM(a, b): return lcm(a, b) def SubstForFractionalPowerOfLinear(u, x): # (* If u has a subexpression of the form (a+b*x)^(m/n) where m and n>1 are integers, # SubstForFractionalPowerOfLinear[u,x] returns the list {v,n,a+b*x,1/b} where v is u # with subexpressions of the form (a+b*x)^(m/n) replaced by x^m and x replaced # by -a/b+x^n/b, and all times x^(n-1); else it returns False. *) lst = FractionalPowerOfLinear(u, S(1), False, x) if AtomQ(lst) or FalseQ(lst[1]): return False n = lst[0] a = Coefficient(lst[1], x, 0) b = Coefficient(lst[1], x, 1) tmp = Simplify(x**(n-1)*SubstForFractionalPower(u, lst[1], n, -a/b + x**n/b, x)) return [NonfreeFactors(tmp, x), n, lst[1], FreeFactors(tmp, x)/b] def FractionalPowerOfLinear(u, n, v, x): # If u has a subexpression of the form (a + b*x)**(m/n), FractionalPowerOfLinear(u, 1, False, x) returns [n, a + b*x], else it returns False. if AtomQ(u) or FreeQ(u, x): return [n, v] elif CalculusQ(u): return False elif FractionalPowerQ(u): if LinearQ(u.base, x) and (FalseQ(v) or ZeroQ(u.base - v)): return [LCM(Denominator(u.exp), n), u.base] lst = [n, v] for i in u.args: lst = FractionalPowerOfLinear(i, lst[0], lst[1], x) if AtomQ(lst): return False return lst def InverseFunctionOfLinear(u, x): # (* If u has a subexpression of the form g[a+b*x] where g is an inverse function, # InverseFunctionOfLinear[u,x] returns g[a+b*x]; else it returns False. *) if AtomQ(u) or CalculusQ(u) or FreeQ(u, x): return False elif InverseFunctionQ(u) and LinearQ(u.args[0], x): return u for i in u.args: tmp = InverseFunctionOfLinear(i, x) if Not(AtomQ(tmp)): return tmp return False def InertTrigQ(*args): if len(args) == 1: f = args[0] l = [sin,cos,tan,cot,sec,csc] return any(Head(f) == i for i in l) elif len(args) == 2: f, g = args if f == g: return InertTrigQ(f) return InertReciprocalQ(f, g) or InertReciprocalQ(g, f) else: f, g, h = args return InertTrigQ(g, f) and InertTrigQ(g, h) def InertReciprocalQ(f, g): return (f.func == sin and g.func == csc) or (f.func == cos and g.func == sec) or (f.func == tan and g.func == cot) def DeactivateTrig(u, x): # (* u is a function of trig functions of a linear function of x. *) # (* DeactivateTrig[u,x] returns u with the trig functions replaced with inert trig functions. *) return FixInertTrigFunction(DeactivateTrigAux(u, x), x) def FixInertTrigFunction(u, x): return u def DeactivateTrigAux(u, x): if AtomQ(u): return u elif TrigQ(u) and LinearQ(u.args[0], x): v = ExpandToSum(u.args[0], x) if SinQ(u): return sin(v) elif CosQ(u): return cos(v) elif TanQ(u): return tan(u) elif CotQ(u): return cot(v) elif SecQ(u): return sec(v) return csc(v) elif HyperbolicQ(u) and LinearQ(u.args[0], x): v = ExpandToSum(I*u.args[0], x) if SinhQ(u): return -I*sin(v) elif CoshQ(u): return cos(v) elif TanhQ(u): return -I*tan(v) elif CothQ(u): I*cot(v) elif SechQ(u): return sec(v) return I*csc(v) return u.func(*[DeactivateTrigAux(i, x) for i in u.args]) def PowerOfInertTrigSumQ(u, func, x): p_ = Wild('p', exclude=[x]) q_ = Wild('q', exclude=[x]) a_ = Wild('a', exclude=[x]) b_ = Wild('b', exclude=[x]) c_ = Wild('c', exclude=[x]) d_ = Wild('d', exclude=[x]) n_ = Wild('n', exclude=[x]) w_ = Wild('w') pattern = (a_ + b_*(c_*func(w_))**p_)**n_ match = u.match(pattern) if match: keys = [a_, b_, c_, n_, p_, w_] if len(keys) == len(match): return True pattern = (a_ + b_*(d_*func(w_))**p_ + c_*(d_*func(w_))**q_)**n_ match = u.match(pattern) if match: keys = [a_, b_, c_, d_, n_, p_, q_, w_] if len(keys) == len(match): return True return False def PiecewiseLinearQ(*args): # (* If the derivative of u wrt x is a constant wrt x, PiecewiseLinearQ[u,x] returns True; # else it returns False. *) if len(args) == 3: u, v, x = args return PiecewiseLinearQ(u, x) and PiecewiseLinearQ(v, x) u, x = args if LinearQ(u, x): return True c_ = Wild('c', exclude=[x]) F_ = Wild('F', exclude=[x]) v_ = Wild('v') match = u.match(Log(c_*F_**v_)) if match: if len(match) == 3: if LinearQ(match[v_], x): return True try: F = type(u) G = type(u.args[0]) v = u.args[0].args[0] if LinearQ(v, x): if MemberQ([[atanh, tanh], [atanh, coth], [acoth, coth], [acoth, tanh], [atan, tan], [atan, cot], [acot, cot], [acot, tan]], [F, G]): return True except: pass return False def KnownTrigIntegrandQ(lst, u, x): if u == 1: return True a_ = Wild('a', exclude=[x]) b_ = Wild('b', exclude=[x, 0]) func_ = WildFunction('func') m_ = Wild('m', exclude=[x]) A_ = Wild('A', exclude=[x]) B_ = Wild('B', exclude=[x, 0]) C_ = Wild('C', exclude=[x, 0]) match = u.match((a_ + b_*func_)**m_) if match: func = match[func_] if LinearQ(func.args[0], x) and MemberQ(lst, func.func): return True match = u.match((a_ + b_*func_)**m_*(A_ + B_*func_)) if match: func = match[func_] if LinearQ(func.args[0], x) and MemberQ(lst, func.func): return True match = u.match(A_ + C_*func_**2) if match: func = match[func_] if LinearQ(func.args[0], x) and MemberQ(lst, func.func): return True match = u.match(A_ + B_*func_ + C_*func_**2) if match: func = match[func_] if LinearQ(func.args[0], x) and MemberQ(lst, func.func): return True match = u.match((a_ + b_*func_)**m_*(A_ + C_*func_**2)) if match: func = match[func_] if LinearQ(func.args[0], x) and MemberQ(lst, func.func): return True match = u.match((a_ + b_*func_)**m_*(A_ + B_*func_ + C_*func_**2)) if match: func = match[func_] if LinearQ(func.args[0], x) and MemberQ(lst, func.func): return True return False def KnownSineIntegrandQ(u, x): return KnownTrigIntegrandQ([sin, cos], u, x) def KnownTangentIntegrandQ(u, x): return KnownTrigIntegrandQ([tan], u, x) def KnownCotangentIntegrandQ(u, x): return KnownTrigIntegrandQ([cot], u, x) def KnownSecantIntegrandQ(u, x): return KnownTrigIntegrandQ([sec, csc], u, x) def TryPureTanSubst(u, x): a_ = Wild('a', exclude=[x]) b_ = Wild('b', exclude=[x]) c_ = Wild('c', exclude=[x]) G_ = Wild('G') F = u.func try: if MemberQ([atan, acot, atanh, acoth], F): match = u.args[0].match(c_*(a_ + b_*G_)) if match: if len(match) == 4: G = match[G_] if MemberQ([tan, cot, tanh, coth], G.func): if LinearQ(G.args[0], x): return True except: pass return False def TryTanhSubst(u, x): if LogQ(u): return False elif not FalseQ(FunctionOfLinear(u, x)): return False a_ = Wild('a', exclude=[x]) m_ = Wild('m', exclude=[x]) p_ = Wild('p', exclude=[x]) r_, s_, t_, n_, b_, f_, g_ = map(Wild, 'rstnbfg') match = u.match(r_*(s_ + t_)**n_) if match: if len(match) == 4: r, s, t, n = [match[i] for i in [r_, s_, t_, n_]] if IntegerQ(n) and PositiveQ(n): return False match = u.match(1/(a_ + b_*f_**n_)) if match: if len(match) == 4: a, b, f, n = [match[i] for i in [a_, b_, f_, n_]] if SinhCoshQ(f) and IntegerQ(n) and n > 2: return False match = u.match(f_*g_) if match: if len(match) == 2: f, g = match[f_], match[g_] if SinhCoshQ(f) and SinhCoshQ(g): if IntegersQ(f.args[0]/x, g.args[0]/x): return False match = u.match(r_*(a_*s_**m_)**p_) if match: if len(match) == 5: r, a, s, m, p = [match[i] for i in [r_, a_, s_, m_, p_]] if Not(m==2 and (s == Sech(x) or s == Csch(x))): return False if u != ExpandIntegrand(u, x): return False return True def TryPureTanhSubst(u, x): F = u.func a_ = Wild('a', exclude=[x]) G_ = Wild('G') if F == sym_log: return False match = u.args[0].match(a_*G_) if match and len(match) == 2: G = match[G_].func if MemberQ([atanh, acoth], F) and MemberQ([tanh, coth], G): return False if u != ExpandIntegrand(u, x): return False return True def AbsurdNumberGCD(*seq): # (* m, n, ... must be absurd numbers. AbsurdNumberGCD[m,n,...] returns the gcd of m, n, ... *) lst = list(seq) if Length(lst) == 1: return First(lst) return AbsurdNumberGCDList(FactorAbsurdNumber(First(lst)), FactorAbsurdNumber(AbsurdNumberGCD(*Rest(lst)))) def AbsurdNumberGCDList(lst1, lst2): # (* lst1 and lst2 must be absurd number prime factorization lists. *) # (* AbsurdNumberGCDList[lst1,lst2] returns the gcd of the absurd numbers represented by lst1 and lst2. *) if lst1 == []: return Mul(*[i[0]**Min(i[1],0) for i in lst2]) elif lst2 == []: return Mul(*[i[0]**Min(i[1],0) for i in lst1]) elif lst1[0][0] == lst2[0][0]: if lst1[0][1] <= lst2[0][1]: return lst1[0][0]**lst1[0][1]*AbsurdNumberGCDList(Rest(lst1), Rest(lst2)) return lst1[0][0]**lst2[0][1]*AbsurdNumberGCDList(Rest(lst1), Rest(lst2)) elif lst1[0][0] < lst2[0][0]: if lst1[0][1] < 0: return lst1[0][0]**lst1[0][1]*AbsurdNumberGCDList(Rest(lst1), lst2) return AbsurdNumberGCDList(Rest(lst1), lst2) elif lst2[0][1] < 0: return lst2[0][0]**lst2[0][1]*AbsurdNumberGCDList(lst1, Rest(lst2)) return AbsurdNumberGCDList(lst1, Rest(lst2)) def ExpandTrigExpand(u, F, v, m, n, x): w = Expand(TrigExpand(F.xreplace({x: n*x}))**m).xreplace({x: v}) if SumQ(w): t = 0 for i in w.args: t += u*i return t else: return u*w def ExpandTrigReduce(*args): if len(args) == 3: u = args[0] v = args[1] x = args[2] w = ExpandTrigReduce(v, x) if SumQ(w): t = 0 for i in w.args: t += u*i return t else: return u*w else: u = args[0] x = args[1] return ExpandTrigReduceAux(u, x) def ExpandTrigReduceAux(u, x): v = TrigReduce(u).expand() if SumQ(v): t = 0 for i in v.args: t += NormalizeTrig(i, x) return t return NormalizeTrig(v, x) def NormalizeTrig(v, x): a = Wild('a', exclude=[x]) n = Wild('n', exclude=[x, 0]) F = Wild('F') expr = a*F**n M = v.match(expr) if M and len(M[F].args) == 1 and PolynomialQ(M[F].args[0], x) and Exponent(M[F].args[0], x) > 0: u = M[F].args[0] return M[a]*M[F].xreplace({u: ExpandToSum(u, x)})**M[n] else: return v #================================= def TrigToExp(expr): ex = expr.rewrite(sin, sym_exp).rewrite(cos, sym_exp).rewrite(tan, sym_exp).rewrite(sec, sym_exp).rewrite(csc, sym_exp).rewrite(cot, sym_exp) return ex.replace(sym_exp, rubi_exp) def ExpandTrigToExp(u, *args): if len(args) == 1: x = args[0] return ExpandTrigToExp(1, u, x) else: v = args[0] x = args[1] w = TrigToExp(v) k = 0 if SumQ(w): for i in w.args: k += SimplifyIntegrand(u*i, x) w = k else: w = SimplifyIntegrand(u*w, x) return ExpandIntegrand(FreeFactors(w, x), NonfreeFactors(w, x),x) #====================================== def TrigReduce(i): """ TrigReduce(expr) rewrites products and powers of trigonometric functions in expr in terms of trigonometric functions with combined arguments. Examples ======== >>> from sympy import sin, cos >>> from sympy.integrals.rubi.utility_function import TrigReduce >>> from sympy.abc import x >>> TrigReduce(cos(x)**2) cos(2*x)/2 + 1/2 >>> TrigReduce(cos(x)**2*sin(x)) sin(x)/4 + sin(3*x)/4 >>> TrigReduce(cos(x)**2+sin(x)) sin(x) + cos(2*x)/2 + 1/2 """ if SumQ(i): t = 0 for k in i.args: t += TrigReduce(k) return t if ProductQ(i): if any(PowerQ(k) for k in i.args): if (i.rewrite((sin, sinh), sym_exp).rewrite((cos, cosh), sym_exp).expand().rewrite(sym_exp, sin)).has(I, cosh, sinh): return i.rewrite((sin, sinh), sym_exp).rewrite((cos, cosh), sym_exp).expand().rewrite(sym_exp, sin).simplify() else: return i.rewrite((sin, sinh), sym_exp).rewrite((cos, cosh), sym_exp).expand().rewrite(sym_exp, sin) else: a = Wild('a') b = Wild('b') v = Wild('v') Match = i.match(v*sin(a)*cos(b)) if Match: a = Match[a] b = Match[b] v = Match[v] return i.subs(v*sin(a)*cos(b), v*S(1)/2*(sin(a + b) + sin(a - b))) Match = i.match(v*sin(a)*sin(b)) if Match: a = Match[a] b = Match[b] v = Match[v] return i.subs(v*sin(a)*sin(b), v*S(1)/2*cos(a - b) - cos(a + b)) Match = i.match(v*cos(a)*cos(b)) if Match: a = Match[a] b = Match[b] v = Match[v] return i.subs(v*cos(a)*cos(b), v*S(1)/2*cos(a + b) + cos(a - b)) Match = i.match(v*sinh(a)*cosh(b)) if Match: a = Match[a] b = Match[b] v = Match[v] return i.subs(v*sinh(a)*cosh(b), v*S(1)/2*(sinh(a + b) + sinh(a - b))) Match = i.match(v*sinh(a)*sinh(b)) if Match: a = Match[a] b = Match[b] v = Match[v] return i.subs(v*sinh(a)*sinh(b), v*S(1)/2*cosh(a - b) - cosh(a + b)) Match = i.match(v*cosh(a)*cosh(b)) if Match: a = Match[a] b = Match[b] v = Match[v] return i.subs(v*cosh(a)*cosh(b), v*S(1)/2*cosh(a + b) + cosh(a - b)) if PowerQ(i): if i.has(sin, sinh): if (i.rewrite((sin, sinh), sym_exp).expand().rewrite(sym_exp, sin)).has(I, cosh, sinh): return i.rewrite((sin, sinh), sym_exp).expand().rewrite(sym_exp, sin).simplify() else: return i.rewrite((sin, sinh), sym_exp).expand().rewrite(sym_exp, sin) if i.has(cos, cosh): if (i.rewrite((cos, cosh), sym_exp).expand().rewrite(sym_exp, cos)).has(I, cosh, sinh): return i.rewrite((cos, cosh), sym_exp).expand().rewrite(sym_exp, cos).simplify() else: return i.rewrite((cos, cosh), sym_exp).expand().rewrite(sym_exp, cos) return i def FunctionOfTrig(u, *args): # If u is a function of trig functions of v where v is a linear function of x, # FunctionOfTrig[u,x] returns v; else it returns False. if len(args) == 1: x = args[0] v = FunctionOfTrig(u, None, x) if v: return v else: return False else: v, x = args if AtomQ(u): if u == x: return False else: return v if TrigQ(u) and LinearQ(u.args[0], x): if v is None: return u.args[0] else: a = Coefficient(v, x, 0) b = Coefficient(v, x, 1) c = Coefficient(u.args[0], x, 0) d = Coefficient(u.args[0], x, 1) if ZeroQ(a*d - b*c) and RationalQ(b/d): return a/Numerator(b/d) + b*x/Numerator(b/d) else: return False if HyperbolicQ(u) and LinearQ(u.args[0], x): if v is None: return I*u.args[0] a = Coefficient(v, x, 0) b = Coefficient(v, x, 1) c = I*Coefficient(u.args[0], x, 0) d = I*Coefficient(u.args[0], x, 1) if ZeroQ(a*d - b*c) and RationalQ(b/d): return a/Numerator(b/d) + b*x/Numerator(b/d) else: return False if CalculusQ(u): return False else: w = v for i in u.args: w = FunctionOfTrig(i, w, x) if FalseQ(w): return False return w def AlgebraicTrigFunctionQ(u, x): # If u is algebraic function of trig functions, AlgebraicTrigFunctionQ(u,x) returns True; else it returns False. if AtomQ(u): return True elif TrigQ(u) and LinearQ(u.args[0], x): return True elif HyperbolicQ(u) and LinearQ(u.args[0], x): return True elif PowerQ(u): if FreeQ(u.exp, x): return AlgebraicTrigFunctionQ(u.base, x) elif ProductQ(u) or SumQ(u): for i in u.args: if not AlgebraicTrigFunctionQ(i, x): return False return True return False def FunctionOfHyperbolic(u, *x): # If u is a function of hyperbolic trig functions of v where v is linear in x, # FunctionOfHyperbolic(u,x) returns v; else it returns False. if len(x) == 1: x = x[0] v = FunctionOfHyperbolic(u, None, x) if v is None: return False else: return v else: v = x[0] x = x[1] if AtomQ(u): if u == x: return False return v if HyperbolicQ(u) and LinearQ(u.args[0], x): if v is None: return u.args[0] a = Coefficient(v, x, 0) b = Coefficient(v, x, 1) c = Coefficient(u.args[0], x, 0) d = Coefficient(u.args[0], x, 1) if ZeroQ(a*d - b*c) and RationalQ(b/d): return a/Numerator(b/d) + b*x/Numerator(b/d) else: return False if CalculusQ(u): return False w = v for i in u.args: if w == FunctionOfHyperbolic(i, w, x): return False return w def FunctionOfQ(v, u, x, PureFlag=False): # v is a function of x. If u is a function of v, FunctionOfQ(v, u, x) returns True; else it returns False. *) if FreeQ(u, x): return False elif AtomQ(v): return True elif ProductQ(v) and Not(EqQ(FreeFactors(v, x), 1)): return FunctionOfQ(NonfreeFactors(v, x), u, x, PureFlag) elif PureFlag: if SinQ(v) or CscQ(v): return PureFunctionOfSinQ(u, v.args[0], x) elif CosQ(v) or SecQ(v): return PureFunctionOfCosQ(u, v.args[0], x) elif TanQ(v): return PureFunctionOfTanQ(u, v.args[0], x) elif CotQ(v): return PureFunctionOfCotQ(u, v.args[0], x) elif SinhQ(v) or CschQ(v): return PureFunctionOfSinhQ(u, v.args[0], x) elif CoshQ(v) or SechQ(v): return PureFunctionOfCoshQ(u, v.args[0], x) elif TanhQ(v): return PureFunctionOfTanhQ(u, v.args[0], x) elif CothQ(v): return PureFunctionOfCothQ(u, v.args[0], x) else: return FunctionOfExpnQ(u, v, x) != False elif SinQ(v) or CscQ(v): return FunctionOfSinQ(u, v.args[0], x) elif CosQ(v) or SecQ(v): return FunctionOfCosQ(u, v.args[0], x) elif TanQ(v) or CotQ(v): FunctionOfTanQ(u, v.args[0], x) elif SinhQ(v) or CschQ(v): return FunctionOfSinhQ(u, v.args[0], x) elif CoshQ(v) or SechQ(v): return FunctionOfCoshQ(u, v.args[0], x) elif TanhQ(v) or CothQ(v): return FunctionOfTanhQ(u, v.args[0], x) return FunctionOfExpnQ(u, v, x) != False def FunctionOfExpnQ(u, v, x): if u == v: return 1 if AtomQ(u): if u == x: return False else: return 0 if CalculusQ(u): return False if PowerQ(u): if FreeQ(u.exp, x): if ZeroQ(u.base - v): if IntegerQ(u.exp): return u.exp else: return 1 if PowerQ(v): if FreeQ(v.exp, x) and ZeroQ(u.base-v.base): if RationalQ(v.exp): if RationalQ(u.exp) and IntegerQ(u.exp/v.exp) and (v.exp>0 or u.exp<0): return u.exp/v.exp else: return False if IntegerQ(Simplify(u.exp/v.exp)): return Simplify(u.exp/v.exp) else: return False return FunctionOfExpnQ(u.base, v, x) if ProductQ(u) and Not(EqQ(FreeFactors(u, x), 1)): return FunctionOfExpnQ(NonfreeFactors(u, x), v, x) if ProductQ(u) and ProductQ(v): deg1 = FunctionOfExpnQ(First(u), First(v), x) if deg1==False: return False deg2 = FunctionOfExpnQ(Rest(u), Rest(v), x); if deg1==deg2 and FreeQ(Simplify(u/v^deg1), x): return deg1 else: return False lst = [] for i in u.args: if FunctionOfExpnQ(i, v, x) is False: return False lst.append(FunctionOfExpnQ(i, v, x)) return Apply(GCD, lst) def PureFunctionOfSinQ(u, v, x): # If u is a pure function of Sin(v) and/or Csc(v), PureFunctionOfSinQ(u, v, x) returns True; else it returns False. if AtomQ(u): return u!=x if CalculusQ(u): return False if TrigQ(u) and ZeroQ(u.args[0]-v): return SinQ(u) or CscQ(u) for i in u.args: if Not(PureFunctionOfSinQ(i, v, x)): return False return True def PureFunctionOfCosQ(u, v, x): # If u is a pure function of Cos(v) and/or Sec(v), PureFunctionOfCosQ(u, v, x) returns True; else it returns False. if AtomQ(u): return u!=x if CalculusQ(u): return False if TrigQ(u) and ZeroQ(u.args[0]-v): return CosQ(u) or SecQ(u) for i in u.args: if Not(PureFunctionOfCosQ(i, v, x)): return False return True def PureFunctionOfTanQ(u, v, x): # If u is a pure function of Tan(v) and/or Cot(v), PureFunctionOfTanQ(u, v, x) returns True; else it returns False. if AtomQ(u): return u!=x if CalculusQ(u): return False if TrigQ(u) and ZeroQ(u.args[0]-v): return TanQ(u) or CotQ(u) for i in u.args: if Not(PureFunctionOfTanQ(i, v, x)): return False return True def PureFunctionOfCotQ(u, v, x): # If u is a pure function of Cot(v), PureFunctionOfCotQ(u, v, x) returns True; else it returns False. if AtomQ(u): return u!=x if CalculusQ(u): return False if TrigQ(u) and ZeroQ(u.args[0]-v): return CotQ(u) for i in u.args: if Not(PureFunctionOfCotQ(i, v, x)): return False return True def FunctionOfCosQ(u, v, x): # If u is a function of Cos[v], FunctionOfCosQ[u,v,x] returns True; else it returns False. if AtomQ(u): return u != x elif CalculusQ(u): return False elif TrigQ(u) and IntegerQuotientQ(u.args[0], v): # Basis: If m integer, Cos[m*v]^n is a function of Cos[v]. *) return CosQ(u) or SecQ(u) elif IntegerPowerQ(u): if TrigQ(u.base) and IntegerQuotientQ(u.base.args[0], v): if EvenQ(u.exp): # Basis: If m integer and n even, Trig[m*v]^n is a function of Cos[v]. *) return True return FunctionOfCosQ(u.base, v, x) elif ProductQ(u): lst = FindTrigFactor(sin, csc, u, v, False) if ListQ(lst): # (* Basis: If m integer and n odd, Sin[m*v]^n == Sin[v]*u where u is a function of Cos[v]. *) return FunctionOfCosQ(Sin(v)*lst[1], v, x) lst = FindTrigFactor(tan, cot, u, v, True) if ListQ(lst): # (* Basis: If m integer and n odd, Tan[m*v]^n == Sin[v]*u where u is a function of Cos[v]. *) return FunctionOfCosQ(Sin(v)*lst[1], v, x) return all(FunctionOfCosQ(i, v, x) for i in u.args) return all(FunctionOfCosQ(i, v, x) for i in u.args) def FunctionOfSinQ(u, v, x): # If u is a function of Sin[v], FunctionOfSinQ[u,v,x] returns True; else it returns False. if AtomQ(u): return u != x elif CalculusQ(u): return False elif TrigQ(u) and IntegerQuotientQ(u.args[0], v): if OddQuotientQ(u.args[0], v): # Basis: If m odd, Sin[m*v]^n is a function of Sin[v]. return SinQ(u) or CscQ(u) # Basis: If m even, Cos[m*v]^n is a function of Sin[v]. return CosQ(u) or SecQ(u) elif IntegerPowerQ(u): if TrigQ(u.base) and IntegerQuotientQ(u.base.args[0], v): if EvenQ(u.exp): # Basis: If m integer and n even, Hyper[m*v]^n is a function of Sin[v]. return True return FunctionOfSinQ(u.base, v, x) elif ProductQ(u): if CosQ(u.args[0]) and SinQ(u.args[1]) and ZeroQ(u.args[0].args[0] - v/2) and ZeroQ(u.args[1].args[0] - v/2): return FunctionOfSinQ(Drop(u, 2), v, x) lst = FindTrigFactor(sin, csch, u, v, False) if ListQ(lst) and EvenQuotientQ(lst[0], v): # Basis: If m even and n odd, Sin[m*v]^n == Cos[v]*u where u is a function of Sin[v]. return FunctionOfSinQ(Cos(v)*lst[1], v, x) lst = FindTrigFactor(cos, sec, u, v, False) if ListQ(lst) and OddQuotientQ(lst[0], v): # Basis: If m odd and n odd, Cos[m*v]^n == Cos[v]*u where u is a function of Sin[v]. return FunctionOfSinQ(Cos(v)*lst[1], v, x) lst = FindTrigFactor(tan, cot, u, v, True) if ListQ(lst): # Basis: If m integer and n odd, Tan[m*v]^n == Cos[v]*u where u is a function of Sin[v]. return FunctionOfSinQ(Cos(v)*lst[1], v, x) return all(FunctionOfSinQ(i, v, x) for i in u.args) return all(FunctionOfSinQ(i, v, x) for i in u.args) def OddTrigPowerQ(u, v, x): if SinQ(u) or CosQ(u) or SecQ(u) or CscQ(u): return OddQuotientQ(u.args[0], v) if PowerQ(u): return OddQ(u.exp) and OddTrigPowerQ(u.base, v, x) if ProductQ(u): if not FreeFactors(u, x) == 1: return OddTrigPowerQ(NonfreeFactors(u, x), v, x) lst = [] for i in u.args: if Not(FunctionOfTanQ(i, v, x)): lst.append(i) if lst == []: return True return Length(lst)==1 and OddTrigPowerQ(lst[0], v, x) if SumQ(u): return all(OddTrigPowerQ(i, v, x) for i in u.args) return False def FunctionOfTanQ(u, v, x): # If u is a function of the form f[Tan[v],Cot[v]] where f is independent of x, # FunctionOfTanQ[u,v,x] returns True; else it returns False. if AtomQ(u): return u != x elif CalculusQ(u): return False elif TrigQ(u) and IntegerQuotientQ(u.args[0], v): return TanQ(u) or CotQ(u) or EvenQuotientQ(u.args[0], v) elif PowerQ(u): if EvenQ(u.exp) and TrigQ(u.base) and IntegerQuotientQ(u.base.args[0], v): return True elif EvenQ(u.exp) and SumQ(u.base): return FunctionOfTanQ(Expand(u.base**2, v, x)) if ProductQ(u): lst = [] for i in u.args: if Not(FunctionOfTanQ(i, v, x)): lst.append(i) if lst == []: return True return Length(lst)==2 and OddTrigPowerQ(lst[0], v, x) and OddTrigPowerQ(lst[1], v, x) return all(FunctionOfTanQ(i, v, x) for i in u.args) def FunctionOfTanWeight(u, v, x): # (* u is a function of the form f[Tan[v],Cot[v]] where f is independent of x. # FunctionOfTanWeight[u,v,x] returns a nonnegative number if u is best considered a function # of Tan[v]; else it returns a negative number. *) if AtomQ(u): return S(0) elif CalculusQ(u): return S(0) elif TrigQ(u) and IntegerQuotientQ(u.args[0], v): if TanQ(u) and ZeroQ(u.args[0] - v): return S(1) elif CotQ(u) and ZeroQ(u.args[0] - v): return S(-1) return S(0) elif PowerQ(u): if EvenQ(u.exp) and TrigQ(u.base) and IntegerQuotientQ(u.base.args[0], v): if TanQ(u.base) or CosQ(u.base) or SecQ(u.base): return S(1) return S(-1) if ProductQ(u): if all(FunctionOfTanQ(i, v, x) for i in u.args): return Add(*[FunctionOfTanWeight(i, v, x) for i in u.args]) return S(0) return Add(*[FunctionOfTanWeight(i, v, x) for i in u.args]) def FunctionOfTrigQ(u, v, x): # If u (x) is equivalent to a function of the form f (Sin[v],Cos[v],Tan[v],Cot[v],Sec[v],Csc[v]) where f is independent of x, FunctionOfTrigQ[u,v,x] returns True; else it returns False. if AtomQ(u): return u != x elif CalculusQ(u): return False elif TrigQ(u) and IntegerQuotientQ(u.args[0], v): return True return all(FunctionOfTrigQ(i, v, x) for i in u.args) def FunctionOfDensePolynomialsQ(u, x): # If all occurrences of x in u (x) are in dense polynomials, FunctionOfDensePolynomialsQ[u,x] returns True; else it returns False. if FreeQ(u, x): return True if PolynomialQ(u, x): return Length(ExponentList(u, x)) > 1 return all(FunctionOfDensePolynomialsQ(i, x) for i in u.args) def FunctionOfLog(u, *args): # If u (x) is equivalent to an expression of the form f (Log[a*x^n]), FunctionOfLog[u,x] returns # the list {f (x),a*x^n,n}; else it returns False. if len(args) == 1: x = args[0] lst = FunctionOfLog(u, False, False, x) if AtomQ(lst) or FalseQ(lst[1]) or not isinstance(x, Symbol): return False else: return lst else: v = args[0] n = args[1] x = args[2] if AtomQ(u): if u==x: return False else: return [u, v, n] if CalculusQ(u): return False lst = BinomialParts(u.args[0], x) if LogQ(u) and ListQ(lst) and ZeroQ(lst[0]): if FalseQ(v) or u.args[0] == v: return [x, u.args[0], lst[2]] else: return False lst = [0, v, n] l = [] for i in u.args: lst = FunctionOfLog(i, lst[1], lst[2], x) if AtomQ(lst): return False else: l.append(lst[0]) return [u.func(*l), lst[1], lst[2]] def PowerVariableExpn(u, m, x): # If m is an integer, u is an expression of the form f((c*x)**n) and g=GCD(m,n)>1, # PowerVariableExpn(u,m,x) returns the list {x**(m/g)*f((c*x)**(n/g)),g,c}; else it returns False. if IntegerQ(m): lst = PowerVariableDegree(u, m, 1, x) if not lst: return False else: return [x**(m/lst[0])*PowerVariableSubst(u, lst[0], x), lst[0], lst[1]] else: return False def PowerVariableDegree(u, m, c, x): if FreeQ(u, x): return [m, c] if AtomQ(u) or CalculusQ(u): return False if PowerQ(u): if FreeQ(u.base/x, x): if ZeroQ(m) or m == u.exp and c == u.base/x: return [u.exp, u.base/x] if IntegerQ(u.exp) and IntegerQ(m) and GCD(m, u.exp)>1 and c==u.base/x: return [GCD(m, u.exp), c] else: return False lst = [m, c] for i in u.args: if PowerVariableDegree(i, lst[0], lst[1], x) == False: return False lst1 = PowerVariableDegree(i, lst[0], lst[1], x) if not lst1: return False else: return lst1 def PowerVariableSubst(u, m, x): if FreeQ(u, x) or AtomQ(u) or CalculusQ(u): return u if PowerQ(u): if FreeQ(u.base/x, x): return x**(u.exp/m) if ProductQ(u): l = 1 for i in u.args: l *= (PowerVariableSubst(i, m, x)) return l if SumQ(u): l = 0 for i in u.args: l += (PowerVariableSubst(i, m, x)) return l return u def EulerIntegrandQ(expr, x): a = Wild('a', exclude=[x]) b = Wild('b', exclude=[x]) n = Wild('n', exclude=[x, 0]) m = Wild('m', exclude=[x, 0]) p = Wild('p', exclude=[x, 0]) u = Wild('u') v = Wild('v') # Pattern 1 M = expr.match((a*x + b*u**n)**p) if M: if len(M) == 5 and FreeQ([M[a], M[b]], x) and IntegerQ(M[n] + 1/2) and QuadraticQ(M[u], x) and Not(RationalQ(M[p])) or NegativeIntegerQ(M[p]) and Not(BinomialQ(M[u], x)): return True # Pattern 2 M = expr.match(v**m*(a*x + b*u**n)**p) if M: if len(M) == 6 and FreeQ([M[a], M[b]], x) and ZeroQ(M[u] - M[v]) and IntegersQ(2*M[m], M[n] + 1/2) and QuadraticQ(M[u], x) and Not(RationalQ(M[p])) or NegativeIntegerQ(M[p]) and Not(BinomialQ(M[u], x)): return True # Pattern 3 M = expr.match(u**n*v**p) if M: if len(M) == 3 and NegativeIntegerQ(M[p]) and IntegerQ(M[n] + 1/2) and QuadraticQ(M[u], x) and QuadraticQ(M[v], x) and Not(BinomialQ(M[v], x)): return True else: return False def FunctionOfSquareRootOfQuadratic(u, *args): if len(args) == 1: x = args[0] pattern = Pattern(UtilityOperator(x_**WC('m', 1)*(a_ + x**WC('n', 1)*WC('b', 1))**p_, x), CustomConstraint(lambda a, b, m, n, p, x: FreeQ([a, b, m, n, p], x))) M = is_match(UtilityOperator(u, args[0]), pattern) if M: return False tmp = FunctionOfSquareRootOfQuadratic(u, False, x) if AtomQ(tmp) or FalseQ(tmp[0]): return False tmp = tmp[0] a = Coefficient(tmp, x, 0) b = Coefficient(tmp, x, 1) c = Coefficient(tmp, x, 2) if ZeroQ(a) and ZeroQ(b) or ZeroQ(b**2-4*a*c): return False if PosQ(c): sqrt = Rt(c, S(2)); q = a*sqrt + b*x + sqrt*x**2 r = b + 2*sqrt*x return [Simplify(SquareRootOfQuadraticSubst(u, q/r, (-a+x**2)/r, x)*q/r**2), Simplify(sqrt*x + Sqrt(tmp)), 2] if PosQ(a): sqrt = Rt(a, S(2)) q = c*sqrt - b*x + sqrt*x**2 r = c - x**2 return [Simplify(SquareRootOfQuadraticSubst(u, q/r, (-b+2*sqrt*x)/r, x)*q/r**2), Simplify((-sqrt+Sqrt(tmp))/x), 1] sqrt = Rt(b**2 - 4*a*c, S(2)) r = c - x**2 return[Simplify(-sqrt*SquareRootOfQuadraticSubst(u, -sqrt*x/r, -(b*c+c*sqrt+(-b+sqrt)*x**2)/(2*c*r), x)*x/r**2), FullSimplify(2*c*Sqrt(tmp)/(b-sqrt+2*c*x)), 3] else: v = args[0] x = args[1] if AtomQ(u) or FreeQ(u, x): return [v] if PowerQ(u): if FreeQ(u.exp, x): if FractionQ(u.exp) and Denominator(u.exp) == 2 and PolynomialQ(u.base, x) and Exponent(u.base, x) == 2: if FalseQ(v) or u.base == v: return [u.base] else: return False return FunctionOfSquareRootOfQuadratic(u.base, v, x) if ProductQ(u) or SumQ(u): lst = [v] lst1 = [] for i in u.args: if FunctionOfSquareRootOfQuadratic(i, lst[0], x) == False: return False lst1 = FunctionOfSquareRootOfQuadratic(i, lst[0], x) return lst1 else: return False def SquareRootOfQuadraticSubst(u, vv, xx, x): # SquareRootOfQuadraticSubst(u, vv, xx, x) returns u with fractional powers replaced by vv raised to the power and x replaced by xx. if AtomQ(u) or FreeQ(u, x): if u==x: return xx return u if PowerQ(u): if FreeQ(u.exp, x): if FractionQ(u.exp) and Denominator(u.exp)==2 and PolynomialQ(u.base, x) and Exponent(u.base, x)==2: return vv**Numerator(u.exp) return SquareRootOfQuadraticSubst(u.base, vv, xx, x)**u.exp elif SumQ(u): t = 0 for i in u.args: t += SquareRootOfQuadraticSubst(i, vv, xx, x) return t elif ProductQ(u): t = 1 for i in u.args: t *= SquareRootOfQuadraticSubst(i, vv, xx, x) return t def Divides(y, u, x): # If u divided by y is free of x, Divides[y,u,x] returns the quotient; else it returns False. v = Simplify(u/y) if FreeQ(v, x): return v else: return False def DerivativeDivides(y, u, x): """ If y not equal to x, y is easy to differentiate wrt x, and u divided by the derivative of y is free of x, DerivativeDivides[y,u,x] returns the quotient; else it returns False. """ from matchpy import is_match pattern0 = Pattern(Mul(a , b_), CustomConstraint(lambda a, b : FreeQ(a, b))) def f1(y, u, x): if PolynomialQ(y, x): return PolynomialQ(u, x) and Exponent(u, x) == Exponent(y, x) - 1 else: return EasyDQ(y, x) if is_match(y, pattern0): return False elif f1(y, u, x): v = D(y ,x) if EqQ(v, 0): return False else: v = Simplify(u/v) if FreeQ(v, x): return v else: return False else: return False def EasyDQ(expr, x): # If u is easy to differentiate wrt x, EasyDQ(u, x) returns True; else it returns False *) u = Wild('u',exclude=[1]) m = Wild('m',exclude=[x, 0]) M = expr.match(u*x**m) if M: return EasyDQ(M[u], x) if AtomQ(expr) or FreeQ(expr, x) or Length(expr)==0: return True elif CalculusQ(expr): return False elif Length(expr)==1: return EasyDQ(expr.args[0], x) elif BinomialQ(expr, x) or ProductOfLinearPowersQ(expr, x): return True elif RationalFunctionQ(expr, x) and RationalFunctionExponents(expr, x)==[1, 1]: return True elif ProductQ(expr): if FreeQ(First(expr), x): return EasyDQ(Rest(expr), x) elif FreeQ(Rest(expr), x): return EasyDQ(First(expr), x) else: return False elif SumQ(expr): return EasyDQ(First(expr), x) and EasyDQ(Rest(expr), x) elif Length(expr)==2: if FreeQ(expr.args[0], x): EasyDQ(expr.args[1], x) elif FreeQ(expr.args[1], x): return EasyDQ(expr.args[0], x) else: return False return False def ProductOfLinearPowersQ(u, x): # ProductOfLinearPowersQ(u, x) returns True iff u is a product of factors of the form v^n where v is linear in x v = Wild('v') n = Wild('n', exclude=[x]) M = u.match(v**n) return FreeQ(u, x) or M and LinearQ(M[v], x) or ProductQ(u) and ProductOfLinearPowersQ(First(u), x) and ProductOfLinearPowersQ(Rest(u), x) def Rt(u, n): return RtAux(TogetherSimplify(u), n) def NthRoot(u, n): return nsimplify(u**(S(1)/n)) def AtomBaseQ(u): # If u is an atom or an atom raised to an odd degree, AtomBaseQ(u) returns True; else it returns False return AtomQ(u) or PowerQ(u) and OddQ(u.args[1]) and AtomBaseQ(u.args[0]) def SumBaseQ(u): # If u is a sum or a sum raised to an odd degree, SumBaseQ(u) returns True; else it returns False return SumQ(u) or PowerQ(u) and OddQ(u.args[1]) and SumBaseQ(u.args[0]) def NegSumBaseQ(u): # If u is a sum or a sum raised to an odd degree whose lead term has a negative form, NegSumBaseQ(u) returns True; else it returns False return SumQ(u) and NegQ(First(u)) or PowerQ(u) and OddQ(u.args[1]) and NegSumBaseQ(u.args[0]) def AllNegTermQ(u): # If all terms of u have a negative form, AllNegTermQ(u) returns True; else it returns False if PowerQ(u): if OddQ(u.exp): return AllNegTermQ(u.base) if SumQ(u): return NegQ(First(u)) and AllNegTermQ(Rest(u)) return NegQ(u) def SomeNegTermQ(u): # If some term of u has a negative form, SomeNegTermQ(u) returns True; else it returns False if PowerQ(u): if OddQ(u.exp): return SomeNegTermQ(u.base) if SumQ(u): return NegQ(First(u)) or SomeNegTermQ(Rest(u)) return NegQ(u) def TrigSquareQ(u): # If u is an expression of the form Sin(z)^2 or Cos(z)^2, TrigSquareQ(u) returns True, else it returns False return PowerQ(u) and EqQ(u.args[1], 2) and MemberQ([sin, cos], Head(u.args[0])) def RtAux(u, n): if PowerQ(u): return u.base**(u.exp/n) if ComplexNumberQ(u): a = Re(u) b = Im(u) if Not(IntegerQ(a) and IntegerQ(b)) and IntegerQ(a/(a**2 + b**2)) and IntegerQ(b/(a**2 + b**2)): # Basis: a+b*I==1/(a/(a^2+b^2)-b/(a^2+b^2)*I) return S(1)/RtAux(a/(a**2 + b**2) - b/(a**2 + b**2)*I, n) else: return NthRoot(u, n) if ProductQ(u): lst = SplitProduct(PositiveQ, u) if ListQ(lst): return RtAux(lst[0], n)*RtAux(lst[1], n) lst = SplitProduct(NegativeQ, u) if ListQ(lst): if EqQ(lst[0], -1): v = lst[1] if PowerQ(v): if NegativeQ(v.exp): return 1/RtAux(-v.base**(-v.exp), n) if ProductQ(v): if ListQ(SplitProduct(SumBaseQ, v)): lst = SplitProduct(AllNegTermQ, v) if ListQ(lst): return RtAux(-lst[0], n)*RtAux(lst[1], n) lst = SplitProduct(NegSumBaseQ, v) if ListQ(lst): return RtAux(-lst[0], n)*RtAux(lst[1], n) lst = SplitProduct(SomeNegTermQ, v) if ListQ(lst): return RtAux(-lst[0], n)*RtAux(lst[1], n) lst = SplitProduct(SumBaseQ, v) return RtAux(-lst[0], n)*RtAux(lst[1], n) lst = SplitProduct(AtomBaseQ, v) if ListQ(lst): return RtAux(-lst[0], n)*RtAux(lst[1], n) else: return RtAux(-First(v), n)*RtAux(Rest(v), n) if OddQ(n): return -RtAux(v, n) else: return NthRoot(u, n) else: return RtAux(-lst[0], n)*RtAux(-lst[1], n) lst = SplitProduct(AllNegTermQ, u) if ListQ(lst) and ListQ(SplitProduct(SumBaseQ, lst[1])): return RtAux(-lst[0], n)*RtAux(-lst[1], n) lst = SplitProduct(NegSumBaseQ, u) if ListQ(lst) and ListQ(SplitProduct(NegSumBaseQ, lst[1])): return RtAux(-lst[0], n)*RtAux(-lst[1], n) return u.func(*[RtAux(i, n) for i in u.args]) v = TrigSquare(u) if Not(AtomQ(v)): return RtAux(v, n) if OddQ(n) and NegativeQ(u): return -RtAux(-u, n) if OddQ(n) and NegQ(u) and PosQ(-u): return -RtAux(-u, n) else: return NthRoot(u, n) def TrigSquare(u): # If u is an expression of the form a-a*Sin(z)^2 or a-a*Cos(z)^2, TrigSquare(u) returns Cos(z)^2 or Sin(z)^2 respectively, # else it returns False. if SumQ(u): for i in u.args: v = SplitProduct(TrigSquareQ, i) if v == False or SplitSum(v, u) == False: return False lst = SplitSum(SplitProduct(TrigSquareQ, i)) if lst and ZeroQ(lst[1][2] + lst[1]): if Head(lst[0][0].args[0]) == sin: return lst[1]*cos(lst[1][1][1][1])**2 return lst[1]*sin(lst[1][1][1][1])**2 else: return False else: return False def IntSum(u, x): # If u is free of x or of the form c*(a+b*x)^m, IntSum[u,x] returns the antiderivative of u wrt x; # else it returns d*Int[v,x] where d*v=u and d is free of x. return Add(*[Integral(i, x) for i in u.args]) def IntTerm(expr, x): # If u is of the form c*(a+b*x)**m, IntTerm(u,x) returns the antiderivative of u wrt x; # else it returns d*Int(v,x) where d*v=u and d is free of x. c = Wild('c', exclude=[x]) m = Wild('m', exclude=[x, 0]) v = Wild('v') M = expr.match(c/v) if M and len(M) == 2 and FreeQ(M[c], x) and LinearQ(M[v], x): return Simp(M[c]*Log(RemoveContent(M[v], x))/Coefficient(M[v], x, 1), x) M = expr.match(c*v**m) if M and len(M) == 3 and NonzeroQ(M[m] + 1) and LinearQ(M[v], x): return Simp(M[c]*M[v]**(M[m] + 1)/(Coefficient(M[v], x, 1)*(M[m] + 1)), x) if SumQ(expr): t = 0 for i in expr.args: t += IntTerm(i, x) return t else: u = expr return Dist(FreeFactors(u,x), Integral(NonfreeFactors(u, x), x), x) def Map2(f, lst1, lst2): result = [] for i in range(0, len(lst1)): result.append(f(lst1[i], lst2[i])) return result def ConstantFactor(u, x): # (* ConstantFactor[u,x] returns a 2-element list of the factors of u[x] free of x and the # factors not free of u[x]. Common constant factors of the terms of sums are also collected. *) if FreeQ(u, x): return [u, S(1)] elif AtomQ(u): return [S(1), u] elif PowerQ(u): if FreeQ(u.exp, x): lst = ConstantFactor(u.base, x) if IntegerQ(u.exp): return [lst[0]**u.exp, lst[1]**u.exp] tmp = PositiveFactors(lst[0]) if tmp == 1: return [S(1), u] return [tmp**u.exp, (NonpositiveFactors(lst[0])*lst[1])**u.exp] elif ProductQ(u): lst = [ConstantFactor(i, x) for i in u.args] return [Mul(*[First(i) for i in lst]), Mul(*[i[1] for i in lst])] elif SumQ(u): lst1 = [ConstantFactor(i, x) for i in u.args] if SameQ(*[i[1] for i in lst1]): return [Add(*[i[0] for i in lst]), lst1[0][1]] lst2 = CommonFactors([First(i) for i in lst1]) return [First(lst2), Add(*Map2(Mul, Rest(lst2), [i[1] for i in lst1]))] return [S(1), u] def SameQ(*args): for i in range(0, len(args) - 1): if args[i] != args[i+1]: return False return True def ReplacePart(lst, a, b): lst[b] = a return lst def CommonFactors(lst): # (* If lst is a list of n terms, CommonFactors[lst] returns a n+1-element list whose first # element is the product of the factors common to all terms of lst, and whose remaining # elements are quotients of each term divided by the common factor. *) lst1 = [NonabsurdNumberFactors(i) for i in lst] lst2 = [AbsurdNumberFactors(i) for i in lst] num = AbsurdNumberGCD(*lst2) common = num lst2 = [i/num for i in lst2] while (True): lst3 = [LeadFactor(i) for i in lst1] if SameQ(*lst3): common = common*lst3[0] lst1 = [RemainingFactors(i) for i in lst1] elif (all((LogQ(i) and IntegerQ(First(i)) and First(i) > 0) for i in lst3) and all(RationalQ(i) for i in [FullSimplify(j/First(lst3)) for j in lst3])): lst4 = [FullSimplify(j/First(lst3)) for j in lst3] num = GCD(*lst4) common = common*Log((First(lst3)[0])**num) lst2 = [lst2[i]*lst4[i]/num for i in range(0, len(lst2))] lst1 = [RemainingFactors(i) for i in lst1] lst4 = [LeadDegree(i) for i in lst1] if SameQ(*[LeadBase(i) for i in lst1]) and RationalQ(*lst4): num = Smallest(lst4) base = LeadBase(lst1[0]) if num != 0: common = common*base**num lst2 = [lst2[i]*base**(lst4[i] - num) for i in range(0, len(lst2))] lst1 = [RemainingFactors(i) for i in lst1] elif (Length(lst1) == 2 and ZeroQ(LeadBase(lst1[0]) + LeadBase(lst1[1])) and NonzeroQ(lst1[0] - 1) and IntegerQ(lst4[0]) and FractionQ(lst4[1])): num = Min(lst4) base = LeadBase(lst1[1]) if num != 0: common = common*base**num lst2 = [lst2[0]*(-1)**lst4[0], lst2[1]] lst2 = [lst2[i]*base**(lst4[i] - num) for i in range(0, len(lst2))] lst1 = [RemainingFactors(i) for i in lst1] elif (Length(lst1) == 2 and ZeroQ(lst1[0] + LeadBase(lst1[1])) and NonzeroQ(lst1[1] - 1) and IntegerQ(lst1[1]) and FractionQ(lst4[0])): num = Min(lst4) base = LeadBase(lst1[0]) if num != 0: common = common*base**num lst2 = [lst2[0], lst2[1]*(-1)**lst4[1]] lst2 = [lst2[i]*base**(lst4[i] - num) for i in range(0, len(lst2))] lst1 = [RemainingFactors(i) for i in lst1] else: num = MostMainFactorPosition(lst3) lst2 = ReplacePart(lst2, lst3[num]*lst2[num], num) lst1 = ReplacePart(lst1, RemainingFactors(lst1[num]), num) if all(i==1 for i in lst1): return Prepend(lst2, common) def MostMainFactorPosition(lst): factor = S(1) num = 0 for i in range(0, Length(lst)): if FactorOrder(lst[i], factor) > 0: factor = lst[i] num = i return num SbaseS, SexponS = None, None SexponFlagS = False def FunctionOfExponentialQ(u, x): # (* FunctionOfExponentialQ[u,x] returns True iff u is a function of F^v where F is a constant and v is linear in x, *) # (* and such an exponential explicitly occurs in u (i.e. not just implicitly in hyperbolic functions). *) global SbaseS, SexponS, SexponFlagS SbaseS, SexponS = None, None SexponFlagS = False res = FunctionOfExponentialTest(u, x) return res and SexponFlagS def FunctionOfExponential(u, x): global SbaseS, SexponS, SexponFlagS # (* u is a function of F^v where v is linear in x. FunctionOfExponential[u,x] returns F^v. *) SbaseS, SexponS = None, None SexponFlagS = False FunctionOfExponentialTest(u, x) return SbaseS**SexponS def FunctionOfExponentialFunction(u, x): global SbaseS, SexponS, SexponFlagS # (* u is a function of F^v where v is linear in x. FunctionOfExponentialFunction[u,x] returns u with F^v replaced by x. *) SbaseS, SexponS = None, None SexponFlagS = False FunctionOfExponentialTest(u, x) return SimplifyIntegrand(FunctionOfExponentialFunctionAux(u, x), x) def FunctionOfExponentialFunctionAux(u, x): # (* u is a function of F^v where v is linear in x, and the fluid variables $base$=F and $expon$=v. *) # (* FunctionOfExponentialFunctionAux[u,x] returns u with F^v replaced by x. *) global SbaseS, SexponS, SexponFlagS if AtomQ(u): return u elif PowerQ(u): if FreeQ(u.base, x) and LinearQ(u.exp, x): if ZeroQ(Coefficient(SexponS, x, 0)): return u.base**Coefficient(u.exp, x, 0)*x**FullSimplify(Log(u.base)*Coefficient(u.exp, x, 1)/(Log(SbaseS)*Coefficient(SexponS, x, 1))) return x**FullSimplify(Log(u.base)*Coefficient(u.exp, x, 1)/(Log(SbaseS)*Coefficient(SexponS, x, 1))) elif HyperbolicQ(u) and LinearQ(u.args[0], x): tmp = x**FullSimplify(Coefficient(u.args[0], x, 1)/(Log(SbaseS)*Coefficient(SexponS, x, 1))) if SinhQ(u): return tmp/2 - 1/(2*tmp) elif CoshQ(u): return tmp/2 + 1/(2*tmp) elif TanhQ(u): return (tmp - 1/tmp)/(tmp + 1/tmp) elif CothQ(u): return (tmp + 1/tmp)/(tmp - 1/tmp) elif SechQ(u): return 2/(tmp + 1/tmp) return 2/(tmp - 1/tmp) if PowerQ(u): if FreeQ(u.base, x) and SumQ(u.exp): return FunctionOfExponentialFunctionAux(u.base**First(u.exp), x)*FunctionOfExponentialFunctionAux(u.base**Rest(u.exp), x) return u.func(*[FunctionOfExponentialFunctionAux(i, x) for i in u.args]) def FunctionOfExponentialTest(u, x): # (* FunctionOfExponentialTest[u,x] returns True iff u is a function of F^v where F is a constant and v is linear in x. *) # (* Before it is called, the fluid variables $base$ and $expon$ should be set to Null and $exponFlag$ to False. *) # (* If u is a function of F^v, $base$ and $expon$ are set to F and v, respectively. *) # (* If an explicit exponential occurs in u, $exponFlag$ is set to True. *) global SbaseS, SexponS, SexponFlagS if FreeQ(u, x): return True elif u == x or CalculusQ(u): return False elif PowerQ(u): if FreeQ(u.base, x) and LinearQ(u.exp, x): SexponFlagS = True return FunctionOfExponentialTestAux(u.base, u.exp, x) elif HyperbolicQ(u) and LinearQ(u.args[0], x): return FunctionOfExponentialTestAux(E, u.args[0], x) if PowerQ(u): if FreeQ(u.base, x) and SumQ(u.exp): return FunctionOfExponentialTest(u.base**First(u.exp), x) and FunctionOfExponentialTest(u.base**Rest(u.exp), x) return all(FunctionOfExponentialTest(i, x) for i in u.args) def FunctionOfExponentialTestAux(base, expon, x): global SbaseS, SexponS, SexponFlagS if SbaseS is None: SbaseS = base SexponS = expon return True tmp = FullSimplify(Log(base)*Coefficient(expon, x, 1)/(Log(SbaseS)*Coefficient(SexponS, x, 1))) if Not(RationalQ(tmp)): return False elif ZeroQ(Coefficient(SexponS, x, 0)) or NonzeroQ(tmp - FullSimplify(Log(base)*Coefficient(expon, x, 0)/(Log(SbaseS)*Coefficient(SexponS, x, 0)))): if PositiveIntegerQ(base, SbaseS) and base < SbaseS: SbaseS = base SexponS = expon tmp = 1/tmp SexponS = Coefficient(SexponS, x, 1)*x/Denominator(tmp) if tmp < 0 and NegQ(Coefficient(SexponS, x, 1)): SexponS = -SexponS return True SexponS = SexponS/Denominator(tmp) if tmp < 0 and NegQ(Coefficient(SexponS, x, 1)): SexponS = -SexponS return True def stdev(lst): """Calculates the standard deviation for a list of numbers.""" num_items = len(lst) mean = sum(lst) / num_items differences = [x - mean for x in lst] sq_differences = [d ** 2 for d in differences] ssd = sum(sq_differences) variance = ssd / num_items sd = sqrt(variance) return sd def rubi_test(expr, x, optimal_output, expand=False, _hyper_check=False, _diff=False, _numerical=False): #Returns True if (expr - optimal_output) is equal to 0 or a constant #expr: integrated expression #x: integration variable #expand=True equates `expr` with `optimal_output` in expanded form #_hyper_check=True evaluates numerically #_diff=True differentiates the expressions before equating #_numerical=True equates the expressions at random `x`. Normally used for large expressions. from sympy.simplify.simplify import nsimplify if not expr.has(csc, sec, cot, csch, sech, coth): optimal_output = process_trig(optimal_output) if expr == optimal_output: return True if simplify(expr) == simplify(optimal_output): return True if nsimplify(expr) == nsimplify(optimal_output): return True if expr.has(sym_exp): expr = powsimp(powdenest(expr), force=True) if simplify(expr) == simplify(powsimp(optimal_output, force=True)): return True res = expr - optimal_output if _numerical: args = res.free_symbols rand_val = [] try: for i in range(0, 5): # check at 5 random points rand_x = randint(1, 40) substitutions = {s: rand_x for s in args} rand_val.append(float(abs(res.subs(substitutions).n()))) if stdev(rand_val) < Pow(10, -3): return True except: pass # return False dres = res.diff(x) if _numerical: args = dres.free_symbols rand_val = [] try: for i in range(0, 5): # check at 5 random points rand_x = randint(1, 40) substitutions = {s: rand_x for s in args} rand_val.append(float(abs(dres.subs(substitutions).n()))) if stdev(rand_val) < Pow(10, -3): return True # return False except: pass # return False r = Simplify(nsimplify(res)) if r == 0 or (not r.has(x)): return True if _diff: if dres == 0: return True elif Simplify(dres) == 0: return True if expand: # expands the expression and equates e = res.expand() if Simplify(e) == 0 or (not e.has(x)): return True return False def If(cond, t, f): # returns t if condition is true else f if cond: return t return f def IntQuadraticQ(a, b, c, d, e, m, p, x): # (* IntQuadraticQ[a,b,c,d,e,m,p,x] returns True iff (d+e*x)^m*(a+b*x+c*x^2)^p is integrable wrt x in terms of non-Appell functions. *) return IntegerQ(p) or PositiveIntegerQ(m) or IntegersQ(2*m, 2*p) or IntegersQ(m, 4*p) or IntegersQ(m, p + S(1)/3) and (ZeroQ(c**2*d**2 - b*c*d*e + b**2*e**2 - 3*a*c*e**2) or ZeroQ(c**2*d**2 - b*c*d*e - 2*b**2*e**2 + 9*a*c*e**2)) def IntBinomialQ(*args): #(* IntBinomialQ(a,b,c,n,m,p,x) returns True iff (c*x)^m*(a+b*x^n)^p is integrable wrt x in terms of non-hypergeometric functions. *) if len(args) == 8: a, b, c, d, n, p, q, x = args return IntegersQ(p,q) or PositiveIntegerQ(p) or PositiveIntegerQ(q) or (ZeroQ(n-2) or ZeroQ(n-4)) and (IntegersQ(p,4*q) or IntegersQ(4*p,q)) or ZeroQ(n-2) and (IntegersQ(2*p,2*q) or IntegersQ(3*p,q) and ZeroQ(b*c+3*a*d) or IntegersQ(p,3*q) and ZeroQ(3*b*c+a*d)) elif len(args) == 7: a, b, c, n, m, p, x = args return IntegerQ(2*p) or IntegerQ((m+1)/n + p) or (ZeroQ(n - 2) or ZeroQ(n - 4)) and IntegersQ(2*m, 4*p) or ZeroQ(n - 2) and IntegerQ(6*p) and (IntegerQ(m) or IntegerQ(m - p)) elif len(args) == 10: a, b, c, d, e, m, n, p, q, x = args return IntegersQ(p,q) or PositiveIntegerQ(p) or PositiveIntegerQ(q) or ZeroQ(n-2) and IntegerQ(m) and IntegersQ(2*p,2*q) or ZeroQ(n-4) and (IntegersQ(m,p,2*q) or IntegersQ(m,2*p,q)) def RectifyTangent(*args): # (* RectifyTangent(u,a,b,r,x) returns an expression whose derivative equals the derivative of r*ArcTan(a+b*Tan(u)) wrt x. *) if len(args) == 5: u, a, b, r, x = args t1 = Together(a) t2 = Together(b) if (PureComplexNumberQ(t1) or (ProductQ(t1) and any(PureComplexNumberQ(i) for i in t1.args))) and (PureComplexNumberQ(t2) or ProductQ(t2) and any(PureComplexNumberQ(i) for i in t2.args)): c = a/I d = b/I if NegativeQ(d): return RectifyTangent(u, -a, -b, -r, x) e = SmartDenominator(Together(c + d*x)) c = c*e d = d*e if EvenQ(Denominator(NumericFactor(Together(u)))): return I*r*Log(RemoveContent(Simplify((c+e)**2+d**2)+Simplify((c+e)**2-d**2)*Cos(2*u)+Simplify(2*(c+e)*d)*Sin(2*u),x))/4 - I*r*Log(RemoveContent(Simplify((c-e)**2+d**2)+Simplify((c-e)**2-d**2)*Cos(2*u)+Simplify(2*(c-e)*d)*Sin(2*u),x))/4 return I*r*Log(RemoveContent(Simplify((c+e)**2)+Simplify(2*(c+e)*d)*Cos(u)*Sin(u)-Simplify((c+e)**2-d**2)*Sin(u)**2,x))/4 - I*r*Log(RemoveContent(Simplify((c-e)**2)+Simplify(2*(c-e)*d)*Cos(u)*Sin(u)-Simplify((c-e)**2-d**2)*Sin(u)**2,x))/4 elif NegativeQ(b): return RectifyTangent(u, -a, -b, -r, x) elif EvenQ(Denominator(NumericFactor(Together(u)))): return r*SimplifyAntiderivative(u,x) + r*ArcTan(Simplify((2*a*b*Cos(2*u)-(1+a**2-b**2)*Sin(2*u))/(a**2+(1+b)**2+(1+a**2-b**2)*Cos(2*u)+2*a*b*Sin(2*u)))) return r*SimplifyAntiderivative(u,x) - r*ArcTan(ActivateTrig(Simplify((a*b-2*a*b*cos(u)**2+(1+a**2-b**2)*cos(u)*sin(u))/(b*(1+b)+(1+a**2-b**2)*cos(u)**2+2*a*b*cos(u)*sin(u))))) u, a, b, x = args t = Together(a) if PureComplexNumberQ(t) or (ProductQ(t) and any(PureComplexNumberQ(i) for i in t.args)): c = a/I if NegativeQ(c): return RectifyTangent(u, -a, -b, x) if ZeroQ(c - 1): if EvenQ(Denominator(NumericFactor(Together(u)))): return I*b*ArcTanh(Sin(2*u))/2 return I*b*ArcTanh(2*cos(u)*sin(u))/2 e = SmartDenominator(c) c = c*e return I*b*Log(RemoveContent(e*Cos(u)+c*Sin(u),x))/2 - I*b*Log(RemoveContent(e*Cos(u)-c*Sin(u),x))/2 elif NegativeQ(a): return RectifyTangent(u, -a, -b, x) elif ZeroQ(a - 1): return b*SimplifyAntiderivative(u, x) elif EvenQ(Denominator(NumericFactor(Together(u)))): c = Simplify((1 + a)/(1 - a)) numr = SmartNumerator(c) denr = SmartDenominator(c) return b*SimplifyAntiderivative(u,x) - b*ArcTan(NormalizeLeadTermSigns(denr*Sin(2*u)/(numr+denr*Cos(2*u)))), elif PositiveQ(a - 1): c = Simplify(1/(a - 1)) numr = SmartNumerator(c) denr = SmartDenominator(c) return b*SimplifyAntiderivative(u,x) + b*ArcTan(NormalizeLeadTermSigns(denr*Cos(u)*Sin(u)/(numr+denr*Sin(u)**2))), c = Simplify(a/(1 - a)) numr = SmartNumerator(c) denr = SmartDenominator(c) return b*SimplifyAntiderivative(u,x) - b*ArcTan(NormalizeLeadTermSigns(denr*Cos(u)*Sin(u)/(numr+denr*Cos(u)**2))) def RectifyCotangent(*args): #(* RectifyCotangent[u,a,b,r,x] returns an expression whose derivative equals the derivative of r*ArcTan[a+b*Cot[u]] wrt x. *) if len(args) == 5: u, a, b, r, x = args t1 = Together(a) t2 = Together(b) if (PureComplexNumberQ(t1) or (ProductQ(t1) and any(PureComplexNumberQ(i) for i in t1.args))) and (PureComplexNumberQ(t2) or ProductQ(t2) and any(PureComplexNumberQ(i) for i in t2.args)): c = a/I d = b/I if NegativeQ(d): return RectifyTangent(u,-a,-b,-r,x) e = SmartDenominator(Together(c + d*x)) c = c*e d = d*e if EvenQ(Denominator(NumericFactor(Together(u)))): return I*r*Log(RemoveContent(Simplify((c+e)**2+d**2)-Simplify((c+e)**2-d**2)*Cos(2*u)+Simplify(2*(c+e)*d)*Sin(2*u),x))/4 - I*r*Log(RemoveContent(Simplify((c-e)**2+d**2)-Simplify((c-e)**2-d**2)*Cos(2*u)+Simplify(2*(c-e)*d)*Sin(2*u),x))/4 return I*r*Log(RemoveContent(Simplify((c+e)**2)-Simplify((c+e)**2-d**2)*Cos(u)**2+Simplify(2*(c+e)*d)*Cos(u)*Sin(u),x))/4 - I*r*Log(RemoveContent(Simplify((c-e)**2)-Simplify((c-e)**2-d**2)*Cos(u)**2+Simplify(2*(c-e)*d)*Cos(u)*Sin(u),x))/4 elif NegativeQ(b): return RectifyCotangent(u,-a,-b,-r,x) elif EvenQ(Denominator(NumericFactor(Together(u)))): return -r*SimplifyAntiderivative(u,x) - r*ArcTan(Simplify((2*a*b*Cos(2*u)+(1+a**2-b**2)*Sin(2*u))/(a**2+(1+b)**2-(1+a**2-b**2)*Cos(2*u)+2*a*b*Sin(2*u)))) return -r*SimplifyAntiderivative(u,x) - r*ArcTan(ActivateTrig(Simplify((a*b-2*a*b*sin(u)**2+(1+a**2-b**2)*cos(u)*sin(u))/(b*(1+b)+(1+a**2-b**2)*sin(u)**2+2*a*b*cos(u)*sin(u))))) u, a, b, x = args t = Together(a) if PureComplexNumberQ(t) or (ProductQ(t) and any(PureComplexNumberQ(i) for i in t.args)): c = a/I if NegativeQ(c): return RectifyCotangent(u,-a,-b,x) elif ZeroQ(c - 1): if EvenQ(Denominator(NumericFactor(Together(u)))): return -I*b*ArcTanh(Sin(2*u))/2 return -I*b*ArcTanh(2*Cos(u)*Sin(u))/2 e = SmartDenominator(c) c = c*e return -I*b*Log(RemoveContent(c*Cos(u)+e*Sin(u),x))/2 + I*b*Log(RemoveContent(c*Cos(u)-e*Sin(u),x))/2 elif NegativeQ(a): return RectifyCotangent(u,-a,-b,x) elif ZeroQ(a-1): return b*SimplifyAntiderivative(u,x) elif EvenQ(Denominator(NumericFactor(Together(u)))): c = Simplify(a - 1) numr = SmartNumerator(c) denr = SmartDenominator(c) return b*SimplifyAntiderivative(u,x) - b*ArcTan(NormalizeLeadTermSigns(denr*Cos(u)*Sin(u)/(numr+denr*Cos(u)**2))) c = Simplify(a/(1-a)) numr = SmartNumerator(c) denr = SmartDenominator(c) return b*SimplifyAntiderivative(u,x) + b*ArcTan(NormalizeLeadTermSigns(denr*Cos(u)*Sin(u)/(numr+denr*Sin(u)**2))) def Inequality(*args): f = args[1::2] e = args[0::2] r = [] for i in range(0, len(f)): r.append(f[i](e[i], e[i + 1])) return all(r) def Condition(r, c): # returns r if c is True if c: return r else: raise NotImplementedError('In Condition()') def Simp(u, x): u = replace_pow_exp(u) return NormalizeSumFactors(SimpHelp(u, x)) def SimpHelp(u, x): if AtomQ(u): return u elif FreeQ(u, x): v = SmartSimplify(u) if LeafCount(v) <= LeafCount(u): return v return u elif ProductQ(u): #m = MatchQ[Rest[u],a_.+n_*Pi+b_.*v_ /; FreeQ[{a,b},x] && Not[FreeQ[v,x]] && EqQ[n^2,1/4]] #if EqQ(First(u), S(1)/2) and m: # if #If[EqQ[First[u],1/2] && MatchQ[Rest[u],a_.+n_*Pi+b_.*v_ /; FreeQ[{a,b},x] && Not[FreeQ[v,x]] && EqQ[n^2,1/4]], # If[MatchQ[Rest[u],n_*Pi+b_.*v_ /; FreeQ[b,x] && Not[FreeQ[v,x]] && EqQ[n^2,1/4]], # Map[Function[1/2*#],Rest[u]], # If[MatchQ[Rest[u],m_*a_.+n_*Pi+p_*b_.*v_ /; FreeQ[{a,b},x] && Not[FreeQ[v,x]] && IntegersQ[m/2,p/2]], # Map[Function[1/2*#],Rest[u]], # u]], v = FreeFactors(u, x) w = NonfreeFactors(u, x) v = NumericFactor(v)*SmartSimplify(NonnumericFactors(v)*x**2)/x**2 if ProductQ(w): w = Mul(*[SimpHelp(i,x) for i in w.args]) else: w = SimpHelp(w, x) w = FactorNumericGcd(w) v = MergeFactors(v, w) if ProductQ(v): return Mul(*[SimpFixFactor(i, x) for i in v.args]) return v elif SumQ(u): Pi = pi a_ = Wild('a', exclude=[x]) b_ = Wild('b', exclude=[x, 0]) n_ = Wild('n', exclude=[x, 0, 0]) pattern = a_ + n_*Pi + b_*x match = u.match(pattern) m = False if match: if EqQ(match[n_]**3, S(1)/16): m = True if m: return u elif PolynomialQ(u, x) and Exponent(u, x) <= 0: return SimpHelp(Coefficient(u, x, 0), x) elif PolynomialQ(u, x) and Exponent(u, x) == 1 and Coefficient(u, x, 0) == 0: return SimpHelp(Coefficient(u, x, 1), x)*x v = 0 w = 0 for i in u.args: if FreeQ(i, x): v = i + v else: w = i + w v = SmartSimplify(v) if SumQ(w): w = Add(*[SimpHelp(i, x) for i in w.args]) else: w = SimpHelp(w, x) return v + w return u.func(*[SimpHelp(i, x) for i in u.args]) def SplitProduct(func, u): #(* If func[v] is True for a factor v of u, SplitProduct[func,u] returns {v, u/v} where v is the first such factor; else it returns False. *) if ProductQ(u): if func(First(u)): return [First(u), Rest(u)] lst = SplitProduct(func, Rest(u)) if AtomQ(lst): return False return [lst[0], First(u)*lst[1]] if func(u): return [u, 1] return False def SplitSum(func, u): # (* If func[v] is nonatomic for a term v of u, SplitSum[func,u] returns {func[v], u-v} where v is the first such term; else it returns False. *) if SumQ(u): if Not(AtomQ(func(First(u)))): return [func(First(u)), Rest(u)] lst = SplitSum(func, Rest(u)) if AtomQ(lst): return False return [lst[0], First(u) + lst[1]] elif Not(AtomQ(func(u))): return [func(u), 0] return False def SubstFor(*args): if len(args) == 4: w, v, u, x = args # u is a function of v. SubstFor(w,v,u,x) returns w times u with v replaced by x. return SimplifyIntegrand(w*SubstFor(v, u, x), x) v, u, x = args # u is a function of v. SubstFor(v, u, x) returns u with v replaced by x. if AtomQ(v): return Subst(u, v, x) elif Not(EqQ(FreeFactors(v, x), 1)): return SubstFor(NonfreeFactors(v, x), u, x/FreeFactors(v, x)) elif SinQ(v): return SubstForTrig(u, x, Sqrt(1 - x**2), v.args[0], x) elif CosQ(v): return SubstForTrig(u, Sqrt(1 - x**2), x, v.args[0], x) elif TanQ(v): return SubstForTrig(u, x/Sqrt(1 + x**2), 1/Sqrt(1 + x**2), v.args[0], x) elif CotQ(v): return SubstForTrig(u, 1/Sqrt(1 + x**2), x/Sqrt(1 + x**2), v.args[0], x) elif SecQ(v): return SubstForTrig(u, 1/Sqrt(1 - x**2), 1/x, v.args[0], x) elif CscQ(v): return SubstForTrig(u, 1/x, 1/Sqrt(1 - x**2), v.args[0], x) elif SinhQ(v): return SubstForHyperbolic(u, x, Sqrt(1 + x**2), v.args[0], x) elif CoshQ(v): return SubstForHyperbolic(u, Sqrt( - 1 + x**2), x, v.args[0], x) elif TanhQ(v): return SubstForHyperbolic(u, x/Sqrt(1 - x**2), 1/Sqrt(1 - x**2), v.args[0], x) elif CothQ(v): return SubstForHyperbolic(u, 1/Sqrt( - 1 + x**2), x/Sqrt( - 1 + x**2), v.args[0], x) elif SechQ(v): return SubstForHyperbolic(u, 1/Sqrt( - 1 + x**2), 1/x, v.args[0], x) elif CschQ(v): return SubstForHyperbolic(u, 1/x, 1/Sqrt(1 + x**2), v.args[0], x) else: return SubstForAux(u, v, x) def SubstForAux(u, v, x): # u is a function of v. SubstForAux(u, v, x) returns u with v replaced by x. if u==v: return x elif AtomQ(u): if PowerQ(v): if FreeQ(v.exp, x) and ZeroQ(u - v.base): return x**Simplify(1/v.exp) return u elif PowerQ(u): if FreeQ(u.exp, x): if ZeroQ(u.base - v): return x**u.exp if PowerQ(v): if FreeQ(v.exp, x) and ZeroQ(u.base - v.base): return x**Simplify(u.exp/v.exp) return SubstForAux(u.base, v, x)**u.exp elif ProductQ(u) and Not(EqQ(FreeFactors(u, x), 1)): return FreeFactors(u, x)*SubstForAux(NonfreeFactors(u, x), v, x) elif ProductQ(u) and ProductQ(v): return SubstForAux(First(u), First(v), x) return u.func(*[SubstForAux(i, v, x) for i in u.args]) def FresnelS(x): return fresnels(x) def FresnelC(x): return fresnelc(x) def Erf(x): return erf(x) def Erfc(x): return erfc(x) def Erfi(x): return erfi(x) class Gamma(Function): @classmethod def eval(cls,*args): a = args[0] if len(args) == 1: return gamma(a) else: b = args[1] if (NumericQ(a) and NumericQ(b)) or a == 1: return uppergamma(a, b) def FunctionOfTrigOfLinearQ(u, x): # If u is an algebraic function of trig functions of a linear function of x, # FunctionOfTrigOfLinearQ[u,x] returns True; else it returns False. if FunctionOfTrig(u, None, x) and AlgebraicTrigFunctionQ(u, x) and FunctionOfLinear(FunctionOfTrig(u, None, x), x): return True else: return False def ElementaryFunctionQ(u): # ElementaryExpressionQ[u] returns True if u is a sum, product, or power and all the operands # are elementary expressions; or if u is a call on a trig, hyperbolic, or inverse function # and all the arguments are elementary expressions; else it returns False. if AtomQ(u): return True elif SumQ(u) or ProductQ(u) or PowerQ(u) or TrigQ(u) or HyperbolicQ(u) or InverseFunctionQ(u): for i in u.args: if not ElementaryFunctionQ(i): return False return True return False def Complex(a, b): return a + I*b def UnsameQ(a, b): return a != b @doctest_depends_on(modules=('matchpy',)) def _SimpFixFactor(): replacer = ManyToOneReplacer() pattern1 = Pattern(UtilityOperator(Pow(Add(Mul(Complex(S(0), c_), WC('a', S(1))), Mul(Complex(S(0), d_), WC('b', S(1)))), WC('p', S(1))), x_), CustomConstraint(lambda p: IntegerQ(p))) rule1 = ReplacementRule(pattern1, lambda b, c, x, a, p, d : Mul(Pow(I, p), SimpFixFactor(Pow(Add(Mul(a, c), Mul(b, d)), p), x))) replacer.add(rule1) pattern2 = Pattern(UtilityOperator(Pow(Add(Mul(Complex(S(0), d_), WC('a', S(1))), Mul(Complex(S(0), e_), WC('b', S(1))), Mul(Complex(S(0), f_), WC('c', S(1)))), WC('p', S(1))), x_), CustomConstraint(lambda p: IntegerQ(p))) rule2 = ReplacementRule(pattern2, lambda b, c, x, f, a, p, e, d : Mul(Pow(I, p), SimpFixFactor(Pow(Add(Mul(a, d), Mul(b, e), Mul(c, f)), p), x))) replacer.add(rule2) pattern3 = Pattern(UtilityOperator(Pow(Add(Mul(WC('a', S(1)), Pow(c_, r_)), Mul(WC('b', S(1)), Pow(x_, WC('n', S(1))))), WC('p', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, p: IntegersQ(n, p)), CustomConstraint(lambda c: AtomQ(c)), CustomConstraint(lambda r: RationalQ(r)), CustomConstraint(lambda r: Less(r, S(0)))) rule3 = ReplacementRule(pattern3, lambda b, c, r, n, x, a, p : Mul(Pow(c, Mul(r, p)), SimpFixFactor(Pow(Add(a, Mul(Mul(b, Pow(Pow(c, r), S(-1))), Pow(x, n))), p), x))) replacer.add(rule3) pattern4 = Pattern(UtilityOperator(Pow(Add(WC('a', S(0)), Mul(WC('b', S(1)), Pow(c_, r_), Pow(x_, WC('n', S(1))))), WC('p', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, p: IntegersQ(n, p)), CustomConstraint(lambda c: AtomQ(c)), CustomConstraint(lambda r: RationalQ(r)), CustomConstraint(lambda r: Less(r, S(0)))) rule4 = ReplacementRule(pattern4, lambda b, c, r, n, x, a, p : Mul(Pow(c, Mul(r, p)), SimpFixFactor(Pow(Add(Mul(a, Pow(Pow(c, r), S(-1))), Mul(b, Pow(x, n))), p), x))) replacer.add(rule4) pattern5 = Pattern(UtilityOperator(Pow(Add(Mul(WC('a', S(1)), Pow(c_, WC('s', S(1)))), Mul(WC('b', S(1)), Pow(c_, WC('r', S(1))), Pow(x_, WC('n', S(1))))), WC('p', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, p: IntegersQ(n, p)), CustomConstraint(lambda r, s: RationalQ(s, r)), CustomConstraint(lambda r, s: Inequality(S(0), Less, s, LessEqual, r)), CustomConstraint(lambda p, c, s: UnsameQ(Pow(c, Mul(s, p)), S(-1)))) rule5 = ReplacementRule(pattern5, lambda b, c, r, n, x, a, p, s : Mul(Pow(c, Mul(s, p)), SimpFixFactor(Pow(Add(a, Mul(b, Pow(c, Add(r, Mul(S(-1), s))), Pow(x, n))), p), x))) replacer.add(rule5) pattern6 = Pattern(UtilityOperator(Pow(Add(Mul(WC('a', S(1)), Pow(c_, WC('s', S(1)))), Mul(WC('b', S(1)), Pow(c_, WC('r', S(1))), Pow(x_, WC('n', S(1))))), WC('p', S(1))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda n, p: IntegersQ(n, p)), CustomConstraint(lambda r, s: RationalQ(s, r)), CustomConstraint(lambda s, r: Less(S(0), r, s)), CustomConstraint(lambda p, c, r: UnsameQ(Pow(c, Mul(r, p)), S(-1)))) rule6 = ReplacementRule(pattern6, lambda b, c, r, n, x, a, p, s : Mul(Pow(c, Mul(r, p)), SimpFixFactor(Pow(Add(Mul(a, Pow(c, Add(s, Mul(S(-1), r)))), Mul(b, Pow(x, n))), p), x))) replacer.add(rule6) return replacer @doctest_depends_on(modules=('matchpy',)) def SimpFixFactor(expr, x): r = SimpFixFactor_replacer.replace(UtilityOperator(expr, x)) if isinstance(r, UtilityOperator): return expr return r @doctest_depends_on(modules=('matchpy',)) def _FixSimplify(): Plus = Add def cons_f1(n): return OddQ(n) cons1 = CustomConstraint(cons_f1) def cons_f2(m): return RationalQ(m) cons2 = CustomConstraint(cons_f2) def cons_f3(n): return FractionQ(n) cons3 = CustomConstraint(cons_f3) def cons_f4(u): return SqrtNumberSumQ(u) cons4 = CustomConstraint(cons_f4) def cons_f5(v): return SqrtNumberSumQ(v) cons5 = CustomConstraint(cons_f5) def cons_f6(u): return PositiveQ(u) cons6 = CustomConstraint(cons_f6) def cons_f7(v): return PositiveQ(v) cons7 = CustomConstraint(cons_f7) def cons_f8(v): return SqrtNumberSumQ(S(1)/v) cons8 = CustomConstraint(cons_f8) def cons_f9(m): return IntegerQ(m) cons9 = CustomConstraint(cons_f9) def cons_f10(u): return NegativeQ(u) cons10 = CustomConstraint(cons_f10) def cons_f11(n, m, a, b): return RationalQ(a, b, m, n) cons11 = CustomConstraint(cons_f11) def cons_f12(a): return Greater(a, S(0)) cons12 = CustomConstraint(cons_f12) def cons_f13(b): return Greater(b, S(0)) cons13 = CustomConstraint(cons_f13) def cons_f14(p): return PositiveIntegerQ(p) cons14 = CustomConstraint(cons_f14) def cons_f15(p): return IntegerQ(p) cons15 = CustomConstraint(cons_f15) def cons_f16(p, n): return Greater(-n + p, S(0)) cons16 = CustomConstraint(cons_f16) def cons_f17(a, b): return SameQ(a + b, S(0)) cons17 = CustomConstraint(cons_f17) def cons_f18(n): return Not(IntegerQ(n)) cons18 = CustomConstraint(cons_f18) def cons_f19(c, a, b, d): return ZeroQ(-a*d + b*c) cons19 = CustomConstraint(cons_f19) def cons_f20(a): return Not(RationalQ(a)) cons20 = CustomConstraint(cons_f20) def cons_f21(t): return IntegerQ(t) cons21 = CustomConstraint(cons_f21) def cons_f22(n, m): return RationalQ(m, n) cons22 = CustomConstraint(cons_f22) def cons_f23(n, m): return Inequality(S(0), Less, m, LessEqual, n) cons23 = CustomConstraint(cons_f23) def cons_f24(p, n, m): return RationalQ(m, n, p) cons24 = CustomConstraint(cons_f24) def cons_f25(p, n, m): return Inequality(S(0), Less, m, LessEqual, n, LessEqual, p) cons25 = CustomConstraint(cons_f25) def cons_f26(p, n, m, q): return Inequality(S(0), Less, m, LessEqual, n, LessEqual, p, LessEqual, q) cons26 = CustomConstraint(cons_f26) def cons_f27(w): return Not(RationalQ(w)) cons27 = CustomConstraint(cons_f27) def cons_f28(n): return Less(n, S(0)) cons28 = CustomConstraint(cons_f28) def cons_f29(n, w, v): return ZeroQ(v + w**(-n)) cons29 = CustomConstraint(cons_f29) def cons_f30(n): return IntegerQ(n) cons30 = CustomConstraint(cons_f30) def cons_f31(w, v): return ZeroQ(v + w) cons31 = CustomConstraint(cons_f31) def cons_f32(p, n): return IntegerQ(n/p) cons32 = CustomConstraint(cons_f32) def cons_f33(w, v): return ZeroQ(v - w) cons33 = CustomConstraint(cons_f33) def cons_f34(p, n): return IntegersQ(n, n/p) cons34 = CustomConstraint(cons_f34) def cons_f35(a): return AtomQ(a) cons35 = CustomConstraint(cons_f35) def cons_f36(b): return AtomQ(b) cons36 = CustomConstraint(cons_f36) pattern1 = Pattern(UtilityOperator((w_ + Complex(S(0), b_)*WC('v', S(1)))**WC('n', S(1))*Complex(S(0), a_)*WC('u', S(1))), cons1) def replacement1(n, u, w, v, a, b): return (S(-1))**(n/S(2) + S(1)/2)*a*u*FixSimplify((b*v - w*Complex(S(0), S(1)))**n) rule1 = ReplacementRule(pattern1, replacement1) def With2(m, n, u, w, v): z = u**(m/GCD(m, n))*v**(n/GCD(m, n)) if Or(AbsurdNumberQ(z), SqrtNumberSumQ(z)): return True return False pattern2 = Pattern(UtilityOperator(u_**WC('m', S(1))*v_**n_*WC('w', S(1))), cons2, cons3, cons4, cons5, cons6, cons7, CustomConstraint(With2)) def replacement2(m, n, u, w, v): z = u**(m/GCD(m, n))*v**(n/GCD(m, n)) return FixSimplify(w*z**GCD(m, n)) rule2 = ReplacementRule(pattern2, replacement2) def With3(m, n, u, w, v): z = u**(m/GCD(m, -n))*v**(n/GCD(m, -n)) if Or(AbsurdNumberQ(z), SqrtNumberSumQ(z)): return True return False pattern3 = Pattern(UtilityOperator(u_**WC('m', S(1))*v_**n_*WC('w', S(1))), cons2, cons3, cons4, cons8, cons6, cons7, CustomConstraint(With3)) def replacement3(m, n, u, w, v): z = u**(m/GCD(m, -n))*v**(n/GCD(m, -n)) return FixSimplify(w*z**GCD(m, -n)) rule3 = ReplacementRule(pattern3, replacement3) def With4(m, n, u, w, v): z = v**(n/GCD(m, n))*(-u)**(m/GCD(m, n)) if Or(AbsurdNumberQ(z), SqrtNumberSumQ(z)): return True return False pattern4 = Pattern(UtilityOperator(u_**WC('m', S(1))*v_**n_*WC('w', S(1))), cons9, cons3, cons4, cons5, cons10, cons7, CustomConstraint(With4)) def replacement4(m, n, u, w, v): z = v**(n/GCD(m, n))*(-u)**(m/GCD(m, n)) return FixSimplify(-w*z**GCD(m, n)) rule4 = ReplacementRule(pattern4, replacement4) def With5(m, n, u, w, v): z = v**(n/GCD(m, -n))*(-u)**(m/GCD(m, -n)) if Or(AbsurdNumberQ(z), SqrtNumberSumQ(z)): return True return False pattern5 = Pattern(UtilityOperator(u_**WC('m', S(1))*v_**n_*WC('w', S(1))), cons9, cons3, cons4, cons8, cons10, cons7, CustomConstraint(With5)) def replacement5(m, n, u, w, v): z = v**(n/GCD(m, -n))*(-u)**(m/GCD(m, -n)) return FixSimplify(-w*z**GCD(m, -n)) rule5 = ReplacementRule(pattern5, replacement5) def With6(p, m, n, u, w, v, a, b): c = a**(m/p)*b**n if RationalQ(c): return True return False pattern6 = Pattern(UtilityOperator(a_**m_*(b_**n_*WC('v', S(1)) + u_)**WC('p', S(1))*WC('w', S(1))), cons11, cons12, cons13, cons14, CustomConstraint(With6)) def replacement6(p, m, n, u, w, v, a, b): c = a**(m/p)*b**n return FixSimplify(w*(a**(m/p)*u + c*v)**p) rule6 = ReplacementRule(pattern6, replacement6) pattern7 = Pattern(UtilityOperator(a_**WC('m', S(1))*(a_**n_*WC('u', S(1)) + b_**WC('p', S(1))*WC('v', S(1)))*WC('w', S(1))), cons2, cons3, cons15, cons16, cons17) def replacement7(p, m, n, u, w, v, a, b): return FixSimplify(a**(m + n)*w*((S(-1))**p*a**(-n + p)*v + u)) rule7 = ReplacementRule(pattern7, replacement7) def With8(m, d, n, w, c, a, b): q = b/d if FreeQ(q, Plus): return True return False pattern8 = Pattern(UtilityOperator((a_ + b_)**WC('m', S(1))*(c_ + d_)**n_*WC('w', S(1))), cons9, cons18, cons19, CustomConstraint(With8)) def replacement8(m, d, n, w, c, a, b): q = b/d return FixSimplify(q**m*w*(c + d)**(m + n)) rule8 = ReplacementRule(pattern8, replacement8) pattern9 = Pattern(UtilityOperator((a_**WC('m', S(1))*WC('u', S(1)) + a_**WC('n', S(1))*WC('v', S(1)))**WC('t', S(1))*WC('w', S(1))), cons20, cons21, cons22, cons23) def replacement9(m, n, u, w, v, a, t): return FixSimplify(a**(m*t)*w*(a**(-m + n)*v + u)**t) rule9 = ReplacementRule(pattern9, replacement9) pattern10 = Pattern(UtilityOperator((a_**WC('m', S(1))*WC('u', S(1)) + a_**WC('n', S(1))*WC('v', S(1)) + a_**WC('p', S(1))*WC('z', S(1)))**WC('t', S(1))*WC('w', S(1))), cons20, cons21, cons24, cons25) def replacement10(p, m, n, u, w, v, a, z, t): return FixSimplify(a**(m*t)*w*(a**(-m + n)*v + a**(-m + p)*z + u)**t) rule10 = ReplacementRule(pattern10, replacement10) pattern11 = Pattern(UtilityOperator((a_**WC('m', S(1))*WC('u', S(1)) + a_**WC('n', S(1))*WC('v', S(1)) + a_**WC('p', S(1))*WC('z', S(1)) + a_**WC('q', S(1))*WC('y', S(1)))**WC('t', S(1))*WC('w', S(1))), cons20, cons21, cons24, cons26) def replacement11(p, m, n, u, q, w, v, a, z, y, t): return FixSimplify(a**(m*t)*w*(a**(-m + n)*v + a**(-m + p)*z + a**(-m + q)*y + u)**t) rule11 = ReplacementRule(pattern11, replacement11) pattern12 = Pattern(UtilityOperator((sqrt(v_)*WC('b', S(1)) + sqrt(v_)*WC('c', S(1)) + sqrt(v_)*WC('d', S(1)) + sqrt(v_)*WC('a', S(1)) + WC('u', S(0)))*WC('w', S(1)))) def replacement12(d, u, w, v, c, a, b): return FixSimplify(w*(u + sqrt(v)*FixSimplify(a + b + c + d))) rule12 = ReplacementRule(pattern12, replacement12) pattern13 = Pattern(UtilityOperator((sqrt(v_)*WC('b', S(1)) + sqrt(v_)*WC('c', S(1)) + sqrt(v_)*WC('a', S(1)) + WC('u', S(0)))*WC('w', S(1)))) def replacement13(u, w, v, c, a, b): return FixSimplify(w*(u + sqrt(v)*FixSimplify(a + b + c))) rule13 = ReplacementRule(pattern13, replacement13) pattern14 = Pattern(UtilityOperator((sqrt(v_)*WC('b', S(1)) + sqrt(v_)*WC('a', S(1)) + WC('u', S(0)))*WC('w', S(1)))) def replacement14(u, w, v, a, b): return FixSimplify(w*(u + sqrt(v)*FixSimplify(a + b))) rule14 = ReplacementRule(pattern14, replacement14) pattern15 = Pattern(UtilityOperator(v_**m_*w_**n_*WC('u', S(1))), cons2, cons27, cons3, cons28, cons29) def replacement15(m, n, u, w, v): return -FixSimplify(u*v**(m + S(-1))) rule15 = ReplacementRule(pattern15, replacement15) pattern16 = Pattern(UtilityOperator(v_**m_*w_**WC('n', S(1))*WC('u', S(1))), cons2, cons27, cons30, cons31) def replacement16(m, n, u, w, v): return (S(-1))**n*FixSimplify(u*v**(m + n)) rule16 = ReplacementRule(pattern16, replacement16) pattern17 = Pattern(UtilityOperator(w_**WC('n', S(1))*(-v_**WC('p', S(1)))**m_*WC('u', S(1))), cons2, cons27, cons32, cons33) def replacement17(p, m, n, u, w, v): return (S(-1))**(n/p)*FixSimplify(u*(-v**p)**(m + n/p)) rule17 = ReplacementRule(pattern17, replacement17) pattern18 = Pattern(UtilityOperator(w_**WC('n', S(1))*(-v_**WC('p', S(1)))**m_*WC('u', S(1))), cons2, cons27, cons34, cons31) def replacement18(p, m, n, u, w, v): return (S(-1))**(n + n/p)*FixSimplify(u*(-v**p)**(m + n/p)) rule18 = ReplacementRule(pattern18, replacement18) pattern19 = Pattern(UtilityOperator((a_ - b_)**WC('m', S(1))*(a_ + b_)**WC('m', S(1))*WC('u', S(1))), cons9, cons35, cons36) def replacement19(m, u, a, b): return u*(a**S(2) - b**S(2))**m rule19 = ReplacementRule(pattern19, replacement19) pattern20 = Pattern(UtilityOperator((S(729)*c - e*(-S(20)*e + S(540)))**WC('m', S(1))*WC('u', S(1))), cons2) def replacement20(m, u): return u*(a*e**S(2) - b*d*e + c*d**S(2))**m rule20 = ReplacementRule(pattern20, replacement20) pattern21 = Pattern(UtilityOperator((S(729)*c + e*(S(20)*e + S(-540)))**WC('m', S(1))*WC('u', S(1))), cons2) def replacement21(m, u): return u*(a*e**S(2) - b*d*e + c*d**S(2))**m rule21 = ReplacementRule(pattern21, replacement21) pattern22 = Pattern(UtilityOperator(u_)) def replacement22(u): return u rule22 = ReplacementRule(pattern22, replacement22) return [rule1, rule2, rule3, rule4, rule5, rule6, rule7, rule8, rule9, rule10, rule11, rule12, rule13, rule14, rule15, rule16, rule17, rule18, rule19, rule20, rule21, rule22, ] @doctest_depends_on(modules=('matchpy',)) def FixSimplify(expr): if isinstance(expr, (list, tuple, TupleArg)): return [replace_all(UtilityOperator(i), FixSimplify_rules) for i in expr] return replace_all(UtilityOperator(expr), FixSimplify_rules) @doctest_depends_on(modules=('matchpy',)) def _SimplifyAntiderivativeSum(): replacer = ManyToOneReplacer() pattern1 = Pattern(UtilityOperator(Add(Mul(Log(Add(a_, Mul(WC('b', S(1)), Pow(Tan(u_), WC('n', S(1)))))), WC('A', S(1))), Mul(Log(Cos(u_)), WC('B', S(1))), WC('v', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda n: IntegerQ(n)), CustomConstraint(lambda B, A, n: ZeroQ(Add(Mul(n, A), Mul(S(1), B))))) rule1 = ReplacementRule(pattern1, lambda n, x, v, b, B, A, u, a : Add(SimplifyAntiderivativeSum(v, x), Mul(A, Log(RemoveContent(Add(Mul(a, Pow(Cos(u), n)), Mul(b, Pow(Sin(u), n))), x))))) replacer.add(rule1) pattern2 = Pattern(UtilityOperator(Add(Mul(Log(Add(Mul(Pow(Cot(u_), WC('n', S(1))), WC('b', S(1))), a_)), WC('A', S(1))), Mul(Log(Sin(u_)), WC('B', S(1))), WC('v', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda n: IntegerQ(n)), CustomConstraint(lambda B, A, n: ZeroQ(Add(Mul(n, A), Mul(S(1), B))))) rule2 = ReplacementRule(pattern2, lambda n, x, v, b, B, A, a, u : Add(SimplifyAntiderivativeSum(v, x), Mul(A, Log(RemoveContent(Add(Mul(a, Pow(Sin(u), n)), Mul(b, Pow(Cos(u), n))), x))))) replacer.add(rule2) pattern3 = Pattern(UtilityOperator(Add(Mul(Log(Add(a_, Mul(WC('b', S(1)), Pow(Tan(u_), WC('n', S(1)))))), WC('A', S(1))), Mul(Log(Add(c_, Mul(WC('d', S(1)), Pow(Tan(u_), WC('n', S(1)))))), WC('B', S(1))), WC('v', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda n: IntegerQ(n)), CustomConstraint(lambda B, A: ZeroQ(Add(A, B)))) rule3 = ReplacementRule(pattern3, lambda n, x, v, b, A, B, u, c, d, a : Add(SimplifyAntiderivativeSum(v, x), Mul(A, Log(RemoveContent(Add(Mul(a, Pow(Cos(u), n)), Mul(b, Pow(Sin(u), n))), x))), Mul(B, Log(RemoveContent(Add(Mul(c, Pow(Cos(u), n)), Mul(d, Pow(Sin(u), n))), x))))) replacer.add(rule3) pattern4 = Pattern(UtilityOperator(Add(Mul(Log(Add(Mul(Pow(Cot(u_), WC('n', S(1))), WC('b', S(1))), a_)), WC('A', S(1))), Mul(Log(Add(Mul(Pow(Cot(u_), WC('n', S(1))), WC('d', S(1))), c_)), WC('B', S(1))), WC('v', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda n: IntegerQ(n)), CustomConstraint(lambda B, A: ZeroQ(Add(A, B)))) rule4 = ReplacementRule(pattern4, lambda n, x, v, b, A, B, c, a, d, u : Add(SimplifyAntiderivativeSum(v, x), Mul(A, Log(RemoveContent(Add(Mul(b, Pow(Cos(u), n)), Mul(a, Pow(Sin(u), n))), x))), Mul(B, Log(RemoveContent(Add(Mul(d, Pow(Cos(u), n)), Mul(c, Pow(Sin(u), n))), x))))) replacer.add(rule4) pattern5 = Pattern(UtilityOperator(Add(Mul(Log(Add(a_, Mul(WC('b', S(1)), Pow(Tan(u_), WC('n', S(1)))))), WC('A', S(1))), Mul(Log(Add(c_, Mul(WC('d', S(1)), Pow(Tan(u_), WC('n', S(1)))))), WC('B', S(1))), Mul(Log(Add(e_, Mul(WC('f', S(1)), Pow(Tan(u_), WC('n', S(1)))))), WC('C', S(1))), WC('v', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda C, x: FreeQ(C, x)), CustomConstraint(lambda n: IntegerQ(n)), CustomConstraint(lambda B, A, C: ZeroQ(Add(A, B, C)))) rule5 = ReplacementRule(pattern5, lambda n, e, x, v, b, A, B, u, c, f, d, a, C : Add(SimplifyAntiderivativeSum(v, x), Mul(A, Log(RemoveContent(Add(Mul(a, Pow(Cos(u), n)), Mul(b, Pow(Sin(u), n))), x))), Mul(B, Log(RemoveContent(Add(Mul(c, Pow(Cos(u), n)), Mul(d, Pow(Sin(u), n))), x))), Mul(C, Log(RemoveContent(Add(Mul(e, Pow(Cos(u), n)), Mul(f, Pow(Sin(u), n))), x))))) replacer.add(rule5) pattern6 = Pattern(UtilityOperator(Add(Mul(Log(Add(Mul(Pow(Cot(u_), WC('n', S(1))), WC('b', S(1))), a_)), WC('A', S(1))), Mul(Log(Add(Mul(Pow(Cot(u_), WC('n', S(1))), WC('d', S(1))), c_)), WC('B', S(1))), Mul(Log(Add(Mul(Pow(Cot(u_), WC('n', S(1))), WC('f', S(1))), e_)), WC('C', S(1))), WC('v', S(0))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda d, x: FreeQ(d, x)), CustomConstraint(lambda e, x: FreeQ(e, x)), CustomConstraint(lambda f, x: FreeQ(f, x)), CustomConstraint(lambda A, x: FreeQ(A, x)), CustomConstraint(lambda B, x: FreeQ(B, x)), CustomConstraint(lambda C, x: FreeQ(C, x)), CustomConstraint(lambda n: IntegerQ(n)), CustomConstraint(lambda B, A, C: ZeroQ(Add(A, B, C)))) rule6 = ReplacementRule(pattern6, lambda n, e, x, v, b, A, B, c, a, f, d, u, C : Add(SimplifyAntiderivativeSum(v, x), Mul(A, Log(RemoveContent(Add(Mul(b, Pow(Cos(u), n)), Mul(a, Pow(Sin(u), n))), x))), Mul(B, Log(RemoveContent(Add(Mul(d, Pow(Cos(u), n)), Mul(c, Pow(Sin(u), n))), x))), Mul(C, Log(RemoveContent(Add(Mul(f, Pow(Cos(u), n)), Mul(e, Pow(Sin(u), n))), x))))) replacer.add(rule6) return replacer @doctest_depends_on(modules=('matchpy',)) def SimplifyAntiderivativeSum(expr, x): r = SimplifyAntiderivativeSum_replacer.replace(UtilityOperator(expr, x)) if isinstance(r, UtilityOperator): return expr return r @doctest_depends_on(modules=('matchpy',)) def _SimplifyAntiderivative(): replacer = ManyToOneReplacer() pattern2 = Pattern(UtilityOperator(Log(Mul(c_, u_)), x_), CustomConstraint(lambda c, x: FreeQ(c, x))) rule2 = ReplacementRule(pattern2, lambda x, c, u : SimplifyAntiderivative(Log(u), x)) replacer.add(rule2) pattern3 = Pattern(UtilityOperator(Log(Pow(u_, n_)), x_), CustomConstraint(lambda n, x: FreeQ(n, x))) rule3 = ReplacementRule(pattern3, lambda x, n, u : Mul(n, SimplifyAntiderivative(Log(u), x))) replacer.add(rule3) pattern7 = Pattern(UtilityOperator(Log(Pow(f_, u_)), x_), CustomConstraint(lambda f, x: FreeQ(f, x))) rule7 = ReplacementRule(pattern7, lambda x, f, u : Mul(Log(f), SimplifyAntiderivative(u, x))) replacer.add(rule7) pattern8 = Pattern(UtilityOperator(Log(Add(a_, Mul(WC('b', S(1)), Tan(u_)))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda b, a: ZeroQ(Add(Pow(a, S(2)), Pow(b, S(2)))))) rule8 = ReplacementRule(pattern8, lambda x, b, u, a : Add(Mul(Mul(b, Pow(a, S(1))), SimplifyAntiderivative(u, x)), Mul(S(1), SimplifyAntiderivative(Log(Cos(u)), x)))) replacer.add(rule8) pattern9 = Pattern(UtilityOperator(Log(Add(Mul(Cot(u_), WC('b', S(1))), a_)), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda b, a: ZeroQ(Add(Pow(a, S(2)), Pow(b, S(2)))))) rule9 = ReplacementRule(pattern9, lambda x, b, u, a : Add(Mul(Mul(Mul(S(1), b), Pow(a, S(1))), SimplifyAntiderivative(u, x)), Mul(S(1), SimplifyAntiderivative(Log(Sin(u)), x)))) replacer.add(rule9) pattern10 = Pattern(UtilityOperator(ArcTan(Mul(WC('a', S(1)), Tan(u_))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda a: PositiveQ(Pow(a, S(2)))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule10 = ReplacementRule(pattern10, lambda x, u, a : RectifyTangent(u, a, S(1), x)) replacer.add(rule10) pattern11 = Pattern(UtilityOperator(ArcCot(Mul(WC('a', S(1)), Tan(u_))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda a: PositiveQ(Pow(a, S(2)))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule11 = ReplacementRule(pattern11, lambda x, u, a : RectifyTangent(u, a, S(1), x)) replacer.add(rule11) pattern12 = Pattern(UtilityOperator(ArcCot(Mul(WC('a', S(1)), Tanh(u_))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda u: ComplexFreeQ(u))) rule12 = ReplacementRule(pattern12, lambda x, u, a : Mul(S(1), SimplifyAntiderivative(ArcTan(Mul(a, Tanh(u))), x))) replacer.add(rule12) pattern13 = Pattern(UtilityOperator(ArcTanh(Mul(WC('a', S(1)), Tan(u_))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda a: PositiveQ(Pow(a, S(2)))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule13 = ReplacementRule(pattern13, lambda x, u, a : RectifyTangent(u, Mul(I, a), Mul(S(1), I), x)) replacer.add(rule13) pattern14 = Pattern(UtilityOperator(ArcCoth(Mul(WC('a', S(1)), Tan(u_))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda a: PositiveQ(Pow(a, S(2)))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule14 = ReplacementRule(pattern14, lambda x, u, a : RectifyTangent(u, Mul(I, a), Mul(S(1), I), x)) replacer.add(rule14) pattern15 = Pattern(UtilityOperator(ArcTanh(Tanh(u_)), x_)) rule15 = ReplacementRule(pattern15, lambda x, u : SimplifyAntiderivative(u, x)) replacer.add(rule15) pattern16 = Pattern(UtilityOperator(ArcCoth(Tanh(u_)), x_)) rule16 = ReplacementRule(pattern16, lambda x, u : SimplifyAntiderivative(u, x)) replacer.add(rule16) pattern17 = Pattern(UtilityOperator(ArcCot(Mul(Cot(u_), WC('a', S(1)))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda a: PositiveQ(Pow(a, S(2)))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule17 = ReplacementRule(pattern17, lambda x, u, a : RectifyCotangent(u, a, S(1), x)) replacer.add(rule17) pattern18 = Pattern(UtilityOperator(ArcTan(Mul(Cot(u_), WC('a', S(1)))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda a: PositiveQ(Pow(a, S(2)))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule18 = ReplacementRule(pattern18, lambda x, u, a : RectifyCotangent(u, a, S(1), x)) replacer.add(rule18) pattern19 = Pattern(UtilityOperator(ArcTan(Mul(Coth(u_), WC('a', S(1)))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda u: ComplexFreeQ(u))) rule19 = ReplacementRule(pattern19, lambda x, u, a : Mul(S(1), SimplifyAntiderivative(ArcTan(Mul(Tanh(u), Pow(a, S(1)))), x))) replacer.add(rule19) pattern20 = Pattern(UtilityOperator(ArcCoth(Mul(Cot(u_), WC('a', S(1)))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda a: PositiveQ(Pow(a, S(2)))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule20 = ReplacementRule(pattern20, lambda x, u, a : RectifyCotangent(u, Mul(I, a), I, x)) replacer.add(rule20) pattern21 = Pattern(UtilityOperator(ArcTanh(Mul(Cot(u_), WC('a', S(1)))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda a: PositiveQ(Pow(a, S(2)))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule21 = ReplacementRule(pattern21, lambda x, u, a : RectifyCotangent(u, Mul(I, a), I, x)) replacer.add(rule21) pattern22 = Pattern(UtilityOperator(ArcCoth(Coth(u_)), x_)) rule22 = ReplacementRule(pattern22, lambda x, u : SimplifyAntiderivative(u, x)) replacer.add(rule22) pattern23 = Pattern(UtilityOperator(ArcTanh(Mul(Coth(u_), WC('a', S(1)))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda u: ComplexFreeQ(u))) rule23 = ReplacementRule(pattern23, lambda x, u, a : SimplifyAntiderivative(ArcTanh(Mul(Tanh(u), Pow(a, S(1)))), x)) replacer.add(rule23) pattern24 = Pattern(UtilityOperator(ArcTanh(Coth(u_)), x_)) rule24 = ReplacementRule(pattern24, lambda x, u : SimplifyAntiderivative(u, x)) replacer.add(rule24) pattern25 = Pattern(UtilityOperator(ArcTan(Mul(WC('c', S(1)), Add(a_, Mul(WC('b', S(1)), Tan(u_))))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda c, a: PositiveQ(Mul(Pow(a, S(2)), Pow(c, S(2))))), CustomConstraint(lambda c, b: PositiveQ(Mul(Pow(b, S(2)), Pow(c, S(2))))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule25 = ReplacementRule(pattern25, lambda x, a, b, u, c : RectifyTangent(u, Mul(a, c), Mul(b, c), S(1), x)) replacer.add(rule25) pattern26 = Pattern(UtilityOperator(ArcTanh(Mul(WC('c', S(1)), Add(a_, Mul(WC('b', S(1)), Tan(u_))))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda c, a: PositiveQ(Mul(Pow(a, S(2)), Pow(c, S(2))))), CustomConstraint(lambda c, b: PositiveQ(Mul(Pow(b, S(2)), Pow(c, S(2))))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule26 = ReplacementRule(pattern26, lambda x, a, b, u, c : RectifyTangent(u, Mul(I, a, c), Mul(I, b, c), Mul(S(1), I), x)) replacer.add(rule26) pattern27 = Pattern(UtilityOperator(ArcTan(Mul(WC('c', S(1)), Add(Mul(Cot(u_), WC('b', S(1))), a_))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda c, a: PositiveQ(Mul(Pow(a, S(2)), Pow(c, S(2))))), CustomConstraint(lambda c, b: PositiveQ(Mul(Pow(b, S(2)), Pow(c, S(2))))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule27 = ReplacementRule(pattern27, lambda x, a, b, u, c : RectifyCotangent(u, Mul(a, c), Mul(b, c), S(1), x)) replacer.add(rule27) pattern28 = Pattern(UtilityOperator(ArcTanh(Mul(WC('c', S(1)), Add(Mul(Cot(u_), WC('b', S(1))), a_))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda c, a: PositiveQ(Mul(Pow(a, S(2)), Pow(c, S(2))))), CustomConstraint(lambda c, b: PositiveQ(Mul(Pow(b, S(2)), Pow(c, S(2))))), CustomConstraint(lambda u: ComplexFreeQ(u))) rule28 = ReplacementRule(pattern28, lambda x, a, b, u, c : RectifyCotangent(u, Mul(I, a, c), Mul(I, b, c), Mul(S(1), I), x)) replacer.add(rule28) pattern29 = Pattern(UtilityOperator(ArcTan(Add(WC('a', S(0)), Mul(WC('b', S(1)), Tan(u_)), Mul(WC('c', S(1)), Pow(Tan(u_), S(2))))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda u: ComplexFreeQ(u))) rule29 = ReplacementRule(pattern29, lambda x, a, b, u, c : If(EvenQ(Denominator(NumericFactor(Together(u)))), ArcTan(NormalizeTogether(Mul(Add(a, c, S(1), Mul(Add(a, Mul(S(1), c), S(1)), Cos(Mul(S(2), u))), Mul(b, Sin(Mul(S(2), u)))), Pow(Add(a, c, S(1), Mul(Add(a, Mul(S(1), c), S(1)), Cos(Mul(S(2), u))), Mul(b, Sin(Mul(S(2), u)))), S(1))))), ArcTan(NormalizeTogether(Mul(Add(c, Mul(Add(a, Mul(S(1), c), S(1)), Pow(Cos(u), S(2))), Mul(b, Cos(u), Sin(u))), Pow(Add(c, Mul(Add(a, Mul(S(1), c), S(1)), Pow(Cos(u), S(2))), Mul(b, Cos(u), Sin(u))), S(1))))))) replacer.add(rule29) pattern30 = Pattern(UtilityOperator(ArcTan(Add(WC('a', S(0)), Mul(WC('b', S(1)), Add(WC('d', S(0)), Mul(WC('e', S(1)), Tan(u_)))), Mul(WC('c', S(1)), Pow(Add(WC('f', S(0)), Mul(WC('g', S(1)), Tan(u_))), S(2))))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda b, x: FreeQ(b, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda u: ComplexFreeQ(u))) rule30 = ReplacementRule(pattern30, lambda x, d, a, e, f, b, u, c, g : SimplifyAntiderivative(ArcTan(Add(a, Mul(b, d), Mul(c, Pow(f, S(2))), Mul(Add(Mul(b, e), Mul(S(2), c, f, g)), Tan(u)), Mul(c, Pow(g, S(2)), Pow(Tan(u), S(2))))), x)) replacer.add(rule30) pattern31 = Pattern(UtilityOperator(ArcTan(Add(WC('a', S(0)), Mul(WC('c', S(1)), Pow(Tan(u_), S(2))))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda u: ComplexFreeQ(u))) rule31 = ReplacementRule(pattern31, lambda x, c, u, a : If(EvenQ(Denominator(NumericFactor(Together(u)))), ArcTan(NormalizeTogether(Mul(Add(a, c, S(1), Mul(Add(a, Mul(S(1), c), S(1)), Cos(Mul(S(2), u)))), Pow(Add(a, c, S(1), Mul(Add(a, Mul(S(1), c), S(1)), Cos(Mul(S(2), u)))), S(1))))), ArcTan(NormalizeTogether(Mul(Add(c, Mul(Add(a, Mul(S(1), c), S(1)), Pow(Cos(u), S(2)))), Pow(Add(c, Mul(Add(a, Mul(S(1), c), S(1)), Pow(Cos(u), S(2)))), S(1))))))) replacer.add(rule31) pattern32 = Pattern(UtilityOperator(ArcTan(Add(WC('a', S(0)), Mul(WC('c', S(1)), Pow(Add(WC('f', S(0)), Mul(WC('g', S(1)), Tan(u_))), S(2))))), x_), CustomConstraint(lambda a, x: FreeQ(a, x)), CustomConstraint(lambda c, x: FreeQ(c, x)), CustomConstraint(lambda u: ComplexFreeQ(u))) rule32 = ReplacementRule(pattern32, lambda x, a, f, u, c, g : SimplifyAntiderivative(ArcTan(Add(a, Mul(c, Pow(f, S(2))), Mul(Mul(S(2), c, f, g), Tan(u)), Mul(c, Pow(g, S(2)), Pow(Tan(u), S(2))))), x)) replacer.add(rule32) return replacer @doctest_depends_on(modules=('matchpy',)) def SimplifyAntiderivative(expr, x): r = SimplifyAntiderivative_replacer.replace(UtilityOperator(expr, x)) if isinstance(r, UtilityOperator): if ProductQ(expr): u, c = S(1), S(1) for i in expr.args: if FreeQ(i, x): c *= i else: u *= i if FreeQ(c, x) and c != S(1): v = SimplifyAntiderivative(u, x) if SumQ(v) and NonsumQ(u): return Add(*[c*i for i in v.args]) return c*v elif LogQ(expr): F = expr.args[0] if MemberQ([cot, sec, csc, coth, sech, csch], Head(F)): return -SimplifyAntiderivative(Log(1/F), x) if MemberQ([Log, atan, acot], Head(expr)): F = Head(expr) G = expr.args[0] if MemberQ([cot, sec, csc, coth, sech, csch], Head(G)): return -SimplifyAntiderivative(F(1/G), x) if MemberQ([atanh, acoth], Head(expr)): F = Head(expr) G = expr.args[0] if MemberQ([cot, sec, csc, coth, sech, csch], Head(G)): return SimplifyAntiderivative(F(1/G), x) u = expr if FreeQ(u, x): return S(0) elif LogQ(u): return Log(RemoveContent(u.args[0], x)) elif SumQ(u): return SimplifyAntiderivativeSum(Add(*[SimplifyAntiderivative(i, x) for i in u.args]), x) return u else: return r @doctest_depends_on(modules=('matchpy',)) def _TrigSimplifyAux(): replacer = ManyToOneReplacer() pattern1 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(Add(Mul(WC('a', S(1)), Pow(v_, WC('m', S(1)))), Mul(WC('b', S(1)), Pow(v_, WC('n', S(1))))), p_))), CustomConstraint(lambda v: InertTrigQ(v)), CustomConstraint(lambda p: IntegerQ(p)), CustomConstraint(lambda n, m: RationalQ(m, n)), CustomConstraint(lambda n, m: Less(m, n))) rule1 = ReplacementRule(pattern1, lambda n, a, p, m, u, v, b : Mul(u, Pow(v, Mul(m, p)), Pow(TrigSimplifyAux(Add(a, Mul(b, Pow(v, Add(n, Mul(S(-1), m)))))), p))) replacer.add(rule1) pattern2 = Pattern(UtilityOperator(Add(Mul(Pow(cos(u_), S('2')), WC('a', S(1))), WC('v', S(0)), Mul(WC('b', S(1)), Pow(sin(u_), S('2'))))), CustomConstraint(lambda b, a: SameQ(a, b))) rule2 = ReplacementRule(pattern2, lambda u, v, b, a : Add(a, v)) replacer.add(rule2) pattern3 = Pattern(UtilityOperator(Add(WC('v', S(0)), Mul(WC('a', S(1)), Pow(sec(u_), S('2'))), Mul(WC('b', S(1)), Pow(tan(u_), S('2'))))), CustomConstraint(lambda b, a: SameQ(a, Mul(S(-1), b)))) rule3 = ReplacementRule(pattern3, lambda u, v, b, a : Add(a, v)) replacer.add(rule3) pattern4 = Pattern(UtilityOperator(Add(Mul(Pow(csc(u_), S('2')), WC('a', S(1))), Mul(Pow(cot(u_), S('2')), WC('b', S(1))), WC('v', S(0)))), CustomConstraint(lambda b, a: SameQ(a, Mul(S(-1), b)))) rule4 = ReplacementRule(pattern4, lambda u, v, b, a : Add(a, v)) replacer.add(rule4) pattern5 = Pattern(UtilityOperator(Pow(Add(Mul(Pow(cos(u_), S('2')), WC('a', S(1))), WC('v', S(0)), Mul(WC('b', S(1)), Pow(sin(u_), S('2')))), n_))) rule5 = ReplacementRule(pattern5, lambda n, a, u, v, b : Pow(Add(Mul(Add(b, Mul(S(-1), a)), Pow(Sin(u), S('2'))), a, v), n)) replacer.add(rule5) pattern6 = Pattern(UtilityOperator(Add(WC('w', S(0)), u_, Mul(WC('v', S(1)), Pow(sin(z_), S('2'))))), CustomConstraint(lambda u, v: SameQ(u, Mul(S(-1), v)))) rule6 = ReplacementRule(pattern6, lambda u, w, z, v : Add(Mul(u, Pow(Cos(z), S('2'))), w)) replacer.add(rule6) pattern7 = Pattern(UtilityOperator(Add(Mul(Pow(cos(z_), S('2')), WC('v', S(1))), WC('w', S(0)), u_)), CustomConstraint(lambda u, v: SameQ(u, Mul(S(-1), v)))) rule7 = ReplacementRule(pattern7, lambda z, w, v, u : Add(Mul(u, Pow(Sin(z), S('2'))), w)) replacer.add(rule7) pattern8 = Pattern(UtilityOperator(Add(WC('w', S(0)), u_, Mul(WC('v', S(1)), Pow(tan(z_), S('2'))))), CustomConstraint(lambda u, v: SameQ(u, v))) rule8 = ReplacementRule(pattern8, lambda u, w, z, v : Add(Mul(u, Pow(Sec(z), S('2'))), w)) replacer.add(rule8) pattern9 = Pattern(UtilityOperator(Add(Mul(Pow(cot(z_), S('2')), WC('v', S(1))), WC('w', S(0)), u_)), CustomConstraint(lambda u, v: SameQ(u, v))) rule9 = ReplacementRule(pattern9, lambda z, w, v, u : Add(Mul(u, Pow(Csc(z), S('2'))), w)) replacer.add(rule9) pattern10 = Pattern(UtilityOperator(Add(WC('w', S(0)), u_, Mul(WC('v', S(1)), Pow(sec(z_), S('2'))))), CustomConstraint(lambda u, v: SameQ(u, Mul(S(-1), v)))) rule10 = ReplacementRule(pattern10, lambda u, w, z, v : Add(Mul(v, Pow(Tan(z), S('2'))), w)) replacer.add(rule10) pattern11 = Pattern(UtilityOperator(Add(Mul(Pow(csc(z_), S('2')), WC('v', S(1))), WC('w', S(0)), u_)), CustomConstraint(lambda u, v: SameQ(u, Mul(S(-1), v)))) rule11 = ReplacementRule(pattern11, lambda z, w, v, u : Add(Mul(v, Pow(Cot(z), S('2'))), w)) replacer.add(rule11) pattern12 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(Add(Mul(cos(v_), WC('b', S(1))), a_), S(-1)), Pow(sin(v_), S('2')))), CustomConstraint(lambda b, a: ZeroQ(Add(Pow(a, S('2')), Mul(S(-1), Pow(b, S('2'))))))) rule12 = ReplacementRule(pattern12, lambda u, v, b, a : Mul(u, Add(Mul(S(1), Pow(a, S(-1))), Mul(S(-1), Mul(Cos(v), Pow(b, S(-1))))))) replacer.add(rule12) pattern13 = Pattern(UtilityOperator(Mul(Pow(cos(v_), S('2')), WC('u', S(1)), Pow(Add(a_, Mul(WC('b', S(1)), sin(v_))), S(-1)))), CustomConstraint(lambda b, a: ZeroQ(Add(Pow(a, S('2')), Mul(S(-1), Pow(b, S('2'))))))) rule13 = ReplacementRule(pattern13, lambda u, v, b, a : Mul(u, Add(Mul(S(1), Pow(a, S(-1))), Mul(S(-1), Mul(Sin(v), Pow(b, S(-1))))))) replacer.add(rule13) pattern14 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(tan(v_), WC('n', S(1))), Pow(Add(a_, Mul(WC('b', S(1)), Pow(tan(v_), WC('n', S(1))))), S(-1)))), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda a: NonsumQ(a))) rule14 = ReplacementRule(pattern14, lambda n, a, u, v, b : Mul(u, Pow(Add(b, Mul(a, Pow(Cot(v), n))), S(-1)))) replacer.add(rule14) pattern15 = Pattern(UtilityOperator(Mul(Pow(cot(v_), WC('n', S(1))), WC('u', S(1)), Pow(Add(Mul(Pow(cot(v_), WC('n', S(1))), WC('b', S(1))), a_), S(-1)))), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda a: NonsumQ(a))) rule15 = ReplacementRule(pattern15, lambda n, a, u, v, b : Mul(u, Pow(Add(b, Mul(a, Pow(Tan(v), n))), S(-1)))) replacer.add(rule15) pattern16 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(sec(v_), WC('n', S(1))), Pow(Add(a_, Mul(WC('b', S(1)), Pow(sec(v_), WC('n', S(1))))), S(-1)))), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda a: NonsumQ(a))) rule16 = ReplacementRule(pattern16, lambda n, a, u, v, b : Mul(u, Pow(Add(b, Mul(a, Pow(Cos(v), n))), S(-1)))) replacer.add(rule16) pattern17 = Pattern(UtilityOperator(Mul(Pow(csc(v_), WC('n', S(1))), WC('u', S(1)), Pow(Add(Mul(Pow(csc(v_), WC('n', S(1))), WC('b', S(1))), a_), S(-1)))), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda a: NonsumQ(a))) rule17 = ReplacementRule(pattern17, lambda n, a, u, v, b : Mul(u, Pow(Add(b, Mul(a, Pow(Sin(v), n))), S(-1)))) replacer.add(rule17) pattern18 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(Add(a_, Mul(WC('b', S(1)), Pow(sec(v_), WC('n', S(1))))), S(-1)), Pow(tan(v_), WC('n', S(1))))), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda a: NonsumQ(a))) rule18 = ReplacementRule(pattern18, lambda n, a, u, v, b : Mul(u, Mul(Pow(Sin(v), n), Pow(Add(b, Mul(a, Pow(Cos(v), n))), S(-1))))) replacer.add(rule18) pattern19 = Pattern(UtilityOperator(Mul(Pow(cot(v_), WC('n', S(1))), WC('u', S(1)), Pow(Add(Mul(Pow(csc(v_), WC('n', S(1))), WC('b', S(1))), a_), S(-1)))), CustomConstraint(lambda n: PositiveIntegerQ(n)), CustomConstraint(lambda a: NonsumQ(a))) rule19 = ReplacementRule(pattern19, lambda n, a, u, v, b : Mul(u, Mul(Pow(Cos(v), n), Pow(Add(b, Mul(a, Pow(Sin(v), n))), S(-1))))) replacer.add(rule19) pattern20 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(Add(Mul(WC('a', S(1)), Pow(sec(v_), WC('n', S(1)))), Mul(WC('b', S(1)), Pow(tan(v_), WC('n', S(1))))), WC('p', S(1))))), CustomConstraint(lambda n, p: IntegersQ(n, p))) rule20 = ReplacementRule(pattern20, lambda n, a, p, u, v, b : Mul(u, Pow(Sec(v), Mul(n, p)), Pow(Add(a, Mul(b, Pow(Sin(v), n))), p))) replacer.add(rule20) pattern21 = Pattern(UtilityOperator(Mul(Pow(Add(Mul(Pow(csc(v_), WC('n', S(1))), WC('a', S(1))), Mul(Pow(cot(v_), WC('n', S(1))), WC('b', S(1)))), WC('p', S(1))), WC('u', S(1)))), CustomConstraint(lambda n, p: IntegersQ(n, p))) rule21 = ReplacementRule(pattern21, lambda n, a, p, u, v, b : Mul(u, Pow(Csc(v), Mul(n, p)), Pow(Add(a, Mul(b, Pow(Cos(v), n))), p))) replacer.add(rule21) pattern22 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(Add(Mul(WC('b', S(1)), Pow(sin(v_), WC('n', S(1)))), Mul(WC('a', S(1)), Pow(tan(v_), WC('n', S(1))))), WC('p', S(1))))), CustomConstraint(lambda n, p: IntegersQ(n, p))) rule22 = ReplacementRule(pattern22, lambda n, a, p, u, v, b : Mul(u, Pow(Tan(v), Mul(n, p)), Pow(Add(a, Mul(b, Pow(Cos(v), n))), p))) replacer.add(rule22) pattern23 = Pattern(UtilityOperator(Mul(Pow(Add(Mul(Pow(cot(v_), WC('n', S(1))), WC('a', S(1))), Mul(Pow(cos(v_), WC('n', S(1))), WC('b', S(1)))), WC('p', S(1))), WC('u', S(1)))), CustomConstraint(lambda n, p: IntegersQ(n, p))) rule23 = ReplacementRule(pattern23, lambda n, a, p, u, v, b : Mul(u, Pow(Cot(v), Mul(n, p)), Pow(Add(a, Mul(b, Pow(Sin(v), n))), p))) replacer.add(rule23) pattern24 = Pattern(UtilityOperator(Mul(Pow(cos(v_), WC('m', S(1))), WC('u', S(1)), Pow(Add(WC('a', S(0)), Mul(WC('c', S(1)), Pow(sec(v_), WC('n', S(1)))), Mul(WC('b', S(1)), Pow(tan(v_), WC('n', S(1))))), WC('p', S(1))))), CustomConstraint(lambda n, p, m: IntegersQ(m, n, p))) rule24 = ReplacementRule(pattern24, lambda n, a, c, p, m, u, v, b : Mul(u, Pow(Cos(v), Add(m, Mul(S(-1), Mul(n, p)))), Pow(Add(c, Mul(b, Pow(Sin(v), n)), Mul(a, Pow(Cos(v), n))), p))) replacer.add(rule24) pattern25 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(sec(v_), WC('m', S(1))), Pow(Add(WC('a', S(0)), Mul(WC('c', S(1)), Pow(sec(v_), WC('n', S(1)))), Mul(WC('b', S(1)), Pow(tan(v_), WC('n', S(1))))), WC('p', S(1))))), CustomConstraint(lambda n, p, m: IntegersQ(m, n, p))) rule25 = ReplacementRule(pattern25, lambda n, a, c, p, m, u, v, b : Mul(u, Pow(Sec(v), Add(m, Mul(n, p))), Pow(Add(c, Mul(b, Pow(Sin(v), n)), Mul(a, Pow(Cos(v), n))), p))) replacer.add(rule25) pattern26 = Pattern(UtilityOperator(Mul(Pow(Add(WC('a', S(0)), Mul(Pow(cot(v_), WC('n', S(1))), WC('b', S(1))), Mul(Pow(csc(v_), WC('n', S(1))), WC('c', S(1)))), WC('p', S(1))), WC('u', S(1)), Pow(sin(v_), WC('m', S(1))))), CustomConstraint(lambda n, p, m: IntegersQ(m, n, p))) rule26 = ReplacementRule(pattern26, lambda n, a, c, p, m, u, v, b : Mul(u, Pow(Sin(v), Add(m, Mul(S(-1), Mul(n, p)))), Pow(Add(c, Mul(b, Pow(Cos(v), n)), Mul(a, Pow(Sin(v), n))), p))) replacer.add(rule26) pattern27 = Pattern(UtilityOperator(Mul(Pow(csc(v_), WC('m', S(1))), Pow(Add(WC('a', S(0)), Mul(Pow(cot(v_), WC('n', S(1))), WC('b', S(1))), Mul(Pow(csc(v_), WC('n', S(1))), WC('c', S(1)))), WC('p', S(1))), WC('u', S(1)))), CustomConstraint(lambda n, p, m: IntegersQ(m, n, p))) rule27 = ReplacementRule(pattern27, lambda n, a, c, p, m, u, v, b : Mul(u, Pow(Csc(v), Add(m, Mul(n, p))), Pow(Add(c, Mul(b, Pow(Cos(v), n)), Mul(a, Pow(Sin(v), n))), p))) replacer.add(rule27) pattern28 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(Add(Mul(Pow(csc(v_), WC('m', S(1))), WC('a', S(1))), Mul(WC('b', S(1)), Pow(sin(v_), WC('n', S(1))))), WC('p', S(1))))), CustomConstraint(lambda n, m: IntegersQ(m, n))) rule28 = ReplacementRule(pattern28, lambda n, a, p, m, u, v, b : If(And(ZeroQ(Add(m, n, S(-2))), ZeroQ(Add(a, b))), Mul(u, Pow(Mul(a, Mul(Pow(Cos(v), S('2')), Pow(Pow(Sin(v), m), S(-1)))), p)), Mul(u, Pow(Mul(Add(a, Mul(b, Pow(Sin(v), Add(m, n)))), Pow(Pow(Sin(v), m), S(-1))), p)))) replacer.add(rule28) pattern29 = Pattern(UtilityOperator(Mul(WC('u', S(1)), Pow(Add(Mul(Pow(cos(v_), WC('n', S(1))), WC('b', S(1))), Mul(WC('a', S(1)), Pow(sec(v_), WC('m', S(1))))), WC('p', S(1))))), CustomConstraint(lambda n, m: IntegersQ(m, n))) rule29 = ReplacementRule(pattern29, lambda n, a, p, m, u, v, b : If(And(ZeroQ(Add(m, n, S(-2))), ZeroQ(Add(a, b))), Mul(u, Pow(Mul(a, Mul(Pow(Sin(v), S('2')), Pow(Pow(Cos(v), m), S(-1)))), p)), Mul(u, Pow(Mul(Add(a, Mul(b, Pow(Cos(v), Add(m, n)))), Pow(Pow(Cos(v), m), S(-1))), p)))) replacer.add(rule29) pattern30 = Pattern(UtilityOperator(u_)) rule30 = ReplacementRule(pattern30, lambda u : u) replacer.add(rule30) return replacer @doctest_depends_on(modules=('matchpy',)) def TrigSimplifyAux(expr): return TrigSimplifyAux_replacer.replace(UtilityOperator(expr)) def Cancel(expr): return cancel(expr) class Util_Part(Function): def doit(self): i = Simplify(self.args[0]) if len(self.args) > 2 : lst = list(self.args[1:]) else: lst = self.args[1] if isinstance(i, (int, Integer)): if isinstance(lst, list): return lst[i - 1] elif AtomQ(lst): return lst return lst.args[i - 1] else: return self def Part(lst, i): #see i = -1 if isinstance(lst, list): return Util_Part(i, *lst).doit() return Util_Part(i, lst).doit() def PolyLog(n, p, z=None): return polylog(n, p) def D(f, x): try: return f.diff(x) except ValueError: return Function('D')(f, x) def IntegralFreeQ(u): return FreeQ(u, Integral) def Dist(u, v, x): #Dist(u,v) returns the sum of u times each term of v, provided v is free of Int u = replace_pow_exp(u) # to replace back to SymPy's exp v = replace_pow_exp(v) w = Simp(u*x**2, x)/x**2 if u == 1: return v elif u == 0: return 0 elif NumericFactor(u) < 0 and NumericFactor(-u) > 0: return -Dist(-u, v, x) elif SumQ(v): return Add(*[Dist(u, i, x) for i in v.args]) elif IntegralFreeQ(v): return Simp(u*v, x) elif w != u and FreeQ(w, x) and w == Simp(w, x) and w == Simp(w*x**2, x)/x**2: return Dist(w, v, x) else: return Simp(u*v, x) def PureFunctionOfCothQ(u, v, x): # If u is a pure function of Coth[v], PureFunctionOfCothQ[u,v,x] returns True; if AtomQ(u): return u != x elif CalculusQ(u): return False elif HyperbolicQ(u) and ZeroQ(u.args[0] - v): return CothQ(u) return all(PureFunctionOfCothQ(i, v, x) for i in u.args) def LogIntegral(z): return li(z) def ExpIntegralEi(z): return Ei(z) def ExpIntegralE(a, b): return expint(a, b).evalf() def SinIntegral(z): return Si(z) def CosIntegral(z): return Ci(z) def SinhIntegral(z): return Shi(z) def CoshIntegral(z): return Chi(z) class PolyGamma(Function): @classmethod def eval(cls, *args): if len(args) == 2: return polygamma(args[0], args[1]) return digamma(args[0]) def LogGamma(z): return loggamma(z) class ProductLog(Function): @classmethod def eval(cls, *args): if len(args) == 2: return LambertW(args[1], args[0]).evalf() return LambertW(args[0]).evalf() def Factorial(a): return factorial(a) def Zeta(*args): return zeta(*args) def HypergeometricPFQ(a, b, c): return hyper(a, b, c) def Sum_doit(exp, args): """ This function perform summation using SymPy's `Sum`. Examples ======== >>> from sympy.integrals.rubi.utility_function import Sum_doit >>> from sympy.abc import x >>> Sum_doit(2*x + 2, [x, 0, 1.7]) 6 """ exp = replace_pow_exp(exp) if not isinstance(args[2], (int, Integer)): new_args = [args[0], args[1], Floor(args[2])] return Sum(exp, new_args).doit() return Sum(exp, args).doit() def PolynomialQuotient(p, q, x): try: p = poly(p, x) q = poly(q, x) except: p = poly(p) q = poly(q) try: return quo(p, q).as_expr() except (PolynomialDivisionFailed, UnificationFailed): return p/q def PolynomialRemainder(p, q, x): try: p = poly(p, x) q = poly(q, x) except: p = poly(p) q = poly(q) try: return rem(p, q).as_expr() except (PolynomialDivisionFailed, UnificationFailed): return S(0) def Floor(x, a = None): if a is None: return floor(x) return a*floor(x/a) def Factor(var): return factor(var) def Rule(a, b): return {a: b} def Distribute(expr, *args): if len(args) == 1: if isinstance(expr, args[0]): return expr else: return expr.expand() if len(args) == 2: if isinstance(expr, args[1]): return expr.expand() else: return expr return expr.expand() def CoprimeQ(*args): args = S(args) g = gcd(*args) if g == 1: return True return False def Discriminant(a, b): try: return discriminant(a, b) except PolynomialError: return Function('Discriminant')(a, b) def Negative(x): return x < S(0) def Quotient(m, n): return Floor(m/n) def process_trig(expr): """ This function processes trigonometric expressions such that all `cot` is rewritten in terms of `tan`, `sec` in terms of `cos`, `csc` in terms of `sin` and similarly for `coth`, `sech` and `csch`. Examples ======== >>> from sympy.integrals.rubi.utility_function import process_trig >>> from sympy.abc import x >>> from sympy import coth, cot, csc >>> process_trig(x*cot(x)) x/tan(x) >>> process_trig(coth(x)*csc(x)) 1/(sin(x)*tanh(x)) """ expr = expr.replace(lambda x: isinstance(x, cot), lambda x: 1/tan(x.args[0])) expr = expr.replace(lambda x: isinstance(x, sec), lambda x: 1/cos(x.args[0])) expr = expr.replace(lambda x: isinstance(x, csc), lambda x: 1/sin(x.args[0])) expr = expr.replace(lambda x: isinstance(x, coth), lambda x: 1/tanh(x.args[0])) expr = expr.replace(lambda x: isinstance(x, sech), lambda x: 1/cosh(x.args[0])) expr = expr.replace(lambda x: isinstance(x, csch), lambda x: 1/sinh(x.args[0])) return expr def _ExpandIntegrand(): Plus = Add Times = Mul def cons_f1(m): return PositiveIntegerQ(m) cons1 = CustomConstraint(cons_f1) def cons_f2(d, c, b, a): return ZeroQ(-a*d + b*c) cons2 = CustomConstraint(cons_f2) def cons_f3(a, x): return FreeQ(a, x) cons3 = CustomConstraint(cons_f3) def cons_f4(b, x): return FreeQ(b, x) cons4 = CustomConstraint(cons_f4) def cons_f5(c, x): return FreeQ(c, x) cons5 = CustomConstraint(cons_f5) def cons_f6(d, x): return FreeQ(d, x) cons6 = CustomConstraint(cons_f6) def cons_f7(e, x): return FreeQ(e, x) cons7 = CustomConstraint(cons_f7) def cons_f8(f, x): return FreeQ(f, x) cons8 = CustomConstraint(cons_f8) def cons_f9(g, x): return FreeQ(g, x) cons9 = CustomConstraint(cons_f9) def cons_f10(h, x): return FreeQ(h, x) cons10 = CustomConstraint(cons_f10) def cons_f11(e, b, c, f, n, p, F, x, d, m): if not isinstance(x, Symbol): return False return FreeQ(List(F, b, c, d, e, f, m, n, p), x) cons11 = CustomConstraint(cons_f11) def cons_f12(F, x): return FreeQ(F, x) cons12 = CustomConstraint(cons_f12) def cons_f13(m, x): return FreeQ(m, x) cons13 = CustomConstraint(cons_f13) def cons_f14(n, x): return FreeQ(n, x) cons14 = CustomConstraint(cons_f14) def cons_f15(p, x): return FreeQ(p, x) cons15 = CustomConstraint(cons_f15) def cons_f16(e, b, c, f, n, a, p, F, x, d, m): if not isinstance(x, Symbol): return False return FreeQ(List(F, a, b, c, d, e, f, m, n, p), x) cons16 = CustomConstraint(cons_f16) def cons_f17(n, m): return IntegersQ(m, n) cons17 = CustomConstraint(cons_f17) def cons_f18(n): return Less(n, S(0)) cons18 = CustomConstraint(cons_f18) def cons_f19(x, u): if not isinstance(x, Symbol): return False return PolynomialQ(u, x) cons19 = CustomConstraint(cons_f19) def cons_f20(G, F, u): return SameQ(F(u)*G(u), S(1)) cons20 = CustomConstraint(cons_f20) def cons_f21(q, x): return FreeQ(q, x) cons21 = CustomConstraint(cons_f21) def cons_f22(F): return MemberQ(List(ArcSin, ArcCos, ArcSinh, ArcCosh), F) cons22 = CustomConstraint(cons_f22) def cons_f23(j, n): return ZeroQ(j - S(2)*n) cons23 = CustomConstraint(cons_f23) def cons_f24(A, x): return FreeQ(A, x) cons24 = CustomConstraint(cons_f24) def cons_f25(B, x): return FreeQ(B, x) cons25 = CustomConstraint(cons_f25) def cons_f26(m, u, x): if not isinstance(x, Symbol): return False def _cons_f_u(d, w, c, p, x): return And(FreeQ(List(c, d), x), IntegerQ(p), Greater(p, m)) cons_u = CustomConstraint(_cons_f_u) pat = Pattern(UtilityOperator((c_ + x_*WC('d', S(1)))**p_*WC('w', S(1)), x_), cons_u) result_matchq = is_match(UtilityOperator(u, x), pat) return Not(And(PositiveIntegerQ(m), result_matchq)) cons26 = CustomConstraint(cons_f26) def cons_f27(b, v, n, a, x, u, m): if not isinstance(x, Symbol): return False return And(FreeQ(List(a, b, m), x), NegativeIntegerQ(n), Not(IntegerQ(m)), PolynomialQ(u, x), PolynomialQ(v, x),\ RationalQ(m), Less(m, -1), GreaterEqual(Exponent(u, x), (-n - IntegerPart(m))*Exponent(v, x))) cons27 = CustomConstraint(cons_f27) def cons_f28(v, n, x, u, m): if not isinstance(x, Symbol): return False return And(FreeQ(List(a, b, m), x), NegativeIntegerQ(n), Not(IntegerQ(m)), PolynomialQ(u, x),\ PolynomialQ(v, x), GreaterEqual(Exponent(u, x), -n*Exponent(v, x))) cons28 = CustomConstraint(cons_f28) def cons_f29(n): return PositiveIntegerQ(n/S(4)) cons29 = CustomConstraint(cons_f29) def cons_f30(n): return IntegerQ(n) cons30 = CustomConstraint(cons_f30) def cons_f31(n): return Greater(n, S(1)) cons31 = CustomConstraint(cons_f31) def cons_f32(n, m): return Less(S(0), m, n) cons32 = CustomConstraint(cons_f32) def cons_f33(n, m): return OddQ(n/GCD(m, n)) cons33 = CustomConstraint(cons_f33) def cons_f34(a, b): return PosQ(a/b) cons34 = CustomConstraint(cons_f34) def cons_f35(n, m, p): return IntegersQ(m, n, p) cons35 = CustomConstraint(cons_f35) def cons_f36(n, m, p): return Less(S(0), m, p, n) cons36 = CustomConstraint(cons_f36) def cons_f37(q, n, m, p): return IntegersQ(m, n, p, q) cons37 = CustomConstraint(cons_f37) def cons_f38(n, q, m, p): return Less(S(0), m, p, q, n) cons38 = CustomConstraint(cons_f38) def cons_f39(n): return IntegerQ(n/S(2)) cons39 = CustomConstraint(cons_f39) def cons_f40(p): return NegativeIntegerQ(p) cons40 = CustomConstraint(cons_f40) def cons_f41(n, m): return IntegersQ(m, n/S(2)) cons41 = CustomConstraint(cons_f41) def cons_f42(n, m): return Unequal(m, n/S(2)) cons42 = CustomConstraint(cons_f42) def cons_f43(c, b, a): return NonzeroQ(-S(4)*a*c + b**S(2)) cons43 = CustomConstraint(cons_f43) def cons_f44(j, n, m): return IntegersQ(m, n, j) cons44 = CustomConstraint(cons_f44) def cons_f45(n, m): return Less(S(0), m, S(2)*n) cons45 = CustomConstraint(cons_f45) def cons_f46(n, m, p): return Not(And(Equal(m, n), Equal(p, S(-1)))) cons46 = CustomConstraint(cons_f46) def cons_f47(v, x): if not isinstance(x, Symbol): return False return PolynomialQ(v, x) cons47 = CustomConstraint(cons_f47) def cons_f48(v, x): if not isinstance(x, Symbol): return False return BinomialQ(v, x) cons48 = CustomConstraint(cons_f48) def cons_f49(v, x, u): if not isinstance(x, Symbol): return False return Inequality(Exponent(u, x), Equal, Exponent(v, x) + S(-1), GreaterEqual, S(2)) cons49 = CustomConstraint(cons_f49) def cons_f50(v, x, u): if not isinstance(x, Symbol): return False return GreaterEqual(Exponent(u, x), Exponent(v, x)) cons50 = CustomConstraint(cons_f50) def cons_f51(p): return Not(IntegerQ(p)) cons51 = CustomConstraint(cons_f51) def With2(e, b, c, f, n, a, g, h, x, d, m): tmp = a*h - b*g k = Symbol('k') return f**(e*(c + d*x)**n)*SimplifyTerm(h**(-m)*tmp**m, x)/(g + h*x) + Sum_doit(f**(e*(c + d*x)**n)*(a + b*x)**(-k + m)*SimplifyTerm(b*h**(-k)*tmp**(k - 1), x), List(k, 1, m)) pattern2 = Pattern(UtilityOperator(f_**((x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*WC('e', S(1)))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons3, cons4, cons5, cons6, cons7, cons8, cons9, cons10, cons1, cons2) rule2 = ReplacementRule(pattern2, With2) pattern3 = Pattern(UtilityOperator(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*WC('b', S(1)))*x_**WC('m', S(1))*(e_ + x_*WC('f', S(1)))**WC('p', S(1)), x_), cons12, cons4, cons5, cons6, cons7, cons8, cons13, cons14, cons15, cons11) def replacement3(e, b, c, f, n, p, F, x, d, m): return If(And(PositiveIntegerQ(m, p), LessEqual(m, p), Or(EqQ(n, S(1)), ZeroQ(-c*f + d*e))), ExpandLinearProduct(F**(b*(c + d*x)**n)*(e + f*x)**p, x**m, e, f, x), If(PositiveIntegerQ(p), Distribute(F**(b*(c + d*x)**n)*x**m*(e + f*x)**p, Plus, Times), ExpandIntegrand(F**(b*(c + d*x)**n), x**m*(e + f*x)**p, x))) rule3 = ReplacementRule(pattern3, replacement3) pattern4 = Pattern(UtilityOperator(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*x_**WC('m', S(1))*(e_ + x_*WC('f', S(1)))**WC('p', S(1)), x_), cons12, cons3, cons4, cons5, cons6, cons7, cons8, cons13, cons14, cons15, cons16) def replacement4(e, b, c, f, n, a, p, F, x, d, m): return If(And(PositiveIntegerQ(m, p), LessEqual(m, p), Or(EqQ(n, S(1)), ZeroQ(-c*f + d*e))), ExpandLinearProduct(F**(a + b*(c + d*x)**n)*(e + f*x)**p, x**m, e, f, x), If(PositiveIntegerQ(p), Distribute(F**(a + b*(c + d*x)**n)*x**m*(e + f*x)**p, Plus, Times), ExpandIntegrand(F**(a + b*(c + d*x)**n), x**m*(e + f*x)**p, x))) rule4 = ReplacementRule(pattern4, replacement4) def With5(b, v, c, n, a, F, u, x, d, m): if not isinstance(x, Symbol) or not (FreeQ([F, a, b, c, d], x) and IntegersQ(m, n) and n < 0): return False w = ExpandIntegrand((a + b*x)**m*(c + d*x)**n, x) w = ReplaceAll(w, Rule(x, F**v)) if SumQ(w): return True return False pattern5 = Pattern(UtilityOperator((F_**v_*WC('b', S(1)) + a_)**WC('m', S(1))*(F_**v_*WC('d', S(1)) + c_)**n_*WC('u', S(1)), x_), cons12, cons3, cons4, cons5, cons6, cons17, cons18, CustomConstraint(With5)) def replacement5(b, v, c, n, a, F, u, x, d, m): w = ReplaceAll(ExpandIntegrand((a + b*x)**m*(c + d*x)**n, x), Rule(x, F**v)) return w.func(*[u*i for i in w.args]) rule5 = ReplacementRule(pattern5, replacement5) def With6(e, b, c, f, n, a, x, u, d, m): if not isinstance(x, Symbol) or not (FreeQ([a, b, c, d, e, f, m, n], x) and PolynomialQ(u,x)): return False v = ExpandIntegrand(u*(a + b*x)**m, x) if SumQ(v): return True return False pattern6 = Pattern(UtilityOperator(f_**((x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*WC('e', S(1)))*u_*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), cons3, cons4, cons5, cons6, cons7, cons8, cons13, cons14, cons19, CustomConstraint(With6)) def replacement6(e, b, c, f, n, a, x, u, d, m): v = ExpandIntegrand(u*(a + b*x)**m, x) return Distribute(f**(e*(c + d*x)**n)*v, Plus, Times) rule6 = ReplacementRule(pattern6, replacement6) pattern7 = Pattern(UtilityOperator(u_*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*Log((x_**WC('n', S(1))*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*WC('c', S(1))), x_), cons3, cons4, cons5, cons6, cons7, cons13, cons14, cons15, cons19) def replacement7(e, b, c, n, a, p, x, u, d, m): return ExpandIntegrand(Log(c*(d + e*x**n)**p), u*(a + b*x)**m, x) rule7 = ReplacementRule(pattern7, replacement7) pattern8 = Pattern(UtilityOperator(f_**((x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*WC('e', S(1)))*u_, x_), cons5, cons6, cons7, cons8, cons14, cons19) def replacement8(e, c, f, n, x, u, d): return If(EqQ(n, S(1)), ExpandIntegrand(f**(e*(c + d*x)**n), u, x), ExpandLinearProduct(f**(e*(c + d*x)**n), u, c, d, x)) rule8 = ReplacementRule(pattern8, replacement8) # pattern9 = Pattern(UtilityOperator(F_**u_*(G_*u_*WC('b', S(1)) + a_)**WC('n', S(1)), x_), cons3, cons4, cons17, cons20) # def replacement9(b, G, n, a, F, u, x, m): # return ReplaceAll(ExpandIntegrand(x**(-m)*(a + b*x)**n, x), Rule(x, G(u))) # rule9 = ReplacementRule(pattern9, replacement9) pattern10 = Pattern(UtilityOperator(u_*(WC('a', S(0)) + WC('b', S(1))*Log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_, x_), cons3, cons4, cons5, cons6, cons7, cons8, cons14, cons15, cons21, cons19) def replacement10(e, b, c, f, n, a, p, x, u, d, q): return ExpandLinearProduct((a + b*Log(c*(d*(e + f*x)**p)**q))**n, u, e, f, x) rule10 = ReplacementRule(pattern10, replacement10) # pattern11 = Pattern(UtilityOperator(u_*(F_*(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons3, cons4, cons5, cons6, cons14, cons19, cons22) # def replacement11(b, c, n, a, F, u, x, d): # return ExpandLinearProduct((a + b*F(c + d*x))**n, u, c, d, x) # rule11 = ReplacementRule(pattern11, replacement11) pattern12 = Pattern(UtilityOperator(WC('u', S(1))/(x_**n_*WC('a', S(1)) + sqrt(c_ + x_**j_*WC('d', S(1)))*WC('b', S(1))), x_), cons3, cons4, cons5, cons6, cons14, cons23) def replacement12(b, c, n, a, x, u, d, j): return ExpandIntegrand(u*(a*x**n - b*sqrt(c + d*x**(S(2)*n)))/(-b**S(2)*c + x**(S(2)*n)*(a**S(2) - b**S(2)*d)), x) rule12 = ReplacementRule(pattern12, replacement12) pattern13 = Pattern(UtilityOperator((a_ + x_*WC('b', S(1)))**m_/(c_ + x_*WC('d', S(1))), x_), cons3, cons4, cons5, cons6, cons1) def replacement13(b, c, a, x, d, m): if RationalQ(a, b, c, d): return ExpandExpression((a + b*x)**m/(c + d*x), x) else: tmp = a*d - b*c k = Symbol("k") return Sum_doit((a + b*x)**(-k + m)*SimplifyTerm(b*d**(-k)*tmp**(k + S(-1)), x), List(k, S(1), m)) + SimplifyTerm(d**(-m)*tmp**m, x)/(c + d*x) rule13 = ReplacementRule(pattern13, replacement13) pattern14 = Pattern(UtilityOperator((A_ + x_*WC('B', S(1)))*(a_ + x_*WC('b', S(1)))**WC('m', S(1))/(c_ + x_*WC('d', S(1))), x_), cons3, cons4, cons5, cons6, cons24, cons25, cons1) def replacement14(b, B, A, c, a, x, d, m): if RationalQ(a, b, c, d, A, B): return ExpandExpression((A + B*x)*(a + b*x)**m/(c + d*x), x) else: tmp1 = (A*d - B*c)/d tmp2 = ExpandIntegrand((a + b*x)**m/(c + d*x), x) tmp2 = If(SumQ(tmp2), tmp2.func(*[SimplifyTerm(tmp1*i, x) for i in tmp2.args]), SimplifyTerm(tmp1*tmp2, x)) return SimplifyTerm(B/d, x)*(a + b*x)**m + tmp2 rule14 = ReplacementRule(pattern14, replacement14) def With15(b, a, x, u, m): tmp1 = ExpandLinearProduct((a + b*x)**m, u, a, b, x) if not IntegerQ(m): return tmp1 else: tmp2 = ExpandExpression(u*(a + b*x)**m, x) if SumQ(tmp2) and LessEqual(LeafCount(tmp2), LeafCount(tmp1) + S(2)): return tmp2 else: return tmp1 pattern15 = Pattern(UtilityOperator(u_*(a_ + x_*WC('b', S(1)))**m_, x_), cons3, cons4, cons13, cons19, cons26) rule15 = ReplacementRule(pattern15, With15) pattern16 = Pattern(UtilityOperator(u_*v_**n_*(a_ + x_*WC('b', S(1)))**m_, x_), cons27) def replacement16(b, v, n, a, x, u, m): s = PolynomialQuotientRemainder(u, v**(-n)*(a+b*x)**(-IntegerPart(m)), x) return ExpandIntegrand((a + b*x)**FractionalPart(m)*s[0], x) + ExpandIntegrand(v**n*(a + b*x)**m*s[1], x) rule16 = ReplacementRule(pattern16, replacement16) pattern17 = Pattern(UtilityOperator(u_*v_**n_*(a_ + x_*WC('b', S(1)))**m_, x_), cons28) def replacement17(b, v, n, a, x, u, m): s = PolynomialQuotientRemainder(u, v**(-n),x) return ExpandIntegrand((a + b*x)**(m)*s[0], x) + ExpandIntegrand(v**n*(a + b*x)**m*s[1], x) rule17 = ReplacementRule(pattern17, replacement17) def With18(b, n, a, x, u): r = Numerator(Rt(-a/b, S(2))) s = Denominator(Rt(-a/b, S(2))) return r/(S(2)*a*(r + s*u**(n/S(2)))) + r/(S(2)*a*(r - s*u**(n/S(2)))) pattern18 = Pattern(UtilityOperator(S(1)/(a_ + u_**n_*WC('b', S(1))), x_), cons3, cons4, cons29) rule18 = ReplacementRule(pattern18, With18) def With19(b, n, a, x, u): k = Symbol("k") r = Numerator(Rt(-a/b, n)) s = Denominator(Rt(-a/b, n)) return Sum_doit(r/(a*n*(-(-1)**(2*k/n)*s*u + r)), List(k, 1, n)) pattern19 = Pattern(UtilityOperator(S(1)/(a_ + u_**n_*WC('b', S(1))), x_), cons3, cons4, cons30, cons31) rule19 = ReplacementRule(pattern19, With19) def With20(b, n, a, x, u, m): k = Symbol("k") g = GCD(m, n) r = Numerator(Rt(a/b, n/GCD(m, n))) s = Denominator(Rt(a/b, n/GCD(m, n))) return If(CoprimeQ(g + m, n), Sum_doit((-1)**(-2*k*m/n)*r*(-r/s)**(m/g)/(a*n*((-1)**(2*g*k/n)*s*u**g + r)), List(k, 1, n/g)), Sum_doit((-1)**(2*k*(g + m)/n)*r*(-r/s)**(m/g)/(a*n*((-1)**(2*g*k/n)*r + s*u**g)), List(k, 1, n/g))) pattern20 = Pattern(UtilityOperator(u_**WC('m', S(1))/(a_ + u_**n_*WC('b', S(1))), x_), cons3, cons4, cons17, cons32, cons33, cons34) rule20 = ReplacementRule(pattern20, With20) def With21(b, n, a, x, u, m): k = Symbol("k") g = GCD(m, n) r = Numerator(Rt(-a/b, n/GCD(m, n))) s = Denominator(Rt(-a/b, n/GCD(m, n))) return If(Equal(n/g, S(2)), s/(S(2)*b*(r + s*u**g)) - s/(S(2)*b*(r - s*u**g)), If(CoprimeQ(g + m, n), Sum_doit((S(-1))**(-S(2)*k*m/n)*r*(r/s)**(m/g)/(a*n*(-(S(-1))**(S(2)*g*k/n)*s*u**g + r)), List(k, S(1), n/g)), Sum_doit((S(-1))**(S(2)*k*(g + m)/n)*r*(r/s)**(m/g)/(a*n*((S(-1))**(S(2)*g*k/n)*r - s*u**g)), List(k, S(1), n/g)))) pattern21 = Pattern(UtilityOperator(u_**WC('m', S(1))/(a_ + u_**n_*WC('b', S(1))), x_), cons3, cons4, cons17, cons32) rule21 = ReplacementRule(pattern21, With21) def With22(b, c, n, a, x, u, d, m): k = Symbol("k") r = Numerator(Rt(-a/b, n)) s = Denominator(Rt(-a/b, n)) return Sum_doit((c*r + (-1)**(-2*k*m/n)*d*r*(r/s)**m)/(a*n*(-(-1)**(2*k/n)*s*u + r)), List(k, 1, n)) pattern22 = Pattern(UtilityOperator((c_ + u_**WC('m', S(1))*WC('d', S(1)))/(a_ + u_**n_*WC('b', S(1))), x_), cons3, cons4, cons5, cons6, cons17, cons32) rule22 = ReplacementRule(pattern22, With22) def With23(e, b, c, n, a, p, x, u, d, m): k = Symbol("k") r = Numerator(Rt(-a/b, n)) s = Denominator(Rt(-a/b, n)) return Sum_doit((c*r + (-1)**(-2*k*p/n)*e*r*(r/s)**p + (-1)**(-2*k*m/n)*d*r*(r/s)**m)/(a*n*(-(-1)**(2*k/n)*s*u + r)), List(k, 1, n)) pattern23 = Pattern(UtilityOperator((u_**p_*WC('e', S(1)) + u_**WC('m', S(1))*WC('d', S(1)) + WC('c', S(0)))/(a_ + u_**n_*WC('b', S(1))), x_), cons3, cons4, cons5, cons6, cons7, cons35, cons36) rule23 = ReplacementRule(pattern23, With23) def With24(e, b, c, f, n, a, p, x, u, d, q, m): k = Symbol("k") r = Numerator(Rt(-a/b, n)) s = Denominator(Rt(-a/b, n)) return Sum_doit((c*r + (-1)**(-2*k*q/n)*f*r*(r/s)**q + (-1)**(-2*k*p/n)*e*r*(r/s)**p + (-1)**(-2*k*m/n)*d*r*(r/s)**m)/(a*n*(-(-1)**(2*k/n)*s*u + r)), List(k, 1, n)) pattern24 = Pattern(UtilityOperator((u_**p_*WC('e', S(1)) + u_**q_*WC('f', S(1)) + u_**WC('m', S(1))*WC('d', S(1)) + WC('c', S(0)))/(a_ + u_**n_*WC('b', S(1))), x_), cons3, cons4, cons5, cons6, cons7, cons8, cons37, cons38) rule24 = ReplacementRule(pattern24, With24) def With25(c, n, a, p, x, u): q = Symbol('q') return ReplaceAll(ExpandIntegrand(c**(-p), (c*x - q)**p*(c*x + q)**p, x), List(Rule(q, Rt(-a*c, S(2))), Rule(x, u**(n/S(2))))) pattern25 = Pattern(UtilityOperator((a_ + u_**WC('n', S(1))*WC('c', S(1)))**p_, x_), cons3, cons5, cons39, cons40) rule25 = ReplacementRule(pattern25, With25) def With26(c, n, a, p, x, u, m): q = Symbol('q') return ReplaceAll(ExpandIntegrand(c**(-p), x**m*(c*x**(n/S(2)) - q)**p*(c*x**(n/S(2)) + q)**p, x), List(Rule(q, Rt(-a*c, S(2))), Rule(x, u))) pattern26 = Pattern(UtilityOperator(u_**WC('m', S(1))*(u_**WC('n', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons3, cons5, cons41, cons40, cons32, cons42) rule26 = ReplacementRule(pattern26, With26) def With27(b, c, n, a, p, x, u, j): q = Symbol('q') return ReplaceAll(ExpandIntegrand(S(4)**(-p)*c**(-p), (b + S(2)*c*x - q)**p*(b + S(2)*c*x + q)**p, x), List(Rule(q, Rt(-S(4)*a*c + b**S(2), S(2))), Rule(x, u**n))) pattern27 = Pattern(UtilityOperator((u_**WC('j', S(1))*WC('c', S(1)) + u_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons3, cons4, cons5, cons30, cons23, cons40, cons43) rule27 = ReplacementRule(pattern27, With27) def With28(b, c, n, a, p, x, u, j, m): q = Symbol('q') return ReplaceAll(ExpandIntegrand(S(4)**(-p)*c**(-p), x**m*(b + S(2)*c*x**n - q)**p*(b + S(2)*c*x**n + q)**p, x), List(Rule(q, Rt(-S(4)*a*c + b**S(2), S(2))), Rule(x, u))) pattern28 = Pattern(UtilityOperator(u_**WC('m', S(1))*(u_**WC('j', S(1))*WC('c', S(1)) + u_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons3, cons4, cons5, cons44, cons23, cons40, cons45, cons46, cons43) rule28 = ReplacementRule(pattern28, With28) def With29(b, c, n, a, x, u, d, j): q = Rt(-a/b, S(2)) return -(c - d*q)/(S(2)*b*q*(q + u**n)) - (c + d*q)/(S(2)*b*q*(q - u**n)) pattern29 = Pattern(UtilityOperator((u_**WC('n', S(1))*WC('d', S(1)) + WC('c', S(0)))/(a_ + u_**WC('j', S(1))*WC('b', S(1))), x_), cons3, cons4, cons5, cons6, cons14, cons23) rule29 = ReplacementRule(pattern29, With29) def With30(e, b, c, f, n, a, g, x, u, d, j): q = Rt(-S(4)*a*c + b**S(2), S(2)) r = TogetherSimplify((-b*e*g + S(2)*c*(d + e*f))/q) return (e*g - r)/(b + 2*c*u**n + q) + (e*g + r)/(b + 2*c*u**n - q) pattern30 = Pattern(UtilityOperator(((u_**WC('n', S(1))*WC('g', S(1)) + WC('f', S(0)))*WC('e', S(1)) + WC('d', S(0)))/(u_**WC('j', S(1))*WC('c', S(1)) + u_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons3, cons4, cons5, cons6, cons7, cons8, cons9, cons14, cons23, cons43) rule30 = ReplacementRule(pattern30, With30) def With31(v, x, u): lst = CoefficientList(u, x) i = Symbol('i') return x**Exponent(u, x)*lst[-1]/v + Sum_doit(x**(i - 1)*Part(lst, i), List(i, 1, Exponent(u, x)))/v pattern31 = Pattern(UtilityOperator(u_/v_, x_), cons19, cons47, cons48, cons49) rule31 = ReplacementRule(pattern31, With31) pattern32 = Pattern(UtilityOperator(u_/v_, x_), cons19, cons47, cons50) def replacement32(v, x, u): return PolynomialDivide(u, v, x) rule32 = ReplacementRule(pattern32, replacement32) pattern33 = Pattern(UtilityOperator(u_*(x_*WC('a', S(1)))**p_, x_), cons51, cons19) def replacement33(x, a, u, p): return ExpandToSum((a*x)**p, u, x) rule33 = ReplacementRule(pattern33, replacement33) pattern34 = Pattern(UtilityOperator(v_**p_*WC('u', S(1)), x_), cons51) def replacement34(v, x, u, p): return ExpandIntegrand(NormalizeIntegrand(v**p, x), u, x) rule34 = ReplacementRule(pattern34, replacement34) pattern35 = Pattern(UtilityOperator(u_, x_)) def replacement35(x, u): return ExpandExpression(u, x) rule35 = ReplacementRule(pattern35, replacement35) return [ rule2,rule3, rule4, rule5, rule6, rule7, rule8, rule10, rule12, rule13, rule14, rule15, rule16, rule17, rule18, rule19, rule20, rule21, rule22, rule23, rule24, rule25, rule26, rule27, rule28, rule29, rule30, rule31, rule32, rule33, rule34, rule35] def _RemoveContentAux(): def cons_f1(b, a): return IntegersQ(a, b) cons1 = CustomConstraint(cons_f1) def cons_f2(b, a): return Equal(a + b, S(0)) cons2 = CustomConstraint(cons_f2) def cons_f3(m): return RationalQ(m) cons3 = CustomConstraint(cons_f3) def cons_f4(m, n): return RationalQ(m, n) cons4 = CustomConstraint(cons_f4) def cons_f5(m, n): return GreaterEqual(-m + n, S(0)) cons5 = CustomConstraint(cons_f5) def cons_f6(a, x): return FreeQ(a, x) cons6 = CustomConstraint(cons_f6) def cons_f7(m, n, p): return RationalQ(m, n, p) cons7 = CustomConstraint(cons_f7) def cons_f8(m, p): return GreaterEqual(-m + p, S(0)) cons8 = CustomConstraint(cons_f8) pattern1 = Pattern(UtilityOperator(a_**m_*WC('u', S(1)) + b_*WC('v', S(1)), x_), cons1, cons2, cons3) def replacement1(v, x, a, u, m, b): return If(Greater(m, S(1)), RemoveContentAux(a**(m + S(-1))*u - v, x), RemoveContentAux(-a**(-m + S(1))*v + u, x)) rule1 = ReplacementRule(pattern1, replacement1) pattern2 = Pattern(UtilityOperator(a_**WC('m', S(1))*WC('u', S(1)) + a_**WC('n', S(1))*WC('v', S(1)), x_), cons6, cons4, cons5) def replacement2(n, v, x, u, m, a): return RemoveContentAux(a**(-m + n)*v + u, x) rule2 = ReplacementRule(pattern2, replacement2) pattern3 = Pattern(UtilityOperator(a_**WC('m', S(1))*WC('u', S(1)) + a_**WC('n', S(1))*WC('v', S(1)) + a_**WC('p', S(1))*WC('w', S(1)), x_), cons6, cons7, cons5, cons8) def replacement3(n, v, x, p, u, w, m, a): return RemoveContentAux(a**(-m + n)*v + a**(-m + p)*w + u, x) rule3 = ReplacementRule(pattern3, replacement3) pattern4 = Pattern(UtilityOperator(u_, x_)) def replacement4(u, x): return If(And(SumQ(u), NegQ(First(u))), -u, u) rule4 = ReplacementRule(pattern4, replacement4) return [rule1, rule2, rule3, rule4, ] IntHide = Int Log = rubi_log Null = None if matchpy: RemoveContentAux_replacer = ManyToOneReplacer(* _RemoveContentAux()) ExpandIntegrand_rules = _ExpandIntegrand() TrigSimplifyAux_replacer = _TrigSimplifyAux() SimplifyAntiderivative_replacer = _SimplifyAntiderivative() SimplifyAntiderivativeSum_replacer = _SimplifyAntiderivativeSum() FixSimplify_rules = _FixSimplify() SimpFixFactor_replacer = _SimpFixFactor()
cee8bf9b997278d7021a12947d1ca6b53a7a40e6658ab239d1c4103f59a83275
from sympy.external import import_module matchpy = import_module("matchpy") from sympy.utilities.decorator import doctest_depends_on if matchpy: from matchpy import Wildcard else: class Wildcard: def __init__(self, min_length, fixed_size, variable_name, optional): pass from sympy.core.symbol import Symbol @doctest_depends_on(modules=('matchpy',)) class matchpyWC(Wildcard, Symbol): def __init__(self, min_length, fixed_size, variable_name=None, optional=None, **assumptions): Wildcard.__init__(self, min_length, fixed_size, str(variable_name), optional) def __new__(cls, min_length, fixed_size, variable_name=None, optional=None, **assumptions): cls._sanitize(assumptions, cls) return matchpyWC.__xnew__(cls, min_length, fixed_size, variable_name, optional, **assumptions) def __getnewargs__(self): return (self.min_count, self.fixed_size, self.variable_name, self.optional) @staticmethod def __xnew__(cls, min_length, fixed_size, variable_name=None, optional=None, **assumptions): obj = Symbol.__xnew__(cls, variable_name, **assumptions) return obj def _hashable_content(self): if self.optional: return super()._hashable_content() + (self.min_count, self.fixed_size, self.variable_name, self.optional) else: return super()._hashable_content() + (self.min_count, self.fixed_size, self.variable_name) @doctest_depends_on(modules=('matchpy',)) def WC(variable_name=None, optional=None, **assumptions): return matchpyWC(1, True, variable_name, optional)
762ff402cb9cded8eb2ac4199c0782c32a06625bdc5184c711ef3e21e7cdc5fb
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def cons_f1(a): return ZeroQ(a) cons1 = CustomConstraint(cons_f1) def cons_f2(a, x): return FreeQ(a, x) cons2 = CustomConstraint(cons_f2) def cons_f3(b, x): return FreeQ(b, x) cons3 = CustomConstraint(cons_f3) def cons_f4(n, x): return FreeQ(n, x) cons4 = CustomConstraint(cons_f4) def cons_f5(p, x): return FreeQ(p, x) cons5 = CustomConstraint(cons_f5) def cons_f6(b): return ZeroQ(b) cons6 = CustomConstraint(cons_f6) def cons_f7(j, n): return ZeroQ(j - S(2)*n) cons7 = CustomConstraint(cons_f7) def cons_f8(c, x): return FreeQ(c, x) cons8 = CustomConstraint(cons_f8) def cons_f9(c): return ZeroQ(c) cons9 = CustomConstraint(cons_f9) def cons_f10(v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(FreeQ(v, x)) cons10 = CustomConstraint(cons_f10) def cons_f11(Pm, x): if isinstance(x, (int, Integer, float, Float)): return False return PolyQ(Pm, x) cons11 = CustomConstraint(cons_f11) def cons_f12(p): return Not(RationalQ(p)) cons12 = CustomConstraint(cons_f12) def cons_f13(p): return RationalQ(p) cons13 = CustomConstraint(cons_f13) def cons_f14(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c), x) cons14 = CustomConstraint(cons_f14) def cons_f15(a): return EqQ(a**S(2), S(1)) cons15 = CustomConstraint(cons_f15) def cons_f16(u, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_15(b, v): return FreeQ(b, x) _cons_15 = CustomConstraint(_cons_f_15) pat = Pattern(UtilityOperator(b_*v_, x), _cons_15) result_matchq = is_match(UtilityOperator(u, x), pat) return Not(result_matchq) cons16 = CustomConstraint(cons_f16) def cons_f17(u): return SumQ(u) cons17 = CustomConstraint(cons_f17) def cons_f18(u, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_17(a, b, v): return And(FreeQ(List(a, b), x), InverseFunctionQ(v)) _cons_17 = CustomConstraint(_cons_f_17) pat = Pattern(UtilityOperator(a_ + v_*WC('b', S(1)), x), _cons_17) result_matchq = is_match(UtilityOperator(u, x), pat) return Not(result_matchq) cons18 = CustomConstraint(cons_f18) def cons_f19(m, x): return FreeQ(m, x) cons19 = CustomConstraint(cons_f19) def cons_f20(m): return IntegerQ(m) cons20 = CustomConstraint(cons_f20) def cons_f21(m): return Not(IntegerQ(m)) cons21 = CustomConstraint(cons_f21) def cons_f22(n): return PositiveIntegerQ(n + S(1)/2) cons22 = CustomConstraint(cons_f22) def cons_f23(m, n): return IntegerQ(m + n) cons23 = CustomConstraint(cons_f23) def cons_f24(n): return NegativeIntegerQ(n + S(-1)/2) cons24 = CustomConstraint(cons_f24) def cons_f25(n): return Not(IntegerQ(n)) cons25 = CustomConstraint(cons_f25) def cons_f26(m, n): return Not(IntegerQ(m + n)) cons26 = CustomConstraint(cons_f26) def cons_f27(a, b, c, d): return ZeroQ(-a*d + b*c) cons27 = CustomConstraint(cons_f27) def cons_f28(a, b, c, d, n, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(Not(IntegerQ(n)), SimplerQ(c + d*x, a + b*x)) cons28 = CustomConstraint(cons_f28) def cons_f29(d, x): return FreeQ(d, x) cons29 = CustomConstraint(cons_f29) def cons_f30(b, d): return PositiveQ(b/d) cons30 = CustomConstraint(cons_f30) def cons_f31(m, n): return Not(Or(IntegerQ(m), IntegerQ(n))) cons31 = CustomConstraint(cons_f31) def cons_f32(b, d, m, n): return Not(Or(IntegerQ(m), IntegerQ(n), PositiveQ(b/d))) cons32 = CustomConstraint(cons_f32) def cons_f33(m): return RationalQ(m) cons33 = CustomConstraint(cons_f33) def cons_f34(m): return LessEqual(m, S(-1)) cons34 = CustomConstraint(cons_f34) def cons_f35(A, B, C, a, b): return ZeroQ(A*b**S(2) - B*a*b + C*a**S(2)) cons35 = CustomConstraint(cons_f35) def cons_f36(A, x): return FreeQ(A, x) cons36 = CustomConstraint(cons_f36) def cons_f37(B, x): return FreeQ(B, x) cons37 = CustomConstraint(cons_f37) def cons_f38(C, x): return FreeQ(C, x) cons38 = CustomConstraint(cons_f38) def cons_f39(n, q): return ZeroQ(n + q) cons39 = CustomConstraint(cons_f39) def cons_f40(p): return IntegerQ(p) cons40 = CustomConstraint(cons_f40) def cons_f41(a, b, c, d): return ZeroQ(a*c - b*d) cons41 = CustomConstraint(cons_f41) def cons_f42(m, n): return Not(And(IntegerQ(m), NegQ(n))) cons42 = CustomConstraint(cons_f42) def cons_f43(m, p): return ZeroQ(m + p) cons43 = CustomConstraint(cons_f43) def cons_f44(a, b, c, d): return ZeroQ(a**S(2)*d + b**S(2)*c) cons44 = CustomConstraint(cons_f44) def cons_f45(a): return PositiveQ(a) cons45 = CustomConstraint(cons_f45) def cons_f46(d): return NegativeQ(d) cons46 = CustomConstraint(cons_f46) def cons_f47(a, b, c): return ZeroQ(-S(4)*a*c + b**S(2)) cons47 = CustomConstraint(cons_f47) def cons_f48(n, n2): return ZeroQ(-S(2)*n + n2) cons48 = CustomConstraint(cons_f48) def cons_f49(b, c, d, e): return ZeroQ(-b*e + S(2)*c*d) cons49 = CustomConstraint(cons_f49) def cons_f50(e, x): return FreeQ(e, x) cons50 = CustomConstraint(cons_f50) def cons_f51(p, q): return PosQ(-p + q) cons51 = CustomConstraint(cons_f51) def cons_f52(q, x): return FreeQ(q, x) cons52 = CustomConstraint(cons_f52) def cons_f53(p, r): return PosQ(-p + r) cons53 = CustomConstraint(cons_f53) def cons_f54(r, x): return FreeQ(r, x) cons54 = CustomConstraint(cons_f54) def cons_f55(m, n): return ZeroQ(m - n + S(1)) cons55 = CustomConstraint(cons_f55) def cons_f56(p): return NonzeroQ(p + S(1)) cons56 = CustomConstraint(cons_f56) def cons_f57(a1, a2, b1, b2): return ZeroQ(a1*b2 + a2*b1) cons57 = CustomConstraint(cons_f57) def cons_f58(m, n): return ZeroQ(m - S(2)*n + S(1)) cons58 = CustomConstraint(cons_f58) def cons_f59(a1, x): return FreeQ(a1, x) cons59 = CustomConstraint(cons_f59) def cons_f60(b1, x): return FreeQ(b1, x) cons60 = CustomConstraint(cons_f60) def cons_f61(a2, x): return FreeQ(a2, x) cons61 = CustomConstraint(cons_f61) def cons_f62(b2, x): return FreeQ(b2, x) cons62 = CustomConstraint(cons_f62) def cons_f63(Qm, x): if isinstance(x, (int, Integer, float, Float)): return False return PolyQ(Qm, x) cons63 = CustomConstraint(cons_f63) def cons_f64(m): return PositiveIntegerQ(m) cons64 = CustomConstraint(cons_f64) def cons_f65(p): return NegativeIntegerQ(p) cons65 = CustomConstraint(cons_f65) def cons_f66(Pq, x): if isinstance(x, (int, Integer, float, Float)): return False return PolyQ(Pq, x) cons66 = CustomConstraint(cons_f66) def cons_f67(Qr, x): if isinstance(x, (int, Integer, float, Float)): return False return PolyQ(Qr, x) cons67 = CustomConstraint(cons_f67) def cons_f68(m): return NonzeroQ(m + S(1)) cons68 = CustomConstraint(cons_f68) def cons_f69(a, b, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b), x) cons69 = CustomConstraint(cons_f69) def cons_f70(u, x): if isinstance(x, (int, Integer, float, Float)): return False return LinearQ(u, x) cons70 = CustomConstraint(cons_f70) def cons_f71(u, x): if isinstance(x, (int, Integer, float, Float)): return False return NonzeroQ(u - x) cons71 = CustomConstraint(cons_f71) def cons_f72(a, b, c, d): return ZeroQ(a*d + b*c) cons72 = CustomConstraint(cons_f72) def cons_f73(a, b, c, d): return NonzeroQ(-a*d + b*c) cons73 = CustomConstraint(cons_f73) def cons_f74(m, n): return ZeroQ(m + n + S(2)) cons74 = CustomConstraint(cons_f74) def cons_f75(m): return PositiveIntegerQ(m + S(1)/2) cons75 = CustomConstraint(cons_f75) def cons_f76(m): return NegativeIntegerQ(m + S(3)/2) cons76 = CustomConstraint(cons_f76) def cons_f77(a, c, m): return Or(IntegerQ(m), And(PositiveQ(a), PositiveQ(c))) cons77 = CustomConstraint(cons_f77) def cons_f78(a, c): return ZeroQ(a + c) cons78 = CustomConstraint(cons_f78) def cons_f79(m): return Not(IntegerQ(S(2)*m)) cons79 = CustomConstraint(cons_f79) def cons_f80(a, b, c, d): return PosQ(b*d/(a*c)) cons80 = CustomConstraint(cons_f80) def cons_f81(m): return IntegerQ(m + S(1)/2) cons81 = CustomConstraint(cons_f81) def cons_f82(n): return IntegerQ(n + S(1)/2) cons82 = CustomConstraint(cons_f82) def cons_f83(m, n): return Less(S(0), m, n) cons83 = CustomConstraint(cons_f83) def cons_f84(m, n): return Less(m, n, S(0)) cons84 = CustomConstraint(cons_f84) def cons_f85(c, m, n): return Or(Not(IntegerQ(n)), And(ZeroQ(c), LessEqual(S(7)*m + S(4)*n, S(0))), Less(S(9)*m + S(5)*n + S(5), S(0)), Greater(m + n + S(2), S(0))) cons85 = CustomConstraint(cons_f85) def cons_f86(m): return NegativeIntegerQ(m) cons86 = CustomConstraint(cons_f86) def cons_f87(n): return IntegerQ(n) cons87 = CustomConstraint(cons_f87) def cons_f88(m, n): return Not(And(PositiveIntegerQ(n), Less(m + n + S(2), S(0)))) cons88 = CustomConstraint(cons_f88) def cons_f89(n): return RationalQ(n) cons89 = CustomConstraint(cons_f89) def cons_f90(n): return Greater(n, S(0)) cons90 = CustomConstraint(cons_f90) def cons_f91(n): return Less(n, S(-1)) cons91 = CustomConstraint(cons_f91) def cons_f92(a, b, c, d): return PosQ((-a*d + b*c)/b) cons92 = CustomConstraint(cons_f92) def cons_f93(a, b, c, d): return NegQ((-a*d + b*c)/b) cons93 = CustomConstraint(cons_f93) def cons_f94(n): return Less(S(-1), n, S(0)) cons94 = CustomConstraint(cons_f94) def cons_f95(m, n): return RationalQ(m, n) cons95 = CustomConstraint(cons_f95) def cons_f96(m): return Less(m, S(-1)) cons96 = CustomConstraint(cons_f96) def cons_f97(m, n): return Not(And(IntegerQ(n), Not(IntegerQ(m)))) cons97 = CustomConstraint(cons_f97) def cons_f98(m, n): return Not(And(IntegerQ(m + n), LessEqual(m + n + S(2), S(0)), Or(FractionQ(m), GreaterEqual(m + S(2)*n + S(1), S(0))))) cons98 = CustomConstraint(cons_f98) def cons_f99(a, b, c, d, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return IntLinearcQ(a, b, c, d, m, n, x) cons99 = CustomConstraint(cons_f99) def cons_f100(a, c, m, n): return Not(And(Less(n, S(-1)), Or(ZeroQ(a), And(NonzeroQ(c), Less(m, n), IntegerQ(n))))) cons100 = CustomConstraint(cons_f100) def cons_f101(m, n): return Unequal(m + n + S(1), S(0)) cons101 = CustomConstraint(cons_f101) def cons_f102(m, n): return Not(And(PositiveIntegerQ(m), Or(Not(IntegerQ(n)), Less(S(0), m, n)))) cons102 = CustomConstraint(cons_f102) def cons_f103(m, n): return Not(And(IntegerQ(m + n), Less(m + n + S(2), S(0)))) cons103 = CustomConstraint(cons_f103) def cons_f104(b, d): return ZeroQ(b + d) cons104 = CustomConstraint(cons_f104) def cons_f105(a, c): return PositiveQ(a + c) cons105 = CustomConstraint(cons_f105) def cons_f106(a, b, c, d): return PositiveQ(-a*d + b*c) cons106 = CustomConstraint(cons_f106) def cons_f107(b): return PositiveQ(b) cons107 = CustomConstraint(cons_f107) def cons_f108(b, d): return ZeroQ(b - d) cons108 = CustomConstraint(cons_f108) def cons_f109(m): return Less(S(-1), m, S(0)) cons109 = CustomConstraint(cons_f109) def cons_f110(m): return LessEqual(S(3), Denominator(m), S(4)) cons110 = CustomConstraint(cons_f110) def cons_f111(b, d): return PosQ(d/b) cons111 = CustomConstraint(cons_f111) def cons_f112(b, d): return NegQ(d/b) cons112 = CustomConstraint(cons_f112) def cons_f113(m, n): return Equal(m + n + S(1), S(0)) cons113 = CustomConstraint(cons_f113) def cons_f114(m, n): return LessEqual(Denominator(n), Denominator(m)) cons114 = CustomConstraint(cons_f114) def cons_f115(m, n): return NegativeIntegerQ(m + n + S(2)) cons115 = CustomConstraint(cons_f115) def cons_f116(m, n): return Or(SumSimplerQ(m, S(1)), Not(SumSimplerQ(n, S(1)))) cons116 = CustomConstraint(cons_f116) def cons_f117(b, c, d, n): return Or(IntegerQ(n), And(PositiveQ(c), Not(And(ZeroQ(n + S(1)/2), ZeroQ(c**S(2) - d**S(2)), PositiveQ(-d/(b*c)))))) cons117 = CustomConstraint(cons_f117) def cons_f118(b, c, d, m): return Or(IntegerQ(m), PositiveQ(-d/(b*c))) cons118 = CustomConstraint(cons_f118) def cons_f119(c): return Not(PositiveQ(c)) cons119 = CustomConstraint(cons_f119) def cons_f120(b, c, d): return Not(PositiveQ(-d/(b*c))) cons120 = CustomConstraint(cons_f120) def cons_f121(c, d, m, n): return Or(And(RationalQ(m), Not(And(ZeroQ(n + S(1)/2), ZeroQ(c**S(2) - d**S(2))))), Not(RationalQ(n))) cons121 = CustomConstraint(cons_f121) def cons_f122(a, b, c, d): return PositiveQ(b/(-a*d + b*c)) cons122 = CustomConstraint(cons_f122) def cons_f123(a, b, c, d, m, n): return Or(RationalQ(m), Not(And(RationalQ(n), PositiveQ(-d/(-a*d + b*c))))) cons123 = CustomConstraint(cons_f123) def cons_f124(m, n): return Or(RationalQ(m), Not(SimplerQ(n + S(1), m + S(1)))) cons124 = CustomConstraint(cons_f124) def cons_f125(u, x): if isinstance(x, (int, Integer, float, Float)): return False return NonzeroQ(Coefficient(u, x, S(0))) cons125 = CustomConstraint(cons_f125) def cons_f126(m, n): return ZeroQ(m - n) cons126 = CustomConstraint(cons_f126) def cons_f127(f, x): return FreeQ(f, x) cons127 = CustomConstraint(cons_f127) def cons_f128(n, p): return NonzeroQ(n + p + S(2)) cons128 = CustomConstraint(cons_f128) def cons_f129(a, b, c, d, e, f, n, p): return ZeroQ(a*d*f*(n + p + S(2)) - b*(c*f*(p + S(1)) + d*e*(n + S(1)))) cons129 = CustomConstraint(cons_f129) def cons_f130(p): return PositiveIntegerQ(p) cons130 = CustomConstraint(cons_f130) def cons_f131(a, b, e, f): return ZeroQ(a*f + b*e) cons131 = CustomConstraint(cons_f131) def cons_f132(n, p): return Not(And(NegativeIntegerQ(n + p + S(2)), Greater(n + S(2)*p, S(0)))) cons132 = CustomConstraint(cons_f132) def cons_f133(n, p): return Or(NonzeroQ(n + S(1)), Equal(p, S(1))) cons133 = CustomConstraint(cons_f133) def cons_f134(a, b, e, f): return NonzeroQ(a*f + b*e) cons134 = CustomConstraint(cons_f134) def cons_f135(a, b, d, e, f, n, p): return Or(Not(IntegerQ(n)), Less(S(5)*n + S(9)*p, S(0)), GreaterEqual(n + p + S(1), S(0)), And(GreaterEqual(n + p + S(2), S(0)), RationalQ(a, b, d, e, f))) cons135 = CustomConstraint(cons_f135) def cons_f136(a, b, c, d, e, f, n, p): return Or(NegativeIntegerQ(n, p), ZeroQ(p + S(-1)), And(PositiveIntegerQ(p), Or(Not(IntegerQ(n)), LessEqual(S(5)*n + S(9)*p + S(10), S(0)), GreaterEqual(n + p + S(1), S(0)), And(GreaterEqual(n + p + S(2), S(0)), RationalQ(a, b, c, d, e, f))))) cons136 = CustomConstraint(cons_f136) def cons_f137(n, p): return ZeroQ(n + p + S(2)) cons137 = CustomConstraint(cons_f137) def cons_f138(n, p): return Not(And(SumSimplerQ(n, S(1)), Not(SumSimplerQ(p, S(1))))) cons138 = CustomConstraint(cons_f138) def cons_f139(p): return Less(p, S(-1)) cons139 = CustomConstraint(cons_f139) def cons_f140(c, e, n, p): return Or(Not(And(RationalQ(n), Less(n, S(-1)))), IntegerQ(p), Not(Or(IntegerQ(n), Not(Or(ZeroQ(e), Not(Or(ZeroQ(c), Less(p, n)))))))) cons140 = CustomConstraint(cons_f140) def cons_f141(p): return SumSimplerQ(p, S(1)) cons141 = CustomConstraint(cons_f141) def cons_f142(n, p): return NonzeroQ(n + p + S(3)) cons142 = CustomConstraint(cons_f142) def cons_f143(a, b, c, d, e, f, n, p): return ZeroQ(-b*(c*f*(p + S(1)) + d*e*(n + S(1)))*(a*d*f*(n + p + S(4)) - b*(c*f*(p + S(2)) + d*e*(n + S(2)))) + d*f*(a**S(2)*d*f*(n + p + S(3)) - b*(a*(c*f*(p + S(1)) + d*e*(n + S(1))) + b*c*e))*(n + p + S(2))) cons143 = CustomConstraint(cons_f143) def cons_f144(m, n): return ZeroQ(m - n + S(-1)) cons144 = CustomConstraint(cons_f144) def cons_f145(m): return Not(PositiveIntegerQ(m)) cons145 = CustomConstraint(cons_f145) def cons_f146(m, n, p): return NonzeroQ(m + n + p + S(2)) cons146 = CustomConstraint(cons_f146) def cons_f147(p): return Less(S(0), p, S(1)) cons147 = CustomConstraint(cons_f147) def cons_f148(p): return Greater(p, S(1)) cons148 = CustomConstraint(cons_f148) def cons_f149(p): return Not(IntegerQ(p)) cons149 = CustomConstraint(cons_f149) def cons_f150(n): return PositiveIntegerQ(n) cons150 = CustomConstraint(cons_f150) def cons_f151(p): return FractionQ(p) cons151 = CustomConstraint(cons_f151) def cons_f152(m, n): return IntegersQ(m, n) cons152 = CustomConstraint(cons_f152) def cons_f153(m, n, p): return Or(IntegerQ(p), And(Greater(m, S(0)), GreaterEqual(n, S(-1)))) cons153 = CustomConstraint(cons_f153) def cons_f154(n, p): return Or(And(RationalQ(n), Less(n, S(-1))), And(ZeroQ(n + p + S(3)), NonzeroQ(n + S(1)), Or(SumSimplerQ(n, S(1)), Not(SumSimplerQ(p, S(1)))))) cons154 = CustomConstraint(cons_f154) def cons_f155(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f), x) cons155 = CustomConstraint(cons_f155) def cons_f156(a, b, c, d, e, f): return ZeroQ(S(2)*b*d*e - f*(a*d + b*c)) cons156 = CustomConstraint(cons_f156) def cons_f157(m, n): return ZeroQ(m + n + S(1)) cons157 = CustomConstraint(cons_f157) def cons_f158(a, b, c, d, x): if isinstance(x, (int, Integer, float, Float)): return False return SimplerQ(a + b*x, c + d*x) cons158 = CustomConstraint(cons_f158) def cons_f159(m, n, p): return ZeroQ(m + n + p + S(2)) cons159 = CustomConstraint(cons_f159) def cons_f160(m, p): return Not(And(SumSimplerQ(p, S(1)), Not(SumSimplerQ(m, S(1))))) cons160 = CustomConstraint(cons_f160) def cons_f161(m, n, p): return ZeroQ(m + n + p + S(3)) cons161 = CustomConstraint(cons_f161) def cons_f162(a, b, c, d, e, f, m, n, p): return ZeroQ(a*d*f*(m + S(1)) + b*c*f*(n + S(1)) + b*d*e*(p + S(1))) cons162 = CustomConstraint(cons_f162) def cons_f163(m): return Or(And(RationalQ(m), Less(m, S(-1))), SumSimplerQ(m, S(1))) cons163 = CustomConstraint(cons_f163) def cons_f164(m, n, p): return RationalQ(m, n, p) cons164 = CustomConstraint(cons_f164) def cons_f165(p): return Greater(p, S(0)) cons165 = CustomConstraint(cons_f165) def cons_f166(m, n, p): return Or(IntegersQ(S(2)*m, S(2)*n, S(2)*p), IntegersQ(m, n + p), IntegersQ(p, m + n)) cons166 = CustomConstraint(cons_f166) def cons_f167(n): return Greater(n, S(1)) cons167 = CustomConstraint(cons_f167) def cons_f168(m): return Greater(m, S(1)) cons168 = CustomConstraint(cons_f168) def cons_f169(m, n, p): return NonzeroQ(m + n + p + S(1)) cons169 = CustomConstraint(cons_f169) def cons_f170(m): return Greater(m, S(0)) cons170 = CustomConstraint(cons_f170) def cons_f171(m, n, p): return Or(IntegersQ(S(2)*m, S(2)*n, S(2)*p), Or(IntegersQ(m, n + p), IntegersQ(p, m + n))) cons171 = CustomConstraint(cons_f171) def cons_f172(m, n, p): return IntegersQ(S(2)*m, S(2)*n, S(2)*p) cons172 = CustomConstraint(cons_f172) def cons_f173(n, p): return Or(IntegerQ(n), IntegersQ(S(2)*n, S(2)*p)) cons173 = CustomConstraint(cons_f173) def cons_f174(m, n): return PositiveIntegerQ(m + n + S(1)) cons174 = CustomConstraint(cons_f174) def cons_f175(m, n): return Or(And(RationalQ(m), Greater(m, S(0))), And(Not(RationalQ(m)), Or(SumSimplerQ(m, S(-1)), Not(SumSimplerQ(n, S(-1)))))) cons175 = CustomConstraint(cons_f175) def cons_f176(c, d, e, f): return PositiveQ(-f/(-c*f + d*e)) cons176 = CustomConstraint(cons_f176) def cons_f177(c, d, e, f): return Not(PositiveQ(-f/(-c*f + d*e))) cons177 = CustomConstraint(cons_f177) def cons_f178(c, d, e, f): return NonzeroQ(-c*f + d*e) cons178 = CustomConstraint(cons_f178) def cons_f179(c): return PositiveQ(c) cons179 = CustomConstraint(cons_f179) def cons_f180(e): return PositiveQ(e) cons180 = CustomConstraint(cons_f180) def cons_f181(b, d): return Not(NegativeQ(-b/d)) cons181 = CustomConstraint(cons_f181) def cons_f182(b, d): return NegativeQ(-b/d) cons182 = CustomConstraint(cons_f182) def cons_f183(c, e): return Not(And(PositiveQ(c), PositiveQ(e))) cons183 = CustomConstraint(cons_f183) def cons_f184(a, b, e, f): return PositiveQ(b/(-a*f + b*e)) cons184 = CustomConstraint(cons_f184) def cons_f185(a, b, c, d): return Not(NegativeQ(-(-a*d + b*c)/d)) cons185 = CustomConstraint(cons_f185) def cons_f186(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(SimplerQ(c + d*x, a + b*x), PositiveQ(-d/(-a*d + b*c)), PositiveQ(d/(-c*f + d*e)), Not(NegativeQ((-a*d + b*c)/b)))) cons186 = CustomConstraint(cons_f186) def cons_f187(a, b, c, d, e, f): return Not(And(PositiveQ(b/(-a*d + b*c)), PositiveQ(b/(-a*f + b*e)))) cons187 = CustomConstraint(cons_f187) def cons_f188(b, d, f): return Or(PositiveQ(-b/d), NegativeQ(-b/f)) cons188 = CustomConstraint(cons_f188) def cons_f189(b, d, f): return Or(PosQ(-b/d), NegQ(-b/f)) cons189 = CustomConstraint(cons_f189) def cons_f190(a, b, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return SimplerQ(a + b*x, e + f*x) cons190 = CustomConstraint(cons_f190) def cons_f191(a, b, c, d, e, f): return Or(PositiveQ(-(-a*d + b*c)/d), NegativeQ(-(-a*f + b*e)/f)) cons191 = CustomConstraint(cons_f191) def cons_f192(a, b, c, d, e, f): return Or(PosQ(-(-a*d + b*c)/d), NegQ(-(-a*f + b*e)/f)) cons192 = CustomConstraint(cons_f192) def cons_f193(a, b, c, d, e, f): return ZeroQ(-a*d*f - b*c*f + S(2)*b*d*e) cons193 = CustomConstraint(cons_f193) def cons_f194(m, n): return PositiveIntegerQ(m - n) cons194 = CustomConstraint(cons_f194) def cons_f195(m, n): return Or(PositiveIntegerQ(m), NegativeIntegerQ(m, n)) cons195 = CustomConstraint(cons_f195) def cons_f196(m, n, p): return NegativeIntegerQ(m + n + p + S(2)) cons196 = CustomConstraint(cons_f196) def cons_f197(m, n, p): return Or(SumSimplerQ(m, S(1)), And(Not(And(NonzeroQ(n + S(1)), SumSimplerQ(n, S(1)))), Not(And(NonzeroQ(p + S(1)), SumSimplerQ(p, S(1)))))) cons197 = CustomConstraint(cons_f197) def cons_f198(n): return NegativeIntegerQ(n) cons198 = CustomConstraint(cons_f198) def cons_f199(e, p): return Or(IntegerQ(p), PositiveQ(e)) cons199 = CustomConstraint(cons_f199) def cons_f200(b, c, d): return PositiveQ(-d/(b*c)) cons200 = CustomConstraint(cons_f200) def cons_f201(c, d, e, f, p): return Or(IntegerQ(p), PositiveQ(d/(-c*f + d*e))) cons201 = CustomConstraint(cons_f201) def cons_f202(a, b, c, d, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(PositiveQ(d/(a*d - b*c)), SimplerQ(c + d*x, a + b*x))) cons202 = CustomConstraint(cons_f202) def cons_f203(a, b, c, d): return Not(PositiveQ(b/(-a*d + b*c))) cons203 = CustomConstraint(cons_f203) def cons_f204(a, b, c, d, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(SimplerQ(c + d*x, a + b*x)) cons204 = CustomConstraint(cons_f204) def cons_f205(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(PositiveQ(d/(a*d - b*c)), PositiveQ(d/(-c*f + d*e)), SimplerQ(c + d*x, a + b*x))) cons205 = CustomConstraint(cons_f205) def cons_f206(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(PositiveQ(f/(a*f - b*e)), PositiveQ(f/(c*f - d*e)), SimplerQ(e + f*x, a + b*x))) cons206 = CustomConstraint(cons_f206) def cons_f207(a, b, e, f): return Not(PositiveQ(b/(-a*f + b*e))) cons207 = CustomConstraint(cons_f207) def cons_f208(a, b, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(SimplerQ(e + f*x, a + b*x)) cons208 = CustomConstraint(cons_f208) def cons_f209(m, n): return Or(PositiveIntegerQ(m), IntegersQ(m, n)) cons209 = CustomConstraint(cons_f209) def cons_f210(g, x): return FreeQ(g, x) cons210 = CustomConstraint(cons_f210) def cons_f211(h, x): return FreeQ(h, x) cons211 = CustomConstraint(cons_f211) def cons_f212(m, n): return Not(And(SumSimplerQ(n, S(1)), Not(SumSimplerQ(m, S(1))))) cons212 = CustomConstraint(cons_f212) def cons_f213(m, n): return Or(And(RationalQ(m), Less(m, S(-2))), And(ZeroQ(m + n + S(3)), Not(And(RationalQ(n), Less(n, S(-2)))))) cons213 = CustomConstraint(cons_f213) def cons_f214(m): return Or(And(RationalQ(m), Inequality(S(-2), LessEqual, m, Less, S(-1))), SumSimplerQ(m, S(1))) cons214 = CustomConstraint(cons_f214) def cons_f215(m, n): return NonzeroQ(m + n + S(3)) cons215 = CustomConstraint(cons_f215) def cons_f216(m, n): return NonzeroQ(m + n + S(2)) cons216 = CustomConstraint(cons_f216) def cons_f217(m, n, p): return Or(IntegersQ(m, n, p), PositiveIntegerQ(n, p)) cons217 = CustomConstraint(cons_f217) def cons_f218(a, b, c, d, e, f, g, h, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, h), x) cons218 = CustomConstraint(cons_f218) def cons_f219(a, b, c, d, e, f, g, h, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, h, n, p), x) cons219 = CustomConstraint(cons_f219) def cons_f220(c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return SimplerQ(c + d*x, e + f*x) cons220 = CustomConstraint(cons_f220) def cons_f221(m, n, p): return Or(SumSimplerQ(m, S(1)), And(Not(SumSimplerQ(n, S(1))), Not(SumSimplerQ(p, S(1))))) cons221 = CustomConstraint(cons_f221) def cons_f222(p, q): return IntegersQ(p, q) cons222 = CustomConstraint(cons_f222) def cons_f223(q): return PositiveIntegerQ(q) cons223 = CustomConstraint(cons_f223) def cons_f224(a, b, c, d, e, f, g, h, m, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, h, m, n, p, q), x) cons224 = CustomConstraint(cons_f224) def cons_f225(a, b, c, d, e, f, g, h, i, m, n, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, h, i, m, n, p, q, r), x) cons225 = CustomConstraint(cons_f225) def cons_f226(i, x): return FreeQ(i, x) cons226 = CustomConstraint(cons_f226) def cons_f227(p): return NonzeroQ(S(2)*p + S(1)) cons227 = CustomConstraint(cons_f227) def cons_f228(a, b, c): return NonzeroQ(-S(4)*a*c + b**S(2)) cons228 = CustomConstraint(cons_f228) def cons_f229(a, b, c): return PerfectSquareQ(-S(4)*a*c + b**S(2)) cons229 = CustomConstraint(cons_f229) def cons_f230(a, b, c): return Not(PerfectSquareQ(-S(4)*a*c + b**S(2))) cons230 = CustomConstraint(cons_f230) def cons_f231(p): return IntegerQ(S(4)*p) cons231 = CustomConstraint(cons_f231) def cons_f232(p): return Unequal(p, S(-3)/2) cons232 = CustomConstraint(cons_f232) def cons_f233(a, b, c): return PosQ(-S(4)*a*c + b**S(2)) cons233 = CustomConstraint(cons_f233) def cons_f234(a, b, c): return PositiveQ(S(4)*a - b**S(2)/c) cons234 = CustomConstraint(cons_f234) def cons_f235(b, c, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, c), x) cons235 = CustomConstraint(cons_f235) def cons_f236(p): return LessEqual(S(3), Denominator(p), S(4)) cons236 = CustomConstraint(cons_f236) def cons_f237(p): return Not(IntegerQ(S(4)*p)) cons237 = CustomConstraint(cons_f237) def cons_f238(m): return IntegerQ(m/S(2) + S(1)/2) cons238 = CustomConstraint(cons_f238) def cons_f239(m, p): return ZeroQ(m + S(2)*p + S(1)) cons239 = CustomConstraint(cons_f239) def cons_f240(m, p): return NonzeroQ(m + S(2)*p + S(1)) cons240 = CustomConstraint(cons_f240) def cons_f241(b, c, d, e): return NonzeroQ(-b*e + S(2)*c*d) cons241 = CustomConstraint(cons_f241) def cons_f242(m, p): return ZeroQ(m + S(2)*p + S(2)) cons242 = CustomConstraint(cons_f242) def cons_f243(m): return NonzeroQ(m + S(2)) cons243 = CustomConstraint(cons_f243) def cons_f244(m, p): return ZeroQ(m + S(2)*p + S(3)) cons244 = CustomConstraint(cons_f244) def cons_f245(p): return NonzeroQ(p + S(3)/2) cons245 = CustomConstraint(cons_f245) def cons_f246(m, p): return RationalQ(m, p) cons246 = CustomConstraint(cons_f246) def cons_f247(m): return Inequality(S(-2), LessEqual, m, Less, S(-1)) cons247 = CustomConstraint(cons_f247) def cons_f248(p): return IntegerQ(S(2)*p) cons248 = CustomConstraint(cons_f248) def cons_f249(m): return Less(m, S(-2)) cons249 = CustomConstraint(cons_f249) def cons_f250(m, p): return Not(And(NegativeIntegerQ(m + S(2)*p + S(3)), Greater(m + S(3)*p + S(3), S(0)))) cons250 = CustomConstraint(cons_f250) def cons_f251(m, p): return NonzeroQ(m + S(2)*p) cons251 = CustomConstraint(cons_f251) def cons_f252(m): return Not(And(RationalQ(m), Less(m, S(-2)))) cons252 = CustomConstraint(cons_f252) def cons_f253(m, p): return Not(And(IntegerQ(m), Less(S(0), m, S(2)*p))) cons253 = CustomConstraint(cons_f253) def cons_f254(m): return Inequality(S(0), Less, m, LessEqual, S(1)) cons254 = CustomConstraint(cons_f254) def cons_f255(m, p): return NonzeroQ(m + p + S(1)) cons255 = CustomConstraint(cons_f255) def cons_f256(m, p): return Or(Not(RationalQ(p)), Inequality(S(-1), LessEqual, p, Less, S(0)), And(IntegerQ(m), Less(S(0), m, S(2)*p)), And(Equal(m, S(1)/2), Less(p, S(0)))) cons256 = CustomConstraint(cons_f256) def cons_f257(m, p): return Or(IntegerQ(m), IntegerQ(S(2)*p)) cons257 = CustomConstraint(cons_f257) def cons_f258(a, b, c, d, e): return ZeroQ(a*e**S(2) - b*d*e + c*d**S(2)) cons258 = CustomConstraint(cons_f258) def cons_f259(a, c, d, e): return ZeroQ(a*e**S(2) + c*d**S(2)) cons259 = CustomConstraint(cons_f259) def cons_f260(a, d, m, p): return Or(IntegerQ(p), And(PositiveQ(a), PositiveQ(d), IntegerQ(m + p))) cons260 = CustomConstraint(cons_f260) def cons_f261(m, p): return Or(Less(S(0), -m, p), Less(p, -m, S(0))) cons261 = CustomConstraint(cons_f261) def cons_f262(m): return Unequal(m, S(2)) cons262 = CustomConstraint(cons_f262) def cons_f263(m): return Unequal(m, S(-1)) cons263 = CustomConstraint(cons_f263) def cons_f264(m, p): return PositiveIntegerQ(m + p) cons264 = CustomConstraint(cons_f264) def cons_f265(m, p): return NegativeIntegerQ(m + S(2)*p + S(2)) cons265 = CustomConstraint(cons_f265) def cons_f266(m, p): return Or(Less(m, S(-2)), ZeroQ(m + S(2)*p + S(1))) cons266 = CustomConstraint(cons_f266) def cons_f267(m, p): return Or(Inequality(S(-2), LessEqual, m, Less, S(0)), Equal(m + p + S(1), S(0))) cons267 = CustomConstraint(cons_f267) def cons_f268(m): return GreaterEqual(m, S(1)) cons268 = CustomConstraint(cons_f268) def cons_f269(m): return Less(m, S(0)) cons269 = CustomConstraint(cons_f269) def cons_f270(d): return PositiveQ(d) cons270 = CustomConstraint(cons_f270) def cons_f271(m, p): return Not(And(ZeroQ(m + S(-3)), Unequal(p, S(1)))) cons271 = CustomConstraint(cons_f271) def cons_f272(m, p): return NonzeroQ(m + S(2)*p + S(3)) cons272 = CustomConstraint(cons_f272) def cons_f273(m, p): return Not(And(EvenQ(m), Less(m + S(2)*p + S(3), S(0)))) cons273 = CustomConstraint(cons_f273) def cons_f274(m): return Not(And(RationalQ(m), Less(m, S(-1)))) cons274 = CustomConstraint(cons_f274) def cons_f275(m, p): return Not(And(PositiveIntegerQ(m/S(2) + S(-1)/2), Or(Not(IntegerQ(p)), Less(m, S(2)*p)))) cons275 = CustomConstraint(cons_f275) def cons_f276(m): return Not(And(RationalQ(m), Greater(m, S(1)))) cons276 = CustomConstraint(cons_f276) def cons_f277(a, b, c): return NegativeQ(c/(-S(4)*a*c + b**S(2))) cons277 = CustomConstraint(cons_f277) def cons_f278(m): return EqQ(m**S(2), S(1)/4) cons278 = CustomConstraint(cons_f278) def cons_f279(m, p): return Or(IntegerQ(S(2)*p), And(IntegerQ(m), RationalQ(p)), OddQ(m)) cons279 = CustomConstraint(cons_f279) def cons_f280(m, p): return Or(IntegerQ(S(2)*p), And(IntegerQ(m), RationalQ(p)), IntegerQ(m/S(2) + p + S(3)/2)) cons280 = CustomConstraint(cons_f280) def cons_f281(a, b, c, d, e): return NonzeroQ(a*e**S(2) - b*d*e + c*d**S(2)) cons281 = CustomConstraint(cons_f281) def cons_f282(a, c, d, e): return NonzeroQ(a*e**S(2) + c*d**S(2)) cons282 = CustomConstraint(cons_f282) def cons_f283(m, p): return Not(And(ZeroQ(m + S(-1)), Greater(p, S(1)))) cons283 = CustomConstraint(cons_f283) def cons_f284(a, b, c): return NiceSqrtQ(-S(4)*a*c + b**S(2)) cons284 = CustomConstraint(cons_f284) def cons_f285(a, c): return NiceSqrtQ(-a*c) cons285 = CustomConstraint(cons_f285) def cons_f286(a, b, c): return Not(NiceSqrtQ(-S(4)*a*c + b**S(2))) cons286 = CustomConstraint(cons_f286) def cons_f287(a, c): return Not(NiceSqrtQ(-a*c)) cons287 = CustomConstraint(cons_f287) def cons_f288(d, m): return Or(NonzeroQ(d), Greater(m, S(2))) cons288 = CustomConstraint(cons_f288) def cons_f289(p): return Not(And(RationalQ(p), LessEqual(p, S(-1)))) cons289 = CustomConstraint(cons_f289) def cons_f290(a, b, d, e): return ZeroQ(a*e + b*d) cons290 = CustomConstraint(cons_f290) def cons_f291(b, c, d, e): return ZeroQ(b*e + c*d) cons291 = CustomConstraint(cons_f291) def cons_f292(m, p): return PositiveIntegerQ(m - p + S(1)) cons292 = CustomConstraint(cons_f292) def cons_f293(b, c, d, e): return NonzeroQ(-b*e + c*d) cons293 = CustomConstraint(cons_f293) def cons_f294(m): return Equal(m**S(2), S(1)/4) cons294 = CustomConstraint(cons_f294) def cons_f295(c): return NegativeQ(c) cons295 = CustomConstraint(cons_f295) def cons_f296(b): return RationalQ(b) cons296 = CustomConstraint(cons_f296) def cons_f297(m): return ZeroQ(m**S(2) + S(-1)/4) cons297 = CustomConstraint(cons_f297) def cons_f298(m, p): return Equal(m + S(2)*p + S(2), S(0)) cons298 = CustomConstraint(cons_f298) def cons_f299(a, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, d, e), x) cons299 = CustomConstraint(cons_f299) def cons_f300(m, p): return Or(IntegerQ(p), And(RationalQ(m), Less(m, S(-1)))) cons300 = CustomConstraint(cons_f300) def cons_f301(m, p): return Not(NegativeIntegerQ(m + S(2)*p + S(1))) cons301 = CustomConstraint(cons_f301) def cons_f302(a, b, c, d, e, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False return IntQuadraticQ(a, b, c, d, e, m, p, x) cons302 = CustomConstraint(cons_f302) def cons_f303(a, c, d, e, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False return IntQuadraticQ(a, S(0), c, d, e, m, p, x) cons303 = CustomConstraint(cons_f303) def cons_f304(m): return Or(Not(RationalQ(m)), Less(m, S(1))) cons304 = CustomConstraint(cons_f304) def cons_f305(m, p): return Not(NegativeIntegerQ(m + S(2)*p)) cons305 = CustomConstraint(cons_f305) def cons_f306(m, p): return Or(Less(m, S(1)), And(NegativeIntegerQ(m + S(2)*p + S(3)), Unequal(m, S(2)))) cons306 = CustomConstraint(cons_f306) def cons_f307(m): return If(RationalQ(m), Greater(m, S(1)), SumSimplerQ(m, S(-2))) cons307 = CustomConstraint(cons_f307) def cons_f308(a, b, c, d, e, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(And(RationalQ(m), Less(m, S(-1)), IntQuadraticQ(a, b, c, d, e, m, p, x)), And(SumSimplerQ(m, S(1)), IntegerQ(p), NonzeroQ(m + S(1))), And(NegativeIntegerQ(m + S(2)*p + S(3)), NonzeroQ(m + S(1)))) cons308 = CustomConstraint(cons_f308) def cons_f309(a, c, d, e, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(And(RationalQ(m), Less(m, S(-1)), IntQuadraticQ(a, S(0), c, d, e, m, p, x)), And(SumSimplerQ(m, S(1)), IntegerQ(p), NonzeroQ(m + S(1))), And(NegativeIntegerQ(m + S(2)*p + S(3)), NonzeroQ(m + S(1)))) cons309 = CustomConstraint(cons_f309) def cons_f310(a, b, c, d, e): return ZeroQ(-S(3)*a*c*e**S(2) + b**S(2)*e**S(2) - b*c*d*e + c**S(2)*d**S(2)) cons310 = CustomConstraint(cons_f310) def cons_f311(b, c, d, e): return PosQ(c*e**S(2)*(-b*e + S(2)*c*d)) cons311 = CustomConstraint(cons_f311) def cons_f312(a, c, d, e): return ZeroQ(-S(3)*a*e**S(2) + c*d**S(2)) cons312 = CustomConstraint(cons_f312) def cons_f313(b, c, d, e): return NegQ(c*e**S(2)*(-b*e + S(2)*c*d)) cons313 = CustomConstraint(cons_f313) def cons_f314(a, b, c, d, e): return ZeroQ(S(9)*a*c*e**S(2) - S(2)*b**S(2)*e**S(2) - b*c*d*e + c**S(2)*d**S(2)) cons314 = CustomConstraint(cons_f314) def cons_f315(a, b, c): return Not(PositiveQ(S(4)*a - b**S(2)/c)) cons315 = CustomConstraint(cons_f315) def cons_f316(p): return Not(IntegerQ(S(2)*p)) cons316 = CustomConstraint(cons_f316) def cons_f317(d, e, f, g): return NonzeroQ(-d*g + e*f) cons317 = CustomConstraint(cons_f317) def cons_f318(b, c, f, g): return ZeroQ(-b*g + S(2)*c*f) cons318 = CustomConstraint(cons_f318) def cons_f319(m): return Not(And(RationalQ(m), Greater(m, S(0)))) cons319 = CustomConstraint(cons_f319) def cons_f320(m, p): return Or(Not(RationalQ(p)), And(Greater(p, S(0)), Or(Not(IntegerQ(m)), GreaterEqual(m, -S(2)*p + S(-2)), Less(m, -S(4)*p + S(-4))))) cons320 = CustomConstraint(cons_f320) def cons_f321(m, p): return NonzeroQ(m + S(2)*p + S(2)) cons321 = CustomConstraint(cons_f321) def cons_f322(m, p): return Or(Not(RationalQ(p)), Less(m, S(2)*p + S(2))) cons322 = CustomConstraint(cons_f322) def cons_f323(b, c, f, g): return NonzeroQ(-b*g + S(2)*c*f) cons323 = CustomConstraint(cons_f323) def cons_f324(p): return Less(p, S(0)) cons324 = CustomConstraint(cons_f324) def cons_f325(b, c, d, e, m, p): return Or(And(ZeroQ(m + S(2)*p + S(2)), NonzeroQ(m + S(1))), And(ZeroQ(-b*e + S(2)*c*d), NonzeroQ(m + S(-1)))) cons325 = CustomConstraint(cons_f325) def cons_f326(d, e, f, g, m, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(ZeroQ(m + S(-1)), SimplerQ(f + g*x, d + e*x))) cons326 = CustomConstraint(cons_f326) def cons_f327(a, d, m, p): return Or(IntegerQ(p), And(PositiveQ(a), PositiveQ(d), ZeroQ(m + p))) cons327 = CustomConstraint(cons_f327) def cons_f328(b, c, d, e, f, g, m, p): return ZeroQ(e*(p + S(1))*(-b*g + S(2)*c*f) + m*(c*e*f + g*(-b*e + c*d))) cons328 = CustomConstraint(cons_f328) def cons_f329(d, e, f, g, m, p): return ZeroQ(S(2)*e*f*(p + S(1)) + m*(d*g + e*f)) cons329 = CustomConstraint(cons_f329) def cons_f330(m): return SumSimplerQ(m, S(-1)) cons330 = CustomConstraint(cons_f330) def cons_f331(m, p): return Or(And(RationalQ(m), Less(m, S(-1)), Not(PositiveIntegerQ(m + p + S(1)))), And(RationalQ(m, p), Less(m, S(0)), Less(p, S(-1))), ZeroQ(m + S(2)*p + S(2))) cons331 = CustomConstraint(cons_f331) def cons_f332(a, c, f, g): return ZeroQ(a*g**S(2) + c*f**S(2)) cons332 = CustomConstraint(cons_f332) def cons_f333(p): return Less(p, S(-2)) cons333 = CustomConstraint(cons_f333) def cons_f334(m, p): return Or(Less(S(0), -m, p + S(1)), Less(p, -m, S(0))) cons334 = CustomConstraint(cons_f334) def cons_f335(n, p): return NegativeIntegerQ(n + S(2)*p) cons335 = CustomConstraint(cons_f335) def cons_f336(b, c, d, e, f, g): return ZeroQ(-b*e*g + c*d*g + c*e*f) cons336 = CustomConstraint(cons_f336) def cons_f337(m, n): return NonzeroQ(m - n + S(-1)) cons337 = CustomConstraint(cons_f337) def cons_f338(d, e, f, g): return ZeroQ(d*g + e*f) cons338 = CustomConstraint(cons_f338) def cons_f339(m, n): return ZeroQ(m - n + S(-2)) cons339 = CustomConstraint(cons_f339) def cons_f340(n, p): return RationalQ(n, p) cons340 = CustomConstraint(cons_f340) def cons_f341(n, p): return Not(And(IntegerQ(n + p), LessEqual(n + p + S(2), S(0)))) cons341 = CustomConstraint(cons_f341) def cons_f342(n): return Not(PositiveIntegerQ(n)) cons342 = CustomConstraint(cons_f342) def cons_f343(n, p): return Not(And(IntegerQ(n + p), Less(n + p + S(2), S(0)))) cons343 = CustomConstraint(cons_f343) def cons_f344(n, p): return Or(IntegerQ(S(2)*p), IntegerQ(n)) cons344 = CustomConstraint(cons_f344) def cons_f345(m, p): return ZeroQ(m + p + S(-1)) cons345 = CustomConstraint(cons_f345) def cons_f346(b, c, d, e, f, g, n, p): return ZeroQ(b*e*g*(n + S(1)) - c*d*g*(S(2)*n + p + S(3)) + c*e*f*(p + S(1))) cons346 = CustomConstraint(cons_f346) def cons_f347(d, e, f, g, n, p): return ZeroQ(-d*g*(S(2)*n + p + S(3)) + e*f*(p + S(1))) cons347 = CustomConstraint(cons_f347) def cons_f348(n): return Not(And(RationalQ(n), Less(n, S(-1)))) cons348 = CustomConstraint(cons_f348) def cons_f349(p): return IntegerQ(p + S(-1)/2) cons349 = CustomConstraint(cons_f349) def cons_f350(m, p): return Not(And(Less(m, S(0)), Less(p, S(0)))) cons350 = CustomConstraint(cons_f350) def cons_f351(p): return Unequal(p, S(1)/2) cons351 = CustomConstraint(cons_f351) def cons_f352(a, b, c, d, e, f, g): return ZeroQ(-S(2)*a*e*g + b*(d*g + e*f) - S(2)*c*d*f) cons352 = CustomConstraint(cons_f352) def cons_f353(a, c, d, e, f, g): return ZeroQ(a*e*g + c*d*f) cons353 = CustomConstraint(cons_f353) def cons_f354(b, c, d, e, m): return Not(And(Equal(m, S(1)), Or(ZeroQ(d), ZeroQ(-b*e + S(2)*c*d)))) cons354 = CustomConstraint(cons_f354) def cons_f355(d, m): return Not(And(Equal(m, S(1)), ZeroQ(d))) cons355 = CustomConstraint(cons_f355) def cons_f356(a, b, c, d, e, f, g, p): return ZeroQ(-S(2)*a*c*e*g + b**S(2)*e*g*(p + S(2)) + c*(S(2)*p + S(3))*(-b*(d*g + e*f) + S(2)*c*d*f)) cons356 = CustomConstraint(cons_f356) def cons_f357(a, c, d, e, f, g, p): return ZeroQ(a*e*g - c*d*f*(S(2)*p + S(3))) cons357 = CustomConstraint(cons_f357) def cons_f358(m): return Not(RationalQ(m)) cons358 = CustomConstraint(cons_f358) def cons_f359(p): return Not(PositiveIntegerQ(p)) cons359 = CustomConstraint(cons_f359) def cons_f360(m, p): return ZeroQ(m - p) cons360 = CustomConstraint(cons_f360) def cons_f361(m, p): return Less(m + S(2)*p, S(0)) cons361 = CustomConstraint(cons_f361) def cons_f362(m, p): return Not(NegativeIntegerQ(m + S(2)*p + S(3))) cons362 = CustomConstraint(cons_f362) def cons_f363(m, p): return Or(And(RationalQ(m), Less(m, S(-1))), Equal(p, S(1)), And(IntegerQ(p), Not(RationalQ(m)))) cons363 = CustomConstraint(cons_f363) def cons_f364(m, p): return Or(IntegerQ(m), IntegerQ(p), IntegersQ(S(2)*m, S(2)*p)) cons364 = CustomConstraint(cons_f364) def cons_f365(m, p): return Or(IntegerQ(p), Not(RationalQ(m)), Inequality(S(-1), LessEqual, m, Less, S(0))) cons365 = CustomConstraint(cons_f365) def cons_f366(a, b, c, d, e, f, g, m, p): return Or(And(Equal(m, S(2)), Equal(p, S(-3)), RationalQ(a, b, c, d, e, f, g)), Not(NegativeIntegerQ(m + S(2)*p + S(3)))) cons366 = CustomConstraint(cons_f366) def cons_f367(a, c, d, e, f, g, m, p): return Or(And(Equal(m, S(2)), Equal(p, S(-3)), RationalQ(a, c, d, e, f, g)), Not(NegativeIntegerQ(m + S(2)*p + S(3)))) cons367 = CustomConstraint(cons_f367) def cons_f368(d, e, f, g, m, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(Equal(m, S(1)), SimplerQ(d + e*x, f + g*x))) cons368 = CustomConstraint(cons_f368) def cons_f369(m): return FractionQ(m) cons369 = CustomConstraint(cons_f369) def cons_f370(d, e, f, g, m, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(Equal(m, S(1)), SimplerQ(f + g*x, d + e*x))) cons370 = CustomConstraint(cons_f370) def cons_f371(m, p): return NegativeIntegerQ(m + S(2)*p + S(3)) cons371 = CustomConstraint(cons_f371) def cons_f372(a, b, c, d, e): return ZeroQ(S(4)*c*(a - d) - (b - e)**S(2)) cons372 = CustomConstraint(cons_f372) def cons_f373(a, b, d, e, f, g): return ZeroQ(e*f*(b - e) - S(2)*g*(-a*e + b*d)) cons373 = CustomConstraint(cons_f373) def cons_f374(a, b, d, e): return NonzeroQ(-a*e + b*d) cons374 = CustomConstraint(cons_f374) def cons_f375(a, c, f, g, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, f, g), x) cons375 = CustomConstraint(cons_f375) def cons_f376(a, c, e, f, g, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, e, f, g), x) cons376 = CustomConstraint(cons_f376) def cons_f377(m, n, p): return IntegersQ(m, n, p) cons377 = CustomConstraint(cons_f377) def cons_f378(n, p): return IntegersQ(n, p) cons378 = CustomConstraint(cons_f378) def cons_f379(d, f, m): return Or(IntegerQ(m), And(PositiveQ(d), PositiveQ(f))) cons379 = CustomConstraint(cons_f379) def cons_f380(m, n, p): return Or(IntegerQ(p), IntegersQ(m, n)) cons380 = CustomConstraint(cons_f380) def cons_f381(a, c, e, f, g, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, e, f, g, m, p), x) cons381 = CustomConstraint(cons_f381) def cons_f382(a, b, c, d, e, f, g, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, m, n, p), x) cons382 = CustomConstraint(cons_f382) def cons_f383(a, c, d, e, f, g, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, d, e, f, g, m, n, p), x) cons383 = CustomConstraint(cons_f383) def cons_f384(a, c, d, f): return ZeroQ(-a*f + c*d) cons384 = CustomConstraint(cons_f384) def cons_f385(a, b, d, e): return ZeroQ(-a*e + b*d) cons385 = CustomConstraint(cons_f385) def cons_f386(c, f, p): return Or(IntegerQ(p), PositiveQ(c/f)) cons386 = CustomConstraint(cons_f386) def cons_f387(a, b, c, d, e, f, q, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(Not(IntegerQ(q)), LessEqual(LeafCount(d + e*x + f*x**S(2)), LeafCount(a + b*x + c*x**S(2)))) cons387 = CustomConstraint(cons_f387) def cons_f388(q): return Not(IntegerQ(q)) cons388 = CustomConstraint(cons_f388) def cons_f389(c, f): return Not(PositiveQ(c/f)) cons389 = CustomConstraint(cons_f389) def cons_f390(a, b, c, d, e, f, q): return ZeroQ(c*(-S(2)*d*f + e**S(2)*(q + S(2))) + f*(S(2)*q + S(3))*(S(2)*a*f - b*e)) cons390 = CustomConstraint(cons_f390) def cons_f391(q): return NonzeroQ(q + S(1)) cons391 = CustomConstraint(cons_f391) def cons_f392(q): return NonzeroQ(S(2)*q + S(3)) cons392 = CustomConstraint(cons_f392) def cons_f393(a, c, d, e, f, q): return ZeroQ(S(2)*a*f**S(2)*(S(2)*q + S(3)) + c*(-S(2)*d*f + e**S(2)*(q + S(2)))) cons393 = CustomConstraint(cons_f393) def cons_f394(a, c, d, f, q): return ZeroQ(S(2)*a*f*q + S(3)*a*f - c*d) cons394 = CustomConstraint(cons_f394) def cons_f395(q): return PositiveIntegerQ(q + S(2)) cons395 = CustomConstraint(cons_f395) def cons_f396(d, e, f): return NonzeroQ(-S(4)*d*f + e**S(2)) cons396 = CustomConstraint(cons_f396) def cons_f397(q): return RationalQ(q) cons397 = CustomConstraint(cons_f397) def cons_f398(q): return Less(q, S(-1)) cons398 = CustomConstraint(cons_f398) def cons_f399(a, b, c, d, e, f, q): return NonzeroQ(c*(-S(2)*d*f + e**S(2)*(q + S(2))) + f*(S(2)*q + S(3))*(S(2)*a*f - b*e)) cons399 = CustomConstraint(cons_f399) def cons_f400(a, c, d, e, f, q): return NonzeroQ(S(2)*a*f**S(2)*(S(2)*q + S(3)) + c*(-S(2)*d*f + e**S(2)*(q + S(2)))) cons400 = CustomConstraint(cons_f400) def cons_f401(a, c, d, f, q): return NonzeroQ(S(2)*a*f*q + S(3)*a*f - c*d) cons401 = CustomConstraint(cons_f401) def cons_f402(q): return Not(PositiveIntegerQ(q)) cons402 = CustomConstraint(cons_f402) def cons_f403(q): return Not(And(RationalQ(q), LessEqual(q, S(-1)))) cons403 = CustomConstraint(cons_f403) def cons_f404(p, q): return RationalQ(p, q) cons404 = CustomConstraint(cons_f404) def cons_f405(q): return Greater(q, S(0)) cons405 = CustomConstraint(cons_f405) def cons_f406(a, b, c, d, e, f): return NonzeroQ(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2)) cons406 = CustomConstraint(cons_f406) def cons_f407(p, q): return Not(And(Not(IntegerQ(p)), IntegerQ(q), Less(q, S(-1)))) cons407 = CustomConstraint(cons_f407) def cons_f408(a, b, c, d, f): return NonzeroQ(b**S(2)*d*f + (-a*f + c*d)**S(2)) cons408 = CustomConstraint(cons_f408) def cons_f409(a, c, d, e, f): return NonzeroQ(a*c*e**S(2) + (-a*f + c*d)**S(2)) cons409 = CustomConstraint(cons_f409) def cons_f410(p, q): return NonzeroQ(p + q) cons410 = CustomConstraint(cons_f410) def cons_f411(p, q): return NonzeroQ(S(2)*p + S(2)*q + S(1)) cons411 = CustomConstraint(cons_f411) def cons_f412(b, c, e, f): return ZeroQ(-b*f + c*e) cons412 = CustomConstraint(cons_f412) def cons_f413(b, c, e, f): return NonzeroQ(-b*f + c*e) cons413 = CustomConstraint(cons_f413) def cons_f414(a, c): return PosQ(-a*c) cons414 = CustomConstraint(cons_f414) def cons_f415(a, b, c): return NegQ(-S(4)*a*c + b**S(2)) cons415 = CustomConstraint(cons_f415) def cons_f416(a, c): return NegQ(-a*c) cons416 = CustomConstraint(cons_f416) def cons_f417(a, b, c, d, e, f, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, p, q), x) cons417 = CustomConstraint(cons_f417) def cons_f418(a, c, d, e, f, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, d, e, f, p, q), x) cons418 = CustomConstraint(cons_f418) def cons_f419(a, b, c, g, h): return ZeroQ(a*h**S(2) - b*g*h + c*g**S(2)) cons419 = CustomConstraint(cons_f419) def cons_f420(a, c, d, e, f, g, h): return ZeroQ(a**S(2)*f*h**S(2) - a*c*e*g*h + c**S(2)*d*g**S(2)) cons420 = CustomConstraint(cons_f420) def cons_f421(a, c, g, h): return ZeroQ(a*h**S(2) + c*g**S(2)) cons421 = CustomConstraint(cons_f421) def cons_f422(a, c, d, f, g, h): return ZeroQ(a**S(2)*f*h**S(2) + c**S(2)*d*g**S(2)) cons422 = CustomConstraint(cons_f422) def cons_f423(a, b, c, e, f): return ZeroQ(a*f**S(2) - b*e*f + c*e**S(2)) cons423 = CustomConstraint(cons_f423) def cons_f424(a, c, e, f): return ZeroQ(a*f**S(2) + c*e**S(2)) cons424 = CustomConstraint(cons_f424) def cons_f425(b, c, e, f, g, h, m, p): return ZeroQ(b*f*h*(m + p + S(2)) + c*(-e*h*(m + S(2)*p + S(3)) + S(2)*f*g*(p + S(1)))) cons425 = CustomConstraint(cons_f425) def cons_f426(a, b, c, d, f, g, h, m, p): return ZeroQ(b*f*g*(p + S(1)) + h*(a*f*(m + S(1)) - c*d*(m + S(2)*p + S(3)))) cons426 = CustomConstraint(cons_f426) def cons_f427(c, e, f, g, h, m, p): return ZeroQ(c*(-e*h*(m + S(2)*p + S(3)) + S(2)*f*g*(p + S(1)))) cons427 = CustomConstraint(cons_f427) def cons_f428(a, c, d, f, h, m, p): return ZeroQ(h*(a*f*(m + S(1)) - c*d*(m + S(2)*p + S(3)))) cons428 = CustomConstraint(cons_f428) def cons_f429(b, c, f, g, h, m, p): return ZeroQ(b*f*h*(m + p + S(2)) + S(2)*c*f*g*(p + S(1))) cons429 = CustomConstraint(cons_f429) def cons_f430(m, p): return Or(IntegersQ(m, p), PositiveIntegerQ(p)) cons430 = CustomConstraint(cons_f430) def cons_f431(a, b, c, g, h): return NonzeroQ(a*h**S(2) - b*g*h + c*g**S(2)) cons431 = CustomConstraint(cons_f431) def cons_f432(a, c, g, h): return NonzeroQ(a*h**S(2) + c*g**S(2)) cons432 = CustomConstraint(cons_f432) def cons_f433(a, b, c, g, h): return NonzeroQ(c*g**S(2) - h*(-a*h + b*g)) cons433 = CustomConstraint(cons_f433) def cons_f434(p, q): return Or(Greater(p, S(0)), Greater(q, S(0))) cons434 = CustomConstraint(cons_f434) def cons_f435(p, q): return NonzeroQ(p + q + S(1)) cons435 = CustomConstraint(cons_f435) def cons_f436(a, c): return PositiveQ(a*c) cons436 = CustomConstraint(cons_f436) def cons_f437(a, c): return Not(PositiveQ(a*c)) cons437 = CustomConstraint(cons_f437) def cons_f438(e, f, g, h): return ZeroQ(e*h - S(2)*f*g) cons438 = CustomConstraint(cons_f438) def cons_f439(e, f, g, h): return NonzeroQ(e*h - S(2)*f*g) cons439 = CustomConstraint(cons_f439) def cons_f440(d, e, g, h): return ZeroQ(S(2)*d*h - e*g) cons440 = CustomConstraint(cons_f440) def cons_f441(d, e, g, h): return NonzeroQ(S(2)*d*h - e*g) cons441 = CustomConstraint(cons_f441) def cons_f442(a, b, c, d, e, f, g, h): return ZeroQ(g**S(2)*(-b*f + c*e) - S(2)*g*h*(-a*f + c*d) + h**S(2)*(-a*e + b*d)) cons442 = CustomConstraint(cons_f442) def cons_f443(a, c, d, e, f, g, h): return ZeroQ(a*e*h**S(2) - c*e*g**S(2) + S(2)*g*h*(-a*f + c*d)) cons443 = CustomConstraint(cons_f443) def cons_f444(a, b, c, d, f, g, h): return ZeroQ(b*d*h**S(2) - b*f*g**S(2) - S(2)*g*h*(-a*f + c*d)) cons444 = CustomConstraint(cons_f444) def cons_f445(a, b, c, d, f): return ZeroQ(c**S(2)*d - f*(-S(3)*a*c + b**S(2))) cons445 = CustomConstraint(cons_f445) def cons_f446(a, b, c, g, h): return ZeroQ(S(9)*a*c*h**S(2) - S(2)*b**S(2)*h**S(2) - b*c*g*h + c**S(2)*g**S(2)) cons446 = CustomConstraint(cons_f446) def cons_f447(b, c, g, h): return PositiveQ(-S(9)*c*h**S(2)/(-b*h + S(2)*c*g)**S(2)) cons447 = CustomConstraint(cons_f447) def cons_f448(a, c, d, f): return ZeroQ(S(3)*a*f + c*d) cons448 = CustomConstraint(cons_f448) def cons_f449(a, c, g, h): return ZeroQ(S(9)*a*h**S(2) + c*g**S(2)) cons449 = CustomConstraint(cons_f449) def cons_f450(a): return Not(PositiveQ(a)) cons450 = CustomConstraint(cons_f450) def cons_f451(a, b, c, d, e, f, g, h, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, h, p, q), x) cons451 = CustomConstraint(cons_f451) def cons_f452(a, c, d, e, f, g, h, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, d, e, f, g, h, p, q), x) cons452 = CustomConstraint(cons_f452) def cons_f453(x, z): if isinstance(x, (int, Integer, float, Float)): return False return LinearQ(z, x) cons453 = CustomConstraint(cons_f453) def cons_f454(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return QuadraticQ(List(u, v), x) cons454 = CustomConstraint(cons_f454) def cons_f455(u, v, x, z): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(LinearMatchQ(z, x), QuadraticMatchQ(List(u, v), x))) cons455 = CustomConstraint(cons_f455) def cons_f456(p, q): return NonzeroQ(S(2)*p + S(2)*q + S(3)) cons456 = CustomConstraint(cons_f456) def cons_f457(A, B, C, a, b, c, d, e, f, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, A, B, C, p, q), x) cons457 = CustomConstraint(cons_f457) def cons_f458(A, C, a, b, c, d, e, f, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, A, C, p, q), x) cons458 = CustomConstraint(cons_f458) def cons_f459(A, B, C, a, c, d, e, f, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, d, e, f, A, B, C, p, q), x) cons459 = CustomConstraint(cons_f459) def cons_f460(A, C, a, c, d, e, f, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, d, e, f, A, C, p, q), x) cons460 = CustomConstraint(cons_f460) def cons_f461(b, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, n, p), x) cons461 = CustomConstraint(cons_f461) def cons_f462(n, p): return ZeroQ(p + S(1) + S(1)/n) cons462 = CustomConstraint(cons_f462) def cons_f463(n, p): return NegativeIntegerQ(p + S(1) + S(1)/n) cons463 = CustomConstraint(cons_f463) def cons_f464(n): return NonzeroQ(S(3)*n + S(1)) cons464 = CustomConstraint(cons_f464) def cons_f465(n): return Less(n, S(0)) cons465 = CustomConstraint(cons_f465) def cons_f466(n, p): return PositiveIntegerQ(n, p) cons466 = CustomConstraint(cons_f466) def cons_f467(n, p): return Or(IntegerQ(S(2)*p), And(Equal(n, S(2)), IntegerQ(S(4)*p)), And(Equal(n, S(2)), IntegerQ(S(3)*p)), Less(Denominator(p + S(1)/n), Denominator(p))) cons467 = CustomConstraint(cons_f467) def cons_f468(a, b): return PosQ(b/a) cons468 = CustomConstraint(cons_f468) def cons_f469(n): return PositiveIntegerQ(n/S(2) + S(-3)/2) cons469 = CustomConstraint(cons_f469) def cons_f470(a, b): return PosQ(a/b) cons470 = CustomConstraint(cons_f470) def cons_f471(a, b): return NegQ(a/b) cons471 = CustomConstraint(cons_f471) def cons_f472(a, b): return Or(PositiveQ(a), PositiveQ(b)) cons472 = CustomConstraint(cons_f472) def cons_f473(a, b): return Or(NegativeQ(a), NegativeQ(b)) cons473 = CustomConstraint(cons_f473) def cons_f474(a, b): return Or(PositiveQ(a), NegativeQ(b)) cons474 = CustomConstraint(cons_f474) def cons_f475(a, b): return Or(NegativeQ(a), PositiveQ(b)) cons475 = CustomConstraint(cons_f475) def cons_f476(n): return PositiveIntegerQ(n/S(4) + S(-1)/2) cons476 = CustomConstraint(cons_f476) def cons_f477(a, b): try: return Or(PositiveQ(a/b), And(PosQ(a/b), AtomQ(SplitProduct(SumBaseQ, a)), AtomQ(SplitProduct(SumBaseQ, b)))) except (TypeError, AttributeError): return False cons477 = CustomConstraint(cons_f477) def cons_f478(a, b): return Not(PositiveQ(a/b)) cons478 = CustomConstraint(cons_f478) def cons_f479(n): return PositiveIntegerQ(n/S(4) + S(-1)) cons479 = CustomConstraint(cons_f479) def cons_f480(a, b): return PositiveQ(a/b) cons480 = CustomConstraint(cons_f480) def cons_f481(b): return PosQ(b) cons481 = CustomConstraint(cons_f481) def cons_f482(b): return NegQ(b) cons482 = CustomConstraint(cons_f482) def cons_f483(a): return PosQ(a) cons483 = CustomConstraint(cons_f483) def cons_f484(a): return NegQ(a) cons484 = CustomConstraint(cons_f484) def cons_f485(a, b): return NegQ(b/a) cons485 = CustomConstraint(cons_f485) def cons_f486(a): return NegativeQ(a) cons486 = CustomConstraint(cons_f486) def cons_f487(p): return Less(S(-1), p, S(0)) cons487 = CustomConstraint(cons_f487) def cons_f488(p): return Unequal(p, S(-1)/2) cons488 = CustomConstraint(cons_f488) def cons_f489(n, p): return IntegerQ(p + S(1)/n) cons489 = CustomConstraint(cons_f489) def cons_f490(n, p): return Less(Denominator(p + S(1)/n), Denominator(p)) cons490 = CustomConstraint(cons_f490) def cons_f491(n): return FractionQ(n) cons491 = CustomConstraint(cons_f491) def cons_f492(n): return Not(IntegerQ(S(1)/n)) cons492 = CustomConstraint(cons_f492) def cons_f493(n, p): return Not(NegativeIntegerQ(p + S(1)/n)) cons493 = CustomConstraint(cons_f493) def cons_f494(a, p): return Or(IntegerQ(p), PositiveQ(a)) cons494 = CustomConstraint(cons_f494) def cons_f495(a, p): return Not(Or(IntegerQ(p), PositiveQ(a))) cons495 = CustomConstraint(cons_f495) def cons_f496(a1, a2, p): return Or(IntegerQ(p), And(PositiveQ(a1), PositiveQ(a2))) cons496 = CustomConstraint(cons_f496) def cons_f497(n): return PositiveIntegerQ(S(2)*n) cons497 = CustomConstraint(cons_f497) def cons_f498(n, p): return Or(IntegerQ(S(2)*p), Less(Denominator(p + S(1)/n), Denominator(p))) cons498 = CustomConstraint(cons_f498) def cons_f499(n): return NegativeIntegerQ(S(2)*n) cons499 = CustomConstraint(cons_f499) def cons_f500(n): return FractionQ(S(2)*n) cons500 = CustomConstraint(cons_f500) def cons_f501(c, m): return Or(IntegerQ(m), PositiveQ(c)) cons501 = CustomConstraint(cons_f501) def cons_f502(m, n): return IntegerQ((m + S(1))/n) cons502 = CustomConstraint(cons_f502) def cons_f503(m, n): return Not(IntegerQ((m + S(1))/n)) cons503 = CustomConstraint(cons_f503) def cons_f504(n): return NegQ(n) cons504 = CustomConstraint(cons_f504) def cons_f505(m, n, p): return ZeroQ(p + S(1) + (m + S(1))/n) cons505 = CustomConstraint(cons_f505) def cons_f506(m, n, p): return ZeroQ(p + S(1) + (m + S(1))/(S(2)*n)) cons506 = CustomConstraint(cons_f506) def cons_f507(m, n): return IntegerQ((m + S(1))/(S(2)*n)) cons507 = CustomConstraint(cons_f507) def cons_f508(m, n, p): return NegativeIntegerQ((m + n*(p + S(1)) + S(1))/n) cons508 = CustomConstraint(cons_f508) def cons_f509(m, n, p): return NegativeIntegerQ((m + S(2)*n*(p + S(1)) + S(1))/(S(2)*n)) cons509 = CustomConstraint(cons_f509) def cons_f510(m, n, p): return Not(NegativeIntegerQ((m + n*p + n + S(1))/n)) cons510 = CustomConstraint(cons_f510) def cons_f511(a, b, c, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return IntBinomialQ(a, b, c, n, m, p, x) cons511 = CustomConstraint(cons_f511) def cons_f512(m, n, p): return NonzeroQ(m + S(2)*n*p + S(1)) cons512 = CustomConstraint(cons_f512) def cons_f513(a1, a2, b1, b2, c, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return IntBinomialQ(a1*a2, b1*b2, c, n, m, p, x) cons513 = CustomConstraint(cons_f513) def cons_f514(m, n, p): return NonzeroQ(m + n*p + S(1)) cons514 = CustomConstraint(cons_f514) def cons_f515(m): return PositiveIntegerQ(m/S(4) + S(-1)/2) cons515 = CustomConstraint(cons_f515) def cons_f516(m): return NegativeIntegerQ(m/S(4) + S(-1)/2) cons516 = CustomConstraint(cons_f516) def cons_f517(m): return IntegerQ(S(2)*m) cons517 = CustomConstraint(cons_f517) def cons_f518(m): return Greater(m, S(3)/2) cons518 = CustomConstraint(cons_f518) def cons_f519(m, n): return Greater(m + S(1), n) cons519 = CustomConstraint(cons_f519) def cons_f520(m, n, p): return Not(NegativeIntegerQ((m + n*(p + S(1)) + S(1))/n)) cons520 = CustomConstraint(cons_f520) def cons_f521(m, n): return Greater(m + S(1), S(2)*n) cons521 = CustomConstraint(cons_f521) def cons_f522(m, n, p): return Not(NegativeIntegerQ((m + S(2)*n*(p + S(1)) + S(1))/(S(2)*n))) cons522 = CustomConstraint(cons_f522) def cons_f523(n): return PositiveIntegerQ(n/S(2) + S(-1)/2) cons523 = CustomConstraint(cons_f523) def cons_f524(m, n): return Less(m, n + S(-1)) cons524 = CustomConstraint(cons_f524) def cons_f525(m, n): return PositiveIntegerQ(m, n/S(2) + S(-1)/2) cons525 = CustomConstraint(cons_f525) def cons_f526(m, n): return PositiveIntegerQ(m, n/S(4) + S(-1)/2) cons526 = CustomConstraint(cons_f526) def cons_f527(m, n): return PositiveIntegerQ(m, n/S(4)) cons527 = CustomConstraint(cons_f527) def cons_f528(m, n): return Less(m, n/S(2)) cons528 = CustomConstraint(cons_f528) def cons_f529(m, n): return Inequality(n/S(2), LessEqual, m, Less, n) cons529 = CustomConstraint(cons_f529) def cons_f530(m, n): return PositiveIntegerQ(m, n) cons530 = CustomConstraint(cons_f530) def cons_f531(m, n): return Greater(m, S(2)*n + S(-1)) cons531 = CustomConstraint(cons_f531) def cons_f532(m, n): return Greater(m, n + S(-1)) cons532 = CustomConstraint(cons_f532) def cons_f533(m, n): return SumSimplerQ(m, -n) cons533 = CustomConstraint(cons_f533) def cons_f534(m, n, p): return NegativeIntegerQ((m + n*p + S(1))/n) cons534 = CustomConstraint(cons_f534) def cons_f535(m, n): return SumSimplerQ(m, -S(2)*n) cons535 = CustomConstraint(cons_f535) def cons_f536(m, n, p): return NegativeIntegerQ((m + S(2)*n*p + S(1))/(S(2)*n)) cons536 = CustomConstraint(cons_f536) def cons_f537(m, n): return SumSimplerQ(m, n) cons537 = CustomConstraint(cons_f537) def cons_f538(m, n): return SumSimplerQ(m, S(2)*n) cons538 = CustomConstraint(cons_f538) def cons_f539(m, n, p): return IntegersQ(m, p + (m + S(1))/n) cons539 = CustomConstraint(cons_f539) def cons_f540(m, n, p): return IntegersQ(m, p + (m + S(1))/(S(2)*n)) cons540 = CustomConstraint(cons_f540) def cons_f541(m, n, p): return Less(Denominator(p + (m + S(1))/n), Denominator(p)) cons541 = CustomConstraint(cons_f541) def cons_f542(m, n, p): return Less(Denominator(p + (m + S(1))/(S(2)*n)), Denominator(p)) cons542 = CustomConstraint(cons_f542) def cons_f543(m, n): return IntegerQ(n/(m + S(1))) cons543 = CustomConstraint(cons_f543) def cons_f544(m, n): return IntegerQ(S(2)*n/(m + S(1))) cons544 = CustomConstraint(cons_f544) def cons_f545(n): return Not(IntegerQ(S(2)*n)) cons545 = CustomConstraint(cons_f545) def cons_f546(m, n, p): return ZeroQ(p + (m + S(1))/n) cons546 = CustomConstraint(cons_f546) def cons_f547(m, n, p): return ZeroQ(p + (m + S(1))/(S(2)*n)) cons547 = CustomConstraint(cons_f547) def cons_f548(m, n, p): return IntegerQ(p + (m + S(1))/n) cons548 = CustomConstraint(cons_f548) def cons_f549(m, n, p): return IntegerQ(p + (m + S(1))/(S(2)*n)) cons549 = CustomConstraint(cons_f549) def cons_f550(m, n): return FractionQ((m + S(1))/n) cons550 = CustomConstraint(cons_f550) def cons_f551(m, n): return Or(SumSimplerQ(m, n), SumSimplerQ(m, -n)) cons551 = CustomConstraint(cons_f551) def cons_f552(a, p): return Or(NegativeIntegerQ(p), PositiveQ(a)) cons552 = CustomConstraint(cons_f552) def cons_f553(a, p): return Not(Or(NegativeIntegerQ(p), PositiveQ(a))) cons553 = CustomConstraint(cons_f553) def cons_f554(v, x): if isinstance(x, (int, Integer, float, Float)): return False return LinearQ(v, x) cons554 = CustomConstraint(cons_f554) def cons_f555(v, x): if isinstance(x, (int, Integer, float, Float)): return False return NonzeroQ(v - x) cons555 = CustomConstraint(cons_f555) def cons_f556(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return LinearPairQ(u, v, x) cons556 = CustomConstraint(cons_f556) def cons_f557(p, q): return PositiveIntegerQ(p, q) cons557 = CustomConstraint(cons_f557) def cons_f558(n, p): return ZeroQ(n*p + S(1)) cons558 = CustomConstraint(cons_f558) def cons_f559(n, p, q): return ZeroQ(n*(p + q + S(1)) + S(1)) cons559 = CustomConstraint(cons_f559) def cons_f560(n, p, q): return ZeroQ(n*(p + q + S(2)) + S(1)) cons560 = CustomConstraint(cons_f560) def cons_f561(a, b, c, d, p, q): return ZeroQ(a*d*(p + S(1)) + b*c*(q + S(1))) cons561 = CustomConstraint(cons_f561) def cons_f562(p, q): return Or(And(RationalQ(p), Less(p, S(-1))), Not(And(RationalQ(q), Less(q, S(-1))))) cons562 = CustomConstraint(cons_f562) def cons_f563(a, b, c, d, n, p): return ZeroQ(a*d - b*c*(n*(p + S(1)) + S(1))) cons563 = CustomConstraint(cons_f563) def cons_f564(n, p): return Or(And(RationalQ(p), Less(p, S(-1))), NegativeIntegerQ(p + S(1)/n)) cons564 = CustomConstraint(cons_f564) def cons_f565(n, p): return NonzeroQ(n*(p + S(1)) + S(1)) cons565 = CustomConstraint(cons_f565) def cons_f566(q): return NegativeIntegerQ(q) cons566 = CustomConstraint(cons_f566) def cons_f567(p, q): return GreaterEqual(p, -q) cons567 = CustomConstraint(cons_f567) def cons_f568(a, b, c, d): return ZeroQ(S(3)*a*d + b*c) cons568 = CustomConstraint(cons_f568) def cons_f569(p): return Or(Equal(p, S(1)/2), Equal(Denominator(p), S(4))) cons569 = CustomConstraint(cons_f569) def cons_f570(p): return Equal(Denominator(p), S(4)) cons570 = CustomConstraint(cons_f570) def cons_f571(p): return Or(Equal(p, S(-5)/4), Equal(p, S(-7)/4)) cons571 = CustomConstraint(cons_f571) def cons_f572(a, b): return PosQ(a*b) cons572 = CustomConstraint(cons_f572) def cons_f573(a, b): return NegQ(a*b) cons573 = CustomConstraint(cons_f573) def cons_f574(p): return Or(Equal(p, S(3)/4), Equal(p, S(5)/4)) cons574 = CustomConstraint(cons_f574) def cons_f575(c, d): return PosQ(d/c) cons575 = CustomConstraint(cons_f575) def cons_f576(q): return Less(S(0), q, S(1)) cons576 = CustomConstraint(cons_f576) def cons_f577(a, b, c, d, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return IntBinomialQ(a, b, c, d, n, p, q, x) cons577 = CustomConstraint(cons_f577) def cons_f578(q): return Greater(q, S(1)) cons578 = CustomConstraint(cons_f578) def cons_f579(p, q): return Greater(p + q, S(0)) cons579 = CustomConstraint(cons_f579) def cons_f580(n, p, q): return NonzeroQ(n*(p + q) + S(1)) cons580 = CustomConstraint(cons_f580) def cons_f581(p): return Not(And(IntegerQ(p), Greater(p, S(1)))) cons581 = CustomConstraint(cons_f581) def cons_f582(a, b, c, d): return Not(SimplerSqrtQ(b/a, d/c)) cons582 = CustomConstraint(cons_f582) def cons_f583(c, d): return NegQ(d/c) cons583 = CustomConstraint(cons_f583) def cons_f584(a, b, c, d): return Not(And(NegQ(b/a), SimplerSqrtQ(-b/a, -d/c))) cons584 = CustomConstraint(cons_f584) def cons_f585(a, b, c, d): return PositiveQ(a - b*c/d) cons585 = CustomConstraint(cons_f585) def cons_f586(n): return NonzeroQ(n + S(1)) cons586 = CustomConstraint(cons_f586) def cons_f587(mn, n): return EqQ(mn, -n) cons587 = CustomConstraint(cons_f587) def cons_f588(q): return IntegerQ(q) cons588 = CustomConstraint(cons_f588) def cons_f589(n, p): return Or(PosQ(n), Not(IntegerQ(p))) cons589 = CustomConstraint(cons_f589) def cons_f590(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return PseudoBinomialPairQ(u, v, x) cons590 = CustomConstraint(cons_f590) def cons_f591(m, p): return IntegersQ(p, m/p) cons591 = CustomConstraint(cons_f591) def cons_f592(m, p, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return PseudoBinomialPairQ(u*x**(m/p), v, x) cons592 = CustomConstraint(cons_f592) def cons_f593(e, m): return Or(IntegerQ(m), PositiveQ(e)) cons593 = CustomConstraint(cons_f593) def cons_f594(a, b, c, d, m, n, p): return ZeroQ(a*d*(m + S(1)) - b*c*(m + n*(p + S(1)) + S(1))) cons594 = CustomConstraint(cons_f594) def cons_f595(n, non2): return ZeroQ(-n/S(2) + non2) cons595 = CustomConstraint(cons_f595) def cons_f596(a1, a2, b1, b2, c, d, m, n, p): return ZeroQ(a1*a2*d*(m + S(1)) - b1*b2*c*(m + n*(p + S(1)) + S(1))) cons596 = CustomConstraint(cons_f596) def cons_f597(m, n, p): return ZeroQ(m + n*(p + S(1)) + S(1)) cons597 = CustomConstraint(cons_f597) def cons_f598(e, n): return Or(IntegerQ(n), PositiveQ(e)) cons598 = CustomConstraint(cons_f598) def cons_f599(m, n): return Or(And(Greater(n, S(0)), Less(m, S(-1))), And(Less(n, S(0)), Greater(m + n, S(-1)))) cons599 = CustomConstraint(cons_f599) def cons_f600(p): return Not(And(IntegerQ(p), Less(p, S(-1)))) cons600 = CustomConstraint(cons_f600) def cons_f601(m): return PositiveIntegerQ(m/S(2)) cons601 = CustomConstraint(cons_f601) def cons_f602(m, p): return Or(IntegerQ(p), Equal(m + S(2)*p + S(1), S(0))) cons602 = CustomConstraint(cons_f602) def cons_f603(m): return NegativeIntegerQ(m/S(2)) cons603 = CustomConstraint(cons_f603) def cons_f604(m, n, p): return Or(IntegerQ(p), Not(RationalQ(m)), And(PositiveIntegerQ(n), NegativeIntegerQ(p + S(1)/2), LessEqual(S(-1), m, -n*(p + S(1))))) cons604 = CustomConstraint(cons_f604) def cons_f605(m, n, p): return NonzeroQ(m + n*(p + S(1)) + S(1)) cons605 = CustomConstraint(cons_f605) def cons_f606(m): return Or(IntegerQ(m), PositiveIntegerQ(S(2)*m + S(2)), Not(RationalQ(m))) cons606 = CustomConstraint(cons_f606) def cons_f607(m, n, p): return NonzeroQ(m + n*(p + S(2)) + S(1)) cons607 = CustomConstraint(cons_f607) def cons_f608(m, p, q): return RationalQ(m, p, q) cons608 = CustomConstraint(cons_f608) def cons_f609(m, n): return Greater(m - n + S(1), S(0)) cons609 = CustomConstraint(cons_f609) def cons_f610(a, b, c, d, e, m, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return IntBinomialQ(a, b, c, d, e, m, n, p, q, x) cons610 = CustomConstraint(cons_f610) def cons_f611(m, n): return Greater(m - n + S(1), n) cons611 = CustomConstraint(cons_f611) def cons_f612(m, n): return Inequality(n, GreaterEqual, m - n + S(1), Greater, S(0)) cons612 = CustomConstraint(cons_f612) def cons_f613(m, q): return RationalQ(m, q) cons613 = CustomConstraint(cons_f613) def cons_f614(m, n): return LessEqual(n, m, S(2)*n + S(-1)) cons614 = CustomConstraint(cons_f614) def cons_f615(m, n): return IntegersQ(m/S(2), n/S(2)) cons615 = CustomConstraint(cons_f615) def cons_f616(m, n): return Less(S(0), m - n + S(1), n) cons616 = CustomConstraint(cons_f616) def cons_f617(n): return LessEqual(n, S(4)) cons617 = CustomConstraint(cons_f617) def cons_f618(a, b, c, d): return ZeroQ(-a*d + S(4)*b*c) cons618 = CustomConstraint(cons_f618) def cons_f619(m): return PositiveIntegerQ(m/S(3) + S(-1)/3) cons619 = CustomConstraint(cons_f619) def cons_f620(m): return NegativeIntegerQ(m/S(3) + S(-1)/3) cons620 = CustomConstraint(cons_f620) def cons_f621(m): return IntegerQ(m/S(3) + S(-1)/3) cons621 = CustomConstraint(cons_f621) def cons_f622(n): return Or(EqQ(n, S(2)), EqQ(n, S(4))) cons622 = CustomConstraint(cons_f622) def cons_f623(a, b, c, d, n): return Not(And(EqQ(n, S(2)), SimplerSqrtQ(-b/a, -d/c))) cons623 = CustomConstraint(cons_f623) def cons_f624(m, n, p, q): return IntegersQ(p + (m + S(1))/n, q) cons624 = CustomConstraint(cons_f624) def cons_f625(m, n): return Or(ZeroQ(m - n), ZeroQ(m - S(2)*n + S(1))) cons625 = CustomConstraint(cons_f625) def cons_f626(m, p, q): return IntegersQ(m, p, q) cons626 = CustomConstraint(cons_f626) def cons_f627(p): return GreaterEqual(p, S(-2)) cons627 = CustomConstraint(cons_f627) def cons_f628(m, q): return Or(GreaterEqual(q, S(-2)), And(Equal(q, S(-3)), IntegerQ(m/S(2) + S(-1)/2))) cons628 = CustomConstraint(cons_f628) def cons_f629(m, n): return NonzeroQ(m - n + S(1)) cons629 = CustomConstraint(cons_f629) def cons_f630(p, q, r): return PositiveIntegerQ(p, q, r) cons630 = CustomConstraint(cons_f630) def cons_f631(a, b, c, d, e, f, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, n), x) cons631 = CustomConstraint(cons_f631) def cons_f632(a, b, c, d, n): return Not(And(ZeroQ(n + S(-2)), Or(And(PosQ(b/a), PosQ(d/c)), And(NegQ(b/a), Or(PosQ(d/c), And(PositiveQ(a), Or(Not(PositiveQ(c)), SimplerSqrtQ(-b/a, -d/c)))))))) cons632 = CustomConstraint(cons_f632) def cons_f633(n, p, q): return NonzeroQ(n*(p + q + S(1)) + S(1)) cons633 = CustomConstraint(cons_f633) def cons_f634(a, b, c, d, e, f, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, p, n), x) cons634 = CustomConstraint(cons_f634) def cons_f635(a, b, c, d, e, f, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, n, p, q), x) cons635 = CustomConstraint(cons_f635) def cons_f636(c, d): return PositiveQ(d/c) cons636 = CustomConstraint(cons_f636) def cons_f637(e, f): return PositiveQ(f/e) cons637 = CustomConstraint(cons_f637) def cons_f638(c, d, e, f): return Not(SimplerSqrtQ(d/c, f/e)) cons638 = CustomConstraint(cons_f638) def cons_f639(c, d, e, f): return Not(SimplerSqrtQ(-f/e, -d/c)) cons639 = CustomConstraint(cons_f639) def cons_f640(e, f): return PosQ(f/e) cons640 = CustomConstraint(cons_f640) def cons_f641(c, d, e, f): return Not(And(NegQ(f/e), SimplerSqrtQ(-f/e, -d/c))) cons641 = CustomConstraint(cons_f641) def cons_f642(q, r): return RationalQ(q, r) cons642 = CustomConstraint(cons_f642) def cons_f643(r): return Greater(r, S(1)) cons643 = CustomConstraint(cons_f643) def cons_f644(q): return LessEqual(q, S(-1)) cons644 = CustomConstraint(cons_f644) def cons_f645(c, d, e, f): return PosQ((-c*f + d*e)/c) cons645 = CustomConstraint(cons_f645) def cons_f646(c, d, e, f): return NegQ((-c*f + d*e)/c) cons646 = CustomConstraint(cons_f646) def cons_f647(a, b, c, d, e, f, n, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, n, p, q, r), x) cons647 = CustomConstraint(cons_f647) def cons_f648(u, v): return ZeroQ(u - v) cons648 = CustomConstraint(cons_f648) def cons_f649(u, w): return ZeroQ(u - w) cons649 = CustomConstraint(cons_f649) def cons_f650(r): return IntegerQ(r) cons650 = CustomConstraint(cons_f650) def cons_f651(n, n2): return ZeroQ(-n/S(2) + n2) cons651 = CustomConstraint(cons_f651) def cons_f652(e1, e2, f1, f2): return ZeroQ(e1*f2 + e2*f1) cons652 = CustomConstraint(cons_f652) def cons_f653(e1, e2, r): return Or(IntegerQ(r), And(PositiveQ(e1), PositiveQ(e2))) cons653 = CustomConstraint(cons_f653) def cons_f654(e1, x): return FreeQ(e1, x) cons654 = CustomConstraint(cons_f654) def cons_f655(f1, x): return FreeQ(f1, x) cons655 = CustomConstraint(cons_f655) def cons_f656(e2, x): return FreeQ(e2, x) cons656 = CustomConstraint(cons_f656) def cons_f657(f2, x): return FreeQ(f2, x) cons657 = CustomConstraint(cons_f657) def cons_f658(g, m): return Or(IntegerQ(m), PositiveQ(g)) cons658 = CustomConstraint(cons_f658) def cons_f659(p, q, r): return PositiveIntegerQ(p + S(2), q, r) cons659 = CustomConstraint(cons_f659) def cons_f660(p, q, r): return IntegersQ(p, q, r) cons660 = CustomConstraint(cons_f660) def cons_f661(a, b, c, d, e, f, q): return Not(And(Equal(q, S(1)), SimplerQ(-a*d + b*c, -a*f + b*e))) cons661 = CustomConstraint(cons_f661) def cons_f662(c, d, e, f, n, q, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(Equal(q, S(1)), SimplerQ(e + f*x**n, c + d*x**n))) cons662 = CustomConstraint(cons_f662) def cons_f663(r): return PositiveIntegerQ(r) cons663 = CustomConstraint(cons_f663) def cons_f664(a, b, c, d, e, f, g, m, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, m, n, p, q), x) cons664 = CustomConstraint(cons_f664) def cons_f665(a, b, c, d, e, f, g, m, n, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, m, n, p, q, r), x) cons665 = CustomConstraint(cons_f665) def cons_f666(n, p): return ZeroQ(n*(S(2)*p + S(1)) + S(1)) cons666 = CustomConstraint(cons_f666) def cons_f667(n, p): return ZeroQ(S(2)*n*(p + S(1)) + S(1)) cons667 = CustomConstraint(cons_f667) def cons_f668(n, p): return Or(ZeroQ(S(2)*n*p + S(1)), ZeroQ(n*(S(2)*p + S(-1)) + S(1))) cons668 = CustomConstraint(cons_f668) def cons_f669(p): return IntegerQ(p + S(1)/2) cons669 = CustomConstraint(cons_f669) def cons_f670(n): return NonzeroQ(S(2)*n + S(1)) cons670 = CustomConstraint(cons_f670) def cons_f671(n, p): return NonzeroQ(S(2)*n*p + S(1)) cons671 = CustomConstraint(cons_f671) def cons_f672(n, p): return NonzeroQ(n*(S(2)*p + S(-1)) + S(1)) cons672 = CustomConstraint(cons_f672) def cons_f673(n, p): return NonzeroQ(n*(S(2)*p + S(1)) + S(1)) cons673 = CustomConstraint(cons_f673) def cons_f674(n, p): return NonzeroQ(S(2)*n*(p + S(1)) + S(1)) cons674 = CustomConstraint(cons_f674) def cons_f675(n, p): return Or(IntegerQ(p), ZeroQ(n + S(-2))) cons675 = CustomConstraint(cons_f675) def cons_f676(n): return PositiveIntegerQ(n/S(2)) cons676 = CustomConstraint(cons_f676) def cons_f677(a, b, c): return PositiveQ(-S(4)*a*c + b**S(2)) cons677 = CustomConstraint(cons_f677) def cons_f678(a, c): return PositiveQ(c/a) cons678 = CustomConstraint(cons_f678) def cons_f679(a, b): return NegativeQ(b/a) cons679 = CustomConstraint(cons_f679) def cons_f680(a, c): return PosQ(c/a) cons680 = CustomConstraint(cons_f680) def cons_f681(a, c): return NegQ(c/a) cons681 = CustomConstraint(cons_f681) def cons_f682(n, n2): return EqQ(n2, S(2)*n) cons682 = CustomConstraint(cons_f682) def cons_f683(n): return PosQ(n) cons683 = CustomConstraint(cons_f683) def cons_f684(m, n, p): return ZeroQ(m + n*(S(2)*p + S(1)) + S(1)) cons684 = CustomConstraint(cons_f684) def cons_f685(m, n): return NonzeroQ(m + n + S(1)) cons685 = CustomConstraint(cons_f685) def cons_f686(m, n, p): return ZeroQ(m + S(2)*n*(p + S(1)) + S(1)) cons686 = CustomConstraint(cons_f686) def cons_f687(m, n): return Inequality(S(-1), LessEqual, m + n, Less, S(0)) cons687 = CustomConstraint(cons_f687) def cons_f688(m, n): return Less(m + n, S(-1)) cons688 = CustomConstraint(cons_f688) def cons_f689(m, n, p): return Not(And(NegativeIntegerQ((m + S(2)*n*(p + S(1)) + S(1))/n), Greater(p + (m + S(2)*n*(p + S(1)) + S(1))/n, S(0)))) cons689 = CustomConstraint(cons_f689) def cons_f690(m, n, p): return NonzeroQ(m + n*(S(2)*p + S(-1)) + S(1)) cons690 = CustomConstraint(cons_f690) def cons_f691(m, n, p): return Not(And(PositiveIntegerQ(m), IntegerQ((m + S(1))/n), Less(S(-1) + (m + S(1))/n, S(2)*p))) cons691 = CustomConstraint(cons_f691) def cons_f692(m, n): return Inequality(n + S(-1), Less, m, LessEqual, S(2)*n + S(-1)) cons692 = CustomConstraint(cons_f692) def cons_f693(m, n, p): return Or(IntegerQ(S(2)*p), PositiveIntegerQ((m + S(1))/n)) cons693 = CustomConstraint(cons_f693) def cons_f694(m, n, p): return Unequal(m + S(2)*n*p + S(1), S(0)) cons694 = CustomConstraint(cons_f694) def cons_f695(m, n, p): return Unequal(m + n*(S(2)*p + S(-1)) + S(1), S(0)) cons695 = CustomConstraint(cons_f695) def cons_f696(m, n, p): return Or(IntegerQ(p), And(IntegerQ(S(2)*p), IntegerQ(m), Equal(n, S(2)))) cons696 = CustomConstraint(cons_f696) def cons_f697(m, n): return Greater(m, S(3)*n + S(-1)) cons697 = CustomConstraint(cons_f697) def cons_f698(a, b, c): return NegativeQ(-S(4)*a*c + b**S(2)) cons698 = CustomConstraint(cons_f698) def cons_f699(a, c): return PosQ(a*c) cons699 = CustomConstraint(cons_f699) def cons_f700(m, n): return PositiveIntegerQ(n/S(2), m) cons700 = CustomConstraint(cons_f700) def cons_f701(m, n): return Inequality(S(3)*n/S(2), LessEqual, m, Less, S(2)*n) cons701 = CustomConstraint(cons_f701) def cons_f702(m, n): return Inequality(n/S(2), LessEqual, m, Less, S(3)*n/S(2)) cons702 = CustomConstraint(cons_f702) def cons_f703(m, n): return GreaterEqual(m, n) cons703 = CustomConstraint(cons_f703) def cons_f704(p): return NegativeIntegerQ(p + S(1)) cons704 = CustomConstraint(cons_f704) def cons_f705(b, c, d, e, n, p): return ZeroQ(b*e*(n*p + S(1)) - c*d*(n*(S(2)*p + S(1)) + S(1))) cons705 = CustomConstraint(cons_f705) def cons_f706(b, c, d, e, n, p): return NonzeroQ(b*e*(n*p + S(1)) - c*d*(n*(S(2)*p + S(1)) + S(1))) cons706 = CustomConstraint(cons_f706) def cons_f707(a, c, d, e): return ZeroQ(-a*e**S(2) + c*d**S(2)) cons707 = CustomConstraint(cons_f707) def cons_f708(d, e): return PosQ(d*e) cons708 = CustomConstraint(cons_f708) def cons_f709(d, e): return NegQ(d*e) cons709 = CustomConstraint(cons_f709) def cons_f710(a, c, d, e): return NonzeroQ(-a*e**S(2) + c*d**S(2)) cons710 = CustomConstraint(cons_f710) def cons_f711(a, c): return NegQ(a*c) cons711 = CustomConstraint(cons_f711) def cons_f712(a, c, n): return Or(PosQ(a*c), Not(IntegerQ(n))) cons712 = CustomConstraint(cons_f712) def cons_f713(a, b, c, d, e): return Or(PositiveQ(-b/c + S(2)*d/e), And(Not(NegativeQ(-b/c + S(2)*d/e)), ZeroQ(d - e*Rt(a/c, S(2))))) cons713 = CustomConstraint(cons_f713) def cons_f714(a, b, c): return Not(PositiveQ(-S(4)*a*c + b**S(2))) cons714 = CustomConstraint(cons_f714) def cons_f715(a, b, c, n): return Or(PosQ(-S(4)*a*c + b**S(2)), Not(PositiveIntegerQ(n/S(2)))) cons715 = CustomConstraint(cons_f715) def cons_f716(n, p): return NonzeroQ(S(2)*n*p + n + S(1)) cons716 = CustomConstraint(cons_f716) def cons_f717(a, c): return PositiveQ(-a*c) cons717 = CustomConstraint(cons_f717) def cons_f718(n, p, q): return NonzeroQ(S(2)*n*p + n*q + S(1)) cons718 = CustomConstraint(cons_f718) def cons_f719(p): return PositiveIntegerQ(p + S(-1)/2) cons719 = CustomConstraint(cons_f719) def cons_f720(c): return Not(NegativeQ(c)) cons720 = CustomConstraint(cons_f720) def cons_f721(p): return NegativeIntegerQ(p + S(1)/2) cons721 = CustomConstraint(cons_f721) def cons_f722(b, c, d, e): return ZeroQ(-b*e + c*d) cons722 = CustomConstraint(cons_f722) def cons_f723(a, d): return Not(And(PositiveQ(a), PositiveQ(d))) cons723 = CustomConstraint(cons_f723) def cons_f724(n, p, q): return Or(And(IntegersQ(p, q), Not(IntegerQ(n))), PositiveIntegerQ(p), And(PositiveIntegerQ(q), Not(IntegerQ(n)))) cons724 = CustomConstraint(cons_f724) def cons_f725(n, p): return Not(IntegersQ(n, S(2)*p)) cons725 = CustomConstraint(cons_f725) def cons_f726(n, q): return Not(IntegersQ(n, q)) cons726 = CustomConstraint(cons_f726) def cons_f727(mn, n2): return EqQ(n2, -S(2)*mn) cons727 = CustomConstraint(cons_f727) def cons_f728(mn, x): return FreeQ(mn, x) cons728 = CustomConstraint(cons_f728) def cons_f729(n2): return PosQ(n2) cons729 = CustomConstraint(cons_f729) def cons_f730(n2): return NegQ(n2) cons730 = CustomConstraint(cons_f730) def cons_f731(d1, d2, e1, e2): return ZeroQ(d1*e2 + d2*e1) cons731 = CustomConstraint(cons_f731) def cons_f732(d1, d2, q): return Or(IntegerQ(q), And(PositiveQ(d1), PositiveQ(d2))) cons732 = CustomConstraint(cons_f732) def cons_f733(d1, x): return FreeQ(d1, x) cons733 = CustomConstraint(cons_f733) def cons_f734(d2, x): return FreeQ(d2, x) cons734 = CustomConstraint(cons_f734) def cons_f735(f, m): return Or(IntegerQ(m), PositiveQ(f)) cons735 = CustomConstraint(cons_f735) def cons_f736(m, n): return PositiveIntegerQ(m, n, (m + S(1))/n) cons736 = CustomConstraint(cons_f736) def cons_f737(m, q): return IntegersQ(m, q) cons737 = CustomConstraint(cons_f737) def cons_f738(n, p): return Greater(S(2)*n*p, n + S(-1)) cons738 = CustomConstraint(cons_f738) def cons_f739(m, n, p, q): return NonzeroQ(m + S(2)*n*p + n*q + S(1)) cons739 = CustomConstraint(cons_f739) def cons_f740(m, n, p): return Unequal(m + n*(S(2)*p + S(1)) + S(1), S(0)) cons740 = CustomConstraint(cons_f740) def cons_f741(m, n, p): return NonzeroQ(m + n*(S(2)*p + S(1)) + S(1)) cons741 = CustomConstraint(cons_f741) def cons_f742(m, n): return IntegersQ(m, n/S(2)) cons742 = CustomConstraint(cons_f742) def cons_f743(d, e): return PositiveQ(d/e) cons743 = CustomConstraint(cons_f743) def cons_f744(b, c, d, e): return PosQ(c*(-b*e + S(2)*c*d)/e) cons744 = CustomConstraint(cons_f744) def cons_f745(n): return IntegerQ(n/S(2)) cons745 = CustomConstraint(cons_f745) def cons_f746(n): return Greater(n, S(2)) cons746 = CustomConstraint(cons_f746) def cons_f747(m, n): return Less(m, -n) cons747 = CustomConstraint(cons_f747) def cons_f748(m, n): return Greater(m, n) cons748 = CustomConstraint(cons_f748) def cons_f749(m, q): return Or(PositiveIntegerQ(q), IntegersQ(m, q)) cons749 = CustomConstraint(cons_f749) def cons_f750(p, q): return Or(PositiveIntegerQ(p), PositiveIntegerQ(q)) cons750 = CustomConstraint(cons_f750) def cons_f751(f, m): return Not(Or(IntegerQ(m), PositiveQ(f))) cons751 = CustomConstraint(cons_f751) def cons_f752(n, q): return ZeroQ(n - q) cons752 = CustomConstraint(cons_f752) def cons_f753(n, r): return ZeroQ(-n + r) cons753 = CustomConstraint(cons_f753) def cons_f754(n, q, r): return ZeroQ(-S(2)*n + q + r) cons754 = CustomConstraint(cons_f754) def cons_f755(n, q): return PosQ(n - q) cons755 = CustomConstraint(cons_f755) def cons_f756(n, p, q): return NonzeroQ(p*(S(2)*n - q) + S(1)) cons756 = CustomConstraint(cons_f756) def cons_f757(n, q): return ZeroQ(-n + q) cons757 = CustomConstraint(cons_f757) def cons_f758(m, n, q): return Or(And(ZeroQ(m + S(-1)), ZeroQ(n + S(-3)), ZeroQ(q + S(-2))), And(Or(ZeroQ(m + S(1)/2), ZeroQ(m + S(-3)/2), ZeroQ(m + S(-1)/2), ZeroQ(m + S(-5)/2)), ZeroQ(n + S(-3)), ZeroQ(q + S(-1)))) cons758 = CustomConstraint(cons_f758) def cons_f759(m, n): return ZeroQ(m - S(3)*n/S(2) + S(3)/2) cons759 = CustomConstraint(cons_f759) def cons_f760(n, q): return ZeroQ(-n + q + S(1)) cons760 = CustomConstraint(cons_f760) def cons_f761(n, r): return ZeroQ(-n + r + S(-1)) cons761 = CustomConstraint(cons_f761) def cons_f762(m, n): return ZeroQ(m - S(3)*n/S(2) + S(1)/2) cons762 = CustomConstraint(cons_f762) def cons_f763(m, n, p): return Equal(m + p*(n + S(-1)) + S(-1), S(0)) cons763 = CustomConstraint(cons_f763) def cons_f764(m, n, p, q): return Equal(m + p*q + S(1), n - q) cons764 = CustomConstraint(cons_f764) def cons_f765(m, n, p, q): return Greater(m + p*q + S(1), n - q) cons765 = CustomConstraint(cons_f765) def cons_f766(m, n, p, q): return Unequal(m + p*(S(2)*n - q) + S(1), S(0)) cons766 = CustomConstraint(cons_f766) def cons_f767(m, n, p, q): return Unequal(m + p*q + (n - q)*(S(2)*p + S(-1)) + S(1), S(0)) cons767 = CustomConstraint(cons_f767) def cons_f768(m, n, p, q): return LessEqual(m + p*q + S(1), -n + q + S(1)) cons768 = CustomConstraint(cons_f768) def cons_f769(m, p, q): return NonzeroQ(m + p*q + S(1)) cons769 = CustomConstraint(cons_f769) def cons_f770(m, n, p, q): return Greater(m + p*q + S(1), -n + q) cons770 = CustomConstraint(cons_f770) def cons_f771(m, n, p, q): return Equal(m + p*q + S(1), -(n - q)*(S(2)*p + S(3))) cons771 = CustomConstraint(cons_f771) def cons_f772(m, n, p, q): return Greater(m + p*q + S(1), S(2)*n - S(2)*q) cons772 = CustomConstraint(cons_f772) def cons_f773(m, n, p, q): return Less(m + p*q + S(1), n - q) cons773 = CustomConstraint(cons_f773) def cons_f774(m, n, p, q): return Less(n - q, m + p*q + S(1), S(2)*n - S(2)*q) cons774 = CustomConstraint(cons_f774) def cons_f775(p): return Inequality(S(-1), LessEqual, p, Less, S(0)) cons775 = CustomConstraint(cons_f775) def cons_f776(m, n, p, q): return Equal(m + p*q + S(1), S(2)*n - S(2)*q) cons776 = CustomConstraint(cons_f776) def cons_f777(m, n, p, q): return Equal(m + p*q + S(1), -S(2)*(n - q)*(p + S(1))) cons777 = CustomConstraint(cons_f777) def cons_f778(m, p, q): return Less(m + p*q + S(1), S(0)) cons778 = CustomConstraint(cons_f778) def cons_f779(n, q, r): return ZeroQ(-n + q + r) cons779 = CustomConstraint(cons_f779) def cons_f780(j, n, q): return ZeroQ(j - S(2)*n + q) cons780 = CustomConstraint(cons_f780) def cons_f781(j, n, q): return ZeroQ(j - n + q) cons781 = CustomConstraint(cons_f781) def cons_f782(n): return ZeroQ(n + S(-3)) cons782 = CustomConstraint(cons_f782) def cons_f783(q): return ZeroQ(q + S(-2)) cons783 = CustomConstraint(cons_f783) def cons_f784(n, p, q): return NonzeroQ(p*q + (n - q)*(S(2)*p + S(1)) + S(1)) cons784 = CustomConstraint(cons_f784) def cons_f785(m, n, p, q): return LessEqual(m + p*q, -n + q) cons785 = CustomConstraint(cons_f785) def cons_f786(m, p, q): return Unequal(m + p*q + S(1), S(0)) cons786 = CustomConstraint(cons_f786) def cons_f787(m, n, p, q): return Unequal(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1), S(0)) cons787 = CustomConstraint(cons_f787) def cons_f788(m, n, p, q): return Greater(m + p*q, n - q + S(-1)) cons788 = CustomConstraint(cons_f788) def cons_f789(m, n, p, q): return Greater(m + p*q, -n + q + S(-1)) cons789 = CustomConstraint(cons_f789) def cons_f790(m, n, p, q): return Less(m + p*q, n - q + S(-1)) cons790 = CustomConstraint(cons_f790) def cons_f791(m, n, p, q): return GreaterEqual(m + p*q, n - q + S(-1)) cons791 = CustomConstraint(cons_f791) def cons_f792(m, n, p, q): return Or(Inequality(S(-1), LessEqual, p, Less, S(0)), Equal(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1), S(0))) cons792 = CustomConstraint(cons_f792) def cons_f793(m): return Or(ZeroQ(m + S(-1)/2), ZeroQ(m + S(1)/2)) cons793 = CustomConstraint(cons_f793) def cons_f794(q): return ZeroQ(q + S(-1)) cons794 = CustomConstraint(cons_f794) def cons_f795(j, k, q): return ZeroQ(j - k + q) cons795 = CustomConstraint(cons_f795) def cons_f796(j, k, n): return ZeroQ(j - S(2)*k + n) cons796 = CustomConstraint(cons_f796) def cons_f797(j, k): return PosQ(-j + k) cons797 = CustomConstraint(cons_f797) def cons_f798(j, x): return FreeQ(j, x) cons798 = CustomConstraint(cons_f798) def cons_f799(k, x): return FreeQ(k, x) cons799 = CustomConstraint(cons_f799) def cons_f800(n, q): return IntegerQ(n*q) cons800 = CustomConstraint(cons_f800) def cons_f801(a, b, c, d, e, f, m, n, p, q, r, s, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, m, n, p, q, r, s), x) cons801 = CustomConstraint(cons_f801) def cons_f802(s, x): return FreeQ(s, x) cons802 = CustomConstraint(cons_f802) def cons_f803(b, d, e): return PositiveQ(b*d*e) cons803 = CustomConstraint(cons_f803) def cons_f804(a, b, c, d): return PositiveQ(-a*d/b + c) cons804 = CustomConstraint(cons_f804) def cons_f805(n): return IntegerQ(S(1)/n) cons805 = CustomConstraint(cons_f805) def cons_f806(u, x): if isinstance(x, (int, Integer, float, Float)): return False return PolynomialQ(u, x) cons806 = CustomConstraint(cons_f806) def cons_f807(m, r): return IntegersQ(m, r) cons807 = CustomConstraint(cons_f807) def cons_f808(a, b, c, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, n, p), x) cons808 = CustomConstraint(cons_f808) def cons_f809(n, n2): return ZeroQ(S(2)*n + n2) cons809 = CustomConstraint(cons_f809) def cons_f810(n): return IntegerQ(S(2)*n) cons810 = CustomConstraint(cons_f810) def cons_f811(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(LinearMatchQ(u, x)) cons811 = CustomConstraint(cons_f811) def cons_f812(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return LinearQ(List(u, v), x) cons812 = CustomConstraint(cons_f812) def cons_f813(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(LinearMatchQ(List(u, v), x)) cons813 = CustomConstraint(cons_f813) def cons_f814(u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return LinearQ(List(u, v, w), x) cons814 = CustomConstraint(cons_f814) def cons_f815(u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(LinearMatchQ(List(u, v, w), x)) cons815 = CustomConstraint(cons_f815) def cons_f816(u, v, w, x, z): if isinstance(x, (int, Integer, float, Float)): return False return LinearQ(List(u, v, w, z), x) cons816 = CustomConstraint(cons_f816) def cons_f817(u, v, w, x, z): if isinstance(x, (int, Integer, float, Float)): return False return Not(LinearMatchQ(List(u, v, w, z), x)) cons817 = CustomConstraint(cons_f817) def cons_f818(u, x): if isinstance(x, (int, Integer, float, Float)): return False return QuadraticQ(u, x) cons818 = CustomConstraint(cons_f818) def cons_f819(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(QuadraticMatchQ(u, x)) cons819 = CustomConstraint(cons_f819) def cons_f820(v, x): if isinstance(x, (int, Integer, float, Float)): return False return QuadraticQ(v, x) cons820 = CustomConstraint(cons_f820) def cons_f821(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(LinearMatchQ(u, x), QuadraticMatchQ(v, x))) cons821 = CustomConstraint(cons_f821) def cons_f822(w, x): if isinstance(x, (int, Integer, float, Float)): return False return QuadraticQ(w, x) cons822 = CustomConstraint(cons_f822) def cons_f823(u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(LinearMatchQ(List(u, v), x), QuadraticMatchQ(w, x))) cons823 = CustomConstraint(cons_f823) def cons_f824(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(QuadraticMatchQ(List(u, v), x)) cons824 = CustomConstraint(cons_f824) def cons_f825(u, x): if isinstance(x, (int, Integer, float, Float)): return False return BinomialQ(u, x) cons825 = CustomConstraint(cons_f825) def cons_f826(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(BinomialMatchQ(u, x)) cons826 = CustomConstraint(cons_f826) def cons_f827(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return BinomialQ(List(u, v), x) cons827 = CustomConstraint(cons_f827) def cons_f828(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: return ZeroQ(BinomialDegree(u, x) - BinomialDegree(v, x)) except (TypeError, AttributeError): return False cons828 = CustomConstraint(cons_f828) def cons_f829(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(BinomialMatchQ(List(u, v), x)) cons829 = CustomConstraint(cons_f829) def cons_f830(u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return BinomialQ(List(u, v, w), x) cons830 = CustomConstraint(cons_f830) def cons_f831(u, w, x): if isinstance(x, (int, Integer, float, Float)): return False try: return ZeroQ(BinomialDegree(u, x) - BinomialDegree(w, x)) except (TypeError, AttributeError): return False cons831 = CustomConstraint(cons_f831) def cons_f832(u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(BinomialMatchQ(List(u, v, w), x)) cons832 = CustomConstraint(cons_f832) def cons_f833(u, v, x, z): if isinstance(x, (int, Integer, float, Float)): return False return BinomialQ(List(u, v, z), x) cons833 = CustomConstraint(cons_f833) def cons_f834(u, x, z): if isinstance(x, (int, Integer, float, Float)): return False try: return ZeroQ(BinomialDegree(u, x) - BinomialDegree(z, x)) except (TypeError, AttributeError): return False cons834 = CustomConstraint(cons_f834) def cons_f835(u, v, x, z): if isinstance(x, (int, Integer, float, Float)): return False return Not(BinomialMatchQ(List(u, v, z), x)) cons835 = CustomConstraint(cons_f835) def cons_f836(u, x): if isinstance(x, (int, Integer, float, Float)): return False return GeneralizedBinomialQ(u, x) cons836 = CustomConstraint(cons_f836) def cons_f837(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(GeneralizedBinomialMatchQ(u, x)) cons837 = CustomConstraint(cons_f837) def cons_f838(u, x): if isinstance(x, (int, Integer, float, Float)): return False return TrinomialQ(u, x) cons838 = CustomConstraint(cons_f838) def cons_f839(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(TrinomialMatchQ(u, x)) cons839 = CustomConstraint(cons_f839) def cons_f840(v, x): if isinstance(x, (int, Integer, float, Float)): return False return TrinomialQ(v, x) cons840 = CustomConstraint(cons_f840) def cons_f841(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(BinomialMatchQ(u, x), TrinomialMatchQ(v, x))) cons841 = CustomConstraint(cons_f841) def cons_f842(v, x): if isinstance(x, (int, Integer, float, Float)): return False return BinomialQ(v, x) cons842 = CustomConstraint(cons_f842) def cons_f843(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(BinomialMatchQ(u, x), BinomialMatchQ(v, x))) cons843 = CustomConstraint(cons_f843) def cons_f844(x, z): if isinstance(x, (int, Integer, float, Float)): return False return BinomialQ(z, x) cons844 = CustomConstraint(cons_f844) def cons_f845(u, x, z): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(BinomialMatchQ(z, x), TrinomialMatchQ(u, x))) cons845 = CustomConstraint(cons_f845) def cons_f846(u, x, z): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(BinomialMatchQ(z, x), BinomialMatchQ(u, x))) cons846 = CustomConstraint(cons_f846) def cons_f847(u, x): if isinstance(x, (int, Integer, float, Float)): return False return GeneralizedTrinomialQ(u, x) cons847 = CustomConstraint(cons_f847) def cons_f848(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(GeneralizedTrinomialMatchQ(u, x)) cons848 = CustomConstraint(cons_f848) def cons_f849(u, x, z): if isinstance(x, (int, Integer, float, Float)): return False try: return ZeroQ(BinomialDegree(z, x) - GeneralizedTrinomialDegree(u, x)) except (TypeError, AttributeError): return False cons849 = CustomConstraint(cons_f849) def cons_f850(u, x, z): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(BinomialMatchQ(z, x), GeneralizedTrinomialMatchQ(u, x))) cons850 = CustomConstraint(cons_f850) def cons_f851(n, q): return ZeroQ(-n/S(4) + q) cons851 = CustomConstraint(cons_f851) def cons_f852(n, r): return ZeroQ(-S(3)*n/S(4) + r) cons852 = CustomConstraint(cons_f852) def cons_f853(m, n): return ZeroQ(S(4)*m - n + S(4)) cons853 = CustomConstraint(cons_f853) def cons_f854(a, c, e, h): return ZeroQ(a*h + c*e) cons854 = CustomConstraint(cons_f854) def cons_f855(m): return NegativeIntegerQ(m + S(1)) cons855 = CustomConstraint(cons_f855) def cons_f856(m, n): return PositiveIntegerQ(n/(m + S(1))) cons856 = CustomConstraint(cons_f856) def cons_f857(Pq, m, x): if isinstance(x, (int, Integer, float, Float)): return False return PolyQ(Pq, x**(m + S(1))) cons857 = CustomConstraint(cons_f857) def cons_f858(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return NonzeroQ(Coeff(Pq, x, n + S(-1))) cons858 = CustomConstraint(cons_f858) def cons_f859(n, p): return Or(PositiveIntegerQ(p), ZeroQ(n + S(-1))) cons859 = CustomConstraint(cons_f859) def cons_f860(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return PolyQ(Pq, x**n) cons860 = CustomConstraint(cons_f860) def cons_f861(Pq, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(Coeff(Pq, x, S(0))) cons861 = CustomConstraint(cons_f861) def cons_f862(Pq): return SumQ(Pq) cons862 = CustomConstraint(cons_f862) def cons_f863(Pq, m, x): if isinstance(x, (int, Integer, float, Float)): return False return Less(m + Expon(Pq, x) + S(1), S(0)) cons863 = CustomConstraint(cons_f863) def cons_f864(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return Less(Expon(Pq, x), n + S(-1)) cons864 = CustomConstraint(cons_f864) def cons_f865(a, b, d, g): return ZeroQ(a*g + b*d) cons865 = CustomConstraint(cons_f865) def cons_f866(a, b, e, h): return ZeroQ(-S(3)*a*h + b*e) cons866 = CustomConstraint(cons_f866) def cons_f867(A, B, a, b): return ZeroQ(-A**S(3)*b + B**S(3)*a) cons867 = CustomConstraint(cons_f867) def cons_f868(A, B, a, b): return NonzeroQ(-A**S(3)*b + B**S(3)*a) cons868 = CustomConstraint(cons_f868) def cons_f869(A, B, C): return ZeroQ(-A*C + B**S(2)) cons869 = CustomConstraint(cons_f869) def cons_f870(B, C, a, b): return ZeroQ(B**S(3)*b + C**S(3)*a) cons870 = CustomConstraint(cons_f870) def cons_f871(A, B, C, a, b): return ZeroQ(A*b**(S(2)/3) - B*a**(S(1)/3)*b**(S(1)/3) - S(2)*C*a**(S(2)/3)) cons871 = CustomConstraint(cons_f871) def cons_f872(B, C, a, b): return ZeroQ(B*a**(S(1)/3)*b**(S(1)/3) + S(2)*C*a**(S(2)/3)) cons872 = CustomConstraint(cons_f872) def cons_f873(A, C, a, b): return ZeroQ(A*b**(S(2)/3) - S(2)*C*a**(S(2)/3)) cons873 = CustomConstraint(cons_f873) def cons_f874(A, B, C, a, b): return ZeroQ(A*(-b)**(S(2)/3) - B*(-a)**(S(1)/3)*(-b)**(S(1)/3) - S(2)*C*(-a)**(S(2)/3)) cons874 = CustomConstraint(cons_f874) def cons_f875(B, C, a, b): return ZeroQ(B*(-a)**(S(1)/3)*(-b)**(S(1)/3) + S(2)*C*(-a)**(S(2)/3)) cons875 = CustomConstraint(cons_f875) def cons_f876(A, C, a, b): return ZeroQ(A*(-b)**(S(2)/3) - S(2)*C*(-a)**(S(2)/3)) cons876 = CustomConstraint(cons_f876) def cons_f877(A, B, C, a, b): return ZeroQ(A*b**(S(2)/3) + B*b**(S(1)/3)*(-a)**(S(1)/3) - S(2)*C*(-a)**(S(2)/3)) cons877 = CustomConstraint(cons_f877) def cons_f878(B, C, a, b): return ZeroQ(B*b**(S(1)/3)*(-a)**(S(1)/3) - S(2)*C*(-a)**(S(2)/3)) cons878 = CustomConstraint(cons_f878) def cons_f879(A, C, a, b): return ZeroQ(A*b**(S(2)/3) - S(2)*C*(-a)**(S(2)/3)) cons879 = CustomConstraint(cons_f879) def cons_f880(A, B, C, a, b): return ZeroQ(A*(-b)**(S(2)/3) + B*a**(S(1)/3)*(-b)**(S(1)/3) - S(2)*C*a**(S(2)/3)) cons880 = CustomConstraint(cons_f880) def cons_f881(B, C, a, b): return ZeroQ(B*a**(S(1)/3)*(-b)**(S(1)/3) - S(2)*C*a**(S(2)/3)) cons881 = CustomConstraint(cons_f881) def cons_f882(A, C, a, b): return ZeroQ(A*(-b)**(S(2)/3) - S(2)*C*a**(S(2)/3)) cons882 = CustomConstraint(cons_f882) def cons_f883(A, B, C, a, b): return ZeroQ(A - B*(a/b)**(S(1)/3) - S(2)*C*(a/b)**(S(2)/3)) cons883 = CustomConstraint(cons_f883) def cons_f884(B, C, a, b): return ZeroQ(B*(a/b)**(S(1)/3) + S(2)*C*(a/b)**(S(2)/3)) cons884 = CustomConstraint(cons_f884) def cons_f885(A, C, a, b): return ZeroQ(A - S(2)*C*(a/b)**(S(2)/3)) cons885 = CustomConstraint(cons_f885) def cons_f886(A, B, C, a, b): return ZeroQ(A - B*Rt(a/b, S(3)) - S(2)*C*Rt(a/b, S(3))**S(2)) cons886 = CustomConstraint(cons_f886) def cons_f887(B, C, a, b): return ZeroQ(B*Rt(a/b, S(3)) + S(2)*C*Rt(a/b, S(3))**S(2)) cons887 = CustomConstraint(cons_f887) def cons_f888(A, C, a, b): return ZeroQ(A - S(2)*C*Rt(a/b, S(3))**S(2)) cons888 = CustomConstraint(cons_f888) def cons_f889(A, B, C, a, b): return ZeroQ(A + B*(-a/b)**(S(1)/3) - S(2)*C*(-a/b)**(S(2)/3)) cons889 = CustomConstraint(cons_f889) def cons_f890(B, C, a, b): return ZeroQ(B*(-a/b)**(S(1)/3) - S(2)*C*(-a/b)**(S(2)/3)) cons890 = CustomConstraint(cons_f890) def cons_f891(A, C, a, b): return ZeroQ(A - S(2)*C*(-a/b)**(S(2)/3)) cons891 = CustomConstraint(cons_f891) def cons_f892(A, B, C, a, b): return ZeroQ(A + B*Rt(-a/b, S(3)) - S(2)*C*Rt(-a/b, S(3))**S(2)) cons892 = CustomConstraint(cons_f892) def cons_f893(B, C, a, b): return ZeroQ(B*Rt(-a/b, S(3)) - S(2)*C*Rt(-a/b, S(3))**S(2)) cons893 = CustomConstraint(cons_f893) def cons_f894(A, C, a, b): return ZeroQ(A - S(2)*C*Rt(-a/b, S(3))**S(2)) cons894 = CustomConstraint(cons_f894) def cons_f895(A, B, a, b): return Or(ZeroQ(-A**S(3)*b + B**S(3)*a), Not(RationalQ(a/b))) cons895 = CustomConstraint(cons_f895) def cons_f896(a, b): return Not(RationalQ(a/b)) cons896 = CustomConstraint(cons_f896) def cons_f897(A, C, a, b): return Not(RationalQ(a, b, A, C)) cons897 = CustomConstraint(cons_f897) def cons_f898(A, B, C, a, b): return ZeroQ(A - B*(a/b)**(S(1)/3) + C*(a/b)**(S(2)/3)) cons898 = CustomConstraint(cons_f898) def cons_f899(B, C, a, b): return ZeroQ(B*(a/b)**(S(1)/3) - C*(a/b)**(S(2)/3)) cons899 = CustomConstraint(cons_f899) def cons_f900(A, C, a, b): return ZeroQ(A + C*(a/b)**(S(2)/3)) cons900 = CustomConstraint(cons_f900) def cons_f901(A, B, C, a, b): return ZeroQ(A + B*(-a/b)**(S(1)/3) + C*(-a/b)**(S(2)/3)) cons901 = CustomConstraint(cons_f901) def cons_f902(B, C, a, b): return ZeroQ(B*(-a/b)**(S(1)/3) + C*(-a/b)**(S(2)/3)) cons902 = CustomConstraint(cons_f902) def cons_f903(A, C, a, b): return ZeroQ(A + C*(-a/b)**(S(2)/3)) cons903 = CustomConstraint(cons_f903) def cons_f904(a, b): return RationalQ(a/b) cons904 = CustomConstraint(cons_f904) def cons_f905(a, b): return Greater(a/b, S(0)) cons905 = CustomConstraint(cons_f905) def cons_f906(a, b): return Less(a/b, S(0)) cons906 = CustomConstraint(cons_f906) def cons_f907(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return Less(Expon(Pq, x), n) cons907 = CustomConstraint(cons_f907) def cons_f908(a, b, c, d): return ZeroQ(c*Rt(b/a, S(3)) - d*(S(1) - sqrt(S(3)))) cons908 = CustomConstraint(cons_f908) def cons_f909(a, b, c, d): return NonzeroQ(c*Rt(b/a, S(3)) - d*(S(1) - sqrt(S(3)))) cons909 = CustomConstraint(cons_f909) def cons_f910(a, b, c, d): return ZeroQ(c*Rt(b/a, S(3)) - d*(S(1) + sqrt(S(3)))) cons910 = CustomConstraint(cons_f910) def cons_f911(a, b, c, d): return NonzeroQ(c*Rt(b/a, S(3)) - d*(S(1) + sqrt(S(3)))) cons911 = CustomConstraint(cons_f911) def cons_f912(a, b, c, d): return ZeroQ(S(2)*c*Rt(b/a, S(3))**S(2) - d*(S(1) - sqrt(S(3)))) cons912 = CustomConstraint(cons_f912) def cons_f913(a, b, c, d): return NonzeroQ(S(2)*c*Rt(b/a, S(3))**S(2) - d*(S(1) - sqrt(S(3)))) cons913 = CustomConstraint(cons_f913) def cons_f914(a, b, c, d): return ZeroQ(-a*d**S(4) + b*c**S(4)) cons914 = CustomConstraint(cons_f914) def cons_f915(a, b, c, d): return NonzeroQ(-a*d**S(4) + b*c**S(4)) cons915 = CustomConstraint(cons_f915) def cons_f916(Pq, x): if isinstance(x, (int, Integer, float, Float)): return False return NonzeroQ(Coeff(Pq, x, S(0))) cons916 = CustomConstraint(cons_f916) def cons_f917(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(PolyQ(Pq, x**(n/S(2)))) cons917 = CustomConstraint(cons_f917) def cons_f918(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return Equal(Expon(Pq, x), n + S(-1)) cons918 = CustomConstraint(cons_f918) def cons_f919(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return LessEqual(n + S(-1), Expon(Pq, x)) cons919 = CustomConstraint(cons_f919) def cons_f920(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(PolyQ(Pq, x), PolyQ(Pq, x**n)) cons920 = CustomConstraint(cons_f920) def cons_f921(Pq, n, v): return PolyQ(Pq, v**n) cons921 = CustomConstraint(cons_f921) def cons_f922(a, b, c, d, e, f, n, p): return ZeroQ(a*c*f - e*(a*d + b*c)*(n*(p + S(1)) + S(1))) cons922 = CustomConstraint(cons_f922) def cons_f923(a, b, c, d, e, g, n, p): return ZeroQ(a*c*g - b*d*e*(S(2)*n*(p + S(1)) + S(1))) cons923 = CustomConstraint(cons_f923) def cons_f924(n, p): return ZeroQ(n*(p + S(1)) + S(1)) cons924 = CustomConstraint(cons_f924) def cons_f925(a, b, c, d, e, f, m, n, p): return ZeroQ(a*c*f*(m + S(1)) - e*(a*d + b*c)*(m + n*(p + S(1)) + S(1))) cons925 = CustomConstraint(cons_f925) def cons_f926(a, b, c, d, e, g, m, n, p): return ZeroQ(a*c*g*(m + S(1)) - b*d*e*(m + S(2)*n*(p + S(1)) + S(1))) cons926 = CustomConstraint(cons_f926) def cons_f927(Px, x): if isinstance(x, (int, Integer, float, Float)): return False return PolynomialQ(Px, x) cons927 = CustomConstraint(cons_f927) def cons_f928(a, b, d, e, n, p): return ZeroQ(a*e - b*d*(n*(p + S(1)) + S(1))) cons928 = CustomConstraint(cons_f928) def cons_f929(a, c, d, f, n, p): return ZeroQ(a*f - c*d*(S(2)*n*(p + S(1)) + S(1))) cons929 = CustomConstraint(cons_f929) def cons_f930(a, c, d, f): return ZeroQ(a*f + c*d) cons930 = CustomConstraint(cons_f930) def cons_f931(a, b, d, e, m, n, p): return ZeroQ(a*e*(m + S(1)) - b*d*(m + n*(p + S(1)) + S(1))) cons931 = CustomConstraint(cons_f931) def cons_f932(a, c, d, f, m, n, p): return ZeroQ(a*f*(m + S(1)) - c*d*(m + S(2)*n*(p + S(1)) + S(1))) cons932 = CustomConstraint(cons_f932) def cons_f933(n, n3): return ZeroQ(-S(3)*n + n3) cons933 = CustomConstraint(cons_f933) def cons_f934(a, b, c, d, e, g, n, p): return ZeroQ(a**S(2)*g*(n + S(1)) - c*(a*e - b*d*(n*(p + S(1)) + S(1)))*(n*(S(2)*p + S(3)) + S(1))) cons934 = CustomConstraint(cons_f934) def cons_f935(a, b, c, d, e, f, n, p): return ZeroQ(a**S(2)*f*(n + S(1)) - a*c*d*(n + S(1))*(S(2)*n*(p + S(1)) + S(1)) - b*(a*e - b*d*(n*(p + S(1)) + S(1)))*(n*(p + S(2)) + S(1))) cons935 = CustomConstraint(cons_f935) def cons_f936(a, b, c, d, g, n, p): return ZeroQ(a**S(2)*g*(n + S(1)) + b*c*d*(n*(p + S(1)) + S(1))*(n*(S(2)*p + S(3)) + S(1))) cons936 = CustomConstraint(cons_f936) def cons_f937(a, b, c, d, f, n, p): return ZeroQ(a**S(2)*f*(n + S(1)) - a*c*d*(n + S(1))*(S(2)*n*(p + S(1)) + S(1)) + b**S(2)*d*(n*(p + S(1)) + S(1))*(n*(p + S(2)) + S(1))) cons937 = CustomConstraint(cons_f937) def cons_f938(a, b, c, d, e, n, p): return ZeroQ(a*c*d*(n + S(1))*(S(2)*n*(p + S(1)) + S(1)) + b*(a*e - b*d*(n*(p + S(1)) + S(1)))*(n*(p + S(2)) + S(1))) cons938 = CustomConstraint(cons_f938) def cons_f939(a, b, c, d, n, p): return ZeroQ(a*c*d*(n + S(1))*(S(2)*n*(p + S(1)) + S(1)) - b**S(2)*d*(n*(p + S(1)) + S(1))*(n*(p + S(2)) + S(1))) cons939 = CustomConstraint(cons_f939) def cons_f940(n, q): return ZeroQ(-n/S(2) + q) cons940 = CustomConstraint(cons_f940) def cons_f941(n, r): return ZeroQ(-S(3)*n/S(2) + r) cons941 = CustomConstraint(cons_f941) def cons_f942(n, s): return ZeroQ(-S(2)*n + s) cons942 = CustomConstraint(cons_f942) def cons_f943(m, n): return ZeroQ(S(2)*m - n + S(2)) cons943 = CustomConstraint(cons_f943) def cons_f944(a, c, d, g): return ZeroQ(a*g + c*d) cons944 = CustomConstraint(cons_f944) def cons_f945(a, c, e, h): return ZeroQ(-S(3)*a*h + c*e) cons945 = CustomConstraint(cons_f945) def cons_f946(b, c, g, h): return ZeroQ(-S(2)*b*h + c*g) cons946 = CustomConstraint(cons_f946) def cons_f947(a, b, c, d, e, g): return ZeroQ(S(3)*a*g - S(2)*b*e + S(3)*c*d) cons947 = CustomConstraint(cons_f947) def cons_f948(b, c, d, e): return ZeroQ(-S(2)*b*e + S(3)*c*d) cons948 = CustomConstraint(cons_f948) def cons_f949(Pq, a, b, c, n, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(NiceSqrtQ(-S(4)*a*c + b**S(2)), Less(Expon(Pq, x), n)) cons949 = CustomConstraint(cons_f949) def cons_f950(c): return PosQ(c) cons950 = CustomConstraint(cons_f950) def cons_f951(c): return NegQ(c) cons951 = CustomConstraint(cons_f951) def cons_f952(Pq, n, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(PolyQ(Pq, x**n)) cons952 = CustomConstraint(cons_f952) def cons_f953(m): return NegativeIntegerQ(m + S(-1)/2) cons953 = CustomConstraint(cons_f953) def cons_f954(j, n): return NonzeroQ(-j + n) cons954 = CustomConstraint(cons_f954) def cons_f955(j, n, p): return ZeroQ(j*p + j - n + S(1)) cons955 = CustomConstraint(cons_f955) def cons_f956(j, n, p): return NegativeIntegerQ((j - n*p - n + S(-1))/(j - n)) cons956 = CustomConstraint(cons_f956) def cons_f957(j, p): return NonzeroQ(j*p + S(1)) cons957 = CustomConstraint(cons_f957) def cons_f958(j, n, p): return RationalQ(j, n, p) cons958 = CustomConstraint(cons_f958) def cons_f959(j, n): return Less(S(0), j, n) cons959 = CustomConstraint(cons_f959) def cons_f960(j, p): return Less(j*p + S(1), S(0)) cons960 = CustomConstraint(cons_f960) def cons_f961(n, p): return NonzeroQ(n*p + S(1)) cons961 = CustomConstraint(cons_f961) def cons_f962(j, n, p): return Greater(j*p + S(1), -j + n) cons962 = CustomConstraint(cons_f962) def cons_f963(p): return PositiveIntegerQ(p + S(1)/2) cons963 = CustomConstraint(cons_f963) def cons_f964(j, p): return ZeroQ(j*p + S(1)) cons964 = CustomConstraint(cons_f964) def cons_f965(n): return NonzeroQ(n + S(-2)) cons965 = CustomConstraint(cons_f965) def cons_f966(j, n): return RationalQ(j, n) cons966 = CustomConstraint(cons_f966) def cons_f967(j, n): return Less(S(2)*n + S(-2), j, n) cons967 = CustomConstraint(cons_f967) def cons_f968(j, n): return PosQ(-j + n) cons968 = CustomConstraint(cons_f968) def cons_f969(j, n): return IntegerQ(j/n) cons969 = CustomConstraint(cons_f969) def cons_f970(j, m, n, p): return ZeroQ(-j + m + n*p + n + S(1)) cons970 = CustomConstraint(cons_f970) def cons_f971(c, j): return Or(IntegerQ(j), PositiveQ(c)) cons971 = CustomConstraint(cons_f971) def cons_f972(j, m, n, p): return NegativeIntegerQ((j - m - n*p - n + S(-1))/(j - n)) cons972 = CustomConstraint(cons_f972) def cons_f973(j, m, p): return NonzeroQ(j*p + m + S(1)) cons973 = CustomConstraint(cons_f973) def cons_f974(c, j, n): return Or(IntegersQ(j, n), PositiveQ(c)) cons974 = CustomConstraint(cons_f974) def cons_f975(n): return NonzeroQ(n**S(2) + S(-1)) cons975 = CustomConstraint(cons_f975) def cons_f976(j, m, n, p): return RationalQ(j, m, n, p) cons976 = CustomConstraint(cons_f976) def cons_f977(j, m, p): return Less(j*p + m + S(1), S(0)) cons977 = CustomConstraint(cons_f977) def cons_f978(j, m, n, p): return Greater(j*p + m + S(1), -j + n) cons978 = CustomConstraint(cons_f978) def cons_f979(j, m, n, p): return PositiveQ(j*p + j + m - n + S(1)) cons979 = CustomConstraint(cons_f979) def cons_f980(j, m, p): return NegativeQ(j*p + m + S(1)) cons980 = CustomConstraint(cons_f980) def cons_f981(j, m, p): return ZeroQ(j*p + m + S(1)) cons981 = CustomConstraint(cons_f981) def cons_f982(j, m): return ZeroQ(-j/S(2) + m + S(1)) cons982 = CustomConstraint(cons_f982) def cons_f983(j, k): return NonzeroQ(-j + k) cons983 = CustomConstraint(cons_f983) def cons_f984(k, n): return IntegerQ(k/n) cons984 = CustomConstraint(cons_f984) def cons_f985(jn, j, n): return ZeroQ(jn - j - n) cons985 = CustomConstraint(cons_f985) def cons_f986(a, b, c, d, j, m, n, p): return ZeroQ(a*d*(j*p + m + S(1)) - b*c*(m + n + p*(j + n) + S(1))) cons986 = CustomConstraint(cons_f986) def cons_f987(e, j): return Or(PositiveQ(e), IntegersQ(j)) cons987 = CustomConstraint(cons_f987) def cons_f988(j, m, p): return RationalQ(j, m, p) cons988 = CustomConstraint(cons_f988) def cons_f989(j, m): return Inequality(S(0), Less, j, LessEqual, m) cons989 = CustomConstraint(cons_f989) def cons_f990(e, j): return Or(PositiveQ(e), IntegerQ(j)) cons990 = CustomConstraint(cons_f990) def cons_f991(j, m, n, p): return Or(Less(j*p + m, S(-1)), And(IntegersQ(m + S(-1)/2, p + S(-1)/2), Less(p, S(0)), Less(m, -n*p + S(-1)))) cons991 = CustomConstraint(cons_f991) def cons_f992(e, j, n): return Or(PositiveQ(e), IntegersQ(j, n)) cons992 = CustomConstraint(cons_f992) def cons_f993(j, m, n, p): return NonzeroQ(j*p + m - n + S(1)) cons993 = CustomConstraint(cons_f993) def cons_f994(j, m, n, p): return NonzeroQ(m + n + p*(j + n) + S(1)) cons994 = CustomConstraint(cons_f994) def cons_f995(j, n): return Not(And(ZeroQ(n + S(-1)), ZeroQ(j + S(-1)))) cons995 = CustomConstraint(cons_f995) def cons_f996(n): return Less(S(-1), n, S(1)) cons996 = CustomConstraint(cons_f996) def cons_f997(m): return Greater(m**S(2), S(1)) cons997 = CustomConstraint(cons_f997) def cons_f998(j, n): return PositiveIntegerQ(j, n, j/n) cons998 = CustomConstraint(cons_f998) def cons_f999(j, n): return PositiveIntegerQ(j, n) cons999 = CustomConstraint(cons_f999) def cons_f1000(j, n): return Less(j, n) cons1000 = CustomConstraint(cons_f1000) def cons_f1001(a, b, d): return ZeroQ(S(27)*a**S(2)*d + S(4)*b**S(3)) cons1001 = CustomConstraint(cons_f1001) def cons_f1002(a, b, d): return NonzeroQ(S(27)*a**S(2)*d + S(4)*b**S(3)) cons1002 = CustomConstraint(cons_f1002) def cons_f1003(a, c, d): return ZeroQ(S(27)*a*d**S(2) + S(4)*c**S(3)) cons1003 = CustomConstraint(cons_f1003) def cons_f1004(a, c, d): return NonzeroQ(S(27)*a*d**S(2) + S(4)*c**S(3)) cons1004 = CustomConstraint(cons_f1004) def cons_f1005(b, c, d): return ZeroQ(-S(3)*b*d + c**S(2)) cons1005 = CustomConstraint(cons_f1005) def cons_f1006(a, b, c): return ZeroQ(-S(3)*a*c + b**S(2)) cons1006 = CustomConstraint(cons_f1006) def cons_f1007(a, b, c): return NonzeroQ(-S(3)*a*c + b**S(2)) cons1007 = CustomConstraint(cons_f1007) def cons_f1008(b, c, d): return NonzeroQ(-S(3)*b*d + c**S(2)) cons1008 = CustomConstraint(cons_f1008) def cons_f1009(u, x): if isinstance(x, (int, Integer, float, Float)): return False return PolyQ(u, x, S(3)) cons1009 = CustomConstraint(cons_f1009) def cons_f1010(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(CubicMatchQ(u, x)) cons1010 = CustomConstraint(cons_f1010) def cons_f1011(v, x): if isinstance(x, (int, Integer, float, Float)): return False return PolyQ(v, x, S(3)) cons1011 = CustomConstraint(cons_f1011) def cons_f1012(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(LinearMatchQ(u, x), CubicMatchQ(v, x))) cons1012 = CustomConstraint(cons_f1012) def cons_f1013(f, g): return ZeroQ(f + g) cons1013 = CustomConstraint(cons_f1013) def cons_f1014(a, c): return PosQ(a**S(2)*(S(2)*a - c)) cons1014 = CustomConstraint(cons_f1014) def cons_f1015(a, c): return NegQ(a**S(2)*(S(2)*a - c)) cons1015 = CustomConstraint(cons_f1015) def cons_f1016(b, c, d, e): return ZeroQ(S(8)*b*e**S(2) - S(4)*c*d*e + d**S(3)) cons1016 = CustomConstraint(cons_f1016) def cons_f1017(p): return UnsameQ(p, S(2)) cons1017 = CustomConstraint(cons_f1017) def cons_f1018(p): return UnsameQ(p, S(3)) cons1018 = CustomConstraint(cons_f1018) def cons_f1019(v, x): if isinstance(x, (int, Integer, float, Float)): return False return PolynomialQ(v, x) cons1019 = CustomConstraint(cons_f1019) def cons_f1020(v, x): if isinstance(x, (int, Integer, float, Float)): return False return Equal(Exponent(v, x), S(4)) cons1020 = CustomConstraint(cons_f1020) def cons_f1021(a, b, c, d): return ZeroQ(S(8)*a**S(2)*d - S(4)*a*b*c + b**S(3)) cons1021 = CustomConstraint(cons_f1021) def cons_f1022(b, d): return ZeroQ(-b + d) cons1022 = CustomConstraint(cons_f1022) def cons_f1023(a, e): return ZeroQ(-a + e) cons1023 = CustomConstraint(cons_f1023) def cons_f1024(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False return SumQ(Factor(a*x**S(4) + a + b*x**S(3) + b*x + c*x**S(2))) cons1024 = CustomConstraint(cons_f1024) def cons_f1025(D, x): return FreeQ(D, x) cons1025 = CustomConstraint(cons_f1025) def cons_f1026(A, B, C, b, c, d, e): return ZeroQ(B**S(2)*d - S(2)*B*(S(2)*A*e + C*c) + S(2)*C*(A*d + C*b)) cons1026 = CustomConstraint(cons_f1026) def cons_f1027(A, B, C, a, c, d, e): return ZeroQ(-S(4)*A*B*C*d + S(4)*A*e*(S(2)*A*C + B**S(2)) - B**S(3)*d + S(2)*B**S(2)*C*c - S(8)*C**S(3)*a) cons1027 = CustomConstraint(cons_f1027) def cons_f1028(A, B, C, c, d, e): return PosQ(C*(C*(-S(4)*c*e + d**S(2)) + S(2)*e*(-S(4)*A*e + B*d))) cons1028 = CustomConstraint(cons_f1028) def cons_f1029(A, C, b, d): return ZeroQ(A*d + C*b) cons1029 = CustomConstraint(cons_f1029) def cons_f1030(A, C, a, e): return ZeroQ(-A**S(2)*e + C**S(2)*a) cons1030 = CustomConstraint(cons_f1030) def cons_f1031(A, C, c, d, e): return PosQ(C*(-S(8)*A*e**S(2) + C*(-S(4)*c*e + d**S(2)))) cons1031 = CustomConstraint(cons_f1031) def cons_f1032(A, B, C, c, d, e): return NegQ(C*(C*(-S(4)*c*e + d**S(2)) + S(2)*e*(-S(4)*A*e + B*d))) cons1032 = CustomConstraint(cons_f1032) def cons_f1033(A, C, c, d, e): return NegQ(C*(-S(8)*A*e**S(2) + C*(-S(4)*c*e + d**S(2)))) cons1033 = CustomConstraint(cons_f1033) def cons_f1034(A, B, C, D, b, c, d, e): return ZeroQ(S(4)*d*(-S(2)*B*e + D*c)**S(2) - S(4)*(-S(2)*B*e + D*c)*(-S(8)*A*e**S(2) - S(4)*C*c*e + S(2)*D*b*e + S(3)*D*c*d) + S(8)*(-S(4)*C*e + S(3)*D*d)*(-A*d*e - C*b*e + D*b*d)) cons1034 = CustomConstraint(cons_f1034) def cons_f1035(A, B, C, D, a, b, c, d, e): return ZeroQ(S(8)*a*(-S(4)*C*e + S(3)*D*d)**S(3) - S(8)*c*(-S(2)*B*e + D*c)**S(2)*(-S(4)*C*e + S(3)*D*d) + S(8)*d*(-S(4)*A*e + D*b)*(-S(2)*B*e + D*c)*(-S(4)*C*e + S(3)*D*d) + S(8)*d*(-S(2)*B*e + D*c)**S(3) - S(4)*e*(-S(4)*A*e + D*b)*(S(2)*(-S(4)*A*e + D*b)*(-S(4)*C*e + S(3)*D*d) + S(4)*(-S(2)*B*e + D*c)**S(2))) cons1035 = CustomConstraint(cons_f1035) def cons_f1036(A, D, b, c, d, e): return ZeroQ(D**S(2)*c**S(2)*d - D*c*(-S(8)*A*e**S(2) - S(4)*C*c*e + S(2)*D*b*e + S(3)*D*c*d) + S(2)*(-S(4)*C*e + S(3)*D*d)*(-A*d*e - C*b*e + D*b*d)) cons1036 = CustomConstraint(cons_f1036) def cons_f1037(A, B, D, a, b, c, d, e): return ZeroQ(S(54)*D**S(3)*a*d**S(3) - S(6)*D*c*d*(-S(2)*B*e + D*c)**S(2) + S(6)*D*d**S(2)*(-S(4)*A*e + D*b)*(-S(2)*B*e + D*c) + S(2)*d*(-S(2)*B*e + D*c)**S(3) - e*(-S(4)*A*e + D*b)*(S(6)*D*d*(-S(4)*A*e + D*b) + S(4)*(-S(2)*B*e + D*c)**S(2))) cons1037 = CustomConstraint(cons_f1037) def cons_f1038(a, c, e, f): return ZeroQ(a*e**S(2) - c*f**S(2)) cons1038 = CustomConstraint(cons_f1038) def cons_f1039(b, d, e, f): return ZeroQ(b*e**S(2) - d*f**S(2)) cons1039 = CustomConstraint(cons_f1039) def cons_f1040(a, c, e, f): return NonzeroQ(a*e**S(2) - c*f**S(2)) cons1040 = CustomConstraint(cons_f1040) def cons_f1041(b, d, e, f): return NonzeroQ(b*e**S(2) - d*f**S(2)) cons1041 = CustomConstraint(cons_f1041) def cons_f1042(n, p): return ZeroQ(-S(2)*n + p) cons1042 = CustomConstraint(cons_f1042) def cons_f1043(b, c, d): return ZeroQ(b*c**S(2) - d**S(2)) cons1043 = CustomConstraint(cons_f1043) def cons_f1044(b, c, d): return NonzeroQ(b*c**S(2) - d**S(2)) cons1044 = CustomConstraint(cons_f1044) def cons_f1045(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e), x) cons1045 = CustomConstraint(cons_f1045) def cons_f1046(a, b, c, d, e): return NonzeroQ(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4)) cons1046 = CustomConstraint(cons_f1046) def cons_f1047(b, c, d, e): return ZeroQ(b*d*e**S(2) + S(2)*c*d**S(3)) cons1047 = CustomConstraint(cons_f1047) def cons_f1048(b, c, d, e): return NonzeroQ(b*d*e**S(2) + S(2)*c*d**S(3)) cons1048 = CustomConstraint(cons_f1048) def cons_f1049(a, c, d, e): return NonzeroQ(a*e**S(4) + c*d**S(4)) cons1049 = CustomConstraint(cons_f1049) def cons_f1050(A, B, d, e): return ZeroQ(A*e + B*d) cons1050 = CustomConstraint(cons_f1050) def cons_f1051(A, B, a, c): return ZeroQ(A*c + B*a) cons1051 = CustomConstraint(cons_f1051) def cons_f1052(a, c, d, e): return ZeroQ(a*e + c*d) cons1052 = CustomConstraint(cons_f1052) def cons_f1053(a, b, c, d, e, f, g, h): return ZeroQ(-f**S(2)*(a*h**S(2) - b*g*h + c*g**S(2)) + (-d*h + e*g)**S(2)) cons1053 = CustomConstraint(cons_f1053) def cons_f1054(b, c, d, e, f, g, h): return ZeroQ(-S(2)*d*e*h + S(2)*e**S(2)*g - f**S(2)*(-b*h + S(2)*c*g)) cons1054 = CustomConstraint(cons_f1054) def cons_f1055(f, j, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(LinearMatchQ(u, x), QuadraticMatchQ(v, x), Or(ZeroQ(j), ZeroQ(f + S(-1))))) cons1055 = CustomConstraint(cons_f1055) def cons_f1056(f, g, h, j, k, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(-f**S(2)*k**S(2)*(g**S(2)*Coefficient(v, x, S(2)) - g*h*Coefficient(v, x, S(1)) + h**S(2)*Coefficient(v, x, S(0))) + (g*Coefficient(u, x, S(1)) - h*(f*j + Coefficient(u, x, S(0))))**S(2)) cons1056 = CustomConstraint(cons_f1056) def cons_f1057(c, e, f): return ZeroQ(-c*f**S(2) + e**S(2)) cons1057 = CustomConstraint(cons_f1057) def cons_f1058(f, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(-f**S(2)*Coefficient(v, x, S(2)) + Coefficient(u, x, S(1))**S(2)) cons1058 = CustomConstraint(cons_f1058) def cons_f1059(a, c, g, i): return ZeroQ(-a*i + c*g) cons1059 = CustomConstraint(cons_f1059) def cons_f1060(m, p): return IntegersQ(p, S(2)*m) cons1060 = CustomConstraint(cons_f1060) def cons_f1061(c, i, m): return Or(IntegerQ(m), PositiveQ(i/c)) cons1061 = CustomConstraint(cons_f1061) def cons_f1062(b, c, h, i): return ZeroQ(-b*i + c*h) cons1062 = CustomConstraint(cons_f1062) def cons_f1063(c, i): return Not(PositiveQ(i/c)) cons1063 = CustomConstraint(cons_f1063) def cons_f1064(v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return QuadraticQ(List(v, w), x) cons1064 = CustomConstraint(cons_f1064) def cons_f1065(f, j, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(LinearMatchQ(u, x), QuadraticMatchQ(List(v, w), x), Or(ZeroQ(j), ZeroQ(f + S(-1))))) cons1065 = CustomConstraint(cons_f1065) def cons_f1066(f, k, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(-f**S(2)*k**S(2)*Coefficient(v, x, S(2)) + Coefficient(u, x, S(1))**S(2)) cons1066 = CustomConstraint(cons_f1066) def cons_f1067(n, p): return ZeroQ(p - S(2)/n) cons1067 = CustomConstraint(cons_f1067) def cons_f1068(a, b, c): return ZeroQ(a**S(2) - b**S(2)*c) cons1068 = CustomConstraint(cons_f1068) def cons_f1069(a, b, d): return ZeroQ(a**S(2) - b**S(2)*d) cons1069 = CustomConstraint(cons_f1069) def cons_f1070(a, b, c): return ZeroQ(a + b**S(2)*c) cons1070 = CustomConstraint(cons_f1070) def cons_f1071(a, b, c, e): return ZeroQ(a + b**S(2)*c*e) cons1071 = CustomConstraint(cons_f1071) def cons_f1072(b, c, d): return ZeroQ(-b*d**S(2) + c**S(2)) cons1072 = CustomConstraint(cons_f1072) def cons_f1073(b, e): return ZeroQ(-b**S(2) + e) cons1073 = CustomConstraint(cons_f1073) def cons_f1074(a, b, c, d): return ZeroQ(-a*d + b*c, S(0)) cons1074 = CustomConstraint(cons_f1074) def cons_f1075(A, B, a, d, n): return ZeroQ(-A**S(2)*d*(n + S(-1))**S(2) + B**S(2)*a) cons1075 = CustomConstraint(cons_f1075) def cons_f1076(A, B, c, d, n): return ZeroQ(S(2)*A*d*(n + S(-1)) + B*c) cons1076 = CustomConstraint(cons_f1076) def cons_f1077(k, m): return ZeroQ(k - S(2)*m + S(-2)) cons1077 = CustomConstraint(cons_f1077) def cons_f1078(A, B, a, d, m, n): return ZeroQ(-A**S(2)*d*(m - n + S(1))**S(2) + B**S(2)*a*(m + S(1))**S(2)) cons1078 = CustomConstraint(cons_f1078) def cons_f1079(A, B, c, d, m, n): return ZeroQ(-S(2)*A*d*(m - n + S(1)) + B*c*(m + S(1))) cons1079 = CustomConstraint(cons_f1079) def cons_f1080(a, b, c, d, f, g): return ZeroQ(-S(12)*a**S(3)*g**S(2) + a**S(2)*c*f**S(2) + S(2)*a*b*g*(a*f + S(3)*c*d) + S(9)*c**S(3)*d**S(2) - c*d*f*(S(6)*a*c + b**S(2))) cons1080 = CustomConstraint(cons_f1080) def cons_f1081(a, b, c, d, e, f, g): return ZeroQ(a**S(3)*c*f**S(2)*g + S(2)*a**S(3)*g**S(2)*(-S(6)*a*g + b*f) - S(3)*a**S(2)*c**S(2)*d*f*g + S(3)*c**S(4)*d**S(2)*e - c**S(3)*d*(-S(12)*a*d*g + a*e*f + S(2)*b*d*f)) cons1081 = CustomConstraint(cons_f1081) def cons_f1082(a, c, d, f): return NonzeroQ(-a*f + S(3)*c*d) cons1082 = CustomConstraint(cons_f1082) def cons_f1083(a, b, c, d, g): return NonzeroQ(-S(2)*a**S(2)*g + b*c*d) cons1083 = CustomConstraint(cons_f1083) def cons_f1084(a, b, c, d, f, g): return NonzeroQ(S(4)*a**S(2)*g - a*b*f + b*c*d) cons1084 = CustomConstraint(cons_f1084) def cons_f1085(a, b, c, d, f, g): return PosQ((S(12)*a**S(2)*g**S(2) - a*c*f**S(2) + f*(-S(2)*a*b*g + S(3)*c**S(2)*d))/(c*g*(-a*f + S(3)*c*d))) cons1085 = CustomConstraint(cons_f1085) def cons_f1086(a, c, d, f, g): return ZeroQ(-S(12)*a**S(3)*g**S(2) + a**S(2)*c*f**S(2) - S(6)*a*c**S(2)*d*f + S(9)*c**S(3)*d**S(2)) cons1086 = CustomConstraint(cons_f1086) def cons_f1087(a, c, d, e, f, g): return ZeroQ(-S(12)*a**S(4)*g**S(3) + a**S(3)*c*f**S(2)*g - S(3)*a**S(2)*c**S(2)*d*f*g - a*c**S(3)*d*(-S(12)*d*g + e*f) + S(3)*c**S(4)*d**S(2)*e) cons1087 = CustomConstraint(cons_f1087) def cons_f1088(a, c, d, f, g): return PosQ((S(12)*a**S(2)*g**S(2) - a*c*f**S(2) + S(3)*c**S(2)*d*f)/(c*g*(-a*f + S(3)*c*d))) cons1088 = CustomConstraint(cons_f1088) def cons_f1089(v): return SumQ(v) cons1089 = CustomConstraint(cons_f1089) def cons_f1090(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(MonomialQ(u, x), BinomialQ(v, x))) cons1090 = CustomConstraint(cons_f1090) def cons_f1091(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(ZeroQ(Coefficient(u, x, S(0))), ZeroQ(Coefficient(v, x, S(0))))) cons1091 = CustomConstraint(cons_f1091) def cons_f1092(u, x): if isinstance(x, (int, Integer, float, Float)): return False return PiecewiseLinearQ(u, x) cons1092 = CustomConstraint(cons_f1092) def cons_f1093(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return PiecewiseLinearQ(u, v, x) cons1093 = CustomConstraint(cons_f1093) def cons_f1094(n): return Unequal(n, S(1)) cons1094 = CustomConstraint(cons_f1094) def cons_f1095(m, n): return Or(And(RationalQ(m, n), Less(m, S(-1)), Greater(n, S(0)), Not(And(IntegerQ(m + n), Less(m + n + S(2), S(0)), Or(FractionQ(m), GreaterEqual(m + S(2)*n + S(1), S(0)))))), And(PositiveIntegerQ(n, m), LessEqual(n, m)), And(PositiveIntegerQ(n), Not(IntegerQ(m))), And(NegativeIntegerQ(m), Not(IntegerQ(n)))) cons1095 = CustomConstraint(cons_f1095) def cons_f1096(n): return Not(RationalQ(n)) cons1096 = CustomConstraint(cons_f1096) def cons_f1097(n): return SumSimplerQ(n, S(-1)) cons1097 = CustomConstraint(cons_f1097) def cons_f1098(m): return SumSimplerQ(m, S(1)) cons1098 = CustomConstraint(cons_f1098) def cons_f1099(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(LinearQ(u, x)) cons1099 = CustomConstraint(cons_f1099) def cons_f1100(): return Not(SameQ(_UseGamma, True)) cons1100 = CustomConstraint(cons_f1100) def cons_f1101(F, x): return FreeQ(F, x) cons1101 = CustomConstraint(cons_f1101) def cons_f1102(F, b, c, d, e, f, g, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, b, c, d, e, f, g, m, n), x) cons1102 = CustomConstraint(cons_f1102) def cons_f1103(u, x): if isinstance(x, (int, Integer, float, Float)): return False return PowerOfLinearQ(u, x) cons1103 = CustomConstraint(cons_f1103) def cons_f1104(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(LinearMatchQ(v, x), PowerOfLinearMatchQ(u, x))) cons1104 = CustomConstraint(cons_f1104) def cons_f1105(F, a, b, c, d, e, f, g, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, b, c, d, e, f, g, m, n, p), x) cons1105 = CustomConstraint(cons_f1105) def cons_f1106(F, G, f, g, i, j, n, q): return ZeroQ(f*g*n*log(F) - i*j*q*log(G)) cons1106 = CustomConstraint(cons_f1106) def cons_f1107(F, G, e, f, g, h, i, j, k, n, q, x): if isinstance(x, (int, Integer, float, Float)): return False return NonzeroQ((G**(j*(h + i*x))*k)**q - (F**(g*(e + f*x)))**n) cons1107 = CustomConstraint(cons_f1107) def cons_f1108(F, a, b, c, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, b, c, n), x) cons1108 = CustomConstraint(cons_f1108) def cons_f1109(): return SameQ(_UseGamma, True) cons1109 = CustomConstraint(cons_f1109) def cons_f1110(F, c, m, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(-c*(-Coefficient(u, x, S(0))*Coefficient(w, x, S(1)) + Coefficient(u, x, S(1))*Coefficient(w, x, S(0)))*Coefficient(v, x, S(1))*log(F) + (m + S(1))*Coefficient(u, x, S(1))*Coefficient(w, x, S(1))) cons1110 = CustomConstraint(cons_f1110) def cons_f1111(w, x): if isinstance(x, (int, Integer, float, Float)): return False return PolynomialQ(w, x) cons1111 = CustomConstraint(cons_f1111) def cons_f1112(e, f, h, n): return ZeroQ(e - f*h*(n + S(1))) cons1112 = CustomConstraint(cons_f1112) def cons_f1113(F, b, c, e, g, h, n): return ZeroQ(-b*c*e*log(F) + g*h*(n + S(1))) cons1113 = CustomConstraint(cons_f1113) def cons_f1114(e, f, h, m, n): return ZeroQ(e*(m + S(1)) - f*h*(n + S(1))) cons1114 = CustomConstraint(cons_f1114) def cons_f1115(F, a, b, c, d, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, b, c, d), x) cons1115 = CustomConstraint(cons_f1115) def cons_f1116(n): return IntegerQ(S(2)/n) cons1116 = CustomConstraint(cons_f1116) def cons_f1117(n): return Not(IntegerQ(S(2)/n)) cons1117 = CustomConstraint(cons_f1117) def cons_f1118(c, d, e, f): return ZeroQ(-c*f + d*e) cons1118 = CustomConstraint(cons_f1118) def cons_f1119(m, n): return ZeroQ(-S(2)*m + n + S(-2)) cons1119 = CustomConstraint(cons_f1119) def cons_f1120(m, n): return IntegerQ(S(2)*(m + S(1))/n) cons1120 = CustomConstraint(cons_f1120) def cons_f1121(m, n): return Less(S(0), (m + S(1))/n, S(5)) cons1121 = CustomConstraint(cons_f1121) def cons_f1122(m, n): return Or(Less(S(0), n, m + S(1)), Less(m, n, S(0))) cons1122 = CustomConstraint(cons_f1122) def cons_f1123(m, n): return Less(S(-4), (m + S(1))/n, S(5)) cons1123 = CustomConstraint(cons_f1123) def cons_f1124(m, n): return Or(And(Greater(n, S(0)), Less(m, S(-1))), Inequality(S(0), Less, -n, LessEqual, m + S(1))) cons1124 = CustomConstraint(cons_f1124) def cons_f1125(d, f): return NonzeroQ(-d + f) cons1125 = CustomConstraint(cons_f1125) def cons_f1126(c, e): return NonzeroQ(c*e) cons1126 = CustomConstraint(cons_f1126) def cons_f1127(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(LinearMatchQ(u, x), BinomialMatchQ(v, x))) cons1127 = CustomConstraint(cons_f1127) def cons_f1128(v, x): if isinstance(x, (int, Integer, float, Float)): return False return PowerOfLinearQ(v, x) cons1128 = CustomConstraint(cons_f1128) def cons_f1129(v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(PowerOfLinearMatchQ(v, x)) cons1129 = CustomConstraint(cons_f1129) def cons_f1130(c, d, g, h): return ZeroQ(-c*h + d*g) cons1130 = CustomConstraint(cons_f1130) def cons_f1131(c, d, g, h): return NonzeroQ(-c*h + d*g) cons1131 = CustomConstraint(cons_f1131) def cons_f1132(F, a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, b, c), x) cons1132 = CustomConstraint(cons_f1132) def cons_f1133(v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(QuadraticMatchQ(v, x)) cons1133 = CustomConstraint(cons_f1133) def cons_f1134(b, c, d, e): return ZeroQ(b*e - S(2)*c*d) cons1134 = CustomConstraint(cons_f1134) def cons_f1135(b, c, d, e): return NonzeroQ(b*e - S(2)*c*d) cons1135 = CustomConstraint(cons_f1135) def cons_f1136(F, a, b, c, d, e, m, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, b, c, d, e, m), x) cons1136 = CustomConstraint(cons_f1136) def cons_f1137(c, d, e, v, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(S(2)*e*(c + d*x) - v) cons1137 = CustomConstraint(cons_f1137) def cons_f1138(F, G, a, b, c, d, e, f, g, h, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, G, a, b, c, d, e, f, g, h, n), x) cons1138 = CustomConstraint(cons_f1138) def cons_f1139(G, x): return FreeQ(G, x) cons1139 = CustomConstraint(cons_f1139) def cons_f1140(F, G, d, e, g, h): return Not(RationalQ(FullSimplify(g*h*log(G)/(d*e*log(F))))) cons1140 = CustomConstraint(cons_f1140) def cons_f1141(F, G, H, a, b, c, d, e, f, g, h, n, r, s, t, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, G, H, a, b, c, d, e, f, g, h, r, s, t, n), x) cons1141 = CustomConstraint(cons_f1141) def cons_f1142(H, x): return FreeQ(H, x) cons1142 = CustomConstraint(cons_f1142) def cons_f1143(t, x): return FreeQ(t, x) cons1143 = CustomConstraint(cons_f1143) def cons_f1144(F, G, d, e, g, h, n): return ZeroQ(d*e*n*log(F) + g*h*log(G)) cons1144 = CustomConstraint(cons_f1144) def cons_f1145(F, G, H, d, e, g, h, s, t): return Not(RationalQ(FullSimplify((g*h*log(G) + s*t*log(H))/(d*e*log(F))))) cons1145 = CustomConstraint(cons_f1145) def cons_f1146(u, v): return ZeroQ(-S(2)*u + v) cons1146 = CustomConstraint(cons_f1146) def cons_f1147(c, d, v, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(c + d*x + v) cons1147 = CustomConstraint(cons_f1147) def cons_f1148(w, x): if isinstance(x, (int, Integer, float, Float)): return False return LinearQ(w, x) cons1148 = CustomConstraint(cons_f1148) def cons_f1149(v, w): return ZeroQ(v + w) cons1149 = CustomConstraint(cons_f1149) def cons_f1150(v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return If(RationalQ(Coefficient(v, x, S(1))), Greater(Coefficient(v, x, S(1)), S(0)), Less(LeafCount(v), LeafCount(w))) cons1150 = CustomConstraint(cons_f1150) def cons_f1151(F, a, b, c, d, e, g, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, b, c, d, e, g, n), x) cons1151 = CustomConstraint(cons_f1151) def cons_f1152(F, a, c, d, e, g, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, c, d, e, g, n), x) cons1152 = CustomConstraint(cons_f1152) def cons_f1153(F, a, b, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, b), x) cons1153 = CustomConstraint(cons_f1153) def cons_f1154(n): return Unequal(n, S(-1)) cons1154 = CustomConstraint(cons_f1154) def cons_f1155(u, x): if isinstance(x, (int, Integer, float, Float)): return False return FunctionOfExponentialQ(u, x) cons1155 = CustomConstraint(cons_f1155) def cons_f1156(v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return LinearQ(List(v, w), x) cons1156 = CustomConstraint(cons_f1156) def cons_f1157(v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(BinomialQ(v + w, x), And(PolynomialQ(v + w, x), LessEqual(Exponent(v + w, x), S(2)))) cons1157 = CustomConstraint(cons_f1157) def cons_f1158(c, d, e, f, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(c, d, e, f, p, q), x) cons1158 = CustomConstraint(cons_f1158) def cons_f1159(d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(d, e, f), x) cons1159 = CustomConstraint(cons_f1159) def cons_f1160(b, p, q): return PosQ(b*p*q) cons1160 = CustomConstraint(cons_f1160) def cons_f1161(b, p, q): return NegQ(b*p*q) cons1161 = CustomConstraint(cons_f1161) def cons_f1162(e, f, g, h): return ZeroQ(-e*h + f*g) cons1162 = CustomConstraint(cons_f1162) def cons_f1163(m, p): return ZeroQ(m - p + S(1)) cons1163 = CustomConstraint(cons_f1163) def cons_f1164(f, h, p): return Or(IntegerQ(p), PositiveQ(h/f)) cons1164 = CustomConstraint(cons_f1164) def cons_f1165(f, h, p): return Not(Or(IntegerQ(p), PositiveQ(h/f))) cons1165 = CustomConstraint(cons_f1165) def cons_f1166(b, m, p, q): return PosQ((m + S(1))/(b*p*q)) cons1166 = CustomConstraint(cons_f1166) def cons_f1167(b, m, p, q): return NegQ((m + S(1))/(b*p*q)) cons1167 = CustomConstraint(cons_f1167) def cons_f1168(c, e, f, g, h): return ZeroQ(c*(-e*h + f*g) + h) cons1168 = CustomConstraint(cons_f1168) def cons_f1169(c, e, f, g, h): return NonzeroQ(c*(-e*h + f*g) + h) cons1169 = CustomConstraint(cons_f1169) def cons_f1170(c, e, f, g, h): return PositiveQ(c*(e - f*g/h)) cons1170 = CustomConstraint(cons_f1170) def cons_f1171(e, f, g, h): return NonzeroQ(-e*h + f*g) cons1171 = CustomConstraint(cons_f1171) def cons_f1172(m, n): return IntegersQ(S(2)*m, S(2)*n) cons1172 = CustomConstraint(cons_f1172) def cons_f1173(m, n): return Or(Equal(n, S(1)), Not(PositiveIntegerQ(m)), And(Equal(n, S(2)), NonzeroQ(m + S(-1)))) cons1173 = CustomConstraint(cons_f1173) def cons_f1174(c, e, f, i, j): return ZeroQ(f*i + j*(c - e)) cons1174 = CustomConstraint(cons_f1174) def cons_f1175(m, n): return Or(IntegerQ(n), Greater(m, S(0))) cons1175 = CustomConstraint(cons_f1175) def cons_f1176(a, b, c, d, e, f, g, h, i, j, m, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, h, i, j, m, n, p, q), x) cons1176 = CustomConstraint(cons_f1176) def cons_f1177(e, f, g, h): return ZeroQ(e**S(2)*h + f**S(2)*g) cons1177 = CustomConstraint(cons_f1177) def cons_f1178(c, e): return ZeroQ(c - S(2)*e) cons1178 = CustomConstraint(cons_f1178) def cons_f1179(c, e): return PositiveQ(c/(S(2)*e)) cons1179 = CustomConstraint(cons_f1179) def cons_f1180(a, c, e): return Or(NonzeroQ(c - S(2)*e), NonzeroQ(a)) cons1180 = CustomConstraint(cons_f1180) def cons_f1181(e, f, g, h, i): return ZeroQ(e**S(2)*i - e*f*h + f**S(2)*g) cons1181 = CustomConstraint(cons_f1181) def cons_f1182(e, f, g, i): return ZeroQ(e**S(2)*i + f**S(2)*g) cons1182 = CustomConstraint(cons_f1182) def cons_f1183(g): return PositiveQ(g) cons1183 = CustomConstraint(cons_f1183) def cons_f1184(g1, g2, h1, h2): return ZeroQ(g1*h2 + g2*h1) cons1184 = CustomConstraint(cons_f1184) def cons_f1185(g1): return PositiveQ(g1) cons1185 = CustomConstraint(cons_f1185) def cons_f1186(g2): return PositiveQ(g2) cons1186 = CustomConstraint(cons_f1186) def cons_f1187(g1, x): return FreeQ(g1, x) cons1187 = CustomConstraint(cons_f1187) def cons_f1188(h1, x): return FreeQ(h1, x) cons1188 = CustomConstraint(cons_f1188) def cons_f1189(g2, x): return FreeQ(g2, x) cons1189 = CustomConstraint(cons_f1189) def cons_f1190(h2, x): return FreeQ(h2, x) cons1190 = CustomConstraint(cons_f1190) def cons_f1191(g): return Not(PositiveQ(g)) cons1191 = CustomConstraint(cons_f1191) def cons_f1192(g, h, i, j, k): return ZeroQ(h - i*(-g*k + h*j)) cons1192 = CustomConstraint(cons_f1192) def cons_f1193(g, h, j, k): return ZeroQ(-g*k + h*j) cons1193 = CustomConstraint(cons_f1193) def cons_f1194(F): return MemberQ(List(Log, ArcSin, ArcCos, ArcTan, ArcCot, ArcSinh, ArcCosh, ArcTanh, ArcCoth), F) cons1194 = CustomConstraint(cons_f1194) def cons_f1195(m, r): return ZeroQ(m + r) cons1195 = CustomConstraint(cons_f1195) def cons_f1196(r, r1): return ZeroQ(-r + r1 + S(1)) cons1196 = CustomConstraint(cons_f1196) def cons_f1197(a, b, c, d, e, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, n), x) cons1197 = CustomConstraint(cons_f1197) def cons_f1198(mn, n): return ZeroQ(mn + n) cons1198 = CustomConstraint(cons_f1198) def cons_f1199(a, b, c, d, e): return ZeroQ(-a*c*d + b*c*e + d) cons1199 = CustomConstraint(cons_f1199) def cons_f1200(RFx, x): if isinstance(x, (int, Integer, float, Float)): return False return RationalFunctionQ(RFx, x) cons1200 = CustomConstraint(cons_f1200) def cons_f1201(e, f, g): return ZeroQ(-S(4)*e*g + f**S(2)) cons1201 = CustomConstraint(cons_f1201) def cons_f1202(c, d, p, q, v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1201(cc, dd, e, f, pp, qq): return FreeQ(List(cc, dd, e, f, pp, qq), x) _cons_1201 = CustomConstraint(_cons_f_1201) pat = Pattern(UtilityOperator(((x*WC('f', S(1)) + WC('e', S(0)))**WC('pp', S(1))*WC('dd', S(1)))**WC('qq', S(1))*WC('cc', S(1)), x), _cons_1201) result_matchq = is_match(UtilityOperator(c*(d*v**p)**q, x), pat) return Not(result_matchq) cons1202 = CustomConstraint(cons_f1202) def cons_f1203(a, b, c, n, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, n, p, q, r), x) cons1203 = CustomConstraint(cons_f1203) def cons_f1204(a, b, c, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(SameQ(x**(n*p*q), a*(b*(c*x**n)**p)**q)) cons1204 = CustomConstraint(cons_f1204) def cons_f1205(n1, n2): return ZeroQ(n1 + n2) cons1205 = CustomConstraint(cons_f1205) def cons_f1206(n1, x): return FreeQ(n1, x) cons1206 = CustomConstraint(cons_f1206) def cons_f1207(c, d, f, g): return ZeroQ(-c*g + d*f) cons1207 = CustomConstraint(cons_f1207) def cons_f1208(b, d, e): return ZeroQ(-b*e + d) cons1208 = CustomConstraint(cons_f1208) def cons_f1209(a, b, f, g): return ZeroQ(-a*g + b*f) cons1209 = CustomConstraint(cons_f1209) def cons_f1210(c, d, f, g): return NonzeroQ(-c*g + d*f) cons1210 = CustomConstraint(cons_f1210) def cons_f1211(a, b, f, g): return NonzeroQ(-a*g + b*f) cons1211 = CustomConstraint(cons_f1211) def cons_f1212(m, m2): return ZeroQ(m + m2 + S(2)) cons1212 = CustomConstraint(cons_f1212) def cons_f1213(a, b, c, d, u, x): return FreeQ(simplify(Mul(u, Add(c, Mul(d, x)), Pow(Add(a, Mul(b, x)), S(-1)))), x) cons1213 = CustomConstraint(cons_f1213) def cons_f1214(a, b, c, d, e, f, g): return ZeroQ(-c*g + d*f - e*(-a*g + b*f)) cons1214 = CustomConstraint(cons_f1214) def cons_f1215(c, d, f, g): return ZeroQ(c**S(2)*g + d**S(2)*f) cons1215 = CustomConstraint(cons_f1215) def cons_f1216(a, b, c, d, e): return ZeroQ(-a*d*e - b*c*e + S(2)*c*d) cons1216 = CustomConstraint(cons_f1216) def cons_f1217(c, d, f, g, h): return ZeroQ(c**S(2)*h - c*d*g + d**S(2)*f) cons1217 = CustomConstraint(cons_f1217) def cons_f1218(c, d, f, h): return ZeroQ(c**S(2)*h + d**S(2)*f) cons1218 = CustomConstraint(cons_f1218) def cons_f1219(u, v): return FreeQ(simplify(Mul(u, Pow(Add(S(1), Mul(S(-1), v)), S(-1)))), x) cons1219 = CustomConstraint(cons_f1219) def cons_f1220(u, v): return FreeQ(simplify(Mul(u, Add(S(1), Mul(S(-1), v)))), x) cons1220 = CustomConstraint(cons_f1220) def cons_f1221(u, v): return FreeQ(simplify(Mul(u, Pow(v, S(-1)))), x) cons1221 = CustomConstraint(cons_f1221) def cons_f1222(u, v): return FreeQ(simplify(Mul(u, v)), x) cons1222 = CustomConstraint(cons_f1222) def cons_f1223(a, b, c, d, f, h): return ZeroQ(-a*c*h + b*d*f) cons1223 = CustomConstraint(cons_f1223) def cons_f1224(a, b, c, d, g, h): return ZeroQ(-a*d*h - b*c*h + b*d*g) cons1224 = CustomConstraint(cons_f1224) def cons_f1225(v, x): if isinstance(x, (int, Integer, float, Float)): return False return QuotientOfLinearsQ(v, x) cons1225 = CustomConstraint(cons_f1225) def cons_f1226(v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(QuotientOfLinearsMatchQ(v, x)) cons1226 = CustomConstraint(cons_f1226) def cons_f1227(v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(BinomialMatchQ(v, x)) cons1227 = CustomConstraint(cons_f1227) def cons_f1228(a, b, c, d, e, f, g, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, n, p), x) cons1228 = CustomConstraint(cons_f1228) def cons_f1229(a, b, c, d, e, f, g, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g, p), x) cons1229 = CustomConstraint(cons_f1229) def cons_f1230(m): return IntegerQ(m/S(2) + S(-1)/2) cons1230 = CustomConstraint(cons_f1230) def cons_f1231(m): return Not(IntegerQ(m/S(2) + S(-1)/2)) cons1231 = CustomConstraint(cons_f1231) def cons_f1232(u, x): if isinstance(x, (int, Integer, float, Float)): return False return InverseFunctionFreeQ(u, x) cons1232 = CustomConstraint(cons_f1232) def cons_f1233(n): return Not(And(RationalQ(n), Less(n, S(0)))) cons1233 = CustomConstraint(cons_f1233) def cons_f1234(m, n): return Or(Equal(n, S(1)), IntegerQ(m)) cons1234 = CustomConstraint(cons_f1234) def cons_f1235(RFx, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(PolynomialQ(RFx, x)) cons1235 = CustomConstraint(cons_f1235) def cons_f1236(Px, Qx, x): if isinstance(x, (int, Integer, float, Float)): return False return QuadraticQ(List(Qx, Px), x) cons1236 = CustomConstraint(cons_f1236) def cons_f1237(Px, Qx, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(D(Px/Qx, x)) cons1237 = CustomConstraint(cons_f1237) def cons_f1238(RGx, x): if isinstance(x, (int, Integer, float, Float)): return False return RationalFunctionQ(RGx, x) cons1238 = CustomConstraint(cons_f1238) def cons_f1239(d): return NonzeroQ(d + S(-1)) cons1239 = CustomConstraint(cons_f1239) def cons_f1240(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1239(g, m): return FreeQ(List(g, m), x) _cons_1239 = CustomConstraint(_cons_f_1239) pat = Pattern(UtilityOperator((x*WC('g', S(1)))**WC('m', S(1)), x), _cons_1239) result_matchq = is_match(UtilityOperator(v, x), pat) return Or(ZeroQ(v + S(-1)), result_matchq) cons1240 = CustomConstraint(cons_f1240) def cons_f1241(u, x): if isinstance(x, (int, Integer, float, Float)): return False return RationalFunctionQ(D(u, x)/u, x) cons1241 = CustomConstraint(cons_f1241) def cons_f1242(a, u, x): if isinstance(x, (int, Integer, float, Float)): return False try: return Or(NonzeroQ(a), Not(And(BinomialQ(u, x), ZeroQ(BinomialDegree(u, x)**S(2) + S(-1))))) except (TypeError, AttributeError): return False cons1242 = CustomConstraint(cons_f1242) def cons_f1243(Qx, x): if isinstance(x, (int, Integer, float, Float)): return False return QuadraticQ(Qx, x) cons1243 = CustomConstraint(cons_f1243) def cons_f1244(v, x): if isinstance(x, (int, Integer, float, Float)): return False return InverseFunctionFreeQ(v, x) cons1244 = CustomConstraint(cons_f1244) def cons_f1245(w, x): if isinstance(x, (int, Integer, float, Float)): return False return InverseFunctionFreeQ(w, x) cons1245 = CustomConstraint(cons_f1245) def cons_f1246(a, b, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, n, p), x) cons1246 = CustomConstraint(cons_f1246) def cons_f1247(A, B, a, b): return NonzeroQ(A*b - B*a) cons1247 = CustomConstraint(cons_f1247) def cons_f1248(a, f, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, f), x) cons1248 = CustomConstraint(cons_f1248) def cons_f1249(u): return NonsumQ(u) cons1249 = CustomConstraint(cons_f1249) def cons_f1250(u, x): if isinstance(x, (int, Integer, float, Float)): return False return AlgebraicFunctionQ(u, x) cons1250 = CustomConstraint(cons_f1250) def cons_f1251(u, x): if isinstance(x, (int, Integer, float, Float)): return False return FunctionOfTrigOfLinearQ(u, x) cons1251 = CustomConstraint(cons_f1251) def cons_f1252(n): return IntegerQ(n/S(2) + S(-1)/2) cons1252 = CustomConstraint(cons_f1252) def cons_f1253(m, n): return Not(And(IntegerQ(m/S(2) + S(-1)/2), Less(S(0), m, n))) cons1253 = CustomConstraint(cons_f1253) def cons_f1254(m, n): return Not(And(IntegerQ(m/S(2) + S(-1)/2), Inequality(S(0), Less, m, LessEqual, n))) cons1254 = CustomConstraint(cons_f1254) def cons_f1255(m, n): return Or(IntegersQ(S(2)*m, S(2)*n), ZeroQ(m + n)) cons1255 = CustomConstraint(cons_f1255) def cons_f1256(a, b, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, e, f), x) cons1256 = CustomConstraint(cons_f1256) def cons_f1257(m, n): return ZeroQ(m + n) cons1257 = CustomConstraint(cons_f1257) def cons_f1258(m): return Less(S(0), m, S(1)) cons1258 = CustomConstraint(cons_f1258) def cons_f1259(a, b, m, n): return Or(RationalQ(n), And(Not(RationalQ(m)), Or(ZeroQ(b + S(-1)), NonzeroQ(a + S(-1))))) cons1259 = CustomConstraint(cons_f1259) def cons_f1260(a, b, e, f, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, e, f, m, n), x) cons1260 = CustomConstraint(cons_f1260) def cons_f1261(m, n): return ZeroQ(m - n + S(2)) cons1261 = CustomConstraint(cons_f1261) def cons_f1262(m, n): return NonzeroQ(m - n) cons1262 = CustomConstraint(cons_f1262) def cons_f1263(c, d, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(c, d), x) cons1263 = CustomConstraint(cons_f1263) def cons_f1264(c, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(c, c), x) cons1264 = CustomConstraint(cons_f1264) def cons_f1265(b, c, d, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, c, d), x) cons1265 = CustomConstraint(cons_f1265) def cons_f1266(a, b, c, d, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d), x) cons1266 = CustomConstraint(cons_f1266) def cons_f1267(a, b): return ZeroQ(a**S(2) - b**S(2)) cons1267 = CustomConstraint(cons_f1267) def cons_f1268(n): return PositiveIntegerQ(n + S(-1)/2) cons1268 = CustomConstraint(cons_f1268) def cons_f1269(a, b): return NonzeroQ(a**S(2) - b**S(2)) cons1269 = CustomConstraint(cons_f1269) def cons_f1270(a, b): return PositiveQ(a + b) cons1270 = CustomConstraint(cons_f1270) def cons_f1271(a, b): return PositiveQ(a - b) cons1271 = CustomConstraint(cons_f1271) def cons_f1272(a, b): return Not(PositiveQ(a + b)) cons1272 = CustomConstraint(cons_f1272) def cons_f1273(a, b): return PositiveQ(a**S(2) - b**S(2)) cons1273 = CustomConstraint(cons_f1273) def cons_f1274(c): return SimplerQ(-Pi/S(2) + c, c) cons1274 = CustomConstraint(cons_f1274) def cons_f1275(a, b, c, d, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, n), x) cons1275 = CustomConstraint(cons_f1275) def cons_f1276(p): return IntegerQ(p/S(2) + S(-1)/2) cons1276 = CustomConstraint(cons_f1276) def cons_f1277(a, b, m, p): return Or(GreaterEqual(p, S(-1)), Not(And(IntegerQ(m + S(1)/2), ZeroQ(a**S(2) - b**S(2))))) cons1277 = CustomConstraint(cons_f1277) def cons_f1278(a, b, p): return Or(IntegerQ(S(2)*p), NonzeroQ(a**S(2) - b**S(2))) cons1278 = CustomConstraint(cons_f1278) def cons_f1279(m, p): return GreaterEqual(S(2)*m + p, S(0)) cons1279 = CustomConstraint(cons_f1279) def cons_f1280(m, p): return ZeroQ(m + p + S(1)) cons1280 = CustomConstraint(cons_f1280) def cons_f1281(p): return Not(NegativeIntegerQ(p)) cons1281 = CustomConstraint(cons_f1281) def cons_f1282(m, p): return NegativeIntegerQ(m + p + S(1)) cons1282 = CustomConstraint(cons_f1282) def cons_f1283(m, p): return NonzeroQ(S(2)*m + p + S(1)) cons1283 = CustomConstraint(cons_f1283) def cons_f1284(m, p): return ZeroQ(S(2)*m + p + S(-1)) cons1284 = CustomConstraint(cons_f1284) def cons_f1285(m): return NonzeroQ(m + S(-1)) cons1285 = CustomConstraint(cons_f1285) def cons_f1286(m, p): return PositiveIntegerQ(m + p/S(2) + S(-1)/2) cons1286 = CustomConstraint(cons_f1286) def cons_f1287(m, p): return NonzeroQ(m + p) cons1287 = CustomConstraint(cons_f1287) def cons_f1288(m, p): return LessEqual(p, -S(2)*m) cons1288 = CustomConstraint(cons_f1288) def cons_f1289(m, p): return IntegersQ(m + S(1)/2, S(2)*p) cons1289 = CustomConstraint(cons_f1289) def cons_f1290(m, p): return IntegersQ(S(2)*m, S(2)*p) cons1290 = CustomConstraint(cons_f1290) def cons_f1291(m, p): return Or(Greater(m, S(-2)), ZeroQ(S(2)*m + p + S(1)), And(Equal(m, S(-2)), IntegerQ(p))) cons1291 = CustomConstraint(cons_f1291) def cons_f1292(m): return LessEqual(m, S(-2)) cons1292 = CustomConstraint(cons_f1292) def cons_f1293(m, p): return Not(NegativeIntegerQ(m + p + S(1))) cons1293 = CustomConstraint(cons_f1293) def cons_f1294(p): return Not(And(RationalQ(p), GreaterEqual(p, S(1)))) cons1294 = CustomConstraint(cons_f1294) def cons_f1295(p): return Greater(p, S(2)) cons1295 = CustomConstraint(cons_f1295) def cons_f1296(m, p): return Or(IntegersQ(S(2)*m, S(2)*p), IntegerQ(m)) cons1296 = CustomConstraint(cons_f1296) def cons_f1297(m, p): return ZeroQ(m + p + S(2)) cons1297 = CustomConstraint(cons_f1297) def cons_f1298(m, p): return NegativeIntegerQ(m + p + S(2)) cons1298 = CustomConstraint(cons_f1298) def cons_f1299(m, p): return Not(PositiveIntegerQ(m + p + S(1))) cons1299 = CustomConstraint(cons_f1299) def cons_f1300(p): return IntegerQ(p/S(2) + S(1)/2) cons1300 = CustomConstraint(cons_f1300) def cons_f1301(m, p): return IntegersQ(m, p) cons1301 = CustomConstraint(cons_f1301) def cons_f1302(m, p): return Equal(p, S(2)*m) cons1302 = CustomConstraint(cons_f1302) def cons_f1303(m, p): return IntegersQ(m, p/S(2)) cons1303 = CustomConstraint(cons_f1303) def cons_f1304(m, p): return Or(Less(p, S(0)), Greater(m - p/S(2), S(0))) cons1304 = CustomConstraint(cons_f1304) def cons_f1305(m): return Not(And(RationalQ(m), Less(m, S(0)))) cons1305 = CustomConstraint(cons_f1305) def cons_f1306(m): return IntegerQ(m + S(-1)/2) cons1306 = CustomConstraint(cons_f1306) def cons_f1307(m): return Not(Less(m, S(-1))) cons1307 = CustomConstraint(cons_f1307) def cons_f1308(p): return IntegerQ(p/S(2)) cons1308 = CustomConstraint(cons_f1308) def cons_f1309(p): return IntegersQ(S(2)*p) cons1309 = CustomConstraint(cons_f1309) def cons_f1310(a, b, e, f, g, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, e, f, g, m, p), x) cons1310 = CustomConstraint(cons_f1310) def cons_f1311(m, n): return Not(And(IntegerQ(n), Or(And(Less(m, S(0)), Greater(n, S(0))), Less(S(0), n, m), Less(m, n, S(0))))) cons1311 = CustomConstraint(cons_f1311) def cons_f1312(n): return NonzeroQ(n + S(1)/2) cons1312 = CustomConstraint(cons_f1312) def cons_f1313(m): return PositiveIntegerQ(m + S(-1)/2) cons1313 = CustomConstraint(cons_f1313) def cons_f1314(m, n): return Not(And(NegativeIntegerQ(m + n), Greater(S(2)*m + n + S(1), S(0)))) cons1314 = CustomConstraint(cons_f1314) def cons_f1315(m, n): return Not(And(PositiveIntegerQ(n + S(-1)/2), Less(n, m))) cons1315 = CustomConstraint(cons_f1315) def cons_f1316(m): return NonzeroQ(m + S(1)/2) cons1316 = CustomConstraint(cons_f1316) def cons_f1317(m, n): return NegativeIntegerQ(m + n + S(1)) cons1317 = CustomConstraint(cons_f1317) def cons_f1318(m, n): return Not(And(RationalQ(n), Less(m, n, S(-1)))) cons1318 = CustomConstraint(cons_f1318) def cons_f1319(m, n): return Or(FractionQ(m), Not(FractionQ(n))) cons1319 = CustomConstraint(cons_f1319) def cons_f1320(b, c, d, e, f, m, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, c, d, e, f, m), x) cons1320 = CustomConstraint(cons_f1320) def cons_f1321(a, b, c, d, m): return ZeroQ(a*d*m + b*c*(m + S(1))) cons1321 = CustomConstraint(cons_f1321) def cons_f1322(m): return Less(m, S(-1)/2) cons1322 = CustomConstraint(cons_f1322) def cons_f1323(m): return Not(And(RationalQ(m), Less(m, S(-1)/2))) cons1323 = CustomConstraint(cons_f1323) def cons_f1324(c, d): return ZeroQ(c**S(2) - d**S(2)) cons1324 = CustomConstraint(cons_f1324) def cons_f1325(c, d): return NonzeroQ(c**S(2) - d**S(2)) cons1325 = CustomConstraint(cons_f1325) def cons_f1326(c, m, n): return Or(IntegersQ(S(2)*m, S(2)*n), IntegerQ(m + S(1)/2), And(IntegerQ(m), ZeroQ(c))) cons1326 = CustomConstraint(cons_f1326) def cons_f1327(n): return Less(S(0), n, S(1)) cons1327 = CustomConstraint(cons_f1327) def cons_f1328(c, m, n): return Or(IntegersQ(S(2)*m, S(2)*n), And(IntegerQ(m), ZeroQ(c))) cons1328 = CustomConstraint(cons_f1328) def cons_f1329(n): return Not(And(RationalQ(n), Greater(n, S(0)))) cons1329 = CustomConstraint(cons_f1329) def cons_f1330(c, n): return Or(IntegerQ(S(2)*n), ZeroQ(c)) cons1330 = CustomConstraint(cons_f1330) def cons_f1331(n): return NonzeroQ(S(2)*n + S(3)) cons1331 = CustomConstraint(cons_f1331) def cons_f1332(a, b, d): return ZeroQ(-a/b + d) cons1332 = CustomConstraint(cons_f1332) def cons_f1333(b, d): return PositiveQ(d/b) cons1333 = CustomConstraint(cons_f1333) def cons_f1334(b, d): return Not(PositiveQ(d/b)) cons1334 = CustomConstraint(cons_f1334) def cons_f1335(m): return Greater(m, S(2)) cons1335 = CustomConstraint(cons_f1335) def cons_f1336(m, n): return Or(IntegerQ(m), IntegersQ(S(2)*m, S(2)*n)) cons1336 = CustomConstraint(cons_f1336) def cons_f1337(a, c, m, n): return Not(And(IntegerQ(n), Greater(n, S(2)), Or(Not(IntegerQ(m)), And(ZeroQ(a), NonzeroQ(c))))) cons1337 = CustomConstraint(cons_f1337) def cons_f1338(n): return Less(S(1), n, S(2)) cons1338 = CustomConstraint(cons_f1338) def cons_f1339(a, m, n): return Or(And(ZeroQ(a), IntegerQ(m), Not(IntegerQ(n))), Not(And(IntegerQ(S(2)*n), Less(n, S(-1)), Or(And(IntegerQ(n), Not(IntegerQ(m))), ZeroQ(a))))) cons1339 = CustomConstraint(cons_f1339) def cons_f1340(c, d): return PositiveQ(c + d) cons1340 = CustomConstraint(cons_f1340) def cons_f1341(c, d): return PositiveQ(c - d) cons1341 = CustomConstraint(cons_f1341) def cons_f1342(c, d): return Not(PositiveQ(c + d)) cons1342 = CustomConstraint(cons_f1342) def cons_f1343(c, d): return PositiveQ(c**S(2) - d**S(2)) cons1343 = CustomConstraint(cons_f1343) def cons_f1344(b, c, d): return PosQ((c + d)/b) cons1344 = CustomConstraint(cons_f1344) def cons_f1345(c): return PositiveQ(c**S(2)) cons1345 = CustomConstraint(cons_f1345) def cons_f1346(b, c, d): return NegQ((c + d)/b) cons1346 = CustomConstraint(cons_f1346) def cons_f1347(a, b, c, d): return PosQ((a + b)/(c + d)) cons1347 = CustomConstraint(cons_f1347) def cons_f1348(a, b, c, d): return NegQ((a + b)/(c + d)) cons1348 = CustomConstraint(cons_f1348) def cons_f1349(a, b): return NegativeQ(a**S(2) - b**S(2)) cons1349 = CustomConstraint(cons_f1349) def cons_f1350(d): return ZeroQ(d**S(2) + S(-1)) cons1350 = CustomConstraint(cons_f1350) def cons_f1351(b, d): return PositiveQ(b*d) cons1351 = CustomConstraint(cons_f1351) def cons_f1352(b): return PositiveQ(b**S(2)) cons1352 = CustomConstraint(cons_f1352) def cons_f1353(b, d): return Not(And(ZeroQ(d**S(2) + S(-1)), PositiveQ(b*d))) cons1353 = CustomConstraint(cons_f1353) def cons_f1354(a, b, d): return PosQ((a + b)/d) cons1354 = CustomConstraint(cons_f1354) def cons_f1355(a): return PositiveQ(a**S(2)) cons1355 = CustomConstraint(cons_f1355) def cons_f1356(a, b, d): return NegQ((a + b)/d) cons1356 = CustomConstraint(cons_f1356) def cons_f1357(a, b, c, d): return PosQ((c + d)/(a + b)) cons1357 = CustomConstraint(cons_f1357) def cons_f1358(a, b, c, d): return NegQ((c + d)/(a + b)) cons1358 = CustomConstraint(cons_f1358) def cons_f1359(m): return Less(S(0), m, S(2)) cons1359 = CustomConstraint(cons_f1359) def cons_f1360(n): return Less(S(-1), n, S(2)) cons1360 = CustomConstraint(cons_f1360) def cons_f1361(m, n): return NonzeroQ(m + n) cons1361 = CustomConstraint(cons_f1361) def cons_f1362(a, b, c, d, e, f, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, m, n), x) cons1362 = CustomConstraint(cons_f1362) def cons_f1363(a, b, n, p): return Or(And(Less(p, S(0)), NonzeroQ(a**S(2) - b**S(2))), Less(S(0), n, p + S(-1)), Less(p + S(1), -n, S(2)*p + S(1))) cons1363 = CustomConstraint(cons_f1363) def cons_f1364(n, p): return Or(Less(S(0), n, p/S(2) + S(1)/2), Inequality(p, LessEqual, -n, Less, S(2)*p + S(-3)), Inequality(S(0), Less, n, LessEqual, -p)) cons1364 = CustomConstraint(cons_f1364) def cons_f1365(a, b, d, e, f, g, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, d, e, f, g, n, p), x) cons1365 = CustomConstraint(cons_f1365) def cons_f1366(m, n): return Not(And(IntegerQ(n), Less(n**S(2), m**S(2)))) cons1366 = CustomConstraint(cons_f1366) def cons_f1367(n, p): return NonzeroQ(S(2)*n + p + S(1)) cons1367 = CustomConstraint(cons_f1367) def cons_f1368(m, n, p): return Not(And(NegativeIntegerQ(m + n + p), Greater(S(2)*m + n + S(3)*p/S(2) + S(1), S(0)))) cons1368 = CustomConstraint(cons_f1368) def cons_f1369(m, n, p): return Not(And(PositiveIntegerQ(n + p/S(2) + S(-1)/2), Greater(m - n, S(0)))) cons1369 = CustomConstraint(cons_f1369) def cons_f1370(m, p): return ZeroQ(S(2)*m + p + S(1)) cons1370 = CustomConstraint(cons_f1370) def cons_f1371(m, n, p): return ZeroQ(m + n + p + S(1)) cons1371 = CustomConstraint(cons_f1371) def cons_f1372(m, n, p): return NegativeIntegerQ(m + n + p + S(1)) cons1372 = CustomConstraint(cons_f1372) def cons_f1373(m, n, p): return NonzeroQ(m + n + p) cons1373 = CustomConstraint(cons_f1373) def cons_f1374(m, n): return Not(And(RationalQ(n), Less(S(0), n, m))) cons1374 = CustomConstraint(cons_f1374) def cons_f1375(a, b, c, d, m, p): return ZeroQ(a*d*m + b*c*(m + p + S(1))) cons1375 = CustomConstraint(cons_f1375) def cons_f1376(m): return Greater(m, S(-1)) cons1376 = CustomConstraint(cons_f1376) def cons_f1377(m, p): return PositiveIntegerQ(m + p/S(2) + S(1)/2) cons1377 = CustomConstraint(cons_f1377) def cons_f1378(m): return Less(m, S(-3)/2) cons1378 = CustomConstraint(cons_f1378) def cons_f1379(m): return Inequality(S(-3)/2, LessEqual, m, Less, S(0)) cons1379 = CustomConstraint(cons_f1379) def cons_f1380(m, p): return Or(And(RationalQ(m), Less(m, S(-1))), NegativeIntegerQ(m + p)) cons1380 = CustomConstraint(cons_f1380) def cons_f1381(p): return Not(And(RationalQ(p), Less(p, S(-1)))) cons1381 = CustomConstraint(cons_f1381) def cons_f1382(m, p): return Equal(S(2)*m + p, S(0)) cons1382 = CustomConstraint(cons_f1382) def cons_f1383(m, n, p): return IntegersQ(m, n, p/S(2)) cons1383 = CustomConstraint(cons_f1383) def cons_f1384(m, n, p): return Or(And(Greater(m, S(0)), Greater(p, S(0)), Less(-m - p, n, S(-1))), And(Greater(m, S(2)), Less(p, S(0)), Greater(m + p/S(2), S(0)))) cons1384 = CustomConstraint(cons_f1384) def cons_f1385(m, n): return Or(NegativeIntegerQ(m), Not(PositiveIntegerQ(n))) cons1385 = CustomConstraint(cons_f1385) def cons_f1386(m, p): return Or(Equal(S(2)*m + p, S(0)), And(Greater(S(2)*m + p, S(0)), Less(p, S(-1)))) cons1386 = CustomConstraint(cons_f1386) def cons_f1387(m): return LessEqual(m, S(-1)/2) cons1387 = CustomConstraint(cons_f1387) def cons_f1388(m, p): return NonzeroQ(m + p + S(2)) cons1388 = CustomConstraint(cons_f1388) def cons_f1389(n, p): return Or(IntegerQ(p), PositiveIntegerQ(n)) cons1389 = CustomConstraint(cons_f1389) def cons_f1390(m, p): return ZeroQ(m + p + S(1)/2) cons1390 = CustomConstraint(cons_f1390) def cons_f1391(m, p): return ZeroQ(m + p + S(3)/2) cons1391 = CustomConstraint(cons_f1391) def cons_f1392(m, n): return Or(PositiveIntegerQ(m), IntegersQ(S(2)*m, S(2)*n)) cons1392 = CustomConstraint(cons_f1392) def cons_f1393(n): return Not(Less(n, S(-1))) cons1393 = CustomConstraint(cons_f1393) def cons_f1394(m, n): return Or(Less(m, S(-2)), ZeroQ(m + n + S(4))) cons1394 = CustomConstraint(cons_f1394) def cons_f1395(m, n): return NonzeroQ(m + n + S(4)) cons1395 = CustomConstraint(cons_f1395) def cons_f1396(m, n): return Or(Less(n, S(-2)), ZeroQ(m + n + S(4))) cons1396 = CustomConstraint(cons_f1396) def cons_f1397(n): return NonzeroQ(n + S(2)) cons1397 = CustomConstraint(cons_f1397) def cons_f1398(m, n): return NonzeroQ(m + n + S(5)) cons1398 = CustomConstraint(cons_f1398) def cons_f1399(m, n): return NonzeroQ(m + n + S(6)) cons1399 = CustomConstraint(cons_f1399) def cons_f1400(m, n, p): return IntegersQ(m, S(2)*n, p/S(2)) cons1400 = CustomConstraint(cons_f1400) def cons_f1401(m, p): return Or(Less(m, S(-1)), And(Equal(m, S(-1)), Greater(p, S(0)))) cons1401 = CustomConstraint(cons_f1401) def cons_f1402(n, p): return Or(Less(n, S(0)), PositiveIntegerQ(p + S(1)/2)) cons1402 = CustomConstraint(cons_f1402) def cons_f1403(n, p): return IntegersQ(S(2)*n, S(2)*p) cons1403 = CustomConstraint(cons_f1403) def cons_f1404(n, p): return Or(LessEqual(n, S(-2)), And(Equal(n, S(-3)/2), Equal(p, S(3)/2))) cons1404 = CustomConstraint(cons_f1404) def cons_f1405(n, p): return Or(Less(n, S(-1)), And(Equal(p, S(3)/2), Equal(n, S(-1)/2))) cons1405 = CustomConstraint(cons_f1405) def cons_f1406(p): return Less(S(-1), p, S(1)) cons1406 = CustomConstraint(cons_f1406) def cons_f1407(m, n): return Or(Greater(m, S(0)), IntegerQ(n)) cons1407 = CustomConstraint(cons_f1407) def cons_f1408(m, n, p): return IntegersQ(m, S(2)*n, S(2)*p) cons1408 = CustomConstraint(cons_f1408) def cons_f1409(m, n, p): return Or(LessEqual(n, S(-2)), And(Equal(m, S(-1)), Equal(n, S(-3)/2), Equal(p, S(3)/2))) cons1409 = CustomConstraint(cons_f1409) def cons_f1410(p): return PositiveIntegerQ(p/S(2)) cons1410 = CustomConstraint(cons_f1410) def cons_f1411(a, b, c, d): return Or(ZeroQ(a**S(2) - b**S(2)), ZeroQ(c**S(2) - d**S(2))) cons1411 = CustomConstraint(cons_f1411) def cons_f1412(c, d): return ZeroQ(-c + d) cons1412 = CustomConstraint(cons_f1412) def cons_f1413(a, b): return PositiveQ(-a**S(2) + b**S(2)) cons1413 = CustomConstraint(cons_f1413) def cons_f1414(a, b, c, d): return NonzeroQ(a*d + b*c) cons1414 = CustomConstraint(cons_f1414) def cons_f1415(a, b, c, d): return Or(NonzeroQ(a**S(2) - b**S(2)), NonzeroQ(c**S(2) - d**S(2))) cons1415 = CustomConstraint(cons_f1415) def cons_f1416(n, p): return ZeroQ(S(2)*n + p) cons1416 = CustomConstraint(cons_f1416) def cons_f1417(m, n, p): return Or(IntegersQ(m, n), IntegersQ(m, p), IntegersQ(n, p)) cons1417 = CustomConstraint(cons_f1417) def cons_f1418(p): return NonzeroQ(p + S(-2)) cons1418 = CustomConstraint(cons_f1418) def cons_f1419(m, n): return Not(And(IntegerQ(m), IntegerQ(n))) cons1419 = CustomConstraint(cons_f1419) def cons_f1420(A, B, a, b): return ZeroQ(A*b + B*a) cons1420 = CustomConstraint(cons_f1420) def cons_f1421(A, B, a, b, m, n): return ZeroQ(A*b*(m + n + S(1)) + B*a*(m - n)) cons1421 = CustomConstraint(cons_f1421) def cons_f1422(m, n): return Or(And(RationalQ(m), Less(m, S(-1)/2)), And(NegativeIntegerQ(m + n), Not(SumSimplerQ(n, S(1))))) cons1422 = CustomConstraint(cons_f1422) def cons_f1423(m): return NonzeroQ(S(2)*m + S(1)) cons1423 = CustomConstraint(cons_f1423) def cons_f1424(A, B, a, b, c, d, m, n): return ZeroQ(A*(a*d*m + b*c*(n + S(1))) - B*(a*c*m + b*d*(n + S(1)))) cons1424 = CustomConstraint(cons_f1424) def cons_f1425(m): return Greater(m, S(1)/2) cons1425 = CustomConstraint(cons_f1425) def cons_f1426(A, B, a, b, c, d, n): return ZeroQ(A*b*d*(S(2)*n + S(3)) - B*(-S(2)*a*d*(n + S(1)) + b*c)) cons1426 = CustomConstraint(cons_f1426) def cons_f1427(m, n): return Or(IntegerQ(n), ZeroQ(m + S(1)/2)) cons1427 = CustomConstraint(cons_f1427) def cons_f1428(A, B, a, b): return NonzeroQ(A*b + B*a) cons1428 = CustomConstraint(cons_f1428) def cons_f1429(a, c, m, n): return Not(And(IntegerQ(n), Greater(n, S(1)), Or(Not(IntegerQ(m)), And(ZeroQ(a), NonzeroQ(c))))) cons1429 = CustomConstraint(cons_f1429) def cons_f1430(A, B): return ZeroQ(A - B) cons1430 = CustomConstraint(cons_f1430) def cons_f1431(A, B): return NonzeroQ(A - B) cons1431 = CustomConstraint(cons_f1431) def cons_f1432(n): return Equal(n**S(2), S(1)/4) cons1432 = CustomConstraint(cons_f1432) def cons_f1433(B, C, b, e, f, m, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, e, f, B, C, m), x) cons1433 = CustomConstraint(cons_f1433) def cons_f1434(A, C, m): return ZeroQ(A*(m + S(2)) + C*(m + S(1))) cons1434 = CustomConstraint(cons_f1434) def cons_f1435(A, C, a, b): return ZeroQ(A*b**S(2) + C*a**S(2)) cons1435 = CustomConstraint(cons_f1435) def cons_f1436(A, B, C): return ZeroQ(A - B + C) cons1436 = CustomConstraint(cons_f1436) def cons_f1437(A, C): return ZeroQ(A + C) cons1437 = CustomConstraint(cons_f1437) def cons_f1438(m, n): return Or(And(RationalQ(m), Less(m, S(-1)/2)), And(ZeroQ(m + n + S(2)), NonzeroQ(S(2)*m + S(1)))) cons1438 = CustomConstraint(cons_f1438) def cons_f1439(m, n): return Or(And(RationalQ(n), Less(n, S(-1))), ZeroQ(m + n + S(2))) cons1439 = CustomConstraint(cons_f1439) def cons_f1440(a, c, m, n): return Not(And(IntegerQ(n), Greater(n, S(0)), Or(Not(IntegerQ(m)), And(ZeroQ(a), NonzeroQ(c))))) cons1440 = CustomConstraint(cons_f1440) def cons_f1441(a, b): return ZeroQ(a**S(2) + b**S(2)) cons1441 = CustomConstraint(cons_f1441) def cons_f1442(a, b): return NonzeroQ(a**S(2) + b**S(2)) cons1442 = CustomConstraint(cons_f1442) def cons_f1443(n): return Not(OddQ(n)) cons1443 = CustomConstraint(cons_f1443) def cons_f1444(n): return Unequal(n, S(-2)) cons1444 = CustomConstraint(cons_f1444) def cons_f1445(n): return Not(And(RationalQ(n), Or(GreaterEqual(n, S(1)), LessEqual(n, S(-1))))) cons1445 = CustomConstraint(cons_f1445) def cons_f1446(a, b): return PositiveQ(a**S(2) + b**S(2)) cons1446 = CustomConstraint(cons_f1446) def cons_f1447(a, b): return Not(Or(PositiveQ(a**S(2) + b**S(2)), ZeroQ(a**S(2) + b**S(2)))) cons1447 = CustomConstraint(cons_f1447) def cons_f1448(m, n): return IntegerQ(m/S(2) + n/S(2)) cons1448 = CustomConstraint(cons_f1448) def cons_f1449(m, n): return Not(And(Greater(n, S(0)), Greater(m, S(1)))) cons1449 = CustomConstraint(cons_f1449) def cons_f1450(a, b, c): return ZeroQ(a**S(2) - b**S(2) - c**S(2)) cons1450 = CustomConstraint(cons_f1450) def cons_f1451(b, c): return ZeroQ(b**S(2) + c**S(2)) cons1451 = CustomConstraint(cons_f1451) def cons_f1452(b, c): return NonzeroQ(b**S(2) + c**S(2)) cons1452 = CustomConstraint(cons_f1452) def cons_f1453(a, b, c): return PositiveQ(a + sqrt(b**S(2) + c**S(2))) cons1453 = CustomConstraint(cons_f1453) def cons_f1454(a, b, c): return NonzeroQ(a**S(2) - b**S(2) - c**S(2)) cons1454 = CustomConstraint(cons_f1454) def cons_f1455(a, b, c): return Not(PositiveQ(a + sqrt(b**S(2) + c**S(2)))) cons1455 = CustomConstraint(cons_f1455) def cons_f1456(a, b): return ZeroQ(a + b) cons1456 = CustomConstraint(cons_f1456) def cons_f1457(a, c): return ZeroQ(a - c) cons1457 = CustomConstraint(cons_f1457) def cons_f1458(a, b): return NonzeroQ(a - b) cons1458 = CustomConstraint(cons_f1458) def cons_f1459(n): return Unequal(n, S(-3)/2) cons1459 = CustomConstraint(cons_f1459) def cons_f1460(A, B, C, a, b, c): return ZeroQ(A*(b**S(2) + c**S(2)) - a*(B*b + C*c)) cons1460 = CustomConstraint(cons_f1460) def cons_f1461(A, C, a, b, c): return ZeroQ(A*(b**S(2) + c**S(2)) - C*a*c) cons1461 = CustomConstraint(cons_f1461) def cons_f1462(A, B, a, b, c): return ZeroQ(A*(b**S(2) + c**S(2)) - B*a*b) cons1462 = CustomConstraint(cons_f1462) def cons_f1463(A, B, C, a, b, c): return NonzeroQ(A*(b**S(2) + c**S(2)) - a*(B*b + C*c)) cons1463 = CustomConstraint(cons_f1463) def cons_f1464(A, C, a, b, c): return NonzeroQ(A*(b**S(2) + c**S(2)) - C*a*c) cons1464 = CustomConstraint(cons_f1464) def cons_f1465(A, B, a, b, c): return NonzeroQ(A*(b**S(2) + c**S(2)) - B*a*b) cons1465 = CustomConstraint(cons_f1465) def cons_f1466(A, B, C, a, b, c, n): return ZeroQ(A*a*(n + S(1)) + n*(B*b + C*c)) cons1466 = CustomConstraint(cons_f1466) def cons_f1467(A, C, a, c, n): return ZeroQ(A*a*(n + S(1)) + C*c*n) cons1467 = CustomConstraint(cons_f1467) def cons_f1468(A, B, a, b, n): return ZeroQ(A*a*(n + S(1)) + B*b*n) cons1468 = CustomConstraint(cons_f1468) def cons_f1469(A, B, C, a, b, c, n): return NonzeroQ(A*a*(n + S(1)) + n*(B*b + C*c)) cons1469 = CustomConstraint(cons_f1469) def cons_f1470(A, C, a, c, n): return NonzeroQ(A*a*(n + S(1)) + C*c*n) cons1470 = CustomConstraint(cons_f1470) def cons_f1471(A, B, a, b, n): return NonzeroQ(A*a*(n + S(1)) + B*b*n) cons1471 = CustomConstraint(cons_f1471) def cons_f1472(B, C, b, c): return ZeroQ(B*b + C*c) cons1472 = CustomConstraint(cons_f1472) def cons_f1473(B, C, b, c): return ZeroQ(B*c - C*b) cons1473 = CustomConstraint(cons_f1473) def cons_f1474(A, B, C, a, b, c): return ZeroQ(A*a - B*b - C*c) cons1474 = CustomConstraint(cons_f1474) def cons_f1475(A, C, a, c): return ZeroQ(A*a - C*c) cons1475 = CustomConstraint(cons_f1475) def cons_f1476(A, B, a, b): return ZeroQ(A*a - B*b) cons1476 = CustomConstraint(cons_f1476) def cons_f1477(A, B, C, a, b, c): return NonzeroQ(A*a - B*b - C*c) cons1477 = CustomConstraint(cons_f1477) def cons_f1478(A, C, a, c): return NonzeroQ(A*a - C*c) cons1478 = CustomConstraint(cons_f1478) def cons_f1479(A, B, a, b): return NonzeroQ(A*a - B*b) cons1479 = CustomConstraint(cons_f1479) def cons_f1480(a, b): return NonzeroQ(a + b) cons1480 = CustomConstraint(cons_f1480) def cons_f1481(n): return EvenQ(n) cons1481 = CustomConstraint(cons_f1481) def cons_f1482(m): return EvenQ(m) cons1482 = CustomConstraint(cons_f1482) def cons_f1483(m): return OddQ(m) cons1483 = CustomConstraint(cons_f1483) def cons_f1484(n): return OddQ(n) cons1484 = CustomConstraint(cons_f1484) def cons_f1485(m): return Not(OddQ(m)) cons1485 = CustomConstraint(cons_f1485) def cons_f1486(p): return EvenQ(p) cons1486 = CustomConstraint(cons_f1486) def cons_f1487(q): return EvenQ(q) cons1487 = CustomConstraint(cons_f1487) def cons_f1488(p, q): return Inequality(S(0), Less, p, LessEqual, q) cons1488 = CustomConstraint(cons_f1488) def cons_f1489(p, q): return Less(S(0), q, p) cons1489 = CustomConstraint(cons_f1489) def cons_f1490(c, d, e, f, m, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(c, d, e, f, m), x) cons1490 = CustomConstraint(cons_f1490) def cons_f1491(m): return Or(Not(RationalQ(m)), Inequality(S(-1), LessEqual, m, Less, S(1))) cons1491 = CustomConstraint(cons_f1491) def cons_f1492(a, b, m, n): return Or(Equal(n, S(1)), PositiveIntegerQ(m), NonzeroQ(a**S(2) - b**S(2))) cons1492 = CustomConstraint(cons_f1492) def cons_f1493(m, n): return Or(Greater(n, S(0)), PositiveIntegerQ(m)) cons1493 = CustomConstraint(cons_f1493) def cons_f1494(a, b): return ZeroQ(a - b) cons1494 = CustomConstraint(cons_f1494) def cons_f1495(n): return NegativeIntegerQ(n + S(2)) cons1495 = CustomConstraint(cons_f1495) def cons_f1496(n, p): return Or(Equal(n, S(2)), Equal(p, S(-1))) cons1496 = CustomConstraint(cons_f1496) def cons_f1497(a, b, c, d, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, n, p), x) cons1497 = CustomConstraint(cons_f1497) def cons_f1498(m, n): return Or(Greater(m - n + S(1), S(0)), Greater(n, S(2))) cons1498 = CustomConstraint(cons_f1498) def cons_f1499(a, b, c, d, e, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, m, n, p), x) cons1499 = CustomConstraint(cons_f1499) def cons_f1500(c, d, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(c, d, n), x) cons1500 = CustomConstraint(cons_f1500) def cons_f1501(d, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(d, n), x) cons1501 = CustomConstraint(cons_f1501) def cons_f1502(m, n): return ZeroQ(m - n/S(2) + S(1)) cons1502 = CustomConstraint(cons_f1502) def cons_f1503(m, n): return Less(S(0), n, m + S(1)) cons1503 = CustomConstraint(cons_f1503) def cons_f1504(n): return NonzeroQ(n + S(-1)) cons1504 = CustomConstraint(cons_f1504) def cons_f1505(m, n): return Less(S(0), S(2)*n, m + S(1)) cons1505 = CustomConstraint(cons_f1505) def cons_f1506(m, n): return Less(S(0), S(2)*n, S(1) - m) cons1506 = CustomConstraint(cons_f1506) def cons_f1507(p): return Unequal(p, S(-2)) cons1507 = CustomConstraint(cons_f1507) def cons_f1508(c, d, e, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(c, d, e, m, n), x) cons1508 = CustomConstraint(cons_f1508) def cons_f1509(a, b, c, d, e, m, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, m), x) cons1509 = CustomConstraint(cons_f1509) def cons_f1510(m, n): return ZeroQ(m + n + S(-1)) cons1510 = CustomConstraint(cons_f1510) def cons_f1511(m, n): return IntegersQ(m, n, m/S(2) + n/S(2) + S(-1)/2) cons1511 = CustomConstraint(cons_f1511) def cons_f1512(m): return Unequal(m, S(-2)) cons1512 = CustomConstraint(cons_f1512) def cons_f1513(m): return Not(And(RationalQ(m), Greater(m, S(1)), Not(IntegerQ(m/S(2) + S(-1)/2)))) cons1513 = CustomConstraint(cons_f1513) def cons_f1514(n): return IntegerQ(n/S(2) + S(1)/2) cons1514 = CustomConstraint(cons_f1514) def cons_f1515(m, n): return Not(IntegersQ(S(2)*m, S(2)*n)) cons1515 = CustomConstraint(cons_f1515) def cons_f1516(m, n): return Not(And(IntegerQ(m/S(2)), Less(S(0), m, n + S(1)))) cons1516 = CustomConstraint(cons_f1516) def cons_f1517(m): return IntegerQ(m/S(2)) cons1517 = CustomConstraint(cons_f1517) def cons_f1518(m, n): return Not(And(IntegerQ(n/S(2) + S(-1)/2), Less(S(0), n, m + S(-1)))) cons1518 = CustomConstraint(cons_f1518) def cons_f1519(m, n): return Or(Greater(m, S(1)), And(Equal(m, S(1)), Equal(n, S(-3)/2))) cons1519 = CustomConstraint(cons_f1519) def cons_f1520(m, n): return Or(Less(m, S(-1)), And(Equal(m, S(-1)), Equal(n, S(3)/2))) cons1520 = CustomConstraint(cons_f1520) def cons_f1521(m, n): return NonzeroQ(m + n + S(-1)) cons1521 = CustomConstraint(cons_f1521) def cons_f1522(m, n): return Or(Less(m, S(-1)), And(Equal(m, S(-1)), RationalQ(n), Equal(n, S(-1)/2))) cons1522 = CustomConstraint(cons_f1522) def cons_f1523(m, n): return Or(Greater(m, S(1)), And(Equal(m, S(1)), RationalQ(n), Equal(n, S(1)/2))) cons1523 = CustomConstraint(cons_f1523) def cons_f1524(b, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, e, f), x) cons1524 = CustomConstraint(cons_f1524) def cons_f1525(n): return Not(IntegerQ(n/S(2) + S(-1)/2)) cons1525 = CustomConstraint(cons_f1525) def cons_f1526(m): return Not(IntegerQ(m/S(2))) cons1526 = CustomConstraint(cons_f1526) def cons_f1527(m, n, p): return NonzeroQ(m*p + n + S(-1)) cons1527 = CustomConstraint(cons_f1527) def cons_f1528(m, n, p): return IntegersQ(S(2)*m*p, S(2)*n) cons1528 = CustomConstraint(cons_f1528) def cons_f1529(m, n, p): return NonzeroQ(m*p + n + S(1)) cons1529 = CustomConstraint(cons_f1529) def cons_f1530(a, b, m): return Or(IntegerQ(S(2)*m), NonzeroQ(a**S(2) + b**S(2))) cons1530 = CustomConstraint(cons_f1530) def cons_f1531(m, n): return ZeroQ(m/S(2) + n) cons1531 = CustomConstraint(cons_f1531) def cons_f1532(m, n): return ZeroQ(m/S(2) + n + S(-1)) cons1532 = CustomConstraint(cons_f1532) def cons_f1533(m, n): return PositiveIntegerQ(m/S(2) + n + S(-1)) cons1533 = CustomConstraint(cons_f1533) def cons_f1534(m, n): return Or(And(PositiveIntegerQ(n/S(2)), NegativeIntegerQ(m + S(-1)/2)), And(Equal(n, S(2)), Less(m, S(0))), And(LessEqual(m, S(-1)), Greater(m + n, S(0))), And(NegativeIntegerQ(m), Less(m/S(2) + n + S(-1), S(0)), IntegerQ(n)), And(Equal(n, S(3)/2), Equal(m, S(-1)/2))) cons1534 = CustomConstraint(cons_f1534) def cons_f1535(m, n): return Or(And(PositiveIntegerQ(n/S(2)), NegativeIntegerQ(m + S(-1)/2)), And(Equal(n, S(2)), Less(m, S(0))), And(LessEqual(m, S(-1)), Greater(m + n, S(0))), And(NegativeIntegerQ(m), Less(m/S(2) + n + S(-1), S(0))), And(Equal(n, S(3)/2), Equal(m, S(-1)/2))) cons1535 = CustomConstraint(cons_f1535) def cons_f1536(m, n): return Or(And(NegativeIntegerQ(n/S(2)), PositiveIntegerQ(m + S(-1)/2)), Equal(n, S(-2)), PositiveIntegerQ(m + n), And(IntegersQ(n, m + S(1)/2), Greater(S(2)*m + n + S(1), S(0)))) cons1536 = CustomConstraint(cons_f1536) def cons_f1537(m, n): return Not(NegativeIntegerQ(m + n)) cons1537 = CustomConstraint(cons_f1537) def cons_f1538(m, n): return NonzeroQ(m + S(2)*n) cons1538 = CustomConstraint(cons_f1538) def cons_f1539(m, n): return PositiveIntegerQ(m + n + S(-1)) cons1539 = CustomConstraint(cons_f1539) def cons_f1540(m, n): return NegativeIntegerQ(m + n) cons1540 = CustomConstraint(cons_f1540) def cons_f1541(m): return PositiveIntegerQ(m + S(-1)) cons1541 = CustomConstraint(cons_f1541) def cons_f1542(m, n): return Or(And(Less(m, S(5)), Greater(n, S(-4))), And(Equal(m, S(5)), Equal(n, S(-1)))) cons1542 = CustomConstraint(cons_f1542) def cons_f1543(m, n): return Not(And(IntegerQ(n), Greater(n, S(0)), Or(Less(m, S(0)), Less(n, m)))) cons1543 = CustomConstraint(cons_f1543) def cons_f1544(a, b, c, d): return ZeroQ(a*c + b*d) cons1544 = CustomConstraint(cons_f1544) def cons_f1545(a, b, c, d): return NonzeroQ(a*c + b*d) cons1545 = CustomConstraint(cons_f1545) def cons_f1546(c, d): return ZeroQ(c**S(2) + d**S(2)) cons1546 = CustomConstraint(cons_f1546) def cons_f1547(c, d): return NonzeroQ(c**S(2) + d**S(2)) cons1547 = CustomConstraint(cons_f1547) def cons_f1548(a, b, c, d): return ZeroQ(S(2)*a*c*d - b*(c**S(2) - d**S(2))) cons1548 = CustomConstraint(cons_f1548) def cons_f1549(a, b, c, d): return NonzeroQ(S(2)*a*c*d - b*(c**S(2) - d**S(2))) cons1549 = CustomConstraint(cons_f1549) def cons_f1550(a, b, c, d): return Or(PerfectSquareQ(a**S(2) + b**S(2)), RationalQ(a, b, c, d)) cons1550 = CustomConstraint(cons_f1550) def cons_f1551(m): return Not(And(RationalQ(m), LessEqual(m, S(-1)))) cons1551 = CustomConstraint(cons_f1551) def cons_f1552(a, m): return Not(And(ZeroQ(m + S(-2)), ZeroQ(a))) cons1552 = CustomConstraint(cons_f1552) def cons_f1553(m, n): return Equal(m + n, S(0)) cons1553 = CustomConstraint(cons_f1553) def cons_f1554(m): return IntegersQ(S(2)*m) cons1554 = CustomConstraint(cons_f1554) def cons_f1555(m, n): return Or(IntegerQ(n), IntegersQ(S(2)*m, S(2)*n)) cons1555 = CustomConstraint(cons_f1555) def cons_f1556(m, n): return Or(And(RationalQ(n), GreaterEqual(n, S(-1))), IntegerQ(m)) cons1556 = CustomConstraint(cons_f1556) def cons_f1557(a, c, m, n): return Not(And(IntegerQ(n), Greater(n, S(2)), Or(Not(IntegerQ(m)), And(ZeroQ(c), NonzeroQ(a))))) cons1557 = CustomConstraint(cons_f1557) def cons_f1558(m, n): return Or(And(RationalQ(n), Less(n, S(0))), IntegerQ(m)) cons1558 = CustomConstraint(cons_f1558) def cons_f1559(a, c, m, n): return Not(And(IntegerQ(n), Less(n, S(-1)), Or(Not(IntegerQ(m)), And(ZeroQ(c), NonzeroQ(a))))) cons1559 = CustomConstraint(cons_f1559) def cons_f1560(A, B): return ZeroQ(A**S(2) + B**S(2)) cons1560 = CustomConstraint(cons_f1560) def cons_f1561(A, B): return NonzeroQ(A**S(2) + B**S(2)) cons1561 = CustomConstraint(cons_f1561) def cons_f1562(a, c, m, n): return Not(And(IntegerQ(n), Greater(n, S(1)), Or(Not(IntegerQ(m)), And(ZeroQ(c), NonzeroQ(a))))) cons1562 = CustomConstraint(cons_f1562) def cons_f1563(A, C): return ZeroQ(A - C) cons1563 = CustomConstraint(cons_f1563) def cons_f1564(A, B, C, a, b): return NonzeroQ(A*b**S(2) - B*a*b + C*a**S(2)) cons1564 = CustomConstraint(cons_f1564) def cons_f1565(A, C, a, b): return NonzeroQ(A*b**S(2) + C*a**S(2)) cons1565 = CustomConstraint(cons_f1565) def cons_f1566(A, B, C, a, b): return ZeroQ(A*b - B*a - C*b) cons1566 = CustomConstraint(cons_f1566) def cons_f1567(A, C): return NonzeroQ(A - C) cons1567 = CustomConstraint(cons_f1567) def cons_f1568(A, B, C, a, b): return NonzeroQ(A*b - B*a - C*b) cons1568 = CustomConstraint(cons_f1568) def cons_f1569(m, n): return Or(And(RationalQ(m), Less(m, S(0))), ZeroQ(m + n + S(1))) cons1569 = CustomConstraint(cons_f1569) def cons_f1570(a, c, m, n): return Not(And(IntegerQ(n), Greater(n, S(0)), Or(Not(IntegerQ(m)), And(ZeroQ(c), NonzeroQ(a))))) cons1570 = CustomConstraint(cons_f1570) def cons_f1571(n): return Not(And(RationalQ(n), LessEqual(n, S(-1)))) cons1571 = CustomConstraint(cons_f1571) def cons_f1572(a, b, c, d, e, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, n, p), x) cons1572 = CustomConstraint(cons_f1572) def cons_f1573(m, n): return NegativeIntegerQ(m, n) cons1573 = CustomConstraint(cons_f1573) def cons_f1574(n): return NegativeIntegerQ(n + S(1)) cons1574 = CustomConstraint(cons_f1574) def cons_f1575(n): return PositiveIntegerQ(S(1)/n) cons1575 = CustomConstraint(cons_f1575) def cons_f1576(m, n): return PositiveIntegerQ((m + S(1))/n) cons1576 = CustomConstraint(cons_f1576) def cons_f1577(c, d, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(c, d, m, n), x) cons1577 = CustomConstraint(cons_f1577) def cons_f1578(a, b, c, d, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, m, n, p), x) cons1578 = CustomConstraint(cons_f1578) def cons_f1579(m, n): return GreaterEqual(m - n, S(0)) cons1579 = CustomConstraint(cons_f1579) def cons_f1580(q): return SameQ(q, S(1)) cons1580 = CustomConstraint(cons_f1580) def cons_f1581(a, b, c, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, n), x) cons1581 = CustomConstraint(cons_f1581) def cons_f1582(a, b, c, d, e, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, m, n), x) cons1582 = CustomConstraint(cons_f1582) def cons_f1583(m, n): return ZeroQ(m + n + S(-2)) cons1583 = CustomConstraint(cons_f1583) def cons_f1584(m, n): return IntegersQ(m, n, m/S(2) + n/S(2)) cons1584 = CustomConstraint(cons_f1584) def cons_f1585(m, n): return Not(And(IntegerQ(m/S(2) + S(1)/2), Less(S(0), m, n))) cons1585 = CustomConstraint(cons_f1585) def cons_f1586(m, n): return Not(PositiveIntegerQ(m/S(2), n/S(2) + S(-1)/2)) cons1586 = CustomConstraint(cons_f1586) def cons_f1587(n): return ZeroQ(n**S(2) + S(-1)/4) cons1587 = CustomConstraint(cons_f1587) def cons_f1588(n): return LessEqual(n, S(-1)) cons1588 = CustomConstraint(cons_f1588) def cons_f1589(a, b, d, e, f, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, d, e, f, n), x) cons1589 = CustomConstraint(cons_f1589) def cons_f1590(a, b, d): return PositiveQ(a*d/b) cons1590 = CustomConstraint(cons_f1590) def cons_f1591(a, b, d): return Not(PositiveQ(a*d/b)) cons1591 = CustomConstraint(cons_f1591) def cons_f1592(n): return Less(n, S(-1)/2) cons1592 = CustomConstraint(cons_f1592) def cons_f1593(m, n): return Or(Less(n, S(-1)), And(Equal(m, S(3)/2), Equal(n, S(-1)/2))) cons1593 = CustomConstraint(cons_f1593) def cons_f1594(m, n): return Or(IntegersQ(S(2)*m, S(2)*n), IntegerQ(m)) cons1594 = CustomConstraint(cons_f1594) def cons_f1595(a, b, d): return NegativeQ(a*d/b) cons1595 = CustomConstraint(cons_f1595) def cons_f1596(m, n): return Or(And(IntegerQ(m), Less(n, S(-1))), And(IntegersQ(m + S(1)/2, S(2)*n), LessEqual(n, S(-1)))) cons1596 = CustomConstraint(cons_f1596) def cons_f1597(m, n): return Not(And(IntegerQ(n), Greater(n, S(2)), Not(IntegerQ(m)))) cons1597 = CustomConstraint(cons_f1597) def cons_f1598(m, n): return Or(And(IntegerQ(n), Greater(n, S(3))), And(IntegersQ(n + S(1)/2, S(2)*m), Greater(n, S(2)))) cons1598 = CustomConstraint(cons_f1598) def cons_f1599(m, n): return NegativeIntegerQ(m + S(1)/2, n) cons1599 = CustomConstraint(cons_f1599) def cons_f1600(n): return Greater(n, S(3)) cons1600 = CustomConstraint(cons_f1600) def cons_f1601(n): return IntegersQ(S(2)*n) cons1601 = CustomConstraint(cons_f1601) def cons_f1602(m): return Not(And(IntegerQ(m), Greater(m, S(2)))) cons1602 = CustomConstraint(cons_f1602) def cons_f1603(n): return Less(S(0), n, S(3)) cons1603 = CustomConstraint(cons_f1603) def cons_f1604(m): return Less(S(-1), m, S(2)) cons1604 = CustomConstraint(cons_f1604) def cons_f1605(n): return Less(S(1), n, S(3)) cons1605 = CustomConstraint(cons_f1605) def cons_f1606(a, b, d, e, f, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, d, e, f, m, n), x) cons1606 = CustomConstraint(cons_f1606) def cons_f1607(a, b, e, f, m, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, e, f, m), x) cons1607 = CustomConstraint(cons_f1607) def cons_f1608(a, b, m, p): return Or(ZeroQ(a**S(2) - b**S(2)), IntegersQ(S(2)*m, p)) cons1608 = CustomConstraint(cons_f1608) def cons_f1609(n): return IntegerQ(n + S(-1)/2) cons1609 = CustomConstraint(cons_f1609) def cons_f1610(m): return NegativeIntegerQ(m + S(1)/2) cons1610 = CustomConstraint(cons_f1610) def cons_f1611(m): return Or(IntegerQ(m/S(2)), LessEqual(m, S(1))) cons1611 = CustomConstraint(cons_f1611) def cons_f1612(m, n): return Less(m + n, S(2)) cons1612 = CustomConstraint(cons_f1612) def cons_f1613(m, n): return Not(And(IntegerQ(n), Greater(m - n, S(0)))) cons1613 = CustomConstraint(cons_f1613) def cons_f1614(n): return Greater(n, S(1)/2) cons1614 = CustomConstraint(cons_f1614) def cons_f1615(n): return Not(And(RationalQ(n), LessEqual(n, S(-1)/2))) cons1615 = CustomConstraint(cons_f1615) def cons_f1616(m, n): return MemberQ(List(S(0), S(-1), S(-2)), m + n) cons1616 = CustomConstraint(cons_f1616) def cons_f1617(m, n): return Not(And(PositiveIntegerQ(n + S(1)/2), Less(n + S(1)/2, -m - n))) cons1617 = CustomConstraint(cons_f1617) def cons_f1618(m, n): return Not(And(PositiveIntegerQ(m + S(-1)/2), Less(m, n))) cons1618 = CustomConstraint(cons_f1618) def cons_f1619(m, n): return GreaterEqual(-m + n, S(0)) cons1619 = CustomConstraint(cons_f1619) def cons_f1620(m, n): return Greater(m*n, S(0)) cons1620 = CustomConstraint(cons_f1620) def cons_f1621(m, n): return Or(NegativeIntegerQ(m, n + S(-1)/2), And(NegativeIntegerQ(m + S(-1)/2, n + S(-1)/2), Less(m, n))) cons1621 = CustomConstraint(cons_f1621) def cons_f1622(m, p): return Or(ZeroQ(p + S(-1)), IntegerQ(m + S(-1)/2)) cons1622 = CustomConstraint(cons_f1622) def cons_f1623(m, n, p): return ZeroQ(m + n + p) cons1623 = CustomConstraint(cons_f1623) def cons_f1624(m, n, p): return MemberQ(List(S(-1), S(-2)), m + n + p) cons1624 = CustomConstraint(cons_f1624) def cons_f1625(A, B, a, b, m): return ZeroQ(A*b*(m + S(1)) + B*a*m) cons1625 = CustomConstraint(cons_f1625) def cons_f1626(A, B, a, b, m): return NonzeroQ(A*b*(m + S(1)) + B*a*m) cons1626 = CustomConstraint(cons_f1626) def cons_f1627(A, B): return ZeroQ(A**S(2) - B**S(2)) cons1627 = CustomConstraint(cons_f1627) def cons_f1628(A, B): return NonzeroQ(A**S(2) - B**S(2)) cons1628 = CustomConstraint(cons_f1628) def cons_f1629(A, B, a, b, m, n): return ZeroQ(A*a*m - B*b*n) cons1629 = CustomConstraint(cons_f1629) def cons_f1630(A, B, a, b, n): return ZeroQ(A*b*(S(2)*n + S(1)) + S(2)*B*a*n) cons1630 = CustomConstraint(cons_f1630) def cons_f1631(A, B, a, b, n): return NonzeroQ(A*b*(S(2)*n + S(1)) + S(2)*B*a*n) cons1631 = CustomConstraint(cons_f1631) def cons_f1632(m, n): return Not(And(IntegerQ(n), Greater(n, S(1)), Not(IntegerQ(m)))) cons1632 = CustomConstraint(cons_f1632) def cons_f1633(m, n): return Not(NegativeIntegerQ(m + S(1)/2, n)) cons1633 = CustomConstraint(cons_f1633) def cons_f1634(m): return Not(And(IntegerQ(m), Greater(m, S(1)))) cons1634 = CustomConstraint(cons_f1634) def cons_f1635(A, C, m): return ZeroQ(A*(m + S(1)) + C*m) cons1635 = CustomConstraint(cons_f1635) def cons_f1636(A, C, m): return NonzeroQ(A*(m + S(1)) + C*m) cons1636 = CustomConstraint(cons_f1636) def cons_f1637(A, B, C, b, e, f, m, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, e, f, A, B, C, m), x) cons1637 = CustomConstraint(cons_f1637) def cons_f1638(A, B, C, a, b, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, e, f, A, B, C), x) cons1638 = CustomConstraint(cons_f1638) def cons_f1639(A, C, a, b, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, e, f, A, C), x) cons1639 = CustomConstraint(cons_f1639) def cons_f1640(m): return PositiveIntegerQ(S(2)*m) cons1640 = CustomConstraint(cons_f1640) def cons_f1641(m, n): return Or(And(RationalQ(n), Less(n, S(-1)/2)), ZeroQ(m + n + S(1))) cons1641 = CustomConstraint(cons_f1641) def cons_f1642(n): return Not(And(RationalQ(n), Less(n, S(-1)/2))) cons1642 = CustomConstraint(cons_f1642) def cons_f1643(A, B, C, a, b, d, e, f, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, d, e, f, A, B, C, m, n), x) cons1643 = CustomConstraint(cons_f1643) def cons_f1644(A, C, a, b, d, e, f, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, d, e, f, A, C, m, n), x) cons1644 = CustomConstraint(cons_f1644) def cons_f1645(b, c, d, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, c, d, n), x) cons1645 = CustomConstraint(cons_f1645) def cons_f1646(n): return Unequal(n, S(2)) cons1646 = CustomConstraint(cons_f1646) def cons_f1647(p): return NonzeroQ(p + S(-1)) cons1647 = CustomConstraint(cons_f1647) def cons_f1648(u, x): if isinstance(x, (int, Integer, float, Float)): return False return KnownSineIntegrandQ(u, x) cons1648 = CustomConstraint(cons_f1648) def cons_f1649(A, B, C, a, b, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, A, B, C), x) cons1649 = CustomConstraint(cons_f1649) def cons_f1650(n, n1): return ZeroQ(-n + n1 + S(-1)) cons1650 = CustomConstraint(cons_f1650) def cons_f1651(n, n2): return ZeroQ(-n + n2 + S(-2)) cons1651 = CustomConstraint(cons_f1651) def cons_f1652(u, x): if isinstance(x, (int, Integer, float, Float)): return False return KnownTangentIntegrandQ(u, x) cons1652 = CustomConstraint(cons_f1652) def cons_f1653(u, x): if isinstance(x, (int, Integer, float, Float)): return False return KnownCotangentIntegrandQ(u, x) cons1653 = CustomConstraint(cons_f1653) def cons_f1654(u, x): if isinstance(x, (int, Integer, float, Float)): return False return KnownSecantIntegrandQ(u, x) cons1654 = CustomConstraint(cons_f1654) def cons_f1655(b, d): return NonzeroQ(b**S(2) - d**S(2)) cons1655 = CustomConstraint(cons_f1655) def cons_f1656(b, d): return ZeroQ(S(-2) + d/b) cons1656 = CustomConstraint(cons_f1656) def cons_f1657(m, p): return Or(Greater(m, S(3)), Equal(p, S(-3)/2)) cons1657 = CustomConstraint(cons_f1657) def cons_f1658(m, p): return Or(Less(p, S(-2)), Equal(m, S(2))) cons1658 = CustomConstraint(cons_f1658) def cons_f1659(m, n, p): return ZeroQ(m + n + S(2)*p + S(2)) cons1659 = CustomConstraint(cons_f1659) def cons_f1660(m): return Greater(m, S(3)) cons1660 = CustomConstraint(cons_f1660) def cons_f1661(n, p): return NonzeroQ(n + p + S(1)) cons1661 = CustomConstraint(cons_f1661) def cons_f1662(m, n, p): return NonzeroQ(m + n + S(2)*p + S(2)) cons1662 = CustomConstraint(cons_f1662) def cons_f1663(m, p): return Or(Less(p, S(-2)), Equal(m, S(2)), Equal(m, S(3))) cons1663 = CustomConstraint(cons_f1663) def cons_f1664(m, n, p): return NonzeroQ(m + n + S(2)*p) cons1664 = CustomConstraint(cons_f1664) def cons_f1665(b, d, m): return ZeroQ(-Abs(m + S(2)) + d/b) cons1665 = CustomConstraint(cons_f1665) def cons_f1666(F): return InertTrigQ(F) cons1666 = CustomConstraint(cons_f1666) def cons_f1667(F, G): return InertTrigQ(F, G) cons1667 = CustomConstraint(cons_f1667) def cons_f1668(F): return Or(SameQ(F, Cos), SameQ(F, cos)) cons1668 = CustomConstraint(cons_f1668) def cons_f1669(F): return Or(SameQ(F, Sin), SameQ(F, sin)) cons1669 = CustomConstraint(cons_f1669) def cons_f1670(F): return Or(SameQ(F, Cot), SameQ(F, cot)) cons1670 = CustomConstraint(cons_f1670) def cons_f1671(F): return Or(SameQ(F, Tan), SameQ(F, tan)) cons1671 = CustomConstraint(cons_f1671) def cons_f1672(F): return Or(SameQ(F, Sec), SameQ(F, sec)) cons1672 = CustomConstraint(cons_f1672) def cons_f1673(F): return Or(SameQ(F, Csc), SameQ(F, csc)) cons1673 = CustomConstraint(cons_f1673) def cons_f1674(F): return Or(SameQ(F, sin), SameQ(F, cos)) cons1674 = CustomConstraint(cons_f1674) def cons_f1675(G): return Or(SameQ(G, sin), SameQ(G, cos)) cons1675 = CustomConstraint(cons_f1675) def cons_f1676(H): return Or(SameQ(H, sin), SameQ(H, cos)) cons1676 = CustomConstraint(cons_f1676) def cons_f1677(b, c): return ZeroQ(b - c) cons1677 = CustomConstraint(cons_f1677) def cons_f1678(b, c): return ZeroQ(b + c) cons1678 = CustomConstraint(cons_f1678) def cons_f1679(u): return Not(InertTrigFreeQ(u)) cons1679 = CustomConstraint(cons_f1679) def cons_f1680(p): return NegQ(p) cons1680 = CustomConstraint(cons_f1680) def cons_f1681(u): return TrigSimplifyQ(u) cons1681 = CustomConstraint(cons_f1681) def cons_f1682(v): return Not(InertTrigFreeQ(v)) cons1682 = CustomConstraint(cons_f1682) def cons_f1683(v, w): return Or(Not(InertTrigFreeQ(v)), Not(InertTrigFreeQ(w))) cons1683 = CustomConstraint(cons_f1683) def cons_f1684(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: return Not(FalseQ(FunctionOfTrig(u, x))) except (TypeError, AttributeError): return False cons1684 = CustomConstraint(cons_f1684) def cons_f1685(p): return SameQ(p, S(1)) cons1685 = CustomConstraint(cons_f1685) def cons_f1686(n, p): return Or(EvenQ(n), OddQ(p)) cons1686 = CustomConstraint(cons_f1686) def cons_f1687(n, p): return Unequal(n, p) cons1687 = CustomConstraint(cons_f1687) def cons_f1688(F): return TrigQ(F) cons1688 = CustomConstraint(cons_f1688) def cons_f1689(G): return TrigQ(G) cons1689 = CustomConstraint(cons_f1689) def cons_f1690(v, w): return ZeroQ(v - w) cons1690 = CustomConstraint(cons_f1690) def cons_f1691(F): return MemberQ(List(Sin, Cos), F) cons1691 = CustomConstraint(cons_f1691) def cons_f1692(G): return MemberQ(List(Sec, Csc), G) cons1692 = CustomConstraint(cons_f1692) def cons_f1693(b, d): return PositiveIntegerQ(b/d + S(-1)) cons1693 = CustomConstraint(cons_f1693) def cons_f1694(F, b, c, e): return NonzeroQ(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)) cons1694 = CustomConstraint(cons_f1694) def cons_f1695(F, b, c, e, n): return NonzeroQ(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)) cons1695 = CustomConstraint(cons_f1695) def cons_f1696(F, b, c, e, m): return NonzeroQ(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*m**S(2)) cons1696 = CustomConstraint(cons_f1696) def cons_f1697(F, b, c, e, n): return ZeroQ(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(2))**S(2)) cons1697 = CustomConstraint(cons_f1697) def cons_f1698(F, b, c, e, n): return NonzeroQ(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(2))**S(2)) cons1698 = CustomConstraint(cons_f1698) def cons_f1699(F, b, c, e, n): return ZeroQ(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(-2))**S(2)) cons1699 = CustomConstraint(cons_f1699) def cons_f1700(F, b, c, e, n): return NonzeroQ(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(-2))**S(2)) cons1700 = CustomConstraint(cons_f1700) def cons_f1701(f, g): return ZeroQ(f**S(2) - g**S(2)) cons1701 = CustomConstraint(cons_f1701) def cons_f1702(f, g): return ZeroQ(f - g) cons1702 = CustomConstraint(cons_f1702) def cons_f1703(h, i): return ZeroQ(h**S(2) - i**S(2)) cons1703 = CustomConstraint(cons_f1703) def cons_f1704(f, g, h, i): return ZeroQ(-f*i + g*h) cons1704 = CustomConstraint(cons_f1704) def cons_f1705(f, g, h, i): return ZeroQ(f*i + g*h) cons1705 = CustomConstraint(cons_f1705) def cons_f1706(m, n, p): return PositiveIntegerQ(m, n, p) cons1706 = CustomConstraint(cons_f1706) def cons_f1707(H): return TrigQ(H) cons1707 = CustomConstraint(cons_f1707) def cons_f1708(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(LinearQ(u, x), PolyQ(u, x, S(2))) cons1708 = CustomConstraint(cons_f1708) def cons_f1709(v, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(LinearQ(v, x), PolyQ(v, x, S(2))) cons1709 = CustomConstraint(cons_f1709) def cons_f1710(b, n, p): return ZeroQ(b**S(2)*n**S(2)*(p + S(2))**S(2) + S(1)) cons1710 = CustomConstraint(cons_f1710) def cons_f1711(b, n, p): return ZeroQ(b**S(2)*n**S(2)*p**S(2) + S(1)) cons1711 = CustomConstraint(cons_f1711) def cons_f1712(b, n): return NonzeroQ(b**S(2)*n**S(2) + S(1)) cons1712 = CustomConstraint(cons_f1712) def cons_f1713(b, n, p): return NonzeroQ(b**S(2)*n**S(2)*p**S(2) + S(1)) cons1713 = CustomConstraint(cons_f1713) def cons_f1714(b, n, p): return NonzeroQ(b**S(2)*n**S(2)*(p + S(2))**S(2) + S(1)) cons1714 = CustomConstraint(cons_f1714) def cons_f1715(b, m, n, p): return ZeroQ(b**S(2)*n**S(2)*(p + S(2))**S(2) + (m + S(1))**S(2)) cons1715 = CustomConstraint(cons_f1715) def cons_f1716(b, m, n, p): return ZeroQ(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)) cons1716 = CustomConstraint(cons_f1716) def cons_f1717(b, m, n): return NonzeroQ(b**S(2)*n**S(2) + (m + S(1))**S(2)) cons1717 = CustomConstraint(cons_f1717) def cons_f1718(b, m, n, p): return NonzeroQ(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)) cons1718 = CustomConstraint(cons_f1718) def cons_f1719(b, m, n, p): return NonzeroQ(b**S(2)*n**S(2)*(p + S(2))**S(2) + (m + S(1))**S(2)) cons1719 = CustomConstraint(cons_f1719) def cons_f1720(b, n): return ZeroQ(b**S(2)*n**S(2) + S(1)) cons1720 = CustomConstraint(cons_f1720) def cons_f1721(b, n, p): return ZeroQ(b**S(2)*n**S(2)*(p + S(-2))**S(2) + S(1)) cons1721 = CustomConstraint(cons_f1721) def cons_f1722(p): return Unequal(p, S(2)) cons1722 = CustomConstraint(cons_f1722) def cons_f1723(b, n, p): return NonzeroQ(b**S(2)*n**S(2)*(p + S(-2))**S(2) + S(1)) cons1723 = CustomConstraint(cons_f1723) def cons_f1724(b, m, n): return ZeroQ(b**S(2)*n**S(2) + (m + S(1))**S(2)) cons1724 = CustomConstraint(cons_f1724) def cons_f1725(b, m, n, p): return ZeroQ(b**S(2)*n**S(2)*(p + S(-2))**S(2) + (m + S(1))**S(2)) cons1725 = CustomConstraint(cons_f1725) def cons_f1726(b, m, n, p): return NonzeroQ(b**S(2)*n**S(2)*(p + S(-2))**S(2) + (m + S(1))**S(2)) cons1726 = CustomConstraint(cons_f1726) def cons_f1727(u, x): if isinstance(x, (int, Integer, float, Float)): return False return QuotientOfLinearsQ(u, x) cons1727 = CustomConstraint(cons_f1727) def cons_f1728(v, w, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(And(PolynomialQ(v, x), PolynomialQ(w, x)), And(BinomialQ(List(v, w), x), IndependentQ(v/w, x))) cons1728 = CustomConstraint(cons_f1728) def cons_f1729(m, p, q): return PositiveIntegerQ(m, p, q) cons1729 = CustomConstraint(cons_f1729) def cons_f1730(v, w): return NonzeroQ(v - w) cons1730 = CustomConstraint(cons_f1730) def cons_f1731(m, n): return Or(Equal(n, S(-1)), And(Equal(m, S(1)), Equal(n, S(-2)))) cons1731 = CustomConstraint(cons_f1731) def cons_f1732(a, c): return NonzeroQ(a + c) cons1732 = CustomConstraint(cons_f1732) def cons_f1733(a, b): return PosQ(a**S(2) - b**S(2)) cons1733 = CustomConstraint(cons_f1733) def cons_f1734(a, b): return NegQ(a**S(2) - b**S(2)) cons1734 = CustomConstraint(cons_f1734) def cons_f1735(b, d): return ZeroQ(b**S(2) - d**S(2)) cons1735 = CustomConstraint(cons_f1735) def cons_f1736(n): return Inequality(S(-2), LessEqual, n, Less, S(-1)) cons1736 = CustomConstraint(cons_f1736) def cons_f1737(n): return Less(n, S(-2)) cons1737 = CustomConstraint(cons_f1737) def cons_f1738(a, b, c, d, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, m, n), x) cons1738 = CustomConstraint(cons_f1738) def cons_f1739(c, d, e): return ZeroQ(c**S(2)*d + e) cons1739 = CustomConstraint(cons_f1739) def cons_f1740(d): return Not(PositiveQ(d)) cons1740 = CustomConstraint(cons_f1740) def cons_f1741(p): return PositiveIntegerQ(S(2)*p) cons1741 = CustomConstraint(cons_f1741) def cons_f1742(d, p): return Or(IntegerQ(p), PositiveQ(d)) cons1742 = CustomConstraint(cons_f1742) def cons_f1743(d, p): return Not(Or(IntegerQ(p), PositiveQ(d))) cons1743 = CustomConstraint(cons_f1743) def cons_f1744(c, d, e): return NonzeroQ(c**S(2)*d + e) cons1744 = CustomConstraint(cons_f1744) def cons_f1745(p): return Or(PositiveIntegerQ(p), NegativeIntegerQ(p + S(1)/2)) cons1745 = CustomConstraint(cons_f1745) def cons_f1746(n, p): return Or(Greater(p, S(0)), PositiveIntegerQ(n)) cons1746 = CustomConstraint(cons_f1746) def cons_f1747(c, f, g): return ZeroQ(c**S(2)*f**S(2) - g**S(2)) cons1747 = CustomConstraint(cons_f1747) def cons_f1748(m): return NegativeIntegerQ(m/S(2) + S(1)/2) cons1748 = CustomConstraint(cons_f1748) def cons_f1749(m, p): return Or(PositiveIntegerQ(m/S(2) + S(1)/2), NegativeIntegerQ(m/S(2) + p + S(3)/2)) cons1749 = CustomConstraint(cons_f1749) def cons_f1750(m, n): return Or(RationalQ(m), ZeroQ(n + S(-1))) cons1750 = CustomConstraint(cons_f1750) def cons_f1751(m, n, p): return Or(IntegerQ(m), IntegerQ(p), Equal(n, S(1))) cons1751 = CustomConstraint(cons_f1751) def cons_f1752(m, n): return Or(IntegerQ(m), Equal(n, S(1))) cons1752 = CustomConstraint(cons_f1752) def cons_f1753(m): return Greater(m, S(-3)) cons1753 = CustomConstraint(cons_f1753) def cons_f1754(p): return Greater(p, S(-1)) cons1754 = CustomConstraint(cons_f1754) def cons_f1755(m): return Not(PositiveIntegerQ(m/S(2) + S(1)/2)) cons1755 = CustomConstraint(cons_f1755) def cons_f1756(m): return Less(S(-3), m, S(0)) cons1756 = CustomConstraint(cons_f1756) def cons_f1757(m, p): return Or(Greater(p, S(0)), And(PositiveIntegerQ(m/S(2) + S(-1)/2), LessEqual(m + p, S(0)))) cons1757 = CustomConstraint(cons_f1757) def cons_f1758(a, b, c, d, e, f, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, m, n, p), x) cons1758 = CustomConstraint(cons_f1758) def cons_f1759(m, p): return Less(m + p + S(1), S(0)) cons1759 = CustomConstraint(cons_f1759) def cons_f1760(d, e, g, h): return ZeroQ(-S(2)*d*h + e*g) cons1760 = CustomConstraint(cons_f1760) def cons_f1761(m, p): return Or(Less(m, -S(2)*p + S(-1)), Greater(m, S(3))) cons1761 = CustomConstraint(cons_f1761) def cons_f1762(m, n, p): return Or(And(Equal(n, S(1)), Greater(p, S(-1))), Greater(p, S(0)), Equal(m, S(1)), And(Equal(m, S(2)), Less(p, S(-2)))) cons1762 = CustomConstraint(cons_f1762) def cons_f1763(m, n): return Or(Greater(m, S(0)), PositiveIntegerQ(n)) cons1763 = CustomConstraint(cons_f1763) def cons_f1764(A, B, c, d): return ZeroQ(S(2)*A*c*d + B*(S(1) - c**S(2))) cons1764 = CustomConstraint(cons_f1764) def cons_f1765(B, C, c, d): return ZeroQ(-B*d + S(2)*C*c) cons1765 = CustomConstraint(cons_f1765) def cons_f1766(c): return ZeroQ(c**S(2) + S(-1)) cons1766 = CustomConstraint(cons_f1766) def cons_f1767(a, b, d, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, d), x) cons1767 = CustomConstraint(cons_f1767) def cons_f1768(a, b, c, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, n, m), x) cons1768 = CustomConstraint(cons_f1768) def cons_f1769(b, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(b, n), x) cons1769 = CustomConstraint(cons_f1769) def cons_f1770(b, c): return EqQ(b**S(2)*c, S(1)) cons1770 = CustomConstraint(cons_f1770) def cons_f1771(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(FunctionOfExponentialQ(u, x)) cons1771 = CustomConstraint(cons_f1771) def cons_f1772(c, d, m, u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(FunctionOfQ((c + d*x)**(m + S(1)), u, x)) cons1772 = CustomConstraint(cons_f1772) def cons_f1773(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1772(c, d, m): return FreeQ(List(c, d, m), x) _cons_1772 = CustomConstraint(_cons_f_1772) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1772) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1773 = CustomConstraint(cons_f1773) def cons_f1774(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1773(c, d, m): return FreeQ(List(c, d, m), x) _cons_1773 = CustomConstraint(_cons_f_1773) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1773) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1774 = CustomConstraint(cons_f1774) def cons_f1775(c, d, e): return ZeroQ(c**S(2)*d**S(2) + e**S(2)) cons1775 = CustomConstraint(cons_f1775) def cons_f1776(c, d, e): return PositiveQ(I*c*d/e + S(1)) cons1776 = CustomConstraint(cons_f1776) def cons_f1777(c, d, e): return NegativeQ(I*c*d/e + S(-1)) cons1777 = CustomConstraint(cons_f1777) def cons_f1778(c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(c, d, e), x) cons1778 = CustomConstraint(cons_f1778) def cons_f1779(a, m, p): return Or(Greater(p, S(0)), NonzeroQ(a), IntegerQ(m)) cons1779 = CustomConstraint(cons_f1779) def cons_f1780(c, d, e): return ZeroQ(-c**S(2)*d + e) cons1780 = CustomConstraint(cons_f1780) def cons_f1781(p): return NegativeIntegerQ(S(2)*p + S(2)) cons1781 = CustomConstraint(cons_f1781) def cons_f1782(p): return Or(IntegerQ(p), NegativeIntegerQ(p + S(1)/2)) cons1782 = CustomConstraint(cons_f1782) def cons_f1783(a, m): return Not(And(Equal(m, S(1)), NonzeroQ(a))) cons1783 = CustomConstraint(cons_f1783) def cons_f1784(p): return Unequal(p, S(-5)/2) cons1784 = CustomConstraint(cons_f1784) def cons_f1785(m, n, p): return Or(RationalQ(m), And(EqQ(n, S(1)), IntegerQ(p))) cons1785 = CustomConstraint(cons_f1785) def cons_f1786(m, n, p): return IntegersQ(m, n, S(2)*p) cons1786 = CustomConstraint(cons_f1786) def cons_f1787(m, p): return NegativeIntegerQ(m + S(2)*p + S(1)) cons1787 = CustomConstraint(cons_f1787) def cons_f1788(m, p): return Or(And(PositiveIntegerQ(p), Not(And(NegativeIntegerQ(m/S(2) + S(-1)/2), Greater(m + S(2)*p + S(3), S(0))))), And(PositiveIntegerQ(m/S(2) + S(1)/2), Not(And(NegativeIntegerQ(p), Greater(m + S(2)*p + S(3), S(0))))), And(NegativeIntegerQ(m/S(2) + p + S(1)/2), Not(NegativeIntegerQ(m/S(2) + S(-1)/2)))) cons1788 = CustomConstraint(cons_f1788) def cons_f1789(m, p): return Or(Greater(p, S(0)), And(Less(p, S(-1)), IntegerQ(m), Unequal(m, S(1)))) cons1789 = CustomConstraint(cons_f1789) def cons_f1790(a, b, c, d, e, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, m, p), x) cons1790 = CustomConstraint(cons_f1790) def cons_f1791(c, u, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(u**S(2) - (S(1) - S(2)*I/(c*x + I))**S(2)) cons1791 = CustomConstraint(cons_f1791) def cons_f1792(c, u, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(u**S(2) - (S(1) - S(2)*I/(-c*x + I))**S(2)) cons1792 = CustomConstraint(cons_f1792) def cons_f1793(c, u, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ((S(1) - u)**S(2) - (S(1) - S(2)*I/(c*x + I))**S(2)) cons1793 = CustomConstraint(cons_f1793) def cons_f1794(c, u, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ((S(1) - u)**S(2) - (S(1) - S(2)*I/(-c*x + I))**S(2)) cons1794 = CustomConstraint(cons_f1794) def cons_f1795(m, n): return Inequality(S(0), Less, n, LessEqual, m) cons1795 = CustomConstraint(cons_f1795) def cons_f1796(m, n): return Less(S(0), n, m) cons1796 = CustomConstraint(cons_f1796) def cons_f1797(a, c, d, n): return Not(And(Equal(n, S(2)), ZeroQ(-a**S(2)*c + d))) cons1797 = CustomConstraint(cons_f1797) def cons_f1798(a, b, c, d, e, f, g, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, e, f, g), x) cons1798 = CustomConstraint(cons_f1798) def cons_f1799(m): return PositiveIntegerQ(m/S(2) + S(1)/2) cons1799 = CustomConstraint(cons_f1799) def cons_f1800(c, f, g): return ZeroQ(-c**S(2)*f + g) cons1800 = CustomConstraint(cons_f1800) def cons_f1801(n): return OddQ(I*n) cons1801 = CustomConstraint(cons_f1801) def cons_f1802(n): return Not(OddQ(I*n)) cons1802 = CustomConstraint(cons_f1802) def cons_f1803(a, c, d): return ZeroQ(a**S(2)*c**S(2) + d**S(2)) cons1803 = CustomConstraint(cons_f1803) def cons_f1804(c, p): return Or(IntegerQ(p), PositiveQ(c)) cons1804 = CustomConstraint(cons_f1804) def cons_f1805(c, p): return Not(Or(IntegerQ(p), PositiveQ(c))) cons1805 = CustomConstraint(cons_f1805) def cons_f1806(a, c, d): return ZeroQ(a**S(2)*d**S(2) + c**S(2)) cons1806 = CustomConstraint(cons_f1806) def cons_f1807(n): return IntegerQ(I*n/S(2)) cons1807 = CustomConstraint(cons_f1807) def cons_f1808(a, c, d): return ZeroQ(-a**S(2)*c + d) cons1808 = CustomConstraint(cons_f1808) def cons_f1809(n): return Not(IntegerQ(I*n)) cons1809 = CustomConstraint(cons_f1809) def cons_f1810(n, p): return NonzeroQ(n**S(2) + S(4)*(p + S(1))**S(2)) cons1810 = CustomConstraint(cons_f1810) def cons_f1811(n): return IntegerQ(I*n/S(2) + S(1)/2) cons1811 = CustomConstraint(cons_f1811) def cons_f1812(n, p): return Not(IntegerQ(-I*n/S(2) + p)) cons1812 = CustomConstraint(cons_f1812) def cons_f1813(n): return PositiveIntegerQ(I*n/S(2)) cons1813 = CustomConstraint(cons_f1813) def cons_f1814(n): return NegativeIntegerQ(I*n/S(2)) cons1814 = CustomConstraint(cons_f1814) def cons_f1815(n, p): return ZeroQ(n**S(2) - S(2)*p + S(-2)) cons1815 = CustomConstraint(cons_f1815) def cons_f1816(n): return Not(IntegerQ(I*n/S(2))) cons1816 = CustomConstraint(cons_f1816) def cons_f1817(a, c, d): return ZeroQ(-a**S(2)*d + c) cons1817 = CustomConstraint(cons_f1817) def cons_f1818(n): return RationalQ(I*n) cons1818 = CustomConstraint(cons_f1818) def cons_f1819(n): return Less(S(-1), I*n, S(1)) cons1819 = CustomConstraint(cons_f1819) def cons_f1820(a, b, d, e): return ZeroQ(-S(2)*a*e + b*d) cons1820 = CustomConstraint(cons_f1820) def cons_f1821(a, b, c, e): return ZeroQ(b**S(2)*c - e*(a**S(2) + S(1))) cons1821 = CustomConstraint(cons_f1821) def cons_f1822(a, c, p): return Or(IntegerQ(p), PositiveQ(c/(a**S(2) + S(1)))) cons1822 = CustomConstraint(cons_f1822) def cons_f1823(a, c, p): return Not(Or(IntegerQ(p), PositiveQ(c/(a**S(2) + S(1))))) cons1823 = CustomConstraint(cons_f1823) def cons_f1824(n, p): return Not(And(IntegerQ(p), EvenQ(I*n))) cons1824 = CustomConstraint(cons_f1824) def cons_f1825(n, p): return Not(And(Not(IntegerQ(p)), OddQ(I*n))) cons1825 = CustomConstraint(cons_f1825) def cons_f1826(p): return LessEqual(p, S(-1)) cons1826 = CustomConstraint(cons_f1826) def cons_f1827(n): return NonzeroQ(n**S(2) + S(1)) cons1827 = CustomConstraint(cons_f1827) def cons_f1828(n, p): return NonzeroQ(n**S(2) - S(2)*p + S(-2)) cons1828 = CustomConstraint(cons_f1828) def cons_f1829(m, p): return LessEqual(S(3), m, -S(2)*p + S(-2)) cons1829 = CustomConstraint(cons_f1829) def cons_f1830(n, p): return IntegersQ(S(2)*p, I*n/S(2) + p) cons1830 = CustomConstraint(cons_f1830) def cons_f1831(n, p): return Not(IntegersQ(S(2)*p, I*n/S(2) + p)) cons1831 = CustomConstraint(cons_f1831) def cons_f1832(A, B, c, d): return ZeroQ(-S(2)*A*c*d + B*(c**S(2) + S(1))) cons1832 = CustomConstraint(cons_f1832) def cons_f1833(a, b, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, n), x) cons1833 = CustomConstraint(cons_f1833) def cons_f1834(m): return Unequal(m + S(1), S(0)) cons1834 = CustomConstraint(cons_f1834) def cons_f1835(m, n): return Unequal(m + S(1), n) cons1835 = CustomConstraint(cons_f1835) def cons_f1836(a, b, c, d, f, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, f), x) cons1836 = CustomConstraint(cons_f1836) def cons_f1837(b, c): return ZeroQ(b + c**S(2)) cons1837 = CustomConstraint(cons_f1837) def cons_f1838(s): return ZeroQ(s**S(2) + S(-1)) cons1838 = CustomConstraint(cons_f1838) def cons_f1839(v, w): return ZeroQ(-v**S(2) + w + S(-1)) cons1839 = CustomConstraint(cons_f1839) def cons_f1840(v, x): if isinstance(x, (int, Integer, float, Float)): return False return NegQ(Discriminant(v, x)) cons1840 = CustomConstraint(cons_f1840) def cons_f1841(u, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1840(f, r, w): return FreeQ(f, x) _cons_1840 = CustomConstraint(_cons_f_1840) pat = Pattern(UtilityOperator(f_**w_*WC('r', S(1)), x), _cons_1840) result_matchq = is_match(UtilityOperator(u, x), pat) return result_matchq cons1841 = CustomConstraint(cons_f1841) def cons_f1842(u, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1841(f, r, w): return FreeQ(f, x) _cons_1841 = CustomConstraint(_cons_f_1841) pat = Pattern(UtilityOperator(f_**w_*WC('r', S(1)), x), _cons_1841) result_matchq = is_match(UtilityOperator(u, x), pat) return result_matchq cons1842 = CustomConstraint(cons_f1842) def cons_f1843(c, d): return ZeroQ((c + I*d)**S(2) + S(1)) cons1843 = CustomConstraint(cons_f1843) def cons_f1844(c, d): return ZeroQ((c - I*d)**S(2) + S(1)) cons1844 = CustomConstraint(cons_f1844) def cons_f1845(c, d): return NonzeroQ((c + I*d)**S(2) + S(1)) cons1845 = CustomConstraint(cons_f1845) def cons_f1846(c, d): return NonzeroQ((c - I*d)**S(2) + S(1)) cons1846 = CustomConstraint(cons_f1846) def cons_f1847(c, d): return ZeroQ((c - d)**S(2) + S(1)) cons1847 = CustomConstraint(cons_f1847) def cons_f1848(c, d): return NonzeroQ((c - d)**S(2) + S(1)) cons1848 = CustomConstraint(cons_f1848) def cons_f1849(m, u, x): if isinstance(x, (int, Integer, float, Float)): return False try: return FalseQ(PowerVariableExpn(u, m + S(1), x)) except (TypeError, AttributeError): return False cons1849 = CustomConstraint(cons_f1849) def cons_f1850(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1849(c, d, m): return FreeQ(List(c, d, m), x) _cons_1849 = CustomConstraint(_cons_f_1849) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1849) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1850 = CustomConstraint(cons_f1850) def cons_f1851(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: return FalseQ(FunctionOfLinear(v*(a + b*ArcTan(u)), x)) except (TypeError, AttributeError): return False cons1851 = CustomConstraint(cons_f1851) def cons_f1852(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1851(c, d, m): return FreeQ(List(c, d, m), x) _cons_1851 = CustomConstraint(_cons_f_1851) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1851) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1852 = CustomConstraint(cons_f1852) def cons_f1853(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: return FalseQ(FunctionOfLinear(v*(a + b*acot(u)), x)) except (TypeError, AttributeError): return False cons1853 = CustomConstraint(cons_f1853) def cons_f1854(a, b, v, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(D(v/(a + b*x), x)) cons1854 = CustomConstraint(cons_f1854) def cons_f1855(a, b, w, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(D(w/(a + b*x), x)) cons1855 = CustomConstraint(cons_f1855) def cons_f1856(a, b, c, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, m, n), x) cons1856 = CustomConstraint(cons_f1856) def cons_f1857(d): return Negative(d) cons1857 = CustomConstraint(cons_f1857) def cons_f1858(d, e): return Not(And(PositiveQ(e), Negative(d))) cons1858 = CustomConstraint(cons_f1858) def cons_f1859(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1858(c, d, m): return FreeQ(List(c, d, m), x) _cons_1858 = CustomConstraint(_cons_f_1858) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1858) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1859 = CustomConstraint(cons_f1859) def cons_f1860(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1859(c, d, m): return FreeQ(List(c, d, m), x) _cons_1859 = CustomConstraint(_cons_f_1859) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1859) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1860 = CustomConstraint(cons_f1860) def cons_f1861(a, b, m, n): return Or(Equal(n, S(1)), PositiveIntegerQ(m), NonzeroQ(a**S(2) + b**S(2))) cons1861 = CustomConstraint(cons_f1861) def cons_f1862(F): return HyperbolicQ(F) cons1862 = CustomConstraint(cons_f1862) def cons_f1863(G): return HyperbolicQ(G) cons1863 = CustomConstraint(cons_f1863) def cons_f1864(F): return MemberQ(List(Sinh, Cosh), F) cons1864 = CustomConstraint(cons_f1864) def cons_f1865(G): return MemberQ(List(Sech, Csch), G) cons1865 = CustomConstraint(cons_f1865) def cons_f1866(F, b, c, e): return NonzeroQ(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)) cons1866 = CustomConstraint(cons_f1866) def cons_f1867(F, b, c, e, n): return NonzeroQ(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)) cons1867 = CustomConstraint(cons_f1867) def cons_f1868(F, b, c, e, n): return ZeroQ(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(2))**S(2)) cons1868 = CustomConstraint(cons_f1868) def cons_f1869(F, b, c, e, n): return NonzeroQ(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(2))**S(2)) cons1869 = CustomConstraint(cons_f1869) def cons_f1870(F, b, c, e, n): return ZeroQ(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(-2))**S(2)) cons1870 = CustomConstraint(cons_f1870) def cons_f1871(F, b, c, e, n): return NonzeroQ(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(-2))**S(2)) cons1871 = CustomConstraint(cons_f1871) def cons_f1872(f, g): return ZeroQ(f**S(2) + g**S(2)) cons1872 = CustomConstraint(cons_f1872) def cons_f1873(h, i): return ZeroQ(h**S(2) + i**S(2)) cons1873 = CustomConstraint(cons_f1873) def cons_f1874(H): return HyperbolicQ(H) cons1874 = CustomConstraint(cons_f1874) def cons_f1875(b, n, p): return RationalQ(b, n, p) cons1875 = CustomConstraint(cons_f1875) def cons_f1876(b, n, p): return ZeroQ(b**S(2)*n**S(2)*(p + S(2))**S(2) + S(-1)) cons1876 = CustomConstraint(cons_f1876) def cons_f1877(b, n): return ZeroQ(b*n + S(-2)) cons1877 = CustomConstraint(cons_f1877) def cons_f1878(b, n, p): return ZeroQ(b**S(2)*n**S(2)*p**S(2) + S(-1)) cons1878 = CustomConstraint(cons_f1878) def cons_f1879(b, n): return NonzeroQ(b**S(2)*n**S(2) + S(-1)) cons1879 = CustomConstraint(cons_f1879) def cons_f1880(b, n, p): return NonzeroQ(b**S(2)*n**S(2)*p**S(2) + S(-1)) cons1880 = CustomConstraint(cons_f1880) def cons_f1881(b, n, p): return NonzeroQ(b**S(2)*n**S(2)*(p + S(2))**S(2) + S(-1)) cons1881 = CustomConstraint(cons_f1881) def cons_f1882(b, m, n, p): return ZeroQ(b**S(2)*n**S(2)*(p + S(2))**S(2) - (m + S(1))**S(2)) cons1882 = CustomConstraint(cons_f1882) def cons_f1883(b, m, n, p): return ZeroQ(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)) cons1883 = CustomConstraint(cons_f1883) def cons_f1884(b, m, n): return NonzeroQ(b**S(2)*n**S(2) - (m + S(1))**S(2)) cons1884 = CustomConstraint(cons_f1884) def cons_f1885(b, m, n, p): return NonzeroQ(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)) cons1885 = CustomConstraint(cons_f1885) def cons_f1886(b, m, n, p): return NonzeroQ(b**S(2)*n**S(2)*(p + S(2))**S(2) - (m + S(1))**S(2)) cons1886 = CustomConstraint(cons_f1886) def cons_f1887(b, n): return ZeroQ(b**S(2)*n**S(2) + S(-1)) cons1887 = CustomConstraint(cons_f1887) def cons_f1888(b, n, p): return ZeroQ(b**S(2)*n**S(2)*(p + S(-2))**S(2) + S(-1)) cons1888 = CustomConstraint(cons_f1888) def cons_f1889(b, n, p): return NonzeroQ(b**S(2)*n**S(2)*(p + S(-2))**S(2) + S(-1)) cons1889 = CustomConstraint(cons_f1889) def cons_f1890(b, m, n, p): return RationalQ(b, m, n, p) cons1890 = CustomConstraint(cons_f1890) def cons_f1891(b, m, n): return ZeroQ(b**S(2)*n**S(2) - (m + S(1))**S(2)) cons1891 = CustomConstraint(cons_f1891) def cons_f1892(b, m, n, p): return NonzeroQ(b**S(2)*n**S(2)*(p + S(-2))**S(2) - (m + S(1))**S(2)) cons1892 = CustomConstraint(cons_f1892) def cons_f1893(A, B, a, b): return ZeroQ(A*a + B*b) cons1893 = CustomConstraint(cons_f1893) def cons_f1894(c, d1, e1): return ZeroQ(-c*d1 + e1) cons1894 = CustomConstraint(cons_f1894) def cons_f1895(c, d2, e2): return ZeroQ(c*d2 + e2) cons1895 = CustomConstraint(cons_f1895) def cons_f1896(d1): return PositiveQ(d1) cons1896 = CustomConstraint(cons_f1896) def cons_f1897(d2): return NegativeQ(d2) cons1897 = CustomConstraint(cons_f1897) def cons_f1898(d1, d2): return Not(And(PositiveQ(d1), NegativeQ(d2))) cons1898 = CustomConstraint(cons_f1898) def cons_f1899(d1, d2): return And(PositiveQ(d1), NegativeQ(d2)) cons1899 = CustomConstraint(cons_f1899) def cons_f1900(c, d, e): return NonzeroQ(-c**S(2)*d + e) cons1900 = CustomConstraint(cons_f1900) def cons_f1901(a, b, c, d1, d2, e1, e2, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d1, e1, d2, e2, n, p), x) cons1901 = CustomConstraint(cons_f1901) def cons_f1902(c, f, g): return ZeroQ(c**S(2)*f**S(2) + g**S(2)) cons1902 = CustomConstraint(cons_f1902) def cons_f1903(d1, d2, p): return Not(Or(IntegerQ(p), And(PositiveQ(d1), NegativeQ(d2)))) cons1903 = CustomConstraint(cons_f1903) def cons_f1904(m): return NonzeroQ(m + S(3)) cons1904 = CustomConstraint(cons_f1904) def cons_f1905(a, b, c, d1, d2, e1, e2, f, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d1, e1, d2, e2, f, m, n, p), x) cons1905 = CustomConstraint(cons_f1905) def cons_f1906(c): return ZeroQ(c**S(2) + S(1)) cons1906 = CustomConstraint(cons_f1906) def cons_f1907(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1906(c, d, m): return FreeQ(List(c, d, m), x) _cons_1906 = CustomConstraint(_cons_f_1906) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1906) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1907 = CustomConstraint(cons_f1907) def cons_f1908(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1907(c, d, m): return FreeQ(List(c, d, m), x) _cons_1907 = CustomConstraint(_cons_f_1907) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1907) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1908 = CustomConstraint(cons_f1908) def cons_f1909(c, d, e): return ZeroQ(c**S(2)*d**S(2) - e**S(2)) cons1909 = CustomConstraint(cons_f1909) def cons_f1910(c, d, e): return PositiveQ(c*d/e + S(1)) cons1910 = CustomConstraint(cons_f1910) def cons_f1911(c, d, e): return NegativeQ(c*d/e + S(-1)) cons1911 = CustomConstraint(cons_f1911) def cons_f1912(c, u, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(u**S(2) - (S(1) - S(2)/(c*x + S(1)))**S(2)) cons1912 = CustomConstraint(cons_f1912) def cons_f1913(c, u, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ(u**S(2) - (S(1) - S(2)/(-c*x + S(1)))**S(2)) cons1913 = CustomConstraint(cons_f1913) def cons_f1914(c, u, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ((S(1) - u)**S(2) - (S(1) - S(2)/(c*x + S(1)))**S(2)) cons1914 = CustomConstraint(cons_f1914) def cons_f1915(c, u, x): if isinstance(x, (int, Integer, float, Float)): return False return ZeroQ((S(1) - u)**S(2) - (S(1) - S(2)/(-c*x + S(1)))**S(2)) cons1915 = CustomConstraint(cons_f1915) def cons_f1916(a, c, d, n): return Not(And(Equal(n, S(2)), ZeroQ(a**S(2)*c + d))) cons1916 = CustomConstraint(cons_f1916) def cons_f1917(c, f, g): return ZeroQ(c**S(2)*f + g) cons1917 = CustomConstraint(cons_f1917) def cons_f1918(a, c, d): return ZeroQ(a*c + d) cons1918 = CustomConstraint(cons_f1918) def cons_f1919(n, p): return Or(IntegerQ(p), ZeroQ(-n/S(2) + p), ZeroQ(-n/S(2) + p + S(-1))) cons1919 = CustomConstraint(cons_f1919) def cons_f1920(a, c, d): return ZeroQ(a**S(2)*c**S(2) - d**S(2)) cons1920 = CustomConstraint(cons_f1920) def cons_f1921(a, c, d): return ZeroQ(-a**S(2)*d**S(2) + c**S(2)) cons1921 = CustomConstraint(cons_f1921) def cons_f1922(a, c, d): return ZeroQ(a**S(2)*c + d) cons1922 = CustomConstraint(cons_f1922) def cons_f1923(n, p): return NonzeroQ(n**S(2) - S(4)*(p + S(1))**S(2)) cons1923 = CustomConstraint(cons_f1923) def cons_f1924(n): return Not(IntegerQ(n/S(2))) cons1924 = CustomConstraint(cons_f1924) def cons_f1925(n): return PositiveIntegerQ(n/S(2) + S(1)/2) cons1925 = CustomConstraint(cons_f1925) def cons_f1926(n, p): return Not(IntegerQ(-n/S(2) + p)) cons1926 = CustomConstraint(cons_f1926) def cons_f1927(n): return NegativeIntegerQ(n/S(2) + S(-1)/2) cons1927 = CustomConstraint(cons_f1927) def cons_f1928(n): return NegativeIntegerQ(n/S(2)) cons1928 = CustomConstraint(cons_f1928) def cons_f1929(n, p): return ZeroQ(n**S(2) + S(2)*p + S(2)) cons1929 = CustomConstraint(cons_f1929) def cons_f1930(a, c, d): return ZeroQ(a**S(2)*d + c) cons1930 = CustomConstraint(cons_f1930) def cons_f1931(a, b, c, e): return ZeroQ(b**S(2)*c + e*(S(1) - a**S(2))) cons1931 = CustomConstraint(cons_f1931) def cons_f1932(a, c, p): return Or(IntegerQ(p), PositiveQ(c/(S(1) - a**S(2)))) cons1932 = CustomConstraint(cons_f1932) def cons_f1933(a, c, p): return Not(Or(IntegerQ(p), PositiveQ(c/(S(1) - a**S(2))))) cons1933 = CustomConstraint(cons_f1933) def cons_f1934(n, p): return ZeroQ(-n/S(2) + p) cons1934 = CustomConstraint(cons_f1934) def cons_f1935(a, c, d): return ZeroQ(a*d + c) cons1935 = CustomConstraint(cons_f1935) def cons_f1936(m, n, p): return Or(IntegerQ(p), ZeroQ(-n/S(2) + p), ZeroQ(-n/S(2) + p + S(-1)), Less(S(-5), m, S(-1))) cons1936 = CustomConstraint(cons_f1936) def cons_f1937(n, p): return Or(IntegerQ(p), Not(IntegerQ(n))) cons1937 = CustomConstraint(cons_f1937) def cons_f1938(n, p): return NonzeroQ(n**S(2) + S(2)*p + S(2)) cons1938 = CustomConstraint(cons_f1938) def cons_f1939(n, p): return IntegersQ(S(2)*p, n/S(2) + p) cons1939 = CustomConstraint(cons_f1939) def cons_f1940(n, p): return Not(IntegersQ(S(2)*p, n/S(2) + p)) cons1940 = CustomConstraint(cons_f1940) def cons_f1941(b, c): return ZeroQ(b - c**S(2)) cons1941 = CustomConstraint(cons_f1941) def cons_f1942(v, x): if isinstance(x, (int, Integer, float, Float)): return False return PosQ(Discriminant(v, x)) cons1942 = CustomConstraint(cons_f1942) def cons_f1943(u, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1942(f, r, w): return FreeQ(f, x) _cons_1942 = CustomConstraint(_cons_f_1942) pat = Pattern(UtilityOperator(f_**w_*WC('r', S(1)), x), _cons_1942) result_matchq = is_match(UtilityOperator(u, x), pat) return result_matchq cons1943 = CustomConstraint(cons_f1943) def cons_f1944(u, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1943(f, r, w): return FreeQ(f, x) _cons_1943 = CustomConstraint(_cons_f_1943) pat = Pattern(UtilityOperator(f_**w_*WC('r', S(1)), x), _cons_1943) result_matchq = is_match(UtilityOperator(u, x), pat) return result_matchq cons1944 = CustomConstraint(cons_f1944) def cons_f1945(c, d): return ZeroQ((c - d)**S(2) + S(-1)) cons1945 = CustomConstraint(cons_f1945) def cons_f1946(c, d): return NonzeroQ((c - d)**S(2) + S(-1)) cons1946 = CustomConstraint(cons_f1946) def cons_f1947(c, d): return ZeroQ((c + I*d)**S(2) + S(-1)) cons1947 = CustomConstraint(cons_f1947) def cons_f1948(c, d): return ZeroQ((c - I*d)**S(2) + S(-1)) cons1948 = CustomConstraint(cons_f1948) def cons_f1949(c, d): return NonzeroQ((c + I*d)**S(2) + S(-1)) cons1949 = CustomConstraint(cons_f1949) def cons_f1950(c, d): return NonzeroQ((c - I*d)**S(2) + S(-1)) cons1950 = CustomConstraint(cons_f1950) def cons_f1951(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1950(c, d, m): return FreeQ(List(c, d, m), x) _cons_1950 = CustomConstraint(_cons_f_1950) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1950) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1951 = CustomConstraint(cons_f1951) def cons_f1952(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: return FalseQ(FunctionOfLinear(v*(a + b*atanh(u)), x)) except (TypeError, AttributeError): return False cons1952 = CustomConstraint(cons_f1952) def cons_f1953(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1952(c, d, m): return FreeQ(List(c, d, m), x) _cons_1952 = CustomConstraint(_cons_f_1952) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1952) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1953 = CustomConstraint(cons_f1953) def cons_f1954(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: return FalseQ(FunctionOfLinear(v*(a + b*acoth(u)), x)) except (TypeError, AttributeError): return False cons1954 = CustomConstraint(cons_f1954) def cons_f1955(a, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, p), x) cons1955 = CustomConstraint(cons_f1955) def cons_f1956(a, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, m, p), x) cons1956 = CustomConstraint(cons_f1956) def cons_f1957(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1956(c, d, m): return FreeQ(List(c, d, m), x) _cons_1956 = CustomConstraint(_cons_f_1956) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1956) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1957 = CustomConstraint(cons_f1957) def cons_f1958(v, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_1957(c, d, m): return FreeQ(List(c, d, m), x) _cons_1957 = CustomConstraint(_cons_f_1957) pat = Pattern(UtilityOperator((x*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x), _cons_1957) result_matchq = is_match(UtilityOperator(v, x), pat) return Not(result_matchq) cons1958 = CustomConstraint(cons_f1958) def cons_f1959(b, d): return ZeroQ(-b**S(2) + d) cons1959 = CustomConstraint(cons_f1959) def cons_f1960(b, d): return ZeroQ(b**S(2) + d) cons1960 = CustomConstraint(cons_f1960) def cons_f1961(m): return Or(Greater(m, S(0)), OddQ(m)) cons1961 = CustomConstraint(cons_f1961) def cons_f1962(m): return Or(And(Greater(m, S(0)), EvenQ(m)), Equal(Mod(m, S(4)), S(3))) cons1962 = CustomConstraint(cons_f1962) def cons_f1963(b, c): return ZeroQ(-Pi*b**S(2)/S(2) + c) cons1963 = CustomConstraint(cons_f1963) def cons_f1964(m): return Not(Equal(Mod(m, S(4)), S(2))) cons1964 = CustomConstraint(cons_f1964) def cons_f1965(m): return Equal(Mod(m, S(4)), S(0)) cons1965 = CustomConstraint(cons_f1965) def cons_f1966(m): return Not(Equal(Mod(m, S(4)), S(0))) cons1966 = CustomConstraint(cons_f1966) def cons_f1967(m): return Equal(Mod(m, S(4)), S(2)) cons1967 = CustomConstraint(cons_f1967) def cons_f1968(m, n): return Or(PositiveIntegerQ(m), NegativeIntegerQ(n), And(RationalQ(m, n), Greater(m, S(0)), Less(n, S(-1)))) cons1968 = CustomConstraint(cons_f1968) def cons_f1969(m, n): return Or(PositiveIntegerQ(n), And(RationalQ(m, n), Less(m, S(-1)), Greater(n, S(0)))) cons1969 = CustomConstraint(cons_f1969) def cons_f1970(n): return Not(And(IntegerQ(n), LessEqual(n, S(0)))) cons1970 = CustomConstraint(cons_f1970) def cons_f1971(m, n): return Or(PositiveIntegerQ(m), PositiveIntegerQ(n), IntegersQ(m, n)) cons1971 = CustomConstraint(cons_f1971) def cons_f1972(a, c): return ZeroQ(a - c + S(1)) cons1972 = CustomConstraint(cons_f1972) def cons_f1973(s): return NonzeroQ(s + S(-1)) cons1973 = CustomConstraint(cons_f1973) def cons_f1974(s): return NonzeroQ(s + S(-2)) cons1974 = CustomConstraint(cons_f1974) def cons_f1975(a, b, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, n, p, q), x) cons1975 = CustomConstraint(cons_f1975) def cons_f1976(r): return RationalQ(r) cons1976 = CustomConstraint(cons_f1976) def cons_f1977(r): return Greater(r, S(0)) cons1977 = CustomConstraint(cons_f1977) def cons_f1978(F, a, b, c, d, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(F, a, b, c, d, n, p), x) cons1978 = CustomConstraint(cons_f1978) def cons_f1979(n, p): return Or(ZeroQ(n*(p + S(-1)) + S(1)), And(IntegerQ(p + S(-1)/2), ZeroQ(n*(p + S(-1)/2) + S(1)))) cons1979 = CustomConstraint(cons_f1979) def cons_f1980(n, p): return Or(And(IntegerQ(p), ZeroQ(n*(p + S(1)) + S(1))), And(IntegerQ(p + S(-1)/2), ZeroQ(n*(p + S(1)/2) + S(1)))) cons1980 = CustomConstraint(cons_f1980) def cons_f1981(m, n, p): return Or(And(IntegerQ(p + S(-1)/2), IntegerQ(S(2)*(m + n*p + S(1))/n), Greater((m + n*p + S(1))/n, S(0))), And(Not(IntegerQ(p + S(-1)/2)), IntegerQ((m + n*p + S(1))/n), GreaterEqual((m + n*p + S(1))/n, S(0)))) cons1981 = CustomConstraint(cons_f1981) def cons_f1982(m, n, p): return Or(ZeroQ(m + S(1)), And(IntegerQ(p + S(-1)/2), IntegerQ(S(-1)/2 + (m + n*p + S(1))/n), Less((m + n*p + S(1))/n, S(0))), And(Not(IntegerQ(p + S(-1)/2)), IntegerQ((m + n*p + S(1))/n), Less((m + n*p + S(1))/n, S(0)))) cons1982 = CustomConstraint(cons_f1982) def cons_f1983(a, c, m, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, m), x) cons1983 = CustomConstraint(cons_f1983) def cons_f1984(a, b, c, d, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, c, d, p), x) cons1984 = CustomConstraint(cons_f1984) def cons_f1985(n, p): return ZeroQ(n*(p + S(-1)) + S(1)) cons1985 = CustomConstraint(cons_f1985) def cons_f1986(n, p): return ZeroQ(p + S(1)/n) cons1986 = CustomConstraint(cons_f1986) def cons_f1987(n, p): return ZeroQ(p + S(-1)/2 + S(1)/n) cons1987 = CustomConstraint(cons_f1987) def cons_f1988(c, n): return PosQ(c*n) cons1988 = CustomConstraint(cons_f1988) def cons_f1989(c, n): return NegQ(c*n) cons1989 = CustomConstraint(cons_f1989) def cons_f1990(n, p): return Greater(n*(p + S(-1)) + S(1), S(0)) cons1990 = CustomConstraint(cons_f1990) def cons_f1991(n, p): return Less(n*p + S(1), S(0)) cons1991 = CustomConstraint(cons_f1991) def cons_f1992(a, d, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, d), x) cons1992 = CustomConstraint(cons_f1992) def cons_f1993(a, d, n, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, d, n), x) cons1993 = CustomConstraint(cons_f1993) def cons_f1994(a, c, d, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, c, d, n, p), x) cons1994 = CustomConstraint(cons_f1994) def cons_f1995(m, n, p): return ZeroQ(m + n*(p + S(-1)) + S(1)) cons1995 = CustomConstraint(cons_f1995) def cons_f1996(m, n, p): return ZeroQ(m + n*p + S(1)) cons1996 = CustomConstraint(cons_f1996) def cons_f1997(m, n, p): return ZeroQ(m + n*(p + S(-1)/2) + S(1)) cons1997 = CustomConstraint(cons_f1997) def cons_f1998(c, p): return PosQ(c/(p + S(-1)/2)) cons1998 = CustomConstraint(cons_f1998) def cons_f1999(c, p): return NegQ(c/(p + S(-1)/2)) cons1999 = CustomConstraint(cons_f1999) def cons_f2000(m, n, p): return RationalQ((m + n*p + S(1))/n) cons2000 = CustomConstraint(cons_f2000) def cons_f2001(m, n, p): return Greater((m + n*p + S(1))/n, S(1)) cons2001 = CustomConstraint(cons_f2001) def cons_f2002(m, n, p): return Less((m + n*p + S(1))/n, S(0)) cons2002 = CustomConstraint(cons_f2002) def cons_f2003(u, x): if isinstance(x, (int, Integer, float, Float)): return False return FunctionOfQ(ProductLog(x), u, x) cons2003 = CustomConstraint(cons_f2003) def cons_f2004(n, u, x): if isinstance(x, (int, Integer, float, Float)): return False def _cons_f_2003(n1, v): return ZeroQ(n - n1 - 1) _cons_2003 = CustomConstraint(_cons_f_2003) pat = Pattern(UtilityOperator(x**WC('n1', S(1))*WC('v', S(1)), x), _cons_2003) result_matchq = is_match(UtilityOperator(u, x), pat) return Not(result_matchq) cons2004 = CustomConstraint(cons_f2004) def cons_f2005(e, g): return ZeroQ(e + g) cons2005 = CustomConstraint(cons_f2005) def cons_f2006(d, f): return ZeroQ(d + f + S(-2)) cons2006 = CustomConstraint(cons_f2006) def cons_f2007(A, C, d, e, f): return ZeroQ(A*e**S(2) + C*d*f) cons2007 = CustomConstraint(cons_f2007) def cons_f2008(B, C, d, e): return ZeroQ(-B*e + S(2)*C*(d + S(-1))) cons2008 = CustomConstraint(cons_f2008) def cons_f2009(A, C, e): return ZeroQ(A*e**S(2) + C) cons2009 = CustomConstraint(cons_f2009) def cons_f2010(n): return Not(PositiveQ(n)) cons2010 = CustomConstraint(cons_f2010) def cons_f2011(v, y): return ZeroQ(-v + y) cons2011 = CustomConstraint(cons_f2011) def cons_f2012(w, y): return ZeroQ(-w + y) cons2012 = CustomConstraint(cons_f2012) def cons_f2013(y, z): return ZeroQ(y - z) cons2013 = CustomConstraint(cons_f2013) def cons_f2014(a, b, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False return FreeQ(List(a, b, m, n, p), x) cons2014 = CustomConstraint(cons_f2014) def cons_f2015(v, w): return ZeroQ(-v + w) cons2015 = CustomConstraint(cons_f2015) def cons_f2016(p, q, r): return ZeroQ(p - q*(r + S(1))) cons2016 = CustomConstraint(cons_f2016) def cons_f2017(r): return NonzeroQ(r + S(1)) cons2017 = CustomConstraint(cons_f2017) def cons_f2018(p, r): return IntegerQ(p/(r + S(1))) cons2018 = CustomConstraint(cons_f2018) def cons_f2019(p, q, r, s): return ZeroQ(p*(s + S(1)) - q*(r + S(1))) cons2019 = CustomConstraint(cons_f2019) def cons_f2020(m, p, q): return ZeroQ(p + q*(m*p + S(1))) cons2020 = CustomConstraint(cons_f2020) def cons_f2021(m, p, q, r): return ZeroQ(p + q*(m*p + r + S(1))) cons2021 = CustomConstraint(cons_f2021) def cons_f2022(m, p, q, s): return ZeroQ(p*(s + S(1)) + q*(m*p + S(1))) cons2022 = CustomConstraint(cons_f2022) def cons_f2023(s): return NonzeroQ(s + S(1)) cons2023 = CustomConstraint(cons_f2023) def cons_f2024(q, s): return IntegerQ(q/(s + S(1))) cons2024 = CustomConstraint(cons_f2024) def cons_f2025(m, p, q, r, s): return ZeroQ(p*(s + S(1)) + q*(m*p + r + S(1))) cons2025 = CustomConstraint(cons_f2025) def cons_f2026(m, u, x): if isinstance(x, (int, Integer, float, Float)): return False return FunctionOfQ(x**(m + S(1)), u, x) cons2026 = CustomConstraint(cons_f2026) def cons_f2027(w, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(FreeQ(w, x)) cons2027 = CustomConstraint(cons_f2027) def cons_f2028(x, z): if isinstance(x, (int, Integer, float, Float)): return False return Not(FreeQ(z, x)) cons2028 = CustomConstraint(cons_f2028) def cons_f2029(a, m): return Not(And(EqQ(a, S(1)), EqQ(m, S(1)))) cons2029 = CustomConstraint(cons_f2029) def cons_f2030(m, v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(And(EqQ(v, x), EqQ(m, S(1)))) cons2030 = CustomConstraint(cons_f2030) def cons_f2031(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(RationalFunctionQ(u, x)) cons2031 = CustomConstraint(cons_f2031) def cons_f2032(v, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(LinearQ(v, x)) cons2032 = CustomConstraint(cons_f2032) def cons_f2033(r, s): return PosQ(-r + s) cons2033 = CustomConstraint(cons_f2033) def cons_f2034(u, x): if isinstance(x, (int, Integer, float, Float)): return False return Not(AlgebraicFunctionQ(u, x)) cons2034 = CustomConstraint(cons_f2034) def cons_f2035(m, u, x): if isinstance(x, (int, Integer, float, Float)): return False return Or(Greater(m, S(0)), Not(AlgebraicFunctionQ(u, x))) cons2035 = CustomConstraint(cons_f2035) def cons_f2036(u, x): if isinstance(x, (int, Integer, float, Float)): return False return EulerIntegrandQ(u, x) cons2036 = CustomConstraint(cons_f2036) def cons_f2037(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False return PolynomialInQ(v, u, x) cons2037 = CustomConstraint(cons_f2037) def cons_f2038(a, d): return ZeroQ(a + d) cons2038 = CustomConstraint(cons_f2038) def cons_f2039(p, q): return ZeroQ(p + q) cons2039 = CustomConstraint(cons_f2039)
cdc3c9da7ec362df4ab2001edfcb7482adc0440a5495bfa405a84b4e1b9172af
from sympy.core.numbers import E from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import log from sympy.functions.elementary.miscellaneous import sqrt from sympy.geometry.curve import Curve from sympy.integrals.integrals import line_integrate s, t, x, y, z = symbols('s,t,x,y,z') def test_lineintegral(): c = Curve([E**t + 1, E**t - 1], (t, 0, log(2))) assert line_integrate(x + y, c, [x, y]) == 3*sqrt(2)
8af1634be5a52d0e1a32a8d54bb67330284fd8c9b0fc950f9f023da2d88b9efb
from sympy.core.function import Function from sympy.core.numbers import (Rational, pi) from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.trigonometric import (cos, sin) from sympy.functions.special.delta_functions import (DiracDelta, Heaviside) from sympy.integrals.deltafunctions import change_mul, deltaintegrate f = Function("f") x_1, x_2, x, y, z = symbols("x_1 x_2 x y z") def test_change_mul(): assert change_mul(x, x) == (None, None) assert change_mul(x*y, x) == (None, None) assert change_mul(x*y*DiracDelta(x), x) == (DiracDelta(x), x*y) assert change_mul(x*y*DiracDelta(x)*DiracDelta(y), x) == \ (DiracDelta(x), x*y*DiracDelta(y)) assert change_mul(DiracDelta(x)**2, x) == \ (DiracDelta(x), DiracDelta(x)) assert change_mul(y*DiracDelta(x)**2, x) == \ (DiracDelta(x), y*DiracDelta(x)) def test_deltaintegrate(): assert deltaintegrate(x, x) is None assert deltaintegrate(x + DiracDelta(x), x) is None assert deltaintegrate(DiracDelta(x, 0), x) == Heaviside(x) for n in range(10): assert deltaintegrate(DiracDelta(x, n + 1), x) == DiracDelta(x, n) assert deltaintegrate(DiracDelta(x), x) == Heaviside(x) assert deltaintegrate(DiracDelta(-x), x) == Heaviside(x) assert deltaintegrate(DiracDelta(x - y), x) == Heaviside(x - y) assert deltaintegrate(DiracDelta(y - x), x) == Heaviside(x - y) assert deltaintegrate(x*DiracDelta(x), x) == 0 assert deltaintegrate((x - y)*DiracDelta(x - y), x) == 0 assert deltaintegrate(DiracDelta(x)**2, x) == DiracDelta(0)*Heaviside(x) assert deltaintegrate(y*DiracDelta(x)**2, x) == \ y*DiracDelta(0)*Heaviside(x) assert deltaintegrate(DiracDelta(x, 1), x) == DiracDelta(x, 0) assert deltaintegrate(y*DiracDelta(x, 1), x) == y*DiracDelta(x, 0) assert deltaintegrate(DiracDelta(x, 1)**2, x) == -DiracDelta(0, 2)*Heaviside(x) assert deltaintegrate(y*DiracDelta(x, 1)**2, x) == -y*DiracDelta(0, 2)*Heaviside(x) assert deltaintegrate(DiracDelta(x) * f(x), x) == f(0) * Heaviside(x) assert deltaintegrate(DiracDelta(-x) * f(x), x) == f(0) * Heaviside(x) assert deltaintegrate(DiracDelta(x - 1) * f(x), x) == f(1) * Heaviside(x - 1) assert deltaintegrate(DiracDelta(1 - x) * f(x), x) == f(1) * Heaviside(x - 1) assert deltaintegrate(DiracDelta(x**2 + x - 2), x) == \ Heaviside(x - 1)/3 + Heaviside(x + 2)/3 p = cos(x)*(DiracDelta(x) + DiracDelta(x**2 - 1))*sin(x)*(x - pi) assert deltaintegrate(p, x) - (-pi*(cos(1)*Heaviside(-1 + x)*sin(1)/2 - \ cos(1)*Heaviside(1 + x)*sin(1)/2) + \ cos(1)*Heaviside(1 + x)*sin(1)/2 + \ cos(1)*Heaviside(-1 + x)*sin(1)/2) == 0 p = x_2*DiracDelta(x - x_2)*DiracDelta(x_2 - x_1) assert deltaintegrate(p, x_2) == x*DiracDelta(x - x_1)*Heaviside(x_2 - x) p = x*y**2*z*DiracDelta(y - x)*DiracDelta(y - z)*DiracDelta(x - z) assert deltaintegrate(p, y) == x**3*z*DiracDelta(x - z)**2*Heaviside(y - x) assert deltaintegrate((x + 1)*DiracDelta(2*x), x) == S.Half * Heaviside(x) assert deltaintegrate((x + 1)*DiracDelta(x*Rational(2, 3) + Rational(4, 9)), x) == \ S.Half * Heaviside(x + Rational(2, 3)) a, b, c = symbols('a b c', commutative=False) assert deltaintegrate(DiracDelta(x - y)*f(x - b)*f(x - a), x) == \ f(y - b)*f(y - a)*Heaviside(x - y) p = f(x - a)*DiracDelta(x - y)*f(x - c)*f(x - b) assert deltaintegrate(p, x) == f(y - a)*f(y - c)*f(y - b)*Heaviside(x - y) p = DiracDelta(x - z)*f(x - b)*f(x - a)*DiracDelta(x - y) assert deltaintegrate(p, x) == DiracDelta(y - z)*f(y - b)*f(y - a) * \ Heaviside(x - y)
e1ddef26ea5afa144de3234321263c202deb488fdc656e416edc68666d78cbe6
"""Most of these tests come from the examples in Bronstein's book.""" from sympy.core.numbers import (I, Rational, oo) from sympy.core.symbol import symbols from sympy.polys.polytools import Poly from sympy.integrals.risch import (DifferentialExtension, NonElementaryIntegralException) from sympy.integrals.rde import (order_at, order_at_oo, weak_normalizer, normal_denom, special_denom, bound_degree, spde, solve_poly_rde, no_cancel_equal, cancel_primitive, cancel_exp, rischDE) from sympy.testing.pytest import raises from sympy.abc import x, t, z, n t0, t1, t2, k = symbols('t:3 k') def test_order_at(): a = Poly(t**4, t) b = Poly((t**2 + 1)**3*t, t) c = Poly((t**2 + 1)**6*t, t) d = Poly((t**2 + 1)**10*t**10, t) e = Poly((t**2 + 1)**100*t**37, t) p1 = Poly(t, t) p2 = Poly(1 + t**2, t) assert order_at(a, p1, t) == 4 assert order_at(b, p1, t) == 1 assert order_at(c, p1, t) == 1 assert order_at(d, p1, t) == 10 assert order_at(e, p1, t) == 37 assert order_at(a, p2, t) == 0 assert order_at(b, p2, t) == 3 assert order_at(c, p2, t) == 6 assert order_at(d, p1, t) == 10 assert order_at(e, p2, t) == 100 assert order_at(Poly(0, t), Poly(t, t), t) is oo assert order_at_oo(Poly(t**2 - 1, t), Poly(t + 1), t) == \ order_at_oo(Poly(t - 1, t), Poly(1, t), t) == -1 assert order_at_oo(Poly(0, t), Poly(1, t), t) is oo def test_weak_normalizer(): a = Poly((1 + x)*t**5 + 4*t**4 + (-1 - 3*x)*t**3 - 4*t**2 + (-2 + 2*x)*t, t) d = Poly(t**4 - 3*t**2 + 2, t) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) r = weak_normalizer(a, d, DE, z) assert r == (Poly(t**5 - t**4 - 4*t**3 + 4*t**2 + 4*t - 4, t, domain='ZZ[x]'), (Poly((1 + x)*t**2 + x*t, t, domain='ZZ[x]'), Poly(t + 1, t, domain='ZZ[x]'))) assert weak_normalizer(r[1][0], r[1][1], DE) == (Poly(1, t), r[1]) r = weak_normalizer(Poly(1 + t**2), Poly(t**2 - 1, t), DE, z) assert r == (Poly(t**4 - 2*t**2 + 1, t), (Poly(-3*t**2 + 1, t), Poly(t**2 - 1, t))) assert weak_normalizer(r[1][0], r[1][1], DE, z) == (Poly(1, t), r[1]) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1 + t**2)]}) r = weak_normalizer(Poly(1 + t**2), Poly(t, t), DE, z) assert r == (Poly(t, t), (Poly(0, t), Poly(1, t))) assert weak_normalizer(r[1][0], r[1][1], DE, z) == (Poly(1, t), r[1]) def test_normal_denom(): DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) raises(NonElementaryIntegralException, lambda: normal_denom(Poly(1, x), Poly(1, x), Poly(1, x), Poly(x, x), DE)) fa, fd = Poly(t**2 + 1, t), Poly(1, t) ga, gd = Poly(1, t), Poly(t**2, t) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert normal_denom(fa, fd, ga, gd, DE) == \ (Poly(t, t), (Poly(t**3 - t**2 + t - 1, t), Poly(1, t)), (Poly(1, t), Poly(1, t)), Poly(t, t)) def test_special_denom(): # TODO: add more tests here DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert special_denom(Poly(1, t), Poly(t**2, t), Poly(1, t), Poly(t**2 - 1, t), Poly(t, t), DE) == \ (Poly(1, t), Poly(t**2 - 1, t), Poly(t**2 - 1, t), Poly(t, t)) # assert special_denom(Poly(1, t), Poly(2*x, t), Poly((1 + 2*x)*t, t), DE) == 1 # issue 3940 # Note, this isn't a very good test, because the denominator is just 1, # but at least it tests the exp cancellation case DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-2*x*t0, t0), Poly(I*k*t1, t1)]}) DE.decrement_level() assert special_denom(Poly(1, t0), Poly(I*k, t0), Poly(1, t0), Poly(t0, t0), Poly(1, t0), DE) == \ (Poly(1, t0, domain='ZZ'), Poly(I*k, t0, domain='ZZ_I[k,x]'), Poly(t0, t0, domain='ZZ'), Poly(1, t0, domain='ZZ')) assert special_denom(Poly(1, t), Poly(t**2, t), Poly(1, t), Poly(t**2 - 1, t), Poly(t, t), DE, case='tan') == \ (Poly(1, t, t0, domain='ZZ'), Poly(t**2, t0, t, domain='ZZ[x]'), Poly(t, t, t0, domain='ZZ'), Poly(1, t0, domain='ZZ')) raises(ValueError, lambda: special_denom(Poly(1, t), Poly(t**2, t), Poly(1, t), Poly(t**2 - 1, t), Poly(t, t), DE, case='unrecognized_case')) def test_bound_degree_fail(): # Primitive DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t0/x**2, t0), Poly(1/x, t)]}) assert bound_degree(Poly(t**2, t), Poly(-(1/x**2*t**2 + 1/x), t), Poly((2*x - 1)*t**4 + (t0 + x)/x*t**3 - (t0 + 4*x**2)/2*x*t**2 + x*t, t), DE) == 3 def test_bound_degree(): # Base DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) assert bound_degree(Poly(1, x), Poly(-2*x, x), Poly(1, x), DE) == 0 # Primitive (see above test_bound_degree_fail) # TODO: Add test for when the degree bound becomes larger after limited_integrate # TODO: Add test for db == da - 1 case # Exp # TODO: Add tests # TODO: Add test for when the degree becomes larger after parametric_log_deriv() # Nonlinear DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert bound_degree(Poly(t, t), Poly((t - 1)*(t**2 + 1), t), Poly(1, t), DE) == 0 def test_spde(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) raises(NonElementaryIntegralException, lambda: spde(Poly(t, t), Poly((t - 1)*(t**2 + 1), t), Poly(1, t), 0, DE)) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert spde(Poly(t**2 + x*t*2 + x**2, t), Poly(t**2/x**2 + (2/x - 1)*t, t), Poly(t**2/x**2 + (2/x - 1)*t, t), 0, DE) == \ (Poly(0, t), Poly(0, t), 0, Poly(0, t), Poly(1, t, domain='ZZ(x)')) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t0/x**2, t0), Poly(1/x, t)]}) assert spde(Poly(t**2, t), Poly(-t**2/x**2 - 1/x, t), Poly((2*x - 1)*t**4 + (t0 + x)/x*t**3 - (t0 + 4*x**2)/(2*x)*t**2 + x*t, t), 3, DE) == \ (Poly(0, t), Poly(0, t), 0, Poly(0, t), Poly(t0*t**2/2 + x**2*t**2 - x**2*t, t, domain='ZZ(x,t0)')) DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) assert spde(Poly(x**2 + x + 1, x), Poly(-2*x - 1, x), Poly(x**5/2 + 3*x**4/4 + x**3 - x**2 + 1, x), 4, DE) == \ (Poly(0, x, domain='QQ'), Poly(x/2 - Rational(1, 4), x), 2, Poly(x**2 + x + 1, x), Poly(x*Rational(5, 4), x)) assert spde(Poly(x**2 + x + 1, x), Poly(-2*x - 1, x), Poly(x**5/2 + 3*x**4/4 + x**3 - x**2 + 1, x), n, DE) == \ (Poly(0, x, domain='QQ'), Poly(x/2 - Rational(1, 4), x), -2 + n, Poly(x**2 + x + 1, x), Poly(x*Rational(5, 4), x)) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1, t)]}) raises(NonElementaryIntegralException, lambda: spde(Poly((t - 1)*(t**2 + 1)**2, t), Poly((t - 1)*(t**2 + 1), t), Poly(1, t), 0, DE)) DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) assert spde(Poly(x**2 - x, x), Poly(1, x), Poly(9*x**4 - 10*x**3 + 2*x**2, x), 4, DE) == \ (Poly(0, x, domain='ZZ'), Poly(0, x), 0, Poly(0, x), Poly(3*x**3 - 2*x**2, x, domain='QQ')) assert spde(Poly(x**2 - x, x), Poly(x**2 - 5*x + 3, x), Poly(x**7 - x**6 - 2*x**4 + 3*x**3 - x**2, x), 5, DE) == \ (Poly(1, x, domain='QQ'), Poly(x + 1, x, domain='QQ'), 1, Poly(x**4 - x**3, x), Poly(x**3 - x**2, x, domain='QQ')) def test_solve_poly_rde_no_cancel(): # deg(b) large DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1 + t**2, t)]}) assert solve_poly_rde(Poly(t**2 + 1, t), Poly(t**3 + (x + 1)*t**2 + t + x + 2, t), oo, DE) == Poly(t + x, t) # deg(b) small DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) assert solve_poly_rde(Poly(0, x), Poly(x/2 - Rational(1, 4), x), oo, DE) == \ Poly(x**2/4 - x/4, x) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert solve_poly_rde(Poly(2, t), Poly(t**2 + 2*t + 3, t), 1, DE) == \ Poly(t + 1, t, x) # deg(b) == deg(D) - 1 DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert no_cancel_equal(Poly(1 - t, t), Poly(t**3 + t**2 - 2*x*t - 2*x, t), oo, DE) == \ (Poly(t**2, t), 1, Poly((-2 - 2*x)*t - 2*x, t)) def test_solve_poly_rde_cancel(): # exp DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert cancel_exp(Poly(2*x, t), Poly(2*x, t), 0, DE) == \ Poly(1, t) assert cancel_exp(Poly(2*x, t), Poly((1 + 2*x)*t, t), 1, DE) == \ Poly(t, t) # TODO: Add more exp tests, including tests that require is_deriv_in_field() # primitive DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) # If the DecrementLevel context manager is working correctly, this shouldn't # cause any problems with the further tests. raises(NonElementaryIntegralException, lambda: cancel_primitive(Poly(1, t), Poly(t, t), oo, DE)) assert cancel_primitive(Poly(1, t), Poly(t + 1/x, t), 2, DE) == \ Poly(t, t) assert cancel_primitive(Poly(4*x, t), Poly(4*x*t**2 + 2*t/x, t), 3, DE) == \ Poly(t**2, t) # TODO: Add more primitive tests, including tests that require is_deriv_in_field() def test_rischDE(): # TODO: Add more tests for rischDE, including ones from the text DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) DE.decrement_level() assert rischDE(Poly(-2*x, x), Poly(1, x), Poly(1 - 2*x - 2*x**2, x), Poly(1, x), DE) == \ (Poly(x + 1, x), Poly(1, x))
91a631b983ebb4b442bf053ad670c32d4c495c8e6ec68b6bac74fd73c9f129e3
from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.core import S, Rational from sympy.integrals.intpoly import (decompose, best_origin, distance_to_side, polytope_integrate, point_sort, hyperplane_parameters, main_integrate3d, main_integrate, polygon_integrate, lineseg_integrate, integration_reduction, integration_reduction_dynamic, is_vertex) from sympy.geometry.line import Segment2D from sympy.geometry.polygon import Polygon from sympy.geometry.point import Point, Point2D from sympy.abc import x, y, z from sympy.testing.pytest import slow def test_decompose(): assert decompose(x) == {1: x} assert decompose(x**2) == {2: x**2} assert decompose(x*y) == {2: x*y} assert decompose(x + y) == {1: x + y} assert decompose(x**2 + y) == {1: y, 2: x**2} assert decompose(8*x**2 + 4*y + 7) == {0: 7, 1: 4*y, 2: 8*x**2} assert decompose(x**2 + 3*y*x) == {2: x**2 + 3*x*y} assert decompose(9*x**2 + y + 4*x + x**3 + y**2*x + 3) ==\ {0: 3, 1: 4*x + y, 2: 9*x**2, 3: x**3 + x*y**2} assert decompose(x, True) == {x} assert decompose(x ** 2, True) == {x**2} assert decompose(x * y, True) == {x * y} assert decompose(x + y, True) == {x, y} assert decompose(x ** 2 + y, True) == {y, x ** 2} assert decompose(8 * x ** 2 + 4 * y + 7, True) == {7, 4*y, 8*x**2} assert decompose(x ** 2 + 3 * y * x, True) == {x ** 2, 3 * x * y} assert decompose(9 * x ** 2 + y + 4 * x + x ** 3 + y ** 2 * x + 3, True) == \ {3, y, 4*x, 9*x**2, x*y**2, x**3} def test_best_origin(): expr1 = y ** 2 * x ** 5 + y ** 5 * x ** 7 + 7 * x + x ** 12 + y ** 7 * x l1 = Segment2D(Point(0, 3), Point(1, 1)) l2 = Segment2D(Point(S(3) / 2, 0), Point(S(3) / 2, 3)) l3 = Segment2D(Point(0, S(3) / 2), Point(3, S(3) / 2)) l4 = Segment2D(Point(0, 2), Point(2, 0)) l5 = Segment2D(Point(0, 2), Point(1, 1)) l6 = Segment2D(Point(2, 0), Point(1, 1)) assert best_origin((2, 1), 3, l1, expr1) == (0, 3) assert best_origin((2, 0), 3, l2, x ** 7) == (S(3) / 2, 0) assert best_origin((0, 2), 3, l3, x ** 7) == (0, S(3) / 2) assert best_origin((1, 1), 2, l4, x ** 7 * y ** 3) == (0, 2) assert best_origin((1, 1), 2, l4, x ** 3 * y ** 7) == (2, 0) assert best_origin((1, 1), 2, l5, x ** 2 * y ** 9) == (0, 2) assert best_origin((1, 1), 2, l6, x ** 9 * y ** 2) == (2, 0) @slow def test_polytope_integrate(): # Convex 2-Polytopes # Vertex representation assert polytope_integrate(Polygon(Point(0, 0), Point(0, 2), Point(4, 0)), 1) == 4 assert polytope_integrate(Polygon(Point(0, 0), Point(0, 1), Point(1, 1), Point(1, 0)), x * y) ==\ Rational(1, 4) assert polytope_integrate(Polygon(Point(0, 3), Point(5, 3), Point(1, 1)), 6*x**2 - 40*y) == Rational(-935, 3) assert polytope_integrate(Polygon(Point(0, 0), Point(0, sqrt(3)), Point(sqrt(3), sqrt(3)), Point(sqrt(3), 0)), 1) == 3 hexagon = Polygon(Point(0, 0), Point(-sqrt(3) / 2, S.Half), Point(-sqrt(3) / 2, S(3) / 2), Point(0, 2), Point(sqrt(3) / 2, S(3) / 2), Point(sqrt(3) / 2, S.Half)) assert polytope_integrate(hexagon, 1) == S(3*sqrt(3)) / 2 # Hyperplane representation assert polytope_integrate([((-1, 0), 0), ((1, 2), 4), ((0, -1), 0)], 1) == 4 assert polytope_integrate([((-1, 0), 0), ((0, 1), 1), ((1, 0), 1), ((0, -1), 0)], x * y) == Rational(1, 4) assert polytope_integrate([((0, 1), 3), ((1, -2), -1), ((-2, -1), -3)], 6*x**2 - 40*y) == Rational(-935, 3) assert polytope_integrate([((-1, 0), 0), ((0, sqrt(3)), 3), ((sqrt(3), 0), 3), ((0, -1), 0)], 1) == 3 hexagon = [((Rational(-1, 2), -sqrt(3) / 2), 0), ((-1, 0), sqrt(3) / 2), ((Rational(-1, 2), sqrt(3) / 2), sqrt(3)), ((S.Half, sqrt(3) / 2), sqrt(3)), ((1, 0), sqrt(3) / 2), ((S.Half, -sqrt(3) / 2), 0)] assert polytope_integrate(hexagon, 1) == S(3*sqrt(3)) / 2 # Non-convex polytopes # Vertex representation assert polytope_integrate(Polygon(Point(-1, -1), Point(-1, 1), Point(1, 1), Point(0, 0), Point(1, -1)), 1) == 3 assert polytope_integrate(Polygon(Point(-1, -1), Point(-1, 1), Point(0, 0), Point(1, 1), Point(1, -1), Point(0, 0)), 1) == 2 # Hyperplane representation assert polytope_integrate([((-1, 0), 1), ((0, 1), 1), ((1, -1), 0), ((1, 1), 0), ((0, -1), 1)], 1) == 3 assert polytope_integrate([((-1, 0), 1), ((1, 1), 0), ((-1, 1), 0), ((1, 0), 1), ((-1, -1), 0), ((1, -1), 0)], 1) == 2 # Tests for 2D polytopes mentioned in Chin et al(Page 10): # http://dilbert.engr.ucdavis.edu/~suku/quadrature/cls-integration.pdf fig1 = Polygon(Point(1.220, -0.827), Point(-1.490, -4.503), Point(-3.766, -1.622), Point(-4.240, -0.091), Point(-3.160, 4), Point(-0.981, 4.447), Point(0.132, 4.027)) assert polytope_integrate(fig1, x**2 + x*y + y**2) ==\ S(2031627344735367)/(8*10**12) fig2 = Polygon(Point(4.561, 2.317), Point(1.491, -1.315), Point(-3.310, -3.164), Point(-4.845, -3.110), Point(-4.569, 1.867)) assert polytope_integrate(fig2, x**2 + x*y + y**2) ==\ S(517091313866043)/(16*10**11) fig3 = Polygon(Point(-2.740, -1.888), Point(-3.292, 4.233), Point(-2.723, -0.697), Point(-0.643, -3.151)) assert polytope_integrate(fig3, x**2 + x*y + y**2) ==\ S(147449361647041)/(8*10**12) fig4 = Polygon(Point(0.211, -4.622), Point(-2.684, 3.851), Point(0.468, 4.879), Point(4.630, -1.325), Point(-0.411, -1.044)) assert polytope_integrate(fig4, x**2 + x*y + y**2) ==\ S(180742845225803)/(10**12) # Tests for many polynomials with maximum degree given(2D case). tri = Polygon(Point(0, 3), Point(5, 3), Point(1, 1)) polys = [] expr1 = x**9*y + x**7*y**3 + 2*x**2*y**8 expr2 = x**6*y**4 + x**5*y**5 + 2*y**10 expr3 = x**10 + x**9*y + x**8*y**2 + x**5*y**5 polys.extend((expr1, expr2, expr3)) result_dict = polytope_integrate(tri, polys, max_degree=10) assert result_dict[expr1] == Rational(615780107, 594) assert result_dict[expr2] == Rational(13062161, 27) assert result_dict[expr3] == Rational(1946257153, 924) # Tests when all integral of all monomials up to a max_degree is to be # calculated. assert polytope_integrate(Polygon(Point(0, 0), Point(0, 1), Point(1, 1), Point(1, 0)), max_degree=4) == {0: 0, 1: 1, x: S.Half, x ** 2 * y ** 2: S.One / 9, x ** 4: S.One / 5, y ** 4: S.One / 5, y: S.Half, x * y ** 2: S.One / 6, y ** 2: S.One / 3, x ** 3: S.One / 4, x ** 2 * y: S.One / 6, x ** 3 * y: S.One / 8, x * y: S.One / 4, y ** 3: S.One / 4, x ** 2: S.One / 3, x * y ** 3: S.One / 8} # Tests for 3D polytopes cube1 = [[(0, 0, 0), (0, 6, 6), (6, 6, 6), (3, 6, 0), (0, 6, 0), (6, 0, 6), (3, 0, 0), (0, 0, 6)], [1, 2, 3, 4], [3, 2, 5, 6], [1, 7, 5, 2], [0, 6, 5, 7], [1, 4, 0, 7], [0, 4, 3, 6]] assert polytope_integrate(cube1, 1) == S(162) # 3D Test cases in Chin et al(2015) cube2 = [[(0, 0, 0), (0, 0, 5), (0, 5, 0), (0, 5, 5), (5, 0, 0), (5, 0, 5), (5, 5, 0), (5, 5, 5)], [3, 7, 6, 2], [1, 5, 7, 3], [5, 4, 6, 7], [0, 4, 5, 1], [2, 0, 1, 3], [2, 6, 4, 0]] cube3 = [[(0, 0, 0), (5, 0, 0), (5, 4, 0), (3, 2, 0), (3, 5, 0), (0, 5, 0), (0, 0, 5), (5, 0, 5), (5, 4, 5), (3, 2, 5), (3, 5, 5), (0, 5, 5)], [6, 11, 5, 0], [1, 7, 6, 0], [5, 4, 3, 2, 1, 0], [11, 10, 4, 5], [10, 9, 3, 4], [9, 8, 2, 3], [8, 7, 1, 2], [7, 8, 9, 10, 11, 6]] cube4 = [[(0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1), (S.One / 4, S.One / 4, S.One / 4)], [0, 2, 1], [1, 3, 0], [4, 2, 3], [4, 3, 1], [0, 1, 2], [2, 4, 1], [0, 3, 2]] assert polytope_integrate(cube2, x ** 2 + y ** 2 + x * y + z ** 2) ==\ Rational(15625, 4) assert polytope_integrate(cube3, x ** 2 + y ** 2 + x * y + z ** 2) ==\ S(33835) / 12 assert polytope_integrate(cube4, x ** 2 + y ** 2 + x * y + z ** 2) ==\ S(37) / 960 # Test cases from Mathematica's PolyhedronData library octahedron = [[(S.NegativeOne / sqrt(2), 0, 0), (0, S.One / sqrt(2), 0), (0, 0, S.NegativeOne / sqrt(2)), (0, 0, S.One / sqrt(2)), (0, S.NegativeOne / sqrt(2), 0), (S.One / sqrt(2), 0, 0)], [3, 4, 5], [3, 5, 1], [3, 1, 0], [3, 0, 4], [4, 0, 2], [4, 2, 5], [2, 0, 1], [5, 2, 1]] assert polytope_integrate(octahedron, 1) == sqrt(2) / 3 great_stellated_dodecahedron =\ [[(-0.32491969623290634095, 0, 0.42532540417601993887), (0.32491969623290634095, 0, -0.42532540417601993887), (-0.52573111211913359231, 0, 0.10040570794311363956), (0.52573111211913359231, 0, -0.10040570794311363956), (-0.10040570794311363956, -0.3090169943749474241, 0.42532540417601993887), (-0.10040570794311363956, 0.30901699437494742410, 0.42532540417601993887), (0.10040570794311363956, -0.3090169943749474241, -0.42532540417601993887), (0.10040570794311363956, 0.30901699437494742410, -0.42532540417601993887), (-0.16245984811645317047, -0.5, 0.10040570794311363956), (-0.16245984811645317047, 0.5, 0.10040570794311363956), (0.16245984811645317047, -0.5, -0.10040570794311363956), (0.16245984811645317047, 0.5, -0.10040570794311363956), (-0.42532540417601993887, -0.3090169943749474241, -0.10040570794311363956), (-0.42532540417601993887, 0.30901699437494742410, -0.10040570794311363956), (-0.26286555605956679615, 0.1909830056250525759, -0.42532540417601993887), (-0.26286555605956679615, -0.1909830056250525759, -0.42532540417601993887), (0.26286555605956679615, 0.1909830056250525759, 0.42532540417601993887), (0.26286555605956679615, -0.1909830056250525759, 0.42532540417601993887), (0.42532540417601993887, -0.3090169943749474241, 0.10040570794311363956), (0.42532540417601993887, 0.30901699437494742410, 0.10040570794311363956)], [12, 3, 0, 6, 16], [17, 7, 0, 3, 13], [9, 6, 0, 7, 8], [18, 2, 1, 4, 14], [15, 5, 1, 2, 19], [11, 4, 1, 5, 10], [8, 19, 2, 18, 9], [10, 13, 3, 12, 11], [16, 14, 4, 11, 12], [13, 10, 5, 15, 17], [14, 16, 6, 9, 18], [19, 8, 7, 17, 15]] # Actual volume is : 0.163118960624632 assert Abs(polytope_integrate(great_stellated_dodecahedron, 1) -\ 0.163118960624632) < 1e-12 expr = x **2 + y ** 2 + z ** 2 octahedron_five_compound = [[(0, -0.7071067811865475244, 0), (0, 0.70710678118654752440, 0), (0.1148764602736805918, -0.35355339059327376220, -0.60150095500754567366), (0.1148764602736805918, 0.35355339059327376220, -0.60150095500754567366), (0.18587401723009224507, -0.57206140281768429760, 0.37174803446018449013), (0.18587401723009224507, 0.57206140281768429760, 0.37174803446018449013), (0.30075047750377283683, -0.21850801222441053540, 0.60150095500754567366), (0.30075047750377283683, 0.21850801222441053540, 0.60150095500754567366), (0.48662449473386508189, -0.35355339059327376220, -0.37174803446018449013), (0.48662449473386508189, 0.35355339059327376220, -0.37174803446018449013), (-0.60150095500754567366, 0, -0.37174803446018449013), (-0.30075047750377283683, -0.21850801222441053540, -0.60150095500754567366), (-0.30075047750377283683, 0.21850801222441053540, -0.60150095500754567366), (0.60150095500754567366, 0, 0.37174803446018449013), (0.4156269377774534286, -0.57206140281768429760, 0), (0.4156269377774534286, 0.57206140281768429760, 0), (0.37174803446018449013, 0, -0.60150095500754567366), (-0.4156269377774534286, -0.57206140281768429760, 0), (-0.4156269377774534286, 0.57206140281768429760, 0), (-0.67249851196395732696, -0.21850801222441053540, 0), (-0.67249851196395732696, 0.21850801222441053540, 0), (0.67249851196395732696, -0.21850801222441053540, 0), (0.67249851196395732696, 0.21850801222441053540, 0), (-0.37174803446018449013, 0, 0.60150095500754567366), (-0.48662449473386508189, -0.35355339059327376220, 0.37174803446018449013), (-0.48662449473386508189, 0.35355339059327376220, 0.37174803446018449013), (-0.18587401723009224507, -0.57206140281768429760, -0.37174803446018449013), (-0.18587401723009224507, 0.57206140281768429760, -0.37174803446018449013), (-0.11487646027368059176, -0.35355339059327376220, 0.60150095500754567366), (-0.11487646027368059176, 0.35355339059327376220, 0.60150095500754567366)], [0, 10, 16], [23, 10, 0], [16, 13, 0], [0, 13, 23], [16, 10, 1], [1, 10, 23], [1, 13, 16], [23, 13, 1], [2, 4, 19], [22, 4, 2], [2, 19, 27], [27, 22, 2], [20, 5, 3], [3, 5, 21], [26, 20, 3], [3, 21, 26], [29, 19, 4], [4, 22, 29], [5, 20, 28], [28, 21, 5], [6, 8, 15], [17, 8, 6], [6, 15, 25], [25, 17, 6], [14, 9, 7], [7, 9, 18], [24, 14, 7], [7, 18, 24], [8, 12, 15], [17, 12, 8], [14, 11, 9], [9, 11, 18], [11, 14, 24], [24, 18, 11], [25, 15, 12], [12, 17, 25], [29, 27, 19], [20, 26, 28], [28, 26, 21], [22, 27, 29]] assert Abs(polytope_integrate(octahedron_five_compound, expr)) - 0.353553\ < 1e-6 cube_five_compound = [[(-0.1624598481164531631, -0.5, -0.6881909602355867691), (-0.1624598481164531631, 0.5, -0.6881909602355867691), (0.1624598481164531631, -0.5, 0.68819096023558676910), (0.1624598481164531631, 0.5, 0.68819096023558676910), (-0.52573111211913359231, 0, -0.6881909602355867691), (0.52573111211913359231, 0, 0.68819096023558676910), (-0.26286555605956679615, -0.8090169943749474241, -0.1624598481164531631), (-0.26286555605956679615, 0.8090169943749474241, -0.1624598481164531631), (0.26286555605956680301, -0.8090169943749474241, 0.1624598481164531631), (0.26286555605956680301, 0.8090169943749474241, 0.1624598481164531631), (-0.42532540417601993887, -0.3090169943749474241, 0.68819096023558676910), (-0.42532540417601993887, 0.30901699437494742410, 0.68819096023558676910), (0.42532540417601996609, -0.3090169943749474241, -0.6881909602355867691), (0.42532540417601996609, 0.30901699437494742410, -0.6881909602355867691), (-0.6881909602355867691, -0.5, 0.1624598481164531631), (-0.6881909602355867691, 0.5, 0.1624598481164531631), (0.68819096023558676910, -0.5, -0.1624598481164531631), (0.68819096023558676910, 0.5, -0.1624598481164531631), (-0.85065080835203998877, 0, -0.1624598481164531631), (0.85065080835203993218, 0, 0.1624598481164531631)], [18, 10, 3, 7], [13, 19, 8, 0], [18, 0, 8, 10], [3, 19, 13, 7], [18, 7, 13, 0], [8, 19, 3, 10], [6, 2, 11, 18], [1, 9, 19, 12], [11, 9, 1, 18], [6, 12, 19, 2], [1, 12, 6, 18], [11, 2, 19, 9], [4, 14, 11, 7], [17, 5, 8, 12], [4, 12, 8, 14], [11, 5, 17, 7], [4, 7, 17, 12], [8, 5, 11, 14], [6, 10, 15, 4], [13, 9, 5, 16], [15, 9, 13, 4], [6, 16, 5, 10], [13, 16, 6, 4], [15, 10, 5, 9], [14, 15, 1, 0], [16, 17, 3, 2], [14, 2, 3, 15], [1, 17, 16, 0], [14, 0, 16, 2], [3, 17, 1, 15]] assert Abs(polytope_integrate(cube_five_compound, expr) - 1.25) < 1e-12 echidnahedron = [[(0, 0, -2.4898982848827801995), (0, 0, 2.4898982848827802734), (0, -4.2360679774997896964, -2.4898982848827801995), (0, -4.2360679774997896964, 2.4898982848827802734), (0, 4.2360679774997896964, -2.4898982848827801995), (0, 4.2360679774997896964, 2.4898982848827802734), (-4.0287400534704067567, -1.3090169943749474241, -2.4898982848827801995), (-4.0287400534704067567, -1.3090169943749474241, 2.4898982848827802734), (-4.0287400534704067567, 1.3090169943749474241, -2.4898982848827801995), (-4.0287400534704067567, 1.3090169943749474241, 2.4898982848827802734), (4.0287400534704069747, -1.3090169943749474241, -2.4898982848827801995), (4.0287400534704069747, -1.3090169943749474241, 2.4898982848827802734), (4.0287400534704069747, 1.3090169943749474241, -2.4898982848827801995), (4.0287400534704069747, 1.3090169943749474241, 2.4898982848827802734), (-2.4898982848827801995, -3.4270509831248422723, -2.4898982848827801995), (-2.4898982848827801995, -3.4270509831248422723, 2.4898982848827802734), (-2.4898982848827801995, 3.4270509831248422723, -2.4898982848827801995), (-2.4898982848827801995, 3.4270509831248422723, 2.4898982848827802734), (2.4898982848827802734, -3.4270509831248422723, -2.4898982848827801995), (2.4898982848827802734, -3.4270509831248422723, 2.4898982848827802734), (2.4898982848827802734, 3.4270509831248422723, -2.4898982848827801995), (2.4898982848827802734, 3.4270509831248422723, 2.4898982848827802734), (-4.7169310137059934362, -0.8090169943749474241, -1.1135163644116066184), (-4.7169310137059934362, 0.8090169943749474241, -1.1135163644116066184), (4.7169310137059937438, -0.8090169943749474241, 1.11351636441160673519), (4.7169310137059937438, 0.8090169943749474241, 1.11351636441160673519), (-4.2916056095299737777, -2.1180339887498948482, 1.11351636441160673519), (-4.2916056095299737777, 2.1180339887498948482, 1.11351636441160673519), (4.2916056095299737777, -2.1180339887498948482, -1.1135163644116066184), (4.2916056095299737777, 2.1180339887498948482, -1.1135163644116066184), (-3.6034146492943870399, 0, -3.3405490932348205213), (3.6034146492943870399, 0, 3.3405490932348202056), (-3.3405490932348205213, -3.4270509831248422723, 1.11351636441160673519), (-3.3405490932348205213, 3.4270509831248422723, 1.11351636441160673519), (3.3405490932348202056, -3.4270509831248422723, -1.1135163644116066184), (3.3405490932348202056, 3.4270509831248422723, -1.1135163644116066184), (-2.9152236890588002395, -2.1180339887498948482, 3.3405490932348202056), (-2.9152236890588002395, 2.1180339887498948482, 3.3405490932348202056), (2.9152236890588002395, -2.1180339887498948482, -3.3405490932348205213), (2.9152236890588002395, 2.1180339887498948482, -3.3405490932348205213), (-2.2270327288232132368, 0, -1.1135163644116066184), (-2.2270327288232132368, -4.2360679774997896964, -1.1135163644116066184), (-2.2270327288232132368, 4.2360679774997896964, -1.1135163644116066184), (2.2270327288232134704, 0, 1.11351636441160673519), (2.2270327288232134704, -4.2360679774997896964, 1.11351636441160673519), (2.2270327288232134704, 4.2360679774997896964, 1.11351636441160673519), (-1.8017073246471935200, -1.3090169943749474241, 1.11351636441160673519), (-1.8017073246471935200, 1.3090169943749474241, 1.11351636441160673519), (1.8017073246471935043, -1.3090169943749474241, -1.1135163644116066184), (1.8017073246471935043, 1.3090169943749474241, -1.1135163644116066184), (-1.3763819204711735382, 0, -4.7169310137059934362), (-1.3763819204711735382, 0, 0.26286555605956679615), (1.37638192047117353821, 0, 4.7169310137059937438), (1.37638192047117353821, 0, -0.26286555605956679615), (-1.1135163644116066184, -3.4270509831248422723, -3.3405490932348205213), (-1.1135163644116066184, -0.8090169943749474241, 4.7169310137059937438), (-1.1135163644116066184, -0.8090169943749474241, -0.26286555605956679615), (-1.1135163644116066184, 0.8090169943749474241, 4.7169310137059937438), (-1.1135163644116066184, 0.8090169943749474241, -0.26286555605956679615), (-1.1135163644116066184, 3.4270509831248422723, -3.3405490932348205213), (1.11351636441160673519, -3.4270509831248422723, 3.3405490932348202056), (1.11351636441160673519, -0.8090169943749474241, -4.7169310137059934362), (1.11351636441160673519, -0.8090169943749474241, 0.26286555605956679615), (1.11351636441160673519, 0.8090169943749474241, -4.7169310137059934362), (1.11351636441160673519, 0.8090169943749474241, 0.26286555605956679615), (1.11351636441160673519, 3.4270509831248422723, 3.3405490932348202056), (-0.85065080835203998877, 0, 1.11351636441160673519), (0.85065080835203993218, 0, -1.1135163644116066184), (-0.6881909602355867691, -0.5, -1.1135163644116066184), (-0.6881909602355867691, 0.5, -1.1135163644116066184), (-0.6881909602355867691, -4.7360679774997896964, -1.1135163644116066184), (-0.6881909602355867691, -2.1180339887498948482, -1.1135163644116066184), (-0.6881909602355867691, 2.1180339887498948482, -1.1135163644116066184), (-0.6881909602355867691, 4.7360679774997896964, -1.1135163644116066184), (0.68819096023558676910, -0.5, 1.11351636441160673519), (0.68819096023558676910, 0.5, 1.11351636441160673519), (0.68819096023558676910, -4.7360679774997896964, 1.11351636441160673519), (0.68819096023558676910, -2.1180339887498948482, 1.11351636441160673519), (0.68819096023558676910, 2.1180339887498948482, 1.11351636441160673519), (0.68819096023558676910, 4.7360679774997896964, 1.11351636441160673519), (-0.42532540417601993887, -1.3090169943749474241, -4.7169310137059934362), (-0.42532540417601993887, -1.3090169943749474241, 0.26286555605956679615), (-0.42532540417601993887, 1.3090169943749474241, -4.7169310137059934362), (-0.42532540417601993887, 1.3090169943749474241, 0.26286555605956679615), (-0.26286555605956679615, -0.8090169943749474241, 1.11351636441160673519), (-0.26286555605956679615, 0.8090169943749474241, 1.11351636441160673519), (0.26286555605956679615, -0.8090169943749474241, -1.1135163644116066184), (0.26286555605956679615, 0.8090169943749474241, -1.1135163644116066184), (0.42532540417601996609, -1.3090169943749474241, 4.7169310137059937438), (0.42532540417601996609, -1.3090169943749474241, -0.26286555605956679615), (0.42532540417601996609, 1.3090169943749474241, 4.7169310137059937438), (0.42532540417601996609, 1.3090169943749474241, -0.26286555605956679615)], [9, 66, 47], [44, 62, 77], [20, 91, 49], [33, 47, 83], [3, 77, 84], [12, 49, 53], [36, 84, 66], [28, 53, 62], [73, 83, 91], [15, 84, 46], [25, 64, 43], [16, 58, 72], [26, 46, 51], [11, 43, 74], [4, 72, 91], [60, 74, 84], [35, 91, 64], [23, 51, 58], [19, 74, 77], [79, 83, 78], [6, 56, 40], [76, 77, 81], [21, 78, 75], [8, 40, 58], [31, 75, 74], [42, 58, 83], [41, 81, 56], [13, 75, 43], [27, 51, 47], [2, 89, 71], [24, 43, 62], [17, 47, 85], [14, 71, 56], [65, 85, 75], [22, 56, 51], [34, 62, 89], [5, 85, 78], [32, 81, 46], [10, 53, 48], [45, 78, 64], [7, 46, 66], [18, 48, 89], [37, 66, 85], [70, 89, 81], [29, 64, 53], [88, 74, 1], [38, 67, 48], [42, 83, 72], [57, 1, 85], [34, 48, 62], [59, 72, 87], [19, 62, 74], [63, 87, 67], [17, 85, 83], [52, 75, 1], [39, 87, 49], [22, 51, 40], [55, 1, 66], [29, 49, 64], [30, 40, 69], [13, 64, 75], [82, 69, 87], [7, 66, 51], [90, 85, 1], [59, 69, 72], [70, 81, 71], [88, 1, 84], [73, 72, 83], [54, 71, 68], [5, 83, 85], [50, 68, 69], [3, 84, 81], [57, 66, 1], [30, 68, 40], [28, 62, 48], [52, 1, 74], [23, 40, 51], [38, 48, 86], [9, 51, 66], [80, 86, 68], [11, 74, 62], [55, 84, 1], [54, 86, 71], [35, 64, 49], [90, 1, 75], [41, 71, 81], [39, 49, 67], [15, 81, 84], [61, 67, 86], [21, 75, 64], [24, 53, 43], [50, 69, 0], [37, 85, 47], [31, 43, 75], [61, 0, 67], [27, 47, 58], [10, 67, 53], [8, 58, 69], [90, 75, 85], [45, 91, 78], [80, 68, 0], [36, 66, 46], [65, 78, 85], [63, 0, 87], [32, 46, 56], [20, 87, 91], [14, 56, 68], [57, 85, 66], [33, 58, 47], [61, 86, 0], [60, 84, 77], [37, 47, 66], [82, 0, 69], [44, 77, 89], [16, 69, 58], [18, 89, 86], [55, 66, 84], [26, 56, 46], [63, 67, 0], [31, 74, 43], [36, 46, 84], [50, 0, 68], [25, 43, 53], [6, 68, 56], [12, 53, 67], [88, 84, 74], [76, 89, 77], [82, 87, 0], [65, 75, 78], [60, 77, 74], [80, 0, 86], [79, 78, 91], [2, 86, 89], [4, 91, 87], [52, 74, 75], [21, 64, 78], [18, 86, 48], [23, 58, 40], [5, 78, 83], [28, 48, 53], [6, 40, 68], [25, 53, 64], [54, 68, 86], [33, 83, 58], [17, 83, 47], [12, 67, 49], [41, 56, 71], [9, 47, 51], [35, 49, 91], [2, 71, 86], [79, 91, 83], [38, 86, 67], [26, 51, 56], [7, 51, 46], [4, 87, 72], [34, 89, 48], [15, 46, 81], [42, 72, 58], [10, 48, 67], [27, 58, 51], [39, 67, 87], [76, 81, 89], [3, 81, 77], [8, 69, 40], [29, 53, 49], [19, 77, 62], [22, 40, 56], [20, 49, 87], [32, 56, 81], [59, 87, 69], [24, 62, 53], [11, 62, 43], [14, 68, 71], [73, 91, 72], [13, 43, 64], [70, 71, 89], [16, 72, 69], [44, 89, 62], [30, 69, 68], [45, 64, 91]] # Actual volume is : 51.405764746872634 assert Abs(polytope_integrate(echidnahedron, 1) - 51.4057647468726) < 1e-12 assert Abs(polytope_integrate(echidnahedron, expr) - 253.569603474519) <\ 1e-12 # Tests for many polynomials with maximum degree given(2D case). assert polytope_integrate(cube2, [x**2, y*z], max_degree=2) == \ {y * z: 3125 / S(4), x ** 2: 3125 / S(3)} assert polytope_integrate(cube2, max_degree=2) == \ {1: 125, x: 625 / S(2), x * z: 3125 / S(4), y: 625 / S(2), y * z: 3125 / S(4), z ** 2: 3125 / S(3), y ** 2: 3125 / S(3), z: 625 / S(2), x * y: 3125 / S(4), x ** 2: 3125 / S(3)} def test_point_sort(): assert point_sort([Point(0, 0), Point(1, 0), Point(1, 1)]) == \ [Point2D(1, 1), Point2D(1, 0), Point2D(0, 0)] fig6 = Polygon((0, 0), (1, 0), (1, 1)) assert polytope_integrate(fig6, x*y) == Rational(-1, 8) assert polytope_integrate(fig6, x*y, clockwise = True) == Rational(1, 8) def test_polytopes_intersecting_sides(): fig5 = Polygon(Point(-4.165, -0.832), Point(-3.668, 1.568), Point(-3.266, 1.279), Point(-1.090, -2.080), Point(3.313, -0.683), Point(3.033, -4.845), Point(-4.395, 4.840), Point(-1.007, -3.328)) assert polytope_integrate(fig5, x**2 + x*y + y**2) ==\ S(1633405224899363)/(24*10**12) fig6 = Polygon(Point(-3.018, -4.473), Point(-0.103, 2.378), Point(-1.605, -2.308), Point(4.516, -0.771), Point(4.203, 0.478)) assert polytope_integrate(fig6, x**2 + x*y + y**2) ==\ S(88161333955921)/(3*10**12) def test_max_degree(): polygon = Polygon((0, 0), (0, 1), (1, 1), (1, 0)) polys = [1, x, y, x*y, x**2*y, x*y**2] assert polytope_integrate(polygon, polys, max_degree=3) == \ {1: 1, x: S.Half, y: S.Half, x*y: Rational(1, 4), x**2*y: Rational(1, 6), x*y**2: Rational(1, 6)} def test_main_integrate3d(): cube = [[(0, 0, 0), (0, 0, 5), (0, 5, 0), (0, 5, 5), (5, 0, 0),\ (5, 0, 5), (5, 5, 0), (5, 5, 5)],\ [2, 6, 7, 3], [3, 7, 5, 1], [7, 6, 4, 5], [1, 5, 4, 0],\ [3, 1, 0, 2], [0, 4, 6, 2]] vertices = cube[0] faces = cube[1:] hp_params = hyperplane_parameters(faces, vertices) assert main_integrate3d(1, faces, vertices, hp_params) == -125 assert main_integrate3d(1, faces, vertices, hp_params, max_degree=1) == \ {1: -125, y: Rational(-625, 2), z: Rational(-625, 2), x: Rational(-625, 2)} def test_main_integrate(): triangle = Polygon((0, 3), (5, 3), (1, 1)) facets = triangle.sides hp_params = hyperplane_parameters(triangle) assert main_integrate(x**2 + y**2, facets, hp_params) == Rational(325, 6) assert main_integrate(x**2 + y**2, facets, hp_params, max_degree=1) == \ {0: 0, 1: 5, y: Rational(35, 3), x: 10} def test_polygon_integrate(): cube = [[(0, 0, 0), (0, 0, 5), (0, 5, 0), (0, 5, 5), (5, 0, 0),\ (5, 0, 5), (5, 5, 0), (5, 5, 5)],\ [2, 6, 7, 3], [3, 7, 5, 1], [7, 6, 4, 5], [1, 5, 4, 0],\ [3, 1, 0, 2], [0, 4, 6, 2]] facet = cube[1] facets = cube[1:] vertices = cube[0] assert polygon_integrate(facet, [(0, 1, 0), 5], 0, facets, vertices, 1, 0) == -25 def test_distance_to_side(): point = (0, 0, 0) assert distance_to_side(point, [(0, 0, 1), (0, 1, 0)], (1, 0, 0)) == -sqrt(2)/2 def test_lineseg_integrate(): polygon = [(0, 5, 0), (5, 5, 0), (5, 5, 5), (0, 5, 5)] line_seg = [(0, 5, 0), (5, 5, 0)] assert lineseg_integrate(polygon, 0, line_seg, 1, 0) == 5 assert lineseg_integrate(polygon, 0, line_seg, 0, 0) == 0 def test_integration_reduction(): triangle = Polygon(Point(0, 3), Point(5, 3), Point(1, 1)) facets = triangle.sides a, b = hyperplane_parameters(triangle)[0] assert integration_reduction(facets, 0, a, b, 1, (x, y), 0) == 5 assert integration_reduction(facets, 0, a, b, 0, (x, y), 0) == 0 def test_integration_reduction_dynamic(): triangle = Polygon(Point(0, 3), Point(5, 3), Point(1, 1)) facets = triangle.sides a, b = hyperplane_parameters(triangle)[0] x0 = facets[0].points[0] monomial_values = [[0, 0, 0, 0], [1, 0, 0, 5],\ [y, 0, 1, 15], [x, 1, 0, None]] assert integration_reduction_dynamic(facets, 0, a, b, x, 1, (x, y), 1,\ 0, 1, x0, monomial_values, 3) == Rational(25, 2) assert integration_reduction_dynamic(facets, 0, a, b, 0, 1, (x, y), 1,\ 0, 1, x0, monomial_values, 3) == 0 def test_is_vertex(): assert is_vertex(2) is False assert is_vertex((2, 3)) is True assert is_vertex(Point(2, 3)) is True assert is_vertex((2, 3, 4)) is True assert is_vertex((2, 3, 4, 5)) is False
96e787dd6ac8e32218e487645b512903603a310c80080f1b40456494aab22000
from sympy.concrete.summations import Sum from sympy.core.add import Add from sympy.core.function import (Derivative, Function, diff) from sympy.core.numbers import (I, Rational, pi) from sympy.core.relational import Ne from sympy.core.symbol import (Symbol, symbols) from sympy.functions.elementary.exponential import (LambertW, exp, log) from sympy.functions.elementary.hyperbolic import (asinh, cosh, sinh, tanh) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import (acos, asin, atan, cos, sin, tan) from sympy.functions.special.bessel import (besselj, besselk, bessely, jn) from sympy.functions.special.error_functions import erf from sympy.integrals.integrals import Integral from sympy.simplify.ratsimp import ratsimp from sympy.simplify.simplify import simplify from sympy.integrals.heurisch import components, heurisch, heurisch_wrapper from sympy.testing.pytest import XFAIL, skip, slow, ON_TRAVIS from sympy.integrals.integrals import integrate x, y, z, nu = symbols('x,y,z,nu') f = Function('f') def test_components(): assert components(x*y, x) == {x} assert components(1/(x + y), x) == {x} assert components(sin(x), x) == {sin(x), x} assert components(sin(x)*sqrt(log(x)), x) == \ {log(x), sin(x), sqrt(log(x)), x} assert components(x*sin(exp(x)*y), x) == \ {sin(y*exp(x)), x, exp(x)} assert components(x**Rational(17, 54)/sqrt(sin(x)), x) == \ {sin(x), x**Rational(1, 54), sqrt(sin(x)), x} assert components(f(x), x) == \ {x, f(x)} assert components(Derivative(f(x), x), x) == \ {x, f(x), Derivative(f(x), x)} assert components(f(x)*diff(f(x), x), x) == \ {x, f(x), Derivative(f(x), x), Derivative(f(x), x)} def test_issue_10680(): assert isinstance(integrate(x**log(x**log(x**log(x))),x), Integral) def test_issue_21166(): assert integrate(sin(x/sqrt(abs(x))), (x, -1, 1)) == 0 def test_heurisch_polynomials(): assert heurisch(1, x) == x assert heurisch(x, x) == x**2/2 assert heurisch(x**17, x) == x**18/18 # For coverage assert heurisch_wrapper(y, x) == y*x def test_heurisch_fractions(): assert heurisch(1/x, x) == log(x) assert heurisch(1/(2 + x), x) == log(x + 2) assert heurisch(1/(x + sin(y)), x) == log(x + sin(y)) # Up to a constant, where C = pi*I*Rational(5, 12), Mathematica gives identical # result in the first case. The difference is because SymPy changes # signs of expressions without any care. # XXX ^ ^ ^ is this still correct? assert heurisch(5*x**5/( 2*x**6 - 5), x) in [5*log(2*x**6 - 5) / 12, 5*log(-2*x**6 + 5) / 12] assert heurisch(5*x**5/(2*x**6 + 5), x) == 5*log(2*x**6 + 5) / 12 assert heurisch(1/x**2, x) == -1/x assert heurisch(-1/x**5, x) == 1/(4*x**4) def test_heurisch_log(): assert heurisch(log(x), x) == x*log(x) - x assert heurisch(log(3*x), x) == -x + x*log(3) + x*log(x) assert heurisch(log(x**2), x) in [x*log(x**2) - 2*x, 2*x*log(x) - 2*x] def test_heurisch_exp(): assert heurisch(exp(x), x) == exp(x) assert heurisch(exp(-x), x) == -exp(-x) assert heurisch(exp(17*x), x) == exp(17*x) / 17 assert heurisch(x*exp(x), x) == x*exp(x) - exp(x) assert heurisch(x*exp(x**2), x) == exp(x**2) / 2 assert heurisch(exp(-x**2), x) is None assert heurisch(2**x, x) == 2**x/log(2) assert heurisch(x*2**x, x) == x*2**x/log(2) - 2**x*log(2)**(-2) assert heurisch(Integral(x**z*y, (y, 1, 2), (z, 2, 3)).function, x) == (x*x**z*y)/(z+1) assert heurisch(Sum(x**z, (z, 1, 2)).function, z) == x**z/log(x) def test_heurisch_trigonometric(): assert heurisch(sin(x), x) == -cos(x) assert heurisch(pi*sin(x) + 1, x) == x - pi*cos(x) assert heurisch(cos(x), x) == sin(x) assert heurisch(tan(x), x) in [ log(1 + tan(x)**2)/2, log(tan(x) + I) + I*x, log(tan(x) - I) - I*x, ] assert heurisch(sin(x)*sin(y), x) == -cos(x)*sin(y) assert heurisch(sin(x)*sin(y), y) == -cos(y)*sin(x) # gives sin(x) in answer when run via setup.py and cos(x) when run via py.test assert heurisch(sin(x)*cos(x), x) in [sin(x)**2 / 2, -cos(x)**2 / 2] assert heurisch(cos(x)/sin(x), x) == log(sin(x)) assert heurisch(x*sin(7*x), x) == sin(7*x) / 49 - x*cos(7*x) / 7 assert heurisch(1/pi/4 * x**2*cos(x), x) == 1/pi/4*(x**2*sin(x) - 2*sin(x) + 2*x*cos(x)) assert heurisch(acos(x/4) * asin(x/4), x) == 2*x - (sqrt(16 - x**2))*asin(x/4) \ + (sqrt(16 - x**2))*acos(x/4) + x*asin(x/4)*acos(x/4) assert heurisch(sin(x)/(cos(x)**2+1), x) == -atan(cos(x)) #fixes issue 13723 assert heurisch(1/(cos(x)+2), x) == 2*sqrt(3)*atan(sqrt(3)*tan(x/2)/3)/3 assert heurisch(2*sin(x)*cos(x)/(sin(x)**4 + 1), x) == atan(sqrt(2)*sin(x) - 1) - atan(sqrt(2)*sin(x) + 1) assert heurisch(1/cosh(x), x) == 2*atan(tanh(x/2)) def test_heurisch_hyperbolic(): assert heurisch(sinh(x), x) == cosh(x) assert heurisch(cosh(x), x) == sinh(x) assert heurisch(x*sinh(x), x) == x*cosh(x) - sinh(x) assert heurisch(x*cosh(x), x) == x*sinh(x) - cosh(x) assert heurisch( x*asinh(x/2), x) == x**2*asinh(x/2)/2 + asinh(x/2) - x*sqrt(4 + x**2)/4 def test_heurisch_mixed(): assert heurisch(sin(x)*exp(x), x) == exp(x)*sin(x)/2 - exp(x)*cos(x)/2 assert heurisch(sin(x/sqrt(-x)), x) == 2*x*cos(x/sqrt(-x))/sqrt(-x) - 2*sin(x/sqrt(-x)) def test_heurisch_radicals(): assert heurisch(1/sqrt(x), x) == 2*sqrt(x) assert heurisch(1/sqrt(x)**3, x) == -2/sqrt(x) assert heurisch(sqrt(x)**3, x) == 2*sqrt(x)**5/5 assert heurisch(sin(x)*sqrt(cos(x)), x) == -2*sqrt(cos(x))**3/3 y = Symbol('y') assert heurisch(sin(y*sqrt(x)), x) == 2/y**2*sin(y*sqrt(x)) - \ 2*sqrt(x)*cos(y*sqrt(x))/y assert heurisch_wrapper(sin(y*sqrt(x)), x) == Piecewise( (-2*sqrt(x)*cos(sqrt(x)*y)/y + 2*sin(sqrt(x)*y)/y**2, Ne(y, 0)), (0, True)) y = Symbol('y', positive=True) assert heurisch_wrapper(sin(y*sqrt(x)), x) == 2/y**2*sin(y*sqrt(x)) - \ 2*sqrt(x)*cos(y*sqrt(x))/y def test_heurisch_special(): assert heurisch(erf(x), x) == x*erf(x) + exp(-x**2)/sqrt(pi) assert heurisch(exp(-x**2)*erf(x), x) == sqrt(pi)*erf(x)**2 / 4 def test_heurisch_symbolic_coeffs(): assert heurisch(1/(x + y), x) == log(x + y) assert heurisch(1/(x + sqrt(2)), x) == log(x + sqrt(2)) assert simplify(diff(heurisch(log(x + y + z), y), y)) == log(x + y + z) def test_heurisch_symbolic_coeffs_1130(): y = Symbol('y') assert heurisch_wrapper(1/(x**2 + y), x) == Piecewise( (log(x - sqrt(-y))/(2*sqrt(-y)) - log(x + sqrt(-y))/(2*sqrt(-y)), Ne(y, 0)), (-1/x, True)) y = Symbol('y', positive=True) assert heurisch_wrapper(1/(x**2 + y), x) == (atan(x/sqrt(y))/sqrt(y)) def test_heurisch_hacking(): assert heurisch(sqrt(1 + 7*x**2), x, hints=[]) == \ x*sqrt(1 + 7*x**2)/2 + sqrt(7)*asinh(sqrt(7)*x)/14 assert heurisch(sqrt(1 - 7*x**2), x, hints=[]) == \ x*sqrt(1 - 7*x**2)/2 + sqrt(7)*asin(sqrt(7)*x)/14 assert heurisch(1/sqrt(1 + 7*x**2), x, hints=[]) == \ sqrt(7)*asinh(sqrt(7)*x)/7 assert heurisch(1/sqrt(1 - 7*x**2), x, hints=[]) == \ sqrt(7)*asin(sqrt(7)*x)/7 assert heurisch(exp(-7*x**2), x, hints=[]) == \ sqrt(7*pi)*erf(sqrt(7)*x)/14 assert heurisch(1/sqrt(9 - 4*x**2), x, hints=[]) == \ asin(x*Rational(2, 3))/2 assert heurisch(1/sqrt(9 + 4*x**2), x, hints=[]) == \ asinh(x*Rational(2, 3))/2 def test_heurisch_function(): assert heurisch(f(x), x) is None @XFAIL def test_heurisch_function_derivative(): # TODO: it looks like this used to work just by coincindence and # thanks to sloppy implementation. Investigate why this used to # work at all and if support for this can be restored. df = diff(f(x), x) assert heurisch(f(x)*df, x) == f(x)**2/2 assert heurisch(f(x)**2*df, x) == f(x)**3/3 assert heurisch(df/f(x), x) == log(f(x)) def test_heurisch_wrapper(): f = 1/(y + x) assert heurisch_wrapper(f, x) == log(x + y) f = 1/(y - x) assert heurisch_wrapper(f, x) == -log(x - y) f = 1/((y - x)*(y + x)) assert heurisch_wrapper(f, x) == Piecewise( (-log(x - y)/(2*y) + log(x + y)/(2*y), Ne(y, 0)), (1/x, True)) # issue 6926 f = sqrt(x**2/((y - x)*(y + x))) assert heurisch_wrapper(f, x) == x*sqrt(x**2/(-x**2 + y**2)) \ - y**2*sqrt(x**2/(-x**2 + y**2))/x def test_issue_3609(): assert heurisch(1/(x * (1 + log(x)**2)), x) == atan(log(x)) ### These are examples from the Poor Man's Integrator ### http://www-sop.inria.fr/cafe/Manuel.Bronstein/pmint/examples/ def test_pmint_rat(): # TODO: heurisch() is off by a constant: -3/4. Possibly different permutation # would give the optimal result? def drop_const(expr, x): if expr.is_Add: return Add(*[ arg for arg in expr.args if arg.has(x) ]) else: return expr f = (x**7 - 24*x**4 - 4*x**2 + 8*x - 8)/(x**8 + 6*x**6 + 12*x**4 + 8*x**2) g = (4 + 8*x**2 + 6*x + 3*x**3)/(x**5 + 4*x**3 + 4*x) + log(x) assert drop_const(ratsimp(heurisch(f, x)), x) == g def test_pmint_trig(): f = (x - tan(x)) / tan(x)**2 + tan(x) g = -x**2/2 - x/tan(x) + log(tan(x)**2 + 1)/2 assert heurisch(f, x) == g @slow # 8 seconds on 3.4 GHz def test_pmint_logexp(): if ON_TRAVIS: # See https://github.com/sympy/sympy/pull/12795 skip("Too slow for travis.") f = (1 + x + x*exp(x))*(x + log(x) + exp(x) - 1)/(x + log(x) + exp(x))**2/x g = log(x + exp(x) + log(x)) + 1/(x + exp(x) + log(x)) assert ratsimp(heurisch(f, x)) == g def test_pmint_erf(): f = exp(-x**2)*erf(x)/(erf(x)**3 - erf(x)**2 - erf(x) + 1) g = sqrt(pi)*log(erf(x) - 1)/8 - sqrt(pi)*log(erf(x) + 1)/8 - sqrt(pi)/(4*erf(x) - 4) assert ratsimp(heurisch(f, x)) == g def test_pmint_LambertW(): f = LambertW(x) g = x*LambertW(x) - x + x/LambertW(x) assert heurisch(f, x) == g def test_pmint_besselj(): f = besselj(nu + 1, x)/besselj(nu, x) g = nu*log(x) - log(besselj(nu, x)) assert heurisch(f, x) == g f = (nu*besselj(nu, x) - x*besselj(nu + 1, x))/x g = besselj(nu, x) assert heurisch(f, x) == g f = jn(nu + 1, x)/jn(nu, x) g = nu*log(x) - log(jn(nu, x)) assert heurisch(f, x) == g @slow def test_pmint_bessel_products(): # Note: Derivatives of Bessel functions have many forms. # Recurrence relations are needed for comparisons. if ON_TRAVIS: skip("Too slow for travis.") f = x*besselj(nu, x)*bessely(nu, 2*x) g = -2*x*besselj(nu, x)*bessely(nu - 1, 2*x)/3 + x*besselj(nu - 1, x)*bessely(nu, 2*x)/3 assert heurisch(f, x) == g f = x*besselj(nu, x)*besselk(nu, 2*x) g = -2*x*besselj(nu, x)*besselk(nu - 1, 2*x)/5 - x*besselj(nu - 1, x)*besselk(nu, 2*x)/5 assert heurisch(f, x) == g @slow # 110 seconds on 3.4 GHz def test_pmint_WrightOmega(): if ON_TRAVIS: skip("Too slow for travis.") def omega(x): return LambertW(exp(x)) f = (1 + omega(x) * (2 + cos(omega(x)) * (x + omega(x))))/(1 + omega(x))/(x + omega(x)) g = log(x + LambertW(exp(x))) + sin(LambertW(exp(x))) assert heurisch(f, x) == g def test_RR(): # Make sure the algorithm does the right thing if the ring is RR. See # issue 8685. assert heurisch(sqrt(1 + 0.25*x**2), x, hints=[]) == \ 0.5*x*sqrt(0.25*x**2 + 1) + 1.0*asinh(0.5*x) # TODO: convert the rest of PMINT tests: # Airy functions # f = (x - AiryAi(x)*AiryAi(1, x)) / (x**2 - AiryAi(x)**2) # g = Rational(1,2)*ln(x + AiryAi(x)) + Rational(1,2)*ln(x - AiryAi(x)) # f = x**2 * AiryAi(x) # g = -AiryAi(x) + AiryAi(1, x)*x # Whittaker functions # f = WhittakerW(mu + 1, nu, x) / (WhittakerW(mu, nu, x) * x) # g = x/2 - mu*ln(x) - ln(WhittakerW(mu, nu, x))
092ac789ee7dfcd8cd67d07619a1f328f36c333c66e4a87a1aec65624f334ee2
from sympy.integrals.singularityfunctions import singularityintegrate from sympy.core.function import Function from sympy.core.symbol import symbols from sympy.functions.special.singularity_functions import SingularityFunction x, a, n, y = symbols('x a n y') f = Function('f') def test_singularityintegrate(): assert singularityintegrate(x, x) is None assert singularityintegrate(x + SingularityFunction(x, 9, 1), x) is None assert 4*singularityintegrate(SingularityFunction(x, a, 3), x) == 4*SingularityFunction(x, a, 4)/4 assert singularityintegrate(5*SingularityFunction(x, 5, -2), x) == 5*SingularityFunction(x, 5, -1) assert singularityintegrate(6*SingularityFunction(x, 5, -1), x) == 6*SingularityFunction(x, 5, 0) assert singularityintegrate(x*SingularityFunction(x, 0, -1), x) == 0 assert singularityintegrate((x - 5)*SingularityFunction(x, 5, -1), x) == 0 assert singularityintegrate(SingularityFunction(x, 0, -1) * f(x), x) == f(0) * SingularityFunction(x, 0, 0) assert singularityintegrate(SingularityFunction(x, 1, -1) * f(x), x) == f(1) * SingularityFunction(x, 1, 0) assert singularityintegrate(y*SingularityFunction(x, 0, -1)**2, x) == \ y*SingularityFunction(0, 0, -1)*SingularityFunction(x, 0, 0)
2bebb8bea9c0724b2bd21407258ae8feb1606b02ba74315017419adc79d1683c
from sympy.concrete.summations import (Sum, summation) from sympy.core.add import Add from sympy.core.containers import Tuple from sympy.core.expr import Expr from sympy.core.function import (Derivative, Function, Lambda, diff) from sympy.core import EulerGamma from sympy.core.numbers import (E, Float, I, Rational, nan, oo, pi) from sympy.core.relational import (Eq, Ne) from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.core.sympify import sympify from sympy.functions.elementary.complexes import (Abs, im, polar_lift, re, sign) from sympy.functions.elementary.exponential import (LambertW, exp, exp_polar, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, cosh, sinh, tanh) from sympy.functions.elementary.miscellaneous import (Max, Min, sqrt) from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import (acos, asin, atan, cos, sin, sinc, tan) from sympy.functions.special.delta_functions import DiracDelta from sympy.functions.special.error_functions import (Ci, Ei, Si, erf, erfc, erfi, fresnelc, li) from sympy.functions.special.gamma_functions import (gamma, polygamma) from sympy.functions.special.hyper import (hyper, meijerg) from sympy.functions.special.singularity_functions import SingularityFunction from sympy.functions.special.zeta_functions import lerchphi from sympy.integrals.integrals import integrate from sympy.logic.boolalg import And from sympy.matrices.dense import Matrix from sympy.polys.polytools import (Poly, factor) from sympy.printing.str import sstr from sympy.series.order import O from sympy.sets.sets import Interval from sympy.simplify.gammasimp import gammasimp from sympy.simplify.simplify import simplify from sympy.simplify.trigsimp import trigsimp from sympy.tensor.indexed import (Idx, IndexedBase) from sympy.core.expr import unchanged from sympy.functions.elementary.integers import floor from sympy.integrals.integrals import Integral from sympy.integrals.risch import NonElementaryIntegral from sympy.physics import units from sympy.testing.pytest import (raises, slow, skip, ON_TRAVIS, warns_deprecated_sympy) from sympy.testing.randtest import verify_numerically x, y, a, t, x_1, x_2, z, s, b = symbols('x y a t x_1 x_2 z s b') n = Symbol('n', integer=True) f = Function('f') def NS(e, n=15, **options): return sstr(sympify(e).evalf(n, **options), full_prec=True) def test_poly_deprecated(): p = Poly(2*x, x) assert p.integrate(x) == Poly(x**2, x, domain='QQ') with warns_deprecated_sympy(): integrate(p, x) with warns_deprecated_sympy(): Integral(p, (x,)) @slow def test_principal_value(): g = 1 / x assert Integral(g, (x, -oo, oo)).principal_value() == 0 assert Integral(g, (y, -oo, oo)).principal_value() == oo * sign(1 / x) raises(ValueError, lambda: Integral(g, (x)).principal_value()) raises(ValueError, lambda: Integral(g).principal_value()) l = 1 / ((x ** 3) - 1) assert Integral(l, (x, -oo, oo)).principal_value().together() == -sqrt(3)*pi/3 raises(ValueError, lambda: Integral(l, (x, -oo, 1)).principal_value()) d = 1 / (x ** 2 - 1) assert Integral(d, (x, -oo, oo)).principal_value() == 0 assert Integral(d, (x, -2, 2)).principal_value() == -log(3) v = x / (x ** 2 - 1) assert Integral(v, (x, -oo, oo)).principal_value() == 0 assert Integral(v, (x, -2, 2)).principal_value() == 0 s = x ** 2 / (x ** 2 - 1) assert Integral(s, (x, -oo, oo)).principal_value() is oo assert Integral(s, (x, -2, 2)).principal_value() == -log(3) + 4 f = 1 / ((x ** 2 - 1) * (1 + x ** 2)) assert Integral(f, (x, -oo, oo)).principal_value() == -pi / 2 assert Integral(f, (x, -2, 2)).principal_value() == -atan(2) - log(3) / 2 def diff_test(i): """Return the set of symbols, s, which were used in testing that i.diff(s) agrees with i.doit().diff(s). If there is an error then the assertion will fail, causing the test to fail.""" syms = i.free_symbols for s in syms: assert (i.diff(s).doit() - i.doit().diff(s)).expand() == 0 return syms def test_improper_integral(): assert integrate(log(x), (x, 0, 1)) == -1 assert integrate(x**(-2), (x, 1, oo)) == 1 assert integrate(1/(1 + exp(x)), (x, 0, oo)) == log(2) def test_constructor(): # this is shared by Sum, so testing Integral's constructor # is equivalent to testing Sum's s1 = Integral(n, n) assert s1.limits == (Tuple(n),) s2 = Integral(n, (n,)) assert s2.limits == (Tuple(n),) s3 = Integral(Sum(x, (x, 1, y))) assert s3.limits == (Tuple(y),) s4 = Integral(n, Tuple(n,)) assert s4.limits == (Tuple(n),) s5 = Integral(n, (n, Interval(1, 2))) assert s5.limits == (Tuple(n, 1, 2),) # Testing constructor with inequalities: s6 = Integral(n, n > 10) assert s6.limits == (Tuple(n, 10, oo),) s7 = Integral(n, (n > 2) & (n < 5)) assert s7.limits == (Tuple(n, 2, 5),) def test_basics(): assert Integral(0, x) != 0 assert Integral(x, (x, 1, 1)) != 0 assert Integral(oo, x) != oo assert Integral(S.NaN, x) is S.NaN assert diff(Integral(y, y), x) == 0 assert diff(Integral(x, (x, 0, 1)), x) == 0 assert diff(Integral(x, x), x) == x assert diff(Integral(t, (t, 0, x)), x) == x e = (t + 1)**2 assert diff(integrate(e, (t, 0, x)), x) == \ diff(Integral(e, (t, 0, x)), x).doit().expand() == \ ((1 + x)**2).expand() assert diff(integrate(e, (t, 0, x)), t) == \ diff(Integral(e, (t, 0, x)), t) == 0 assert diff(integrate(e, (t, 0, x)), a) == \ diff(Integral(e, (t, 0, x)), a) == 0 assert diff(integrate(e, t), a) == diff(Integral(e, t), a) == 0 assert integrate(e, (t, a, x)).diff(x) == \ Integral(e, (t, a, x)).diff(x).doit().expand() assert Integral(e, (t, a, x)).diff(x).doit() == ((1 + x)**2) assert integrate(e, (t, x, a)).diff(x).doit() == (-(1 + x)**2).expand() assert integrate(t**2, (t, x, 2*x)).diff(x) == 7*x**2 assert Integral(x, x).atoms() == {x} assert Integral(f(x), (x, 0, 1)).atoms() == {S.Zero, S.One, x} assert diff_test(Integral(x, (x, 3*y))) == {y} assert diff_test(Integral(x, (a, 3*y))) == {x, y} assert integrate(x, (x, oo, oo)) == 0 #issue 8171 assert integrate(x, (x, -oo, -oo)) == 0 # sum integral of terms assert integrate(y + x + exp(x), x) == x*y + x**2/2 + exp(x) assert Integral(x).is_commutative n = Symbol('n', commutative=False) assert Integral(n + x, x).is_commutative is False def test_diff_wrt(): class Test(Expr): _diff_wrt = True is_commutative = True t = Test() assert integrate(t + 1, t) == t**2/2 + t assert integrate(t + 1, (t, 0, 1)) == Rational(3, 2) raises(ValueError, lambda: integrate(x + 1, x + 1)) raises(ValueError, lambda: integrate(x + 1, (x + 1, 0, 1))) def test_basics_multiple(): assert diff_test(Integral(x, (x, 3*x, 5*y), (y, x, 2*x))) == {x} assert diff_test(Integral(x, (x, 5*y), (y, x, 2*x))) == {x} assert diff_test(Integral(x, (x, 5*y), (y, y, 2*x))) == {x, y} assert diff_test(Integral(y, y, x)) == {x, y} assert diff_test(Integral(y*x, x, y)) == {x, y} assert diff_test(Integral(x + y, y, (y, 1, x))) == {x} assert diff_test(Integral(x + y, (x, x, y), (y, y, x))) == {x, y} def test_conjugate_transpose(): A, B = symbols("A B", commutative=False) x = Symbol("x", complex=True) p = Integral(A*B, (x,)) assert p.adjoint().doit() == p.doit().adjoint() assert p.conjugate().doit() == p.doit().conjugate() assert p.transpose().doit() == p.doit().transpose() x = Symbol("x", real=True) p = Integral(A*B, (x,)) assert p.adjoint().doit() == p.doit().adjoint() assert p.conjugate().doit() == p.doit().conjugate() assert p.transpose().doit() == p.doit().transpose() def test_integration(): assert integrate(0, (t, 0, x)) == 0 assert integrate(3, (t, 0, x)) == 3*x assert integrate(t, (t, 0, x)) == x**2/2 assert integrate(3*t, (t, 0, x)) == 3*x**2/2 assert integrate(3*t**2, (t, 0, x)) == x**3 assert integrate(1/t, (t, 1, x)) == log(x) assert integrate(-1/t**2, (t, 1, x)) == 1/x - 1 assert integrate(t**2 + 5*t - 8, (t, 0, x)) == x**3/3 + 5*x**2/2 - 8*x assert integrate(x**2, x) == x**3/3 assert integrate((3*t*x)**5, x) == (3*t)**5 * x**6 / 6 b = Symbol("b") c = Symbol("c") assert integrate(a*t, (t, 0, x)) == a*x**2/2 assert integrate(a*t**4, (t, 0, x)) == a*x**5/5 assert integrate(a*t**2 + b*t + c, (t, 0, x)) == a*x**3/3 + b*x**2/2 + c*x def test_multiple_integration(): assert integrate((x**2)*(y**2), (x, 0, 1), (y, -1, 2)) == Rational(1) assert integrate((y**2)*(x**2), x, y) == Rational(1, 9)*(x**3)*(y**3) assert integrate(1/(x + 3)/(1 + x)**3, x) == \ log(3 + x)*Rational(-1, 8) + log(1 + x)*Rational(1, 8) + x/(4 + 8*x + 4*x**2) assert integrate(sin(x*y)*y, (x, 0, 1), (y, 0, 1)) == -sin(1) + 1 def test_issue_3532(): assert integrate(exp(-x), (x, 0, oo)) == 1 def test_issue_3560(): assert integrate(sqrt(x)**3, x) == 2*sqrt(x)**5/5 assert integrate(sqrt(x), x) == 2*sqrt(x)**3/3 assert integrate(1/sqrt(x)**3, x) == -2/sqrt(x) def test_issue_18038(): raises(AttributeError, lambda: integrate((x, x))) def test_integrate_poly(): p = Poly(x + x**2*y + y**3, x, y) with warns_deprecated_sympy(): qx = integrate(p, x) with warns_deprecated_sympy(): qy = integrate(p, y) assert isinstance(qx, Poly) is True assert isinstance(qy, Poly) is True assert qx.gens == (x, y) assert qy.gens == (x, y) assert qx.as_expr() == x**2/2 + x**3*y/3 + x*y**3 assert qy.as_expr() == x*y + x**2*y**2/2 + y**4/4 def test_integrate_poly_defined(): p = Poly(x + x**2*y + y**3, x, y) with warns_deprecated_sympy(): Qx = integrate(p, (x, 0, 1)) with warns_deprecated_sympy(): Qy = integrate(p, (y, 0, pi)) assert isinstance(Qx, Poly) is True assert isinstance(Qy, Poly) is True assert Qx.gens == (y,) assert Qy.gens == (x,) assert Qx.as_expr() == S.Half + y/3 + y**3 assert Qy.as_expr() == pi**4/4 + pi*x + pi**2*x**2/2 def test_integrate_omit_var(): y = Symbol('y') assert integrate(x) == x**2/2 raises(ValueError, lambda: integrate(2)) raises(ValueError, lambda: integrate(x*y)) def test_integrate_poly_accurately(): y = Symbol('y') assert integrate(x*sin(y), x) == x**2*sin(y)/2 # when passed to risch_norman, this will be a CPU hog, so this really # checks, that integrated function is recognized as polynomial assert integrate(x**1000*sin(y), x) == x**1001*sin(y)/1001 def test_issue_3635(): y = Symbol('y') assert integrate(x**2, y) == x**2*y assert integrate(x**2, (y, -1, 1)) == 2*x**2 # works in SymPy and py.test but hangs in `setup.py test` def test_integrate_linearterm_pow(): # check integrate((a*x+b)^c, x) -- issue 3499 y = Symbol('y', positive=True) # TODO: Remove conds='none' below, let the assumption take care of it. assert integrate(x**y, x, conds='none') == x**(y + 1)/(y + 1) assert integrate((exp(y)*x + 1/y)**(1 + sin(y)), x, conds='none') == \ exp(-y)*(exp(y)*x + 1/y)**(2 + sin(y)) / (2 + sin(y)) def test_issue_3618(): assert integrate(pi*sqrt(x), x) == 2*pi*sqrt(x)**3/3 assert integrate(pi*sqrt(x) + E*sqrt(x)**3, x) == \ 2*pi*sqrt(x)**3/3 + 2*E *sqrt(x)**5/5 def test_issue_3623(): assert integrate(cos((n + 1)*x), x) == Piecewise( (sin(x*(n + 1))/(n + 1), Ne(n + 1, 0)), (x, True)) assert integrate(cos((n - 1)*x), x) == Piecewise( (sin(x*(n - 1))/(n - 1), Ne(n - 1, 0)), (x, True)) assert integrate(cos((n + 1)*x) + cos((n - 1)*x), x) == \ Piecewise((sin(x*(n - 1))/(n - 1), Ne(n - 1, 0)), (x, True)) + \ Piecewise((sin(x*(n + 1))/(n + 1), Ne(n + 1, 0)), (x, True)) def test_issue_3664(): n = Symbol('n', integer=True, nonzero=True) assert integrate(-1./2 * x * sin(n * pi * x/2), [x, -2, 0]) == \ 2.0*cos(pi*n)/(pi*n) assert integrate(x * sin(n * pi * x/2) * Rational(-1, 2), [x, -2, 0]) == \ 2*cos(pi*n)/(pi*n) def test_issue_3679(): # definite integration of rational functions gives wrong answers assert NS(Integral(1/(x**2 - 8*x + 17), (x, 2, 4))) == '1.10714871779409' def test_issue_3686(): # remove this when fresnel itegrals are implemented from sympy.core.function import expand_func from sympy.functions.special.error_functions import fresnels assert expand_func(integrate(sin(x**2), x)) == \ sqrt(2)*sqrt(pi)*fresnels(sqrt(2)*x/sqrt(pi))/2 def test_integrate_units(): m = units.m s = units.s assert integrate(x * m/s, (x, 1*s, 5*s)) == 12*m*s def test_transcendental_functions(): assert integrate(LambertW(2*x), x) == \ -x + x*LambertW(2*x) + x/LambertW(2*x) def test_log_polylog(): assert integrate(log(1 - x)/x, (x, 0, 1)) == -pi**2/6 assert integrate(log(x)*(1 - x)**(-1), (x, 0, 1)) == -pi**2/6 def test_issue_3740(): f = 4*log(x) - 2*log(x)**2 fid = diff(integrate(f, x), x) assert abs(f.subs(x, 42).evalf() - fid.subs(x, 42).evalf()) < 1e-10 def test_issue_3788(): assert integrate(1/(1 + x**2), x) == atan(x) def test_issue_3952(): f = sin(x) assert integrate(f, x) == -cos(x) raises(ValueError, lambda: integrate(f, 2*x)) def test_issue_4516(): assert integrate(2**x - 2*x, x) == 2**x/log(2) - x**2 def test_issue_7450(): ans = integrate(exp(-(1 + I)*x), (x, 0, oo)) assert re(ans) == S.Half and im(ans) == Rational(-1, 2) def test_issue_8623(): assert integrate((1 + cos(2*x)) / (3 - 2*cos(2*x)), (x, 0, pi)) == -pi/2 + sqrt(5)*pi/2 assert integrate((1 + cos(2*x))/(3 - 2*cos(2*x))) == -x/2 + sqrt(5)*(atan(sqrt(5)*tan(x)) + \ pi*floor((x - pi/2)/pi))/2 def test_issue_9569(): assert integrate(1 / (2 - cos(x)), (x, 0, pi)) == pi/sqrt(3) assert integrate(1/(2 - cos(x))) == 2*sqrt(3)*(atan(sqrt(3)*tan(x/2)) + pi*floor((x/2 - pi/2)/pi))/3 def test_issue_13733(): s = Symbol('s', positive=True) pz = exp(-(z - y)**2/(2*s*s))/sqrt(2*pi*s*s) pzgx = integrate(pz, (z, x, oo)) assert integrate(pzgx, (x, 0, oo)) == sqrt(2)*s*exp(-y**2/(2*s**2))/(2*sqrt(pi)) + \ y*erf(sqrt(2)*y/(2*s))/2 + y/2 def test_issue_13749(): assert integrate(1 / (2 + cos(x)), (x, 0, pi)) == pi/sqrt(3) assert integrate(1/(2 + cos(x))) == 2*sqrt(3)*(atan(sqrt(3)*tan(x/2)/3) + pi*floor((x/2 - pi/2)/pi))/3 def test_issue_18133(): assert integrate(exp(x)/(1 + x)**2, x) == NonElementaryIntegral(exp(x)/(x + 1)**2, x) def test_issue_21741(): a = Float('3999999.9999999995', precision=53) b = Float('2.5000000000000004e-7', precision=53) r = Piecewise((b*I*exp(-a*I*pi*t*y)*exp(-a*I*pi*x*z)/(pi*x), Ne(1.0*pi*x*exp(a*I*pi*t*y), 0)), (z*exp(-a*I*pi*t*y), True)) fun = E**((-2*I*pi*(z*x+t*y))/(500*10**(-9))) assert integrate(fun, z) == r def test_matrices(): M = Matrix(2, 2, lambda i, j: (i + j + 1)*sin((i + j + 1)*x)) assert integrate(M, x) == Matrix([ [-cos(x), -cos(2*x)], [-cos(2*x), -cos(3*x)], ]) def test_integrate_functions(): # issue 4111 assert integrate(f(x), x) == Integral(f(x), x) assert integrate(f(x), (x, 0, 1)) == Integral(f(x), (x, 0, 1)) assert integrate(f(x)*diff(f(x), x), x) == f(x)**2/2 assert integrate(diff(f(x), x) / f(x), x) == log(f(x)) def test_integrate_derivatives(): assert integrate(Derivative(f(x), x), x) == f(x) assert integrate(Derivative(f(y), y), x) == x*Derivative(f(y), y) assert integrate(Derivative(f(x), x)**2, x) == \ Integral(Derivative(f(x), x)**2, x) def test_transform(): a = Integral(x**2 + 1, (x, -1, 2)) fx = x fy = 3*y + 1 assert a.doit() == a.transform(fx, fy).doit() assert a.transform(fx, fy).transform(fy, fx) == a fx = 3*x + 1 fy = y assert a.transform(fx, fy).transform(fy, fx) == a a = Integral(sin(1/x), (x, 0, 1)) assert a.transform(x, 1/y) == Integral(sin(y)/y**2, (y, 1, oo)) assert a.transform(x, 1/y).transform(y, 1/x) == a a = Integral(exp(-x**2), (x, -oo, oo)) assert a.transform(x, 2*y) == Integral(2*exp(-4*y**2), (y, -oo, oo)) # < 3 arg limit handled properly assert Integral(x, x).transform(x, a*y).doit() == \ Integral(y*a**2, y).doit() _3 = S(3) assert Integral(x, (x, 0, -_3)).transform(x, 1/y).doit() == \ Integral(-1/x**3, (x, -oo, -1/_3)).doit() assert Integral(x, (x, 0, _3)).transform(x, 1/y) == \ Integral(y**(-3), (y, 1/_3, oo)) # issue 8400 i = Integral(x + y, (x, 1, 2), (y, 1, 2)) assert i.transform(x, (x + 2*y, x)).doit() == \ i.transform(x, (x + 2*z, x)).doit() == 3 i = Integral(x, (x, a, b)) assert i.transform(x, 2*s) == Integral(4*s, (s, a/2, b/2)) raises(ValueError, lambda: i.transform(x, 1)) raises(ValueError, lambda: i.transform(x, s*t)) raises(ValueError, lambda: i.transform(x, -s)) raises(ValueError, lambda: i.transform(x, (s, t))) raises(ValueError, lambda: i.transform(2*x, 2*s)) i = Integral(x**2, (x, 1, 2)) raises(ValueError, lambda: i.transform(x**2, s)) am = Symbol('a', negative=True) bp = Symbol('b', positive=True) i = Integral(x, (x, bp, am)) i.transform(x, 2*s) assert i.transform(x, 2*s) == Integral(-4*s, (s, am/2, bp/2)) i = Integral(x, (x, a)) assert i.transform(x, 2*s) == Integral(4*s, (s, a/2)) def test_issue_4052(): f = S.Half*asin(x) + x*sqrt(1 - x**2)/2 assert integrate(cos(asin(x)), x) == f assert integrate(sin(acos(x)), x) == f @slow def test_evalf_integrals(): assert NS(Integral(x, (x, 2, 5)), 15) == '10.5000000000000' gauss = Integral(exp(-x**2), (x, -oo, oo)) assert NS(gauss, 15) == '1.77245385090552' assert NS(gauss**2 - pi + E*Rational( 1, 10**20), 15) in ('2.71828182845904e-20', '2.71828182845905e-20') # A monster of an integral from http://mathworld.wolfram.com/DefiniteIntegral.html t = Symbol('t') a = 8*sqrt(3)/(1 + 3*t**2) b = 16*sqrt(2)*(3*t + 1)*sqrt(4*t**2 + t + 1)**3 c = (3*t**2 + 1)*(11*t**2 + 2*t + 3)**2 d = sqrt(2)*(249*t**2 + 54*t + 65)/(11*t**2 + 2*t + 3)**2 f = a - b/c - d assert NS(Integral(f, (t, 0, 1)), 50) == \ NS((3*sqrt(2) - 49*pi + 162*atan(sqrt(2)))/12, 50) # http://mathworld.wolfram.com/VardisIntegral.html assert NS(Integral(log(log(1/x))/(1 + x + x**2), (x, 0, 1)), 15) == \ NS('pi/sqrt(3) * log(2*pi**(5/6) / gamma(1/6))', 15) # http://mathworld.wolfram.com/AhmedsIntegral.html assert NS(Integral(atan(sqrt(x**2 + 2))/(sqrt(x**2 + 2)*(x**2 + 1)), (x, 0, 1)), 15) == NS(5*pi**2/96, 15) # http://mathworld.wolfram.com/AbelsIntegral.html assert NS(Integral(x/((exp(pi*x) - exp( -pi*x))*(x**2 + 1)), (x, 0, oo)), 15) == NS('log(2)/2-1/4', 15) # Complex part trimming # http://mathworld.wolfram.com/VardisIntegral.html assert NS(Integral(log(log(sin(x)/cos(x))), (x, pi/4, pi/2)), 15, chop=True) == \ NS('pi/4*log(4*pi**3/gamma(1/4)**4)', 15) # # Endpoints causing trouble (rounding error in integration points -> complex log) assert NS( 2 + Integral(log(2*cos(x/2)), (x, -pi, pi)), 17, chop=True) == NS(2, 17) assert NS( 2 + Integral(log(2*cos(x/2)), (x, -pi, pi)), 20, chop=True) == NS(2, 20) assert NS( 2 + Integral(log(2*cos(x/2)), (x, -pi, pi)), 22, chop=True) == NS(2, 22) # Needs zero handling assert NS(pi - 4*Integral( 'sqrt(1-x**2)', (x, 0, 1)), 15, maxn=30, chop=True) in ('0.0', '0') # Oscillatory quadrature a = Integral(sin(x)/x**2, (x, 1, oo)).evalf(maxn=15) assert 0.49 < a < 0.51 assert NS( Integral(sin(x)/x**2, (x, 1, oo)), quad='osc') == '0.504067061906928' assert NS(Integral( cos(pi*x + 1)/x, (x, -oo, -1)), quad='osc') == '0.276374705640365' # indefinite integrals aren't evaluated assert NS(Integral(x, x)) == 'Integral(x, x)' assert NS(Integral(x, (x, y))) == 'Integral(x, (x, y))' def test_evalf_issue_939(): # https://github.com/sympy/sympy/issues/4038 # The output form of an integral may differ by a step function between # revisions, making this test a bit useless. This can't be said about # other two tests. For now, all values of this evaluation are used here, # but in future this should be reconsidered. assert NS(integrate(1/(x**5 + 1), x).subs(x, 4), chop=True) in \ ['-0.000976138910649103', '0.965906660135753', '1.93278945918216'] assert NS(Integral(1/(x**5 + 1), (x, 2, 4))) == '0.0144361088886740' assert NS( integrate(1/(x**5 + 1), (x, 2, 4)), chop=True) == '0.0144361088886740' def test_double_previously_failing_integrals(): # Double integrals not implemented <- Sure it is! res = integrate(sqrt(x) + x*y, (x, 1, 2), (y, -1, 1)) # Old numerical test assert NS(res, 15) == '2.43790283299492' # Symbolic test assert res == Rational(-4, 3) + 8*sqrt(2)/3 # double integral + zero detection assert integrate(sin(x + x*y), (x, -1, 1), (y, -1, 1)) is S.Zero def test_integrate_SingularityFunction(): in_1 = SingularityFunction(x, a, 3) + SingularityFunction(x, 5, -1) out_1 = SingularityFunction(x, a, 4)/4 + SingularityFunction(x, 5, 0) assert integrate(in_1, x) == out_1 in_2 = 10*SingularityFunction(x, 4, 0) - 5*SingularityFunction(x, -6, -2) out_2 = 10*SingularityFunction(x, 4, 1) - 5*SingularityFunction(x, -6, -1) assert integrate(in_2, x) == out_2 in_3 = 2*x**2*y -10*SingularityFunction(x, -4, 7) - 2*SingularityFunction(y, 10, -2) out_3_1 = 2*x**3*y/3 - 2*x*SingularityFunction(y, 10, -2) - 5*SingularityFunction(x, -4, 8)/4 out_3_2 = x**2*y**2 - 10*y*SingularityFunction(x, -4, 7) - 2*SingularityFunction(y, 10, -1) assert integrate(in_3, x) == out_3_1 assert integrate(in_3, y) == out_3_2 assert unchanged(Integral, in_3, (x,)) assert Integral(in_3, x) == Integral(in_3, (x,)) assert Integral(in_3, x).doit() == out_3_1 in_4 = 10*SingularityFunction(x, -4, 7) - 2*SingularityFunction(x, 10, -2) out_4 = 5*SingularityFunction(x, -4, 8)/4 - 2*SingularityFunction(x, 10, -1) assert integrate(in_4, (x, -oo, x)) == out_4 assert integrate(SingularityFunction(x, 5, -1), x) == SingularityFunction(x, 5, 0) assert integrate(SingularityFunction(x, 0, -1), (x, -oo, oo)) == 1 assert integrate(5*SingularityFunction(x, 5, -1), (x, -oo, oo)) == 5 assert integrate(SingularityFunction(x, 5, -1) * f(x), (x, -oo, oo)) == f(5) def test_integrate_DiracDelta(): # This is here to check that deltaintegrate is being called, but also # to test definite integrals. More tests are in test_deltafunctions.py assert integrate(DiracDelta(x) * f(x), (x, -oo, oo)) == f(0) assert integrate(DiracDelta(x)**2, (x, -oo, oo)) == DiracDelta(0) # issue 4522 assert integrate(integrate((4 - 4*x + x*y - 4*y) * \ DiracDelta(x)*DiracDelta(y - 1), (x, 0, 1)), (y, 0, 1)) == 0 # issue 5729 p = exp(-(x**2 + y**2))/pi assert integrate(p*DiracDelta(x - 10*y), (x, -oo, oo), (y, -oo, oo)) == \ integrate(p*DiracDelta(x - 10*y), (y, -oo, oo), (x, -oo, oo)) == \ integrate(p*DiracDelta(10*x - y), (x, -oo, oo), (y, -oo, oo)) == \ integrate(p*DiracDelta(10*x - y), (y, -oo, oo), (x, -oo, oo)) == \ 1/sqrt(101*pi) def test_integrate_returns_piecewise(): assert integrate(x**y, x) == Piecewise( (x**(y + 1)/(y + 1), Ne(y, -1)), (log(x), True)) assert integrate(x**y, y) == Piecewise( (x**y/log(x), Ne(log(x), 0)), (y, True)) assert integrate(exp(n*x), x) == Piecewise( (exp(n*x)/n, Ne(n, 0)), (x, True)) assert integrate(x*exp(n*x), x) == Piecewise( ((n*x - 1)*exp(n*x)/n**2, Ne(n**2, 0)), (x**2/2, True)) assert integrate(x**(n*y), x) == Piecewise( (x**(n*y + 1)/(n*y + 1), Ne(n*y, -1)), (log(x), True)) assert integrate(x**(n*y), y) == Piecewise( (x**(n*y)/(n*log(x)), Ne(n*log(x), 0)), (y, True)) assert integrate(cos(n*x), x) == Piecewise( (sin(n*x)/n, Ne(n, 0)), (x, True)) assert integrate(cos(n*x)**2, x) == Piecewise( ((n*x/2 + sin(n*x)*cos(n*x)/2)/n, Ne(n, 0)), (x, True)) assert integrate(x*cos(n*x), x) == Piecewise( (x*sin(n*x)/n + cos(n*x)/n**2, Ne(n, 0)), (x**2/2, True)) assert integrate(sin(n*x), x) == Piecewise( (-cos(n*x)/n, Ne(n, 0)), (0, True)) assert integrate(sin(n*x)**2, x) == Piecewise( ((n*x/2 - sin(n*x)*cos(n*x)/2)/n, Ne(n, 0)), (0, True)) assert integrate(x*sin(n*x), x) == Piecewise( (-x*cos(n*x)/n + sin(n*x)/n**2, Ne(n, 0)), (0, True)) assert integrate(exp(x*y), (x, 0, z)) == Piecewise( (exp(y*z)/y - 1/y, (y > -oo) & (y < oo) & Ne(y, 0)), (z, True)) def test_integrate_max_min(): x = symbols('x', real=True) assert integrate(Min(x, 2), (x, 0, 3)) == 4 assert integrate(Max(x**2, x**3), (x, 0, 2)) == Rational(49, 12) assert integrate(Min(exp(x), exp(-x))**2, x) == Piecewise( \ (exp(2*x)/2, x <= 0), (1 - exp(-2*x)/2, True)) # issue 7907 c = symbols('c', extended_real=True) int1 = integrate(Max(c, x)*exp(-x**2), (x, -oo, oo)) int2 = integrate(c*exp(-x**2), (x, -oo, c)) int3 = integrate(x*exp(-x**2), (x, c, oo)) assert int1 == int2 + int3 == sqrt(pi)*c*erf(c)/2 + \ sqrt(pi)*c/2 + exp(-c**2)/2 def test_integrate_Abs_sign(): assert integrate(Abs(x), (x, -2, 1)) == Rational(5, 2) assert integrate(Abs(x), (x, 0, 1)) == S.Half assert integrate(Abs(x + 1), (x, 0, 1)) == Rational(3, 2) assert integrate(Abs(x**2 - 1), (x, -2, 2)) == 4 assert integrate(Abs(x**2 - 3*x), (x, -15, 15)) == 2259 assert integrate(sign(x), (x, -1, 2)) == 1 assert integrate(sign(x)*sin(x), (x, -pi, pi)) == 4 assert integrate(sign(x - 2) * x**2, (x, 0, 3)) == Rational(11, 3) t, s = symbols('t s', real=True) assert integrate(Abs(t), t) == Piecewise( (-t**2/2, t <= 0), (t**2/2, True)) assert integrate(Abs(2*t - 6), t) == Piecewise( (-t**2 + 6*t, t <= 3), (t**2 - 6*t + 18, True)) assert (integrate(abs(t - s**2), (t, 0, 2)) == 2*s**2*Min(2, s**2) - 2*s**2 - Min(2, s**2)**2 + 2) assert integrate(exp(-Abs(t)), t) == Piecewise( (exp(t), t <= 0), (2 - exp(-t), True)) assert integrate(sign(2*t - 6), t) == Piecewise( (-t, t < 3), (t - 6, True)) assert integrate(2*t*sign(t**2 - 1), t) == Piecewise( (t**2, t < -1), (-t**2 + 2, t < 1), (t**2, True)) assert integrate(sign(t), (t, s + 1)) == Piecewise( (s + 1, s + 1 > 0), (-s - 1, s + 1 < 0), (0, True)) def test_subs1(): e = Integral(exp(x - y), x) assert e.subs(y, 3) == Integral(exp(x - 3), x) e = Integral(exp(x - y), (x, 0, 1)) assert e.subs(y, 3) == Integral(exp(x - 3), (x, 0, 1)) f = Lambda(x, exp(-x**2)) conv = Integral(f(x - y)*f(y), (y, -oo, oo)) assert conv.subs({x: 0}) == Integral(exp(-2*y**2), (y, -oo, oo)) def test_subs2(): e = Integral(exp(x - y), x, t) assert e.subs(y, 3) == Integral(exp(x - 3), x, t) e = Integral(exp(x - y), (x, 0, 1), (t, 0, 1)) assert e.subs(y, 3) == Integral(exp(x - 3), (x, 0, 1), (t, 0, 1)) f = Lambda(x, exp(-x**2)) conv = Integral(f(x - y)*f(y), (y, -oo, oo), (t, 0, 1)) assert conv.subs({x: 0}) == Integral(exp(-2*y**2), (y, -oo, oo), (t, 0, 1)) def test_subs3(): e = Integral(exp(x - y), (x, 0, y), (t, y, 1)) assert e.subs(y, 3) == Integral(exp(x - 3), (x, 0, 3), (t, 3, 1)) f = Lambda(x, exp(-x**2)) conv = Integral(f(x - y)*f(y), (y, -oo, oo), (t, x, 1)) assert conv.subs({x: 0}) == Integral(exp(-2*y**2), (y, -oo, oo), (t, 0, 1)) def test_subs4(): e = Integral(exp(x), (x, 0, y), (t, y, 1)) assert e.subs(y, 3) == Integral(exp(x), (x, 0, 3), (t, 3, 1)) f = Lambda(x, exp(-x**2)) conv = Integral(f(y)*f(y), (y, -oo, oo), (t, x, 1)) assert conv.subs({x: 0}) == Integral(exp(-2*y**2), (y, -oo, oo), (t, 0, 1)) def test_subs5(): e = Integral(exp(-x**2), (x, -oo, oo)) assert e.subs(x, 5) == e e = Integral(exp(-x**2 + y), x) assert e.subs(y, 5) == Integral(exp(-x**2 + 5), x) e = Integral(exp(-x**2 + y), (x, x)) assert e.subs(x, 5) == Integral(exp(y - x**2), (x, 5)) assert e.subs(y, 5) == Integral(exp(-x**2 + 5), x) e = Integral(exp(-x**2 + y), (y, -oo, oo), (x, -oo, oo)) assert e.subs(x, 5) == e assert e.subs(y, 5) == e # Test evaluation of antiderivatives e = Integral(exp(-x**2), (x, x)) assert e.subs(x, 5) == Integral(exp(-x**2), (x, 5)) e = Integral(exp(x), x) assert (e.subs(x,1) - e.subs(x,0) - Integral(exp(x), (x, 0, 1)) ).doit().is_zero def test_subs6(): a, b = symbols('a b') e = Integral(x*y, (x, f(x), f(y))) assert e.subs(x, 1) == Integral(x*y, (x, f(1), f(y))) assert e.subs(y, 1) == Integral(x, (x, f(x), f(1))) e = Integral(x*y, (x, f(x), f(y)), (y, f(x), f(y))) assert e.subs(x, 1) == Integral(x*y, (x, f(1), f(y)), (y, f(1), f(y))) assert e.subs(y, 1) == Integral(x*y, (x, f(x), f(y)), (y, f(x), f(1))) e = Integral(x*y, (x, f(x), f(a)), (y, f(x), f(a))) assert e.subs(a, 1) == Integral(x*y, (x, f(x), f(1)), (y, f(x), f(1))) def test_subs7(): e = Integral(x, (x, 1, y), (y, 1, 2)) assert e.subs({x: 1, y: 2}) == e e = Integral(sin(x) + sin(y), (x, sin(x), sin(y)), (y, 1, 2)) assert e.subs(sin(y), 1) == e assert e.subs(sin(x), 1) == Integral(sin(x) + sin(y), (x, 1, sin(y)), (y, 1, 2)) def test_expand(): e = Integral(f(x)+f(x**2), (x, 1, y)) assert e.expand() == Integral(f(x), (x, 1, y)) + Integral(f(x**2), (x, 1, y)) def test_integration_variable(): raises(ValueError, lambda: Integral(exp(-x**2), 3)) raises(ValueError, lambda: Integral(exp(-x**2), (3, -oo, oo))) def test_expand_integral(): assert Integral(cos(x**2)*(sin(x**2) + 1), (x, 0, 1)).expand() == \ Integral(cos(x**2)*sin(x**2), (x, 0, 1)) + \ Integral(cos(x**2), (x, 0, 1)) assert Integral(cos(x**2)*(sin(x**2) + 1), x).expand() == \ Integral(cos(x**2)*sin(x**2), x) + \ Integral(cos(x**2), x) def test_as_sum_midpoint1(): e = Integral(sqrt(x**3 + 1), (x, 2, 10)) assert e.as_sum(1, method="midpoint") == 8*sqrt(217) assert e.as_sum(2, method="midpoint") == 4*sqrt(65) + 12*sqrt(57) assert e.as_sum(3, method="midpoint") == 8*sqrt(217)/3 + \ 8*sqrt(3081)/27 + 8*sqrt(52809)/27 assert e.as_sum(4, method="midpoint") == 2*sqrt(730) + \ 4*sqrt(7) + 4*sqrt(86) + 6*sqrt(14) assert abs(e.as_sum(4, method="midpoint").n() - e.n()) < 0.5 e = Integral(sqrt(x**3 + y**3), (x, 2, 10), (y, 0, 10)) raises(NotImplementedError, lambda: e.as_sum(4)) def test_as_sum_midpoint2(): e = Integral((x + y)**2, (x, 0, 1)) n = Symbol('n', positive=True, integer=True) assert e.as_sum(1, method="midpoint").expand() == Rational(1, 4) + y + y**2 assert e.as_sum(2, method="midpoint").expand() == Rational(5, 16) + y + y**2 assert e.as_sum(3, method="midpoint").expand() == Rational(35, 108) + y + y**2 assert e.as_sum(4, method="midpoint").expand() == Rational(21, 64) + y + y**2 assert e.as_sum(n, method="midpoint").expand() == \ y**2 + y + Rational(1, 3) - 1/(12*n**2) def test_as_sum_left(): e = Integral((x + y)**2, (x, 0, 1)) assert e.as_sum(1, method="left").expand() == y**2 assert e.as_sum(2, method="left").expand() == Rational(1, 8) + y/2 + y**2 assert e.as_sum(3, method="left").expand() == Rational(5, 27) + y*Rational(2, 3) + y**2 assert e.as_sum(4, method="left").expand() == Rational(7, 32) + y*Rational(3, 4) + y**2 assert e.as_sum(n, method="left").expand() == \ y**2 + y + Rational(1, 3) - y/n - 1/(2*n) + 1/(6*n**2) assert e.as_sum(10, method="left", evaluate=False).has(Sum) def test_as_sum_right(): e = Integral((x + y)**2, (x, 0, 1)) assert e.as_sum(1, method="right").expand() == 1 + 2*y + y**2 assert e.as_sum(2, method="right").expand() == Rational(5, 8) + y*Rational(3, 2) + y**2 assert e.as_sum(3, method="right").expand() == Rational(14, 27) + y*Rational(4, 3) + y**2 assert e.as_sum(4, method="right").expand() == Rational(15, 32) + y*Rational(5, 4) + y**2 assert e.as_sum(n, method="right").expand() == \ y**2 + y + Rational(1, 3) + y/n + 1/(2*n) + 1/(6*n**2) def test_as_sum_trapezoid(): e = Integral((x + y)**2, (x, 0, 1)) assert e.as_sum(1, method="trapezoid").expand() == y**2 + y + S.Half assert e.as_sum(2, method="trapezoid").expand() == y**2 + y + Rational(3, 8) assert e.as_sum(3, method="trapezoid").expand() == y**2 + y + Rational(19, 54) assert e.as_sum(4, method="trapezoid").expand() == y**2 + y + Rational(11, 32) assert e.as_sum(n, method="trapezoid").expand() == \ y**2 + y + Rational(1, 3) + 1/(6*n**2) assert Integral(sign(x), (x, 0, 1)).as_sum(1, 'trapezoid') == S.Half def test_as_sum_raises(): e = Integral((x + y)**2, (x, 0, 1)) raises(ValueError, lambda: e.as_sum(-1)) raises(ValueError, lambda: e.as_sum(0)) raises(ValueError, lambda: Integral(x).as_sum(3)) raises(ValueError, lambda: e.as_sum(oo)) raises(ValueError, lambda: e.as_sum(3, method='xxxx2')) def test_nested_doit(): e = Integral(Integral(x, x), x) f = Integral(x, x, x) assert e.doit() == f.doit() def test_issue_4665(): # Allow only upper or lower limit evaluation e = Integral(x**2, (x, None, 1)) f = Integral(x**2, (x, 1, None)) assert e.doit() == Rational(1, 3) assert f.doit() == Rational(-1, 3) assert Integral(x*y, (x, None, y)).subs(y, t) == Integral(x*t, (x, None, t)) assert Integral(x*y, (x, y, None)).subs(y, t) == Integral(x*t, (x, t, None)) assert integrate(x**2, (x, None, 1)) == Rational(1, 3) assert integrate(x**2, (x, 1, None)) == Rational(-1, 3) assert integrate("x**2", ("x", "1", None)) == Rational(-1, 3) def test_integral_reconstruct(): e = Integral(x**2, (x, -1, 1)) assert e == Integral(*e.args) def test_doit_integrals(): e = Integral(Integral(2*x), (x, 0, 1)) assert e.doit() == Rational(1, 3) assert e.doit(deep=False) == Rational(1, 3) f = Function('f') # doesn't matter if the integral can't be performed assert Integral(f(x), (x, 1, 1)).doit() == 0 # doesn't matter if the limits can't be evaluated assert Integral(0, (x, 1, Integral(f(x), x))).doit() == 0 assert Integral(x, (a, 0)).doit() == 0 limits = ((a, 1, exp(x)), (x, 0)) assert Integral(a, *limits).doit() == Rational(1, 4) assert Integral(a, *list(reversed(limits))).doit() == 0 def test_issue_4884(): assert integrate(sqrt(x)*(1 + x)) == \ Piecewise( (2*sqrt(x)*(x + 1)**2/5 - 2*sqrt(x)*(x + 1)/15 - 4*sqrt(x)/15, Abs(x + 1) > 1), (2*I*sqrt(-x)*(x + 1)**2/5 - 2*I*sqrt(-x)*(x + 1)/15 - 4*I*sqrt(-x)/15, True)) assert integrate(x**x*(1 + log(x))) == x**x def test_issue_18153(): assert integrate(x**n*log(x),x) == \ Piecewise( (n*x*x**n*log(x)/(n**2 + 2*n + 1) + x*x**n*log(x)/(n**2 + 2*n + 1) - x*x**n/(n**2 + 2*n + 1) , Ne(n, -1)), (log(x)**2/2, True) ) def test_is_number(): from sympy.abc import x, y, z assert Integral(x).is_number is False assert Integral(1, x).is_number is False assert Integral(1, (x, 1)).is_number is True assert Integral(1, (x, 1, 2)).is_number is True assert Integral(1, (x, 1, y)).is_number is False assert Integral(1, (x, y)).is_number is False assert Integral(x, y).is_number is False assert Integral(x, (y, 1, x)).is_number is False assert Integral(x, (y, 1, 2)).is_number is False assert Integral(x, (x, 1, 2)).is_number is True # `foo.is_number` should always be equivalent to `not foo.free_symbols` # in each of these cases, there are pseudo-free symbols i = Integral(x, (y, 1, 1)) assert i.is_number is False and i.n() == 0 i = Integral(x, (y, z, z)) assert i.is_number is False and i.n() == 0 i = Integral(1, (y, z, z + 2)) assert i.is_number is False and i.n() == 2 assert Integral(x*y, (x, 1, 2), (y, 1, 3)).is_number is True assert Integral(x*y, (x, 1, 2), (y, 1, z)).is_number is False assert Integral(x, (x, 1)).is_number is True assert Integral(x, (x, 1, Integral(y, (y, 1, 2)))).is_number is True assert Integral(Sum(z, (z, 1, 2)), (x, 1, 2)).is_number is True # it is possible to get a false negative if the integrand is # actually an unsimplified zero, but this is true of is_number in general. assert Integral(sin(x)**2 + cos(x)**2 - 1, x).is_number is False assert Integral(f(x), (x, 0, 1)).is_number is True def test_symbols(): from sympy.abc import x, y, z assert Integral(0, x).free_symbols == {x} assert Integral(x).free_symbols == {x} assert Integral(x, (x, None, y)).free_symbols == {y} assert Integral(x, (x, y, None)).free_symbols == {y} assert Integral(x, (x, 1, y)).free_symbols == {y} assert Integral(x, (x, y, 1)).free_symbols == {y} assert Integral(x, (x, x, y)).free_symbols == {x, y} assert Integral(x, x, y).free_symbols == {x, y} assert Integral(x, (x, 1, 2)).free_symbols == set() assert Integral(x, (y, 1, 2)).free_symbols == {x} # pseudo-free in this case assert Integral(x, (y, z, z)).free_symbols == {x, z} assert Integral(x, (y, 1, 2), (y, None, None)).free_symbols == {x, y} assert Integral(x, (y, 1, 2), (x, 1, y)).free_symbols == {y} assert Integral(2, (y, 1, 2), (y, 1, x), (x, 1, 2)).free_symbols == set() assert Integral(2, (y, x, 2), (y, 1, x), (x, 1, 2)).free_symbols == set() assert Integral(2, (x, 1, 2), (y, x, 2), (y, 1, 2)).free_symbols == \ {x} def test_is_zero(): from sympy.abc import x, m assert Integral(0, (x, 1, x)).is_zero assert Integral(1, (x, 1, 1)).is_zero assert Integral(1, (x, 1, 2), (y, 2)).is_zero is False assert Integral(x, (m, 0)).is_zero assert Integral(x + m, (m, 0)).is_zero is None i = Integral(m, (m, 1, exp(x)), (x, 0)) assert i.is_zero is None assert Integral(m, (x, 0), (m, 1, exp(x))).is_zero is True assert Integral(x, (x, oo, oo)).is_zero # issue 8171 assert Integral(x, (x, -oo, -oo)).is_zero # this is zero but is beyond the scope of what is_zero # should be doing assert Integral(sin(x), (x, 0, 2*pi)).is_zero is None def test_series(): from sympy.abc import x i = Integral(cos(x), (x, x)) e = i.lseries(x) assert i.nseries(x, n=8).removeO() == Add(*[next(e) for j in range(4)]) def test_trig_nonelementary_integrals(): x = Symbol('x') assert integrate((1 + sin(x))/x, x) == log(x) + Si(x) # next one comes out as log(x) + log(x**2)/2 + Ci(x) # so not hardcoding this log ugliness assert integrate((cos(x) + 2)/x, x).has(Ci) def test_issue_4403(): x = Symbol('x') y = Symbol('y') z = Symbol('z', positive=True) assert integrate(sqrt(x**2 + z**2), x) == \ z**2*asinh(x/z)/2 + x*sqrt(x**2 + z**2)/2 assert integrate(sqrt(x**2 - z**2), x) == \ -z**2*acosh(x/z)/2 + x*sqrt(x**2 - z**2)/2 x = Symbol('x', real=True) y = Symbol('y', positive=True) assert integrate(1/(x**2 + y**2)**S('3/2'), x) == \ x/(y**2*sqrt(x**2 + y**2)) # If y is real and nonzero, we get x*Abs(y)/(y**3*sqrt(x**2 + y**2)), # which results from sqrt(1 + x**2/y**2) = sqrt(x**2 + y**2)/|y|. def test_issue_4403_2(): assert integrate(sqrt(-x**2 - 4), x) == \ -2*atan(x/sqrt(-4 - x**2)) + x*sqrt(-4 - x**2)/2 def test_issue_4100(): R = Symbol('R', positive=True) assert integrate(sqrt(R**2 - x**2), (x, 0, R)) == pi*R**2/4 def test_issue_5167(): from sympy.abc import w, x, y, z f = Function('f') assert Integral(Integral(f(x), x), x) == Integral(f(x), x, x) assert Integral(f(x)).args == (f(x), Tuple(x)) assert Integral(Integral(f(x))).args == (f(x), Tuple(x), Tuple(x)) assert Integral(Integral(f(x)), y).args == (f(x), Tuple(x), Tuple(y)) assert Integral(Integral(f(x), z), y).args == (f(x), Tuple(z), Tuple(y)) assert Integral(Integral(Integral(f(x), x), y), z).args == \ (f(x), Tuple(x), Tuple(y), Tuple(z)) assert integrate(Integral(f(x), x), x) == Integral(f(x), x, x) assert integrate(Integral(f(x), y), x) == y*Integral(f(x), x) assert integrate(Integral(f(x), x), y) in [Integral(y*f(x), x), y*Integral(f(x), x)] assert integrate(Integral(2, x), x) == x**2 assert integrate(Integral(2, x), y) == 2*x*y # don't re-order given limits assert Integral(1, x, y).args != Integral(1, y, x).args # do as many as possible assert Integral(f(x), y, x, y, x).doit() == y**2*Integral(f(x), x, x)/2 assert Integral(f(x), (x, 1, 2), (w, 1, x), (z, 1, y)).doit() == \ y*(x - 1)*Integral(f(x), (x, 1, 2)) - (x - 1)*Integral(f(x), (x, 1, 2)) def test_issue_4890(): z = Symbol('z', positive=True) assert integrate(exp(-log(x)**2), x) == \ sqrt(pi)*exp(Rational(1, 4))*erf(log(x) - S.Half)/2 assert integrate(exp(log(x)**2), x) == \ sqrt(pi)*exp(Rational(-1, 4))*erfi(log(x)+S.Half)/2 assert integrate(exp(-z*log(x)**2), x) == \ sqrt(pi)*exp(1/(4*z))*erf(sqrt(z)*log(x) - 1/(2*sqrt(z)))/(2*sqrt(z)) def test_issue_4551(): assert not integrate(1/(x*sqrt(1 - x**2)), x).has(Integral) def test_issue_4376(): n = Symbol('n', integer=True, positive=True) assert simplify(integrate(n*(x**(1/n) - 1), (x, 0, S.Half)) - (n**2 - 2**(1/n)*n**2 - n*2**(1/n))/(2**(1 + 1/n) + n*2**(1 + 1/n))) == 0 def test_issue_4517(): assert integrate((sqrt(x) - x**3)/x**Rational(1, 3), x) == \ 6*x**Rational(7, 6)/7 - 3*x**Rational(11, 3)/11 def test_issue_4527(): k, m = symbols('k m', integer=True) assert integrate(sin(k*x)*sin(m*x), (x, 0, pi)).simplify() == \ Piecewise((0, Eq(k, 0) | Eq(m, 0)), (-pi/2, Eq(k, -m) | (Eq(k, 0) & Eq(m, 0))), (pi/2, Eq(k, m) | (Eq(k, 0) & Eq(m, 0))), (0, True)) # Should be possible to further simplify to: # Piecewise( # (0, Eq(k, 0) | Eq(m, 0)), # (-pi/2, Eq(k, -m)), # (pi/2, Eq(k, m)), # (0, True)) assert integrate(sin(k*x)*sin(m*x), (x,)) == Piecewise( (0, And(Eq(k, 0), Eq(m, 0))), (-x*sin(m*x)**2/2 - x*cos(m*x)**2/2 + sin(m*x)*cos(m*x)/(2*m), Eq(k, -m)), (x*sin(m*x)**2/2 + x*cos(m*x)**2/2 - sin(m*x)*cos(m*x)/(2*m), Eq(k, m)), (m*sin(k*x)*cos(m*x)/(k**2 - m**2) - k*sin(m*x)*cos(k*x)/(k**2 - m**2), True)) def test_issue_4199(): ypos = Symbol('y', positive=True) # TODO: Remove conds='none' below, let the assumption take care of it. assert integrate(exp(-I*2*pi*ypos*x)*x, (x, -oo, oo), conds='none') == \ Integral(exp(-I*2*pi*ypos*x)*x, (x, -oo, oo)) def test_issue_3940(): a, b, c, d = symbols('a:d', positive=True, finite=True) assert integrate(exp(-x**2 + I*c*x), x) == \ -sqrt(pi)*exp(-c**2/4)*erf(I*c/2 - x)/2 assert integrate(exp(a*x**2 + b*x + c), x) == \ sqrt(pi)*exp(c)*exp(-b**2/(4*a))*erfi(sqrt(a)*x + b/(2*sqrt(a)))/(2*sqrt(a)) from sympy.core.function import expand_mul from sympy.abc import k assert expand_mul(integrate(exp(-x**2)*exp(I*k*x), (x, -oo, oo))) == \ sqrt(pi)*exp(-k**2/4) a, d = symbols('a d', positive=True) assert expand_mul(integrate(exp(-a*x**2 + 2*d*x), (x, -oo, oo))) == \ sqrt(pi)*exp(d**2/a)/sqrt(a) def test_issue_5413(): # Note that this is not the same as testing ratint() because integrate() # pulls out the coefficient. assert integrate(-a/(a**2 + x**2), x) == I*log(-I*a + x)/2 - I*log(I*a + x)/2 def test_issue_4892a(): A, z = symbols('A z') c = Symbol('c', nonzero=True) P1 = -A*exp(-z) P2 = -A/(c*t)*(sin(x)**2 + cos(y)**2) h1 = -sin(x)**2 - cos(y)**2 h2 = -sin(x)**2 + sin(y)**2 - 1 # there is still some non-deterministic behavior in integrate # or trigsimp which permits one of the following assert integrate(c*(P2 - P1), t) in [ c*(-A*(-h1)*log(c*t)/c + A*t*exp(-z)), c*(-A*(-h2)*log(c*t)/c + A*t*exp(-z)), c*( A* h1 *log(c*t)/c + A*t*exp(-z)), c*( A* h2 *log(c*t)/c + A*t*exp(-z)), (A*c*t - A*(-h1)*log(t)*exp(z))*exp(-z), (A*c*t - A*(-h2)*log(t)*exp(z))*exp(-z), ] def test_issue_4892b(): # Issues relating to issue 4596 are making the actual result of this hard # to test. The answer should be something like # # (-sin(y) + sqrt(-72 + 48*cos(y) - 8*cos(y)**2)/2)*log(x + sqrt(-72 + # 48*cos(y) - 8*cos(y)**2)/(2*(3 - cos(y)))) + (-sin(y) - sqrt(-72 + # 48*cos(y) - 8*cos(y)**2)/2)*log(x - sqrt(-72 + 48*cos(y) - # 8*cos(y)**2)/(2*(3 - cos(y)))) + x**2*sin(y)/2 + 2*x*cos(y) expr = (sin(y)*x**3 + 2*cos(y)*x**2 + 12)/(x**2 + 2) assert trigsimp(factor(integrate(expr, x).diff(x) - expr)) == 0 def test_issue_5178(): assert integrate(sin(x)*f(y, z), (x, 0, pi), (y, 0, pi), (z, 0, pi)) == \ 2*Integral(f(y, z), (y, 0, pi), (z, 0, pi)) def test_integrate_series(): f = sin(x).series(x, 0, 10) g = x**2/2 - x**4/24 + x**6/720 - x**8/40320 + x**10/3628800 + O(x**11) assert integrate(f, x) == g assert diff(integrate(f, x), x) == f assert integrate(O(x**5), x) == O(x**6) def test_atom_bug(): from sympy.integrals.heurisch import heurisch assert heurisch(meijerg([], [], [1], [], x), x) is None def test_limit_bug(): z = Symbol('z', zero=False) assert integrate(sin(x*y*z), (x, 0, pi), (y, 0, pi)).together() == \ (log(z) - Ci(pi**2*z) + EulerGamma + 2*log(pi))/z def test_issue_4703(): g = Function('g') assert integrate(exp(x)*g(x), x).has(Integral) def test_issue_1888(): f = Function('f') assert integrate(f(x).diff(x)**2, x).has(Integral) # The following tests work using meijerint. def test_issue_3558(): assert integrate(cos(x*y), (x, -pi/2, pi/2), (y, 0, pi)) == 2*Si(pi**2/2) def test_issue_4422(): assert integrate(1/sqrt(16 + 4*x**2), x) == asinh(x/2) / 2 def test_issue_4493(): assert simplify(integrate(x*sqrt(1 + 2*x), x)) == \ sqrt(2*x + 1)*(6*x**2 + x - 1)/15 def test_issue_4737(): assert integrate(sin(x)/x, (x, -oo, oo)) == pi assert integrate(sin(x)/x, (x, 0, oo)) == pi/2 assert integrate(sin(x)/x, x) == Si(x) def test_issue_4992(): # Note: psi in _check_antecedents becomes NaN. from sympy.core.function import expand_func a = Symbol('a', positive=True) assert simplify(expand_func(integrate(exp(-x)*log(x)*x**a, (x, 0, oo)))) == \ (a*polygamma(0, a) + 1)*gamma(a) def test_issue_4487(): from sympy.functions.special.gamma_functions import lowergamma assert simplify(integrate(exp(-x)*x**y, x)) == lowergamma(y + 1, x) def test_issue_4215(): x = Symbol("x") assert integrate(1/(x**2), (x, -1, 1)) is oo def test_issue_4400(): n = Symbol('n', integer=True, positive=True) assert integrate((x**n)*log(x), x) == \ n*x*x**n*log(x)/(n**2 + 2*n + 1) + x*x**n*log(x)/(n**2 + 2*n + 1) - \ x*x**n/(n**2 + 2*n + 1) def test_issue_6253(): # Note: this used to raise NotImplementedError # Note: psi in _check_antecedents becomes NaN. assert integrate((sqrt(1 - x) + sqrt(1 + x))**2/x, x, meijerg=True) == \ Integral((sqrt(-x + 1) + sqrt(x + 1))**2/x, x) def test_issue_4153(): assert integrate(1/(1 + x + y + z), (x, 0, 1), (y, 0, 1), (z, 0, 1)) in [ -12*log(3) - 3*log(6)/2 + 3*log(8)/2 + 5*log(2) + 7*log(4), 6*log(2) + 8*log(4) - 27*log(3)/2, 22*log(2) - 27*log(3)/2, -12*log(3) - 3*log(6)/2 + 47*log(2)/2] def test_issue_4326(): R, b, h = symbols('R b h') # It doesn't matter if we can do the integral. Just make sure the result # doesn't contain nan. This is really a test against _eval_interval. e = integrate(((h*(x - R + b))/b)*sqrt(R**2 - x**2), (x, R - b, R)) assert not e.has(nan) # See that it evaluates assert not e.has(Integral) def test_powers(): assert integrate(2**x + 3**x, x) == 2**x/log(2) + 3**x/log(3) def test_manual_option(): raises(ValueError, lambda: integrate(1/x, x, manual=True, meijerg=True)) # an example of a function that manual integration cannot handle assert integrate(log(1+x)/x, (x, 0, 1), manual=True).has(Integral) def test_meijerg_option(): raises(ValueError, lambda: integrate(1/x, x, meijerg=True, risch=True)) # an example of a function that meijerg integration cannot handle assert integrate(tan(x), x, meijerg=True) == Integral(tan(x), x) def test_risch_option(): # risch=True only allowed on indefinite integrals raises(ValueError, lambda: integrate(1/log(x), (x, 0, oo), risch=True)) assert integrate(exp(-x**2), x, risch=True) == NonElementaryIntegral(exp(-x**2), x) assert integrate(log(1/x)*y, x, y, risch=True) == y**2*(x*log(1/x)/2 + x/2) assert integrate(erf(x), x, risch=True) == Integral(erf(x), x) # TODO: How to test risch=False? @slow def test_heurisch_option(): raises(ValueError, lambda: integrate(1/x, x, risch=True, heurisch=True)) # an integral that heurisch can handle assert integrate(exp(x**2), x, heurisch=True) == sqrt(pi)*erfi(x)/2 # an integral that heurisch currently cannot handle assert integrate(exp(x)/x, x, heurisch=True) == Integral(exp(x)/x, x) # an integral where heurisch currently hangs, issue 15471 assert integrate(log(x)*cos(log(x))/x**Rational(3, 4), x, heurisch=False) == ( -128*x**Rational(1, 4)*sin(log(x))/289 + 240*x**Rational(1, 4)*cos(log(x))/289 + (16*x**Rational(1, 4)*sin(log(x))/17 + 4*x**Rational(1, 4)*cos(log(x))/17)*log(x)) def test_issue_6828(): f = 1/(1.08*x**2 - 4.3) g = integrate(f, x).diff(x) assert verify_numerically(f, g, tol=1e-12) def test_issue_4803(): x_max = Symbol("x_max") assert integrate(y/pi*exp(-(x_max - x)/cos(a)), x) == \ y*exp((x - x_max)/cos(a))*cos(a)/pi def test_issue_4234(): assert integrate(1/sqrt(1 + tan(x)**2)) == tan(x)/sqrt(1 + tan(x)**2) def test_issue_4492(): assert simplify(integrate(x**2 * sqrt(5 - x**2), x)).factor( deep=True) == Piecewise( (I*(2*x**5 - 15*x**3 + 25*x - 25*sqrt(x**2 - 5)*acosh(sqrt(5)*x/5)) / (8*sqrt(x**2 - 5)), (x > sqrt(5)) | (x < -sqrt(5))), ((2*x**5 - 15*x**3 + 25*x - 25*sqrt(5 - x**2)*asin(sqrt(5)*x/5)) / (-8*sqrt(-x**2 + 5)), True)) def test_issue_2708(): # This test needs to use an integration function that can # not be evaluated in closed form. Update as needed. f = 1/(a + z + log(z)) integral_f = NonElementaryIntegral(f, (z, 2, 3)) assert Integral(f, (z, 2, 3)).doit() == integral_f assert integrate(f + exp(z), (z, 2, 3)) == integral_f - exp(2) + exp(3) assert integrate(2*f + exp(z), (z, 2, 3)) == \ 2*integral_f - exp(2) + exp(3) assert integrate(exp(1.2*n*s*z*(-t + z)/t), (z, 0, x)) == \ NonElementaryIntegral(exp(-1.2*n*s*z)*exp(1.2*n*s*z**2/t), (z, 0, x)) def test_issue_2884(): f = (4.000002016020*x + 4.000002016020*y + 4.000006024032)*exp(10.0*x) e = integrate(f, (x, 0.1, 0.2)) assert str(e) == '1.86831064982608*y + 2.16387491480008' def test_issue_8368i(): from sympy.functions.elementary.complexes import arg, Abs assert integrate(exp(-s*x)*cosh(x), (x, 0, oo)) == \ Piecewise( ( pi*Piecewise( ( -s/(pi*(-s**2 + 1)), Abs(s**2) < 1), ( 1/(pi*s*(1 - 1/s**2)), Abs(s**(-2)) < 1), ( meijerg( ((S.Half,), (0, 0)), ((0, S.Half), (0,)), polar_lift(s)**2), True) ), s**2 > 1 ), ( Integral(exp(-s*x)*cosh(x), (x, 0, oo)), True)) assert integrate(exp(-s*x)*sinh(x), (x, 0, oo)) == \ Piecewise( ( -1/(s + 1)/2 - 1/(-s + 1)/2, And( Abs(s) > 1, Abs(arg(s)) < pi/2, Abs(arg(s)) <= pi/2 )), ( Integral(exp(-s*x)*sinh(x), (x, 0, oo)), True)) def test_issue_8901(): assert integrate(sinh(1.0*x)) == 1.0*cosh(1.0*x) assert integrate(tanh(1.0*x)) == 1.0*x - 1.0*log(tanh(1.0*x) + 1) assert integrate(tanh(x)) == x - log(tanh(x) + 1) @slow def test_issue_8945(): assert integrate(sin(x)**3/x, (x, 0, 1)) == -Si(3)/4 + 3*Si(1)/4 assert integrate(sin(x)**3/x, (x, 0, oo)) == pi/4 assert integrate(cos(x)**2/x**2, x) == -Si(2*x) - cos(2*x)/(2*x) - 1/(2*x) @slow def test_issue_7130(): if ON_TRAVIS: skip("Too slow for travis.") i, L, a, b = symbols('i L a b') integrand = (cos(pi*i*x/L)**2 / (a + b*x)).rewrite(exp) assert x not in integrate(integrand, (x, 0, L)).free_symbols def test_issue_10567(): a, b, c, t = symbols('a b c t') vt = Matrix([a*t, b, c]) assert integrate(vt, t) == Integral(vt, t).doit() assert integrate(vt, t) == Matrix([[a*t**2/2], [b*t], [c*t]]) def test_issue_11856(): t = symbols('t') assert integrate(sinc(pi*t), t) == Si(pi*t)/pi @slow def test_issue_11876(): assert integrate(sqrt(log(1/x)), (x, 0, 1)) == sqrt(pi)/2 def test_issue_4950(): assert integrate((-60*exp(x) - 19.2*exp(4*x))*exp(4*x), x) ==\ -2.4*exp(8*x) - 12.0*exp(5*x) def test_issue_4968(): assert integrate(sin(log(x**2))) == x*sin(log(x**2))/5 - 2*x*cos(log(x**2))/5 def test_singularities(): assert integrate(1/x**2, (x, -oo, oo)) is oo assert integrate(1/x**2, (x, -1, 1)) is oo assert integrate(1/(x - 1)**2, (x, -2, 2)) is oo assert integrate(1/x**2, (x, 1, -1)) is -oo assert integrate(1/(x - 1)**2, (x, 2, -2)) is -oo def test_issue_12645(): x, y = symbols('x y', real=True) assert (integrate(sin(x*x*x + y*y), (x, -sqrt(pi - y*y), sqrt(pi - y*y)), (y, -sqrt(pi), sqrt(pi))) == Integral(sin(x**3 + y**2), (x, -sqrt(-y**2 + pi), sqrt(-y**2 + pi)), (y, -sqrt(pi), sqrt(pi)))) def test_issue_12677(): assert integrate(sin(x) / (cos(x)**3), (x, 0, pi/6)) == Rational(1, 6) def test_issue_14078(): assert integrate((cos(3*x)-cos(x))/x, (x, 0, oo)) == -log(3) def test_issue_14064(): assert integrate(1/cosh(x), (x, 0, oo)) == pi/2 def test_issue_14027(): assert integrate(1/(1 + exp(x - S.Half)/(1 + exp(x))), x) == \ x - exp(S.Half)*log(exp(x) + exp(S.Half)/(1 + exp(S.Half)))/(exp(S.Half) + E) def test_issue_8170(): assert integrate(tan(x), (x, 0, pi/2)) is S.Infinity def test_issue_8440_14040(): assert integrate(1/x, (x, -1, 1)) is S.NaN assert integrate(1/(x + 1), (x, -2, 3)) is S.NaN def test_issue_14096(): assert integrate(1/(x + y)**2, (x, 0, 1)) == -1/(y + 1) + 1/y assert integrate(1/(1 + x + y + z)**2, (x, 0, 1), (y, 0, 1), (z, 0, 1)) == \ -4*log(4) - 6*log(2) + 9*log(3) def test_issue_14144(): assert Abs(integrate(1/sqrt(1 - x**3), (x, 0, 1)).n() - 1.402182) < 1e-6 assert Abs(integrate(sqrt(1 - x**3), (x, 0, 1)).n() - 0.841309) < 1e-6 def test_issue_14375(): # This raised a TypeError. The antiderivative has exp_polar, which # may be possible to unpolarify, so the exact output is not asserted here. assert integrate(exp(I*x)*log(x), x).has(Ei) def test_issue_14437(): f = Function('f')(x, y, z) assert integrate(f, (x, 0, 1), (y, 0, 2), (z, 0, 3)) == \ Integral(f, (x, 0, 1), (y, 0, 2), (z, 0, 3)) def test_issue_14470(): assert integrate(1/sqrt(exp(x) + 1), x) == \ log(-1 + 1/sqrt(exp(x) + 1)) - log(1 + 1/sqrt(exp(x) + 1)) def test_issue_14877(): f = exp(1 - exp(x**2)*x + 2*x**2)*(2*x**3 + x)/(1 - exp(x**2)*x)**2 assert integrate(f, x) == \ -exp(2*x**2 - x*exp(x**2) + 1)/(x*exp(3*x**2) - exp(2*x**2)) def test_issue_14782(): f = sqrt(-x**2 + 1)*(-x**2 + x) assert integrate(f, [x, -1, 1]) == - pi / 8 @slow def test_issue_14782_slow(): f = sqrt(-x**2 + 1)*(-x**2 + x) assert integrate(f, [x, 0, 1]) == S.One / 3 - pi / 16 def test_issue_12081(): f = x**(Rational(-3, 2))*exp(-x) assert integrate(f, [x, 0, oo]) is oo def test_issue_15285(): y = 1/x - 1 f = 4*y*exp(-2*y)/x**2 assert integrate(f, [x, 0, 1]) == 1 def test_issue_15432(): assert integrate(x**n * exp(-x) * log(x), (x, 0, oo)).gammasimp() == Piecewise( (gamma(n + 1)*polygamma(0, n) + gamma(n + 1)/n, re(n) + 1 > 0), (Integral(x**n*exp(-x)*log(x), (x, 0, oo)), True)) def test_issue_15124(): omega = IndexedBase('omega') m, p = symbols('m p', cls=Idx) assert integrate(exp(x*I*(omega[m] + omega[p])), x, conds='none') == \ -I*exp(I*x*omega[m])*exp(I*x*omega[p])/(omega[m] + omega[p]) def test_issue_15218(): with warns_deprecated_sympy(): Integral(Eq(x, y)) with warns_deprecated_sympy(): assert Integral(Eq(x, y), x) == Eq(Integral(x, x), Integral(y, x)) with warns_deprecated_sympy(): assert Integral(Eq(x, y), x).doit() == Eq(x**2/2, x*y) with warns_deprecated_sympy(): assert Eq(x, y).integrate(x) == Eq(x**2/2, x*y) # These are not deprecated because they are definite integrals assert integrate(Eq(x, y), (x, 0, 1)) == Eq(S.Half, y) assert Eq(x, y).integrate((x, 0, 1)) == Eq(S.Half, y) def test_issue_15292(): res = integrate(exp(-x**2*cos(2*t)) * cos(x**2*sin(2*t)), (x, 0, oo)) assert isinstance(res, Piecewise) assert gammasimp((res - sqrt(pi)/2 * cos(t)).subs(t, pi/6)) == 0 def test_issue_4514(): assert integrate(sin(2*x)/sin(x), x) == 2*sin(x) def test_issue_15457(): x, a, b = symbols('x a b', real=True) definite = integrate(exp(Abs(x-2)), (x, a, b)) indefinite = integrate(exp(Abs(x-2)), x) assert definite.subs({a: 1, b: 3}) == -2 + 2*E assert indefinite.subs(x, 3) - indefinite.subs(x, 1) == -2 + 2*E assert definite.subs({a: -3, b: -1}) == -exp(3) + exp(5) assert indefinite.subs(x, -1) - indefinite.subs(x, -3) == -exp(3) + exp(5) def test_issue_15431(): assert integrate(x*exp(x)*log(x), x) == \ (x*exp(x) - exp(x))*log(x) - exp(x) + Ei(x) def test_issue_15640_log_substitutions(): f = x/log(x) F = Ei(2*log(x)) assert integrate(f, x) == F and F.diff(x) == f f = x**3/log(x)**2 F = -x**4/log(x) + 4*Ei(4*log(x)) assert integrate(f, x) == F and F.diff(x) == f f = sqrt(log(x))/x**2 F = -sqrt(pi)*erfc(sqrt(log(x)))/2 - sqrt(log(x))/x assert integrate(f, x) == F and F.diff(x) == f def test_issue_15509(): from sympy.vector import CoordSys3D N = CoordSys3D('N') x = N.x assert integrate(cos(a*x + b), (x, x_1, x_2), heurisch=True) == Piecewise( (-sin(a*x_1 + b)/a + sin(a*x_2 + b)/a, (a > -oo) & (a < oo) & Ne(a, 0)), \ (-x_1*cos(b) + x_2*cos(b), True)) def test_issue_4311_fast(): x = symbols('x', real=True) assert integrate(x*abs(9-x**2), x) == Piecewise( (x**4/4 - 9*x**2/2, x <= -3), (-x**4/4 + 9*x**2/2 - Rational(81, 2), x <= 3), (x**4/4 - 9*x**2/2, True)) def test_integrate_with_complex_constants(): K = Symbol('K', real=True, positive=True) x = Symbol('x', real=True) m = Symbol('m', real=True) t = Symbol('t', real=True) assert integrate(exp(-I*K*x**2+m*x), x) == sqrt(I)*sqrt(pi)*exp(-I*m**2 /(4*K))*erfi((-2*I*K*x + m)/(2*sqrt(K)*sqrt(-I)))/(2*sqrt(K)) assert integrate(1/(1 + I*x**2), x) == (-I*(sqrt(-I)*log(x - I*sqrt(-I))/2 - sqrt(-I)*log(x + I*sqrt(-I))/2)) assert integrate(exp(-I*x**2), x) == sqrt(pi)*erf(sqrt(I)*x)/(2*sqrt(I)) assert integrate((1/(exp(I*t)-2)), t) == -t/2 - I*log(exp(I*t) - 2)/2 assert integrate((1/(exp(I*t)-2)), (t, 0, 2*pi)) == -pi def test_issue_14241(): x = Symbol('x') n = Symbol('n', positive=True, integer=True) assert integrate(n * x ** (n - 1) / (x + 1), x) == \ n**2*x**n*lerchphi(x*exp_polar(I*pi), 1, n)*gamma(n)/gamma(n + 1) def test_issue_13112(): assert integrate(sin(t)**2 / (5 - 4*cos(t)), [t, 0, 2*pi]) == pi / 4 @slow def test_issue_14709b(): h = Symbol('h', positive=True) i = integrate(x*acos(1 - 2*x/h), (x, 0, h)) assert i == 5*h**2*pi/16 def test_issue_8614(): x = Symbol('x') t = Symbol('t') assert integrate(exp(t)/t, (t, -oo, x)) == Ei(x) assert integrate((exp(-x) - exp(-2*x))/x, (x, 0, oo)) == log(2) @slow def test_issue_15494(): s = symbols('s', real=True, positive=True) integrand = (exp(s/2) - 2*exp(1.6*s) + exp(s))*exp(s) solution = integrate(integrand, s) assert solution != S.NaN # Not sure how to test this properly as it is a symbolic expression with floats # assert str(solution) == '0.666666666666667*exp(1.5*s) + 0.5*exp(2.0*s) - 0.769230769230769*exp(2.6*s)' # Maybe assert abs(solution.subs(s, 1) - (-3.67440080236188)) <= 1e-8 integrand = (exp(s/2) - 2*exp(S(8)/5*s) + exp(s))*exp(s) assert integrate(integrand, s) == -10*exp(13*s/5)/13 + 2*exp(3*s/2)/3 + exp(2*s)/2 def test_li_integral(): y = Symbol('y') assert Integral(li(y*x**2), x).doit() == Piecewise((x*li(x**2*y) - \ x*Ei(3*log(x**2*y)/2)/sqrt(x**2*y), Ne(y, 0)), (0, True)) def test_issue_17473(): x = Symbol('x') n = Symbol('n') assert integrate(sin(x**n), x) == \ x*x**n*gamma(S(1)/2 + 1/(2*n))*hyper((S(1)/2 + 1/(2*n),), (S(3)/2, S(3)/2 + 1/(2*n)), -x**(2*n)/4)/(2*n*gamma(S(3)/2 + 1/(2*n))) def test_issue_17671(): assert integrate(log(log(x)) / x**2, [x, 1, oo]) == -EulerGamma assert integrate(log(log(x)) / x**3, [x, 1, oo]) == -log(2)/2 - EulerGamma/2 assert integrate(log(log(x)) / x**10, [x, 1, oo]) == -2*log(3)/9 - EulerGamma/9 def test_issue_2975(): w = Symbol('w') C = Symbol('C') y = Symbol('y') assert integrate(1/(y**2+C)**(S(3)/2), (y, -w/2, w/2)) == w/(C**(S(3)/2)*sqrt(1 + w**2/(4*C))) def test_issue_7827(): x, n, M = symbols('x n M') N = Symbol('N', integer=True) assert integrate(summation(x*n, (n, 1, N)), x) == x**2*(N**2/4 + N/4) assert integrate(summation(x*sin(n), (n,1,N)), x) == \ Sum(x**2*sin(n)/2, (n, 1, N)) assert integrate(summation(sin(n*x), (n,1,N)), x) == \ Sum(Piecewise((-cos(n*x)/n, Ne(n, 0)), (0, True)), (n, 1, N)) assert integrate(integrate(summation(sin(n*x), (n,1,N)), x), x) == \ Piecewise((Sum(Piecewise((-sin(n*x)/n**2, Ne(n, 0)), (-x/n, True)), (n, 1, N)), (n > -oo) & (n < oo) & Ne(n, 0)), (0, True)) assert integrate(Sum(x, (n, 1, M)), x) == M*x**2/2 raises(ValueError, lambda: integrate(Sum(x, (x, y, n)), y)) raises(ValueError, lambda: integrate(Sum(x, (x, 1, n)), n)) raises(ValueError, lambda: integrate(Sum(x, (x, 1, y)), x)) def test_issue_4231(): f = (1 + 2*x + sqrt(x + log(x))*(1 + 3*x) + x**2)/(x*(x + sqrt(x + log(x)))*sqrt(x + log(x))) assert integrate(f, x) == 2*sqrt(x + log(x)) + 2*log(x + sqrt(x + log(x))) def test_issue_17841(): f = diff(1/(x**2+x+I), x) assert integrate(f, x) == 1/(x**2 + x + I) def test_issue_21034(): x = Symbol('x', real=True, nonzero=True) f1 = x*(-x**4/asin(5)**4 - x*sinh(x + log(asin(5))) + 5) f2 = (x + cosh(cos(4)))/(x*(x + 1/(12*x))) assert integrate(f1, x) == \ -x**6/(6*asin(5)**4) - x**2*cosh(x + log(asin(5))) + 5*x**2/2 + 2*x*sinh(x + log(asin(5))) - 2*cosh(x + log(asin(5))) assert integrate(f2, x) == \ log(x**2 + S(1)/12)/2 + 2*sqrt(3)*cosh(cos(4))*atan(2*sqrt(3)*x) def test_issue_4187(): assert integrate(log(x)*exp(-x), x) == Ei(-x) - exp(-x)*log(x) assert integrate(log(x)*exp(-x), (x, 0, oo)) == -EulerGamma def test_issue_5547(): L = Symbol('L') z = Symbol('z') r0 = Symbol('r0') R0 = Symbol('R0') assert integrate(r0**2*cos(z)**2, (z, -L/2, L/2)) == -r0**2*(-L/4 - sin(L/2)*cos(L/2)/2) + r0**2*(L/4 + sin(L/2)*cos(L/2)/2) assert integrate(r0**2*cos(R0*z)**2, (z, -L/2, L/2)) == Piecewise( (-r0**2*(-L*R0/4 - sin(L*R0/2)*cos(L*R0/2)/2)/R0 + r0**2*(L*R0/4 + sin(L*R0/2)*cos(L*R0/2)/2)/R0, (R0 > -oo) & (R0 < oo) & Ne(R0, 0)), (L*r0**2, True)) w = 2*pi*z/L sol = sqrt(2)*sqrt(L)*r0**2*fresnelc(sqrt(2)*sqrt(L))*gamma(S.One/4)/(16*gamma(S(5)/4)) + L*r0**2/2 assert integrate(r0**2*cos(w*z)**2, (z, -L/2, L/2)) == sol def test_issue_15810(): assert integrate(1/(2**(2*x/3) + 1), (x, 0, oo)) == Rational(3, 2) def test_issue_21024(): x = Symbol('x', real=True, nonzero=True) f = log(x)*log(4*x) + log(3*x + exp(2)) F = x*log(x)**2 + x*(1 - 2*log(2)) + (-2*x + 2*x*log(2))*log(x) + \ (x + exp(2)/6)*log(3*x + exp(2)) + exp(2)*log(3*x + exp(2))/6 assert F == integrate(f, x) f = (x + exp(3))/x**2 F = log(x) - exp(3)/x assert F == integrate(f, x) f = (x**2 + exp(5))/x F = x**2/2 + exp(5)*log(x) assert F == integrate(f, x) f = x/(2*x + tanh(1)) F = x/2 - log(2*x + tanh(1))*tanh(1)/4 assert F == integrate(f, x) f = x - sinh(4)/x F = x**2/2 - log(x)*sinh(4) assert F == integrate(f, x) f = log(x + exp(5)/x) F = x*log(x + exp(5)/x) - x + 2*exp(Rational(5, 2))*atan(x*exp(Rational(-5, 2))) assert F == integrate(f, x) f = x**5/(x + E) F = x**5/5 - E*x**4/4 + x**3*exp(2)/3 - x**2*exp(3)/2 + x*exp(4) - exp(5)*log(x + E) assert F == integrate(f, x) f = 4*x/(x + sinh(5)) F = 4*x - 4*log(x + sinh(5))*sinh(5) assert F == integrate(f, x) f = x**2/(2*x + sinh(2)) F = x**2/4 - x*sinh(2)/4 + log(2*x + sinh(2))*sinh(2)**2/8 assert F == integrate(f, x) f = -x**2/(x + E) F = -x**2/2 + E*x - exp(2)*log(x + E) assert F == integrate(f, x) f = (2*x + 3)*exp(5)/x F = 2*x*exp(5) + 3*exp(5)*log(x) assert F == integrate(f, x) f = x + 2 + cosh(3)/x F = x**2/2 + 2*x + log(x)*cosh(3) assert F == integrate(f, x) f = x - tanh(1)/x**3 F = x**2/2 + tanh(1)/(2*x**2) assert F == integrate(f, x) f = (3*x - exp(6))/x F = 3*x - exp(6)*log(x) assert F == integrate(f, x) f = x**4/(x + exp(5))**2 + x F = x**3/3 + x**2*(Rational(1, 2) - exp(5)) + 3*x*exp(10) - 4*exp(15)*log(x + exp(5)) - exp(20)/(x + exp(5)) assert F == integrate(f, x) f = x*(x + exp(10)/x**2) + x F = x**3/3 + x**2/2 + exp(10)*log(x) assert F == integrate(f, x) f = x + x/(5*x + sinh(3)) F = x**2/2 + x/5 - log(5*x + sinh(3))*sinh(3)/25 assert F == integrate(f, x) f = (x + exp(3))/(2*x**2 + 2*x) F = exp(3)*log(x)/2 - exp(3)*log(x + 1)/2 + log(x + 1)/2 assert F == integrate(f, x).expand() f = log(x + 4*sinh(4)) F = x*log(x + 4*sinh(4)) - x + 4*log(x + 4*sinh(4))*sinh(4) assert F == integrate(f, x) f = -x + 20*(exp(-5) - atan(4)/x)**3*sin(4)/x F = (-x**2*exp(15)/2 + 20*log(x)*sin(4) - (-180*x**2*exp(5)*sin(4)*atan(4) + 90*x*exp(10)*sin(4)*atan(4)**2 - \ 20*exp(15)*sin(4)*atan(4)**3)/(3*x**3))*exp(-15) assert F == integrate(f, x) f = 2*x**2*exp(-4) + 6/x F_true = (2*x**3/3 + 6*exp(4)*log(x))*exp(-4) assert F_true == integrate(f, x) def test_issue_21831(): theta = symbols('theta') assert integrate(cos(3*theta)/(5-4*cos(theta)), (theta, 0, 2*pi)) == pi/12
09f7ba8aefc44325cb6ea6227810ee577a4e7d805c91b435614e30d39f18a9ff
"""Most of these tests come from the examples in Bronstein's book.""" from sympy.core.function import (Function, Lambda, diff, expand_log) from sympy.core.numbers import (I, Rational, pi) from sympy.core.relational import Ne from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import (atan, sin, tan) from sympy.polys.polytools import (Poly, cancel, factor) from sympy.integrals.risch import (gcdex_diophantine, frac_in, as_poly_1t, derivation, splitfactor, splitfactor_sqf, canonical_representation, hermite_reduce, polynomial_reduce, residue_reduce, residue_reduce_to_basic, integrate_primitive, integrate_hyperexponential_polynomial, integrate_hyperexponential, integrate_hypertangent_polynomial, integrate_nonlinear_no_specials, integer_powers, DifferentialExtension, risch_integrate, DecrementLevel, NonElementaryIntegral, recognize_log_derivative, recognize_derivative, laurent_series) from sympy.testing.pytest import raises from sympy.abc import x, t, nu, z, a, y t0, t1, t2 = symbols('t:3') i = Symbol('i') def test_gcdex_diophantine(): assert gcdex_diophantine(Poly(x**4 - 2*x**3 - 6*x**2 + 12*x + 15), Poly(x**3 + x**2 - 4*x - 4), Poly(x**2 - 1)) == \ (Poly((-x**2 + 4*x - 3)/5), Poly((x**3 - 7*x**2 + 16*x - 10)/5)) assert gcdex_diophantine(Poly(x**3 + 6*x + 7), Poly(x**2 + 3*x + 2), Poly(x + 1)) == \ (Poly(1/13, x, domain='QQ'), Poly(-1/13*x + 3/13, x, domain='QQ')) def test_frac_in(): assert frac_in(Poly((x + 1)/x*t, t), x) == \ (Poly(t*x + t, x), Poly(x, x)) assert frac_in((x + 1)/x*t, x) == \ (Poly(t*x + t, x), Poly(x, x)) assert frac_in((Poly((x + 1)/x*t, t), Poly(t + 1, t)), x) == \ (Poly(t*x + t, x), Poly((1 + t)*x, x)) raises(ValueError, lambda: frac_in((x + 1)/log(x)*t, x)) assert frac_in(Poly((2 + 2*x + x*(1 + x))/(1 + x)**2, t), x, cancel=True) == \ (Poly(x + 2, x), Poly(x + 1, x)) def test_as_poly_1t(): assert as_poly_1t(2/t + t, t, z) in [ Poly(t + 2*z, t, z), Poly(t + 2*z, z, t)] assert as_poly_1t(2/t + 3/t**2, t, z) in [ Poly(2*z + 3*z**2, t, z), Poly(2*z + 3*z**2, z, t)] assert as_poly_1t(2/((exp(2) + 1)*t), t, z) in [ Poly(2/(exp(2) + 1)*z, t, z), Poly(2/(exp(2) + 1)*z, z, t)] assert as_poly_1t(2/((exp(2) + 1)*t) + t, t, z) in [ Poly(t + 2/(exp(2) + 1)*z, t, z), Poly(t + 2/(exp(2) + 1)*z, z, t)] assert as_poly_1t(S.Zero, t, z) == Poly(0, t, z) def test_derivation(): p = Poly(4*x**4*t**5 + (-4*x**3 - 4*x**4)*t**4 + (-3*x**2 + 2*x**3)*t**3 + (2*x + 7*x**2 + 2*x**3)*t**2 + (1 - 4*x - 4*x**2)*t - 1 + 2*x, t) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-t**2 - 3/(2*x)*t + 1/(2*x), t)]}) assert derivation(p, DE) == Poly(-20*x**4*t**6 + (2*x**3 + 16*x**4)*t**5 + (21*x**2 + 12*x**3)*t**4 + (x*Rational(7, 2) - 25*x**2 - 12*x**3)*t**3 + (-5 - x*Rational(15, 2) + 7*x**2)*t**2 - (3 - 8*x - 10*x**2 - 4*x**3)/(2*x)*t + (1 - 4*x**2)/(2*x), t) assert derivation(Poly(1, t), DE) == Poly(0, t) assert derivation(Poly(t, t), DE) == DE.d assert derivation(Poly(t**2 + 1/x*t + (1 - 2*x)/(4*x**2), t), DE) == \ Poly(-2*t**3 - 4/x*t**2 - (5 - 2*x)/(2*x**2)*t - (1 - 2*x)/(2*x**3), t, domain='ZZ(x)') DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(t, t)]}) assert derivation(Poly(x*t*t1, t), DE) == Poly(t*t1 + x*t*t1 + t, t) assert derivation(Poly(x*t*t1, t), DE, coefficientD=True) == \ Poly((1 + t1)*t, t) DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) assert derivation(Poly(x, x), DE) == Poly(1, x) # Test basic option assert derivation((x + 1)/(x - 1), DE, basic=True) == -2/(1 - 2*x + x**2) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert derivation((t + 1)/(t - 1), DE, basic=True) == -2*t/(1 - 2*t + t**2) assert derivation(t + 1, DE, basic=True) == t def test_splitfactor(): p = Poly(4*x**4*t**5 + (-4*x**3 - 4*x**4)*t**4 + (-3*x**2 + 2*x**3)*t**3 + (2*x + 7*x**2 + 2*x**3)*t**2 + (1 - 4*x - 4*x**2)*t - 1 + 2*x, t, field=True) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-t**2 - 3/(2*x)*t + 1/(2*x), t)]}) assert splitfactor(p, DE) == (Poly(4*x**4*t**3 + (-8*x**3 - 4*x**4)*t**2 + (4*x**2 + 8*x**3)*t - 4*x**2, t, domain='ZZ(x)'), Poly(t**2 + 1/x*t + (1 - 2*x)/(4*x**2), t, domain='ZZ(x)')) assert splitfactor(Poly(x, t), DE) == (Poly(x, t), Poly(1, t)) r = Poly(-4*x**4*z**2 + 4*x**6*z**2 - z*x**3 - 4*x**5*z**3 + 4*x**3*z**3 + x**4 + z*x**5 - x**6, t) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) assert splitfactor(r, DE, coefficientD=True) == \ (Poly(x*z - x**2 - z*x**3 + x**4, t), Poly(-x**2 + 4*x**2*z**2, t)) assert splitfactor_sqf(r, DE, coefficientD=True) == \ (((Poly(x*z - x**2 - z*x**3 + x**4, t), 1),), ((Poly(-x**2 + 4*x**2*z**2, t), 1),)) assert splitfactor(Poly(0, t), DE) == (Poly(0, t), Poly(1, t)) assert splitfactor_sqf(Poly(0, t), DE) == (((Poly(0, t), 1),), ()) def test_canonical_representation(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1 + t**2, t)]}) assert canonical_representation(Poly(x - t, t), Poly(t**2, t), DE) == \ (Poly(0, t, domain='ZZ[x]'), (Poly(0, t, domain='QQ[x]'), Poly(1, t, domain='ZZ')), (Poly(-t + x, t, domain='QQ[x]'), Poly(t**2, t))) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert canonical_representation(Poly(t**5 + t**3 + x**2*t + 1, t), Poly((t**2 + 1)**3, t), DE) == \ (Poly(0, t, domain='ZZ[x]'), (Poly(t**5 + t**3 + x**2*t + 1, t, domain='QQ[x]'), Poly(t**6 + 3*t**4 + 3*t**2 + 1, t, domain='QQ')), (Poly(0, t, domain='QQ[x]'), Poly(1, t, domain='QQ'))) def test_hermite_reduce(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert hermite_reduce(Poly(x - t, t), Poly(t**2, t), DE) == \ ((Poly(-x, t, domain='QQ[x]'), Poly(t, t, domain='QQ[x]')), (Poly(0, t, domain='QQ[x]'), Poly(1, t, domain='QQ[x]')), (Poly(-x, t, domain='QQ[x]'), Poly(1, t, domain='QQ[x]'))) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-t**2 - t/x - (1 - nu**2/x**2), t)]}) assert hermite_reduce( Poly(x**2*t**5 + x*t**4 - nu**2*t**3 - x*(x**2 + 1)*t**2 - (x**2 - nu**2)*t - x**5/4, t), Poly(x**2*t**4 + x**2*(x**2 + 2)*t**2 + x**2 + x**4 + x**6/4, t), DE) == \ ((Poly(-x**2 - 4, t, domain='ZZ(x,nu)'), Poly(4*t**2 + 2*x**2 + 4, t, domain='ZZ(x,nu)')), (Poly((-2*nu**2 - x**4)*t - (2*x**3 + 2*x), t, domain='ZZ(x,nu)'), Poly(2*x**2*t**2 + x**4 + 2*x**2, t, domain='ZZ(x,nu)')), (Poly(x*t + 1, t, domain='ZZ(x,nu)'), Poly(x, t, domain='ZZ(x,nu)'))) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) a = Poly((-2 + 3*x)*t**3 + (-1 + x)*t**2 + (-4*x + 2*x**2)*t + x**2, t) d = Poly(x*t**6 - 4*x**2*t**5 + 6*x**3*t**4 - 4*x**4*t**3 + x**5*t**2, t) assert hermite_reduce(a, d, DE) == \ ((Poly(3*t**2 + t + 3*x, t, domain='ZZ(x)'), Poly(3*t**4 - 9*x*t**3 + 9*x**2*t**2 - 3*x**3*t, t, domain='ZZ(x)')), (Poly(0, t, domain='ZZ(x)'), Poly(1, t, domain='ZZ(x)')), (Poly(0, t, domain='ZZ(x)'), Poly(1, t, domain='ZZ(x)'))) assert hermite_reduce( Poly(-t**2 + 2*t + 2, t, domain='ZZ(x)'), Poly(-x*t**2 + 2*x*t - x, t, domain='ZZ(x)'), DE) == \ ((Poly(3, t, domain='ZZ(x)'), Poly(t - 1, t, domain='ZZ(x)')), (Poly(0, t, domain='ZZ(x)'), Poly(1, t, domain='ZZ(x)')), (Poly(1, t, domain='ZZ(x)'), Poly(x, t, domain='ZZ(x)'))) assert hermite_reduce( Poly(-x**2*t**6 + (-1 - 2*x**3 + x**4)*t**3 + (-3 - 3*x**4)*t**2 - 2*x*t - x - 3*x**2, t, domain='ZZ(x)'), Poly(x**4*t**6 - 2*x**2*t**3 + 1, t, domain='ZZ(x)'), DE) == \ ((Poly(x**3*t + x**4 + 1, t, domain='ZZ(x)'), Poly(x**3*t**3 - x, t, domain='ZZ(x)')), (Poly(0, t, domain='ZZ(x)'), Poly(1, t, domain='ZZ(x)')), (Poly(-1, t, domain='ZZ(x)'), Poly(x**2, t, domain='ZZ(x)'))) assert hermite_reduce( Poly((-2 + 3*x)*t**3 + (-1 + x)*t**2 + (-4*x + 2*x**2)*t + x**2, t), Poly(x*t**6 - 4*x**2*t**5 + 6*x**3*t**4 - 4*x**4*t**3 + x**5*t**2, t), DE) == \ ((Poly(3*t**2 + t + 3*x, t, domain='ZZ(x)'), Poly(3*t**4 - 9*x*t**3 + 9*x**2*t**2 - 3*x**3*t, t, domain='ZZ(x)')), (Poly(0, t, domain='ZZ(x)'), Poly(1, t, domain='ZZ(x)')), (Poly(0, t, domain='ZZ(x)'), Poly(1, t, domain='ZZ(x)'))) def test_polynomial_reduce(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1 + t**2, t)]}) assert polynomial_reduce(Poly(1 + x*t + t**2, t), DE) == \ (Poly(t, t), Poly(x*t, t)) assert polynomial_reduce(Poly(0, t), DE) == \ (Poly(0, t), Poly(0, t)) def test_laurent_series(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1, t)]}) a = Poly(36, t) d = Poly((t - 2)*(t**2 - 1)**2, t) F = Poly(t**2 - 1, t) n = 2 assert laurent_series(a, d, F, n, DE) == \ (Poly(-3*t**3 + 3*t**2 - 6*t - 8, t), Poly(t**5 + t**4 - 2*t**3 - 2*t**2 + t + 1, t), [Poly(-3*t**3 - 6*t**2, t, domain='QQ'), Poly(2*t**6 + 6*t**5 - 8*t**3, t, domain='QQ')]) def test_recognize_derivative(): DE = DifferentialExtension(extension={'D': [Poly(1, t)]}) a = Poly(36, t) d = Poly((t - 2)*(t**2 - 1)**2, t) assert recognize_derivative(a, d, DE) == False DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) a = Poly(2, t) d = Poly(t**2 - 1, t) assert recognize_derivative(a, d, DE) == False assert recognize_derivative(Poly(x*t, t), Poly(1, t), DE) == True DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert recognize_derivative(Poly(t, t), Poly(1, t), DE) == True def test_recognize_log_derivative(): a = Poly(2*x**2 + 4*x*t - 2*t - x**2*t, t) d = Poly((2*x + t)*(t + x**2), t) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert recognize_log_derivative(a, d, DE, z) == True DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) assert recognize_log_derivative(Poly(t + 1, t), Poly(t + x, t), DE) == True assert recognize_log_derivative(Poly(2, t), Poly(t**2 - 1, t), DE) == True DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) assert recognize_log_derivative(Poly(1, x), Poly(x**2 - 2, x), DE) == False assert recognize_log_derivative(Poly(1, x), Poly(x**2 + x, x), DE) == True DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert recognize_log_derivative(Poly(1, t), Poly(t**2 - 2, t), DE) == False assert recognize_log_derivative(Poly(1, t), Poly(t**2 + t, t), DE) == False def test_residue_reduce(): a = Poly(2*t**2 - t - x**2, t) d = Poly(t**3 - x**2*t, t) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)], 'Tfuncs': [log]}) assert residue_reduce(a, d, DE, z, invert=False) == \ ([(Poly(z**2 - Rational(1, 4), z, domain='ZZ(x)'), Poly((1 + 3*x*z - 6*z**2 - 2*x**2 + 4*x**2*z**2)*t - x*z + x**2 + 2*x**2*z**2 - 2*z*x**3, t, domain='ZZ(z, x)'))], False) assert residue_reduce(a, d, DE, z, invert=True) == \ ([(Poly(z**2 - Rational(1, 4), z, domain='ZZ(x)'), Poly(t + 2*x*z, t))], False) assert residue_reduce(Poly(-2/x, t), Poly(t**2 - 1, t,), DE, z, invert=False) == \ ([(Poly(z**2 - 1, z, domain='QQ'), Poly(-2*z*t/x - 2/x, t, domain='ZZ(z,x)'))], True) ans = residue_reduce(Poly(-2/x, t), Poly(t**2 - 1, t), DE, z, invert=True) assert ans == ([(Poly(z**2 - 1, z, domain='QQ'), Poly(t + z, t))], True) assert residue_reduce_to_basic(ans[0], DE, z) == -log(-1 + log(x)) + log(1 + log(x)) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-t**2 - t/x - (1 - nu**2/x**2), t)]}) # TODO: Skip or make faster assert residue_reduce(Poly((-2*nu**2 - x**4)/(2*x**2)*t - (1 + x**2)/x, t), Poly(t**2 + 1 + x**2/2, t), DE, z) == \ ([(Poly(z + S.Half, z, domain='QQ'), Poly(t**2 + 1 + x**2/2, t, domain='ZZ(x,nu)'))], True) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1 + t**2, t)]}) assert residue_reduce(Poly(-2*x*t + 1 - x**2, t), Poly(t**2 + 2*x*t + 1 + x**2, t), DE, z) == \ ([(Poly(z**2 + Rational(1, 4), z), Poly(t + x + 2*z, t))], True) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert residue_reduce(Poly(t, t), Poly(t + sqrt(2), t), DE, z) == \ ([(Poly(z - 1, z, domain='QQ'), Poly(t + sqrt(2), t))], True) def test_integrate_hyperexponential(): # TODO: Add tests for integrate_hyperexponential() from the book a = Poly((1 + 2*t1 + t1**2 + 2*t1**3)*t**2 + (1 + t1**2)*t + 1 + t1**2, t) d = Poly(1, t) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1 + t1**2, t1), Poly(t*(1 + t1**2), t)], 'Tfuncs': [tan, Lambda(i, exp(tan(i)))]}) assert integrate_hyperexponential(a, d, DE) == \ (exp(2*tan(x))*tan(x) + exp(tan(x)), 1 + t1**2, True) a = Poly((t1**3 + (x + 1)*t1**2 + t1 + x + 2)*t, t) assert integrate_hyperexponential(a, d, DE) == \ ((x + tan(x))*exp(tan(x)), 0, True) a = Poly(t, t) d = Poly(1, t) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(2*x*t, t)], 'Tfuncs': [Lambda(i, exp(x**2))]}) assert integrate_hyperexponential(a, d, DE) == \ (0, NonElementaryIntegral(exp(x**2), x), False) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)], 'Tfuncs': [exp]}) assert integrate_hyperexponential(a, d, DE) == (exp(x), 0, True) a = Poly(25*t**6 - 10*t**5 + 7*t**4 - 8*t**3 + 13*t**2 + 2*t - 1, t) d = Poly(25*t**6 + 35*t**4 + 11*t**2 + 1, t) assert integrate_hyperexponential(a, d, DE) == \ (-(11 - 10*exp(x))/(5 + 25*exp(2*x)) + log(1 + exp(2*x)), -1, True) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t0, t0), Poly(t0*t, t)], 'Tfuncs': [exp, Lambda(i, exp(exp(i)))]}) assert integrate_hyperexponential(Poly(2*t0*t**2, t), Poly(1, t), DE) == (exp(2*exp(x)), 0, True) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t0, t0), Poly(-t0*t, t)], 'Tfuncs': [exp, Lambda(i, exp(-exp(i)))]}) assert integrate_hyperexponential(Poly(-27*exp(9) - 162*t0*exp(9) + 27*x*t0*exp(9), t), Poly((36*exp(18) + x**2*exp(18) - 12*x*exp(18))*t, t), DE) == \ (27*exp(exp(x))/(-6*exp(9) + x*exp(9)), 0, True) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)], 'Tfuncs': [exp]}) assert integrate_hyperexponential(Poly(x**2/2*t, t), Poly(1, t), DE) == \ ((2 - 2*x + x**2)*exp(x)/2, 0, True) assert integrate_hyperexponential(Poly(1 + t, t), Poly(t, t), DE) == \ (-exp(-x), 1, True) # x - exp(-x) assert integrate_hyperexponential(Poly(x, t), Poly(t + 1, t), DE) == \ (0, NonElementaryIntegral(x/(1 + exp(x)), x), False) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t0), Poly(2*x*t1, t1)], 'Tfuncs': [log, Lambda(i, exp(i**2))]}) elem, nonelem, b = integrate_hyperexponential(Poly((8*x**7 - 12*x**5 + 6*x**3 - x)*t1**4 + (8*t0*x**7 - 8*t0*x**6 - 4*t0*x**5 + 2*t0*x**3 + 2*t0*x**2 - t0*x + 24*x**8 - 36*x**6 - 4*x**5 + 22*x**4 + 4*x**3 - 7*x**2 - x + 1)*t1**3 + (8*t0*x**8 - 4*t0*x**6 - 16*t0*x**5 - 2*t0*x**4 + 12*t0*x**3 + t0*x**2 - 2*t0*x + 24*x**9 - 36*x**7 - 8*x**6 + 22*x**5 + 12*x**4 - 7*x**3 - 6*x**2 + x + 1)*t1**2 + (8*t0*x**8 - 8*t0*x**6 - 16*t0*x**5 + 6*t0*x**4 + 10*t0*x**3 - 2*t0*x**2 - t0*x + 8*x**10 - 12*x**8 - 4*x**7 + 2*x**6 + 12*x**5 + 3*x**4 - 9*x**3 - x**2 + 2*x)*t1 + 8*t0*x**7 - 12*t0*x**6 - 4*t0*x**5 + 8*t0*x**4 - t0*x**2 - 4*x**7 + 4*x**6 + 4*x**5 - 4*x**4 - x**3 + x**2, t1), Poly((8*x**7 - 12*x**5 + 6*x**3 - x)*t1**4 + (24*x**8 + 8*x**7 - 36*x**6 - 12*x**5 + 18*x**4 + 6*x**3 - 3*x**2 - x)*t1**3 + (24*x**9 + 24*x**8 - 36*x**7 - 36*x**6 + 18*x**5 + 18*x**4 - 3*x**3 - 3*x**2)*t1**2 + (8*x**10 + 24*x**9 - 12*x**8 - 36*x**7 + 6*x**6 + 18*x**5 - x**4 - 3*x**3)*t1 + 8*x**10 - 12*x**8 + 6*x**6 - x**4, t1), DE) assert factor(elem) == -((x - 1)*log(x)/((x + exp(x**2))*(2*x**2 - 1))) assert (nonelem, b) == (NonElementaryIntegral(exp(x**2)/(exp(x**2) + 1), x), False) def test_integrate_hyperexponential_polynomial(): # Without proper cancellation within integrate_hyperexponential_polynomial(), # this will take a long time to complete, and will return a complicated # expression p = Poly((-28*x**11*t0 - 6*x**8*t0 + 6*x**9*t0 - 15*x**8*t0**2 + 15*x**7*t0**2 + 84*x**10*t0**2 - 140*x**9*t0**3 - 20*x**6*t0**3 + 20*x**7*t0**3 - 15*x**6*t0**4 + 15*x**5*t0**4 + 140*x**8*t0**4 - 84*x**7*t0**5 - 6*x**4*t0**5 + 6*x**5*t0**5 + x**3*t0**6 - x**4*t0**6 + 28*x**6*t0**6 - 4*x**5*t0**7 + x**9 - x**10 + 4*x**12)/(-8*x**11*t0 + 28*x**10*t0**2 - 56*x**9*t0**3 + 70*x**8*t0**4 - 56*x**7*t0**5 + 28*x**6*t0**6 - 8*x**5*t0**7 + x**4*t0**8 + x**12)*t1**2 + (-28*x**11*t0 - 12*x**8*t0 + 12*x**9*t0 - 30*x**8*t0**2 + 30*x**7*t0**2 + 84*x**10*t0**2 - 140*x**9*t0**3 - 40*x**6*t0**3 + 40*x**7*t0**3 - 30*x**6*t0**4 + 30*x**5*t0**4 + 140*x**8*t0**4 - 84*x**7*t0**5 - 12*x**4*t0**5 + 12*x**5*t0**5 - 2*x**4*t0**6 + 2*x**3*t0**6 + 28*x**6*t0**6 - 4*x**5*t0**7 + 2*x**9 - 2*x**10 + 4*x**12)/(-8*x**11*t0 + 28*x**10*t0**2 - 56*x**9*t0**3 + 70*x**8*t0**4 - 56*x**7*t0**5 + 28*x**6*t0**6 - 8*x**5*t0**7 + x**4*t0**8 + x**12)*t1 + (-2*x**2*t0 + 2*x**3*t0 + x*t0**2 - x**2*t0**2 + x**3 - x**4)/(-4*x**5*t0 + 6*x**4*t0**2 - 4*x**3*t0**3 + x**2*t0**4 + x**6), t1, z, expand=False) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t0), Poly(2*x*t1, t1)]}) assert integrate_hyperexponential_polynomial(p, DE, z) == ( Poly((x - t0)*t1**2 + (-2*t0 + 2*x)*t1, t1), Poly(-2*x*t0 + x**2 + t0**2, t1), True) DE = DifferentialExtension(extension={'D':[Poly(1, x), Poly(t0, t0)]}) assert integrate_hyperexponential_polynomial(Poly(0, t0), DE, z) == ( Poly(0, t0), Poly(1, t0), True) def test_integrate_hyperexponential_returns_piecewise(): a, b = symbols('a b') DE = DifferentialExtension(a**x, x) assert integrate_hyperexponential(DE.fa, DE.fd, DE) == (Piecewise( (exp(x*log(a))/log(a), Ne(log(a), 0)), (x, True)), 0, True) DE = DifferentialExtension(a**(b*x), x) assert integrate_hyperexponential(DE.fa, DE.fd, DE) == (Piecewise( (exp(b*x*log(a))/(b*log(a)), Ne(b*log(a), 0)), (x, True)), 0, True) DE = DifferentialExtension(exp(a*x), x) assert integrate_hyperexponential(DE.fa, DE.fd, DE) == (Piecewise( (exp(a*x)/a, Ne(a, 0)), (x, True)), 0, True) DE = DifferentialExtension(x*exp(a*x), x) assert integrate_hyperexponential(DE.fa, DE.fd, DE) == (Piecewise( ((a*x - 1)*exp(a*x)/a**2, Ne(a**2, 0)), (x**2/2, True)), 0, True) DE = DifferentialExtension(x**2*exp(a*x), x) assert integrate_hyperexponential(DE.fa, DE.fd, DE) == (Piecewise( ((x**2*a**2 - 2*a*x + 2)*exp(a*x)/a**3, Ne(a**3, 0)), (x**3/3, True)), 0, True) DE = DifferentialExtension(x**y + z, y) assert integrate_hyperexponential(DE.fa, DE.fd, DE) == (Piecewise( (exp(log(x)*y)/log(x), Ne(log(x), 0)), (y, True)), z, True) DE = DifferentialExtension(x**y + z + x**(2*y), y) assert integrate_hyperexponential(DE.fa, DE.fd, DE) == (Piecewise( ((exp(2*log(x)*y)*log(x) + 2*exp(log(x)*y)*log(x))/(2*log(x)**2), Ne(2*log(x)**2, 0)), (2*y, True), ), z, True) # TODO: Add a test where two different parts of the extension use a # Piecewise, like y**x + z**x. def test_issue_13947(): a, t, s = symbols('a t s') assert risch_integrate(2**(-pi)/(2**t + 1), t) == \ 2**(-pi)*t - 2**(-pi)*log(2**t + 1)/log(2) assert risch_integrate(a**(t - s)/(a**t + 1), t) == \ exp(-s*log(a))*log(a**t + 1)/log(a) def test_integrate_primitive(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)], 'Tfuncs': [log]}) assert integrate_primitive(Poly(t, t), Poly(1, t), DE) == (x*log(x), -1, True) assert integrate_primitive(Poly(x, t), Poly(t, t), DE) == (0, NonElementaryIntegral(x/log(x), x), False) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(1/(x + 1), t2)], 'Tfuncs': [log, Lambda(i, log(i + 1))]}) assert integrate_primitive(Poly(t1, t2), Poly(t2, t2), DE) == \ (0, NonElementaryIntegral(log(x)/log(1 + x), x), False) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(1/(x*t1), t2)], 'Tfuncs': [log, Lambda(i, log(log(i)))]}) assert integrate_primitive(Poly(t2, t2), Poly(t1, t2), DE) == \ (0, NonElementaryIntegral(log(log(x))/log(x), x), False) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t0)], 'Tfuncs': [log]}) assert integrate_primitive(Poly(x**2*t0**3 + (3*x**2 + x)*t0**2 + (3*x**2 + 2*x)*t0 + x**2 + x, t0), Poly(x**2*t0**4 + 4*x**2*t0**3 + 6*x**2*t0**2 + 4*x**2*t0 + x**2, t0), DE) == \ (-1/(log(x) + 1), NonElementaryIntegral(1/(log(x) + 1), x), False) def test_integrate_hypertangent_polynomial(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**2 + 1, t)]}) assert integrate_hypertangent_polynomial(Poly(t**2 + x*t + 1, t), DE) == \ (Poly(t, t), Poly(x/2, t)) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(a*(t**2 + 1), t)]}) assert integrate_hypertangent_polynomial(Poly(t**5, t), DE) == \ (Poly(1/(4*a)*t**4 - 1/(2*a)*t**2, t), Poly(1/(2*a), t)) def test_integrate_nonlinear_no_specials(): a, d, = Poly(x**2*t**5 + x*t**4 - nu**2*t**3 - x*(x**2 + 1)*t**2 - (x**2 - nu**2)*t - x**5/4, t), Poly(x**2*t**4 + x**2*(x**2 + 2)*t**2 + x**2 + x**4 + x**6/4, t) # f(x) == phi_nu(x), the logarithmic derivative of J_v, the Bessel function, # which has no specials (see Chapter 5, note 4 of Bronstein's book). f = Function('phi_nu') DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-t**2 - t/x - (1 - nu**2/x**2), t)], 'Tfuncs': [f]}) assert integrate_nonlinear_no_specials(a, d, DE) == \ (-log(1 + f(x)**2 + x**2/2)/2 + (- 4 - x**2)/(4 + 2*x**2 + 4*f(x)**2), True) assert integrate_nonlinear_no_specials(Poly(t, t), Poly(1, t), DE) == \ (0, False) def test_integer_powers(): assert integer_powers([x, x/2, x**2 + 1, x*Rational(2, 3)]) == [ (x/6, [(x, 6), (x/2, 3), (x*Rational(2, 3), 4)]), (1 + x**2, [(1 + x**2, 1)])] def test_DifferentialExtension_exp(): assert DifferentialExtension(exp(x) + exp(x**2), x)._important_attrs == \ (Poly(t1 + t0, t1), Poly(1, t1), [Poly(1, x,), Poly(t0, t0), Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i)), Lambda(i, exp(i**2))], [], [None, 'exp', 'exp'], [None, x, x**2]) assert DifferentialExtension(exp(x) + exp(2*x), x)._important_attrs == \ (Poly(t0**2 + t0, t0), Poly(1, t0), [Poly(1, x), Poly(t0, t0)], [x, t0], [Lambda(i, exp(i))], [], [None, 'exp'], [None, x]) assert DifferentialExtension(exp(x) + exp(x/2), x)._important_attrs == \ (Poly(t0**2 + t0, t0), Poly(1, t0), [Poly(1, x), Poly(t0/2, t0)], [x, t0], [Lambda(i, exp(i/2))], [], [None, 'exp'], [None, x/2]) assert DifferentialExtension(exp(x) + exp(x**2) + exp(x + x**2), x)._important_attrs == \ (Poly((1 + t0)*t1 + t0, t1), Poly(1, t1), [Poly(1, x), Poly(t0, t0), Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i)), Lambda(i, exp(i**2))], [], [None, 'exp', 'exp'], [None, x, x**2]) assert DifferentialExtension(exp(x) + exp(x**2) + exp(x + x**2 + 1), x)._important_attrs == \ (Poly((1 + S.Exp1*t0)*t1 + t0, t1), Poly(1, t1), [Poly(1, x), Poly(t0, t0), Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i)), Lambda(i, exp(i**2))], [], [None, 'exp', 'exp'], [None, x, x**2]) assert DifferentialExtension(exp(x) + exp(x**2) + exp(x/2 + x**2), x)._important_attrs == \ (Poly((t0 + 1)*t1 + t0**2, t1), Poly(1, t1), [Poly(1, x), Poly(t0/2, t0), Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i/2)), Lambda(i, exp(i**2))], [(exp(x/2), sqrt(exp(x)))], [None, 'exp', 'exp'], [None, x/2, x**2]) assert DifferentialExtension(exp(x) + exp(x**2) + exp(x/2 + x**2 + 3), x)._important_attrs == \ (Poly((t0*exp(3) + 1)*t1 + t0**2, t1), Poly(1, t1), [Poly(1, x), Poly(t0/2, t0), Poly(2*x*t1, t1)], [x, t0, t1], [Lambda(i, exp(i/2)), Lambda(i, exp(i**2))], [(exp(x/2), sqrt(exp(x)))], [None, 'exp', 'exp'], [None, x/2, x**2]) assert DifferentialExtension(sqrt(exp(x)), x)._important_attrs == \ (Poly(t0, t0), Poly(1, t0), [Poly(1, x), Poly(t0/2, t0)], [x, t0], [Lambda(i, exp(i/2))], [(exp(x/2), sqrt(exp(x)))], [None, 'exp'], [None, x/2]) assert DifferentialExtension(exp(x/2), x)._important_attrs == \ (Poly(t0, t0), Poly(1, t0), [Poly(1, x), Poly(t0/2, t0)], [x, t0], [Lambda(i, exp(i/2))], [], [None, 'exp'], [None, x/2]) def test_DifferentialExtension_log(): assert DifferentialExtension(log(x)*log(x + 1)*log(2*x**2 + 2*x), x)._important_attrs == \ (Poly(t0*t1**2 + (t0*log(2) + t0**2)*t1, t1), Poly(1, t1), [Poly(1, x), Poly(1/x, t0), Poly(1/(x + 1), t1, expand=False)], [x, t0, t1], [Lambda(i, log(i)), Lambda(i, log(i + 1))], [], [None, 'log', 'log'], [None, x, x + 1]) assert DifferentialExtension(x**x*log(x), x)._important_attrs == \ (Poly(t0*t1, t1), Poly(1, t1), [Poly(1, x), Poly(1/x, t0), Poly((1 + t0)*t1, t1)], [x, t0, t1], [Lambda(i, log(i)), Lambda(i, exp(t0*i))], [(exp(x*log(x)), x**x)], [None, 'log', 'exp'], [None, x, t0*x]) def test_DifferentialExtension_symlog(): # See comment on test_risch_integrate below assert DifferentialExtension(log(x**x), x)._important_attrs == \ (Poly(t0*x, t1), Poly(1, t1), [Poly(1, x), Poly(1/x, t0), Poly((t0 + 1)*t1, t1)], [x, t0, t1], [Lambda(i, log(i)), Lambda(i, exp(i*t0))], [(exp(x*log(x)), x**x)], [None, 'log', 'exp'], [None, x, t0*x]) assert DifferentialExtension(log(x**y), x)._important_attrs == \ (Poly(y*t0, t0), Poly(1, t0), [Poly(1, x), Poly(1/x, t0)], [x, t0], [Lambda(i, log(i))], [(y*log(x), log(x**y))], [None, 'log'], [None, x]) assert DifferentialExtension(log(sqrt(x)), x)._important_attrs == \ (Poly(t0, t0), Poly(2, t0), [Poly(1, x), Poly(1/x, t0)], [x, t0], [Lambda(i, log(i))], [(log(x)/2, log(sqrt(x)))], [None, 'log'], [None, x]) def test_DifferentialExtension_handle_first(): assert DifferentialExtension(exp(x)*log(x), x, handle_first='log')._important_attrs == \ (Poly(t0*t1, t1), Poly(1, t1), [Poly(1, x), Poly(1/x, t0), Poly(t1, t1)], [x, t0, t1], [Lambda(i, log(i)), Lambda(i, exp(i))], [], [None, 'log', 'exp'], [None, x, x]) assert DifferentialExtension(exp(x)*log(x), x, handle_first='exp')._important_attrs == \ (Poly(t0*t1, t1), Poly(1, t1), [Poly(1, x), Poly(t0, t0), Poly(1/x, t1)], [x, t0, t1], [Lambda(i, exp(i)), Lambda(i, log(i))], [], [None, 'exp', 'log'], [None, x, x]) # This one must have the log first, regardless of what we set it to # (because the log is inside of the exponential: x**x == exp(x*log(x))) assert DifferentialExtension(-x**x*log(x)**2 + x**x - x**x/x, x, handle_first='exp')._important_attrs == \ DifferentialExtension(-x**x*log(x)**2 + x**x - x**x/x, x, handle_first='log')._important_attrs == \ (Poly((-1 + x - x*t0**2)*t1, t1), Poly(x, t1), [Poly(1, x), Poly(1/x, t0), Poly((1 + t0)*t1, t1)], [x, t0, t1], [Lambda(i, log(i)), Lambda(i, exp(t0*i))], [(exp(x*log(x)), x**x)], [None, 'log', 'exp'], [None, x, t0*x]) def test_DifferentialExtension_all_attrs(): # Test 'unimportant' attributes DE = DifferentialExtension(exp(x)*log(x), x, handle_first='exp') assert DE.f == exp(x)*log(x) assert DE.newf == t0*t1 assert DE.x == x assert DE.cases == ['base', 'exp', 'primitive'] assert DE.case == 'primitive' assert DE.level == -1 assert DE.t == t1 == DE.T[DE.level] assert DE.d == Poly(1/x, t1) == DE.D[DE.level] raises(ValueError, lambda: DE.increment_level()) DE.decrement_level() assert DE.level == -2 assert DE.t == t0 == DE.T[DE.level] assert DE.d == Poly(t0, t0) == DE.D[DE.level] assert DE.case == 'exp' DE.decrement_level() assert DE.level == -3 assert DE.t == x == DE.T[DE.level] == DE.x assert DE.d == Poly(1, x) == DE.D[DE.level] assert DE.case == 'base' raises(ValueError, lambda: DE.decrement_level()) DE.increment_level() DE.increment_level() assert DE.level == -1 assert DE.t == t1 == DE.T[DE.level] assert DE.d == Poly(1/x, t1) == DE.D[DE.level] assert DE.case == 'primitive' # Test methods assert DE.indices('log') == [2] assert DE.indices('exp') == [1] def test_DifferentialExtension_extension_flag(): raises(ValueError, lambda: DifferentialExtension(extension={'T': [x, t]})) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert DE._important_attrs == (None, None, [Poly(1, x), Poly(t, t)], [x, t], None, None, None, None) assert DE.d == Poly(t, t) assert DE.t == t assert DE.level == -1 assert DE.cases == ['base', 'exp'] assert DE.x == x assert DE.case == 'exp' DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)], 'exts': [None, 'exp'], 'extargs': [None, x]}) assert DE._important_attrs == (None, None, [Poly(1, x), Poly(t, t)], [x, t], None, None, [None, 'exp'], [None, x]) raises(ValueError, lambda: DifferentialExtension()) def test_DifferentialExtension_misc(): # Odd ends assert DifferentialExtension(sin(y)*exp(x), x)._important_attrs == \ (Poly(sin(y)*t0, t0, domain='ZZ[sin(y)]'), Poly(1, t0, domain='ZZ'), [Poly(1, x, domain='ZZ'), Poly(t0, t0, domain='ZZ')], [x, t0], [Lambda(i, exp(i))], [], [None, 'exp'], [None, x]) raises(NotImplementedError, lambda: DifferentialExtension(sin(x), x)) assert DifferentialExtension(10**x, x)._important_attrs == \ (Poly(t0, t0), Poly(1, t0), [Poly(1, x), Poly(log(10)*t0, t0)], [x, t0], [Lambda(i, exp(i*log(10)))], [(exp(x*log(10)), 10**x)], [None, 'exp'], [None, x*log(10)]) assert DifferentialExtension(log(x) + log(x**2), x)._important_attrs in [ (Poly(3*t0, t0), Poly(2, t0), [Poly(1, x), Poly(2/x, t0)], [x, t0], [Lambda(i, log(i**2))], [], [None, ], [], [1], [x**2]), (Poly(3*t0, t0), Poly(1, t0), [Poly(1, x), Poly(1/x, t0)], [x, t0], [Lambda(i, log(i))], [], [None, 'log'], [None, x])] assert DifferentialExtension(S.Zero, x)._important_attrs == \ (Poly(0, x), Poly(1, x), [Poly(1, x)], [x], [], [], [None], [None]) assert DifferentialExtension(tan(atan(x).rewrite(log)), x)._important_attrs == \ (Poly(x, x), Poly(1, x), [Poly(1, x)], [x], [], [], [None], [None]) def test_DifferentialExtension_Rothstein(): # Rothstein's integral f = (2581284541*exp(x) + 1757211400)/(39916800*exp(3*x) + 119750400*exp(x)**2 + 119750400*exp(x) + 39916800)*exp(1/(exp(x) + 1) - 10*x) assert DifferentialExtension(f, x)._important_attrs == \ (Poly((1757211400 + 2581284541*t0)*t1, t1), Poly(39916800 + 119750400*t0 + 119750400*t0**2 + 39916800*t0**3, t1), [Poly(1, x), Poly(t0, t0), Poly(-(10 + 21*t0 + 10*t0**2)/(1 + 2*t0 + t0**2)*t1, t1, domain='ZZ(t0)')], [x, t0, t1], [Lambda(i, exp(i)), Lambda(i, exp(1/(t0 + 1) - 10*i))], [], [None, 'exp', 'exp'], [None, x, 1/(t0 + 1) - 10*x]) class _TestingException(Exception): """Dummy Exception class for testing.""" pass def test_DecrementLevel(): DE = DifferentialExtension(x*log(exp(x) + 1), x) assert DE.level == -1 assert DE.t == t1 assert DE.d == Poly(t0/(t0 + 1), t1) assert DE.case == 'primitive' with DecrementLevel(DE): assert DE.level == -2 assert DE.t == t0 assert DE.d == Poly(t0, t0) assert DE.case == 'exp' with DecrementLevel(DE): assert DE.level == -3 assert DE.t == x assert DE.d == Poly(1, x) assert DE.case == 'base' assert DE.level == -2 assert DE.t == t0 assert DE.d == Poly(t0, t0) assert DE.case == 'exp' assert DE.level == -1 assert DE.t == t1 assert DE.d == Poly(t0/(t0 + 1), t1) assert DE.case == 'primitive' # Test that __exit__ is called after an exception correctly try: with DecrementLevel(DE): raise _TestingException except _TestingException: pass else: raise AssertionError("Did not raise.") assert DE.level == -1 assert DE.t == t1 assert DE.d == Poly(t0/(t0 + 1), t1) assert DE.case == 'primitive' def test_risch_integrate(): assert risch_integrate(t0*exp(x), x) == t0*exp(x) assert risch_integrate(sin(x), x, rewrite_complex=True) == -exp(I*x)/2 - exp(-I*x)/2 # From my GSoC writeup assert risch_integrate((1 + 2*x**2 + x**4 + 2*x**3*exp(2*x**2))/ (x**4*exp(x**2) + 2*x**2*exp(x**2) + exp(x**2)), x) == \ NonElementaryIntegral(exp(-x**2), x) + exp(x**2)/(1 + x**2) assert risch_integrate(0, x) == 0 # also tests prde_cancel() e1 = log(x/exp(x) + 1) ans1 = risch_integrate(e1, x) assert ans1 == (x*log(x*exp(-x) + 1) + NonElementaryIntegral((x**2 - x)/(x + exp(x)), x)) assert cancel(diff(ans1, x) - e1) == 0 # also tests issue #10798 e2 = (log(-1/y)/2 - log(1/y)/2)/y - (log(1 - 1/y)/2 - log(1 + 1/y)/2)/y ans2 = risch_integrate(e2, y) assert ans2 == log(1/y)*log(1 - 1/y)/2 - log(1/y)*log(1 + 1/y)/2 + \ NonElementaryIntegral((I*pi*y**2 - 2*y*log(1/y) - I*pi)/(2*y**3 - 2*y), y) assert expand_log(cancel(diff(ans2, y) - e2), force=True) == 0 # These are tested here in addition to in test_DifferentialExtension above # (symlogs) to test that backsubs works correctly. The integrals should be # written in terms of the original logarithms in the integrands. # XXX: Unfortunately, making backsubs work on this one is a little # trickier, because x**x is converted to exp(x*log(x)), and so log(x**x) # is converted to x*log(x). (x**2*log(x)).subs(x*log(x), log(x**x)) is # smart enough, the issue is that these splits happen at different places # in the algorithm. Maybe a heuristic is in order assert risch_integrate(log(x**x), x) == x**2*log(x)/2 - x**2/4 assert risch_integrate(log(x**y), x) == x*log(x**y) - x*y assert risch_integrate(log(sqrt(x)), x) == x*log(sqrt(x)) - x/2 def test_risch_integrate_float(): assert risch_integrate((-60*exp(x) - 19.2*exp(4*x))*exp(4*x), x) == -2.4*exp(8*x) - 12.0*exp(5*x) def test_NonElementaryIntegral(): assert isinstance(risch_integrate(exp(x**2), x), NonElementaryIntegral) assert isinstance(risch_integrate(x**x*log(x), x), NonElementaryIntegral) # Make sure methods of Integral still give back a NonElementaryIntegral assert isinstance(NonElementaryIntegral(x**x*t0, x).subs(t0, log(x)), NonElementaryIntegral) def test_xtothex(): a = risch_integrate(x**x, x) assert a == NonElementaryIntegral(x**x, x) assert isinstance(a, NonElementaryIntegral) def test_DifferentialExtension_equality(): DE1 = DE2 = DifferentialExtension(log(x), x) assert DE1 == DE2 def test_DifferentialExtension_printing(): DE = DifferentialExtension(exp(2*x**2) + log(exp(x**2) + 1), x) assert repr(DE) == ("DifferentialExtension(dict([('f', exp(2*x**2) + log(exp(x**2) + 1)), " "('x', x), ('T', [x, t0, t1]), ('D', [Poly(1, x, domain='ZZ'), Poly(2*x*t0, t0, domain='ZZ[x]'), " "Poly(2*t0*x/(t0 + 1), t1, domain='ZZ(x,t0)')]), ('fa', Poly(t1 + t0**2, t1, domain='ZZ[t0]')), " "('fd', Poly(1, t1, domain='ZZ')), ('Tfuncs', [Lambda(i, exp(i**2)), Lambda(i, log(t0 + 1))]), " "('backsubs', []), ('exts', [None, 'exp', 'log']), ('extargs', [None, x**2, t0 + 1]), " "('cases', ['base', 'exp', 'primitive']), ('case', 'primitive'), ('t', t1), " "('d', Poly(2*t0*x/(t0 + 1), t1, domain='ZZ(x,t0)')), ('newf', t0**2 + t1), ('level', -1), " "('dummy', False)]))") assert str(DE) == ("DifferentialExtension({fa=Poly(t1 + t0**2, t1, domain='ZZ[t0]'), " "fd=Poly(1, t1, domain='ZZ'), D=[Poly(1, x, domain='ZZ'), Poly(2*x*t0, t0, domain='ZZ[x]'), " "Poly(2*t0*x/(t0 + 1), t1, domain='ZZ(x,t0)')]})")
0f5028f90305b808baa449648135a6d67a89243c7cb3d825e57e62b3c904b2c5
from sympy.core.function import (Derivative, Function, diff, expand) from sympy.core.numbers import (I, Rational, pi) from sympy.core.relational import Ne from sympy.core.singleton import S from sympy.core.symbol import (Dummy, Symbol, symbols) from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.hyperbolic import (acosh, acoth, asinh, atanh, cosh, sinh) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import (acos, acot, acsc, asec, asin, atan, cos, cot, csc, sec, sin, tan) from sympy.functions.special.delta_functions import Heaviside from sympy.functions.special.elliptic_integrals import (elliptic_e, elliptic_f) from sympy.functions.special.error_functions import (Chi, Ci, Ei, Shi, Si, erf, erfi, fresnelc, fresnels, li) from sympy.functions.special.gamma_functions import uppergamma from sympy.functions.special.polynomials import (assoc_laguerre, chebyshevt, chebyshevu, gegenbauer, hermite, jacobi, laguerre, legendre) from sympy.functions.special.zeta_functions import polylog from sympy.integrals.integrals import (Integral, integrate) from sympy.logic.boolalg import And from sympy.integrals.manualintegrate import (manualintegrate, find_substitutions, _parts_rule, integral_steps, contains_dont_know, manual_subs) from sympy.testing.pytest import raises, slow x, y, z, u, n, a, b, c = symbols('x y z u n a b c') f = Function('f') def test_find_substitutions(): assert find_substitutions((cot(x)**2 + 1)**2*csc(x)**2*cot(x)**2, x, u) == \ [(cot(x), 1, -u**6 - 2*u**4 - u**2)] assert find_substitutions((sec(x)**2 + tan(x) * sec(x)) / (sec(x) + tan(x)), x, u) == [(sec(x) + tan(x), 1, 1/u)] assert find_substitutions(x * exp(-x**2), x, u) == [(-x**2, Rational(-1, 2), exp(u))] def test_manualintegrate_polynomials(): assert manualintegrate(y, x) == x*y assert manualintegrate(exp(2), x) == x * exp(2) assert manualintegrate(x**2, x) == x**3 / 3 assert manualintegrate(3 * x**2 + 4 * x**3, x) == x**3 + x**4 assert manualintegrate((x + 2)**3, x) == (x + 2)**4 / 4 assert manualintegrate((3*x + 4)**2, x) == (3*x + 4)**3 / 9 assert manualintegrate((u + 2)**3, u) == (u + 2)**4 / 4 assert manualintegrate((3*u + 4)**2, u) == (3*u + 4)**3 / 9 def test_manualintegrate_exponentials(): assert manualintegrate(exp(2*x), x) == exp(2*x) / 2 assert manualintegrate(2**x, x) == (2 ** x) / log(2) assert manualintegrate(1 / x, x) == log(x) assert manualintegrate(1 / (2*x + 3), x) == log(2*x + 3) / 2 assert manualintegrate(log(x)**2 / x, x) == log(x)**3 / 3 def test_manualintegrate_parts(): assert manualintegrate(exp(x) * sin(x), x) == \ (exp(x) * sin(x)) / 2 - (exp(x) * cos(x)) / 2 assert manualintegrate(2*x*cos(x), x) == 2*x*sin(x) + 2*cos(x) assert manualintegrate(x * log(x), x) == x**2*log(x)/2 - x**2/4 assert manualintegrate(log(x), x) == x * log(x) - x assert manualintegrate((3*x**2 + 5) * exp(x), x) == \ 3*x**2*exp(x) - 6*x*exp(x) + 11*exp(x) assert manualintegrate(atan(x), x) == x*atan(x) - log(x**2 + 1)/2 # Make sure _parts_rule does not go into an infinite loop here assert manualintegrate(log(1/x)/(x + 1), x).has(Integral) # Make sure _parts_rule doesn't pick u = constant but can pick dv = # constant if necessary, e.g. for integrate(atan(x)) assert _parts_rule(cos(x), x) == None assert _parts_rule(exp(x), x) == None assert _parts_rule(x**2, x) == None result = _parts_rule(atan(x), x) assert result[0] == atan(x) and result[1] == 1 def test_manualintegrate_trigonometry(): assert manualintegrate(sin(x), x) == -cos(x) assert manualintegrate(tan(x), x) == -log(cos(x)) assert manualintegrate(sec(x), x) == log(sec(x) + tan(x)) assert manualintegrate(csc(x), x) == -log(csc(x) + cot(x)) assert manualintegrate(sin(x) * cos(x), x) in [sin(x) ** 2 / 2, -cos(x)**2 / 2] assert manualintegrate(-sec(x) * tan(x), x) == -sec(x) assert manualintegrate(csc(x) * cot(x), x) == -csc(x) assert manualintegrate(sec(x)**2, x) == tan(x) assert manualintegrate(csc(x)**2, x) == -cot(x) assert manualintegrate(x * sec(x**2), x) == log(tan(x**2) + sec(x**2))/2 assert manualintegrate(cos(x)*csc(sin(x)), x) == -log(cot(sin(x)) + csc(sin(x))) assert manualintegrate(cos(3*x)*sec(x), x) == -x + sin(2*x) assert manualintegrate(sin(3*x)*sec(x), x) == \ -3*log(cos(x)) + 2*log(cos(x)**2) - 2*cos(x)**2 @slow def test_manualintegrate_trigpowers(): assert manualintegrate(sin(x)**2 * cos(x), x) == sin(x)**3 / 3 assert manualintegrate(sin(x)**2 * cos(x) **2, x) == \ x / 8 - sin(4*x) / 32 assert manualintegrate(sin(x) * cos(x)**3, x) == -cos(x)**4 / 4 assert manualintegrate(sin(x)**3 * cos(x)**2, x) == \ cos(x)**5 / 5 - cos(x)**3 / 3 assert manualintegrate(tan(x)**3 * sec(x), x) == sec(x)**3/3 - sec(x) assert manualintegrate(tan(x) * sec(x) **2, x) == sec(x)**2/2 assert manualintegrate(cot(x)**5 * csc(x), x) == \ -csc(x)**5/5 + 2*csc(x)**3/3 - csc(x) assert manualintegrate(cot(x)**2 * csc(x)**6, x) == \ -cot(x)**7/7 - 2*cot(x)**5/5 - cot(x)**3/3 @slow def test_manualintegrate_inversetrig(): # atan assert manualintegrate(exp(x) / (1 + exp(2*x)), x) == atan(exp(x)) assert manualintegrate(1 / (4 + 9 * x**2), x) == atan(3 * x/2) / 6 assert manualintegrate(1 / (16 + 16 * x**2), x) == atan(x) / 16 assert manualintegrate(1 / (4 + x**2), x) == atan(x / 2) / 2 assert manualintegrate(1 / (1 + 4 * x**2), x) == atan(2*x) / 2 ra = Symbol('a', real=True) rb = Symbol('b', real=True) assert manualintegrate(1/(ra + rb*x**2), x) == \ Piecewise((atan(x/sqrt(ra/rb))/(rb*sqrt(ra/rb)), ra/rb > 0), (-acoth(x/sqrt(-ra/rb))/(rb*sqrt(-ra/rb)), And(ra/rb < 0, x**2 > -ra/rb)), (-atanh(x/sqrt(-ra/rb))/(rb*sqrt(-ra/rb)), And(ra/rb < 0, x**2 < -ra/rb))) assert manualintegrate(1/(4 + rb*x**2), x) == \ Piecewise((atan(x/(2*sqrt(1/rb)))/(2*rb*sqrt(1/rb)), 4/rb > 0), (-acoth(x/(2*sqrt(-1/rb)))/(2*rb*sqrt(-1/rb)), And(4/rb < 0, x**2 > -4/rb)), (-atanh(x/(2*sqrt(-1/rb)))/(2*rb*sqrt(-1/rb)), And(4/rb < 0, x**2 < -4/rb))) assert manualintegrate(1/(ra + 4*x**2), x) == \ Piecewise((atan(2*x/sqrt(ra))/(2*sqrt(ra)), ra/4 > 0), (-acoth(2*x/sqrt(-ra))/(2*sqrt(-ra)), And(ra/4 < 0, x**2 > -ra/4)), (-atanh(2*x/sqrt(-ra))/(2*sqrt(-ra)), And(ra/4 < 0, x**2 < -ra/4))) assert manualintegrate(1/(4 + 4*x**2), x) == atan(x) / 4 assert manualintegrate(1/(a + b*x**2), x) == atan(x/sqrt(a/b))/(b*sqrt(a/b)) # asin assert manualintegrate(1/sqrt(1-x**2), x) == asin(x) assert manualintegrate(1/sqrt(4-4*x**2), x) == asin(x)/2 assert manualintegrate(3/sqrt(1-9*x**2), x) == asin(3*x) assert manualintegrate(1/sqrt(4-9*x**2), x) == asin(x*Rational(3, 2))/3 # asinh assert manualintegrate(1/sqrt(x**2 + 1), x) == \ asinh(x) assert manualintegrate(1/sqrt(x**2 + 4), x) == \ asinh(x/2) assert manualintegrate(1/sqrt(4*x**2 + 4), x) == \ asinh(x)/2 assert manualintegrate(1/sqrt(4*x**2 + 1), x) == \ asinh(2*x)/2 assert manualintegrate(1/sqrt(a*x**2 + 1), x) == \ Piecewise((sqrt(-1/a)*asin(x*sqrt(-a)), a < 0), (sqrt(1/a)*asinh(sqrt(a)*x), a > 0)) assert manualintegrate(1/sqrt(a + x**2), x) == \ Piecewise((asinh(x*sqrt(1/a)), a > 0), (acosh(x*sqrt(-1/a)), a < 0)) # acosh assert manualintegrate(1/sqrt(x**2 - 1), x) == \ acosh(x) assert manualintegrate(1/sqrt(x**2 - 4), x) == \ acosh(x/2) assert manualintegrate(1/sqrt(4*x**2 - 4), x) == \ acosh(x)/2 assert manualintegrate(1/sqrt(9*x**2 - 1), x) == \ acosh(3*x)/3 assert manualintegrate(1/sqrt(a*x**2 - 4), x) == \ Piecewise((sqrt(1/a)*acosh(sqrt(a)*x/2), a > 0)) assert manualintegrate(1/sqrt(-a + 4*x**2), x) == \ Piecewise((asinh(2*x*sqrt(-1/a))/2, -a > 0), (acosh(2*x*sqrt(1/a))/2, -a < 0)) # From https://www.wikiwand.com/en/List_of_integrals_of_inverse_trigonometric_functions # asin assert manualintegrate(asin(x), x) == x*asin(x) + sqrt(1 - x**2) assert manualintegrate(asin(a*x), x) == Piecewise(((a*x*asin(a*x) + sqrt(-a**2*x**2 + 1))/a, Ne(a, 0)), (0, True)) assert manualintegrate(x*asin(a*x), x) == -a*Integral(x**2/sqrt(-a**2*x**2 + 1), x)/2 + x**2*asin(a*x)/2 # acos assert manualintegrate(acos(x), x) == x*acos(x) - sqrt(1 - x**2) assert manualintegrate(acos(a*x), x) == Piecewise(((a*x*acos(a*x) - sqrt(-a**2*x**2 + 1))/a, Ne(a, 0)), (pi*x/2, True)) assert manualintegrate(x*acos(a*x), x) == a*Integral(x**2/sqrt(-a**2*x**2 + 1), x)/2 + x**2*acos(a*x)/2 # atan assert manualintegrate(atan(x), x) == x*atan(x) - log(x**2 + 1)/2 assert manualintegrate(atan(a*x), x) == Piecewise(((a*x*atan(a*x) - log(a**2*x**2 + 1)/2)/a, Ne(a, 0)), (0, True)) assert manualintegrate(x*atan(a*x), x) == -a*(x/a**2 - atan(x/sqrt(a**(-2)))/(a**4*sqrt(a**(-2))))/2 + x**2*atan(a*x)/2 # acsc assert manualintegrate(acsc(x), x) == x*acsc(x) + Integral(1/(x*sqrt(1 - 1/x**2)), x) assert manualintegrate(acsc(a*x), x) == x*acsc(a*x) + Integral(1/(x*sqrt(1 - 1/(a**2*x**2))), x)/a assert manualintegrate(x*acsc(a*x), x) == x**2*acsc(a*x)/2 + Integral(1/sqrt(1 - 1/(a**2*x**2)), x)/(2*a) # asec assert manualintegrate(asec(x), x) == x*asec(x) - Integral(1/(x*sqrt(1 - 1/x**2)), x) assert manualintegrate(asec(a*x), x) == x*asec(a*x) - Integral(1/(x*sqrt(1 - 1/(a**2*x**2))), x)/a assert manualintegrate(x*asec(a*x), x) == x**2*asec(a*x)/2 - Integral(1/sqrt(1 - 1/(a**2*x**2)), x)/(2*a) # acot assert manualintegrate(acot(x), x) == x*acot(x) + log(x**2 + 1)/2 assert manualintegrate(acot(a*x), x) == Piecewise(((a*x*acot(a*x) + log(a**2*x**2 + 1)/2)/a, Ne(a, 0)), (pi*x/2, True)) assert manualintegrate(x*acot(a*x), x) == a*(x/a**2 - atan(x/sqrt(a**(-2)))/(a**4*sqrt(a**(-2))))/2 + x**2*acot(a*x)/2 # piecewise assert manualintegrate(1/sqrt(a-b*x**2), x) == \ Piecewise((sqrt(a/b)*asin(x*sqrt(b/a))/sqrt(a), And(-b < 0, a > 0)), (sqrt(-a/b)*asinh(x*sqrt(-b/a))/sqrt(a), And(-b > 0, a > 0)), (sqrt(a/b)*acosh(x*sqrt(b/a))/sqrt(-a), And(-b > 0, a < 0))) assert manualintegrate(1/sqrt(a + b*x**2), x) == \ Piecewise((sqrt(-a/b)*asin(x*sqrt(-b/a))/sqrt(a), And(a > 0, b < 0)), (sqrt(a/b)*asinh(x*sqrt(b/a))/sqrt(a), And(a > 0, b > 0)), (sqrt(-a/b)*acosh(x*sqrt(-b/a))/sqrt(-a), And(a < 0, b > 0))) def test_manualintegrate_trig_substitution(): assert manualintegrate(sqrt(16*x**2 - 9)/x, x) == \ Piecewise((sqrt(16*x**2 - 9) - 3*acos(3/(4*x)), And(x < Rational(3, 4), x > Rational(-3, 4)))) assert manualintegrate(1/(x**4 * sqrt(25-x**2)), x) == \ Piecewise((-sqrt(-x**2/25 + 1)/(125*x) - (-x**2/25 + 1)**(3*S.Half)/(15*x**3), And(x < 5, x > -5))) assert manualintegrate(x**7/(49*x**2 + 1)**(3 * S.Half), x) == \ ((49*x**2 + 1)**(5*S.Half)/28824005 - (49*x**2 + 1)**(3*S.Half)/5764801 + 3*sqrt(49*x**2 + 1)/5764801 + 1/(5764801*sqrt(49*x**2 + 1))) def test_manualintegrate_trivial_substitution(): assert manualintegrate((exp(x) - exp(-x))/x, x) == -Ei(-x) + Ei(x) f = Function('f') assert manualintegrate((f(x) - f(-x))/x, x) == \ -Integral(f(-x)/x, x) + Integral(f(x)/x, x) def test_manualintegrate_rational(): assert manualintegrate(1/(4 - x**2), x) == Piecewise((acoth(x/2)/2, x**2 > 4), (atanh(x/2)/2, x**2 < 4)) assert manualintegrate(1/(-1 + x**2), x) == Piecewise((-acoth(x), x**2 > 1), (-atanh(x), x**2 < 1)) def test_manualintegrate_special(): f, F = 4*exp(-x**2/3), 2*sqrt(3)*sqrt(pi)*erf(sqrt(3)*x/3) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = 3*exp(4*x**2), 3*sqrt(pi)*erfi(2*x)/4 assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = x**Rational(1, 3)*exp(-x/8), -16*uppergamma(Rational(4, 3), x/8) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = exp(2*x)/x, Ei(2*x) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = exp(1 + 2*x - x**2), sqrt(pi)*exp(2)*erf(x - 1)/2 assert manualintegrate(f, x) == F and F.diff(x).equals(f) f = sin(x**2 + 4*x + 1) F = (sqrt(2)*sqrt(pi)*(-sin(3)*fresnelc(sqrt(2)*(2*x + 4)/(2*sqrt(pi))) + cos(3)*fresnels(sqrt(2)*(2*x + 4)/(2*sqrt(pi))))/2) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = cos(4*x**2), sqrt(2)*sqrt(pi)*fresnelc(2*sqrt(2)*x/sqrt(pi))/4 assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = sin(3*x + 2)/x, sin(2)*Ci(3*x) + cos(2)*Si(3*x) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = sinh(3*x - 2)/x, -sinh(2)*Chi(3*x) + cosh(2)*Shi(3*x) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = 5*cos(2*x - 3)/x, 5*cos(3)*Ci(2*x) + 5*sin(3)*Si(2*x) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = cosh(x/2)/x, Chi(x/2) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = cos(x**2)/x, Ci(x**2)/2 assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = 1/log(2*x + 1), li(2*x + 1)/2 assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = polylog(2, 5*x)/x, polylog(3, 5*x) assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = 5/sqrt(3 - 2*sin(x)**2), 5*sqrt(3)*elliptic_f(x, Rational(2, 3))/3 assert manualintegrate(f, x) == F and F.diff(x).equals(f) f, F = sqrt(4 + 9*sin(x)**2), 2*elliptic_e(x, Rational(-9, 4)) assert manualintegrate(f, x) == F and F.diff(x).equals(f) def test_manualintegrate_derivative(): assert manualintegrate(pi * Derivative(x**2 + 2*x + 3), x) == \ pi * (x**2 + 2*x + 3) assert manualintegrate(Derivative(x**2 + 2*x + 3, y), x) == \ Integral(Derivative(x**2 + 2*x + 3, y)) assert manualintegrate(Derivative(sin(x), x, x, x, y), x) == \ Derivative(sin(x), x, x, y) def test_manualintegrate_Heaviside(): assert manualintegrate(Heaviside(x), x) == x*Heaviside(x) assert manualintegrate(x*Heaviside(2), x) == x**2/2 assert manualintegrate(x*Heaviside(-2), x) == 0 assert manualintegrate(x*Heaviside( x), x) == x**2*Heaviside( x)/2 assert manualintegrate(x*Heaviside(-x), x) == x**2*Heaviside(-x)/2 assert manualintegrate(Heaviside(2*x + 4), x) == (x+2)*Heaviside(2*x + 4) assert manualintegrate(x*Heaviside(x), x) == x**2*Heaviside(x)/2 assert manualintegrate(Heaviside(x + 1)*Heaviside(1 - x)*x**2, x) == \ ((x**3/3 + Rational(1, 3))*Heaviside(x + 1) - Rational(2, 3))*Heaviside(-x + 1) y = Symbol('y') assert manualintegrate(sin(7 + x)*Heaviside(3*x - 7), x) == \ (- cos(x + 7) + cos(Rational(28, 3)))*Heaviside(3*x - S(7)) assert manualintegrate(sin(y + x)*Heaviside(3*x - y), x) == \ (cos(y*Rational(4, 3)) - cos(x + y))*Heaviside(3*x - y) def test_manualintegrate_orthogonal_poly(): n = symbols('n') a, b = 7, Rational(5, 3) polys = [jacobi(n, a, b, x), gegenbauer(n, a, x), chebyshevt(n, x), chebyshevu(n, x), legendre(n, x), hermite(n, x), laguerre(n, x), assoc_laguerre(n, a, x)] for p in polys: integral = manualintegrate(p, x) for deg in [-2, -1, 0, 1, 3, 5, 8]: # some accept negative "degree", some do not try: p_subbed = p.subs(n, deg) except ValueError: continue assert (integral.subs(n, deg).diff(x) - p_subbed).expand() == 0 # can also integrate simple expressions with these polynomials q = x*p.subs(x, 2*x + 1) integral = manualintegrate(q, x) for deg in [2, 4, 7]: assert (integral.subs(n, deg).diff(x) - q.subs(n, deg)).expand() == 0 # cannot integrate with respect to any other parameter t = symbols('t') for i in range(len(p.args) - 1): new_args = list(p.args) new_args[i] = t assert isinstance(manualintegrate(p.func(*new_args), t), Integral) @slow def test_issue_6799(): r, x, phi = map(Symbol, 'r x phi'.split()) n = Symbol('n', integer=True, positive=True) integrand = (cos(n*(x-phi))*cos(n*x)) limits = (x, -pi, pi) assert manualintegrate(integrand, x) == \ ((n*x/2 + sin(2*n*x)/4)*cos(n*phi) - sin(n*phi)*cos(n*x)**2/2)/n assert r * integrate(integrand, limits).trigsimp() / pi == r * cos(n * phi) assert not integrate(integrand, limits).has(Dummy) def test_issue_12251(): assert manualintegrate(x**y, x) == Piecewise( (x**(y + 1)/(y + 1), Ne(y, -1)), (log(x), True)) def test_issue_3796(): assert manualintegrate(diff(exp(x + x**2)), x) == exp(x + x**2) assert integrate(x * exp(x**4), x, risch=False) == -I*sqrt(pi)*erf(I*x**2)/4 def test_manual_true(): assert integrate(exp(x) * sin(x), x, manual=True) == \ (exp(x) * sin(x)) / 2 - (exp(x) * cos(x)) / 2 assert integrate(sin(x) * cos(x), x, manual=True) in \ [sin(x) ** 2 / 2, -cos(x)**2 / 2] def test_issue_6746(): y = Symbol('y') n = Symbol('n') assert manualintegrate(y**x, x) == Piecewise( (y**x/log(y), Ne(log(y), 0)), (x, True)) assert manualintegrate(y**(n*x), x) == Piecewise( (Piecewise( (y**(n*x)/log(y), Ne(log(y), 0)), (n*x, True) )/n, Ne(n, 0)), (x, True)) assert manualintegrate(exp(n*x), x) == Piecewise( (exp(n*x)/n, Ne(n, 0)), (x, True)) y = Symbol('y', positive=True) assert manualintegrate((y + 1)**x, x) == (y + 1)**x/log(y + 1) y = Symbol('y', zero=True) assert manualintegrate((y + 1)**x, x) == x y = Symbol('y') n = Symbol('n', nonzero=True) assert manualintegrate(y**(n*x), x) == Piecewise( (y**(n*x)/log(y), Ne(log(y), 0)), (n*x, True))/n y = Symbol('y', positive=True) assert manualintegrate((y + 1)**(n*x), x) == \ (y + 1)**(n*x)/(n*log(y + 1)) a = Symbol('a', negative=True) b = Symbol('b') assert manualintegrate(1/(a + b*x**2), x) == atan(x/sqrt(a/b))/(b*sqrt(a/b)) b = Symbol('b', negative=True) assert manualintegrate(1/(a + b*x**2), x) == \ atan(x/(sqrt(-a)*sqrt(-1/b)))/(b*sqrt(-a)*sqrt(-1/b)) assert manualintegrate(1/((x**a + y**b + 4)*sqrt(a*x**2 + 1)), x) == \ y**(-b)*Integral(x**(-a)/(y**(-b)*sqrt(a*x**2 + 1) + x**(-a)*sqrt(a*x**2 + 1) + 4*x**(-a)*y**(-b)*sqrt(a*x**2 + 1)), x) assert manualintegrate(1/((x**2 + 4)*sqrt(4*x**2 + 1)), x) == \ Integral(1/((x**2 + 4)*sqrt(4*x**2 + 1)), x) assert manualintegrate(1/(x - a**x + x*b**2), x) == \ Integral(1/(-a**x + b**2*x + x), x) @slow def test_issue_2850(): assert manualintegrate(asin(x)*log(x), x) == -x*asin(x) - sqrt(-x**2 + 1) \ + (x*asin(x) + sqrt(-x**2 + 1))*log(x) - Integral(sqrt(-x**2 + 1)/x, x) assert manualintegrate(acos(x)*log(x), x) == -x*acos(x) + sqrt(-x**2 + 1) + \ (x*acos(x) - sqrt(-x**2 + 1))*log(x) + Integral(sqrt(-x**2 + 1)/x, x) assert manualintegrate(atan(x)*log(x), x) == -x*atan(x) + (x*atan(x) - \ log(x**2 + 1)/2)*log(x) + log(x**2 + 1)/2 + Integral(log(x**2 + 1)/x, x)/2 def test_issue_9462(): assert manualintegrate(sin(2*x)*exp(x), x) == exp(x)*sin(2*x)/5 - 2*exp(x)*cos(2*x)/5 assert not contains_dont_know(integral_steps(sin(2*x)*exp(x), x)) assert manualintegrate((x - 3) / (x**2 - 2*x + 2)**2, x) == \ Integral(x/(x**4 - 4*x**3 + 8*x**2 - 8*x + 4), x) \ - 3*Integral(1/(x**4 - 4*x**3 + 8*x**2 - 8*x + 4), x) def test_cyclic_parts(): f = cos(x)*exp(x/4) F = 16*exp(x/4)*sin(x)/17 + 4*exp(x/4)*cos(x)/17 assert manualintegrate(f, x) == F and F.diff(x) == f f = x*cos(x)*exp(x/4) F = (x*(16*exp(x/4)*sin(x)/17 + 4*exp(x/4)*cos(x)/17) - 128*exp(x/4)*sin(x)/289 + 240*exp(x/4)*cos(x)/289) assert manualintegrate(f, x) == F and F.diff(x) == f @slow def test_issue_10847_slow(): assert manualintegrate((4*x**4 + 4*x**3 + 16*x**2 + 12*x + 8) / (x**6 + 2*x**5 + 3*x**4 + 4*x**3 + 3*x**2 + 2*x + 1), x) == \ 2*x/(x**2 + 1) + 3*atan(x) - 1/(x**2 + 1) - 3/(x + 1) @slow def test_issue_10847(): assert manualintegrate(x**2 / (x**2 - c), x) == c*atan(x/sqrt(-c))/sqrt(-c) + x rc = Symbol('c', real=True) assert manualintegrate(x**2 / (x**2 - rc), x) == \ rc*Piecewise((atan(x/sqrt(-rc))/sqrt(-rc), -rc > 0), (-acoth(x/sqrt(rc))/sqrt(rc), And(-rc < 0, x**2 > rc)), (-atanh(x/sqrt(rc))/sqrt(rc), And(-rc < 0, x**2 < rc))) + x assert manualintegrate(sqrt(x - y) * log(z / x), x) == \ 4*y**Rational(3, 2)*atan(sqrt(x - y)/sqrt(y))/3 - 4*y*sqrt(x - y)/3 +\ 2*(x - y)**Rational(3, 2)*log(z/x)/3 + 4*(x - y)**Rational(3, 2)/9 ry = Symbol('y', real=True) rz = Symbol('z', real=True) assert manualintegrate(sqrt(x - ry) * log(rz / x), x) == \ 4*ry**2*Piecewise((atan(sqrt(x - ry)/sqrt(ry))/sqrt(ry), ry > 0), (-acoth(sqrt(x - ry)/sqrt(-ry))/sqrt(-ry), And(x - ry > -ry, ry < 0)), (-atanh(sqrt(x - ry)/sqrt(-ry))/sqrt(-ry), And(x - ry < -ry, ry < 0)))/3 \ - 4*ry*sqrt(x - ry)/3 + 2*(x - ry)**Rational(3, 2)*log(rz/x)/3 \ + 4*(x - ry)**Rational(3, 2)/9 assert manualintegrate(sqrt(x) * log(x), x) == 2*x**Rational(3, 2)*log(x)/3 - 4*x**Rational(3, 2)/9 assert manualintegrate(sqrt(a*x + b) / x, x) == \ 2*b*atan(sqrt(a*x + b)/sqrt(-b))/sqrt(-b) + 2*sqrt(a*x + b) ra = Symbol('a', real=True) rb = Symbol('b', real=True) assert manualintegrate(sqrt(ra*x + rb) / x, x) == \ -2*rb*Piecewise((-atan(sqrt(ra*x + rb)/sqrt(-rb))/sqrt(-rb), -rb > 0), (acoth(sqrt(ra*x + rb)/sqrt(rb))/sqrt(rb), And(-rb < 0, ra*x + rb > rb)), (atanh(sqrt(ra*x + rb)/sqrt(rb))/sqrt(rb), And(-rb < 0, ra*x + rb < rb))) \ + 2*sqrt(ra*x + rb) assert expand(manualintegrate(sqrt(ra*x + rb) / (x + rc), x)) == -2*ra*rc*Piecewise((atan(sqrt(ra*x + rb)/sqrt(ra*rc - rb))/sqrt(ra*rc - rb), \ ra*rc - rb > 0), (-acoth(sqrt(ra*x + rb)/sqrt(-ra*rc + rb))/sqrt(-ra*rc + rb), And(ra*rc - rb < 0, ra*x + rb > -ra*rc + rb)), \ (-atanh(sqrt(ra*x + rb)/sqrt(-ra*rc + rb))/sqrt(-ra*rc + rb), And(ra*rc - rb < 0, ra*x + rb < -ra*rc + rb))) \ + 2*rb*Piecewise((atan(sqrt(ra*x + rb)/sqrt(ra*rc - rb))/sqrt(ra*rc - rb), ra*rc - rb > 0), \ (-acoth(sqrt(ra*x + rb)/sqrt(-ra*rc + rb))/sqrt(-ra*rc + rb), And(ra*rc - rb < 0, ra*x + rb > -ra*rc + rb)), \ (-atanh(sqrt(ra*x + rb)/sqrt(-ra*rc + rb))/sqrt(-ra*rc + rb), And(ra*rc - rb < 0, ra*x + rb < -ra*rc + rb))) + 2*sqrt(ra*x + rb) assert manualintegrate(sqrt(2*x + 3) / (x + 1), x) == 2*sqrt(2*x + 3) - log(sqrt(2*x + 3) + 1) + log(sqrt(2*x + 3) - 1) assert manualintegrate(sqrt(2*x + 3) / 2 * x, x) == (2*x + 3)**Rational(5, 2)/20 - (2*x + 3)**Rational(3, 2)/4 assert manualintegrate(x**Rational(3,2) * log(x), x) == 2*x**Rational(5,2)*log(x)/5 - 4*x**Rational(5,2)/25 assert manualintegrate(x**(-3) * log(x), x) == -log(x)/(2*x**2) - 1/(4*x**2) assert manualintegrate(log(y)/(y**2*(1 - 1/y)), y) == \ log(y)*log(-1 + 1/y) - Integral(log(-1 + 1/y)/y, y) def test_issue_12899(): assert manualintegrate(f(x,y).diff(x),y) == Integral(Derivative(f(x,y),x),y) assert manualintegrate(f(x,y).diff(y).diff(x),y) == Derivative(f(x,y),x) def test_constant_independent_of_symbol(): assert manualintegrate(Integral(y, (x, 1, 2)), x) == \ x*Integral(y, (x, 1, 2)) def test_issue_12641(): assert manualintegrate(sin(2*x), x) == -cos(2*x)/2 assert manualintegrate(cos(x)*sin(2*x), x) == -2*cos(x)**3/3 assert manualintegrate((sin(2*x)*cos(x))/(1 + cos(x)), x) == \ -2*log(cos(x) + 1) - cos(x)**2 + 2*cos(x) @slow def test_issue_13297(): assert manualintegrate(sin(x) * cos(x)**5, x) == -cos(x)**6 / 6 def test_issue_14470(): assert manualintegrate(1/(x*sqrt(x + 1)), x) == \ log(-1 + 1/sqrt(x + 1)) - log(1 + 1/sqrt(x + 1)) @slow def test_issue_9858(): assert manualintegrate(exp(x)*cos(exp(x)), x) == sin(exp(x)) assert manualintegrate(exp(2*x)*cos(exp(x)), x) == \ exp(x)*sin(exp(x)) + cos(exp(x)) res = manualintegrate(exp(10*x)*sin(exp(x)), x) assert not res.has(Integral) assert res.diff(x) == exp(10*x)*sin(exp(x)) # an example with many similar integrations by parts assert manualintegrate(sum([x*exp(k*x) for k in range(1, 8)]), x) == ( x*exp(7*x)/7 + x*exp(6*x)/6 + x*exp(5*x)/5 + x*exp(4*x)/4 + x*exp(3*x)/3 + x*exp(2*x)/2 + x*exp(x) - exp(7*x)/49 -exp(6*x)/36 - exp(5*x)/25 - exp(4*x)/16 - exp(3*x)/9 - exp(2*x)/4 - exp(x)) def test_issue_8520(): assert manualintegrate(x/(x**4 + 1), x) == atan(x**2)/2 assert manualintegrate(x**2/(x**6 + 25), x) == atan(x**3/5)/15 f = x/(9*x**4 + 4)**2 assert manualintegrate(f, x).diff(x).factor() == f def test_manual_subs(): x, y = symbols('x y') expr = log(x) + exp(x) # if log(x) is y, then exp(y) is x assert manual_subs(expr, log(x), y) == y + exp(exp(y)) # if exp(x) is y, then log(y) need not be x assert manual_subs(expr, exp(x), y) == log(x) + y raises(ValueError, lambda: manual_subs(expr, x)) raises(ValueError, lambda: manual_subs(expr, exp(x), x, y)) @slow def test_issue_15471(): f = log(x)*cos(log(x))/x**Rational(3, 4) F = -128*x**Rational(1, 4)*sin(log(x))/289 + 240*x**Rational(1, 4)*cos(log(x))/289 + (16*x**Rational(1, 4)*sin(log(x))/17 + 4*x**Rational(1, 4)*cos(log(x))/17)*log(x) assert manualintegrate(f, x) == F and F.diff(x).equals(f) def test_quadratic_denom(): f = (5*x + 2)/(3*x**2 - 2*x + 8) assert manualintegrate(f, x) == 5*log(3*x**2 - 2*x + 8)/6 + 11*sqrt(23)*atan(3*sqrt(23)*(x - Rational(1, 3))/23)/69 g = 3/(2*x**2 + 3*x + 1) assert manualintegrate(g, x) == 3*log(4*x + 2) - 3*log(4*x + 4)
7368acb78d76c0451e47689d67bbf2614c739cd6b003b3af041ea4732430e3b8
# A collection of failing integrals from the issues. from sympy.core.numbers import (I, Rational, oo, pi) from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.complexes import sign from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.hyperbolic import (csch, sech, sinh) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import (acos, atan, cos, sec, sin, tan) from sympy.functions.special.delta_functions import DiracDelta from sympy.functions.special.gamma_functions import gamma from sympy.integrals.integrals import (Integral, integrate) from sympy.testing.pytest import XFAIL, SKIP, slow, skip, ON_TRAVIS from sympy.abc import x, k, c, y, b, h, a, m, z, n, t @SKIP("Too slow for @slow") @XFAIL def test_issue_3880(): # integrate_hyperexponential(Poly(t*2*(1 - t0**2)*t0*(x**3 + x**2), t), Poly((1 + t0**2)**2*2*(x**2 + x + 1), t), [Poly(1, x), Poly(1 + t0**2, t0), Poly(t, t)], [x, t0, t], [exp, tan]) assert not integrate(exp(x)*cos(2*x)*sin(2*x) * (x**3 + x**2)/(2*(x**2 + x + 1)), x).has(Integral) @XFAIL def test_issue_4212(): assert not integrate(sign(x), x).has(Integral) @XFAIL def test_issue_4491(): # Can be solved via variable transformation x = y - 1 assert not integrate(x*sqrt(x**2 + 2*x + 4), x).has(Integral) @XFAIL def test_issue_4511(): # This works, but gives a complicated answer. The correct answer is x - cos(x). # If current answer is simplified, 1 - cos(x) + x is obtained. # The last one is what Maple gives. It is also quite slow. assert integrate(cos(x)**2 / (1 - sin(x))) in [x - cos(x), 1 - cos(x) + x, -2/(tan((S.Half)*x)**2 + 1) + x] @XFAIL def test_integrate_DiracDelta_fails(): # issue 6427 assert integrate(integrate(integrate( DiracDelta(x - y - z), (z, 0, oo)), (y, 0, 1)), (x, 0, 1)) == S.Half @XFAIL @slow def test_issue_4525(): # Warning: takes a long time assert not integrate((x**m * (1 - x)**n * (a + b*x + c*x**2))/(1 + x**2), (x, 0, 1)).has(Integral) @XFAIL @slow def test_issue_4540(): if ON_TRAVIS: skip("Too slow for travis.") # Note, this integral is probably nonelementary assert not integrate( (sin(1/x) - x*exp(x)) / ((-sin(1/x) + x*exp(x))*x + x*sin(1/x)), x).has(Integral) @XFAIL @slow def test_issue_4891(): # Requires the hypergeometric function. assert not integrate(cos(x)**y, x).has(Integral) @XFAIL @slow def test_issue_1796a(): assert not integrate(exp(2*b*x)*exp(-a*x**2), x).has(Integral) @XFAIL def test_issue_4895b(): assert not integrate(exp(2*b*x)*exp(-a*x**2), (x, -oo, 0)).has(Integral) @XFAIL def test_issue_4895c(): assert not integrate(exp(2*b*x)*exp(-a*x**2), (x, -oo, oo)).has(Integral) @XFAIL def test_issue_4895d(): assert not integrate(exp(2*b*x)*exp(-a*x**2), (x, 0, oo)).has(Integral) @XFAIL @slow def test_issue_4941(): if ON_TRAVIS: skip("Too slow for travis.") assert not integrate(sqrt(1 + sinh(x/20)**2), (x, -25, 25)).has(Integral) @XFAIL def test_issue_4992(): # Nonelementary integral. Requires hypergeometric/Meijer-G handling. assert not integrate(log(x) * x**(k - 1) * exp(-x) / gamma(k), (x, 0, oo)).has(Integral) @XFAIL def test_issue_16396a(): i = integrate(1/(1+sqrt(tan(x))), (x, pi/3, pi/6)) assert not i.has(Integral) @XFAIL def test_issue_16396b(): i = integrate(x*sin(x)/(1+cos(x)**2), (x, 0, pi)) assert not i.has(Integral) @XFAIL def test_issue_16161(): i = integrate(x*sec(x)**2, x) assert not i.has(Integral) # assert i == x*tan(x) + log(cos(x)) @XFAIL def test_issue_16046(): assert integrate(exp(exp(I*x)), [x, 0, 2*pi]) == 2*pi @XFAIL def test_issue_15925a(): assert not integrate(sqrt((1+sin(x))**2+(cos(x))**2), (x, -pi/2, pi/2)).has(Integral) @XFAIL @slow def test_issue_15925b(): if ON_TRAVIS: skip("Too slow for travis.") assert not integrate(sqrt((-12*cos(x)**2*sin(x))**2+(12*cos(x)*sin(x)**2)**2), (x, 0, pi/6)).has(Integral) @XFAIL def test_issue_15925b_manual(): assert not integrate(sqrt((-12*cos(x)**2*sin(x))**2+(12*cos(x)*sin(x)**2)**2), (x, 0, pi/6), manual=True).has(Integral) @XFAIL @slow def test_issue_15227(): if ON_TRAVIS: skip("Too slow for travis.") i = integrate(log(1-x)*log((1+x)**2)/x, (x, 0, 1)) assert not i.has(Integral) # assert i == -5*zeta(3)/4 @XFAIL @slow def test_issue_14716(): i = integrate(log(x + 5)*cos(pi*x),(x, S.Half, 1)) assert not i.has(Integral) # Mathematica can not solve it either, but # integrate(log(x + 5)*cos(pi*x),(x, S.Half, 1)).transform(x, y - 5).doit() # works # assert i == -log(Rational(11, 2))/pi - Si(pi*Rational(11, 2))/pi + Si(6*pi)/pi @XFAIL def test_issue_14709a(): i = integrate(x*acos(1 - 2*x/h), (x, 0, h)) assert not i.has(Integral) # assert i == 5*h**2*pi/16 @slow @XFAIL def test_issue_14398(): assert not integrate(exp(x**2)*cos(x), x).has(Integral) @XFAIL def test_issue_14074(): i = integrate(log(sin(x)), (x, 0, pi/2)) assert not i.has(Integral) # assert i == -pi*log(2)/2 @XFAIL @slow def test_issue_14078b(): i = integrate((atan(4*x)-atan(2*x))/x, (x, 0, oo)) assert not i.has(Integral) # assert i == pi*log(2)/2 @XFAIL def test_issue_13792(): i = integrate(log(1/x) / (1 - x), (x, 0, 1)) assert not i.has(Integral) # assert i in [polylog(2, -exp_polar(I*pi)), pi**2/6] @XFAIL def test_issue_11845a(): assert not integrate(exp(y - x**3), (x, 0, 1)).has(Integral) @XFAIL def test_issue_11845b(): assert not integrate(exp(-y - x**3), (x, 0, 1)).has(Integral) @XFAIL def test_issue_11813(): assert not integrate((a - x)**Rational(-1, 2)*x, (x, 0, a)).has(Integral) @XFAIL def test_issue_11742(): i = integrate(sqrt(-x**2 + 8*x + 48), (x, 4, 12)) assert not i.has(Integral) # assert i == 16*pi @XFAIL def test_issue_11254a(): assert not integrate(sech(x), (x, 0, 1)).has(Integral) @XFAIL def test_issue_11254b(): assert not integrate(csch(x), (x, 0, 1)).has(Integral) @XFAIL def test_issue_10584(): assert not integrate(sqrt(x**2 + 1/x**2), x).has(Integral) @XFAIL def test_issue_9723(): assert not integrate(sqrt(x + sqrt(x))).has(Integral) @XFAIL def test_issue_9101(): assert not integrate(log(x + sqrt(x**2 + y**2 + z**2)), z).has(Integral) @XFAIL def test_issue_7264(): assert not integrate(exp(x)*sqrt(1 + exp(2*x))).has(Integral) @XFAIL def test_issue_7147(): assert not integrate(x/sqrt(a*x**2 + b*x + c)**3, x).has(Integral) @XFAIL def test_issue_7109(): assert not integrate(sqrt(a**2/(a**2 - x**2)), x).has(Integral) @XFAIL def test_integrate_Piecewise_rational_over_reals(): f = Piecewise( (0, t - 478.515625*pi < 0), (13.2075145209219*pi/(0.000871222*t + 0.995)**2, t - 478.515625*pi >= 0)) assert abs((integrate(f, (t, 0, oo)) - 15235.9375*pi).evalf()) <= 1e-7 @XFAIL def test_issue_4311_slow(): # Not slow when bypassing heurish assert not integrate(x*abs(9-x**2), x).has(Integral) @XFAIL def test_issue_20370(): a = symbols('a', positive=True) assert integrate((1 + a * cos(x))**-1, (x, 0, 2 * pi)) == (2 * pi / sqrt(1 - a**2))
66b20805e9e806d89332bccb136c0325c1c57119ff3bbfaf984a2100e7057717
from sympy.core.function import expand_func from sympy.core.numbers import (I, Rational, oo, pi) from sympy.core.singleton import S from sympy.core.sorting import default_sort_key from sympy.functions.elementary.exponential import (exp, exp_polar, log) from sympy.functions.elementary.hyperbolic import cosh from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import (cos, sin, sinc) from sympy.functions.special.error_functions import (erf, erfc) from sympy.functions.special.gamma_functions import (gamma, polygamma) from sympy.functions.special.hyper import (hyper, meijerg) from sympy.integrals.integrals import (Integral, integrate) from sympy.simplify.hyperexpand import hyperexpand from sympy.simplify.simplify import simplify from sympy.integrals.meijerint import (_rewrite_single, _rewrite1, meijerint_indefinite, _inflate_g, _create_lookup_table, meijerint_definite, meijerint_inversion) from sympy.testing.pytest import slow from sympy.testing.randtest import (verify_numerically, random_complex_number as randcplx) from sympy.abc import x, y, a, b, c, d, s, t, z def test_rewrite_single(): def t(expr, c, m): e = _rewrite_single(meijerg([a], [b], [c], [d], expr), x) assert e is not None assert isinstance(e[0][0][2], meijerg) assert e[0][0][2].argument.as_coeff_mul(x) == (c, (m,)) def tn(expr): assert _rewrite_single(meijerg([a], [b], [c], [d], expr), x) is None t(x, 1, x) t(x**2, 1, x**2) t(x**2 + y*x**2, y + 1, x**2) tn(x**2 + x) tn(x**y) def u(expr, x): from sympy.core.add import Add r = _rewrite_single(expr, x) e = Add(*[res[0]*res[2] for res in r[0]]).replace( exp_polar, exp) # XXX Hack? assert verify_numerically(e, expr, x) u(exp(-x)*sin(x), x) # The following has stopped working because hyperexpand changed slightly. # It is probably not worth fixing #u(exp(-x)*sin(x)*cos(x), x) # This one cannot be done numerically, since it comes out as a g-function # of argument 4*pi # NOTE This also tests a bug in inverse mellin transform (which used to # turn exp(4*pi*I*t) into a factor of exp(4*pi*I)**t instead of # exp_polar). #u(exp(x)*sin(x), x) assert _rewrite_single(exp(x)*sin(x), x) == \ ([(-sqrt(2)/(2*sqrt(pi)), 0, meijerg(((Rational(-1, 2), 0, Rational(1, 4), S.Half, Rational(3, 4)), (1,)), ((), (Rational(-1, 2), 0)), 64*exp_polar(-4*I*pi)/x**4))], True) def test_rewrite1(): assert _rewrite1(x**3*meijerg([a], [b], [c], [d], x**2 + y*x**2)*5, x) == \ (5, x**3, [(1, 0, meijerg([a], [b], [c], [d], x**2*(y + 1)))], True) def test_meijerint_indefinite_numerically(): def t(fac, arg): g = meijerg([a], [b], [c], [d], arg)*fac subs = {a: randcplx()/10, b: randcplx()/10 + I, c: randcplx(), d: randcplx()} integral = meijerint_indefinite(g, x) assert integral is not None assert verify_numerically(g.subs(subs), integral.diff(x).subs(subs), x) t(1, x) t(2, x) t(1, 2*x) t(1, x**2) t(5, x**S('3/2')) t(x**3, x) t(3*x**S('3/2'), 4*x**S('7/3')) def test_meijerint_definite(): v, b = meijerint_definite(x, x, 0, 0) assert v.is_zero and b is True v, b = meijerint_definite(x, x, oo, oo) assert v.is_zero and b is True def test_inflate(): subs = {a: randcplx()/10, b: randcplx()/10 + I, c: randcplx(), d: randcplx(), y: randcplx()/10} def t(a, b, arg, n): from sympy.core.mul import Mul m1 = meijerg(a, b, arg) m2 = Mul(*_inflate_g(m1, n)) # NOTE: (the random number)**9 must still be on the principal sheet. # Thus make b&d small to create random numbers of small imaginary part. return verify_numerically(m1.subs(subs), m2.subs(subs), x, b=0.1, d=-0.1) assert t([[a], [b]], [[c], [d]], x, 3) assert t([[a, y], [b]], [[c], [d]], x, 3) assert t([[a], [b]], [[c, y], [d]], 2*x**3, 3) def test_recursive(): from sympy.core.symbol import symbols a, b, c = symbols('a b c', positive=True) r = exp(-(x - a)**2)*exp(-(x - b)**2) e = integrate(r, (x, 0, oo), meijerg=True) assert simplify(e.expand()) == ( sqrt(2)*sqrt(pi)*( (erf(sqrt(2)*(a + b)/2) + 1)*exp(-a**2/2 + a*b - b**2/2))/4) e = integrate(exp(-(x - a)**2)*exp(-(x - b)**2)*exp(c*x), (x, 0, oo), meijerg=True) assert simplify(e) == ( sqrt(2)*sqrt(pi)*(erf(sqrt(2)*(2*a + 2*b + c)/4) + 1)*exp(-a**2 - b**2 + (2*a + 2*b + c)**2/8)/4) assert simplify(integrate(exp(-(x - a - b - c)**2), (x, 0, oo), meijerg=True)) == \ sqrt(pi)/2*(1 + erf(a + b + c)) assert simplify(integrate(exp(-(x + a + b + c)**2), (x, 0, oo), meijerg=True)) == \ sqrt(pi)/2*(1 - erf(a + b + c)) @slow def test_meijerint(): from sympy.core.function import expand from sympy.core.symbol import symbols from sympy.functions.elementary.complexes import arg s, t, mu = symbols('s t mu', real=True) assert integrate(meijerg([], [], [0], [], s*t) *meijerg([], [], [mu/2], [-mu/2], t**2/4), (t, 0, oo)).is_Piecewise s = symbols('s', positive=True) assert integrate(x**s*meijerg([[], []], [[0], []], x), (x, 0, oo)) == \ gamma(s + 1) assert integrate(x**s*meijerg([[], []], [[0], []], x), (x, 0, oo), meijerg=True) == gamma(s + 1) assert isinstance(integrate(x**s*meijerg([[], []], [[0], []], x), (x, 0, oo), meijerg=False), Integral) assert meijerint_indefinite(exp(x), x) == exp(x) # TODO what simplifications should be done automatically? # This tests "extra case" for antecedents_1. a, b = symbols('a b', positive=True) assert simplify(meijerint_definite(x**a, x, 0, b)[0]) == \ b**(a + 1)/(a + 1) # This tests various conditions and expansions: meijerint_definite((x + 1)**3*exp(-x), x, 0, oo) == (16, True) # Again, how about simplifications? sigma, mu = symbols('sigma mu', positive=True) i, c = meijerint_definite(exp(-((x - mu)/(2*sigma))**2), x, 0, oo) assert simplify(i) == sqrt(pi)*sigma*(2 - erfc(mu/(2*sigma))) assert c == True i, _ = meijerint_definite(exp(-mu*x)*exp(sigma*x), x, 0, oo) # TODO it would be nice to test the condition assert simplify(i) == 1/(mu - sigma) # Test substitutions to change limits assert meijerint_definite(exp(x), x, -oo, 2) == (exp(2), True) # Note: causes a NaN in _check_antecedents assert expand(meijerint_definite(exp(x), x, 0, I)[0]) == exp(I) - 1 assert expand(meijerint_definite(exp(-x), x, 0, x)[0]) == \ 1 - exp(-exp(I*arg(x))*abs(x)) # Test -oo to oo assert meijerint_definite(exp(-x**2), x, -oo, oo) == (sqrt(pi), True) assert meijerint_definite(exp(-abs(x)), x, -oo, oo) == (2, True) assert meijerint_definite(exp(-(2*x - 3)**2), x, -oo, oo) == \ (sqrt(pi)/2, True) assert meijerint_definite(exp(-abs(2*x - 3)), x, -oo, oo) == (1, True) assert meijerint_definite(exp(-((x - mu)/sigma)**2/2)/sqrt(2*pi*sigma**2), x, -oo, oo) == (1, True) assert meijerint_definite(sinc(x)**2, x, -oo, oo) == (pi, True) # Test one of the extra conditions for 2 g-functinos assert meijerint_definite(exp(-x)*sin(x), x, 0, oo) == (S.Half, True) # Test a bug def res(n): return (1/(1 + x**2)).diff(x, n).subs(x, 1)*(-1)**n for n in range(6): assert integrate(exp(-x)*sin(x)*x**n, (x, 0, oo), meijerg=True) == \ res(n) # This used to test trigexpand... now it is done by linear substitution assert simplify(integrate(exp(-x)*sin(x + a), (x, 0, oo), meijerg=True) ) == sqrt(2)*sin(a + pi/4)/2 # Test the condition 14 from prudnikov. # (This is besselj*besselj in disguise, to stop the product from being # recognised in the tables.) a, b, s = symbols('a b s') from sympy.functions.elementary.complexes import re assert meijerint_definite(meijerg([], [], [a/2], [-a/2], x/4) *meijerg([], [], [b/2], [-b/2], x/4)*x**(s - 1), x, 0, oo ) == ( (4*2**(2*s - 2)*gamma(-2*s + 1)*gamma(a/2 + b/2 + s) /(gamma(-a/2 + b/2 - s + 1)*gamma(a/2 - b/2 - s + 1) *gamma(a/2 + b/2 - s + 1)), (re(s) < 1) & (re(s) < S(1)/2) & (re(a)/2 + re(b)/2 + re(s) > 0))) # test a bug assert integrate(sin(x**a)*sin(x**b), (x, 0, oo), meijerg=True) == \ Integral(sin(x**a)*sin(x**b), (x, 0, oo)) # test better hyperexpand assert integrate(exp(-x**2)*log(x), (x, 0, oo), meijerg=True) == \ (sqrt(pi)*polygamma(0, S.Half)/4).expand() # Test hyperexpand bug. from sympy.functions.special.gamma_functions import lowergamma n = symbols('n', integer=True) assert simplify(integrate(exp(-x)*x**n, x, meijerg=True)) == \ lowergamma(n + 1, x) # Test a bug with argument 1/x alpha = symbols('alpha', positive=True) assert meijerint_definite((2 - x)**alpha*sin(alpha/x), x, 0, 2) == \ (sqrt(pi)*alpha*gamma(alpha + 1)*meijerg(((), (alpha/2 + S.Half, alpha/2 + 1)), ((0, 0, S.Half), (Rational(-1, 2),)), alpha**2/16)/4, True) # test a bug related to 3016 a, s = symbols('a s', positive=True) assert simplify(integrate(x**s*exp(-a*x**2), (x, -oo, oo))) == \ a**(-s/2 - S.Half)*((-1)**s + 1)*gamma(s/2 + S.Half)/2 def test_bessel(): from sympy.functions.special.bessel import (besseli, besselj) assert simplify(integrate(besselj(a, z)*besselj(b, z)/z, (z, 0, oo), meijerg=True, conds='none')) == \ 2*sin(pi*(a/2 - b/2))/(pi*(a - b)*(a + b)) assert simplify(integrate(besselj(a, z)*besselj(a, z)/z, (z, 0, oo), meijerg=True, conds='none')) == 1/(2*a) # TODO more orthogonality integrals assert simplify(integrate(sin(z*x)*(x**2 - 1)**(-(y + S.Half)), (x, 1, oo), meijerg=True, conds='none') *2/((z/2)**y*sqrt(pi)*gamma(S.Half - y))) == \ besselj(y, z) # Werner Rosenheinrich # SOME INDEFINITE INTEGRALS OF BESSEL FUNCTIONS assert integrate(x*besselj(0, x), x, meijerg=True) == x*besselj(1, x) assert integrate(x*besseli(0, x), x, meijerg=True) == x*besseli(1, x) # TODO can do higher powers, but come out as high order ... should they be # reduced to order 0, 1? assert integrate(besselj(1, x), x, meijerg=True) == -besselj(0, x) assert integrate(besselj(1, x)**2/x, x, meijerg=True) == \ -(besselj(0, x)**2 + besselj(1, x)**2)/2 # TODO more besseli when tables are extended or recursive mellin works assert integrate(besselj(0, x)**2/x**2, x, meijerg=True) == \ -2*x*besselj(0, x)**2 - 2*x*besselj(1, x)**2 \ + 2*besselj(0, x)*besselj(1, x) - besselj(0, x)**2/x assert integrate(besselj(0, x)*besselj(1, x), x, meijerg=True) == \ -besselj(0, x)**2/2 assert integrate(x**2*besselj(0, x)*besselj(1, x), x, meijerg=True) == \ x**2*besselj(1, x)**2/2 assert integrate(besselj(0, x)*besselj(1, x)/x, x, meijerg=True) == \ (x*besselj(0, x)**2 + x*besselj(1, x)**2 - besselj(0, x)*besselj(1, x)) # TODO how does besselj(0, a*x)*besselj(0, b*x) work? # TODO how does besselj(0, x)**2*besselj(1, x)**2 work? # TODO sin(x)*besselj(0, x) etc come out a mess # TODO can x*log(x)*besselj(0, x) be done? # TODO how does besselj(1, x)*besselj(0, x+a) work? # TODO more indefinite integrals when struve functions etc are implemented # test a substitution assert integrate(besselj(1, x**2)*x, x, meijerg=True) == \ -besselj(0, x**2)/2 def test_inversion(): from sympy.functions.elementary.piecewise import piecewise_fold from sympy.functions.special.bessel import besselj from sympy.functions.special.delta_functions import Heaviside def inv(f): return piecewise_fold(meijerint_inversion(f, s, t)) assert inv(1/(s**2 + 1)) == sin(t)*Heaviside(t) assert inv(s/(s**2 + 1)) == cos(t)*Heaviside(t) assert inv(exp(-s)/s) == Heaviside(t - 1) assert inv(1/sqrt(1 + s**2)) == besselj(0, t)*Heaviside(t) # Test some antcedents checking. assert meijerint_inversion(sqrt(s)/sqrt(1 + s**2), s, t) is None assert inv(exp(s**2)) is None assert meijerint_inversion(exp(-s**2), s, t) is None def test_inversion_conditional_output(): from sympy.core.symbol import Symbol from sympy.integrals.transforms import InverseLaplaceTransform a = Symbol('a', positive=True) F = sqrt(pi/a)*exp(-2*sqrt(a)*sqrt(s)) f = meijerint_inversion(F, s, t) assert not f.is_Piecewise b = Symbol('b', real=True) F = F.subs(a, b) f2 = meijerint_inversion(F, s, t) assert f2.is_Piecewise # first piece is same as f assert f2.args[0][0] == f.subs(a, b) # last piece is an unevaluated transform assert f2.args[-1][1] ILT = InverseLaplaceTransform(F, s, t, None) assert f2.args[-1][0] == ILT or f2.args[-1][0] == ILT.as_integral def test_inversion_exp_real_nonreal_shift(): from sympy.core.symbol import Symbol from sympy.functions.special.delta_functions import DiracDelta r = Symbol('r', real=True) c = Symbol('c', extended_real=False) a = 1 + 2*I z = Symbol('z') assert not meijerint_inversion(exp(r*s), s, t).is_Piecewise assert meijerint_inversion(exp(a*s), s, t) is None assert meijerint_inversion(exp(c*s), s, t) is None f = meijerint_inversion(exp(z*s), s, t) assert f.is_Piecewise assert isinstance(f.args[0][0], DiracDelta) @slow def test_lookup_table(): from random import uniform, randrange from sympy.core.add import Add from sympy.integrals.meijerint import z as z_dummy table = {} _create_lookup_table(table) for _, l in sorted(table.items()): for formula, terms, cond, hint in sorted(l, key=default_sort_key): subs = {} for ai in list(formula.free_symbols) + [z_dummy]: if hasattr(ai, 'properties') and ai.properties: # these Wilds match positive integers subs[ai] = randrange(1, 10) else: subs[ai] = uniform(1.5, 2.0) if not isinstance(terms, list): terms = terms(subs) # First test that hyperexpand can do this. expanded = [hyperexpand(g) for (_, g) in terms] assert all(x.is_Piecewise or not x.has(meijerg) for x in expanded) # Now test that the meijer g-function is indeed as advertised. expanded = Add(*[f*x for (f, x) in terms]) a, b = formula.n(subs=subs), expanded.n(subs=subs) r = min(abs(a), abs(b)) if r < 1: assert abs(a - b).n() <= 1e-10 else: assert (abs(a - b)/r).n() <= 1e-10 def test_branch_bug(): from sympy.functions.special.gamma_functions import lowergamma from sympy.simplify.powsimp import powdenest # TODO gammasimp cannot prove that the factor is unity assert powdenest(integrate(erf(x**3), x, meijerg=True).diff(x), polar=True) == 2*erf(x**3)*gamma(Rational(2, 3))/3/gamma(Rational(5, 3)) assert integrate(erf(x**3), x, meijerg=True) == \ 2*x*erf(x**3)*gamma(Rational(2, 3))/(3*gamma(Rational(5, 3))) \ - 2*gamma(Rational(2, 3))*lowergamma(Rational(2, 3), x**6)/(3*sqrt(pi)*gamma(Rational(5, 3))) def test_linear_subs(): from sympy.functions.special.bessel import besselj assert integrate(sin(x - 1), x, meijerg=True) == -cos(1 - x) assert integrate(besselj(1, x - 1), x, meijerg=True) == -besselj(0, 1 - x) @slow def test_probability(): # various integrals from probability theory from sympy.core.function import expand_mul from sympy.core.symbol import (Symbol, symbols) from sympy.functions.elementary.complexes import Abs from sympy.simplify.gammasimp import gammasimp from sympy.simplify.powsimp import powsimp mu1, mu2 = symbols('mu1 mu2', nonzero=True) sigma1, sigma2 = symbols('sigma1 sigma2', positive=True) rate = Symbol('lambda', positive=True) def normal(x, mu, sigma): return 1/sqrt(2*pi*sigma**2)*exp(-(x - mu)**2/2/sigma**2) def exponential(x, rate): return rate*exp(-rate*x) assert integrate(normal(x, mu1, sigma1), (x, -oo, oo), meijerg=True) == 1 assert integrate(x*normal(x, mu1, sigma1), (x, -oo, oo), meijerg=True) == \ mu1 assert integrate(x**2*normal(x, mu1, sigma1), (x, -oo, oo), meijerg=True) \ == mu1**2 + sigma1**2 assert integrate(x**3*normal(x, mu1, sigma1), (x, -oo, oo), meijerg=True) \ == mu1**3 + 3*mu1*sigma1**2 assert integrate(normal(x, mu1, sigma1)*normal(y, mu2, sigma2), (x, -oo, oo), (y, -oo, oo), meijerg=True) == 1 assert integrate(x*normal(x, mu1, sigma1)*normal(y, mu2, sigma2), (x, -oo, oo), (y, -oo, oo), meijerg=True) == mu1 assert integrate(y*normal(x, mu1, sigma1)*normal(y, mu2, sigma2), (x, -oo, oo), (y, -oo, oo), meijerg=True) == mu2 assert integrate(x*y*normal(x, mu1, sigma1)*normal(y, mu2, sigma2), (x, -oo, oo), (y, -oo, oo), meijerg=True) == mu1*mu2 assert integrate((x + y + 1)*normal(x, mu1, sigma1)*normal(y, mu2, sigma2), (x, -oo, oo), (y, -oo, oo), meijerg=True) == 1 + mu1 + mu2 assert integrate((x + y - 1)*normal(x, mu1, sigma1)*normal(y, mu2, sigma2), (x, -oo, oo), (y, -oo, oo), meijerg=True) == \ -1 + mu1 + mu2 i = integrate(x**2*normal(x, mu1, sigma1)*normal(y, mu2, sigma2), (x, -oo, oo), (y, -oo, oo), meijerg=True) assert not i.has(Abs) assert simplify(i) == mu1**2 + sigma1**2 assert integrate(y**2*normal(x, mu1, sigma1)*normal(y, mu2, sigma2), (x, -oo, oo), (y, -oo, oo), meijerg=True) == \ sigma2**2 + mu2**2 assert integrate(exponential(x, rate), (x, 0, oo), meijerg=True) == 1 assert integrate(x*exponential(x, rate), (x, 0, oo), meijerg=True) == \ 1/rate assert integrate(x**2*exponential(x, rate), (x, 0, oo), meijerg=True) == \ 2/rate**2 def E(expr): res1 = integrate(expr*exponential(x, rate)*normal(y, mu1, sigma1), (x, 0, oo), (y, -oo, oo), meijerg=True) res2 = integrate(expr*exponential(x, rate)*normal(y, mu1, sigma1), (y, -oo, oo), (x, 0, oo), meijerg=True) assert expand_mul(res1) == expand_mul(res2) return res1 assert E(1) == 1 assert E(x*y) == mu1/rate assert E(x*y**2) == mu1**2/rate + sigma1**2/rate ans = sigma1**2 + 1/rate**2 assert simplify(E((x + y + 1)**2) - E(x + y + 1)**2) == ans assert simplify(E((x + y - 1)**2) - E(x + y - 1)**2) == ans assert simplify(E((x + y)**2) - E(x + y)**2) == ans # Beta' distribution alpha, beta = symbols('alpha beta', positive=True) betadist = x**(alpha - 1)*(1 + x)**(-alpha - beta)*gamma(alpha + beta) \ /gamma(alpha)/gamma(beta) assert integrate(betadist, (x, 0, oo), meijerg=True) == 1 i = integrate(x*betadist, (x, 0, oo), meijerg=True, conds='separate') assert (gammasimp(i[0]), i[1]) == (alpha/(beta - 1), 1 < beta) j = integrate(x**2*betadist, (x, 0, oo), meijerg=True, conds='separate') assert j[1] == (beta > 2) assert gammasimp(j[0] - i[0]**2) == (alpha + beta - 1)*alpha \ /(beta - 2)/(beta - 1)**2 # Beta distribution # NOTE: this is evaluated using antiderivatives. It also tests that # meijerint_indefinite returns the simplest possible answer. a, b = symbols('a b', positive=True) betadist = x**(a - 1)*(-x + 1)**(b - 1)*gamma(a + b)/(gamma(a)*gamma(b)) assert simplify(integrate(betadist, (x, 0, 1), meijerg=True)) == 1 assert simplify(integrate(x*betadist, (x, 0, 1), meijerg=True)) == \ a/(a + b) assert simplify(integrate(x**2*betadist, (x, 0, 1), meijerg=True)) == \ a*(a + 1)/(a + b)/(a + b + 1) assert simplify(integrate(x**y*betadist, (x, 0, 1), meijerg=True)) == \ gamma(a + b)*gamma(a + y)/gamma(a)/gamma(a + b + y) # Chi distribution k = Symbol('k', integer=True, positive=True) chi = 2**(1 - k/2)*x**(k - 1)*exp(-x**2/2)/gamma(k/2) assert powsimp(integrate(chi, (x, 0, oo), meijerg=True)) == 1 assert simplify(integrate(x*chi, (x, 0, oo), meijerg=True)) == \ sqrt(2)*gamma((k + 1)/2)/gamma(k/2) assert simplify(integrate(x**2*chi, (x, 0, oo), meijerg=True)) == k # Chi^2 distribution chisquared = 2**(-k/2)/gamma(k/2)*x**(k/2 - 1)*exp(-x/2) assert powsimp(integrate(chisquared, (x, 0, oo), meijerg=True)) == 1 assert simplify(integrate(x*chisquared, (x, 0, oo), meijerg=True)) == k assert simplify(integrate(x**2*chisquared, (x, 0, oo), meijerg=True)) == \ k*(k + 2) assert gammasimp(integrate(((x - k)/sqrt(2*k))**3*chisquared, (x, 0, oo), meijerg=True)) == 2*sqrt(2)/sqrt(k) # Dagum distribution a, b, p = symbols('a b p', positive=True) # XXX (x/b)**a does not work dagum = a*p/x*(x/b)**(a*p)/(1 + x**a/b**a)**(p + 1) assert simplify(integrate(dagum, (x, 0, oo), meijerg=True)) == 1 # XXX conditions are a mess arg = x*dagum assert simplify(integrate(arg, (x, 0, oo), meijerg=True, conds='none') ) == a*b*gamma(1 - 1/a)*gamma(p + 1 + 1/a)/( (a*p + 1)*gamma(p)) assert simplify(integrate(x*arg, (x, 0, oo), meijerg=True, conds='none') ) == a*b**2*gamma(1 - 2/a)*gamma(p + 1 + 2/a)/( (a*p + 2)*gamma(p)) # F-distribution d1, d2 = symbols('d1 d2', positive=True) f = sqrt(((d1*x)**d1 * d2**d2)/(d1*x + d2)**(d1 + d2))/x \ /gamma(d1/2)/gamma(d2/2)*gamma((d1 + d2)/2) assert simplify(integrate(f, (x, 0, oo), meijerg=True)) == 1 # TODO conditions are a mess assert simplify(integrate(x*f, (x, 0, oo), meijerg=True, conds='none') ) == d2/(d2 - 2) assert simplify(integrate(x**2*f, (x, 0, oo), meijerg=True, conds='none') ) == d2**2*(d1 + 2)/d1/(d2 - 4)/(d2 - 2) # TODO gamma, rayleigh # inverse gaussian lamda, mu = symbols('lamda mu', positive=True) dist = sqrt(lamda/2/pi)*x**(Rational(-3, 2))*exp(-lamda*(x - mu)**2/x/2/mu**2) mysimp = lambda expr: simplify(expr.rewrite(exp)) assert mysimp(integrate(dist, (x, 0, oo))) == 1 assert mysimp(integrate(x*dist, (x, 0, oo))) == mu assert mysimp(integrate((x - mu)**2*dist, (x, 0, oo))) == mu**3/lamda assert mysimp(integrate((x - mu)**3*dist, (x, 0, oo))) == 3*mu**5/lamda**2 # Levi c = Symbol('c', positive=True) assert integrate(sqrt(c/2/pi)*exp(-c/2/(x - mu))/(x - mu)**S('3/2'), (x, mu, oo)) == 1 # higher moments oo # log-logistic alpha, beta = symbols('alpha beta', positive=True) distn = (beta/alpha)*x**(beta - 1)/alpha**(beta - 1)/ \ (1 + x**beta/alpha**beta)**2 # FIXME: If alpha, beta are not declared as finite the line below hangs # after the changes in: # https://github.com/sympy/sympy/pull/16603 assert simplify(integrate(distn, (x, 0, oo))) == 1 # NOTE the conditions are a mess, but correctly state beta > 1 assert simplify(integrate(x*distn, (x, 0, oo), conds='none')) == \ pi*alpha/beta/sin(pi/beta) # (similar comment for conditions applies) assert simplify(integrate(x**y*distn, (x, 0, oo), conds='none')) == \ pi*alpha**y*y/beta/sin(pi*y/beta) # weibull k = Symbol('k', positive=True) n = Symbol('n', positive=True) distn = k/lamda*(x/lamda)**(k - 1)*exp(-(x/lamda)**k) assert simplify(integrate(distn, (x, 0, oo))) == 1 assert simplify(integrate(x**n*distn, (x, 0, oo))) == \ lamda**n*gamma(1 + n/k) # rice distribution from sympy.functions.special.bessel import besseli nu, sigma = symbols('nu sigma', positive=True) rice = x/sigma**2*exp(-(x**2 + nu**2)/2/sigma**2)*besseli(0, x*nu/sigma**2) assert integrate(rice, (x, 0, oo), meijerg=True) == 1 # can someone verify higher moments? # Laplace distribution mu = Symbol('mu', real=True) b = Symbol('b', positive=True) laplace = exp(-abs(x - mu)/b)/2/b assert integrate(laplace, (x, -oo, oo), meijerg=True) == 1 assert integrate(x*laplace, (x, -oo, oo), meijerg=True) == mu assert integrate(x**2*laplace, (x, -oo, oo), meijerg=True) == \ 2*b**2 + mu**2 # TODO are there other distributions supported on (-oo, oo) that we can do? # misc tests k = Symbol('k', positive=True) assert gammasimp(expand_mul(integrate(log(x)*x**(k - 1)*exp(-x)/gamma(k), (x, 0, oo)))) == polygamma(0, k) @slow def test_expint(): """ Test various exponential integrals. """ from sympy.core.symbol import Symbol from sympy.functions.elementary.complexes import unpolarify from sympy.functions.elementary.hyperbolic import sinh from sympy.functions.special.error_functions import (Chi, Ci, Ei, Shi, Si, expint) assert simplify(unpolarify(integrate(exp(-z*x)/x**y, (x, 1, oo), meijerg=True, conds='none' ).rewrite(expint).expand(func=True))) == expint(y, z) assert integrate(exp(-z*x)/x, (x, 1, oo), meijerg=True, conds='none').rewrite(expint).expand() == \ expint(1, z) assert integrate(exp(-z*x)/x**2, (x, 1, oo), meijerg=True, conds='none').rewrite(expint).expand() == \ expint(2, z).rewrite(Ei).rewrite(expint) assert integrate(exp(-z*x)/x**3, (x, 1, oo), meijerg=True, conds='none').rewrite(expint).expand() == \ expint(3, z).rewrite(Ei).rewrite(expint).expand() t = Symbol('t', positive=True) assert integrate(-cos(x)/x, (x, t, oo), meijerg=True).expand() == Ci(t) assert integrate(-sin(x)/x, (x, t, oo), meijerg=True).expand() == \ Si(t) - pi/2 assert integrate(sin(x)/x, (x, 0, z), meijerg=True) == Si(z) assert integrate(sinh(x)/x, (x, 0, z), meijerg=True) == Shi(z) assert integrate(exp(-x)/x, x, meijerg=True).expand().rewrite(expint) == \ I*pi - expint(1, x) assert integrate(exp(-x)/x**2, x, meijerg=True).rewrite(expint).expand() \ == expint(1, x) - exp(-x)/x - I*pi u = Symbol('u', polar=True) assert integrate(cos(u)/u, u, meijerg=True).expand().as_independent(u)[1] \ == Ci(u) assert integrate(cosh(u)/u, u, meijerg=True).expand().as_independent(u)[1] \ == Chi(u) assert integrate(expint(1, x), x, meijerg=True ).rewrite(expint).expand() == x*expint(1, x) - exp(-x) assert integrate(expint(2, x), x, meijerg=True ).rewrite(expint).expand() == \ -x**2*expint(1, x)/2 + x*exp(-x)/2 - exp(-x)/2 assert simplify(unpolarify(integrate(expint(y, x), x, meijerg=True).rewrite(expint).expand(func=True))) == \ -expint(y + 1, x) assert integrate(Si(x), x, meijerg=True) == x*Si(x) + cos(x) assert integrate(Ci(u), u, meijerg=True).expand() == u*Ci(u) - sin(u) assert integrate(Shi(x), x, meijerg=True) == x*Shi(x) - cosh(x) assert integrate(Chi(u), u, meijerg=True).expand() == u*Chi(u) - sinh(u) assert integrate(Si(x)*exp(-x), (x, 0, oo), meijerg=True) == pi/4 assert integrate(expint(1, x)*sin(x), (x, 0, oo), meijerg=True) == log(2)/2 def test_messy(): from sympy.functions.elementary.complexes import re from sympy.functions.elementary.hyperbolic import (acosh, acoth) from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import (asin, atan) from sympy.functions.special.bessel import besselj from sympy.functions.special.error_functions import (Chi, E1, Shi, Si) from sympy.integrals.transforms import (fourier_transform, laplace_transform) assert laplace_transform(Si(x), x, s) == ((-atan(s) + pi/2)/s, 0, True) assert laplace_transform(Shi(x), x, s) == ( acoth(s)/s, -oo, s**2 > 1) # where should the logs be simplified? assert laplace_transform(Chi(x), x, s) == ( (log(s**(-2)) - log(1 - 1/s**2))/(2*s), -oo, s**2 > 1) # TODO maybe simplify the inequalities? when the simplification # allows for generators instead of symbols this will work assert laplace_transform(besselj(a, x), x, s)[1:] == \ (0, (re(a) > -2) & (re(a) > -1)) # NOTE s < 0 can be done, but argument reduction is not good enough yet ans = fourier_transform(besselj(1, x)/x, x, s, noconds=False) assert tuple([ans[0].factor(deep=True).expand(), ans[1]]) == \ (Piecewise((0, (s > 1/(2*pi)) | (s < -1/(2*pi))), (2*sqrt(-4*pi**2*s**2 + 1), True)), s > 0) # TODO FT(besselj(0,x)) - conditions are messy (but for acceptable reasons) # - folding could be better assert integrate(E1(x)*besselj(0, x), (x, 0, oo), meijerg=True) == \ log(1 + sqrt(2)) assert integrate(E1(x)*besselj(1, x), (x, 0, oo), meijerg=True) == \ log(S.Half + sqrt(2)/2) assert integrate(1/x/sqrt(1 - x**2), x, meijerg=True) == \ Piecewise((-acosh(1/x), abs(x**(-2)) > 1), (I*asin(1/x), True)) def test_issue_6122(): assert integrate(exp(-I*x**2), (x, -oo, oo), meijerg=True) == \ -I*sqrt(pi)*exp(I*pi/4) def test_issue_6252(): expr = 1/x/(a + b*x)**Rational(1, 3) anti = integrate(expr, x, meijerg=True) assert not anti.has(hyper) # XXX the expression is a mess, but actually upon differentiation and # putting in numerical values seems to work... def test_issue_6348(): assert integrate(exp(I*x)/(1 + x**2), (x, -oo, oo)).simplify().rewrite(exp) \ == pi*exp(-1) def test_fresnel(): from sympy.functions.special.error_functions import (fresnelc, fresnels) assert expand_func(integrate(sin(pi*x**2/2), x)) == fresnels(x) assert expand_func(integrate(cos(pi*x**2/2), x)) == fresnelc(x) def test_issue_6860(): assert meijerint_indefinite(x**x**x, x) is None def test_issue_7337(): f = meijerint_indefinite(x*sqrt(2*x + 3), x).together() assert f == sqrt(2*x + 3)*(2*x**2 + x - 3)/5 assert f._eval_interval(x, S.NegativeOne, S.One) == Rational(2, 5) def test_issue_8368(): assert meijerint_indefinite(cosh(x)*exp(-x*t), x) == ( (-t - 1)*exp(x) + (-t + 1)*exp(-x))*exp(-t*x)/2/(t**2 - 1) def test_issue_10211(): from sympy.abc import h, w assert integrate((1/sqrt((y-x)**2 + h**2)**3), (x,0,w), (y,0,w)) == \ 2*sqrt(1 + w**2/h**2)/h - 2/h def test_issue_11806(): from sympy.core.symbol import symbols y, L = symbols('y L', positive=True) assert integrate(1/sqrt(x**2 + y**2)**3, (x, -L, L)) == \ 2*L/(y**2*sqrt(L**2 + y**2)) def test_issue_10681(): from sympy.polys.domains.realfield import RR from sympy.abc import R, r f = integrate(r**2*(R**2-r**2)**0.5, r, meijerg=True) g = (1.0/3)*R**1.0*r**3*hyper((-0.5, Rational(3, 2)), (Rational(5, 2),), r**2*exp_polar(2*I*pi)/R**2) assert RR.almosteq((f/g).n(), 1.0, 1e-12) def test_issue_13536(): from sympy.core.symbol import Symbol a = Symbol('a', real=True, positive=True) assert integrate(1/x**2, (x, oo, a)) == -1/a def test_issue_6462(): from sympy.core.symbol import Symbol x = Symbol('x') n = Symbol('n') # Not the actual issue, still wrong answer for n = 1, but that there is no # exception assert integrate(cos(x**n)/x**n, x, meijerg=True).subs(n, 2).equals( integrate(cos(x**2)/x**2, x, meijerg=True)) def test_indefinite_1_bug(): assert integrate((b + t)**(-a), t, meijerg=True ) == -b/(b**a*(1 + t/b)**a*(a - 1) ) - t/(b**a*(1 + t/b)**a*(a - 1))
aa76c244e3e98570dbb3b8a72a4e93dbbaab1d8e9ff5f5f4a9c0ab7facd8f9a6
from sympy.integrals.transforms import (mellin_transform, inverse_mellin_transform, laplace_transform, inverse_laplace_transform, fourier_transform, inverse_fourier_transform, sine_transform, inverse_sine_transform, cosine_transform, inverse_cosine_transform, hankel_transform, inverse_hankel_transform, LaplaceTransform, FourierTransform, SineTransform, CosineTransform, InverseLaplaceTransform, InverseFourierTransform, InverseSineTransform, InverseCosineTransform, IntegralTransformError) from sympy.core.function import (Function, expand_mul) from sympy.core import EulerGamma from sympy.core.numbers import (I, Rational, oo, pi) from sympy.core.relational import Eq, Ne from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.functions.combinatorial.factorials import factorial from sympy.functions.elementary.complexes import (Abs, arg, re, unpolarify) from sympy.functions.elementary.exponential import (exp, exp_polar, log) from sympy.functions.elementary.hyperbolic import (cosh, sinh) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import (atan, atan2, cos, sin, tan) from sympy.functions.special.bessel import (besseli, besselj, besselk, bessely) from sympy.functions.special.delta_functions import Heaviside from sympy.functions.special.error_functions import (erf, erfc, expint) from sympy.functions.special.gamma_functions import gamma from sympy.functions.special.hyper import meijerg from sympy.simplify.gammasimp import gammasimp from sympy.simplify.hyperexpand import hyperexpand from sympy.simplify.trigsimp import trigsimp from sympy.testing.pytest import XFAIL, slow, skip, raises, warns_deprecated_sympy from sympy.matrices import Matrix, eye from sympy.abc import x, s, a, b, c, d nu, beta, rho = symbols('nu beta rho') def test_undefined_function(): from sympy.integrals.transforms import MellinTransform f = Function('f') assert mellin_transform(f(x), x, s) == MellinTransform(f(x), x, s) assert mellin_transform(f(x) + exp(-x), x, s) == \ (MellinTransform(f(x), x, s) + gamma(s), (0, oo), True) assert laplace_transform(2*f(x), x, s) == 2*LaplaceTransform(f(x), x, s) # TODO test derivative and other rules when implemented def test_free_symbols(): f = Function('f') assert mellin_transform(f(x), x, s).free_symbols == {s} assert mellin_transform(f(x)*a, x, s).free_symbols == {s, a} def test_as_integral(): from sympy.integrals.integrals import Integral f = Function('f') assert mellin_transform(f(x), x, s).rewrite('Integral') == \ Integral(x**(s - 1)*f(x), (x, 0, oo)) assert fourier_transform(f(x), x, s).rewrite('Integral') == \ Integral(f(x)*exp(-2*I*pi*s*x), (x, -oo, oo)) assert laplace_transform(f(x), x, s).rewrite('Integral') == \ Integral(f(x)*exp(-s*x), (x, 0, oo)) assert str(2*pi*I*inverse_mellin_transform(f(s), s, x, (a, b)).rewrite('Integral')) \ == "Integral(f(s)/x**s, (s, _c - oo*I, _c + oo*I))" assert str(2*pi*I*inverse_laplace_transform(f(s), s, x).rewrite('Integral')) == \ "Integral(f(s)*exp(s*x), (s, _c - oo*I, _c + oo*I))" assert inverse_fourier_transform(f(s), s, x).rewrite('Integral') == \ Integral(f(s)*exp(2*I*pi*s*x), (s, -oo, oo)) # NOTE this is stuck in risch because meijerint cannot handle it @slow @XFAIL def test_mellin_transform_fail(): skip("Risch takes forever.") MT = mellin_transform bpos = symbols('b', positive=True) # bneg = symbols('b', negative=True) expr = (sqrt(x + b**2) + b)**a/sqrt(x + b**2) # TODO does not work with bneg, argument wrong. Needs changes to matching. assert MT(expr.subs(b, -bpos), x, s) == \ ((-1)**(a + 1)*2**(a + 2*s)*bpos**(a + 2*s - 1)*gamma(a + s) *gamma(1 - a - 2*s)/gamma(1 - s), (-re(a), -re(a)/2 + S.Half), True) expr = (sqrt(x + b**2) + b)**a assert MT(expr.subs(b, -bpos), x, s) == \ ( 2**(a + 2*s)*a*bpos**(a + 2*s)*gamma(-a - 2* s)*gamma(a + s)/gamma(-s + 1), (-re(a), -re(a)/2), True) # Test exponent 1: assert MT(expr.subs({b: -bpos, a: 1}), x, s) == \ (-bpos**(2*s + 1)*gamma(s)*gamma(-s - S.Half)/(2*sqrt(pi)), (-1, Rational(-1, 2)), True) def test_mellin_transform(): from sympy.functions.elementary.miscellaneous import (Max, Min) MT = mellin_transform bpos = symbols('b', positive=True) # 8.4.2 assert MT(x**nu*Heaviside(x - 1), x, s) == \ (-1/(nu + s), (-oo, -re(nu)), True) assert MT(x**nu*Heaviside(1 - x), x, s) == \ (1/(nu + s), (-re(nu), oo), True) assert MT((1 - x)**(beta - 1)*Heaviside(1 - x), x, s) == \ (gamma(beta)*gamma(s)/gamma(beta + s), (0, oo), re(beta) > 0) assert MT((x - 1)**(beta - 1)*Heaviside(x - 1), x, s) == \ (gamma(beta)*gamma(1 - beta - s)/gamma(1 - s), (-oo, 1 - re(beta)), re(beta) > 0) assert MT((1 + x)**(-rho), x, s) == \ (gamma(s)*gamma(rho - s)/gamma(rho), (0, re(rho)), True) assert MT(abs(1 - x)**(-rho), x, s) == ( 2*sin(pi*rho/2)*gamma(1 - rho)* cos(pi*(rho/2 - s))*gamma(s)*gamma(rho-s)/pi, (0, re(rho)), re(rho) < 1) mt = MT((1 - x)**(beta - 1)*Heaviside(1 - x) + a*(x - 1)**(beta - 1)*Heaviside(x - 1), x, s) assert mt[1], mt[2] == ((0, -re(beta) + 1), re(beta) > 0) assert MT((x**a - b**a)/(x - b), x, s)[0] == \ pi*b**(a + s - 1)*sin(pi*a)/(sin(pi*s)*sin(pi*(a + s))) assert MT((x**a - bpos**a)/(x - bpos), x, s) == \ (pi*bpos**(a + s - 1)*sin(pi*a)/(sin(pi*s)*sin(pi*(a + s))), (Max(0, -re(a)), Min(1, 1 - re(a))), True) expr = (sqrt(x + b**2) + b)**a assert MT(expr.subs(b, bpos), x, s) == \ (-a*(2*bpos)**(a + 2*s)*gamma(s)*gamma(-a - 2*s)/gamma(-a - s + 1), (0, -re(a)/2), True) expr = (sqrt(x + b**2) + b)**a/sqrt(x + b**2) assert MT(expr.subs(b, bpos), x, s) == \ (2**(a + 2*s)*bpos**(a + 2*s - 1)*gamma(s) *gamma(1 - a - 2*s)/gamma(1 - a - s), (0, -re(a)/2 + S.Half), True) # 8.4.2 assert MT(exp(-x), x, s) == (gamma(s), (0, oo), True) assert MT(exp(-1/x), x, s) == (gamma(-s), (-oo, 0), True) # 8.4.5 assert MT(log(x)**4*Heaviside(1 - x), x, s) == (24/s**5, (0, oo), True) assert MT(log(x)**3*Heaviside(x - 1), x, s) == (6/s**4, (-oo, 0), True) assert MT(log(x + 1), x, s) == (pi/(s*sin(pi*s)), (-1, 0), True) assert MT(log(1/x + 1), x, s) == (pi/(s*sin(pi*s)), (0, 1), True) assert MT(log(abs(1 - x)), x, s) == (pi/(s*tan(pi*s)), (-1, 0), True) assert MT(log(abs(1 - 1/x)), x, s) == (pi/(s*tan(pi*s)), (0, 1), True) # 8.4.14 assert MT(erf(sqrt(x)), x, s) == \ (-gamma(s + S.Half)/(sqrt(pi)*s), (Rational(-1, 2), 0), True) def test_mellin_transform2(): MT = mellin_transform # TODO we cannot currently do these (needs summation of 3F2(-1)) # this also implies that they cannot be written as a single g-function # (although this is possible) mt = MT(log(x)/(x + 1), x, s) assert mt[1:] == ((0, 1), True) assert not hyperexpand(mt[0], allow_hyper=True).has(meijerg) mt = MT(log(x)**2/(x + 1), x, s) assert mt[1:] == ((0, 1), True) assert not hyperexpand(mt[0], allow_hyper=True).has(meijerg) mt = MT(log(x)/(x + 1)**2, x, s) assert mt[1:] == ((0, 2), True) assert not hyperexpand(mt[0], allow_hyper=True).has(meijerg) @slow def test_mellin_transform_bessel(): from sympy.functions.elementary.miscellaneous import Max MT = mellin_transform # 8.4.19 assert MT(besselj(a, 2*sqrt(x)), x, s) == \ (gamma(a/2 + s)/gamma(a/2 - s + 1), (-re(a)/2, Rational(3, 4)), True) assert MT(sin(sqrt(x))*besselj(a, sqrt(x)), x, s) == \ (2**a*gamma(-2*s + S.Half)*gamma(a/2 + s + S.Half)/( gamma(-a/2 - s + 1)*gamma(a - 2*s + 1)), ( -re(a)/2 - S.Half, Rational(1, 4)), True) assert MT(cos(sqrt(x))*besselj(a, sqrt(x)), x, s) == \ (2**a*gamma(a/2 + s)*gamma(-2*s + S.Half)/( gamma(-a/2 - s + S.Half)*gamma(a - 2*s + 1)), ( -re(a)/2, Rational(1, 4)), True) assert MT(besselj(a, sqrt(x))**2, x, s) == \ (gamma(a + s)*gamma(S.Half - s) / (sqrt(pi)*gamma(1 - s)*gamma(1 + a - s)), (-re(a), S.Half), True) assert MT(besselj(a, sqrt(x))*besselj(-a, sqrt(x)), x, s) == \ (gamma(s)*gamma(S.Half - s) / (sqrt(pi)*gamma(1 - a - s)*gamma(1 + a - s)), (0, S.Half), True) # NOTE: prudnikov gives the strip below as (1/2 - re(a), 1). As far as # I can see this is wrong (since besselj(z) ~ 1/sqrt(z) for z large) assert MT(besselj(a - 1, sqrt(x))*besselj(a, sqrt(x)), x, s) == \ (gamma(1 - s)*gamma(a + s - S.Half) / (sqrt(pi)*gamma(Rational(3, 2) - s)*gamma(a - s + S.Half)), (S.Half - re(a), S.Half), True) assert MT(besselj(a, sqrt(x))*besselj(b, sqrt(x)), x, s) == \ (4**s*gamma(1 - 2*s)*gamma((a + b)/2 + s) / (gamma(1 - s + (b - a)/2)*gamma(1 - s + (a - b)/2) *gamma( 1 - s + (a + b)/2)), (-(re(a) + re(b))/2, S.Half), True) assert MT(besselj(a, sqrt(x))**2 + besselj(-a, sqrt(x))**2, x, s)[1:] == \ ((Max(re(a), -re(a)), S.Half), True) # Section 8.4.20 assert MT(bessely(a, 2*sqrt(x)), x, s) == \ (-cos(pi*(a/2 - s))*gamma(s - a/2)*gamma(s + a/2)/pi, (Max(-re(a)/2, re(a)/2), Rational(3, 4)), True) assert MT(sin(sqrt(x))*bessely(a, sqrt(x)), x, s) == \ (-4**s*sin(pi*(a/2 - s))*gamma(S.Half - 2*s) * gamma((1 - a)/2 + s)*gamma((1 + a)/2 + s) / (sqrt(pi)*gamma(1 - s - a/2)*gamma(1 - s + a/2)), (Max(-(re(a) + 1)/2, (re(a) - 1)/2), Rational(1, 4)), True) assert MT(cos(sqrt(x))*bessely(a, sqrt(x)), x, s) == \ (-4**s*cos(pi*(a/2 - s))*gamma(s - a/2)*gamma(s + a/2)*gamma(S.Half - 2*s) / (sqrt(pi)*gamma(S.Half - s - a/2)*gamma(S.Half - s + a/2)), (Max(-re(a)/2, re(a)/2), Rational(1, 4)), True) assert MT(besselj(a, sqrt(x))*bessely(a, sqrt(x)), x, s) == \ (-cos(pi*s)*gamma(s)*gamma(a + s)*gamma(S.Half - s) / (pi**S('3/2')*gamma(1 + a - s)), (Max(-re(a), 0), S.Half), True) assert MT(besselj(a, sqrt(x))*bessely(b, sqrt(x)), x, s) == \ (-4**s*cos(pi*(a/2 - b/2 + s))*gamma(1 - 2*s) * gamma(a/2 - b/2 + s)*gamma(a/2 + b/2 + s) / (pi*gamma(a/2 - b/2 - s + 1)*gamma(a/2 + b/2 - s + 1)), (Max((-re(a) + re(b))/2, (-re(a) - re(b))/2), S.Half), True) # NOTE bessely(a, sqrt(x))**2 and bessely(a, sqrt(x))*bessely(b, sqrt(x)) # are a mess (no matter what way you look at it ...) assert MT(bessely(a, sqrt(x))**2, x, s)[1:] == \ ((Max(-re(a), 0, re(a)), S.Half), True) # Section 8.4.22 # TODO we can't do any of these (delicate cancellation) # Section 8.4.23 assert MT(besselk(a, 2*sqrt(x)), x, s) == \ (gamma( s - a/2)*gamma(s + a/2)/2, (Max(-re(a)/2, re(a)/2), oo), True) assert MT(besselj(a, 2*sqrt(2*sqrt(x)))*besselk( a, 2*sqrt(2*sqrt(x))), x, s) == (4**(-s)*gamma(2*s)* gamma(a/2 + s)/(2*gamma(a/2 - s + 1)), (Max(0, -re(a)/2), oo), True) # TODO bessely(a, x)*besselk(a, x) is a mess assert MT(besseli(a, sqrt(x))*besselk(a, sqrt(x)), x, s) == \ (gamma(s)*gamma( a + s)*gamma(-s + S.Half)/(2*sqrt(pi)*gamma(a - s + 1)), (Max(-re(a), 0), S.Half), True) assert MT(besseli(b, sqrt(x))*besselk(a, sqrt(x)), x, s) == \ (2**(2*s - 1)*gamma(-2*s + 1)*gamma(-a/2 + b/2 + s)* \ gamma(a/2 + b/2 + s)/(gamma(-a/2 + b/2 - s + 1)* \ gamma(a/2 + b/2 - s + 1)), (Max(-re(a)/2 - re(b)/2, \ re(a)/2 - re(b)/2), S.Half), True) # TODO products of besselk are a mess mt = MT(exp(-x/2)*besselk(a, x/2), x, s) mt0 = gammasimp(trigsimp(gammasimp(mt[0].expand(func=True)))) assert mt0 == 2*pi**Rational(3, 2)*cos(pi*s)*gamma(-s + S.Half)/( (cos(2*pi*a) - cos(2*pi*s))*gamma(-a - s + 1)*gamma(a - s + 1)) assert mt[1:] == ((Max(-re(a), re(a)), oo), True) # TODO exp(x/2)*besselk(a, x/2) [etc] cannot currently be done # TODO various strange products of special orders @slow def test_expint(): from sympy.functions.elementary.miscellaneous import Max from sympy.functions.special.error_functions import (Ci, E1, Ei, Si) from sympy.functions.special.zeta_functions import lerchphi from sympy.simplify.simplify import simplify aneg = Symbol('a', negative=True) u = Symbol('u', polar=True) assert mellin_transform(E1(x), x, s) == (gamma(s)/s, (0, oo), True) assert inverse_mellin_transform(gamma(s)/s, s, x, (0, oo)).rewrite(expint).expand() == E1(x) assert mellin_transform(expint(a, x), x, s) == \ (gamma(s)/(a + s - 1), (Max(1 - re(a), 0), oo), True) # XXX IMT has hickups with complicated strips ... assert simplify(unpolarify( inverse_mellin_transform(gamma(s)/(aneg + s - 1), s, x, (1 - aneg, oo)).rewrite(expint).expand(func=True))) == \ expint(aneg, x) assert mellin_transform(Si(x), x, s) == \ (-2**s*sqrt(pi)*gamma(s/2 + S.Half)/( 2*s*gamma(-s/2 + 1)), (-1, 0), True) assert inverse_mellin_transform(-2**s*sqrt(pi)*gamma((s + 1)/2) /(2*s*gamma(-s/2 + 1)), s, x, (-1, 0)) \ == Si(x) assert mellin_transform(Ci(sqrt(x)), x, s) == \ (-2**(2*s - 1)*sqrt(pi)*gamma(s)/(s*gamma(-s + S.Half)), (0, 1), True) assert inverse_mellin_transform( -4**s*sqrt(pi)*gamma(s)/(2*s*gamma(-s + S.Half)), s, u, (0, 1)).expand() == Ci(sqrt(u)) # TODO LT of Si, Shi, Chi is a mess ... assert laplace_transform(Ci(x), x, s) == (-log(1 + s**2)/2/s, 0, True) assert laplace_transform(expint(a, x), x, s) == \ (lerchphi(s*exp_polar(I*pi), 1, a), 0, re(a) > S.Zero) assert laplace_transform(expint(1, x), x, s) == (log(s + 1)/s, 0, True) assert laplace_transform(expint(2, x), x, s) == \ ((s - log(s + 1))/s**2, 0, True) assert inverse_laplace_transform(-log(1 + s**2)/2/s, s, u).expand() == \ Heaviside(u)*Ci(u) assert inverse_laplace_transform(log(s + 1)/s, s, x).rewrite(expint) == \ Heaviside(x)*E1(x) assert inverse_laplace_transform((s - log(s + 1))/s**2, s, x).rewrite(expint).expand() == \ (expint(2, x)*Heaviside(x)).rewrite(Ei).rewrite(expint).expand() @slow def test_inverse_mellin_transform(): from sympy.core.function import expand from sympy.functions.elementary.miscellaneous import (Max, Min) from sympy.functions.elementary.trigonometric import cot from sympy.simplify.powsimp import powsimp from sympy.simplify.simplify import simplify IMT = inverse_mellin_transform assert IMT(gamma(s), s, x, (0, oo)) == exp(-x) assert IMT(gamma(-s), s, x, (-oo, 0)) == exp(-1/x) assert simplify(IMT(s/(2*s**2 - 2), s, x, (2, oo))) == \ (x**2 + 1)*Heaviside(1 - x)/(4*x) # test passing "None" assert IMT(1/(s**2 - 1), s, x, (-1, None)) == \ -x*Heaviside(-x + 1)/2 - Heaviside(x - 1)/(2*x) assert IMT(1/(s**2 - 1), s, x, (None, 1)) == \ -x*Heaviside(-x + 1)/2 - Heaviside(x - 1)/(2*x) # test expansion of sums assert IMT(gamma(s) + gamma(s - 1), s, x, (1, oo)) == (x + 1)*exp(-x)/x # test factorisation of polys r = symbols('r', real=True) assert IMT(1/(s**2 + 1), s, exp(-x), (None, oo) ).subs(x, r).rewrite(sin).simplify() \ == sin(r)*Heaviside(1 - exp(-r)) # test multiplicative substitution _a, _b = symbols('a b', positive=True) assert IMT(_b**(-s/_a)*factorial(s/_a)/s, s, x, (0, oo)) == exp(-_b*x**_a) assert IMT(factorial(_a/_b + s/_b)/(_a + s), s, x, (-_a, oo)) == x**_a*exp(-x**_b) def simp_pows(expr): return simplify(powsimp(expand_mul(expr, deep=False), force=True)).replace(exp_polar, exp) # Now test the inverses of all direct transforms tested above # Section 8.4.2 nu = symbols('nu', real=True) assert IMT(-1/(nu + s), s, x, (-oo, None)) == x**nu*Heaviside(x - 1) assert IMT(1/(nu + s), s, x, (None, oo)) == x**nu*Heaviside(1 - x) assert simp_pows(IMT(gamma(beta)*gamma(s)/gamma(s + beta), s, x, (0, oo))) \ == (1 - x)**(beta - 1)*Heaviside(1 - x) assert simp_pows(IMT(gamma(beta)*gamma(1 - beta - s)/gamma(1 - s), s, x, (-oo, None))) \ == (x - 1)**(beta - 1)*Heaviside(x - 1) assert simp_pows(IMT(gamma(s)*gamma(rho - s)/gamma(rho), s, x, (0, None))) \ == (1/(x + 1))**rho assert simp_pows(IMT(d**c*d**(s - 1)*sin(pi*c) *gamma(s)*gamma(s + c)*gamma(1 - s)*gamma(1 - s - c)/pi, s, x, (Max(-re(c), 0), Min(1 - re(c), 1)))) \ == (x**c - d**c)/(x - d) assert simplify(IMT(1/sqrt(pi)*(-c/2)*gamma(s)*gamma((1 - c)/2 - s) *gamma(-c/2 - s)/gamma(1 - c - s), s, x, (0, -re(c)/2))) == \ (1 + sqrt(x + 1))**c assert simplify(IMT(2**(a + 2*s)*b**(a + 2*s - 1)*gamma(s)*gamma(1 - a - 2*s) /gamma(1 - a - s), s, x, (0, (-re(a) + 1)/2))) == \ b**(a - 1)*(sqrt(1 + x/b**2) + 1)**(a - 1)*(b**2*sqrt(1 + x/b**2) + b**2 + x)/(b**2 + x) assert simplify(IMT(-2**(c + 2*s)*c*b**(c + 2*s)*gamma(s)*gamma(-c - 2*s) / gamma(-c - s + 1), s, x, (0, -re(c)/2))) == \ b**c*(sqrt(1 + x/b**2) + 1)**c # Section 8.4.5 assert IMT(24/s**5, s, x, (0, oo)) == log(x)**4*Heaviside(1 - x) assert expand(IMT(6/s**4, s, x, (-oo, 0)), force=True) == \ log(x)**3*Heaviside(x - 1) assert IMT(pi/(s*sin(pi*s)), s, x, (-1, 0)) == log(x + 1) assert IMT(pi/(s*sin(pi*s/2)), s, x, (-2, 0)) == log(x**2 + 1) assert IMT(pi/(s*sin(2*pi*s)), s, x, (Rational(-1, 2), 0)) == log(sqrt(x) + 1) assert IMT(pi/(s*sin(pi*s)), s, x, (0, 1)) == log(1 + 1/x) # TODO def mysimp(expr): from sympy.core.function import expand from sympy.simplify.powsimp import powsimp from sympy.simplify.simplify import logcombine return expand( powsimp(logcombine(expr, force=True), force=True, deep=True), force=True).replace(exp_polar, exp) assert mysimp(mysimp(IMT(pi/(s*tan(pi*s)), s, x, (-1, 0)))) in [ log(1 - x)*Heaviside(1 - x) + log(x - 1)*Heaviside(x - 1), log(x)*Heaviside(x - 1) + log(1 - 1/x)*Heaviside(x - 1) + log(-x + 1)*Heaviside(-x + 1)] # test passing cot assert mysimp(IMT(pi*cot(pi*s)/s, s, x, (0, 1))) in [ log(1/x - 1)*Heaviside(1 - x) + log(1 - 1/x)*Heaviside(x - 1), -log(x)*Heaviside(-x + 1) + log(1 - 1/x)*Heaviside(x - 1) + log(-x + 1)*Heaviside(-x + 1), ] # 8.4.14 assert IMT(-gamma(s + S.Half)/(sqrt(pi)*s), s, x, (Rational(-1, 2), 0)) == \ erf(sqrt(x)) # 8.4.19 assert simplify(IMT(gamma(a/2 + s)/gamma(a/2 - s + 1), s, x, (-re(a)/2, Rational(3, 4)))) \ == besselj(a, 2*sqrt(x)) assert simplify(IMT(2**a*gamma(S.Half - 2*s)*gamma(s + (a + 1)/2) / (gamma(1 - s - a/2)*gamma(1 - 2*s + a)), s, x, (-(re(a) + 1)/2, Rational(1, 4)))) == \ sin(sqrt(x))*besselj(a, sqrt(x)) assert simplify(IMT(2**a*gamma(a/2 + s)*gamma(S.Half - 2*s) / (gamma(S.Half - s - a/2)*gamma(1 - 2*s + a)), s, x, (-re(a)/2, Rational(1, 4)))) == \ cos(sqrt(x))*besselj(a, sqrt(x)) # TODO this comes out as an amazing mess, but simplifies nicely assert simplify(IMT(gamma(a + s)*gamma(S.Half - s) / (sqrt(pi)*gamma(1 - s)*gamma(1 + a - s)), s, x, (-re(a), S.Half))) == \ besselj(a, sqrt(x))**2 assert simplify(IMT(gamma(s)*gamma(S.Half - s) / (sqrt(pi)*gamma(1 - s - a)*gamma(1 + a - s)), s, x, (0, S.Half))) == \ besselj(-a, sqrt(x))*besselj(a, sqrt(x)) assert simplify(IMT(4**s*gamma(-2*s + 1)*gamma(a/2 + b/2 + s) / (gamma(-a/2 + b/2 - s + 1)*gamma(a/2 - b/2 - s + 1) *gamma(a/2 + b/2 - s + 1)), s, x, (-(re(a) + re(b))/2, S.Half))) == \ besselj(a, sqrt(x))*besselj(b, sqrt(x)) # Section 8.4.20 # TODO this can be further simplified! assert simplify(IMT(-2**(2*s)*cos(pi*a/2 - pi*b/2 + pi*s)*gamma(-2*s + 1) * gamma(a/2 - b/2 + s)*gamma(a/2 + b/2 + s) / (pi*gamma(a/2 - b/2 - s + 1)*gamma(a/2 + b/2 - s + 1)), s, x, (Max(-re(a)/2 - re(b)/2, -re(a)/2 + re(b)/2), S.Half))) == \ besselj(a, sqrt(x))*-(besselj(-b, sqrt(x)) - besselj(b, sqrt(x))*cos(pi*b))/sin(pi*b) # TODO more # for coverage assert IMT(pi/cos(pi*s), s, x, (0, S.Half)) == sqrt(x)/(x + 1) @slow def test_laplace_transform(): from sympy.functions.special.delta_functions import DiracDelta from sympy.functions.special.error_functions import (fresnelc, fresnels) LT = laplace_transform a, b, c, = symbols('a b c', positive=True) t = symbols('t') w = Symbol("w") f = Function("f") # Test unevaluated form assert laplace_transform(f(t), t, w) == LaplaceTransform(f(t), t, w) assert inverse_laplace_transform( f(w), w, t, plane=0) == InverseLaplaceTransform(f(w), w, t, 0) # test a bug spos = symbols('s', positive=True) assert LT(exp(t), t, spos) == (1/(spos - 1), 0, spos > 1) # basic tests from wikipedia assert LT((t - a)**b*exp(-c*(t - a))*Heaviside(t - a), t, s) == \ ((s + c)**(-b - 1)*exp(-a*s)*gamma(b + 1), -c, True) assert LT(t**a, t, s) == (s**(-a - 1)*gamma(a + 1), 0, True) assert LT(Heaviside(t), t, s) == (1/s, 0, True) assert LT(Heaviside(t - a), t, s) == (exp(-a*s)/s, 0, True) assert LT(1 - exp(-a*t), t, s) == (a/(s*(a + s)), 0, True) assert LT((exp(2*t) - 1)*exp(-b - t)*Heaviside(t)/2, t, s, noconds=True) \ == exp(-b)/(s**2 - 1) assert LT(exp(t), t, s) == (1/(s - 1), 0, abs(s) > 1) assert LT(exp(2*t), t, s) == (1/(s - 2), 0, abs(s) > 2) assert LT(exp(a*t), t, s) == (1/(s - a), a, Ne(s/a, 1)) assert LT(log(t/a), t, s) == (-(log(a*s) + EulerGamma)/s, 0, True) assert LT(erf(t), t, s) == (erfc(s/2)*exp(s**2/4)/s, 0, True) assert LT(sin(a*t), t, s) == (a/(a**2 + s**2), 0, True) assert LT(cos(a*t), t, s) == (s/(a**2 + s**2), 0, True) # TODO would be nice to have these come out better assert LT(exp(-a*t)*sin(b*t), t, s) == (b/(b**2 + (a + s)**2), -a, True) assert LT(exp(-a*t)*cos(b*t), t, s) == \ ((a + s)/(b**2 + (a + s)**2), -a, True) assert LT(besselj(0, t), t, s) == (1/sqrt(1 + s**2), 0, True) assert LT(besselj(1, t), t, s) == (1 - 1/sqrt(1 + 1/s**2), 0, True) # TODO general order works, but is a *mess* # TODO besseli also works, but is an even greater mess # test a bug in conditions processing # TODO the auxiliary condition should be recognised/simplified assert LT(exp(t)*cos(t), t, s)[:-1] in [ ((s - 1)/(s**2 - 2*s + 2), -oo), ((s - 1)/((s - 1)**2 + 1), -oo), ] # DiracDelta function: standard cases assert LT(DiracDelta(t), t, s) == (1, -oo, True) assert LT(DiracDelta(a*t), t, s) == (1/a, -oo, True) assert LT(DiracDelta(t/42), t, s) == (42, -oo, True) assert LT(DiracDelta(t+42), t, s) == (0, -oo, True) assert LT(DiracDelta(t)+DiracDelta(t-42), t, s) == \ (1 + exp(-42*s), -oo, True) assert LT(DiracDelta(t)-a*exp(-a*t), t, s) == (-a/(a + s) + 1, 0, True) assert LT(exp(-t)*(DiracDelta(t)+DiracDelta(t-42)), t, s) == \ (exp(-42*s - 42) + 1, -oo, True) # Collection of cases that cannot be fully evaluated and/or would catch # some common implementation errors assert LT(DiracDelta(t**2), t, s) == LaplaceTransform(DiracDelta(t**2), t, s) assert LT(DiracDelta(t**2 - 1), t, s) == (exp(-s)/2, -oo, True) assert LT(DiracDelta(t*(1 - t)), t, s) == \ LaplaceTransform(DiracDelta(-t**2 + t), t, s) assert LT((DiracDelta(t) + 1)*(DiracDelta(t - 1) + 1), t, s) == \ (LaplaceTransform(DiracDelta(t)*DiracDelta(t - 1), t, s) + \ 1 + exp(-s) + 1/s, 0, True) assert LT(DiracDelta(2*t - 2*exp(a)), t, s) == \ (exp(-s*exp(a))/2, -oo, True) # Fresnel functions assert laplace_transform(fresnels(t), t, s) == \ ((-sin(s**2/(2*pi))*fresnels(s/pi) + sin(s**2/(2*pi))/2 - cos(s**2/(2*pi))*fresnelc(s/pi) + cos(s**2/(2*pi))/2)/s, 0, True) assert laplace_transform(fresnelc(t), t, s) == ( ((2*sin(s**2/(2*pi))*fresnelc(s/pi) - 2*cos(s**2/(2*pi))*fresnels(s/pi) + sqrt(2)*cos(s**2/(2*pi) + pi/4))/(2*s), 0, True)) Mt = Matrix([[exp(t), t*exp(-t)], [t*exp(-t), exp(t)]]) Ms = Matrix([[ 1/(s - 1), (s + 1)**(-2)], [(s + 1)**(-2), 1/(s - 1)]]) # The default behaviour for Laplace tranform of a Matrix returns a Matrix # of Tuples and is deprecated: with warns_deprecated_sympy(): Ms_conds = Matrix([[(1/(s - 1), 0, Abs(s) > 1), ((s + 1)**(-2), 0, True)], [((s + 1)**(-2), 0, True), (1/(s - 1), 0, Abs(s) > 1)]]) with warns_deprecated_sympy(): assert LT(Mt, t, s) == Ms_conds # The new behavior is to return a tuple of a Matrix and the convergence # conditions for the matrix as a whole: assert LT(Mt, t, s, legacy_matrix=False) == (Ms, 0, Abs(s) > 1) # With noconds=True the transformed matrix is returned without conditions # either way: assert LT(Mt, t, s, noconds=True) == Ms assert LT(Mt, t, s, legacy_matrix=False, noconds=True) == Ms @slow def test_issue_8368t_7173(): LT = laplace_transform # hyperbolic assert LT(sinh(x), x, s) == (1/(s**2 - 1), 0, abs(s) > 1) assert LT(cosh(x), x, s) == (s/(s**2 - 1), -oo, s**2 > 1) assert LT(sinh(x + 3), x, s) == ( (-s + (s + 1)*exp(6) + 1)*exp(-3)/(s - 1)/(s + 1)/2, 0, Abs(s) > 1) assert LT(sinh(x)*cosh(x), x, s) == ( 1/(s**2 - 4), 0, Abs(s) > 2) # trig (make sure they are not being rewritten in terms of exp) assert LT(cos(x + 3), x, s) == ((s*cos(3) - sin(3))/(s**2 + 1), 0, True) @slow def test_inverse_laplace_transform(): from sympy.core.exprtools import factor_terms from sympy.functions.special.delta_functions import DiracDelta from sympy.simplify.simplify import simplify ILT = inverse_laplace_transform a, b, c, = symbols('a b c', positive=True) t = symbols('t') def simp_hyp(expr): return factor_terms(expand_mul(expr)).rewrite(sin) assert ILT(1, s, t) == DiracDelta(t) assert ILT(1/s, s, t) == Heaviside(t) assert ILT(a/(a + s), s, t) == a*exp(-a*t)*Heaviside(t) assert ILT(s/(a + s), s, t) == -a*exp(-a*t)*Heaviside(t) + DiracDelta(t) assert ILT((a + s)**(-2), s, t) == t*exp(-a*t)*Heaviside(t) assert ILT((a + s)**(-5), s, t) == t**4*exp(-a*t)*Heaviside(t)/24 assert ILT(a/(a**2 + s**2), s, t) == sin(a*t)*Heaviside(t) assert ILT(s/(s**2 + a**2), s, t) == cos(a*t)*Heaviside(t) assert ILT(b/(b**2 + (a + s)**2), s, t) == exp(-a*t)*sin(b*t)*Heaviside(t) assert ILT(b*s/(b**2 + (a + s)**2), s, t) +\ (a*sin(b*t) - b*cos(b*t))*exp(-a*t)*Heaviside(t) == 0 assert ILT(exp(-a*s)/s, s, t) == Heaviside(-a + t) assert ILT(exp(-a*s)/(b + s), s, t) == exp(b*(a - t))*Heaviside(-a + t) assert ILT((b + s)/(a**2 + (b + s)**2), s, t) == \ exp(-b*t)*cos(a*t)*Heaviside(t) assert ILT(exp(-a*s)/s**b, s, t) == \ (-a + t)**(b - 1)*Heaviside(-a + t)/gamma(b) assert ILT(exp(-a*s)/sqrt(s**2 + 1), s, t) == \ Heaviside(-a + t)*besselj(0, a - t) assert ILT(1/(s*sqrt(s + 1)), s, t) == Heaviside(t)*erf(sqrt(t)) assert ILT(1/(s**2*(s**2 + 1)), s, t) == (t - sin(t))*Heaviside(t) assert ILT(s**2/(s**2 + 1), s, t) == -sin(t)*Heaviside(t) + DiracDelta(t) assert ILT(1 - 1/(s**2 + 1), s, t) == -sin(t)*Heaviside(t) + DiracDelta(t) assert ILT(1/s**2, s, t) == t*Heaviside(t) assert ILT(1/s**5, s, t) == t**4*Heaviside(t)/24 assert simp_hyp(ILT(a/(s**2 - a**2), s, t)) == sinh(a*t)*Heaviside(t) assert simp_hyp(ILT(s/(s**2 - a**2), s, t)) == cosh(a*t)*Heaviside(t) # TODO sinh/cosh shifted come out a mess. also delayed trig is a mess # TODO should this simplify further? assert ILT(exp(-a*s)/s**b, s, t) == \ (t - a)**(b - 1)*Heaviside(t - a)/gamma(b) assert ILT(exp(-a*s)/sqrt(1 + s**2), s, t) == \ Heaviside(t - a)*besselj(0, a - t) # note: besselj(0, x) is even # XXX ILT turns these branch factor into trig functions ... assert simplify(ILT(a**b*(s + sqrt(s**2 - a**2))**(-b)/sqrt(s**2 - a**2), s, t).rewrite(exp)) == \ Heaviside(t)*besseli(b, a*t) assert ILT(a**b*(s + sqrt(s**2 + a**2))**(-b)/sqrt(s**2 + a**2), s, t).rewrite(exp) == \ Heaviside(t)*besselj(b, a*t) assert ILT(1/(s*sqrt(s + 1)), s, t) == Heaviside(t)*erf(sqrt(t)) # TODO can we make erf(t) work? assert ILT(1/(s**2*(s**2 + 1)),s,t) == (t - sin(t))*Heaviside(t) assert ILT( (s * eye(2) - Matrix([[1, 0], [0, 2]])).inv(), s, t) ==\ Matrix([[exp(t)*Heaviside(t), 0], [0, exp(2*t)*Heaviside(t)]]) def test_inverse_laplace_transform_delta(): from sympy.functions.special.delta_functions import DiracDelta ILT = inverse_laplace_transform t = symbols('t') assert ILT(2, s, t) == 2*DiracDelta(t) assert ILT(2*exp(3*s) - 5*exp(-7*s), s, t) == \ 2*DiracDelta(t + 3) - 5*DiracDelta(t - 7) a = cos(sin(7)/2) assert ILT(a*exp(-3*s), s, t) == a*DiracDelta(t - 3) assert ILT(exp(2*s), s, t) == DiracDelta(t + 2) r = Symbol('r', real=True) assert ILT(exp(r*s), s, t) == DiracDelta(t + r) def test_inverse_laplace_transform_delta_cond(): from sympy.functions.elementary.complexes import im from sympy.functions.special.delta_functions import DiracDelta ILT = inverse_laplace_transform t = symbols('t') r = Symbol('r', real=True) assert ILT(exp(r*s), s, t, noconds=False) == (DiracDelta(t + r), True) z = Symbol('z') assert ILT(exp(z*s), s, t, noconds=False) == \ (DiracDelta(t + z), Eq(im(z), 0)) # inversion does not exist: verify it doesn't evaluate to DiracDelta for z in (Symbol('z', extended_real=False), Symbol('z', imaginary=True, zero=False)): f = ILT(exp(z*s), s, t, noconds=False) f = f[0] if isinstance(f, tuple) else f assert f.func != DiracDelta # issue 15043 assert ILT(1/s + exp(r*s)/s, s, t, noconds=False) == ( Heaviside(t) + Heaviside(r + t), True) def test_fourier_transform(): from sympy.core.function import (expand, expand_complex, expand_trig) from sympy.polys.polytools import factor from sympy.simplify.simplify import simplify FT = fourier_transform IFT = inverse_fourier_transform def simp(x): return simplify(expand_trig(expand_complex(expand(x)))) def sinc(x): return sin(pi*x)/(pi*x) k = symbols('k', real=True) f = Function("f") # TODO for this to work with real a, need to expand abs(a*x) to abs(a)*abs(x) a = symbols('a', positive=True) b = symbols('b', positive=True) posk = symbols('posk', positive=True) # Test unevaluated form assert fourier_transform(f(x), x, k) == FourierTransform(f(x), x, k) assert inverse_fourier_transform( f(k), k, x) == InverseFourierTransform(f(k), k, x) # basic examples from wikipedia assert simp(FT(Heaviside(1 - abs(2*a*x)), x, k)) == sinc(k/a)/a # TODO IFT is a *mess* assert simp(FT(Heaviside(1 - abs(a*x))*(1 - abs(a*x)), x, k)) == sinc(k/a)**2/a # TODO IFT assert factor(FT(exp(-a*x)*Heaviside(x), x, k), extension=I) == \ 1/(a + 2*pi*I*k) # NOTE: the ift comes out in pieces assert IFT(1/(a + 2*pi*I*x), x, posk, noconds=False) == (exp(-a*posk), True) assert IFT(1/(a + 2*pi*I*x), x, -posk, noconds=False) == (0, True) assert IFT(1/(a + 2*pi*I*x), x, symbols('k', negative=True), noconds=False) == (0, True) # TODO IFT without factoring comes out as meijer g assert factor(FT(x*exp(-a*x)*Heaviside(x), x, k), extension=I) == \ 1/(a + 2*pi*I*k)**2 assert FT(exp(-a*x)*sin(b*x)*Heaviside(x), x, k) == \ b/(b**2 + (a + 2*I*pi*k)**2) assert FT(exp(-a*x**2), x, k) == sqrt(pi)*exp(-pi**2*k**2/a)/sqrt(a) assert IFT(sqrt(pi/a)*exp(-(pi*k)**2/a), k, x) == exp(-a*x**2) assert FT(exp(-a*abs(x)), x, k) == 2*a/(a**2 + 4*pi**2*k**2) # TODO IFT (comes out as meijer G) # TODO besselj(n, x), n an integer > 0 actually can be done... # TODO are there other common transforms (no distributions!)? def test_sine_transform(): t = symbols("t") w = symbols("w") a = symbols("a") f = Function("f") # Test unevaluated form assert sine_transform(f(t), t, w) == SineTransform(f(t), t, w) assert inverse_sine_transform( f(w), w, t) == InverseSineTransform(f(w), w, t) assert sine_transform(1/sqrt(t), t, w) == 1/sqrt(w) assert inverse_sine_transform(1/sqrt(w), w, t) == 1/sqrt(t) assert sine_transform((1/sqrt(t))**3, t, w) == 2*sqrt(w) assert sine_transform(t**(-a), t, w) == 2**( -a + S.Half)*w**(a - 1)*gamma(-a/2 + 1)/gamma((a + 1)/2) assert inverse_sine_transform(2**(-a + S( 1)/2)*w**(a - 1)*gamma(-a/2 + 1)/gamma(a/2 + S.Half), w, t) == t**(-a) assert sine_transform( exp(-a*t), t, w) == sqrt(2)*w/(sqrt(pi)*(a**2 + w**2)) assert inverse_sine_transform( sqrt(2)*w/(sqrt(pi)*(a**2 + w**2)), w, t) == exp(-a*t) assert sine_transform( log(t)/t, t, w) == sqrt(2)*sqrt(pi)*-(log(w**2) + 2*EulerGamma)/4 assert sine_transform( t*exp(-a*t**2), t, w) == sqrt(2)*w*exp(-w**2/(4*a))/(4*a**Rational(3, 2)) assert inverse_sine_transform( sqrt(2)*w*exp(-w**2/(4*a))/(4*a**Rational(3, 2)), w, t) == t*exp(-a*t**2) def test_cosine_transform(): from sympy.functions.special.error_functions import (Ci, Si) t = symbols("t") w = symbols("w") a = symbols("a") f = Function("f") # Test unevaluated form assert cosine_transform(f(t), t, w) == CosineTransform(f(t), t, w) assert inverse_cosine_transform( f(w), w, t) == InverseCosineTransform(f(w), w, t) assert cosine_transform(1/sqrt(t), t, w) == 1/sqrt(w) assert inverse_cosine_transform(1/sqrt(w), w, t) == 1/sqrt(t) assert cosine_transform(1/( a**2 + t**2), t, w) == sqrt(2)*sqrt(pi)*exp(-a*w)/(2*a) assert cosine_transform(t**( -a), t, w) == 2**(-a + S.Half)*w**(a - 1)*gamma((-a + 1)/2)/gamma(a/2) assert inverse_cosine_transform(2**(-a + S( 1)/2)*w**(a - 1)*gamma(-a/2 + S.Half)/gamma(a/2), w, t) == t**(-a) assert cosine_transform( exp(-a*t), t, w) == sqrt(2)*a/(sqrt(pi)*(a**2 + w**2)) assert inverse_cosine_transform( sqrt(2)*a/(sqrt(pi)*(a**2 + w**2)), w, t) == exp(-a*t) assert cosine_transform(exp(-a*sqrt(t))*cos(a*sqrt( t)), t, w) == a*exp(-a**2/(2*w))/(2*w**Rational(3, 2)) assert cosine_transform(1/(a + t), t, w) == sqrt(2)*( (-2*Si(a*w) + pi)*sin(a*w)/2 - cos(a*w)*Ci(a*w))/sqrt(pi) assert inverse_cosine_transform(sqrt(2)*meijerg(((S.Half, 0), ()), ( (S.Half, 0, 0), (S.Half,)), a**2*w**2/4)/(2*pi), w, t) == 1/(a + t) assert cosine_transform(1/sqrt(a**2 + t**2), t, w) == sqrt(2)*meijerg( ((S.Half,), ()), ((0, 0), (S.Half,)), a**2*w**2/4)/(2*sqrt(pi)) assert inverse_cosine_transform(sqrt(2)*meijerg(((S.Half,), ()), ((0, 0), (S.Half,)), a**2*w**2/4)/(2*sqrt(pi)), w, t) == 1/(t*sqrt(a**2/t**2 + 1)) def test_hankel_transform(): r = Symbol("r") k = Symbol("k") nu = Symbol("nu") m = Symbol("m") a = symbols("a") assert hankel_transform(1/r, r, k, 0) == 1/k assert inverse_hankel_transform(1/k, k, r, 0) == 1/r assert hankel_transform( 1/r**m, r, k, 0) == 2**(-m + 1)*k**(m - 2)*gamma(-m/2 + 1)/gamma(m/2) assert inverse_hankel_transform( 2**(-m + 1)*k**(m - 2)*gamma(-m/2 + 1)/gamma(m/2), k, r, 0) == r**(-m) assert hankel_transform(1/r**m, r, k, nu) == ( 2*2**(-m)*k**(m - 2)*gamma(-m/2 + nu/2 + 1)/gamma(m/2 + nu/2)) assert inverse_hankel_transform(2**(-m + 1)*k**( m - 2)*gamma(-m/2 + nu/2 + 1)/gamma(m/2 + nu/2), k, r, nu) == r**(-m) assert hankel_transform(r**nu*exp(-a*r), r, k, nu) == \ 2**(nu + 1)*a*k**(-nu - 3)*(a**2/k**2 + 1)**(-nu - S( 3)/2)*gamma(nu + Rational(3, 2))/sqrt(pi) assert inverse_hankel_transform( 2**(nu + 1)*a*k**(-nu - 3)*(a**2/k**2 + 1)**(-nu - Rational(3, 2))*gamma( nu + Rational(3, 2))/sqrt(pi), k, r, nu) == r**nu*exp(-a*r) def test_issue_7181(): assert mellin_transform(1/(1 - x), x, s) != None def test_issue_8882(): # This is the original test. # from sympy import diff, Integral, integrate # r = Symbol('r') # psi = 1/r*sin(r)*exp(-(a0*r)) # h = -1/2*diff(psi, r, r) - 1/r*psi # f = 4*pi*psi*h*r**2 # assert integrate(f, (r, -oo, 3), meijerg=True).has(Integral) == True # To save time, only the critical part is included. F = -a**(-s + 1)*(4 + 1/a**2)**(-s/2)*sqrt(1/a**2)*exp(-s*I*pi)* \ sin(s*atan(sqrt(1/a**2)/2))*gamma(s) raises(IntegralTransformError, lambda: inverse_mellin_transform(F, s, x, (-1, oo), **{'as_meijerg': True, 'needeval': True})) def test_issue_7173(): from sympy.simplify.cse_main import cse x0, x1, x2, x3 = symbols('x:4') ans = laplace_transform(sinh(a*x)*cosh(a*x), x, s) r, e = cse(ans) assert r == [ (x0, arg(a)), (x1, Abs(x0)), (x2, pi/2), (x3, Abs(x0 + pi))] assert e == [ a/(-4*a**2 + s**2), 0, ((x1 <= x2) | (x1 < x2)) & ((x3 <= x2) | (x3 < x2))] def test_issue_8514(): from sympy.simplify.simplify import simplify a, b, c, = symbols('a b c', positive=True) t = symbols('t', positive=True) ft = simplify(inverse_laplace_transform(1/(a*s**2+b*s+c),s, t)) assert ft == (I*exp(t*cos(atan2(0, -4*a*c + b**2)/2)*sqrt(Abs(4*a*c - b**2))/a)*sin(t*sin(atan2(0, -4*a*c + b**2)/2)*sqrt(Abs( 4*a*c - b**2))/(2*a)) + exp(t*cos(atan2(0, -4*a*c + b**2) /2)*sqrt(Abs(4*a*c - b**2))/a)*cos(t*sin(atan2(0, -4*a*c + b**2)/2)*sqrt(Abs(4*a*c - b**2))/(2*a)) + I*sin(t*sin( atan2(0, -4*a*c + b**2)/2)*sqrt(Abs(4*a*c - b**2))/(2*a)) - cos(t*sin(atan2(0, -4*a*c + b**2)/2)*sqrt(Abs(4*a*c - b**2))/(2*a)))*exp(-t*(b + cos(atan2(0, -4*a*c + b**2)/2) *sqrt(Abs(4*a*c - b**2)))/(2*a))/sqrt(-4*a*c + b**2) def test_issue_12591(): x, y = symbols("x y", real=True) assert fourier_transform(exp(x), x, y) == FourierTransform(exp(x), x, y) def test_issue_14692(): b = Symbol('b', negative=True) assert laplace_transform(1/(I*x - b), x, s) == \ (-I*exp(I*b*s)*expint(1, b*s*exp_polar(I*pi/2)), 0, True)
d008a68ed9735ace0a99ee347b26d487b688f5084f60b5a65aafb28bfa85af57
from sympy.core.numbers import (I, Rational) from sympy.core.singleton import S from sympy.core.symbol import (Dummy, symbols) from sympy.functions.elementary.exponential import log from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import atan from sympy.integrals.integrals import integrate from sympy.polys.polytools import Poly from sympy.simplify.simplify import simplify from sympy.integrals.rationaltools import ratint, ratint_logpart, log_to_atan from sympy.abc import a, b, x, t half = S.Half def test_ratint(): assert ratint(S.Zero, x) == 0 assert ratint(S(7), x) == 7*x assert ratint(x, x) == x**2/2 assert ratint(2*x, x) == x**2 assert ratint(-2*x, x) == -x**2 assert ratint(8*x**7 + 2*x + 1, x) == x**8 + x**2 + x f = S.One g = x + 1 assert ratint(f / g, x) == log(x + 1) assert ratint((f, g), x) == log(x + 1) f = x**3 - x g = x - 1 assert ratint(f/g, x) == x**3/3 + x**2/2 f = x g = (x - a)*(x + a) assert ratint(f/g, x) == log(x**2 - a**2)/2 f = S.One g = x**2 + 1 assert ratint(f/g, x, real=None) == atan(x) assert ratint(f/g, x, real=True) == atan(x) assert ratint(f/g, x, real=False) == I*log(x + I)/2 - I*log(x - I)/2 f = S(36) g = x**5 - 2*x**4 - 2*x**3 + 4*x**2 + x - 2 assert ratint(f/g, x) == \ -4*log(x + 1) + 4*log(x - 2) + (12*x + 6)/(x**2 - 1) f = x**4 - 3*x**2 + 6 g = x**6 - 5*x**4 + 5*x**2 + 4 assert ratint(f/g, x) == \ atan(x) + atan(x**3) + atan(x/2 - Rational(3, 2)*x**3 + S.Half*x**5) f = x**7 - 24*x**4 - 4*x**2 + 8*x - 8 g = x**8 + 6*x**6 + 12*x**4 + 8*x**2 assert ratint(f/g, x) == \ (4 + 6*x + 8*x**2 + 3*x**3)/(4*x + 4*x**3 + x**5) + log(x) assert ratint((x**3*f)/(x*g), x) == \ -(12 - 16*x + 6*x**2 - 14*x**3)/(4 + 4*x**2 + x**4) - \ 5*sqrt(2)*atan(x*sqrt(2)/2) + S.Half*x**2 - 3*log(2 + x**2) f = x**5 - x**4 + 4*x**3 + x**2 - x + 5 g = x**4 - 2*x**3 + 5*x**2 - 4*x + 4 assert ratint(f/g, x) == \ x + S.Half*x**2 + S.Half*log(2 - x + x**2) + (9 - 4*x)/(7*x**2 - 7*x + 14) + \ 13*sqrt(7)*atan(Rational(-1, 7)*sqrt(7) + 2*x*sqrt(7)/7)/49 assert ratint(1/(x**2 + x + 1), x) == \ 2*sqrt(3)*atan(sqrt(3)/3 + 2*x*sqrt(3)/3)/3 assert ratint(1/(x**3 + 1), x) == \ -log(1 - x + x**2)/6 + log(1 + x)/3 + sqrt(3)*atan(-sqrt(3) /3 + 2*x*sqrt(3)/3)/3 assert ratint(1/(x**2 + x + 1), x, real=False) == \ -I*3**half*log(half + x - half*I*3**half)/3 + \ I*3**half*log(half + x + half*I*3**half)/3 assert ratint(1/(x**3 + 1), x, real=False) == log(1 + x)/3 + \ (Rational(-1, 6) + I*3**half/6)*log(-half + x + I*3**half/2) + \ (Rational(-1, 6) - I*3**half/6)*log(-half + x - I*3**half/2) # issue 4991 assert ratint(1/(x*(a + b*x)**3), x) == \ (3*a + 2*b*x)/(2*a**4 + 4*a**3*b*x + 2*a**2*b**2*x**2) + ( log(x) - log(a/b + x))/a**3 assert ratint(x/(1 - x**2), x) == -log(x**2 - 1)/2 assert ratint(-x/(1 - x**2), x) == log(x**2 - 1)/2 assert ratint((x/4 - 4/(1 - x)).diff(x), x) == x/4 + 4/(x - 1) ans = atan(x) assert ratint(1/(x**2 + 1), x, symbol=x) == ans assert ratint(1/(x**2 + 1), x, symbol='x') == ans assert ratint(1/(x**2 + 1), x, symbol=a) == ans # this asserts that as_dummy must return a unique symbol # even if the symbol is already a Dummy d = Dummy() assert ratint(1/(d**2 + 1), d, symbol=d) == atan(d) def test_ratint_logpart(): assert ratint_logpart(x, x**2 - 9, x, t) == \ [(Poly(x**2 - 9, x), Poly(-2*t + 1, t))] assert ratint_logpart(x**2, x**3 - 5, x, t) == \ [(Poly(x**3 - 5, x), Poly(-3*t + 1, t))] def test_issue_5414(): assert ratint(1/(x**2 + 16), x) == atan(x/4)/4 def test_issue_5249(): assert ratint( 1/(x**2 + a**2), x) == (-I*log(-I*a + x)/2 + I*log(I*a + x)/2)/a def test_issue_5817(): a, b, c = symbols('a,b,c', positive=True) assert simplify(ratint(a/(b*c*x**2 + a**2 + b*a), x)) == \ sqrt(a)*atan(sqrt( b)*sqrt(c)*x/(sqrt(a)*sqrt(a + b)))/(sqrt(b)*sqrt(c)*sqrt(a + b)) def test_issue_5981(): u = symbols('u') assert integrate(1/(u**2 + 1)) == atan(u) def test_issue_10488(): a,b,c,x = symbols('a b c x', real=True, positive=True) assert integrate(x/(a*x+b),x) == x/a - b*log(a*x + b)/a**2 def test_issues_8246_12050_13501_14080(): a = symbols('a', nonzero=True) assert integrate(a/(x**2 + a**2), x) == atan(x/a) assert integrate(1/(x**2 + a**2), x) == atan(x/a)/a assert integrate(1/(1 + a**2*x**2), x) == atan(a*x)/a def test_issue_6308(): k, a0 = symbols('k a0', real=True) assert integrate((x**2 + 1 - k**2)/(x**2 + 1 + a0**2), x) == \ x - (a0**2 + k**2)*atan(x/sqrt(a0**2 + 1))/sqrt(a0**2 + 1) def test_issue_5907(): a = symbols('a', nonzero=True) assert integrate(1/(x**2 + a**2)**2, x) == \ x/(2*a**4 + 2*a**2*x**2) + atan(x/a)/(2*a**3) def test_log_to_atan(): f, g = (Poly(x + S.Half, x, domain='QQ'), Poly(sqrt(3)/2, x, domain='EX')) fg_ans = 2*atan(2*sqrt(3)*x/3 + sqrt(3)/3) assert log_to_atan(f, g) == fg_ans assert log_to_atan(g, f) == -fg_ans
f9a524302f09dd6c7272387127f07af3359b9dbf8f54652c081436b3c3bb8640
"""Most of these tests come from the examples in Bronstein's book.""" from sympy.integrals.risch import DifferentialExtension, derivation from sympy.integrals.prde import (prde_normal_denom, prde_special_denom, prde_linear_constraints, constant_system, prde_spde, prde_no_cancel_b_large, prde_no_cancel_b_small, limited_integrate_reduce, limited_integrate, is_deriv_k, is_log_deriv_k_t_radical, parametric_log_deriv_heu, is_log_deriv_k_t_radical_in_field, param_poly_rischDE, param_rischDE, prde_cancel_liouvillian) from sympy.polys.polymatrix import PolyMatrix as Matrix from sympy.core.numbers import Rational from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.polys.domains.rationalfield import QQ from sympy.polys.polytools import Poly from sympy.abc import x, t, n t0, t1, t2, t3, k = symbols('t:4 k') def test_prde_normal_denom(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1 + t**2, t)]}) fa = Poly(1, t) fd = Poly(x, t) G = [(Poly(t, t), Poly(1 + t**2, t)), (Poly(1, t), Poly(x + x*t**2, t))] assert prde_normal_denom(fa, fd, G, DE) == \ (Poly(x, t, domain='ZZ(x)'), (Poly(1, t, domain='ZZ(x)'), Poly(1, t, domain='ZZ(x)')), [(Poly(x*t, t, domain='ZZ(x)'), Poly(t**2 + 1, t, domain='ZZ(x)')), (Poly(1, t, domain='ZZ(x)'), Poly(t**2 + 1, t, domain='ZZ(x)'))], Poly(1, t, domain='ZZ(x)')) G = [(Poly(t, t), Poly(t**2 + 2*t + 1, t)), (Poly(x*t, t), Poly(t**2 + 2*t + 1, t)), (Poly(x*t**2, t), Poly(t**2 + 2*t + 1, t))] DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert prde_normal_denom(Poly(x, t), Poly(1, t), G, DE) == \ (Poly(t + 1, t), (Poly((-1 + x)*t + x, t), Poly(1, t, domain='ZZ[x]')), [(Poly(t, t), Poly(1, t)), (Poly(x*t, t), Poly(1, t, domain='ZZ[x]')), (Poly(x*t**2, t), Poly(1, t, domain='ZZ[x]'))], Poly(t + 1, t)) def test_prde_special_denom(): a = Poly(t + 1, t) ba = Poly(t**2, t) bd = Poly(1, t) G = [(Poly(t, t), Poly(1, t)), (Poly(t**2, t), Poly(1, t)), (Poly(t**3, t), Poly(1, t))] DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert prde_special_denom(a, ba, bd, G, DE) == \ (Poly(t + 1, t), Poly(t**2, t), [(Poly(t, t), Poly(1, t)), (Poly(t**2, t), Poly(1, t)), (Poly(t**3, t), Poly(1, t))], Poly(1, t)) G = [(Poly(t, t), Poly(1, t)), (Poly(1, t), Poly(t, t))] assert prde_special_denom(Poly(1, t), Poly(t**2, t), Poly(1, t), G, DE) == \ (Poly(1, t), Poly(t**2 - 1, t), [(Poly(t**2, t), Poly(1, t)), (Poly(1, t), Poly(1, t))], Poly(t, t)) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-2*x*t0, t0)]}) DE.decrement_level() G = [(Poly(t, t), Poly(t**2, t)), (Poly(2*t, t), Poly(t, t))] assert prde_special_denom(Poly(5*x*t + 1, t), Poly(t**2 + 2*x**3*t, t), Poly(t**3 + 2, t), G, DE) == \ (Poly(5*x*t + 1, t), Poly(0, t, domain='ZZ[x]'), [(Poly(t, t), Poly(t**2, t)), (Poly(2*t, t), Poly(t, t))], Poly(1, x)) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly((t**2 + 1)*2*x, t)]}) G = [(Poly(t + x, t), Poly(t*x, t)), (Poly(2*t, t), Poly(x**2, x))] assert prde_special_denom(Poly(5*x*t + 1, t), Poly(t**2 + 2*x**3*t, t), Poly(t**3, t), G, DE) == \ (Poly(5*x*t + 1, t), Poly(0, t, domain='ZZ[x]'), [(Poly(t + x, t), Poly(x*t, t)), (Poly(2*t, t, x), Poly(x**2, t, x))], Poly(1, t)) assert prde_special_denom(Poly(t + 1, t), Poly(t**2, t), Poly(t**3, t), G, DE) == \ (Poly(t + 1, t), Poly(0, t, domain='ZZ[x]'), [(Poly(t + x, t), Poly(x*t, t)), (Poly(2*t, t, x), Poly(x**2, t, x))], Poly(1, t)) def test_prde_linear_constraints(): DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) G = [(Poly(2*x**3 + 3*x + 1, x), Poly(x**2 - 1, x)), (Poly(1, x), Poly(x - 1, x)), (Poly(1, x), Poly(x + 1, x))] assert prde_linear_constraints(Poly(1, x), Poly(0, x), G, DE) == \ ((Poly(2*x, x, domain='QQ'), Poly(0, x, domain='QQ'), Poly(0, x, domain='QQ')), Matrix([[1, 1, -1], [5, 1, 1]], x)) G = [(Poly(t, t), Poly(1, t)), (Poly(t**2, t), Poly(1, t)), (Poly(t**3, t), Poly(1, t))] DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) assert prde_linear_constraints(Poly(t + 1, t), Poly(t**2, t), G, DE) == \ ((Poly(t, t, domain='QQ'), Poly(t**2, t, domain='QQ'), Poly(t**3, t, domain='QQ')), Matrix(0, 3, [], t)) G = [(Poly(2*x, t), Poly(t, t)), (Poly(-x, t), Poly(t, t))] DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) assert prde_linear_constraints(Poly(1, t), Poly(0, t), G, DE) == \ ((Poly(0, t, domain='QQ[x]'), Poly(0, t, domain='QQ[x]')), Matrix([[2*x, -x]], t)) def test_constant_system(): A = Matrix([[-(x + 3)/(x - 1), (x + 1)/(x - 1), 1], [-x - 3, x + 1, x - 1], [2*(x + 3)/(x - 1), 0, 0]], t) u = Matrix([[(x + 1)/(x - 1)], [x + 1], [0]], t) DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) R = QQ.frac_field(x)[t] assert constant_system(A, u, DE) == \ (Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 0], [0, 0, 1]], ring=R), Matrix([0, 1, 0, 0], ring=R)) def test_prde_spde(): D = [Poly(x, t), Poly(-x*t, t)] DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) # TODO: when bound_degree() can handle this, test degree bound from that too assert prde_spde(Poly(t, t), Poly(-1/x, t), D, n, DE) == \ (Poly(t, t), Poly(0, t, domain='ZZ(x)'), [Poly(2*x, t, domain='ZZ(x)'), Poly(-x, t, domain='ZZ(x)')], [Poly(-x**2, t, domain='ZZ(x)'), Poly(0, t, domain='ZZ(x)')], n - 1) def test_prde_no_cancel(): # b large DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) assert prde_no_cancel_b_large(Poly(1, x), [Poly(x**2, x), Poly(1, x)], 2, DE) == \ ([Poly(x**2 - 2*x + 2, x), Poly(1, x)], Matrix([[1, 0, -1, 0], [0, 1, 0, -1]], x)) assert prde_no_cancel_b_large(Poly(1, x), [Poly(x**3, x), Poly(1, x)], 3, DE) == \ ([Poly(x**3 - 3*x**2 + 6*x - 6, x), Poly(1, x)], Matrix([[1, 0, -1, 0], [0, 1, 0, -1]], x)) assert prde_no_cancel_b_large(Poly(x, x), [Poly(x**2, x), Poly(1, x)], 1, DE) == \ ([Poly(x, x, domain='ZZ'), Poly(0, x, domain='ZZ')], Matrix([[1, -1, 0, 0], [1, 0, -1, 0], [0, 1, 0, -1]], x)) # b small # XXX: Is there a better example of a monomial with D.degree() > 2? DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t**3 + 1, t)]}) # My original q was t**4 + t + 1, but this solution implies q == t**4 # (c1 = 4), with some of the ci for the original q equal to 0. G = [Poly(t**6, t), Poly(x*t**5, t), Poly(t**3, t), Poly(x*t**2, t), Poly(1 + x, t)] R = QQ.frac_field(x)[t] assert prde_no_cancel_b_small(Poly(x*t, t), G, 4, DE) == \ ([Poly(t**4/4 - x/12*t**3 + x**2/24*t**2 + (Rational(-11, 12) - x**3/24)*t + x/24, t), Poly(x/3*t**3 - x**2/6*t**2 + (Rational(-1, 3) + x**3/6)*t - x/6, t), Poly(t, t), Poly(0, t), Poly(0, t)], Matrix([[1, 0, -1, 0, 0, 0, 0, 0, 0, 0], [0, 1, Rational(-1, 4), 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, -1, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, -1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, -1, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, -1, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, -1]], ring=R)) # TODO: Add test for deg(b) <= 0 with b small DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1 + t**2, t)]}) b = Poly(-1/x**2, t, field=True) # deg(b) == 0 q = [Poly(x**i*t**j, t, field=True) for i in range(2) for j in range(3)] h, A = prde_no_cancel_b_small(b, q, 3, DE) V = A.nullspace() R = QQ.frac_field(x)[t] assert len(V) == 1 assert V[0] == Matrix([Rational(-1, 2), 0, 0, 1, 0, 0]*3, ring=R) assert (Matrix([h])*V[0][6:, :])[0] == Poly(x**2/2, t, domain='QQ(x)') assert (Matrix([q])*V[0][:6, :])[0] == Poly(x - S.Half, t, domain='QQ(x)') def test_prde_cancel_liouvillian(): ### 1. case == 'primitive' # used when integrating f = log(x) - log(x - 1) # Not taken from 'the' book DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) p0 = Poly(0, t, field=True) h, A = prde_cancel_liouvillian(Poly(-1/(x - 1), t), [Poly(-x + 1, t), Poly(1, t)], 1, DE) V = A.nullspace() h == [p0, p0, Poly((x - 1)*t, t), p0, p0, p0, p0, p0, p0, p0, Poly(x - 1, t), Poly(-x**2 + x, t), p0, p0, p0, p0] assert A.rank() == 16 assert (Matrix([h])*V[0][:16, :]) == Matrix([[Poly(0, t, domain='QQ(x)')]]) ### 2. case == 'exp' # used when integrating log(x/exp(x) + 1) # Not taken from book DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-t, t)]}) assert prde_cancel_liouvillian(Poly(0, t, domain='QQ[x]'), [Poly(1, t, domain='QQ(x)')], 0, DE) == \ ([Poly(1, t, domain='QQ'), Poly(x, t, domain='ZZ(x)')], Matrix([[-1, 0, 1]], DE.t)) def test_param_poly_rischDE(): DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) a = Poly(x**2 - x, x, field=True) b = Poly(1, x, field=True) q = [Poly(x, x, field=True), Poly(x**2, x, field=True)] h, A = param_poly_rischDE(a, b, q, 3, DE) assert A.nullspace() == [Matrix([0, 1, 1, 1], DE.t)] # c1, c2, d1, d2 # Solution of a*Dp + b*p = c1*q1 + c2*q2 = q2 = x**2 # is d1*h1 + d2*h2 = h1 + h2 = x. assert h[0] + h[1] == Poly(x, x, domain='QQ') # a*Dp + b*p = q1 = x has no solution. a = Poly(x**2 - x, x, field=True) b = Poly(x**2 - 5*x + 3, x, field=True) q = [Poly(1, x, field=True), Poly(x, x, field=True), Poly(x**2, x, field=True)] h, A = param_poly_rischDE(a, b, q, 3, DE) assert A.nullspace() == [Matrix([3, -5, 1, -5, 1, 1], DE.t)] p = -Poly(5, DE.t)*h[0] + h[1] + h[2] # Poly(1, x) assert a*derivation(p, DE) + b*p == Poly(x**2 - 5*x + 3, x, domain='QQ') def test_param_rischDE(): DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) p1, px = Poly(1, x, field=True), Poly(x, x, field=True) G = [(p1, px), (p1, p1), (px, p1)] # [1/x, 1, x] h, A = param_rischDE(-p1, Poly(x**2, x, field=True), G, DE) assert len(h) == 3 p = [hi[0].as_expr()/hi[1].as_expr() for hi in h] V = A.nullspace() assert len(V) == 2 assert V[0] == Matrix([-1, 1, 0, -1, 1, 0], DE.t) y = -p[0] + p[1] + 0*p[2] # x assert y.diff(x) - y/x**2 == 1 - 1/x # Dy + f*y == -G0 + G1 + 0*G2 # the below test computation takes place while computing the integral # of 'f = log(log(x + exp(x)))' DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t, t)]}) G = [(Poly(t + x, t, domain='ZZ(x)'), Poly(1, t, domain='QQ')), (Poly(0, t, domain='QQ'), Poly(1, t, domain='QQ'))] h, A = param_rischDE(Poly(-t - 1, t, field=True), Poly(t + x, t, field=True), G, DE) assert len(h) == 5 p = [hi[0].as_expr()/hi[1].as_expr() for hi in h] V = A.nullspace() assert len(V) == 3 assert V[0] == Matrix([0, 0, 0, 0, 1, 0, 0], DE.t) y = 0*p[0] + 0*p[1] + 1*p[2] + 0*p[3] + 0*p[4] assert y.diff(t) - y/(t + x) == 0 # Dy + f*y = 0*G0 + 0*G1 def test_limited_integrate_reduce(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) assert limited_integrate_reduce(Poly(x, t), Poly(t**2, t), [(Poly(x, t), Poly(t, t))], DE) == \ (Poly(t, t), Poly(-1/x, t), Poly(t, t), 1, (Poly(x, t), Poly(1, t, domain='ZZ[x]')), [(Poly(-x*t, t), Poly(1, t, domain='ZZ[x]'))]) def test_limited_integrate(): DE = DifferentialExtension(extension={'D': [Poly(1, x)]}) G = [(Poly(x, x), Poly(x + 1, x))] assert limited_integrate(Poly(-(1 + x + 5*x**2 - 3*x**3), x), Poly(1 - x - x**2 + x**3, x), G, DE) == \ ((Poly(x**2 - x + 2, x), Poly(x - 1, x, domain='QQ')), [2]) G = [(Poly(1, x), Poly(x, x))] assert limited_integrate(Poly(5*x**2, x), Poly(3, x), G, DE) == \ ((Poly(5*x**3/9, x), Poly(1, x, domain='QQ')), [0]) def test_is_log_deriv_k_t_radical(): DE = DifferentialExtension(extension={'D': [Poly(1, x)], 'exts': [None], 'extargs': [None]}) assert is_log_deriv_k_t_radical(Poly(2*x, x), Poly(1, x), DE) is None DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(2*t1, t1), Poly(1/x, t2)], 'exts': [None, 'exp', 'log'], 'extargs': [None, 2*x, x]}) assert is_log_deriv_k_t_radical(Poly(x + t2/2, t2), Poly(1, t2), DE) == \ ([(t1, 1), (x, 1)], t1*x, 2, 0) # TODO: Add more tests DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(t0, t0), Poly(1/x, t)], 'exts': [None, 'exp', 'log'], 'extargs': [None, x, x]}) assert is_log_deriv_k_t_radical(Poly(x + t/2 + 3, t), Poly(1, t), DE) == \ ([(t0, 2), (x, 1)], x*t0**2, 2, 3) def test_is_deriv_k(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(1/(x + 1), t2)], 'exts': [None, 'log', 'log'], 'extargs': [None, x, x + 1]}) assert is_deriv_k(Poly(2*x**2 + 2*x, t2), Poly(1, t2), DE) == \ ([(t1, 1), (t2, 1)], t1 + t2, 2) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t1), Poly(t2, t2)], 'exts': [None, 'log', 'exp'], 'extargs': [None, x, x]}) assert is_deriv_k(Poly(x**2*t2**3, t2), Poly(1, t2), DE) == \ ([(x, 3), (t1, 2)], 2*t1 + 3*x, 1) # TODO: Add more tests, including ones with exponentials DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(2/x, t1)], 'exts': [None, 'log'], 'extargs': [None, x**2]}) assert is_deriv_k(Poly(x, t1), Poly(1, t1), DE) == \ ([(t1, S.Half)], t1/2, 1) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(2/(1 + x), t0)], 'exts': [None, 'log'], 'extargs': [None, x**2 + 2*x + 1]}) assert is_deriv_k(Poly(1 + x, t0), Poly(1, t0), DE) == \ ([(t0, S.Half)], t0/2, 1) # Issue 10798 # DE = DifferentialExtension(log(1/x), x) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-1/x, t)], 'exts': [None, 'log'], 'extargs': [None, 1/x]}) assert is_deriv_k(Poly(1, t), Poly(x, t), DE) == ([(t, 1)], t, 1) def test_is_log_deriv_k_t_radical_in_field(): # NOTE: any potential constant factor in the second element of the result # doesn't matter, because it cancels in Da/a. DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) assert is_log_deriv_k_t_radical_in_field(Poly(5*t + 1, t), Poly(2*t*x, t), DE) == \ (2, t*x**5) assert is_log_deriv_k_t_radical_in_field(Poly(2 + 3*t, t), Poly(5*x*t, t), DE) == \ (5, x**3*t**2) DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(-t/x**2, t)]}) assert is_log_deriv_k_t_radical_in_field(Poly(-(1 + 2*t), t), Poly(2*x**2 + 2*x**2*t, t), DE) == \ (2, t + t**2) assert is_log_deriv_k_t_radical_in_field(Poly(-1, t), Poly(x**2, t), DE) == \ (1, t) assert is_log_deriv_k_t_radical_in_field(Poly(1, t), Poly(2*x**2, t), DE) == \ (2, 1/t) def test_parametric_log_deriv(): DE = DifferentialExtension(extension={'D': [Poly(1, x), Poly(1/x, t)]}) assert parametric_log_deriv_heu(Poly(5*t**2 + t - 6, t), Poly(2*x*t**2, t), Poly(-1, t), Poly(x*t**2, t), DE) == \ (2, 6, t*x**5)
a36c6d0308236a02418f976098d30ff9e294044cbd7e85cd285ad13360301cdf
''' rubi_tests contain test cases parsed in SymPy format. The complete test suite is here: http://www.apmaths.uwo.ca/~arich/IntegrationProblems/MathematicaSyntaxFiles/MathematicaSyntaxFiles.html The current version of test suite is 4.10.8 TODO ==== * Update test suite to latest version '''
8c79f21e6be40dc7bd8809a985493f56148aa0186789910b67baedfb351831b1
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def quadratic_products(): from sympy.integrals.rubi.constraints import cons47, cons2, cons3, cons8, cons227, cons5, cons228, cons130, cons229, cons230, cons13, cons165, cons231, cons139, cons232, cons233, cons234, cons235, cons236, cons237, cons70, cons71, cons49, cons238, cons29, cons50, cons19, cons239, cons240, cons241, cons242, cons68, cons243, cons244, cons245, cons246, cons148, cons247, cons248, cons249, cons250, cons251, cons252, cons253, cons254, cons168, cons255, cons33, cons170, cons256, cons257, cons96, cons149, cons258, cons40, cons259, cons260, cons43, cons20, cons261, cons262, cons263, cons264, cons265, cons266, cons267, cons268, cons269, cons45, cons270, cons56, cons271, cons272, cons273, cons274, cons275, cons276, cons277, cons278, cons279, cons280, cons281, cons282, cons283, cons284, cons285, cons286, cons287, cons288, cons21, cons289, cons290, cons291, cons292, cons293, cons294, cons295, cons296, cons297, cons298, cons299, cons300, cons301, cons302, cons303, cons304, cons305, cons306, cons307, cons308, cons309, cons310, cons311, cons312, cons313, cons314, cons315, cons86, cons87, cons316, cons317, cons318, cons127, cons210, cons319, cons320, cons321, cons64, cons322, cons323, cons324, cons325, cons326, cons4, cons327, cons328, cons329, cons141, cons330, cons331, cons332, cons333, cons152, cons334, cons150, cons335, cons198, cons336, cons337, cons338, cons339, cons340, cons91, cons341, cons342, cons343, cons90, cons89, cons344, cons345, cons346, cons128, cons347, cons348, cons209, cons349, cons350, cons351, cons352, cons353, cons354, cons355, cons356, cons357, cons358, cons359, cons360, cons361, cons362, cons363, cons364, cons365, cons366, cons367, cons368, cons369, cons370, cons371, cons372, cons373, cons374, cons375, cons376, cons377, cons151, cons378, cons126, cons379, cons95, cons25, cons167, cons75, cons380, cons82, cons381, cons382, cons383, cons384, cons385, cons386, cons387, cons52, cons388, cons389, cons390, cons391, cons392, cons393, cons394, cons395, cons396, cons397, cons398, cons399, cons400, cons401, cons402, cons403, cons404, cons405, cons406, cons407, cons408, cons409, cons410, cons411, cons412, cons413, cons414, cons415, cons416, cons417, cons418, cons211, cons419, cons420, cons421, cons422, cons423, cons424, cons425, cons426, cons427, cons428, cons429, cons430, cons431, cons432, cons433, cons222, cons434, cons435, cons436, cons437, cons438, cons439, cons440, cons441, cons442, cons443, cons444, cons445, cons446, cons447, cons448, cons449, cons450, cons451, cons452, cons453, cons454, cons455, cons226, cons36, cons37, cons38, cons456, cons457, cons458, cons459, cons460 pattern192 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons47) rule192 = ReplacementRule(pattern192, replacement192) pattern193 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons47, cons227) rule193 = ReplacementRule(pattern193, replacement193) pattern194 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons228, cons130, cons229) rule194 = ReplacementRule(pattern194, With194) pattern195 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons228, cons130, cons230) rule195 = ReplacementRule(pattern195, replacement195) pattern196 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons228, cons13, cons165, cons231) rule196 = ReplacementRule(pattern196, replacement196) pattern197 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**(S(-3)/2), x_), cons2, cons3, cons8, cons228) rule197 = ReplacementRule(pattern197, replacement197) pattern198 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons228, cons13, cons139, cons232, cons231) rule198 = ReplacementRule(pattern198, replacement198) pattern199 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons228, cons233, cons229) rule199 = ReplacementRule(pattern199, With199) pattern200 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons228, CustomConstraint(With200)) rule200 = ReplacementRule(pattern200, replacement200) pattern201 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons228) rule201 = ReplacementRule(pattern201, replacement201) pattern202 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons5, cons234) rule202 = ReplacementRule(pattern202, replacement202) pattern203 = Pattern(Integral(S(1)/sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons3, cons8, cons235) rule203 = ReplacementRule(pattern203, replacement203) pattern204 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons228) rule204 = ReplacementRule(pattern204, replacement204) pattern205 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons3, cons8, cons13, cons236) rule205 = ReplacementRule(pattern205, replacement205) pattern206 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons228, cons13, CustomConstraint(With206)) rule206 = ReplacementRule(pattern206, replacement206) pattern207 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons5, cons228, cons237) rule207 = ReplacementRule(pattern207, With207) pattern208 = Pattern(Integral((u_**S(2)*WC('c', S(1)) + u_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons5, cons70, cons71) rule208 = ReplacementRule(pattern208, replacement208) pattern209 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons47, cons49, cons238) rule209 = ReplacementRule(pattern209, replacement209) pattern210 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons47, cons49, cons239) rule210 = ReplacementRule(pattern210, replacement210) pattern211 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons47, cons49, cons240) rule211 = ReplacementRule(pattern211, replacement211) pattern212 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons47, cons241, cons242, cons68) rule212 = ReplacementRule(pattern212, replacement212) pattern213 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))/(x_*WC('e', S(1)) + WC('d', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons47, cons241) rule213 = ReplacementRule(pattern213, replacement213) pattern214 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons47, cons241, cons243) rule214 = ReplacementRule(pattern214, replacement214) pattern215 = Pattern(Integral(S(1)/((x_*WC('e', S(1)) + WC('d', S(0)))**S(2)*sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons47, cons241) rule215 = ReplacementRule(pattern215, replacement215) pattern216 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons47, cons241, cons244, cons243) rule216 = ReplacementRule(pattern216, replacement216) pattern217 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons47, cons241, cons245) rule217 = ReplacementRule(pattern217, replacement217) pattern218 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons47, cons241, cons246, cons148, cons247, cons248) rule218 = ReplacementRule(pattern218, replacement218) pattern219 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons47, cons241, cons246, cons148, cons249, cons248, cons250) rule219 = ReplacementRule(pattern219, replacement219) pattern220 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons47, cons241, cons13, cons165, cons251, cons240, cons250, cons252, cons253, cons248) rule220 = ReplacementRule(pattern220, replacement220) pattern221 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons47, cons241, cons246, cons139, cons254, cons248) rule221 = ReplacementRule(pattern221, replacement221) pattern222 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons47, cons241, cons246, cons139, cons168, cons248) rule222 = ReplacementRule(pattern222, replacement222) pattern223 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons47, cons241, cons246, cons139, cons255, cons248) rule223 = ReplacementRule(pattern223, replacement223) pattern224 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons47, cons241, cons33, cons170, cons240, cons256, cons257) rule224 = ReplacementRule(pattern224, replacement224) pattern225 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons47, cons241, cons33, cons96, cons248) rule225 = ReplacementRule(pattern225, replacement225) pattern226 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons47, cons149, cons241) rule226 = ReplacementRule(pattern226, replacement226) pattern227 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons258, cons40) rule227 = ReplacementRule(pattern227, replacement227) pattern228 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons259, cons260) rule228 = ReplacementRule(pattern228, replacement228) pattern229 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons258, cons149, cons43) rule229 = ReplacementRule(pattern229, replacement229) pattern230 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons5, cons259, cons149, cons43) rule230 = ReplacementRule(pattern230, replacement230) pattern231 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons258, cons149, cons242) rule231 = ReplacementRule(pattern231, replacement231) pattern232 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons259, cons149, cons242) rule232 = ReplacementRule(pattern232, replacement232) pattern233 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**S(2)*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons228, cons258, cons149, cons13, cons139) rule233 = ReplacementRule(pattern233, replacement233) pattern234 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**S(2), x_), cons2, cons8, cons29, cons50, cons5, cons259, cons149, cons13, cons139) rule234 = ReplacementRule(pattern234, replacement234) pattern235 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons258, cons149, cons20, cons13, cons261, cons262, cons263) rule235 = ReplacementRule(pattern235, replacement235) pattern236 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons5, cons259, cons149, cons20, cons13, cons261, cons262, cons263) rule236 = ReplacementRule(pattern236, replacement236) pattern237 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons258, cons149, cons264) rule237 = ReplacementRule(pattern237, replacement237) pattern238 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons259, cons149, cons264) rule238 = ReplacementRule(pattern238, replacement238) pattern239 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons258, cons149, cons265) rule239 = ReplacementRule(pattern239, replacement239) pattern240 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons5, cons259, cons149, cons265) rule240 = ReplacementRule(pattern240, replacement240) pattern241 = Pattern(Integral(S(1)/(sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons258) rule241 = ReplacementRule(pattern241, replacement241) pattern242 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('c', S(1)))*sqrt(d_ + x_*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons259) rule242 = ReplacementRule(pattern242, replacement242) pattern243 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons258, cons246, cons165, cons266, cons255, cons248) rule243 = ReplacementRule(pattern243, replacement243) pattern244 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons259, cons246, cons165, cons266, cons255, cons248) rule244 = ReplacementRule(pattern244, replacement244) pattern245 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons258, cons246, cons165, cons267, cons240, cons248) rule245 = ReplacementRule(pattern245, replacement245) pattern246 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons259, cons246, cons165, cons267, cons240, cons248) rule246 = ReplacementRule(pattern246, replacement246) pattern247 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons258, cons246, cons139, cons254, cons248) rule247 = ReplacementRule(pattern247, replacement247) pattern248 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons259, cons246, cons139, cons254, cons248) rule248 = ReplacementRule(pattern248, replacement248) pattern249 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons258, cons246, cons139, cons168, cons248) rule249 = ReplacementRule(pattern249, replacement249) pattern250 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons259, cons246, cons139, cons168, cons248) rule250 = ReplacementRule(pattern250, replacement250) pattern251 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons228, cons258, cons33, cons268, cons240, cons248) rule251 = ReplacementRule(pattern251, replacement251) pattern252 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons5, cons259, cons33, cons268, cons240, cons248) rule252 = ReplacementRule(pattern252, replacement252) pattern253 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons228, cons258, cons33, cons269, cons255, cons248) rule253 = ReplacementRule(pattern253, replacement253) pattern254 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons5, cons259, cons33, cons269, cons255, cons248) rule254 = ReplacementRule(pattern254, replacement254) pattern255 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons3, cons8, cons50, cons19, cons149) rule255 = ReplacementRule(pattern255, replacement255) pattern256 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons259, cons149, cons45, cons270) rule256 = ReplacementRule(pattern256, replacement256) pattern257 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons258, cons149) rule257 = ReplacementRule(pattern257, replacement257) pattern258 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons259, cons149) rule258 = ReplacementRule(pattern258, replacement258) pattern259 = Pattern(Integral(S(1)/((d_ + x_*WC('e', S(1)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons49) rule259 = ReplacementRule(pattern259, replacement259) pattern260 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons49, cons244, cons56) rule260 = ReplacementRule(pattern260, replacement260) pattern261 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons49, cons130, cons271) rule261 = ReplacementRule(pattern261, replacement261) pattern262 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons49, cons272, cons246, cons165, cons96, cons273, cons248) rule262 = ReplacementRule(pattern262, replacement262) pattern263 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons49, cons272, cons13, cons165, cons274, cons275, cons33, cons248) rule263 = ReplacementRule(pattern263, replacement263) pattern264 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons49, cons272, cons246, cons139, cons168, cons248) rule264 = ReplacementRule(pattern264, replacement264) pattern265 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons49, cons272, cons13, cons139, cons276, cons33, cons248) rule265 = ReplacementRule(pattern265, replacement265) pattern266 = Pattern(Integral(S(1)/((d_ + x_*WC('e', S(1)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons49) rule266 = ReplacementRule(pattern266, replacement266) pattern267 = Pattern(Integral(S(1)/(sqrt(d_ + x_*WC('e', S(1)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons49, cons277) rule267 = ReplacementRule(pattern267, replacement267) pattern268 = Pattern(Integral(sqrt(d_ + x_*WC('e', S(1)))/sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons49, cons277) rule268 = ReplacementRule(pattern268, replacement268) pattern269 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_/sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons49, cons278) rule269 = ReplacementRule(pattern269, replacement269) pattern270 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons228, cons49, cons272, cons33, cons168, cons240, cons279) rule270 = ReplacementRule(pattern270, replacement270) pattern271 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons228, cons49, cons272, cons33, cons96, cons280) rule271 = ReplacementRule(pattern271, replacement271) pattern272 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons49) rule272 = ReplacementRule(pattern272, replacement272) pattern273 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons281, cons241, cons130) rule273 = ReplacementRule(pattern273, replacement273) pattern274 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons282, cons130, cons283) rule274 = ReplacementRule(pattern274, replacement274) pattern275 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))/(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons284) rule275 = ReplacementRule(pattern275, With275) pattern276 = Pattern(Integral((d_ + x_*WC('e', S(1)))/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons285) rule276 = ReplacementRule(pattern276, With276) pattern277 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))/(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons286) rule277 = ReplacementRule(pattern277, replacement277) pattern278 = Pattern(Integral((d_ + x_*WC('e', S(1)))/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons287) rule278 = ReplacementRule(pattern278, replacement278) pattern279 = Pattern(Integral(sqrt(x_*WC('e', S(1)) + WC('d', S(0)))/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241) rule279 = ReplacementRule(pattern279, replacement279) pattern280 = Pattern(Integral(sqrt(d_ + x_*WC('e', S(1)))/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons282) rule280 = ReplacementRule(pattern280, replacement280) pattern281 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons20, cons168, cons288) rule281 = ReplacementRule(pattern281, replacement281) pattern282 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons20, cons168, cons288) rule282 = ReplacementRule(pattern282, replacement282) pattern283 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons33, cons168) rule283 = ReplacementRule(pattern283, replacement283) pattern284 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons33, cons168) rule284 = ReplacementRule(pattern284, replacement284) pattern285 = Pattern(Integral(S(1)/((x_*WC('e', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241) rule285 = ReplacementRule(pattern285, replacement285) pattern286 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)))*(d_ + x_*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons282) rule286 = ReplacementRule(pattern286, replacement286) pattern287 = Pattern(Integral(S(1)/(sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241) rule287 = ReplacementRule(pattern287, replacement287) pattern288 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(d_ + x_*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons282) rule288 = ReplacementRule(pattern288, replacement288) pattern289 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons281, cons241, cons33, cons96) rule289 = ReplacementRule(pattern289, replacement289) pattern290 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons19, cons282, cons33, cons96) rule290 = ReplacementRule(pattern290, replacement290) pattern291 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons281, cons241, cons21) rule291 = ReplacementRule(pattern291, replacement291) pattern292 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons19, cons282, cons21) rule292 = ReplacementRule(pattern292, replacement292) pattern293 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241) rule293 = ReplacementRule(pattern293, replacement293) pattern294 = Pattern(Integral((d_ + x_*WC('e', S(1)))/(a_ + x_**S(2)*WC('c', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons50, cons282) rule294 = ReplacementRule(pattern294, replacement294) pattern295 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons13, cons139, cons232) rule295 = ReplacementRule(pattern295, replacement295) pattern296 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons13, cons139, cons232) rule296 = ReplacementRule(pattern296, replacement296) pattern297 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons228, cons281, cons241, cons289) rule297 = ReplacementRule(pattern297, replacement297) pattern298 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons5, cons282, cons289) rule298 = ReplacementRule(pattern298, replacement298) pattern299 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons290, cons291, cons292, cons149) rule299 = ReplacementRule(pattern299, replacement299) pattern300 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons3, cons8, cons29, cons50, cons293, cons241, cons33, cons294, cons295, cons296) rule300 = ReplacementRule(pattern300, replacement300) pattern301 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons3, cons8, cons29, cons50, cons293, cons241, cons33, cons294) rule301 = ReplacementRule(pattern301, replacement301) pattern302 = Pattern(Integral(x_**m_/sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons228, cons297) rule302 = ReplacementRule(pattern302, replacement302) pattern303 = Pattern(Integral((e_*x_)**m_/sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons50, cons228, cons297) rule303 = ReplacementRule(pattern303, replacement303) pattern304 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons297) rule304 = ReplacementRule(pattern304, replacement304) pattern305 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_/sqrt(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons297) rule305 = ReplacementRule(pattern305, replacement305) pattern306 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons246, cons298, cons165) rule306 = ReplacementRule(pattern306, replacement306) pattern307 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons282, cons246, cons298, cons165) rule307 = ReplacementRule(pattern307, replacement307) pattern308 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons246, cons298, cons139) rule308 = ReplacementRule(pattern308, replacement308) pattern309 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons282, cons246, cons298, cons139) rule309 = ReplacementRule(pattern309, replacement309) pattern310 = Pattern(Integral(S(1)/((x_*WC('e', S(1)) + WC('d', S(0)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons241) rule310 = ReplacementRule(pattern310, replacement310) pattern311 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('c', S(1)))*(d_ + x_*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons299) rule311 = ReplacementRule(pattern311, replacement311) pattern312 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons281, cons241, cons149, cons242) rule312 = ReplacementRule(pattern312, replacement312) pattern313 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons282, cons149, cons242) rule313 = ReplacementRule(pattern313, replacement313) pattern314 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons281, cons241, cons244, cons13, cons139) rule314 = ReplacementRule(pattern314, replacement314) pattern315 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons5, cons282, cons244, cons13, cons139) rule315 = ReplacementRule(pattern315, replacement315) pattern316 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons281, cons241, cons244) rule316 = ReplacementRule(pattern316, replacement316) pattern317 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons5, cons282, cons244) rule317 = ReplacementRule(pattern317, replacement317) pattern318 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons281, cons241, cons13, cons165, cons300, cons68, cons301, cons302) rule318 = ReplacementRule(pattern318, replacement318) pattern319 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons282, cons13, cons165, cons300, cons68, cons301, cons303) rule319 = ReplacementRule(pattern319, replacement319) pattern320 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons281, cons241, cons13, cons165, cons240, cons304, cons305, cons302) rule320 = ReplacementRule(pattern320, replacement320) pattern321 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons282, cons13, cons165, cons240, cons304, cons305, cons303) rule321 = ReplacementRule(pattern321, replacement321) pattern322 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons246, cons139, cons170, cons306, cons302) rule322 = ReplacementRule(pattern322, replacement322) pattern323 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons282, cons246, cons139, cons170, cons306, cons303) rule323 = ReplacementRule(pattern323, replacement323) pattern324 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons241, cons246, cons139, cons168, cons302) rule324 = ReplacementRule(pattern324, replacement324) pattern325 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons282, cons246, cons139, cons168, cons303) rule325 = ReplacementRule(pattern325, replacement325) pattern326 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons228, cons281, cons241, cons13, cons139, cons302) rule326 = ReplacementRule(pattern326, replacement326) pattern327 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons282, cons13, cons139, cons303) rule327 = ReplacementRule(pattern327, replacement327) pattern328 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons281, cons241, cons307, cons240, cons302) rule328 = ReplacementRule(pattern328, replacement328) pattern329 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons5, cons282, cons307, cons240, cons303) rule329 = ReplacementRule(pattern329, replacement329) pattern330 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons281, cons241, cons308) rule330 = ReplacementRule(pattern330, replacement330) pattern331 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_, x_), cons2, cons8, cons29, cons50, cons19, cons5, cons282, cons309) rule331 = ReplacementRule(pattern331, replacement331) pattern332 = Pattern(Integral(S(1)/((x_*WC('e', S(1)) + WC('d', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**(S(1)/3)), x_), cons2, cons3, cons8, cons29, cons50, cons241, cons310, cons311) rule332 = ReplacementRule(pattern332, With332) pattern333 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)))**(S(1)/3)*(d_ + x_*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons312) rule333 = ReplacementRule(pattern333, With333) pattern334 = Pattern(Integral(S(1)/((x_*WC('e', S(1)) + WC('d', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**(S(1)/3)), x_), cons2, cons3, cons8, cons29, cons50, cons241, cons310, cons313) rule334 = ReplacementRule(pattern334, With334) pattern335 = Pattern(Integral(S(1)/((x_*WC('e', S(1)) + WC('d', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**(S(1)/3)), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons314) rule335 = ReplacementRule(pattern335, With335) pattern336 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)))**(S(1)/4)*(d_ + x_*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons282) rule336 = ReplacementRule(pattern336, replacement336) pattern337 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)))**(S(3)/4)*(d_ + x_*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons282) rule337 = ReplacementRule(pattern337, replacement337) pattern338 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons234, cons231) rule338 = ReplacementRule(pattern338, replacement338) pattern339 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons315, cons231) rule339 = ReplacementRule(pattern339, replacement339) pattern340 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons282, cons149, cons45, cons295) rule340 = ReplacementRule(pattern340, replacement340) pattern341 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons228, cons281, cons241, cons149, cons86) rule341 = ReplacementRule(pattern341, With341) pattern342 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons5, cons282, cons149, cons86) rule342 = ReplacementRule(pattern342, With342) pattern343 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons228, cons281, cons241, cons149) rule343 = ReplacementRule(pattern343, With343) pattern344 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons282, cons149) rule344 = ReplacementRule(pattern344, With344) pattern345 = Pattern(Integral((u_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + u_**S(2)*WC('c', S(1)) + u_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons70, cons71) rule345 = ReplacementRule(pattern345, replacement345) pattern346 = Pattern(Integral((a_ + u_**S(2)*WC('c', S(1)))**WC('p', S(1))*(u_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons70, cons71) rule346 = ReplacementRule(pattern346, replacement346) pattern347 = Pattern(Integral(x_**WC('n', S(1))*(a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons5, cons87, cons316) rule347 = ReplacementRule(pattern347, replacement347) pattern348 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))/sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons47, cons318) rule348 = ReplacementRule(pattern348, replacement348) pattern349 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons47, cons318, cons149, cons244) rule349 = ReplacementRule(pattern349, replacement349) pattern350 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons47, cons318, cons149, cons246, cons139, cons170) rule350 = ReplacementRule(pattern350, replacement350) pattern351 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons47, cons318, cons149, cons13, cons139, cons319) rule351 = ReplacementRule(pattern351, replacement351) pattern352 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons47, cons318, cons149, cons33, cons96, cons227, cons320) rule352 = ReplacementRule(pattern352, replacement352) pattern353 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons47, cons318, cons149, cons33, cons96, cons321) rule353 = ReplacementRule(pattern353, replacement353) pattern354 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons47, cons318, cons149, cons64, cons321, cons322) rule354 = ReplacementRule(pattern354, replacement354) pattern355 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons47, cons318, cons149, cons321) rule355 = ReplacementRule(pattern355, replacement355) pattern356 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons47, cons323, cons149, cons241, cons13, cons324) rule356 = ReplacementRule(pattern356, replacement356) pattern357 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons47, cons323, cons149, cons325) rule357 = ReplacementRule(pattern357, replacement357) pattern358 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons47, cons323, cons149, cons241, cons244) rule358 = ReplacementRule(pattern358, replacement358) pattern359 = Pattern(Integral((f_ + x_*WC('g', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons47, cons323, cons149, cons241, cons321, cons272, cons33, cons96) rule359 = ReplacementRule(pattern359, replacement359) pattern360 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons47, cons323, cons149, cons241, cons321, cons272, cons274, cons326) rule360 = ReplacementRule(pattern360, replacement360) pattern361 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons317, cons47, cons149) rule361 = ReplacementRule(pattern361, replacement361) pattern362 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons317, cons228, cons258, cons40) rule362 = ReplacementRule(pattern362, replacement362) pattern363 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons317, cons259, cons327) rule363 = ReplacementRule(pattern363, replacement363) pattern364 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons258, cons86, cons316) rule364 = ReplacementRule(pattern364, replacement364) pattern365 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons259, cons86, cons316) rule365 = ReplacementRule(pattern365, replacement365) pattern366 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons258, cons328) rule366 = ReplacementRule(pattern366, replacement366) pattern367 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons259, cons329) rule367 = ReplacementRule(pattern367, replacement367) pattern368 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons258, cons246, cons139, cons170) rule368 = ReplacementRule(pattern368, replacement368) pattern369 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons259, cons246, cons139, cons170) rule369 = ReplacementRule(pattern369, replacement369) pattern370 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons258, cons141, cons330, cons56) rule370 = ReplacementRule(pattern370, replacement370) pattern371 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons259, cons141, cons330, cons56) rule371 = ReplacementRule(pattern371, replacement371) pattern372 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons258, cons331, cons255) rule372 = ReplacementRule(pattern372, replacement372) pattern373 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons259, cons331, cons255) rule373 = ReplacementRule(pattern373, replacement373) pattern374 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons258, cons321) rule374 = ReplacementRule(pattern374, replacement374) pattern375 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons259, cons321) rule375 = ReplacementRule(pattern375, replacement375) pattern376 = Pattern(Integral(x_**S(2)*(a_ + x_**S(2)*WC('c', S(1)))**p_*(f_ + x_*WC('g', S(1))), x_), cons2, cons8, cons127, cons210, cons332, cons13, cons333) rule376 = ReplacementRule(pattern376, replacement376) pattern377 = Pattern(Integral(x_**S(2)*(a_ + x_**S(2)*WC('c', S(1)))**p_*(f_ + x_*WC('g', S(1))), x_), cons2, cons8, cons127, cons210, cons5, cons332) rule377 = ReplacementRule(pattern377, replacement377) pattern378 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons258, cons149, cons152, cons13, cons334) rule378 = ReplacementRule(pattern378, replacement378) pattern379 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons259, cons149, cons152, cons13, cons334) rule379 = ReplacementRule(pattern379, replacement379) pattern380 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons258, cons149, cons150, cons335) rule380 = ReplacementRule(pattern380, replacement380) pattern381 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons259, cons149, cons150, cons335) rule381 = ReplacementRule(pattern381, replacement381) pattern382 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons258, cons149, cons198, cons335) rule382 = ReplacementRule(pattern382, replacement382) pattern383 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons259, cons149, cons198, cons335) rule383 = ReplacementRule(pattern383, replacement383) pattern384 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons317, cons228, cons258, cons149, cons43, cons336, cons337) rule384 = ReplacementRule(pattern384, replacement384) pattern385 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons317, cons259, cons149, cons43, cons338, cons337) rule385 = ReplacementRule(pattern385, replacement385) pattern386 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons317, cons228, cons258, cons149, cons43, cons339) rule386 = ReplacementRule(pattern386, replacement386) pattern387 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons317, cons259, cons149, cons43, cons339) rule387 = ReplacementRule(pattern387, replacement387) pattern388 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons258, cons149, cons43, cons340, cons165, cons91, cons341) rule388 = ReplacementRule(pattern388, replacement388) pattern389 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons259, cons149, cons43, cons340, cons165, cons91, cons341) rule389 = ReplacementRule(pattern389, replacement389) pattern390 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons317, cons228, cons258, cons149, cons43, cons340, cons165, cons337, cons342, cons343) rule390 = ReplacementRule(pattern390, replacement390) pattern391 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons4, cons317, cons259, cons149, cons43, cons340, cons165, cons337, cons342, cons343) rule391 = ReplacementRule(pattern391, replacement391) pattern392 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons258, cons149, cons43, cons340, cons139, cons90) rule392 = ReplacementRule(pattern392, replacement392) pattern393 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons259, cons149, cons43, cons340, cons139, cons90) rule393 = ReplacementRule(pattern393, replacement393) pattern394 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons317, cons228, cons258, cons149, cons43, cons340, cons139) rule394 = ReplacementRule(pattern394, replacement394) pattern395 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons4, cons317, cons259, cons149, cons43, cons340, cons139) rule395 = ReplacementRule(pattern395, replacement395) pattern396 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons258, cons149, cons43, cons89, cons90, cons337, cons344) rule396 = ReplacementRule(pattern396, replacement396) pattern397 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons259, cons149, cons43, cons89, cons90, cons337, cons344) rule397 = ReplacementRule(pattern397, replacement397) pattern398 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons258, cons149, cons43, cons89, cons91, cons248) rule398 = ReplacementRule(pattern398, replacement398) pattern399 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons259, cons149, cons43, cons89, cons91, cons248) rule399 = ReplacementRule(pattern399, replacement399) pattern400 = Pattern(Integral(sqrt(d_ + x_*WC('e', S(1)))/((x_*WC('g', S(1)) + WC('f', S(0)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons258) rule400 = ReplacementRule(pattern400, replacement400) pattern401 = Pattern(Integral(sqrt(d_ + x_*WC('e', S(1)))/(sqrt(a_ + x_**S(2)*WC('c', S(1)))*(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons259) rule401 = ReplacementRule(pattern401, replacement401) pattern402 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons317, cons228, cons258, cons149, cons345, cons346, cons128) rule402 = ReplacementRule(pattern402, replacement402) pattern403 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons317, cons259, cons149, cons345, cons347, cons128) rule403 = ReplacementRule(pattern403, replacement403) pattern404 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons258, cons149, cons345, cons89, cons91, cons248) rule404 = ReplacementRule(pattern404, replacement404) pattern405 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons259, cons149, cons345, cons89, cons91, cons248) rule405 = ReplacementRule(pattern405, replacement405) pattern406 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons317, cons228, cons258, cons149, cons345, cons348, cons248) rule406 = ReplacementRule(pattern406, replacement406) pattern407 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons317, cons259, cons149, cons345, cons348, cons248) rule407 = ReplacementRule(pattern407, replacement407) pattern408 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons317, cons228, cons258, cons149, cons209) rule408 = ReplacementRule(pattern408, replacement408) pattern409 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons317, cons259, cons349, cons152, cons350, cons351) rule409 = ReplacementRule(pattern409, replacement409) pattern410 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons317, cons259, cons149, cons209) rule410 = ReplacementRule(pattern410, replacement410) pattern411 = Pattern(Integral(x_**S(2)*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons228, cons258) rule411 = ReplacementRule(pattern411, replacement411) pattern412 = Pattern(Integral(x_**S(2)*(a_ + x_**S(2)*WC('c', S(1)))**p_/(d_ + x_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons5, cons259) rule412 = ReplacementRule(pattern412, replacement412) pattern413 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**S(2)*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons258, cons149, cons272) rule413 = ReplacementRule(pattern413, replacement413) pattern414 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**S(2), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons259, cons149, cons272) rule414 = ReplacementRule(pattern414, replacement414) pattern415 = Pattern(Integral((x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons3, cons8, cons50, cons127, cons210, cons19, cons4, cons149) rule415 = ReplacementRule(pattern415, replacement415) pattern416 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons317, cons259, cons149, cons45, cons270) rule416 = ReplacementRule(pattern416, replacement416) pattern417 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons317, cons228, cons258, cons149) rule417 = ReplacementRule(pattern417, replacement417) pattern418 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons317, cons259, cons149) rule418 = ReplacementRule(pattern418, replacement418) pattern419 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons228, cons281, cons130) rule419 = ReplacementRule(pattern419, replacement419) pattern420 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons282, cons130) rule420 = ReplacementRule(pattern420, replacement420) pattern421 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))/((x_*WC('e', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281) rule421 = ReplacementRule(pattern421, replacement421) pattern422 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))/((a_ + x_**S(2)*WC('c', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282) rule422 = ReplacementRule(pattern422, replacement422) pattern423 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons281, cons244, cons352) rule423 = ReplacementRule(pattern423, replacement423) pattern424 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons282, cons244, cons353) rule424 = ReplacementRule(pattern424, replacement424) pattern425 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons244, cons13, cons139, cons354) rule425 = ReplacementRule(pattern425, replacement425) pattern426 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons244, cons13, cons139, cons355) rule426 = ReplacementRule(pattern426, replacement426) pattern427 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons281, cons244) rule427 = ReplacementRule(pattern427, replacement427) pattern428 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons282, cons244) rule428 = ReplacementRule(pattern428, replacement428) pattern429 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons228, cons281, cons356) rule429 = ReplacementRule(pattern429, replacement429) pattern430 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('e', S(1)) + WC('d', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons282, cons357) rule430 = ReplacementRule(pattern430, replacement430) pattern431 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons13, cons139) rule431 = ReplacementRule(pattern431, replacement431) pattern432 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('e', S(1)) + WC('d', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons13, cons139) rule432 = ReplacementRule(pattern432, replacement432) pattern433 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons228, cons281, cons289) rule433 = ReplacementRule(pattern433, replacement433) pattern434 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('e', S(1)) + WC('d', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons282, cons289) rule434 = ReplacementRule(pattern434, replacement434) pattern435 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**S(2)*WC('c', S(1)))**p_*(f_ + x_*WC('g', S(1))), x_), cons2, cons8, cons50, cons127, cons210, cons5, cons358, cons359) rule435 = ReplacementRule(pattern435, replacement435) pattern436 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons360, cons290, cons291) rule436 = ReplacementRule(pattern436, replacement436) pattern437 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons246, cons165, cons249, cons361, cons362) rule437 = ReplacementRule(pattern437, replacement437) pattern438 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons246, cons165, cons249, cons361, cons362) rule438 = ReplacementRule(pattern438, replacement438) pattern439 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons228, cons281, cons13, cons165, cons363, cons68, cons301, cons364) rule439 = ReplacementRule(pattern439, replacement439) pattern440 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons282, cons13, cons165, cons363, cons68, cons301, cons364) rule440 = ReplacementRule(pattern440, replacement440) pattern441 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons228, cons281, cons13, cons165, cons365, cons305, cons364) rule441 = ReplacementRule(pattern441, replacement441) pattern442 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons282, cons13, cons165, cons365, cons305, cons364) rule442 = ReplacementRule(pattern442, replacement442) pattern443 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons246, cons139, cons168, cons366) rule443 = ReplacementRule(pattern443, replacement443) pattern444 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons246, cons139, cons168, cons367) rule444 = ReplacementRule(pattern444, replacement444) pattern445 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons246, cons139, cons170, cons368, cons364) rule445 = ReplacementRule(pattern445, replacement445) pattern446 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons246, cons139, cons170, cons368, cons364) rule446 = ReplacementRule(pattern446, replacement446) pattern447 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons228, cons281, cons13, cons139, cons364) rule447 = ReplacementRule(pattern447, replacement447) pattern448 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons13, cons139, cons364) rule448 = ReplacementRule(pattern448, replacement448) pattern449 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons20) rule449 = ReplacementRule(pattern449, replacement449) pattern450 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons20) rule450 = ReplacementRule(pattern450, replacement450) pattern451 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons369, cons170) rule451 = ReplacementRule(pattern451, replacement451) pattern452 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons369, cons170) rule452 = ReplacementRule(pattern452, replacement452) pattern453 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))/(sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281) rule453 = ReplacementRule(pattern453, replacement453) pattern454 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282) rule454 = ReplacementRule(pattern454, replacement454) pattern455 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons228, cons281, cons369, cons96) rule455 = ReplacementRule(pattern455, replacement455) pattern456 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons317, cons282, cons369, cons96) rule456 = ReplacementRule(pattern456, replacement456) pattern457 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons358) rule457 = ReplacementRule(pattern457, replacement457) pattern458 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons358) rule458 = ReplacementRule(pattern458, replacement458) pattern459 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons228, cons281, cons33, cons170, cons321, cons370, cons364) rule459 = ReplacementRule(pattern459, replacement459) pattern460 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons282, cons33, cons170, cons321, cons370, cons364) rule460 = ReplacementRule(pattern460, replacement460) pattern461 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons228, cons281, cons33, cons96, cons364) rule461 = ReplacementRule(pattern461, replacement461) pattern462 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons5, cons317, cons282, cons33, cons96, cons364) rule462 = ReplacementRule(pattern462, replacement462) pattern463 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons281, cons371, cons68) rule463 = ReplacementRule(pattern463, replacement463) pattern464 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons282, cons371, cons68) rule464 = ReplacementRule(pattern464, replacement464) pattern465 = Pattern(Integral((f_ + x_*WC('g', S(1)))/((x_*WC('e', S(1)) + WC('d', S(0)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons372, cons373, cons374) rule465 = ReplacementRule(pattern465, replacement465) pattern466 = Pattern(Integral((f_ + x_*WC('g', S(1)))/(sqrt(x_)*sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons127, cons210, cons228) rule466 = ReplacementRule(pattern466, replacement466) pattern467 = Pattern(Integral((f_ + x_*WC('g', S(1)))/(sqrt(x_)*sqrt(a_ + x_**S(2)*WC('c', S(1)))), x_), cons2, cons8, cons127, cons210, cons375) rule467 = ReplacementRule(pattern467, replacement467) pattern468 = Pattern(Integral((f_ + x_*WC('g', S(1)))/(sqrt(e_*x_)*sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons50, cons127, cons210, cons228) rule468 = ReplacementRule(pattern468, replacement468) pattern469 = Pattern(Integral((f_ + x_*WC('g', S(1)))/(sqrt(e_*x_)*sqrt(a_ + x_**S(2)*WC('c', S(1)))), x_), cons2, cons8, cons50, cons127, cons210, cons376) rule469 = ReplacementRule(pattern469, replacement469) pattern470 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons281) rule470 = ReplacementRule(pattern470, replacement470) pattern471 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons282) rule471 = ReplacementRule(pattern471, replacement471) pattern472 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons228, cons281, cons377) rule472 = ReplacementRule(pattern472, replacement472) pattern473 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons282, cons377) rule473 = ReplacementRule(pattern473, replacement473) pattern474 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_/((x_*WC('e', S(1)) + WC('d', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons151, cons165) rule474 = ReplacementRule(pattern474, replacement474) pattern475 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_/((x_*WC('e', S(1)) + WC('d', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons151, cons165) rule475 = ReplacementRule(pattern475, replacement475) pattern476 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons378, cons369) rule476 = ReplacementRule(pattern476, With476) pattern477 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons378, cons369) rule477 = ReplacementRule(pattern477, With477) pattern478 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(f_ + x_*WC('g', S(1)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons126, cons338, cons379) rule478 = ReplacementRule(pattern478, replacement478) pattern479 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(f_ + x_*WC('g', S(1)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons126, cons338, cons379) rule479 = ReplacementRule(pattern479, replacement479) pattern480 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(f_ + x_*WC('g', S(1)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons126, cons338) rule480 = ReplacementRule(pattern480, replacement480) pattern481 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(f_ + x_*WC('g', S(1)))**n_*(x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons126, cons338) rule481 = ReplacementRule(pattern481, replacement481) pattern482 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons228, cons281, cons95) rule482 = ReplacementRule(pattern482, replacement482) pattern483 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons282, cons95) rule483 = ReplacementRule(pattern483, replacement483) pattern484 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons228, cons281, cons21, cons25, cons95, cons170, cons167) rule484 = ReplacementRule(pattern484, replacement484) pattern485 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons282, cons21, cons25, cons95, cons170, cons167) rule485 = ReplacementRule(pattern485, replacement485) pattern486 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons228, cons281, cons21, cons25, cons95, cons170, cons90) rule486 = ReplacementRule(pattern486, replacement486) pattern487 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons282, cons21, cons25, cons95, cons170, cons90) rule487 = ReplacementRule(pattern487, replacement487) pattern488 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons228, cons281, cons21, cons25, cons95, cons170, cons91) rule488 = ReplacementRule(pattern488, replacement488) pattern489 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons282, cons21, cons25, cons95, cons170, cons91) rule489 = ReplacementRule(pattern489, replacement489) pattern490 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/(sqrt(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons228, cons281, cons75) rule490 = ReplacementRule(pattern490, replacement490) pattern491 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_/(sqrt(x_*WC('g', S(1)) + WC('f', S(0)))*(x_**S(2)*WC('c', S(1)) + WC('a', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons282, cons75) rule491 = ReplacementRule(pattern491, replacement491) pattern492 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons228, cons281, cons21, cons25) rule492 = ReplacementRule(pattern492, replacement492) pattern493 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(a_ + x_**S(2)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons282, cons21, cons25) rule493 = ReplacementRule(pattern493, replacement493) pattern494 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons380) rule494 = ReplacementRule(pattern494, replacement494) pattern495 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons380) rule495 = ReplacementRule(pattern495, replacement495) pattern496 = Pattern(Integral((x_*WC('g', S(1)))**WC('n', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons19, cons4, cons5, cons360, cons290, cons291) rule496 = ReplacementRule(pattern496, replacement496) pattern497 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons25, cons149, cons340, cons165, cons91) rule497 = ReplacementRule(pattern497, replacement497) pattern498 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons25, cons149, cons340, cons165, cons91) rule498 = ReplacementRule(pattern498, replacement498) pattern499 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons25, cons149, cons340, cons139, cons90) rule499 = ReplacementRule(pattern499, replacement499) pattern500 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons25, cons149, cons340, cons139, cons90) rule500 = ReplacementRule(pattern500, replacement500) pattern501 = Pattern(Integral(S(1)/((x_*WC('e', S(1)) + WC('d', S(0)))*sqrt(x_*WC('g', S(1)) + WC('f', S(0)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281) rule501 = ReplacementRule(pattern501, With501) pattern502 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('c', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))*sqrt(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282) rule502 = ReplacementRule(pattern502, With502) pattern503 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**n_/((x_*WC('e', S(1)) + WC('d', S(0)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281, cons82) rule503 = ReplacementRule(pattern503, replacement503) pattern504 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**n_/(sqrt(a_ + x_**S(2)*WC('c', S(1)))*(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282, cons82) rule504 = ReplacementRule(pattern504, replacement504) pattern505 = Pattern(Integral(S(1)/(sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*sqrt(x_*WC('g', S(1)) + WC('f', S(0)))*sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons317, cons228, cons281) rule505 = ReplacementRule(pattern505, replacement505) pattern506 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('c', S(1)))*sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*sqrt(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons317, cons282) rule506 = ReplacementRule(pattern506, replacement506) pattern507 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(f_ + x_*WC('g', S(1)))**S(2), x_), cons2, cons8, cons50, cons127, cons210, cons19, cons5, cons381) rule507 = ReplacementRule(pattern507, replacement507) pattern508 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(f_ + x_*WC('g', S(1)))**S(3), x_), cons2, cons8, cons50, cons127, cons210, cons19, cons5, cons381) rule508 = ReplacementRule(pattern508, replacement508) pattern509 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons228, cons281, cons150) rule509 = ReplacementRule(pattern509, replacement509) pattern510 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**n_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons317, cons282, cons150) rule510 = ReplacementRule(pattern510, replacement510) pattern511 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons382) rule511 = ReplacementRule(pattern511, replacement511) pattern512 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons383) rule512 = ReplacementRule(pattern512, replacement512) pattern513 = Pattern(Integral((u_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(u_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(a_ + u_**S(2)*WC('c', S(1)) + u_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons70, cons71) rule513 = ReplacementRule(pattern513, replacement513) pattern514 = Pattern(Integral((a_ + u_**S(2)*WC('c', S(1)))**WC('p', S(1))*(u_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(u_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons70, cons71) rule514 = ReplacementRule(pattern514, replacement514) pattern515 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons384, cons385, cons386, cons387) rule515 = ReplacementRule(pattern515, replacement515) pattern516 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons384, cons385, cons149, cons388, cons389) rule516 = ReplacementRule(pattern516, replacement516) pattern517 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons47, cons149) rule517 = ReplacementRule(pattern517, replacement517) pattern518 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons5, cons52, cons47, cons149) rule518 = ReplacementRule(pattern518, replacement518) pattern519 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons52, cons390, cons391, cons392) rule519 = ReplacementRule(pattern519, replacement519) pattern520 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons52, cons393, cons391, cons392) rule520 = ReplacementRule(pattern520, replacement520) pattern521 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**q_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons127, cons52, cons391, cons394) rule521 = ReplacementRule(pattern521, replacement521) pattern522 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**q_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons127, cons52, cons395) rule522 = ReplacementRule(pattern522, replacement522) pattern523 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons396, cons395) rule523 = ReplacementRule(pattern523, replacement523) pattern524 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons396, cons395) rule524 = ReplacementRule(pattern524, replacement524) pattern525 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons396, cons397, cons398, cons399) rule525 = ReplacementRule(pattern525, replacement525) pattern526 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons396, cons397, cons398, cons400) rule526 = ReplacementRule(pattern526, replacement526) pattern527 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**q_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons127, cons397, cons398, cons401) rule527 = ReplacementRule(pattern527, replacement527) pattern528 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons29, cons50, cons127, cons2, cons3, cons8, cons52, cons396, cons402, cons403, cons399) rule528 = ReplacementRule(pattern528, replacement528) pattern529 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons29, cons50, cons127, cons2, cons8, cons52, cons396, cons402, cons403, cons400) rule529 = ReplacementRule(pattern529, replacement529) pattern530 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**q_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons29, cons127, cons2, cons3, cons8, cons52, cons402, cons403, cons401) rule530 = ReplacementRule(pattern530, replacement530) pattern531 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons228, cons396, cons404, cons139, cons405) rule531 = ReplacementRule(pattern531, replacement531) pattern532 = Pattern(Integral((x_**S(2)*WC('f', S(1)) + WC('d', S(0)))**WC('q', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons228, cons404, cons139, cons405) rule532 = ReplacementRule(pattern532, replacement532) pattern533 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons396, cons404, cons139, cons405) rule533 = ReplacementRule(pattern533, replacement533) pattern534 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons52, cons228, cons396, cons13, cons139, cons406, cons407) rule534 = ReplacementRule(pattern534, replacement534) pattern535 = Pattern(Integral((x_**S(2)*WC('f', S(1)) + WC('d', S(0)))**WC('q', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons52, cons228, cons13, cons139, cons408, cons407) rule535 = ReplacementRule(pattern535, replacement535) pattern536 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons52, cons396, cons13, cons139, cons409, cons407) rule536 = ReplacementRule(pattern536, replacement536) pattern537 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons52, cons228, cons396, cons13, cons148, cons410, cons411) rule537 = ReplacementRule(pattern537, replacement537) pattern538 = Pattern(Integral((x_**S(2)*WC('f', S(1)) + WC('d', S(0)))**WC('q', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons52, cons228, cons13, cons148, cons410, cons411) rule538 = ReplacementRule(pattern538, replacement538) pattern539 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons52, cons396, cons13, cons148, cons410, cons411) rule539 = ReplacementRule(pattern539, replacement539) pattern540 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons228, cons396, CustomConstraint(With540)) rule540 = ReplacementRule(pattern540, replacement540) pattern541 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('f', S(1)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons228, CustomConstraint(With541)) rule541 = ReplacementRule(pattern541, replacement541) pattern542 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons228, cons396, cons412) rule542 = ReplacementRule(pattern542, replacement542) pattern543 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons228, cons396, cons413, cons233) rule543 = ReplacementRule(pattern543, With543) pattern544 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons396, cons414) rule544 = ReplacementRule(pattern544, replacement544) pattern545 = Pattern(Integral(S(1)/(sqrt(d_ + x_**S(2)*WC('f', S(1)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons228, cons233) rule545 = ReplacementRule(pattern545, With545) pattern546 = Pattern(Integral(S(1)/((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons228, cons396, cons413, cons415) rule546 = ReplacementRule(pattern546, With546) pattern547 = Pattern(Integral(S(1)/((x_**S(2)*WC('c', S(1)) + WC('a', S(0)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons396, cons416) rule547 = ReplacementRule(pattern547, With547) pattern548 = Pattern(Integral(S(1)/(sqrt(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons127, cons228, cons415) rule548 = ReplacementRule(pattern548, With548) pattern549 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))/(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons228, cons396) rule549 = ReplacementRule(pattern549, replacement549) pattern550 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))/(d_ + x_**S(2)*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons127, cons228) rule550 = ReplacementRule(pattern550, replacement550) pattern551 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('c', S(1)))/(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons396) rule551 = ReplacementRule(pattern551, replacement551) pattern552 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons228, cons396) rule552 = ReplacementRule(pattern552, With552) pattern553 = Pattern(Integral(S(1)/(sqrt(d_ + x_**S(2)*WC('f', S(1)))*sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons228) rule553 = ReplacementRule(pattern553, With553) pattern554 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons417) rule554 = ReplacementRule(pattern554, replacement554) pattern555 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons5, cons52, cons418) rule555 = ReplacementRule(pattern555, replacement555) pattern556 = Pattern(Integral((u_**S(2)*WC('c', S(1)) + u_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons70, cons71) rule556 = ReplacementRule(pattern556, replacement556) pattern557 = Pattern(Integral((u_**S(2)*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons5, cons52, cons70, cons71) rule557 = ReplacementRule(pattern557, replacement557) pattern558 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons384, cons385, cons386, cons387) rule558 = ReplacementRule(pattern558, replacement558) pattern559 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons384, cons385, cons149, cons388, cons389) rule559 = ReplacementRule(pattern559, replacement559) pattern560 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons47) rule560 = ReplacementRule(pattern560, replacement560) pattern561 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons19, cons5, cons52, cons47) rule561 = ReplacementRule(pattern561, replacement561) pattern562 = Pattern(Integral((g_ + x_*WC('h', S(1)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons419, cons420, cons20) rule562 = ReplacementRule(pattern562, replacement562) pattern563 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(g_ + x_*WC('h', S(1)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons421, cons420, cons20) rule563 = ReplacementRule(pattern563, replacement563) pattern564 = Pattern(Integral((g_ + x_*WC('h', S(1)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))**WC('m', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons5, cons419, cons422, cons20) rule564 = ReplacementRule(pattern564, replacement564) pattern565 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(g_ + x_*WC('h', S(1)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons5, cons421, cons422, cons20) rule565 = ReplacementRule(pattern565, replacement565) pattern566 = Pattern(Integral(x_**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons50, cons127, cons52, cons228, cons423, cons40) rule566 = ReplacementRule(pattern566, replacement566) pattern567 = Pattern(Integral(x_**WC('p', S(1))*(a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons50, cons127, cons52, cons424, cons40) rule567 = ReplacementRule(pattern567, replacement567) pattern568 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons425, cons426, cons272) rule568 = ReplacementRule(pattern568, replacement568) pattern569 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons427, cons428, cons272) rule569 = ReplacementRule(pattern569, replacement569) pattern570 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons19, cons5, cons429, cons426, cons272) rule570 = ReplacementRule(pattern570, replacement570) pattern571 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons228, cons396, cons430) rule571 = ReplacementRule(pattern571, replacement571) pattern572 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons396, cons430) rule572 = ReplacementRule(pattern572, replacement572) pattern573 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons19, cons228, cons430) rule573 = ReplacementRule(pattern573, replacement573) pattern574 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(g_ + x_*WC('h', S(1)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons19, cons430) rule574 = ReplacementRule(pattern574, replacement574) pattern575 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons228, cons396, cons33, cons96, cons431) rule575 = ReplacementRule(pattern575, replacement575) pattern576 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**m_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons396, cons33, cons96, cons432) rule576 = ReplacementRule(pattern576, replacement576) pattern577 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**m_*(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons5, cons228, cons33, cons96, cons431) rule577 = ReplacementRule(pattern577, replacement577) pattern578 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(g_ + x_*WC('h', S(1)))**m_*(x_**S(2)*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons5, cons33, cons96, cons432) rule578 = ReplacementRule(pattern578, replacement578) pattern579 = Pattern(Integral((x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))/((x_*WC('h', S(1)) + WC('g', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**(S(3)/2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons431) rule579 = ReplacementRule(pattern579, replacement579) pattern580 = Pattern(Integral((x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))/((a_ + x_**S(2)*WC('c', S(1)))**(S(3)/2)*(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons396, cons432) rule580 = ReplacementRule(pattern580, replacement580) pattern581 = Pattern(Integral((x_**S(2)*WC('f', S(1)) + WC('d', S(0)))/((x_*WC('h', S(1)) + WC('g', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**(S(3)/2)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons228, cons431) rule581 = ReplacementRule(pattern581, replacement581) pattern582 = Pattern(Integral((x_**S(2)*WC('f', S(1)) + WC('d', S(0)))/((a_ + x_**S(2)*WC('c', S(1)))**(S(3)/2)*(g_ + x_*WC('h', S(1)))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons432) rule582 = ReplacementRule(pattern582, replacement582) pattern583 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**m_*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons246, cons139, cons168) rule583 = ReplacementRule(pattern583, replacement583) pattern584 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('h', S(1)) + WC('g', S(0)))**m_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons396, cons246, cons139, cons168) rule584 = ReplacementRule(pattern584, replacement584) pattern585 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**m_*(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons228, cons246, cons139, cons168) rule585 = ReplacementRule(pattern585, replacement585) pattern586 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(g_ + x_*WC('h', S(1)))**m_*(x_**S(2)*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons246, cons139, cons168) rule586 = ReplacementRule(pattern586, replacement586) pattern587 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons228, cons396, cons13, cons139, cons433) rule587 = ReplacementRule(pattern587, replacement587) pattern588 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons396, cons13, cons139, cons432) rule588 = ReplacementRule(pattern588, replacement588) pattern589 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons19, cons228, cons13, cons139, cons433) rule589 = ReplacementRule(pattern589, replacement589) pattern590 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**p_*(g_ + x_*WC('h', S(1)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons19, cons13, cons139, cons432) rule590 = ReplacementRule(pattern590, replacement590) pattern591 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons228, cons396, cons244) rule591 = ReplacementRule(pattern591, replacement591) pattern592 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons396, cons244) rule592 = ReplacementRule(pattern592, replacement592) pattern593 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons19, cons5, cons228, cons244) rule593 = ReplacementRule(pattern593, replacement593) pattern594 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(g_ + x_*WC('h', S(1)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons19, cons5, cons244) rule594 = ReplacementRule(pattern594, replacement594) pattern595 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons228, cons396, cons272) rule595 = ReplacementRule(pattern595, replacement595) pattern596 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons396, cons272) rule596 = ReplacementRule(pattern596, replacement596) pattern597 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons19, cons5, cons228, cons272) rule597 = ReplacementRule(pattern597, replacement597) pattern598 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)))*(g_ + x_*WC('h', S(1)))**WC('m', S(1)), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons19, cons5, cons272) rule598 = ReplacementRule(pattern598, replacement598) pattern599 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons222, cons165) rule599 = ReplacementRule(pattern599, replacement599) pattern600 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons396, cons222, cons434) rule600 = ReplacementRule(pattern600, replacement600) pattern601 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons404, cons139, cons405) rule601 = ReplacementRule(pattern601, replacement601) pattern602 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons396, cons404, cons139, cons405) rule602 = ReplacementRule(pattern602, replacement602) pattern603 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons228, cons404, cons139, cons405) rule603 = ReplacementRule(pattern603, replacement603) pattern604 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons52, cons228, cons396, cons13, cons139, cons406, cons407) rule604 = ReplacementRule(pattern604, replacement604) pattern605 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons52, cons396, cons13, cons139, cons409, cons407) rule605 = ReplacementRule(pattern605, replacement605) pattern606 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons52, cons228, cons13, cons139, cons408, cons407) rule606 = ReplacementRule(pattern606, replacement606) pattern607 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons52, cons228, cons396, cons13, cons165, cons435) rule607 = ReplacementRule(pattern607, replacement607) pattern608 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons52, cons396, cons13, cons165, cons435) rule608 = ReplacementRule(pattern608, replacement608) pattern609 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons52, cons228, cons13, cons165, cons435) rule609 = ReplacementRule(pattern609, replacement609) pattern610 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, CustomConstraint(With610)) rule610 = ReplacementRule(pattern610, replacement610) pattern611 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((d_ + x_**S(2)*WC('f', S(1)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons228, CustomConstraint(With611)) rule611 = ReplacementRule(pattern611, replacement611) pattern612 = Pattern(Integral((g_ + x_*WC('h', S(1)))/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(d_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons436) rule612 = ReplacementRule(pattern612, replacement612) pattern613 = Pattern(Integral((g_ + x_*WC('h', S(1)))/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(d_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons437) rule613 = ReplacementRule(pattern613, With613) pattern614 = Pattern(Integral((g_ + x_*WC('h', S(1)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons412, cons438) rule614 = ReplacementRule(pattern614, replacement614) pattern615 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons412, cons439) rule615 = ReplacementRule(pattern615, replacement615) pattern616 = Pattern(Integral(x_/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons228, cons396, cons385) rule616 = ReplacementRule(pattern616, replacement616) pattern617 = Pattern(Integral((g_ + x_*WC('h', S(1)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons385, cons440) rule617 = ReplacementRule(pattern617, replacement617) pattern618 = Pattern(Integral((g_ + x_*WC('h', S(1)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons385, cons441) rule618 = ReplacementRule(pattern618, replacement618) pattern619 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons374, cons442) rule619 = ReplacementRule(pattern619, replacement619) pattern620 = Pattern(Integral((g_ + x_*WC('h', S(1)))/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons443) rule620 = ReplacementRule(pattern620, replacement620) pattern621 = Pattern(Integral((g_ + x_*WC('h', S(1)))/(sqrt(d_ + x_**S(2)*WC('f', S(1)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons228, cons444) rule621 = ReplacementRule(pattern621, replacement621) pattern622 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons233) rule622 = ReplacementRule(pattern622, With622) pattern623 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons396, cons414) rule623 = ReplacementRule(pattern623, With623) pattern624 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/(sqrt(d_ + x_**S(2)*WC('f', S(1)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons228, cons233) rule624 = ReplacementRule(pattern624, With624) pattern625 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396, cons374, cons415) rule625 = ReplacementRule(pattern625, With625) pattern626 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons396, cons416) rule626 = ReplacementRule(pattern626, With626) pattern627 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/(sqrt(d_ + x_**S(2)*WC('f', S(1)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons228, cons415) rule627 = ReplacementRule(pattern627, With627) pattern628 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/(sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons396) rule628 = ReplacementRule(pattern628, With628) pattern629 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/(sqrt(d_ + x_**S(2)*WC('f', S(1)))*sqrt(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons211, cons228) rule629 = ReplacementRule(pattern629, With629) pattern630 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**(S(1)/3)*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons412, cons445, cons446, cons447) rule630 = ReplacementRule(pattern630, With630) pattern631 = Pattern(Integral((g_ + x_*WC('h', S(1)))/((a_ + x_**S(2)*WC('c', S(1)))**(S(1)/3)*(d_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons448, cons449, cons45) rule631 = ReplacementRule(pattern631, replacement631) pattern632 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/((x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**(S(1)/3)*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons412, cons445, cons446, cons315) rule632 = ReplacementRule(pattern632, With632) pattern633 = Pattern(Integral((g_ + x_*WC('h', S(1)))/((a_ + x_**S(2)*WC('c', S(1)))**(S(1)/3)*(d_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons8, cons29, cons127, cons210, cons211, cons448, cons449, cons450) rule633 = ReplacementRule(pattern633, replacement633) pattern634 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons451) rule634 = ReplacementRule(pattern634, replacement634) pattern635 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))*(x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons452) rule635 = ReplacementRule(pattern635, replacement635) pattern636 = Pattern(Integral((u_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(u_**S(2)*WC('c', S(1)) + u_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons70, cons71) rule636 = ReplacementRule(pattern636, replacement636) pattern637 = Pattern(Integral((u_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(u_**S(2)*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons70, cons71) rule637 = ReplacementRule(pattern637, replacement637) pattern638 = Pattern(Integral(u_**WC('p', S(1))*v_**WC('q', S(1))*z_**WC('m', S(1)), x_), cons19, cons5, cons52, cons453, cons454, cons455) rule638 = ReplacementRule(pattern638, replacement638) pattern639 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(f_ + x_*WC('g', S(1)))**WC('n', S(1))*(x_*WC('i', S(1)) + WC('h', S(0)))**WC('q', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons19, cons4, cons5, cons52, cons338, cons126, cons379) rule639 = ReplacementRule(pattern639, replacement639) pattern640 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1))*(x_*WC('i', S(1)) + WC('h', S(0)))**WC('q', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons19, cons4, cons5, cons52, cons130, cons86) rule640 = ReplacementRule(pattern640, replacement640) pattern641 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(f_ + x_*WC('g', S(1)))**n_*(x_*WC('i', S(1)) + WC('h', S(0)))**WC('q', S(1))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons19, cons4, cons5, cons52, cons338, cons126) rule641 = ReplacementRule(pattern641, replacement641) pattern642 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons384, cons385, cons386, cons387) rule642 = ReplacementRule(pattern642, replacement642) pattern643 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons5, cons52, cons384, cons385, cons386, cons387) rule643 = ReplacementRule(pattern643, replacement643) pattern644 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons384, cons385, cons149, cons388, cons389) rule644 = ReplacementRule(pattern644, replacement644) pattern645 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons5, cons52, cons384, cons385, cons149, cons388, cons389) rule645 = ReplacementRule(pattern645, replacement645) pattern646 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons47) rule646 = ReplacementRule(pattern646, replacement646) pattern647 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons5, cons52, cons47) rule647 = ReplacementRule(pattern647, replacement647) pattern648 = Pattern(Integral((x_**S(2)*WC('f', S(1)) + WC('d', S(0)))**WC('q', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons37, cons38, cons5, cons52, cons47) rule648 = ReplacementRule(pattern648, replacement648) pattern649 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))**WC('q', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons38, cons5, cons52, cons47) rule649 = ReplacementRule(pattern649, replacement649) pattern650 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons228, cons396, cons222, cons165) rule650 = ReplacementRule(pattern650, replacement650) pattern651 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons228, cons396, cons222, cons165) rule651 = ReplacementRule(pattern651, replacement651) pattern652 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons396, cons222, cons434) rule652 = ReplacementRule(pattern652, replacement652) pattern653 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons38, cons396, cons222, cons434) rule653 = ReplacementRule(pattern653, replacement653) pattern654 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons228, cons396, cons404, cons139, cons405) rule654 = ReplacementRule(pattern654, replacement654) pattern655 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons228, cons396, cons404, cons139, cons405) rule655 = ReplacementRule(pattern655, replacement655) pattern656 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons396, cons404, cons139, cons405) rule656 = ReplacementRule(pattern656, replacement656) pattern657 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons38, cons396, cons404, cons139, cons405) rule657 = ReplacementRule(pattern657, replacement657) pattern658 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons37, cons38, cons228, cons404, cons139, cons405) rule658 = ReplacementRule(pattern658, replacement658) pattern659 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons38, cons228, cons404, cons139, cons405) rule659 = ReplacementRule(pattern659, replacement659) pattern660 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons52, cons228, cons396, cons13, cons139, cons406, cons407) rule660 = ReplacementRule(pattern660, replacement660) pattern661 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons52, cons228, cons396, cons13, cons139, cons406, cons407) rule661 = ReplacementRule(pattern661, replacement661) pattern662 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons52, cons396, cons13, cons139, cons409, cons407) rule662 = ReplacementRule(pattern662, replacement662) pattern663 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons38, cons52, cons396, cons13, cons139, cons409, cons407) rule663 = ReplacementRule(pattern663, replacement663) pattern664 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons37, cons38, cons52, cons228, cons13, cons139, cons408, cons407) rule664 = ReplacementRule(pattern664, replacement664) pattern665 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons38, cons52, cons228, cons13, cons139, cons408, cons407) rule665 = ReplacementRule(pattern665, replacement665) pattern666 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons52, cons228, cons396, cons13, cons165, cons435, cons456) rule666 = ReplacementRule(pattern666, replacement666) pattern667 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons52, cons228, cons396, cons13, cons165, cons435, cons456) rule667 = ReplacementRule(pattern667, replacement667) pattern668 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons52, cons396, cons13, cons165, cons435, cons456) rule668 = ReplacementRule(pattern668, replacement668) pattern669 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons38, cons52, cons396, cons13, cons165, cons435, cons456) rule669 = ReplacementRule(pattern669, replacement669) pattern670 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons37, cons38, cons52, cons228, cons13, cons165, cons435, cons456) rule670 = ReplacementRule(pattern670, replacement670) pattern671 = Pattern(Integral((d_ + x_**S(2)*WC('f', S(1)))**WC('q', S(1))*(x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons38, cons52, cons228, cons13, cons165, cons435, cons456) rule671 = ReplacementRule(pattern671, replacement671) pattern672 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons228, cons396, CustomConstraint(With672)) rule672 = ReplacementRule(pattern672, replacement672) pattern673 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*(d_ + x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons228, cons396, CustomConstraint(With673)) rule673 = ReplacementRule(pattern673, replacement673) pattern674 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/((d_ + x_**S(2)*WC('f', S(1)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons37, cons38, cons228, CustomConstraint(With674)) rule674 = ReplacementRule(pattern674, replacement674) pattern675 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/((d_ + x_**S(2)*WC('f', S(1)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons38, cons228, CustomConstraint(With675)) rule675 = ReplacementRule(pattern675, replacement675) pattern676 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons228, cons396) rule676 = ReplacementRule(pattern676, replacement676) pattern677 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons228, cons396) rule677 = ReplacementRule(pattern677, replacement677) pattern678 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons396) rule678 = ReplacementRule(pattern678, replacement678) pattern679 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/((a_ + x_**S(2)*WC('c', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons38, cons396) rule679 = ReplacementRule(pattern679, replacement679) pattern680 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(sqrt(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons37, cons38, cons228) rule680 = ReplacementRule(pattern680, replacement680) pattern681 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/(sqrt(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons38, cons228) rule681 = ReplacementRule(pattern681, replacement681) pattern682 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons457) rule682 = ReplacementRule(pattern682, replacement682) pattern683 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons5, cons52, cons458) rule683 = ReplacementRule(pattern683, replacement683) pattern684 = Pattern(Integral((x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons459) rule684 = ReplacementRule(pattern684, replacement684) pattern685 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_*(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons36, cons38, cons5, cons52, cons460) rule685 = ReplacementRule(pattern685, replacement685) pattern686 = Pattern(Integral((u_**S(2)*WC('C', S(1)) + u_*WC('B', S(1)) + WC('A', S(0)))*(u_**S(2)*WC('c', S(1)) + u_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons70, cons71) rule686 = ReplacementRule(pattern686, replacement686) pattern687 = Pattern(Integral((u_*WC('B', S(1)) + WC('A', S(0)))*(u_**S(2)*WC('c', S(1)) + u_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons70, cons71) rule687 = ReplacementRule(pattern687, replacement687) pattern688 = Pattern(Integral((u_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(u_**S(2)*WC('c', S(1)) + u_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons5, cons52, cons70, cons71) rule688 = ReplacementRule(pattern688, replacement688) pattern689 = Pattern(Integral((u_**S(2)*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('C', S(1)) + u_*WC('B', S(1)) + WC('A', S(0)))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons70, cons71) rule689 = ReplacementRule(pattern689, replacement689) pattern690 = Pattern(Integral((u_*WC('B', S(1)) + WC('A', S(0)))*(u_**S(2)*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons5, cons52, cons70, cons71) rule690 = ReplacementRule(pattern690, replacement690) pattern691 = Pattern(Integral((u_**S(2)*WC('C', S(1)) + WC('A', S(0)))*(u_**S(2)*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**S(2)*WC('f', S(1)) + u_*WC('e', S(1)) + WC('d', S(0)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons38, cons5, cons52, cons70, cons71) rule691 = ReplacementRule(pattern691, replacement691) return [rule192, rule193, rule194, rule195, rule196, rule197, rule198, rule199, rule200, rule201, rule202, rule203, rule204, rule205, rule206, rule207, rule208, rule209, rule210, rule211, rule212, rule213, rule214, rule215, rule216, rule217, rule218, rule219, rule220, rule221, rule222, rule223, rule224, rule225, rule226, rule227, rule228, rule229, rule230, rule231, rule232, rule233, rule234, rule235, rule236, rule237, rule238, rule239, rule240, rule241, rule242, rule243, rule244, rule245, rule246, rule247, rule248, rule249, rule250, rule251, rule252, rule253, rule254, rule255, rule256, rule257, rule258, rule259, rule260, rule261, rule262, rule263, rule264, rule265, rule266, rule267, rule268, rule269, rule270, rule271, rule272, rule273, rule274, rule275, rule276, rule277, rule278, rule279, rule280, rule281, rule282, rule283, rule284, rule285, rule286, rule287, rule288, rule289, rule290, rule291, rule292, rule293, rule294, rule295, rule296, rule297, rule298, rule299, rule300, rule301, rule302, rule303, rule304, rule305, rule306, rule307, rule308, rule309, rule310, rule311, rule312, rule313, rule314, rule315, rule316, rule317, rule318, rule319, rule320, rule321, rule322, rule323, rule324, rule325, rule326, rule327, rule328, rule329, rule330, rule331, rule332, rule333, rule334, rule335, rule336, rule337, rule338, rule339, rule340, rule341, rule342, rule343, rule344, rule345, rule346, rule347, rule348, rule349, rule350, rule351, rule352, rule353, rule354, rule355, rule356, rule357, rule358, rule359, rule360, rule361, rule362, rule363, rule364, rule365, rule366, rule367, rule368, rule369, rule370, rule371, rule372, rule373, rule374, rule375, rule376, rule377, rule378, rule379, rule380, rule381, rule382, rule383, rule384, rule385, rule386, rule387, rule388, rule389, rule390, rule391, rule392, rule393, rule394, rule395, rule396, rule397, rule398, rule399, rule400, rule401, rule402, rule403, rule404, rule405, rule406, rule407, rule408, rule409, rule410, rule411, rule412, rule413, rule414, rule415, rule416, rule417, rule418, rule419, rule420, rule421, rule422, rule423, rule424, rule425, rule426, rule427, rule428, rule429, rule430, rule431, rule432, rule433, rule434, rule435, rule436, rule437, rule438, rule439, rule440, rule441, rule442, rule443, rule444, rule445, rule446, rule447, rule448, rule449, rule450, rule451, rule452, rule453, rule454, rule455, rule456, rule457, rule458, rule459, rule460, rule461, rule462, rule463, rule464, rule465, rule466, rule467, rule468, rule469, rule470, rule471, rule472, rule473, rule474, rule475, rule476, rule477, rule478, rule479, rule480, rule481, rule482, rule483, rule484, rule485, rule486, rule487, rule488, rule489, rule490, rule491, rule492, rule493, rule494, rule495, rule496, rule497, rule498, rule499, rule500, rule501, rule502, rule503, rule504, rule505, rule506, rule507, rule508, rule509, rule510, rule511, rule512, rule513, rule514, rule515, rule516, rule517, rule518, rule519, rule520, rule521, rule522, rule523, rule524, rule525, rule526, rule527, rule528, rule529, rule530, rule531, rule532, rule533, rule534, rule535, rule536, rule537, rule538, rule539, rule540, rule541, rule542, rule543, rule544, rule545, rule546, rule547, rule548, rule549, rule550, rule551, rule552, rule553, rule554, rule555, rule556, rule557, rule558, rule559, rule560, rule561, rule562, rule563, rule564, rule565, rule566, rule567, rule568, rule569, rule570, rule571, rule572, rule573, rule574, rule575, rule576, rule577, rule578, rule579, rule580, rule581, rule582, rule583, rule584, rule585, rule586, rule587, rule588, rule589, rule590, rule591, rule592, rule593, rule594, rule595, rule596, rule597, rule598, rule599, rule600, rule601, rule602, rule603, rule604, rule605, rule606, rule607, rule608, rule609, rule610, rule611, rule612, rule613, rule614, rule615, rule616, rule617, rule618, rule619, rule620, rule621, rule622, rule623, rule624, rule625, rule626, rule627, rule628, rule629, rule630, rule631, rule632, rule633, rule634, rule635, rule636, rule637, rule638, rule639, rule640, rule641, rule642, rule643, rule644, rule645, rule646, rule647, rule648, rule649, rule650, rule651, rule652, rule653, rule654, rule655, rule656, rule657, rule658, rule659, rule660, rule661, rule662, rule663, rule664, rule665, rule666, rule667, rule668, rule669, rule670, rule671, rule672, rule673, rule674, rule675, rule676, rule677, rule678, rule679, rule680, rule681, rule682, rule683, rule684, rule685, rule686, rule687, rule688, rule689, rule690, rule691, ] def replacement192(a, b, c, x): return Dist((b/S(2) + c*x)/sqrt(a + b*x + c*x**S(2)), Int(S(1)/(b/S(2) + c*x), x), x) def replacement193(a, b, c, p, x): return Simp((b + S(2)*c*x)*(a + b*x + c*x**S(2))**p/(S(2)*c*(S(2)*p + S(1))), x) def With194(a, b, c, p, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(c**(-p), Int(Simp(b/S(2) + c*x - q/S(2), x)**p*Simp(b/S(2) + c*x + q/S(2), x)**p, x), x) def replacement195(a, b, c, p, x): return Int(ExpandIntegrand((a + b*x + c*x**S(2))**p, x), x) def replacement196(a, b, c, p, x): return -Dist(p*(-S(4)*a*c + b**S(2))/(S(2)*c*(S(2)*p + S(1))), Int((a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((b + S(2)*c*x)*(a + b*x + c*x**S(2))**p/(S(2)*c*(S(2)*p + S(1))), x) def replacement197(a, b, c, x): return Simp(-S(2)*(b + S(2)*c*x)/((-S(4)*a*c + b**S(2))*sqrt(a + b*x + c*x**S(2))), x) def replacement198(a, b, c, p, x): return -Dist(S(2)*c*(S(2)*p + S(3))/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((b + S(2)*c*x)*(a + b*x + c*x**S(2))**(p + S(1))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def With199(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(c/q, Int(S(1)/Simp(b/S(2) + c*x - q/S(2), x), x), x) - Dist(c/q, Int(S(1)/Simp(b/S(2) + c*x + q/S(2), x), x), x) def With200(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = -S(4)*a*c/b**S(2) + S(1) if And(RationalQ(q), Or(EqQ(q**S(2), S(1)), Not(RationalQ(-S(4)*a*c + b**S(2))))): return True return False def replacement200(a, b, c, x): q = -S(4)*a*c/b**S(2) + S(1) return Dist(-S(2)/b, Subst(Int(S(1)/(q - x**S(2)), x), x, S(1) + S(2)*c*x/b), x) def replacement201(a, b, c, x): return Dist(S(-2), Subst(Int(S(1)/Simp(-S(4)*a*c + b**S(2) - x**S(2), x), x), x, b + S(2)*c*x), x) def replacement202(a, b, c, p, x): return Dist((-S(4)*c/(-S(4)*a*c + b**S(2)))**(-p)/(S(2)*c), Subst(Int(Simp(-x**S(2)/(-S(4)*a*c + b**S(2)) + S(1), x)**p, x), x, b + S(2)*c*x), x) def replacement203(b, c, x): return Dist(S(2), Subst(Int(S(1)/(-c*x**S(2) + S(1)), x), x, x/sqrt(b*x + c*x**S(2))), x) def replacement204(a, b, c, x): return Dist(S(2), Subst(Int(S(1)/(S(4)*c - x**S(2)), x), x, (b + S(2)*c*x)/sqrt(a + b*x + c*x**S(2))), x) def replacement205(b, c, p, x): return Dist((-c*(b*x + c*x**S(2))/b**S(2))**(-p)*(b*x + c*x**S(2))**p, Int((-c*x/b - c**S(2)*x**S(2)/b**S(2))**p, x), x) def With206(a, b, c, p, x): if isinstance(x, (int, Integer, float, Float)): return False d = Denominator(p) if LessEqual(S(3), d, S(4)): return True return False def replacement206(a, b, c, p, x): d = Denominator(p) return Dist(d*sqrt((b + S(2)*c*x)**S(2))/(b + S(2)*c*x), Subst(Int(x**(d*(p + S(1)) + S(-1))/sqrt(-S(4)*a*c + b**S(2) + S(4)*c*x**d), x), x, (a + b*x + c*x**S(2))**(S(1)/d)), x) def With207(a, b, c, p, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return -Simp(((-b - S(2)*c*x + q)/(S(2)*q))**(-p + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*Hypergeometric2F1(-p, p + S(1), p + S(2), (b + S(2)*c*x + q)/(S(2)*q))/(q*(p + S(1))), x) def replacement208(a, b, c, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x + c*x**S(2))**p, x), x, u), x) def replacement209(a, b, c, d, e, m, p, x): return Simp(c**(-m/S(2) + S(-1)/2)*e**m*(a + b*x + c*x**S(2))**(m/S(2) + p + S(1)/2)/(m + S(2)*p + S(1)), x) def replacement210(a, b, c, d, e, m, p, x): return Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*log(RemoveContent(d + e*x, x))/e, x) def replacement211(a, b, c, d, e, m, p, x): return Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(2)*p + S(1))), x) def replacement212(a, b, c, d, e, m, p, x): return -Simp((b + S(2)*c*x)*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/((m + S(1))*(-b*e + S(2)*c*d)), x) def replacement213(a, b, c, d, e, x): return Dist(sqrt(a + b*x + c*x**S(2))/(b + S(2)*c*x), Int((b + S(2)*c*x)/(d + e*x)**S(2), x), x) def replacement214(a, b, c, d, e, m, x): return -Dist((-b*e + S(2)*c*d)*sqrt(a + b*x + c*x**S(2))/(e*(b + S(2)*c*x)*(m + S(2))), Int((d + e*x)**m, x), x) + Simp((d + e*x)**(m + S(1))*sqrt(a + b*x + c*x**S(2))/(e*(m + S(2))), x) def replacement215(a, b, c, d, e, x): return Dist(S(2)*c/(-b*e + S(2)*c*d), Int(S(1)/((d + e*x)*sqrt(a + b*x + c*x**S(2))), x), x) + Simp(-S(4)*c*e*sqrt(a + b*x + c*x**S(2))/((d + e*x)*(-b*e + S(2)*c*d)**S(2)), x) def replacement216(a, b, c, d, e, m, p, x): return -Simp((b + S(2)*c*x)*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/((m + S(2))*(-b*e + S(2)*c*d)), x) + Simp(-S(2)*c*e*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/((-b*e + S(2)*c*d)**S(2)*(m*p + S(-1))), x) def replacement217(a, b, c, d, e, p, x): return Dist((-b*e + S(2)*c*d)/(S(2)*c), Int((a + b*x + c*x**S(2))**p, x), x) + Simp(e*(a + b*x + c*x**S(2))**(p + S(1))/(S(2)*c*(p + S(1))), x) def replacement218(a, b, c, d, e, m, p, x): return Dist(p*(S(2)*p + S(-1))*(-b*e + S(2)*c*d)/(e**S(2)*(m + S(1))*(m + S(2)*p + S(1))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(1))), x) - Simp(p*(b + S(2)*c*x)*(d + e*x)**(m + S(2))*(a + b*x + c*x**S(2))**(p + S(-1))/(e**S(2)*(m + S(1))*(m + S(2)*p + S(1))), x) def replacement219(a, b, c, d, e, m, p, x): return Dist(S(2)*c*p*(S(2)*p + S(-1))/(e**S(2)*(m + S(1))*(m + S(2))), Int((d + e*x)**(m + S(2))*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(1))), x) - Simp(p*(b + S(2)*c*x)*(d + e*x)**(m + S(2))*(a + b*x + c*x**S(2))**(p + S(-1))/(e**S(2)*(m + S(1))*(m + S(2))), x) def replacement220(a, b, c, d, e, m, p, x): return Dist(p*(S(2)*p + S(-1))*(-b*e + S(2)*c*d)**S(2)/(S(2)*c*e**S(2)*(m + S(2)*p)*(m + S(2)*p + S(1))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(2)*p + S(1))), x) - Simp(p*(b + S(2)*c*x)*(d + e*x)**(m + S(1))*(-b*e + S(2)*c*d)*(a + b*x + c*x**S(2))**(p + S(-1))/(S(2)*c*e**S(2)*(m + S(2)*p)*(m + S(2)*p + S(1))), x) def replacement221(a, b, c, d, e, m, p, x): return Dist(e**S(2)*m*(m + S(2)*p + S(2))/((p + S(1))*(S(2)*p + S(1))*(-b*e + S(2)*c*d)), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((b + S(2)*c*x)*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/((S(2)*p + S(1))*(-b*e + S(2)*c*d)), x) - Simp(e*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*(m + S(2)*p + S(2))/((p + S(1))*(S(2)*p + S(1))*(-b*e + S(2)*c*d)), x) def replacement222(a, b, c, d, e, m, p, x): return Dist(e**S(2)*m*(m + S(-1))/(S(2)*c*(p + S(1))*(S(2)*p + S(1))), Int((d + e*x)**(m + S(-2))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((b + S(2)*c*x)*(d + e*x)**m*(a + b*x + c*x**S(2))**p/(S(2)*c*(S(2)*p + S(1))), x) - Simp(e*m*(d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(S(2)*c*(p + S(1))*(S(2)*p + S(1))), x) def replacement223(a, b, c, d, e, m, p, x): return Dist(S(2)*c*e**S(2)*(m + S(2)*p + S(2))*(m + S(2)*p + S(3))/((p + S(1))*(S(2)*p + S(1))*(-b*e + S(2)*c*d)**S(2)), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((b + S(2)*c*x)*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/((S(2)*p + S(1))*(-b*e + S(2)*c*d)), x) + Simp(-S(2)*c*e*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(m + S(2)*p + S(2))/((p + S(1))*(S(2)*p + S(1))*(-b*e + S(2)*c*d)**S(2)), x) def replacement224(a, b, c, d, e, m, p, x): return Dist(m*(-b*e + S(2)*c*d)/(S(2)*c*(m + S(2)*p + S(1))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**p, x), x) + Simp((b + S(2)*c*x)*(d + e*x)**m*(a + b*x + c*x**S(2))**p/(S(2)*c*(m + S(2)*p + S(1))), x) def replacement225(a, b, c, d, e, m, p, x): return Dist(S(2)*c*(m + S(2)*p + S(2))/((m + S(1))*(-b*e + S(2)*c*d)), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) - Simp((b + S(2)*c*x)*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/((m + S(1))*(-b*e + S(2)*c*d)), x) def replacement226(a, b, c, d, e, m, p, x): return Dist(c**(-IntPart(p))*(b/S(2) + c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((b/S(2) + c*x)**(S(2)*p)*(d + e*x)**m, x), x) def replacement227(a, b, c, d, e, m, p, x): return Int((d + e*x)**(m + p)*(a/d + c*x/e)**p, x) def replacement228(a, c, d, e, m, p, x): return Int((d + e*x)**(m + p)*(a/d + c*x/e)**p, x) def replacement229(a, b, c, d, e, m, p, x): return Simp(e*(d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*(p + S(1))), x) def replacement230(a, c, d, e, m, p, x): return Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))/(c*(p + S(1))), x) def replacement231(a, b, c, d, e, m, p, x): return Simp(e*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/((p + S(1))*(-b*e + S(2)*c*d)), x) def replacement232(a, c, d, e, m, p, x): return Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(S(2)*c*d*(p + S(1))), x) def replacement233(a, b, c, d, e, p, x): return -Dist(e**S(2)*(p + S(2))/(c*(p + S(1))), Int((a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp(e*(d + e*x)*(a + b*x + c*x**S(2))**(p + S(1))/(c*(p + S(1))), x) def replacement234(a, c, d, e, p, x): return -Dist(e**S(2)*(p + S(2))/(c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1)), x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)/(c*(p + S(1))), x) def replacement235(a, b, c, d, e, m, p, x): return Int((a/d + c*x/e)**(-m)*(a + b*x + c*x**S(2))**(m + p), x) def replacement236(a, c, d, e, m, p, x): return Dist(a**(-m)*d**(S(2)*m), Int((a + c*x**S(2))**(m + p)*(d - e*x)**(-m), x), x) def replacement237(a, b, c, d, e, m, p, x): return Dist((m + p)*(-b*e + S(2)*c*d)/(c*(m + S(2)*p + S(1))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**p, x), x) + Simp(e*(d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m + S(2)*p + S(1))), x) def replacement238(a, c, d, e, m, p, x): return Dist(S(2)*d*(m + p)/(m + S(2)*p + S(1)), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(-1)), x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))/(c*(m + S(2)*p + S(1))), x) def replacement239(a, b, c, d, e, m, p, x): return Dist(c*(m + S(2)*p + S(2))/((-b*e + S(2)*c*d)*(m + p + S(1))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) - Simp(e*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/((-b*e + S(2)*c*d)*(m + p + S(1))), x) def replacement240(a, c, d, e, m, p, x): return Dist((m + S(2)*p + S(2))/(S(2)*d*(m + p + S(1))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1)), x), x) - Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(S(2)*c*d*(m + p + S(1))), x) def replacement241(a, b, c, d, e, x): return Dist(S(2)*e, Subst(Int(S(1)/(-b*e + S(2)*c*d + e**S(2)*x**S(2)), x), x, sqrt(a + b*x + c*x**S(2))/sqrt(d + e*x)), x) def replacement242(a, c, d, e, x): return Dist(S(2)*e, Subst(Int(S(1)/(S(2)*c*d + e**S(2)*x**S(2)), x), x, sqrt(a + c*x**S(2))/sqrt(d + e*x)), x) def replacement243(a, b, c, d, e, m, p, x): return -Dist(c*p/(e**S(2)*(m + p + S(1))), Int((d + e*x)**(m + S(2))*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + p + S(1))), x) def replacement244(a, c, d, e, m, p, x): return -Dist(c*p/(e**S(2)*(m + p + S(1))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**(m + S(2)), x), x) + Simp((a + c*x**S(2))**p*(d + e*x)**(m + S(1))/(e*(m + p + S(1))), x) def replacement245(a, b, c, d, e, m, p, x): return -Dist(p*(-b*e + S(2)*c*d)/(e**S(2)*(m + S(2)*p + S(1))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(2)*p + S(1))), x) def replacement246(a, c, d, e, m, p, x): return -Dist(S(2)*c*d*p/(e**S(2)*(m + S(2)*p + S(1))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**(m + S(1)), x), x) + Simp((a + c*x**S(2))**p*(d + e*x)**(m + S(1))/(e*(m + S(2)*p + S(1))), x) def replacement247(a, b, c, d, e, m, p, x): return -Dist((-b*e + S(2)*c*d)*(m + S(2)*p + S(2))/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((d + e*x)**m*(-b*e + S(2)*c*d)*(a + b*x + c*x**S(2))**(p + S(1))/(e*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement248(a, c, d, e, m, p, x): return Dist(d*(m + S(2)*p + S(2))/(S(2)*a*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1)), x), x) - Simp(d*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(S(2)*a*e*(p + S(1))), x) def replacement249(a, b, c, d, e, m, p, x): return -Dist(e**S(2)*(m + p)/(c*(p + S(1))), Int((d + e*x)**(m + S(-2))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp(e*(d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*(p + S(1))), x) def replacement250(a, c, d, e, m, p, x): return -Dist(e**S(2)*(m + p)/(c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-2)), x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))/(c*(p + S(1))), x) def replacement251(a, b, c, d, e, m, p, x): return Dist((m + p)*(-b*e + S(2)*c*d)/(c*(m + S(2)*p + S(1))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**p, x), x) + Simp(e*(d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m + S(2)*p + S(1))), x) def replacement252(a, c, d, e, m, p, x): return Dist(S(2)*d*(m + p)/(m + S(2)*p + S(1)), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(-1)), x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))/(c*(m + S(2)*p + S(1))), x) def replacement253(a, b, c, d, e, m, p, x): return Dist(c*(m + S(2)*p + S(2))/((-b*e + S(2)*c*d)*(m + p + S(1))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) - Simp(e*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/((-b*e + S(2)*c*d)*(m + p + S(1))), x) def replacement254(a, c, d, e, m, p, x): return Dist((m + S(2)*p + S(2))/(S(2)*d*(m + p + S(1))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1)), x), x) - Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(S(2)*c*d*(m + p + S(1))), x) def replacement255(b, c, e, m, p, x): return Dist(x**(-m - p)*(e*x)**m*(b + c*x)**(-p)*(b*x + c*x**S(2))**p, Int(x**(m + p)*(b + c*x)**p, x), x) def replacement256(a, c, d, e, m, p, x): return Int((d + e*x)**(m + p)*(a/d + c*x/e)**p, x) def replacement257(a, b, c, d, e, m, p, x): return Dist((d + e*x)**(-FracPart(p))*(a/d + c*x/e)**(-FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((d + e*x)**(m + p)*(a/d + c*x/e)**p, x), x) def replacement258(a, c, d, e, m, p, x): return Dist((a + c*x**S(2))**FracPart(p)*(d + e*x)**(-FracPart(p))*(a/d + c*x/e)**(-FracPart(p)), Int((d + e*x)**(m + p)*(a/d + c*x/e)**p, x), x) def replacement259(a, b, c, d, e, x): return Dist(b**S(2)/(d**S(2)*(-S(4)*a*c + b**S(2))), Int((d + e*x)/(a + b*x + c*x**S(2)), x), x) + Dist(-S(4)*b*c/(d*(-S(4)*a*c + b**S(2))), Int(S(1)/(b + S(2)*c*x), x), x) def replacement260(a, b, c, d, e, m, p, x): return Simp(S(2)*c*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(e*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement261(a, b, c, d, e, m, p, x): return Int(ExpandIntegrand((d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x) def replacement262(a, b, c, d, e, m, p, x): return -Dist(b*p/(d*e*(m + S(1))), Int((d + e*x)**(m + S(2))*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(1))), x) def replacement263(a, b, c, d, e, m, p, x): return -Dist(d*p*(-S(4)*a*c + b**S(2))/(b*e*(m + S(2)*p + S(1))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(2)*p + S(1))), x) def replacement264(a, b, c, d, e, m, p, x): return -Dist(d*e*(m + S(-1))/(b*(p + S(1))), Int((d + e*x)**(m + S(-2))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp(d*(d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(b*(p + S(1))), x) def replacement265(a, b, c, d, e, m, p, x): return -Dist(S(2)*c*(m + S(2)*p + S(3))/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp(S(2)*c*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(e*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement266(a, b, c, d, e, x): return Dist(S(4)*c, Subst(Int(S(1)/(-S(4)*a*c*e + b**S(2)*e + S(4)*c*e*x**S(2)), x), x, sqrt(a + b*x + c*x**S(2))), x) def replacement267(a, b, c, d, e, x): return Dist(S(4)*sqrt(-c/(-S(4)*a*c + b**S(2)))/e, Subst(Int(S(1)/sqrt(Simp(-b**S(2)*x**S(4)/(d**S(2)*(-S(4)*a*c + b**S(2))) + S(1), x)), x), x, sqrt(d + e*x)), x) def replacement268(a, b, c, d, e, x): return Dist(S(4)*sqrt(-c/(-S(4)*a*c + b**S(2)))/e, Subst(Int(x**S(2)/sqrt(Simp(-b**S(2)*x**S(4)/(d**S(2)*(-S(4)*a*c + b**S(2))) + S(1), x)), x), x, sqrt(d + e*x)), x) def replacement269(a, b, c, d, e, m, x): return Dist(sqrt(-c*(a + b*x + c*x**S(2))/(-S(4)*a*c + b**S(2)))/sqrt(a + b*x + c*x**S(2)), Int((d + e*x)**m/sqrt(-a*c/(-S(4)*a*c + b**S(2)) - b*c*x/(-S(4)*a*c + b**S(2)) - c**S(2)*x**S(2)/(-S(4)*a*c + b**S(2))), x), x) def replacement270(a, b, c, d, e, m, p, x): return Dist(d**S(2)*(m + S(-1))*(-S(4)*a*c + b**S(2))/(b**S(2)*(m + S(2)*p + S(1))), Int((d + e*x)**(m + S(-2))*(a + b*x + c*x**S(2))**p, x), x) + Simp(S(2)*d*(d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(b*(m + S(2)*p + S(1))), x) def replacement271(a, b, c, d, e, m, p, x): return Dist(b**S(2)*(m + S(2)*p + S(3))/(d**S(2)*(m + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(2))*(a + b*x + c*x**S(2))**p, x), x) + Simp(-S(2)*b*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(d*(m + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement272(a, b, c, d, e, m, p, x): return Dist(S(1)/e, Subst(Int(x**m*(a - b**S(2)/(S(4)*c) + c*x**S(2)/e**S(2))**p, x), x, d + e*x), x) def replacement273(a, b, c, d, e, m, p, x): return Int(ExpandIntegrand((d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x) def replacement274(a, c, d, e, m, p, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(d + e*x)**m, x), x) def With275(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist((c*d - e*(b/S(2) - q/S(2)))/q, Int(S(1)/(b/S(2) + c*x - q/S(2)), x), x) - Dist((c*d - e*(b/S(2) + q/S(2)))/q, Int(S(1)/(b/S(2) + c*x + q/S(2)), x), x) def With276(a, c, d, e, x): q = Rt(-a*c, S(2)) return Dist(-c*d/(S(2)*q) + e/S(2), Int(S(1)/(c*x + q), x), x) + Dist(c*d/(S(2)*q) + e/S(2), Int(S(1)/(c*x - q), x), x) def replacement277(a, b, c, d, e, x): return Dist(e/(S(2)*c), Int((b + S(2)*c*x)/(a + b*x + c*x**S(2)), x), x) + Dist((-b*e + S(2)*c*d)/(S(2)*c), Int(S(1)/(a + b*x + c*x**S(2)), x), x) def replacement278(a, c, d, e, x): return Dist(d, Int(S(1)/(a + c*x**S(2)), x), x) + Dist(e, Int(x/(a + c*x**S(2)), x), x) def replacement279(a, b, c, d, e, x): return Dist(S(2)*e, Subst(Int(x**S(2)/(a*e**S(2) - b*d*e + c*d**S(2) + c*x**S(4) - x**S(2)*(-b*e + S(2)*c*d)), x), x, sqrt(d + e*x)), x) def replacement280(a, c, d, e, x): return Dist(S(2)*e, Subst(Int(x**S(2)/(a*e**S(2) + c*d**S(2) - S(2)*c*d*x**S(2) + c*x**S(4)), x), x, sqrt(d + e*x)), x) def replacement281(a, b, c, d, e, m, x): return Int(PolynomialDivide((d + e*x)**m, a + b*x + c*x**S(2), x), x) def replacement282(a, c, d, e, m, x): return Int(PolynomialDivide((d + e*x)**m, a + c*x**S(2), x), x) def replacement283(a, b, c, d, e, m, x): return Dist(S(1)/c, Int((d + e*x)**(m + S(-2))*Simp(-a*e**S(2) + c*d**S(2) + e*x*(-b*e + S(2)*c*d), x)/(a + b*x + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(-1))/(c*(m + S(-1))), x) def replacement284(a, c, d, e, m, x): return Dist(S(1)/c, Int((d + e*x)**(m + S(-2))*Simp(-a*e**S(2) + c*d**S(2) + S(2)*c*d*e*x, x)/(a + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(-1))/(c*(m + S(-1))), x) def replacement285(a, b, c, d, e, x): return Dist(e**S(2)/(a*e**S(2) - b*d*e + c*d**S(2)), Int(S(1)/(d + e*x), x), x) + Dist(S(1)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((-b*e + c*d - c*e*x)/(a + b*x + c*x**S(2)), x), x) def replacement286(a, c, d, e, x): return Dist(e**S(2)/(a*e**S(2) + c*d**S(2)), Int(S(1)/(d + e*x), x), x) + Dist(S(1)/(a*e**S(2) + c*d**S(2)), Int((c*d - c*e*x)/(a + c*x**S(2)), x), x) def replacement287(a, b, c, d, e, x): return Dist(S(2)*e, Subst(Int(S(1)/(a*e**S(2) - b*d*e + c*d**S(2) + c*x**S(4) - x**S(2)*(-b*e + S(2)*c*d)), x), x, sqrt(d + e*x)), x) def replacement288(a, c, d, e, x): return Dist(S(2)*e, Subst(Int(S(1)/(a*e**S(2) + c*d**S(2) - S(2)*c*d*x**S(2) + c*x**S(4)), x), x, sqrt(d + e*x)), x) def replacement289(a, b, c, d, e, m, x): return Dist(S(1)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((d + e*x)**(m + S(1))*Simp(-b*e + c*d - c*e*x, x)/(a + b*x + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(1))/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement290(a, c, d, e, m, x): return Dist(c/(a*e**S(2) + c*d**S(2)), Int((d - e*x)*(d + e*x)**(m + S(1))/(a + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(1))/((m + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement291(a, b, c, d, e, m, x): return Int(ExpandIntegrand((d + e*x)**m, S(1)/(a + b*x + c*x**S(2)), x), x) def replacement292(a, c, d, e, m, x): return Int(ExpandIntegrand((d + e*x)**m, S(1)/(a + c*x**S(2)), x), x) def replacement293(a, b, c, d, e, x): return Simp(-S(2)*(-S(2)*a*e + b*d + x*(-b*e + S(2)*c*d))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x + c*x**S(2))), x) def replacement294(a, c, d, e, x): return Simp((-a*e + c*d*x)/(a*c*sqrt(a + c*x**S(2))), x) def replacement295(a, b, c, d, e, p, x): return -Dist((S(2)*p + S(3))*(-b*e + S(2)*c*d)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(1))*(-S(2)*a*e + b*d + x*(-b*e + S(2)*c*d))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement296(a, c, d, e, p, x): return Dist(d*(S(2)*p + S(3))/(S(2)*a*(p + S(1))), Int((a + c*x**S(2))**(p + S(1)), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(a*e - c*d*x)/(S(2)*a*c*(p + S(1))), x) def replacement297(a, b, c, d, e, p, x): return Dist((-b*e + S(2)*c*d)/(S(2)*c), Int((a + b*x + c*x**S(2))**p, x), x) + Simp(e*(a + b*x + c*x**S(2))**(p + S(1))/(S(2)*c*(p + S(1))), x) def replacement298(a, c, d, e, p, x): return Dist(d, Int((a + c*x**S(2))**p, x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))/(S(2)*c*(p + S(1))), x) def replacement299(a, b, c, d, e, m, p, x): return Dist((d + e*x)**FracPart(p)*(a*d + c*e*x**S(3))**(-FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((d + e*x)**(m - p)*(a*d + c*e*x**S(3))**p, x), x) def replacement300(b, c, d, e, m, x): return Int((d + e*x)**m/(sqrt(b*x)*sqrt(S(1) + c*x/b)), x) def replacement301(b, c, d, e, m, x): return Dist(sqrt(x)*sqrt(b + c*x)/sqrt(b*x + c*x**S(2)), Int((d + e*x)**m/(sqrt(x)*sqrt(b + c*x)), x), x) def replacement302(a, b, c, m, x): return Dist(S(2), Subst(Int(x**(S(2)*m + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, sqrt(x)), x) def replacement303(a, b, c, e, m, x): return Dist(x**(-m)*(e*x)**m, Int(x**m/sqrt(a + b*x + c*x**S(2)), x), x) def replacement304(a, b, c, d, e, m, x): return Dist(S(2)*sqrt(-c*(a + b*x + c*x**S(2))/(-S(4)*a*c + b**S(2)))*(S(2)*c*(d + e*x)/(-b*e + S(2)*c*d - e*Rt(-S(4)*a*c + b**S(2), S(2))))**(-m)*(d + e*x)**m*Rt(-S(4)*a*c + b**S(2), S(2))/(c*sqrt(a + b*x + c*x**S(2))), Subst(Int((S(2)*e*x**S(2)*Rt(-S(4)*a*c + b**S(2), S(2))/(-b*e + S(2)*c*d - e*Rt(-S(4)*a*c + b**S(2), S(2))) + S(1))**m/sqrt(S(1) - x**S(2)), x), x, sqrt(S(2))*sqrt((b + S(2)*c*x + Rt(-S(4)*a*c + b**S(2), S(2)))/Rt(-S(4)*a*c + b**S(2), S(2)))/S(2)), x) def replacement305(a, c, d, e, m, x): return Dist(S(2)*a*(c*(d + e*x)/(-a*e*Rt(-c/a, S(2)) + c*d))**(-m)*sqrt(S(1) + c*x**S(2)/a)*(d + e*x)**m*Rt(-c/a, S(2))/(c*sqrt(a + c*x**S(2))), Subst(Int((S(2)*a*e*x**S(2)*Rt(-c/a, S(2))/(-a*e*Rt(-c/a, S(2)) + c*d) + S(1))**m/sqrt(S(1) - x**S(2)), x), x, sqrt(-x*Rt(-c/a, S(2))/S(2) + S(1)/2)), x) def replacement306(a, b, c, d, e, m, p, x): return Dist(p*(-S(4)*a*c + b**S(2))/(S(2)*(m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), Int((d + e*x)**(m + S(2))*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) - Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*(-S(2)*a*e + b*d + x*(-b*e + S(2)*c*d))/(S(2)*(m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement307(a, c, d, e, m, p, x): return -Dist(S(2)*a*c*p/((m + S(1))*(a*e**S(2) + c*d**S(2))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**(m + S(2)), x), x) - Simp((a + c*x**S(2))**p*(d + e*x)**(m + S(1))*(-S(2)*a*e + S(2)*c*d*x)/(S(2)*(m + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement308(a, b, c, d, e, m, p, x): return -Dist(S(2)*(S(2)*p + S(3))*(a*e**S(2) - b*d*e + c*d**S(2))/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(-2))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*(-S(2)*a*e + b*d + x*(-b*e + S(2)*c*d))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement309(a, c, d, e, m, p, x): return Dist((S(2)*p + S(3))*(a*e**S(2) + c*d**S(2))/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-2)), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(a*e - c*d*x)/(S(2)*a*c*(p + S(1))), x) def replacement310(a, b, c, d, e, x): return Dist(S(-2), Subst(Int(S(1)/(S(4)*a*e**S(2) - S(4)*b*d*e + S(4)*c*d**S(2) - x**S(2)), x), x, (S(2)*a*e - b*d - x*(-b*e + S(2)*c*d))/sqrt(a + b*x + c*x**S(2))), x) def replacement311(a, c, d, e, x): return -Subst(Int(S(1)/(a*e**S(2) + c*d**S(2) - x**S(2)), x), x, (a*e - c*d*x)/sqrt(a + c*x**S(2))) def replacement312(a, b, c, d, e, m, p, x): return -Simp(((b + S(2)*c*x + Rt(-S(4)*a*c + b**S(2), S(2)))*(-b*e + S(2)*c*d + e*Rt(-S(4)*a*c + b**S(2), S(2)))/((b + S(2)*c*x - Rt(-S(4)*a*c + b**S(2), S(2)))*(-b*e + S(2)*c*d - e*Rt(-S(4)*a*c + b**S(2), S(2)))))**(-p)*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*(b + S(2)*c*x - Rt(-S(4)*a*c + b**S(2), S(2)))*Hypergeometric2F1(m + S(1), -p, m + S(2), -S(4)*c*(d + e*x)*Rt(-S(4)*a*c + b**S(2), S(2))/((b + S(2)*c*x - Rt(-S(4)*a*c + b**S(2), S(2)))*(-b*e + S(2)*c*d - e*Rt(-S(4)*a*c + b**S(2), S(2)))))/((m + S(1))*(-b*e + S(2)*c*d + e*Rt(-S(4)*a*c + b**S(2), S(2)))), x) def replacement313(a, c, d, e, m, p, x): return Simp(((c*d + e*Rt(-a*c, S(2)))*(c*x + Rt(-a*c, S(2)))/((c*d - e*Rt(-a*c, S(2)))*(c*x - Rt(-a*c, S(2)))))**(-p)*(a + c*x**S(2))**p*(d + e*x)**(m + S(1))*(-c*x + Rt(-a*c, S(2)))*Hypergeometric2F1(m + S(1), -p, m + S(2), S(2)*c*(d + e*x)*Rt(-a*c, S(2))/((c*d - e*Rt(-a*c, S(2)))*(-c*x + Rt(-a*c, S(2)))))/((m + S(1))*(c*d + e*Rt(-a*c, S(2)))), x) def replacement314(a, b, c, d, e, m, p, x): return Dist(m*(-b*e + S(2)*c*d)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((b + S(2)*c*x)*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement315(a, c, d, e, m, p, x): return -Dist(d*m/(S(2)*a*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1)), x), x) - Simp(x*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(S(2)*a*(p + S(1))), x) def replacement316(a, b, c, d, e, m, p, x): return Dist((-b*e + S(2)*c*d)/(S(2)*a*e**S(2) - S(2)*b*d*e + S(2)*c*d**S(2)), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) + Simp(e*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement317(a, c, d, e, m, p, x): return Dist(c*d/(a*e**S(2) + c*d**S(2)), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1)), x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(1))/((m + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement318(a, b, c, d, e, m, p, x): return -Dist(p/(e*(m + S(1))), Int((b + S(2)*c*x)*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(1))), x) def replacement319(a, c, d, e, m, p, x): return -Dist(S(2)*c*p/(e*(m + S(1))), Int(x*(a + c*x**S(2))**(p + S(-1))*(d + e*x)**(m + S(1)), x), x) + Simp((a + c*x**S(2))**p*(d + e*x)**(m + S(1))/(e*(m + S(1))), x) def replacement320(a, b, c, d, e, m, p, x): return -Dist(p/(e*(m + S(2)*p + S(1))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(-1))*Simp(-S(2)*a*e + b*d + x*(-b*e + S(2)*c*d), x), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(e*(m + S(2)*p + S(1))), x) def replacement321(a, c, d, e, m, p, x): return Dist(S(2)*p/(e*(m + S(2)*p + S(1))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**m*Simp(a*e - c*d*x, x), x), x) + Simp((a + c*x**S(2))**p*(d + e*x)**(m + S(1))/(e*(m + S(2)*p + S(1))), x) def replacement322(a, b, c, d, e, m, p, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*(b*e*m + S(2)*c*d*(S(2)*p + S(3)) + S(2)*c*e*x*(m + S(2)*p + S(3))), x), x) + Simp((b + S(2)*c*x)*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement323(a, c, d, e, m, p, x): return Dist(S(1)/(S(2)*a*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(d*(S(2)*p + S(3)) + e*x*(m + S(2)*p + S(3))), x), x) - Simp(x*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(S(2)*a*(p + S(1))), x) def replacement324(a, b, c, d, e, m, p, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(-2))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(-S(2)*c*d**S(2)*(S(2)*p + S(3)) + e*x*(b*e - S(2)*c*d)*(m + S(2)*p + S(2)) + e*(S(2)*a*e*(m + S(-1)) + b*d*(-m + S(2)*p + S(4))), x), x), x) + Simp((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*(-S(2)*a*e + b*d + x*(-b*e + S(2)*c*d))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement325(a, c, d, e, m, p, x): return Dist(-S(1)/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-2))*Simp(a*e**S(2)*(m + S(-1)) - c*d**S(2)*(S(2)*p + S(3)) - c*d*e*x*(m + S(2)*p + S(2)), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(a*e - c*d*x)/(S(2)*a*c*(p + S(1))), x) def replacement326(a, b, c, d, e, m, p, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*Simp(-S(2)*a*c*e**S(2)*(m + S(2)*p + S(3)) + b**S(2)*e**S(2)*(m + p + S(2)) + b*c*d*e*(-m + S(2)*p + S(2)) - S(2)*c**S(2)*d**S(2)*(S(2)*p + S(3)) - c*e*x*(-b*e + S(2)*c*d)*(m + S(2)*p + S(4)), x), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(S(2)*a*c*e - b**S(2)*e + b*c*d + c*x*(-b*e + S(2)*c*d))/((p + S(1))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement327(a, c, d, e, m, p, x): return Dist(S(1)/(S(2)*a*(p + S(1))*(a*e**S(2) + c*d**S(2))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**m*Simp(a*e**S(2)*(m + S(2)*p + S(3)) + c*d**S(2)*(S(2)*p + S(3)) + c*d*e*x*(m + S(2)*p + S(4)), x), x), x) - Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(1))*(a*e + c*d*x)/(S(2)*a*(p + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement328(a, b, c, d, e, m, p, x): return Dist(S(1)/(c*(m + S(2)*p + S(1))), Int((d + e*x)**(m + S(-2))*(a + b*x + c*x**S(2))**p*Simp(c*d**S(2)*(m + S(2)*p + S(1)) + e*x*(m + p)*(-b*e + S(2)*c*d) - e*(a*e*(m + S(-1)) + b*d*(p + S(1))), x), x), x) + Simp(e*(d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m + S(2)*p + S(1))), x) def replacement329(a, c, d, e, m, p, x): return Dist(S(1)/(c*(m + S(2)*p + S(1))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(-2))*Simp(-a*e**S(2)*(m + S(-1)) + c*d**S(2)*(m + S(2)*p + S(1)) + S(2)*c*d*e*x*(m + p), x), x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))/(c*(m + S(2)*p + S(1))), x) def replacement330(a, b, c, d, e, m, p, x): return Dist(S(1)/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*Simp(-b*e*(m + p + S(2)) + c*d*(m + S(1)) - c*e*x*(m + S(2)*p + S(3)), x), x), x) + Simp(e*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement331(a, c, d, e, m, p, x): return Dist(c/((m + S(1))*(a*e**S(2) + c*d**S(2))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1))*Simp(d*(m + S(1)) - e*x*(m + S(2)*p + S(3)), x), x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(1))/((m + S(1))*(a*e**S(2) + c*d**S(2))), x) def With332(a, b, c, d, e, x): q = Rt(S(3)*c*e**S(2)*(-b*e + S(2)*c*d), S(3)) return -Simp(S(3)*c*e*log(d + e*x)/(S(2)*q**S(2)), x) + Simp(S(3)*c*e*log(-b*e + c*d - c*e*x - q*(a + b*x + c*x**S(2))**(S(1)/3))/(S(2)*q**S(2)), x) - Simp(sqrt(S(3))*c*e*ArcTan(sqrt(S(3))/S(3) + S(2)*sqrt(S(3))*(-b*e + c*d - c*e*x)/(S(3)*q*(a + b*x + c*x**S(2))**(S(1)/3)))/q**S(2), x) def With333(a, c, d, e, x): q = Rt(S(6)*c**S(2)*e**S(2)/d**S(2), S(3)) return -Simp(S(3)*c*e*log(d + e*x)/(S(2)*d**S(2)*q**S(2)), x) + Simp(S(3)*c*e*log(c*d - c*e*x - d*q*(a + c*x**S(2))**(S(1)/3))/(S(2)*d**S(2)*q**S(2)), x) - Simp(sqrt(S(3))*c*e*ArcTan(S(2)*sqrt(S(3))*c*(d - e*x)/(S(3)*d*q*(a + c*x**S(2))**(S(1)/3)) + sqrt(S(3))/S(3))/(d**S(2)*q**S(2)), x) def With334(a, b, c, d, e, x): q = Rt(-S(3)*c*e**S(2)*(-b*e + S(2)*c*d), S(3)) return -Simp(S(3)*c*e*log(d + e*x)/(S(2)*q**S(2)), x) + Simp(S(3)*c*e*log(-b*e + c*d - c*e*x + q*(a + b*x + c*x**S(2))**(S(1)/3))/(S(2)*q**S(2)), x) - Simp(sqrt(S(3))*c*e*ArcTan(sqrt(S(3))/S(3) - S(2)*sqrt(S(3))*(-b*e + c*d - c*e*x)/(S(3)*q*(a + b*x + c*x**S(2))**(S(1)/3)))/q**S(2), x) def With335(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist((b + S(2)*c*x - q)**(S(1)/3)*(b + S(2)*c*x + q)**(S(1)/3)/(a + b*x + c*x**S(2))**(S(1)/3), Int(S(1)/((d + e*x)*(b + S(2)*c*x - q)**(S(1)/3)*(b + S(2)*c*x + q)**(S(1)/3)), x), x) def replacement336(a, c, d, e, x): return Dist(d, Int(S(1)/((a + c*x**S(2))**(S(1)/4)*(d**S(2) - e**S(2)*x**S(2))), x), x) - Dist(e, Int(x/((a + c*x**S(2))**(S(1)/4)*(d**S(2) - e**S(2)*x**S(2))), x), x) def replacement337(a, c, d, e, x): return Dist(d, Int(S(1)/((a + c*x**S(2))**(S(3)/4)*(d**S(2) - e**S(2)*x**S(2))), x), x) - Dist(e, Int(x/((a + c*x**S(2))**(S(3)/4)*(d**S(2) - e**S(2)*x**S(2))), x), x) def replacement338(a, b, c, d, e, p, x): return Dist((-S(4)*c/(-S(4)*a*c + b**S(2)))**(-p), Subst(Int(Simp(-x**S(2)/(-S(4)*a*c + b**S(2)) + S(1), x)**p/Simp(-b*e + S(2)*c*d + e*x, x), x), x, b + S(2)*c*x), x) def replacement339(a, b, c, d, e, p, x): return Dist((-c*(a + b*x + c*x**S(2))/(-S(4)*a*c + b**S(2)))**(-p)*(a + b*x + c*x**S(2))**p, Int((-a*c/(-S(4)*a*c + b**S(2)) - b*c*x/(-S(4)*a*c + b**S(2)) - c**S(2)*x**S(2)/(-S(4)*a*c + b**S(2)))**p/(d + e*x), x), x) def replacement340(a, c, d, e, m, p, x): return Int((d + e*x)**m*(-x*Rt(-c, S(2)) + Rt(a, S(2)))**p*(x*Rt(-c, S(2)) + Rt(a, S(2)))**p, x) def With341(a, b, c, d, e, m, p, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return -Dist((e*(b + S(2)*c*x - q)/(S(2)*c*(d + e*x)))**(-p)*(e*(b + S(2)*c*x + q)/(S(2)*c*(d + e*x)))**(-p)*(a + b*x + c*x**S(2))**p*(S(1)/(d + e*x))**(S(2)*p)/e, Subst(Int(x**(-m - S(2)*p + S(-2))*Simp(-x*(d - e*(b - q)/(S(2)*c)) + S(1), x)**p*Simp(-x*(d - e*(b + q)/(S(2)*c)) + S(1), x)**p, x), x, S(1)/(d + e*x)), x) def With342(a, c, d, e, m, p, x): q = Rt(-a*c, S(2)) return -Dist((e*(c*x + q)/(c*(d + e*x)))**(-p)*(-e*(-c*x + q)/(c*(d + e*x)))**(-p)*(a + c*x**S(2))**p*(S(1)/(d + e*x))**(S(2)*p)/e, Subst(Int(x**(-m - S(2)*p + S(-2))*Simp(-x*(d - e*q/c) + S(1), x)**p*Simp(-x*(d + e*q/c) + S(1), x)**p, x), x, S(1)/(d + e*x)), x) def With343(a, b, c, d, e, m, p, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist((-(d + e*x)/(d - e*(b - q)/(S(2)*c)) + S(1))**(-p)*(-(d + e*x)/(d - e*(b + q)/(S(2)*c)) + S(1))**(-p)*(a + b*x + c*x**S(2))**p/e, Subst(Int(x**m*Simp(-x/(d - e*(b - q)/(S(2)*c)) + S(1), x)**p*Simp(-x/(d - e*(b + q)/(S(2)*c)) + S(1), x)**p, x), x, d + e*x), x) def With344(a, c, d, e, m, p, x): q = Rt(-a*c, S(2)) return Dist((a + c*x**S(2))**p*(-(d + e*x)/(d - e*q/c) + S(1))**(-p)*(-(d + e*x)/(d + e*q/c) + S(1))**(-p)/e, Subst(Int(x**m*Simp(-x/(d - e*q/c) + S(1), x)**p*Simp(-x/(d + e*q/c) + S(1), x)**p, x), x, d + e*x), x) def replacement345(a, b, c, d, e, m, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x, u), x) def replacement346(a, c, d, e, m, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + c*x**S(2))**p*(d + e*x)**m, x), x, u), x) def replacement347(a, c, d, e, n, p, x): return Dist(d, Int(x**n*(a + c*x**S(2))**p, x), x) + Dist(e, Int(x**(n + S(1))*(a + c*x**S(2))**p, x), x) def replacement348(a, b, c, d, e, f, g, m, x): return Dist((f + g*x)/sqrt(a + b*x + c*x**S(2)), Int((d + e*x)**m, x), x) def replacement349(a, b, c, d, e, f, g, m, p, x): return -Simp(f*g*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(b*(p + S(1))*(-d*g + e*f)), x) def replacement350(a, b, c, d, e, f, g, m, p, x): return -Dist(e*g*m/(S(2)*c*(p + S(1))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp(g*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/(S(2)*c*(p + S(1))), x) def replacement351(a, b, c, d, e, f, g, m, p, x): return Dist(e*f*g*(m + S(2)*p + S(3))/(b*(p + S(1))*(-d*g + e*f)), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1)), x), x) - Simp(f*g*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(b*(p + S(1))*(-d*g + e*f)), x) def replacement352(a, b, c, d, e, f, g, m, p, x): return -Dist(g*(S(2)*p + S(1))/(e*(m + S(1))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) + Simp((d + e*x)**(m + S(1))*(f + g*x)*(a + b*x + c*x**S(2))**p/(e*(m + S(1))), x) def replacement353(a, b, c, d, e, f, g, m, p, x): return -Dist(g*(m + S(2)*p + S(3))/((m + S(1))*(-d*g + e*f)), Int((d + e*x)**(m + S(1))*(f + g*x)*(a + b*x + c*x**S(2))**p, x), x) + Simp(S(2)*f*g*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(b*(m + S(1))*(-d*g + e*f)), x) def replacement354(a, b, c, d, e, f, g, m, p, x): return -Dist(b*m*(-d*g + e*f)/(S(2)*c*f*(m + S(2)*p + S(2))), Int((d + e*x)**(m + S(-1))*(f + g*x)*(a + b*x + c*x**S(2))**p, x), x) + Simp(g*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m + S(2)*p + S(2))), x) def replacement355(a, b, c, d, e, f, g, m, p, x): return Dist((S(2)*p + S(1))*(-d*g + e*f)/(e*(m + S(2)*p + S(2))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x) + Simp((d + e*x)**(m + S(1))*(f + g*x)*(a + b*x + c*x**S(2))**p/(e*(m + S(2)*p + S(2))), x) def replacement356(a, b, c, d, e, f, g, p, x): return Dist((-b*g + S(2)*c*f)/(-b*e + S(2)*c*d), Int((a + b*x + c*x**S(2))**p, x), x) - Dist((-d*g + e*f)/(-b*e + S(2)*c*d), Int((b + S(2)*c*x)*(a + b*x + c*x**S(2))**p/(d + e*x), x), x) def replacement357(a, b, c, d, e, f, g, m, p, x): return Dist(g/e, Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) + Dist((-d*g + e*f)/e, Int((d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x) def replacement358(a, b, c, d, e, f, g, m, p, x): return Dist((-b*g + S(2)*c*f)/(-b*e + S(2)*c*d), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) - Dist((-d*g + e*f)/(-b*e + S(2)*c*d), Int((b + S(2)*c*x)*(d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x) def replacement359(a, b, c, d, e, f, g, m, p, x): return Dist((S(2)*c*e*f*(m + S(2)*p + S(2)) - g*(b*e*(m + S(1)) + S(2)*c*d*(S(2)*p + S(1))))/(e*(m + S(1))*(-b*e + S(2)*c*d)), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) - Simp((b + S(2)*c*x)*(d + e*x)**(m + S(1))*(-d*g + e*f)*(a + b*x + c*x**S(2))**p/(e*(m + S(1))*(-b*e + S(2)*c*d)), x) def replacement360(a, b, c, d, e, f, g, m, p, x): return Dist((S(2)*c*e*f*(m + S(2)*p + S(2)) - g*(b*e*(m + S(1)) + S(2)*c*(S(2)*d*p + d)))/(S(2)*c*e*(m + S(2)*p + S(2))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x) + Simp(g*(b + S(2)*c*x)*(d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p/(S(2)*c*e*(m + S(2)*p + S(2))), x) def replacement361(a, b, c, d, e, f, g, m, n, p, x): return Dist(c**(-IntPart(p))*(b/S(2) + c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((b/S(2) + c*x)**(S(2)*p)*(d + e*x)**m*(f + g*x)**n, x), x) def replacement362(a, b, c, d, e, f, g, m, n, p, x): return Int((d + e*x)**(m + p)*(f + g*x)**n*(a/d + c*x/e)**p, x) def replacement363(a, c, d, e, f, g, m, n, p, x): return Int((d + e*x)**(m + p)*(f + g*x)**n*(a/d + c*x/e)**p, x) def replacement364(a, b, c, d, e, f, g, m, n, p, x): return Dist(d**m*e**m, Int((f + g*x)**n*(a*e + c*d*x)**(-m)*(a + b*x + c*x**S(2))**(m + p), x), x) def replacement365(a, c, d, e, f, g, m, n, p, x): return Dist(d**m*e**m, Int((a + c*x**S(2))**(m + p)*(f + g*x)**n*(a*e + c*d*x)**(-m), x), x) def replacement366(a, b, c, d, e, f, g, m, p, x): return Simp(g*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m + S(2)*p + S(2))), x) def replacement367(a, c, d, e, f, g, m, p, x): return Simp(g*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(c*(m + S(2)*p + S(2))), x) def replacement368(a, b, c, d, e, f, g, m, p, x): return -Dist(e*(e*(p + S(1))*(-b*g + S(2)*c*f) + m*(c*e*f + g*(-b*e + c*d)))/(c*(p + S(1))*(-b*e + S(2)*c*d)), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((d + e*x)**m*(c*e*f + g*(-b*e + c*d))*(a + b*x + c*x**S(2))**(p + S(1))/(c*(p + S(1))*(-b*e + S(2)*c*d)), x) def replacement369(a, c, d, e, f, g, m, p, x): return -Dist(e*(S(2)*e*f*(p + S(1)) + m*(d*g + e*f))/(S(2)*c*d*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1)), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**m*(d*g + e*f)/(S(2)*c*d*(p + S(1))), x) def replacement370(a, b, c, d, e, f, g, m, p, x): return -Dist(e*(e*(p + S(1))*(-b*g + S(2)*c*f) + m*(c*e*f + g*(-b*e + c*d)))/(c*(p + S(1))*(-b*e + S(2)*c*d)), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((d + e*x)**m*(c*e*f + g*(-b*e + c*d))*(a + b*x + c*x**S(2))**(p + S(1))/(c*(p + S(1))*(-b*e + S(2)*c*d)), x) def replacement371(a, c, d, e, f, g, m, p, x): return -Dist(e*(S(2)*e*f*(p + S(1)) + m*(d*g + e*f))/(S(2)*c*d*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1)), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**m*(d*g + e*f)/(S(2)*c*d*(p + S(1))), x) def replacement372(a, b, c, d, e, f, g, m, p, x): return Dist((e*(p + S(1))*(-b*g + S(2)*c*f) + m*(c*e*f + g*(-b*e + c*d)))/(e*(-b*e + S(2)*c*d)*(m + p + S(1))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) + Simp((d + e*x)**m*(d*g - e*f)*(a + b*x + c*x**S(2))**(p + S(1))/((-b*e + S(2)*c*d)*(m + p + S(1))), x) def replacement373(a, c, d, e, f, g, m, p, x): return Dist((S(2)*c*e*f*(p + S(1)) + m*(c*d*g + c*e*f))/(S(2)*c*d*e*(m + p + S(1))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1)), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**m*(d*g - e*f)/(S(2)*c*d*(m + p + S(1))), x) def replacement374(a, b, c, d, e, f, g, m, p, x): return Dist((e*(p + S(1))*(-b*g + S(2)*c*f) + m*(c*e*f + g*(-b*e + c*d)))/(c*e*(m + S(2)*p + S(2))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x) + Simp(g*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m + S(2)*p + S(2))), x) def replacement375(a, c, d, e, f, g, m, p, x): return Dist((S(2)*e*f*(p + S(1)) + m*(d*g + e*f))/(e*(m + S(2)*p + S(2))), Int((a + c*x**S(2))**p*(d + e*x)**m, x), x) + Simp(g*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(c*(m + S(2)*p + S(2))), x) def replacement376(a, c, f, g, p, x): return -Dist(S(1)/(S(2)*a*c*(p + S(1))), Int(x*(a + c*x**S(2))**(p + S(1))*Simp(S(2)*a*g - c*f*x*(S(2)*p + S(5)), x), x), x) + Simp(x**S(2)*(a + c*x**S(2))**(p + S(1))*(a*g - c*f*x)/(S(2)*a*c*(p + S(1))), x) def replacement377(a, c, f, g, p, x): return Dist(S(1)/c, Int((a + c*x**S(2))**(p + S(1))*(f + g*x), x), x) - Dist(f**S(2)/c, Int((a + c*x**S(2))**(p + S(1))/(f - g*x), x), x) def replacement378(a, b, c, d, e, f, g, m, n, p, x): return Int((f + g*x)**n*(a/d + c*x/e)**(-m)*(a + b*x + c*x**S(2))**(m + p), x) def replacement379(a, c, d, e, f, g, m, n, p, x): return Dist(a**(-m)*d**(S(2)*m), Int((a + c*x**S(2))**(m + p)*(d - e*x)**(-m)*(f + g*x)**n, x), x) def replacement380(a, b, c, d, e, f, g, n, p, x): return -Dist(S(1)/(d*e*p*(-S(4)*a*c + b**S(2))), Int((f + g*x)**(n + S(-1))*(a + b*x + c*x**S(2))**p*Simp(-S(2)*a*c*(d*g*n - e*f*(S(2)*p + S(1))) + b*(a*e*g*n - c*d*f*(S(2)*p + S(1))) - c*g*x*(-S(2)*a*e + b*d)*(n + S(2)*p + S(1)), x), x), x) - Simp((f + g*x)**n*(a*(-b*e + S(2)*c*d) + c*x*(-S(2)*a*e + b*d))*(a + b*x + c*x**S(2))**p/(d*e*p*(-S(4)*a*c + b**S(2))), x) def replacement381(a, c, d, e, f, g, n, p, x): return -Dist(S(1)/(S(2)*d*e*p), Int((a + c*x**S(2))**p*(f + g*x)**(n + S(-1))*Simp(d*g*n - e*f*(S(2)*p + S(1)) - e*g*x*(n + S(2)*p + S(1)), x), x), x) + Simp((a + c*x**S(2))**p*(d - e*x)*(f + g*x)**n/(S(2)*d*e*p), x) def replacement382(a, b, c, d, e, f, g, n, p, x): return -Dist(S(1)/(d*e*p*(-S(4)*a*c + b**S(2))*(a*g**S(2) - b*f*g + c*f**S(2))), Int((f + g*x)**n*(a + b*x + c*x**S(2))**p*Simp(S(2)*a*c*(a*e*g**S(2)*(n + S(2)*p + S(1)) + c*f*(-d*g*n + S(2)*e*f*p + e*f)) + b**S(2)*g*(-a*e*g*(n + p + S(1)) + c*d*f*p) + b*c*(a*g*(d*g*(n + S(1)) + e*f*(n - S(2)*p)) - c*d*f**S(2)*(S(2)*p + S(1))) + c*g*x*(S(2)*a*c*(d*g + e*f) - b*(a*e*g + c*d*f))*(n + S(2)*p + S(2)), x), x), x) - Simp((f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**p*(a*c*d*(-b*g + S(2)*c*f) - a*e*(S(2)*a*c*g - b**S(2)*g + b*c*f) + c*x*(-a*e*(-b*g + S(2)*c*f) + c*d*(-S(2)*a*g + b*f)))/(d*e*p*(-S(4)*a*c + b**S(2))*(a*g**S(2) - b*f*g + c*f**S(2))), x) def replacement383(a, c, d, e, f, g, n, p, x): return Dist(S(1)/(S(2)*d*e*p*(a*g**S(2) + c*f**S(2))), Int((a + c*x**S(2))**p*(f + g*x)**n*Simp(a*e*g**S(2)*(n + S(2)*p + S(1)) - c*f*(d*g*n - e*(S(2)*f*p + f)) + c*g*x*(d*g + e*f)*(n + S(2)*p + S(2)), x), x), x) + Simp((a + c*x**S(2))**p*(f + g*x)**(n + S(1))*(-a*e*g + c*d*f - c*x*(d*g + e*f))/(S(2)*d*e*p*(a*g**S(2) + c*f**S(2))), x) def replacement384(a, b, c, d, e, f, g, m, n, p, x): return -Simp(e*(d + e*x)**(m + S(-1))*(f + g*x)**n*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m - n + S(-1))), x) def replacement385(a, c, d, e, f, g, m, n, p, x): return -Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(f + g*x)**n/(c*(m - n + S(-1))), x) def replacement386(a, b, c, d, e, f, g, m, n, p, x): return -Simp(e**S(2)*(d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/((n + S(1))*(-b*e*g + c*d*g + c*e*f)), x) def replacement387(a, c, d, e, f, g, m, n, p, x): return -Simp(e**S(2)*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))/(c*(n + S(1))*(d*g + e*f)), x) def replacement388(a, b, c, d, e, f, g, m, n, p, x): return Dist(c*m/(e*g*(n + S(1))), Int((d + e*x)**(m + S(1))*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) + Simp((d + e*x)**m*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**p/(g*(n + S(1))), x) def replacement389(a, c, d, e, f, g, m, n, p, x): return Dist(c*m/(e*g*(n + S(1))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**(m + S(1))*(f + g*x)**(n + S(1)), x), x) + Simp((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**(n + S(1))/(g*(n + S(1))), x) def replacement390(a, b, c, d, e, f, g, m, n, p, x): return -Dist(m*(-b*e*g + c*d*g + c*e*f)/(e**S(2)*g*(m - n + S(-1))), Int((d + e*x)**(m + S(1))*(f + g*x)**n*(a + b*x + c*x**S(2))**(p + S(-1)), x), x) - Simp((d + e*x)**m*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**p/(g*(m - n + S(-1))), x) def replacement391(a, c, d, e, f, g, m, n, p, x): return -Dist(c*m*(d*g + e*f)/(e**S(2)*g*(m - n + S(-1))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**(m + S(1))*(f + g*x)**n, x), x) - Simp((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**(n + S(1))/(g*(m - n + S(-1))), x) def replacement392(a, b, c, d, e, f, g, m, n, p, x): return -Dist(e*g*n/(c*(p + S(1))), Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-1))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp(e*(d + e*x)**(m + S(-1))*(f + g*x)**n*(a + b*x + c*x**S(2))**(p + S(1))/(c*(p + S(1))), x) def replacement393(a, c, d, e, f, g, m, n, p, x): return -Dist(e*g*n/(c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-1)), x), x) + Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(f + g*x)**n/(c*(p + S(1))), x) def replacement394(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(2)*g*(m - n + S(-2))/((p + S(1))*(-b*e*g + c*d*g + c*e*f)), Int((d + e*x)**(m + S(-1))*(f + g*x)**n*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp(e**S(2)*(d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/((p + S(1))*(-b*e*g + c*d*g + c*e*f)), x) def replacement395(a, c, d, e, f, g, m, n, p, x): return Dist(e**S(2)*g*(m - n + S(-2))/(c*(p + S(1))*(d*g + e*f)), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(f + g*x)**n, x), x) + Simp(e**S(2)*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))/(c*(p + S(1))*(d*g + e*f)), x) def replacement396(a, b, c, d, e, f, g, m, n, p, x): return -Dist(n*(-b*e*g + c*d*g + c*e*f)/(c*e*(m - n + S(-1))), Int((d + e*x)**m*(f + g*x)**(n + S(-1))*(a + b*x + c*x**S(2))**p, x), x) - Simp(e*(d + e*x)**(m + S(-1))*(f + g*x)**n*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m - n + S(-1))), x) def replacement397(a, c, d, e, f, g, m, n, p, x): return -Dist(n*(d*g + e*f)/(e*(m - n + S(-1))), Int((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**(n + S(-1)), x), x) - Simp(e*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(f + g*x)**n/(c*(m - n + S(-1))), x) def replacement398(a, b, c, d, e, f, g, m, n, p, x): return -Dist(c*e*(m - n + S(-2))/((n + S(1))*(-b*e*g + c*d*g + c*e*f)), Int((d + e*x)**m*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**p, x), x) - Simp(e**S(2)*(d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/((n + S(1))*(-b*e*g + c*d*g + c*e*f)), x) def replacement399(a, c, d, e, f, g, m, n, p, x): return -Dist(e*(m - n + S(-2))/((n + S(1))*(d*g + e*f)), Int((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**(n + S(1)), x), x) - Simp(e**S(2)*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))/((n + S(1))*(c*d*g + c*e*f)), x) def replacement400(a, b, c, d, e, f, g, x): return Dist(S(2)*e**S(2), Subst(Int(S(1)/(-b*e*g + c*(d*g + e*f) + e**S(2)*g*x**S(2)), x), x, sqrt(a + b*x + c*x**S(2))/sqrt(d + e*x)), x) def replacement401(a, c, d, e, f, g, x): return Dist(S(2)*e**S(2), Subst(Int(S(1)/(c*(d*g + e*f) + e**S(2)*g*x**S(2)), x), x, sqrt(a + c*x**S(2))/sqrt(d + e*x)), x) def replacement402(a, b, c, d, e, f, g, m, n, p, x): return Simp(e**S(2)*(d + e*x)**(m + S(-2))*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*g*(n + p + S(2))), x) def replacement403(a, c, d, e, f, g, m, n, p, x): return Simp(e**S(2)*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-2))*(f + g*x)**(n + S(1))/(c*g*(n + p + S(2))), x) def replacement404(a, b, c, d, e, f, g, m, n, p, x): return -Dist(e*(b*e*g*(n + S(1)) - c*d*g*(S(2)*n + p + S(3)) + c*e*f*(p + S(1)))/(g*(n + S(1))*(-b*e*g + c*d*g + c*e*f)), Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**p, x), x) + Simp(e**S(2)*(d + e*x)**(m + S(-2))*(f + g*x)**(n + S(1))*(-d*g + e*f)*(a + b*x + c*x**S(2))**(p + S(1))/(g*(n + S(1))*(-b*e*g + c*d*g + c*e*f)), x) def replacement405(a, c, d, e, f, g, m, n, p, x): return -Dist(e*(-d*g*(S(2)*n + p + S(3)) + e*f*(p + S(1)))/(g*(n + S(1))*(d*g + e*f)), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1)), x), x) + Simp(e**S(2)*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-2))*(f + g*x)**(n + S(1))*(-d*g + e*f)/(c*g*(n + S(1))*(d*g + e*f)), x) def replacement406(a, b, c, d, e, f, g, m, n, p, x): return -Dist((b*e*g*(n + S(1)) - c*d*g*(S(2)*n + p + S(3)) + c*e*f*(p + S(1)))/(c*g*(n + p + S(2))), Int((d + e*x)**(m + S(-1))*(f + g*x)**n*(a + b*x + c*x**S(2))**p, x), x) + Simp(e**S(2)*(d + e*x)**(m + S(-2))*(f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*g*(n + p + S(2))), x) def replacement407(a, c, d, e, f, g, m, n, p, x): return -Dist((-d*g*(S(2)*n + p + S(3)) + e*f*(p + S(1)))/(g*(n + p + S(2))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(-1))*(f + g*x)**n, x), x) + Simp(e**S(2)*(a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-2))*(f + g*x)**(n + S(1))/(c*g*(n + p + S(2))), x) def replacement408(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)**n*(a + b*x + c*x**S(2))**p, x), x) def replacement409(a, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand(S(1)/sqrt(a + c*x**S(2)), (a + c*x**S(2))**(p + S(1)/2)*(d + e*x)**m*(f + g*x)**n, x), x) def replacement410(a, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**n, x), x) def replacement411(a, b, c, d, e, p, x): return -Dist(e**(S(-2)), Int((d - e*x)*(a + b*x + c*x**S(2))**p, x), x) + Dist(d**S(2)/e**S(2), Int((a + b*x + c*x**S(2))**p/(d + e*x), x), x) def replacement412(a, c, d, e, p, x): return -Dist(e**(S(-2)), Int((a + c*x**S(2))**p*(d - e*x), x), x) + Dist(d**S(2)/e**S(2), Int((a + c*x**S(2))**p/(d + e*x), x), x) def replacement413(a, b, c, d, e, f, g, m, p, x): return -Dist(S(1)/(c*e**S(2)*(m + S(2)*p + S(3))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**p*Simp(b*e*g*(d*g + e*f*(m + p + S(1))) - c*(d**S(2)*g**S(2) + d*e*f*g*m + e**S(2)*f**S(2)*(m + S(2)*p + S(3))) + e*g*x*(b*e*g*(m + p + S(2)) - c*(d*g*m + e*f*(m + S(2)*p + S(4)))), x), x), x) + Simp(g*(d + e*x)**m*(f + g*x)*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m + S(2)*p + S(3))), x) def replacement414(a, c, d, e, f, g, m, p, x): return -Dist(S(1)/(c*e**S(2)*(m + S(2)*p + S(3))), Int((a + c*x**S(2))**p*(d + e*x)**m*Simp(-c*e*g*x*(d*g*m + e*f*(m + S(2)*p + S(4))) - c*(d**S(2)*g**S(2) + d*e*f*g*m + e**S(2)*f**S(2)*(m + S(2)*p + S(3))), x), x), x) + Simp(g*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m*(f + g*x)/(c*(m + S(2)*p + S(3))), x) def replacement415(b, c, e, f, g, m, n, p, x): return Dist(x**(-m - p)*(e*x)**m*(b + c*x)**(-p)*(b*x + c*x**S(2))**p, Int(x**(m + p)*(b + c*x)**p*(f + g*x)**n, x), x) def replacement416(a, c, d, e, f, g, m, n, p, x): return Int((d + e*x)**(m + p)*(f + g*x)**n*(a/d + c*x/e)**p, x) def replacement417(a, b, c, d, e, f, g, m, n, p, x): return Dist((d + e*x)**(-FracPart(p))*(a/d + c*x/e)**(-FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((d + e*x)**(m + p)*(f + g*x)**n*(a/d + c*x/e)**p, x), x) def replacement418(a, c, d, e, f, g, m, n, p, x): return Dist((a + c*x**S(2))**FracPart(p)*(d + e*x)**(-FracPart(p))*(a/d + c*x/e)**(-FracPart(p)), Int((d + e*x)**(m + p)*(f + g*x)**n*(a/d + c*x/e)**p, x), x) def replacement419(a, b, c, d, e, f, g, m, p, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)*(a + b*x + c*x**S(2))**p, x), x) def replacement420(a, c, d, e, f, g, m, p, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x), x), x) def replacement421(a, b, c, d, e, f, g, x): return Dist(e*(-d*g + e*f)/(a*e**S(2) - b*d*e + c*d**S(2)), Int(S(1)/(d + e*x), x), x) + Dist(S(1)/(a*e**S(2) - b*d*e + c*d**S(2)), Int(Simp(a*e*g - b*e*f + c*d*f - c*x*(-d*g + e*f), x)/(a + b*x + c*x**S(2)), x), x) def replacement422(a, c, d, e, f, g, x): return Dist(e*(-d*g + e*f)/(a*e**S(2) + c*d**S(2)), Int(S(1)/(d + e*x), x), x) + Dist(S(1)/(a*e**S(2) + c*d**S(2)), Int(Simp(a*e*g + c*d*f - c*x*(-d*g + e*f), x)/(a + c*x**S(2)), x), x) def replacement423(a, b, c, d, e, f, g, m, p, x): return -Simp((d + e*x)**(m + S(1))*(-d*g + e*f)*(a + b*x + c*x**S(2))**(p + S(1))/(S(2)*(p + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement424(a, c, d, e, f, g, m, p, x): return -Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(1))*(-d*g + e*f)/(S(2)*(p + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement425(a, b, c, d, e, f, g, m, p, x): return -Dist(m*(-S(2)*a*e*g + b*(d*g + e*f) - S(2)*c*d*f)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1)), x), x) + Simp((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*(-S(2)*a*g + b*f + x*(-b*g + S(2)*c*f))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement426(a, c, d, e, f, g, m, p, x): return -Dist(m*(a*e*g + c*d*f)/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1)), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**m*(a*g - c*f*x)/(S(2)*a*c*(p + S(1))), x) def replacement427(a, b, c, d, e, f, g, m, p, x): return -Dist((-S(2)*a*e*g + b*(d*g + e*f) - S(2)*c*d*f)/(S(2)*a*e**S(2) - S(2)*b*d*e + S(2)*c*d**S(2)), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) - Simp((d + e*x)**(m + S(1))*(-d*g + e*f)*(a + b*x + c*x**S(2))**(p + S(1))/(S(2)*(p + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement428(a, c, d, e, f, g, m, p, x): return Dist((a*e*g + c*d*f)/(a*e**S(2) + c*d**S(2)), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1)), x), x) - Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(1))*(-d*g + e*f)/(S(2)*(p + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement429(a, b, c, d, e, f, g, p, x): return -Simp((a + b*x + c*x**S(2))**(p + S(1))*(b*e*g*(p + S(2)) - S(2)*c*e*g*x*(p + S(1)) - c*(S(2)*p + S(3))*(d*g + e*f))/(S(2)*c**S(2)*(p + S(1))*(S(2)*p + S(3))), x) def replacement430(a, c, d, e, f, g, p, x): return Simp((a + c*x**S(2))**(p + S(1))*(S(2)*e*g*x*(p + S(1)) + (S(2)*p + S(3))*(d*g + e*f))/(S(2)*c*(p + S(1))*(S(2)*p + S(3))), x) def replacement431(a, b, c, d, e, f, g, p, x): return -Dist((-S(2)*a*c*e*g + b**S(2)*e*g*(p + S(2)) + c*(S(2)*p + S(3))*(-b*(d*g + e*f) + S(2)*c*d*f))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1)), x), x) - Simp((a + b*x + c*x**S(2))**(p + S(1))*(S(2)*a*c*(d*g + e*f) - b*(a*e*g + c*d*f) - x*(b**S(2)*e*g - b*c*(d*g + e*f) + S(2)*c*(-a*e*g + c*d*f)))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement432(a, c, d, e, f, g, p, x): return -Dist((a*e*g - c*d*f*(S(2)*p + S(3)))/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1)), x), x) - Simp((a + c*x**S(2))**(p + S(1))*(-a*(d*g + e*(f + g*x)) + c*d*f*x)/(S(2)*a*c*(p + S(1))), x) def replacement433(a, b, c, d, e, f, g, p, x): return Dist((-S(2)*a*c*e*g + b**S(2)*e*g*(p + S(2)) + c*(S(2)*p + S(3))*(-b*(d*g + e*f) + S(2)*c*d*f))/(S(2)*c**S(2)*(S(2)*p + S(3))), Int((a + b*x + c*x**S(2))**p, x), x) - Simp((a + b*x + c*x**S(2))**(p + S(1))*(b*e*g*(p + S(2)) - S(2)*c*e*g*x*(p + S(1)) - c*(S(2)*p + S(3))*(d*g + e*f))/(S(2)*c**S(2)*(p + S(1))*(S(2)*p + S(3))), x) def replacement434(a, c, d, e, f, g, p, x): return -Dist((a*e*g - c*d*f*(S(2)*p + S(3)))/(c*(S(2)*p + S(3))), Int((a + c*x**S(2))**p, x), x) + Simp((a + c*x**S(2))**(p + S(1))*(S(2)*e*g*x*(p + S(1)) + (S(2)*p + S(3))*(d*g + e*f))/(S(2)*c*(p + S(1))*(S(2)*p + S(3))), x) def replacement435(a, c, e, f, g, m, p, x): return Dist(f, Int((e*x)**m*(a + c*x**S(2))**p, x), x) + Dist(g/e, Int((e*x)**(m + S(1))*(a + c*x**S(2))**p, x), x) def replacement436(a, b, c, d, e, f, g, m, p, x): return Dist((d + e*x)**FracPart(p)*(a*d + c*e*x**S(3))**(-FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((f + g*x)*(a*d + c*e*x**S(3))**p, x), x) def replacement437(a, b, c, d, e, f, g, m, p, x): return -Dist(p/(e**S(2)*(m + S(1))*(m + S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), Int((d + e*x)**(m + S(2))*(a + b*x + c*x**S(2))**(p + S(-1))*Simp(S(2)*a*c*e*(m + S(2))*(-d*g + e*f) + b**S(2)*e*(d*g*(p + S(1)) - e*f*(m + p + S(2))) + b*(a*e**S(2)*g*(m + S(1)) - c*d*(d*g*(S(2)*p + S(1)) - e*f*(m + S(2)*p + S(2)))) - c*x*(S(2)*c*d*(d*g*(S(2)*p + S(1)) - e*f*(m + S(2)*p + S(2))) - e*(S(2)*a*e*g*(m + S(1)) - b*(d*g*(m - S(2)*p) + e*f*(m + S(2)*p + S(2))))), x), x), x) - Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*(-d*p*(-b*e + S(2)*c*d)*(-d*g + e*f) - e*x*(g*(m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2)) + p*(-b*e + S(2)*c*d)*(-d*g + e*f)) + (d*g - e*f*(m + S(2)))*(a*e**S(2) - b*d*e + c*d**S(2)))/(e**S(2)*(m + S(1))*(m + S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement438(a, c, d, e, f, g, m, p, x): return -Dist(p/(e**S(2)*(m + S(1))*(m + S(2))*(a*e**S(2) + c*d**S(2))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**(m + S(2))*Simp(S(2)*a*c*e*(m + S(2))*(-d*g + e*f) - c*x*(-S(2)*a*e**S(2)*g*(m + S(1)) + S(2)*c*d*(d*g*(S(2)*p + S(1)) - e*f*(m + S(2)*p + S(2)))), x), x), x) - Simp((a + c*x**S(2))**p*(d + e*x)**(m + S(1))*(-S(2)*c*d**S(2)*p*(-d*g + e*f) - e*x*(S(2)*c*d*p*(-d*g + e*f) + g*(m + S(1))*(a*e**S(2) + c*d**S(2))) + (a*e**S(2) + c*d**S(2))*(d*g - e*f*(m + S(2))))/(e**S(2)*(m + S(1))*(m + S(2))*(a*e**S(2) + c*d**S(2))), x) def replacement439(a, b, c, d, e, f, g, m, p, x): return Dist(p/(e**S(2)*(m + S(1))*(m + S(2)*p + S(2))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(-1))*Simp(-b*e*f*(m + S(2)*p + S(2)) + g*(S(2)*a*e*m + S(2)*a*e + S(2)*b*d*p + b*d) + x*(-S(2)*c*e*f*(m + S(2)*p + S(2)) + g*(b*e*m + b*e + S(4)*c*d*p + S(2)*c*d)), x), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*(-d*g*(S(2)*p + S(1)) + e*f*(m + S(2)*p + S(2)) + e*g*x*(m + S(1)))/(e**S(2)*(m + S(1))*(m + S(2)*p + S(2))), x) def replacement440(a, c, d, e, f, g, m, p, x): return Dist(p/(e**S(2)*(m + S(1))*(m + S(2)*p + S(2))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**(m + S(1))*Simp(g*(S(2)*a*e*m + S(2)*a*e) + x*(-S(2)*c*e*f*(m + S(2)*p + S(2)) + g*(S(4)*c*d*p + S(2)*c*d)), x), x), x) + Simp((a + c*x**S(2))**p*(d + e*x)**(m + S(1))*(-d*g*(S(2)*p + S(1)) + e*f*(m + S(2)*p + S(2)) + e*g*x*(m + S(1)))/(e**S(2)*(m + S(1))*(m + S(2)*p + S(2))), x) def replacement441(a, b, c, d, e, f, g, m, p, x): return -Dist(p/(c*e**S(2)*(m + S(2)*p + S(1))*(m + S(2)*p + S(2))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(-1))*Simp(c*e*f*(-S(2)*a*e + b*d)*(m + S(2)*p + S(2)) + g*(a*e*(b*e*m + b*e - S(2)*c*d*m) + b*d*(b*e*p - S(2)*c*d*p - c*d)) + x*(c*e*f*(-b*e + S(2)*c*d)*(m + S(2)*p + S(2)) + g*(b**S(2)*e**S(2)*(m + p + S(1)) - S(2)*c**S(2)*d**S(2)*(S(2)*p + S(1)) - c*e*(S(2)*a*e*(m + S(2)*p + S(1)) + b*d*(m - S(2)*p)))), x), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*(c*e*f*(m + S(2)*p + S(2)) + c*e*g*x*(m + S(2)*p + S(1)) - g*(-b*e*p + S(2)*c*d*p + c*d))/(c*e**S(2)*(m + S(2)*p + S(1))*(m + S(2)*p + S(2))), x) def replacement442(a, c, d, e, f, g, m, p, x): return Dist(S(2)*p/(c*e**S(2)*(m + S(2)*p + S(1))*(m + S(2)*p + S(2))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x)**m*Simp(a*c*d*e*g*m + a*c*e**S(2)*f*(m + S(2)*p + S(2)) - x*(c**S(2)*d*e*f*(m + S(2)*p + S(2)) - g*(a*c*e**S(2)*(m + S(2)*p + S(1)) + c**S(2)*d**S(2)*(S(2)*p + S(1)))), x), x), x) + Simp((a + c*x**S(2))**p*(d + e*x)**(m + S(1))*(-c*d*g*(S(2)*p + S(1)) + c*e*f*(m + S(2)*p + S(2)) + c*e*g*x*(m + S(2)*p + S(1)))/(c*e**S(2)*(m + S(2)*p + S(1))*(m + S(2)*p + S(2))), x) def replacement443(a, b, c, d, e, f, g, m, p, x): return -Dist(S(1)/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(-2))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(b*e*g*(a*e*(m + S(-1)) + b*d*(p + S(2))) + S(2)*c**S(2)*d**S(2)*f*(S(2)*p + S(3)) - c*(S(2)*a*e*(d*g*m + e*f*(m + S(-1))) + b*d*(d*g*(S(2)*p + S(3)) - e*f*(m - S(2)*p + S(-4)))) + e*x*(b**S(2)*e*g*(m + p + S(1)) + S(2)*c**S(2)*d*f*(m + S(2)*p + S(2)) - c*(S(2)*a*e*g*m + b*(d*g + e*f)*(m + S(2)*p + S(2)))), x), x), x) - Simp((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*(S(2)*a*c*(d*g + e*f) - b*(a*e*g + c*d*f) - x*(b**S(2)*e*g + S(2)*c**S(2)*d*f - c*(S(2)*a*e*g + b*d*g + b*e*f)))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement444(a, c, d, e, f, g, m, p, x): return -Dist(S(1)/(S(4)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-2))*Simp(S(2)*a*e*(d*g*m + e*f*(m + S(-1))) - S(2)*c*d**S(2)*f*(S(2)*p + S(3)) + e*x*(S(2)*a*e*g*m - S(2)*c*d*f*(m + S(2)*p + S(2))), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*(S(2)*a*(d*g + e*f) - x*(-S(2)*a*e*g + S(2)*c*d*f))/(S(4)*a*c*(p + S(1))), x) def replacement445(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(-e*x*(-b*g + S(2)*c*f)*(m + S(2)*p + S(3)) - f*(b*e*m + S(2)*c*d*(S(2)*p + S(3))) + g*(S(2)*a*e*m + b*d*(S(2)*p + S(3))), x), x), x) + Simp((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*(-S(2)*a*g + b*f + x*(-b*g + S(2)*c*f))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement446(a, c, d, e, f, g, m, p, x): return -Dist(S(1)/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(-1))*Simp(a*e*g*m - c*d*f*(S(2)*p + S(3)) - c*e*f*x*(m + S(2)*p + S(3)), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**m*(a*g - c*f*x)/(S(2)*a*c*(p + S(1))), x) def replacement447(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), Int((d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*Simp(c*e*x*(-f*(-b*e + S(2)*c*d) + g*(-S(2)*a*e + b*d))*(m + S(2)*p + S(4)) + f*(-S(2)*a*c*e**S(2)*(m + S(2)*p + S(3)) + b**S(2)*e**S(2)*(m + p + S(2)) + b*c*d*e*(-m + S(2)*p + S(2)) - S(2)*c**S(2)*d**S(2)*(S(2)*p + S(3))) - g*(a*e*(b*e*m + b*e - S(2)*c*d*m) - b*d*(-b*e*p - b*e + S(2)*c*d*p + S(3)*c*d)), x), x), x) + Simp((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(-a*g*(-b*e + S(2)*c*d) + c*x*(f*(-b*e + S(2)*c*d) - g*(-S(2)*a*e + b*d)) + f*(S(2)*a*c*e - b**S(2)*e + b*c*d))/((p + S(1))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement448(a, c, d, e, f, g, m, p, x): return Dist(S(1)/(S(2)*a*c*(p + S(1))*(a*e**S(2) + c*d**S(2))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x)**m*Simp(-a*c*d*e*g*m + c*e*x*(a*e*g + c*d*f)*(m + S(2)*p + S(4)) + f*(a*c*e**S(2)*(m + S(2)*p + S(3)) + c**S(2)*d**S(2)*(S(2)*p + S(3))), x), x), x) - Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(1))*(-a*c*d*g + a*c*e*f + c*x*(a*e*g + c*d*f))/(S(2)*a*c*(p + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement449(a, b, c, d, e, f, g, m, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)/(a + b*x + c*x**S(2)), x), x) def replacement450(a, c, d, e, f, g, m, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)/(a + c*x**S(2)), x), x) def replacement451(a, b, c, d, e, f, g, m, x): return Dist(S(1)/c, Int((d + e*x)**(m + S(-1))*Simp(-a*e*g + c*d*f + x*(-b*e*g + c*d*g + c*e*f), x)/(a + b*x + c*x**S(2)), x), x) + Simp(g*(d + e*x)**m/(c*m), x) def replacement452(a, c, d, e, f, g, m, x): return Dist(S(1)/c, Int((d + e*x)**(m + S(-1))*Simp(-a*e*g + c*d*f + x*(c*d*g + c*e*f), x)/(a + c*x**S(2)), x), x) + Simp(g*(d + e*x)**m/(c*m), x) def replacement453(a, b, c, d, e, f, g, x): return Dist(S(2), Subst(Int((-d*g + e*f + g*x**S(2))/(a*e**S(2) - b*d*e + c*d**S(2) + c*x**S(4) - x**S(2)*(-b*e + S(2)*c*d)), x), x, sqrt(d + e*x)), x) def replacement454(a, c, d, e, f, g, x): return Dist(S(2), Subst(Int((-d*g + e*f + g*x**S(2))/(a*e**S(2) + c*d**S(2) - S(2)*c*d*x**S(2) + c*x**S(4)), x), x, sqrt(d + e*x)), x) def replacement455(a, b, c, d, e, f, g, m, x): return Dist(S(1)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((d + e*x)**(m + S(1))*Simp(a*e*g - b*e*f + c*d*f - c*x*(-d*g + e*f), x)/(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*(-d*g + e*f)/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement456(a, c, d, e, f, g, m, x): return Dist(S(1)/(a*e**S(2) + c*d**S(2)), Int((d + e*x)**(m + S(1))*Simp(a*e*g + c*d*f - c*x*(-d*g + e*f), x)/(a + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*(-d*g + e*f)/((m + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement457(a, b, c, d, e, f, g, m, x): return Int(ExpandIntegrand((d + e*x)**m, (f + g*x)/(a + b*x + c*x**S(2)), x), x) def replacement458(a, c, d, e, f, g, m, x): return Int(ExpandIntegrand((d + e*x)**m, (f + g*x)/(a + c*x**S(2)), x), x) def replacement459(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/(c*(m + S(2)*p + S(2))), Int((d + e*x)**(m + S(-1))*(a + b*x + c*x**S(2))**p*Simp(d*(p + S(1))*(-b*g + S(2)*c*f) + m*(-a*e*g + c*d*f) + x*(e*(p + S(1))*(-b*g + S(2)*c*f) + m*(-b*e*g + c*d*g + c*e*f)), x), x), x) + Simp(g*(d + e*x)**m*(a + b*x + c*x**S(2))**(p + S(1))/(c*(m + S(2)*p + S(2))), x) def replacement460(a, c, d, e, f, g, m, p, x): return Dist(S(1)/(c*(m + S(2)*p + S(2))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(-1))*Simp(-a*e*g*m + c*d*f*(m + S(2)*p + S(2)) + c*x*(d*g*m + e*f*(m + S(2)*p + S(2))), x), x), x) + Simp(g*(a + c*x**S(2))**(p + S(1))*(d + e*x)**m/(c*(m + S(2)*p + S(2))), x) def replacement461(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*Simp(b*(p + S(1))*(d*g - e*f) - c*x*(-d*g + e*f)*(m + S(2)*p + S(3)) + (m + S(1))*(a*e*g - b*e*f + c*d*f), x), x), x) + Simp((d + e*x)**(m + S(1))*(-d*g + e*f)*(a + b*x + c*x**S(2))**(p + S(1))/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement462(a, c, d, e, f, g, m, p, x): return Dist(S(1)/((m + S(1))*(a*e**S(2) + c*d**S(2))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1))*Simp(-c*x*(-d*g + e*f)*(m + S(2)*p + S(3)) + (m + S(1))*(a*e*g + c*d*f), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(1))*(-d*g + e*f)/((m + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement463(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*Simp(b*(p + S(1))*(d*g - e*f) - c*x*(-d*g + e*f)*(m + S(2)*p + S(3)) + (m + S(1))*(a*e*g - b*e*f + c*d*f), x), x), x) + Simp((d + e*x)**(m + S(1))*(-d*g + e*f)*(a + b*x + c*x**S(2))**(p + S(1))/((m + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement464(a, c, d, e, f, g, m, p, x): return Dist(S(1)/((m + S(1))*(a*e**S(2) + c*d**S(2))), Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1))*Simp(-c*x*(-d*g + e*f)*(m + S(2)*p + S(3)) + (m + S(1))*(a*e*g + c*d*f), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(d + e*x)**(m + S(1))*(-d*g + e*f)/((m + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement465(a, b, c, d, e, f, g, x): return Dist(S(4)*f*(a - d)/(-a*e + b*d), Subst(Int(S(1)/(S(4)*a - S(4)*d - x**S(2)), x), x, (S(2)*a - S(2)*d + x*(b - e))/sqrt(a + b*x + c*x**S(2))), x) def replacement466(a, b, c, f, g, x): return Dist(S(2), Subst(Int((f + g*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, sqrt(x)), x) def replacement467(a, c, f, g, x): return Dist(S(2), Subst(Int((f + g*x**S(2))/sqrt(a + c*x**S(4)), x), x, sqrt(x)), x) def replacement468(a, b, c, e, f, g, x): return Dist(sqrt(x)/sqrt(e*x), Int((f + g*x)/(sqrt(x)*sqrt(a + b*x + c*x**S(2))), x), x) def replacement469(a, c, e, f, g, x): return Dist(sqrt(x)/sqrt(e*x), Int((f + g*x)/(sqrt(x)*sqrt(a + c*x**S(2))), x), x) def replacement470(a, b, c, d, e, f, g, m, p, x): return Dist(g/e, Int((d + e*x)**(m + S(1))*(a + b*x + c*x**S(2))**p, x), x) + Dist((-d*g + e*f)/e, Int((d + e*x)**m*(a + b*x + c*x**S(2))**p, x), x) def replacement471(a, c, d, e, f, g, m, p, x): return Dist(g/e, Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1)), x), x) + Dist((-d*g + e*f)/e, Int((a + c*x**S(2))**p*(d + e*x)**m, x), x) def replacement472(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)**n*(a + b*x + c*x**S(2))**p, x), x) def replacement473(a, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**n, x), x) def replacement474(a, b, c, d, e, f, g, p, x): return -Dist(S(1)/(e*(-d*g + e*f)), Int((a + b*x + c*x**S(2))**(p + S(-1))*Simp(a*e*g - b*e*f + c*d*f - c*x*(-d*g + e*f), x)/(f + g*x), x), x) + Dist((a*e**S(2) - b*d*e + c*d**S(2))/(e*(-d*g + e*f)), Int((a + b*x + c*x**S(2))**(p + S(-1))/(d + e*x), x), x) def replacement475(a, c, d, e, f, g, p, x): return -Dist(S(1)/(e*(-d*g + e*f)), Int((a + c*x**S(2))**(p + S(-1))*Simp(a*e*g + c*d*f - c*x*(-d*g + e*f), x)/(f + g*x), x), x) + Dist((a*e**S(2) + c*d**S(2))/(e*(-d*g + e*f)), Int((a + c*x**S(2))**(p + S(-1))/(d + e*x), x), x) def With476(a, b, c, d, e, f, g, m, n, p, x): q = Denominator(m) return Dist(q/e, Subst(Int(x**(q*(m + S(1)) + S(-1))*(g*x**q/e + (-d*g + e*f)/e)**n*(c*x**(S(2)*q)/e**S(2) - x**q*(-b*e + S(2)*c*d)/e**S(2) + (a*e**S(2) - b*d*e + c*d**S(2))/e**S(2))**p, x), x, (d + e*x)**(S(1)/q)), x) def With477(a, c, d, e, f, g, m, n, p, x): q = Denominator(m) return Dist(q/e, Subst(Int(x**(q*(m + S(1)) + S(-1))*(g*x**q/e + (-d*g + e*f)/e)**n*(-S(2)*c*d*x**q/e**S(2) + c*x**(S(2)*q)/e**S(2) + (a*e**S(2) + c*d**S(2))/e**S(2))**p, x), x, (d + e*x)**(S(1)/q)), x) def replacement478(a, b, c, d, e, f, g, m, n, p, x): return Int((d*f + e*g*x**S(2))**m*(a + b*x + c*x**S(2))**p, x) def replacement479(a, c, d, e, f, g, m, n, p, x): return Int((a + c*x**S(2))**p*(d*f + e*g*x**S(2))**m, x) def replacement480(a, b, c, d, e, f, g, m, n, p, x): return Dist((d + e*x)**FracPart(m)*(f + g*x)**FracPart(m)*(d*f + e*g*x**S(2))**(-FracPart(m)), Int((d*f + e*g*x**S(2))**m*(a + b*x + c*x**S(2))**p, x), x) def replacement481(a, c, d, e, f, g, m, n, p, x): return Dist((d + e*x)**FracPart(m)*(f + g*x)**FracPart(m)*(d*f + e*g*x**S(2))**(-FracPart(m)), Int((a + c*x**S(2))**p*(d*f + e*g*x**S(2))**m, x), x) def replacement482(a, b, c, d, e, f, g, m, n, x): return Dist(c, Int(x**S(2)*(d + e*x)**m*(f + g*x)**n, x), x) + Int((a + b*x)*(d + e*x)**m*(f + g*x)**n, x) def replacement483(a, c, d, e, f, g, m, n, x): return Dist(a, Int((d + e*x)**m*(f + g*x)**n, x), x) + Dist(c, Int(x**S(2)*(d + e*x)**m*(f + g*x)**n, x), x) def replacement484(a, b, c, d, e, f, g, m, n, x): return Dist(c**(S(-2)), Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-2))*Simp(a*b*e*g**S(2) - a*c*d*g**S(2) - S(2)*a*c*e*f*g + c**S(2)*d*f**S(2) + x*(-a*c*e*g**S(2) + b**S(2)*e*g**S(2) - b*c*d*g**S(2) - S(2)*b*c*e*f*g + S(2)*c**S(2)*d*f*g + c**S(2)*e*f**S(2)), x)/(a + b*x + c*x**S(2)), x), x) + Dist(g/c**S(2), Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-2))*Simp(-b*e*g + c*d*g + S(2)*c*e*f + c*e*g*x, x), x), x) def replacement485(a, c, d, e, f, g, m, n, x): return Dist(S(1)/c, Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-2))*Simp(-a*d*g**S(2) - S(2)*a*e*f*g + c*d*f**S(2) + x*(-a*e*g**S(2) + S(2)*c*d*f*g + c*e*f**S(2)), x)/(a + c*x**S(2)), x), x) + Dist(g/c, Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-2))*Simp(d*g + S(2)*e*f + e*g*x, x), x), x) def replacement486(a, b, c, d, e, f, g, m, n, x): return Dist(S(1)/c, Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-1))*Simp(-a*e*g + c*d*f + x*(-b*e*g + c*d*g + c*e*f), x)/(a + b*x + c*x**S(2)), x), x) + Dist(e*g/c, Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-1)), x), x) def replacement487(a, c, d, e, f, g, m, n, x): return Dist(S(1)/c, Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-1))*Simp(-a*e*g + c*d*f + x*(c*d*g + c*e*f), x)/(a + c*x**S(2)), x), x) + Dist(e*g/c, Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(-1)), x), x) def replacement488(a, b, c, d, e, f, g, m, n, x): return -Dist(g*(-d*g + e*f)/(a*g**S(2) - b*f*g + c*f**S(2)), Int((d + e*x)**(m + S(-1))*(f + g*x)**n, x), x) + Dist(S(1)/(a*g**S(2) - b*f*g + c*f**S(2)), Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))*Simp(a*e*g - b*d*g + c*d*f + c*x*(-d*g + e*f), x)/(a + b*x + c*x**S(2)), x), x) def replacement489(a, c, d, e, f, g, m, n, x): return -Dist(g*(-d*g + e*f)/(a*g**S(2) + c*f**S(2)), Int((d + e*x)**(m + S(-1))*(f + g*x)**n, x), x) + Dist(S(1)/(a*g**S(2) + c*f**S(2)), Int((d + e*x)**(m + S(-1))*(f + g*x)**(n + S(1))*Simp(a*e*g + c*d*f + c*x*(-d*g + e*f), x)/(a + c*x**S(2)), x), x) def replacement490(a, b, c, d, e, f, g, m, x): return Int(ExpandIntegrand(S(1)/(sqrt(d + e*x)*sqrt(f + g*x)), (d + e*x)**(m + S(1)/2)/(a + b*x + c*x**S(2)), x), x) def replacement491(a, c, d, e, f, g, m, x): return Int(ExpandIntegrand(S(1)/(sqrt(d + e*x)*sqrt(f + g*x)), (d + e*x)**(m + S(1)/2)/(a + c*x**S(2)), x), x) def replacement492(a, b, c, d, e, f, g, m, n, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)**n, S(1)/(a + b*x + c*x**S(2)), x), x) def replacement493(a, c, d, e, f, g, m, n, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)**n, S(1)/(a + c*x**S(2)), x), x) def replacement494(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)**n*(a + b*x + c*x**S(2))**p, x), x) def replacement495(a, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**n, x), x) def replacement496(a, b, c, d, e, g, m, n, p, x): return Dist((d + e*x)**FracPart(p)*(a*d + c*e*x**S(3))**(-FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((g*x)**n*(a*d + c*e*x**S(3))**p, x), x) def replacement497(a, b, c, d, e, f, g, n, p, x): return -Dist(S(1)/(e*(-d*g + e*f)), Int((f + g*x)**n*(a + b*x + c*x**S(2))**(p + S(-1))*(a*e*g - b*e*f + c*d*f - c*x*(-d*g + e*f)), x), x) + Dist((a*e**S(2) - b*d*e + c*d**S(2))/(e*(-d*g + e*f)), Int((f + g*x)**(n + S(1))*(a + b*x + c*x**S(2))**(p + S(-1))/(d + e*x), x), x) def replacement498(a, c, d, e, f, g, n, p, x): return -Dist(S(1)/(e*(-d*g + e*f)), Int((a + c*x**S(2))**(p + S(-1))*(f + g*x)**n*(a*e*g + c*d*f - c*x*(-d*g + e*f)), x), x) + Dist((a*e**S(2) + c*d**S(2))/(e*(-d*g + e*f)), Int((a + c*x**S(2))**(p + S(-1))*(f + g*x)**(n + S(1))/(d + e*x), x), x) def replacement499(a, b, c, d, e, f, g, n, p, x): return Dist(e*(-d*g + e*f)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f + g*x)**(n + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))/(d + e*x), x), x) + Dist(S(1)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f + g*x)**(n + S(-1))*(a + b*x + c*x**S(2))**p*(a*e*g - b*e*f + c*d*f - c*x*(-d*g + e*f)), x), x) def replacement500(a, c, d, e, f, g, n, p, x): return Dist(e*(-d*g + e*f)/(a*e**S(2) + c*d**S(2)), Int((a + c*x**S(2))**(p + S(1))*(f + g*x)**(n + S(-1))/(d + e*x), x), x) + Dist(S(1)/(a*e**S(2) + c*d**S(2)), Int((a + c*x**S(2))**p*(f + g*x)**(n + S(-1))*(a*e*g + c*d*f - c*x*(-d*g + e*f)), x), x) def With501(a, b, c, d, e, f, g, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(-sqrt(S(2))*sqrt(-g*(b + S(2)*c*x - q)/(-b*g + S(2)*c*f + g*q))*sqrt(-g*(b + S(2)*c*x + q)/(-b*g + S(2)*c*f - g*q))*EllipticPi(e*(-b*g + S(2)*c*f + g*q)/(S(2)*c*(-d*g + e*f)), asin(sqrt(S(2))*sqrt(c/(-b*g + S(2)*c*f + g*q))*sqrt(f + g*x)), (-b*g + S(2)*c*f + g*q)/(-b*g + S(2)*c*f - g*q))/(sqrt(c/(-b*g + S(2)*c*f + g*q))*(-d*g + e*f)*sqrt(a + b*x + c*x**S(2))), x) def With502(a, c, d, e, f, g, x): q = Rt(-a*c, S(2)) return Simp(-S(2)*sqrt(g*(-c*x + q)/(c*f + g*q))*sqrt(-g*(c*x + q)/(c*f - g*q))*EllipticPi(e*(c*f + g*q)/(c*(-d*g + e*f)), asin(sqrt(c/(c*f + g*q))*sqrt(f + g*x)), (c*f + g*q)/(c*f - g*q))/(sqrt(c/(c*f + g*q))*sqrt(a + c*x**S(2))*(-d*g + e*f)), x) def replacement503(a, b, c, d, e, f, g, n, x): return Int(ExpandIntegrand(S(1)/(sqrt(f + g*x)*sqrt(a + b*x + c*x**S(2))), (f + g*x)**(n + S(1)/2)/(d + e*x), x), x) def replacement504(a, c, d, e, f, g, n, x): return Int(ExpandIntegrand(S(1)/(sqrt(a + c*x**S(2))*sqrt(f + g*x)), (f + g*x)**(n + S(1)/2)/(d + e*x), x), x) def replacement505(a, b, c, d, e, f, g, x): return Dist(-S(2)*sqrt((-d*g + e*f)**S(2)*(a + b*x + c*x**S(2))/((d + e*x)**S(2)*(a*g**S(2) - b*f*g + c*f**S(2))))*(d + e*x)/((-d*g + e*f)*sqrt(a + b*x + c*x**S(2))), Subst(Int(S(1)/sqrt(x**S(4)*(a*e**S(2) - b*d*e + c*d**S(2))/(a*g**S(2) - b*f*g + c*f**S(2)) - x**S(2)*(S(2)*a*e*g - b*d*g - b*e*f + S(2)*c*d*f)/(a*g**S(2) - b*f*g + c*f**S(2)) + S(1)), x), x, sqrt(f + g*x)/sqrt(d + e*x)), x) def replacement506(a, c, d, e, f, g, x): return Dist(-S(2)*sqrt((a + c*x**S(2))*(-d*g + e*f)**S(2)/((d + e*x)**S(2)*(a*g**S(2) + c*f**S(2))))*(d + e*x)/(sqrt(a + c*x**S(2))*(-d*g + e*f)), Subst(Int(S(1)/sqrt(x**S(4)*(a*e**S(2) + c*d**S(2))/(a*g**S(2) + c*f**S(2)) - x**S(2)*(S(2)*a*e*g + S(2)*c*d*f)/(a*g**S(2) + c*f**S(2)) + S(1)), x), x, sqrt(f + g*x)/sqrt(d + e*x)), x) def replacement507(a, c, e, f, g, m, p, x): return Dist(S(2)*f*g/e, Int((e*x)**(m + S(1))*(a + c*x**S(2))**p, x), x) + Int((e*x)**m*(a + c*x**S(2))**p*(f**S(2) + g**S(2)*x**S(2)), x) def replacement508(a, c, e, f, g, m, p, x): return Dist(f, Int((e*x)**m*(a + c*x**S(2))**p*(f**S(2) + S(3)*g**S(2)*x**S(2)), x), x) + Dist(g/e, Int((e*x)**(m + S(1))*(a + c*x**S(2))**p*(S(3)*f**S(2) + g**S(2)*x**S(2)), x), x) def replacement509(a, b, c, d, e, f, g, m, n, p, x): return Dist(g/e, Int((d + e*x)**(m + S(1))*(f + g*x)**(n + S(-1))*(a + b*x + c*x**S(2))**p, x), x) + Dist((-d*g + e*f)/e, Int((d + e*x)**m*(f + g*x)**(n + S(-1))*(a + b*x + c*x**S(2))**p, x), x) def replacement510(a, c, d, e, f, g, m, n, p, x): return Dist(g/e, Int((a + c*x**S(2))**p*(d + e*x)**(m + S(1))*(f + g*x)**(n + S(-1)), x), x) + Dist((-d*g + e*f)/e, Int((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**(n + S(-1)), x), x) def replacement511(a, b, c, d, e, f, g, m, n, p, x): return Int((d + e*x)**m*(f + g*x)**n*(a + b*x + c*x**S(2))**p, x) def replacement512(a, c, d, e, f, g, m, n, p, x): return Int((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**n, x) def replacement513(a, b, c, d, e, f, g, m, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((d + e*x)**m*(f + g*x)**n*(a + b*x + c*x**S(2))**p, x), x, u), x) def replacement514(a, c, d, e, f, g, m, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + c*x**S(2))**p*(d + e*x)**m*(f + g*x)**n, x), x, u), x) def replacement515(a, b, c, d, e, f, p, q, x): return Dist((c/f)**p, Int((d + e*x + f*x**S(2))**(p + q), x), x) def replacement516(a, b, c, d, e, f, p, q, x): return Dist(a**IntPart(p)*d**(-IntPart(p))*(a + b*x + c*x**S(2))**FracPart(p)*(d + e*x + f*x**S(2))**(-FracPart(p)), Int((d + e*x + f*x**S(2))**(p + q), x), x) def replacement517(a, b, c, d, e, f, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((b + S(2)*c*x)**(S(2)*p)*(d + e*x + f*x**S(2))**q, x), x) def replacement518(a, b, c, d, f, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((b + S(2)*c*x)**(S(2)*p)*(d + f*x**S(2))**q, x), x) def replacement519(a, b, c, d, e, f, q, x): return Simp((d + e*x + f*x**S(2))**(q + S(1))*(b*f*(S(2)*q + S(3)) - c*e*(q + S(2)) + S(2)*c*f*x*(q + S(1)))/(S(2)*f**S(2)*(q + S(1))*(S(2)*q + S(3))), x) def replacement520(a, c, d, e, f, q, x): return Simp((-c*e*(q + S(2)) + S(2)*c*f*x*(q + S(1)))*(d + e*x + f*x**S(2))**(q + S(1))/(S(2)*f**S(2)*(q + S(1))*(S(2)*q + S(3))), x) def replacement521(a, b, c, d, f, q, x): return Simp((d + f*x**S(2))**(q + S(1))*(S(2)*a*f*x*(q + S(1)) + b*d)/(S(2)*d*f*(q + S(1))), x) def replacement522(a, b, c, d, f, q, x): return Dist(b, Int(x*(d + f*x**S(2))**q, x), x) + Int((a + c*x**S(2))*(d + f*x**S(2))**q, x) def replacement523(a, b, c, d, e, f, q, x): return Int(ExpandIntegrand((a + b*x + c*x**S(2))*(d + e*x + f*x**S(2))**q, x), x) def replacement524(a, c, d, e, f, q, x): return Int(ExpandIntegrand((a + c*x**S(2))*(d + e*x + f*x**S(2))**q, x), x) def replacement525(a, b, c, d, e, f, q, x): return -Dist((c*(-S(2)*d*f + e**S(2)*(q + S(2))) + f*(S(2)*q + S(3))*(S(2)*a*f - b*e))/(f*(q + S(1))*(-S(4)*d*f + e**S(2))), Int((d + e*x + f*x**S(2))**(q + S(1)), x), x) + Simp((d + e*x + f*x**S(2))**(q + S(1))*(a*e*f - S(2)*b*d*f + c*d*e + x*(c*(-S(2)*d*f + e**S(2)) + f*(S(2)*a*f - b*e)))/(f*(q + S(1))*(-S(4)*d*f + e**S(2))), x) def replacement526(a, c, d, e, f, q, x): return -Dist((S(2)*a*f**S(2)*(S(2)*q + S(3)) + c*(-S(2)*d*f + e**S(2)*(q + S(2))))/(f*(q + S(1))*(-S(4)*d*f + e**S(2))), Int((d + e*x + f*x**S(2))**(q + S(1)), x), x) + Simp((d + e*x + f*x**S(2))**(q + S(1))*(a*e*f + c*d*e + x*(S(2)*a*f**S(2) + c*(-S(2)*d*f + e**S(2))))/(f*(q + S(1))*(-S(4)*d*f + e**S(2))), x) def replacement527(a, b, c, d, f, q, x): return Dist((S(2)*a*f*q + S(3)*a*f - c*d)/(S(2)*d*f*(q + S(1))), Int((d + f*x**S(2))**(q + S(1)), x), x) + Simp((d + f*x**S(2))**(q + S(1))*(b*d - x*(a*f - c*d))/(S(2)*d*f*(q + S(1))), x) def replacement528(a, b, c, d, e, f, q, x): return Dist((c*(-S(2)*d*f + e**S(2)*(q + S(2))) + f*(S(2)*q + S(3))*(S(2)*a*f - b*e))/(S(2)*f**S(2)*(S(2)*q + S(3))), Int((d + e*x + f*x**S(2))**q, x), x) + Simp((d + e*x + f*x**S(2))**(q + S(1))*(b*f*(S(2)*q + S(3)) - c*e*(q + S(2)) + S(2)*c*f*x*(q + S(1)))/(S(2)*f**S(2)*(q + S(1))*(S(2)*q + S(3))), x) def replacement529(a, c, d, e, f, q, x): return Dist((S(2)*a*f**S(2)*(S(2)*q + S(3)) + c*(-S(2)*d*f + e**S(2)*(q + S(2))))/(S(2)*f**S(2)*(S(2)*q + S(3))), Int((d + e*x + f*x**S(2))**q, x), x) + Simp((-c*e*(q + S(2)) + S(2)*c*f*x*(q + S(1)))*(d + e*x + f*x**S(2))**(q + S(1))/(S(2)*f**S(2)*(q + S(1))*(S(2)*q + S(3))), x) def replacement530(a, b, c, d, f, q, x): return Dist((S(2)*a*f*q + S(3)*a*f - c*d)/(f*(S(2)*q + S(3))), Int((d + f*x**S(2))**q, x), x) + Simp((d + f*x**S(2))**(q + S(1))*(b*f*(S(2)*q + S(3)) + S(2)*c*f*x*(q + S(1)))/(S(2)*f**S(2)*(q + S(1))*(S(2)*q + S(3))), x) def replacement531(a, b, c, d, e, f, p, q, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(-1))*Simp(b*e*q + S(2)*c*d*(S(2)*p + S(3)) + S(2)*c*f*x**S(2)*(S(2)*p + S(2)*q + S(3)) + x*(S(2)*b*f*q + S(2)*c*e*(S(2)*p + q + S(3))), x), x), x) + Simp((b + S(2)*c*x)*(a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement532(a, b, c, d, f, p, q, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + f*x**S(2))**(q + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(S(2)*b*f*q*x + S(2)*c*d*(S(2)*p + S(3)) + S(2)*c*f*x**S(2)*(S(2)*p + S(2)*q + S(3)), x), x), x) + Simp((b + S(2)*c*x)*(d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(1))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement533(a, c, d, e, f, p, q, x): return -Dist(-S(1)/(S(4)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(-1))*Simp(S(2)*c*d*(S(2)*p + S(3)) + S(2)*c*e*x*(S(2)*p + q + S(3)) + S(2)*c*f*x**S(2)*(S(2)*p + S(2)*q + S(3)), x), x), x) + Simp(-x*(a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q/(S(2)*a*(p + S(1))), x) def replacement534(a, b, c, d, e, f, p, q, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*Simp(c*f*x**S(2)*(S(2)*p + S(2)*q + S(5))*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) + S(2)*c*(p + S(1))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2)) - e*(p + q + S(2))*(-S(2)*a*c**S(2)*e - b**S(3)*f + b**S(2)*c*e - b*c*(-S(3)*a*f + c*d)) + x*(S(2)*f*(p + q + S(2))*(S(2)*a*c**S(2)*e + b**S(3)*f - b**S(2)*c*e + b*c*(-S(3)*a*f + c*d)) - (b*f*(p + S(1)) - c*e*(S(2)*p + q + S(4)))*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e))) - (a*f*(p + S(1)) - c*d*(p + S(2)))*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)), x), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(1))*(S(2)*a*c**S(2)*e + b**S(3)*f - b**S(2)*c*e + b*c*(-S(3)*a*f + c*d) + c*x*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)))/((p + S(1))*(-S(4)*a*c + b**S(2))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))), x) def replacement535(a, b, c, d, f, p, q, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(b**S(2)*d*f + (-a*f + c*d)**S(2))), Int((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(1))*Simp(c*f*x**S(2)*(S(2)*p + S(2)*q + S(5))*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d) + S(2)*c*(p + S(1))*(b**S(2)*d*f + (-a*f + c*d)**S(2)) + x*(-b*f*(p + S(1))*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d) + S(2)*f*(b**S(3)*f + b*c*(-S(3)*a*f + c*d))*(p + q + S(2))) - (a*f*(p + S(1)) - c*d*(p + S(2)))*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d), x), x), x) + Simp((d + f*x**S(2))**(q + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(b**S(3)*f + b*c*(-S(3)*a*f + c*d) + c*x*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d))/((p + S(1))*(-S(4)*a*c + b**S(2))*(b**S(2)*d*f + (-a*f + c*d)**S(2))), x) def replacement536(a, c, d, e, f, p, q, x): return -Dist(-S(1)/(S(4)*a*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*Simp(S(2)*a*c**S(2)*e**S(2)*(p + q + S(2)) + c*f*x**S(2)*(-S(2)*a*c*f + S(2)*c**S(2)*d)*(S(2)*p + S(2)*q + S(5)) + S(2)*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2)) + x*(S(4)*a*c**S(2)*e*f*(p + q + S(2)) + c*e*(-S(2)*a*c*f + S(2)*c**S(2)*d)*(S(2)*p + q + S(4))) - (-S(2)*a*c*f + S(2)*c**S(2)*d)*(a*f*(p + S(1)) - c*d*(p + S(2))), x), x), x) + Simp(-(a + c*x**S(2))**(p + S(1))*(S(2)*a*c**S(2)*e + c*x*(-S(2)*a*c*f + S(2)*c**S(2)*d))*(d + e*x + f*x**S(2))**(q + S(1))/(S(4)*a*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2))), x) def replacement537(a, b, c, d, e, f, p, q, x): return -Dist(S(1)/(S(2)*f**S(2)*(p + q)*(S(2)*p + S(2)*q + S(1))), Int((a + b*x + c*x**S(2))**(p + S(-2))*(d + e*x + f*x**S(2))**q*Simp(x**S(2)*(c*(p + q)*(-c*(S(2)*d*f*(S(1) - S(2)*p) + e**S(2)*(S(3)*p + q + S(-1))) + f*(-S(2)*a*f + b*e)*(S(4)*p + S(2)*q + S(-1))) + p*(S(1) - p)*(-b*f + c*e)**S(2)) + x*(S(2)*(S(1) - p)*(S(2)*p + q)*(-a*f + c*d)*(-b*f + c*e) - (p + q)*(b*(c*(S(2)*p + q)*(-S(4)*d*f + e**S(2)) + f*(S(2)*p + S(2)*q + S(1))*(S(2)*a*f - b*e + S(2)*c*d)) + e*f*(S(1) - p)*(-S(4)*a*c + b**S(2)))) + (S(1) - p)*(S(2)*p + q)*(-a*e + b*d)*(-b*f + c*e) - (p + q)*(-a*(c*(S(2)*d*f - e**S(2)*(S(2)*p + q)) + f*(-S(2)*a*f + b*e)*(S(2)*p + S(2)*q + S(1))) + b**S(2)*d*f*(S(1) - p)), x), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(-1))*(d + e*x + f*x**S(2))**(q + S(1))*(b*f*(S(3)*p + S(2)*q) - c*e*(S(2)*p + q) + S(2)*c*f*x*(p + q))/(S(2)*f**S(2)*(p + q)*(S(2)*p + S(2)*q + S(1))), x) def replacement538(a, b, c, d, f, p, q, x): return -Dist(S(1)/(S(2)*f*(p + q)*(S(2)*p + S(2)*q + S(1))), Int((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(-2))*Simp(b**S(2)*d*(p + S(-1))*(S(2)*p + q) + x**S(2)*(b**S(2)*f*p*(S(1) - p) + S(2)*c*(p + q)*(-a*f*(S(4)*p + S(2)*q + S(-1)) + c*d*(S(2)*p + S(-1)))) - x*(S(2)*b*(S(1) - p)*(S(2)*p + q)*(-a*f + c*d) - S(2)*b*(p + q)*(S(2)*c*d*(S(2)*p + q) - (a*f + c*d)*(S(2)*p + S(2)*q + S(1)))) - (p + q)*(-S(2)*a*(-a*f*(S(2)*p + S(2)*q + S(1)) + c*d) + b**S(2)*d*(S(1) - p)), x), x), x) + Simp((d + f*x**S(2))**(q + S(1))*(b*(S(3)*p + S(2)*q) + S(2)*c*x*(p + q))*(a + b*x + c*x**S(2))**(p + S(-1))/(S(2)*f*(p + q)*(S(2)*p + S(2)*q + S(1))), x) def replacement539(a, c, d, e, f, p, q, x): return -Dist(S(1)/(S(2)*f**S(2)*(p + q)*(S(2)*p + S(2)*q + S(1))), Int((a + c*x**S(2))**(p + S(-2))*(d + e*x + f*x**S(2))**q*Simp(-a*c*e**S(2)*(S(1) - p)*(S(2)*p + q) + a*(p + q)*(-S(2)*a*f**S(2)*(S(2)*p + S(2)*q + S(1)) + c*(S(2)*d*f - e**S(2)*(S(2)*p + q))) + x**S(2)*(c**S(2)*e**S(2)*p*(S(1) - p) - c*(p + q)*(S(2)*a*f**S(2)*(S(4)*p + S(2)*q + S(-1)) + c*(S(2)*d*f*(S(1) - S(2)*p) + e**S(2)*(S(3)*p + q + S(-1))))) + x*(S(4)*a*c*e*f*(S(1) - p)*(p + q) + S(2)*c*e*(S(1) - p)*(S(2)*p + q)*(-a*f + c*d)), x), x), x) - Simp(c*(a + c*x**S(2))**(p + S(-1))*(e*(S(2)*p + q) - S(2)*f*x*(p + q))*(d + e*x + f*x**S(2))**(q + S(1))/(S(2)*f**S(2)*(p + q)*(S(2)*p + S(2)*q + S(1))), x) def With540(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = a**S(2)*f**S(2) - a*b*e*f - S(2)*a*c*d*f + a*c*e**S(2) + b**S(2)*d*f - b*c*d*e + c**S(2)*d**S(2) if NonzeroQ(q): return True return False def replacement540(a, b, c, d, e, f, x): q = a**S(2)*f**S(2) - a*b*e*f - S(2)*a*c*d*f + a*c*e**S(2) + b**S(2)*d*f - b*c*d*e + c**S(2)*d**S(2) return Dist(S(1)/q, Int((-a*c*f + b**S(2)*f - b*c*e + c**S(2)*d - x*(-b*c*f + c**S(2)*e))/(a + b*x + c*x**S(2)), x), x) + Dist(S(1)/q, Int((a*f**S(2) - b*e*f - c*d*f + c*e**S(2) + x*(-b*f**S(2) + c*e*f))/(d + e*x + f*x**S(2)), x), x) def With541(a, b, c, d, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = a**S(2)*f**S(2) - S(2)*a*c*d*f + b**S(2)*d*f + c**S(2)*d**S(2) if NonzeroQ(q): return True return False def replacement541(a, b, c, d, f, x): q = a**S(2)*f**S(2) - S(2)*a*c*d*f + b**S(2)*d*f + c**S(2)*d**S(2) return -Dist(S(1)/q, Int((-a*f**S(2) + b*f**S(2)*x + c*d*f)/(d + f*x**S(2)), x), x) + Dist(S(1)/q, Int((-a*c*f + b**S(2)*f + b*c*f*x + c**S(2)*d)/(a + b*x + c*x**S(2)), x), x) def replacement542(a, b, c, d, e, f, x): return Dist(-S(2)*e, Subst(Int(S(1)/(e*(-S(4)*a*f + b*e) - x**S(2)*(-a*e + b*d)), x), x, (e + S(2)*f*x)/sqrt(d + e*x + f*x**S(2))), x) def With543(a, b, c, d, e, f, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(S(1)/((b + S(2)*c*x - q)*sqrt(d + e*x + f*x**S(2))), x), x) - Dist(S(2)*c/q, Int(S(1)/((b + S(2)*c*x + q)*sqrt(d + e*x + f*x**S(2))), x), x) def replacement544(a, c, d, e, f, x): return Dist(S(1)/2, Int(S(1)/((a - x*Rt(-a*c, S(2)))*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(S(1)/2, Int(S(1)/((a + x*Rt(-a*c, S(2)))*sqrt(d + e*x + f*x**S(2))), x), x) def With545(a, b, c, d, f, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(S(1)/(sqrt(d + f*x**S(2))*(b + S(2)*c*x - q)), x), x) - Dist(S(2)*c/q, Int(S(1)/(sqrt(d + f*x**S(2))*(b + S(2)*c*x + q)), x), x) def With546(a, b, c, d, e, f, x): q = Rt(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2), S(2)) return -Dist(S(1)/(S(2)*q), Int((-a*f + c*d - q + x*(-b*f + c*e))/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(S(1)/(S(2)*q), Int((-a*f + c*d + q + x*(-b*f + c*e))/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) def With547(a, c, d, e, f, x): q = Rt(a*c*e**S(2) + (-a*f + c*d)**S(2), S(2)) return -Dist(S(1)/(S(2)*q), Int((-a*f + c*d + c*e*x - q)/((a + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(S(1)/(S(2)*q), Int((-a*f + c*d + c*e*x + q)/((a + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) def With548(a, b, c, d, f, x): q = Rt(b**S(2)*d*f + (-a*f + c*d)**S(2), S(2)) return -Dist(S(1)/(S(2)*q), Int((-a*f - b*f*x + c*d - q)/(sqrt(d + f*x**S(2))*(a + b*x + c*x**S(2))), x), x) + Dist(S(1)/(S(2)*q), Int((-a*f - b*f*x + c*d + q)/(sqrt(d + f*x**S(2))*(a + b*x + c*x**S(2))), x), x) def replacement549(a, b, c, d, e, f, x): return -Dist(S(1)/f, Int((-a*f + c*d + x*(-b*f + c*e))/(sqrt(a + b*x + c*x**S(2))*(d + e*x + f*x**S(2))), x), x) + Dist(c/f, Int(S(1)/sqrt(a + b*x + c*x**S(2)), x), x) def replacement550(a, b, c, d, f, x): return -Dist(S(1)/f, Int((-a*f - b*f*x + c*d)/((d + f*x**S(2))*sqrt(a + b*x + c*x**S(2))), x), x) + Dist(c/f, Int(S(1)/sqrt(a + b*x + c*x**S(2)), x), x) def replacement551(a, c, d, e, f, x): return -Dist(S(1)/f, Int((-a*f + c*d + c*e*x)/(sqrt(a + c*x**S(2))*(d + e*x + f*x**S(2))), x), x) + Dist(c/f, Int(S(1)/sqrt(a + c*x**S(2)), x), x) def With552(a, b, c, d, e, f, x): r = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(sqrt(S(2)*a + x*(b + r))*sqrt(b + S(2)*c*x + r)/sqrt(a + b*x + c*x**S(2)), Int(S(1)/(sqrt(S(2)*a + x*(b + r))*sqrt(b + S(2)*c*x + r)*sqrt(d + e*x + f*x**S(2))), x), x) def With553(a, b, c, d, f, x): r = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(sqrt(S(2)*a + x*(b + r))*sqrt(b + S(2)*c*x + r)/sqrt(a + b*x + c*x**S(2)), Int(S(1)/(sqrt(S(2)*a + x*(b + r))*sqrt(d + f*x**S(2))*sqrt(b + S(2)*c*x + r)), x), x) def replacement554(a, b, c, d, e, f, p, q, x): return Int((a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x) def replacement555(a, c, d, e, f, p, q, x): return Int((a + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x) def replacement556(a, b, c, d, e, f, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement557(a, c, d, e, f, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement558(a, b, c, d, e, f, g, h, m, p, q, x): return Dist((c/f)**p, Int((g + h*x)**m*(d + e*x + f*x**S(2))**(p + q), x), x) def replacement559(a, b, c, d, e, f, g, h, m, p, q, x): return Dist(a**IntPart(p)*d**(-IntPart(p))*(a + b*x + c*x**S(2))**FracPart(p)*(d + e*x + f*x**S(2))**(-FracPart(p)), Int((g + h*x)**m*(d + e*x + f*x**S(2))**(p + q), x), x) def replacement560(a, b, c, d, e, f, g, h, m, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((b + S(2)*c*x)**(S(2)*p)*(g + h*x)**m*(d + e*x + f*x**S(2))**q, x), x) def replacement561(a, b, c, d, f, g, h, m, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((b + S(2)*c*x)**(S(2)*p)*(d + f*x**S(2))**q*(g + h*x)**m, x), x) def replacement562(a, b, c, d, e, f, g, h, m, p, x): return Int((f*h*x/c + d*g/a)**m*(a + b*x + c*x**S(2))**(m + p), x) def replacement563(a, c, d, e, f, g, h, m, p, x): return Int((a + c*x**S(2))**(m + p)*(f*h*x/c + d*g/a)**m, x) def replacement564(a, b, c, d, f, g, h, m, p, x): return Int((f*h*x/c + d*g/a)**m*(a + b*x + c*x**S(2))**(m + p), x) def replacement565(a, c, d, f, g, h, m, p, x): return Int((a + c*x**S(2))**(m + p)*(f*h*x/c + d*g/a)**m, x) def replacement566(a, b, c, e, f, p, q, x): return Int((a/e + c*x/f)**p*(e*x + f*x**S(2))**(p + q), x) def replacement567(a, c, e, f, p, q, x): return Int((a/e + c*x/f)**p*(e*x + f*x**S(2))**(p + q), x) def replacement568(a, b, c, d, e, f, g, h, m, p, x): return Simp(f*(g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*h*(m + S(2)*p + S(3))), x) def replacement569(a, c, d, e, f, g, h, m, p, x): return Simp(f*(a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(1))/(c*h*(m + S(2)*p + S(3))), x) def replacement570(a, b, c, d, f, g, h, m, p, x): return Simp(f*(g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*h*(m + S(2)*p + S(3))), x) def replacement571(a, b, c, d, e, f, g, h, m, p, x): return Int(ExpandIntegrand((g + h*x)**m*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2)), x), x) def replacement572(a, c, d, e, f, g, h, m, p, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(g + h*x)**m*(d + e*x + f*x**S(2)), x), x) def replacement573(a, b, c, d, f, g, h, m, p, x): return Int(ExpandIntegrand((d + f*x**S(2))*(g + h*x)**m*(a + b*x + c*x**S(2))**p, x), x) def replacement574(a, c, d, f, g, h, m, p, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(d + f*x**S(2))*(g + h*x)**m, x), x) def replacement575(a, b, c, d, e, f, g, h, m, p, x): return Dist(S(1)/(h*(m + S(1))*(a*h**S(2) - b*g*h + c*g**S(2))), Int((g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*Simp(-b*(f*g**S(2)*(p + S(1)) - h*(-d*h*(m + p + S(2)) + e*g*(p + S(1)))) + h*(m + S(1))*(a*e*h - a*f*g + c*d*g) - x*(c*(S(2)*f*g**S(2)*(p + S(1)) - h*(-d*h + e*g)*(m + S(2)*p + S(3))) + f*h*(m + S(1))*(-a*h + b*g)), x), x), x) + Simp((g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(d*h**S(2) - e*g*h + f*g**S(2))/(h*(m + S(1))*(a*h**S(2) - b*g*h + c*g**S(2))), x) def replacement576(a, c, d, e, f, g, h, m, p, x): return Dist(S(1)/(h*(m + S(1))*(a*h**S(2) + c*g**S(2))), Int((a + c*x**S(2))**p*(g + h*x)**(m + S(1))*Simp(h*(m + S(1))*(a*e*h - a*f*g + c*d*g) + x*(a*f*h**S(2)*(m + S(1)) - c*(S(2)*f*g**S(2)*(p + S(1)) - h*(-d*h + e*g)*(m + S(2)*p + S(3)))), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(1))*(d*h**S(2) - e*g*h + f*g**S(2))/(h*(m + S(1))*(a*h**S(2) + c*g**S(2))), x) def replacement577(a, b, c, d, f, g, h, m, p, x): return Dist(S(1)/(h*(m + S(1))*(a*h**S(2) - b*g*h + c*g**S(2))), Int((g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**p*Simp(-b*(d*h**S(2)*(m + p + S(2)) + f*g**S(2)*(p + S(1))) + h*(m + S(1))*(-a*f*g + c*d*g) - x*(c*(d*h**S(2)*(m + S(2)*p + S(3)) + S(2)*f*g**S(2)*(p + S(1))) + f*h*(m + S(1))*(-a*h + b*g)), x), x), x) + Simp((g + h*x)**(m + S(1))*(d*h**S(2) + f*g**S(2))*(a + b*x + c*x**S(2))**(p + S(1))/(h*(m + S(1))*(a*h**S(2) - b*g*h + c*g**S(2))), x) def replacement578(a, c, d, f, g, h, m, p, x): return Dist(S(1)/(h*(m + S(1))*(a*h**S(2) + c*g**S(2))), Int((a + c*x**S(2))**p*(g + h*x)**(m + S(1))*Simp(h*(m + S(1))*(-a*f*g + c*d*g) + x*(a*f*h**S(2)*(m + S(1)) - c*(d*h**S(2)*(m + S(2)*p + S(3)) + S(2)*f*g**S(2)*(p + S(1)))), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(1))*(d*h**S(2) + f*g**S(2))/(h*(m + S(1))*(a*h**S(2) + c*g**S(2))), x) def replacement579(a, b, c, d, e, f, g, h, x): return Dist((d*h**S(2) - e*g*h + f*g**S(2))/(a*h**S(2) - b*g*h + c*g**S(2)), Int(S(1)/((g + h*x)*sqrt(a + b*x + c*x**S(2))), x), x) + Dist(S(1)/(a*h**S(2) - b*g*h + c*g**S(2)), Int((a*e*h - a*f*g - b*d*h + c*d*g + x*(a*f*h - b*f*g - c*d*h + c*e*g))/(a + b*x + c*x**S(2))**(S(3)/2), x), x) def replacement580(a, c, d, e, f, g, h, x): return Dist((d*h**S(2) - e*g*h + f*g**S(2))/(a*h**S(2) + c*g**S(2)), Int(S(1)/(sqrt(a + c*x**S(2))*(g + h*x)), x), x) + Dist(S(1)/(a*h**S(2) + c*g**S(2)), Int((a*e*h - a*f*g + c*d*g + x*(a*f*h - c*d*h + c*e*g))/(a + c*x**S(2))**(S(3)/2), x), x) def replacement581(a, b, c, d, f, g, h, x): return Dist((d*h**S(2) + f*g**S(2))/(a*h**S(2) - b*g*h + c*g**S(2)), Int(S(1)/((g + h*x)*sqrt(a + b*x + c*x**S(2))), x), x) + Dist(S(1)/(a*h**S(2) - b*g*h + c*g**S(2)), Int((-a*f*g - b*d*h + c*d*g - x*(-a*f*h + b*f*g + c*d*h))/(a + b*x + c*x**S(2))**(S(3)/2), x), x) def replacement582(a, c, d, f, g, h, x): return Dist((d*h**S(2) + f*g**S(2))/(a*h**S(2) + c*g**S(2)), Int(S(1)/(sqrt(a + c*x**S(2))*(g + h*x)), x), x) + Dist(S(1)/(a*h**S(2) + c*g**S(2)), Int((-a*f*g + c*d*g - x*(-a*f*h + c*d*h))/(a + c*x**S(2))**(S(3)/2), x), x) def replacement583(a, b, c, d, e, f, g, h, m, p, x): return -Dist(S(1)/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((g + h*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(g*(c*(S(2)*p + S(3))*(-b*e + S(2)*c*d) - f*(S(2)*a*c - b**S(2)*(p + S(2)))) + h*m*(a*b*f - S(2)*a*c*e + b*c*d) + h*x*(c*(-b*e + S(2)*c*d)*(m + S(2)*p + S(3)) - f*(S(2)*a*c*(m + S(1)) - b**S(2)*(m + p + S(2)))), x), x), x) + Simp((g + h*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*(a*b*f - S(2)*a*c*e + b*c*d + x*(c*(-b*e + S(2)*c*d) + f*(-S(2)*a*c + b**S(2))))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement584(a, c, d, e, f, g, h, m, p, x): return -Dist(S(1)/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(-1))*Simp(a*(e*h*m + f*g) - c*d*g*(S(2)*p + S(3)) + h*x*(a*f*(m + S(1)) - c*d*(m + S(2)*p + S(3))), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(g + h*x)**m*(a*e - x*(-a*f + c*d))/(S(2)*a*c*(p + S(1))), x) def replacement585(a, b, c, d, f, g, h, m, p, x): return -Dist(S(1)/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((g + h*x)**(m + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(g*(S(2)*c**S(2)*d*(S(2)*p + S(3)) - f*(S(2)*a*c - b**S(2)*(p + S(2)))) + h*m*(a*b*f + b*c*d) + h*x*(S(2)*c**S(2)*d*(m + S(2)*p + S(3)) - f*(S(2)*a*c*(m + S(1)) - b**S(2)*(m + p + S(2)))), x), x), x) + Simp((g + h*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*(a*b*f + b*c*d + x*(S(2)*c**S(2)*d + f*(-S(2)*a*c + b**S(2))))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement586(a, c, d, f, g, h, m, p, x): return -Dist(S(1)/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(-1))*Simp(a*f*g - c*d*g*(S(2)*p + S(3)) + h*x*(a*f*(m + S(1)) - c*d*(m + S(2)*p + S(3))), x), x), x) - Simp(x*(a + c*x**S(2))**(p + S(1))*(g + h*x)**m*(-a*f + c*d)/(S(2)*a*c*(p + S(1))), x) def replacement587(a, b, c, d, e, f, g, h, m, p, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(c*g**S(2) - h*(-a*h + b*g))), Int((g + h*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*Simp(g*(p + S(2))*(-S(2)*a*(-c*e*h + c*f*g) + b**S(2)*f*g - b*(a*f*h + c*d*h + c*e*g) + S(2)*c**S(2)*d*g) + h*x*(m + S(2)*p + S(4))*(-S(2)*a*(-c*e*h + c*f*g) + b**S(2)*f*g - b*(a*f*h + c*d*h + c*e*g) + S(2)*c**S(2)*d*g) - h*(-(-a*e + b*d)*(-b*h + S(2)*c*g) + (-a*f + c*d)*(-S(2)*a*h + b*g))*(m + p + S(2)) + (p + S(1))*(c*g**S(2) - h*(-a*h + b*g))*(S(2)*a*f - b*e + S(2)*c*d), x), x), x) - Simp((g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(-x*(b*f*(-a*h + b*g) + S(2)*c**S(2)*d*g - c*(-S(2)*a*e*h + S(2)*a*f*g + b*d*h + b*e*g)) - (-a*e + b*d)*(-b*h + S(2)*c*g) + (-a*f + c*d)*(-S(2)*a*h + b*g))/((p + S(1))*(-S(4)*a*c + b**S(2))*(c*g**S(2) - h*(-a*h + b*g))), x) def replacement588(a, c, d, e, f, g, h, m, p, x): return Dist(S(1)/(S(2)*a*c*(p + S(1))*(a*h**S(2) + c*g**S(2))), Int((a + c*x**S(2))**(p + S(1))*(g + h*x)**m*Simp(g*(p + S(2))*(-a*(-c*e*h + c*f*g) + c**S(2)*d*g) + h*x*(-a*(-c*e*h + c*f*g) + c**S(2)*d*g)*(m + S(2)*p + S(4)) - h*(a*c*e*g - a*h*(-a*f + c*d))*(m + p + S(2)) + (p + S(1))*(a*f + c*d)*(a*h**S(2) + c*g**S(2)), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(1))*(a*c*e*g - a*h*(-a*f + c*d) - c*x*(a*e*h - a*f*g + c*d*g))/(S(2)*a*c*(p + S(1))*(a*h**S(2) + c*g**S(2))), x) def replacement589(a, b, c, d, f, g, h, m, p, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(c*g**S(2) - h*(-a*h + b*g))), Int((g + h*x)**m*(a + b*x + c*x**S(2))**(p + S(1))*Simp(g*(p + S(2))*(-S(2)*a*c*f*g + b**S(2)*f*g - b*(a*f*h + c*d*h) + S(2)*c**S(2)*d*g) + h*x*(m + S(2)*p + S(4))*(-S(2)*a*c*f*g + b**S(2)*f*g - b*(a*f*h + c*d*h) + S(2)*c**S(2)*d*g) - h*(-b*d*(-b*h + S(2)*c*g) + (-a*f + c*d)*(-S(2)*a*h + b*g))*(m + p + S(2)) + S(2)*(p + S(1))*(a*f + c*d)*(c*g**S(2) - h*(-a*h + b*g)), x), x), x) - Simp((g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(-b*d*(-b*h + S(2)*c*g) - x*(b*f*(-a*h + b*g) + S(2)*c**S(2)*d*g - c*(S(2)*a*f*g + b*d*h)) + (-a*f + c*d)*(-S(2)*a*h + b*g))/((p + S(1))*(-S(4)*a*c + b**S(2))*(c*g**S(2) - h*(-a*h + b*g))), x) def replacement590(a, c, d, f, g, h, m, p, x): return Dist(S(1)/(S(2)*a*c*(p + S(1))*(a*h**S(2) + c*g**S(2))), Int((a + c*x**S(2))**(p + S(1))*(g + h*x)**m*Simp(a*h**S(2)*(-a*f + c*d)*(m + p + S(2)) + g*(p + S(2))*(-a*c*f*g + c**S(2)*d*g) + h*x*(-a*c*f*g + c**S(2)*d*g)*(m + S(2)*p + S(4)) + (p + S(1))*(a*f + c*d)*(a*h**S(2) + c*g**S(2)), x), x), x) - Simp((a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(1))*(a*h*(-a*f + c*d) + c*x*(-a*f*g + c*d*g))/(S(2)*a*c*(p + S(1))*(a*h**S(2) + c*g**S(2))), x) def replacement591(a, b, c, d, e, f, g, h, m, p, x): return -Dist(h**(S(-2)), Int((g + h*x)**m*(a + b*x + c*x**S(2))**p*(-d*h**S(2) + f*g**S(2) + h*x*(-e*h + S(2)*f*g)), x), x) + Dist(f/h**S(2), Int((g + h*x)**(m + S(2))*(a + b*x + c*x**S(2))**p, x), x) def replacement592(a, c, d, e, f, g, h, m, p, x): return -Dist(h**(S(-2)), Int((a + c*x**S(2))**p*(g + h*x)**m*(-d*h**S(2) + f*g**S(2) + h*x*(-e*h + S(2)*f*g)), x), x) + Dist(f/h**S(2), Int((a + c*x**S(2))**p*(g + h*x)**(m + S(2)), x), x) def replacement593(a, b, c, d, f, g, h, m, p, x): return -Dist(h**(S(-2)), Int((g + h*x)**m*(a + b*x + c*x**S(2))**p*(-d*h**S(2) + f*g**S(2) + S(2)*f*g*h*x), x), x) + Dist(f/h**S(2), Int((g + h*x)**(m + S(2))*(a + b*x + c*x**S(2))**p, x), x) def replacement594(a, c, d, f, g, h, m, p, x): return -Dist(h**(S(-2)), Int((a + c*x**S(2))**p*(g + h*x)**m*(-d*h**S(2) + f*g**S(2) + S(2)*f*g*h*x), x), x) + Dist(f/h**S(2), Int((a + c*x**S(2))**p*(g + h*x)**(m + S(2)), x), x) def replacement595(a, b, c, d, e, f, g, h, m, p, x): return -Dist(S(1)/(c*h*(m + S(2)*p + S(3))), Int((g + h*x)**m*(a + b*x + c*x**S(2))**p*Simp(b*f*g*(p + S(1)) + h*(a*f*(m + S(1)) - c*d*(m + S(2)*p + S(3))) + x*(b*f*h*(m + p + S(2)) + c*(-e*h*(m + S(2)*p + S(3)) + S(2)*f*g*(p + S(1)))), x), x), x) + Simp(f*(g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*h*(m + S(2)*p + S(3))), x) def replacement596(a, c, d, e, f, g, h, m, p, x): return -Dist(S(1)/(c*h*(m + S(2)*p + S(3))), Int((a + c*x**S(2))**p*(g + h*x)**m*Simp(c*x*(-e*h*(m + S(2)*p + S(3)) + S(2)*f*g*(p + S(1))) + h*(a*f*(m + S(1)) - c*d*(m + S(2)*p + S(3))), x), x), x) + Simp(f*(a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(1))/(c*h*(m + S(2)*p + S(3))), x) def replacement597(a, b, c, d, f, g, h, m, p, x): return -Dist(S(1)/(c*h*(m + S(2)*p + S(3))), Int((g + h*x)**m*(a + b*x + c*x**S(2))**p*Simp(b*f*g*(p + S(1)) + f*x*(b*h*(m + p + S(2)) + S(2)*c*g*(p + S(1))) + h*(a*f*(m + S(1)) - c*d*(m + S(2)*p + S(3))), x), x), x) + Simp(f*(g + h*x)**(m + S(1))*(a + b*x + c*x**S(2))**(p + S(1))/(c*h*(m + S(2)*p + S(3))), x) def replacement598(a, c, d, f, g, h, m, p, x): return -Dist(S(1)/(c*h*(m + S(2)*p + S(3))), Int((a + c*x**S(2))**p*(g + h*x)**m*Simp(S(2)*c*f*g*x*(p + S(1)) + h*(a*f*(m + S(1)) - c*d*(m + S(2)*p + S(3))), x), x), x) + Simp(f*(a + c*x**S(2))**(p + S(1))*(g + h*x)**(m + S(1))/(c*h*(m + S(2)*p + S(3))), x) def replacement599(a, b, c, d, e, f, g, h, p, q, x): return Int(ExpandIntegrand((g + h*x)*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x) def replacement600(a, c, d, e, f, g, h, p, q, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(g + h*x)*(d + e*x + f*x**S(2))**q, x), x) def replacement601(a, b, c, d, e, f, g, h, p, q, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(-1))*Simp(-d*(S(2)*p + S(3))*(b*h - S(2)*c*g) + e*q*(-S(2)*a*h + b*g) - f*x**S(2)*(b*h - S(2)*c*g)*(S(2)*p + S(2)*q + S(3)) + x*(-e*(b*h - S(2)*c*g)*(S(2)*p + q + S(3)) + S(2)*f*q*(-S(2)*a*h + b*g)), x), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*(-S(2)*a*h + b*g - x*(b*h - S(2)*c*g))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement602(a, c, d, e, f, g, h, p, q, x): return Dist(S(1)/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(-1))*Simp(-a*e*h*q + c*d*g*(S(2)*p + S(3)) + c*f*g*x**S(2)*(S(2)*p + S(2)*q + S(3)) + x*(-S(2)*a*f*h*q + c*e*g*(S(2)*p + q + S(3))), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(a*h - c*g*x)*(d + e*x + f*x**S(2))**q/(S(2)*a*c*(p + S(1))), x) def replacement603(a, b, c, d, f, g, h, p, q, x): return -Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + f*x**S(2))**(q + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(-d*(S(2)*p + S(3))*(b*h - S(2)*c*g) + S(2)*f*q*x*(-S(2)*a*h + b*g) - f*x**S(2)*(b*h - S(2)*c*g)*(S(2)*p + S(2)*q + S(3)), x), x), x) + Simp((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(1))*(-S(2)*a*h + b*g - x*(b*h - S(2)*c*g))/((p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement604(a, b, c, d, e, f, g, h, p, q, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*Simp(-c*f*x**S(2)*(S(2)*p + S(2)*q + S(5))*(S(2)*a*c*e*h + b**S(2)*f*g - b*(a*f*h + c*d*h + c*e*g) + S(2)*c*g*(-a*f + c*d)) - e*(c*g*(S(2)*a*c*e - b*(a*f + c*d)) + (-a*h + b*g)*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)))*(p + q + S(2)) - x*(S(2)*f*(c*g*(S(2)*a*c*e - b*(a*f + c*d)) + (-a*h + b*g)*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)))*(p + q + S(2)) - (b*f*(p + S(1)) - c*e*(S(2)*p + q + S(4)))*(S(2)*a*c*e*h + b**S(2)*f*g - b*(a*f*h + c*d*h + c*e*g) + S(2)*c*g*(-a*f + c*d))) + (p + S(1))*(b*h - S(2)*c*g)*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2)) + (a*f*(p + S(1)) - c*d*(p + S(2)))*(S(2)*a*c*e*h + b**S(2)*f*g - b*(a*f*h + c*d*h + c*e*g) + S(2)*c*g*(-a*f + c*d)), x), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(1))*(c*g*(S(2)*a*c*e - b*(a*f + c*d)) + c*x*(g*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) - h*(a*b*f - S(2)*a*c*e + b*c*d)) + (-a*h + b*g)*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)))/((p + S(1))*(-S(4)*a*c + b**S(2))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))), x) def replacement605(a, c, d, e, f, g, h, p, q, x): return Dist(-S(1)/(S(4)*a*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*Simp(-c*f*x**S(2)*(S(2)*a*c*e*h + S(2)*c*g*(-a*f + c*d))*(S(2)*p + S(2)*q + S(5)) - S(2)*c*g*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2)) - e*(S(2)*a*c**S(2)*e*g - a*h*(-S(2)*a*c*f + S(2)*c**S(2)*d))*(p + q + S(2)) - x*(c*e*(S(2)*a*c*e*h + S(2)*c*g*(-a*f + c*d))*(S(2)*p + q + S(4)) + S(2)*f*(S(2)*a*c**S(2)*e*g - a*h*(-S(2)*a*c*f + S(2)*c**S(2)*d))*(p + q + S(2))) + (a*f*(p + S(1)) - c*d*(p + S(2)))*(S(2)*a*c*e*h + S(2)*c*g*(-a*f + c*d)), x), x), x) + Simp(-(a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(1))*(S(2)*a*c**S(2)*e*g - a*h*(-S(2)*a*c*f + S(2)*c**S(2)*d) + c*x*(S(2)*a*c*e*h + g*(-S(2)*a*c*f + S(2)*c**S(2)*d)))/(S(4)*a*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2))), x) def replacement606(a, b, c, d, f, g, h, p, q, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(b**S(2)*d*f + (-a*f + c*d)**S(2))), Int((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(1))*Simp(-c*f*x**S(2)*(S(2)*p + S(2)*q + S(5))*(b**S(2)*f*g - b*(a*f*h + c*d*h) + S(2)*c*g*(-a*f + c*d)) - x*(-b*f*(p + S(1))*(b**S(2)*f*g - b*(a*f*h + c*d*h) + S(2)*c*g*(-a*f + c*d)) + S(2)*f*(-b*c*g*(a*f + c*d) + (-a*h + b*g)*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d))*(p + q + S(2))) + (p + S(1))*(b*h - S(2)*c*g)*(b**S(2)*d*f + (-a*f + c*d)**S(2)) + (a*f*(p + S(1)) - c*d*(p + S(2)))*(b**S(2)*f*g - b*(a*f*h + c*d*h) + S(2)*c*g*(-a*f + c*d)), x), x), x) + Simp((d + f*x**S(2))**(q + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(-b*c*g*(a*f + c*d) + c*x*(g*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d) - h*(a*b*f + b*c*d)) + (-a*h + b*g)*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d))/((p + S(1))*(-S(4)*a*c + b**S(2))*(b**S(2)*d*f + (-a*f + c*d)**S(2))), x) def replacement607(a, b, c, d, e, f, g, h, p, q, x): return -Dist(S(1)/(S(2)*f*(p + q + S(1))), Int((a + b*x + c*x**S(2))**(p + S(-1))*(d + e*x + f*x**S(2))**q*Simp(a*(e*h - S(2)*f*g)*(p + q + S(1)) + h*p*(-a*e + b*d) + x**S(2)*(c*(e*h - S(2)*f*g)*(p + q + S(1)) + h*p*(-b*f + c*e)) + x*(b*(e*h - S(2)*f*g)*(p + q + S(1)) + S(2)*h*p*(-a*f + c*d)), x), x), x) + Simp(h*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**(q + S(1))/(S(2)*f*(p + q + S(1))), x) def replacement608(a, c, d, e, f, g, h, p, q, x): return Dist(S(1)/(S(2)*f*(p + q + S(1))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x + f*x**S(2))**q*Simp(a*e*h*p - a*(e*h - S(2)*f*g)*(p + q + S(1)) - S(2)*h*p*x*(-a*f + c*d) - x**S(2)*(c*e*h*p + c*(e*h - S(2)*f*g)*(p + q + S(1))), x), x), x) + Simp(h*(a + c*x**S(2))**p*(d + e*x + f*x**S(2))**(q + S(1))/(S(2)*f*(p + q + S(1))), x) def replacement609(a, b, c, d, f, g, h, p, q, x): return -Dist(S(1)/(S(2)*f*(p + q + S(1))), Int((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(-1))*Simp(-S(2)*a*f*g*(p + q + S(1)) + b*d*h*p + x**S(2)*(-b*f*h*p - S(2)*c*f*g*(p + q + S(1))) + x*(-S(2)*b*f*g*(p + q + S(1)) + S(2)*h*p*(-a*f + c*d)), x), x), x) + Simp(h*(d + f*x**S(2))**(q + S(1))*(a + b*x + c*x**S(2))**p/(S(2)*f*(p + q + S(1))), x) def With610(a, b, c, d, e, f, g, h, x): if isinstance(x, (int, Integer, float, Float)): return False q = a**S(2)*f**S(2) - a*b*e*f - S(2)*a*c*d*f + a*c*e**S(2) + b**S(2)*d*f - b*c*d*e + c**S(2)*d**S(2) if NonzeroQ(q): return True return False def replacement610(a, b, c, d, e, f, g, h, x): q = a**S(2)*f**S(2) - a*b*e*f - S(2)*a*c*d*f + a*c*e**S(2) + b**S(2)*d*f - b*c*d*e + c**S(2)*d**S(2) return Dist(S(1)/q, Int(Simp(-a*b*f*h + a*c*e*h - a*c*f*g + b**S(2)*f*g - b*c*e*g + c**S(2)*d*g + c*x*(-a*f*h + b*f*g + c*d*h - c*e*g), x)/(a + b*x + c*x**S(2)), x), x) + Dist(S(1)/q, Int(Simp(a*f**S(2)*g + b*d*f*h - b*e*f*g - c*d*e*h - c*d*f*g + c*e**S(2)*g - f*x*(-a*f*h + b*f*g + c*d*h - c*e*g), x)/(d + e*x + f*x**S(2)), x), x) def With611(a, b, c, d, f, g, h, x): if isinstance(x, (int, Integer, float, Float)): return False q = a**S(2)*f**S(2) - S(2)*a*c*d*f + b**S(2)*d*f + c**S(2)*d**S(2) if NonzeroQ(q): return True return False def replacement611(a, b, c, d, f, g, h, x): q = a**S(2)*f**S(2) - S(2)*a*c*d*f + b**S(2)*d*f + c**S(2)*d**S(2) return Dist(S(1)/q, Int(Simp(a*f**S(2)*g + b*d*f*h - c*d*f*g - f*x*(-a*f*h + b*f*g + c*d*h), x)/(d + f*x**S(2)), x), x) + Dist(S(1)/q, Int(Simp(-a*b*f*h - a*c*f*g + b**S(2)*f*g + c**S(2)*d*g + c*x*(-a*f*h + b*f*g + c*d*h), x)/(a + b*x + c*x**S(2)), x), x) def replacement612(a, c, d, f, g, h, x): return Dist(g, Int(S(1)/((a + c*x**S(2))*sqrt(d + f*x**S(2))), x), x) + Dist(h, Int(x/((a + c*x**S(2))*sqrt(d + f*x**S(2))), x), x) def With613(a, c, d, f, g, h, x): q = Rt(-a*c, S(2)) return -Dist((c*g - h*q)/(S(2)*q), Int(S(1)/(sqrt(d + f*x**S(2))*(c*x + q)), x), x) - Dist((c*g + h*q)/(S(2)*q), Int(S(1)/(sqrt(d + f*x**S(2))*(-c*x + q)), x), x) def replacement614(a, b, c, d, e, f, g, h, x): return Dist(-S(2)*g, Subst(Int(S(1)/(-a*e + b*d - b*x**S(2)), x), x, sqrt(d + e*x + f*x**S(2))), x) def replacement615(a, b, c, d, e, f, g, h, x): return Dist(h/(S(2)*f), Int((e + S(2)*f*x)/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) - Dist((e*h - S(2)*f*g)/(S(2)*f), Int(S(1)/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) def replacement616(a, b, c, d, e, f, x): return Dist(-S(2)*e, Subst(Int((-d*x**S(2) + S(1))/(-b*f + c*e + d**S(2)*x**S(4)*(-b*f + c*e) - e*x**S(2)*(S(2)*a*f - b*e + S(2)*c*d)), x), x, (S(1) + x*(e + sqrt(-S(4)*d*f + e**S(2)))/(S(2)*d))/sqrt(d + e*x + f*x**S(2))), x) def replacement617(a, b, c, d, e, f, g, h, x): return Dist(g, Subst(Int(S(1)/(a + x**S(2)*(-a*f + c*d)), x), x, x/sqrt(d + e*x + f*x**S(2))), x) def replacement618(a, b, c, d, e, f, g, h, x): return Dist(h/e, Int((S(2)*d + e*x)/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) - Dist((S(2)*d*h - e*g)/e, Int(S(1)/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) def replacement619(a, b, c, d, e, f, g, h, x): return Dist(-S(2)*g*(-S(2)*a*h + b*g), Subst(Int(S(1)/Simp(g*(-S(4)*a*c + b**S(2))*(-S(2)*a*h + b*g) - x**S(2)*(-a*e + b*d), x), x), x, Simp(-S(2)*a*h + b*g - x*(b*h - S(2)*c*g), x)/sqrt(d + e*x + f*x**S(2))), x) def replacement620(a, c, d, e, f, g, h, x): return Dist(-S(2)*a*g*h, Subst(Int(S(1)/Simp(S(2)*a**S(2)*c*g*h + a*e*x**S(2), x), x), x, Simp(a*h - c*g*x, x)/sqrt(d + e*x + f*x**S(2))), x) def replacement621(a, b, c, d, f, g, h, x): return Dist(-S(2)*g*(-S(2)*a*h + b*g), Subst(Int(S(1)/Simp(-b*d*x**S(2) + g*(-S(4)*a*c + b**S(2))*(-S(2)*a*h + b*g), x), x), x, Simp(-S(2)*a*h + b*g - x*(b*h - S(2)*c*g), x)/sqrt(d + f*x**S(2))), x) def With622(a, b, c, d, e, f, g, h, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist((S(2)*c*g - h*(b - q))/q, Int(S(1)/((b + S(2)*c*x - q)*sqrt(d + e*x + f*x**S(2))), x), x) - Dist((S(2)*c*g - h*(b + q))/q, Int(S(1)/((b + S(2)*c*x + q)*sqrt(d + e*x + f*x**S(2))), x), x) def With623(a, c, d, e, f, g, h, x): q = Rt(-a*c, S(2)) return Dist(-c*g/(S(2)*q) + h/S(2), Int(S(1)/((c*x + q)*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(c*g/(S(2)*q) + h/S(2), Int(S(1)/((c*x - q)*sqrt(d + e*x + f*x**S(2))), x), x) def With624(a, b, c, d, f, g, h, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist((S(2)*c*g - h*(b - q))/q, Int(S(1)/(sqrt(d + f*x**S(2))*(b + S(2)*c*x - q)), x), x) - Dist((S(2)*c*g - h*(b + q))/q, Int(S(1)/(sqrt(d + f*x**S(2))*(b + S(2)*c*x + q)), x), x) def With625(a, b, c, d, e, f, g, h, x): q = Rt(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2), S(2)) return Dist(S(1)/(S(2)*q), Int(Simp(-g*(-a*f + c*d - q) + h*(-a*e + b*d) - x*(g*(-b*f + c*e) - h*(-a*f + c*d + q)), x)/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) - Dist(S(1)/(S(2)*q), Int(Simp(-g*(-a*f + c*d + q) + h*(-a*e + b*d) - x*(g*(-b*f + c*e) - h*(-a*f + c*d - q)), x)/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) def With626(a, c, d, e, f, g, h, x): q = Rt(a*c*e**S(2) + (-a*f + c*d)**S(2), S(2)) return Dist(S(1)/(S(2)*q), Int(Simp(-a*e*h - g*(-a*f + c*d - q) + x*(-c*e*g + h*(-a*f + c*d + q)), x)/((a + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) - Dist(S(1)/(S(2)*q), Int(Simp(-a*e*h - g*(-a*f + c*d + q) + x*(-c*e*g + h*(-a*f + c*d - q)), x)/((a + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) def With627(a, b, c, d, f, g, h, x): q = Rt(b**S(2)*d*f + (-a*f + c*d)**S(2), S(2)) return Dist(S(1)/(S(2)*q), Int(Simp(b*d*h - g*(-a*f + c*d - q) + x*(b*f*g + h*(-a*f + c*d + q)), x)/(sqrt(d + f*x**S(2))*(a + b*x + c*x**S(2))), x), x) - Dist(S(1)/(S(2)*q), Int(Simp(b*d*h - g*(-a*f + c*d + q) + x*(b*f*g + h*(-a*f + c*d - q)), x)/(sqrt(d + f*x**S(2))*(a + b*x + c*x**S(2))), x), x) def With628(a, b, c, d, e, f, g, h, x): s = Rt(-S(4)*a*c + b**S(2), S(2)) t = Rt(-S(4)*d*f + e**S(2), S(2)) return Dist(sqrt(S(2)*a + x*(b + s))*sqrt(S(2)*d + x*(e + t))*sqrt(b + S(2)*c*x + s)*sqrt(e + S(2)*f*x + t)/(sqrt(a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), Int((g + h*x)/(sqrt(S(2)*a + x*(b + s))*sqrt(S(2)*d + x*(e + t))*sqrt(b + S(2)*c*x + s)*sqrt(e + S(2)*f*x + t)), x), x) def With629(a, b, c, d, f, g, h, x): s = Rt(-S(4)*a*c + b**S(2), S(2)) t = Rt(-S(4)*d*f, S(2)) return Dist(sqrt(S(2)*a + x*(b + s))*sqrt(S(2)*d + t*x)*sqrt(S(2)*f*x + t)*sqrt(b + S(2)*c*x + s)/(sqrt(d + f*x**S(2))*sqrt(a + b*x + c*x**S(2))), Int((g + h*x)/(sqrt(S(2)*a + x*(b + s))*sqrt(S(2)*d + t*x)*sqrt(S(2)*f*x + t)*sqrt(b + S(2)*c*x + s)), x), x) def With630(a, b, c, d, e, f, g, h, x): q = S(3)**(S(2)/3)*(-c*h**S(2)/(-b*h + S(2)*c*g)**S(2))**(S(1)/3) return -Simp(S(3)*h*q*log((-S(3)*h*(b + S(2)*c*x)/(-b*h + S(2)*c*g) + S(1))**(S(2)/3) + S(2)**(S(1)/3)*(S(3)*h*(b + S(2)*c*x)/(-b*h + S(2)*c*g) + S(1))**(S(1)/3))/(S(2)*f), x) + Simp(h*q*log(d + e*x + f*x**S(2))/(S(2)*f), x) + Simp(sqrt(S(3))*h*q*ArcTan(-S(2)**(S(2)/3)*sqrt(S(3))*(-S(3)*h*(b + S(2)*c*x)/(-b*h + S(2)*c*g) + S(1))**(S(2)/3)/(S(3)*(S(3)*h*(b + S(2)*c*x)/(-b*h + S(2)*c*g) + S(1))**(S(1)/3)) + sqrt(S(3))/S(3))/f, x) def replacement631(a, c, d, f, g, h, x): return Simp(S(2)**(S(1)/3)*h*log(d + f*x**S(2))/(S(4)*a**(S(1)/3)*f), x) - Simp(S(3)*S(2)**(S(1)/3)*h*log((S(1) - S(3)*h*x/g)**(S(2)/3) + S(2)**(S(1)/3)*(S(1) + S(3)*h*x/g)**(S(1)/3))/(S(4)*a**(S(1)/3)*f), x) + Simp(S(2)**(S(1)/3)*sqrt(S(3))*h*ArcTan(-S(2)**(S(2)/3)*sqrt(S(3))*(S(1) - S(3)*h*x/g)**(S(2)/3)/(S(3)*(S(1) + S(3)*h*x/g)**(S(1)/3)) + sqrt(S(3))/S(3))/(S(2)*a**(S(1)/3)*f), x) def With632(a, b, c, d, e, f, g, h, x): q = -c/(-S(4)*a*c + b**S(2)) return Dist((q*(a + b*x + c*x**S(2)))**(S(1)/3)/(a + b*x + c*x**S(2))**(S(1)/3), Int((g + h*x)/((d + e*x + f*x**S(2))*(a*q + b*q*x + c*q*x**S(2))**(S(1)/3)), x), x) def replacement633(a, c, d, f, g, h, x): return Dist((S(1) + c*x**S(2)/a)**(S(1)/3)/(a + c*x**S(2))**(S(1)/3), Int((g + h*x)/((S(1) + c*x**S(2)/a)**(S(1)/3)*(d + f*x**S(2))), x), x) def replacement634(a, b, c, d, e, f, g, h, p, q, x): return Int((g + h*x)*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x) def replacement635(a, c, d, e, f, g, h, p, q, x): return Int((a + c*x**S(2))**p*(g + h*x)*(d + e*x + f*x**S(2))**q, x) def replacement636(a, b, c, d, e, f, g, h, m, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((g + h*x)**m*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement637(a, c, d, e, f, g, h, m, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + c*x**S(2))**p*(g + h*x)**m*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement638(m, p, q, u, v, x, z): return Int(ExpandToSum(u, x)**p*ExpandToSum(v, x)**q*ExpandToSum(z, x)**m, x) def replacement639(a, b, c, d, e, f, g, h, i, m, n, p, q, x): return Int((h + i*x)**q*(d*f + e*g*x**S(2))**m*(a + b*x + c*x**S(2))**p, x) def replacement640(a, b, c, d, e, f, g, h, i, m, n, p, q, x): return Int(ExpandIntegrand((d + e*x)**m*(f + g*x)**n*(h + i*x)**q*(a + b*x + c*x**S(2))**p, x), x) def replacement641(a, b, c, d, e, f, g, h, i, m, n, p, q, x): return Dist((d + e*x)**FracPart(m)*(f + g*x)**FracPart(m)*(d*f + e*g*x**S(2))**(-FracPart(m)), Int((h + i*x)**q*(d*f + e*g*x**S(2))**m*(a + b*x + c*x**S(2))**p, x), x) def replacement642(A, B, C, a, b, c, d, e, f, p, q, x): return Dist((c/f)**p, Int((A + B*x + C*x**S(2))*(d + e*x + f*x**S(2))**(p + q), x), x) def replacement643(A, C, a, b, c, d, e, f, p, q, x): return Dist((c/f)**p, Int((A + C*x**S(2))*(d + e*x + f*x**S(2))**(p + q), x), x) def replacement644(A, B, C, a, b, c, d, e, f, p, q, x): return Dist(a**IntPart(p)*d**(-IntPart(p))*(a + b*x + c*x**S(2))**FracPart(p)*(d + e*x + f*x**S(2))**(-FracPart(p)), Int((A + B*x + C*x**S(2))*(d + e*x + f*x**S(2))**(p + q), x), x) def replacement645(A, C, a, b, c, d, e, f, p, q, x): return Dist(a**IntPart(p)*d**(-IntPart(p))*(a + b*x + c*x**S(2))**FracPart(p)*(d + e*x + f*x**S(2))**(-FracPart(p)), Int((A + C*x**S(2))*(d + e*x + f*x**S(2))**(p + q), x), x) def replacement646(A, B, C, a, b, c, d, e, f, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((b + S(2)*c*x)**(S(2)*p)*(A + B*x + C*x**S(2))*(d + e*x + f*x**S(2))**q, x), x) def replacement647(A, C, a, b, c, d, e, f, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((A + C*x**S(2))*(b + S(2)*c*x)**(S(2)*p)*(d + e*x + f*x**S(2))**q, x), x) def replacement648(A, B, C, a, b, c, d, f, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((b + S(2)*c*x)**(S(2)*p)*(d + f*x**S(2))**q*(A + B*x + C*x**S(2)), x), x) def replacement649(A, C, a, b, c, d, f, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x)**(-S(2)*FracPart(p))*(a + b*x + c*x**S(2))**FracPart(p), Int((A + C*x**S(2))*(b + S(2)*c*x)**(S(2)*p)*(d + f*x**S(2))**q, x), x) def replacement650(A, B, C, a, b, c, d, e, f, p, q, x): return Int(ExpandIntegrand((A + B*x + C*x**S(2))*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x) def replacement651(A, C, a, b, c, d, e, f, p, q, x): return Int(ExpandIntegrand((A + C*x**S(2))*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x) def replacement652(A, B, C, a, c, d, e, f, p, q, x): return Int(ExpandIntegrand((a + c*x**S(2))**p*(A + B*x + C*x**S(2))*(d + e*x + f*x**S(2))**q, x), x) def replacement653(A, C, a, c, d, e, f, p, q, x): return Int(ExpandIntegrand((A + C*x**S(2))*(a + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x) def replacement654(A, B, C, a, b, c, d, e, f, p, q, x): return -Dist(S(1)/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(-1))*Simp(-d*(C*(S(2)*a*c - b**S(2)*(p + S(2))) + c*(S(2)*p + S(3))*(-S(2)*A*c + B*b)) + e*q*(A*b*c - S(2)*B*a*c + C*a*b) - f*x**S(2)*(C*(S(2)*a*c*(S(2)*q + S(1)) - b**S(2)*(p + S(2)*q + S(2))) + c*(-S(2)*A*c + B*b)*(S(2)*p + S(2)*q + S(3))) + x*(-e*(C*(S(2)*a*c*(q + S(1)) - b**S(2)*(p + q + S(2))) + c*(-S(2)*A*c + B*b)*(S(2)*p + q + S(3))) + S(2)*f*q*(A*b*c - S(2)*B*a*c + C*a*b)), x), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*(A*b*c - S(2)*B*a*c + C*a*b - x*(-C*(-S(2)*a*c + b**S(2)) + c*(-S(2)*A*c + B*b)))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement655(A, C, a, b, c, d, e, f, p, q, x): return -Dist(S(1)/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(-1))*Simp(A*c*(b*e*q + S(2)*c*d*(S(2)*p + S(3))) - C*(-a*b*e*q + S(2)*a*c*d - b**S(2)*d*(p + S(2))) - f*x**S(2)*(-S(2)*A*c**S(2)*(S(2)*p + S(2)*q + S(3)) + C*(S(2)*a*c*(S(2)*q + S(1)) - b**S(2)*(p + S(2)*q + S(2)))) + x*(S(2)*A*c*(b*f*q + c*e*(S(2)*p + q + S(3))) + C*(S(2)*a*b*f*q - S(2)*a*c*e*(q + S(1)) + b**S(2)*e*(p + q + S(2)))), x), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*(A*b*c + C*a*b + x*(S(2)*A*c**S(2) + C*(-S(2)*a*c + b**S(2))))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement656(A, B, C, a, c, d, e, f, p, q, x): return -Dist(-S(1)/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(-1))*Simp(A*c*d*(S(2)*p + S(3)) - a*(B*e*q + C*d) - f*x**S(2)*(-A*c*(S(2)*p + S(2)*q + S(3)) + C*a*(S(2)*q + S(1))) + x*(A*c*e*(S(2)*p + q + S(3)) - a*(S(2)*B*f*q + C*e*(q + S(1)))), x), x), x) + Simp((a + c*x**S(2))**(p + S(1))*(B*a - x*(A*c - C*a))*(d + e*x + f*x**S(2))**q/(S(2)*a*c*(p + S(1))), x) def replacement657(A, C, a, c, d, e, f, p, q, x): return Dist(S(1)/(S(2)*a*c*(p + S(1))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(-1))*Simp(A*c*d*(S(2)*p + S(3)) - C*a*d - f*x**S(2)*(-A*c*(S(2)*p + S(2)*q + S(3)) + C*a*(S(2)*q + S(1))) + x*(A*c*e*(S(2)*p + q + S(3)) - C*a*e*(q + S(1))), x), x), x) - Simp(x*(a + c*x**S(2))**(p + S(1))*(A*c - C*a)*(d + e*x + f*x**S(2))**q/(S(2)*a*c*(p + S(1))), x) def replacement658(A, B, C, a, b, c, d, f, p, q, x): return -Dist(S(1)/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + f*x**S(2))**(q + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(-d*(C*(S(2)*a*c - b**S(2)*(p + S(2))) + c*(S(2)*p + S(3))*(-S(2)*A*c + B*b)) + S(2)*f*q*x*(A*b*c - S(2)*B*a*c + C*a*b) - f*x**S(2)*(C*(S(2)*a*c*(S(2)*q + S(1)) - b**S(2)*(p + S(2)*q + S(2))) + c*(-S(2)*A*c + B*b)*(S(2)*p + S(2)*q + S(3))), x), x), x) + Simp((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(1))*(A*b*c - S(2)*B*a*c + C*a*b - x*(-C*(-S(2)*a*c + b**S(2)) + c*(-S(2)*A*c + B*b)))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement659(A, C, a, b, c, d, f, p, q, x): return -Dist(S(1)/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((d + f*x**S(2))**(q + S(-1))*(a + b*x + c*x**S(2))**(p + S(1))*Simp(S(2)*A*c**S(2)*d*(S(2)*p + S(3)) - C*(S(2)*a*c*d - b**S(2)*d*(p + S(2))) - f*x**S(2)*(-S(2)*A*c**S(2)*(S(2)*p + S(2)*q + S(3)) + C*(S(2)*a*c*(S(2)*q + S(1)) - b**S(2)*(p + S(2)*q + S(2)))) + x*(S(2)*A*b*c*f*q + S(2)*C*a*b*f*q), x), x), x) + Simp((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(1))*(A*b*c + C*a*b + x*(S(2)*A*c**S(2) + C*(-S(2)*a*c + b**S(2))))/(c*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement660(A, B, C, a, b, c, d, e, f, p, q, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*Simp(-c*f*x**S(2)*(S(2)*p + S(2)*q + S(5))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-B*c*e - C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(A*c*e + B*a*f + B*c*d + C*a*e)) - e*((A*b - B*a)*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) + (A*c - C*a)*(S(2)*a*c*e - b*(a*f + c*d)))*(p + q + S(2)) - x*(S(2)*f*((A*b - B*a)*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) + (A*c - C*a)*(S(2)*a*c*e - b*(a*f + c*d)))*(p + q + S(2)) - (b*f*(p + S(1)) - c*e*(S(2)*p + q + S(4)))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-B*c*e - C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(A*c*e + B*a*f + B*c*d + C*a*e))) + (p + S(1))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))*(-S(2)*A*c + B*b - S(2)*C*a) + (a*f*(p + S(1)) - c*d*(p + S(2)))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-B*c*e - C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(A*c*e + B*a*f + B*c*d + C*a*e)), x), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(1))*(c*x*(A*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) - B*(a*b*f - S(2)*a*c*e + b*c*d) + C*(-a*b*e - S(2)*a*(-a*f + c*d) + b**S(2)*d)) + (A*b - B*a)*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) + (A*c - C*a)*(S(2)*a*c*e - b*(a*f + c*d)))/((p + S(1))*(-S(4)*a*c + b**S(2))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))), x) def replacement661(A, C, a, b, c, d, e, f, p, q, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))), Int((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*Simp(-c*f*x**S(2)*(S(2)*p + S(2)*q + S(5))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(A*c*e + C*a*e)) - e*(A*b*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) + (A*c - C*a)*(S(2)*a*c*e - b*(a*f + c*d)))*(p + q + S(2)) - x*(S(2)*f*(A*b*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) + (A*c - C*a)*(S(2)*a*c*e - b*(a*f + c*d)))*(p + q + S(2)) - (b*f*(p + S(1)) - c*e*(S(2)*p + q + S(4)))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(A*c*e + C*a*e))) + (p + S(1))*(-S(2)*A*c - S(2)*C*a)*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2)) + (a*f*(p + S(1)) - c*d*(p + S(2)))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(A*c*e + C*a*e)), x), x), x) + Simp((a + b*x + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(1))*(A*b*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) + c*x*(A*(b**S(2)*f + S(2)*c**S(2)*d - c*(S(2)*a*f + b*e)) + C*(-a*b*e - S(2)*a*(-a*f + c*d) + b**S(2)*d)) + (A*c - C*a)*(S(2)*a*c*e - b*(a*f + c*d)))/((p + S(1))*(-S(4)*a*c + b**S(2))*(-(-a*e + b*d)*(-b*f + c*e) + (-a*f + c*d)**S(2))), x) def replacement662(A, B, C, a, c, d, e, f, p, q, x): return Dist(-S(1)/(S(4)*a*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*Simp(-c*f*x**S(2)*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-B*c*e - C*a*f + C*c*d))*(S(2)*p + S(2)*q + S(5)) - e*(-B*a*(-S(2)*a*c*f + S(2)*c**S(2)*d) + S(2)*a*c*e*(A*c - C*a))*(p + q + S(2)) - x*(c*e*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-B*c*e - C*a*f + C*c*d))*(S(2)*p + q + S(4)) + S(2)*f*(-B*a*(-S(2)*a*c*f + S(2)*c**S(2)*d) + S(2)*a*c*e*(A*c - C*a))*(p + q + S(2))) + (p + S(1))*(-S(2)*A*c - S(2)*C*a)*(a*c*e**S(2) + (-a*f + c*d)**S(2)) + (S(2)*A*c*(-a*f + c*d) - S(2)*a*(-B*c*e - C*a*f + C*c*d))*(a*f*(p + S(1)) - c*d*(p + S(2))), x), x), x) + Simp(-(a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**(q + S(1))*(-B*a*(-S(2)*a*c*f + S(2)*c**S(2)*d) + S(2)*a*c*e*(A*c - C*a) + c*x*(A*(-S(2)*a*c*f + S(2)*c**S(2)*d) + S(2)*B*a*c*e - S(2)*C*a*(-a*f + c*d)))/(S(4)*a*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2))), x) def replacement663(A, C, a, c, d, e, f, p, q, x): return Dist(-S(1)/(S(4)*a*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2))), Int((a + c*x**S(2))**(p + S(1))*(d + e*x + f*x**S(2))**q*Simp(-S(2)*a*c*e**S(2)*(A*c - C*a)*(p + q + S(2)) - c*f*x**S(2)*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d))*(S(2)*p + S(2)*q + S(5)) - x*(S(4)*a*c*e*f*(A*c - C*a)*(p + q + S(2)) + c*e*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d))*(S(2)*p + q + S(4))) + (p + S(1))*(-S(2)*A*c - S(2)*C*a)*(a*c*e**S(2) + (-a*f + c*d)**S(2)) + (S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d))*(a*f*(p + S(1)) - c*d*(p + S(2))), x), x), x) + Simp(-(a + c*x**S(2))**(p + S(1))*(S(2)*a*c*e*(A*c - C*a) + c*x*(A*(-S(2)*a*c*f + S(2)*c**S(2)*d) - S(2)*C*a*(-a*f + c*d)))*(d + e*x + f*x**S(2))**(q + S(1))/(S(4)*a*c*(p + S(1))*(a*c*e**S(2) + (-a*f + c*d)**S(2))), x) def replacement664(A, B, C, a, b, c, d, f, p, q, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(b**S(2)*d*f + (-a*f + c*d)**S(2))), Int((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(1))*Simp(-c*f*x**S(2)*(S(2)*p + S(2)*q + S(5))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(B*a*f + B*c*d)) - x*(-b*f*(p + S(1))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(B*a*f + B*c*d)) + S(2)*f*(-b*(A*c - C*a)*(a*f + c*d) + (A*b - B*a)*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d))*(p + q + S(2))) + (p + S(1))*(b**S(2)*d*f + (-a*f + c*d)**S(2))*(-S(2)*A*c + B*b - S(2)*C*a) + (a*f*(p + S(1)) - c*d*(p + S(2)))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d) - b*(B*a*f + B*c*d)), x), x), x) + Simp((d + f*x**S(2))**(q + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(-b*(A*c - C*a)*(a*f + c*d) + c*x*(A*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d) - B*(a*b*f + b*c*d) + C*(-S(2)*a*(-a*f + c*d) + b**S(2)*d)) + (A*b - B*a)*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d))/((p + S(1))*(-S(4)*a*c + b**S(2))*(b**S(2)*d*f + (-a*f + c*d)**S(2))), x) def replacement665(A, C, a, b, c, d, f, p, q, x): return Dist(S(1)/((p + S(1))*(-S(4)*a*c + b**S(2))*(b**S(2)*d*f + (-a*f + c*d)**S(2))), Int((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(1))*Simp(-c*f*x**S(2)*(S(2)*p + S(2)*q + S(5))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d)) - x*(-b*f*(p + S(1))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d)) + S(2)*f*(A*b*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d) - b*(A*c - C*a)*(a*f + c*d))*(p + q + S(2))) + (p + S(1))*(-S(2)*A*c - S(2)*C*a)*(b**S(2)*d*f + (-a*f + c*d)**S(2)) + (a*f*(p + S(1)) - c*d*(p + S(2)))*(S(2)*A*c*(-a*f + c*d) - S(2)*a*(-C*a*f + C*c*d) + b**S(2)*(A*f + C*d)), x), x), x) + Simp((d + f*x**S(2))**(q + S(1))*(a + b*x + c*x**S(2))**(p + S(1))*(A*b*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d) - b*(A*c - C*a)*(a*f + c*d) + c*x*(A*(-S(2)*a*c*f + b**S(2)*f + S(2)*c**S(2)*d) + C*(-S(2)*a*(-a*f + c*d) + b**S(2)*d)))/((p + S(1))*(-S(4)*a*c + b**S(2))*(b**S(2)*d*f + (-a*f + c*d)**S(2))), x) def replacement666(A, B, C, a, b, c, d, e, f, p, q, x): return -Dist(S(1)/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), Int((a + b*x + c*x**S(2))**(p + S(-1))*(d + e*x + f*x**S(2))**q*Simp(p*(-a*e + b*d)*(C*(q + S(1))*(-b*f + c*e) - c*(-B*f + C*e)*(S(2)*p + S(2)*q + S(3))) + x**S(2)*(p*(-b*f + c*e)*(C*(q + S(1))*(-b*f + c*e) - c*(-B*f + C*e)*(S(2)*p + S(2)*q + S(3))) + (C*f**S(2)*p*(-S(4)*a*c + b**S(2)) - c**S(2)*(C*(-S(4)*d*f + e**S(2))*(S(2)*p + q + S(2)) + f*(S(2)*p + S(2)*q + S(3))*(S(2)*A*f - B*e + S(2)*C*d)))*(p + q + S(1))) + x*(S(2)*p*(-a*f + c*d)*(C*(q + S(1))*(-b*f + c*e) - c*(-B*f + C*e)*(S(2)*p + S(2)*q + S(3))) + (C*e*f*p*(-S(4)*a*c + b**S(2)) - b*c*(C*(-S(4)*d*f + e**S(2))*(S(2)*p + q + S(2)) + f*(S(2)*p + S(2)*q + S(3))*(S(2)*A*f - B*e + S(2)*C*d)))*(p + q + S(1))) + (C*b**S(2)*d*f*p + a*c*(C*(S(2)*d*f - e**S(2)*(S(2)*p + q + S(2))) + f*(-S(2)*A*f + B*e)*(S(2)*p + S(2)*q + S(3))))*(p + q + S(1)), x), x), x) + Simp((a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**(q + S(1))*(B*c*f*(S(2)*p + S(2)*q + S(3)) + S(2)*C*c*f*x*(p + q + S(1)) + C*(b*f*p - c*e*(S(2)*p + q + S(2))))/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), x) def replacement667(A, C, a, b, c, d, e, f, p, q, x): return -Dist(S(1)/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), Int((a + b*x + c*x**S(2))**(p + S(-1))*(d + e*x + f*x**S(2))**q*Simp(p*(-a*e + b*d)*(-C*c*e*(S(2)*p + S(2)*q + S(3)) + C*(q + S(1))*(-b*f + c*e)) + x**S(2)*(p*(-b*f + c*e)*(-C*c*e*(S(2)*p + S(2)*q + S(3)) + C*(q + S(1))*(-b*f + c*e)) + (C*f**S(2)*p*(-S(4)*a*c + b**S(2)) - c**S(2)*(C*(-S(4)*d*f + e**S(2))*(S(2)*p + q + S(2)) + f*(S(2)*A*f + S(2)*C*d)*(S(2)*p + S(2)*q + S(3))))*(p + q + S(1))) + x*(S(2)*p*(-a*f + c*d)*(-C*c*e*(S(2)*p + S(2)*q + S(3)) + C*(q + S(1))*(-b*f + c*e)) + (C*e*f*p*(-S(4)*a*c + b**S(2)) - b*c*(C*(-S(4)*d*f + e**S(2))*(S(2)*p + q + S(2)) + f*(S(2)*A*f + S(2)*C*d)*(S(2)*p + S(2)*q + S(3))))*(p + q + S(1))) + (C*b**S(2)*d*f*p + a*c*(-S(2)*A*f**S(2)*(S(2)*p + S(2)*q + S(3)) + C*(S(2)*d*f - e**S(2)*(S(2)*p + q + S(2)))))*(p + q + S(1)), x), x), x) + Simp((S(2)*C*c*f*x*(p + q + S(1)) + C*(b*f*p - c*e*(S(2)*p + q + S(2))))*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**(q + S(1))/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), x) def replacement668(A, B, C, a, c, d, e, f, p, q, x): return -Dist(S(1)/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x + f*x**S(2))**q*Simp(a*c*(C*(S(2)*d*f - e**S(2)*(S(2)*p + q + S(2))) + f*(-S(2)*A*f + B*e)*(S(2)*p + S(2)*q + S(3)))*(p + q + S(1)) - a*e*p*(C*c*e*(q + S(1)) - c*(-B*f + C*e)*(S(2)*p + S(2)*q + S(3))) + x**S(2)*(c*e*p*(C*c*e*(q + S(1)) - c*(-B*f + C*e)*(S(2)*p + S(2)*q + S(3))) + (-S(4)*C*a*c*f**S(2)*p - c**S(2)*(C*(-S(4)*d*f + e**S(2))*(S(2)*p + q + S(2)) + f*(S(2)*p + S(2)*q + S(3))*(S(2)*A*f - B*e + S(2)*C*d)))*(p + q + S(1))) + x*(-S(4)*C*a*c*e*f*p*(p + q + S(1)) + S(2)*p*(-a*f + c*d)*(C*c*e*(q + S(1)) - c*(-B*f + C*e)*(S(2)*p + S(2)*q + S(3)))), x), x), x) + Simp((a + c*x**S(2))**p*(d + e*x + f*x**S(2))**(q + S(1))*(B*c*f*(S(2)*p + S(2)*q + S(3)) - C*c*e*(S(2)*p + q + S(2)) + S(2)*C*c*f*x*(p + q + S(1)))/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), x) def replacement669(A, C, a, c, d, e, f, p, q, x): return -Dist(S(1)/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), Int((a + c*x**S(2))**(p + S(-1))*(d + e*x + f*x**S(2))**q*Simp(a*c*(-S(2)*A*f**S(2)*(S(2)*p + S(2)*q + S(3)) + C*(S(2)*d*f - e**S(2)*(S(2)*p + q + S(2))))*(p + q + S(1)) - a*e*p*(C*c*e*(q + S(1)) - C*c*e*(S(2)*p + S(2)*q + S(3))) + x**S(2)*(c*e*p*(C*c*e*(q + S(1)) - C*c*e*(S(2)*p + S(2)*q + S(3))) + (-S(4)*C*a*c*f**S(2)*p - c**S(2)*(C*(-S(4)*d*f + e**S(2))*(S(2)*p + q + S(2)) + f*(S(2)*A*f + S(2)*C*d)*(S(2)*p + S(2)*q + S(3))))*(p + q + S(1))) + x*(-S(4)*C*a*c*e*f*p*(p + q + S(1)) + S(2)*p*(-a*f + c*d)*(C*c*e*(q + S(1)) - C*c*e*(S(2)*p + S(2)*q + S(3)))), x), x), x) + Simp((a + c*x**S(2))**p*(-C*c*e*(S(2)*p + q + S(2)) + S(2)*C*c*f*x*(p + q + S(1)))*(d + e*x + f*x**S(2))**(q + S(1))/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), x) def replacement670(A, B, C, a, b, c, d, f, p, q, x): return -Dist(S(1)/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), Int((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(-1))*Simp(b*d*p*(B*c*f*(S(2)*p + S(2)*q + S(3)) - C*b*f*(q + S(1))) + x**S(2)*(-b*f*p*(B*c*f*(S(2)*p + S(2)*q + S(3)) - C*b*f*(q + S(1))) + (C*f**S(2)*p*(-S(4)*a*c + b**S(2)) - c**S(2)*(-S(4)*C*d*f*(S(2)*p + q + S(2)) + f*(S(2)*A*f + S(2)*C*d)*(S(2)*p + S(2)*q + S(3))))*(p + q + S(1))) + x*(-b*c*(-S(4)*C*d*f*(S(2)*p + q + S(2)) + f*(S(2)*A*f + S(2)*C*d)*(S(2)*p + S(2)*q + S(3)))*(p + q + S(1)) + S(2)*p*(-a*f + c*d)*(B*c*f*(S(2)*p + S(2)*q + S(3)) - C*b*f*(q + S(1)))) + (C*b**S(2)*d*f*p + a*c*(-S(2)*A*f**S(2)*(S(2)*p + S(2)*q + S(3)) + S(2)*C*d*f))*(p + q + S(1)), x), x), x) + Simp((d + f*x**S(2))**(q + S(1))*(a + b*x + c*x**S(2))**p*(B*c*f*(S(2)*p + S(2)*q + S(3)) + C*b*f*p + S(2)*C*c*f*x*(p + q + S(1)))/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), x) def replacement671(A, C, a, b, c, d, f, p, q, x): return -Dist(S(1)/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), Int((d + f*x**S(2))**q*(a + b*x + c*x**S(2))**(p + S(-1))*Simp(-C*b**S(2)*d*f*p*(q + S(1)) + x**S(2)*(C*b**S(2)*f**S(2)*p*(q + S(1)) + (C*f**S(2)*p*(-S(4)*a*c + b**S(2)) - c**S(2)*(-S(4)*C*d*f*(S(2)*p + q + S(2)) + f*(S(2)*A*f + S(2)*C*d)*(S(2)*p + S(2)*q + S(3))))*(p + q + S(1))) + x*(-S(2)*C*b*f*p*(q + S(1))*(-a*f + c*d) - b*c*(-S(4)*C*d*f*(S(2)*p + q + S(2)) + f*(S(2)*A*f + S(2)*C*d)*(S(2)*p + S(2)*q + S(3)))*(p + q + S(1))) + (C*b**S(2)*d*f*p + a*c*(-S(2)*A*f**S(2)*(S(2)*p + S(2)*q + S(3)) + S(2)*C*d*f))*(p + q + S(1)), x), x), x) + Simp((d + f*x**S(2))**(q + S(1))*(C*b*f*p + S(2)*C*c*f*x*(p + q + S(1)))*(a + b*x + c*x**S(2))**p/(S(2)*c*f**S(2)*(p + q + S(1))*(S(2)*p + S(2)*q + S(3))), x) def With672(A, B, C, a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = a**S(2)*f**S(2) - a*b*e*f - S(2)*a*c*d*f + a*c*e**S(2) + b**S(2)*d*f - b*c*d*e + c**S(2)*d**S(2) if NonzeroQ(q): return True return False def replacement672(A, B, C, a, b, c, d, e, f, x): q = a**S(2)*f**S(2) - a*b*e*f - S(2)*a*c*d*f + a*c*e**S(2) + b**S(2)*d*f - b*c*d*e + c**S(2)*d**S(2) return Dist(S(1)/q, Int((-A*a*c*f + A*b**S(2)*f - A*b*c*e + A*c**S(2)*d - B*a*b*f + B*a*c*e + C*a**S(2)*f - C*a*c*d + c*x*(A*b*f - A*c*e - B*a*f + B*c*d + C*a*e - C*b*d))/(a + b*x + c*x**S(2)), x), x) + Dist(S(1)/q, Int((A*a*f**S(2) - A*b*e*f - A*c*d*f + A*c*e**S(2) + B*b*d*f - B*c*d*e - C*a*d*f + C*c*d**S(2) - f*x*(A*b*f - A*c*e - B*a*f + B*c*d + C*a*e - C*b*d))/(d + e*x + f*x**S(2)), x), x) def With673(A, C, a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = a**S(2)*f**S(2) - a*b*e*f - S(2)*a*c*d*f + a*c*e**S(2) + b**S(2)*d*f - b*c*d*e + c**S(2)*d**S(2) if NonzeroQ(q): return True return False def replacement673(A, C, a, b, c, d, e, f, x): q = a**S(2)*f**S(2) - a*b*e*f - S(2)*a*c*d*f + a*c*e**S(2) + b**S(2)*d*f - b*c*d*e + c**S(2)*d**S(2) return Dist(S(1)/q, Int((-A*a*c*f + A*b**S(2)*f - A*b*c*e + A*c**S(2)*d + C*a**S(2)*f - C*a*c*d + c*x*(A*b*f - A*c*e + C*a*e - C*b*d))/(a + b*x + c*x**S(2)), x), x) + Dist(S(1)/q, Int((A*a*f**S(2) - A*b*e*f - A*c*d*f + A*c*e**S(2) - C*a*d*f + C*c*d**S(2) - f*x*(A*b*f - A*c*e + C*a*e - C*b*d))/(d + e*x + f*x**S(2)), x), x) def With674(A, B, C, a, b, c, d, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = a**S(2)*f**S(2) - S(2)*a*c*d*f + b**S(2)*d*f + c**S(2)*d**S(2) if NonzeroQ(q): return True return False def replacement674(A, B, C, a, b, c, d, f, x): q = a**S(2)*f**S(2) - S(2)*a*c*d*f + b**S(2)*d*f + c**S(2)*d**S(2) return Dist(S(1)/q, Int((A*a*f**S(2) - A*c*d*f + B*b*d*f - C*a*d*f + C*c*d**S(2) - f*x*(A*b*f - B*a*f + B*c*d - C*b*d))/(d + f*x**S(2)), x), x) + Dist(S(1)/q, Int((-A*a*c*f + A*b**S(2)*f + A*c**S(2)*d - B*a*b*f + C*a**S(2)*f - C*a*c*d + c*x*(A*b*f - B*a*f + B*c*d - C*b*d))/(a + b*x + c*x**S(2)), x), x) def With675(A, C, a, b, c, d, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = a**S(2)*f**S(2) - S(2)*a*c*d*f + b**S(2)*d*f + c**S(2)*d**S(2) if NonzeroQ(q): return True return False def replacement675(A, C, a, b, c, d, f, x): q = a**S(2)*f**S(2) - S(2)*a*c*d*f + b**S(2)*d*f + c**S(2)*d**S(2) return Dist(S(1)/q, Int((A*a*f**S(2) - A*c*d*f - C*a*d*f + C*c*d**S(2) - f*x*(A*b*f - C*b*d))/(d + f*x**S(2)), x), x) + Dist(S(1)/q, Int((-A*a*c*f + A*b**S(2)*f + A*c**S(2)*d + C*a**S(2)*f - C*a*c*d + c*x*(A*b*f - C*b*d))/(a + b*x + c*x**S(2)), x), x) def replacement676(A, B, C, a, b, c, d, e, f, x): return Dist(S(1)/c, Int((A*c - C*a + x*(B*c - C*b))/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(C/c, Int(S(1)/sqrt(d + e*x + f*x**S(2)), x), x) def replacement677(A, C, a, b, c, d, e, f, x): return Dist(S(1)/c, Int((A*c - C*a - C*b*x)/((a + b*x + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(C/c, Int(S(1)/sqrt(d + e*x + f*x**S(2)), x), x) def replacement678(A, B, C, a, c, d, e, f, x): return Dist(S(1)/c, Int((A*c + B*c*x - C*a)/((a + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(C/c, Int(S(1)/sqrt(d + e*x + f*x**S(2)), x), x) def replacement679(A, C, a, c, d, e, f, x): return Dist(C/c, Int(S(1)/sqrt(d + e*x + f*x**S(2)), x), x) + Dist((A*c - C*a)/c, Int(S(1)/((a + c*x**S(2))*sqrt(d + e*x + f*x**S(2))), x), x) def replacement680(A, B, C, a, b, c, d, f, x): return Dist(S(1)/c, Int((A*c - C*a + x*(B*c - C*b))/(sqrt(d + f*x**S(2))*(a + b*x + c*x**S(2))), x), x) + Dist(C/c, Int(S(1)/sqrt(d + f*x**S(2)), x), x) def replacement681(A, C, a, b, c, d, f, x): return Dist(S(1)/c, Int((A*c - C*a - C*b*x)/(sqrt(d + f*x**S(2))*(a + b*x + c*x**S(2))), x), x) + Dist(C/c, Int(S(1)/sqrt(d + f*x**S(2)), x), x) def replacement682(A, B, C, a, b, c, d, e, f, p, q, x): return Int((A + B*x + C*x**S(2))*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x) def replacement683(A, C, a, b, c, d, e, f, p, q, x): return Int((A + C*x**S(2))*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x) def replacement684(A, B, C, a, c, d, e, f, p, q, x): return Int((a + c*x**S(2))**p*(A + B*x + C*x**S(2))*(d + e*x + f*x**S(2))**q, x) def replacement685(A, C, a, c, d, e, f, p, q, x): return Int((A + C*x**S(2))*(a + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x) def replacement686(A, B, C, a, b, c, d, e, f, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((A + B*x + C*x**S(2))*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement687(A, B, a, b, c, d, e, f, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((A + B*x)*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement688(A, C, a, b, c, d, e, f, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((A + C*x**S(2))*(a + b*x + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement689(A, B, C, a, c, d, e, f, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + c*x**S(2))**p*(A + B*x + C*x**S(2))*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement690(A, B, a, c, d, e, f, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((A + B*x)*(a + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x, u), x) def replacement691(A, C, a, c, d, e, f, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((A + C*x**S(2))*(a + c*x**S(2))**p*(d + e*x + f*x**S(2))**q, x), x, u), x)
390adaa4279e95bca7ddec3a9e9f5be2db7aa208628cafcbc4d4ae650e8f9df4
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def binomial_products(): from sympy.integrals.rubi.constraints import cons461, cons3, cons4, cons5, cons462, cons2, cons463, cons56, cons464, cons89, cons465, cons40, cons466, cons150, cons13, cons165, cons467, cons468, cons45, cons450, cons69, cons139, cons469, cons470, cons471, cons472, cons473, cons474, cons475, cons476, cons477, cons478, cons479, cons480, cons481, cons482, cons483, cons484, cons485, cons486, cons107, cons487, cons488, cons489, cons490, cons198, cons491, cons130, cons359, cons492, cons493, cons494, cons495, cons70, cons71, cons57, cons496, cons59, cons60, cons61, cons62, cons497, cons498, cons499, cons500, cons149, cons8, cons19, cons501, cons502, cons503, cons21, cons504, cons505, cons68, cons506, cons507, cons508, cons509, cons20, cons246, cons96, cons510, cons511, cons512, cons513, cons514, cons515, cons516, cons517, cons518, cons519, cons520, cons521, cons522, cons523, cons64, cons524, cons525, cons526, cons527, cons528, cons529, cons530, cons531, cons33, cons532, cons533, cons534, cons535, cons536, cons537, cons538, cons369, cons539, cons540, cons541, cons542, cons358, cons543, cons25, cons544, cons545, cons546, cons547, cons548, cons549, cons550, cons551, cons552, cons553, cons554, cons555, cons556, cons73, cons557, cons29, cons222, cons52, cons558, cons87, cons559, cons397, cons405, cons65, cons560, cons561, cons562, cons563, cons564, cons565, cons566, cons567, cons568, cons569, cons570, cons571, cons72, cons572, cons573, cons574, cons575, cons404, cons576, cons577, cons578, cons407, cons579, cons580, cons581, cons582, cons583, cons179, cons584, cons585, cons119, cons586, cons587, cons588, cons589, cons388, cons590, cons591, cons592, cons593, cons50, cons55, cons594, cons595, cons596, cons597, cons598, cons95, cons599, cons600, cons601, cons602, cons603, cons604, cons605, cons606, cons90, cons607, cons608, cons609, cons610, cons611, cons612, cons613, cons614, cons615, cons616, cons617, cons618, cons619, cons620, cons621, cons622, cons623, cons624, cons625, cons626, cons627, cons628, cons629, cons48, cons630, cons127, cons631, cons632, cons633, cons155, cons634, cons635, cons178, cons636, cons637, cons638, cons639, cons640, cons180, cons641, cons642, cons398, cons643, cons54, cons644, cons645, cons646, cons647, cons648, cons649, cons650, cons651, cons652, cons653, cons654, cons655, cons656, cons657, cons658, cons210, cons659, cons660, cons661, cons662, cons663, cons382, cons664, cons665 pattern692 = Pattern(Integral((x_**n_*WC('b', S(1)))**p_, x_), cons3, cons4, cons5, cons461) rule692 = ReplacementRule(pattern692, replacement692) pattern693 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons4, cons5, cons462) rule693 = ReplacementRule(pattern693, replacement693) pattern694 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons4, cons5, cons463, cons56) rule694 = ReplacementRule(pattern694, replacement694) pattern695 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons4, cons464) rule695 = ReplacementRule(pattern695, replacement695) pattern696 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons89, cons465, cons40) rule696 = ReplacementRule(pattern696, replacement696) pattern697 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons466) rule697 = ReplacementRule(pattern697, replacement697) pattern698 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons150, cons13, cons165, cons467) rule698 = ReplacementRule(pattern698, replacement698) pattern699 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-5)/4), x_), cons2, cons3, cons468, cons45) rule699 = ReplacementRule(pattern699, replacement699) pattern700 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-5)/4), x_), cons2, cons3, cons468, cons450) rule700 = ReplacementRule(pattern700, replacement700) pattern701 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-7)/6), x_), cons2, cons3, cons69) rule701 = ReplacementRule(pattern701, replacement701) pattern702 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons150, cons13, cons139, cons467) rule702 = ReplacementRule(pattern702, replacement702) pattern703 = Pattern(Integral(S(1)/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons69) rule703 = ReplacementRule(pattern703, replacement703) pattern704 = Pattern(Integral(S(1)/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons469, cons470) rule704 = ReplacementRule(pattern704, With704) pattern705 = Pattern(Integral(S(1)/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons469, cons471) rule705 = ReplacementRule(pattern705, With705) pattern706 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons470, cons472) rule706 = ReplacementRule(pattern706, replacement706) pattern707 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons470, cons473) rule707 = ReplacementRule(pattern707, replacement707) pattern708 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons470) rule708 = ReplacementRule(pattern708, replacement708) pattern709 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons471, cons474) rule709 = ReplacementRule(pattern709, replacement709) pattern710 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons471, cons475) rule710 = ReplacementRule(pattern710, replacement710) pattern711 = Pattern(Integral(S(1)/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons471) rule711 = ReplacementRule(pattern711, replacement711) pattern712 = Pattern(Integral(S(1)/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons476, cons470) rule712 = ReplacementRule(pattern712, With712) pattern713 = Pattern(Integral(S(1)/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons476, cons471) rule713 = ReplacementRule(pattern713, With713) pattern714 = Pattern(Integral(S(1)/(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons477) rule714 = ReplacementRule(pattern714, With714) pattern715 = Pattern(Integral(S(1)/(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons478) rule715 = ReplacementRule(pattern715, With715) pattern716 = Pattern(Integral(S(1)/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons479, cons480) rule716 = ReplacementRule(pattern716, With716) pattern717 = Pattern(Integral(S(1)/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons479, cons478) rule717 = ReplacementRule(pattern717, With717) pattern718 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons45, cons481) rule718 = ReplacementRule(pattern718, replacement718) pattern719 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons45, cons482) rule719 = ReplacementRule(pattern719, replacement719) pattern720 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons450) rule720 = ReplacementRule(pattern720, replacement720) pattern721 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons483) rule721 = ReplacementRule(pattern721, With721) pattern722 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons484) rule722 = ReplacementRule(pattern722, With722) pattern723 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons468) rule723 = ReplacementRule(pattern723, With723) pattern724 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons485, cons45) rule724 = ReplacementRule(pattern724, replacement724) pattern725 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons486, cons107, CustomConstraint(With725)) rule725 = ReplacementRule(pattern725, replacement725) pattern726 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons486, cons107) rule726 = ReplacementRule(pattern726, With726) pattern727 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons485, cons450) rule727 = ReplacementRule(pattern727, replacement727) pattern728 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(6)*WC('b', S(1))), x_), cons2, cons3, cons69) rule728 = ReplacementRule(pattern728, With728) pattern729 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(8)*WC('b', S(1))), x_), cons2, cons3, cons69) rule729 = ReplacementRule(pattern729, replacement729) pattern730 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-1)/4), x_), cons2, cons3, cons468) rule730 = ReplacementRule(pattern730, replacement730) pattern731 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-1)/4), x_), cons2, cons3, cons485, cons45) rule731 = ReplacementRule(pattern731, replacement731) pattern732 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-1)/4), x_), cons2, cons3, cons485, cons450) rule732 = ReplacementRule(pattern732, replacement732) pattern733 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-3)/4), x_), cons2, cons3, cons45, cons468) rule733 = ReplacementRule(pattern733, replacement733) pattern734 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-3)/4), x_), cons2, cons3, cons45, cons485) rule734 = ReplacementRule(pattern734, replacement734) pattern735 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-3)/4), x_), cons2, cons3, cons450) rule735 = ReplacementRule(pattern735, replacement735) pattern736 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-1)/3), x_), cons2, cons3, cons69) rule736 = ReplacementRule(pattern736, replacement736) pattern737 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-2)/3), x_), cons2, cons3, cons69) rule737 = ReplacementRule(pattern737, replacement737) pattern738 = Pattern(Integral((a_ + x_**S(4)*WC('b', S(1)))**(S(-3)/4), x_), cons2, cons3, cons69) rule738 = ReplacementRule(pattern738, replacement738) pattern739 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(-1)/6), x_), cons2, cons3, cons69) rule739 = ReplacementRule(pattern739, replacement739) pattern740 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons150, cons13, cons487, cons488, cons489) rule740 = ReplacementRule(pattern740, replacement740) pattern741 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons150, cons13, cons487, cons488, cons490) rule741 = ReplacementRule(pattern741, replacement741) pattern742 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons198) rule742 = ReplacementRule(pattern742, replacement742) pattern743 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons491) rule743 = ReplacementRule(pattern743, With743) pattern744 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons4, cons130) rule744 = ReplacementRule(pattern744, replacement744) pattern745 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons4, cons5, cons359, cons492, cons493, cons494) rule745 = ReplacementRule(pattern745, replacement745) pattern746 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons4, cons5, cons359, cons492, cons493, cons495) rule746 = ReplacementRule(pattern746, replacement746) pattern747 = Pattern(Integral((u_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons4, cons5, cons70, cons71) rule747 = ReplacementRule(pattern747, replacement747) pattern748 = Pattern(Integral((x_**n_*WC('b1', S(1)) + WC('a1', S(0)))**WC('p', S(1))*(x_**n_*WC('b2', S(1)) + WC('a2', S(0)))**WC('p', S(1)), x_), cons59, cons60, cons61, cons62, cons4, cons5, cons57, cons496) rule748 = ReplacementRule(pattern748, replacement748) pattern749 = Pattern(Integral((a1_ + x_**WC('n', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('n', S(1))*WC('b2', S(1)))**WC('p', S(1)), x_), cons59, cons60, cons61, cons62, cons57, cons497, cons13, cons165, cons498) rule749 = ReplacementRule(pattern749, replacement749) pattern750 = Pattern(Integral((a1_ + x_**WC('n', S(1))*WC('b1', S(1)))**p_*(a2_ + x_**WC('n', S(1))*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons57, cons497, cons13, cons139, cons498) rule750 = ReplacementRule(pattern750, replacement750) pattern751 = Pattern(Integral((a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons5, cons57, cons499) rule751 = ReplacementRule(pattern751, replacement751) pattern752 = Pattern(Integral((a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons5, cons57, cons500) rule752 = ReplacementRule(pattern752, With752) pattern753 = Pattern(Integral((x_**n_*WC('b1', S(1)) + WC('a1', S(0)))**p_*(x_**n_*WC('b2', S(1)) + WC('a2', S(0)))**p_, x_), cons59, cons60, cons61, cons62, cons4, cons5, cons57, cons149) rule753 = ReplacementRule(pattern753, replacement753) pattern754 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons5, cons57, cons496) rule754 = ReplacementRule(pattern754, replacement754) pattern755 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**n_*WC('b', S(1)))**p_, x_), cons3, cons8, cons19, cons4, cons5, cons501, cons502) rule755 = ReplacementRule(pattern755, replacement755) pattern756 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons3, cons8, cons19, cons4, cons5, cons501, cons503) rule756 = ReplacementRule(pattern756, replacement756) pattern757 = Pattern(Integral((c_*x_)**m_*(x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons3, cons8, cons19, cons4, cons5, cons21) rule757 = ReplacementRule(pattern757, replacement757) pattern758 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons40, cons504) rule758 = ReplacementRule(pattern758, replacement758) pattern759 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons505, cons68) rule759 = ReplacementRule(pattern759, replacement759) pattern760 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons5, cons57, cons506, cons68) rule760 = ReplacementRule(pattern760, replacement760) pattern761 = Pattern(Integral(x_**WC('m', S(1))*(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons5, cons502) rule761 = ReplacementRule(pattern761, replacement761) pattern762 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons19, cons4, cons5, cons57, cons507) rule762 = ReplacementRule(pattern762, replacement762) pattern763 = Pattern(Integral((c_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons502) rule763 = ReplacementRule(pattern763, replacement763) pattern764 = Pattern(Integral((c_*x_)**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons5, cons57, cons507) rule764 = ReplacementRule(pattern764, replacement764) pattern765 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons130) rule765 = ReplacementRule(pattern765, replacement765) pattern766 = Pattern(Integral(x_**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons5, cons508, cons68) rule766 = ReplacementRule(pattern766, replacement766) pattern767 = Pattern(Integral(x_**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons19, cons4, cons5, cons57, cons509, cons68) rule767 = ReplacementRule(pattern767, replacement767) pattern768 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons508, cons56) rule768 = ReplacementRule(pattern768, replacement768) pattern769 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons5, cons57, cons509, cons56) rule769 = ReplacementRule(pattern769, replacement769) pattern770 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons150, cons20, CustomConstraint(With770)) rule770 = ReplacementRule(pattern770, replacement770) pattern771 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons5, cons57, cons497, cons20, CustomConstraint(With771)) rule771 = ReplacementRule(pattern771, replacement771) pattern772 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons150, cons246, cons165, cons96, cons510, cons511) rule772 = ReplacementRule(pattern772, replacement772) pattern773 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons57, cons497, cons246, cons165, cons512, cons513) rule773 = ReplacementRule(pattern773, replacement773) pattern774 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons150, cons246, cons165, cons514, cons511) rule774 = ReplacementRule(pattern774, replacement774) pattern775 = Pattern(Integral(x_**S(2)/(a_ + x_**S(4)*WC('b', S(1)))**(S(5)/4), x_), cons2, cons3, cons468) rule775 = ReplacementRule(pattern775, replacement775) pattern776 = Pattern(Integral(x_**m_/(a_ + x_**S(4)*WC('b', S(1)))**(S(5)/4), x_), cons2, cons3, cons468, cons515) rule776 = ReplacementRule(pattern776, replacement776) pattern777 = Pattern(Integral(x_**m_/(a_ + x_**S(4)*WC('b', S(1)))**(S(5)/4), x_), cons2, cons3, cons468, cons516) rule777 = ReplacementRule(pattern777, replacement777) pattern778 = Pattern(Integral(sqrt(x_*WC('c', S(1)))/(a_ + x_**S(2)*WC('b', S(1)))**(S(5)/4), x_), cons2, cons3, cons8, cons468) rule778 = ReplacementRule(pattern778, replacement778) pattern779 = Pattern(Integral((x_*WC('c', S(1)))**m_/(a_ + x_**S(2)*WC('b', S(1)))**(S(5)/4), x_), cons2, cons3, cons8, cons468, cons517, cons518) rule779 = ReplacementRule(pattern779, replacement779) pattern780 = Pattern(Integral((x_*WC('c', S(1)))**m_/(a_ + x_**S(2)*WC('b', S(1)))**(S(5)/4), x_), cons2, cons3, cons8, cons468, cons517, cons96) rule780 = ReplacementRule(pattern780, replacement780) pattern781 = Pattern(Integral(x_**S(2)/(a_ + x_**S(4)*WC('b', S(1)))**(S(5)/4), x_), cons2, cons3, cons485) rule781 = ReplacementRule(pattern781, replacement781) pattern782 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons150, cons246, cons139, cons519, cons520, cons511) rule782 = ReplacementRule(pattern782, replacement782) pattern783 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons57, cons497, cons246, cons139, cons521, cons522, cons513) rule783 = ReplacementRule(pattern783, replacement783) pattern784 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons150, cons246, cons139, cons511) rule784 = ReplacementRule(pattern784, replacement784) pattern785 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons57, cons497, cons246, cons139, cons513) rule785 = ReplacementRule(pattern785, replacement785) pattern786 = Pattern(Integral(x_/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons69) rule786 = ReplacementRule(pattern786, replacement786) pattern787 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons523, cons64, cons524, cons470) rule787 = ReplacementRule(pattern787, With787) pattern788 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons525, cons64, cons524, cons471) rule788 = ReplacementRule(pattern788, With788) pattern789 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons526, cons64, cons524, cons470) rule789 = ReplacementRule(pattern789, With789) pattern790 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons526, cons64, cons524, cons471) rule790 = ReplacementRule(pattern790, With790) pattern791 = Pattern(Integral(x_**S(2)/(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons477) rule791 = ReplacementRule(pattern791, With791) pattern792 = Pattern(Integral(x_**S(2)/(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons478) rule792 = ReplacementRule(pattern792, With792) pattern793 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons527, cons64, cons524, cons480) rule793 = ReplacementRule(pattern793, With793) pattern794 = Pattern(Integral(x_**m_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons527, cons64, cons528, cons478) rule794 = ReplacementRule(pattern794, With794) pattern795 = Pattern(Integral(x_**m_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons527, cons64, cons529, cons478) rule795 = ReplacementRule(pattern795, With795) pattern796 = Pattern(Integral(x_**m_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons530, cons531) rule796 = ReplacementRule(pattern796, replacement796) pattern797 = Pattern(Integral(x_/sqrt(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons483) rule797 = ReplacementRule(pattern797, With797) pattern798 = Pattern(Integral(x_/sqrt(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons484) rule798 = ReplacementRule(pattern798, With798) pattern799 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons468) rule799 = ReplacementRule(pattern799, With799) pattern800 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons486, cons107) rule800 = ReplacementRule(pattern800, With800) pattern801 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons485) rule801 = ReplacementRule(pattern801, With801) pattern802 = Pattern(Integral(x_**S(4)/sqrt(a_ + x_**S(6)*WC('b', S(1))), x_), cons2, cons3, cons69) rule802 = ReplacementRule(pattern802, With802) pattern803 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(8)*WC('b', S(1))), x_), cons2, cons3, cons69) rule803 = ReplacementRule(pattern803, replacement803) pattern804 = Pattern(Integral(x_**S(2)/(a_ + x_**S(4)*WC('b', S(1)))**(S(1)/4), x_), cons2, cons3, cons468) rule804 = ReplacementRule(pattern804, replacement804) pattern805 = Pattern(Integral(x_**S(2)/(a_ + x_**S(4)*WC('b', S(1)))**(S(1)/4), x_), cons2, cons3, cons485) rule805 = ReplacementRule(pattern805, replacement805) pattern806 = Pattern(Integral(S(1)/(x_**S(2)*(a_ + x_**S(4)*WC('b', S(1)))**(S(1)/4)), x_), cons2, cons3, cons468) rule806 = ReplacementRule(pattern806, replacement806) pattern807 = Pattern(Integral(S(1)/(x_**S(2)*(a_ + x_**S(4)*WC('b', S(1)))**(S(1)/4)), x_), cons2, cons3, cons485) rule807 = ReplacementRule(pattern807, replacement807) pattern808 = Pattern(Integral(sqrt(c_*x_)/(a_ + x_**S(2)*WC('b', S(1)))**(S(1)/4), x_), cons2, cons3, cons8, cons468) rule808 = ReplacementRule(pattern808, replacement808) pattern809 = Pattern(Integral(sqrt(c_*x_)/(a_ + x_**S(2)*WC('b', S(1)))**(S(1)/4), x_), cons2, cons3, cons8, cons485) rule809 = ReplacementRule(pattern809, replacement809) pattern810 = Pattern(Integral(S(1)/((x_*WC('c', S(1)))**(S(3)/2)*(a_ + x_**S(2)*WC('b', S(1)))**(S(1)/4)), x_), cons2, cons3, cons8, cons468) rule810 = ReplacementRule(pattern810, replacement810) pattern811 = Pattern(Integral(S(1)/((x_*WC('c', S(1)))**(S(3)/2)*(a_ + x_**S(2)*WC('b', S(1)))**(S(1)/4)), x_), cons2, cons3, cons8, cons485) rule811 = ReplacementRule(pattern811, replacement811) pattern812 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons150, cons33, cons532, cons514, cons511) rule812 = ReplacementRule(pattern812, replacement812) pattern813 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons150, cons533, cons514, cons534) rule813 = ReplacementRule(pattern813, replacement813) pattern814 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons5, cons57, cons497, cons33, cons531, cons512, cons513) rule814 = ReplacementRule(pattern814, replacement814) pattern815 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons5, cons57, cons497, cons535, cons512, cons536) rule815 = ReplacementRule(pattern815, replacement815) pattern816 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons150, cons33, cons96, cons511) rule816 = ReplacementRule(pattern816, replacement816) pattern817 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons150, cons537, cons534) rule817 = ReplacementRule(pattern817, replacement817) pattern818 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons5, cons57, cons497, cons33, cons96, cons513) rule818 = ReplacementRule(pattern818, replacement818) pattern819 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons5, cons57, cons497, cons538, cons536) rule819 = ReplacementRule(pattern819, replacement819) pattern820 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons150, cons369, cons511) rule820 = ReplacementRule(pattern820, With820) pattern821 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons5, cons57, cons497, cons369, cons513) rule821 = ReplacementRule(pattern821, With821) pattern822 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons150, cons13, cons487, cons488, cons539) rule822 = ReplacementRule(pattern822, replacement822) pattern823 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons57, cons497, cons13, cons487, cons488, cons540) rule823 = ReplacementRule(pattern823, replacement823) pattern824 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons150, cons13, cons487, cons488, cons20, cons541) rule824 = ReplacementRule(pattern824, replacement824) pattern825 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons57, cons497, cons13, cons487, cons488, cons20, cons542) rule825 = ReplacementRule(pattern825, replacement825) pattern826 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons198, cons20) rule826 = ReplacementRule(pattern826, replacement826) pattern827 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons5, cons57, cons499, cons20) rule827 = ReplacementRule(pattern827, replacement827) pattern828 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons198, cons369) rule828 = ReplacementRule(pattern828, With828) pattern829 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons5, cons57, cons499, cons369) rule829 = ReplacementRule(pattern829, With829) pattern830 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons198, cons358) rule830 = ReplacementRule(pattern830, replacement830) pattern831 = Pattern(Integral((x_*WC('c', S(1)))**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons5, cons57, cons499, cons358) rule831 = ReplacementRule(pattern831, replacement831) pattern832 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons5, cons491) rule832 = ReplacementRule(pattern832, With832) pattern833 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons19, cons5, cons57, cons500) rule833 = ReplacementRule(pattern833, With833) pattern834 = Pattern(Integral((c_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons491) rule834 = ReplacementRule(pattern834, replacement834) pattern835 = Pattern(Integral((c_*x_)**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons5, cons57, cons500) rule835 = ReplacementRule(pattern835, replacement835) pattern836 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons5, cons543, cons25) rule836 = ReplacementRule(pattern836, replacement836) pattern837 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons19, cons4, cons5, cons57, cons544, cons545) rule837 = ReplacementRule(pattern837, replacement837) pattern838 = Pattern(Integral((c_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons543, cons25) rule838 = ReplacementRule(pattern838, replacement838) pattern839 = Pattern(Integral((c_*x_)**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons5, cons57, cons544, cons545) rule839 = ReplacementRule(pattern839, replacement839) pattern840 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons546, cons13, cons165) rule840 = ReplacementRule(pattern840, replacement840) pattern841 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons19, cons4, cons57, cons547, cons13, cons165) rule841 = ReplacementRule(pattern841, replacement841) pattern842 = Pattern(Integral((c_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons546, cons13, cons165) rule842 = ReplacementRule(pattern842, replacement842) pattern843 = Pattern(Integral((c_*x_)**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons57, cons547, cons13, cons165) rule843 = ReplacementRule(pattern843, replacement843) pattern844 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons548, cons13, cons165, cons514) rule844 = ReplacementRule(pattern844, replacement844) pattern845 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons57, cons549, cons13, cons165, cons512) rule845 = ReplacementRule(pattern845, replacement845) pattern846 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons548, cons13, cons487) rule846 = ReplacementRule(pattern846, With846) pattern847 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons19, cons4, cons57, cons549, cons13, cons487) rule847 = ReplacementRule(pattern847, With847) pattern848 = Pattern(Integral((c_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons548, cons13, cons487) rule848 = ReplacementRule(pattern848, replacement848) pattern849 = Pattern(Integral((c_*x_)**m_*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons57, cons549, cons13, cons487) rule849 = ReplacementRule(pattern849, replacement849) pattern850 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons548, cons13, cons139) rule850 = ReplacementRule(pattern850, replacement850) pattern851 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons57, cons548, cons13, cons139) rule851 = ReplacementRule(pattern851, replacement851) pattern852 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons19, cons4, cons550, cons533) rule852 = ReplacementRule(pattern852, With852) pattern853 = Pattern(Integral(x_**m_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons19, cons4, cons550, cons537) rule853 = ReplacementRule(pattern853, replacement853) pattern854 = Pattern(Integral((c_*x_)**m_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons19, cons4, cons550, cons551) rule854 = ReplacementRule(pattern854, replacement854) pattern855 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons359, cons552) rule855 = ReplacementRule(pattern855, replacement855) pattern856 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons359, cons553) rule856 = ReplacementRule(pattern856, replacement856) pattern857 = Pattern(Integral(x_**WC('m', S(1))*(a_ + v_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons4, cons5, cons554, cons20, cons555) rule857 = ReplacementRule(pattern857, replacement857) pattern858 = Pattern(Integral(u_**WC('m', S(1))*(a_ + v_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons19, cons4, cons5, cons556) rule858 = ReplacementRule(pattern858, replacement858) pattern859 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**n_*WC('b1', S(1)))**p_*(a2_ + x_**n_*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons5, cons57, cons149) rule859 = ReplacementRule(pattern859, replacement859) pattern860 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons73, cons557) rule860 = ReplacementRule(pattern860, replacement860) pattern861 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons73, cons222, cons504) rule861 = ReplacementRule(pattern861, replacement861) pattern862 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons52, cons73, cons198) rule862 = ReplacementRule(pattern862, replacement862) pattern863 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons52, cons73, cons491) rule863 = ReplacementRule(pattern863, With863) pattern864 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73, cons558, cons87) rule864 = ReplacementRule(pattern864, replacement864) pattern865 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons73, cons559, cons397, cons405, cons56) rule865 = ReplacementRule(pattern865, replacement865) pattern866 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons52, cons73, cons559, cons65) rule866 = ReplacementRule(pattern866, replacement866) pattern867 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons73, cons559) rule867 = ReplacementRule(pattern867, replacement867) pattern868 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons73, cons560, cons561) rule868 = ReplacementRule(pattern868, replacement868) pattern869 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons52, cons73, cons560, cons562, cons56) rule869 = ReplacementRule(pattern869, replacement869) pattern870 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons73, cons563) rule870 = ReplacementRule(pattern870, replacement870) pattern871 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons73, cons564) rule871 = ReplacementRule(pattern871, replacement871) pattern872 = Pattern(Integral((c_ + x_**n_*WC('d', S(1)))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons73, cons89, cons465) rule872 = ReplacementRule(pattern872, replacement872) pattern873 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons73, cons565) rule873 = ReplacementRule(pattern873, replacement873) pattern874 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons73, cons466, cons566, cons567) rule874 = ReplacementRule(pattern874, replacement874) pattern875 = Pattern(Integral(S(1)/((a_ + x_**n_*WC('b', S(1)))*(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons4, cons73) rule875 = ReplacementRule(pattern875, replacement875) pattern876 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))**(S(1)/3)*(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73, cons568, cons468) rule876 = ReplacementRule(pattern876, replacement876) pattern877 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))**(S(1)/3)*(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73, cons568, cons485) rule877 = ReplacementRule(pattern877, replacement877) pattern878 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**(S(2)/3)/(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73, cons568) rule878 = ReplacementRule(pattern878, replacement878) pattern879 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))**(S(1)/4)*(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73) rule879 = ReplacementRule(pattern879, replacement879) pattern880 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))**(S(3)/4)*(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73) rule880 = ReplacementRule(pattern880, replacement880) pattern881 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**WC('p', S(1))/(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73, cons13, cons165, cons569) rule881 = ReplacementRule(pattern881, replacement881) pattern882 = Pattern(Integral((a_ + x_**S(2)*WC('b', S(1)))**p_/(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73, cons13, cons139, cons570, cons571) rule882 = ReplacementRule(pattern882, replacement882) pattern883 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('b', S(1)))/(c_ + x_**S(4)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons72, cons572) rule883 = ReplacementRule(pattern883, replacement883) pattern884 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('b', S(1)))/(c_ + x_**S(4)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons72, cons573) rule884 = ReplacementRule(pattern884, With884) pattern885 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('b', S(1)))/(c_ + x_**S(4)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73) rule885 = ReplacementRule(pattern885, replacement885) pattern886 = Pattern(Integral((a_ + x_**S(4)*WC('b', S(1)))**(S(1)/4)/(c_ + x_**S(4)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73) rule886 = ReplacementRule(pattern886, replacement886) pattern887 = Pattern(Integral((a_ + x_**S(4)*WC('b', S(1)))**p_/(c_ + x_**S(4)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73, cons13, cons574) rule887 = ReplacementRule(pattern887, replacement887) pattern888 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('b', S(1)))*(c_ + x_**S(4)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73) rule888 = ReplacementRule(pattern888, replacement888) pattern889 = Pattern(Integral(S(1)/((a_ + x_**S(4)*WC('b', S(1)))**(S(3)/4)*(c_ + x_**S(4)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73) rule889 = ReplacementRule(pattern889, replacement889) pattern890 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons468, cons575) rule890 = ReplacementRule(pattern890, replacement890) pattern891 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons73, cons404, cons139, cons576, cons577) rule891 = ReplacementRule(pattern891, replacement891) pattern892 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons73, cons404, cons139, cons578, cons577) rule892 = ReplacementRule(pattern892, replacement892) pattern893 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons52, cons73, cons13, cons139, cons407, cons577) rule893 = ReplacementRule(pattern893, replacement893) pattern894 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons73, cons150, cons222, cons579) rule894 = ReplacementRule(pattern894, replacement894) pattern895 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons73, cons397, cons578, cons580, cons581, cons577) rule895 = ReplacementRule(pattern895, replacement895) pattern896 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons73, cons404, cons405, cons165, cons577) rule896 = ReplacementRule(pattern896, replacement896) pattern897 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons575, cons468, cons582) rule897 = ReplacementRule(pattern897, replacement897) pattern898 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons583, cons179, cons45, cons584) rule898 = ReplacementRule(pattern898, replacement898) pattern899 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons583, cons179, cons585) rule899 = ReplacementRule(pattern899, replacement899) pattern900 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons119) rule900 = ReplacementRule(pattern900, replacement900) pattern901 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))/sqrt(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons575, cons468) rule901 = ReplacementRule(pattern901, replacement901) pattern902 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))/sqrt(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons575, cons485) rule902 = ReplacementRule(pattern902, replacement902) pattern903 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))/sqrt(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons583, cons179, cons45) rule903 = ReplacementRule(pattern903, replacement903) pattern904 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))/sqrt(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons583, cons179, cons585) rule904 = ReplacementRule(pattern904, replacement904) pattern905 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))/sqrt(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons583, cons179, cons450) rule905 = ReplacementRule(pattern905, replacement905) pattern906 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))/sqrt(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons583, cons119) rule906 = ReplacementRule(pattern906, replacement906) pattern907 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons52, cons73, cons130) rule907 = ReplacementRule(pattern907, replacement907) pattern908 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons73, cons586, cons45, cons179) rule908 = ReplacementRule(pattern908, replacement908) pattern909 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons73, cons586, cons450) rule909 = ReplacementRule(pattern909, replacement909) pattern910 = Pattern(Integral((a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons587, cons588, cons589) rule910 = ReplacementRule(pattern910, replacement910) pattern911 = Pattern(Integral((a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons587, cons388, cons149) rule911 = ReplacementRule(pattern911, replacement911) pattern912 = Pattern(Integral((u_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(u_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons70, cons71) rule912 = ReplacementRule(pattern912, replacement912) pattern913 = Pattern(Integral(u_**WC('p', S(1))*v_**WC('q', S(1)), x_), cons5, cons52, cons590) rule913 = ReplacementRule(pattern913, replacement913) pattern914 = Pattern(Integral(u_**WC('p', S(1))*v_**WC('q', S(1))*x_**WC('m', S(1)), x_), cons5, cons52, cons591, cons592) rule914 = ReplacementRule(pattern914, replacement914) pattern915 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons593, cons502) rule915 = ReplacementRule(pattern915, replacement915) pattern916 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons593, cons503) rule916 = ReplacementRule(pattern916, replacement916) pattern917 = Pattern(Integral((e_*x_)**m_*(x_**WC('n', S(1))*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons21) rule917 = ReplacementRule(pattern917, replacement917) pattern918 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons52, cons73, cons55) rule918 = ReplacementRule(pattern918, replacement918) pattern919 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons73, cons222, cons504) rule919 = ReplacementRule(pattern919, replacement919) pattern920 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons52, cons73, cons502) rule920 = ReplacementRule(pattern920, replacement920) pattern921 = Pattern(Integral((e_*x_)**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons73, cons502) rule921 = ReplacementRule(pattern921, replacement921) pattern922 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons73, cons557) rule922 = ReplacementRule(pattern922, replacement922) pattern923 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons73, cons594, cons68) rule923 = ReplacementRule(pattern923, replacement923) pattern924 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a1_ + x_**WC('non2', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('non2', S(1))*WC('b2', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons59, cons60, cons61, cons62, cons8, cons29, cons50, cons19, cons4, cons5, cons595, cons57, cons596, cons68) rule924 = ReplacementRule(pattern924, replacement924) pattern925 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons73, cons597, cons598, cons95, cons599) rule925 = ReplacementRule(pattern925, replacement925) pattern926 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons73, cons597, cons68) rule926 = ReplacementRule(pattern926, replacement926) pattern927 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons73, cons598, cons95, cons599, cons600) rule927 = ReplacementRule(pattern927, replacement927) pattern928 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a1_ + x_**WC('non2', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('non2', S(1))*WC('b2', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons59, cons60, cons61, cons62, cons8, cons29, cons50, cons5, cons595, cons57, cons598, cons95, cons599, cons600) rule928 = ReplacementRule(pattern928, replacement928) pattern929 = Pattern(Integral(x_**m_*(a_ + x_**S(2)*WC('b', S(1)))**p_*(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73, cons13, cons139, cons601, cons602) rule929 = ReplacementRule(pattern929, replacement929) pattern930 = Pattern(Integral(x_**m_*(a_ + x_**S(2)*WC('b', S(1)))**p_*(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons73, cons13, cons139, cons603, cons602) rule930 = ReplacementRule(pattern930, replacement930) pattern931 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons73, cons13, cons139, cons604) rule931 = ReplacementRule(pattern931, replacement931) pattern932 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a1_ + x_**WC('non2', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('non2', S(1))*WC('b2', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons59, cons60, cons61, cons62, cons8, cons29, cons50, cons19, cons4, cons595, cons57, cons13, cons139, cons604) rule932 = ReplacementRule(pattern932, replacement932) pattern933 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons73, cons605) rule933 = ReplacementRule(pattern933, replacement933) pattern934 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a1_ + x_**WC('non2', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('non2', S(1))*WC('b2', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1))), x_), cons59, cons60, cons61, cons62, cons8, cons29, cons50, cons19, cons4, cons5, cons595, cons57, cons605) rule934 = ReplacementRule(pattern934, replacement934) pattern935 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons73, cons150, cons130, cons606) rule935 = ReplacementRule(pattern935, replacement935) pattern936 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons73, cons150, cons95, cons96, cons90) rule936 = ReplacementRule(pattern936, replacement936) pattern937 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons73, cons150, cons13, cons139) rule937 = ReplacementRule(pattern937, replacement937) pattern938 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons73, cons150, cons607) rule938 = ReplacementRule(pattern938, replacement938) pattern939 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons5, cons52, cons73, cons150, cons20, CustomConstraint(With939)) rule939 = ReplacementRule(pattern939, replacement939) pattern940 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons73, cons150, cons369, cons40) rule940 = ReplacementRule(pattern940, With940) pattern941 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons73, cons150, cons608, cons139, cons405, cons609, cons610) rule941 = ReplacementRule(pattern941, replacement941) pattern942 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons73, cons150, cons404, cons139, cons578, cons610) rule942 = ReplacementRule(pattern942, replacement942) pattern943 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons73, cons150, cons404, cons139, cons576, cons610) rule943 = ReplacementRule(pattern943, replacement943) pattern944 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons52, cons73, cons150, cons246, cons139, cons611, cons610) rule944 = ReplacementRule(pattern944, replacement944) pattern945 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons52, cons73, cons150, cons246, cons139, cons612, cons610) rule945 = ReplacementRule(pattern945, replacement945) pattern946 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons52, cons73, cons150, cons13, cons139, cons610) rule946 = ReplacementRule(pattern946, replacement946) pattern947 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons73, cons150, cons608, cons405, cons96, cons165, cons610) rule947 = ReplacementRule(pattern947, replacement947) pattern948 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons73, cons150, cons613, cons578, cons96, cons610) rule948 = ReplacementRule(pattern948, replacement948) pattern949 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons73, cons150, cons613, cons576, cons96, cons610) rule949 = ReplacementRule(pattern949, replacement949) pattern950 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons73, cons150, cons404, cons405, cons165, cons610) rule950 = ReplacementRule(pattern950, replacement950) pattern951 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons73, cons150, cons397, cons578, cons610) rule951 = ReplacementRule(pattern951, replacement951) pattern952 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons73, cons150, cons613, cons405, cons609, cons610) rule952 = ReplacementRule(pattern952, replacement952) pattern953 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons73, cons150, cons33, cons611, cons610) rule953 = ReplacementRule(pattern953, replacement953) pattern954 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons73, cons150, cons33, cons96, cons610) rule954 = ReplacementRule(pattern954, replacement954) pattern955 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))/((a_ + x_**n_*WC('b', S(1)))*(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons73, cons150, cons33, cons614) rule955 = ReplacementRule(pattern955, replacement955) pattern956 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))/((a_ + x_**n_*WC('b', S(1)))*(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons73, cons150) rule956 = ReplacementRule(pattern956, replacement956) pattern957 = Pattern(Integral(x_**m_/((a_ + x_**n_*WC('b', S(1)))*sqrt(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73, cons615, cons616, cons617) rule957 = ReplacementRule(pattern957, replacement957) pattern958 = Pattern(Integral(x_**S(2)/((a_ + x_**S(4)*WC('b', S(1)))*sqrt(c_ + x_**S(4)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73) rule958 = ReplacementRule(pattern958, With958) pattern959 = Pattern(Integral(x_/((a_ + x_**S(3)*WC('b', S(1)))*sqrt(c_ + x_**S(3)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73, cons618) rule959 = ReplacementRule(pattern959, With959) pattern960 = Pattern(Integral(x_**m_/((a_ + x_**S(3)*WC('b', S(1)))*sqrt(c_ + x_**S(3)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73, cons618, cons619) rule960 = ReplacementRule(pattern960, replacement960) pattern961 = Pattern(Integral(x_**m_/((a_ + x_**S(3)*WC('b', S(1)))*sqrt(c_ + x_**S(3)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73, cons618, cons620) rule961 = ReplacementRule(pattern961, replacement961) pattern962 = Pattern(Integral(x_**S(2)*sqrt(c_ + x_**S(4)*WC('d', S(1)))/(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons73) rule962 = ReplacementRule(pattern962, replacement962) pattern963 = Pattern(Integral(x_**WC('m', S(1))*sqrt(c_ + x_**S(3)*WC('d', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons73, cons618, cons621) rule963 = ReplacementRule(pattern963, replacement963) pattern964 = Pattern(Integral(x_**S(2)/(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73, cons468, cons575, cons582) rule964 = ReplacementRule(pattern964, replacement964) pattern965 = Pattern(Integral(x_**n_/(sqrt(a_ + x_**n_*WC('b', S(1)))*sqrt(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons73, cons622, cons623) rule965 = ReplacementRule(pattern965, replacement965) pattern966 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons150, cons246, cons624, cons487) rule966 = ReplacementRule(pattern966, With966) pattern967 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons5, cons52, cons73, cons198, cons20) rule967 = ReplacementRule(pattern967, replacement967) pattern968 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons198, cons369) rule968 = ReplacementRule(pattern968, With968) pattern969 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons52, cons73, cons198, cons358) rule969 = ReplacementRule(pattern969, replacement969) pattern970 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons52, cons73, cons491) rule970 = ReplacementRule(pattern970, With970) pattern971 = Pattern(Integral((e_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons52, cons73, cons491) rule971 = ReplacementRule(pattern971, replacement971) pattern972 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons52, cons73, cons543, cons25) rule972 = ReplacementRule(pattern972, replacement972) pattern973 = Pattern(Integral((e_*x_)**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons73, cons543, cons25) rule973 = ReplacementRule(pattern973, replacement973) pattern974 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons73, cons404, cons139, cons578, cons610) rule974 = ReplacementRule(pattern974, replacement974) pattern975 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons73, cons404, cons139, cons576, cons610) rule975 = ReplacementRule(pattern975, replacement975) pattern976 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons52, cons73, cons13, cons139, cons610) rule976 = ReplacementRule(pattern976, replacement976) pattern977 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons73, cons404, cons405, cons165, cons610) rule977 = ReplacementRule(pattern977, replacement977) pattern978 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons73, cons397, cons578, cons610) rule978 = ReplacementRule(pattern978, replacement978) pattern979 = Pattern(Integral(x_**m_/((a_ + x_**n_*WC('b', S(1)))*(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons73, cons625) rule979 = ReplacementRule(pattern979, replacement979) pattern980 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))/((a_ + x_**n_*WC('b', S(1)))*(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons19, cons73) rule980 = ReplacementRule(pattern980, replacement980) pattern981 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons73, cons626, cons627, cons628) rule981 = ReplacementRule(pattern981, replacement981) pattern982 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons587, cons588, cons589) rule982 = ReplacementRule(pattern982, replacement982) pattern983 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons52, cons587, cons388, cons149) rule983 = ReplacementRule(pattern983, replacement983) pattern984 = Pattern(Integral((e_*x_)**m_*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**WC('q', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons587) rule984 = ReplacementRule(pattern984, replacement984) pattern985 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons73, cons68, cons629, cons45, cons179) rule985 = ReplacementRule(pattern985, replacement985) pattern986 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons73, cons68, cons629, cons450) rule986 = ReplacementRule(pattern986, replacement986) pattern987 = Pattern(Integral(x_**WC('m', S(1))*(v_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(v_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons554, cons20, cons555) rule987 = ReplacementRule(pattern987, replacement987) pattern988 = Pattern(Integral(u_**WC('m', S(1))*(v_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(v_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons52, cons556) rule988 = ReplacementRule(pattern988, replacement988) pattern989 = Pattern(Integral((a1_ + x_**WC('non2', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('non2', S(1))*WC('b2', S(1)))**WC('p', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('u', S(1)), x_), cons59, cons60, cons61, cons62, cons8, cons29, cons4, cons5, cons52, cons595, cons57, cons496) rule989 = ReplacementRule(pattern989, replacement989) pattern990 = Pattern(Integral((a1_ + x_**WC('non2', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('non2', S(1))*WC('b2', S(1)))**WC('p', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)) + x_**WC('n2', S(1))*WC('e', S(1)))**WC('q', S(1))*WC('u', S(1)), x_), cons59, cons60, cons61, cons62, cons8, cons29, cons50, cons4, cons5, cons52, cons595, cons48, cons57, cons496) rule990 = ReplacementRule(pattern990, replacement990) pattern991 = Pattern(Integral((a1_ + x_**WC('non2', S(1))*WC('b1', S(1)))**p_*(a2_ + x_**WC('non2', S(1))*WC('b2', S(1)))**p_*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('u', S(1)), x_), cons59, cons60, cons61, cons62, cons8, cons29, cons4, cons5, cons52, cons595, cons57) rule991 = ReplacementRule(pattern991, replacement991) pattern992 = Pattern(Integral((a1_ + x_**WC('non2', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('non2', S(1))*WC('b2', S(1)))**WC('p', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)) + x_**WC('n2', S(1))*WC('e', S(1)))**WC('q', S(1))*WC('u', S(1)), x_), cons59, cons60, cons61, cons62, cons8, cons29, cons50, cons4, cons5, cons52, cons595, cons48, cons57) rule992 = ReplacementRule(pattern992, replacement992) pattern993 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons630) rule993 = ReplacementRule(pattern993, replacement993) pattern994 = Pattern(Integral((e_ + x_**n_*WC('f', S(1)))/((a_ + x_**n_*WC('b', S(1)))*(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons631) rule994 = ReplacementRule(pattern994, replacement994) pattern995 = Pattern(Integral((e_ + x_**n_*WC('f', S(1)))/((a_ + x_**n_*WC('b', S(1)))*sqrt(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons631) rule995 = ReplacementRule(pattern995, replacement995) pattern996 = Pattern(Integral((e_ + x_**n_*WC('f', S(1)))/(sqrt(a_ + x_**n_*WC('b', S(1)))*sqrt(c_ + x_**n_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons632) rule996 = ReplacementRule(pattern996, replacement996) pattern997 = Pattern(Integral((e_ + x_**S(2)*WC('f', S(1)))/(sqrt(a_ + x_**S(2)*WC('b', S(1)))*(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons468, cons575) rule997 = ReplacementRule(pattern997, replacement997) pattern998 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons404, cons139, cons405) rule998 = ReplacementRule(pattern998, replacement998) pattern999 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons52, cons13, cons139) rule999 = ReplacementRule(pattern999, replacement999) pattern1000 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons397, cons405, cons633) rule1000 = ReplacementRule(pattern1000, replacement1000) pattern1001 = Pattern(Integral((e_ + x_**S(4)*WC('f', S(1)))/((a_ + x_**S(4)*WC('b', S(1)))**(S(3)/4)*(c_ + x_**S(4)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1001 = ReplacementRule(pattern1001, replacement1001) pattern1002 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(e_ + x_**n_*WC('f', S(1)))/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons4, cons634) rule1002 = ReplacementRule(pattern1002, replacement1002) pattern1003 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons52, cons635) rule1003 = ReplacementRule(pattern1003, replacement1003) pattern1004 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))*(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1004 = ReplacementRule(pattern1004, replacement1004) pattern1005 = Pattern(Integral(S(1)/(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons8, cons29, cons50, cons127, cons178) rule1005 = ReplacementRule(pattern1005, replacement1005) pattern1006 = Pattern(Integral(sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons636, cons637, cons638) rule1006 = ReplacementRule(pattern1006, replacement1006) pattern1007 = Pattern(Integral(sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons639) rule1007 = ReplacementRule(pattern1007, replacement1007) pattern1008 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons575, cons640, cons638) rule1008 = ReplacementRule(pattern1008, replacement1008) pattern1009 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons583, cons179, cons180, cons641) rule1009 = ReplacementRule(pattern1009, replacement1009) pattern1010 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons119) rule1010 = ReplacementRule(pattern1010, replacement1010) pattern1011 = Pattern(Integral(sqrt(c_ + x_**S(2)*WC('d', S(1)))/((a_ + x_**S(2)*WC('b', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons575) rule1011 = ReplacementRule(pattern1011, replacement1011) pattern1012 = Pattern(Integral(sqrt(c_ + x_**S(2)*WC('d', S(1)))/((a_ + x_**S(2)*WC('b', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons583) rule1012 = ReplacementRule(pattern1012, replacement1012) pattern1013 = Pattern(Integral(sqrt(e_ + x_**S(2)*WC('f', S(1)))/((a_ + x_**S(2)*WC('b', S(1)))*(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons575, cons640) rule1013 = ReplacementRule(pattern1013, replacement1013) pattern1014 = Pattern(Integral((e_ + x_**S(2)*WC('f', S(1)))**(S(3)/2)/((a_ + x_**S(2)*WC('b', S(1)))*(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons575, cons640) rule1014 = ReplacementRule(pattern1014, replacement1014) pattern1015 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2)*sqrt(e_ + x_**S(2)*WC('f', S(1)))/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons575, cons640) rule1015 = ReplacementRule(pattern1015, replacement1015) pattern1016 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**q_*(e_ + x_**S(2)*WC('f', S(1)))**r_/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons642, cons398, cons643) rule1016 = ReplacementRule(pattern1016, replacement1016) pattern1017 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**q_*(e_ + x_**S(2)*WC('f', S(1)))**r_/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons54, cons397, cons578) rule1017 = ReplacementRule(pattern1017, replacement1017) pattern1018 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**q_*(e_ + x_**S(2)*WC('f', S(1)))**r_/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons54, cons397, cons398) rule1018 = ReplacementRule(pattern1018, replacement1018) pattern1019 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**q_*(e_ + x_**S(2)*WC('f', S(1)))**r_/(a_ + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons54, cons397, cons644) rule1019 = ReplacementRule(pattern1019, replacement1019) pattern1020 = Pattern(Integral(sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))/(a_ + x_**S(2)*WC('b', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1020 = ReplacementRule(pattern1020, replacement1020) pattern1021 = Pattern(Integral(S(1)/((a_ + x_**S(2)*WC('b', S(1)))**S(2)*sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1021 = ReplacementRule(pattern1021, replacement1021) pattern1022 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1)))**r_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons54, cons65, cons397, cons405) rule1022 = ReplacementRule(pattern1022, replacement1022) pattern1023 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1)))**r_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons52, cons65, cons397, cons644) rule1023 = ReplacementRule(pattern1023, replacement1023) pattern1024 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1024 = ReplacementRule(pattern1024, replacement1024) pattern1025 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))/(sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1025 = ReplacementRule(pattern1025, replacement1025) pattern1026 = Pattern(Integral(sqrt(c_ + x_**S(2)*WC('d', S(1)))/((a_ + x_**S(2)*WC('b', S(1)))**(S(3)/2)*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1026 = ReplacementRule(pattern1026, replacement1026) pattern1027 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))/sqrt(e_ + x_**S(2)*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons645) rule1027 = ReplacementRule(pattern1027, replacement1027) pattern1028 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))/sqrt(e_ + x_**S(2)*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons646) rule1028 = ReplacementRule(pattern1028, replacement1028) pattern1029 = Pattern(Integral(sqrt(a_ + x_**S(2)*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))/(e_ + x_**S(2)*WC('f', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1029 = ReplacementRule(pattern1029, replacement1029) pattern1030 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1)))**r_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons54, cons150, CustomConstraint(With1030)) rule1030 = ReplacementRule(pattern1030, replacement1030) pattern1031 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1)))**r_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons54, cons198) rule1031 = ReplacementRule(pattern1031, replacement1031) pattern1032 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons52, cons54, cons647) rule1032 = ReplacementRule(pattern1032, replacement1032) pattern1033 = Pattern(Integral((u_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(v_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1))*(w_**n_*WC('f', S(1)) + WC('e', S(0)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons4, cons52, cons54, cons648, cons649, cons70, cons71) rule1033 = ReplacementRule(pattern1033, replacement1033) pattern1034 = Pattern(Integral((c_ + x_**WC('mn', S(1))*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**WC('n', S(1))*WC('f', S(1)))**WC('r', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons54, cons587, cons588) rule1034 = ReplacementRule(pattern1034, replacement1034) pattern1035 = Pattern(Integral((c_ + x_**WC('mn', S(1))*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**WC('n', S(1))*WC('f', S(1)))**WC('r', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons52, cons587, cons40, cons650) rule1035 = ReplacementRule(pattern1035, replacement1035) pattern1036 = Pattern(Integral((c_ + x_**WC('mn', S(1))*WC('d', S(1)))**q_*(e_ + x_**WC('n', S(1))*WC('f', S(1)))**WC('r', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons52, cons54, cons587, cons388) rule1036 = ReplacementRule(pattern1036, replacement1036) pattern1037 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e1_ + x_**WC('n2', S(1))*WC('f1', S(1)))**WC('r', S(1))*(e2_ + x_**WC('n2', S(1))*WC('f2', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons654, cons655, cons656, cons657, cons4, cons5, cons52, cons54, cons651, cons652, cons653) rule1037 = ReplacementRule(pattern1037, replacement1037) pattern1038 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e1_ + x_**WC('n2', S(1))*WC('f1', S(1)))**WC('r', S(1))*(e2_ + x_**WC('n2', S(1))*WC('f2', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons654, cons655, cons656, cons657, cons4, cons5, cons52, cons54, cons651, cons652) rule1038 = ReplacementRule(pattern1038, replacement1038) pattern1039 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons54, cons658, cons502) rule1039 = ReplacementRule(pattern1039, replacement1039) pattern1040 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons54, cons658, cons503) rule1040 = ReplacementRule(pattern1040, replacement1040) pattern1041 = Pattern(Integral((g_*x_)**m_*(x_**WC('n', S(1))*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons54, cons21) rule1041 = ReplacementRule(pattern1041, replacement1041) pattern1042 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons659) rule1042 = ReplacementRule(pattern1042, replacement1042) pattern1043 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons54, cons55) rule1043 = ReplacementRule(pattern1043, replacement1043) pattern1044 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons660, cons504) rule1044 = ReplacementRule(pattern1044, replacement1044) pattern1045 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons54, cons502) rule1045 = ReplacementRule(pattern1045, replacement1045) pattern1046 = Pattern(Integral((g_*x_)**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons54, cons502) rule1046 = ReplacementRule(pattern1046, replacement1046) pattern1047 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons54, cons150, cons20, CustomConstraint(With1047)) rule1047 = ReplacementRule(pattern1047, replacement1047) pattern1048 = Pattern(Integral((x_*WC('g', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1)))**r_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons52, cons54, cons150, cons369) rule1048 = ReplacementRule(pattern1048, With1048) pattern1049 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons150, cons404, cons139, cons405, cons661) rule1049 = ReplacementRule(pattern1049, replacement1049) pattern1050 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons52, cons150, cons246, cons139, cons609) rule1050 = ReplacementRule(pattern1050, replacement1050) pattern1051 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons52, cons150, cons13, cons139) rule1051 = ReplacementRule(pattern1051, replacement1051) pattern1052 = Pattern(Integral((x_*WC('g', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons150, cons613, cons405, cons96, cons662) rule1052 = ReplacementRule(pattern1052, replacement1052) pattern1053 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons150, cons397, cons405, cons662) rule1053 = ReplacementRule(pattern1053, replacement1053) pattern1054 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons52, cons150, cons33, cons532) rule1054 = ReplacementRule(pattern1054, replacement1054) pattern1055 = Pattern(Integral((x_*WC('g', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons52, cons150, cons33, cons96) rule1055 = ReplacementRule(pattern1055, replacement1055) pattern1056 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(e_ + x_**n_*WC('f', S(1)))/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons150) rule1056 = ReplacementRule(pattern1056, replacement1056) pattern1057 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons52, cons150) rule1057 = ReplacementRule(pattern1057, replacement1057) pattern1058 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons52, cons150, cons663) rule1058 = ReplacementRule(pattern1058, replacement1058) pattern1059 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons54, cons198, cons20) rule1059 = ReplacementRule(pattern1059, replacement1059) pattern1060 = Pattern(Integral((x_*WC('g', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons52, cons54, cons198, cons369) rule1060 = ReplacementRule(pattern1060, With1060) pattern1061 = Pattern(Integral((x_*WC('g', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons52, cons54, cons198, cons358) rule1061 = ReplacementRule(pattern1061, replacement1061) pattern1062 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons52, cons54, cons491) rule1062 = ReplacementRule(pattern1062, With1062) pattern1063 = Pattern(Integral((g_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons52, cons54, cons491) rule1063 = ReplacementRule(pattern1063, replacement1063) pattern1064 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons54, cons543) rule1064 = ReplacementRule(pattern1064, replacement1064) pattern1065 = Pattern(Integral((g_*x_)**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons54, cons543) rule1065 = ReplacementRule(pattern1065, replacement1065) pattern1066 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons404, cons139, cons405, cons661) rule1066 = ReplacementRule(pattern1066, replacement1066) pattern1067 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons52, cons13, cons139) rule1067 = ReplacementRule(pattern1067, replacement1067) pattern1068 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons397, cons405, cons662) rule1068 = ReplacementRule(pattern1068, replacement1068) pattern1069 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(e_ + x_**n_*WC('f', S(1)))/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons382) rule1069 = ReplacementRule(pattern1069, replacement1069) pattern1070 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*(c_ + x_**n_*WC('d', S(1)))**q_*(e_ + x_**n_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons664) rule1070 = ReplacementRule(pattern1070, replacement1070) pattern1071 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**WC('n', S(1))*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons54, cons587, cons588) rule1071 = ReplacementRule(pattern1071, replacement1071) pattern1072 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**WC('n', S(1))*WC('f', S(1)))**WC('r', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons52, cons587, cons40, cons650) rule1072 = ReplacementRule(pattern1072, replacement1072) pattern1073 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**q_*(e_ + x_**WC('n', S(1))*WC('f', S(1)))**WC('r', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons54, cons587, cons388) rule1073 = ReplacementRule(pattern1073, replacement1073) pattern1074 = Pattern(Integral((g_*x_)**m_*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('mn', S(1))*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**WC('n', S(1))*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons54, cons587) rule1074 = ReplacementRule(pattern1074, replacement1074) pattern1075 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e_ + x_**n_*WC('f', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons54, cons665) rule1075 = ReplacementRule(pattern1075, replacement1075) pattern1076 = Pattern(Integral(u_**WC('m', S(1))*(e_ + v_**n_*WC('f', S(1)))**WC('r', S(1))*(v_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(v_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons54, cons556) rule1076 = ReplacementRule(pattern1076, replacement1076) pattern1077 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e1_ + x_**WC('n2', S(1))*WC('f1', S(1)))**WC('r', S(1))*(e2_ + x_**WC('n2', S(1))*WC('f2', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons654, cons655, cons656, cons657, cons210, cons19, cons4, cons5, cons52, cons54, cons651, cons652, cons653) rule1077 = ReplacementRule(pattern1077, replacement1077) pattern1078 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(e1_ + x_**WC('n2', S(1))*WC('f1', S(1)))**WC('r', S(1))*(e2_ + x_**WC('n2', S(1))*WC('f2', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons29, cons654, cons655, cons656, cons657, cons210, cons19, cons4, cons5, cons52, cons54, cons651, cons652) rule1078 = ReplacementRule(pattern1078, replacement1078) return [rule692, rule693, rule694, rule695, rule696, rule697, rule698, rule699, rule700, rule701, rule702, rule703, rule704, rule705, rule706, rule707, rule708, rule709, rule710, rule711, rule712, rule713, rule714, rule715, rule716, rule717, rule718, rule719, rule720, rule721, rule722, rule723, rule724, rule725, rule726, rule727, rule728, rule729, rule730, rule731, rule732, rule733, rule734, rule735, rule736, rule737, rule738, rule739, rule740, rule741, rule742, rule743, rule744, rule745, rule746, rule747, rule748, rule749, rule750, rule751, rule752, rule753, rule754, rule755, rule756, rule757, rule758, rule759, rule760, rule761, rule762, rule763, rule764, rule765, rule766, rule767, rule768, rule769, rule770, rule771, rule772, rule773, rule774, rule775, rule776, rule777, rule778, rule779, rule780, rule781, rule782, rule783, rule784, rule785, rule786, rule787, rule788, rule789, rule790, rule791, rule792, rule793, rule794, rule795, rule796, rule797, rule798, rule799, rule800, rule801, rule802, rule803, rule804, rule805, rule806, rule807, rule808, rule809, rule810, rule811, rule812, rule813, rule814, rule815, rule816, rule817, rule818, rule819, rule820, rule821, rule822, rule823, rule824, rule825, rule826, rule827, rule828, rule829, rule830, rule831, rule832, rule833, rule834, rule835, rule836, rule837, rule838, rule839, rule840, rule841, rule842, rule843, rule844, rule845, rule846, rule847, rule848, rule849, rule850, rule851, rule852, rule853, rule854, rule855, rule856, rule857, rule858, rule859, rule860, rule861, rule862, rule863, rule864, rule865, rule866, rule867, rule868, rule869, rule870, rule871, rule872, rule873, rule874, rule875, rule876, rule877, rule878, rule879, rule880, rule881, rule882, rule883, rule884, rule885, rule886, rule887, rule888, rule889, rule890, rule891, rule892, rule893, rule894, rule895, rule896, rule897, rule898, rule899, rule900, rule901, rule902, rule903, rule904, rule905, rule906, rule907, rule908, rule909, rule910, rule911, rule912, rule913, rule914, rule915, rule916, rule917, rule918, rule919, rule920, rule921, rule922, rule923, rule924, rule925, rule926, rule927, rule928, rule929, rule930, rule931, rule932, rule933, rule934, rule935, rule936, rule937, rule938, rule939, rule940, rule941, rule942, rule943, rule944, rule945, rule946, rule947, rule948, rule949, rule950, rule951, rule952, rule953, rule954, rule955, rule956, rule957, rule958, rule959, rule960, rule961, rule962, rule963, rule964, rule965, rule966, rule967, rule968, rule969, rule970, rule971, rule972, rule973, rule974, rule975, rule976, rule977, rule978, rule979, rule980, rule981, rule982, rule983, rule984, rule985, rule986, rule987, rule988, rule989, rule990, rule991, rule992, rule993, rule994, rule995, rule996, rule997, rule998, rule999, rule1000, rule1001, rule1002, rule1003, rule1004, rule1005, rule1006, rule1007, rule1008, rule1009, rule1010, rule1011, rule1012, rule1013, rule1014, rule1015, rule1016, rule1017, rule1018, rule1019, rule1020, rule1021, rule1022, rule1023, rule1024, rule1025, rule1026, rule1027, rule1028, rule1029, rule1030, rule1031, rule1032, rule1033, rule1034, rule1035, rule1036, rule1037, rule1038, rule1039, rule1040, rule1041, rule1042, rule1043, rule1044, rule1045, rule1046, rule1047, rule1048, rule1049, rule1050, rule1051, rule1052, rule1053, rule1054, rule1055, rule1056, rule1057, rule1058, rule1059, rule1060, rule1061, rule1062, rule1063, rule1064, rule1065, rule1066, rule1067, rule1068, rule1069, rule1070, rule1071, rule1072, rule1073, rule1074, rule1075, rule1076, rule1077, rule1078, ] def replacement692(b, n, p, x): return Dist(b**IntPart(p)*x**(-n*FracPart(p))*(b*x**n)**FracPart(p), Int(x**(n*p), x), x) def replacement693(a, b, n, p, x): return Simp(x*(a + b*x**n)**(p + S(1))/a, x) def replacement694(a, b, n, p, x): return Dist((n*(p + S(1)) + S(1))/(a*n*(p + S(1))), Int((a + b*x**n)**(p + S(1)), x), x) - Simp(x*(a + b*x**n)**(p + S(1))/(a*n*(p + S(1))), x) def replacement695(a, b, n, x): return Int(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n), x) def replacement696(a, b, n, p, x): return Int(x**(n*p)*(a*x**(-n) + b)**p, x) def replacement697(a, b, n, p, x): return Int(ExpandIntegrand((a + b*x**n)**p, x), x) def replacement698(a, b, n, p, x): return Dist(a*n*p/(n*p + S(1)), Int((a + b*x**n)**(p + S(-1)), x), x) + Simp(x*(a + b*x**n)**p/(n*p + S(1)), x) def replacement699(a, b, x): return Simp(S(2)*EllipticE(ArcTan(x*Rt(b/a, S(2)))/S(2), S(2))/(a**(S(5)/4)*Rt(b/a, S(2))), x) def replacement700(a, b, x): return Dist((S(1) + b*x**S(2)/a)**(S(1)/4)/(a*(a + b*x**S(2))**(S(1)/4)), Int((S(1) + b*x**S(2)/a)**(S(-5)/4), x), x) def replacement701(a, b, x): return Dist(S(1)/((a/(a + b*x**S(2)))**(S(2)/3)*(a + b*x**S(2))**(S(2)/3)), Subst(Int((-b*x**S(2) + S(1))**(S(-1)/3), x), x, x/sqrt(a + b*x**S(2))), x) def replacement702(a, b, n, p, x): return Dist((n*(p + S(1)) + S(1))/(a*n*(p + S(1))), Int((a + b*x**n)**(p + S(1)), x), x) - Simp(x*(a + b*x**n)**(p + S(1))/(a*n*(p + S(1))), x) def replacement703(a, b, x): return Dist(S(1)/(S(3)*Rt(a, S(3))**S(2)), Int((-x*Rt(b, S(3)) + S(2)*Rt(a, S(3)))/(x**S(2)*Rt(b, S(3))**S(2) - x*Rt(a, S(3))*Rt(b, S(3)) + Rt(a, S(3))**S(2)), x), x) + Dist(S(1)/(S(3)*Rt(a, S(3))**S(2)), Int(S(1)/(x*Rt(b, S(3)) + Rt(a, S(3))), x), x) def With704(a, b, n, x): r = Numerator(Rt(a/b, n)) s = Denominator(Rt(a/b, n)) k = Symbol('k') u = Symbol('u') u = Int((r - s*x*cos(Pi*(S(2)*k + S(-1))/n))/(r**S(2) - S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x) u = Int((r - s*x*cos(Pi*(2*k - 1)/n))/(r**2 - 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x) return Simp(Dist(2*r/(a*n), Sum_doit(u, List(k, 1, n/2 - 1/2)), x) + r*Int(1/(r + s*x), x)/(a*n), x) def With705(a, b, n, x): r = Numerator(Rt(-a/b, n)) s = Denominator(Rt(-a/b, n)) k = Symbol('k') u = Symbol('u') u = Int((r + s*x*cos(Pi*(S(2)*k + S(-1))/n))/(r**S(2) + S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x) u = Int((r + s*x*cos(Pi*(2*k - 1)/n))/(r**2 + 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x) return Simp(Dist(2*r/(a*n), Sum_doit(u, List(k, 1, n/2 - 1/2)), x) + r*Int(1/(r - s*x), x)/(a*n), x) def replacement706(a, b, x): return Simp(ArcTan(x*Rt(b, S(2))/Rt(a, S(2)))/(Rt(a, S(2))*Rt(b, S(2))), x) def replacement707(a, b, x): return -Simp(ArcTan(x*Rt(-b, S(2))/Rt(-a, S(2)))/(Rt(-a, S(2))*Rt(-b, S(2))), x) def replacement708(a, b, x): return Simp(ArcTan(x/Rt(a/b, S(2)))*Rt(a/b, S(2))/a, x) def replacement709(a, b, x): return Simp(atanh(x*Rt(-b, S(2))/Rt(a, S(2)))/(Rt(a, S(2))*Rt(-b, S(2))), x) def replacement710(a, b, x): return -Simp(atanh(x*Rt(b, S(2))/Rt(-a, S(2)))/(Rt(-a, S(2))*Rt(b, S(2))), x) def replacement711(a, b, x): return Simp(Rt(-a/b, S(2))*atanh(x/Rt(-a/b, S(2)))/a, x) def With712(a, b, n, x): r = Numerator(Rt(a/b, n)) s = Denominator(Rt(a/b, n)) k = Symbol('k') u = Symbol('u') v = Symbol('v') u = Int((r - s*x*cos(Pi*(S(2)*k + S(-1))/n))/(r**S(2) - S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x) + Int((r + s*x*cos(Pi*(S(2)*k + S(-1))/n))/(r**S(2) + S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x) u = Int((r - s*x*cos(Pi*(2*k - 1)/n))/(r**2 - 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x) + Int((r + s*x*cos(Pi*(2*k - 1)/n))/(r**2 + 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x) return Simp(Dist(2*r/(a*n), Sum_doit(u, List(k, 1, n/4 - 1/2)), x) + 2*r**2*Int(1/(r**2 + s**2*x**2), x)/(a*n), x) def With713(a, b, n, x): r = Numerator(Rt(-a/b, n)) s = Denominator(Rt(-a/b, n)) k = Symbol('k') u = Symbol('u') u = Int((r - s*x*cos(S(2)*Pi*k/n))/(r**S(2) - S(2)*r*s*x*cos(S(2)*Pi*k/n) + s**S(2)*x**S(2)), x) + Int((r + s*x*cos(S(2)*Pi*k/n))/(r**S(2) + S(2)*r*s*x*cos(S(2)*Pi*k/n) + s**S(2)*x**S(2)), x) u = Int((r - s*x*cos(2*Pi*k/n))/(r**2 - 2*r*s*x*cos(2*Pi*k/n) + s**2*x**2), x) + Int((r + s*x*cos(2*Pi*k/n))/(r**2 + 2*r*s*x*cos(2*Pi*k/n) + s**2*x**2), x) return Simp(Dist(2*r/(a*n), Sum_doit(u, List(k, 1, n/4 - 1/2)), x) + 2*r**2*Int(1/(r**2 - s**2*x**2), x)/(a*n), x) def With714(a, b, x): r = Numerator(Rt(a/b, S(2))) s = Denominator(Rt(a/b, S(2))) return Dist(S(1)/(S(2)*r), Int((r - s*x**S(2))/(a + b*x**S(4)), x), x) + Dist(S(1)/(S(2)*r), Int((r + s*x**S(2))/(a + b*x**S(4)), x), x) def With715(a, b, x): r = Numerator(Rt(-a/b, S(2))) s = Denominator(Rt(-a/b, S(2))) return Dist(r/(S(2)*a), Int(S(1)/(r - s*x**S(2)), x), x) + Dist(r/(S(2)*a), Int(S(1)/(r + s*x**S(2)), x), x) def With716(a, b, n, x): r = Numerator(Rt(a/b, S(4))) s = Denominator(Rt(a/b, S(4))) return Dist(sqrt(S(2))*r/(S(4)*a), Int((sqrt(S(2))*r - s*x**(n/S(4)))/(r**S(2) - sqrt(S(2))*r*s*x**(n/S(4)) + s**S(2)*x**(n/S(2))), x), x) + Dist(sqrt(S(2))*r/(S(4)*a), Int((sqrt(S(2))*r + s*x**(n/S(4)))/(r**S(2) + sqrt(S(2))*r*s*x**(n/S(4)) + s**S(2)*x**(n/S(2))), x), x) def With717(a, b, n, x): r = Numerator(Rt(-a/b, S(2))) s = Denominator(Rt(-a/b, S(2))) return Dist(r/(S(2)*a), Int(S(1)/(r - s*x**(n/S(2))), x), x) + Dist(r/(S(2)*a), Int(S(1)/(r + s*x**(n/S(2))), x), x) def replacement718(a, b, x): return Simp(asinh(x*Rt(b, S(2))/sqrt(a))/Rt(b, S(2)), x) def replacement719(a, b, x): return Simp(asin(x*Rt(-b, S(2))/sqrt(a))/Rt(-b, S(2)), x) def replacement720(a, b, x): return Subst(Int(S(1)/(-b*x**S(2) + S(1)), x), x, x/sqrt(a + b*x**S(2))) def With721(a, b, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Simp(S(2)*S(3)**(S(3)/4)*sqrt((r**S(2)*x**S(2) - r*s*x + s**S(2))/(r*x + s*(S(1) + sqrt(S(3))))**S(2))*sqrt(sqrt(S(3)) + S(2))*(r*x + s)*EllipticF(asin((r*x + s*(S(1) - sqrt(S(3))))/(r*x + s*(S(1) + sqrt(S(3))))), S(-7) - S(4)*sqrt(S(3)))/(S(3)*r*sqrt(s*(r*x + s)/(r*x + s*(S(1) + sqrt(S(3))))**S(2))*sqrt(a + b*x**S(3))), x) def With722(a, b, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Simp(S(2)*S(3)**(S(3)/4)*sqrt((r**S(2)*x**S(2) - r*s*x + s**S(2))/(r*x + s*(S(1) - sqrt(S(3))))**S(2))*sqrt(S(2) - sqrt(S(3)))*(r*x + s)*EllipticF(asin((r*x + s*(S(1) + sqrt(S(3))))/(r*x + s*(S(1) - sqrt(S(3))))), S(-7) + S(4)*sqrt(S(3)))/(S(3)*r*sqrt(-s*(r*x + s)/(r*x + s*(S(1) - sqrt(S(3))))**S(2))*sqrt(a + b*x**S(3))), x) def With723(a, b, x): q = Rt(b/a, S(4)) return Simp(sqrt((a + b*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))**S(2)))*(q**S(2)*x**S(2) + S(1))*EllipticF(S(2)*ArcTan(q*x), S(1)/2)/(S(2)*q*sqrt(a + b*x**S(4))), x) def replacement724(a, b, x): return Simp(EllipticF(asin(x*Rt(-b, S(4))/Rt(a, S(4))), S(-1))/(Rt(a, S(4))*Rt(-b, S(4))), x) def With725(a, b, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-a*b, S(2)) if IntegerQ(q): return True return False def replacement725(a, b, x): q = Rt(-a*b, S(2)) return Simp(sqrt(S(2))*sqrt((a + q*x**S(2))/q)*sqrt(-a + q*x**S(2))*EllipticF(asin(sqrt(S(2))*x/sqrt((a + q*x**S(2))/q)), S(1)/2)/(S(2)*sqrt(-a)*sqrt(a + b*x**S(4))), x) def With726(a, b, x): q = Rt(-a*b, S(2)) return Simp(sqrt(S(2))*sqrt((a + q*x**S(2))/q)*sqrt((a - q*x**S(2))/(a + q*x**S(2)))*EllipticF(asin(sqrt(S(2))*x/sqrt((a + q*x**S(2))/q)), S(1)/2)/(S(2)*sqrt(a/(a + q*x**S(2)))*sqrt(a + b*x**S(4))), x) def replacement727(a, b, x): return Dist(sqrt(S(1) + b*x**S(4)/a)/sqrt(a + b*x**S(4)), Int(S(1)/sqrt(S(1) + b*x**S(4)/a), x), x) def With728(a, b, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Simp(S(3)**(S(3)/4)*x*sqrt((r**S(2)*x**S(4) - r*s*x**S(2) + s**S(2))/(r*x**S(2)*(S(1) + sqrt(S(3))) + s)**S(2))*(r*x**S(2) + s)*EllipticF(acos((r*x**S(2)*(S(1) - sqrt(S(3))) + s)/(r*x**S(2)*(S(1) + sqrt(S(3))) + s)), sqrt(S(3))/S(4) + S(1)/2)/(S(6)*s*sqrt(r*x**S(2)*(r*x**S(2) + s)/(r*x**S(2)*(S(1) + sqrt(S(3))) + s)**S(2))*sqrt(a + b*x**S(6))), x) def replacement729(a, b, x): return Dist(S(1)/2, Int((-x**S(2)*Rt(b/a, S(4)) + S(1))/sqrt(a + b*x**S(8)), x), x) + Dist(S(1)/2, Int((x**S(2)*Rt(b/a, S(4)) + S(1))/sqrt(a + b*x**S(8)), x), x) def replacement730(a, b, x): return -Dist(a, Int((a + b*x**S(2))**(S(-5)/4), x), x) + Simp(S(2)*x/(a + b*x**S(2))**(S(1)/4), x) def replacement731(a, b, x): return Simp(S(2)*EllipticE(asin(x*Rt(-b/a, S(2)))/S(2), S(2))/(a**(S(1)/4)*Rt(-b/a, S(2))), x) def replacement732(a, b, x): return Dist((S(1) + b*x**S(2)/a)**(S(1)/4)/(a + b*x**S(2))**(S(1)/4), Int((S(1) + b*x**S(2)/a)**(S(-1)/4), x), x) def replacement733(a, b, x): return Simp(S(2)*EllipticF(ArcTan(x*Rt(b/a, S(2)))/S(2), S(2))/(a**(S(3)/4)*Rt(b/a, S(2))), x) def replacement734(a, b, x): return Simp(S(2)*EllipticF(asin(x*Rt(-b/a, S(2)))/S(2), S(2))/(a**(S(3)/4)*Rt(-b/a, S(2))), x) def replacement735(a, b, x): return Dist((S(1) + b*x**S(2)/a)**(S(3)/4)/(a + b*x**S(2))**(S(3)/4), Int((S(1) + b*x**S(2)/a)**(S(-3)/4), x), x) def replacement736(a, b, x): return Dist(S(3)*sqrt(b*x**S(2))/(S(2)*b*x), Subst(Int(x/sqrt(-a + x**S(3)), x), x, (a + b*x**S(2))**(S(1)/3)), x) def replacement737(a, b, x): return Dist(S(3)*sqrt(b*x**S(2))/(S(2)*b*x), Subst(Int(S(1)/sqrt(-a + x**S(3)), x), x, (a + b*x**S(2))**(S(1)/3)), x) def replacement738(a, b, x): return Dist(x**S(3)*(a/(b*x**S(4)) + S(1))**(S(3)/4)/(a + b*x**S(4))**(S(3)/4), Int(S(1)/(x**S(3)*(a/(b*x**S(4)) + S(1))**(S(3)/4)), x), x) def replacement739(a, b, x): return -Dist(a/S(2), Int((a + b*x**S(2))**(S(-7)/6), x), x) + Simp(S(3)*x/(S(2)*(a + b*x**S(2))**(S(1)/6)), x) def replacement740(a, b, n, p, x): return Dist(a**(p + S(1)/n), Subst(Int((-b*x**n + S(1))**(-p + S(-1) - S(1)/n), x), x, x*(a + b*x**n)**(-S(1)/n)), x) def replacement741(a, b, n, p, x): return Dist((a/(a + b*x**n))**(p + S(1)/n)*(a + b*x**n)**(p + S(1)/n), Subst(Int((-b*x**n + S(1))**(-p + S(-1) - S(1)/n), x), x, x*(a + b*x**n)**(-S(1)/n)), x) def replacement742(a, b, n, p, x): return -Subst(Int((a + b*x**(-n))**p/x**S(2), x), x, S(1)/x) def With743(a, b, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k + S(-1))*(a + b*x**(k*n))**p, x), x, x**(S(1)/k)), x) def replacement744(a, b, n, p, x): return Int(ExpandIntegrand((a + b*x**n)**p, x), x) def replacement745(a, b, n, p, x): return Simp(a**p*x*Hypergeometric2F1(-p, S(1)/n, S(1) + S(1)/n, -b*x**n/a), x) def replacement746(a, b, n, p, x): return Dist(a**IntPart(p)*(S(1) + b*x**n/a)**(-FracPart(p))*(a + b*x**n)**FracPart(p), Int((S(1) + b*x**n/a)**p, x), x) def replacement747(a, b, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x**n)**p, x), x, u), x) def replacement748(a1, a2, b1, b2, n, p, x): return Int((a1*a2 + b1*b2*x**(S(2)*n))**p, x) def replacement749(a1, a2, b1, b2, n, p, x): return Dist(S(2)*a1*a2*n*p/(S(2)*n*p + S(1)), Int((a1 + b1*x**n)**(p + S(-1))*(a2 + b2*x**n)**(p + S(-1)), x), x) + Simp(x*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p/(S(2)*n*p + S(1)), x) def replacement750(a1, a2, b1, b2, n, p, x): return Dist((S(2)*n*(p + S(1)) + S(1))/(S(2)*a1*a2*n*(p + S(1))), Int((a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1)), x), x) - Simp(x*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(S(2)*a1*a2*n*(p + S(1))), x) def replacement751(a1, a2, b1, b2, n, p, x): return -Subst(Int((a1 + b1*x**(-n))**p*(a2 + b2*x**(-n))**p/x**S(2), x), x, S(1)/x) def With752(a1, a2, b1, b2, n, p, x): k = Denominator(S(2)*n) return Dist(k, Subst(Int(x**(k + S(-1))*(a1 + b1*x**(k*n))**p*(a2 + b2*x**(k*n))**p, x), x, x**(S(1)/k)), x) def replacement753(a1, a2, b1, b2, n, p, x): return Dist((a1 + b1*x**n)**FracPart(p)*(a2 + b2*x**n)**FracPart(p)*(a1*a2 + b1*b2*x**(S(2)*n))**(-FracPart(p)), Int((a1*a2 + b1*b2*x**(S(2)*n))**p, x), x) def replacement754(a1, a2, b1, b2, c, m, n, p, x): return Int((c*x)**m*(a1*a2 + b1*b2*x**(S(2)*n))**p, x) def replacement755(b, c, m, n, p, x): return Dist(b**(S(1) - (m + S(1))/n)*c**m/n, Subst(Int((b*x)**(p + S(-1) + (m + S(1))/n), x), x, x**n), x) def replacement756(b, c, m, n, p, x): return Dist(b**IntPart(p)*c**m*x**(-n*FracPart(p))*(b*x**n)**FracPart(p), Int(x**(m + n*p), x), x) def replacement757(b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(b*x**n)**p, x), x) def replacement758(a, b, m, n, p, x): return Int(x**(m + n*p)*(a*x**(-n) + b)**p, x) def replacement759(a, b, c, m, n, p, x): return Simp((c*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*c*(m + S(1))), x) def replacement760(a1, a2, b1, b2, c, m, n, p, x): return Simp((c*x)**(m + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(a1*a2*c*(m + S(1))), x) def replacement761(a, b, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b*x)**p, x), x, x**n), x) def replacement762(a1, a2, b1, b2, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a1 + b1*x)**p*(a2 + b2*x)**p, x), x, x**n), x) def replacement763(a, b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a + b*x**n)**p, x), x) def replacement764(a1, a2, b1, b2, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) def replacement765(a, b, c, m, n, p, x): return Int(ExpandIntegrand((c*x)**m*(a + b*x**n)**p, x), x) def replacement766(a, b, m, n, p, x): return -Dist(b*(m + n*(p + S(1)) + S(1))/(a*(m + S(1))), Int(x**(m + n)*(a + b*x**n)**p, x), x) + Simp(x**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*(m + S(1))), x) def replacement767(a1, a2, b1, b2, m, n, p, x): return -Dist(b1*b2*(m + S(2)*n*(p + S(1)) + S(1))/(a1*a2*(m + S(1))), Int(x**(m + S(2)*n)*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) + Simp(x**(m + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(a1*a2*(m + S(1))), x) def replacement768(a, b, c, m, n, p, x): return Dist((m + n*(p + S(1)) + S(1))/(a*n*(p + S(1))), Int((c*x)**m*(a + b*x**n)**(p + S(1)), x), x) - Simp((c*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*c*n*(p + S(1))), x) def replacement769(a1, a2, b1, b2, c, m, n, p, x): return Dist((m + S(2)*n*(p + S(1)) + S(1))/(S(2)*a1*a2*n*(p + S(1))), Int((c*x)**m*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1)), x), x) - Simp((c*x)**(m + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(S(2)*a1*a2*c*n*(p + S(1))), x) def With770(a, b, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False k = GCD(m + S(1), n) if Unequal(k, S(1)): return True return False def replacement770(a, b, m, n, p, x): k = GCD(m + S(1), n) return Dist(S(1)/k, Subst(Int(x**(S(-1) + (m + S(1))/k)*(a + b*x**(n/k))**p, x), x, x**k), x) def With771(a1, a2, b1, b2, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False k = GCD(m + S(1), S(2)*n) if Unequal(k, S(1)): return True return False def replacement771(a1, a2, b1, b2, m, n, p, x): k = GCD(m + S(1), S(2)*n) return Dist(S(1)/k, Subst(Int(x**(S(-1) + (m + S(1))/k)*(a1 + b1*x**(n/k))**p*(a2 + b2*x**(n/k))**p, x), x, x**k), x) def replacement772(a, b, c, m, n, p, x): return -Dist(b*c**(-n)*n*p/(m + S(1)), Int((c*x)**(m + n)*(a + b*x**n)**(p + S(-1)), x), x) + Simp((c*x)**(m + S(1))*(a + b*x**n)**p/(c*(m + S(1))), x) def replacement773(a1, a2, b1, b2, c, m, n, p, x): return Dist(S(2)*a1*a2*n*p/(m + S(2)*n*p + S(1)), Int((c*x)**m*(a1 + b1*x**n)**(p + S(-1))*(a2 + b2*x**n)**(p + S(-1)), x), x) + Simp((c*x)**(m + S(1))*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p/(c*(m + S(2)*n*p + S(1))), x) def replacement774(a, b, c, m, n, p, x): return Dist(a*n*p/(m + n*p + S(1)), Int((c*x)**m*(a + b*x**n)**(p + S(-1)), x), x) + Simp((c*x)**(m + S(1))*(a + b*x**n)**p/(c*(m + n*p + S(1))), x) def replacement775(a, b, x): return Dist(x*(a/(b*x**S(4)) + S(1))**(S(1)/4)/(b*(a + b*x**S(4))**(S(1)/4)), Int(S(1)/(x**S(3)*(a/(b*x**S(4)) + S(1))**(S(5)/4)), x), x) def replacement776(a, b, m, x): return -Dist(a*(m + S(-3))/(b*(m + S(-4))), Int(x**(m + S(-4))/(a + b*x**S(4))**(S(5)/4), x), x) + Simp(x**(m + S(-3))/(b*(a + b*x**S(4))**(S(1)/4)*(m + S(-4))), x) def replacement777(a, b, m, x): return -Dist(b*m/(a*(m + S(1))), Int(x**(m + S(4))/(a + b*x**S(4))**(S(5)/4), x), x) + Simp(x**(m + S(1))/(a*(a + b*x**S(4))**(S(1)/4)*(m + S(1))), x) def replacement778(a, b, c, x): return Dist(sqrt(c*x)*(a/(b*x**S(2)) + S(1))**(S(1)/4)/(b*(a + b*x**S(2))**(S(1)/4)), Int(S(1)/(x**S(2)*(a/(b*x**S(2)) + S(1))**(S(5)/4)), x), x) def replacement779(a, b, c, m, x): return -Dist(S(2)*a*c**S(2)*(m + S(-1))/(b*(S(2)*m + S(-3))), Int((c*x)**(m + S(-2))/(a + b*x**S(2))**(S(5)/4), x), x) + Simp(S(2)*c*(c*x)**(m + S(-1))/(b*(a + b*x**S(2))**(S(1)/4)*(S(2)*m + S(-3))), x) def replacement780(a, b, c, m, x): return -Dist(b*(S(2)*m + S(1))/(S(2)*a*c**S(2)*(m + S(1))), Int((c*x)**(m + S(2))/(a + b*x**S(2))**(S(5)/4), x), x) + Simp((c*x)**(m + S(1))/(a*c*(a + b*x**S(2))**(S(1)/4)*(m + S(1))), x) def replacement781(a, b, x): return -Dist(S(1)/b, Int(S(1)/(x**S(2)*(a + b*x**S(4))**(S(1)/4)), x), x) - Simp(S(1)/(b*x*(a + b*x**S(4))**(S(1)/4)), x) def replacement782(a, b, c, m, n, p, x): return -Dist(c**n*(m - n + S(1))/(b*n*(p + S(1))), Int((c*x)**(m - n)*(a + b*x**n)**(p + S(1)), x), x) + Simp(c**(n + S(-1))*(c*x)**(m - n + S(1))*(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement783(a1, a2, b1, b2, c, m, n, p, x): return -Dist(c**(S(2)*n)*(m - S(2)*n + S(1))/(S(2)*b1*b2*n*(p + S(1))), Int((c*x)**(m - S(2)*n)*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1)), x), x) + Simp(c**(S(2)*n + S(-1))*(c*x)**(m - S(2)*n + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(S(2)*b1*b2*n*(p + S(1))), x) def replacement784(a, b, c, m, n, p, x): return Dist((m + n*(p + S(1)) + S(1))/(a*n*(p + S(1))), Int((c*x)**m*(a + b*x**n)**(p + S(1)), x), x) - Simp((c*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*c*n*(p + S(1))), x) def replacement785(a1, a2, b1, b2, c, m, n, p, x): return Dist((m + S(2)*n*(p + S(1)) + S(1))/(S(2)*a1*a2*n*(p + S(1))), Int((c*x)**m*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1)), x), x) - Simp((c*x)**(m + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(S(2)*a1*a2*c*n*(p + S(1))), x) def replacement786(a, b, x): return Dist(S(1)/(S(3)*Rt(a, S(3))*Rt(b, S(3))), Int((x*Rt(b, S(3)) + Rt(a, S(3)))/(x**S(2)*Rt(b, S(3))**S(2) - x*Rt(a, S(3))*Rt(b, S(3)) + Rt(a, S(3))**S(2)), x), x) - Dist(S(1)/(S(3)*Rt(a, S(3))*Rt(b, S(3))), Int(S(1)/(x*Rt(b, S(3)) + Rt(a, S(3))), x), x) def With787(a, b, m, n, x): r = Numerator(Rt(a/b, n)) s = Denominator(Rt(a/b, n)) k = Symbol('k') u = Symbol('u') u = Int((r*cos(Pi*m*(S(2)*k + S(-1))/n) - s*x*cos(Pi*(S(2)*k + S(-1))*(m + S(1))/n))/(r**S(2) - S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x) u = Int((r*cos(Pi*m*(2*k - 1)/n) - s*x*cos(Pi*(2*k - 1)*(m + 1)/n))/(r**2 - 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x) return Simp(Dist(2*r**(m + 1)*s**(-m)/(a*n), Sum_doit(u, List(k, 1, n/2 - 1/2)), x) - s**(-m)*(-r)**(m + 1)*Int(1/(r + s*x), x)/(a*n), x) def With788(a, b, m, n, x): r = Numerator(Rt(-a/b, n)) s = Denominator(Rt(-a/b, n)) k = Symbol('k') u = Symbol('u') u = Int((r*cos(Pi*m*(S(2)*k + S(-1))/n) + s*x*cos(Pi*(S(2)*k + S(-1))*(m + S(1))/n))/(r**S(2) + S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x) u = Int((r*cos(Pi*m*(2*k - 1)/n) + s*x*cos(Pi*(2*k - 1)*(m + 1)/n))/(r**2 + 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x) return Simp(-Dist(2*s**(-m)*(-r)**(m + 1)/(a*n), Sum_doit(u, List(k, 1, n/2 - 1/2)), x) + r**(m + 1)*s**(-m)*Int(1/(r - s*x), x)/(a*n), x) def With789(a, b, m, n, x): r = Numerator(Rt(a/b, n)) s = Denominator(Rt(a/b, n)) k = Symbol('k') u = Symbol('u') u = Int((r*cos(Pi*m*(S(2)*k + S(-1))/n) - s*x*cos(Pi*(S(2)*k + S(-1))*(m + S(1))/n))/(r**S(2) - S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x) + Int((r*cos(Pi*m*(S(2)*k + S(-1))/n) + s*x*cos(Pi*(S(2)*k + S(-1))*(m + S(1))/n))/(r**S(2) + S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x) u = Int((r*cos(Pi*m*(2*k - 1)/n) - s*x*cos(Pi*(2*k - 1)*(m + 1)/n))/(r**2 - 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x) + Int((r*cos(Pi*m*(2*k - 1)/n) + s*x*cos(Pi*(2*k - 1)*(m + 1)/n))/(r**2 + 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x) return Simp(2*(-1)**(m/2)*r**(m + 2)*s**(-m)*Int(1/(r**2 + s**2*x**2), x)/(a*n) + Dist(2*r**(m + 1)*s**(-m)/(a*n), Sum_doit(u, List(k, 1, n/4 - 1/2)), x), x) def With790(a, b, m, n, x): r = Numerator(Rt(-a/b, n)) s = Denominator(Rt(-a/b, n)) k = Symbol('k') u = Symbol('u') u = Int((r*cos(S(2)*Pi*k*m/n) - s*x*cos(S(2)*Pi*k*(m + S(1))/n))/(r**S(2) - S(2)*r*s*x*cos(S(2)*Pi*k/n) + s**S(2)*x**S(2)), x) + Int((r*cos(S(2)*Pi*k*m/n) + s*x*cos(S(2)*Pi*k*(m + S(1))/n))/(r**S(2) + S(2)*r*s*x*cos(S(2)*Pi*k/n) + s**S(2)*x**S(2)), x) u = Int((r*cos(2*Pi*k*m/n) - s*x*cos(2*Pi*k*(m + 1)/n))/(r**2 - 2*r*s*x*cos(2*Pi*k/n) + s**2*x**2), x) + Int((r*cos(2*Pi*k*m/n) + s*x*cos(2*Pi*k*(m + 1)/n))/(r**2 + 2*r*s*x*cos(2*Pi*k/n) + s**2*x**2), x) return Simp(Dist(2*r**(m + 1)*s**(-m)/(a*n), Sum_doit(u, List(k, 1, n/4 - 1/2)), x) + 2*r**(m + 2)*s**(-m)*Int(1/(r**2 - s**2*x**2), x)/(a*n), x) def With791(a, b, x): r = Numerator(Rt(a/b, S(2))) s = Denominator(Rt(a/b, S(2))) return -Dist(S(1)/(S(2)*s), Int((r - s*x**S(2))/(a + b*x**S(4)), x), x) + Dist(S(1)/(S(2)*s), Int((r + s*x**S(2))/(a + b*x**S(4)), x), x) def With792(a, b, x): r = Numerator(Rt(-a/b, S(2))) s = Denominator(Rt(-a/b, S(2))) return -Dist(s/(S(2)*b), Int(S(1)/(r - s*x**S(2)), x), x) + Dist(s/(S(2)*b), Int(S(1)/(r + s*x**S(2)), x), x) def With793(a, b, m, n, x): r = Numerator(Rt(a/b, S(4))) s = Denominator(Rt(a/b, S(4))) return Dist(sqrt(S(2))*s**S(3)/(S(4)*b*r), Int(x**(m - n/S(4))/(r**S(2) - sqrt(S(2))*r*s*x**(n/S(4)) + s**S(2)*x**(n/S(2))), x), x) - Dist(sqrt(S(2))*s**S(3)/(S(4)*b*r), Int(x**(m - n/S(4))/(r**S(2) + sqrt(S(2))*r*s*x**(n/S(4)) + s**S(2)*x**(n/S(2))), x), x) def With794(a, b, m, n, x): r = Numerator(Rt(-a/b, S(2))) s = Denominator(Rt(-a/b, S(2))) return Dist(r/(S(2)*a), Int(x**m/(r - s*x**(n/S(2))), x), x) + Dist(r/(S(2)*a), Int(x**m/(r + s*x**(n/S(2))), x), x) def With795(a, b, m, n, x): r = Numerator(Rt(-a/b, S(2))) s = Denominator(Rt(-a/b, S(2))) return -Dist(s/(S(2)*b), Int(x**(m - n/S(2))/(r - s*x**(n/S(2))), x), x) + Dist(s/(S(2)*b), Int(x**(m - n/S(2))/(r + s*x**(n/S(2))), x), x) def replacement796(a, b, m, n, x): return Int(PolynomialDivide(x**m, a + b*x**n, x), x) def With797(a, b, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Dist(S(1)/r, Int((r*x + s*(S(1) - sqrt(S(3))))/sqrt(a + b*x**S(3)), x), x) + Dist(sqrt(S(2))*s/(r*sqrt(sqrt(S(3)) + S(2))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With798(a, b, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Dist(S(1)/r, Int((r*x + s*(S(1) + sqrt(S(3))))/sqrt(a + b*x**S(3)), x), x) - Dist(sqrt(S(2))*s/(r*sqrt(S(2) - sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With799(a, b, x): q = Rt(b/a, S(2)) return -Dist(S(1)/q, Int((-q*x**S(2) + S(1))/sqrt(a + b*x**S(4)), x), x) + Dist(S(1)/q, Int(S(1)/sqrt(a + b*x**S(4)), x), x) def With800(a, b, x): q = Rt(-b/a, S(2)) return -Dist(S(1)/q, Int((-q*x**S(2) + S(1))/sqrt(a + b*x**S(4)), x), x) + Dist(S(1)/q, Int(S(1)/sqrt(a + b*x**S(4)), x), x) def With801(a, b, x): q = Rt(-b/a, S(2)) return Dist(S(1)/q, Int((q*x**S(2) + S(1))/sqrt(a + b*x**S(4)), x), x) - Dist(S(1)/q, Int(S(1)/sqrt(a + b*x**S(4)), x), x) def With802(a, b, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return -Dist(S(1)/(S(2)*r**S(2)), Int((-S(2)*r**S(2)*x**S(4) + s**S(2)*(S(-1) + sqrt(S(3))))/sqrt(a + b*x**S(6)), x), x) + Dist(s**S(2)*(S(-1) + sqrt(S(3)))/(S(2)*r**S(2)), Int(S(1)/sqrt(a + b*x**S(6)), x), x) def replacement803(a, b, x): return -Dist(S(1)/(S(2)*Rt(b/a, S(4))), Int((-x**S(2)*Rt(b/a, S(4)) + S(1))/sqrt(a + b*x**S(8)), x), x) + Dist(S(1)/(S(2)*Rt(b/a, S(4))), Int((x**S(2)*Rt(b/a, S(4)) + S(1))/sqrt(a + b*x**S(8)), x), x) def replacement804(a, b, x): return -Dist(a/S(2), Int(x**S(2)/(a + b*x**S(4))**(S(5)/4), x), x) + Simp(x**S(3)/(S(2)*(a + b*x**S(4))**(S(1)/4)), x) def replacement805(a, b, x): return Dist(a/(S(2)*b), Int(S(1)/(x**S(2)*(a + b*x**S(4))**(S(1)/4)), x), x) + Simp((a + b*x**S(4))**(S(3)/4)/(S(2)*b*x), x) def replacement806(a, b, x): return -Dist(b, Int(x**S(2)/(a + b*x**S(4))**(S(5)/4), x), x) - Simp(S(1)/(x*(a + b*x**S(4))**(S(1)/4)), x) def replacement807(a, b, x): return Dist(x*(a/(b*x**S(4)) + S(1))**(S(1)/4)/(a + b*x**S(4))**(S(1)/4), Int(S(1)/(x**S(3)*(a/(b*x**S(4)) + S(1))**(S(1)/4)), x), x) def replacement808(a, b, c, x): return -Dist(a/S(2), Int(sqrt(c*x)/(a + b*x**S(2))**(S(5)/4), x), x) + Simp(x*sqrt(c*x)/(a + b*x**S(2))**(S(1)/4), x) def replacement809(a, b, c, x): return Dist(a*c**S(2)/(S(2)*b), Int(S(1)/((c*x)**(S(3)/2)*(a + b*x**S(2))**(S(1)/4)), x), x) + Simp(c*(a + b*x**S(2))**(S(3)/4)/(b*sqrt(c*x)), x) def replacement810(a, b, c, x): return -Dist(b/c**S(2), Int(sqrt(c*x)/(a + b*x**S(2))**(S(5)/4), x), x) + Simp(-S(2)/(c*sqrt(c*x)*(a + b*x**S(2))**(S(1)/4)), x) def replacement811(a, b, c, x): return Dist(sqrt(c*x)*(a/(b*x**S(2)) + S(1))**(S(1)/4)/(c**S(2)*(a + b*x**S(2))**(S(1)/4)), Int(S(1)/(x**S(2)*(a/(b*x**S(2)) + S(1))**(S(1)/4)), x), x) def replacement812(a, b, c, m, n, p, x): return -Dist(a*c**n*(m - n + S(1))/(b*(m + n*p + S(1))), Int((c*x)**(m - n)*(a + b*x**n)**p, x), x) + Simp(c**(n + S(-1))*(c*x)**(m - n + S(1))*(a + b*x**n)**(p + S(1))/(b*(m + n*p + S(1))), x) def replacement813(a, b, c, m, n, p, x): return -Dist(a*c**n*(m - n + S(1))/(b*(m + n*p + S(1))), Int((c*x)**(m - n)*(a + b*x**n)**p, x), x) + Simp(c**(n + S(-1))*(c*x)**(m - n + S(1))*(a + b*x**n)**(p + S(1))/(b*(m + n*p + S(1))), x) def replacement814(a1, a2, b1, b2, c, m, n, p, x): return -Dist(a1*a2*c**(S(2)*n)*(m - S(2)*n + S(1))/(b1*b2*(m + S(2)*n*p + S(1))), Int((c*x)**(m - S(2)*n)*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) + Simp(c**(S(2)*n + S(-1))*(c*x)**(m - S(2)*n + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(b1*b2*(m + S(2)*n*p + S(1))), x) def replacement815(a1, a2, b1, b2, c, m, n, p, x): return -Dist(a1*a2*c**(S(2)*n)*(m - S(2)*n + S(1))/(b1*b2*(m + S(2)*n*p + S(1))), Int((c*x)**(m - S(2)*n)*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) + Simp(c**(S(2)*n + S(-1))*(c*x)**(m - S(2)*n + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(b1*b2*(m + S(2)*n*p + S(1))), x) def replacement816(a, b, c, m, n, p, x): return -Dist(b*c**(-n)*(m + n*(p + S(1)) + S(1))/(a*(m + S(1))), Int((c*x)**(m + n)*(a + b*x**n)**p, x), x) + Simp((c*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*c*(m + S(1))), x) def replacement817(a, b, c, m, n, p, x): return -Dist(b*c**(-n)*(m + n*(p + S(1)) + S(1))/(a*(m + S(1))), Int((c*x)**(m + n)*(a + b*x**n)**p, x), x) + Simp((c*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*c*(m + S(1))), x) def replacement818(a1, a2, b1, b2, c, m, n, p, x): return -Dist(b1*b2*c**(-S(2)*n)*(m + S(2)*n*(p + S(1)) + S(1))/(a1*a2*(m + S(1))), Int((c*x)**(m + S(2)*n)*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) + Simp((c*x)**(m + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(a1*a2*c*(m + S(1))), x) def replacement819(a1, a2, b1, b2, c, m, n, p, x): return -Dist(b1*b2*c**(-S(2)*n)*(m + S(2)*n*(p + S(1)) + S(1))/(a1*a2*(m + S(1))), Int((c*x)**(m + S(2)*n)*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) + Simp((c*x)**(m + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(a1*a2*c*(m + S(1))), x) def With820(a, b, c, m, n, p, x): k = Denominator(m) return Dist(k/c, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*c**(-n)*x**(k*n))**p, x), x, (c*x)**(S(1)/k)), x) def With821(a1, a2, b1, b2, c, m, n, p, x): k = Denominator(m) return Dist(k/c, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a1 + b1*c**(-n)*x**(k*n))**p*(a2 + b2*c**(-n)*x**(k*n))**p, x), x, (c*x)**(S(1)/k)), x) def replacement822(a, b, m, n, p, x): return Dist(a**(p + (m + S(1))/n), Subst(Int(x**m*(-b*x**n + S(1))**(-p + S(-1) - (m + S(1))/n), x), x, x*(a + b*x**n)**(-S(1)/n)), x) def replacement823(a1, a2, b1, b2, m, n, p, x): return Dist((a1*a2)**(p + (m + S(1))/(S(2)*n)), Subst(Int(x**m*(-b1*x**n + S(1))**(-p + S(-1) - (m + S(1))/(S(2)*n))*(-b2*x**n + S(1))**(-p + S(-1) - (m + S(1))/(S(2)*n)), x), x, x*(a1 + b1*x**n)**(-S(1)/(S(2)*n))*(a2 + b2*x**n)**(-S(1)/(S(2)*n))), x) def replacement824(a, b, m, n, p, x): return Dist((a/(a + b*x**n))**(p + (m + S(1))/n)*(a + b*x**n)**(p + (m + S(1))/n), Subst(Int(x**m*(-b*x**n + S(1))**(-p + S(-1) - (m + S(1))/n), x), x, x*(a + b*x**n)**(-S(1)/n)), x) def replacement825(a1, a2, b1, b2, m, n, p, x): return Dist((a1/(a1 + b1*x**n))**(p + (m + S(1))/(S(2)*n))*(a2/(a2 + b2*x**n))**(p + (m + S(1))/(S(2)*n))*(a1 + b1*x**n)**(p + (m + S(1))/(S(2)*n))*(a2 + b2*x**n)**(p + (m + S(1))/(S(2)*n)), Subst(Int(x**m*(-b1*x**n + S(1))**(-p + S(-1) - (m + S(1))/(S(2)*n))*(-b2*x**n + S(1))**(-p + S(-1) - (m + S(1))/(S(2)*n)), x), x, x*(a1 + b1*x**n)**(-S(1)/(S(2)*n))*(a2 + b2*x**n)**(-S(1)/(S(2)*n))), x) def replacement826(a, b, m, n, p, x): return -Subst(Int(x**(-m + S(-2))*(a + b*x**(-n))**p, x), x, S(1)/x) def replacement827(a1, a2, b1, b2, m, n, p, x): return -Subst(Int(x**(-m + S(-2))*(a1 + b1*x**(-n))**p*(a2 + b2*x**(-n))**p, x), x, S(1)/x) def With828(a, b, c, m, n, p, x): k = Denominator(m) return -Dist(k/c, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a + b*c**(-n)*x**(-k*n))**p, x), x, (c*x)**(-S(1)/k)), x) def With829(a1, a2, b1, b2, c, m, n, p, x): k = Denominator(m) return -Dist(k/c, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a1 + b1*c**(-n)*x**(-k*n))**p*(a2 + b2*c**(-n)*x**(-k*n))**p, x), x, (c*x)**(-S(1)/k)), x) def replacement830(a, b, c, m, n, p, x): return -Dist((c*x)**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(a + b*x**(-n))**p, x), x, S(1)/x), x) def replacement831(a1, a2, b1, b2, c, m, n, p, x): return -Dist((c*x)**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(a1 + b1*x**(-n))**p*(a2 + b2*x**(-n))**p, x), x, S(1)/x), x) def With832(a, b, m, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*x**(k*n))**p, x), x, x**(S(1)/k)), x) def With833(a1, a2, b1, b2, m, n, p, x): k = Denominator(S(2)*n) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a1 + b1*x**(k*n))**p*(a2 + b2*x**(k*n))**p, x), x, x**(S(1)/k)), x) def replacement834(a, b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a + b*x**n)**p, x), x) def replacement835(a1, a2, b1, b2, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) def replacement836(a, b, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*x**(n/(m + S(1))))**p, x), x, x**(m + S(1))), x) def replacement837(a1, a2, b1, b2, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a1 + b1*x**(n/(m + S(1))))**p*(a2 + b2*x**(n/(m + S(1))))**p, x), x, x**(m + S(1))), x) def replacement838(a, b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a + b*x**n)**p, x), x) def replacement839(a1, a2, b1, b2, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) def replacement840(a, b, m, n, p, x): return -Dist(b*n*p/(m + S(1)), Int(x**(m + n)*(a + b*x**n)**(p + S(-1)), x), x) + Simp(x**(m + S(1))*(a + b*x**n)**p/(m + S(1)), x) def replacement841(a1, a2, b1, b2, m, n, p, x): return -Dist(S(2)*b1*b2*n*p/(m + S(1)), Int(x**(m + n)*(a1 + b1*x**n)**(p + S(-1))*(a2 + b2*x**n)**(p + S(-1)), x), x) + Simp(x**(m + S(1))*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p/(m + S(1)), x) def replacement842(a, b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a + b*x**n)**p, x), x) def replacement843(a1, a2, b1, b2, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) def replacement844(a, b, c, m, n, p, x): return Dist(a*n*p/(m + n*p + S(1)), Int((c*x)**m*(a + b*x**n)**(p + S(-1)), x), x) + Simp((c*x)**(m + S(1))*(a + b*x**n)**p/(c*(m + n*p + S(1))), x) def replacement845(a1, a2, b1, b2, c, m, n, p, x): return Dist(S(2)*a1*a2*n*p/(m + S(2)*n*p + S(1)), Int((c*x)**m*(a1 + b1*x**n)**(p + S(-1))*(a2 + b2*x**n)**(p + S(-1)), x), x) + Simp((c*x)**(m + S(1))*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p/(c*(m + S(2)*n*p + S(1))), x) def With846(a, b, m, n, p, x): k = Denominator(p) return Dist(a**(p + (m + S(1))/n)*k/n, Subst(Int(x**(k*(m + S(1))/n + S(-1))*(-b*x**k + S(1))**(-p + S(-1) - (m + S(1))/n), x), x, x**(n/k)*(a + b*x**n)**(-S(1)/k)), x) def With847(a1, a2, b1, b2, m, n, p, x): k = Denominator(p) return Dist(k*(a1*a2)**(p + (m + S(1))/(S(2)*n))/(S(2)*n), Subst(Int(x**(k*(m + S(1))/(S(2)*n) + S(-1))*(-b1*x**k + S(1))**(-p + S(-1) - (m + S(1))/(S(2)*n))*(-b2*x**k + S(1))**(-p + S(-1) - (m + S(1))/(S(2)*n)), x), x, x**(S(2)*n/k)*(a1 + b1*x**n)**(-S(1)/k)*(a2 + b2*x**n)**(-S(1)/k)), x) def replacement848(a, b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a + b*x**n)**p, x), x) def replacement849(a1, a2, b1, b2, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a1 + b1*x**n)**p*(a2 + b2*x**n)**p, x), x) def replacement850(a, b, c, m, n, p, x): return Dist((m + n*(p + S(1)) + S(1))/(a*n*(p + S(1))), Int((c*x)**m*(a + b*x**n)**(p + S(1)), x), x) - Simp((c*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*c*n*(p + S(1))), x) def replacement851(a1, a2, b1, b2, c, m, n, p, x): return Dist((m + S(2)*n*(p + S(1)) + S(1))/(S(2)*a1*a2*n*(p + S(1))), Int((c*x)**m*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1)), x), x) - Simp((c*x)**(m + S(1))*(a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(S(2)*a1*a2*c*n*(p + S(1))), x) def With852(a, b, m, n, x): mn = m - n return -Dist(a/b, Int(x**mn/(a + b*x**n), x), x) + Simp(x**(mn + S(1))/(b*(mn + S(1))), x) def replacement853(a, b, m, n, x): return -Dist(b/a, Int(x**(m + n)/(a + b*x**n), x), x) + Simp(x**(m + S(1))/(a*(m + S(1))), x) def replacement854(a, b, c, m, n, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m/(a + b*x**n), x), x) def replacement855(a, b, c, m, n, p, x): return Simp(a**p*(c*x)**(m + S(1))*Hypergeometric2F1(-p, (m + S(1))/n, S(1) + (m + S(1))/n, -b*x**n/a)/(c*(m + S(1))), x) def replacement856(a, b, c, m, n, p, x): return Dist(a**IntPart(p)*(S(1) + b*x**n/a)**(-FracPart(p))*(a + b*x**n)**FracPart(p), Int((c*x)**m*(S(1) + b*x**n/a)**p, x), x) def replacement857(a, b, m, n, p, v, x): return Dist(Coefficient(v, x, S(1))**(-m + S(-1)), Subst(Int(SimplifyIntegrand((a + b*x**n)**p*(x - Coefficient(v, x, S(0)))**m, x), x), x, v), x) def replacement858(a, b, m, n, p, u, v, x): return Dist(u**m*v**(-m)/Coefficient(v, x, S(1)), Subst(Int(x**m*(a + b*x**n)**p, x), x, v), x) def replacement859(a1, a2, b1, b2, c, m, n, p, x): return Dist((a1 + b1*x**n)**FracPart(p)*(a2 + b2*x**n)**FracPart(p)*(a1*a2 + b1*b2*x**(S(2)*n))**(-FracPart(p)), Int((c*x)**m*(a1*a2 + b1*b2*x**(S(2)*n))**p, x), x) def replacement860(a, b, c, d, n, p, q, x): return Int(ExpandIntegrand((a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement861(a, b, c, d, n, p, q, x): return Int(x**(n*(p + q))*(a*x**(-n) + b)**p*(c*x**(-n) + d)**q, x) def replacement862(a, b, c, d, n, p, q, x): return -Subst(Int((a + b*x**(-n))**p*(c + d*x**(-n))**q/x**S(2), x), x, S(1)/x) def With863(a, b, c, d, n, p, q, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g + S(-1))*(a + b*x**(g*n))**p*(c + d*x**(g*n))**q, x), x, x**(S(1)/g)), x) def replacement864(a, b, c, d, n, p, x): return Subst(Int(S(1)/(c - x**n*(-a*d + b*c)), x), x, x*(a + b*x**n)**(-S(1)/n)) def replacement865(a, b, c, d, n, p, q, x): return -Dist(c*q/(a*(p + S(1))), Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1)), x), x) - Simp(x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(a*n*(p + S(1))), x) def replacement866(a, b, c, d, n, p, q, x): return Simp(a**p*c**(-p + S(-1))*x*(c + d*x**n)**(-S(1)/n)*Hypergeometric2F1(S(1)/n, -p, S(1) + S(1)/n, -x**n*(-a*d + b*c)/(a*(c + d*x**n))), x) def replacement867(a, b, c, d, n, p, q, x): return Simp(x*(c*(a + b*x**n)/(a*(c + d*x**n)))**(-p)*(a + b*x**n)**p*(c + d*x**n)**(-p - S(1)/n)*Hypergeometric2F1(S(1)/n, -p, S(1) + S(1)/n, -x**n*(-a*d + b*c)/(a*(c + d*x**n)))/c, x) def replacement868(a, b, c, d, n, p, q, x): return Simp(x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(a*c), x) def replacement869(a, b, c, d, n, p, q, x): return Dist((b*c + n*(p + S(1))*(-a*d + b*c))/(a*n*(p + S(1))*(-a*d + b*c)), Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**q, x), x) - Simp(b*x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(a*n*(p + S(1))*(-a*d + b*c)), x) def replacement870(a, b, c, d, n, p, x): return Simp(c*x*(a + b*x**n)**(p + S(1))/a, x) def replacement871(a, b, c, d, n, p, x): return -Dist((a*d - b*c*(n*(p + S(1)) + S(1)))/(a*b*n*(p + S(1))), Int((a + b*x**n)**(p + S(1)), x), x) - Simp(x*(a + b*x**n)**(p + S(1))*(-a*d + b*c)/(a*b*n*(p + S(1))), x) def replacement872(a, b, c, d, n, x): return -Dist((-a*d + b*c)/a, Int(S(1)/(a*x**(-n) + b), x), x) + Simp(c*x/a, x) def replacement873(a, b, c, d, n, p, x): return -Dist((a*d - b*c*(n*(p + S(1)) + S(1)))/(b*(n*(p + S(1)) + S(1))), Int((a + b*x**n)**p, x), x) + Simp(d*x*(a + b*x**n)**(p + S(1))/(b*(n*(p + S(1)) + S(1))), x) def replacement874(a, b, c, d, n, p, q, x): return Int(PolynomialDivide((a + b*x**n)**p, (c + d*x**n)**(-q), x), x) def replacement875(a, b, c, d, n, x): return Dist(b/(-a*d + b*c), Int(S(1)/(a + b*x**n), x), x) - Dist(d/(-a*d + b*c), Int(S(1)/(c + d*x**n), x), x) def replacement876(a, b, c, d, x): return Dist(sqrt(S(3))/(S(2)*c), Int(S(1)/((a + b*x**S(2))**(S(1)/3)*(-x*Rt(b/a, S(2)) + sqrt(S(3)))), x), x) + Dist(sqrt(S(3))/(S(2)*c), Int(S(1)/((a + b*x**S(2))**(S(1)/3)*(x*Rt(b/a, S(2)) + sqrt(S(3)))), x), x) def replacement877(a, b, c, d, x): return Dist(S(1)/6, Int((-x*Rt(-b/a, S(2)) + S(3))/((a + b*x**S(2))**(S(1)/3)*(c + d*x**S(2))), x), x) + Dist(S(1)/6, Int((x*Rt(-b/a, S(2)) + S(3))/((a + b*x**S(2))**(S(1)/3)*(c + d*x**S(2))), x), x) def replacement878(a, b, c, d, x): return Dist(b/d, Int((a + b*x**S(2))**(S(-1)/3), x), x) - Dist((-a*d + b*c)/d, Int(S(1)/((a + b*x**S(2))**(S(1)/3)*(c + d*x**S(2))), x), x) def replacement879(a, b, c, d, x): return Dist(sqrt(-b*x**S(2)/a)/(S(2)*x), Subst(Int(S(1)/(sqrt(-b*x/a)*(a + b*x)**(S(1)/4)*(c + d*x)), x), x, x**S(2)), x) def replacement880(a, b, c, d, x): return Dist(sqrt(-b*x**S(2)/a)/(S(2)*x), Subst(Int(S(1)/(sqrt(-b*x/a)*(a + b*x)**(S(3)/4)*(c + d*x)), x), x, x**S(2)), x) def replacement881(a, b, c, d, p, x): return Dist(b/d, Int((a + b*x**S(2))**(p + S(-1)), x), x) - Dist((-a*d + b*c)/d, Int((a + b*x**S(2))**(p + S(-1))/(c + d*x**S(2)), x), x) def replacement882(a, b, c, d, p, x): return Dist(b/(-a*d + b*c), Int((a + b*x**S(2))**p, x), x) - Dist(d/(-a*d + b*c), Int((a + b*x**S(2))**(p + S(1))/(c + d*x**S(2)), x), x) def replacement883(a, b, c, d, x): return Dist(a/c, Subst(Int(S(1)/(-S(4)*a*b*x**S(4) + S(1)), x), x, x/sqrt(a + b*x**S(4))), x) def With884(a, b, c, d, x): q = Rt(-a*b, S(4)) return Simp(a*ArcTan(q*x*(a + q**S(2)*x**S(2))/(a*sqrt(a + b*x**S(4))))/(S(2)*c*q), x) + Simp(a*atanh(q*x*(a - q**S(2)*x**S(2))/(a*sqrt(a + b*x**S(4))))/(S(2)*c*q), x) def replacement885(a, b, c, d, x): return Dist(b/d, Int(S(1)/sqrt(a + b*x**S(4)), x), x) - Dist((-a*d + b*c)/d, Int(S(1)/(sqrt(a + b*x**S(4))*(c + d*x**S(4))), x), x) def replacement886(a, b, c, d, x): return Dist(sqrt(a/(a + b*x**S(4)))*sqrt(a + b*x**S(4)), Subst(Int(S(1)/((c - x**S(4)*(-a*d + b*c))*sqrt(-b*x**S(4) + S(1))), x), x, x/(a + b*x**S(4))**(S(1)/4)), x) def replacement887(a, b, c, d, p, x): return Dist(b/d, Int((a + b*x**S(4))**(p + S(-1)), x), x) - Dist((-a*d + b*c)/d, Int((a + b*x**S(4))**(p + S(-1))/(c + d*x**S(4)), x), x) def replacement888(a, b, c, d, x): return Dist(S(1)/(S(2)*c), Int(S(1)/(sqrt(a + b*x**S(4))*(-x**S(2)*Rt(-d/c, S(2)) + S(1))), x), x) + Dist(S(1)/(S(2)*c), Int(S(1)/(sqrt(a + b*x**S(4))*(x**S(2)*Rt(-d/c, S(2)) + S(1))), x), x) def replacement889(a, b, c, d, x): return Dist(b/(-a*d + b*c), Int((a + b*x**S(4))**(S(-3)/4), x), x) - Dist(d/(-a*d + b*c), Int((a + b*x**S(4))**(S(1)/4)/(c + d*x**S(4)), x), x) def replacement890(a, b, c, d, x): return Simp(sqrt(a + b*x**S(2))*EllipticE(ArcTan(x*Rt(d/c, S(2))), S(1) - b*c/(a*d))/(c*sqrt(c*(a + b*x**S(2))/(a*(c + d*x**S(2))))*sqrt(c + d*x**S(2))*Rt(d/c, S(2))), x) def replacement891(a, b, c, d, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*Simp(c*(n*(p + S(1)) + S(1)) + d*x**n*(n*(p + q + S(1)) + S(1)), x), x), x) - Simp(x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(a*n*(p + S(1))), x) def replacement892(a, b, c, d, n, p, q, x): return -Dist(S(1)/(a*b*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-2))*Simp(c*(a*d - b*c*(n*(p + S(1)) + S(1))) + d*x**n*(a*d*(n*(q + S(-1)) + S(1)) - b*c*(n*(p + q) + S(1))), x), x), x) + Simp(x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*(a*d - b*c)/(a*b*n*(p + S(1))), x) def replacement893(a, b, c, d, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))*(-a*d + b*c)), Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(b*c + b*d*x**n*(n*(p + q + S(2)) + S(1)) + n*(p + S(1))*(-a*d + b*c), x), x), x) - Simp(b*x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(a*n*(p + S(1))*(-a*d + b*c)), x) def replacement894(a, b, c, d, n, p, q, x): return Int(ExpandIntegrand((a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement895(a, b, c, d, n, p, q, x): return Dist(S(1)/(b*(n*(p + q) + S(1))), Int((a + b*x**n)**p*(c + d*x**n)**(q + S(-2))*Simp(c*(-a*d + b*c*(n*(p + q) + S(1))) + d*x**n*(-a*d*(n*(q + S(-1)) + S(1)) + b*c*(n*(p + S(2)*q + S(-1)) + S(1))), x), x), x) + Simp(d*x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))/(b*(n*(p + q) + S(1))), x) def replacement896(a, b, c, d, n, p, q, x): return Dist(n/(n*(p + q) + S(1)), Int((a + b*x**n)**(p + S(-1))*(c + d*x**n)**(q + S(-1))*Simp(a*c*(p + q) + x**n*(a*d*(p + q) + q*(-a*d + b*c)), x), x), x) + Simp(x*(a + b*x**n)**p*(c + d*x**n)**q/(n*(p + q) + S(1)), x) def replacement897(a, b, c, d, x): return Simp(sqrt(a + b*x**S(2))*EllipticF(ArcTan(x*Rt(d/c, S(2))), S(1) - b*c/(a*d))/(a*sqrt(c*(a + b*x**S(2))/(a*(c + d*x**S(2))))*sqrt(c + d*x**S(2))*Rt(d/c, S(2))), x) def replacement898(a, b, c, d, x): return Simp(EllipticF(asin(x*Rt(-d/c, S(2))), b*c/(a*d))/(sqrt(a)*sqrt(c)*Rt(-d/c, S(2))), x) def replacement899(a, b, c, d, x): return -Simp(EllipticF(acos(x*Rt(-d/c, S(2))), b*c/(-a*d + b*c))/(sqrt(c)*sqrt(a - b*c/d)*Rt(-d/c, S(2))), x) def replacement900(a, b, c, d, x): return Dist(sqrt(S(1) + d*x**S(2)/c)/sqrt(c + d*x**S(2)), Int(S(1)/(sqrt(S(1) + d*x**S(2)/c)*sqrt(a + b*x**S(2))), x), x) def replacement901(a, b, c, d, x): return Dist(a, Int(S(1)/(sqrt(a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) + Dist(b, Int(x**S(2)/(sqrt(a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) def replacement902(a, b, c, d, x): return Dist(b/d, Int(sqrt(c + d*x**S(2))/sqrt(a + b*x**S(2)), x), x) - Dist((-a*d + b*c)/d, Int(S(1)/(sqrt(a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) def replacement903(a, b, c, d, x): return Simp(sqrt(a)*EllipticE(asin(x*Rt(-d/c, S(2))), b*c/(a*d))/(sqrt(c)*Rt(-d/c, S(2))), x) def replacement904(a, b, c, d, x): return -Simp(sqrt(a - b*c/d)*EllipticE(acos(x*Rt(-d/c, S(2))), b*c/(-a*d + b*c))/(sqrt(c)*Rt(-d/c, S(2))), x) def replacement905(a, b, c, d, x): return Dist(sqrt(a + b*x**S(2))/sqrt(S(1) + b*x**S(2)/a), Int(sqrt(S(1) + b*x**S(2)/a)/sqrt(c + d*x**S(2)), x), x) def replacement906(a, b, c, d, x): return Dist(sqrt(S(1) + d*x**S(2)/c)/sqrt(c + d*x**S(2)), Int(sqrt(a + b*x**S(2))/sqrt(S(1) + d*x**S(2)/c), x), x) def replacement907(a, b, c, d, n, p, q, x): return Int(ExpandIntegrand((a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement908(a, b, c, d, n, p, q, x): return Simp(a**p*c**q*x*AppellF1(S(1)/n, -p, -q, S(1) + S(1)/n, -b*x**n/a, -d*x**n/c), x) def replacement909(a, b, c, d, n, p, q, x): return Dist(a**IntPart(p)*(S(1) + b*x**n/a)**(-FracPart(p))*(a + b*x**n)**FracPart(p), Int((S(1) + b*x**n/a)**p*(c + d*x**n)**q, x), x) def replacement910(a, b, c, d, mn, n, p, q, x): return Int(x**(-n*q)*(a + b*x**n)**p*(c*x**n + d)**q, x) def replacement911(a, b, c, d, mn, n, p, q, x): return Dist(x**(n*FracPart(q))*(c + d*x**(-n))**FracPart(q)*(c*x**n + d)**(-FracPart(q)), Int(x**(-n*q)*(a + b*x**n)**p*(c*x**n + d)**q, x), x) def replacement912(a, b, c, d, n, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x**n)**p*(c + d*x**n)**q, x), x, u), x) def replacement913(p, q, u, v, x): return Int(NormalizePseudoBinomial(u, x)**p*NormalizePseudoBinomial(v, x)**q, x) def replacement914(m, p, q, u, v, x): return Int(NormalizePseudoBinomial(v, x)**q*NormalizePseudoBinomial(u*x**(m/p), x)**p, x) def replacement915(b, c, d, e, m, n, p, q, x): return Dist(b**(S(1) - (m + S(1))/n)*e**m/n, Subst(Int((b*x)**(p + S(-1) + (m + S(1))/n)*(c + d*x)**q, x), x, x**n), x) def replacement916(b, c, d, e, m, n, p, q, x): return Dist(b**IntPart(p)*e**m*x**(-n*FracPart(p))*(b*x**n)**FracPart(p), Int(x**(m + n*p)*(c + d*x**n)**q, x), x) def replacement917(b, c, d, e, m, n, p, q, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(b*x**n)**p*(c + d*x**n)**q, x), x) def replacement918(a, b, c, d, m, n, p, q, x): return Dist(S(1)/n, Subst(Int((a + b*x)**p*(c + d*x)**q, x), x, x**n), x) def replacement919(a, b, c, d, m, n, p, q, x): return Int(x**(m + n*(p + q))*(a*x**(-n) + b)**p*(c*x**(-n) + d)**q, x) def replacement920(a, b, c, d, m, n, p, q, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b*x)**p*(c + d*x)**q, x), x, x**n), x) def replacement921(a, b, c, d, e, m, n, p, q, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement922(a, b, c, d, e, m, n, p, q, x): return Int(ExpandIntegrand((e*x)**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement923(a, b, c, d, e, m, n, p, x): return Simp(c*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*e*(m + S(1))), x) def replacement924(a1, a2, b1, b2, c, d, e, m, n, non2, p, x): return Simp(c*(e*x)**(m + S(1))*(a1 + b1*x**(n/S(2)))**(p + S(1))*(a2 + b2*x**(n/S(2)))**(p + S(1))/(a1*a2*e*(m + S(1))), x) def replacement925(a, b, c, d, e, m, n, p, x): return Dist(d*e**(-n), Int((e*x)**(m + n)*(a + b*x**n)**p, x), x) + Simp(c*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*e*(m + S(1))), x) def replacement926(a, b, c, d, e, m, n, p, x): return Dist(d/b, Int((e*x)**m*(a + b*x**n)**(p + S(1)), x), x) + Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(-a*d + b*c)/(a*b*e*(m + S(1))), x) def replacement927(a, b, c, d, e, m, n, p, x): return Dist(e**(-n)*(a*d*(m + S(1)) - b*c*(m + n*(p + S(1)) + S(1)))/(a*(m + S(1))), Int((e*x)**(m + n)*(a + b*x**n)**p, x), x) + Simp(c*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*e*(m + S(1))), x) def replacement928(a1, a2, b1, b2, c, d, e, m, n, non2, p, x): return Dist(e**(-n)*(a1*a2*d*(m + S(1)) - b1*b2*c*(m + n*(p + S(1)) + S(1)))/(a1*a2*(m + S(1))), Int((e*x)**(m + n)*(a1 + b1*x**(n/S(2)))**p*(a2 + b2*x**(n/S(2)))**p, x), x) + Simp(c*(e*x)**(m + S(1))*(a1 + b1*x**(n/S(2)))**(p + S(1))*(a2 + b2*x**(n/S(2)))**(p + S(1))/(a1*a2*e*(m + S(1))), x) def replacement929(a, b, c, d, m, p, x): return Dist(b**(-m/S(2) + S(-1))/(S(2)*(p + S(1))), Int((a + b*x**S(2))**(p + S(1))*ExpandToSum(S(2)*b*x**S(2)*(p + S(1))*Together((b**(m/S(2))*x**(m + S(-2))*(c + d*x**S(2)) - (-a)**(m/S(2) + S(-1))*(-a*d + b*c))/(a + b*x**S(2))) - (-a)**(m/S(2) + S(-1))*(-a*d + b*c), x), x), x) + Simp(b**(-m/S(2) + S(-1))*x*(-a)**(m/S(2) + S(-1))*(a + b*x**S(2))**(p + S(1))*(-a*d + b*c)/(S(2)*(p + S(1))), x) def replacement930(a, b, c, d, m, p, x): return Dist(b**(-m/S(2) + S(-1))/(S(2)*(p + S(1))), Int(x**m*(a + b*x**S(2))**(p + S(1))*ExpandToSum(S(2)*b*(p + S(1))*Together((b**(m/S(2))*(c + d*x**S(2)) - x**(S(2) - m)*(-a)**(m/S(2) + S(-1))*(-a*d + b*c))/(a + b*x**S(2))) - x**(-m)*(-a)**(m/S(2) + S(-1))*(-a*d + b*c), x), x), x) + Simp(b**(-m/S(2) + S(-1))*x*(-a)**(m/S(2) + S(-1))*(a + b*x**S(2))**(p + S(1))*(-a*d + b*c)/(S(2)*(p + S(1))), x) def replacement931(a, b, c, d, e, m, n, p, x): return -Dist((a*d*(m + S(1)) - b*c*(m + n*(p + S(1)) + S(1)))/(a*b*n*(p + S(1))), Int((e*x)**m*(a + b*x**n)**(p + S(1)), x), x) - Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(-a*d + b*c)/(a*b*e*n*(p + S(1))), x) def replacement932(a1, a2, b1, b2, c, d, e, m, n, non2, p, x): return -Dist((a1*a2*d*(m + S(1)) - b1*b2*c*(m + n*(p + S(1)) + S(1)))/(a1*a2*b1*b2*n*(p + S(1))), Int((e*x)**m*(a1 + b1*x**(n/S(2)))**(p + S(1))*(a2 + b2*x**(n/S(2)))**(p + S(1)), x), x) - Simp((e*x)**(m + S(1))*(a1 + b1*x**(n/S(2)))**(p + S(1))*(a2 + b2*x**(n/S(2)))**(p + S(1))*(-a1*a2*d + b1*b2*c)/(a1*a2*b1*b2*e*n*(p + S(1))), x) def replacement933(a, b, c, d, e, m, n, p, x): return -Dist((a*d*(m + S(1)) - b*c*(m + n*(p + S(1)) + S(1)))/(b*(m + n*(p + S(1)) + S(1))), Int((e*x)**m*(a + b*x**n)**p, x), x) + Simp(d*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(b*e*(m + n*(p + S(1)) + S(1))), x) def replacement934(a1, a2, b1, b2, c, d, e, m, n, non2, p, x): return -Dist((a1*a2*d*(m + S(1)) - b1*b2*c*(m + n*(p + S(1)) + S(1)))/(b1*b2*(m + n*(p + S(1)) + S(1))), Int((e*x)**m*(a1 + b1*x**(n/S(2)))**p*(a2 + b2*x**(n/S(2)))**p, x), x) + Simp(d*(e*x)**(m + S(1))*(a1 + b1*x**(n/S(2)))**(p + S(1))*(a2 + b2*x**(n/S(2)))**(p + S(1))/(b1*b2*e*(m + n*(p + S(1)) + S(1))), x) def replacement935(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand((e*x)**m*(a + b*x**n)**p/(c + d*x**n), x), x) def replacement936(a, b, c, d, e, m, n, p, x): return -Dist(e**(-n)/(a*(m + S(1))), Int((e*x)**(m + n)*(a + b*x**n)**p*Simp(-a*d**S(2)*x**n*(m + S(1)) + b*c**S(2)*n*(p + S(1)) + c*(m + S(1))*(-S(2)*a*d + b*c), x), x), x) + Simp(c**S(2)*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*e*(m + S(1))), x) def replacement937(a, b, c, d, e, m, n, p, x): return Dist(S(1)/(a*b**S(2)*n*(p + S(1))), Int((e*x)**m*(a + b*x**n)**(p + S(1))*Simp(a*b*d**S(2)*n*x**n*(p + S(1)) + b**S(2)*c**S(2)*n*(p + S(1)) + (m + S(1))*(-a*d + b*c)**S(2), x), x), x) - Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(-a*d + b*c)**S(2)/(a*b**S(2)*e*n*(p + S(1))), x) def replacement938(a, b, c, d, e, m, n, p, x): return Dist(S(1)/(b*(m + n*(p + S(2)) + S(1))), Int((e*x)**m*(a + b*x**n)**p*Simp(b*c**S(2)*(m + n*(p + S(2)) + S(1)) + d*x**n*(S(2)*b*c*n*(p + S(1)) + (-a*d + S(2)*b*c)*(m + n + S(1))), x), x), x) + Simp(d**S(2)*e**(-n + S(-1))*(e*x)**(m + n + S(1))*(a + b*x**n)**(p + S(1))/(b*(m + n*(p + S(2)) + S(1))), x) def With939(a, b, c, d, m, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False k = GCD(m + S(1), n) if Unequal(k, S(1)): return True return False def replacement939(a, b, c, d, m, n, p, q, x): k = GCD(m + S(1), n) return Dist(S(1)/k, Subst(Int(x**(S(-1) + (m + S(1))/k)*(a + b*x**(n/k))**p*(c + d*x**(n/k))**q, x), x, x**k), x) def With940(a, b, c, d, e, m, n, p, q, x): k = Denominator(m) return Dist(k/e, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*e**(-n)*x**(k*n))**p*(c + d*e**(-n)*x**(k*n))**q, x), x, (e*x)**(S(1)/k)), x) def replacement941(a, b, c, d, e, m, n, p, q, x): return -Dist(e**n/(b*n*(p + S(1))), Int((e*x)**(m - n)*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*Simp(c*(m - n + S(1)) + d*x**n*(m + n*(q + S(-1)) + S(1)), x), x), x) + Simp(e**(n + S(-1))*(e*x)**(m - n + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(b*n*(p + S(1))), x) def replacement942(a, b, c, d, e, m, n, p, q, x): return Dist(S(1)/(a*b*n*(p + S(1))), Int((e*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-2))*Simp(c*(b*c*n*(p + S(1)) + (m + S(1))*(-a*d + b*c)) + d*x**n*(b*c*n*(p + S(1)) + (-a*d + b*c)*(m + n*(q + S(-1)) + S(1))), x), x), x) - Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*(-a*d + b*c)/(a*b*e*n*(p + S(1))), x) def replacement943(a, b, c, d, e, m, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))), Int((e*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*Simp(c*(m + n*(p + S(1)) + S(1)) + d*x**n*(m + n*(p + q + S(1)) + S(1)), x), x), x) - Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(a*e*n*(p + S(1))), x) def replacement944(a, b, c, d, e, m, n, p, q, x): return Dist(e**(S(2)*n)/(b*n*(p + S(1))*(-a*d + b*c)), Int((e*x)**(m - S(2)*n)*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(a*c*(m - S(2)*n + S(1)) + x**n*(a*d*(m + n*q - n + S(1)) + b*c*n*(p + S(1))), x), x), x) - Simp(a*e**(S(2)*n + S(-1))*(e*x)**(m - S(2)*n + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(b*n*(p + S(1))*(-a*d + b*c)), x) def replacement945(a, b, c, d, e, m, n, p, q, x): return -Dist(e**n/(n*(p + S(1))*(-a*d + b*c)), Int((e*x)**(m - n)*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(c*(m - n + S(1)) + d*x**n*(m + n*(p + q + S(1)) + S(1)), x), x), x) + Simp(e**(n + S(-1))*(e*x)**(m - n + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(n*(p + S(1))*(-a*d + b*c)), x) def replacement946(a, b, c, d, e, m, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))*(-a*d + b*c)), Int((e*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(b*c*(m + S(1)) + b*d*x**n*(m + n*(p + q + S(2)) + S(1)) + n*(p + S(1))*(-a*d + b*c), x), x), x) - Simp(b*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(a*e*n*(p + S(1))*(-a*d + b*c)), x) def replacement947(a, b, c, d, e, m, n, p, q, x): return -Dist(e**(-n)*n/(m + S(1)), Int((e*x)**(m + n)*(a + b*x**n)**(p + S(-1))*(c + d*x**n)**(q + S(-1))*Simp(a*d*q + b*c*p + b*d*x**n*(p + q), x), x), x) + Simp((e*x)**(m + S(1))*(a + b*x**n)**p*(c + d*x**n)**q/(e*(m + S(1))), x) def replacement948(a, b, c, d, e, m, n, p, q, x): return -Dist(e**(-n)/(a*(m + S(1))), Int((e*x)**(m + n)*(a + b*x**n)**p*(c + d*x**n)**(q + S(-2))*Simp(c*n*(a*d*(q + S(-1)) + b*c*(p + S(1))) + c*(m + S(1))*(-a*d + b*c) + d*x**n*(b*c*n*(p + q) + (m + S(1))*(-a*d + b*c)), x), x), x) + Simp(c*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))/(a*e*(m + S(1))), x) def replacement949(a, b, c, d, e, m, n, p, q, x): return -Dist(e**(-n)/(a*(m + S(1))), Int((e*x)**(m + n)*(a + b*x**n)**p*(c + d*x**n)**(q + S(-1))*Simp(b*c*(m + S(1)) + d*x**n*(b*n*(p + q + S(1)) + b*(m + S(1))) + n*(a*d*q + b*c*(p + S(1))), x), x), x) + Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(a*e*(m + S(1))), x) def replacement950(a, b, c, d, e, m, n, p, q, x): return Dist(n/(m + n*(p + q) + S(1)), Int((e*x)**m*(a + b*x**n)**(p + S(-1))*(c + d*x**n)**(q + S(-1))*Simp(a*c*(p + q) + x**n*(a*d*(p + q) + q*(-a*d + b*c)), x), x), x) + Simp((e*x)**(m + S(1))*(a + b*x**n)**p*(c + d*x**n)**q/(e*(m + n*(p + q) + S(1))), x) def replacement951(a, b, c, d, e, m, n, p, q, x): return Dist(S(1)/(b*(m + n*(p + q) + S(1))), Int((e*x)**m*(a + b*x**n)**p*(c + d*x**n)**(q + S(-2))*Simp(c*(b*c*n*(p + q) + (m + S(1))*(-a*d + b*c)) + x**n*(b*c*d*n*(p + q) + d*n*(q + S(-1))*(-a*d + b*c) + d*(m + S(1))*(-a*d + b*c)), x), x), x) + Simp(d*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))/(b*e*(m + n*(p + q) + S(1))), x) def replacement952(a, b, c, d, e, m, n, p, q, x): return -Dist(e**n/(b*(m + n*(p + q) + S(1))), Int((e*x)**(m - n)*(a + b*x**n)**p*(c + d*x**n)**(q + S(-1))*Simp(a*c*(m - n + S(1)) + x**n*(a*d*(m - n + S(1)) - n*q*(-a*d + b*c)), x), x), x) + Simp(e**(n + S(-1))*(e*x)**(m - n + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(b*(m + n*(p + q) + S(1))), x) def replacement953(a, b, c, d, e, m, n, p, q, x): return -Dist(e**(S(2)*n)/(b*d*(m + n*(p + q) + S(1))), Int((e*x)**(m - S(2)*n)*(a + b*x**n)**p*(c + d*x**n)**q*Simp(a*c*(m - S(2)*n + S(1)) + x**n*(a*d*(m + n*(q + S(-1)) + S(1)) + b*c*(m + n*(p + S(-1)) + S(1))), x), x), x) + Simp(e**(S(2)*n + S(-1))*(e*x)**(m - S(2)*n + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(b*d*(m + n*(p + q) + S(1))), x) def replacement954(a, b, c, d, e, m, n, p, q, x): return -Dist(e**(-n)/(a*c*(m + S(1))), Int((e*x)**(m + n)*(a + b*x**n)**p*(c + d*x**n)**q*Simp(b*d*x**n*(m + n*(p + q + S(2)) + S(1)) + n*(a*d*q + b*c*p) + (a*d + b*c)*(m + n + S(1)), x), x), x) + Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(a*c*e*(m + S(1))), x) def replacement955(a, b, c, d, e, m, n, x): return -Dist(a*e**n/(-a*d + b*c), Int((e*x)**(m - n)/(a + b*x**n), x), x) + Dist(c*e**n/(-a*d + b*c), Int((e*x)**(m - n)/(c + d*x**n), x), x) def replacement956(a, b, c, d, e, m, n, x): return Dist(b/(-a*d + b*c), Int((e*x)**m/(a + b*x**n), x), x) - Dist(d/(-a*d + b*c), Int((e*x)**m/(c + d*x**n), x), x) def replacement957(a, b, c, d, m, n, x): return Dist(S(1)/b, Int(x**(m - n)/sqrt(c + d*x**n), x), x) - Dist(a/b, Int(x**(m - n)/((a + b*x**n)*sqrt(c + d*x**n)), x), x) def With958(a, b, c, d, x): r = Numerator(Rt(-a/b, S(2))) s = Denominator(Rt(-a/b, S(2))) return -Dist(s/(S(2)*b), Int(S(1)/(sqrt(c + d*x**S(4))*(r - s*x**S(2))), x), x) + Dist(s/(S(2)*b), Int(S(1)/(sqrt(c + d*x**S(4))*(r + s*x**S(2))), x), x) def With959(a, b, c, d, x): q = Rt(d/c, S(3)) return Simp(S(2)**(S(1)/3)*q*log(-S(2)**(S(1)/3)*q*x + S(1) - sqrt(c + d*x**S(3))/sqrt(c))/(S(12)*b*sqrt(c)), x) - Simp(S(2)**(S(1)/3)*q*log(-S(2)**(S(1)/3)*q*x + S(1) + sqrt(c + d*x**S(3))/sqrt(c))/(S(12)*b*sqrt(c)), x) + Simp(S(2)**(S(1)/3)*q*atanh(sqrt(c + d*x**S(3))/sqrt(c))/(S(18)*b*sqrt(c)), x) - Simp(S(2)**(S(1)/3)*sqrt(S(3))*q*ArcTan(sqrt(S(3))/S(3) + S(2)**(S(2)/3)*sqrt(S(3))*(sqrt(c) - sqrt(c + d*x**S(3)))/(S(3)*sqrt(c)*q*x))/(S(18)*b*sqrt(c)), x) + Simp(S(2)**(S(1)/3)*sqrt(S(3))*q*ArcTan(sqrt(S(3))/S(3) + S(2)**(S(2)/3)*sqrt(S(3))*(sqrt(c) + sqrt(c + d*x**S(3)))/(S(3)*sqrt(c)*q*x))/(S(18)*b*sqrt(c)), x) def replacement960(a, b, c, d, m, x): return Dist(S(1)/b, Int(x**(m + S(-3))/sqrt(c + d*x**S(3)), x), x) - Dist(a/b, Int(x**(m + S(-3))/((a + b*x**S(3))*sqrt(c + d*x**S(3))), x), x) def replacement961(a, b, c, d, m, x): return Dist(S(1)/a, Int(x**m/sqrt(c + d*x**S(3)), x), x) - Dist(b/a, Int(x**(m + S(3))/((a + b*x**S(3))*sqrt(c + d*x**S(3))), x), x) def replacement962(a, b, c, d, x): return Dist(d/b, Int(x**S(2)/sqrt(c + d*x**S(4)), x), x) + Dist((-a*d + b*c)/b, Int(x**S(2)/((a + b*x**S(4))*sqrt(c + d*x**S(4))), x), x) def replacement963(a, b, c, d, m, x): return Dist(d/b, Int(x**m/sqrt(c + d*x**S(3)), x), x) + Dist((-a*d + b*c)/b, Int(x**m/((a + b*x**S(3))*sqrt(c + d*x**S(3))), x), x) def replacement964(a, b, c, d, x): return -Dist(c/b, Int(sqrt(a + b*x**S(2))/(c + d*x**S(2))**(S(3)/2), x), x) + Simp(x*sqrt(a + b*x**S(2))/(b*sqrt(c + d*x**S(2))), x) def replacement965(a, b, c, d, n, x): return Dist(S(1)/b, Int(sqrt(a + b*x**n)/sqrt(c + d*x**n), x), x) - Dist(a/b, Int(S(1)/(sqrt(a + b*x**n)*sqrt(c + d*x**n)), x), x) def With966(a, b, c, d, m, n, p, q, x): k = Denominator(p) return Dist(a**(p + (m + S(1))/n)*k/n, Subst(Int(x**(k*(m + S(1))/n + S(-1))*(c - x**k*(-a*d + b*c))**q*(-b*x**k + S(1))**(-p - q + S(-1) - (m + S(1))/n), x), x, x**(n/k)*(a + b*x**n)**(-S(1)/k)), x) def replacement967(a, b, c, d, m, n, p, q, x): return -Subst(Int(x**(-m + S(-2))*(a + b*x**(-n))**p*(c + d*x**(-n))**q, x), x, S(1)/x) def With968(a, b, c, d, e, m, n, p, q, x): g = Denominator(m) return -Dist(g/e, Subst(Int(x**(-g*(m + S(1)) + S(-1))*(a + b*e**(-n)*x**(-g*n))**p*(c + d*e**(-n)*x**(-g*n))**q, x), x, (e*x)**(-S(1)/g)), x) def replacement969(a, b, c, d, e, m, n, p, q, x): return -Dist((e*x)**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(a + b*x**(-n))**p*(c + d*x**(-n))**q, x), x, S(1)/x), x) def With970(a, b, c, d, m, n, p, q, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g*(m + S(1)) + S(-1))*(a + b*x**(g*n))**p*(c + d*x**(g*n))**q, x), x, x**(S(1)/g)), x) def replacement971(a, b, c, d, e, m, n, p, q, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement972(a, b, c, d, m, n, p, q, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*x**(n/(m + S(1))))**p*(c + d*x**(n/(m + S(1))))**q, x), x, x**(m + S(1))), x) def replacement973(a, b, c, d, e, m, n, p, q, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement974(a, b, c, d, e, m, n, p, q, x): return Dist(S(1)/(a*b*n*(p + S(1))), Int((e*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-2))*Simp(c*(b*c*n*(p + S(1)) + (m + S(1))*(-a*d + b*c)) + d*x**n*(b*c*n*(p + S(1)) + (-a*d + b*c)*(m + n*(q + S(-1)) + S(1))), x), x), x) - Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*(-a*d + b*c)/(a*b*e*n*(p + S(1))), x) def replacement975(a, b, c, d, e, m, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))), Int((e*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*Simp(c*(m + n*(p + S(1)) + S(1)) + d*x**n*(m + n*(p + q + S(1)) + S(1)), x), x), x) - Simp((e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(a*e*n*(p + S(1))), x) def replacement976(a, b, c, d, e, m, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))*(-a*d + b*c)), Int((e*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(b*c*(m + S(1)) + b*d*x**n*(m + n*(p + q + S(2)) + S(1)) + n*(p + S(1))*(-a*d + b*c), x), x), x) - Simp(b*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(a*e*n*(p + S(1))*(-a*d + b*c)), x) def replacement977(a, b, c, d, e, m, n, p, q, x): return Dist(n/(m + n*(p + q) + S(1)), Int((e*x)**m*(a + b*x**n)**(p + S(-1))*(c + d*x**n)**(q + S(-1))*Simp(a*c*(p + q) + x**n*(a*d*(p + q) + q*(-a*d + b*c)), x), x), x) + Simp((e*x)**(m + S(1))*(a + b*x**n)**p*(c + d*x**n)**q/(e*(m + n*(p + q) + S(1))), x) def replacement978(a, b, c, d, e, m, n, p, q, x): return Dist(S(1)/(b*(m + n*(p + q) + S(1))), Int((e*x)**m*(a + b*x**n)**p*(c + d*x**n)**(q + S(-2))*Simp(c*(b*c*n*(p + q) + (m + S(1))*(-a*d + b*c)) + x**n*(b*c*d*n*(p + q) + d*n*(q + S(-1))*(-a*d + b*c) + d*(m + S(1))*(-a*d + b*c)), x), x), x) + Simp(d*(e*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))/(b*e*(m + n*(p + q) + S(1))), x) def replacement979(a, b, c, d, m, n, x): return -Dist(a/(-a*d + b*c), Int(x**(m - n)/(a + b*x**n), x), x) + Dist(c/(-a*d + b*c), Int(x**(m - n)/(c + d*x**n), x), x) def replacement980(a, b, c, d, e, m, n, x): return Dist(b/(-a*d + b*c), Int((e*x)**m/(a + b*x**n), x), x) - Dist(d/(-a*d + b*c), Int((e*x)**m/(c + d*x**n), x), x) def replacement981(a, b, c, d, e, m, n, p, q, x): return Int(ExpandIntegrand((e*x)**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement982(a, b, c, d, m, mn, n, p, q, x): return Int(x**(m - n*q)*(a + b*x**n)**p*(c*x**n + d)**q, x) def replacement983(a, b, c, d, m, mn, n, p, q, x): return Dist(x**(n*FracPart(q))*(c + d*x**(-n))**FracPart(q)*(c*x**n + d)**(-FracPart(q)), Int(x**(m - n*q)*(a + b*x**n)**p*(c*x**n + d)**q, x), x) def replacement984(a, b, c, d, e, m, mn, n, p, q, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*x**n)**p*(c + d*x**(-n))**q, x), x) def replacement985(a, b, c, d, e, m, n, p, q, x): return Simp(a**p*c**q*(e*x)**(m + S(1))*AppellF1((m + S(1))/n, -p, -q, S(1) + (m + S(1))/n, -b*x**n/a, -d*x**n/c)/(e*(m + S(1))), x) def replacement986(a, b, c, d, e, m, n, p, q, x): return Dist(a**IntPart(p)*(S(1) + b*x**n/a)**(-FracPart(p))*(a + b*x**n)**FracPart(p), Int((e*x)**m*(S(1) + b*x**n/a)**p*(c + d*x**n)**q, x), x) def replacement987(a, b, c, d, m, n, p, q, v, x): return Dist(Coefficient(v, x, S(1))**(-m + S(-1)), Subst(Int(SimplifyIntegrand((a + b*x**n)**p*(c + d*x**n)**q*(x - Coefficient(v, x, S(0)))**m, x), x), x, v), x) def replacement988(a, b, c, d, m, n, p, q, u, v, x): return Dist(u**m*v**(-m)/Coefficient(v, x, S(1)), Subst(Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x, v), x) def replacement989(a1, a2, b1, b2, c, d, n, non2, p, q, u, x): return Int(u*(c + d*x**n)**q*(a1*a2 + b1*b2*x**n)**p, x) def replacement990(a1, a2, b1, b2, c, d, e, n, n2, non2, p, q, u, x): return Int(u*(a1*a2 + b1*b2*x**n)**p*(c + d*x**n + e*x**(S(2)*n))**q, x) def replacement991(a1, a2, b1, b2, c, d, n, non2, p, q, u, x): return Dist((a1 + b1*x**(n/S(2)))**FracPart(p)*(a2 + b2*x**(n/S(2)))**FracPart(p)*(a1*a2 + b1*b2*x**n)**(-FracPart(p)), Int(u*(c + d*x**n)**q*(a1*a2 + b1*b2*x**n)**p, x), x) def replacement992(a1, a2, b1, b2, c, d, e, n, n2, non2, p, q, u, x): return Dist((a1 + b1*x**(n/S(2)))**FracPart(p)*(a2 + b2*x**(n/S(2)))**FracPart(p)*(a1*a2 + b1*b2*x**n)**(-FracPart(p)), Int(u*(a1*a2 + b1*b2*x**n)**p*(c + d*x**n + e*x**(S(2)*n))**q, x), x) def replacement993(a, b, c, d, e, f, n, p, q, r, x): return Int(ExpandIntegrand((a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x), x) def replacement994(a, b, c, d, e, f, n, x): return Dist((-a*f + b*e)/(-a*d + b*c), Int(S(1)/(a + b*x**n), x), x) - Dist((-c*f + d*e)/(-a*d + b*c), Int(S(1)/(c + d*x**n), x), x) def replacement995(a, b, c, d, e, f, n, x): return Dist(f/b, Int(S(1)/sqrt(c + d*x**n), x), x) + Dist((-a*f + b*e)/b, Int(S(1)/((a + b*x**n)*sqrt(c + d*x**n)), x), x) def replacement996(a, b, c, d, e, f, n, x): return Dist(f/b, Int(sqrt(a + b*x**n)/sqrt(c + d*x**n), x), x) + Dist((-a*f + b*e)/b, Int(S(1)/(sqrt(a + b*x**n)*sqrt(c + d*x**n)), x), x) def replacement997(a, b, c, d, e, f, x): return Dist((-a*f + b*e)/(-a*d + b*c), Int(S(1)/(sqrt(a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) - Dist((-c*f + d*e)/(-a*d + b*c), Int(sqrt(a + b*x**S(2))/(c + d*x**S(2))**(S(3)/2), x), x) def replacement998(a, b, c, d, e, f, n, p, q, x): return Dist(S(1)/(a*b*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*Simp(c*(-a*f + b*e*n*(p + S(1)) + b*e) + d*x**n*(b*e*n*(p + S(1)) + (-a*f + b*e)*(n*q + S(1))), x), x), x) - Simp(x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*(-a*f + b*e)/(a*b*n*(p + S(1))), x) def replacement999(a, b, c, d, e, f, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))*(-a*d + b*c)), Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(c*(-a*f + b*e) + d*x**n*(-a*f + b*e)*(n*(p + q + S(2)) + S(1)) + e*n*(p + S(1))*(-a*d + b*c), x), x), x) - Simp(x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))*(-a*f + b*e)/(a*n*(p + S(1))*(-a*d + b*c)), x) def replacement1000(a, b, c, d, e, f, n, p, q, x): return Dist(S(1)/(b*(n*(p + q + S(1)) + S(1))), Int((a + b*x**n)**p*(c + d*x**n)**(q + S(-1))*Simp(c*(-a*f + b*e*n*(p + q + S(1)) + b*e) + x**n*(b*d*e*n*(p + q + S(1)) + d*(-a*f + b*e) + f*n*q*(-a*d + b*c)), x), x), x) + Simp(f*x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(b*(n*(p + q + S(1)) + S(1))), x) def replacement1001(a, b, c, d, e, f, x): return Dist((-a*f + b*e)/(-a*d + b*c), Int((a + b*x**S(4))**(S(-3)/4), x), x) - Dist((-c*f + d*e)/(-a*d + b*c), Int((a + b*x**S(4))**(S(1)/4)/(c + d*x**S(4)), x), x) def replacement1002(a, b, c, d, e, f, n, p, x): return Dist(f/d, Int((a + b*x**n)**p, x), x) + Dist((-c*f + d*e)/d, Int((a + b*x**n)**p/(c + d*x**n), x), x) def replacement1003(a, b, c, d, e, f, n, p, q, x): return Dist(e, Int((a + b*x**n)**p*(c + d*x**n)**q, x), x) + Dist(f, Int(x**n*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement1004(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/((a + b*x**S(2))*sqrt(e + f*x**S(2))), x), x) - Dist(d/(-a*d + b*c), Int(S(1)/((c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) def replacement1005(c, d, e, f, x): return Dist(S(1)/c, Int(S(1)/(x**S(2)*sqrt(e + f*x**S(2))), x), x) - Dist(d/c, Int(S(1)/((c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) def replacement1006(a, b, c, d, e, f, x): return Dist(d/b, Int(sqrt(e + f*x**S(2))/sqrt(c + d*x**S(2)), x), x) + Dist((-a*d + b*c)/b, Int(sqrt(e + f*x**S(2))/((a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) def replacement1007(a, b, c, d, e, f, x): return Dist(d/b, Int(sqrt(e + f*x**S(2))/sqrt(c + d*x**S(2)), x), x) + Dist((-a*d + b*c)/b, Int(sqrt(e + f*x**S(2))/((a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) def replacement1008(a, b, c, d, e, f, x): return Dist(b/(-a*f + b*e), Int(sqrt(e + f*x**S(2))/((a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) - Dist(f/(-a*f + b*e), Int(S(1)/(sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) def replacement1009(a, b, c, d, e, f, x): return Simp(EllipticPi(b*c/(a*d), asin(x*Rt(-d/c, S(2))), c*f/(d*e))/(a*sqrt(c)*sqrt(e)*Rt(-d/c, S(2))), x) def replacement1010(a, b, c, d, e, f, x): return Dist(sqrt(S(1) + d*x**S(2)/c)/sqrt(c + d*x**S(2)), Int(S(1)/(sqrt(S(1) + d*x**S(2)/c)*(a + b*x**S(2))*sqrt(e + f*x**S(2))), x), x) def replacement1011(a, b, c, d, e, f, x): return Simp(c*sqrt(e + f*x**S(2))*EllipticPi(S(1) - b*c/(a*d), ArcTan(x*Rt(d/c, S(2))), -c*f/(d*e) + S(1))/(a*e*sqrt(c*(e + f*x**S(2))/(e*(c + d*x**S(2))))*sqrt(c + d*x**S(2))*Rt(d/c, S(2))), x) def replacement1012(a, b, c, d, e, f, x): return Dist(d/b, Int(S(1)/(sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) + Dist((-a*d + b*c)/b, Int(S(1)/((a + b*x**S(2))*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) def replacement1013(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(sqrt(e + f*x**S(2))/((a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) - Dist(d/(-a*d + b*c), Int(sqrt(e + f*x**S(2))/(c + d*x**S(2))**(S(3)/2), x), x) def replacement1014(a, b, c, d, e, f, x): return Dist((-a*f + b*e)/(-a*d + b*c), Int(sqrt(e + f*x**S(2))/((a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) - Dist((-c*f + d*e)/(-a*d + b*c), Int(sqrt(e + f*x**S(2))/(c + d*x**S(2))**(S(3)/2), x), x) def replacement1015(a, b, c, d, e, f, x): return Dist(d/b**S(2), Int(sqrt(e + f*x**S(2))*(-a*d + S(2)*b*c + b*d*x**S(2))/sqrt(c + d*x**S(2)), x), x) + Dist((-a*d + b*c)**S(2)/b**S(2), Int(sqrt(e + f*x**S(2))/((a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) def replacement1016(a, b, c, d, e, f, q, r, x): return Dist(b*(-a*f + b*e)/(-a*d + b*c)**S(2), Int((c + d*x**S(2))**(q + S(2))*(e + f*x**S(2))**(r + S(-1))/(a + b*x**S(2)), x), x) - Dist((-a*d + b*c)**(S(-2)), Int((c + d*x**S(2))**q*(e + f*x**S(2))**(r + S(-1))*(-a*d**S(2)*e - b*c**S(2)*f + S(2)*b*c*d*e + d**S(2)*x**S(2)*(-a*f + b*e)), x), x) def replacement1017(a, b, c, d, e, f, q, r, x): return Dist(d/b, Int((c + d*x**S(2))**(q + S(-1))*(e + f*x**S(2))**r, x), x) + Dist((-a*d + b*c)/b, Int((c + d*x**S(2))**(q + S(-1))*(e + f*x**S(2))**r/(a + b*x**S(2)), x), x) def replacement1018(a, b, c, d, e, f, q, r, x): return Dist(b**S(2)/(-a*d + b*c)**S(2), Int((c + d*x**S(2))**(q + S(2))*(e + f*x**S(2))**r/(a + b*x**S(2)), x), x) - Dist(d/(-a*d + b*c)**S(2), Int((c + d*x**S(2))**q*(e + f*x**S(2))**r*(-a*d + S(2)*b*c + b*d*x**S(2)), x), x) def replacement1019(a, b, c, d, e, f, q, r, x): return Dist(b/(-a*d + b*c), Int((c + d*x**S(2))**(q + S(1))*(e + f*x**S(2))**r/(a + b*x**S(2)), x), x) - Dist(d/(-a*d + b*c), Int((c + d*x**S(2))**q*(e + f*x**S(2))**r, x), x) def replacement1020(a, b, c, d, e, f, x): return Dist((-a**S(2)*d*f + b**S(2)*c*e)/(S(2)*a*b**S(2)), Int(S(1)/((a + b*x**S(2))*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) + Dist(d*f/(S(2)*a*b**S(2)), Int((a - b*x**S(2))/(sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) + Simp(x*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))/(S(2)*a*(a + b*x**S(2))), x) def replacement1021(a, b, c, d, e, f, x): return Dist((S(3)*a**S(2)*d*f - S(2)*a*b*(c*f + d*e) + b**S(2)*c*e)/(S(2)*a*(-a*d + b*c)*(-a*f + b*e)), Int(S(1)/((a + b*x**S(2))*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) - Dist(d*f/(S(2)*a*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x**S(2))/(sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) + Simp(b**S(2)*x*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))/(S(2)*a*(a + b*x**S(2))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement1022(a, b, c, d, e, f, n, p, q, r, x): return Dist(d/b, Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*(e + f*x**n)**r, x), x) + Dist((-a*d + b*c)/b, Int((a + b*x**n)**p*(c + d*x**n)**(q + S(-1))*(e + f*x**n)**r, x), x) def replacement1023(a, b, c, d, e, f, n, p, q, r, x): return Dist(b/(-a*d + b*c), Int((a + b*x**n)**p*(c + d*x**n)**(q + S(1))*(e + f*x**n)**r, x), x) - Dist(d/(-a*d + b*c), Int((a + b*x**n)**(p + S(1))*(c + d*x**n)**q*(e + f*x**n)**r, x), x) def replacement1024(a, b, c, d, e, f, x): return Dist(sqrt(a*(e + f*x**S(2))/(e*(a + b*x**S(2))))*sqrt(c + d*x**S(2))/(c*sqrt(a*(c + d*x**S(2))/(c*(a + b*x**S(2))))*sqrt(e + f*x**S(2))), Subst(Int(S(1)/(sqrt(S(1) - x**S(2)*(-a*d + b*c)/c)*sqrt(S(1) - x**S(2)*(-a*f + b*e)/e)), x), x, x/sqrt(a + b*x**S(2))), x) def replacement1025(a, b, c, d, e, f, x): return Dist(a*sqrt(a*(e + f*x**S(2))/(e*(a + b*x**S(2))))*sqrt(c + d*x**S(2))/(c*sqrt(a*(c + d*x**S(2))/(c*(a + b*x**S(2))))*sqrt(e + f*x**S(2))), Subst(Int(S(1)/(sqrt(S(1) - x**S(2)*(-a*d + b*c)/c)*sqrt(S(1) - x**S(2)*(-a*f + b*e)/e)*(-b*x**S(2) + S(1))), x), x, x/sqrt(a + b*x**S(2))), x) def replacement1026(a, b, c, d, e, f, x): return Dist(sqrt(a*(e + f*x**S(2))/(e*(a + b*x**S(2))))*sqrt(c + d*x**S(2))/(a*sqrt(a*(c + d*x**S(2))/(c*(a + b*x**S(2))))*sqrt(e + f*x**S(2))), Subst(Int(sqrt(S(1) - x**S(2)*(-a*d + b*c)/c)/sqrt(S(1) - x**S(2)*(-a*f + b*e)/e), x), x, x/sqrt(a + b*x**S(2))), x) def replacement1027(a, b, c, d, e, f, x): return -Dist(c*(-c*f + d*e)/(S(2)*f), Int(sqrt(a + b*x**S(2))/((c + d*x**S(2))**(S(3)/2)*sqrt(e + f*x**S(2))), x), x) - Dist((-a*d*f - b*c*f + b*d*e)/(S(2)*d*f), Int(sqrt(c + d*x**S(2))/(sqrt(a + b*x**S(2))*sqrt(e + f*x**S(2))), x), x) + Dist(b*c*(-c*f + d*e)/(S(2)*d*f), Int(S(1)/(sqrt(a + b*x**S(2))*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) + Simp(d*x*sqrt(a + b*x**S(2))*sqrt(e + f*x**S(2))/(S(2)*f*sqrt(c + d*x**S(2))), x) def replacement1028(a, b, c, d, e, f, x): return -Dist((-a*d*f - b*c*f + b*d*e)/(S(2)*f**S(2)), Int(sqrt(e + f*x**S(2))/(sqrt(a + b*x**S(2))*sqrt(c + d*x**S(2))), x), x) + Dist(e*(-a*f + b*e)/(S(2)*f), Int(sqrt(c + d*x**S(2))/(sqrt(a + b*x**S(2))*(e + f*x**S(2))**(S(3)/2)), x), x) + Dist((-a*f + b*e)*(-S(2)*c*f + d*e)/(S(2)*f**S(2)), Int(S(1)/(sqrt(a + b*x**S(2))*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) + Simp(x*sqrt(a + b*x**S(2))*sqrt(c + d*x**S(2))/(S(2)*sqrt(e + f*x**S(2))), x) def replacement1029(a, b, c, d, e, f, x): return Dist(b/f, Int(sqrt(c + d*x**S(2))/(sqrt(a + b*x**S(2))*sqrt(e + f*x**S(2))), x), x) - Dist((-a*f + b*e)/f, Int(sqrt(c + d*x**S(2))/(sqrt(a + b*x**S(2))*(e + f*x**S(2))**(S(3)/2)), x), x) def With1030(a, b, c, d, e, f, n, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand((a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x) if SumQ(u): return True return False def replacement1030(a, b, c, d, e, f, n, p, q, r, x): u = ExpandIntegrand((a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x) return Int(u, x) def replacement1031(a, b, c, d, e, f, n, p, q, r, x): return -Subst(Int((a + b*x**(-n))**p*(c + d*x**(-n))**q*(e + f*x**(-n))**r/x**S(2), x), x, S(1)/x) def replacement1032(a, b, c, d, e, f, n, p, q, r, x): return Int((a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x) def replacement1033(a, b, c, d, e, f, n, p, q, r, u, v, w, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x), x, u), x) def replacement1034(a, b, c, d, e, f, mn, n, p, q, r, x): return Int(x**(-n*q)*(a + b*x**n)**p*(e + f*x**n)**r*(c*x**n + d)**q, x) def replacement1035(a, b, c, d, e, f, mn, n, p, q, r, x): return Int(x**(n*(p + r))*(c + d*x**(-n))**q*(a*x**(-n) + b)**p*(e*x**(-n) + f)**r, x) def replacement1036(a, b, c, d, e, f, mn, n, p, q, r, x): return Dist(x**(n*FracPart(q))*(c + d*x**(-n))**FracPart(q)*(c*x**n + d)**(-FracPart(q)), Int(x**(-n*q)*(a + b*x**n)**p*(e + f*x**n)**r*(c*x**n + d)**q, x), x) def replacement1037(a, b, c, d, e1, e2, f1, f2, n, n2, p, q, r, x): return Int((a + b*x**n)**p*(c + d*x**n)**q*(e1*e2 + f1*f2*x**n)**r, x) def replacement1038(a, b, c, d, e1, e2, f1, f2, n, n2, p, q, r, x): return Dist((e1 + f1*x**(n/S(2)))**FracPart(r)*(e2 + f2*x**(n/S(2)))**FracPart(r)*(e1*e2 + f1*f2*x**n)**(-FracPart(r)), Int((a + b*x**n)**p*(c + d*x**n)**q*(e1*e2 + f1*f2*x**n)**r, x), x) def replacement1039(b, c, d, e, f, g, m, n, p, q, r, x): return Dist(b**(S(1) - (m + S(1))/n)*g**m/n, Subst(Int((b*x)**(p + S(-1) + (m + S(1))/n)*(c + d*x)**q*(e + f*x)**r, x), x, x**n), x) def replacement1040(b, c, d, e, f, g, m, n, p, q, r, x): return Dist(b**IntPart(p)*g**m*x**(-n*FracPart(p))*(b*x**n)**FracPart(p), Int(x**(m + n*p)*(c + d*x**n)**q*(e + f*x**n)**r, x), x) def replacement1041(b, c, d, e, f, g, m, n, p, q, r, x): return Dist(g**IntPart(m)*x**(-FracPart(m))*(g*x)**FracPart(m), Int(x**m*(b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x), x) def replacement1042(a, b, c, d, e, f, g, m, n, p, q, r, x): return Int(ExpandIntegrand((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x), x) def replacement1043(a, b, c, d, e, f, m, n, p, q, r, x): return Dist(S(1)/n, Subst(Int((a + b*x)**p*(c + d*x)**q*(e + f*x)**r, x), x, x**n), x) def replacement1044(a, b, c, d, e, f, m, n, p, q, r, x): return Int(x**(m + n*(p + q + r))*(a*x**(-n) + b)**p*(c*x**(-n) + d)**q*(e*x**(-n) + f)**r, x) def replacement1045(a, b, c, d, e, f, m, n, p, q, r, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b*x)**p*(c + d*x)**q*(e + f*x)**r, x), x, x**n), x) def replacement1046(a, b, c, d, e, f, g, m, n, p, q, r, x): return Dist(g**IntPart(m)*x**(-FracPart(m))*(g*x)**FracPart(m), Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x), x) def With1047(a, b, c, d, e, f, m, n, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False k = GCD(m + S(1), n) if Unequal(k, S(1)): return True return False def replacement1047(a, b, c, d, e, f, m, n, p, q, r, x): k = GCD(m + S(1), n) return Dist(S(1)/k, Subst(Int(x**(S(-1) + (m + S(1))/k)*(a + b*x**(n/k))**p*(c + d*x**(n/k))**q*(e + f*x**(n/k))**r, x), x, x**k), x) def With1048(a, b, c, d, e, f, g, m, n, p, q, r, x): k = Denominator(m) return Dist(k/g, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*g**(-n)*x**(k*n))**p*(c + d*g**(-n)*x**(k*n))**q*(e + f*g**(-n)*x**(k*n))**r, x), x, (g*x)**(S(1)/k)), x) def replacement1049(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(S(1)/(a*b*n*(p + S(1))), Int((g*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*Simp(c*(b*e*n*(p + S(1)) + (m + S(1))*(-a*f + b*e)) + d*x**n*(b*e*n*(p + S(1)) + (-a*f + b*e)*(m + n*q + S(1))), x), x), x) - Simp((g*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*(-a*f + b*e)/(a*b*g*n*(p + S(1))), x) def replacement1050(a, b, c, d, e, f, g, m, n, p, q, x): return -Dist(g**n/(b*n*(p + S(1))*(-a*d + b*c)), Int((g*x)**(m - n)*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(c*(-a*f + b*e)*(m - n + S(1)) + x**n*(-b*n*(p + S(1))*(c*f - d*e) + d*(-a*f + b*e)*(m + n*q + S(1))), x), x), x) + Simp(g**(n + S(-1))*(g*x)**(m - n + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))*(-a*f + b*e)/(b*n*(p + S(1))*(-a*d + b*c)), x) def replacement1051(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))*(-a*d + b*c)), Int((g*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(c*(m + S(1))*(-a*f + b*e) + d*x**n*(-a*f + b*e)*(m + n*(p + q + S(2)) + S(1)) + e*n*(p + S(1))*(-a*d + b*c), x), x), x) - Simp((g*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))*(-a*f + b*e)/(a*g*n*(p + S(1))*(-a*d + b*c)), x) def replacement1052(a, b, c, d, e, f, g, m, n, p, q, x): return -Dist(g**(-n)/(a*(m + S(1))), Int((g*x)**(m + n)*(a + b*x**n)**p*(c + d*x**n)**(q + S(-1))*Simp(c*(m + S(1))*(-a*f + b*e) + d*x**n*(b*e*n*(p + q + S(1)) + (m + S(1))*(-a*f + b*e)) + e*n*(a*d*q + b*c*(p + S(1))), x), x), x) + Simp(e*(g*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(a*g*(m + S(1))), x) def replacement1053(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(S(1)/(b*(m + n*(p + q + S(1)) + S(1))), Int((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**(q + S(-1))*Simp(c*(b*e*n*(p + q + S(1)) + (m + S(1))*(-a*f + b*e)) + x**n*(b*d*e*n*(p + q + S(1)) + d*(m + S(1))*(-a*f + b*e) + f*n*q*(-a*d + b*c)), x), x), x) + Simp(f*(g*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(b*g*(m + n*(p + q + S(1)) + S(1))), x) def replacement1054(a, b, c, d, e, f, g, m, n, p, q, x): return -Dist(g**n/(b*d*(m + n*(p + q + S(1)) + S(1))), Int((g*x)**(m - n)*(a + b*x**n)**p*(c + d*x**n)**q*Simp(a*c*f*(m - n + S(1)) + x**n*(a*d*f*(m + n*q + S(1)) + b*(c*f*(m + n*p + S(1)) - d*e*(m + n*(p + q + S(1)) + S(1)))), x), x), x) + Simp(f*g**(n + S(-1))*(g*x)**(m - n + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(b*d*(m + n*(p + q + S(1)) + S(1))), x) def replacement1055(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(g**(-n)/(a*c*(m + S(1))), Int((g*x)**(m + n)*(a + b*x**n)**p*(c + d*x**n)**q*Simp(a*c*f*(m + S(1)) - b*d*e*x**n*(m + n*(p + q + S(2)) + S(1)) - e*n*(a*d*q + b*c*p) - e*(a*d + b*c)*(m + n + S(1)), x), x), x) + Simp(e*(g*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))/(a*c*g*(m + S(1))), x) def replacement1056(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((g*x)**m*(a + b*x**n)**p*(e + f*x**n)/(c + d*x**n), x), x) def replacement1057(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(e, Int((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x) + Dist(e**(-n)*f, Int((g*x)**(m + n)*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement1058(a, b, c, d, e, f, g, m, n, p, q, r, x): return Dist(e, Int((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**(r + S(-1)), x), x) + Dist(e**(-n)*f, Int((g*x)**(m + n)*(a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**(r + S(-1)), x), x) def replacement1059(a, b, c, d, e, f, m, n, p, q, r, x): return -Subst(Int(x**(-m + S(-2))*(a + b*x**(-n))**p*(c + d*x**(-n))**q*(e + f*x**(-n))**r, x), x, S(1)/x) def With1060(a, b, c, d, e, f, g, m, n, p, q, r, x): k = Denominator(m) return -Dist(k/g, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a + b*g**(-n)*x**(-k*n))**p*(c + d*g**(-n)*x**(-k*n))**q*(e + f*g**(-n)*x**(-k*n))**r, x), x, (g*x)**(-S(1)/k)), x) def replacement1061(a, b, c, d, e, f, g, m, n, p, q, r, x): return -Dist((g*x)**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(a + b*x**(-n))**p*(c + d*x**(-n))**q*(e + f*x**(-n))**r, x), x, S(1)/x), x) def With1062(a, b, c, d, e, f, m, n, p, q, r, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*x**(k*n))**p*(c + d*x**(k*n))**q*(e + f*x**(k*n))**r, x), x, x**(S(1)/k)), x) def replacement1063(a, b, c, d, e, f, g, m, n, p, q, r, x): return Dist(g**IntPart(m)*x**(-FracPart(m))*(g*x)**FracPart(m), Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x), x) def replacement1064(a, b, c, d, e, f, m, n, p, q, r, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*x**(n/(m + S(1))))**p*(c + d*x**(n/(m + S(1))))**q*(e + f*x**(n/(m + S(1))))**r, x), x, x**(m + S(1))), x) def replacement1065(a, b, c, d, e, f, g, m, n, p, q, r, x): return Dist(g**IntPart(m)*x**(-FracPart(m))*(g*x)**FracPart(m), Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x), x) def replacement1066(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(S(1)/(a*b*n*(p + S(1))), Int((g*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(-1))*Simp(c*(b*e*n*(p + S(1)) + (m + S(1))*(-a*f + b*e)) + d*x**n*(b*e*n*(p + S(1)) + (-a*f + b*e)*(m + n*q + S(1))), x), x), x) - Simp((g*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*(-a*f + b*e)/(a*b*g*n*(p + S(1))), x) def replacement1067(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(S(1)/(a*n*(p + S(1))*(-a*d + b*c)), Int((g*x)**m*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q*Simp(c*(m + S(1))*(-a*f + b*e) + d*x**n*(-a*f + b*e)*(m + n*(p + q + S(2)) + S(1)) + e*n*(p + S(1))*(-a*d + b*c), x), x), x) - Simp((g*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(q + S(1))*(-a*f + b*e)/(a*g*n*(p + S(1))*(-a*d + b*c)), x) def replacement1068(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(S(1)/(b*(m + n*(p + q + S(1)) + S(1))), Int((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**(q + S(-1))*Simp(c*(b*e*n*(p + q + S(1)) + (m + S(1))*(-a*f + b*e)) + x**n*(b*d*e*n*(p + q + S(1)) + d*(m + S(1))*(-a*f + b*e) + f*n*q*(-a*d + b*c)), x), x), x) + Simp(f*(g*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**q/(b*g*(m + n*(p + q + S(1)) + S(1))), x) def replacement1069(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((g*x)**m*(a + b*x**n)**p*(e + f*x**n)/(c + d*x**n), x), x) def replacement1070(a, b, c, d, e, f, g, m, n, p, q, x): return Dist(e, Int((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x) + Dist(f*x**(-m)*(g*x)**m, Int(x**(m + n)*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def replacement1071(a, b, c, d, e, f, m, mn, n, p, q, r, x): return Int(x**(m - n*q)*(a + b*x**n)**p*(e + f*x**n)**r*(c*x**n + d)**q, x) def replacement1072(a, b, c, d, e, f, m, mn, n, p, q, r, x): return Int(x**(m + n*(p + r))*(c + d*x**(-n))**q*(a*x**(-n) + b)**p*(e*x**(-n) + f)**r, x) def replacement1073(a, b, c, d, e, f, m, mn, n, p, q, r, x): return Dist(x**(n*FracPart(q))*(c + d*x**(-n))**FracPart(q)*(c*x**n + d)**(-FracPart(q)), Int(x**(m - n*q)*(a + b*x**n)**p*(e + f*x**n)**r*(c*x**n + d)**q, x), x) def replacement1074(a, b, c, d, e, f, g, m, mn, n, p, q, r, x): return Dist(g**IntPart(m)*x**(-FracPart(m))*(g*x)**FracPart(m), Int(x**m*(a + b*x**n)**p*(c + d*x**(-n))**q*(e + f*x**n)**r, x), x) def replacement1075(a, b, c, d, e, f, g, m, n, p, q, r, x): return Int((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x) def replacement1076(a, b, c, d, e, f, m, n, p, q, r, u, v, x): return Dist(u**m*v**(-m)/Coefficient(v, x, S(1)), Subst(Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q*(e + f*x**n)**r, x), x, v), x) def replacement1077(a, b, c, d, e1, e2, f1, f2, g, m, n, n2, p, q, r, x): return Int((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**q*(e1*e2 + f1*f2*x**n)**r, x) def replacement1078(a, b, c, d, e1, e2, f1, f2, g, m, n, n2, p, q, r, x): return Dist((e1 + f1*x**(n/S(2)))**FracPart(r)*(e2 + f2*x**(n/S(2)))**FracPart(r)*(e1*e2 + f1*f2*x**n)**(-FracPart(r)), Int((g*x)**m*(a + b*x**n)**p*(c + d*x**n)**q*(e1*e2 + f1*f2*x**n)**r, x), x)
e8d3bd5a2f43cea3e7e267a38e2585e8baf3e836254b1cd30e00c3e878553b4a
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def inverse_hyperbolic(): from sympy.integrals.rubi.constraints import cons89, cons90, cons2, cons3, cons8, cons91, cons1581, cons4, cons150, cons68, cons29, cons19, cons64, cons1736, cons1737, cons1738, cons1780, cons270, cons50, cons1894, cons1895, cons1896, cons1897, cons733, cons654, cons734, cons656, cons586, cons1740, cons1898, cons130, cons1739, cons340, cons165, cons40, cons349, cons139, cons232, cons669, cons5, cons1741, cons1742, cons963, cons1899, cons1743, cons1900, cons1745, cons1744, cons1746, cons1572, cons1901, cons338, cons1902, cons149, cons127, cons210, cons56, cons244, cons1748, cons1749, cons488, cons164, cons96, cons95, cons274, cons1750, cons20, cons168, cons276, cons1751, cons1752, cons21, cons240, cons239, cons1753, cons248, cons1754, cons1903, cons1755, cons1756, cons1904, cons1757, cons1758, cons1905, cons211, cons927, cons466, cons86, cons1759, cons1760, cons721, cons170, cons1761, cons1762, cons269, cons719, cons1763, cons1610, cons14, cons152, cons1200, cons1275, cons1362, cons1832, cons1765, cons36, cons37, cons38, cons1764, cons1906, cons167, cons1444, cons1767, cons1766, cons1768, cons1769, cons530, cons1232, cons1771, cons1772, cons1907, cons1908, cons87, cons806, cons33, cons342, cons1909, cons1910, cons1911, cons1778, cons1045, cons1779, cons1499, cons13, cons1781, cons1782, cons1783, cons1784, cons242, cons243, cons148, cons1785, cons1512, cons1786, cons1154, cons321, cons1787, cons1788, cons1789, cons1790, cons1912, cons1913, cons1914, cons1915, cons1795, cons1796, cons1916, cons1798, cons603, cons1799, cons263, cons1917, cons1484, cons1443, cons1918, cons1252, cons1919, cons1920, cons1804, cons1805, cons1921, cons745, cons179, cons119, cons1922, cons25, cons1923, cons1924, cons1925, cons1926, cons1927, cons676, cons1928, cons1929, cons1930, cons996, cons1582, cons1820, cons1931, cons1932, cons1933, cons1934, cons1935, cons1936, cons1937, cons1826, cons975, cons1938, cons1829, cons1939, cons1940, cons1096, cons1833, cons1834, cons1835, cons1836, cons1941, cons385, cons810, cons1588, cons820, cons465, cons1942, cons1943, cons1944, cons1945, cons1946, cons69, cons1947, cons1948, cons1949, cons1950, cons1849, cons1951, cons1952, cons1953, cons1954, cons1856, cons180, cons1857, cons1858, cons1301, cons1955, cons1956, cons1957, cons1958 pattern6087 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons89, cons90) rule6087 = ReplacementRule(pattern6087, replacement6087) pattern6088 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons89, cons90) rule6088 = ReplacementRule(pattern6088, replacement6088) pattern6089 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons89, cons91) rule6089 = ReplacementRule(pattern6089, replacement6089) pattern6090 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons89, cons91) rule6090 = ReplacementRule(pattern6090, replacement6090) pattern6091 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons1581) rule6091 = ReplacementRule(pattern6091, replacement6091) pattern6092 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons1581) rule6092 = ReplacementRule(pattern6092, replacement6092) pattern6093 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/x_, x_), cons2, cons3, cons8, cons150) rule6093 = ReplacementRule(pattern6093, replacement6093) pattern6094 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/x_, x_), cons2, cons3, cons8, cons150) rule6094 = ReplacementRule(pattern6094, replacement6094) pattern6095 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons150, cons68) rule6095 = ReplacementRule(pattern6095, replacement6095) pattern6096 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons150, cons68) rule6096 = ReplacementRule(pattern6096, replacement6096) pattern6097 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons90) rule6097 = ReplacementRule(pattern6097, replacement6097) pattern6098 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons90) rule6098 = ReplacementRule(pattern6098, replacement6098) pattern6099 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons1736) rule6099 = ReplacementRule(pattern6099, replacement6099) pattern6100 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons1736) rule6100 = ReplacementRule(pattern6100, replacement6100) pattern6101 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons1737) rule6101 = ReplacementRule(pattern6101, replacement6101) pattern6102 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons1737) rule6102 = ReplacementRule(pattern6102, replacement6102) pattern6103 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons64) rule6103 = ReplacementRule(pattern6103, replacement6103) pattern6104 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons64) rule6104 = ReplacementRule(pattern6104, replacement6104) pattern6105 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1738) rule6105 = ReplacementRule(pattern6105, replacement6105) pattern6106 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1738) rule6106 = ReplacementRule(pattern6106, replacement6106) pattern6107 = Pattern(Integral(S(1)/(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons270) rule6107 = ReplacementRule(pattern6107, replacement6107) pattern6108 = Pattern(Integral(S(1)/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons1896, cons1897) rule6108 = ReplacementRule(pattern6108, replacement6108) pattern6109 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons270, cons586) rule6109 = ReplacementRule(pattern6109, replacement6109) pattern6110 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons1894, cons1895, cons1896, cons1897, cons586) rule6110 = ReplacementRule(pattern6110, replacement6110) pattern6111 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons1740) rule6111 = ReplacementRule(pattern6111, replacement6111) pattern6112 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons1894, cons1895, cons1898) rule6112 = ReplacementRule(pattern6112, replacement6112) pattern6113 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons130) rule6113 = ReplacementRule(pattern6113, With6113) pattern6114 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons130) rule6114 = ReplacementRule(pattern6114, With6114) pattern6115 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons90, cons165, cons40) rule6115 = ReplacementRule(pattern6115, replacement6115) pattern6116 = Pattern(Integral(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule6116 = ReplacementRule(pattern6116, replacement6116) pattern6117 = Pattern(Integral(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons89, cons90) rule6117 = ReplacementRule(pattern6117, replacement6117) pattern6118 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons340, cons90, cons165) rule6118 = ReplacementRule(pattern6118, replacement6118) pattern6119 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons340, cons90, cons165, cons349) rule6119 = ReplacementRule(pattern6119, replacement6119) pattern6120 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons340, cons90, cons165) rule6120 = ReplacementRule(pattern6120, replacement6120) pattern6121 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule6121 = ReplacementRule(pattern6121, replacement6121) pattern6122 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/((d1_ + x_*WC('e1', S(1)))**(S(3)/2)*(d2_ + x_*WC('e2', S(1)))**(S(3)/2)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons89, cons90) rule6122 = ReplacementRule(pattern6122, replacement6122) pattern6123 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons90, cons139, cons40) rule6123 = ReplacementRule(pattern6123, replacement6123) pattern6124 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons340, cons90, cons139, cons232) rule6124 = ReplacementRule(pattern6124, replacement6124) pattern6125 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons340, cons90, cons139, cons232, cons669) rule6125 = ReplacementRule(pattern6125, replacement6125) pattern6126 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons340, cons90, cons139, cons232) rule6126 = ReplacementRule(pattern6126, replacement6126) pattern6127 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150) rule6127 = ReplacementRule(pattern6127, replacement6127) pattern6128 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule6128 = ReplacementRule(pattern6128, replacement6128) pattern6129 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons91, cons40) rule6129 = ReplacementRule(pattern6129, replacement6129) pattern6130 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1780, cons89, cons91) rule6130 = ReplacementRule(pattern6130, replacement6130) pattern6131 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons5, cons1894, cons1895, cons89, cons91, cons349) rule6131 = ReplacementRule(pattern6131, replacement6131) pattern6132 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons5, cons1894, cons1895, cons89, cons91) rule6132 = ReplacementRule(pattern6132, replacement6132) pattern6133 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons1741, cons1742) rule6133 = ReplacementRule(pattern6133, replacement6133) pattern6134 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons130) rule6134 = ReplacementRule(pattern6134, replacement6134) pattern6135 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons1894, cons1895, cons963, cons1899) rule6135 = ReplacementRule(pattern6135, replacement6135) pattern6136 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons1741, cons1743) rule6136 = ReplacementRule(pattern6136, replacement6136) pattern6137 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons1894, cons1895, cons1741, cons1898) rule6137 = ReplacementRule(pattern6137, replacement6137) pattern6138 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1900, cons1745) rule6138 = ReplacementRule(pattern6138, With6138) pattern6139 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1744, cons1745) rule6139 = ReplacementRule(pattern6139, With6139) pattern6140 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1900, cons40, cons1746) rule6140 = ReplacementRule(pattern6140, replacement6140) pattern6141 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1744, cons40, cons1746) rule6141 = ReplacementRule(pattern6141, replacement6141) pattern6142 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule6142 = ReplacementRule(pattern6142, replacement6142) pattern6143 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons40) rule6143 = ReplacementRule(pattern6143, replacement6143) pattern6144 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons5, cons1901) rule6144 = ReplacementRule(pattern6144, replacement6144) pattern6145 = Pattern(Integral((d_ + x_*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons338, cons1902, cons149) rule6145 = ReplacementRule(pattern6145, replacement6145) pattern6146 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1739, cons149) rule6146 = ReplacementRule(pattern6146, replacement6146) pattern6147 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150) rule6147 = ReplacementRule(pattern6147, replacement6147) pattern6148 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule6148 = ReplacementRule(pattern6148, replacement6148) pattern6149 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons56, cons40) rule6149 = ReplacementRule(pattern6149, replacement6149) pattern6150 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1780, cons89, cons90, cons56) rule6150 = ReplacementRule(pattern6150, replacement6150) pattern6151 = Pattern(Integral(x_*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons5, cons1894, cons1895, cons89, cons90, cons56, cons669) rule6151 = ReplacementRule(pattern6151, replacement6151) pattern6152 = Pattern(Integral(x_*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons5, cons1894, cons1895, cons89, cons90, cons56) rule6152 = ReplacementRule(pattern6152, replacement6152) pattern6153 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150) rule6153 = ReplacementRule(pattern6153, replacement6153) pattern6154 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule6154 = ReplacementRule(pattern6154, replacement6154) pattern6155 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1739, cons89, cons90, cons244, cons68, cons40) rule6155 = ReplacementRule(pattern6155, replacement6155) pattern6156 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1780, cons89, cons90, cons244, cons68) rule6156 = ReplacementRule(pattern6156, replacement6156) pattern6157 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons5, cons1894, cons1895, cons89, cons90, cons244, cons68, cons669) rule6157 = ReplacementRule(pattern6157, replacement6157) pattern6158 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons5, cons1894, cons1895, cons89, cons90, cons244, cons68) rule6158 = ReplacementRule(pattern6158, replacement6158) pattern6159 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))/x_, x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons130) rule6159 = ReplacementRule(pattern6159, replacement6159) pattern6160 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))/x_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons130) rule6160 = ReplacementRule(pattern6160, replacement6160) pattern6161 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1780, cons130, cons1748) rule6161 = ReplacementRule(pattern6161, replacement6161) pattern6162 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons130, cons1748) rule6162 = ReplacementRule(pattern6162, replacement6162) pattern6163 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1780, cons130) rule6163 = ReplacementRule(pattern6163, With6163) pattern6164 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons130) rule6164 = ReplacementRule(pattern6164, With6164) pattern6165 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons349, cons1749, cons488, cons270) rule6165 = ReplacementRule(pattern6165, With6165) pattern6166 = Pattern(Integral(x_**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons349, cons1749, cons488, cons1896, cons1897) rule6166 = ReplacementRule(pattern6166, With6166) pattern6167 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons963, cons1749) rule6167 = ReplacementRule(pattern6167, With6167) pattern6168 = Pattern(Integral(x_**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons963, cons1749) rule6168 = ReplacementRule(pattern6168, With6168) pattern6169 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons164, cons90, cons165, cons96, cons40) rule6169 = ReplacementRule(pattern6169, replacement6169) pattern6170 = Pattern(Integral((x_*WC('f', S(1)))**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1780, cons95, cons90, cons96) rule6170 = ReplacementRule(pattern6170, replacement6170) pattern6171 = Pattern(Integral((x_*WC('f', S(1)))**m_*sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons1894, cons1895, cons95, cons90, cons96) rule6171 = ReplacementRule(pattern6171, replacement6171) pattern6172 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1780, cons164, cons90, cons165, cons96) rule6172 = ReplacementRule(pattern6172, replacement6172) pattern6173 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons1894, cons1895, cons164, cons90, cons165, cons96, cons349) rule6173 = ReplacementRule(pattern6173, replacement6173) pattern6174 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons340, cons90, cons165, cons274, cons40, cons1750) rule6174 = ReplacementRule(pattern6174, replacement6174) pattern6175 = Pattern(Integral((x_*WC('f', S(1)))**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1780, cons89, cons90, cons274, cons1750) rule6175 = ReplacementRule(pattern6175, replacement6175) pattern6176 = Pattern(Integral((x_*WC('f', S(1)))**m_*sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons1894, cons1895, cons89, cons90, cons274, cons1750) rule6176 = ReplacementRule(pattern6176, replacement6176) pattern6177 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1780, cons340, cons90, cons165, cons274, cons1750) rule6177 = ReplacementRule(pattern6177, replacement6177) pattern6178 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons1894, cons1895, cons340, cons90, cons165, cons274, cons349, cons1750) rule6178 = ReplacementRule(pattern6178, replacement6178) pattern6179 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons1739, cons95, cons90, cons96, cons20, cons40) rule6179 = ReplacementRule(pattern6179, replacement6179) pattern6180 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons1780, cons95, cons90, cons96, cons20) rule6180 = ReplacementRule(pattern6180, replacement6180) pattern6181 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons5, cons1894, cons1895, cons95, cons90, cons96, cons20, cons669) rule6181 = ReplacementRule(pattern6181, replacement6181) pattern6182 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons5, cons1894, cons1895, cons95, cons90, cons96, cons20) rule6182 = ReplacementRule(pattern6182, replacement6182) pattern6183 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons95, cons90, cons139, cons168, cons40) rule6183 = ReplacementRule(pattern6183, replacement6183) pattern6184 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1780, cons164, cons90, cons139, cons168) rule6184 = ReplacementRule(pattern6184, replacement6184) pattern6185 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons1894, cons1895, cons164, cons90, cons139, cons168, cons669) rule6185 = ReplacementRule(pattern6185, replacement6185) pattern6186 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons1894, cons1895, cons164, cons90, cons139, cons149, cons168) rule6186 = ReplacementRule(pattern6186, replacement6186) pattern6187 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons340, cons90, cons139, cons276, cons40) rule6187 = ReplacementRule(pattern6187, replacement6187) pattern6188 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1780, cons340, cons90, cons139, cons276, cons1751) rule6188 = ReplacementRule(pattern6188, replacement6188) pattern6189 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons1894, cons1895, cons340, cons90, cons139, cons276, cons1752, cons669) rule6189 = ReplacementRule(pattern6189, replacement6189) pattern6190 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons1894, cons1895, cons340, cons90, cons139, cons276, cons1751) rule6190 = ReplacementRule(pattern6190, replacement6190) pattern6191 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1780, cons95, cons90, cons168, cons20) rule6191 = ReplacementRule(pattern6191, replacement6191) pattern6192 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons1894, cons1895, cons95, cons90, cons168, cons20) rule6192 = ReplacementRule(pattern6192, replacement6192) pattern6193 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons270, cons150, cons20) rule6193 = ReplacementRule(pattern6193, replacement6193) pattern6194 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1894, cons1895, cons150, cons1896, cons1897, cons20) rule6194 = ReplacementRule(pattern6194, replacement6194) pattern6195 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1780, cons270, cons21) rule6195 = ReplacementRule(pattern6195, replacement6195) pattern6196 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons1894, cons1895, cons1896, cons1897, cons21) rule6196 = ReplacementRule(pattern6196, replacement6196) pattern6197 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1780, cons89, cons90, cons1740, cons1752) rule6197 = ReplacementRule(pattern6197, replacement6197) pattern6198 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons1894, cons1895, cons89, cons90, cons1898, cons1752) rule6198 = ReplacementRule(pattern6198, replacement6198) pattern6199 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons1739, cons95, cons90, cons168, cons240, cons40, cons20) rule6199 = ReplacementRule(pattern6199, replacement6199) pattern6200 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons1780, cons95, cons90, cons168, cons240, cons20) rule6200 = ReplacementRule(pattern6200, replacement6200) pattern6201 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons5, cons1894, cons1895, cons95, cons90, cons168, cons240, cons20, cons669) rule6201 = ReplacementRule(pattern6201, replacement6201) pattern6202 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons5, cons1894, cons1895, cons95, cons90, cons168, cons240, cons20) rule6202 = ReplacementRule(pattern6202, replacement6202) pattern6203 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1739, cons89, cons91, cons239, cons40) rule6203 = ReplacementRule(pattern6203, replacement6203) pattern6204 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1780, cons89, cons91, cons239) rule6204 = ReplacementRule(pattern6204, replacement6204) pattern6205 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons5, cons1894, cons1895, cons89, cons91, cons239, cons349) rule6205 = ReplacementRule(pattern6205, replacement6205) pattern6206 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons5, cons1894, cons1895, cons89, cons91, cons239) rule6206 = ReplacementRule(pattern6206, replacement6206) pattern6207 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1780, cons89, cons91, cons270) rule6207 = ReplacementRule(pattern6207, replacement6207) pattern6208 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons1894, cons1895, cons89, cons91, cons1896, cons1897) rule6208 = ReplacementRule(pattern6208, replacement6208) pattern6209 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1780, cons89, cons91, cons1740) rule6209 = ReplacementRule(pattern6209, replacement6209) pattern6210 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons1894, cons1895, cons89, cons91, cons1898) rule6210 = ReplacementRule(pattern6210, replacement6210) pattern6211 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons89, cons91, cons20, cons1753, cons130) rule6211 = ReplacementRule(pattern6211, replacement6211) pattern6212 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1780, cons89, cons91, cons20, cons1753, cons1741) rule6212 = ReplacementRule(pattern6212, replacement6212) pattern6213 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons1894, cons1895, cons89, cons91, cons20, cons1753, cons963) rule6213 = ReplacementRule(pattern6213, replacement6213) pattern6214 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons248, cons1754, cons64, cons1742) rule6214 = ReplacementRule(pattern6214, replacement6214) pattern6215 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons130, cons64) rule6215 = ReplacementRule(pattern6215, replacement6215) pattern6216 = Pattern(Integral(x_**WC('m', S(1))*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons1894, cons1895, cons669, cons1754, cons64, cons1899) rule6216 = ReplacementRule(pattern6216, replacement6216) pattern6217 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons248, cons1754, cons64, cons1743) rule6217 = ReplacementRule(pattern6217, replacement6217) pattern6218 = Pattern(Integral(x_**WC('m', S(1))*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons1894, cons1895, cons248, cons1754, cons64, cons1903) rule6218 = ReplacementRule(pattern6218, replacement6218) pattern6219 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1780, cons270, cons963, cons1755, cons20, cons1756) rule6219 = ReplacementRule(pattern6219, replacement6219) pattern6220 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons4, cons1894, cons1895, cons1896, cons1897, cons963, cons1755, cons20, cons1756) rule6220 = ReplacementRule(pattern6220, replacement6220) pattern6221 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1744, cons68, cons1904) rule6221 = ReplacementRule(pattern6221, replacement6221) pattern6222 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1900, cons56) rule6222 = ReplacementRule(pattern6222, replacement6222) pattern6223 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1744, cons56) rule6223 = ReplacementRule(pattern6223, replacement6223) pattern6224 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1900, cons40, cons1757) rule6224 = ReplacementRule(pattern6224, With6224) pattern6225 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1744, cons40, cons1757) rule6225 = ReplacementRule(pattern6225, With6225) pattern6226 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1900, cons150, cons40, cons20) rule6226 = ReplacementRule(pattern6226, replacement6226) pattern6227 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1744, cons150, cons40, cons20) rule6227 = ReplacementRule(pattern6227, replacement6227) pattern6228 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons1758) rule6228 = ReplacementRule(pattern6228, replacement6228) pattern6229 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons40) rule6229 = ReplacementRule(pattern6229, replacement6229) pattern6230 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d1_ + x_*WC('e1', S(1)))**WC('p', S(1))*(d2_ + x_*WC('e2', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons19, cons4, cons5, cons1905) rule6230 = ReplacementRule(pattern6230, replacement6230) pattern6231 = Pattern(Integral((x_*WC('h', S(1)))**WC('m', S(1))*(d_ + x_*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons338, cons1902, cons149) rule6231 = ReplacementRule(pattern6231, replacement6231) pattern6232 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons1739, cons149) rule6232 = ReplacementRule(pattern6232, replacement6232) pattern6233 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons150) rule6233 = ReplacementRule(pattern6233, replacement6233) pattern6234 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons150) rule6234 = ReplacementRule(pattern6234, replacement6234) pattern6235 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons150, cons68) rule6235 = ReplacementRule(pattern6235, replacement6235) pattern6236 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons150, cons68) rule6236 = ReplacementRule(pattern6236, replacement6236) pattern6237 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons64, cons89, cons91) rule6237 = ReplacementRule(pattern6237, replacement6237) pattern6238 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons64, cons89, cons91) rule6238 = ReplacementRule(pattern6238, replacement6238) pattern6239 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons64) rule6239 = ReplacementRule(pattern6239, replacement6239) pattern6240 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons64) rule6240 = ReplacementRule(pattern6240, replacement6240) pattern6241 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons927) rule6241 = ReplacementRule(pattern6241, With6241) pattern6242 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons927) rule6242 = ReplacementRule(pattern6242, With6242) pattern6243 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons927) rule6243 = ReplacementRule(pattern6243, replacement6243) pattern6244 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons927) rule6244 = ReplacementRule(pattern6244, replacement6244) pattern6245 = Pattern(Integral(Px_*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons927) rule6245 = ReplacementRule(pattern6245, With6245) pattern6246 = Pattern(Integral(Px_*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons927) rule6246 = ReplacementRule(pattern6246, With6246) pattern6247 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons466, cons86, cons1759) rule6247 = ReplacementRule(pattern6247, With6247) pattern6248 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons466, cons86, cons1759) rule6248 = ReplacementRule(pattern6248, With6248) pattern6249 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_*(x_**S(2)*WC('h', S(1)) + x_*WC('g', S(1)) + WC('f', S(0)))**WC('p', S(1))/(d_ + x_*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons466, cons1760) rule6249 = ReplacementRule(pattern6249, With6249) pattern6250 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_*(x_**S(2)*WC('h', S(1)) + x_*WC('g', S(1)) + WC('f', S(0)))**WC('p', S(1))/(d_ + x_*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons466, cons1760) rule6250 = ReplacementRule(pattern6250, With6250) pattern6251 = Pattern(Integral(Px_*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons927, cons150, cons20) rule6251 = ReplacementRule(pattern6251, replacement6251) pattern6252 = Pattern(Integral(Px_*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons927, cons150, cons20) rule6252 = ReplacementRule(pattern6252, replacement6252) pattern6253 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1780, cons20, cons721, cons270, cons170, cons1761) rule6253 = ReplacementRule(pattern6253, With6253) pattern6254 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons1894, cons1895, cons20, cons721, cons1896, cons1897, cons170, cons1761) rule6254 = ReplacementRule(pattern6254, With6254) pattern6255 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1780, cons20, cons669, cons270, cons150, cons170, cons1762) rule6255 = ReplacementRule(pattern6255, replacement6255) pattern6256 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons1894, cons1895, cons20, cons669, cons1896, cons1897, cons150, cons170, cons1762) rule6256 = ReplacementRule(pattern6256, replacement6256) pattern6257 = Pattern(Integral(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(x_*WC('g', S(1)) + WC('f', S(0)))**m_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1780, cons20, cons270, cons150, cons269) rule6257 = ReplacementRule(pattern6257, replacement6257) pattern6258 = Pattern(Integral(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))*(f_ + x_*WC('g', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons1894, cons1895, cons20, cons1896, cons1897, cons150, cons269) rule6258 = ReplacementRule(pattern6258, replacement6258) pattern6259 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1780, cons20, cons963, cons270, cons150) rule6259 = ReplacementRule(pattern6259, replacement6259) pattern6260 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons1894, cons1895, cons20, cons963, cons1896, cons1897, cons150) rule6260 = ReplacementRule(pattern6260, replacement6260) pattern6261 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1780, cons20, cons719, cons270, cons150, cons269) rule6261 = ReplacementRule(pattern6261, replacement6261) pattern6262 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons1894, cons1895, cons20, cons719, cons1896, cons1897, cons150, cons269) rule6262 = ReplacementRule(pattern6262, replacement6262) pattern6263 = Pattern(Integral((f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1780, cons20, cons270, cons170, cons89, cons91) rule6263 = ReplacementRule(pattern6263, replacement6263) pattern6264 = Pattern(Integral((f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons1894, cons1895, cons20, cons1896, cons1897, cons170, cons89, cons91) rule6264 = ReplacementRule(pattern6264, replacement6264) pattern6265 = Pattern(Integral((f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1780, cons20, cons270, cons1763) rule6265 = ReplacementRule(pattern6265, replacement6265) pattern6266 = Pattern(Integral((f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons4, cons1894, cons1895, cons20, cons1896, cons1897, cons1763) rule6266 = ReplacementRule(pattern6266, replacement6266) pattern6267 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1780, cons20, cons721, cons270, cons150) rule6267 = ReplacementRule(pattern6267, replacement6267) pattern6268 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons1894, cons1895, cons20, cons721, cons1896, cons1897, cons150) rule6268 = ReplacementRule(pattern6268, replacement6268) pattern6269 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1780, cons20, cons349, cons1740) rule6269 = ReplacementRule(pattern6269, replacement6269) pattern6270 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1739, cons20, cons349) rule6270 = ReplacementRule(pattern6270, replacement6270) pattern6271 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons4, cons1894, cons1895, cons20, cons349, cons1898) rule6271 = ReplacementRule(pattern6271, replacement6271) pattern6272 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1)))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons1780, cons270, cons150) rule6272 = ReplacementRule(pattern6272, replacement6272) pattern6273 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1)))/(sqrt(d1_ + x_*WC('e1', S(1)))*sqrt(d2_ + x_*WC('e2', S(1)))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons211, cons19, cons1894, cons1895, cons1896, cons1897, cons150) rule6273 = ReplacementRule(pattern6273, replacement6273) pattern6274 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons1780, cons349, cons1740) rule6274 = ReplacementRule(pattern6274, replacement6274) pattern6275 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons1739, cons349) rule6275 = ReplacementRule(pattern6275, replacement6275) pattern6276 = Pattern(Integral((d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1))), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons211, cons19, cons4, cons1894, cons1895, cons349, cons1898) rule6276 = ReplacementRule(pattern6276, replacement6276) pattern6277 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(f_ + x_*WC('g', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1610) rule6277 = ReplacementRule(pattern6277, With6277) pattern6278 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(f_ + x_*WC('g', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1610) rule6278 = ReplacementRule(pattern6278, With6278) pattern6279 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons20) rule6279 = ReplacementRule(pattern6279, replacement6279) pattern6280 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons20) rule6280 = ReplacementRule(pattern6280, replacement6280) pattern6281 = Pattern(Integral(u_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons14, CustomConstraint(With6281)) rule6281 = ReplacementRule(pattern6281, replacement6281) pattern6282 = Pattern(Integral(u_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons14, CustomConstraint(With6282)) rule6282 = ReplacementRule(pattern6282, replacement6282) pattern6283 = Pattern(Integral(Px_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons927, cons1780, cons349, CustomConstraint(With6283)) rule6283 = ReplacementRule(pattern6283, replacement6283) pattern6284 = Pattern(Integral(Px_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons927, cons1894, cons1895, cons349, CustomConstraint(With6284)) rule6284 = ReplacementRule(pattern6284, replacement6284) pattern6285 = Pattern(Integral((f_ + (d_ + x_**S(2)*WC('e', S(1)))**p_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))*WC('Px', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons927, cons1780, cons963, cons152, CustomConstraint(With6285)) rule6285 = ReplacementRule(pattern6285, replacement6285) pattern6286 = Pattern(Integral((f_ + (d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))*WC('Px', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons210, cons927, cons1894, cons1895, cons963, cons152, CustomConstraint(With6286)) rule6286 = ReplacementRule(pattern6286, replacement6286) pattern6287 = Pattern(Integral(RFx_*asinh(x_*WC('c', S(1)))**WC('n', S(1)), x_), cons8, cons1200, cons150, CustomConstraint(With6287)) rule6287 = ReplacementRule(pattern6287, replacement6287) pattern6288 = Pattern(Integral(RFx_*acosh(x_*WC('c', S(1)))**WC('n', S(1)), x_), cons8, cons1200, cons150, CustomConstraint(With6288)) rule6288 = ReplacementRule(pattern6288, replacement6288) pattern6289 = Pattern(Integral(RFx_*(a_ + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons1200, cons150) rule6289 = ReplacementRule(pattern6289, replacement6289) pattern6290 = Pattern(Integral(RFx_*(a_ + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons1200, cons150) rule6290 = ReplacementRule(pattern6290, replacement6290) pattern6291 = Pattern(Integral(RFx_*(d_ + x_**S(2)*WC('e', S(1)))**p_*asinh(x_*WC('c', S(1)))**WC('n', S(1)), x_), cons8, cons29, cons50, cons1200, cons150, cons1780, cons349, CustomConstraint(With6291)) rule6291 = ReplacementRule(pattern6291, replacement6291) pattern6292 = Pattern(Integral(RFx_*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_*acosh(x_*WC('c', S(1)))**WC('n', S(1)), x_), cons8, cons733, cons654, cons734, cons656, cons1200, cons150, cons1894, cons1895, cons349, CustomConstraint(With6292)) rule6292 = ReplacementRule(pattern6292, replacement6292) pattern6293 = Pattern(Integral(RFx_*(a_ + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons1200, cons150, cons1780, cons349) rule6293 = ReplacementRule(pattern6293, replacement6293) pattern6294 = Pattern(Integral(RFx_*(a_ + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))*(d1_ + x_*WC('e1', S(1)))**p_*(d2_ + x_*WC('e2', S(1)))**p_, x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons1200, cons150, cons1894, cons1895, cons349) rule6294 = ReplacementRule(pattern6294, replacement6294) pattern6295 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(x_*WC('c', S(1))))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons1581) rule6295 = ReplacementRule(pattern6295, replacement6295) pattern6296 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_*WC('c', S(1))))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons1581) rule6296 = ReplacementRule(pattern6296, replacement6296) pattern6297 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1275) rule6297 = ReplacementRule(pattern6297, replacement6297) pattern6298 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1275) rule6298 = ReplacementRule(pattern6298, replacement6298) pattern6299 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule6299 = ReplacementRule(pattern6299, replacement6299) pattern6300 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule6300 = ReplacementRule(pattern6300, replacement6300) pattern6301 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons38, cons4, cons5, cons1832, cons1765) rule6301 = ReplacementRule(pattern6301, replacement6301) pattern6302 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons38, cons4, cons5, cons1764, cons1765) rule6302 = ReplacementRule(pattern6302, replacement6302) pattern6303 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons1832, cons1765) rule6303 = ReplacementRule(pattern6303, replacement6303) pattern6304 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons1764, cons1765) rule6304 = ReplacementRule(pattern6304, replacement6304) pattern6305 = Pattern(Integral(sqrt(WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons1906) rule6305 = ReplacementRule(pattern6305, replacement6305) pattern6306 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_**S(2)*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons1906, cons89, cons167) rule6306 = ReplacementRule(pattern6306, replacement6306) pattern6307 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons1906) rule6307 = ReplacementRule(pattern6307, replacement6307) pattern6308 = Pattern(Integral(S(1)/sqrt(WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons1906) rule6308 = ReplacementRule(pattern6308, replacement6308) pattern6309 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_**S(2)*WC('d', S(1))))**(S(-3)/2), x_), cons2, cons3, cons8, cons29, cons1906) rule6309 = ReplacementRule(pattern6309, replacement6309) pattern6310 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_**S(2)*WC('d', S(1))))**(S(-2)), x_), cons2, cons3, cons8, cons29, cons1906) rule6310 = ReplacementRule(pattern6310, replacement6310) pattern6311 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asinh(c_ + x_**S(2)*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons1906, cons89, cons91, cons1444) rule6311 = ReplacementRule(pattern6311, replacement6311) pattern6312 = Pattern(Integral(sqrt(WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(1))), x_), cons2, cons3, cons29, cons1767) rule6312 = ReplacementRule(pattern6312, replacement6312) pattern6313 = Pattern(Integral(sqrt(WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(-1))), x_), cons2, cons3, cons29, cons1767) rule6313 = ReplacementRule(pattern6313, replacement6313) pattern6314 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(c_ + x_**S(2)*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons1766, cons89, cons167) rule6314 = ReplacementRule(pattern6314, replacement6314) pattern6315 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(1))), x_), cons2, cons3, cons29, cons1767) rule6315 = ReplacementRule(pattern6315, replacement6315) pattern6316 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(-1))), x_), cons2, cons3, cons29, cons1767) rule6316 = ReplacementRule(pattern6316, replacement6316) pattern6317 = Pattern(Integral(S(1)/sqrt(WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(1))), x_), cons2, cons3, cons29, cons1767) rule6317 = ReplacementRule(pattern6317, replacement6317) pattern6318 = Pattern(Integral(S(1)/sqrt(WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(-1))), x_), cons2, cons3, cons29, cons1767) rule6318 = ReplacementRule(pattern6318, replacement6318) pattern6319 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(1)))**(S(-3)/2), x_), cons2, cons3, cons29, cons1767) rule6319 = ReplacementRule(pattern6319, replacement6319) pattern6320 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(-1)))**(S(-3)/2), x_), cons2, cons3, cons29, cons1767) rule6320 = ReplacementRule(pattern6320, replacement6320) pattern6321 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(1)))**(S(-2)), x_), cons2, cons3, cons29, cons1767) rule6321 = ReplacementRule(pattern6321, replacement6321) pattern6322 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(x_**S(2)*WC('d', S(1)) + S(-1)))**(S(-2)), x_), cons2, cons3, cons29, cons1767) rule6322 = ReplacementRule(pattern6322, replacement6322) pattern6323 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acosh(c_ + x_**S(2)*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons1766, cons89, cons91, cons1444) rule6323 = ReplacementRule(pattern6323, replacement6323) pattern6324 = Pattern(Integral(asinh(x_**p_*WC('a', S(1)))**WC('n', S(1))/x_, x_), cons2, cons5, cons150) rule6324 = ReplacementRule(pattern6324, replacement6324) pattern6325 = Pattern(Integral(acosh(x_**p_*WC('a', S(1)))**WC('n', S(1))/x_, x_), cons2, cons5, cons150) rule6325 = ReplacementRule(pattern6325, replacement6325) pattern6326 = Pattern(Integral(WC('u', S(1))*asinh(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule6326 = ReplacementRule(pattern6326, replacement6326) pattern6327 = Pattern(Integral(WC('u', S(1))*acosh(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule6327 = ReplacementRule(pattern6327, replacement6327) pattern6328 = Pattern(Integral(asinh(sqrt(x_**S(2)*WC('b', S(1)) + S(-1)))**WC('n', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + S(-1)), x_), cons3, cons4, cons1769) rule6328 = ReplacementRule(pattern6328, replacement6328) pattern6329 = Pattern(Integral(acosh(sqrt(x_**S(2)*WC('b', S(1)) + S(1)))**WC('n', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + S(1)), x_), cons3, cons4, cons1769) rule6329 = ReplacementRule(pattern6329, replacement6329) pattern6330 = Pattern(Integral(f_**(WC('c', S(1))*asinh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))), x_), cons2, cons3, cons8, cons127, cons150) rule6330 = ReplacementRule(pattern6330, replacement6330) pattern6331 = Pattern(Integral(f_**(WC('c', S(1))*acosh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))), x_), cons2, cons3, cons8, cons127, cons150) rule6331 = ReplacementRule(pattern6331, replacement6331) pattern6332 = Pattern(Integral(f_**(WC('c', S(1))*asinh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)))*x_**WC('m', S(1)), x_), cons2, cons3, cons8, cons127, cons530) rule6332 = ReplacementRule(pattern6332, replacement6332) pattern6333 = Pattern(Integral(f_**(WC('c', S(1))*acosh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)))*x_**WC('m', S(1)), x_), cons2, cons3, cons8, cons127, cons530) rule6333 = ReplacementRule(pattern6333, replacement6333) pattern6334 = Pattern(Integral(asinh(u_), x_), cons1232, cons1771) rule6334 = ReplacementRule(pattern6334, replacement6334) pattern6335 = Pattern(Integral(acosh(u_), x_), cons1232, cons1771) rule6335 = ReplacementRule(pattern6335, replacement6335) pattern6336 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asinh(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1771) rule6336 = ReplacementRule(pattern6336, replacement6336) pattern6337 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acosh(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1771) rule6337 = ReplacementRule(pattern6337, replacement6337) pattern6338 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*asinh(u_)), x_), cons2, cons3, cons1232, cons1907, CustomConstraint(With6338)) rule6338 = ReplacementRule(pattern6338, replacement6338) pattern6339 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*acosh(u_)), x_), cons2, cons3, cons1232, cons1908, CustomConstraint(With6339)) rule6339 = ReplacementRule(pattern6339, replacement6339) pattern6340 = Pattern(Integral(exp(WC('n', S(1))*asinh(u_)), x_), cons87, cons806) rule6340 = ReplacementRule(pattern6340, replacement6340) pattern6341 = Pattern(Integral(x_**WC('m', S(1))*exp(WC('n', S(1))*asinh(u_)), x_), cons33, cons87, cons806) rule6341 = ReplacementRule(pattern6341, replacement6341) pattern6342 = Pattern(Integral(exp(WC('n', S(1))*acosh(u_)), x_), cons87, cons806) rule6342 = ReplacementRule(pattern6342, replacement6342) pattern6343 = Pattern(Integral(x_**WC('m', S(1))*exp(WC('n', S(1))*acosh(u_)), x_), cons33, cons87, cons806) rule6343 = ReplacementRule(pattern6343, replacement6343) pattern6344 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons150) rule6344 = ReplacementRule(pattern6344, replacement6344) pattern6345 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons150) rule6345 = ReplacementRule(pattern6345, replacement6345) pattern6346 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons342) rule6346 = ReplacementRule(pattern6346, replacement6346) pattern6347 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons342) rule6347 = ReplacementRule(pattern6347, replacement6347) pattern6348 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1909, cons150) rule6348 = ReplacementRule(pattern6348, replacement6348) pattern6349 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1909, cons150) rule6349 = ReplacementRule(pattern6349, replacement6349) pattern6350 = Pattern(Integral(atanh(x_*WC('c', S(1)))/(d_ + x_*WC('e', S(1))), x_), cons8, cons29, cons50, cons1910, cons1911) rule6350 = ReplacementRule(pattern6350, replacement6350) pattern6351 = Pattern(Integral(atanh(x_*WC('c', S(1)))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons8, cons29, cons50, cons1778) rule6351 = ReplacementRule(pattern6351, replacement6351) pattern6352 = Pattern(Integral(acoth(x_*WC('c', S(1)))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons8, cons29, cons50, cons1778) rule6352 = ReplacementRule(pattern6352, replacement6352) pattern6353 = Pattern(Integral((a_ + WC('b', S(1))*atanh(x_*WC('c', S(1))))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule6353 = ReplacementRule(pattern6353, replacement6353) pattern6354 = Pattern(Integral((a_ + WC('b', S(1))*acoth(x_*WC('c', S(1))))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule6354 = ReplacementRule(pattern6354, replacement6354) pattern6355 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule6355 = ReplacementRule(pattern6355, replacement6355) pattern6356 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule6356 = ReplacementRule(pattern6356, replacement6356) pattern6357 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_/x_, x_), cons2, cons3, cons8, cons87, cons167) rule6357 = ReplacementRule(pattern6357, replacement6357) pattern6358 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_/x_, x_), cons2, cons3, cons8, cons87, cons167) rule6358 = ReplacementRule(pattern6358, replacement6358) pattern6359 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons19, cons87, cons167, cons68) rule6359 = ReplacementRule(pattern6359, replacement6359) pattern6360 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons19, cons87, cons167, cons68) rule6360 = ReplacementRule(pattern6360, replacement6360) pattern6361 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons466) rule6361 = ReplacementRule(pattern6361, replacement6361) pattern6362 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons466) rule6362 = ReplacementRule(pattern6362, replacement6362) pattern6363 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons342) rule6363 = ReplacementRule(pattern6363, replacement6363) pattern6364 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons342) rule6364 = ReplacementRule(pattern6364, replacement6364) pattern6365 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1909, cons150, cons33, cons170) rule6365 = ReplacementRule(pattern6365, replacement6365) pattern6366 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1909, cons150, cons33, cons170) rule6366 = ReplacementRule(pattern6366, replacement6366) pattern6367 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1909, cons150) rule6367 = ReplacementRule(pattern6367, replacement6367) pattern6368 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1909, cons150) rule6368 = ReplacementRule(pattern6368, replacement6368) pattern6369 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1909, cons150, cons33, cons96) rule6369 = ReplacementRule(pattern6369, replacement6369) pattern6370 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1909, cons150, cons33, cons96) rule6370 = ReplacementRule(pattern6370, replacement6370) pattern6371 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons1779) rule6371 = ReplacementRule(pattern6371, replacement6371) pattern6372 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons1779) rule6372 = ReplacementRule(pattern6372, replacement6372) pattern6373 = Pattern(Integral(x_**WC('m', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule6373 = ReplacementRule(pattern6373, replacement6373) pattern6374 = Pattern(Integral(x_**WC('m', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule6374 = ReplacementRule(pattern6374, replacement6374) pattern6375 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons13, cons165) rule6375 = ReplacementRule(pattern6375, replacement6375) pattern6376 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons13, cons165) rule6376 = ReplacementRule(pattern6376, replacement6376) pattern6377 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons165, cons167) rule6377 = ReplacementRule(pattern6377, replacement6377) pattern6378 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons165, cons167) rule6378 = ReplacementRule(pattern6378, replacement6378) pattern6379 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons1739) rule6379 = ReplacementRule(pattern6379, replacement6379) pattern6380 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons1739) rule6380 = ReplacementRule(pattern6380, replacement6380) pattern6381 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons586) rule6381 = ReplacementRule(pattern6381, replacement6381) pattern6382 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons586) rule6382 = ReplacementRule(pattern6382, replacement6382) pattern6383 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons270) rule6383 = ReplacementRule(pattern6383, replacement6383) pattern6384 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons270) rule6384 = ReplacementRule(pattern6384, replacement6384) pattern6385 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150, cons270) rule6385 = ReplacementRule(pattern6385, replacement6385) pattern6386 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150, cons270) rule6386 = ReplacementRule(pattern6386, replacement6386) pattern6387 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150, cons1740) rule6387 = ReplacementRule(pattern6387, replacement6387) pattern6388 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150, cons1740) rule6388 = ReplacementRule(pattern6388, replacement6388) pattern6389 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule6389 = ReplacementRule(pattern6389, replacement6389) pattern6390 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule6390 = ReplacementRule(pattern6390, replacement6390) pattern6391 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1739) rule6391 = ReplacementRule(pattern6391, replacement6391) pattern6392 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1739) rule6392 = ReplacementRule(pattern6392, replacement6392) pattern6393 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons13, cons139, cons232) rule6393 = ReplacementRule(pattern6393, replacement6393) pattern6394 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons13, cons139, cons232) rule6394 = ReplacementRule(pattern6394, replacement6394) pattern6395 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons167) rule6395 = ReplacementRule(pattern6395, replacement6395) pattern6396 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons167) rule6396 = ReplacementRule(pattern6396, replacement6396) pattern6397 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons139, cons167, cons232) rule6397 = ReplacementRule(pattern6397, replacement6397) pattern6398 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons139, cons167, cons232) rule6398 = ReplacementRule(pattern6398, replacement6398) pattern6399 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons139, cons91) rule6399 = ReplacementRule(pattern6399, replacement6399) pattern6400 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons139, cons91) rule6400 = ReplacementRule(pattern6400, replacement6400) pattern6401 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1781, cons1742) rule6401 = ReplacementRule(pattern6401, replacement6401) pattern6402 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1781, cons1743) rule6402 = ReplacementRule(pattern6402, replacement6402) pattern6403 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1781, cons40) rule6403 = ReplacementRule(pattern6403, replacement6403) pattern6404 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1781, cons149) rule6404 = ReplacementRule(pattern6404, replacement6404) pattern6405 = Pattern(Integral(atanh(x_*WC('c', S(1)))/(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons8, cons29, cons50, cons1778) rule6405 = ReplacementRule(pattern6405, replacement6405) pattern6406 = Pattern(Integral(acoth(x_*WC('c', S(1)))/(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons8, cons29, cons50, cons1778) rule6406 = ReplacementRule(pattern6406, replacement6406) pattern6407 = Pattern(Integral((a_ + WC('b', S(1))*atanh(x_*WC('c', S(1))))/(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule6407 = ReplacementRule(pattern6407, replacement6407) pattern6408 = Pattern(Integral((a_ + WC('b', S(1))*acoth(x_*WC('c', S(1))))/(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule6408 = ReplacementRule(pattern6408, replacement6408) pattern6409 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1782) rule6409 = ReplacementRule(pattern6409, With6409) pattern6410 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1782) rule6410 = ReplacementRule(pattern6410, With6410) pattern6411 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons150) rule6411 = ReplacementRule(pattern6411, replacement6411) pattern6412 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons150) rule6412 = ReplacementRule(pattern6412, replacement6412) pattern6413 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule6413 = ReplacementRule(pattern6413, replacement6413) pattern6414 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule6414 = ReplacementRule(pattern6414, replacement6414) pattern6415 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons95, cons90, cons168) rule6415 = ReplacementRule(pattern6415, replacement6415) pattern6416 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons95, cons90, cons168) rule6416 = ReplacementRule(pattern6416, replacement6416) pattern6417 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons95, cons90, cons96) rule6417 = ReplacementRule(pattern6417, replacement6417) pattern6418 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons95, cons90, cons96) rule6418 = ReplacementRule(pattern6418, replacement6418) pattern6419 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule6419 = ReplacementRule(pattern6419, replacement6419) pattern6420 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule6420 = ReplacementRule(pattern6420, replacement6420) pattern6421 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons342, cons586) rule6421 = ReplacementRule(pattern6421, replacement6421) pattern6422 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons342, cons586) rule6422 = ReplacementRule(pattern6422, replacement6422) pattern6423 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons95, cons90, cons168) rule6423 = ReplacementRule(pattern6423, replacement6423) pattern6424 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons95, cons90, cons168) rule6424 = ReplacementRule(pattern6424, replacement6424) pattern6425 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule6425 = ReplacementRule(pattern6425, replacement6425) pattern6426 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule6426 = ReplacementRule(pattern6426, replacement6426) pattern6427 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons95, cons90, cons96) rule6427 = ReplacementRule(pattern6427, replacement6427) pattern6428 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons95, cons90, cons96) rule6428 = ReplacementRule(pattern6428, replacement6428) pattern6429 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons89, cons91) rule6429 = ReplacementRule(pattern6429, replacement6429) pattern6430 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons89, cons91) rule6430 = ReplacementRule(pattern6430, replacement6430) pattern6431 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons20, cons1783) rule6431 = ReplacementRule(pattern6431, replacement6431) pattern6432 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons20, cons1783) rule6432 = ReplacementRule(pattern6432, replacement6432) pattern6433 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons56) rule6433 = ReplacementRule(pattern6433, replacement6433) pattern6434 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons56) rule6434 = ReplacementRule(pattern6434, replacement6434) pattern6435 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons91, cons1444) rule6435 = ReplacementRule(pattern6435, replacement6435) pattern6436 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons91, cons1444) rule6436 = ReplacementRule(pattern6436, replacement6436) pattern6437 = Pattern(Integral(x_**S(2)*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons13, cons139, cons1784) rule6437 = ReplacementRule(pattern6437, replacement6437) pattern6438 = Pattern(Integral(x_**S(2)*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons13, cons139, cons1784) rule6438 = ReplacementRule(pattern6438, replacement6438) pattern6439 = Pattern(Integral(x_**S(2)*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule6439 = ReplacementRule(pattern6439, replacement6439) pattern6440 = Pattern(Integral(x_**S(2)*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule6440 = ReplacementRule(pattern6440, replacement6440) pattern6441 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons242, cons13, cons139) rule6441 = ReplacementRule(pattern6441, replacement6441) pattern6442 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons242, cons13, cons139) rule6442 = ReplacementRule(pattern6442, replacement6442) pattern6443 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons242, cons340, cons139, cons167) rule6443 = ReplacementRule(pattern6443, replacement6443) pattern6444 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons242, cons340, cons139, cons167) rule6444 = ReplacementRule(pattern6444, replacement6444) pattern6445 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1739, cons242, cons89, cons91) rule6445 = ReplacementRule(pattern6445, replacement6445) pattern6446 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1739, cons242, cons89, cons91) rule6446 = ReplacementRule(pattern6446, replacement6446) pattern6447 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1739, cons244, cons89, cons90, cons68) rule6447 = ReplacementRule(pattern6447, replacement6447) pattern6448 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1739, cons244, cons89, cons90, cons68) rule6448 = ReplacementRule(pattern6448, replacement6448) pattern6449 = Pattern(Integral(x_**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons243) rule6449 = ReplacementRule(pattern6449, replacement6449) pattern6450 = Pattern(Integral(x_**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons243) rule6450 = ReplacementRule(pattern6450, replacement6450) pattern6451 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons150, cons40, cons148) rule6451 = ReplacementRule(pattern6451, replacement6451) pattern6452 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons150, cons40, cons148) rule6452 = ReplacementRule(pattern6452, replacement6452) pattern6453 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons13, cons165, cons150, cons1785) rule6453 = ReplacementRule(pattern6453, replacement6453) pattern6454 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1739, cons13, cons165, cons150, cons1785) rule6454 = ReplacementRule(pattern6454, replacement6454) pattern6455 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons95, cons90, cons168) rule6455 = ReplacementRule(pattern6455, replacement6455) pattern6456 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons95, cons90, cons168) rule6456 = ReplacementRule(pattern6456, replacement6456) pattern6457 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons270) rule6457 = ReplacementRule(pattern6457, replacement6457) pattern6458 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons270) rule6458 = ReplacementRule(pattern6458, replacement6458) pattern6459 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**n_/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150, cons270) rule6459 = ReplacementRule(pattern6459, replacement6459) pattern6460 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**n_/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150, cons270) rule6460 = ReplacementRule(pattern6460, replacement6460) pattern6461 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150, cons1740) rule6461 = ReplacementRule(pattern6461, replacement6461) pattern6462 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150, cons1740) rule6462 = ReplacementRule(pattern6462, replacement6462) pattern6463 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(x_**S(2)*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule6463 = ReplacementRule(pattern6463, replacement6463) pattern6464 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/(x_**S(2)*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule6464 = ReplacementRule(pattern6464, replacement6464) pattern6465 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons95, cons90, cons96, cons1512) rule6465 = ReplacementRule(pattern6465, replacement6465) pattern6466 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons95, cons90, cons96, cons1512) rule6466 = ReplacementRule(pattern6466, replacement6466) pattern6467 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons1786, cons139, cons168, cons1154) rule6467 = ReplacementRule(pattern6467, replacement6467) pattern6468 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons1786, cons139, cons168, cons1154) rule6468 = ReplacementRule(pattern6468, replacement6468) pattern6469 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons1786, cons139, cons269, cons1154) rule6469 = ReplacementRule(pattern6469, replacement6469) pattern6470 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons1786, cons139, cons269, cons1154) rule6470 = ReplacementRule(pattern6470, replacement6470) pattern6471 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons164, cons139, cons91, cons321) rule6471 = ReplacementRule(pattern6471, replacement6471) pattern6472 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons164, cons139, cons91, cons321) rule6472 = ReplacementRule(pattern6472, replacement6472) pattern6473 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons64, cons1787, cons1742) rule6473 = ReplacementRule(pattern6473, replacement6473) pattern6474 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons64, cons1787, cons1743) rule6474 = ReplacementRule(pattern6474, replacement6474) pattern6475 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons64, cons1787, cons40) rule6475 = ReplacementRule(pattern6475, replacement6475) pattern6476 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons64, cons1787, cons149) rule6476 = ReplacementRule(pattern6476, replacement6476) pattern6477 = Pattern(Integral(x_*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule6477 = ReplacementRule(pattern6477, replacement6477) pattern6478 = Pattern(Integral(x_*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule6478 = ReplacementRule(pattern6478, replacement6478) pattern6479 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1788) rule6479 = ReplacementRule(pattern6479, With6479) pattern6480 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1788) rule6480 = ReplacementRule(pattern6480, With6480) pattern6481 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons1789) rule6481 = ReplacementRule(pattern6481, replacement6481) pattern6482 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons1789) rule6482 = ReplacementRule(pattern6482, replacement6482) pattern6483 = Pattern(Integral(x_**WC('m', S(1))*(a_ + WC('b', S(1))*atanh(x_*WC('c', S(1))))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1790) rule6483 = ReplacementRule(pattern6483, replacement6483) pattern6484 = Pattern(Integral(x_**WC('m', S(1))*(a_ + WC('b', S(1))*acoth(x_*WC('c', S(1))))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1790) rule6484 = ReplacementRule(pattern6484, replacement6484) pattern6485 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule6485 = ReplacementRule(pattern6485, replacement6485) pattern6486 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule6486 = ReplacementRule(pattern6486, replacement6486) pattern6487 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))*atanh(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons1912) rule6487 = ReplacementRule(pattern6487, replacement6487) pattern6488 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))*acoth(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons1912) rule6488 = ReplacementRule(pattern6488, replacement6488) pattern6489 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))*atanh(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons1913) rule6489 = ReplacementRule(pattern6489, replacement6489) pattern6490 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))*acoth(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons1913) rule6490 = ReplacementRule(pattern6490, replacement6490) pattern6491 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))*log(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons1914) rule6491 = ReplacementRule(pattern6491, replacement6491) pattern6492 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))*log(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons1914) rule6492 = ReplacementRule(pattern6492, replacement6492) pattern6493 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))*log(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons1915) rule6493 = ReplacementRule(pattern6493, replacement6493) pattern6494 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))*log(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons1915) rule6494 = ReplacementRule(pattern6494, replacement6494) pattern6495 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))*PolyLog(p_, u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons1912) rule6495 = ReplacementRule(pattern6495, replacement6495) pattern6496 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))*PolyLog(p_, u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons1912) rule6496 = ReplacementRule(pattern6496, replacement6496) pattern6497 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))*PolyLog(p_, u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons1913) rule6497 = ReplacementRule(pattern6497, replacement6497) pattern6498 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))*PolyLog(p_, u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons1913) rule6498 = ReplacementRule(pattern6498, replacement6498) pattern6499 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons1739) rule6499 = ReplacementRule(pattern6499, replacement6499) pattern6500 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons152, cons1795) rule6500 = ReplacementRule(pattern6500, replacement6500) pattern6501 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**WC('m', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons152, cons1796) rule6501 = ReplacementRule(pattern6501, replacement6501) pattern6502 = Pattern(Integral(atanh(x_*WC('a', S(1)))/(c_ + x_**WC('n', S(1))*WC('d', S(1))), x_), cons2, cons8, cons29, cons87, cons1916) rule6502 = ReplacementRule(pattern6502, replacement6502) pattern6503 = Pattern(Integral(acoth(x_*WC('a', S(1)))/(c_ + x_**WC('n', S(1))*WC('d', S(1))), x_), cons2, cons8, cons29, cons87, cons1916) rule6503 = ReplacementRule(pattern6503, replacement6503) pattern6504 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1798) rule6504 = ReplacementRule(pattern6504, replacement6504) pattern6505 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1798) rule6505 = ReplacementRule(pattern6505, replacement6505) pattern6506 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons603) rule6506 = ReplacementRule(pattern6506, replacement6506) pattern6507 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons603) rule6507 = ReplacementRule(pattern6507, replacement6507) pattern6508 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1799) rule6508 = ReplacementRule(pattern6508, With6508) pattern6509 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1799) rule6509 = ReplacementRule(pattern6509, With6509) pattern6510 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons20, cons263) rule6510 = ReplacementRule(pattern6510, With6510) pattern6511 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons20, cons263) rule6511 = ReplacementRule(pattern6511, With6511) pattern6512 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*atanh(x_*WC('c', S(1))))**S(2)*(WC('d', S(0)) + WC('e', S(1))*log(f_ + x_**S(2)*WC('g', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1917) rule6512 = ReplacementRule(pattern6512, replacement6512) pattern6513 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acoth(x_*WC('c', S(1))))**S(2)*(WC('d', S(0)) + WC('e', S(1))*log(f_ + x_**S(2)*WC('g', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1917) rule6513 = ReplacementRule(pattern6513, replacement6513) pattern6514 = Pattern(Integral(exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons1484) rule6514 = ReplacementRule(pattern6514, replacement6514) pattern6515 = Pattern(Integral(x_**WC('m', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons19, cons1484) rule6515 = ReplacementRule(pattern6515, replacement6515) pattern6516 = Pattern(Integral(exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons4, cons1443) rule6516 = ReplacementRule(pattern6516, replacement6516) pattern6517 = Pattern(Integral(x_**WC('m', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons19, cons4, cons1443) rule6517 = ReplacementRule(pattern6517, replacement6517) pattern6518 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1918, cons1252, cons248) rule6518 = ReplacementRule(pattern6518, replacement6518) pattern6519 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons5, cons1918, cons1252, cons1919, cons248) rule6519 = ReplacementRule(pattern6519, replacement6519) pattern6520 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1920, cons1804) rule6520 = ReplacementRule(pattern6520, replacement6520) pattern6521 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1920, cons1805) rule6521 = ReplacementRule(pattern6521, replacement6521) pattern6522 = Pattern(Integral((c_ + WC('d', S(1))/x_)**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1921, cons40) rule6522 = ReplacementRule(pattern6522, replacement6522) pattern6523 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*WC('u', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1921, cons149, cons745, cons179) rule6523 = ReplacementRule(pattern6523, replacement6523) pattern6524 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*WC('u', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1921, cons149, cons745, cons119) rule6524 = ReplacementRule(pattern6524, replacement6524) pattern6525 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*WC('u', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1921, cons149) rule6525 = ReplacementRule(pattern6525, replacement6525) pattern6526 = Pattern(Integral(exp(n_*atanh(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons4, cons1922, cons25) rule6526 = ReplacementRule(pattern6526, replacement6526) pattern6527 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons13, cons139, cons25, cons1923, cons248) rule6527 = ReplacementRule(pattern6527, replacement6527) pattern6528 = Pattern(Integral(exp(WC('n', S(1))*atanh(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons8, cons29, cons4, cons1922, cons1924) rule6528 = ReplacementRule(pattern6528, replacement6528) pattern6529 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1922, cons40, cons1925, cons1926) rule6529 = ReplacementRule(pattern6529, replacement6529) pattern6530 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1922, cons40, cons1927, cons1926) rule6530 = ReplacementRule(pattern6530, replacement6530) pattern6531 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1922, cons1804) rule6531 = ReplacementRule(pattern6531, replacement6531) pattern6532 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1922, cons1805, cons676) rule6532 = ReplacementRule(pattern6532, replacement6532) pattern6533 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1922, cons1805, cons1928) rule6533 = ReplacementRule(pattern6533, replacement6533) pattern6534 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1922, cons1805) rule6534 = ReplacementRule(pattern6534, replacement6534) pattern6535 = Pattern(Integral(x_*exp(n_*atanh(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons4, cons1922, cons25) rule6535 = ReplacementRule(pattern6535, replacement6535) pattern6536 = Pattern(Integral(x_*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons13, cons139, cons25, cons248) rule6536 = ReplacementRule(pattern6536, replacement6536) pattern6537 = Pattern(Integral(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons1929, cons25) rule6537 = ReplacementRule(pattern6537, replacement6537) pattern6538 = Pattern(Integral(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons13, cons139, cons25, cons1923, cons248) rule6538 = ReplacementRule(pattern6538, replacement6538) pattern6539 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons5, cons1922, cons1804, cons1925, cons1926) rule6539 = ReplacementRule(pattern6539, replacement6539) pattern6540 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons5, cons1922, cons1804, cons1927, cons1926) rule6540 = ReplacementRule(pattern6540, replacement6540) pattern6541 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1922, cons1804) rule6541 = ReplacementRule(pattern6541, replacement6541) pattern6542 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons5, cons1922, cons1805, cons676) rule6542 = ReplacementRule(pattern6542, replacement6542) pattern6543 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons5, cons1922, cons1805, cons1928) rule6543 = ReplacementRule(pattern6543, replacement6543) pattern6544 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1922, cons1805, cons1924) rule6544 = ReplacementRule(pattern6544, replacement6544) pattern6545 = Pattern(Integral(u_*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1922, cons1804) rule6545 = ReplacementRule(pattern6545, replacement6545) pattern6546 = Pattern(Integral(u_*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1922, cons1805, cons745) rule6546 = ReplacementRule(pattern6546, replacement6546) pattern6547 = Pattern(Integral(u_*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1922, cons1805, cons1924) rule6547 = ReplacementRule(pattern6547, replacement6547) pattern6548 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1930, cons40) rule6548 = ReplacementRule(pattern6548, replacement6548) pattern6549 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**p_*WC('u', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1930, cons149, cons745, cons179) rule6549 = ReplacementRule(pattern6549, replacement6549) pattern6550 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**p_*WC('u', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1930, cons149, cons745, cons119) rule6550 = ReplacementRule(pattern6550, replacement6550) pattern6551 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**p_*WC('u', S(1))*exp(WC('n', S(1))*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1930, cons149, cons1924) rule6551 = ReplacementRule(pattern6551, replacement6551) pattern6552 = Pattern(Integral(exp(WC('n', S(1))*atanh((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1581) rule6552 = ReplacementRule(pattern6552, replacement6552) pattern6553 = Pattern(Integral(x_**m_*exp(n_*atanh((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons86, cons89, cons996) rule6553 = ReplacementRule(pattern6553, replacement6553) pattern6554 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*exp(WC('n', S(1))*atanh((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1582) rule6554 = ReplacementRule(pattern6554, replacement6554) pattern6555 = Pattern(Integral((c_ + x_**S(2)*WC('e', S(1)) + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*atanh(a_ + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1820, cons1931, cons1932) rule6555 = ReplacementRule(pattern6555, replacement6555) pattern6556 = Pattern(Integral((c_ + x_**S(2)*WC('e', S(1)) + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*atanh(a_ + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1820, cons1931, cons1933) rule6556 = ReplacementRule(pattern6556, replacement6556) pattern6557 = Pattern(Integral(WC('u', S(1))*exp(WC('n', S(1))*atanh(WC('c', S(1))/(x_*WC('b', S(1)) + WC('a', S(0))))), x_), cons2, cons3, cons8, cons4, cons1581) rule6557 = ReplacementRule(pattern6557, replacement6557) pattern6558 = Pattern(Integral(WC('u', S(1))*exp(n_*acoth(x_*WC('a', S(1)))), x_), cons2, cons745) rule6558 = ReplacementRule(pattern6558, replacement6558) pattern6559 = Pattern(Integral(exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons1484) rule6559 = ReplacementRule(pattern6559, replacement6559) pattern6560 = Pattern(Integral(x_**WC('m', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons1484, cons20) rule6560 = ReplacementRule(pattern6560, replacement6560) pattern6561 = Pattern(Integral(exp(n_*acoth(x_*WC('a', S(1)))), x_), cons2, cons4, cons25) rule6561 = ReplacementRule(pattern6561, replacement6561) pattern6562 = Pattern(Integral(x_**WC('m', S(1))*exp(n_*acoth(x_*WC('a', S(1)))), x_), cons2, cons4, cons25, cons20) rule6562 = ReplacementRule(pattern6562, replacement6562) pattern6563 = Pattern(Integral(x_**m_*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons19, cons1484, cons21) rule6563 = ReplacementRule(pattern6563, replacement6563) pattern6564 = Pattern(Integral(x_**m_*exp(n_*acoth(x_*WC('a', S(1)))), x_), cons2, cons19, cons4, cons25, cons21) rule6564 = ReplacementRule(pattern6564, replacement6564) pattern6565 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1918, cons1934, cons1924) rule6565 = ReplacementRule(pattern6565, replacement6565) pattern6566 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1920, cons1924, cons40) rule6566 = ReplacementRule(pattern6566, replacement6566) pattern6567 = Pattern(Integral((c_ + x_*WC('d', S(1)))**p_*WC('u', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1920, cons1924, cons149) rule6567 = ReplacementRule(pattern6567, replacement6567) pattern6568 = Pattern(Integral((c_ + WC('d', S(1))/x_)**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1935, cons1252, cons1919, cons248) rule6568 = ReplacementRule(pattern6568, replacement6568) pattern6569 = Pattern(Integral(x_**WC('m', S(1))*(c_ + WC('d', S(1))/x_)**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1935, cons1252, cons20, cons1936, cons248) rule6569 = ReplacementRule(pattern6569, replacement6569) pattern6570 = Pattern(Integral((c_ + WC('d', S(1))/x_)**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1921, cons1924, cons1804) rule6570 = ReplacementRule(pattern6570, replacement6570) pattern6571 = Pattern(Integral(x_**WC('m', S(1))*(c_ + WC('d', S(1))/x_)**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1921, cons1924, cons1804, cons20) rule6571 = ReplacementRule(pattern6571, replacement6571) pattern6572 = Pattern(Integral(x_**m_*(c_ + WC('d', S(1))/x_)**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1921, cons1924, cons1804, cons21) rule6572 = ReplacementRule(pattern6572, replacement6572) pattern6573 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*WC('u', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1921, cons1924, cons1805) rule6573 = ReplacementRule(pattern6573, replacement6573) pattern6574 = Pattern(Integral(exp(WC('n', S(1))*acoth(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons8, cons29, cons4, cons1922, cons1924) rule6574 = ReplacementRule(pattern6574, replacement6574) pattern6575 = Pattern(Integral(exp(n_*acoth(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons4, cons1922, cons25) rule6575 = ReplacementRule(pattern6575, replacement6575) pattern6576 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons1924, cons13, cons139, cons232, cons1923, cons1937) rule6576 = ReplacementRule(pattern6576, replacement6576) pattern6577 = Pattern(Integral(x_*exp(n_*acoth(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons4, cons1922, cons25) rule6577 = ReplacementRule(pattern6577, replacement6577) pattern6578 = Pattern(Integral(x_*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons1924, cons13, cons1826, cons232, cons1923, cons1937) rule6578 = ReplacementRule(pattern6578, replacement6578) pattern6579 = Pattern(Integral(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons1924, cons1929, cons975) rule6579 = ReplacementRule(pattern6579, replacement6579) pattern6580 = Pattern(Integral(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons1924, cons13, cons1826, cons1938, cons1923, cons1937) rule6580 = ReplacementRule(pattern6580, replacement6580) pattern6581 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons1924, cons20, cons13, cons1829, cons40) rule6581 = ReplacementRule(pattern6581, replacement6581) pattern6582 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1922, cons1924, cons40) rule6582 = ReplacementRule(pattern6582, replacement6582) pattern6583 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*WC('u', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1922, cons1924, cons149) rule6583 = ReplacementRule(pattern6583, replacement6583) pattern6584 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1930, cons1924, cons1804, cons1939) rule6584 = ReplacementRule(pattern6584, replacement6584) pattern6585 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1930, cons1924, cons1804, cons1940) rule6585 = ReplacementRule(pattern6585, replacement6585) pattern6586 = Pattern(Integral(x_**WC('m', S(1))*(c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1930, cons1924, cons1804, cons1940, cons20) rule6586 = ReplacementRule(pattern6586, replacement6586) pattern6587 = Pattern(Integral(x_**m_*(c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1930, cons1924, cons1804, cons1940, cons21) rule6587 = ReplacementRule(pattern6587, replacement6587) pattern6588 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**p_*WC('u', S(1))*exp(WC('n', S(1))*acoth(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1930, cons1924, cons1805) rule6588 = ReplacementRule(pattern6588, replacement6588) pattern6589 = Pattern(Integral(WC('u', S(1))*exp(n_*acoth((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons745) rule6589 = ReplacementRule(pattern6589, replacement6589) pattern6590 = Pattern(Integral(exp(WC('n', S(1))*acoth((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1924) rule6590 = ReplacementRule(pattern6590, replacement6590) pattern6591 = Pattern(Integral(x_**m_*exp(n_*acoth((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons86, cons89, cons996) rule6591 = ReplacementRule(pattern6591, replacement6591) pattern6592 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*exp(WC('n', S(1))*acoth((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1924) rule6592 = ReplacementRule(pattern6592, replacement6592) pattern6593 = Pattern(Integral((c_ + x_**S(2)*WC('e', S(1)) + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acoth(a_ + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1924, cons1820, cons1931, cons1932) rule6593 = ReplacementRule(pattern6593, replacement6593) pattern6594 = Pattern(Integral((c_ + x_**S(2)*WC('e', S(1)) + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acoth(a_ + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1924, cons1820, cons1931, cons1933) rule6594 = ReplacementRule(pattern6594, replacement6594) pattern6595 = Pattern(Integral(WC('u', S(1))*exp(WC('n', S(1))*acoth(WC('c', S(1))/(x_*WC('b', S(1)) + WC('a', S(0))))), x_), cons2, cons3, cons8, cons4, cons1581) rule6595 = ReplacementRule(pattern6595, replacement6595) pattern6596 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons150) rule6596 = ReplacementRule(pattern6596, replacement6596) pattern6597 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons150) rule6597 = ReplacementRule(pattern6597, replacement6597) pattern6598 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(c_ + x_*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons342) rule6598 = ReplacementRule(pattern6598, replacement6598) pattern6599 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(c_ + x_*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons342) rule6599 = ReplacementRule(pattern6599, replacement6599) pattern6600 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons150) rule6600 = ReplacementRule(pattern6600, replacement6600) pattern6601 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons150) rule6601 = ReplacementRule(pattern6601, replacement6601) pattern6602 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**m_*(WC('a', S(0)) + WC('b', S(1))*atanh(c_ + x_*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons342) rule6602 = ReplacementRule(pattern6602, replacement6602) pattern6603 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**m_*(WC('a', S(0)) + WC('b', S(1))*acoth(c_ + x_*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons342) rule6603 = ReplacementRule(pattern6603, replacement6603) pattern6604 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*atanh(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons38, cons4, cons5, cons1764, cons1765) rule6604 = ReplacementRule(pattern6604, replacement6604) pattern6605 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acoth(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons38, cons4, cons5, cons1764, cons1765) rule6605 = ReplacementRule(pattern6605, replacement6605) pattern6606 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons1764, cons1765) rule6606 = ReplacementRule(pattern6606, replacement6606) pattern6607 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons1764, cons1765) rule6607 = ReplacementRule(pattern6607, replacement6607) pattern6608 = Pattern(Integral(atanh(a_ + x_*WC('b', S(1)))/(c_ + x_**WC('n', S(1))*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons89) rule6608 = ReplacementRule(pattern6608, replacement6608) pattern6609 = Pattern(Integral(acoth(a_ + x_*WC('b', S(1)))/(c_ + x_**WC('n', S(1))*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons89) rule6609 = ReplacementRule(pattern6609, replacement6609) pattern6610 = Pattern(Integral(atanh(a_ + x_*WC('b', S(1)))/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons1096) rule6610 = ReplacementRule(pattern6610, replacement6610) pattern6611 = Pattern(Integral(acoth(a_ + x_*WC('b', S(1)))/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons1096) rule6611 = ReplacementRule(pattern6611, replacement6611) pattern6612 = Pattern(Integral(atanh(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons4, cons1833) rule6612 = ReplacementRule(pattern6612, replacement6612) pattern6613 = Pattern(Integral(acoth(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons4, cons1833) rule6613 = ReplacementRule(pattern6613, replacement6613) pattern6614 = Pattern(Integral(atanh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))/x_, x_), cons2, cons3, cons4, cons1833) rule6614 = ReplacementRule(pattern6614, replacement6614) pattern6615 = Pattern(Integral(acoth(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))/x_, x_), cons2, cons3, cons4, cons1833) rule6615 = ReplacementRule(pattern6615, replacement6615) pattern6616 = Pattern(Integral(x_**WC('m', S(1))*atanh(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons95, cons1834, cons1835) rule6616 = ReplacementRule(pattern6616, replacement6616) pattern6617 = Pattern(Integral(x_**WC('m', S(1))*acoth(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons95, cons1834, cons1835) rule6617 = ReplacementRule(pattern6617, replacement6617) pattern6618 = Pattern(Integral(atanh(f_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons1836) rule6618 = ReplacementRule(pattern6618, replacement6618) pattern6619 = Pattern(Integral(acoth(f_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons1836) rule6619 = ReplacementRule(pattern6619, replacement6619) pattern6620 = Pattern(Integral(x_**WC('m', S(1))*atanh(f_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons20, cons170) rule6620 = ReplacementRule(pattern6620, replacement6620) pattern6621 = Pattern(Integral(x_**WC('m', S(1))*acoth(f_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons20, cons170) rule6621 = ReplacementRule(pattern6621, replacement6621) pattern6622 = Pattern(Integral(WC('u', S(1))*atanh(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule6622 = ReplacementRule(pattern6622, replacement6622) pattern6623 = Pattern(Integral(WC('u', S(1))*acoth(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule6623 = ReplacementRule(pattern6623, replacement6623) pattern6624 = Pattern(Integral(S(1)/(sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0)))*atanh(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))), x_), cons2, cons3, cons8, cons1941) rule6624 = ReplacementRule(pattern6624, replacement6624) pattern6625 = Pattern(Integral(S(1)/(sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0)))*acoth(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))), x_), cons2, cons3, cons8, cons1941) rule6625 = ReplacementRule(pattern6625, replacement6625) pattern6626 = Pattern(Integral(atanh(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons19, cons1941, cons68) rule6626 = ReplacementRule(pattern6626, replacement6626) pattern6627 = Pattern(Integral(acoth(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons19, cons1941, cons68) rule6627 = ReplacementRule(pattern6627, replacement6627) pattern6628 = Pattern(Integral(atanh(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))/sqrt(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1941, cons385) rule6628 = ReplacementRule(pattern6628, replacement6628) pattern6629 = Pattern(Integral(acoth(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))/sqrt(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1941, cons385) rule6629 = ReplacementRule(pattern6629, replacement6629) pattern6630 = Pattern(Integral((x_**S(2)*WC('d', S(1)) + WC('c', S(0)))**n_*atanh(x_*WC('a', S(1))), x_), cons2, cons8, cons29, cons810, cons1588) rule6630 = ReplacementRule(pattern6630, With6630) pattern6631 = Pattern(Integral((x_**S(2)*WC('d', S(1)) + WC('c', S(0)))**n_*acoth(x_*WC('a', S(1))), x_), cons2, cons8, cons29, cons810, cons1588) rule6631 = ReplacementRule(pattern6631, With6631) pattern6632 = Pattern(Integral(u_*v_**WC('n', S(1)), x_), cons820, cons87, cons465, cons1942, cons1943, CustomConstraint(With6632)) rule6632 = ReplacementRule(pattern6632, replacement6632) pattern6633 = Pattern(Integral(u_*v_**WC('n', S(1)), x_), cons820, cons87, cons465, cons1942, cons1944, CustomConstraint(With6633)) rule6633 = ReplacementRule(pattern6633, replacement6633) pattern6634 = Pattern(Integral(atanh(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1945) rule6634 = ReplacementRule(pattern6634, replacement6634) pattern6635 = Pattern(Integral(acoth(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1945) rule6635 = ReplacementRule(pattern6635, replacement6635) pattern6636 = Pattern(Integral(atanh(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1945) rule6636 = ReplacementRule(pattern6636, replacement6636) pattern6637 = Pattern(Integral(acoth(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1945) rule6637 = ReplacementRule(pattern6637, replacement6637) pattern6638 = Pattern(Integral(atanh(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1946) rule6638 = ReplacementRule(pattern6638, replacement6638) pattern6639 = Pattern(Integral(acoth(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1946) rule6639 = ReplacementRule(pattern6639, replacement6639) pattern6640 = Pattern(Integral(atanh(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1946) rule6640 = ReplacementRule(pattern6640, replacement6640) pattern6641 = Pattern(Integral(acoth(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1946) rule6641 = ReplacementRule(pattern6641, replacement6641) pattern6642 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1945) rule6642 = ReplacementRule(pattern6642, replacement6642) pattern6643 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1945) rule6643 = ReplacementRule(pattern6643, replacement6643) pattern6644 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1945) rule6644 = ReplacementRule(pattern6644, replacement6644) pattern6645 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1945) rule6645 = ReplacementRule(pattern6645, replacement6645) pattern6646 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1946) rule6646 = ReplacementRule(pattern6646, replacement6646) pattern6647 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1946) rule6647 = ReplacementRule(pattern6647, replacement6647) pattern6648 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1946) rule6648 = ReplacementRule(pattern6648, replacement6648) pattern6649 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1946) rule6649 = ReplacementRule(pattern6649, replacement6649) pattern6650 = Pattern(Integral(atanh(tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons69) rule6650 = ReplacementRule(pattern6650, replacement6650) pattern6651 = Pattern(Integral(acoth(tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons69) rule6651 = ReplacementRule(pattern6651, replacement6651) pattern6652 = Pattern(Integral(atanh(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons69) rule6652 = ReplacementRule(pattern6652, replacement6652) pattern6653 = Pattern(Integral(acoth(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons69) rule6653 = ReplacementRule(pattern6653, replacement6653) pattern6654 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons50, cons127, cons64) rule6654 = ReplacementRule(pattern6654, replacement6654) pattern6655 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons50, cons127, cons64) rule6655 = ReplacementRule(pattern6655, replacement6655) pattern6656 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons50, cons127, cons64) rule6656 = ReplacementRule(pattern6656, replacement6656) pattern6657 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons50, cons127, cons64) rule6657 = ReplacementRule(pattern6657, replacement6657) pattern6658 = Pattern(Integral(atanh(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1947) rule6658 = ReplacementRule(pattern6658, replacement6658) pattern6659 = Pattern(Integral(acoth(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1947) rule6659 = ReplacementRule(pattern6659, replacement6659) pattern6660 = Pattern(Integral(atanh(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1948) rule6660 = ReplacementRule(pattern6660, replacement6660) pattern6661 = Pattern(Integral(acoth(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1948) rule6661 = ReplacementRule(pattern6661, replacement6661) pattern6662 = Pattern(Integral(atanh(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1949) rule6662 = ReplacementRule(pattern6662, replacement6662) pattern6663 = Pattern(Integral(acoth(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1949) rule6663 = ReplacementRule(pattern6663, replacement6663) pattern6664 = Pattern(Integral(atanh(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1950) rule6664 = ReplacementRule(pattern6664, replacement6664) pattern6665 = Pattern(Integral(acoth(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1950) rule6665 = ReplacementRule(pattern6665, replacement6665) pattern6666 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1947) rule6666 = ReplacementRule(pattern6666, replacement6666) pattern6667 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1947) rule6667 = ReplacementRule(pattern6667, replacement6667) pattern6668 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1948) rule6668 = ReplacementRule(pattern6668, replacement6668) pattern6669 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1948) rule6669 = ReplacementRule(pattern6669, replacement6669) pattern6670 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1949) rule6670 = ReplacementRule(pattern6670, replacement6670) pattern6671 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1949) rule6671 = ReplacementRule(pattern6671, replacement6671) pattern6672 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*atanh(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1950) rule6672 = ReplacementRule(pattern6672, replacement6672) pattern6673 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acoth(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1950) rule6673 = ReplacementRule(pattern6673, replacement6673) pattern6674 = Pattern(Integral(atanh(u_), x_), cons1232) rule6674 = ReplacementRule(pattern6674, replacement6674) pattern6675 = Pattern(Integral(acoth(u_), x_), cons1232) rule6675 = ReplacementRule(pattern6675, replacement6675) pattern6676 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*atanh(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1849) rule6676 = ReplacementRule(pattern6676, replacement6676) pattern6677 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acoth(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1849) rule6677 = ReplacementRule(pattern6677, replacement6677) pattern6678 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*atanh(u_)), x_), cons2, cons3, cons1232, cons1951, cons1952, CustomConstraint(With6678)) rule6678 = ReplacementRule(pattern6678, replacement6678) pattern6679 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*acoth(u_)), x_), cons2, cons3, cons1232, cons1953, cons1954, CustomConstraint(With6679)) rule6679 = ReplacementRule(pattern6679, replacement6679) pattern6680 = Pattern(Integral(asech(x_*WC('c', S(1))), x_), cons8, cons8) rule6680 = ReplacementRule(pattern6680, replacement6680) pattern6681 = Pattern(Integral(acsch(x_*WC('c', S(1))), x_), cons8, cons8) rule6681 = ReplacementRule(pattern6681, replacement6681) pattern6682 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons1581) rule6682 = ReplacementRule(pattern6682, replacement6682) pattern6683 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons1581) rule6683 = ReplacementRule(pattern6683, replacement6683) pattern6684 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))/x_, x_), cons2, cons3, cons8, cons14) rule6684 = ReplacementRule(pattern6684, replacement6684) pattern6685 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))/x_, x_), cons2, cons3, cons8, cons14) rule6685 = ReplacementRule(pattern6685, replacement6685) pattern6686 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons68) rule6686 = ReplacementRule(pattern6686, replacement6686) pattern6687 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons68) rule6687 = ReplacementRule(pattern6687, replacement6687) pattern6688 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons20) rule6688 = ReplacementRule(pattern6688, replacement6688) pattern6689 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons20) rule6689 = ReplacementRule(pattern6689, replacement6689) pattern6690 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons1856) rule6690 = ReplacementRule(pattern6690, replacement6690) pattern6691 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons1856) rule6691 = ReplacementRule(pattern6691, replacement6691) pattern6692 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1745) rule6692 = ReplacementRule(pattern6692, With6692) pattern6693 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1745) rule6693 = ReplacementRule(pattern6693, With6693) pattern6694 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons40) rule6694 = ReplacementRule(pattern6694, replacement6694) pattern6695 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons40) rule6695 = ReplacementRule(pattern6695, replacement6695) pattern6696 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons669, cons180, cons1857) rule6696 = ReplacementRule(pattern6696, replacement6696) pattern6697 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons669, cons180, cons1857) rule6697 = ReplacementRule(pattern6697, replacement6697) pattern6698 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons669, cons1858) rule6698 = ReplacementRule(pattern6698, replacement6698) pattern6699 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons669, cons1858) rule6699 = ReplacementRule(pattern6699, replacement6699) pattern6700 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule6700 = ReplacementRule(pattern6700, replacement6700) pattern6701 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule6701 = ReplacementRule(pattern6701, replacement6701) pattern6702 = Pattern(Integral(x_*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule6702 = ReplacementRule(pattern6702, replacement6702) pattern6703 = Pattern(Integral(x_*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule6703 = ReplacementRule(pattern6703, replacement6703) pattern6704 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1788) rule6704 = ReplacementRule(pattern6704, With6704) pattern6705 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1788) rule6705 = ReplacementRule(pattern6705, With6705) pattern6706 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1301) rule6706 = ReplacementRule(pattern6706, replacement6706) pattern6707 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1301) rule6707 = ReplacementRule(pattern6707, replacement6707) pattern6708 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons20, cons669, cons180, cons1857) rule6708 = ReplacementRule(pattern6708, replacement6708) pattern6709 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons20, cons669, cons180, cons1857) rule6709 = ReplacementRule(pattern6709, replacement6709) pattern6710 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons20, cons669, cons1858) rule6710 = ReplacementRule(pattern6710, replacement6710) pattern6711 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons20, cons669, cons1858) rule6711 = ReplacementRule(pattern6711, replacement6711) pattern6712 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule6712 = ReplacementRule(pattern6712, replacement6712) pattern6713 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule6713 = ReplacementRule(pattern6713, replacement6713) pattern6714 = Pattern(Integral(asech(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons69) rule6714 = ReplacementRule(pattern6714, replacement6714) pattern6715 = Pattern(Integral(acsch(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons69) rule6715 = ReplacementRule(pattern6715, replacement6715) pattern6716 = Pattern(Integral(asech(a_ + x_*WC('b', S(1)))**n_, x_), cons2, cons3, cons4, cons1833) rule6716 = ReplacementRule(pattern6716, replacement6716) pattern6717 = Pattern(Integral(acsch(a_ + x_*WC('b', S(1)))**n_, x_), cons2, cons3, cons4, cons1833) rule6717 = ReplacementRule(pattern6717, replacement6717) pattern6718 = Pattern(Integral(asech(a_ + x_*WC('b', S(1)))/x_, x_), cons2, cons3, cons69) rule6718 = ReplacementRule(pattern6718, replacement6718) pattern6719 = Pattern(Integral(acsch(a_ + x_*WC('b', S(1)))/x_, x_), cons2, cons3, cons69) rule6719 = ReplacementRule(pattern6719, replacement6719) pattern6720 = Pattern(Integral(x_**WC('m', S(1))*asech(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons19, cons20, cons68) rule6720 = ReplacementRule(pattern6720, replacement6720) pattern6721 = Pattern(Integral(x_**WC('m', S(1))*acsch(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons19, cons20, cons68) rule6721 = ReplacementRule(pattern6721, replacement6721) pattern6722 = Pattern(Integral(x_**WC('m', S(1))*asech(a_ + x_*WC('b', S(1)))**n_, x_), cons2, cons3, cons4, cons64) rule6722 = ReplacementRule(pattern6722, replacement6722) pattern6723 = Pattern(Integral(x_**WC('m', S(1))*acsch(a_ + x_*WC('b', S(1)))**n_, x_), cons2, cons3, cons4, cons64) rule6723 = ReplacementRule(pattern6723, replacement6723) pattern6724 = Pattern(Integral(WC('u', S(1))*asech(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule6724 = ReplacementRule(pattern6724, replacement6724) pattern6725 = Pattern(Integral(WC('u', S(1))*acsch(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule6725 = ReplacementRule(pattern6725, replacement6725) pattern6726 = Pattern(Integral(exp(asech(x_*WC('a', S(1)))), x_), cons2, cons2) rule6726 = ReplacementRule(pattern6726, replacement6726) pattern6727 = Pattern(Integral(exp(asech(x_**p_*WC('a', S(1)))), x_), cons2, cons5, cons1955) rule6727 = ReplacementRule(pattern6727, replacement6727) pattern6728 = Pattern(Integral(exp(acsch(x_**WC('p', S(1))*WC('a', S(1)))), x_), cons2, cons5, cons1955) rule6728 = ReplacementRule(pattern6728, replacement6728) pattern6729 = Pattern(Integral(exp(WC('n', S(1))*asech(u_)), x_), cons87) rule6729 = ReplacementRule(pattern6729, replacement6729) pattern6730 = Pattern(Integral(exp(WC('n', S(1))*acsch(u_)), x_), cons87) rule6730 = ReplacementRule(pattern6730, replacement6730) pattern6731 = Pattern(Integral(exp(asech(x_**WC('p', S(1))*WC('a', S(1))))/x_, x_), cons2, cons5, cons1955) rule6731 = ReplacementRule(pattern6731, replacement6731) pattern6732 = Pattern(Integral(x_**WC('m', S(1))*exp(asech(x_**WC('p', S(1))*WC('a', S(1)))), x_), cons2, cons19, cons5, cons68) rule6732 = ReplacementRule(pattern6732, replacement6732) pattern6733 = Pattern(Integral(x_**WC('m', S(1))*exp(acsch(x_**WC('p', S(1))*WC('a', S(1)))), x_), cons2, cons19, cons5, cons1956) rule6733 = ReplacementRule(pattern6733, replacement6733) pattern6734 = Pattern(Integral(x_**WC('m', S(1))*exp(WC('n', S(1))*asech(u_)), x_), cons19, cons87) rule6734 = ReplacementRule(pattern6734, replacement6734) pattern6735 = Pattern(Integral(x_**WC('m', S(1))*exp(WC('n', S(1))*acsch(u_)), x_), cons19, cons87) rule6735 = ReplacementRule(pattern6735, replacement6735) pattern6736 = Pattern(Integral(asech(u_), x_), cons1232, cons1771) rule6736 = ReplacementRule(pattern6736, replacement6736) pattern6737 = Pattern(Integral(acsch(u_), x_), cons1232, cons1771) rule6737 = ReplacementRule(pattern6737, replacement6737) pattern6738 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asech(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1771) rule6738 = ReplacementRule(pattern6738, replacement6738) pattern6739 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsch(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1771) rule6739 = ReplacementRule(pattern6739, replacement6739) pattern6740 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*asech(u_)), x_), cons2, cons3, cons1232, cons1957, CustomConstraint(With6740)) rule6740 = ReplacementRule(pattern6740, replacement6740) pattern6741 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*acsch(u_)), x_), cons2, cons3, cons1232, cons1958, CustomConstraint(With6741)) rule6741 = ReplacementRule(pattern6741, replacement6741) return [rule6087, rule6088, rule6089, rule6090, rule6091, rule6092, rule6093, rule6094, rule6095, rule6096, rule6097, rule6098, rule6099, rule6100, rule6101, rule6102, rule6103, rule6104, rule6105, rule6106, rule6107, rule6108, rule6109, rule6110, rule6111, rule6112, rule6113, rule6114, rule6115, rule6116, rule6117, rule6118, rule6119, rule6120, rule6121, rule6122, rule6123, rule6124, rule6125, rule6126, rule6127, rule6128, rule6129, rule6130, rule6131, rule6132, rule6133, rule6134, rule6135, rule6136, rule6137, rule6138, rule6139, rule6140, rule6141, rule6142, rule6143, rule6144, rule6145, rule6146, rule6147, rule6148, rule6149, rule6150, rule6151, rule6152, rule6153, rule6154, rule6155, rule6156, rule6157, rule6158, rule6159, rule6160, rule6161, rule6162, rule6163, rule6164, rule6165, rule6166, rule6167, rule6168, rule6169, rule6170, rule6171, rule6172, rule6173, rule6174, rule6175, rule6176, rule6177, rule6178, rule6179, rule6180, rule6181, rule6182, rule6183, rule6184, rule6185, rule6186, rule6187, rule6188, rule6189, rule6190, rule6191, rule6192, rule6193, rule6194, rule6195, rule6196, rule6197, rule6198, rule6199, rule6200, rule6201, rule6202, rule6203, rule6204, rule6205, rule6206, rule6207, rule6208, rule6209, rule6210, rule6211, rule6212, rule6213, rule6214, rule6215, rule6216, rule6217, rule6218, rule6219, rule6220, rule6221, rule6222, rule6223, rule6224, rule6225, rule6226, rule6227, rule6228, rule6229, rule6230, rule6231, rule6232, rule6233, rule6234, rule6235, rule6236, rule6237, rule6238, rule6239, rule6240, rule6241, rule6242, rule6243, rule6244, rule6245, rule6246, rule6247, rule6248, rule6249, rule6250, rule6251, rule6252, rule6253, rule6254, rule6255, rule6256, rule6257, rule6258, rule6259, rule6260, rule6261, rule6262, rule6263, rule6264, rule6265, rule6266, rule6267, rule6268, rule6269, rule6270, rule6271, rule6272, rule6273, rule6274, rule6275, rule6276, rule6277, rule6278, rule6279, rule6280, rule6281, rule6282, rule6283, rule6284, rule6285, rule6286, rule6287, rule6288, rule6289, rule6290, rule6291, rule6292, rule6293, rule6294, rule6295, rule6296, rule6297, rule6298, rule6299, rule6300, rule6301, rule6302, rule6303, rule6304, rule6305, rule6306, rule6307, rule6308, rule6309, rule6310, rule6311, rule6312, rule6313, rule6314, rule6315, rule6316, rule6317, rule6318, rule6319, rule6320, rule6321, rule6322, rule6323, rule6324, rule6325, rule6326, rule6327, rule6328, rule6329, rule6330, rule6331, rule6332, rule6333, rule6334, rule6335, rule6336, rule6337, rule6338, rule6339, rule6340, rule6341, rule6342, rule6343, rule6344, rule6345, rule6346, rule6347, rule6348, rule6349, rule6350, rule6351, rule6352, rule6353, rule6354, rule6355, rule6356, rule6357, rule6358, rule6359, rule6360, rule6361, rule6362, rule6363, rule6364, rule6365, rule6366, rule6367, rule6368, rule6369, rule6370, rule6371, rule6372, rule6373, rule6374, rule6375, rule6376, rule6377, rule6378, rule6379, rule6380, rule6381, rule6382, rule6383, rule6384, rule6385, rule6386, rule6387, rule6388, rule6389, rule6390, rule6391, rule6392, rule6393, rule6394, rule6395, rule6396, rule6397, rule6398, rule6399, rule6400, rule6401, rule6402, rule6403, rule6404, rule6405, rule6406, rule6407, rule6408, rule6409, rule6410, rule6411, rule6412, rule6413, rule6414, rule6415, rule6416, rule6417, rule6418, rule6419, rule6420, rule6421, rule6422, rule6423, rule6424, rule6425, rule6426, rule6427, rule6428, rule6429, rule6430, rule6431, rule6432, rule6433, rule6434, rule6435, rule6436, rule6437, rule6438, rule6439, rule6440, rule6441, rule6442, rule6443, rule6444, rule6445, rule6446, rule6447, rule6448, rule6449, rule6450, rule6451, rule6452, rule6453, rule6454, rule6455, rule6456, rule6457, rule6458, rule6459, rule6460, rule6461, rule6462, rule6463, rule6464, rule6465, rule6466, rule6467, rule6468, rule6469, rule6470, rule6471, rule6472, rule6473, rule6474, rule6475, rule6476, rule6477, rule6478, rule6479, rule6480, rule6481, rule6482, rule6483, rule6484, rule6485, rule6486, rule6487, rule6488, rule6489, rule6490, rule6491, rule6492, rule6493, rule6494, rule6495, rule6496, rule6497, rule6498, rule6499, rule6500, rule6501, rule6502, rule6503, rule6504, rule6505, rule6506, rule6507, rule6508, rule6509, rule6510, rule6511, rule6512, rule6513, rule6514, rule6515, rule6516, rule6517, rule6518, rule6519, rule6520, rule6521, rule6522, rule6523, rule6524, rule6525, rule6526, rule6527, rule6528, rule6529, rule6530, rule6531, rule6532, rule6533, rule6534, rule6535, rule6536, rule6537, rule6538, rule6539, rule6540, rule6541, rule6542, rule6543, rule6544, rule6545, rule6546, rule6547, rule6548, rule6549, rule6550, rule6551, rule6552, rule6553, rule6554, rule6555, rule6556, rule6557, rule6558, rule6559, rule6560, rule6561, rule6562, rule6563, rule6564, rule6565, rule6566, rule6567, rule6568, rule6569, rule6570, rule6571, rule6572, rule6573, rule6574, rule6575, rule6576, rule6577, rule6578, rule6579, rule6580, rule6581, rule6582, rule6583, rule6584, rule6585, rule6586, rule6587, rule6588, rule6589, rule6590, rule6591, rule6592, rule6593, rule6594, rule6595, rule6596, rule6597, rule6598, rule6599, rule6600, rule6601, rule6602, rule6603, rule6604, rule6605, rule6606, rule6607, rule6608, rule6609, rule6610, rule6611, rule6612, rule6613, rule6614, rule6615, rule6616, rule6617, rule6618, rule6619, rule6620, rule6621, rule6622, rule6623, rule6624, rule6625, rule6626, rule6627, rule6628, rule6629, rule6630, rule6631, rule6632, rule6633, rule6634, rule6635, rule6636, rule6637, rule6638, rule6639, rule6640, rule6641, rule6642, rule6643, rule6644, rule6645, rule6646, rule6647, rule6648, rule6649, rule6650, rule6651, rule6652, rule6653, rule6654, rule6655, rule6656, rule6657, rule6658, rule6659, rule6660, rule6661, rule6662, rule6663, rule6664, rule6665, rule6666, rule6667, rule6668, rule6669, rule6670, rule6671, rule6672, rule6673, rule6674, rule6675, rule6676, rule6677, rule6678, rule6679, rule6680, rule6681, rule6682, rule6683, rule6684, rule6685, rule6686, rule6687, rule6688, rule6689, rule6690, rule6691, rule6692, rule6693, rule6694, rule6695, rule6696, rule6697, rule6698, rule6699, rule6700, rule6701, rule6702, rule6703, rule6704, rule6705, rule6706, rule6707, rule6708, rule6709, rule6710, rule6711, rule6712, rule6713, rule6714, rule6715, rule6716, rule6717, rule6718, rule6719, rule6720, rule6721, rule6722, rule6723, rule6724, rule6725, rule6726, rule6727, rule6728, rule6729, rule6730, rule6731, rule6732, rule6733, rule6734, rule6735, rule6736, rule6737, rule6738, rule6739, rule6740, rule6741, ] def replacement6087(a, b, c, n, x): return -Dist(b*c*n, Int(x*(a + b*asinh(c*x))**(n + S(-1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*asinh(c*x))**n, x) def replacement6088(a, b, c, n, x): return -Dist(b*c*n, Int(x*(a + b*acosh(c*x))**(n + S(-1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) + Simp(x*(a + b*acosh(c*x))**n, x) def replacement6089(a, b, c, n, x): return -Dist(c/(b*(n + S(1))), Int(x*(a + b*asinh(c*x))**(n + S(1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*asinh(c*x))**(n + S(1))*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement6090(a, b, c, n, x): return -Dist(c/(b*(n + S(1))), Int(x*(a + b*acosh(c*x))**(n + S(1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) + Simp((a + b*acosh(c*x))**(n + S(1))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6091(a, b, c, n, x): return Dist(S(1)/(b*c), Subst(Int(x**n*cosh(a/b - x/b), x), x, a + b*asinh(c*x)), x) def replacement6092(a, b, c, n, x): return -Dist(S(1)/(b*c), Subst(Int(x**n*sinh(a/b - x/b), x), x, a + b*acosh(c*x)), x) def replacement6093(a, b, c, n, x): return Subst(Int((a + b*x)**n/tanh(x), x), x, asinh(c*x)) def replacement6094(a, b, c, n, x): return Subst(Int((a + b*x)**n*tanh(x), x), x, acosh(c*x)) def replacement6095(a, b, c, d, m, n, x): return -Dist(b*c*n/(d*(m + S(1))), Int((d*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x) + Simp((d*x)**(m + S(1))*(a + b*asinh(c*x))**n/(d*(m + S(1))), x) def replacement6096(a, b, c, d, m, n, x): return -Dist(b*c*n/(d*(m + S(1))), Int((d*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) + Simp((d*x)**(m + S(1))*(a + b*acosh(c*x))**n/(d*(m + S(1))), x) def replacement6097(a, b, c, m, n, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**(m + S(1))*(a + b*asinh(c*x))**n/(m + S(1)), x) def replacement6098(a, b, c, m, n, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) + Simp(x**(m + S(1))*(a + b*acosh(c*x))**n/(m + S(1)), x) def replacement6099(a, b, c, m, n, x): return -Dist(c**(-m + S(-1))/(b*(n + S(1))), Subst(Int(ExpandTrigReduce((a + b*x)**(n + S(1)), (m + (m + S(1))*sinh(x)**S(2))*sinh(x)**(m + S(-1)), x), x), x, asinh(c*x)), x) + Simp(x**m*(a + b*asinh(c*x))**(n + S(1))*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement6100(a, b, c, m, n, x): return Dist(c**(-m + S(-1))/(b*(n + S(1))), Subst(Int(ExpandTrigReduce((a + b*x)**(n + S(1))*(m - (m + S(1))*cosh(x)**S(2))*cosh(x)**(m + S(-1)), x), x), x, acosh(c*x)), x) + Simp(x**m*(a + b*acosh(c*x))**(n + S(1))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6101(a, b, c, m, n, x): return -Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*asinh(c*x))**(n + S(1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x) - Dist(c*(m + S(1))/(b*(n + S(1))), Int(x**(m + S(1))*(a + b*asinh(c*x))**(n + S(1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**m*(a + b*asinh(c*x))**(n + S(1))*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement6102(a, b, c, m, n, x): return Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*acosh(c*x))**(n + S(1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) - Dist(c*(m + S(1))/(b*(n + S(1))), Int(x**(m + S(1))*(a + b*acosh(c*x))**(n + S(1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) + Simp(x**m*(a + b*acosh(c*x))**(n + S(1))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6103(a, b, c, m, n, x): return Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*sinh(x)**m*cosh(x), x), x, asinh(c*x)), x) def replacement6104(a, b, c, m, n, x): return Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*sinh(x)*cosh(x)**m, x), x, acosh(c*x)), x) def replacement6105(a, b, c, d, m, n, x): return Int((d*x)**m*(a + b*asinh(c*x))**n, x) def replacement6106(a, b, c, d, m, n, x): return Int((d*x)**m*(a + b*acosh(c*x))**n, x) def replacement6107(a, b, c, d, e, x): return Simp(log(a + b*asinh(c*x))/(b*c*sqrt(d)), x) def replacement6108(a, b, c, d1, d2, e1, e2, x): return Simp(log(a + b*acosh(c*x))/(b*c*sqrt(-d1*d2)), x) def replacement6109(a, b, c, d, e, n, x): return Simp((a + b*asinh(c*x))**(n + S(1))/(b*c*sqrt(d)*(n + S(1))), x) def replacement6110(a, b, c, d1, d2, e1, e2, n, x): return Simp((a + b*acosh(c*x))**(n + S(1))/(b*c*sqrt(-d1*d2)*(n + S(1))), x) def replacement6111(a, b, c, d, e, n, x): return Dist(sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*asinh(c*x))**n/sqrt(c**S(2)*x**S(2) + S(1)), x), x) def replacement6112(a, b, c, d1, d2, e1, e2, n, x): return Dist(sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(sqrt(d1 + e1*x)*sqrt(d2 + e2*x)), Int((a + b*acosh(c*x))**n/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) def With6113(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(c*x), u, x) def With6114(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x), x) + Dist(a + b*acosh(c*x), u, x) def replacement6115(a, b, c, d, e, n, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*n*(-d)**p/(S(2)*p + S(1)), Int(x*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp(x*(a + b*acosh(c*x))**n*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) def replacement6116(a, b, c, d, e, n, x): return Dist(sqrt(d + e*x**S(2))/(S(2)*sqrt(c**S(2)*x**S(2) + S(1))), Int((a + b*asinh(c*x))**n/sqrt(c**S(2)*x**S(2) + S(1)), x), x) - Dist(b*c*n*sqrt(d + e*x**S(2))/(S(2)*sqrt(c**S(2)*x**S(2) + S(1))), Int(x*(a + b*asinh(c*x))**(n + S(-1)), x), x) + Simp(x*(a + b*asinh(c*x))**n*sqrt(d + e*x**S(2))/S(2), x) def replacement6117(a, b, c, d1, d2, e1, e2, n, x): return -Dist(sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(S(2)*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int((a + b*acosh(c*x))**n/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) - Dist(b*c*n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(S(2)*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int(x*(a + b*acosh(c*x))**(n + S(-1)), x), x) + Simp(x*(a + b*acosh(c*x))**n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/S(2), x) def replacement6118(a, b, c, d, e, n, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*p + S(1)), Int(x*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp(x*(a + b*asinh(c*x))**n*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) def replacement6119(a, b, c, d1, d2, e1, e2, n, p, x): return Dist(S(2)*d1*d2*p/(S(2)*p + S(1)), Int((a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(-1))*(d2 + e2*x)**(p + S(-1)), x), x) - Dist(b*c*n*(-d1*d2)**(p + S(-1)/2)*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/((S(2)*p + S(1))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int(x*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(-1)/2), x), x) + Simp(x*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p/(S(2)*p + S(1)), x) def replacement6120(a, b, c, d1, d2, e1, e2, n, p, x): return Dist(S(2)*d1*d2*p/(S(2)*p + S(1)), Int((a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(-1))*(d2 + e2*x)**(p + S(-1)), x), x) - Dist(b*c*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(S(2)*p + S(1)), Int(x*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp(x*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p/(S(2)*p + S(1)), x) def replacement6121(a, b, c, d, e, n, x): return -Dist(b*c*n*sqrt(c**S(2)*x**S(2) + S(1))/(d*sqrt(d + e*x**S(2))), Int(x*(a + b*asinh(c*x))**(n + S(-1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*asinh(c*x))**n/(d*sqrt(d + e*x**S(2))), x) def replacement6122(a, b, c, d1, d2, e1, e2, n, x): return Dist(b*c*n*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(d1*d2*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)), Int(x*(a + b*acosh(c*x))**(n + S(-1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*acosh(c*x))**n/(d1*d2*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)), x) def replacement6123(a, b, c, d, e, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b*c*n*(-d)**p/(S(2)*p + S(2)), Int(x*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) - Simp(x*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) def replacement6124(a, b, c, d, e, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*(p + S(1))), Int(x*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) - Simp(x*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) def replacement6125(a, b, c, d1, d2, e1, e2, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d1*d2*(p + S(1))), Int((a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1)), x), x) - Dist(b*c*n*(-d1*d2)**(p + S(1)/2)*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(S(2)*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)*(p + S(1))), Int(x*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(1)/2), x), x) - Simp(x*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(S(2)*d1*d2*(p + S(1))), x) def replacement6126(a, b, c, d1, d2, e1, e2, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d1*d2*(p + S(1))), Int((a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1)), x), x) - Dist(b*c*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(S(2)*(p + S(1))), Int(x*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) - Simp(x*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(S(2)*d1*d2*(p + S(1))), x) def replacement6127(a, b, c, d, e, n, x): return Dist(S(1)/(c*d), Subst(Int((a + b*x)**n/cosh(x), x), x, asinh(c*x)), x) def replacement6128(a, b, c, d, e, n, x): return -Dist(S(1)/(c*d), Subst(Int((a + b*x)**n/sinh(x), x), x, acosh(c*x)), x) def replacement6129(a, b, c, d, e, n, p, x): return -Dist(c*(-d)**p*(S(2)*p + S(1))/(b*(n + S(1))), Int(x*(a + b*acosh(c*x))**(n + S(1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((-d)**p*(a + b*acosh(c*x))**(n + S(1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2)/(b*c*(n + S(1))), x) def replacement6130(a, b, c, d, e, n, p, x): return -Dist(c*d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(S(2)*p + S(1))*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*(n + S(1))), Int(x*(a + b*asinh(c*x))**(n + S(1))*(c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((a + b*asinh(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement6131(a, b, c, d1, d2, e1, e2, n, p, x): return -Dist(c*(-d1*d2)**(p + S(-1)/2)*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)*(S(2)*p + S(1))/(b*(n + S(1))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int(x*(a + b*acosh(c*x))**(n + S(1))*(c**S(2)*x**S(2) + S(-1))**(p + S(-1)/2), x), x) + Simp((a + b*acosh(c*x))**(n + S(1))*(d1 + e1*x)**p*(d2 + e2*x)**p*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6132(a, b, c, d1, d2, e1, e2, n, p, x): return -Dist(c*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(S(2)*p + S(1))*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(b*(n + S(1))), Int(x*(a + b*acosh(c*x))**(n + S(1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((a + b*acosh(c*x))**(n + S(1))*(d1 + e1*x)**p*(d2 + e2*x)**p*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6133(a, b, c, d, e, n, p, x): return Dist(d**p/c, Subst(Int((a + b*x)**n*cosh(x)**(S(2)*p + S(1)), x), x, asinh(c*x)), x) def replacement6134(a, b, c, d, e, n, p, x): return Dist((-d)**p/c, Subst(Int((a + b*x)**n*sinh(x)**(S(2)*p + S(1)), x), x, acosh(c*x)), x) def replacement6135(a, b, c, d1, d2, e1, e2, n, p, x): return Dist((-d1*d2)**p/c, Subst(Int((a + b*x)**n*sinh(x)**(S(2)*p + S(1)), x), x, acosh(c*x)), x) def replacement6136(a, b, c, d, e, n, p, x): return Dist(d**(p + S(-1)/2)*sqrt(d + e*x**S(2))/sqrt(c**S(2)*x**S(2) + S(1)), Int((a + b*asinh(c*x))**n*(c**S(2)*x**S(2) + S(1))**p, x), x) def replacement6137(a, b, c, d1, d2, e1, e2, n, p, x): return Dist((-d1*d2)**(p + S(-1)/2)*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int((a + b*acosh(c*x))**n*(c*x + S(-1))**p*(c*x + S(1))**p, x), x) def With6138(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(c*x), u, x) def With6139(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x), x) + Dist(a + b*acosh(c*x), u, x) def replacement6140(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*asinh(c*x))**n, (d + e*x**S(2))**p, x), x) def replacement6141(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*acosh(c*x))**n, (d + e*x**S(2))**p, x), x) def replacement6142(a, b, c, d, e, n, p, x): return Int((a + b*asinh(c*x))**n*(d + e*x**S(2))**p, x) def replacement6143(a, b, c, d, e, n, p, x): return Int((a + b*acosh(c*x))**n*(d + e*x**S(2))**p, x) def replacement6144(a, b, c, d1, d2, e1, e2, n, p, x): return Int((a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, x) def replacement6145(a, b, c, d, e, f, g, n, p, x): return Dist((d + e*x)**FracPart(p)*(f + g*x)**FracPart(p)*(d*f + e*g*x**S(2))**(-FracPart(p)), Int((a + b*asinh(c*x))**n*(d*f + e*g*x**S(2))**p, x), x) def replacement6146(a, b, c, d, e, n, p, x): return Dist((-d)**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p)), Int((a + b*acosh(c*x))**n*(c*x + S(-1))**p*(c*x + S(1))**p, x), x) def replacement6147(a, b, c, d, e, n, x): return Dist(S(1)/e, Subst(Int((a + b*x)**n*tanh(x), x), x, asinh(c*x)), x) def replacement6148(a, b, c, d, e, n, x): return Dist(S(1)/e, Subst(Int((a + b*x)**n/tanh(x), x), x, acosh(c*x)), x) def replacement6149(a, b, c, d, e, n, p, x): return -Dist(b*n*(-d)**p/(S(2)*c*(p + S(1))), Int((a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp((a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6150(a, b, c, d, e, n, p, x): return -Dist(b*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6151(a, b, c, d1, d2, e1, e2, n, p, x): return -Dist(b*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(1)/2), x), x) + Simp((a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(S(2)*e1*e2*(p + S(1))), x) def replacement6152(a, b, c, d1, d2, e1, e2, n, p, x): return -Dist(b*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp((a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(S(2)*e1*e2*(p + S(1))), x) def replacement6153(a, b, c, d, e, n, x): return Dist(S(1)/d, Subst(Int((a + b*x)**n/(sinh(x)*cosh(x)), x), x, asinh(c*x)), x) def replacement6154(a, b, c, d, e, n, x): return -Dist(S(1)/d, Subst(Int((a + b*x)**n/(sinh(x)*cosh(x)), x), x, acosh(c*x)), x) def replacement6155(a, b, c, d, e, f, m, n, p, x): return Dist(b*c*n*(-d)**p/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*f*(m + S(1))), x) def replacement6156(a, b, c, d, e, f, m, n, p, x): return -Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*f*(m + S(1))), x) def replacement6157(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(b*c*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(d1*d2*f*(m + S(1))), x) def replacement6158(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(b*c*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(d1*d2*f*(m + S(1))), x) def replacement6159(a, b, c, d, e, p, x): return Dist(d, Int((a + b*asinh(c*x))*(d + e*x**S(2))**(p + S(-1))/x, x), x) - Dist(b*c*d**p/(S(2)*p), Int((c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((a + b*asinh(c*x))*(d + e*x**S(2))**p/(S(2)*p), x) def replacement6160(a, b, c, d, e, p, x): return Dist(d, Int((a + b*acosh(c*x))*(d + e*x**S(2))**(p + S(-1))/x, x), x) - Dist(b*c*(-d)**p/(S(2)*p), Int((c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((a + b*acosh(c*x))*(d + e*x**S(2))**p/(S(2)*p), x) def replacement6161(a, b, c, d, e, f, m, p, x): return -Dist(S(2)*e*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*asinh(c*x))*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*d**p/(f*(m + S(1))), Int((f*x)**(m + S(1))*(c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))*(d + e*x**S(2))**p/(f*(m + S(1))), x) def replacement6162(a, b, c, d, e, f, m, p, x): return -Dist(S(2)*e*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acosh(c*x))*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*(-d)**p/(f*(m + S(1))), Int((f*x)**(m + S(1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))*(d + e*x**S(2))**p/(f*(m + S(1))), x) def With6163(a, b, c, d, e, f, m, p, x): u = IntHide((f*x)**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(c*x), u, x) def With6164(a, b, c, d, e, f, m, p, x): u = IntHide((f*x)**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x), x) + Dist(a + b*acosh(c*x), u, x) def With6165(a, b, c, d, e, m, p, x): u = IntHide(x**m*(c**S(2)*x**S(2) + S(1))**p, x) return Dist(d**p*(a + b*asinh(c*x)), u, x) - Dist(b*c*d**p, Int(SimplifyIntegrand(u/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) def With6166(a, b, c, d1, d2, e1, e2, m, p, x): u = IntHide(x**m*(c*x + S(-1))**p*(c*x + S(1))**p, x) return Dist((-d1*d2)**p*(a + b*acosh(c*x)), u, x) - Dist(b*c*(-d1*d2)**p, Int(SimplifyIntegrand(u/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x), x) def With6167(a, b, c, d, e, m, p, x): u = IntHide(x**m*(c**S(2)*x**S(2) + S(1))**p, x) return -Dist(b*c*d**(p + S(-1)/2)*sqrt(d + e*x**S(2))/sqrt(c**S(2)*x**S(2) + S(1)), Int(SimplifyIntegrand(u/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(c*x), Int(x**m*(d + e*x**S(2))**p, x), x) def With6168(a, b, c, d1, d2, e1, e2, m, p, x): u = IntHide(x**m*(c*x + S(-1))**p*(c*x + S(1))**p, x) return -Dist(b*c*(-d1*d2)**(p + S(-1)/2)*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int(SimplifyIntegrand(u/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x), x) + Dist(a + b*acosh(c*x), Int(x**m*(d1 + e1*x)**p*(d2 + e2*x)**p, x), x) def replacement6169(a, b, c, d, e, f, m, n, p, x): return -Dist(S(2)*e*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*n*(-d)**p/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**p/(f*(m + S(1))), x) def replacement6170(a, b, c, d, e, f, m, n, x): return -Dist(c**S(2)*sqrt(d + e*x**S(2))/(f**S(2)*(m + S(1))*sqrt(c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(2))*(a + b*asinh(c*x))**n/sqrt(c**S(2)*x**S(2) + S(1)), x), x) - Dist(b*c*n*sqrt(d + e*x**S(2))/(f*(m + S(1))*sqrt(c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1)), x), x) + Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))**n*sqrt(d + e*x**S(2))/(f*(m + S(1))), x) def replacement6171(a, b, c, d1, d2, e1, e2, f, m, n, x): return -Dist(c**S(2)*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(f**S(2)*(m + S(1))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int((f*x)**(m + S(2))*(a + b*acosh(c*x))**n/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) - Dist(b*c*n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(f*(m + S(1))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1)), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(f*(m + S(1))), x) def replacement6172(a, b, c, d, e, f, m, n, p, x): return -Dist(S(2)*e*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**p/(f*(m + S(1))), x) def replacement6173(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return -Dist(S(2)*e1*e2*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(-1))*(d2 + e2*x)**(p + S(-1)), x), x) - Dist(b*c*n*(-d1*d2)**(p + S(-1)/2)*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(f*(m + S(1))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p/(f*(m + S(1))), x) def replacement6174(a, b, c, d, e, f, m, n, p, x): return Dist(S(2)*d*p/(m + S(2)*p + S(1)), Int((f*x)**m*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*n*(-d)**p/(f*(m + S(2)*p + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**p/(f*(m + S(2)*p + S(1))), x) def replacement6175(a, b, c, d, e, f, m, n, x): return Dist(sqrt(d + e*x**S(2))/((m + S(2))*sqrt(c**S(2)*x**S(2) + S(1))), Int((f*x)**m*(a + b*asinh(c*x))**n/sqrt(c**S(2)*x**S(2) + S(1)), x), x) - Dist(b*c*n*sqrt(d + e*x**S(2))/(f*(m + S(2))*sqrt(c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1)), x), x) + Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))**n*sqrt(d + e*x**S(2))/(f*(m + S(2))), x) def replacement6176(a, b, c, d1, d2, e1, e2, f, m, n, x): return -Dist(sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/((m + S(2))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int((f*x)**m*(a + b*acosh(c*x))**n/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) - Dist(b*c*n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(f*(m + S(2))*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1)), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(f*(m + S(2))), x) def replacement6177(a, b, c, d, e, f, m, n, p, x): return Dist(S(2)*d*p/(m + S(2)*p + S(1)), Int((f*x)**m*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(2)*p + S(1))), Int((f*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**p/(f*(m + S(2)*p + S(1))), x) def replacement6178(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(S(2)*d1*d2*p/(m + S(2)*p + S(1)), Int((f*x)**m*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(-1))*(d2 + e2*x)**(p + S(-1)), x), x) - Dist(b*c*n*(-d1*d2)**(p + S(-1)/2)*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(f*sqrt(c*x + S(-1))*sqrt(c*x + S(1))*(m + S(2)*p + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p/(f*(m + S(2)*p + S(1))), x) def replacement6179(a, b, c, d, e, f, m, n, p, x): return Dist(c**S(2)*(m + S(2)*p + S(3))/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**p, x), x) + Dist(b*c*n*(-d)**p/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*f*(m + S(1))), x) def replacement6180(a, b, c, d, e, f, m, n, p, x): return -Dist(c**S(2)*(m + S(2)*p + S(3))/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**p, x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*f*(m + S(1))), x) def replacement6181(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(c**S(2)*(m + S(2)*p + S(3))/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, x), x) + Dist(b*c*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(d1*d2*f*(m + S(1))), x) def replacement6182(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(c**S(2)*(m + S(2)*p + S(3))/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, x), x) + Dist(b*c*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(d1*d2*f*(m + S(1))), x) def replacement6183(a, b, c, d, e, f, m, n, p, x): return -Dist(f**S(2)*(m + S(-1))/(S(2)*e*(p + S(1))), Int((f*x)**(m + S(-2))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b*f*n*(-d)**p/(S(2)*c*(p + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6184(a, b, c, d, e, f, m, n, p, x): return -Dist(f**S(2)*(m + S(-1))/(S(2)*e*(p + S(1))), Int((f*x)**(m + S(-2))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b*d**IntPart(p)*f*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((f*x)**(m + S(-1))*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6185(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return -Dist(f**S(2)*(m + S(-1))/(S(2)*e1*e2*(p + S(1))), Int((f*x)**(m + S(-2))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1)), x), x) - Dist(b*f*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(S(2)*e1*e2*(p + S(1))), x) def replacement6186(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return -Dist(f**S(2)*(m + S(-1))/(S(2)*e1*e2*(p + S(1))), Int((f*x)**(m + S(-2))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1)), x), x) - Dist(b*f*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(S(2)*e1*e2*(p + S(1))), x) def replacement6187(a, b, c, d, e, f, m, n, p, x): return Dist((m + S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((f*x)**m*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b*c*n*(-d)**p/(S(2)*f*(p + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) - Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*f*(p + S(1))), x) def replacement6188(a, b, c, d, e, f, m, n, p, x): return Dist((m + S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((f*x)**m*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*f*(p + S(1))), Int((f*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) - Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*f*(p + S(1))), x) def replacement6189(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist((m + S(2)*p + S(3))/(S(2)*d1*d2*(p + S(1))), Int((f*x)**m*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1)), x), x) - Dist(b*c*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(S(2)*f*(p + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(1)/2), x), x) - Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(S(2)*d1*d2*f*(p + S(1))), x) def replacement6190(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist((m + S(2)*p + S(3))/(S(2)*d1*d2*(p + S(1))), Int((f*x)**m*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1)), x), x) - Dist(b*c*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(S(2)*f*(p + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) - Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(S(2)*d1*d2*f*(p + S(1))), x) def replacement6191(a, b, c, d, e, f, m, n, x): return -Dist(f**S(2)*(m + S(-1))/(c**S(2)*m), Int((f*x)**(m + S(-2))*(a + b*asinh(c*x))**n/sqrt(d + e*x**S(2)), x), x) - Dist(b*f*n*sqrt(c**S(2)*x**S(2) + S(1))/(c*m*sqrt(d + e*x**S(2))), Int((f*x)**(m + S(-1))*(a + b*asinh(c*x))**(n + S(-1)), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*asinh(c*x))**n*sqrt(d + e*x**S(2))/(e*m), x) def replacement6192(a, b, c, d1, d2, e1, e2, f, m, n, x): return Dist(f**S(2)*(m + S(-1))/(c**S(2)*m), Int((f*x)**(m + S(-2))*(a + b*acosh(c*x))**n/(sqrt(d1 + e1*x)*sqrt(d2 + e2*x)), x), x) + Dist(b*f*n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(c*d1*d2*m*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(-1)), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acosh(c*x))**n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)/(e1*e2*m), x) def replacement6193(a, b, c, d, e, m, n, x): return Dist(c**(-m + S(-1))/sqrt(d), Subst(Int((a + b*x)**n*sinh(x)**m, x), x, asinh(c*x)), x) def replacement6194(a, b, c, d1, d2, e1, e2, m, n, x): return Dist(c**(-m + S(-1))/sqrt(-d1*d2), Subst(Int((a + b*x)**n*cosh(x)**m, x), x, acosh(c*x)), x) def replacement6195(a, b, c, d, e, f, m, x): return Simp((f*x)**(m + S(1))*(a + b*asinh(c*x))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, -c**S(2)*x**S(2))/(sqrt(d)*f*(m + S(1))), x) - Simp(b*c*(f*x)**(m + S(2))*HypergeometricPFQ(List(S(1), m/S(2) + S(1), m/S(2) + S(1)), List(m/S(2) + S(3)/2, m/S(2) + S(2)), -c**S(2)*x**S(2))/(sqrt(d)*f**S(2)*(m + S(1))*(m + S(2))), x) def replacement6196(a, b, c, d1, d2, e1, e2, f, m, x): return Simp(b*c*(f*x)**(m + S(2))*HypergeometricPFQ(List(S(1), m/S(2) + S(1), m/S(2) + S(1)), List(m/S(2) + S(3)/2, m/S(2) + S(2)), c**S(2)*x**S(2))/(f**S(2)*sqrt(-d1*d2)*(m + S(1))*(m + S(2))), x) + Simp((f*x)**(m + S(1))*(a + b*acosh(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, c**S(2)*x**S(2))/(f*sqrt(d1 + e1*x)*sqrt(d2 + e2*x)*(m + S(1))), x) def replacement6197(a, b, c, d, e, f, m, n, x): return Dist(sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((f*x)**m*(a + b*asinh(c*x))**n/sqrt(c**S(2)*x**S(2) + S(1)), x), x) def replacement6198(a, b, c, d1, d2, e1, e2, f, m, n, x): return Dist(sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(sqrt(d1 + e1*x)*sqrt(d2 + e2*x)), Int((f*x)**m*(a + b*acosh(c*x))**n/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) def replacement6199(a, b, c, d, e, f, m, n, p, x): return Dist(f**S(2)*(m + S(-1))/(c**S(2)*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-2))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**p, x), x) - Dist(b*f*n*(-d)**p/(c*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acosh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(e*(m + S(2)*p + S(1))), x) def replacement6200(a, b, c, d, e, f, m, n, p, x): return -Dist(f**S(2)*(m + S(-1))/(c**S(2)*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-2))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**p, x), x) - Dist(b*d**IntPart(p)*f*n*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(c*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-1))*(a + b*asinh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*asinh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(e*(m + S(2)*p + S(1))), x) def replacement6201(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(f**S(2)*(m + S(-1))/(c**S(2)*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-2))*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, x), x) - Dist(b*f*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(c*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(-1))*(c**S(2)*x**S(2) + S(-1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(e1*e2*(m + S(2)*p + S(1))), x) def replacement6202(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(f**S(2)*(m + S(-1))/(c**S(2)*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-2))*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, x), x) - Dist(b*f*n*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(c*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(-1))*(c*x + S(-1))**(p + S(1)/2)*(c*x + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acosh(c*x))**n*(d1 + e1*x)**(p + S(1))*(d2 + e2*x)**(p + S(1))/(e1*e2*(m + S(2)*p + S(1))), x) def replacement6203(a, b, c, d, e, f, m, n, p, x): return Dist(f*m*(-d)**p/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*acosh(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6204(a, b, c, d, e, f, m, n, p, x): return -Dist(d**IntPart(p)*f*m*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*asinh(c*x))**(n + S(1))*(c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*asinh(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement6205(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(f*m*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(1))*(c**S(2)*x**S(2) + S(-1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*acosh(c*x))**(n + S(1))*(d1 + e1*x)**p*(d2 + e2*x)**p*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6206(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(f*m*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*acosh(c*x))**(n + S(1))*(d1 + e1*x)**p*(d2 + e2*x)**p*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6207(a, b, c, d, e, f, m, n, x): return -Dist(f*m/(b*c*sqrt(d)*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*asinh(c*x))**(n + S(1)), x), x) + Simp((f*x)**m*(a + b*asinh(c*x))**(n + S(1))/(b*c*sqrt(d)*(n + S(1))), x) def replacement6208(a, b, c, d1, d2, e1, e2, f, m, n, x): return -Dist(f*m/(b*c*sqrt(-d1*d2)*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(1)), x), x) + Simp((f*x)**m*(a + b*acosh(c*x))**(n + S(1))/(b*c*sqrt(-d1*d2)*(n + S(1))), x) def replacement6209(a, b, c, d, e, f, m, n, x): return Dist(sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((f*x)**m*(a + b*asinh(c*x))**n/sqrt(c**S(2)*x**S(2) + S(1)), x), x) def replacement6210(a, b, c, d1, d2, e1, e2, f, m, n, x): return Dist(sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(sqrt(d1 + e1*x)*sqrt(d2 + e2*x)), Int((f*x)**m*(a + b*acosh(c*x))**n/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) def replacement6211(a, b, c, d, e, f, m, n, p, x): return Dist(f*m*(-d)**p/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) - Dist(c*(-d)**p*(m + S(2)*p + S(1))/(b*f*(n + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(1))*(c*x + S(-1))**(p + S(-1)/2)*(c*x + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*acosh(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6212(a, b, c, d, e, f, m, n, p, x): return -Dist(d**IntPart(p)*f*m*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*asinh(c*x))**(n + S(1))*(c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) - Dist(c*d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p))*(m + S(2)*p + S(1))/(b*f*(n + S(1))), Int((f*x)**(m + S(1))*(a + b*asinh(c*x))**(n + S(1))*(c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*asinh(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement6213(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Dist(f*m*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acosh(c*x))**(n + S(1))*(c**S(2)*x**S(2) + S(-1))**(p + S(-1)/2), x), x) - Dist(c*(-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p))*(m + S(2)*p + S(1))/(b*f*(n + S(1))), Int((f*x)**(m + S(1))*(a + b*acosh(c*x))**(n + S(1))*(c**S(2)*x**S(2) + S(-1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*acosh(c*x))**(n + S(1))*(d1 + e1*x)**p*(d2 + e2*x)**p*sqrt(c*x + S(-1))*sqrt(c*x + S(1))/(b*c*(n + S(1))), x) def replacement6214(a, b, c, d, e, m, n, p, x): return Dist(c**(-m + S(-1))*d**p, Subst(Int((a + b*x)**n*sinh(x)**m*cosh(x)**(S(2)*p + S(1)), x), x, asinh(c*x)), x) def replacement6215(a, b, c, d, e, m, n, p, x): return Dist(c**(-m + S(-1))*(-d)**p, Subst(Int((a + b*x)**n*sinh(x)**(S(2)*p + S(1))*cosh(x)**m, x), x, acosh(c*x)), x) def replacement6216(a, b, c, d1, d2, e1, e2, m, n, p, x): return Dist(c**(-m + S(-1))*(-d1*d2)**p, Subst(Int((a + b*x)**n*sinh(x)**(S(2)*p + S(1))*cosh(x)**m, x), x, acosh(c*x)), x) def replacement6217(a, b, c, d, e, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int(x**m*(a + b*asinh(c*x))**n*(c**S(2)*x**S(2) + S(1))**p, x), x) def replacement6218(a, b, c, d1, d2, e1, e2, m, n, p, x): return Dist((-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p)), Int(x**m*(a + b*acosh(c*x))**n*(c*x + S(-1))**p*(c*x + S(1))**p, x), x) def replacement6219(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*asinh(c*x))**n/sqrt(d + e*x**S(2)), (f*x)**m*(d + e*x**S(2))**(p + S(1)/2), x), x) def replacement6220(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Int(ExpandIntegrand((a + b*acosh(c*x))**n/(sqrt(d1 + e1*x)*sqrt(d2 + e2*x)), (f*x)**m*(d1 + e1*x)**(p + S(1)/2)*(d2 + e2*x)**(p + S(1)/2), x), x) def replacement6221(a, b, c, d, e, f, m, x): return -Dist(b*c/(f*(m + S(1))*(m + S(3))), Int((f*x)**(m + S(1))*(d*(m + S(3)) + e*x**S(2)*(m + S(1)))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) + Simp(d*(f*x)**(m + S(1))*(a + b*acosh(c*x))/(f*(m + S(1))), x) + Simp(e*(f*x)**(m + S(3))*(a + b*acosh(c*x))/(f**S(3)*(m + S(3))), x) def replacement6222(a, b, c, d, e, p, x): return -Dist(b*c/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*asinh(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6223(a, b, c, d, e, p, x): return -Dist(b*c/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) + Simp((a + b*acosh(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def With6224(a, b, c, d, e, f, m, p, x): u = IntHide((f*x)**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(c*x), u, x) def With6225(a, b, c, d, e, f, m, p, x): u = IntHide((f*x)**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x), x) + Dist(a + b*acosh(c*x), u, x) def replacement6226(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*asinh(c*x))**n, (f*x)**m*(d + e*x**S(2))**p, x), x) def replacement6227(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*acosh(c*x))**n, (f*x)**m*(d + e*x**S(2))**p, x), x) def replacement6228(a, b, c, d, e, f, m, n, p, x): return Int((f*x)**m*(a + b*asinh(c*x))**n*(d + e*x**S(2))**p, x) def replacement6229(a, b, c, d, e, f, m, n, p, x): return Int((f*x)**m*(a + b*acosh(c*x))**n*(d + e*x**S(2))**p, x) def replacement6230(a, b, c, d1, d2, e1, e2, f, m, n, p, x): return Int((f*x)**m*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, x) def replacement6231(a, b, c, d, e, f, g, h, m, n, p, x): return Dist((d + e*x)**FracPart(p)*(f + g*x)**FracPart(p)*(d*f + e*g*x**S(2))**(-FracPart(p)), Int((h*x)**m*(a + b*asinh(c*x))**n*(d*f + e*g*x**S(2))**p, x), x) def replacement6232(a, b, c, d, e, f, m, n, p, x): return Dist((-d)**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p)), Int((f*x)**m*(a + b*acosh(c*x))**n*(c*x + S(-1))**p*(c*x + S(1))**p, x), x) def replacement6233(a, b, c, d, e, n, x): return Subst(Int((a + b*x)**n*cosh(x)/(c*d + e*sinh(x)), x), x, asinh(c*x)) def replacement6234(a, b, c, d, e, n, x): return Subst(Int((a + b*x)**n*sinh(x)/(c*d + e*cosh(x)), x), x, acosh(c*x)) def replacement6235(a, b, c, d, e, m, n, x): return -Dist(b*c*n/(e*(m + S(1))), Int((a + b*asinh(c*x))**(n + S(-1))*(d + e*x)**(m + S(1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*asinh(c*x))**n*(d + e*x)**(m + S(1))/(e*(m + S(1))), x) def replacement6236(a, b, c, d, e, m, n, x): return -Dist(b*c*n/(e*(m + S(1))), Int((a + b*acosh(c*x))**(n + S(-1))*(d + e*x)**(m + S(1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x) + Simp((a + b*acosh(c*x))**n*(d + e*x)**(m + S(1))/(e*(m + S(1))), x) def replacement6237(a, b, c, d, e, m, n, x): return Int(ExpandIntegrand((a + b*asinh(c*x))**n*(d + e*x)**m, x), x) def replacement6238(a, b, c, d, e, m, n, x): return Int(ExpandIntegrand((a + b*acosh(c*x))**n*(d + e*x)**m, x), x) def replacement6239(a, b, c, d, e, m, n, x): return Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*(c*d + e*sinh(x))**m*cosh(x), x), x, asinh(c*x)), x) def replacement6240(a, b, c, d, e, m, n, x): return Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*(c*d + e*cosh(x))**m*sinh(x), x), x, acosh(c*x)), x) def With6241(Px, a, b, c, x): u = IntHide(Px, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(c*x), u, x) def With6242(Px, a, b, c, x): u = IntHide(Px, x) return -Dist(b*c*sqrt(-c**S(2)*x**S(2) + S(1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acosh(c*x), u, x) def replacement6243(Px, a, b, c, n, x): return Int(ExpandIntegrand(Px*(a + b*asinh(c*x))**n, x), x) def replacement6244(Px, a, b, c, n, x): return Int(ExpandIntegrand(Px*(a + b*acosh(c*x))**n, x), x) def With6245(Px, a, b, c, d, e, m, x): u = IntHide(Px*(d + e*x)**m, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(c*x), u, x) def With6246(Px, a, b, c, d, e, m, x): u = IntHide(Px*(d + e*x)**m, x) return -Dist(b*c*sqrt(-c**S(2)*x**S(2) + S(1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acosh(c*x), u, x) def With6247(a, b, c, d, e, f, g, m, n, p, x): u = IntHide((d + e*x)**m*(f + g*x)**p, x) return -Dist(b*c*n, Int(SimplifyIntegrand(u*(a + b*asinh(c*x))**(n + S(-1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist((a + b*asinh(c*x))**n, u, x) def With6248(a, b, c, d, e, f, g, m, n, p, x): u = IntHide((d + e*x)**m*(f + g*x)**p, x) return -Dist(b*c*n, Int(SimplifyIntegrand(u*(a + b*acosh(c*x))**(n + S(-1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x), x) + Dist((a + b*acosh(c*x))**n, u, x) def With6249(a, b, c, d, e, f, g, h, n, p, x): u = IntHide((f + g*x + h*x**S(2))**p/(d + e*x)**S(2), x) return -Dist(b*c*n, Int(SimplifyIntegrand(u*(a + b*asinh(c*x))**(n + S(-1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist((a + b*asinh(c*x))**n, u, x) def With6250(a, b, c, d, e, f, g, h, n, p, x): u = IntHide((f + g*x + h*x**S(2))**p/(d + e*x)**S(2), x) return -Dist(b*c*n, Int(SimplifyIntegrand(u*(a + b*acosh(c*x))**(n + S(-1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x), x) + Dist((a + b*acosh(c*x))**n, u, x) def replacement6251(Px, a, b, c, d, e, m, n, x): return Int(ExpandIntegrand(Px*(a + b*asinh(c*x))**n*(d + e*x)**m, x), x) def replacement6252(Px, a, b, c, d, e, m, n, x): return Int(ExpandIntegrand(Px*(a + b*acosh(c*x))**n*(d + e*x)**m, x), x) def With6253(a, b, c, d, e, f, g, m, p, x): u = IntHide((d + e*x**S(2))**p*(f + g*x)**m, x) return -Dist(b*c, Int(Dist(S(1)/sqrt(c**S(2)*x**S(2) + S(1)), u, x), x), x) + Dist(a + b*asinh(c*x), u, x) def With6254(a, b, c, d1, d2, e1, e2, f, g, m, p, x): u = IntHide((d1 + e1*x)**p*(d2 + e2*x)**p*(f + g*x)**m, x) return -Dist(b*c, Int(Dist(S(1)/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), u, x), x), x) + Dist(a + b*acosh(c*x), u, x) def replacement6255(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*asinh(c*x))**n*(d + e*x**S(2))**p, (f + g*x)**m, x), x) def replacement6256(a, b, c, d1, d2, e1, e2, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, (f + g*x)**m, x), x) def replacement6257(a, b, c, d, e, f, g, m, n, x): return -Dist(S(1)/(b*c*sqrt(d)*(n + S(1))), Int((a + b*asinh(c*x))**(n + S(1))*(f + g*x)**(m + S(-1))*(d*g*m + S(2)*e*f*x + e*g*x**S(2)*(m + S(2))), x), x) + Simp((a + b*asinh(c*x))**(n + S(1))*(d + e*x**S(2))*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement6258(a, b, c, d1, d2, e1, e2, f, g, m, n, x): return -Dist(S(1)/(b*c*sqrt(-d1*d2)*(n + S(1))), Int((a + b*acosh(c*x))**(n + S(1))*(f + g*x)**(m + S(-1))*(d1*d2*g*m + S(2)*e1*e2*f*x + e1*e2*g*x**S(2)*(m + S(2))), x), x) + Simp((a + b*acosh(c*x))**(n + S(1))*(f + g*x)**m*(d1*d2 + e1*e2*x**S(2))/(b*c*sqrt(-d1*d2)*(n + S(1))), x) def replacement6259(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*asinh(c*x))**n*sqrt(d + e*x**S(2)), (d + e*x**S(2))**(p + S(-1)/2)*(f + g*x)**m, x), x) def replacement6260(a, b, c, d1, d2, e1, e2, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*acosh(c*x))**n*sqrt(d1 + e1*x)*sqrt(d2 + e2*x), (d1 + e1*x)**(p + S(-1)/2)*(d2 + e2*x)**(p + S(-1)/2)*(f + g*x)**m, x), x) def replacement6261(a, b, c, d, e, f, g, m, n, p, x): return -Dist(S(1)/(b*c*sqrt(d)*(n + S(1))), Int(ExpandIntegrand((a + b*asinh(c*x))**(n + S(1))*(f + g*x)**(m + S(-1)), (d + e*x**S(2))**(p + S(-1)/2)*(d*g*m + e*f*x*(S(2)*p + S(1)) + e*g*x**S(2)*(m + S(2)*p + S(1))), x), x), x) + Simp((a + b*asinh(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1)/2)*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement6262(a, b, c, d1, d2, e1, e2, f, g, m, n, p, x): return -Dist(S(1)/(b*c*sqrt(-d1*d2)*(n + S(1))), Int(ExpandIntegrand((a + b*acosh(c*x))**(n + S(1))*(f + g*x)**(m + S(-1)), (d1 + e1*x)**(p + S(-1)/2)*(d2 + e2*x)**(p + S(-1)/2)*(d1*d2*g*m + e1*e2*f*x*(S(2)*p + S(1)) + e1*e2*g*x**S(2)*(m + S(2)*p + S(1))), x), x), x) + Simp((a + b*acosh(c*x))**(n + S(1))*(d1 + e1*x)**(p + S(1)/2)*(d2 + e2*x)**(p + S(1)/2)*(f + g*x)**m/(b*c*sqrt(-d1*d2)*(n + S(1))), x) def replacement6263(a, b, c, d, e, f, g, m, n, x): return -Dist(g*m/(b*c*sqrt(d)*(n + S(1))), Int((a + b*asinh(c*x))**(n + S(1))*(f + g*x)**(m + S(-1)), x), x) + Simp((a + b*asinh(c*x))**(n + S(1))*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement6264(a, b, c, d1, d2, e1, e2, f, g, m, n, x): return -Dist(g*m/(b*c*sqrt(-d1*d2)*(n + S(1))), Int((a + b*acosh(c*x))**(n + S(1))*(f + g*x)**(m + S(-1)), x), x) + Simp((a + b*acosh(c*x))**(n + S(1))*(f + g*x)**m/(b*c*sqrt(-d1*d2)*(n + S(1))), x) def replacement6265(a, b, c, d, e, f, g, m, n, x): return Dist(c**(-m + S(-1))/sqrt(d), Subst(Int((a + b*x)**n*(c*f + g*sinh(x))**m, x), x, asinh(c*x)), x) def replacement6266(a, b, c, d1, d2, e1, e2, f, g, m, n, x): return Dist(c**(-m + S(-1))/sqrt(-d1*d2), Subst(Int((a + b*x)**n*(c*f + g*cosh(x))**m, x), x, acosh(c*x)), x) def replacement6267(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*asinh(c*x))**n/sqrt(d + e*x**S(2)), (d + e*x**S(2))**(p + S(1)/2)*(f + g*x)**m, x), x) def replacement6268(a, b, c, d1, d2, e1, e2, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*acosh(c*x))**n/(sqrt(d1 + e1*x)*sqrt(d2 + e2*x)), (d1 + e1*x)**(p + S(1)/2)*(d2 + e2*x)**(p + S(1)/2)*(f + g*x)**m, x), x) def replacement6269(a, b, c, d, e, f, g, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((a + b*asinh(c*x))**n*(f + g*x)**m*(c**S(2)*x**S(2) + S(1))**p, x), x) def replacement6270(a, b, c, d, e, f, g, m, n, p, x): return Dist((-d)**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p)), Int((a + b*acosh(c*x))**n*(f + g*x)**m*(c*x + S(-1))**p*(c*x + S(1))**p, x), x) def replacement6271(a, b, c, d1, d2, e1, e2, f, g, m, n, p, x): return Dist((-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((a + b*acosh(c*x))**n*(f + g*x)**m*(c*x + S(-1))**p*(c*x + S(1))**p, x), x) def replacement6272(a, b, c, d, e, f, g, h, m, n, x): return -Dist(g*m/(b*c*sqrt(d)*(n + S(1))), Int((a + b*asinh(c*x))**(n + S(1))/(f + g*x), x), x) + Simp((a + b*asinh(c*x))**(n + S(1))*log(h*(f + g*x)**m)/(b*c*sqrt(d)*(n + S(1))), x) def replacement6273(a, b, c, d1, d2, e1, e2, f, g, h, m, n, x): return -Dist(g*m/(b*c*sqrt(-d1*d2)*(n + S(1))), Int((a + b*acosh(c*x))**(n + S(1))/(f + g*x), x), x) + Simp((a + b*acosh(c*x))**(n + S(1))*log(h*(f + g*x)**m)/(b*c*sqrt(-d1*d2)*(n + S(1))), x) def replacement6274(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((a + b*asinh(c*x))**n*(c**S(2)*x**S(2) + S(1))**p*log(h*(f + g*x)**m), x), x) def replacement6275(a, b, c, d, e, f, g, h, m, n, p, x): return Dist((-d)**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p)), Int((a + b*acosh(c*x))**n*(c*x + S(-1))**p*(c*x + S(1))**p*log(h*(f + g*x)**m), x), x) def replacement6276(a, b, c, d1, d2, e1, e2, f, g, h, m, n, p, x): return Dist((-d1*d2)**IntPart(p)*(d1 + e1*x)**FracPart(p)*(d2 + e2*x)**FracPart(p)*(c*x + S(-1))**(-FracPart(p))*(c*x + S(1))**(-FracPart(p)), Int((a + b*acosh(c*x))**n*(c*x + S(-1))**p*(c*x + S(1))**p*log(h*(f + g*x)**m), x), x) def With6277(a, b, c, d, e, f, g, m, x): u = IntHide((d + e*x)**m*(f + g*x)**m, x) return -Dist(b*c, Int(Dist(S(1)/sqrt(c**S(2)*x**S(2) + S(1)), u, x), x), x) + Dist(a + b*asinh(c*x), u, x) def With6278(a, b, c, d, e, f, g, m, x): u = IntHide((d + e*x)**m*(f + g*x)**m, x) return -Dist(b*c, Int(Dist(S(1)/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), u, x), x), x) + Dist(a + b*acosh(c*x), u, x) def replacement6279(a, b, c, d, e, f, g, m, n, x): return Int(ExpandIntegrand((a + b*asinh(c*x))**n, (d + e*x)**m*(f + g*x)**m, x), x) def replacement6280(a, b, c, d, e, f, g, m, n, x): return Int(ExpandIntegrand((a + b*acosh(c*x))**n, (d + e*x)**m*(f + g*x)**m, x), x) def With6281(a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False v = IntHide(u, x) if InverseFunctionFreeQ(v, x): return True return False def replacement6281(a, b, c, u, x): v = IntHide(u, x) return -Dist(b*c, Int(SimplifyIntegrand(v/sqrt(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(c*x), v, x) def With6282(a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False v = IntHide(u, x) if InverseFunctionFreeQ(v, x): return True return False def replacement6282(a, b, c, u, x): v = IntHide(u, x) return -Dist(b*c*sqrt(-c**S(2)*x**S(2) + S(1))/(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), Int(SimplifyIntegrand(v/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acosh(c*x), v, x) def With6283(Px, a, b, c, d, e, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(Px*(a + b*asinh(c*x))**n*(d + e*x**S(2))**p, x) if SumQ(u): return True return False def replacement6283(Px, a, b, c, d, e, n, p, x): u = ExpandIntegrand(Px*(a + b*asinh(c*x))**n*(d + e*x**S(2))**p, x) return Int(u, x) def With6284(Px, a, b, c, d1, d2, e1, e2, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(Px*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, x) if SumQ(u): return True return False def replacement6284(Px, a, b, c, d1, d2, e1, e2, n, p, x): u = ExpandIntegrand(Px*(a + b*acosh(c*x))**n*(d1 + e1*x)**p*(d2 + e2*x)**p, x) return Int(u, x) def With6285(Px, a, b, c, d, e, f, g, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(Px*(a + b*asinh(c*x))**n*(f + g*(d + e*x**S(2))**p)**m, x) if SumQ(u): return True return False def replacement6285(Px, a, b, c, d, e, f, g, m, n, p, x): u = ExpandIntegrand(Px*(a + b*asinh(c*x))**n*(f + g*(d + e*x**S(2))**p)**m, x) return Int(u, x) def With6286(Px, a, b, c, d1, d2, e1, e2, f, g, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(Px*(a + b*acosh(c*x))**n*(f + g*(d1 + e1*x)**p*(d2 + e2*x)**p)**m, x) if SumQ(u): return True return False def replacement6286(Px, a, b, c, d1, d2, e1, e2, f, g, m, n, p, x): u = ExpandIntegrand(Px*(a + b*acosh(c*x))**n*(f + g*(d1 + e1*x)**p*(d2 + e2*x)**p)**m, x) return Int(u, x) def With6287(RFx, c, n, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(asinh(c*x)**n, RFx, x) if SumQ(u): return True return False def replacement6287(RFx, c, n, x): u = ExpandIntegrand(asinh(c*x)**n, RFx, x) return Int(u, x) def With6288(RFx, c, n, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(acosh(c*x)**n, RFx, x) if SumQ(u): return True return False def replacement6288(RFx, c, n, x): u = ExpandIntegrand(acosh(c*x)**n, RFx, x) return Int(u, x) def replacement6289(RFx, a, b, c, n, x): return Int(ExpandIntegrand(RFx*(a + b*asinh(c*x))**n, x), x) def replacement6290(RFx, a, b, c, n, x): return Int(ExpandIntegrand(RFx*(a + b*acosh(c*x))**n, x), x) def With6291(RFx, c, d, e, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand((d + e*x**S(2))**p*asinh(c*x)**n, RFx, x) if SumQ(u): return True return False def replacement6291(RFx, c, d, e, n, p, x): u = ExpandIntegrand((d + e*x**S(2))**p*asinh(c*x)**n, RFx, x) return Int(u, x) def With6292(RFx, c, d1, d2, e1, e2, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand((d1 + e1*x)**p*(d2 + e2*x)**p*acosh(c*x)**n, RFx, x) if SumQ(u): return True return False def replacement6292(RFx, c, d1, d2, e1, e2, n, p, x): u = ExpandIntegrand((d1 + e1*x)**p*(d2 + e2*x)**p*acosh(c*x)**n, RFx, x) return Int(u, x) def replacement6293(RFx, a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((d + e*x**S(2))**p, RFx*(a + b*asinh(c*x))**n, x), x) def replacement6294(RFx, a, b, c, d1, d2, e1, e2, n, p, x): return Int(ExpandIntegrand((d1 + e1*x)**p*(d2 + e2*x)**p, RFx*(a + b*acosh(c*x))**n, x), x) def replacement6295(a, b, c, n, u, x): return Int(u*(a + b*asinh(c*x))**n, x) def replacement6296(a, b, c, n, u, x): return Int(u*(a + b*acosh(c*x))**n, x) def replacement6297(a, b, c, d, n, x): return Dist(S(1)/d, Subst(Int((a + b*asinh(x))**n, x), x, c + d*x), x) def replacement6298(a, b, c, d, n, x): return Dist(S(1)/d, Subst(Int((a + b*acosh(x))**n, x), x, c + d*x), x) def replacement6299(a, b, c, d, e, f, m, n, x): return Dist(S(1)/d, Subst(Int((a + b*asinh(x))**n*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement6300(a, b, c, d, e, f, m, n, x): return Dist(S(1)/d, Subst(Int((a + b*acosh(x))**n*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement6301(A, B, C, a, b, c, d, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*asinh(x))**n*(C*x**S(2)/d**S(2) + C/d**S(2))**p, x), x, c + d*x), x) def replacement6302(A, B, C, a, b, c, d, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*acosh(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p, x), x, c + d*x), x) def replacement6303(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*asinh(x))**n*(C*x**S(2)/d**S(2) + C/d**S(2))**p*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement6304(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*acosh(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement6305(a, b, c, d, x): return Simp(x*sqrt(a + b*asinh(c + d*x**S(2))), x) - Simp(sqrt(Pi)*x*(-c*sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*FresnelC(sqrt(-c/(Pi*b))*sqrt(a + b*asinh(c + d*x**S(2))))/(sqrt(-c/b)*(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2)))), x) + Simp(sqrt(Pi)*x*(c*sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*FresnelS(sqrt(-c/(Pi*b))*sqrt(a + b*asinh(c + d*x**S(2))))/(sqrt(-c/b)*(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2)))), x) def replacement6306(a, b, c, d, n, x): return Dist(S(4)*b**S(2)*n*(n + S(-1)), Int((a + b*asinh(c + d*x**S(2)))**(n + S(-2)), x), x) + Simp(x*(a + b*asinh(c + d*x**S(2)))**n, x) - Simp(S(2)*b*n*(a + b*asinh(c + d*x**S(2)))**(n + S(-1))*sqrt(S(2)*c*d*x**S(2) + d**S(2)*x**S(4))/(d*x), x) def replacement6307(a, b, c, d, x): return Simp(x*(-c*sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*SinhIntegral((a + b*asinh(c + d*x**S(2)))/(S(2)*b))/(S(2)*b*(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2)))), x) + Simp(x*(c*cosh(a/(S(2)*b)) - sinh(a/(S(2)*b)))*CoshIntegral((a + b*asinh(c + d*x**S(2)))/(S(2)*b))/(S(2)*b*(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2)))), x) def replacement6308(a, b, c, d, x): return Simp(sqrt(S(2))*sqrt(Pi)*x*(c + S(-1))*(sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erf(sqrt(S(2))*sqrt(a + b*asinh(c + d*x**S(2)))/(S(2)*sqrt(b)))/(S(4)*sqrt(b)*(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2)))), x) + Simp(sqrt(S(2))*sqrt(Pi)*x*(c + S(1))*(-sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erfi(sqrt(S(2))*sqrt(a + b*asinh(c + d*x**S(2)))/(S(2)*sqrt(b)))/(S(4)*sqrt(b)*(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2)))), x) def replacement6309(a, b, c, d, x): return -Simp(sqrt(S(2)*c*d*x**S(2) + d**S(2)*x**S(4))/(b*d*x*sqrt(a + b*asinh(c + d*x**S(2)))), x) - Simp(sqrt(Pi)*x*(-c/b)**(S(3)/2)*(-c*sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*FresnelC(sqrt(-c/(Pi*b))*sqrt(a + b*asinh(c + d*x**S(2))))/(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2))), x) + Simp(sqrt(Pi)*x*(-c/b)**(S(3)/2)*(c*sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*FresnelS(sqrt(-c/(Pi*b))*sqrt(a + b*asinh(c + d*x**S(2))))/(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2))), x) def replacement6310(a, b, c, d, x): return Simp(x*(-c*sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*CoshIntegral((a + b*asinh(c + d*x**S(2)))/(S(2)*b))/(S(4)*b**S(2)*(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2)))), x) + Simp(x*(c*cosh(a/(S(2)*b)) - sinh(a/(S(2)*b)))*SinhIntegral((a + b*asinh(c + d*x**S(2)))/(S(2)*b))/(S(4)*b**S(2)*(c*sinh(asinh(c + d*x**S(2))/S(2)) + cosh(asinh(c + d*x**S(2))/S(2)))), x) - Simp(sqrt(S(2)*c*d*x**S(2) + d**S(2)*x**S(4))/(S(2)*b*d*x*(a + b*asinh(c + d*x**S(2)))), x) def replacement6311(a, b, c, d, n, x): return Dist(S(1)/(S(4)*b**S(2)*(n + S(1))*(n + S(2))), Int((a + b*asinh(c + d*x**S(2)))**(n + S(2)), x), x) - Simp(x*(a + b*asinh(c + d*x**S(2)))**(n + S(2))/(S(4)*b**S(2)*(n + S(1))*(n + S(2))), x) + Simp((a + b*asinh(c + d*x**S(2)))**(n + S(1))*sqrt(S(2)*c*d*x**S(2) + d**S(2)*x**S(4))/(S(2)*b*d*x*(n + S(1))), x) def replacement6312(a, b, d, x): return Simp(S(2)*sqrt(a + b*acosh(d*x**S(2) + S(1)))*sinh(acosh(d*x**S(2) + S(1))/S(2))**S(2)/(d*x), x) - Simp(sqrt(S(2))*sqrt(Pi)*sqrt(b)*(-sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erfi(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(1)))/(S(2)*sqrt(b)))*sinh(acosh(d*x**S(2) + S(1))/S(2))/(S(2)*d*x), x) + Simp(sqrt(S(2))*sqrt(Pi)*sqrt(b)*(sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erf(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(1)))/(S(2)*sqrt(b)))*sinh(acosh(d*x**S(2) + S(1))/S(2))/(S(2)*d*x), x) def replacement6313(a, b, d, x): return Simp(S(2)*sqrt(a + b*acosh(d*x**S(2) + S(-1)))*cosh(acosh(d*x**S(2) + S(-1))/S(2))**S(2)/(d*x), x) - Simp(sqrt(S(2))*sqrt(Pi)*sqrt(b)*(-sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erfi(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*sqrt(b)))*cosh(acosh(d*x**S(2) + S(-1))/S(2))/(S(2)*d*x), x) - Simp(sqrt(S(2))*sqrt(Pi)*sqrt(b)*(sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erf(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*sqrt(b)))*cosh(acosh(d*x**S(2) + S(-1))/S(2))/(S(2)*d*x), x) def replacement6314(a, b, c, d, n, x): return Dist(S(4)*b**S(2)*n*(n + S(-1)), Int((a + b*acosh(c + d*x**S(2)))**(n + S(-2)), x), x) + Simp(x*(a + b*acosh(c + d*x**S(2)))**n, x) - Simp(S(2)*b*n*(a + b*acosh(c + d*x**S(2)))**(n + S(-1))*(S(2)*c*d*x**S(2) + d**S(2)*x**S(4))/(d*x*sqrt(c + d*x**S(2) + S(-1))*sqrt(c + d*x**S(2) + S(1))), x) def replacement6315(a, b, d, x): return Simp(sqrt(S(2))*x*CoshIntegral((a + b*acosh(d*x**S(2) + S(1)))/(S(2)*b))*cosh(a/(S(2)*b))/(S(2)*b*sqrt(d*x**S(2))), x) - Simp(sqrt(S(2))*x*SinhIntegral((a + b*acosh(d*x**S(2) + S(1)))/(S(2)*b))*sinh(a/(S(2)*b))/(S(2)*b*sqrt(d*x**S(2))), x) def replacement6316(a, b, d, x): return -Simp(sqrt(S(2))*x*CoshIntegral((a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*b))*sinh(a/(S(2)*b))/(S(2)*b*sqrt(d*x**S(2))), x) + Simp(sqrt(S(2))*x*SinhIntegral((a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*b))*cosh(a/(S(2)*b))/(S(2)*b*sqrt(d*x**S(2))), x) def replacement6317(a, b, d, x): return Simp(sqrt(S(2))*sqrt(Pi)*(-sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erfi(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(1)))/(S(2)*sqrt(b)))*sinh(acosh(d*x**S(2) + S(1))/S(2))/(S(2)*sqrt(b)*d*x), x) + Simp(sqrt(S(2))*sqrt(Pi)*(sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erf(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(1)))/(S(2)*sqrt(b)))*sinh(acosh(d*x**S(2) + S(1))/S(2))/(S(2)*sqrt(b)*d*x), x) def replacement6318(a, b, d, x): return Simp(sqrt(S(2))*sqrt(Pi)*(-sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erfi(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*sqrt(b)))*cosh(acosh(d*x**S(2) + S(-1))/S(2))/(S(2)*sqrt(b)*d*x), x) - Simp(sqrt(S(2))*sqrt(Pi)*(sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erf(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*sqrt(b)))*cosh(acosh(d*x**S(2) + S(-1))/S(2))/(S(2)*sqrt(b)*d*x), x) def replacement6319(a, b, d, x): return -Simp(sqrt(d*x**S(2))*sqrt(d*x**S(2) + S(2))/(b*d*x*sqrt(a + b*acosh(d*x**S(2) + S(1)))), x) + Simp(sqrt(S(2))*sqrt(Pi)*(-sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erfi(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(1)))/(S(2)*sqrt(b)))*sinh(acosh(d*x**S(2) + S(1))/S(2))/(S(2)*b**(S(3)/2)*d*x), x) - Simp(sqrt(S(2))*sqrt(Pi)*(sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erf(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(1)))/(S(2)*sqrt(b)))*sinh(acosh(d*x**S(2) + S(1))/S(2))/(S(2)*b**(S(3)/2)*d*x), x) def replacement6320(a, b, d, x): return -Simp(sqrt(d*x**S(2))*sqrt(d*x**S(2) + S(-2))/(b*d*x*sqrt(a + b*acosh(d*x**S(2) + S(-1)))), x) + Simp(sqrt(S(2))*sqrt(Pi)*(-sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erfi(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*sqrt(b)))*cosh(acosh(d*x**S(2) + S(-1))/S(2))/(S(2)*b**(S(3)/2)*d*x), x) + Simp(sqrt(S(2))*sqrt(Pi)*(sinh(a/(S(2)*b)) + cosh(a/(S(2)*b)))*Erf(sqrt(S(2))*sqrt(a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*sqrt(b)))*cosh(acosh(d*x**S(2) + S(-1))/S(2))/(S(2)*b**(S(3)/2)*d*x), x) def replacement6321(a, b, d, x): return -Simp(sqrt(S(2))*x*CoshIntegral((a + b*acosh(d*x**S(2) + S(1)))/(S(2)*b))*sinh(a/(S(2)*b))/(S(4)*b**S(2)*sqrt(d*x**S(2))), x) + Simp(sqrt(S(2))*x*SinhIntegral((a + b*acosh(d*x**S(2) + S(1)))/(S(2)*b))*cosh(a/(S(2)*b))/(S(4)*b**S(2)*sqrt(d*x**S(2))), x) - Simp(sqrt(d*x**S(2))*sqrt(d*x**S(2) + S(2))/(S(2)*b*d*x*(a + b*acosh(d*x**S(2) + S(1)))), x) def replacement6322(a, b, d, x): return Simp(sqrt(S(2))*x*CoshIntegral((a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*b))*cosh(a/(S(2)*b))/(S(4)*b**S(2)*sqrt(d*x**S(2))), x) - Simp(sqrt(S(2))*x*SinhIntegral((a + b*acosh(d*x**S(2) + S(-1)))/(S(2)*b))*sinh(a/(S(2)*b))/(S(4)*b**S(2)*sqrt(d*x**S(2))), x) - Simp(sqrt(d*x**S(2))*sqrt(d*x**S(2) + S(-2))/(S(2)*b*d*x*(a + b*acosh(d*x**S(2) + S(-1)))), x) def replacement6323(a, b, c, d, n, x): return Dist(S(1)/(S(4)*b**S(2)*(n + S(1))*(n + S(2))), Int((a + b*acosh(c + d*x**S(2)))**(n + S(2)), x), x) - Simp(x*(a + b*acosh(c + d*x**S(2)))**(n + S(2))/(S(4)*b**S(2)*(n + S(1))*(n + S(2))), x) + Simp((a + b*acosh(c + d*x**S(2)))**(n + S(1))*(S(2)*c*x**S(2) + d*x**S(4))/(S(2)*b*x*(n + S(1))*sqrt(c + d*x**S(2) + S(-1))*sqrt(c + d*x**S(2) + S(1))), x) def replacement6324(a, n, p, x): return Dist(S(1)/p, Subst(Int(x**n/tanh(x), x), x, asinh(a*x**p)), x) def replacement6325(a, n, p, x): return Dist(S(1)/p, Subst(Int(x**n*tanh(x), x), x, acosh(a*x**p)), x) def replacement6326(a, b, c, m, n, u, x): return Int(u*acsch(a/c + b*x**n/c)**m, x) def replacement6327(a, b, c, m, n, u, x): return Int(u*asech(a/c + b*x**n/c)**m, x) def replacement6328(b, n, x): return Dist(sqrt(b*x**S(2))/(b*x), Subst(Int(asinh(x)**n/sqrt(x**S(2) + S(1)), x), x, sqrt(b*x**S(2) + S(-1))), x) def replacement6329(b, n, x): return Dist(sqrt(sqrt(b*x**S(2) + S(1)) + S(-1))*sqrt(sqrt(b*x**S(2) + S(1)) + S(1))/(b*x), Subst(Int(acosh(x)**n/(sqrt(x + S(-1))*sqrt(x + S(1))), x), x, sqrt(b*x**S(2) + S(1))), x) def replacement6330(a, b, c, f, n, x): return Dist(S(1)/b, Subst(Int(f**(c*x**n)*cosh(x), x), x, asinh(a + b*x)), x) def replacement6331(a, b, c, f, n, x): return Dist(S(1)/b, Subst(Int(f**(c*x**n)*sinh(x), x), x, acosh(a + b*x)), x) def replacement6332(a, b, c, f, m, n, x): return Dist(S(1)/b, Subst(Int(f**(c*x**n)*(-a/b + sinh(x)/b)**m*cosh(x), x), x, asinh(a + b*x)), x) def replacement6333(a, b, c, f, m, n, x): return Dist(S(1)/b, Subst(Int(f**(c*x**n)*(-a/b + cosh(x)/b)**m*sinh(x), x), x, acosh(a + b*x)), x) def replacement6334(u, x): return -Int(SimplifyIntegrand(x*D(u, x)/sqrt(u**S(2) + S(1)), x), x) + Simp(x*asinh(u), x) def replacement6335(u, x): return -Int(SimplifyIntegrand(x*D(u, x)/(sqrt(u + S(-1))*sqrt(u + S(1))), x), x) + Simp(x*acosh(u), x) def replacement6336(a, b, c, d, m, u, x): return -Dist(b/(d*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/sqrt(u**S(2) + S(1)), x), x), x) + Simp((a + b*asinh(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement6337(a, b, c, d, m, u, x): return -Dist(b/(d*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(sqrt(u + S(-1))*sqrt(u + S(1))), x), x), x) + Simp((a + b*acosh(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def With6338(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement6338(a, b, u, v, x): w = IntHide(v, x) return -Dist(b, Int(SimplifyIntegrand(w*D(u, x)/sqrt(u**S(2) + S(1)), x), x), x) + Dist(a + b*asinh(u), w, x) def With6339(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement6339(a, b, u, v, x): w = IntHide(v, x) return -Dist(b, Int(SimplifyIntegrand(w*D(u, x)/(sqrt(u + S(-1))*sqrt(u + S(1))), x), x), x) + Dist(a + b*acosh(u), w, x) def replacement6340(n, u, x): return Int((u + sqrt(u**S(2) + S(1)))**n, x) def replacement6341(m, n, u, x): return Int(x**m*(u + sqrt(u**S(2) + S(1)))**n, x) def replacement6342(n, u, x): return Int((u + sqrt(u + S(-1))*sqrt(u + S(1)))**n, x) def replacement6343(m, n, u, x): return Int(x**m*(u + sqrt(u + S(-1))*sqrt(u + S(1)))**n, x) def replacement6344(a, b, c, n, x): return -Dist(b*c*n, Int(x*(a + b*atanh(c*x))**(n + S(-1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*atanh(c*x))**n, x) def replacement6345(a, b, c, n, x): return -Dist(b*c*n, Int(x*(a + b*acoth(c*x))**(n + S(-1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*acoth(c*x))**n, x) def replacement6346(a, b, c, n, x): return Int((a + b*atanh(c*x))**n, x) def replacement6347(a, b, c, n, x): return Int((a + b*acoth(c*x))**n, x) def replacement6348(a, b, c, d, e, n, x): return Dist(b*c*n/e, Int((a + b*atanh(c*x))**(n + S(-1))*log(S(2)*d/(d + e*x))/(-c**S(2)*x**S(2) + S(1)), x), x) - Simp((a + b*atanh(c*x))**n*log(S(2)*d/(d + e*x))/e, x) def replacement6349(a, b, c, d, e, n, x): return Dist(b*c*n/e, Int((a + b*acoth(c*x))**(n + S(-1))*log(S(2)*d/(d + e*x))/(-c**S(2)*x**S(2) + S(1)), x), x) - Simp((a + b*acoth(c*x))**n*log(S(2)*d/(d + e*x))/e, x) def replacement6350(c, d, e, x): return -Simp(PolyLog(S(2), Simp(c*(d + e*x)/(c*d - e), x))/(S(2)*e), x) + Simp(PolyLog(S(2), Simp(c*(d + e*x)/(c*d + e), x))/(S(2)*e), x) - Simp(log(d + e*x)*atanh(c*d/e)/e, x) def replacement6351(c, d, e, x): return -Dist(S(1)/2, Int(log(-c*x + S(1))/(d + e*x), x), x) + Dist(S(1)/2, Int(log(c*x + S(1))/(d + e*x), x), x) def replacement6352(c, d, e, x): return -Dist(S(1)/2, Int(log(S(1) - S(1)/(c*x))/(d + e*x), x), x) + Dist(S(1)/2, Int(log(S(1) + S(1)/(c*x))/(d + e*x), x), x) def replacement6353(a, b, c, d, e, x): return Dist(b, Int(atanh(c*x)/(d + e*x), x), x) + Simp(a*log(RemoveContent(d + e*x, x))/e, x) def replacement6354(a, b, c, d, e, x): return Dist(b, Int(acoth(c*x)/(d + e*x), x), x) + Simp(a*log(RemoveContent(d + e*x, x))/e, x) def replacement6355(a, b, c, d, e, p, x): return -Dist(b*c/(e*(p + S(1))), Int((d + e*x)**(p + S(1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*atanh(c*x))*(d + e*x)**(p + S(1))/(e*(p + S(1))), x) def replacement6356(a, b, c, d, e, p, x): return -Dist(b*c/(e*(p + S(1))), Int((d + e*x)**(p + S(1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*acoth(c*x))*(d + e*x)**(p + S(1))/(e*(p + S(1))), x) def replacement6357(a, b, c, n, x): return -Dist(S(2)*b*c*n, Int((a + b*atanh(c*x))**(n + S(-1))*atanh(S(1) - S(2)/(-c*x + S(1)))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(S(2)*(a + b*atanh(c*x))**n*atanh(S(1) - S(2)/(-c*x + S(1))), x) def replacement6358(a, b, c, n, x): return -Dist(S(2)*b*c*n, Int((a + b*acoth(c*x))**(n + S(-1))*acoth(S(1) - S(2)/(-c*x + S(1)))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(S(2)*(a + b*acoth(c*x))**n*acoth(S(1) - S(2)/(-c*x + S(1))), x) def replacement6359(a, b, c, m, n, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*atanh(c*x))**(n + S(-1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**(m + S(1))*(a + b*atanh(c*x))**n/(m + S(1)), x) def replacement6360(a, b, c, m, n, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*acoth(c*x))**(n + S(-1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**(m + S(1))*(a + b*acoth(c*x))**n/(m + S(1)), x) def replacement6361(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*atanh(c*x))**n*(d + e*x)**p, x), x) def replacement6362(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*acoth(c*x))**n*(d + e*x)**p, x), x) def replacement6363(a, b, c, d, e, n, p, x): return Int((a + b*atanh(c*x))**n*(d + e*x)**p, x) def replacement6364(a, b, c, d, e, n, p, x): return Int((a + b*acoth(c*x))**n*(d + e*x)**p, x) def replacement6365(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-1))*(a + b*atanh(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-1))*(a + b*atanh(c*x))**n/(d + e*x), x), x) def replacement6366(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-1))*(a + b*acoth(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-1))*(a + b*acoth(c*x))**n/(d + e*x), x), x) def replacement6367(a, b, c, d, e, n, x): return -Dist(b*c*n/d, Int((a + b*atanh(c*x))**(n + S(-1))*log(S(2)*e*x/(d + e*x))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*atanh(c*x))**n*log(S(2)*e*x/(d + e*x))/d, x) def replacement6368(a, b, c, d, e, n, x): return -Dist(b*c*n/d, Int((a + b*acoth(c*x))**(n + S(-1))*log(S(2)*e*x/(d + e*x))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*acoth(c*x))**n*log(S(2)*e*x/(d + e*x))/d, x) def replacement6369(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*atanh(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(1))*(a + b*atanh(c*x))**n/(d + e*x), x), x) def replacement6370(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*acoth(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(1))*(a + b*acoth(c*x))**n/(d + e*x), x), x) def replacement6371(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(x**m*(a + b*atanh(c*x))**n*(d + e*x)**p, x), x) def replacement6372(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(x**m*(a + b*acoth(c*x))**n*(d + e*x)**p, x), x) def replacement6373(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*atanh(c*x))**n*(d + e*x)**p, x) def replacement6374(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*acoth(c*x))**n*(d + e*x)**p, x) def replacement6375(a, b, c, d, e, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*atanh(c*x))*(d + e*x**S(2))**(p + S(-1)), x), x) + Simp(x*(a + b*atanh(c*x))*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) + Simp(b*(d + e*x**S(2))**p/(S(2)*c*p*(S(2)*p + S(1))), x) def replacement6376(a, b, c, d, e, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*acoth(c*x))*(d + e*x**S(2))**(p + S(-1)), x), x) + Simp(x*(a + b*acoth(c*x))*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) + Simp(b*(d + e*x**S(2))**p/(S(2)*c*p*(S(2)*p + S(1))), x) def replacement6377(a, b, c, d, e, n, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b**S(2)*d*n*(n + S(-1))/(S(2)*p*(S(2)*p + S(1))), Int((a + b*atanh(c*x))**(n + S(-2))*(d + e*x**S(2))**(p + S(-1)), x), x) + Simp(x*(a + b*atanh(c*x))**n*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) + Simp(b*n*(a + b*atanh(c*x))**(n + S(-1))*(d + e*x**S(2))**p/(S(2)*c*p*(S(2)*p + S(1))), x) def replacement6378(a, b, c, d, e, n, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b**S(2)*d*n*(n + S(-1))/(S(2)*p*(S(2)*p + S(1))), Int((a + b*acoth(c*x))**(n + S(-2))*(d + e*x**S(2))**(p + S(-1)), x), x) + Simp(x*(a + b*acoth(c*x))**n*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) + Simp(b*n*(a + b*acoth(c*x))**(n + S(-1))*(d + e*x**S(2))**p/(S(2)*c*p*(S(2)*p + S(1))), x) def replacement6379(a, b, c, d, e, x): return Simp(log(RemoveContent(a + b*atanh(c*x), x))/(b*c*d), x) def replacement6380(a, b, c, d, e, x): return Simp(log(RemoveContent(a + b*acoth(c*x), x))/(b*c*d), x) def replacement6381(a, b, c, d, e, n, x): return Simp((a + b*atanh(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement6382(a, b, c, d, e, n, x): return Simp((a + b*acoth(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement6383(a, b, c, d, e, x): return Simp(-S(2)*(a + b*atanh(c*x))*ArcTan(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/(c*sqrt(d)), x) - Simp(I*b*PolyLog(S(2), -I*sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/(c*sqrt(d)), x) + Simp(I*b*PolyLog(S(2), I*sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/(c*sqrt(d)), x) def replacement6384(a, b, c, d, e, x): return Simp(-S(2)*(a + b*acoth(c*x))*ArcTan(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/(c*sqrt(d)), x) - Simp(I*b*PolyLog(S(2), -I*sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/(c*sqrt(d)), x) + Simp(I*b*PolyLog(S(2), I*sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/(c*sqrt(d)), x) def replacement6385(a, b, c, d, e, n, x): return Dist(S(1)/(c*sqrt(d)), Subst(Int((a + b*x)**n/cosh(x), x), x, atanh(c*x)), x) def replacement6386(a, b, c, d, e, n, x): return -Dist(x*sqrt(S(1) - S(1)/(c**S(2)*x**S(2)))/sqrt(d + e*x**S(2)), Subst(Int((a + b*x)**n/sinh(x), x), x, acoth(c*x)), x) def replacement6387(a, b, c, d, e, n, x): return Dist(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*atanh(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) def replacement6388(a, b, c, d, e, n, x): return Dist(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*acoth(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) def replacement6389(a, b, c, d, e, n, x): return -Dist(b*c*n/S(2), Int(x*(a + b*atanh(c*x))**(n + S(-1))/(d + e*x**S(2))**S(2), x), x) + Simp(x*(a + b*atanh(c*x))**n/(S(2)*d*(d + e*x**S(2))), x) + Simp((a + b*atanh(c*x))**(n + S(1))/(S(2)*b*c*d**S(2)*(n + S(1))), x) def replacement6390(a, b, c, d, e, n, x): return -Dist(b*c*n/S(2), Int(x*(a + b*acoth(c*x))**(n + S(-1))/(d + e*x**S(2))**S(2), x), x) + Simp(x*(a + b*acoth(c*x))**n/(S(2)*d*(d + e*x**S(2))), x) + Simp((a + b*acoth(c*x))**(n + S(1))/(S(2)*b*c*d**S(2)*(n + S(1))), x) def replacement6391(a, b, c, d, e, x): return -Simp(b/(c*d*sqrt(d + e*x**S(2))), x) + Simp(x*(a + b*atanh(c*x))/(d*sqrt(d + e*x**S(2))), x) def replacement6392(a, b, c, d, e, x): return -Simp(b/(c*d*sqrt(d + e*x**S(2))), x) + Simp(x*(a + b*acoth(c*x))/(d*sqrt(d + e*x**S(2))), x) def replacement6393(a, b, c, d, e, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*atanh(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*(d + e*x**S(2))**(p + S(1))/(S(4)*c*d*(p + S(1))**S(2)), x) - Simp(x*(a + b*atanh(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) def replacement6394(a, b, c, d, e, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*acoth(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*(d + e*x**S(2))**(p + S(1))/(S(4)*c*d*(p + S(1))**S(2)), x) - Simp(x*(a + b*acoth(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) def replacement6395(a, b, c, d, e, n, x): return Dist(b**S(2)*n*(n + S(-1)), Int((a + b*atanh(c*x))**(n + S(-2))/(d + e*x**S(2))**(S(3)/2), x), x) + Simp(x*(a + b*atanh(c*x))**n/(d*sqrt(d + e*x**S(2))), x) - Simp(b*n*(a + b*atanh(c*x))**(n + S(-1))/(c*d*sqrt(d + e*x**S(2))), x) def replacement6396(a, b, c, d, e, n, x): return Dist(b**S(2)*n*(n + S(-1)), Int((a + b*acoth(c*x))**(n + S(-2))/(d + e*x**S(2))**(S(3)/2), x), x) + Simp(x*(a + b*acoth(c*x))**n/(d*sqrt(d + e*x**S(2))), x) - Simp(b*n*(a + b*acoth(c*x))**(n + S(-1))/(c*d*sqrt(d + e*x**S(2))), x) def replacement6397(a, b, c, d, e, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Dist(b**S(2)*n*(n + S(-1))/(S(4)*(p + S(1))**S(2)), Int((a + b*atanh(c*x))**(n + S(-2))*(d + e*x**S(2))**p, x), x) - Simp(x*(a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) - Simp(b*n*(a + b*atanh(c*x))**(n + S(-1))*(d + e*x**S(2))**(p + S(1))/(S(4)*c*d*(p + S(1))**S(2)), x) def replacement6398(a, b, c, d, e, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Dist(b**S(2)*n*(n + S(-1))/(S(4)*(p + S(1))**S(2)), Int((a + b*acoth(c*x))**(n + S(-2))*(d + e*x**S(2))**p, x), x) - Simp(x*(a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) - Simp(b*n*(a + b*acoth(c*x))**(n + S(-1))*(d + e*x**S(2))**(p + S(1))/(S(4)*c*d*(p + S(1))**S(2)), x) def replacement6399(a, b, c, d, e, n, p, x): return Dist(S(2)*c*(p + S(1))/(b*(n + S(1))), Int(x*(a + b*atanh(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp((a + b*atanh(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement6400(a, b, c, d, e, n, p, x): return Dist(S(2)*c*(p + S(1))/(b*(n + S(1))), Int(x*(a + b*acoth(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp((a + b*acoth(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement6401(a, b, c, d, e, n, p, x): return Dist(d**p/c, Subst(Int((a + b*x)**n*cosh(x)**(-S(2)*p + S(-2)), x), x, atanh(c*x)), x) def replacement6402(a, b, c, d, e, n, p, x): return Dist(d**(p + S(1)/2)*sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*atanh(c*x))**n*(-c**S(2)*x**S(2) + S(1))**p, x), x) def replacement6403(a, b, c, d, e, n, p, x): return -Dist((-d)**p/c, Subst(Int((a + b*x)**n*sinh(x)**(-S(2)*p + S(-2)), x), x, acoth(c*x)), x) def replacement6404(a, b, c, d, e, n, p, x): return -Dist(x*(-d)**(p + S(1)/2)*sqrt((c**S(2)*x**S(2) + S(-1))/(c**S(2)*x**S(2)))/sqrt(d + e*x**S(2)), Subst(Int((a + b*x)**n*sinh(x)**(-S(2)*p + S(-2)), x), x, acoth(c*x)), x) def replacement6405(c, d, e, x): return -Dist(S(1)/2, Int(log(-c*x + S(1))/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int(log(c*x + S(1))/(d + e*x**S(2)), x), x) def replacement6406(c, d, e, x): return -Dist(S(1)/2, Int(log(S(1) - S(1)/(c*x))/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int(log(S(1) + S(1)/(c*x))/(d + e*x**S(2)), x), x) def replacement6407(a, b, c, d, e, x): return Dist(a, Int(S(1)/(d + e*x**S(2)), x), x) + Dist(b, Int(atanh(c*x)/(d + e*x**S(2)), x), x) def replacement6408(a, b, c, d, e, x): return Dist(a, Int(S(1)/(d + e*x**S(2)), x), x) + Dist(b, Int(acoth(c*x)/(d + e*x**S(2)), x), x) def With6409(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(ExpandIntegrand(u/(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*atanh(c*x), u, x) def With6410(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(ExpandIntegrand(u/(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acoth(c*x), u, x) def replacement6411(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*atanh(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement6412(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*acoth(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement6413(a, b, c, d, e, n, p, x): return Int((a + b*atanh(c*x))**n*(d + e*x**S(2))**p, x) def replacement6414(a, b, c, d, e, n, p, x): return Int((a + b*acoth(c*x))**n*(d + e*x**S(2))**p, x) def replacement6415(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*atanh(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*atanh(c*x))**n/(d + e*x**S(2)), x), x) def replacement6416(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*acoth(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*acoth(c*x))**n/(d + e*x**S(2)), x), x) def replacement6417(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*atanh(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*atanh(c*x))**n/(d + e*x**S(2)), x), x) def replacement6418(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*acoth(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*acoth(c*x))**n/(d + e*x**S(2)), x), x) def replacement6419(a, b, c, d, e, n, x): return Dist(S(1)/(c*d), Int((a + b*atanh(c*x))**n/(-c*x + S(1)), x), x) + Simp((a + b*atanh(c*x))**(n + S(1))/(b*e*(n + S(1))), x) def replacement6420(a, b, c, d, e, n, x): return Dist(S(1)/(c*d), Int((a + b*acoth(c*x))**n/(-c*x + S(1)), x), x) + Simp((a + b*acoth(c*x))**(n + S(1))/(b*e*(n + S(1))), x) def replacement6421(a, b, c, d, e, n, x): return -Dist(S(1)/(b*c*d*(n + S(1))), Int((a + b*atanh(c*x))**(n + S(1)), x), x) + Simp(x*(a + b*atanh(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement6422(a, b, c, d, e, n, x): return -Dist(S(1)/(b*c*d*(n + S(1))), Int((a + b*acoth(c*x))**(n + S(1)), x), x) - Simp(x*(a + b*acoth(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement6423(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*atanh(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*atanh(c*x))**n/(d + e*x**S(2)), x), x) def replacement6424(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*acoth(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*acoth(c*x))**n/(d + e*x**S(2)), x), x) def replacement6425(a, b, c, d, e, n, x): return Dist(S(1)/d, Int((a + b*atanh(c*x))**n/(x*(c*x + S(1))), x), x) + Simp((a + b*atanh(c*x))**(n + S(1))/(b*d*(n + S(1))), x) def replacement6426(a, b, c, d, e, n, x): return Dist(S(1)/d, Int((a + b*acoth(c*x))**n/(x*(c*x + S(1))), x), x) + Simp((a + b*acoth(c*x))**(n + S(1))/(b*d*(n + S(1))), x) def replacement6427(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*atanh(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*atanh(c*x))**n/(d + e*x**S(2)), x), x) def replacement6428(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*acoth(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*acoth(c*x))**n/(d + e*x**S(2)), x), x) def replacement6429(a, b, c, d, e, m, n, x): return -Dist(m/(b*c*d*(n + S(1))), Int(x**(m + S(-1))*(a + b*atanh(c*x))**(n + S(1)), x), x) + Simp(x**m*(a + b*atanh(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement6430(a, b, c, d, e, m, n, x): return -Dist(m/(b*c*d*(n + S(1))), Int(x**(m + S(-1))*(a + b*acoth(c*x))**(n + S(1)), x), x) + Simp(x**m*(a + b*acoth(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement6431(a, b, c, d, e, m, x): return Int(ExpandIntegrand(a + b*atanh(c*x), x**m/(d + e*x**S(2)), x), x) def replacement6432(a, b, c, d, e, m, x): return Int(ExpandIntegrand(a + b*acoth(c*x), x**m/(d + e*x**S(2)), x), x) def replacement6433(a, b, c, d, e, n, p, x): return Dist(b*n/(S(2)*c*(p + S(1))), Int((a + b*atanh(c*x))**(n + S(-1))*(d + e*x**S(2))**p, x), x) + Simp((a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6434(a, b, c, d, e, n, p, x): return Dist(b*n/(S(2)*c*(p + S(1))), Int((a + b*acoth(c*x))**(n + S(-1))*(d + e*x**S(2))**p, x), x) + Simp((a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6435(a, b, c, d, e, n, x): return Dist(S(4)/(b**S(2)*(n + S(1))*(n + S(2))), Int(x*(a + b*atanh(c*x))**(n + S(2))/(d + e*x**S(2))**S(2), x), x) + Simp((a + b*atanh(c*x))**(n + S(2))*(c**S(2)*x**S(2) + S(1))/(b**S(2)*e*(d + e*x**S(2))*(n + S(1))*(n + S(2))), x) + Simp(x*(a + b*atanh(c*x))**(n + S(1))/(b*c*d*(d + e*x**S(2))*(n + S(1))), x) def replacement6436(a, b, c, d, e, n, x): return Dist(S(4)/(b**S(2)*(n + S(1))*(n + S(2))), Int(x*(a + b*acoth(c*x))**(n + S(2))/(d + e*x**S(2))**S(2), x), x) + Simp((a + b*acoth(c*x))**(n + S(2))*(c**S(2)*x**S(2) + S(1))/(b**S(2)*e*(d + e*x**S(2))*(n + S(1))*(n + S(2))), x) + Simp(x*(a + b*acoth(c*x))**(n + S(1))/(b*c*d*(d + e*x**S(2))*(n + S(1))), x) def replacement6437(a, b, c, d, e, p, x): return Dist(S(1)/(S(2)*c**S(2)*d*(p + S(1))), Int((a + b*atanh(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*(d + e*x**S(2))**(p + S(1))/(S(4)*c**S(3)*d*(p + S(1))**S(2)), x) - Simp(x*(a + b*atanh(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*c**S(2)*d*(p + S(1))), x) def replacement6438(a, b, c, d, e, p, x): return Dist(S(1)/(S(2)*c**S(2)*d*(p + S(1))), Int((a + b*acoth(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*(d + e*x**S(2))**(p + S(1))/(S(4)*c**S(3)*d*(p + S(1))**S(2)), x) - Simp(x*(a + b*acoth(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*c**S(2)*d*(p + S(1))), x) def replacement6439(a, b, c, d, e, n, x): return -Dist(b*n/(S(2)*c), Int(x*(a + b*atanh(c*x))**(n + S(-1))/(d + e*x**S(2))**S(2), x), x) - Simp((a + b*atanh(c*x))**(n + S(1))/(S(2)*b*c**S(3)*d**S(2)*(n + S(1))), x) + Simp(x*(a + b*atanh(c*x))**n/(S(2)*c**S(2)*d*(d + e*x**S(2))), x) def replacement6440(a, b, c, d, e, n, x): return -Dist(b*n/(S(2)*c), Int(x*(a + b*acoth(c*x))**(n + S(-1))/(d + e*x**S(2))**S(2), x), x) - Simp((a + b*acoth(c*x))**(n + S(1))/(S(2)*b*c**S(3)*d**S(2)*(n + S(1))), x) + Simp(x*(a + b*acoth(c*x))**n/(S(2)*c**S(2)*d*(d + e*x**S(2))), x) def replacement6441(a, b, c, d, e, m, p, x): return -Dist((m + S(-1))/(c**S(2)*d*m), Int(x**(m + S(-2))*(a + b*atanh(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*x**m*(d + e*x**S(2))**(p + S(1))/(c*d*m**S(2)), x) + Simp(x**(m + S(-1))*(a + b*atanh(c*x))*(d + e*x**S(2))**(p + S(1))/(c**S(2)*d*m), x) def replacement6442(a, b, c, d, e, m, p, x): return -Dist((m + S(-1))/(c**S(2)*d*m), Int(x**(m + S(-2))*(a + b*acoth(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*x**m*(d + e*x**S(2))**(p + S(1))/(c*d*m**S(2)), x) + Simp(x**(m + S(-1))*(a + b*acoth(c*x))*(d + e*x**S(2))**(p + S(1))/(c**S(2)*d*m), x) def replacement6443(a, b, c, d, e, m, n, p, x): return Dist(b**S(2)*n*(n + S(-1))/m**S(2), Int(x**m*(a + b*atanh(c*x))**(n + S(-2))*(d + e*x**S(2))**p, x), x) - Dist((m + S(-1))/(c**S(2)*d*m), Int(x**(m + S(-2))*(a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Simp(x**(m + S(-1))*(a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(c**S(2)*d*m), x) - Simp(b*n*x**m*(a + b*atanh(c*x))**(n + S(-1))*(d + e*x**S(2))**(p + S(1))/(c*d*m**S(2)), x) def replacement6444(a, b, c, d, e, m, n, p, x): return Dist(b**S(2)*n*(n + S(-1))/m**S(2), Int(x**m*(a + b*acoth(c*x))**(n + S(-2))*(d + e*x**S(2))**p, x), x) - Dist((m + S(-1))/(c**S(2)*d*m), Int(x**(m + S(-2))*(a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Simp(x**(m + S(-1))*(a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(1))/(c**S(2)*d*m), x) - Simp(b*n*x**m*(a + b*acoth(c*x))**(n + S(-1))*(d + e*x**S(2))**(p + S(1))/(c*d*m**S(2)), x) def replacement6445(a, b, c, d, e, m, n, p, x): return -Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*atanh(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp(x**m*(a + b*atanh(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement6446(a, b, c, d, e, m, n, p, x): return -Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*acoth(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp(x**m*(a + b*acoth(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement6447(a, b, c, d, e, m, n, p, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*atanh(c*x))**(n + S(-1))*(d + e*x**S(2))**p, x), x) + Simp(x**(m + S(1))*(a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*(m + S(1))), x) def replacement6448(a, b, c, d, e, m, n, p, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*acoth(c*x))**(n + S(-1))*(d + e*x**S(2))**p, x), x) + Simp(x**(m + S(1))*(a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*(m + S(1))), x) def replacement6449(a, b, c, d, e, m, x): return Dist(d/(m + S(2)), Int(x**m*(a + b*atanh(c*x))/sqrt(d + e*x**S(2)), x), x) - Dist(b*c*d/(m + S(2)), Int(x**(m + S(1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*atanh(c*x))*sqrt(d + e*x**S(2))/(m + S(2)), x) def replacement6450(a, b, c, d, e, m, x): return Dist(d/(m + S(2)), Int(x**m*(a + b*acoth(c*x))/sqrt(d + e*x**S(2)), x), x) - Dist(b*c*d/(m + S(2)), Int(x**(m + S(1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*acoth(c*x))*sqrt(d + e*x**S(2))/(m + S(2)), x) def replacement6451(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(x**m*(a + b*atanh(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement6452(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(x**m*(a + b*acoth(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement6453(a, b, c, d, e, m, n, p, x): return Dist(d, Int(x**m*(a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(c**S(2)*d, Int(x**(m + S(2))*(a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) def replacement6454(a, b, c, d, e, m, n, p, x): return Dist(d, Int(x**m*(a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(c**S(2)*d, Int(x**(m + S(2))*(a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) def replacement6455(a, b, c, d, e, m, n, x): return Dist((m + S(-1))/(c**S(2)*m), Int(x**(m + S(-2))*(a + b*atanh(c*x))**n/sqrt(d + e*x**S(2)), x), x) + Dist(b*n/(c*m), Int(x**(m + S(-1))*(a + b*atanh(c*x))**(n + S(-1))/sqrt(d + e*x**S(2)), x), x) - Simp(x**(m + S(-1))*(a + b*atanh(c*x))**n*sqrt(d + e*x**S(2))/(c**S(2)*d*m), x) def replacement6456(a, b, c, d, e, m, n, x): return Dist((m + S(-1))/(c**S(2)*m), Int(x**(m + S(-2))*(a + b*acoth(c*x))**n/sqrt(d + e*x**S(2)), x), x) + Dist(b*n/(c*m), Int(x**(m + S(-1))*(a + b*acoth(c*x))**(n + S(-1))/sqrt(d + e*x**S(2)), x), x) - Simp(x**(m + S(-1))*(a + b*acoth(c*x))**n*sqrt(d + e*x**S(2))/(c**S(2)*d*m), x) def replacement6457(a, b, c, d, e, x): return Simp(b*PolyLog(S(2), -sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/sqrt(d), x) - Simp(b*PolyLog(S(2), sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/sqrt(d), x) + Simp(-S(2)*(a + b*atanh(c*x))*atanh(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/sqrt(d), x) def replacement6458(a, b, c, d, e, x): return Simp(b*PolyLog(S(2), -sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/sqrt(d), x) - Simp(b*PolyLog(S(2), sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/sqrt(d), x) + Simp(-S(2)*(a + b*acoth(c*x))*atanh(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/sqrt(d), x) def replacement6459(a, b, c, d, e, n, x): return Dist(S(1)/sqrt(d), Subst(Int((a + b*x)**n/sinh(x), x), x, atanh(c*x)), x) def replacement6460(a, b, c, d, e, n, x): return -Dist(c*x*sqrt(S(1) - S(1)/(c**S(2)*x**S(2)))/sqrt(d + e*x**S(2)), Subst(Int((a + b*x)**n/cosh(x), x), x, acoth(c*x)), x) def replacement6461(a, b, c, d, e, n, x): return Dist(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*atanh(c*x))**n/(x*sqrt(-c**S(2)*x**S(2) + S(1))), x), x) def replacement6462(a, b, c, d, e, n, x): return Dist(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*acoth(c*x))**n/(x*sqrt(-c**S(2)*x**S(2) + S(1))), x), x) def replacement6463(a, b, c, d, e, n, x): return Dist(b*c*n, Int((a + b*atanh(c*x))**(n + S(-1))/(x*sqrt(d + e*x**S(2))), x), x) - Simp((a + b*atanh(c*x))**n*sqrt(d + e*x**S(2))/(d*x), x) def replacement6464(a, b, c, d, e, n, x): return Dist(b*c*n, Int((a + b*acoth(c*x))**(n + S(-1))/(x*sqrt(d + e*x**S(2))), x), x) - Simp((a + b*acoth(c*x))**n*sqrt(d + e*x**S(2))/(d*x), x) def replacement6465(a, b, c, d, e, m, n, x): return Dist(c**S(2)*(m + S(2))/(m + S(1)), Int(x**(m + S(2))*(a + b*atanh(c*x))**n/sqrt(d + e*x**S(2)), x), x) - Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*atanh(c*x))**(n + S(-1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*atanh(c*x))**n*sqrt(d + e*x**S(2))/(d*(m + S(1))), x) def replacement6466(a, b, c, d, e, m, n, x): return Dist(c**S(2)*(m + S(2))/(m + S(1)), Int(x**(m + S(2))*(a + b*acoth(c*x))**n/sqrt(d + e*x**S(2)), x), x) - Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*acoth(c*x))**(n + S(-1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*acoth(c*x))**n*sqrt(d + e*x**S(2))/(d*(m + S(1))), x) def replacement6467(a, b, c, d, e, m, n, p, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*atanh(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement6468(a, b, c, d, e, m, n, p, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*acoth(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement6469(a, b, c, d, e, m, n, p, x): return Dist(S(1)/d, Int(x**m*(a + b*atanh(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*atanh(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement6470(a, b, c, d, e, m, n, p, x): return Dist(S(1)/d, Int(x**m*(a + b*acoth(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*acoth(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement6471(a, b, c, d, e, m, n, p, x): return -Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*atanh(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Dist(c*(m + S(2)*p + S(2))/(b*(n + S(1))), Int(x**(m + S(1))*(a + b*atanh(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp(x**m*(a + b*atanh(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement6472(a, b, c, d, e, m, n, p, x): return -Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*acoth(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Dist(c*(m + S(2)*p + S(2))/(b*(n + S(1))), Int(x**(m + S(1))*(a + b*acoth(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp(x**m*(a + b*acoth(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement6473(a, b, c, d, e, m, n, p, x): return Dist(c**(-m + S(-1))*d**p, Subst(Int((a + b*x)**n*sinh(x)**m*cosh(x)**(-m - S(2)*p + S(-2)), x), x, atanh(c*x)), x) def replacement6474(a, b, c, d, e, m, n, p, x): return Dist(d**(p + S(1)/2)*sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int(x**m*(a + b*atanh(c*x))**n*(-c**S(2)*x**S(2) + S(1))**p, x), x) def replacement6475(a, b, c, d, e, m, n, p, x): return -Dist(c**(-m + S(-1))*(-d)**p, Subst(Int((a + b*x)**n*sinh(x)**(-m - S(2)*p + S(-2))*cosh(x)**m, x), x, acoth(c*x)), x) def replacement6476(a, b, c, d, e, m, n, p, x): return -Dist(c**(-m)*x*(-d)**(p + S(1)/2)*sqrt((c**S(2)*x**S(2) + S(-1))/(c**S(2)*x**S(2)))/sqrt(d + e*x**S(2)), Subst(Int((a + b*x)**n*sinh(x)**(-m - S(2)*p + S(-2))*cosh(x)**m, x), x, acoth(c*x)), x) def replacement6477(a, b, c, d, e, p, x): return -Dist(b*c/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*atanh(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6478(a, b, c, d, e, p, x): return -Dist(b*c/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*acoth(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def With6479(a, b, c, d, e, m, p, x): u = IntHide(x**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*atanh(c*x), u, x) def With6480(a, b, c, d, e, m, p, x): u = IntHide(x**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acoth(c*x), u, x) def replacement6481(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand((a + b*atanh(c*x))**n, x**m*(d + e*x**S(2))**p, x), x) def replacement6482(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand((a + b*acoth(c*x))**n, x**m*(d + e*x**S(2))**p, x), x) def replacement6483(a, b, c, d, e, m, p, x): return Dist(a, Int(x**m*(d + e*x**S(2))**p, x), x) + Dist(b, Int(x**m*(d + e*x**S(2))**p*atanh(c*x), x), x) def replacement6484(a, b, c, d, e, m, p, x): return Dist(a, Int(x**m*(d + e*x**S(2))**p, x), x) + Dist(b, Int(x**m*(d + e*x**S(2))**p*acoth(c*x), x), x) def replacement6485(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*atanh(c*x))**n*(d + e*x**S(2))**p, x) def replacement6486(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*acoth(c*x))**n*(d + e*x**S(2))**p, x) def replacement6487(a, b, c, d, e, n, u, x): return -Dist(S(1)/2, Int((a + b*atanh(c*x))**n*log(S(1) - u)/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int((a + b*atanh(c*x))**n*log(u + S(1))/(d + e*x**S(2)), x), x) def replacement6488(a, b, c, d, e, n, u, x): return -Dist(S(1)/2, Int((a + b*acoth(c*x))**n*log(SimplifyIntegrand(S(1) - S(1)/u, x))/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int((a + b*acoth(c*x))**n*log(SimplifyIntegrand(S(1) + S(1)/u, x))/(d + e*x**S(2)), x), x) def replacement6489(a, b, c, d, e, n, u, x): return -Dist(S(1)/2, Int((a + b*atanh(c*x))**n*log(S(1) - u)/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int((a + b*atanh(c*x))**n*log(u + S(1))/(d + e*x**S(2)), x), x) def replacement6490(a, b, c, d, e, n, u, x): return -Dist(S(1)/2, Int((a + b*acoth(c*x))**n*log(SimplifyIntegrand(S(1) - S(1)/u, x))/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int((a + b*acoth(c*x))**n*log(SimplifyIntegrand(S(1) + S(1)/u, x))/(d + e*x**S(2)), x), x) def replacement6491(a, b, c, d, e, n, u, x): return -Dist(b*n/S(2), Int((a + b*atanh(c*x))**(n + S(-1))*PolyLog(S(2), Together(S(1) - u))/(d + e*x**S(2)), x), x) + Simp((a + b*atanh(c*x))**n*PolyLog(S(2), Together(S(1) - u))/(S(2)*c*d), x) def replacement6492(a, b, c, d, e, n, u, x): return -Dist(b*n/S(2), Int((a + b*acoth(c*x))**(n + S(-1))*PolyLog(S(2), Together(S(1) - u))/(d + e*x**S(2)), x), x) + Simp((a + b*acoth(c*x))**n*PolyLog(S(2), Together(S(1) - u))/(S(2)*c*d), x) def replacement6493(a, b, c, d, e, n, u, x): return Dist(b*n/S(2), Int((a + b*atanh(c*x))**(n + S(-1))*PolyLog(S(2), Together(S(1) - u))/(d + e*x**S(2)), x), x) - Simp((a + b*atanh(c*x))**n*PolyLog(S(2), Together(S(1) - u))/(S(2)*c*d), x) def replacement6494(a, b, c, d, e, n, u, x): return Dist(b*n/S(2), Int((a + b*acoth(c*x))**(n + S(-1))*PolyLog(S(2), Together(S(1) - u))/(d + e*x**S(2)), x), x) - Simp((a + b*acoth(c*x))**n*PolyLog(S(2), Together(S(1) - u))/(S(2)*c*d), x) def replacement6495(a, b, c, d, e, n, p, u, x): return Dist(b*n/S(2), Int((a + b*atanh(c*x))**(n + S(-1))*PolyLog(p + S(1), u)/(d + e*x**S(2)), x), x) - Simp((a + b*atanh(c*x))**n*PolyLog(p + S(1), u)/(S(2)*c*d), x) def replacement6496(a, b, c, d, e, n, p, u, x): return Dist(b*n/S(2), Int((a + b*acoth(c*x))**(n + S(-1))*PolyLog(p + S(1), u)/(d + e*x**S(2)), x), x) - Simp((a + b*acoth(c*x))**n*PolyLog(p + S(1), u)/(S(2)*c*d), x) def replacement6497(a, b, c, d, e, n, p, u, x): return -Dist(b*n/S(2), Int((a + b*atanh(c*x))**(n + S(-1))*PolyLog(p + S(1), u)/(d + e*x**S(2)), x), x) + Simp((a + b*atanh(c*x))**n*PolyLog(p + S(1), u)/(S(2)*c*d), x) def replacement6498(a, b, c, d, e, n, p, u, x): return -Dist(b*n/S(2), Int((a + b*acoth(c*x))**(n + S(-1))*PolyLog(p + S(1), u)/(d + e*x**S(2)), x), x) + Simp((a + b*acoth(c*x))**n*PolyLog(p + S(1), u)/(S(2)*c*d), x) def replacement6499(a, b, c, d, e, x): return Simp((-log(a + b*acoth(c*x)) + log(a + b*atanh(c*x)))/(b**S(2)*c*d*(acoth(c*x) - atanh(c*x))), x) def replacement6500(a, b, c, d, e, m, n, x): return -Dist(n/(m + S(1)), Int((a + b*acoth(c*x))**(m + S(1))*(a + b*atanh(c*x))**(n + S(-1))/(d + e*x**S(2)), x), x) + Simp((a + b*acoth(c*x))**(m + S(1))*(a + b*atanh(c*x))**n/(b*c*d*(m + S(1))), x) def replacement6501(a, b, c, d, e, m, n, x): return -Dist(n/(m + S(1)), Int((a + b*acoth(c*x))**(n + S(-1))*(a + b*atanh(c*x))**(m + S(1))/(d + e*x**S(2)), x), x) + Simp((a + b*acoth(c*x))**n*(a + b*atanh(c*x))**(m + S(1))/(b*c*d*(m + S(1))), x) def replacement6502(a, c, d, n, x): return -Dist(S(1)/2, Int(log(-a*x + S(1))/(c + d*x**n), x), x) + Dist(S(1)/2, Int(log(a*x + S(1))/(c + d*x**n), x), x) def replacement6503(a, c, d, n, x): return -Dist(S(1)/2, Int(log(S(1) - S(1)/(a*x))/(c + d*x**n), x), x) + Dist(S(1)/2, Int(log(S(1) + S(1)/(a*x))/(c + d*x**n), x), x) def replacement6504(a, b, c, d, e, f, g, x): return -Dist(b*c, Int(x*(d + e*log(f + g*x**S(2)))/(-c**S(2)*x**S(2) + S(1)), x), x) - Dist(S(2)*e*g, Int(x**S(2)*(a + b*atanh(c*x))/(f + g*x**S(2)), x), x) + Simp(x*(a + b*atanh(c*x))*(d + e*log(f + g*x**S(2))), x) def replacement6505(a, b, c, d, e, f, g, x): return -Dist(b*c, Int(x*(d + e*log(f + g*x**S(2)))/(-c**S(2)*x**S(2) + S(1)), x), x) - Dist(S(2)*e*g, Int(x**S(2)*(a + b*acoth(c*x))/(f + g*x**S(2)), x), x) + Simp(x*(a + b*acoth(c*x))*(d + e*log(f + g*x**S(2))), x) def replacement6506(a, b, c, d, e, f, g, m, x): return -Dist(b*c/(m + S(1)), Int(x**(m + S(1))*(d + e*log(f + g*x**S(2)))/(-c**S(2)*x**S(2) + S(1)), x), x) - Dist(S(2)*e*g/(m + S(1)), Int(x**(m + S(2))*(a + b*atanh(c*x))/(f + g*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*atanh(c*x))*(d + e*log(f + g*x**S(2)))/(m + S(1)), x) def replacement6507(a, b, c, d, e, f, g, m, x): return -Dist(b*c/(m + S(1)), Int(x**(m + S(1))*(d + e*log(f + g*x**S(2)))/(-c**S(2)*x**S(2) + S(1)), x), x) - Dist(S(2)*e*g/(m + S(1)), Int(x**(m + S(2))*(a + b*acoth(c*x))/(f + g*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*acoth(c*x))*(d + e*log(f + g*x**S(2)))/(m + S(1)), x) def With6508(a, b, c, d, e, f, g, m, x): u = IntHide(x**m*(d + e*log(f + g*x**S(2))), x) return -Dist(b*c, Int(ExpandIntegrand(u/(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*atanh(c*x), u, x) def With6509(a, b, c, d, e, f, g, m, x): u = IntHide(x**m*(d + e*log(f + g*x**S(2))), x) return -Dist(b*c, Int(ExpandIntegrand(u/(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acoth(c*x), u, x) def With6510(a, b, c, d, e, f, g, m, x): u = IntHide(x**m*(a + b*atanh(c*x)), x) return -Dist(S(2)*e*g, Int(ExpandIntegrand(u*x/(f + g*x**S(2)), x), x), x) + Dist(d + e*log(f + g*x**S(2)), u, x) def With6511(a, b, c, d, e, f, g, m, x): u = IntHide(x**m*(a + b*acoth(c*x)), x) return -Dist(S(2)*e*g, Int(ExpandIntegrand(u*x/(f + g*x**S(2)), x), x), x) + Dist(d + e*log(f + g*x**S(2)), u, x) def replacement6512(a, b, c, d, e, f, g, x): return Dist(b/c, Int((a + b*atanh(c*x))*(d + e*log(f + g*x**S(2))), x), x) + Dist(b*c*e, Int(x**S(2)*(a + b*atanh(c*x))/(-c**S(2)*x**S(2) + S(1)), x), x) - Simp(e*x**S(2)*(a + b*atanh(c*x))**S(2)/S(2), x) + Simp((a + b*atanh(c*x))**S(2)*(d + e*log(f + g*x**S(2)))*(f + g*x**S(2))/(S(2)*g), x) def replacement6513(a, b, c, d, e, f, g, x): return Dist(b/c, Int((a + b*acoth(c*x))*(d + e*log(f + g*x**S(2))), x), x) + Dist(b*c*e, Int(x**S(2)*(a + b*acoth(c*x))/(-c**S(2)*x**S(2) + S(1)), x), x) - Simp(e*x**S(2)*(a + b*acoth(c*x))**S(2)/S(2), x) + Simp((a + b*acoth(c*x))**S(2)*(d + e*log(f + g*x**S(2)))*(f + g*x**S(2))/(S(2)*g), x) def replacement6514(a, n, x): return Int((-a*x + S(1))**(S(1)/2 - n/S(2))*(a*x + S(1))**(n/S(2) + S(1)/2)/sqrt(-a**S(2)*x**S(2) + S(1)), x) def replacement6515(a, m, n, x): return Int(x**m*(-a*x + S(1))**(S(1)/2 - n/S(2))*(a*x + S(1))**(n/S(2) + S(1)/2)/sqrt(-a**S(2)*x**S(2) + S(1)), x) def replacement6516(a, n, x): return Int((-a*x + S(1))**(-n/S(2))*(a*x + S(1))**(n/S(2)), x) def replacement6517(a, m, n, x): return Int(x**m*(-a*x + S(1))**(-n/S(2))*(a*x + S(1))**(n/S(2)), x) def replacement6518(a, c, d, n, p, x): return Dist(c**n, Int((c + d*x)**(-n + p)*(-a**S(2)*x**S(2) + S(1))**(n/S(2)), x), x) def replacement6519(a, c, d, e, f, m, n, p, x): return Dist(c**n, Int((c + d*x)**(-n + p)*(e + f*x)**m*(-a**S(2)*x**S(2) + S(1))**(n/S(2)), x), x) def replacement6520(a, c, d, n, p, u, x): return Dist(c**p, Int(u*(S(1) + d*x/c)**p*(-a*x + S(1))**(-n/S(2))*(a*x + S(1))**(n/S(2)), x), x) def replacement6521(a, c, d, n, p, u, x): return Int(u*(c + d*x)**p*(-a*x + S(1))**(-n/S(2))*(a*x + S(1))**(n/S(2)), x) def replacement6522(a, c, d, n, p, u, x): return Dist(d**p, Int(u*x**(-p)*(c*x/d + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6523(a, c, d, n, p, u, x): return Dist((S(-1))**(n/S(2))*c**p, Int(u*(S(1) - S(1)/(a*x))**(-n/S(2))*(S(1) + S(1)/(a*x))**(n/S(2))*(S(1) + d/(c*x))**p, x), x) def replacement6524(a, c, d, n, p, u, x): return Int(u*(c + d/x)**p*(-a*x + S(1))**(-n/S(2))*(a*x + S(1))**(n/S(2)), x) def replacement6525(a, c, d, n, p, u, x): return Dist(x**p*(c + d/x)**p*(c*x/d + S(1))**(-p), Int(u*x**(-p)*(c*x/d + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6526(a, c, d, n, x): return Simp((-a*x + n)*exp(n*atanh(a*x))/(a*c*sqrt(c + d*x**S(2))*(n**S(2) + S(-1))), x) def replacement6527(a, c, d, n, p, x): return -Dist(S(2)*(p + S(1))*(S(2)*p + S(3))/(c*(n**S(2) - S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*atanh(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*(S(2)*a*x*(p + S(1)) + n)*exp(n*atanh(a*x))/(a*c*(n**S(2) - S(4)*(p + S(1))**S(2))), x) def replacement6528(a, c, d, n, x): return Simp(exp(n*atanh(a*x))/(a*c*n), x) def replacement6529(a, c, d, n, p, x): return Dist(c**p, Int((a*x + S(1))**n*(-a**S(2)*x**S(2) + S(1))**(-n/S(2) + p), x), x) def replacement6530(a, c, d, n, p, x): return Dist(c**p, Int((-a*x + S(1))**(-n)*(-a**S(2)*x**S(2) + S(1))**(n/S(2) + p), x), x) def replacement6531(a, c, d, n, p, x): return Dist(c**p, Int((-a*x + S(1))**(-n/S(2) + p)*(a*x + S(1))**(n/S(2) + p), x), x) def replacement6532(a, c, d, n, p, x): return Dist(c**(n/S(2)), Int((c + d*x**S(2))**(-n/S(2) + p)*(a*x + S(1))**n, x), x) def replacement6533(a, c, d, n, p, x): return Dist(c**(-n/S(2)), Int((c + d*x**S(2))**(n/S(2) + p)*(-a*x + S(1))**(-n), x), x) def replacement6534(a, c, d, n, p, x): return Dist(c**IntPart(p)*(c + d*x**S(2))**FracPart(p)*(-a**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((-a**S(2)*x**S(2) + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6535(a, c, d, n, x): return Simp((-a*n*x + S(1))*exp(n*atanh(a*x))/(d*sqrt(c + d*x**S(2))*(n**S(2) + S(-1))), x) def replacement6536(a, c, d, n, p, x): return -Dist(a*c*n/(S(2)*d*(p + S(1))), Int((c + d*x**S(2))**p*exp(n*atanh(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*exp(n*atanh(a*x))/(S(2)*d*(p + S(1))), x) def replacement6537(a, c, d, n, p, x): return Simp((c + d*x**S(2))**(p + S(1))*(-a*n*x + S(1))*exp(n*atanh(a*x))/(a*d*n*(n**S(2) + S(-1))), x) def replacement6538(a, c, d, n, p, x): return Dist((n**S(2) + S(2)*p + S(2))/(d*(n**S(2) - S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*atanh(a*x)), x), x) - Simp((c + d*x**S(2))**(p + S(1))*(S(2)*a*x*(p + S(1)) + n)*exp(n*atanh(a*x))/(a*d*(n**S(2) - S(4)*(p + S(1))**S(2))), x) def replacement6539(a, c, d, m, n, p, x): return Dist(c**p, Int(x**m*(a*x + S(1))**n*(-a**S(2)*x**S(2) + S(1))**(-n/S(2) + p), x), x) def replacement6540(a, c, d, m, n, p, x): return Dist(c**p, Int(x**m*(-a*x + S(1))**(-n)*(-a**S(2)*x**S(2) + S(1))**(n/S(2) + p), x), x) def replacement6541(a, c, d, m, n, p, x): return Dist(c**p, Int(x**m*(-a*x + S(1))**(-n/S(2) + p)*(a*x + S(1))**(n/S(2) + p), x), x) def replacement6542(a, c, d, m, n, p, x): return Dist(c**(n/S(2)), Int(x**m*(c + d*x**S(2))**(-n/S(2) + p)*(a*x + S(1))**n, x), x) def replacement6543(a, c, d, m, n, p, x): return Dist(c**(-n/S(2)), Int(x**m*(c + d*x**S(2))**(n/S(2) + p)*(-a*x + S(1))**(-n), x), x) def replacement6544(a, c, d, m, n, p, x): return Dist(c**IntPart(p)*(c + d*x**S(2))**FracPart(p)*(-a**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int(x**m*(-a**S(2)*x**S(2) + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6545(a, c, d, n, p, u, x): return Dist(c**p, Int(u*(-a*x + S(1))**(-n/S(2) + p)*(a*x + S(1))**(n/S(2) + p), x), x) def replacement6546(a, c, d, n, p, u, x): return Dist(c**IntPart(p)*(c + d*x**S(2))**FracPart(p)*(-a*x + S(1))**(-FracPart(p))*(a*x + S(1))**(-FracPart(p)), Int(u*(-a*x + S(1))**(-n/S(2) + p)*(a*x + S(1))**(n/S(2) + p), x), x) def replacement6547(a, c, d, n, p, u, x): return Dist(c**IntPart(p)*(c + d*x**S(2))**FracPart(p)*(-a**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int(u*(-a**S(2)*x**S(2) + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6548(a, c, d, n, p, u, x): return Dist(d**p, Int(u*x**(-S(2)*p)*(-a**S(2)*x**S(2) + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6549(a, c, d, n, p, u, x): return Dist(c**p, Int(u*(S(1) - S(1)/(a*x))**p*(S(1) + S(1)/(a*x))**p*exp(n*atanh(a*x)), x), x) def replacement6550(a, c, d, n, p, u, x): return Dist(x**(S(2)*p)*(c + d/x**S(2))**p*(-a*x + S(1))**(-p)*(a*x + S(1))**(-p), Int(u*x**(-S(2)*p)*(-a*x + S(1))**p*(a*x + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6551(a, c, d, n, p, u, x): return Dist(x**(S(2)*p)*(c + d/x**S(2))**p*(c*x**S(2)/d + S(1))**(-p), Int(u*x**(-S(2)*p)*(c*x**S(2)/d + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6552(a, b, c, n, x): return Int((-a*c - b*c*x + S(1))**(-n/S(2))*(a*c + b*c*x + S(1))**(n/S(2)), x) def replacement6553(a, b, c, m, n, x): return Dist(S(4)*b**(-m + S(-1))*c**(-m + S(-1))/n, Subst(Int(x**(S(2)/n)*(x**(S(2)/n) + S(1))**(-m + S(-2))*(-a*c + x**(S(2)/n)*(-a*c + S(1)) + S(-1))**m, x), x, (-c*(a + b*x) + S(1))**(-n/S(2))*(c*(a + b*x) + S(1))**(n/S(2))), x) def replacement6554(a, b, c, d, e, m, n, x): return Int((d + e*x)**m*(-a*c - b*c*x + S(1))**(-n/S(2))*(a*c + b*c*x + S(1))**(n/S(2)), x) def replacement6555(a, b, c, d, e, n, p, u, x): return Dist((c/(S(1) - a**S(2)))**p, Int(u*(-a - b*x + S(1))**(-n/S(2) + p)*(a + b*x + S(1))**(n/S(2) + p), x), x) def replacement6556(a, b, c, d, e, n, p, u, x): return Dist((c + d*x + e*x**S(2))**p*(-a**S(2) - S(2)*a*b*x - b**S(2)*x**S(2) + S(1))**(-p), Int(u*(-a**S(2) - S(2)*a*b*x - b**S(2)*x**S(2) + S(1))**p*exp(n*atanh(a*x)), x), x) def replacement6557(a, b, c, n, u, x): return Int(u*exp(n*acoth(a/c + b*x/c)), x) def replacement6558(a, n, u, x): return Dist((S(-1))**(n/S(2)), Int(u*exp(n*atanh(a*x)), x), x) def replacement6559(a, n, x): return -Subst(Int((S(1) - x/a)**(S(1)/2 - n/S(2))*(S(1) + x/a)**(n/S(2) + S(1)/2)/(x**S(2)*sqrt(S(1) - x**S(2)/a**S(2))), x), x, S(1)/x) def replacement6560(a, m, n, x): return -Subst(Int(x**(-m + S(-2))*(S(1) - x/a)**(S(1)/2 - n/S(2))*(S(1) + x/a)**(n/S(2) + S(1)/2)/sqrt(S(1) - x**S(2)/a**S(2)), x), x, S(1)/x) def replacement6561(a, n, x): return -Subst(Int((S(1) - x/a)**(-n/S(2))*(S(1) + x/a)**(n/S(2))/x**S(2), x), x, S(1)/x) def replacement6562(a, m, n, x): return -Subst(Int(x**(-m + S(-2))*(S(1) - x/a)**(-n/S(2))*(S(1) + x/a)**(n/S(2)), x), x, S(1)/x) def replacement6563(a, m, n, x): return -Dist(x**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(S(1) - x/a)**(S(1)/2 - n/S(2))*(S(1) + x/a)**(n/S(2) + S(1)/2)/sqrt(S(1) - x**S(2)/a**S(2)), x), x, S(1)/x), x) def replacement6564(a, m, n, x): return -Dist(x**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(S(1) - x/a)**(-n/S(2))*(S(1) + x/a)**(n/S(2)), x), x, S(1)/x), x) def replacement6565(a, c, d, n, p, x): return Simp((c + d*x)**p*(a*x + S(1))*exp(n*acoth(a*x))/(a*(p + S(1))), x) def replacement6566(a, c, d, n, p, u, x): return Dist(d**p, Int(u*x**p*(c/(d*x) + S(1))**p*exp(n*acoth(a*x)), x), x) def replacement6567(a, c, d, n, p, u, x): return Dist(x**(-p)*(c + d*x)**p*(c/(d*x) + S(1))**(-p), Int(u*x**p*(c/(d*x) + S(1))**p*exp(n*acoth(a*x)), x), x) def replacement6568(a, c, d, n, p, x): return -Dist(c**n, Subst(Int((S(1) - x**S(2)/a**S(2))**(n/S(2))*(c + d*x)**(-n + p)/x**S(2), x), x, S(1)/x), x) def replacement6569(a, c, d, m, n, p, x): return -Dist(c**n, Subst(Int(x**(-m + S(-2))*(S(1) - x**S(2)/a**S(2))**(n/S(2))*(c + d*x)**(-n + p), x), x, S(1)/x), x) def replacement6570(a, c, d, n, p, x): return -Dist(c**p, Subst(Int((S(1) - x/a)**(-n/S(2))*(S(1) + x/a)**(n/S(2))*(S(1) + d*x/c)**p/x**S(2), x), x, S(1)/x), x) def replacement6571(a, c, d, m, n, p, x): return -Dist(c**p, Subst(Int(x**(-m + S(-2))*(S(1) - x/a)**(-n/S(2))*(S(1) + x/a)**(n/S(2))*(S(1) + d*x/c)**p, x), x, S(1)/x), x) def replacement6572(a, c, d, m, n, p, x): return -Dist(c**p*x**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(S(1) - x/a)**(-n/S(2))*(S(1) + x/a)**(n/S(2))*(S(1) + d*x/c)**p, x), x, S(1)/x), x) def replacement6573(a, c, d, n, p, u, x): return Dist((S(1) + d/(c*x))**(-p)*(c + d/x)**p, Int(u*(S(1) + d/(c*x))**p*exp(n*acoth(a*x)), x), x) def replacement6574(a, c, d, n, x): return Simp(exp(n*acoth(a*x))/(a*c*n), x) def replacement6575(a, c, d, n, x): return Simp((-a*x + n)*exp(n*acoth(a*x))/(a*c*sqrt(c + d*x**S(2))*(n**S(2) + S(-1))), x) def replacement6576(a, c, d, n, p, x): return -Dist(S(2)*(p + S(1))*(S(2)*p + S(3))/(c*(n**S(2) - S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*acoth(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*(S(2)*a*x*(p + S(1)) + n)*exp(n*acoth(a*x))/(a*c*(n**S(2) - S(4)*(p + S(1))**S(2))), x) def replacement6577(a, c, d, n, x): return -Simp((-a*n*x + S(1))*exp(n*acoth(a*x))/(a**S(2)*c*sqrt(c + d*x**S(2))*(n**S(2) + S(-1))), x) def replacement6578(a, c, d, n, p, x): return -Dist(n*(S(2)*p + S(3))/(a*c*(n**S(2) - S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*acoth(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*(a*n*x + S(2)*p + S(2))*exp(n*acoth(a*x))/(a**S(2)*c*(n**S(2) - S(4)*(p + S(1))**S(2))), x) def replacement6579(a, c, d, n, p, x): return -Simp((c + d*x**S(2))**(p + S(1))*(S(2)*a*x*(p + S(1)) + n)*exp(n*acoth(a*x))/(a**S(3)*c*n**S(2)*(n**S(2) + S(-1))), x) def replacement6580(a, c, d, n, p, x): return -Dist((n**S(2) + S(2)*p + S(2))/(a**S(2)*c*(n**S(2) - S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*acoth(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*(S(2)*a*x*(p + S(1)) + n)*exp(n*acoth(a*x))/(a**S(3)*c*(n**S(2) - S(4)*(p + S(1))**S(2))), x) def replacement6581(a, c, d, m, n, p, x): return -Dist(a**(-m + S(-1))*(-c)**p, Subst(Int((S(1)/tanh(x))**(m + S(2)*p + S(2))*exp(n*x)*cosh(x)**(-S(2)*p + S(-2)), x), x, acoth(a*x)), x) def replacement6582(a, c, d, n, p, u, x): return Dist(d**p, Int(u*x**(S(2)*p)*(S(1) - S(1)/(a**S(2)*x**S(2)))**p*exp(n*acoth(a*x)), x), x) def replacement6583(a, c, d, n, p, u, x): return Dist(x**(-S(2)*p)*(S(1) - S(1)/(a**S(2)*x**S(2)))**(-p)*(c + d*x**S(2))**p, Int(u*x**(S(2)*p)*(S(1) - S(1)/(a**S(2)*x**S(2)))**p*exp(n*acoth(a*x)), x), x) def replacement6584(a, c, d, n, p, u, x): return Dist(a**(-S(2)*p)*c**p, Int(u*x**(-S(2)*p)*(a*x + S(-1))**(-n/S(2) + p)*(a*x + S(1))**(n/S(2) + p), x), x) def replacement6585(a, c, d, n, p, x): return -Dist(c**p, Subst(Int((S(1) - x/a)**(-n/S(2) + p)*(S(1) + x/a)**(n/S(2) + p)/x**S(2), x), x, S(1)/x), x) def replacement6586(a, c, d, m, n, p, x): return -Dist(c**p, Subst(Int(x**(-m + S(-2))*(S(1) - x/a)**(-n/S(2) + p)*(S(1) + x/a)**(n/S(2) + p), x), x, S(1)/x), x) def replacement6587(a, c, d, m, n, p, x): return -Dist(c**p*x**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(S(1) - x/a)**(-n/S(2) + p)*(S(1) + x/a)**(n/S(2) + p), x), x, S(1)/x), x) def replacement6588(a, c, d, n, p, u, x): return Dist(c**IntPart(p)*(S(1) - S(1)/(a**S(2)*x**S(2)))**(-FracPart(p))*(c + d/x**S(2))**FracPart(p), Int(u*(S(1) - S(1)/(a**S(2)*x**S(2)))**p*exp(n*acoth(a*x)), x), x) def replacement6589(a, b, c, n, u, x): return Dist((S(-1))**(n/S(2)), Int(u*exp(n*atanh(c*(a + b*x))), x), x) def replacement6590(a, b, c, n, x): return Dist((c*(a + b*x))**(n/S(2))*(S(1) + S(1)/(c*(a + b*x)))**(n/S(2))*(a*c + b*c*x + S(1))**(-n/S(2)), Int((a*c + b*c*x + S(-1))**(-n/S(2))*(a*c + b*c*x + S(1))**(n/S(2)), x), x) def replacement6591(a, b, c, m, n, x): return Dist(-S(4)*b**(-m + S(-1))*c**(-m + S(-1))/n, Subst(Int(x**(S(2)/n)*(x**(S(2)/n) + S(-1))**(-m + S(-2))*(a*c + x**(S(2)/n)*(-a*c + S(1)) + S(1))**m, x), x, (S(1) - S(1)/(c*(a + b*x)))**(-n/S(2))*(S(1) + S(1)/(c*(a + b*x)))**(n/S(2))), x) def replacement6592(a, b, c, d, e, m, n, x): return Dist((c*(a + b*x))**(n/S(2))*(S(1) + S(1)/(c*(a + b*x)))**(n/S(2))*(a*c + b*c*x + S(1))**(-n/S(2)), Int((d + e*x)**m*(a*c + b*c*x + S(-1))**(-n/S(2))*(a*c + b*c*x + S(1))**(n/S(2)), x), x) def replacement6593(a, b, c, d, e, n, p, u, x): return Dist((c/(S(1) - a**S(2)))**p*((a + b*x + S(1))/(a + b*x))**(n/S(2))*((a + b*x)/(a + b*x + S(1)))**(n/S(2))*(-a - b*x + S(1))**(n/S(2))*(a + b*x + S(-1))**(-n/S(2)), Int(u*(-a - b*x + S(1))**(-n/S(2) + p)*(a + b*x + S(1))**(n/S(2) + p), x), x) def replacement6594(a, b, c, d, e, n, p, u, x): return Dist((c + d*x + e*x**S(2))**p*(-a**S(2) - S(2)*a*b*x - b**S(2)*x**S(2) + S(1))**(-p), Int(u*(-a**S(2) - S(2)*a*b*x - b**S(2)*x**S(2) + S(1))**p*exp(n*acoth(a*x)), x), x) def replacement6595(a, b, c, n, u, x): return Int(u*exp(n*atanh(a/c + b*x/c)), x) def replacement6596(a, b, c, d, n, x): return Dist(S(1)/d, Subst(Int((a + b*atanh(x))**n, x), x, c + d*x), x) def replacement6597(a, b, c, d, n, x): return Dist(S(1)/d, Subst(Int((a + b*acoth(x))**n, x), x, c + d*x), x) def replacement6598(a, b, c, d, n, x): return Int((a + b*atanh(c + d*x))**n, x) def replacement6599(a, b, c, d, n, x): return Int((a + b*acoth(c + d*x))**n, x) def replacement6600(a, b, c, d, e, f, m, n, x): return Dist(S(1)/d, Subst(Int((a + b*atanh(x))**n*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement6601(a, b, c, d, e, f, m, n, x): return Dist(S(1)/d, Subst(Int((a + b*acoth(x))**n*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement6602(a, b, c, d, e, f, m, n, x): return Int((a + b*atanh(c + d*x))**n*(e + f*x)**m, x) def replacement6603(a, b, c, d, e, f, m, n, x): return Int((a + b*acoth(c + d*x))**n*(e + f*x)**m, x) def replacement6604(A, B, C, a, b, c, d, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*atanh(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p, x), x, c + d*x), x) def replacement6605(A, B, C, a, b, c, d, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*acoth(x))**n*(C*x**S(2)/d**S(2) + C/d**S(2))**p, x), x, c + d*x), x) def replacement6606(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*atanh(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement6607(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*acoth(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement6608(a, b, c, d, n, x): return -Dist(S(1)/2, Int(log(-a - b*x + S(1))/(c + d*x**n), x), x) + Dist(S(1)/2, Int(log(a + b*x + S(1))/(c + d*x**n), x), x) def replacement6609(a, b, c, d, n, x): return -Dist(S(1)/2, Int(log((a + b*x + S(-1))/(a + b*x))/(c + d*x**n), x), x) + Dist(S(1)/2, Int(log((a + b*x + S(1))/(a + b*x))/(c + d*x**n), x), x) def replacement6610(a, b, c, d, n, x): return Int(atanh(a + b*x)/(c + d*x**n), x) def replacement6611(a, b, c, d, n, x): return Int(acoth(a + b*x)/(c + d*x**n), x) def replacement6612(a, b, n, x): return -Dist(b*n, Int(x**n/(-a**S(2) - S(2)*a*b*x**n - b**S(2)*x**(S(2)*n) + S(1)), x), x) + Simp(x*atanh(a + b*x**n), x) def replacement6613(a, b, n, x): return -Dist(b*n, Int(x**n/(-a**S(2) - S(2)*a*b*x**n - b**S(2)*x**(S(2)*n) + S(1)), x), x) + Simp(x*acoth(a + b*x**n), x) def replacement6614(a, b, n, x): return -Dist(S(1)/2, Int(log(-a - b*x**n + S(1))/x, x), x) + Dist(S(1)/2, Int(log(a + b*x**n + S(1))/x, x), x) def replacement6615(a, b, n, x): return -Dist(S(1)/2, Int(log(S(1) - S(1)/(a + b*x**n))/x, x), x) + Dist(S(1)/2, Int(log(S(1) + S(1)/(a + b*x**n))/x, x), x) def replacement6616(a, b, m, n, x): return -Dist(b*n/(m + S(1)), Int(x**(m + n)/(-a**S(2) - S(2)*a*b*x**n - b**S(2)*x**(S(2)*n) + S(1)), x), x) + Simp(x**(m + S(1))*atanh(a + b*x**n)/(m + S(1)), x) def replacement6617(a, b, m, n, x): return -Dist(b*n/(m + S(1)), Int(x**(m + n)/(-a**S(2) - S(2)*a*b*x**n - b**S(2)*x**(S(2)*n) + S(1)), x), x) + Simp(x**(m + S(1))*acoth(a + b*x**n)/(m + S(1)), x) def replacement6618(a, b, c, d, f, x): return -Dist(S(1)/2, Int(log(-a - b*f**(c + d*x) + S(1)), x), x) + Dist(S(1)/2, Int(log(a + b*f**(c + d*x) + S(1)), x), x) def replacement6619(a, b, c, d, f, x): return -Dist(S(1)/2, Int(log(S(1) - S(1)/(a + b*f**(c + d*x))), x), x) + Dist(S(1)/2, Int(log(S(1) + S(1)/(a + b*f**(c + d*x))), x), x) def replacement6620(a, b, c, d, f, m, x): return -Dist(S(1)/2, Int(x**m*log(-a - b*f**(c + d*x) + S(1)), x), x) + Dist(S(1)/2, Int(x**m*log(a + b*f**(c + d*x) + S(1)), x), x) def replacement6621(a, b, c, d, f, m, x): return -Dist(S(1)/2, Int(x**m*log(S(1) - S(1)/(a + b*f**(c + d*x))), x), x) + Dist(S(1)/2, Int(x**m*log(S(1) + S(1)/(a + b*f**(c + d*x))), x), x) def replacement6622(a, b, c, m, n, u, x): return Int(u*acoth(a/c + b*x**n/c)**m, x) def replacement6623(a, b, c, m, n, u, x): return Int(u*atanh(a/c + b*x**n/c)**m, x) def replacement6624(a, b, c, x): return Simp(log(atanh(c*x/sqrt(a + b*x**S(2))))/c, x) def replacement6625(a, b, c, x): return -Simp(log(acoth(c*x/sqrt(a + b*x**S(2))))/c, x) def replacement6626(a, b, c, m, x): return Simp(atanh(c*x/sqrt(a + b*x**S(2)))**(m + S(1))/(c*(m + S(1))), x) def replacement6627(a, b, c, m, x): return -Simp(acoth(c*x/sqrt(a + b*x**S(2)))**(m + S(1))/(c*(m + S(1))), x) def replacement6628(a, b, c, d, e, m, x): return Dist(sqrt(a + b*x**S(2))/sqrt(d + e*x**S(2)), Int(atanh(c*x/sqrt(a + b*x**S(2)))**m/sqrt(a + b*x**S(2)), x), x) def replacement6629(a, b, c, d, e, m, x): return Dist(sqrt(a + b*x**S(2))/sqrt(d + e*x**S(2)), Int(acoth(c*x/sqrt(a + b*x**S(2)))**m/sqrt(a + b*x**S(2)), x), x) def With6630(a, c, d, n, x): u = IntHide((c + d*x**S(2))**n, x) return -Dist(a, Int(Dist(S(1)/(-a**S(2)*x**S(2) + S(1)), u, x), x), x) + Dist(atanh(a*x), u, x) def With6631(a, c, d, n, x): u = IntHide((c + d*x**S(2))**n, x) return -Dist(a, Int(Dist(S(1)/(-a**S(2)*x**S(2) + S(1)), u, x), x), x) + Dist(acoth(a*x), u, x) def With6632(n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: tmp = InverseFunctionOfLinear(u, x) res = And(Not(FalseQ(tmp)), SameQ(Head(tmp), ArcTanh), ZeroQ(-D(v, x)**S(2) + Discriminant(v, x)*Part(tmp, S(1))**S(2))) except (TypeError, AttributeError): return False if res: return True return False def replacement6632(n, u, v, x): tmp = InverseFunctionOfLinear(u, x) return Dist((-Discriminant(v, x)/(S(4)*Coefficient(v, x, S(2))))**n/Coefficient(Part(tmp, S(1)), x, S(1)), Subst(Int(SimplifyIntegrand((S(1)/cosh(x))**(S(2)*n + S(2))*SubstForInverseFunction(u, tmp, x), x), x), x, tmp), x) def With6633(n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: tmp = InverseFunctionOfLinear(u, x) res = And(Not(FalseQ(tmp)), SameQ(Head(tmp), ArcCoth), ZeroQ(-D(v, x)**S(2) + Discriminant(v, x)*Part(tmp, S(1))**S(2))) except (TypeError, AttributeError): return False if res: return True return False def replacement6633(n, u, v, x): tmp = InverseFunctionOfLinear(u, x) return Dist((-Discriminant(v, x)/(S(4)*Coefficient(v, x, S(2))))**n/Coefficient(Part(tmp, S(1)), x, S(1)), Subst(Int(SimplifyIntegrand((-S(1)/sinh(x)**S(2))**(n + S(1))*SubstForInverseFunction(u, tmp, x), x), x), x, tmp), x) def replacement6634(a, b, c, d, x): return Dist(b, Int(x/(c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp(x*atanh(c + d*tanh(a + b*x)), x) def replacement6635(a, b, c, d, x): return Dist(b, Int(x/(c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp(x*acoth(c + d*tanh(a + b*x)), x) def replacement6636(a, b, c, d, x): return Dist(b, Int(x/(-c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp(x*atanh(c + d/tanh(a + b*x)), x) def replacement6637(a, b, c, d, x): return Dist(b, Int(x/(-c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp(x*acoth(c + d/tanh(a + b*x)), x) def replacement6638(a, b, c, d, x): return Dist(b*(-c - d + S(1)), Int(x*exp(S(2)*a + S(2)*b*x)/(-c + d + (-c - d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) - Dist(b*(c + d + S(1)), Int(x*exp(S(2)*a + S(2)*b*x)/(c - d + (c + d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Simp(x*atanh(c + d*tanh(a + b*x)), x) def replacement6639(a, b, c, d, x): return Dist(b*(-c - d + S(1)), Int(x*exp(S(2)*a + S(2)*b*x)/(-c + d + (-c - d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) - Dist(b*(c + d + S(1)), Int(x*exp(S(2)*a + S(2)*b*x)/(c - d + (c + d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Simp(x*acoth(c + d*tanh(a + b*x)), x) def replacement6640(a, b, c, d, x): return -Dist(b*(-c - d + S(1)), Int(x*exp(S(2)*a + S(2)*b*x)/(-c + d - (-c - d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Dist(b*(c + d + S(1)), Int(x*exp(S(2)*a + S(2)*b*x)/(c - d - (c + d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Simp(x*atanh(c + d/tanh(a + b*x)), x) def replacement6641(a, b, c, d, x): return -Dist(b*(-c - d + S(1)), Int(x*exp(S(2)*a + S(2)*b*x)/(-c + d - (-c - d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Dist(b*(c + d + S(1)), Int(x*exp(S(2)*a + S(2)*b*x)/(c - d - (c + d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Simp(x*acoth(c + d/tanh(a + b*x)), x) def replacement6642(a, b, c, d, e, f, m, x): return Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp((e + f*x)**(m + S(1))*atanh(c + d*tanh(a + b*x))/(f*(m + S(1))), x) def replacement6643(a, b, c, d, e, f, m, x): return Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp((e + f*x)**(m + S(1))*acoth(c + d*tanh(a + b*x))/(f*(m + S(1))), x) def replacement6644(a, b, c, d, e, f, m, x): return Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(-c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp((e + f*x)**(m + S(1))*atanh(c + d/tanh(a + b*x))/(f*(m + S(1))), x) def replacement6645(a, b, c, d, e, f, m, x): return Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(-c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp((e + f*x)**(m + S(1))*acoth(c + d/tanh(a + b*x))/(f*(m + S(1))), x) def replacement6646(a, b, c, d, e, f, m, x): return Dist(b*(-c - d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(-c + d + (-c - d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) - Dist(b*(c + d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(c - d + (c + d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*atanh(c + d*tanh(a + b*x))/(f*(m + S(1))), x) def replacement6647(a, b, c, d, e, f, m, x): return Dist(b*(-c - d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(-c + d + (-c - d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) - Dist(b*(c + d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(c - d + (c + d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*acoth(c + d*tanh(a + b*x))/(f*(m + S(1))), x) def replacement6648(a, b, c, d, e, f, m, x): return -Dist(b*(-c - d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(-c + d - (-c - d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Dist(b*(c + d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(c - d - (c + d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*atanh(c + d/tanh(a + b*x))/(f*(m + S(1))), x) def replacement6649(a, b, c, d, e, f, m, x): return -Dist(b*(-c - d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(-c + d - (-c - d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Dist(b*(c + d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(c - d - (c + d + S(1))*exp(S(2)*a + S(2)*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*acoth(c + d/tanh(a + b*x))/(f*(m + S(1))), x) def replacement6650(a, b, x): return -Dist(b, Int(x/cos(S(2)*a + S(2)*b*x), x), x) + Simp(x*atanh(tan(a + b*x)), x) def replacement6651(a, b, x): return -Dist(b, Int(x/cos(S(2)*a + S(2)*b*x), x), x) + Simp(x*acoth(tan(a + b*x)), x) def replacement6652(a, b, x): return -Dist(b, Int(x/cos(S(2)*a + S(2)*b*x), x), x) + Simp(x*atanh(S(1)/tan(a + b*x)), x) def replacement6653(a, b, x): return -Dist(b, Int(x/cos(S(2)*a + S(2)*b*x), x), x) + Simp(x*acoth(S(1)/tan(a + b*x)), x) def replacement6654(a, b, e, f, m, x): return -Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/cos(S(2)*a + S(2)*b*x), x), x) + Simp((e + f*x)**(m + S(1))*atanh(tan(a + b*x))/(f*(m + S(1))), x) def replacement6655(a, b, e, f, m, x): return -Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/cos(S(2)*a + S(2)*b*x), x), x) + Simp((e + f*x)**(m + S(1))*acoth(tan(a + b*x))/(f*(m + S(1))), x) def replacement6656(a, b, e, f, m, x): return -Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/cos(S(2)*a + S(2)*b*x), x), x) + Simp((e + f*x)**(m + S(1))*atanh(S(1)/tan(a + b*x))/(f*(m + S(1))), x) def replacement6657(a, b, e, f, m, x): return -Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/cos(S(2)*a + S(2)*b*x), x), x) + Simp((e + f*x)**(m + S(1))*acoth(S(1)/tan(a + b*x))/(f*(m + S(1))), x) def replacement6658(a, b, c, d, x): return Dist(I*b, Int(x/(c*exp(S(2)*I*a + S(2)*I*b*x) + c + I*d), x), x) + Simp(x*atanh(c + d*tan(a + b*x)), x) def replacement6659(a, b, c, d, x): return Dist(I*b, Int(x/(c*exp(S(2)*I*a + S(2)*I*b*x) + c + I*d), x), x) + Simp(x*acoth(c + d*tan(a + b*x)), x) def replacement6660(a, b, c, d, x): return Dist(I*b, Int(x/(-c*exp(S(2)*I*a + S(2)*I*b*x) + c - I*d), x), x) + Simp(x*atanh(c + d/tan(a + b*x)), x) def replacement6661(a, b, c, d, x): return Dist(I*b, Int(x/(-c*exp(S(2)*I*a + S(2)*I*b*x) + c - I*d), x), x) + Simp(x*acoth(c + d/tan(a + b*x)), x) def replacement6662(a, b, c, d, x): return Dist(I*b*(-c + I*d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(-c - I*d + (-c + I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) - Dist(I*b*(c - I*d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(c + I*d + (c - I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp(x*atanh(c + d*tan(a + b*x)), x) def replacement6663(a, b, c, d, x): return Dist(I*b*(-c + I*d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(-c - I*d + (-c + I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) - Dist(I*b*(c - I*d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(c + I*d + (c - I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp(x*acoth(c + d*tan(a + b*x)), x) def replacement6664(a, b, c, d, x): return -Dist(I*b*(-c - I*d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(-c + I*d - (-c - I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Dist(I*b*(c + I*d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(c - I*d - (c + I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp(x*atanh(c + d/tan(a + b*x)), x) def replacement6665(a, b, c, d, x): return -Dist(I*b*(-c - I*d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(-c + I*d - (-c - I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Dist(I*b*(c + I*d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(c - I*d - (c + I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp(x*acoth(c + d/tan(a + b*x)), x) def replacement6666(a, b, c, d, e, f, m, x): return Dist(I*b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(c*exp(S(2)*I*a + S(2)*I*b*x) + c + I*d), x), x) + Simp((e + f*x)**(m + S(1))*atanh(c + d*tan(a + b*x))/(f*(m + S(1))), x) def replacement6667(a, b, c, d, e, f, m, x): return Dist(I*b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(c*exp(S(2)*I*a + S(2)*I*b*x) + c + I*d), x), x) + Simp((e + f*x)**(m + S(1))*acoth(c + d*tan(a + b*x))/(f*(m + S(1))), x) def replacement6668(a, b, c, d, e, f, m, x): return Dist(I*b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(-c*exp(S(2)*I*a + S(2)*I*b*x) + c - I*d), x), x) + Simp((e + f*x)**(m + S(1))*atanh(c + d/tan(a + b*x))/(f*(m + S(1))), x) def replacement6669(a, b, c, d, e, f, m, x): return Dist(I*b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(-c*exp(S(2)*I*a + S(2)*I*b*x) + c - I*d), x), x) + Simp((e + f*x)**(m + S(1))*acoth(c + d/tan(a + b*x))/(f*(m + S(1))), x) def replacement6670(a, b, c, d, e, f, m, x): return Dist(I*b*(-c + I*d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(-c - I*d + (-c + I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) - Dist(I*b*(c - I*d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(c + I*d + (c - I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*atanh(c + d*tan(a + b*x))/(f*(m + S(1))), x) def replacement6671(a, b, c, d, e, f, m, x): return Dist(I*b*(-c + I*d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(-c - I*d + (-c + I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) - Dist(I*b*(c - I*d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(c + I*d + (c - I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*acoth(c + d*tan(a + b*x))/(f*(m + S(1))), x) def replacement6672(a, b, c, d, e, f, m, x): return -Dist(I*b*(-c - I*d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(-c + I*d - (-c - I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Dist(I*b*(c + I*d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(c - I*d - (c + I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*atanh(c + d/tan(a + b*x))/(f*(m + S(1))), x) def replacement6673(a, b, c, d, e, f, m, x): return -Dist(I*b*(-c - I*d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(-c + I*d - (-c - I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Dist(I*b*(c + I*d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(c - I*d - (c + I*d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*acoth(c + d/tan(a + b*x))/(f*(m + S(1))), x) def replacement6674(u, x): return -Int(SimplifyIntegrand(x*D(u, x)/(S(1) - u**S(2)), x), x) + Simp(x*atanh(u), x) def replacement6675(u, x): return -Int(SimplifyIntegrand(x*D(u, x)/(S(1) - u**S(2)), x), x) + Simp(x*acoth(u), x) def replacement6676(a, b, c, d, m, u, x): return -Dist(b/(d*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(S(1) - u**S(2)), x), x), x) + Simp((a + b*atanh(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement6677(a, b, c, d, m, u, x): return -Dist(b/(d*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(S(1) - u**S(2)), x), x), x) + Simp((a + b*acoth(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def With6678(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement6678(a, b, u, v, x): w = IntHide(v, x) return -Dist(b, Int(SimplifyIntegrand(w*D(u, x)/(S(1) - u**S(2)), x), x), x) + Dist(a + b*atanh(u), w, x) def With6679(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement6679(a, b, u, v, x): w = IntHide(v, x) return -Dist(b, Int(SimplifyIntegrand(w*D(u, x)/(S(1) - u**S(2)), x), x), x) + Dist(a + b*acoth(u), w, x) def replacement6680(c, x): return Dist(sqrt(c*x + S(1))*sqrt(S(1)/(c*x + S(1))), Int(S(1)/(sqrt(-c*x + S(1))*sqrt(c*x + S(1))), x), x) + Simp(x*asech(c*x), x) def replacement6681(c, x): return Dist(S(1)/c, Int(S(1)/(x*sqrt(S(1) + S(1)/(c**S(2)*x**S(2)))), x), x) + Simp(x*acsch(c*x), x) def replacement6682(a, b, c, n, x): return -Dist(S(1)/c, Subst(Int((a + b*x)**n*tanh(x)/cosh(x), x), x, asech(c*x)), x) def replacement6683(a, b, c, n, x): return -Dist(S(1)/c, Subst(Int((a + b*x)**n/(sinh(x)*tanh(x)), x), x, acsch(c*x)), x) def replacement6684(a, b, c, x): return -Subst(Int((a + b*acosh(x/c))/x, x), x, S(1)/x) def replacement6685(a, b, c, x): return -Subst(Int((a + b*asinh(x/c))/x, x), x, S(1)/x) def replacement6686(a, b, c, m, x): return Dist(b*sqrt(c*x + S(1))*sqrt(S(1)/(c*x + S(1)))/(m + S(1)), Int(x**m/(sqrt(-c*x + S(1))*sqrt(c*x + S(1))), x), x) + Simp(x**(m + S(1))*(a + b*asech(c*x))/(m + S(1)), x) def replacement6687(a, b, c, m, x): return Dist(b/(c*(m + S(1))), Int(x**(m + S(-1))/sqrt(S(1) + S(1)/(c**S(2)*x**S(2))), x), x) + Simp(x**(m + S(1))*(a + b*acsch(c*x))/(m + S(1)), x) def replacement6688(a, b, c, m, n, x): return -Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*(S(1)/cosh(x))**(m + S(1))*tanh(x), x), x, asech(c*x)), x) def replacement6689(a, b, c, m, n, x): return -Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*(S(1)/sinh(x))**(m + S(1))/tanh(x), x), x, acsch(c*x)), x) def replacement6690(a, b, c, m, n, x): return Int(x**m*(a + b*asech(c*x))**n, x) def replacement6691(a, b, c, m, n, x): return Int(x**m*(a + b*acsch(c*x))**n, x) def With6692(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return Dist(b*sqrt(c*x + S(1))*sqrt(S(1)/(c*x + S(1))), Int(SimplifyIntegrand(u/(x*sqrt(-c*x + S(1))*sqrt(c*x + S(1))), x), x), x) + Dist(a + b*asech(c*x), u, x) def With6693(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c*x/sqrt(-c**S(2)*x**S(2)), Int(SimplifyIntegrand(u/(x*sqrt(-c**S(2)*x**S(2) + S(-1))), x), x), x) + Dist(a + b*acsch(c*x), u, x) def replacement6694(a, b, c, d, e, n, p, x): return -Subst(Int(x**(-S(2)*p + S(-2))*(a + b*acosh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x) def replacement6695(a, b, c, d, e, n, p, x): return -Subst(Int(x**(-S(2)*p + S(-2))*(a + b*asinh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x) def replacement6696(a, b, c, d, e, n, p, x): return -Dist(sqrt(x**S(2))/x, Subst(Int(x**(-S(2)*p + S(-2))*(a + b*acosh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement6697(a, b, c, d, e, n, p, x): return -Dist(sqrt(x**S(2))/x, Subst(Int(x**(-S(2)*p + S(-2))*(a + b*asinh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement6698(a, b, c, d, e, n, p, x): return -Dist(sqrt(d + e*x**S(2))/(x*sqrt(d/x**S(2) + e)), Subst(Int(x**(-S(2)*p + S(-2))*(a + b*acosh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement6699(a, b, c, d, e, n, p, x): return -Dist(sqrt(d + e*x**S(2))/(x*sqrt(d/x**S(2) + e)), Subst(Int(x**(-S(2)*p + S(-2))*(a + b*asinh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement6700(a, b, c, d, e, n, p, x): return Int((a + b*asech(c*x))**n*(d + e*x**S(2))**p, x) def replacement6701(a, b, c, d, e, n, p, x): return Int((a + b*acsch(c*x))**n*(d + e*x**S(2))**p, x) def replacement6702(a, b, c, d, e, p, x): return Dist(b*sqrt(c*x + S(1))*sqrt(S(1)/(c*x + S(1)))/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(x*sqrt(-c*x + S(1))*sqrt(c*x + S(1))), x), x) + Simp((a + b*asech(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement6703(a, b, c, d, e, p, x): return -Dist(b*c*x/(S(2)*e*sqrt(-c**S(2)*x**S(2))*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(x*sqrt(-c**S(2)*x**S(2) + S(-1))), x), x) + Simp((a + b*acsch(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def With6704(a, b, c, d, e, m, p, x): u = IntHide(x**m*(d + e*x**S(2))**p, x) return Dist(b*sqrt(c*x + S(1))*sqrt(S(1)/(c*x + S(1))), Int(SimplifyIntegrand(u/(x*sqrt(-c*x + S(1))*sqrt(c*x + S(1))), x), x), x) + Dist(a + b*asech(c*x), u, x) def With6705(a, b, c, d, e, m, p, x): u = IntHide(x**m*(d + e*x**S(2))**p, x) return -Dist(b*c*x/sqrt(-c**S(2)*x**S(2)), Int(SimplifyIntegrand(u/(x*sqrt(-c**S(2)*x**S(2) + S(-1))), x), x), x) + Dist(a + b*acsch(c*x), u, x) def replacement6706(a, b, c, d, e, m, n, p, x): return -Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*acosh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x) def replacement6707(a, b, c, d, e, m, n, p, x): return -Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*asinh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x) def replacement6708(a, b, c, d, e, m, n, p, x): return -Dist(sqrt(x**S(2))/x, Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*acosh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement6709(a, b, c, d, e, m, n, p, x): return -Dist(sqrt(x**S(2))/x, Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*asinh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement6710(a, b, c, d, e, m, n, p, x): return -Dist(sqrt(d + e*x**S(2))/(x*sqrt(d/x**S(2) + e)), Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*acosh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement6711(a, b, c, d, e, m, n, p, x): return -Dist(sqrt(d + e*x**S(2))/(x*sqrt(d/x**S(2) + e)), Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*asinh(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement6712(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*asech(c*x))**n*(d + e*x**S(2))**p, x) def replacement6713(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*acsch(c*x))**n*(d + e*x**S(2))**p, x) def replacement6714(a, b, x): return Int(sqrt((-a - b*x + S(1))/(a + b*x + S(1)))/(-a - b*x + S(1)), x) + Simp((a + b*x)*asech(a + b*x)/b, x) def replacement6715(a, b, x): return Int(S(1)/(sqrt(S(1) + (a + b*x)**(S(-2)))*(a + b*x)), x) + Simp((a + b*x)*acsch(a + b*x)/b, x) def replacement6716(a, b, n, x): return -Dist(S(1)/b, Subst(Int(x**n*tanh(x)/cosh(x), x), x, asech(a + b*x)), x) def replacement6717(a, b, n, x): return -Dist(S(1)/b, Subst(Int(x**n/(sinh(x)*tanh(x)), x), x, acsch(a + b*x)), x) def replacement6718(a, b, x): return Simp(log(S(1) - (S(1) - sqrt(S(1) - a**S(2)))*exp(-asech(a + b*x))/a)*asech(a + b*x), x) + Simp(log(S(1) - (sqrt(S(1) - a**S(2)) + S(1))*exp(-asech(a + b*x))/a)*asech(a + b*x), x) - Simp(log(S(1) + exp(-S(2)*asech(a + b*x)))*asech(a + b*x), x) - Simp(PolyLog(S(2), (S(1) - sqrt(S(1) - a**S(2)))*exp(-asech(a + b*x))/a), x) - Simp(PolyLog(S(2), (sqrt(S(1) - a**S(2)) + S(1))*exp(-asech(a + b*x))/a), x) + Simp(PolyLog(S(2), -exp(-S(2)*asech(a + b*x)))/S(2), x) def replacement6719(a, b, x): return Simp(log(S(1) + (S(1) - sqrt(a**S(2) + S(1)))*exp(acsch(a + b*x))/a)*acsch(a + b*x), x) + Simp(log(S(1) + (sqrt(a**S(2) + S(1)) + S(1))*exp(acsch(a + b*x))/a)*acsch(a + b*x), x) - Simp(log(S(1) - exp(-S(2)*acsch(a + b*x)))*acsch(a + b*x), x) + Simp(PolyLog(S(2), -(S(1) - sqrt(a**S(2) + S(1)))*exp(acsch(a + b*x))/a), x) + Simp(PolyLog(S(2), -(sqrt(a**S(2) + S(1)) + S(1))*exp(acsch(a + b*x))/a), x) + Simp(PolyLog(S(2), exp(-S(2)*acsch(a + b*x)))/S(2), x) - Simp(acsch(a + b*x)**S(2), x) def replacement6720(a, b, m, x): return Dist(b**(-m + S(-1))/(m + S(1)), Subst(Int(x**(-m + S(-1))*((-a*x)**(m + S(1)) - (-a*x + S(1))**(m + S(1)))/(sqrt(x + S(-1))*sqrt(x + S(1))), x), x, S(1)/(a + b*x)), x) - Simp(b**(-m + S(-1))*(-b**(m + S(1))*x**(m + S(1)) + (-a)**(m + S(1)))*asech(a + b*x)/(m + S(1)), x) def replacement6721(a, b, m, x): return Dist(b**(-m + S(-1))/(m + S(1)), Subst(Int(x**(-m + S(-1))*((-a*x)**(m + S(1)) - (-a*x + S(1))**(m + S(1)))/sqrt(x**S(2) + S(1)), x), x, S(1)/(a + b*x)), x) - Simp(b**(-m + S(-1))*(-b**(m + S(1))*x**(m + S(1)) + (-a)**(m + S(1)))*acsch(a + b*x)/(m + S(1)), x) def replacement6722(a, b, m, n, x): return -Dist(b**(-m + S(-1)), Subst(Int(x**n*(-a + S(1)/cosh(x))**m*tanh(x)/cosh(x), x), x, asech(a + b*x)), x) def replacement6723(a, b, m, n, x): return -Dist(b**(-m + S(-1)), Subst(Int(x**n*(-a + S(1)/sinh(x))**m/(sinh(x)*tanh(x)), x), x, acsch(a + b*x)), x) def replacement6724(a, b, c, m, n, u, x): return Int(u*acosh(a/c + b*x**n/c)**m, x) def replacement6725(a, b, c, m, n, u, x): return Int(u*asinh(a/c + b*x**n/c)**m, x) def replacement6726(a, x): return Dist(S(1)/a, Int(sqrt((-a*x + S(1))/(a*x + S(1)))/(x*(-a*x + S(1))), x), x) + Simp(log(x)/a, x) + Simp(x*exp(asech(a*x)), x) def replacement6727(a, p, x): return Dist(p/a, Int(x**(-p), x), x) + Dist(p*sqrt(a*x**p + S(1))*sqrt(S(1)/(a*x**p + S(1)))/a, Int(x**(-p)/(sqrt(-a*x**p + S(1))*sqrt(a*x**p + S(1))), x), x) + Simp(x*exp(asech(a*x**p)), x) def replacement6728(a, p, x): return Dist(S(1)/a, Int(x**(-p), x), x) + Int(sqrt(S(1) + x**(-S(2)*p)/a**S(2)), x) def replacement6729(n, u, x): return Int((sqrt((S(1) - u)/(u + S(1))) + sqrt((S(1) - u)/(u + S(1)))/u + S(1)/u)**n, x) def replacement6730(n, u, x): return Int((sqrt(S(1) + u**(S(-2))) + S(1)/u)**n, x) def replacement6731(a, p, x): return Dist(sqrt(a*x**p + S(1))*sqrt(S(1)/(a*x**p + S(1)))/a, Int(x**(-p + S(-1))*sqrt(-a*x**p + S(1))*sqrt(a*x**p + S(1)), x), x) - Simp(x**(-p)/(a*p), x) def replacement6732(a, m, p, x): return Dist(p/(a*(m + S(1))), Int(x**(m - p), x), x) + Dist(p*sqrt(a*x**p + S(1))*sqrt(S(1)/(a*x**p + S(1)))/(a*(m + S(1))), Int(x**(m - p)/(sqrt(-a*x**p + S(1))*sqrt(a*x**p + S(1))), x), x) + Simp(x**(m + S(1))*exp(asech(a*x**p))/(m + S(1)), x) def replacement6733(a, m, p, x): return Dist(S(1)/a, Int(x**(m - p), x), x) + Int(x**m*sqrt(S(1) + x**(-S(2)*p)/a**S(2)), x) def replacement6734(m, n, u, x): return Int(x**m*(sqrt((S(1) - u)/(u + S(1))) + sqrt((S(1) - u)/(u + S(1)))/u + S(1)/u)**n, x) def replacement6735(m, n, u, x): return Int(x**m*(sqrt(S(1) + u**(S(-2))) + S(1)/u)**n, x) def replacement6736(u, x): return Dist(sqrt(S(1) - u**S(2))/(u*sqrt(S(-1) + S(1)/u)*sqrt(S(1) + S(1)/u)), Int(SimplifyIntegrand(x*D(u, x)/(u*sqrt(S(1) - u**S(2))), x), x), x) + Simp(x*asech(u), x) def replacement6737(u, x): return -Dist(u/sqrt(-u**S(2)), Int(SimplifyIntegrand(x*D(u, x)/(u*sqrt(-u**S(2) + S(-1))), x), x), x) + Simp(x*acsch(u), x) def replacement6738(a, b, c, d, m, u, x): return Dist(b*sqrt(S(1) - u**S(2))/(d*u*sqrt(S(-1) + S(1)/u)*sqrt(S(1) + S(1)/u)*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(u*sqrt(S(1) - u**S(2))), x), x), x) + Simp((a + b*asech(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement6739(a, b, c, d, m, u, x): return -Dist(b*u/(d*sqrt(-u**S(2))*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(u*sqrt(-u**S(2) + S(-1))), x), x), x) + Simp((a + b*acsch(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def With6740(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement6740(a, b, u, v, x): w = IntHide(v, x) return Dist(b*sqrt(S(1) - u**S(2))/(u*sqrt(S(-1) + S(1)/u)*sqrt(S(1) + S(1)/u)), Int(SimplifyIntegrand(w*D(u, x)/(u*sqrt(S(1) - u**S(2))), x), x), x) + Dist(a + b*asech(u), w, x) def With6741(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement6741(a, b, u, v, x): w = IntHide(v, x) return -Dist(b*u/sqrt(-u**S(2)), Int(SimplifyIntegrand(w*D(u, x)/(u*sqrt(-u**S(2) + S(-1))), x), x), x) + Dist(a + b*acsch(u), w, x)
41f4ce1a6a84f0befb5cca9c3de0596503f2302353842ef17369bb4270970231
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def inverse_trig(): from sympy.integrals.rubi.constraints import cons89, cons90, cons2, cons3, cons8, cons91, cons1581, cons4, cons150, cons68, cons29, cons19, cons64, cons1736, cons1737, cons1738, cons1739, cons270, cons50, cons586, cons1740, cons130, cons340, cons165, cons139, cons232, cons5, cons1741, cons1742, cons1743, cons1744, cons1745, cons40, cons1746, cons1572, cons338, cons1747, cons149, cons127, cons210, cons56, cons244, cons1748, cons349, cons1749, cons488, cons963, cons95, cons96, cons164, cons274, cons1750, cons20, cons168, cons276, cons1751, cons21, cons1752, cons240, cons239, cons1753, cons248, cons1754, cons1755, cons1756, cons1757, cons1758, cons211, cons927, cons466, cons86, cons1759, cons1760, cons721, cons170, cons1761, cons669, cons1762, cons269, cons719, cons1763, cons1610, cons14, cons152, cons1200, cons1275, cons1362, cons1764, cons1765, cons36, cons37, cons38, cons1766, cons1767, cons167, cons1444, cons1768, cons1769, cons1770, cons1232, cons1771, cons1772, cons1773, cons1774, cons342, cons1775, cons1776, cons1777, cons1778, cons1045, cons87, cons33, cons1779, cons1499, cons1780, cons13, cons1781, cons1782, cons1783, cons1784, cons242, cons243, cons148, cons1785, cons1512, cons1786, cons1154, cons321, cons1787, cons1788, cons1789, cons1790, cons1791, cons1792, cons1793, cons1794, cons1795, cons1796, cons1797, cons1798, cons603, cons1799, cons263, cons1800, cons1801, cons1802, cons1803, cons1804, cons1805, cons1806, cons1807, cons179, cons119, cons1808, cons1809, cons1810, cons1811, cons1812, cons1813, cons1814, cons1815, cons1816, cons1817, cons1818, cons1819, cons1582, cons1820, cons1821, cons1822, cons1823, cons1824, cons1825, cons1826, cons1827, cons1828, cons1829, cons1830, cons1831, cons1832, cons1096, cons1833, cons1834, cons1835, cons1836, cons1837, cons385, cons1838, cons1839, cons820, cons465, cons1840, cons1841, cons1842, cons1843, cons1844, cons1845, cons1846, cons69, cons1847, cons1848, cons1849, cons1850, cons1851, cons1852, cons1853, cons554, cons1148, cons1854, cons1855, cons1244, cons1245, cons1856, cons180, cons1857, cons1858, cons1301, cons1859, cons1860 pattern5034 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons89, cons90) rule5034 = ReplacementRule(pattern5034, replacement5034) pattern5035 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons89, cons90) rule5035 = ReplacementRule(pattern5035, replacement5035) pattern5036 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons89, cons91) rule5036 = ReplacementRule(pattern5036, replacement5036) pattern5037 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons89, cons91) rule5037 = ReplacementRule(pattern5037, replacement5037) pattern5038 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons1581) rule5038 = ReplacementRule(pattern5038, replacement5038) pattern5039 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons1581) rule5039 = ReplacementRule(pattern5039, replacement5039) pattern5040 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/x_, x_), cons2, cons3, cons8, cons150) rule5040 = ReplacementRule(pattern5040, replacement5040) pattern5041 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/x_, x_), cons2, cons3, cons8, cons150) rule5041 = ReplacementRule(pattern5041, replacement5041) pattern5042 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons150, cons68) rule5042 = ReplacementRule(pattern5042, replacement5042) pattern5043 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons150, cons68) rule5043 = ReplacementRule(pattern5043, replacement5043) pattern5044 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons90) rule5044 = ReplacementRule(pattern5044, replacement5044) pattern5045 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons90) rule5045 = ReplacementRule(pattern5045, replacement5045) pattern5046 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons1736) rule5046 = ReplacementRule(pattern5046, replacement5046) pattern5047 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons1736) rule5047 = ReplacementRule(pattern5047, replacement5047) pattern5048 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons1737) rule5048 = ReplacementRule(pattern5048, replacement5048) pattern5049 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons64, cons89, cons1737) rule5049 = ReplacementRule(pattern5049, replacement5049) pattern5050 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons64) rule5050 = ReplacementRule(pattern5050, replacement5050) pattern5051 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons64) rule5051 = ReplacementRule(pattern5051, replacement5051) pattern5052 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1738) rule5052 = ReplacementRule(pattern5052, replacement5052) pattern5053 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1738) rule5053 = ReplacementRule(pattern5053, replacement5053) pattern5054 = Pattern(Integral(S(1)/(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons270) rule5054 = ReplacementRule(pattern5054, replacement5054) pattern5055 = Pattern(Integral(S(1)/(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons270) rule5055 = ReplacementRule(pattern5055, replacement5055) pattern5056 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons270, cons586) rule5056 = ReplacementRule(pattern5056, replacement5056) pattern5057 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons270, cons586) rule5057 = ReplacementRule(pattern5057, replacement5057) pattern5058 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1740) rule5058 = ReplacementRule(pattern5058, replacement5058) pattern5059 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1740) rule5059 = ReplacementRule(pattern5059, replacement5059) pattern5060 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons130) rule5060 = ReplacementRule(pattern5060, With5060) pattern5061 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons130) rule5061 = ReplacementRule(pattern5061, With5061) pattern5062 = Pattern(Integral(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule5062 = ReplacementRule(pattern5062, replacement5062) pattern5063 = Pattern(Integral(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule5063 = ReplacementRule(pattern5063, replacement5063) pattern5064 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons90, cons165) rule5064 = ReplacementRule(pattern5064, replacement5064) pattern5065 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons90, cons165) rule5065 = ReplacementRule(pattern5065, replacement5065) pattern5066 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons270) rule5066 = ReplacementRule(pattern5066, replacement5066) pattern5067 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90, cons270) rule5067 = ReplacementRule(pattern5067, replacement5067) pattern5068 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule5068 = ReplacementRule(pattern5068, replacement5068) pattern5069 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons89, cons90) rule5069 = ReplacementRule(pattern5069, replacement5069) pattern5070 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons90, cons139, cons232) rule5070 = ReplacementRule(pattern5070, replacement5070) pattern5071 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons340, cons90, cons139, cons232) rule5071 = ReplacementRule(pattern5071, replacement5071) pattern5072 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule5072 = ReplacementRule(pattern5072, replacement5072) pattern5073 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule5073 = ReplacementRule(pattern5073, replacement5073) pattern5074 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons91) rule5074 = ReplacementRule(pattern5074, replacement5074) pattern5075 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons91) rule5075 = ReplacementRule(pattern5075, replacement5075) pattern5076 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1741, cons1742) rule5076 = ReplacementRule(pattern5076, replacement5076) pattern5077 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1741, cons1742) rule5077 = ReplacementRule(pattern5077, replacement5077) pattern5078 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1741, cons1743) rule5078 = ReplacementRule(pattern5078, replacement5078) pattern5079 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons1741, cons1743) rule5079 = ReplacementRule(pattern5079, replacement5079) pattern5080 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1744, cons1745) rule5080 = ReplacementRule(pattern5080, With5080) pattern5081 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1744, cons1745) rule5081 = ReplacementRule(pattern5081, With5081) pattern5082 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1744, cons40, cons1746) rule5082 = ReplacementRule(pattern5082, replacement5082) pattern5083 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1744, cons40, cons1746) rule5083 = ReplacementRule(pattern5083, replacement5083) pattern5084 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule5084 = ReplacementRule(pattern5084, replacement5084) pattern5085 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule5085 = ReplacementRule(pattern5085, replacement5085) pattern5086 = Pattern(Integral((d_ + x_*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons338, cons1747, cons149) rule5086 = ReplacementRule(pattern5086, replacement5086) pattern5087 = Pattern(Integral((d_ + x_*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons338, cons1747, cons149) rule5087 = ReplacementRule(pattern5087, replacement5087) pattern5088 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule5088 = ReplacementRule(pattern5088, replacement5088) pattern5089 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule5089 = ReplacementRule(pattern5089, replacement5089) pattern5090 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons56) rule5090 = ReplacementRule(pattern5090, replacement5090) pattern5091 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1739, cons89, cons90, cons56) rule5091 = ReplacementRule(pattern5091, replacement5091) pattern5092 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule5092 = ReplacementRule(pattern5092, replacement5092) pattern5093 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons150) rule5093 = ReplacementRule(pattern5093, replacement5093) pattern5094 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1739, cons89, cons90, cons244, cons68) rule5094 = ReplacementRule(pattern5094, replacement5094) pattern5095 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1739, cons89, cons90, cons244, cons68) rule5095 = ReplacementRule(pattern5095, replacement5095) pattern5096 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))/x_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons130) rule5096 = ReplacementRule(pattern5096, replacement5096) pattern5097 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))/x_, x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons130) rule5097 = ReplacementRule(pattern5097, replacement5097) pattern5098 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons130, cons1748) rule5098 = ReplacementRule(pattern5098, replacement5098) pattern5099 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons130, cons1748) rule5099 = ReplacementRule(pattern5099, replacement5099) pattern5100 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons130) rule5100 = ReplacementRule(pattern5100, With5100) pattern5101 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons130) rule5101 = ReplacementRule(pattern5101, With5101) pattern5102 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons349, cons1749, cons488, cons270) rule5102 = ReplacementRule(pattern5102, With5102) pattern5103 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons349, cons1749, cons488, cons270) rule5103 = ReplacementRule(pattern5103, With5103) pattern5104 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons963, cons1749) rule5104 = ReplacementRule(pattern5104, With5104) pattern5105 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons963, cons1749) rule5105 = ReplacementRule(pattern5105, With5105) pattern5106 = Pattern(Integral((x_*WC('f', S(1)))**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons95, cons90, cons96) rule5106 = ReplacementRule(pattern5106, replacement5106) pattern5107 = Pattern(Integral((x_*WC('f', S(1)))**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons95, cons90, cons96) rule5107 = ReplacementRule(pattern5107, replacement5107) pattern5108 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons164, cons90, cons165, cons96) rule5108 = ReplacementRule(pattern5108, replacement5108) pattern5109 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons164, cons90, cons165, cons96) rule5109 = ReplacementRule(pattern5109, replacement5109) pattern5110 = Pattern(Integral((x_*WC('f', S(1)))**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons89, cons90, cons274, cons1750) rule5110 = ReplacementRule(pattern5110, replacement5110) pattern5111 = Pattern(Integral((x_*WC('f', S(1)))**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons89, cons90, cons274, cons1750) rule5111 = ReplacementRule(pattern5111, replacement5111) pattern5112 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons340, cons90, cons165, cons274, cons1750) rule5112 = ReplacementRule(pattern5112, replacement5112) pattern5113 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons340, cons90, cons165, cons274, cons1750) rule5113 = ReplacementRule(pattern5113, replacement5113) pattern5114 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons1739, cons95, cons90, cons96, cons20) rule5114 = ReplacementRule(pattern5114, replacement5114) pattern5115 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons1739, cons95, cons90, cons96, cons20) rule5115 = ReplacementRule(pattern5115, replacement5115) pattern5116 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons164, cons90, cons139, cons168) rule5116 = ReplacementRule(pattern5116, replacement5116) pattern5117 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons164, cons90, cons139, cons168) rule5117 = ReplacementRule(pattern5117, replacement5117) pattern5118 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons340, cons90, cons139, cons276, cons1751) rule5118 = ReplacementRule(pattern5118, replacement5118) pattern5119 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons340, cons90, cons139, cons276, cons1751) rule5119 = ReplacementRule(pattern5119, replacement5119) pattern5120 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons95, cons90, cons168, cons20) rule5120 = ReplacementRule(pattern5120, replacement5120) pattern5121 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons95, cons90, cons168, cons20) rule5121 = ReplacementRule(pattern5121, replacement5121) pattern5122 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons270, cons150, cons20) rule5122 = ReplacementRule(pattern5122, replacement5122) pattern5123 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1739, cons270, cons150, cons20) rule5123 = ReplacementRule(pattern5123, replacement5123) pattern5124 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons270, cons21) rule5124 = ReplacementRule(pattern5124, replacement5124) pattern5125 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons270, cons21) rule5125 = ReplacementRule(pattern5125, replacement5125) pattern5126 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons89, cons90, cons1740, cons1752) rule5126 = ReplacementRule(pattern5126, replacement5126) pattern5127 = Pattern(Integral((x_*WC('f', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons89, cons90, cons1740, cons1752) rule5127 = ReplacementRule(pattern5127, replacement5127) pattern5128 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons1739, cons95, cons90, cons168, cons240, cons20) rule5128 = ReplacementRule(pattern5128, replacement5128) pattern5129 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons1739, cons95, cons90, cons168, cons240, cons20) rule5129 = ReplacementRule(pattern5129, replacement5129) pattern5130 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1739, cons89, cons91, cons239) rule5130 = ReplacementRule(pattern5130, replacement5130) pattern5131 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1739, cons89, cons91, cons239) rule5131 = ReplacementRule(pattern5131, replacement5131) pattern5132 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons89, cons91, cons270) rule5132 = ReplacementRule(pattern5132, replacement5132) pattern5133 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1739, cons89, cons91, cons270) rule5133 = ReplacementRule(pattern5133, replacement5133) pattern5134 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons89, cons91, cons20, cons1753, cons1741) rule5134 = ReplacementRule(pattern5134, replacement5134) pattern5135 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1739, cons89, cons91, cons20, cons1753, cons1741) rule5135 = ReplacementRule(pattern5135, replacement5135) pattern5136 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons248, cons1754, cons64, cons1742) rule5136 = ReplacementRule(pattern5136, replacement5136) pattern5137 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons248, cons1754, cons64, cons1742) rule5137 = ReplacementRule(pattern5137, replacement5137) pattern5138 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons248, cons1754, cons64, cons1743) rule5138 = ReplacementRule(pattern5138, replacement5138) pattern5139 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons248, cons1754, cons64, cons1743) rule5139 = ReplacementRule(pattern5139, replacement5139) pattern5140 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1739, cons270, cons963, cons1755, cons20, cons1756) rule5140 = ReplacementRule(pattern5140, replacement5140) pattern5141 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1739, cons270, cons963, cons1755, cons20, cons1756) rule5141 = ReplacementRule(pattern5141, replacement5141) pattern5142 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1744, cons56) rule5142 = ReplacementRule(pattern5142, replacement5142) pattern5143 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1744, cons56) rule5143 = ReplacementRule(pattern5143, replacement5143) pattern5144 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1744, cons40, cons1757) rule5144 = ReplacementRule(pattern5144, With5144) pattern5145 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1744, cons40, cons1757) rule5145 = ReplacementRule(pattern5145, With5145) pattern5146 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1744, cons150, cons40, cons20) rule5146 = ReplacementRule(pattern5146, replacement5146) pattern5147 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1744, cons150, cons40, cons20) rule5147 = ReplacementRule(pattern5147, replacement5147) pattern5148 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons1758) rule5148 = ReplacementRule(pattern5148, replacement5148) pattern5149 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons1758) rule5149 = ReplacementRule(pattern5149, replacement5149) pattern5150 = Pattern(Integral((x_*WC('h', S(1)))**WC('m', S(1))*(d_ + x_*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons338, cons1747, cons149) rule5150 = ReplacementRule(pattern5150, replacement5150) pattern5151 = Pattern(Integral((x_*WC('h', S(1)))**WC('m', S(1))*(d_ + x_*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons338, cons1747, cons149) rule5151 = ReplacementRule(pattern5151, replacement5151) pattern5152 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons150) rule5152 = ReplacementRule(pattern5152, replacement5152) pattern5153 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons150) rule5153 = ReplacementRule(pattern5153, replacement5153) pattern5154 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons150, cons68) rule5154 = ReplacementRule(pattern5154, replacement5154) pattern5155 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons150, cons68) rule5155 = ReplacementRule(pattern5155, replacement5155) pattern5156 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons64, cons89, cons91) rule5156 = ReplacementRule(pattern5156, replacement5156) pattern5157 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons64, cons89, cons91) rule5157 = ReplacementRule(pattern5157, replacement5157) pattern5158 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons64) rule5158 = ReplacementRule(pattern5158, replacement5158) pattern5159 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons64) rule5159 = ReplacementRule(pattern5159, replacement5159) pattern5160 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons927) rule5160 = ReplacementRule(pattern5160, With5160) pattern5161 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons927) rule5161 = ReplacementRule(pattern5161, With5161) pattern5162 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons927) rule5162 = ReplacementRule(pattern5162, replacement5162) pattern5163 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons927) rule5163 = ReplacementRule(pattern5163, replacement5163) pattern5164 = Pattern(Integral(Px_*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons927) rule5164 = ReplacementRule(pattern5164, With5164) pattern5165 = Pattern(Integral(Px_*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons927) rule5165 = ReplacementRule(pattern5165, With5165) pattern5166 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons466, cons86, cons1759) rule5166 = ReplacementRule(pattern5166, With5166) pattern5167 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons466, cons86, cons1759) rule5167 = ReplacementRule(pattern5167, With5167) pattern5168 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_*(x_**S(2)*WC('h', S(1)) + x_*WC('g', S(1)) + WC('f', S(0)))**WC('p', S(1))/(d_ + x_*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons466, cons1760) rule5168 = ReplacementRule(pattern5168, With5168) pattern5169 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_*(x_**S(2)*WC('h', S(1)) + x_*WC('g', S(1)) + WC('f', S(0)))**WC('p', S(1))/(d_ + x_*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons466, cons1760) rule5169 = ReplacementRule(pattern5169, With5169) pattern5170 = Pattern(Integral(Px_*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons927, cons150, cons20) rule5170 = ReplacementRule(pattern5170, replacement5170) pattern5171 = Pattern(Integral(Px_*(d_ + x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons927, cons150, cons20) rule5171 = ReplacementRule(pattern5171, replacement5171) pattern5172 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons721, cons270, cons170, cons1761) rule5172 = ReplacementRule(pattern5172, With5172) pattern5173 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons721, cons270, cons170, cons1761) rule5173 = ReplacementRule(pattern5173, With5173) pattern5174 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons669, cons270, cons150, cons170, cons1762) rule5174 = ReplacementRule(pattern5174, replacement5174) pattern5175 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons669, cons270, cons150, cons170, cons1762) rule5175 = ReplacementRule(pattern5175, replacement5175) pattern5176 = Pattern(Integral(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(f_ + x_*WC('g', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons270, cons150, cons269) rule5176 = ReplacementRule(pattern5176, replacement5176) pattern5177 = Pattern(Integral(sqrt(d_ + x_**S(2)*WC('e', S(1)))*(f_ + x_*WC('g', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons270, cons150, cons269) rule5177 = ReplacementRule(pattern5177, replacement5177) pattern5178 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons963, cons270, cons150) rule5178 = ReplacementRule(pattern5178, replacement5178) pattern5179 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons963, cons270, cons150) rule5179 = ReplacementRule(pattern5179, replacement5179) pattern5180 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons719, cons270, cons150, cons269) rule5180 = ReplacementRule(pattern5180, replacement5180) pattern5181 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons719, cons270, cons150, cons269) rule5181 = ReplacementRule(pattern5181, replacement5181) pattern5182 = Pattern(Integral((f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**n_/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons270, cons170, cons89, cons91) rule5182 = ReplacementRule(pattern5182, replacement5182) pattern5183 = Pattern(Integral((f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**n_/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons270, cons170, cons89, cons91) rule5183 = ReplacementRule(pattern5183, replacement5183) pattern5184 = Pattern(Integral((f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1739, cons20, cons270, cons1763) rule5184 = ReplacementRule(pattern5184, replacement5184) pattern5185 = Pattern(Integral((f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1739, cons20, cons270, cons1763) rule5185 = ReplacementRule(pattern5185, replacement5185) pattern5186 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons721, cons270, cons150) rule5186 = ReplacementRule(pattern5186, replacement5186) pattern5187 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1739, cons20, cons721, cons270, cons150) rule5187 = ReplacementRule(pattern5187, replacement5187) pattern5188 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1739, cons20, cons349, cons1740) rule5188 = ReplacementRule(pattern5188, replacement5188) pattern5189 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1739, cons20, cons349, cons1740) rule5189 = ReplacementRule(pattern5189, replacement5189) pattern5190 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1)))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons1739, cons270, cons150) rule5190 = ReplacementRule(pattern5190, replacement5190) pattern5191 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1)))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons1739, cons270, cons150) rule5191 = ReplacementRule(pattern5191, replacement5191) pattern5192 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons1739, cons349, cons1740) rule5192 = ReplacementRule(pattern5192, replacement5192) pattern5193 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*WC('h', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons1739, cons349, cons1740) rule5193 = ReplacementRule(pattern5193, replacement5193) pattern5194 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(f_ + x_*WC('g', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1610) rule5194 = ReplacementRule(pattern5194, With5194) pattern5195 = Pattern(Integral((d_ + x_*WC('e', S(1)))**m_*(f_ + x_*WC('g', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1610) rule5195 = ReplacementRule(pattern5195, With5195) pattern5196 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons20) rule5196 = ReplacementRule(pattern5196, replacement5196) pattern5197 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('m', S(1))*(f_ + x_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons20) rule5197 = ReplacementRule(pattern5197, replacement5197) pattern5198 = Pattern(Integral(u_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons14, CustomConstraint(With5198)) rule5198 = ReplacementRule(pattern5198, replacement5198) pattern5199 = Pattern(Integral(u_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons14, CustomConstraint(With5199)) rule5199 = ReplacementRule(pattern5199, replacement5199) pattern5200 = Pattern(Integral(Px_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons927, cons1739, cons349, CustomConstraint(With5200)) rule5200 = ReplacementRule(pattern5200, replacement5200) pattern5201 = Pattern(Integral(Px_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons927, cons1739, cons349, CustomConstraint(With5201)) rule5201 = ReplacementRule(pattern5201, replacement5201) pattern5202 = Pattern(Integral((f_ + (d_ + x_**S(2)*WC('e', S(1)))**p_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))*WC('Px', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons927, cons1739, cons963, cons152, CustomConstraint(With5202)) rule5202 = ReplacementRule(pattern5202, replacement5202) pattern5203 = Pattern(Integral((f_ + (d_ + x_**S(2)*WC('e', S(1)))**p_*WC('g', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))*WC('Px', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons927, cons1739, cons963, cons152, CustomConstraint(With5203)) rule5203 = ReplacementRule(pattern5203, replacement5203) pattern5204 = Pattern(Integral(RFx_*asin(x_*WC('c', S(1)))**WC('n', S(1)), x_), cons8, cons1200, cons150, CustomConstraint(With5204)) rule5204 = ReplacementRule(pattern5204, replacement5204) pattern5205 = Pattern(Integral(RFx_*acos(x_*WC('c', S(1)))**WC('n', S(1)), x_), cons8, cons1200, cons150, CustomConstraint(With5205)) rule5205 = ReplacementRule(pattern5205, replacement5205) pattern5206 = Pattern(Integral(RFx_*(a_ + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons1200, cons150) rule5206 = ReplacementRule(pattern5206, replacement5206) pattern5207 = Pattern(Integral(RFx_*(a_ + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons1200, cons150) rule5207 = ReplacementRule(pattern5207, replacement5207) pattern5208 = Pattern(Integral(RFx_*(d_ + x_**S(2)*WC('e', S(1)))**p_*asin(x_*WC('c', S(1)))**WC('n', S(1)), x_), cons8, cons29, cons50, cons1200, cons150, cons1739, cons349, CustomConstraint(With5208)) rule5208 = ReplacementRule(pattern5208, replacement5208) pattern5209 = Pattern(Integral(RFx_*(d_ + x_**S(2)*WC('e', S(1)))**p_*acos(x_*WC('c', S(1)))**WC('n', S(1)), x_), cons8, cons29, cons50, cons1200, cons150, cons1739, cons349, CustomConstraint(With5209)) rule5209 = ReplacementRule(pattern5209, replacement5209) pattern5210 = Pattern(Integral(RFx_*(a_ + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons1200, cons150, cons1739, cons349) rule5210 = ReplacementRule(pattern5210, replacement5210) pattern5211 = Pattern(Integral(RFx_*(a_ + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons1200, cons150, cons1739, cons349) rule5211 = ReplacementRule(pattern5211, replacement5211) pattern5212 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(x_*WC('c', S(1))))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons1581) rule5212 = ReplacementRule(pattern5212, replacement5212) pattern5213 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_*WC('c', S(1))))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons1581) rule5213 = ReplacementRule(pattern5213, replacement5213) pattern5214 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1275) rule5214 = ReplacementRule(pattern5214, replacement5214) pattern5215 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1275) rule5215 = ReplacementRule(pattern5215, replacement5215) pattern5216 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule5216 = ReplacementRule(pattern5216, replacement5216) pattern5217 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule5217 = ReplacementRule(pattern5217, replacement5217) pattern5218 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons38, cons4, cons5, cons1764, cons1765) rule5218 = ReplacementRule(pattern5218, replacement5218) pattern5219 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons38, cons4, cons5, cons1764, cons1765) rule5219 = ReplacementRule(pattern5219, replacement5219) pattern5220 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons1764, cons1765) rule5220 = ReplacementRule(pattern5220, replacement5220) pattern5221 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons1764, cons1765) rule5221 = ReplacementRule(pattern5221, replacement5221) pattern5222 = Pattern(Integral(sqrt(WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons1766) rule5222 = ReplacementRule(pattern5222, replacement5222) pattern5223 = Pattern(Integral(sqrt(WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(1))), x_), cons2, cons3, cons29, cons1767) rule5223 = ReplacementRule(pattern5223, replacement5223) pattern5224 = Pattern(Integral(sqrt(WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(-1))), x_), cons2, cons3, cons29, cons1767) rule5224 = ReplacementRule(pattern5224, replacement5224) pattern5225 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_**S(2)*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons1766, cons89, cons167) rule5225 = ReplacementRule(pattern5225, replacement5225) pattern5226 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(c_ + x_**S(2)*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons1766, cons89, cons167) rule5226 = ReplacementRule(pattern5226, replacement5226) pattern5227 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons1766) rule5227 = ReplacementRule(pattern5227, replacement5227) pattern5228 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(1))), x_), cons2, cons3, cons29, cons1767) rule5228 = ReplacementRule(pattern5228, replacement5228) pattern5229 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(-1))), x_), cons2, cons3, cons29, cons1767) rule5229 = ReplacementRule(pattern5229, replacement5229) pattern5230 = Pattern(Integral(S(1)/sqrt(WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons1766) rule5230 = ReplacementRule(pattern5230, replacement5230) pattern5231 = Pattern(Integral(S(1)/sqrt(WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(1))), x_), cons2, cons3, cons29, cons1767) rule5231 = ReplacementRule(pattern5231, replacement5231) pattern5232 = Pattern(Integral(S(1)/sqrt(WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(-1))), x_), cons2, cons3, cons29, cons1767) rule5232 = ReplacementRule(pattern5232, replacement5232) pattern5233 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_**S(2)*WC('d', S(1))))**(S(-3)/2), x_), cons2, cons3, cons8, cons29, cons1766) rule5233 = ReplacementRule(pattern5233, replacement5233) pattern5234 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(1)))**(S(-3)/2), x_), cons2, cons3, cons29, cons1767) rule5234 = ReplacementRule(pattern5234, replacement5234) pattern5235 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(-1)))**(S(-3)/2), x_), cons2, cons3, cons29, cons1767) rule5235 = ReplacementRule(pattern5235, replacement5235) pattern5236 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_**S(2)*WC('d', S(1))))**(S(-2)), x_), cons2, cons3, cons8, cons29, cons1766) rule5236 = ReplacementRule(pattern5236, replacement5236) pattern5237 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(1)))**(S(-2)), x_), cons2, cons3, cons29, cons1767) rule5237 = ReplacementRule(pattern5237, replacement5237) pattern5238 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(x_**S(2)*WC('d', S(1)) + S(-1)))**(S(-2)), x_), cons2, cons3, cons29, cons1767) rule5238 = ReplacementRule(pattern5238, replacement5238) pattern5239 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asin(c_ + x_**S(2)*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons1766, cons89, cons91, cons1444) rule5239 = ReplacementRule(pattern5239, replacement5239) pattern5240 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acos(c_ + x_**S(2)*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons1766, cons89, cons91, cons1444) rule5240 = ReplacementRule(pattern5240, replacement5240) pattern5241 = Pattern(Integral(asin(x_**p_*WC('a', S(1)))**WC('n', S(1))/x_, x_), cons2, cons5, cons150) rule5241 = ReplacementRule(pattern5241, replacement5241) pattern5242 = Pattern(Integral(acos(x_**p_*WC('a', S(1)))**WC('n', S(1))/x_, x_), cons2, cons5, cons150) rule5242 = ReplacementRule(pattern5242, replacement5242) pattern5243 = Pattern(Integral(WC('u', S(1))*asin(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule5243 = ReplacementRule(pattern5243, replacement5243) pattern5244 = Pattern(Integral(WC('u', S(1))*acos(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule5244 = ReplacementRule(pattern5244, replacement5244) pattern5245 = Pattern(Integral(asin(sqrt(x_**S(2)*WC('b', S(1)) + S(1)))**WC('n', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + S(1)), x_), cons3, cons4, cons1769) rule5245 = ReplacementRule(pattern5245, replacement5245) pattern5246 = Pattern(Integral(acos(sqrt(x_**S(2)*WC('b', S(1)) + S(1)))**WC('n', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + S(1)), x_), cons3, cons4, cons1769) rule5246 = ReplacementRule(pattern5246, replacement5246) pattern5247 = Pattern(Integral(f_**(WC('c', S(1))*asin(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)))*WC('u', S(1)), x_), cons2, cons3, cons8, cons127, cons150) rule5247 = ReplacementRule(pattern5247, replacement5247) pattern5248 = Pattern(Integral(f_**(WC('c', S(1))*acos(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)))*WC('u', S(1)), x_), cons2, cons3, cons8, cons127, cons150) rule5248 = ReplacementRule(pattern5248, replacement5248) pattern5249 = Pattern(Integral(asin(x_**S(2)*WC('a', S(1)) + sqrt(c_ + x_**S(2)*WC('d', S(1)))*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons1770) rule5249 = ReplacementRule(pattern5249, replacement5249) pattern5250 = Pattern(Integral(acos(x_**S(2)*WC('a', S(1)) + sqrt(c_ + x_**S(2)*WC('d', S(1)))*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons1770) rule5250 = ReplacementRule(pattern5250, replacement5250) pattern5251 = Pattern(Integral(asin(u_), x_), cons1232, cons1771) rule5251 = ReplacementRule(pattern5251, replacement5251) pattern5252 = Pattern(Integral(acos(u_), x_), cons1232, cons1771) rule5252 = ReplacementRule(pattern5252, replacement5252) pattern5253 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asin(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1771) rule5253 = ReplacementRule(pattern5253, replacement5253) pattern5254 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acos(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1771) rule5254 = ReplacementRule(pattern5254, replacement5254) pattern5255 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*asin(u_)), x_), cons2, cons3, cons1232, cons1773, CustomConstraint(With5255)) rule5255 = ReplacementRule(pattern5255, replacement5255) pattern5256 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*acos(u_)), x_), cons2, cons3, cons1232, cons1774, CustomConstraint(With5256)) rule5256 = ReplacementRule(pattern5256, replacement5256) pattern5257 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons150) rule5257 = ReplacementRule(pattern5257, replacement5257) pattern5258 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons150) rule5258 = ReplacementRule(pattern5258, replacement5258) pattern5259 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons4, cons342) rule5259 = ReplacementRule(pattern5259, replacement5259) pattern5260 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons342) rule5260 = ReplacementRule(pattern5260, replacement5260) pattern5261 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1775, cons150) rule5261 = ReplacementRule(pattern5261, replacement5261) pattern5262 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1775, cons150) rule5262 = ReplacementRule(pattern5262, replacement5262) pattern5263 = Pattern(Integral(ArcTan(x_*WC('c', S(1)))/(d_ + x_*WC('e', S(1))), x_), cons8, cons29, cons50, cons1776, cons1777) rule5263 = ReplacementRule(pattern5263, replacement5263) pattern5264 = Pattern(Integral(ArcTan(x_*WC('c', S(1)))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons8, cons29, cons50, cons1778) rule5264 = ReplacementRule(pattern5264, replacement5264) pattern5265 = Pattern(Integral(acot(x_*WC('c', S(1)))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons8, cons29, cons50, cons1778) rule5265 = ReplacementRule(pattern5265, replacement5265) pattern5266 = Pattern(Integral((a_ + ArcTan(x_*WC('c', S(1)))*WC('b', S(1)))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule5266 = ReplacementRule(pattern5266, replacement5266) pattern5267 = Pattern(Integral((a_ + WC('b', S(1))*acot(x_*WC('c', S(1))))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule5267 = ReplacementRule(pattern5267, replacement5267) pattern5268 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule5268 = ReplacementRule(pattern5268, replacement5268) pattern5269 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule5269 = ReplacementRule(pattern5269, replacement5269) pattern5270 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_/x_, x_), cons2, cons3, cons8, cons87, cons167) rule5270 = ReplacementRule(pattern5270, replacement5270) pattern5271 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_/x_, x_), cons2, cons3, cons8, cons87, cons167) rule5271 = ReplacementRule(pattern5271, replacement5271) pattern5272 = Pattern(Integral(x_**WC('m', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons19, cons87, cons167, cons68) rule5272 = ReplacementRule(pattern5272, replacement5272) pattern5273 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons19, cons87, cons167, cons68) rule5273 = ReplacementRule(pattern5273, replacement5273) pattern5274 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons466) rule5274 = ReplacementRule(pattern5274, replacement5274) pattern5275 = Pattern(Integral((d_ + x_*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons466) rule5275 = ReplacementRule(pattern5275, replacement5275) pattern5276 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule5276 = ReplacementRule(pattern5276, replacement5276) pattern5277 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule5277 = ReplacementRule(pattern5277, replacement5277) pattern5278 = Pattern(Integral(x_**WC('m', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1775, cons150, cons33, cons170) rule5278 = ReplacementRule(pattern5278, replacement5278) pattern5279 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1775, cons150, cons33, cons170) rule5279 = ReplacementRule(pattern5279, replacement5279) pattern5280 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_*(d_ + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1775, cons150) rule5280 = ReplacementRule(pattern5280, replacement5280) pattern5281 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1775, cons150) rule5281 = ReplacementRule(pattern5281, replacement5281) pattern5282 = Pattern(Integral(x_**m_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1775, cons150, cons33, cons96) rule5282 = ReplacementRule(pattern5282, replacement5282) pattern5283 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1775, cons150, cons33, cons96) rule5283 = ReplacementRule(pattern5283, replacement5283) pattern5284 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons1779) rule5284 = ReplacementRule(pattern5284, replacement5284) pattern5285 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons1779) rule5285 = ReplacementRule(pattern5285, replacement5285) pattern5286 = Pattern(Integral(x_**WC('m', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5286 = ReplacementRule(pattern5286, replacement5286) pattern5287 = Pattern(Integral(x_**WC('m', S(1))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5287 = ReplacementRule(pattern5287, replacement5287) pattern5288 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons13, cons165) rule5288 = ReplacementRule(pattern5288, replacement5288) pattern5289 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons13, cons165) rule5289 = ReplacementRule(pattern5289, replacement5289) pattern5290 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons340, cons165, cons167) rule5290 = ReplacementRule(pattern5290, replacement5290) pattern5291 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons340, cons165, cons167) rule5291 = ReplacementRule(pattern5291, replacement5291) pattern5292 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780) rule5292 = ReplacementRule(pattern5292, replacement5292) pattern5293 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons1780) rule5293 = ReplacementRule(pattern5293, replacement5293) pattern5294 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons586) rule5294 = ReplacementRule(pattern5294, replacement5294) pattern5295 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons586) rule5295 = ReplacementRule(pattern5295, replacement5295) pattern5296 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons270) rule5296 = ReplacementRule(pattern5296, replacement5296) pattern5297 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons270) rule5297 = ReplacementRule(pattern5297, replacement5297) pattern5298 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150, cons270) rule5298 = ReplacementRule(pattern5298, replacement5298) pattern5299 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150, cons270) rule5299 = ReplacementRule(pattern5299, replacement5299) pattern5300 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150, cons1740) rule5300 = ReplacementRule(pattern5300, replacement5300) pattern5301 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150, cons1740) rule5301 = ReplacementRule(pattern5301, replacement5301) pattern5302 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule5302 = ReplacementRule(pattern5302, replacement5302) pattern5303 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule5303 = ReplacementRule(pattern5303, replacement5303) pattern5304 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1780) rule5304 = ReplacementRule(pattern5304, replacement5304) pattern5305 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1780) rule5305 = ReplacementRule(pattern5305, replacement5305) pattern5306 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons13, cons139, cons232) rule5306 = ReplacementRule(pattern5306, replacement5306) pattern5307 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons13, cons139, cons232) rule5307 = ReplacementRule(pattern5307, replacement5307) pattern5308 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons167) rule5308 = ReplacementRule(pattern5308, replacement5308) pattern5309 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons167) rule5309 = ReplacementRule(pattern5309, replacement5309) pattern5310 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons340, cons139, cons167, cons232) rule5310 = ReplacementRule(pattern5310, replacement5310) pattern5311 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons340, cons139, cons167, cons232) rule5311 = ReplacementRule(pattern5311, replacement5311) pattern5312 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons340, cons139, cons91) rule5312 = ReplacementRule(pattern5312, replacement5312) pattern5313 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons340, cons139, cons91) rule5313 = ReplacementRule(pattern5313, replacement5313) pattern5314 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons1781, cons1742) rule5314 = ReplacementRule(pattern5314, replacement5314) pattern5315 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons1781, cons1743) rule5315 = ReplacementRule(pattern5315, replacement5315) pattern5316 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons1781, cons40) rule5316 = ReplacementRule(pattern5316, replacement5316) pattern5317 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons1781, cons149) rule5317 = ReplacementRule(pattern5317, replacement5317) pattern5318 = Pattern(Integral(ArcTan(x_*WC('c', S(1)))/(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons8, cons29, cons50, cons1778) rule5318 = ReplacementRule(pattern5318, replacement5318) pattern5319 = Pattern(Integral(acot(x_*WC('c', S(1)))/(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons8, cons29, cons50, cons1778) rule5319 = ReplacementRule(pattern5319, replacement5319) pattern5320 = Pattern(Integral((a_ + ArcTan(x_*WC('c', S(1)))*WC('b', S(1)))/(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule5320 = ReplacementRule(pattern5320, replacement5320) pattern5321 = Pattern(Integral((a_ + WC('b', S(1))*acot(x_*WC('c', S(1))))/(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule5321 = ReplacementRule(pattern5321, replacement5321) pattern5322 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1782) rule5322 = ReplacementRule(pattern5322, With5322) pattern5323 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1782) rule5323 = ReplacementRule(pattern5323, With5323) pattern5324 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons150) rule5324 = ReplacementRule(pattern5324, replacement5324) pattern5325 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons150) rule5325 = ReplacementRule(pattern5325, replacement5325) pattern5326 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule5326 = ReplacementRule(pattern5326, replacement5326) pattern5327 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule5327 = ReplacementRule(pattern5327, replacement5327) pattern5328 = Pattern(Integral(x_**m_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons95, cons90, cons168) rule5328 = ReplacementRule(pattern5328, replacement5328) pattern5329 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons95, cons90, cons168) rule5329 = ReplacementRule(pattern5329, replacement5329) pattern5330 = Pattern(Integral(x_**m_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons95, cons90, cons96) rule5330 = ReplacementRule(pattern5330, replacement5330) pattern5331 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons95, cons90, cons96) rule5331 = ReplacementRule(pattern5331, replacement5331) pattern5332 = Pattern(Integral(x_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150) rule5332 = ReplacementRule(pattern5332, replacement5332) pattern5333 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150) rule5333 = ReplacementRule(pattern5333, replacement5333) pattern5334 = Pattern(Integral(x_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons342, cons586) rule5334 = ReplacementRule(pattern5334, replacement5334) pattern5335 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons342, cons586) rule5335 = ReplacementRule(pattern5335, replacement5335) pattern5336 = Pattern(Integral(x_**m_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons95, cons90, cons168) rule5336 = ReplacementRule(pattern5336, replacement5336) pattern5337 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons95, cons90, cons168) rule5337 = ReplacementRule(pattern5337, replacement5337) pattern5338 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule5338 = ReplacementRule(pattern5338, replacement5338) pattern5339 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(x_*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule5339 = ReplacementRule(pattern5339, replacement5339) pattern5340 = Pattern(Integral(x_**m_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons95, cons90, cons96) rule5340 = ReplacementRule(pattern5340, replacement5340) pattern5341 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons95, cons90, cons96) rule5341 = ReplacementRule(pattern5341, replacement5341) pattern5342 = Pattern(Integral(x_**m_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons89, cons91) rule5342 = ReplacementRule(pattern5342, replacement5342) pattern5343 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons89, cons91) rule5343 = ReplacementRule(pattern5343, replacement5343) pattern5344 = Pattern(Integral(x_**WC('m', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons20, cons1783) rule5344 = ReplacementRule(pattern5344, replacement5344) pattern5345 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons20, cons1783) rule5345 = ReplacementRule(pattern5345, replacement5345) pattern5346 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1780, cons89, cons90, cons56) rule5346 = ReplacementRule(pattern5346, replacement5346) pattern5347 = Pattern(Integral(x_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1780, cons89, cons90, cons56) rule5347 = ReplacementRule(pattern5347, replacement5347) pattern5348 = Pattern(Integral(x_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons91, cons1444) rule5348 = ReplacementRule(pattern5348, replacement5348) pattern5349 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons91, cons1444) rule5349 = ReplacementRule(pattern5349, replacement5349) pattern5350 = Pattern(Integral(x_**S(2)*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons13, cons139, cons1784) rule5350 = ReplacementRule(pattern5350, replacement5350) pattern5351 = Pattern(Integral(x_**S(2)*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons13, cons139, cons1784) rule5351 = ReplacementRule(pattern5351, replacement5351) pattern5352 = Pattern(Integral(x_**S(2)*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule5352 = ReplacementRule(pattern5352, replacement5352) pattern5353 = Pattern(Integral(x_**S(2)*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule5353 = ReplacementRule(pattern5353, replacement5353) pattern5354 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons242, cons13, cons139) rule5354 = ReplacementRule(pattern5354, replacement5354) pattern5355 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons242, cons13, cons139) rule5355 = ReplacementRule(pattern5355, replacement5355) pattern5356 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons242, cons340, cons139, cons167) rule5356 = ReplacementRule(pattern5356, replacement5356) pattern5357 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons242, cons340, cons139, cons167) rule5357 = ReplacementRule(pattern5357, replacement5357) pattern5358 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1780, cons242, cons89, cons91) rule5358 = ReplacementRule(pattern5358, replacement5358) pattern5359 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1780, cons242, cons89, cons91) rule5359 = ReplacementRule(pattern5359, replacement5359) pattern5360 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1780, cons244, cons89, cons90, cons68) rule5360 = ReplacementRule(pattern5360, replacement5360) pattern5361 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1780, cons244, cons89, cons90, cons68) rule5361 = ReplacementRule(pattern5361, replacement5361) pattern5362 = Pattern(Integral(x_**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons243) rule5362 = ReplacementRule(pattern5362, replacement5362) pattern5363 = Pattern(Integral(x_**m_*sqrt(d_ + x_**S(2)*WC('e', S(1)))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons243) rule5363 = ReplacementRule(pattern5363, replacement5363) pattern5364 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons150, cons40, cons148) rule5364 = ReplacementRule(pattern5364, replacement5364) pattern5365 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons150, cons40, cons148) rule5365 = ReplacementRule(pattern5365, replacement5365) pattern5366 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons13, cons165, cons150, cons1785) rule5366 = ReplacementRule(pattern5366, replacement5366) pattern5367 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1780, cons13, cons165, cons150, cons1785) rule5367 = ReplacementRule(pattern5367, replacement5367) pattern5368 = Pattern(Integral(x_**m_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons95, cons90, cons168) rule5368 = ReplacementRule(pattern5368, replacement5368) pattern5369 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons95, cons90, cons168) rule5369 = ReplacementRule(pattern5369, replacement5369) pattern5370 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons270) rule5370 = ReplacementRule(pattern5370, replacement5370) pattern5371 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons270) rule5371 = ReplacementRule(pattern5371, replacement5371) pattern5372 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150, cons270) rule5372 = ReplacementRule(pattern5372, replacement5372) pattern5373 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**n_/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150, cons270) rule5373 = ReplacementRule(pattern5373, replacement5373) pattern5374 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150, cons1740) rule5374 = ReplacementRule(pattern5374, replacement5374) pattern5375 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(x_*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons150, cons1740) rule5375 = ReplacementRule(pattern5375, replacement5375) pattern5376 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule5376 = ReplacementRule(pattern5376, replacement5376) pattern5377 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(x_**S(2)*sqrt(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90) rule5377 = ReplacementRule(pattern5377, replacement5377) pattern5378 = Pattern(Integral(x_**m_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons95, cons90, cons96, cons1512) rule5378 = ReplacementRule(pattern5378, replacement5378) pattern5379 = Pattern(Integral(x_**m_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons95, cons90, cons96, cons1512) rule5379 = ReplacementRule(pattern5379, replacement5379) pattern5380 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons1786, cons139, cons168, cons1154) rule5380 = ReplacementRule(pattern5380, replacement5380) pattern5381 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons1786, cons139, cons168, cons1154) rule5381 = ReplacementRule(pattern5381, replacement5381) pattern5382 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons1786, cons139, cons269, cons1154) rule5382 = ReplacementRule(pattern5382, replacement5382) pattern5383 = Pattern(Integral(x_**m_*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons1786, cons139, cons269, cons1154) rule5383 = ReplacementRule(pattern5383, replacement5383) pattern5384 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons164, cons139, cons91, cons321) rule5384 = ReplacementRule(pattern5384, replacement5384) pattern5385 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons164, cons139, cons91, cons321) rule5385 = ReplacementRule(pattern5385, replacement5385) pattern5386 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons64, cons1787, cons1742) rule5386 = ReplacementRule(pattern5386, replacement5386) pattern5387 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons64, cons1787, cons1743) rule5387 = ReplacementRule(pattern5387, replacement5387) pattern5388 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons64, cons1787, cons40) rule5388 = ReplacementRule(pattern5388, replacement5388) pattern5389 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**p_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1780, cons64, cons1787, cons149) rule5389 = ReplacementRule(pattern5389, replacement5389) pattern5390 = Pattern(Integral(x_*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule5390 = ReplacementRule(pattern5390, replacement5390) pattern5391 = Pattern(Integral(x_*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule5391 = ReplacementRule(pattern5391, replacement5391) pattern5392 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1788) rule5392 = ReplacementRule(pattern5392, With5392) pattern5393 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1788) rule5393 = ReplacementRule(pattern5393, With5393) pattern5394 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons1789) rule5394 = ReplacementRule(pattern5394, replacement5394) pattern5395 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons1789) rule5395 = ReplacementRule(pattern5395, replacement5395) pattern5396 = Pattern(Integral(x_**WC('m', S(1))*(a_ + ArcTan(x_*WC('c', S(1)))*WC('b', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1790) rule5396 = ReplacementRule(pattern5396, replacement5396) pattern5397 = Pattern(Integral(x_**WC('m', S(1))*(a_ + WC('b', S(1))*acot(x_*WC('c', S(1))))*(d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1790) rule5397 = ReplacementRule(pattern5397, replacement5397) pattern5398 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5398 = ReplacementRule(pattern5398, replacement5398) pattern5399 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5399 = ReplacementRule(pattern5399, replacement5399) pattern5400 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*atanh(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90, cons1791) rule5400 = ReplacementRule(pattern5400, replacement5400) pattern5401 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))*acoth(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90, cons1791) rule5401 = ReplacementRule(pattern5401, replacement5401) pattern5402 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*atanh(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90, cons1792) rule5402 = ReplacementRule(pattern5402, replacement5402) pattern5403 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))*acoth(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90, cons1792) rule5403 = ReplacementRule(pattern5403, replacement5403) pattern5404 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*log(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90, cons1793) rule5404 = ReplacementRule(pattern5404, replacement5404) pattern5405 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))*log(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90, cons1793) rule5405 = ReplacementRule(pattern5405, replacement5405) pattern5406 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*log(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90, cons1794) rule5406 = ReplacementRule(pattern5406, replacement5406) pattern5407 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))*log(u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons89, cons90, cons1794) rule5407 = ReplacementRule(pattern5407, replacement5407) pattern5408 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*PolyLog(p_, u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1780, cons89, cons90, cons1791) rule5408 = ReplacementRule(pattern5408, replacement5408) pattern5409 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))*PolyLog(p_, u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1780, cons89, cons90, cons1791) rule5409 = ReplacementRule(pattern5409, replacement5409) pattern5410 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*PolyLog(p_, u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1780, cons89, cons90, cons1792) rule5410 = ReplacementRule(pattern5410, replacement5410) pattern5411 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))*PolyLog(p_, u_)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1780, cons89, cons90, cons1792) rule5411 = ReplacementRule(pattern5411, replacement5411) pattern5412 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons1780) rule5412 = ReplacementRule(pattern5412, replacement5412) pattern5413 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('m', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons152, cons1795) rule5413 = ReplacementRule(pattern5413, replacement5413) pattern5414 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**WC('n', S(1))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1780, cons152, cons1796) rule5414 = ReplacementRule(pattern5414, replacement5414) pattern5415 = Pattern(Integral(ArcTan(x_*WC('a', S(1)))/(c_ + x_**WC('n', S(1))*WC('d', S(1))), x_), cons2, cons8, cons29, cons87, cons1797) rule5415 = ReplacementRule(pattern5415, replacement5415) pattern5416 = Pattern(Integral(acot(x_*WC('a', S(1)))/(c_ + x_**WC('n', S(1))*WC('d', S(1))), x_), cons2, cons8, cons29, cons87, cons1797) rule5416 = ReplacementRule(pattern5416, replacement5416) pattern5417 = Pattern(Integral((ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1798) rule5417 = ReplacementRule(pattern5417, replacement5417) pattern5418 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1798) rule5418 = ReplacementRule(pattern5418, replacement5418) pattern5419 = Pattern(Integral(x_**WC('m', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons603) rule5419 = ReplacementRule(pattern5419, replacement5419) pattern5420 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons603) rule5420 = ReplacementRule(pattern5420, replacement5420) pattern5421 = Pattern(Integral(x_**WC('m', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1799) rule5421 = ReplacementRule(pattern5421, With5421) pattern5422 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1799) rule5422 = ReplacementRule(pattern5422, With5422) pattern5423 = Pattern(Integral(x_**WC('m', S(1))*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons20, cons263) rule5423 = ReplacementRule(pattern5423, With5423) pattern5424 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))*(WC('d', S(0)) + WC('e', S(1))*log(x_**S(2)*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons20, cons263) rule5424 = ReplacementRule(pattern5424, With5424) pattern5425 = Pattern(Integral(x_*(ArcTan(x_*WC('c', S(1)))*WC('b', S(1)) + WC('a', S(0)))**S(2)*(WC('d', S(0)) + WC('e', S(1))*log(f_ + x_**S(2)*WC('g', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1800) rule5425 = ReplacementRule(pattern5425, replacement5425) pattern5426 = Pattern(Integral(x_*(WC('a', S(0)) + WC('b', S(1))*acot(x_*WC('c', S(1))))**S(2)*(WC('d', S(0)) + WC('e', S(1))*log(f_ + x_**S(2)*WC('g', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1800) rule5426 = ReplacementRule(pattern5426, replacement5426) pattern5427 = Pattern(Integral(exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons1801) rule5427 = ReplacementRule(pattern5427, replacement5427) pattern5428 = Pattern(Integral(x_**WC('m', S(1))*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons19, cons1801) rule5428 = ReplacementRule(pattern5428, replacement5428) pattern5429 = Pattern(Integral(exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons4, cons1802) rule5429 = ReplacementRule(pattern5429, replacement5429) pattern5430 = Pattern(Integral(x_**WC('m', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons19, cons4, cons1802) rule5430 = ReplacementRule(pattern5430, replacement5430) pattern5431 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1803, cons1804) rule5431 = ReplacementRule(pattern5431, replacement5431) pattern5432 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1803, cons1805) rule5432 = ReplacementRule(pattern5432, replacement5432) pattern5433 = Pattern(Integral((c_ + WC('d', S(1))/x_)**WC('p', S(1))*WC('u', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons1806, cons40) rule5433 = ReplacementRule(pattern5433, replacement5433) pattern5434 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*WC('u', S(1))*exp(n_*atanh(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1806, cons149, cons1807, cons179) rule5434 = ReplacementRule(pattern5434, replacement5434) pattern5435 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*WC('u', S(1))*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1806, cons149, cons1807, cons119) rule5435 = ReplacementRule(pattern5435, replacement5435) pattern5436 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*WC('u', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1806, cons149) rule5436 = ReplacementRule(pattern5436, replacement5436) pattern5437 = Pattern(Integral(exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1)))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons4, cons1808, cons1809) rule5437 = ReplacementRule(pattern5437, replacement5437) pattern5438 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons1808, cons13, cons139, cons1809, cons1810, cons248) rule5438 = ReplacementRule(pattern5438, replacement5438) pattern5439 = Pattern(Integral(exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1)))/(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons8, cons29, cons4, cons1808) rule5439 = ReplacementRule(pattern5439, replacement5439) pattern5440 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1808, cons40, cons1811, cons1812) rule5440 = ReplacementRule(pattern5440, replacement5440) pattern5441 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1808, cons1804) rule5441 = ReplacementRule(pattern5441, replacement5441) pattern5442 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1808, cons1805, cons1813) rule5442 = ReplacementRule(pattern5442, replacement5442) pattern5443 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1808, cons1805, cons1814) rule5443 = ReplacementRule(pattern5443, replacement5443) pattern5444 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1808, cons1805) rule5444 = ReplacementRule(pattern5444, replacement5444) pattern5445 = Pattern(Integral(x_*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1)))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons4, cons1808, cons1809) rule5445 = ReplacementRule(pattern5445, replacement5445) pattern5446 = Pattern(Integral(x_*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons1808, cons13, cons139, cons1809, cons248) rule5446 = ReplacementRule(pattern5446, replacement5446) pattern5447 = Pattern(Integral(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons1808, cons1815, cons1809) rule5447 = ReplacementRule(pattern5447, replacement5447) pattern5448 = Pattern(Integral(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons1808, cons13, cons139, cons1809, cons1810, cons248) rule5448 = ReplacementRule(pattern5448, replacement5448) pattern5449 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons5, cons1808, cons1804, cons1811, cons1812) rule5449 = ReplacementRule(pattern5449, replacement5449) pattern5450 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1808, cons1804) rule5450 = ReplacementRule(pattern5450, replacement5450) pattern5451 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons5, cons1808, cons1805, cons1813) rule5451 = ReplacementRule(pattern5451, replacement5451) pattern5452 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons5, cons1808, cons1805, cons1814) rule5452 = ReplacementRule(pattern5452, replacement5452) pattern5453 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1808, cons1805) rule5453 = ReplacementRule(pattern5453, replacement5453) pattern5454 = Pattern(Integral(u_*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1808, cons1804) rule5454 = ReplacementRule(pattern5454, replacement5454) pattern5455 = Pattern(Integral(u_*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1808, cons1804, cons1807) rule5455 = ReplacementRule(pattern5455, replacement5455) pattern5456 = Pattern(Integral(u_*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1808, cons1805, cons1816) rule5456 = ReplacementRule(pattern5456, replacement5456) pattern5457 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*WC('u', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons1817, cons40) rule5457 = ReplacementRule(pattern5457, replacement5457) pattern5458 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**p_*WC('u', S(1))*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons5, cons1817, cons149, cons1807, cons179) rule5458 = ReplacementRule(pattern5458, replacement5458) pattern5459 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**p_*WC('u', S(1))*exp(n_*ArcTan(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1817, cons149, cons1807, cons119) rule5459 = ReplacementRule(pattern5459, replacement5459) pattern5460 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**p_*WC('u', S(1))*exp(ArcTan(x_*WC('a', S(1)))*WC('n', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1817, cons149, cons1816) rule5460 = ReplacementRule(pattern5460, replacement5460) pattern5461 = Pattern(Integral(exp(ArcTan((a_ + x_*WC('b', S(1)))*WC('c', S(1)))*WC('n', S(1))), x_), cons2, cons3, cons8, cons4, cons1581) rule5461 = ReplacementRule(pattern5461, replacement5461) pattern5462 = Pattern(Integral(x_**m_*exp(n_*ArcTan((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons86, cons1818, cons1819) rule5462 = ReplacementRule(pattern5462, replacement5462) pattern5463 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*exp(ArcTan((a_ + x_*WC('b', S(1)))*WC('c', S(1)))*WC('n', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1582) rule5463 = ReplacementRule(pattern5463, replacement5463) pattern5464 = Pattern(Integral((c_ + x_**S(2)*WC('e', S(1)) + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(ArcTan(a_ + x_*WC('b', S(1)))*WC('n', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1820, cons1821, cons1822) rule5464 = ReplacementRule(pattern5464, replacement5464) pattern5465 = Pattern(Integral((c_ + x_**S(2)*WC('e', S(1)) + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(ArcTan(a_ + x_*WC('b', S(1)))*WC('n', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1820, cons1821, cons1823) rule5465 = ReplacementRule(pattern5465, replacement5465) pattern5466 = Pattern(Integral(WC('u', S(1))*exp(ArcTan(WC('c', S(1))/(x_*WC('b', S(1)) + WC('a', S(0))))*WC('n', S(1))), x_), cons2, cons3, cons8, cons4, cons1581) rule5466 = ReplacementRule(pattern5466, replacement5466) pattern5467 = Pattern(Integral(WC('u', S(1))*exp(n_*acot(x_*WC('a', S(1)))), x_), cons2, cons1807) rule5467 = ReplacementRule(pattern5467, replacement5467) pattern5468 = Pattern(Integral(exp(n_*acot(x_*WC('a', S(1)))), x_), cons2, cons1801) rule5468 = ReplacementRule(pattern5468, replacement5468) pattern5469 = Pattern(Integral(x_**WC('m', S(1))*exp(n_*acot(x_*WC('a', S(1)))), x_), cons2, cons1801, cons20) rule5469 = ReplacementRule(pattern5469, replacement5469) pattern5470 = Pattern(Integral(exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons4, cons1809) rule5470 = ReplacementRule(pattern5470, replacement5470) pattern5471 = Pattern(Integral(x_**WC('m', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons4, cons1809, cons20) rule5471 = ReplacementRule(pattern5471, replacement5471) pattern5472 = Pattern(Integral(x_**m_*exp(n_*acot(x_*WC('a', S(1)))), x_), cons2, cons19, cons1801, cons21) rule5472 = ReplacementRule(pattern5472, replacement5472) pattern5473 = Pattern(Integral(x_**m_*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons19, cons4, cons1816, cons21) rule5473 = ReplacementRule(pattern5473, replacement5473) pattern5474 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1803, cons1816, cons40) rule5474 = ReplacementRule(pattern5474, replacement5474) pattern5475 = Pattern(Integral((c_ + x_*WC('d', S(1)))**p_*WC('u', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1803, cons1816, cons149) rule5475 = ReplacementRule(pattern5475, replacement5475) pattern5476 = Pattern(Integral((c_ + WC('d', S(1))/x_)**WC('p', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1806, cons1816, cons1804) rule5476 = ReplacementRule(pattern5476, replacement5476) pattern5477 = Pattern(Integral(x_**WC('m', S(1))*(c_ + WC('d', S(1))/x_)**WC('p', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1806, cons1816, cons1804, cons20) rule5477 = ReplacementRule(pattern5477, replacement5477) pattern5478 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1806, cons1816, cons1805) rule5478 = ReplacementRule(pattern5478, replacement5478) pattern5479 = Pattern(Integral(x_**m_*(c_ + WC('d', S(1))/x_)**WC('p', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1806, cons1816, cons1804, cons21) rule5479 = ReplacementRule(pattern5479, replacement5479) pattern5480 = Pattern(Integral((c_ + WC('d', S(1))/x_)**p_*WC('u', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1806, cons1816, cons1805) rule5480 = ReplacementRule(pattern5480, replacement5480) pattern5481 = Pattern(Integral(exp(WC('n', S(1))*acot(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1))), x_), cons2, cons8, cons29, cons4, cons1808) rule5481 = ReplacementRule(pattern5481, replacement5481) pattern5482 = Pattern(Integral(exp(WC('n', S(1))*acot(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons4, cons1808, cons1802) rule5482 = ReplacementRule(pattern5482, replacement5482) pattern5483 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1808, cons13, cons139, cons232, cons1810, cons1824, cons1825) rule5483 = ReplacementRule(pattern5483, replacement5483) pattern5484 = Pattern(Integral(x_*exp(WC('n', S(1))*acot(x_*WC('a', S(1))))/(c_ + x_**S(2)*WC('d', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons4, cons1808, cons1802) rule5484 = ReplacementRule(pattern5484, replacement5484) pattern5485 = Pattern(Integral(x_*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1808, cons13, cons1826, cons232, cons1810, cons1824, cons1825) rule5485 = ReplacementRule(pattern5485, replacement5485) pattern5486 = Pattern(Integral(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1808, cons1815, cons1827) rule5486 = ReplacementRule(pattern5486, replacement5486) pattern5487 = Pattern(Integral(x_**S(2)*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1808, cons13, cons1826, cons1828, cons1810, cons1824, cons1825) rule5487 = ReplacementRule(pattern5487, replacement5487) pattern5488 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**S(2)*WC('d', S(1)))**p_*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1808, cons20, cons1829, cons40) rule5488 = ReplacementRule(pattern5488, replacement5488) pattern5489 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons1808, cons1816, cons40) rule5489 = ReplacementRule(pattern5489, replacement5489) pattern5490 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))**p_*WC('u', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1808, cons1816, cons149) rule5490 = ReplacementRule(pattern5490, replacement5490) pattern5491 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1817, cons1816, cons1804, cons1830) rule5491 = ReplacementRule(pattern5491, replacement5491) pattern5492 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1817, cons1816, cons1804, cons1831) rule5492 = ReplacementRule(pattern5492, replacement5492) pattern5493 = Pattern(Integral(x_**WC('m', S(1))*(c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1817, cons1816, cons1804, cons1831, cons20) rule5493 = ReplacementRule(pattern5493, replacement5493) pattern5494 = Pattern(Integral(x_**m_*(c_ + WC('d', S(1))/x_**S(2))**WC('p', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons1817, cons1816, cons1804, cons1831, cons21) rule5494 = ReplacementRule(pattern5494, replacement5494) pattern5495 = Pattern(Integral((c_ + WC('d', S(1))/x_**S(2))**p_*WC('u', S(1))*exp(WC('n', S(1))*acot(x_*WC('a', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1817, cons1816, cons1805) rule5495 = ReplacementRule(pattern5495, replacement5495) pattern5496 = Pattern(Integral(WC('u', S(1))*exp(n_*acot((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons1807) rule5496 = ReplacementRule(pattern5496, replacement5496) pattern5497 = Pattern(Integral(exp(WC('n', S(1))*acot((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1816) rule5497 = ReplacementRule(pattern5497, replacement5497) pattern5498 = Pattern(Integral(x_**m_*exp(n_*acoth((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons86, cons1818, cons1819) rule5498 = ReplacementRule(pattern5498, replacement5498) pattern5499 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*exp(WC('n', S(1))*acoth((a_ + x_*WC('b', S(1)))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1816) rule5499 = ReplacementRule(pattern5499, replacement5499) pattern5500 = Pattern(Integral((c_ + x_**S(2)*WC('e', S(1)) + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acot(a_ + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1816, cons1820, cons1821, cons1822) rule5500 = ReplacementRule(pattern5500, replacement5500) pattern5501 = Pattern(Integral((c_ + x_**S(2)*WC('e', S(1)) + x_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1))*exp(WC('n', S(1))*acot(a_ + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1816, cons1820, cons1821, cons1823) rule5501 = ReplacementRule(pattern5501, replacement5501) pattern5502 = Pattern(Integral(WC('u', S(1))*exp(WC('n', S(1))*acot(WC('c', S(1))/(x_*WC('b', S(1)) + WC('a', S(0))))), x_), cons2, cons3, cons8, cons4, cons1581) rule5502 = ReplacementRule(pattern5502, replacement5502) pattern5503 = Pattern(Integral((ArcTan(c_ + x_*WC('d', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons150) rule5503 = ReplacementRule(pattern5503, replacement5503) pattern5504 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons150) rule5504 = ReplacementRule(pattern5504, replacement5504) pattern5505 = Pattern(Integral((ArcTan(c_ + x_*WC('d', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons342) rule5505 = ReplacementRule(pattern5505, replacement5505) pattern5506 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(c_ + x_*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons342) rule5506 = ReplacementRule(pattern5506, replacement5506) pattern5507 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(ArcTan(c_ + x_*WC('d', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons150) rule5507 = ReplacementRule(pattern5507, replacement5507) pattern5508 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(c_ + x_*WC('d', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons150) rule5508 = ReplacementRule(pattern5508, replacement5508) pattern5509 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**m_*(ArcTan(c_ + x_*WC('d', S(1)))*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons342) rule5509 = ReplacementRule(pattern5509, replacement5509) pattern5510 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**m_*(WC('a', S(0)) + WC('b', S(1))*acot(c_ + x_*WC('d', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons342) rule5510 = ReplacementRule(pattern5510, replacement5510) pattern5511 = Pattern(Integral((ArcTan(c_ + x_*WC('d', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons38, cons4, cons5, cons1832, cons1765) rule5511 = ReplacementRule(pattern5511, replacement5511) pattern5512 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acot(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons38, cons4, cons5, cons1832, cons1765) rule5512 = ReplacementRule(pattern5512, replacement5512) pattern5513 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(ArcTan(c_ + x_*WC('d', S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons1832, cons1765) rule5513 = ReplacementRule(pattern5513, replacement5513) pattern5514 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(c_ + x_*WC('d', S(1))))**WC('n', S(1))*(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons1832, cons1765) rule5514 = ReplacementRule(pattern5514, replacement5514) pattern5515 = Pattern(Integral(ArcTan(a_ + x_*WC('b', S(1)))/(c_ + x_**WC('n', S(1))*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons89) rule5515 = ReplacementRule(pattern5515, replacement5515) pattern5516 = Pattern(Integral(acot(a_ + x_*WC('b', S(1)))/(c_ + x_**WC('n', S(1))*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons89) rule5516 = ReplacementRule(pattern5516, replacement5516) pattern5517 = Pattern(Integral(ArcTan(a_ + x_*WC('b', S(1)))/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons1096) rule5517 = ReplacementRule(pattern5517, replacement5517) pattern5518 = Pattern(Integral(acot(a_ + x_*WC('b', S(1)))/(c_ + x_**n_*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons1096) rule5518 = ReplacementRule(pattern5518, replacement5518) pattern5519 = Pattern(Integral(ArcTan(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons4, cons1833) rule5519 = ReplacementRule(pattern5519, replacement5519) pattern5520 = Pattern(Integral(acot(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons4, cons1833) rule5520 = ReplacementRule(pattern5520, replacement5520) pattern5521 = Pattern(Integral(ArcTan(x_**n_*WC('b', S(1)) + WC('a', S(0)))/x_, x_), cons2, cons3, cons4, cons1833) rule5521 = ReplacementRule(pattern5521, replacement5521) pattern5522 = Pattern(Integral(acot(x_**n_*WC('b', S(1)) + WC('a', S(0)))/x_, x_), cons2, cons3, cons4, cons1833) rule5522 = ReplacementRule(pattern5522, replacement5522) pattern5523 = Pattern(Integral(x_**WC('m', S(1))*ArcTan(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons95, cons1834, cons1835) rule5523 = ReplacementRule(pattern5523, replacement5523) pattern5524 = Pattern(Integral(x_**WC('m', S(1))*acot(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons95, cons1834, cons1835) rule5524 = ReplacementRule(pattern5524, replacement5524) pattern5525 = Pattern(Integral(ArcTan(f_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons1836) rule5525 = ReplacementRule(pattern5525, replacement5525) pattern5526 = Pattern(Integral(acot(f_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons1836) rule5526 = ReplacementRule(pattern5526, replacement5526) pattern5527 = Pattern(Integral(x_**WC('m', S(1))*ArcTan(f_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons20, cons170) rule5527 = ReplacementRule(pattern5527, replacement5527) pattern5528 = Pattern(Integral(x_**WC('m', S(1))*acot(f_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons127, cons20, cons170) rule5528 = ReplacementRule(pattern5528, replacement5528) pattern5529 = Pattern(Integral(ArcTan(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule5529 = ReplacementRule(pattern5529, replacement5529) pattern5530 = Pattern(Integral(WC('u', S(1))*acot(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule5530 = ReplacementRule(pattern5530, replacement5530) pattern5531 = Pattern(Integral(S(1)/(sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0)))*ArcTan(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))), x_), cons2, cons3, cons8, cons1837) rule5531 = ReplacementRule(pattern5531, replacement5531) pattern5532 = Pattern(Integral(S(1)/(sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0)))*acot(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))), x_), cons2, cons3, cons8, cons1837) rule5532 = ReplacementRule(pattern5532, replacement5532) pattern5533 = Pattern(Integral(ArcTan(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons19, cons1837, cons68) rule5533 = ReplacementRule(pattern5533, replacement5533) pattern5534 = Pattern(Integral(acot(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons19, cons1837, cons68) rule5534 = ReplacementRule(pattern5534, replacement5534) pattern5535 = Pattern(Integral(ArcTan(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))/sqrt(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1837, cons385) rule5535 = ReplacementRule(pattern5535, replacement5535) pattern5536 = Pattern(Integral(acot(x_*WC('c', S(1))/sqrt(x_**S(2)*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))/sqrt(x_**S(2)*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1837, cons385) rule5536 = ReplacementRule(pattern5536, replacement5536) pattern5537 = Pattern(Integral(ArcTan(v_ + sqrt(w_)*WC('s', S(1)))*WC('u', S(1)), x_), cons1838, cons1839) rule5537 = ReplacementRule(pattern5537, replacement5537) pattern5538 = Pattern(Integral(WC('u', S(1))*acot(v_ + sqrt(w_)*WC('s', S(1))), x_), cons1838, cons1839) rule5538 = ReplacementRule(pattern5538, replacement5538) pattern5539 = Pattern(Integral(u_*v_**WC('n', S(1)), x_), cons820, cons87, cons465, cons1840, cons1841, CustomConstraint(With5539)) rule5539 = ReplacementRule(pattern5539, replacement5539) pattern5540 = Pattern(Integral(u_*v_**WC('n', S(1)), x_), cons820, cons87, cons465, cons1840, cons1842, CustomConstraint(With5540)) rule5540 = ReplacementRule(pattern5540, replacement5540) pattern5541 = Pattern(Integral(ArcTan(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1843) rule5541 = ReplacementRule(pattern5541, replacement5541) pattern5542 = Pattern(Integral(acot(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1843) rule5542 = ReplacementRule(pattern5542, replacement5542) pattern5543 = Pattern(Integral(ArcTan(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1844) rule5543 = ReplacementRule(pattern5543, replacement5543) pattern5544 = Pattern(Integral(acot(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1844) rule5544 = ReplacementRule(pattern5544, replacement5544) pattern5545 = Pattern(Integral(ArcTan(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1845) rule5545 = ReplacementRule(pattern5545, replacement5545) pattern5546 = Pattern(Integral(acot(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1845) rule5546 = ReplacementRule(pattern5546, replacement5546) pattern5547 = Pattern(Integral(ArcTan(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1845) rule5547 = ReplacementRule(pattern5547, replacement5547) pattern5548 = Pattern(Integral(acot(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1846) rule5548 = ReplacementRule(pattern5548, replacement5548) pattern5549 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1843) rule5549 = ReplacementRule(pattern5549, replacement5549) pattern5550 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1843) rule5550 = ReplacementRule(pattern5550, replacement5550) pattern5551 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1844) rule5551 = ReplacementRule(pattern5551, replacement5551) pattern5552 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1844) rule5552 = ReplacementRule(pattern5552, replacement5552) pattern5553 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1845) rule5553 = ReplacementRule(pattern5553, replacement5553) pattern5554 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1845) rule5554 = ReplacementRule(pattern5554, replacement5554) pattern5555 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1846) rule5555 = ReplacementRule(pattern5555, replacement5555) pattern5556 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1846) rule5556 = ReplacementRule(pattern5556, replacement5556) pattern5557 = Pattern(Integral(ArcTan(tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons69) rule5557 = ReplacementRule(pattern5557, replacement5557) pattern5558 = Pattern(Integral(acot(tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons69) rule5558 = ReplacementRule(pattern5558, replacement5558) pattern5559 = Pattern(Integral(ArcTan(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons69) rule5559 = ReplacementRule(pattern5559, replacement5559) pattern5560 = Pattern(Integral(acot(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons69) rule5560 = ReplacementRule(pattern5560, replacement5560) pattern5561 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons50, cons127, cons64) rule5561 = ReplacementRule(pattern5561, replacement5561) pattern5562 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons50, cons127, cons64) rule5562 = ReplacementRule(pattern5562, replacement5562) pattern5563 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons50, cons127, cons64) rule5563 = ReplacementRule(pattern5563, replacement5563) pattern5564 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons50, cons127, cons64) rule5564 = ReplacementRule(pattern5564, replacement5564) pattern5565 = Pattern(Integral(ArcTan(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1847) rule5565 = ReplacementRule(pattern5565, replacement5565) pattern5566 = Pattern(Integral(acot(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1847) rule5566 = ReplacementRule(pattern5566, replacement5566) pattern5567 = Pattern(Integral(ArcTan(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1847) rule5567 = ReplacementRule(pattern5567, replacement5567) pattern5568 = Pattern(Integral(acot(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1847) rule5568 = ReplacementRule(pattern5568, replacement5568) pattern5569 = Pattern(Integral(ArcTan(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1848) rule5569 = ReplacementRule(pattern5569, replacement5569) pattern5570 = Pattern(Integral(acot(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1848) rule5570 = ReplacementRule(pattern5570, replacement5570) pattern5571 = Pattern(Integral(ArcTan(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1848) rule5571 = ReplacementRule(pattern5571, replacement5571) pattern5572 = Pattern(Integral(acot(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1848) rule5572 = ReplacementRule(pattern5572, replacement5572) pattern5573 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1847) rule5573 = ReplacementRule(pattern5573, replacement5573) pattern5574 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1847) rule5574 = ReplacementRule(pattern5574, replacement5574) pattern5575 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1847) rule5575 = ReplacementRule(pattern5575, replacement5575) pattern5576 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1847) rule5576 = ReplacementRule(pattern5576, replacement5576) pattern5577 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1848) rule5577 = ReplacementRule(pattern5577, replacement5577) pattern5578 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(WC('c', S(0)) + WC('d', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1848) rule5578 = ReplacementRule(pattern5578, replacement5578) pattern5579 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*ArcTan(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1848) rule5579 = ReplacementRule(pattern5579, replacement5579) pattern5580 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*acot(WC('c', S(0)) + WC('d', S(1))/tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1848) rule5580 = ReplacementRule(pattern5580, replacement5580) pattern5581 = Pattern(Integral(ArcTan(u_), x_), cons1232) rule5581 = ReplacementRule(pattern5581, replacement5581) pattern5582 = Pattern(Integral(acot(u_), x_), cons1232) rule5582 = ReplacementRule(pattern5582, replacement5582) pattern5583 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(ArcTan(u_)*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1849) rule5583 = ReplacementRule(pattern5583, replacement5583) pattern5584 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acot(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1849) rule5584 = ReplacementRule(pattern5584, replacement5584) pattern5585 = Pattern(Integral(v_*(ArcTan(u_)*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons1232, cons1850, cons1851, CustomConstraint(With5585)) rule5585 = ReplacementRule(pattern5585, replacement5585) pattern5586 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*acot(u_)), x_), cons2, cons3, cons1232, cons1852, cons1853, CustomConstraint(With5586)) rule5586 = ReplacementRule(pattern5586, replacement5586) pattern5587 = Pattern(Integral(ArcTan(v_)*log(w_)/(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons554, cons1148, cons1854, cons1855) rule5587 = ReplacementRule(pattern5587, replacement5587) pattern5588 = Pattern(Integral(ArcTan(v_)*log(w_), x_), cons1244, cons1245) rule5588 = ReplacementRule(pattern5588, replacement5588) pattern5589 = Pattern(Integral(log(w_)*acot(v_), x_), cons1244, cons1245) rule5589 = ReplacementRule(pattern5589, replacement5589) pattern5590 = Pattern(Integral(u_*ArcTan(v_)*log(w_), x_), cons1244, cons1245, CustomConstraint(With5590)) rule5590 = ReplacementRule(pattern5590, replacement5590) pattern5591 = Pattern(Integral(u_*log(w_)*acot(v_), x_), cons1244, cons1245, CustomConstraint(With5591)) rule5591 = ReplacementRule(pattern5591, replacement5591) pattern5592 = Pattern(Integral(asec(x_*WC('c', S(1))), x_), cons8, cons8) rule5592 = ReplacementRule(pattern5592, replacement5592) pattern5593 = Pattern(Integral(acsc(x_*WC('c', S(1))), x_), cons8, cons8) rule5593 = ReplacementRule(pattern5593, replacement5593) pattern5594 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons1581) rule5594 = ReplacementRule(pattern5594, replacement5594) pattern5595 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons1581) rule5595 = ReplacementRule(pattern5595, replacement5595) pattern5596 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))/x_, x_), cons2, cons3, cons8, cons14) rule5596 = ReplacementRule(pattern5596, replacement5596) pattern5597 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))/x_, x_), cons2, cons3, cons8, cons14) rule5597 = ReplacementRule(pattern5597, replacement5597) pattern5598 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons68) rule5598 = ReplacementRule(pattern5598, replacement5598) pattern5599 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons68) rule5599 = ReplacementRule(pattern5599, replacement5599) pattern5600 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons20) rule5600 = ReplacementRule(pattern5600, replacement5600) pattern5601 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons4, cons20) rule5601 = ReplacementRule(pattern5601, replacement5601) pattern5602 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons1856) rule5602 = ReplacementRule(pattern5602, replacement5602) pattern5603 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons1856) rule5603 = ReplacementRule(pattern5603, replacement5603) pattern5604 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1745) rule5604 = ReplacementRule(pattern5604, With5604) pattern5605 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1745) rule5605 = ReplacementRule(pattern5605, With5605) pattern5606 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons40) rule5606 = ReplacementRule(pattern5606, replacement5606) pattern5607 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons40) rule5607 = ReplacementRule(pattern5607, replacement5607) pattern5608 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons669, cons180, cons1857) rule5608 = ReplacementRule(pattern5608, replacement5608) pattern5609 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons669, cons180, cons1857) rule5609 = ReplacementRule(pattern5609, replacement5609) pattern5610 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons669, cons1858) rule5610 = ReplacementRule(pattern5610, replacement5610) pattern5611 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons669, cons1858) rule5611 = ReplacementRule(pattern5611, replacement5611) pattern5612 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule5612 = ReplacementRule(pattern5612, replacement5612) pattern5613 = Pattern(Integral((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule5613 = ReplacementRule(pattern5613, replacement5613) pattern5614 = Pattern(Integral(x_*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule5614 = ReplacementRule(pattern5614, replacement5614) pattern5615 = Pattern(Integral(x_*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons56) rule5615 = ReplacementRule(pattern5615, replacement5615) pattern5616 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1788) rule5616 = ReplacementRule(pattern5616, With5616) pattern5617 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1788) rule5617 = ReplacementRule(pattern5617, With5617) pattern5618 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1301) rule5618 = ReplacementRule(pattern5618, replacement5618) pattern5619 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1301) rule5619 = ReplacementRule(pattern5619, replacement5619) pattern5620 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons20, cons669, cons180, cons1857) rule5620 = ReplacementRule(pattern5620, replacement5620) pattern5621 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons20, cons669, cons180, cons1857) rule5621 = ReplacementRule(pattern5621, replacement5621) pattern5622 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons20, cons669, cons1858) rule5622 = ReplacementRule(pattern5622, replacement5622) pattern5623 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**p_*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1739, cons20, cons669, cons1858) rule5623 = ReplacementRule(pattern5623, replacement5623) pattern5624 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5624 = ReplacementRule(pattern5624, replacement5624) pattern5625 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(x_*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5625 = ReplacementRule(pattern5625, replacement5625) pattern5626 = Pattern(Integral(asec(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons69) rule5626 = ReplacementRule(pattern5626, replacement5626) pattern5627 = Pattern(Integral(acsc(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons69) rule5627 = ReplacementRule(pattern5627, replacement5627) pattern5628 = Pattern(Integral(asec(a_ + x_*WC('b', S(1)))**n_, x_), cons2, cons3, cons4, cons1833) rule5628 = ReplacementRule(pattern5628, replacement5628) pattern5629 = Pattern(Integral(acsc(a_ + x_*WC('b', S(1)))**n_, x_), cons2, cons3, cons4, cons1833) rule5629 = ReplacementRule(pattern5629, replacement5629) pattern5630 = Pattern(Integral(asec(a_ + x_*WC('b', S(1)))/x_, x_), cons2, cons3, cons69) rule5630 = ReplacementRule(pattern5630, replacement5630) pattern5631 = Pattern(Integral(acsc(a_ + x_*WC('b', S(1)))/x_, x_), cons2, cons3, cons69) rule5631 = ReplacementRule(pattern5631, replacement5631) pattern5632 = Pattern(Integral(x_**WC('m', S(1))*asec(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons19, cons20, cons68) rule5632 = ReplacementRule(pattern5632, replacement5632) pattern5633 = Pattern(Integral(x_**WC('m', S(1))*acsc(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons19, cons20, cons68) rule5633 = ReplacementRule(pattern5633, replacement5633) pattern5634 = Pattern(Integral(x_**WC('m', S(1))*asec(a_ + x_*WC('b', S(1)))**n_, x_), cons2, cons3, cons4, cons64) rule5634 = ReplacementRule(pattern5634, replacement5634) pattern5635 = Pattern(Integral(x_**WC('m', S(1))*acsc(a_ + x_*WC('b', S(1)))**n_, x_), cons2, cons3, cons4, cons64) rule5635 = ReplacementRule(pattern5635, replacement5635) pattern5636 = Pattern(Integral(WC('u', S(1))*asec(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule5636 = ReplacementRule(pattern5636, replacement5636) pattern5637 = Pattern(Integral(WC('u', S(1))*acsc(WC('c', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons4, cons19, cons1768) rule5637 = ReplacementRule(pattern5637, replacement5637) pattern5638 = Pattern(Integral(f_**(WC('c', S(1))*asec(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)))*WC('u', S(1)), x_), cons2, cons3, cons8, cons127, cons150) rule5638 = ReplacementRule(pattern5638, replacement5638) pattern5639 = Pattern(Integral(f_**(WC('c', S(1))*acsc(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)))*WC('u', S(1)), x_), cons2, cons3, cons8, cons127, cons150) rule5639 = ReplacementRule(pattern5639, replacement5639) pattern5640 = Pattern(Integral(asec(u_), x_), cons1232, cons1771) rule5640 = ReplacementRule(pattern5640, replacement5640) pattern5641 = Pattern(Integral(acsc(u_), x_), cons1232, cons1771) rule5641 = ReplacementRule(pattern5641, replacement5641) pattern5642 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*asec(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1771) rule5642 = ReplacementRule(pattern5642, replacement5642) pattern5643 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*acsc(u_)), x_), cons2, cons3, cons8, cons29, cons19, cons68, cons1232, cons1772, cons1771) rule5643 = ReplacementRule(pattern5643, replacement5643) pattern5644 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*asec(u_)), x_), cons2, cons3, cons1232, cons1859, CustomConstraint(With5644)) rule5644 = ReplacementRule(pattern5644, replacement5644) pattern5645 = Pattern(Integral(v_*(WC('a', S(0)) + WC('b', S(1))*acsc(u_)), x_), cons2, cons3, cons1232, cons1860, CustomConstraint(With5645)) rule5645 = ReplacementRule(pattern5645, replacement5645) return [rule5034, rule5035, rule5036, rule5037, rule5038, rule5039, rule5040, rule5041, rule5042, rule5043, rule5044, rule5045, rule5046, rule5047, rule5048, rule5049, rule5050, rule5051, rule5052, rule5053, rule5054, rule5055, rule5056, rule5057, rule5058, rule5059, rule5060, rule5061, rule5062, rule5063, rule5064, rule5065, rule5066, rule5067, rule5068, rule5069, rule5070, rule5071, rule5072, rule5073, rule5074, rule5075, rule5076, rule5077, rule5078, rule5079, rule5080, rule5081, rule5082, rule5083, rule5084, rule5085, rule5086, rule5087, rule5088, rule5089, rule5090, rule5091, rule5092, rule5093, rule5094, rule5095, rule5096, rule5097, rule5098, rule5099, rule5100, rule5101, rule5102, rule5103, rule5104, rule5105, rule5106, rule5107, rule5108, rule5109, rule5110, rule5111, rule5112, rule5113, rule5114, rule5115, rule5116, rule5117, rule5118, rule5119, rule5120, rule5121, rule5122, rule5123, rule5124, rule5125, rule5126, rule5127, rule5128, rule5129, rule5130, rule5131, rule5132, rule5133, rule5134, rule5135, rule5136, rule5137, rule5138, rule5139, rule5140, rule5141, rule5142, rule5143, rule5144, rule5145, rule5146, rule5147, rule5148, rule5149, rule5150, rule5151, rule5152, rule5153, rule5154, rule5155, rule5156, rule5157, rule5158, rule5159, rule5160, rule5161, rule5162, rule5163, rule5164, rule5165, rule5166, rule5167, rule5168, rule5169, rule5170, rule5171, rule5172, rule5173, rule5174, rule5175, rule5176, rule5177, rule5178, rule5179, rule5180, rule5181, rule5182, rule5183, rule5184, rule5185, rule5186, rule5187, rule5188, rule5189, rule5190, rule5191, rule5192, rule5193, rule5194, rule5195, rule5196, rule5197, rule5198, rule5199, rule5200, rule5201, rule5202, rule5203, rule5204, rule5205, rule5206, rule5207, rule5208, rule5209, rule5210, rule5211, rule5212, rule5213, rule5214, rule5215, rule5216, rule5217, rule5218, rule5219, rule5220, rule5221, rule5222, rule5223, rule5224, rule5225, rule5226, rule5227, rule5228, rule5229, rule5230, rule5231, rule5232, rule5233, rule5234, rule5235, rule5236, rule5237, rule5238, rule5239, rule5240, rule5241, rule5242, rule5243, rule5244, rule5245, rule5246, rule5247, rule5248, rule5249, rule5250, rule5251, rule5252, rule5253, rule5254, rule5255, rule5256, rule5257, rule5258, rule5259, rule5260, rule5261, rule5262, rule5263, rule5264, rule5265, rule5266, rule5267, rule5268, rule5269, rule5270, rule5271, rule5272, rule5273, rule5274, rule5275, rule5276, rule5277, rule5278, rule5279, rule5280, rule5281, rule5282, rule5283, rule5284, rule5285, rule5286, rule5287, rule5288, rule5289, rule5290, rule5291, rule5292, rule5293, rule5294, rule5295, rule5296, rule5297, rule5298, rule5299, rule5300, rule5301, rule5302, rule5303, rule5304, rule5305, rule5306, rule5307, rule5308, rule5309, rule5310, rule5311, rule5312, rule5313, rule5314, rule5315, rule5316, rule5317, rule5318, rule5319, rule5320, rule5321, rule5322, rule5323, rule5324, rule5325, rule5326, rule5327, rule5328, rule5329, rule5330, rule5331, rule5332, rule5333, rule5334, rule5335, rule5336, rule5337, rule5338, rule5339, rule5340, rule5341, rule5342, rule5343, rule5344, rule5345, rule5346, rule5347, rule5348, rule5349, rule5350, rule5351, rule5352, rule5353, rule5354, rule5355, rule5356, rule5357, rule5358, rule5359, rule5360, rule5361, rule5362, rule5363, rule5364, rule5365, rule5366, rule5367, rule5368, rule5369, rule5370, rule5371, rule5372, rule5373, rule5374, rule5375, rule5376, rule5377, rule5378, rule5379, rule5380, rule5381, rule5382, rule5383, rule5384, rule5385, rule5386, rule5387, rule5388, rule5389, rule5390, rule5391, rule5392, rule5393, rule5394, rule5395, rule5396, rule5397, rule5398, rule5399, rule5400, rule5401, rule5402, rule5403, rule5404, rule5405, rule5406, rule5407, rule5408, rule5409, rule5410, rule5411, rule5412, rule5413, rule5414, rule5415, rule5416, rule5417, rule5418, rule5419, rule5420, rule5421, rule5422, rule5423, rule5424, rule5425, rule5426, rule5427, rule5428, rule5429, rule5430, rule5431, rule5432, rule5433, rule5434, rule5435, rule5436, rule5437, rule5438, rule5439, rule5440, rule5441, rule5442, rule5443, rule5444, rule5445, rule5446, rule5447, rule5448, rule5449, rule5450, rule5451, rule5452, rule5453, rule5454, rule5455, rule5456, rule5457, rule5458, rule5459, rule5460, rule5461, rule5462, rule5463, rule5464, rule5465, rule5466, rule5467, rule5468, rule5469, rule5470, rule5471, rule5472, rule5473, rule5474, rule5475, rule5476, rule5477, rule5478, rule5479, rule5480, rule5481, rule5482, rule5483, rule5484, rule5485, rule5486, rule5487, rule5488, rule5489, rule5490, rule5491, rule5492, rule5493, rule5494, rule5495, rule5496, rule5497, rule5498, rule5499, rule5500, rule5501, rule5502, rule5503, rule5504, rule5505, rule5506, rule5507, rule5508, rule5509, rule5510, rule5511, rule5512, rule5513, rule5514, rule5515, rule5516, rule5517, rule5518, rule5519, rule5520, rule5521, rule5522, rule5523, rule5524, rule5525, rule5526, rule5527, rule5528, rule5529, rule5530, rule5531, rule5532, rule5533, rule5534, rule5535, rule5536, rule5537, rule5538, rule5539, rule5540, rule5541, rule5542, rule5543, rule5544, rule5545, rule5546, rule5547, rule5548, rule5549, rule5550, rule5551, rule5552, rule5553, rule5554, rule5555, rule5556, rule5557, rule5558, rule5559, rule5560, rule5561, rule5562, rule5563, rule5564, rule5565, rule5566, rule5567, rule5568, rule5569, rule5570, rule5571, rule5572, rule5573, rule5574, rule5575, rule5576, rule5577, rule5578, rule5579, rule5580, rule5581, rule5582, rule5583, rule5584, rule5585, rule5586, rule5587, rule5588, rule5589, rule5590, rule5591, rule5592, rule5593, rule5594, rule5595, rule5596, rule5597, rule5598, rule5599, rule5600, rule5601, rule5602, rule5603, rule5604, rule5605, rule5606, rule5607, rule5608, rule5609, rule5610, rule5611, rule5612, rule5613, rule5614, rule5615, rule5616, rule5617, rule5618, rule5619, rule5620, rule5621, rule5622, rule5623, rule5624, rule5625, rule5626, rule5627, rule5628, rule5629, rule5630, rule5631, rule5632, rule5633, rule5634, rule5635, rule5636, rule5637, rule5638, rule5639, rule5640, rule5641, rule5642, rule5643, rule5644, rule5645, ] def replacement5034(a, b, c, n, x): return -Dist(b*c*n, Int(x*(a + b*asin(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*asin(c*x))**n, x) def replacement5035(a, b, c, n, x): return Dist(b*c*n, Int(x*(a + b*acos(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*acos(c*x))**n, x) def replacement5036(a, b, c, n, x): return Dist(c/(b*(n + S(1))), Int(x*(a + b*asin(c*x))**(n + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*asin(c*x))**(n + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5037(a, b, c, n, x): return -Dist(c/(b*(n + S(1))), Int(x*(a + b*acos(c*x))**(n + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) - Simp((a + b*acos(c*x))**(n + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5038(a, b, c, n, x): return Dist(S(1)/(b*c), Subst(Int(x**n*cos(a/b - x/b), x), x, a + b*asin(c*x)), x) def replacement5039(a, b, c, n, x): return Dist(S(1)/(b*c), Subst(Int(x**n*sin(a/b - x/b), x), x, a + b*acos(c*x)), x) def replacement5040(a, b, c, n, x): return Subst(Int((a + b*x)**n/tan(x), x), x, asin(c*x)) def replacement5041(a, b, c, n, x): return -Subst(Int((a + b*x)**n*tan(x), x), x, acos(c*x)) def replacement5042(a, b, c, d, m, n, x): return -Dist(b*c*n/(d*(m + S(1))), Int((d*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((d*x)**(m + S(1))*(a + b*asin(c*x))**n/(d*(m + S(1))), x) def replacement5043(a, b, c, d, m, n, x): return Dist(b*c*n/(d*(m + S(1))), Int((d*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((d*x)**(m + S(1))*(a + b*acos(c*x))**n/(d*(m + S(1))), x) def replacement5044(a, b, c, m, n, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*asin(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**(m + S(1))*(a + b*asin(c*x))**n/(m + S(1)), x) def replacement5045(a, b, c, m, n, x): return Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*acos(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**(m + S(1))*(a + b*acos(c*x))**n/(m + S(1)), x) def replacement5046(a, b, c, m, n, x): return -Dist(c**(-m + S(-1))/(b*(n + S(1))), Subst(Int(ExpandTrigReduce((a + b*x)**(n + S(1)), (m - (m + S(1))*sin(x)**S(2))*sin(x)**(m + S(-1)), x), x), x, asin(c*x)), x) + Simp(x**m*(a + b*asin(c*x))**(n + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5047(a, b, c, m, n, x): return -Dist(c**(-m + S(-1))/(b*(n + S(1))), Subst(Int(ExpandTrigReduce((a + b*x)**(n + S(1)), (m - (m + S(1))*cos(x)**S(2))*cos(x)**(m + S(-1)), x), x), x, acos(c*x)), x) - Simp(x**m*(a + b*acos(c*x))**(n + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5048(a, b, c, m, n, x): return -Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*asin(c*x))**(n + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Dist(c*(m + S(1))/(b*(n + S(1))), Int(x**(m + S(1))*(a + b*asin(c*x))**(n + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**m*(a + b*asin(c*x))**(n + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5049(a, b, c, m, n, x): return Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*acos(c*x))**(n + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) - Dist(c*(m + S(1))/(b*(n + S(1))), Int(x**(m + S(1))*(a + b*acos(c*x))**(n + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) - Simp(x**m*(a + b*acos(c*x))**(n + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5050(a, b, c, m, n, x): return Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*sin(x)**m*cos(x), x), x, asin(c*x)), x) def replacement5051(a, b, c, m, n, x): return -Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*sin(x)*cos(x)**m, x), x, acos(c*x)), x) def replacement5052(a, b, c, d, m, n, x): return Int((d*x)**m*(a + b*asin(c*x))**n, x) def replacement5053(a, b, c, d, m, n, x): return Int((d*x)**m*(a + b*acos(c*x))**n, x) def replacement5054(a, b, c, d, e, x): return Simp(log(a + b*asin(c*x))/(b*c*sqrt(d)), x) def replacement5055(a, b, c, d, e, x): return -Simp(log(a + b*acos(c*x))/(b*c*sqrt(d)), x) def replacement5056(a, b, c, d, e, n, x): return Simp((a + b*asin(c*x))**(n + S(1))/(b*c*sqrt(d)*(n + S(1))), x) def replacement5057(a, b, c, d, e, n, x): return -Simp((a + b*acos(c*x))**(n + S(1))/(b*c*sqrt(d)*(n + S(1))), x) def replacement5058(a, b, c, d, e, n, x): return Dist(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*asin(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) def replacement5059(a, b, c, d, e, n, x): return Dist(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*acos(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) def With5060(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asin(c*x), u, x) def With5061(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acos(c*x), u, x) def replacement5062(a, b, c, d, e, n, x): return Dist(sqrt(d + e*x**S(2))/(S(2)*sqrt(-c**S(2)*x**S(2) + S(1))), Int((a + b*asin(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) - Dist(b*c*n*sqrt(d + e*x**S(2))/(S(2)*sqrt(-c**S(2)*x**S(2) + S(1))), Int(x*(a + b*asin(c*x))**(n + S(-1)), x), x) + Simp(x*(a + b*asin(c*x))**n*sqrt(d + e*x**S(2))/S(2), x) def replacement5063(a, b, c, d, e, n, x): return Dist(sqrt(d + e*x**S(2))/(S(2)*sqrt(-c**S(2)*x**S(2) + S(1))), Int((a + b*acos(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Dist(b*c*n*sqrt(d + e*x**S(2))/(S(2)*sqrt(-c**S(2)*x**S(2) + S(1))), Int(x*(a + b*acos(c*x))**(n + S(-1)), x), x) + Simp(x*(a + b*acos(c*x))**n*sqrt(d + e*x**S(2))/S(2), x) def replacement5064(a, b, c, d, e, n, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*p + S(1)), Int(x*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp(x*(a + b*asin(c*x))**n*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) def replacement5065(a, b, c, d, e, n, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) + Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*p + S(1)), Int(x*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp(x*(a + b*acos(c*x))**n*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) def replacement5066(a, b, c, d, e, n, x): return -Dist(b*c*n/sqrt(d), Int(x*(a + b*asin(c*x))**(n + S(-1))/(d + e*x**S(2)), x), x) + Simp(x*(a + b*asin(c*x))**n/(d*sqrt(d + e*x**S(2))), x) def replacement5067(a, b, c, d, e, n, x): return Dist(b*c*n/sqrt(d), Int(x*(a + b*acos(c*x))**(n + S(-1))/(d + e*x**S(2)), x), x) + Simp(x*(a + b*acos(c*x))**n/(d*sqrt(d + e*x**S(2))), x) def replacement5068(a, b, c, d, e, n, x): return -Dist(b*c*n*sqrt(-c**S(2)*x**S(2) + S(1))/(d*sqrt(d + e*x**S(2))), Int(x*(a + b*asin(c*x))**(n + S(-1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*asin(c*x))**n/(d*sqrt(d + e*x**S(2))), x) def replacement5069(a, b, c, d, e, n, x): return Dist(b*c*n*sqrt(-c**S(2)*x**S(2) + S(1))/(d*sqrt(d + e*x**S(2))), Int(x*(a + b*acos(c*x))**(n + S(-1))/(-c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*acos(c*x))**n/(d*sqrt(d + e*x**S(2))), x) def replacement5070(a, b, c, d, e, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*(p + S(1))), Int(x*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) - Simp(x*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) def replacement5071(a, b, c, d, e, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*(p + S(1))), Int(x*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) - Simp(x*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) def replacement5072(a, b, c, d, e, n, x): return Dist(S(1)/(c*d), Subst(Int((a + b*x)**n/cos(x), x), x, asin(c*x)), x) def replacement5073(a, b, c, d, e, n, x): return -Dist(S(1)/(c*d), Subst(Int((a + b*x)**n/sin(x), x), x, acos(c*x)), x) def replacement5074(a, b, c, d, e, n, p, x): return Dist(c*d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(S(2)*p + S(1))*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*(n + S(1))), Int(x*(a + b*asin(c*x))**(n + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((a + b*asin(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5075(a, b, c, d, e, n, p, x): return -Dist(c*d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(S(2)*p + S(1))*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*(n + S(1))), Int(x*(a + b*acos(c*x))**(n + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) - Simp((a + b*acos(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5076(a, b, c, d, e, n, p, x): return Dist(d**p/c, Subst(Int((a + b*x)**n*cos(x)**(S(2)*p + S(1)), x), x, asin(c*x)), x) def replacement5077(a, b, c, d, e, n, p, x): return -Dist(d**p/c, Subst(Int((a + b*x)**n*sin(x)**(S(2)*p + S(1)), x), x, acos(c*x)), x) def replacement5078(a, b, c, d, e, n, p, x): return Dist(d**(p + S(-1)/2)*sqrt(d + e*x**S(2))/sqrt(-c**S(2)*x**S(2) + S(1)), Int((a + b*asin(c*x))**n*(-c**S(2)*x**S(2) + S(1))**p, x), x) def replacement5079(a, b, c, d, e, n, p, x): return Dist(d**(p + S(-1)/2)*sqrt(d + e*x**S(2))/sqrt(-c**S(2)*x**S(2) + S(1)), Int((a + b*acos(c*x))**n*(-c**S(2)*x**S(2) + S(1))**p, x), x) def With5080(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asin(c*x), u, x) def With5081(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acos(c*x), u, x) def replacement5082(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*asin(c*x))**n, (d + e*x**S(2))**p, x), x) def replacement5083(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*acos(c*x))**n, (d + e*x**S(2))**p, x), x) def replacement5084(a, b, c, d, e, n, p, x): return Int((a + b*asin(c*x))**n*(d + e*x**S(2))**p, x) def replacement5085(a, b, c, d, e, n, p, x): return Int((a + b*acos(c*x))**n*(d + e*x**S(2))**p, x) def replacement5086(a, b, c, d, e, f, g, n, p, x): return Dist((d + e*x)**FracPart(p)*(f + g*x)**FracPart(p)*(d*f + e*g*x**S(2))**(-FracPart(p)), Int((a + b*asin(c*x))**n*(d*f + e*g*x**S(2))**p, x), x) def replacement5087(a, b, c, d, e, f, g, n, p, x): return Dist((d + e*x)**FracPart(p)*(f + g*x)**FracPart(p)*(d*f + e*g*x**S(2))**(-FracPart(p)), Int((a + b*acos(c*x))**n*(d*f + e*g*x**S(2))**p, x), x) def replacement5088(a, b, c, d, e, n, x): return -Dist(S(1)/e, Subst(Int((a + b*x)**n*tan(x), x), x, asin(c*x)), x) def replacement5089(a, b, c, d, e, n, x): return Dist(S(1)/e, Subst(Int((a + b*x)**n/tan(x), x), x, acos(c*x)), x) def replacement5090(a, b, c, d, e, n, p, x): return Dist(b*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5091(a, b, c, d, e, n, p, x): return -Dist(b*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5092(a, b, c, d, e, n, x): return Dist(S(1)/d, Subst(Int((a + b*x)**n/(sin(x)*cos(x)), x), x, asin(c*x)), x) def replacement5093(a, b, c, d, e, n, x): return -Dist(S(1)/d, Subst(Int((a + b*x)**n/(sin(x)*cos(x)), x), x, acos(c*x)), x) def replacement5094(a, b, c, d, e, f, m, n, p, x): return -Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*f*(m + S(1))), x) def replacement5095(a, b, c, d, e, f, m, n, p, x): return Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*f*(m + S(1))), x) def replacement5096(a, b, c, d, e, p, x): return Dist(d, Int((a + b*asin(c*x))*(d + e*x**S(2))**(p + S(-1))/x, x), x) - Dist(b*c*d**p/(S(2)*p), Int((-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((a + b*asin(c*x))*(d + e*x**S(2))**p/(S(2)*p), x) def replacement5097(a, b, c, d, e, p, x): return Dist(d, Int((a + b*acos(c*x))*(d + e*x**S(2))**(p + S(-1))/x, x), x) + Dist(b*c*d**p/(S(2)*p), Int((-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((a + b*acos(c*x))*(d + e*x**S(2))**p/(S(2)*p), x) def replacement5098(a, b, c, d, e, f, m, p, x): return -Dist(S(2)*e*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*asin(c*x))*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*d**p/(f*(m + S(1))), Int((f*x)**(m + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asin(c*x))*(d + e*x**S(2))**p/(f*(m + S(1))), x) def replacement5099(a, b, c, d, e, f, m, p, x): return -Dist(S(2)*e*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acos(c*x))*(d + e*x**S(2))**(p + S(-1)), x), x) + Dist(b*c*d**p/(f*(m + S(1))), Int((f*x)**(m + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acos(c*x))*(d + e*x**S(2))**p/(f*(m + S(1))), x) def With5100(a, b, c, d, e, f, m, p, x): u = IntHide((f*x)**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asin(c*x), u, x) def With5101(a, b, c, d, e, f, m, p, x): u = IntHide((f*x)**m*(d + e*x**S(2))**p, x) return Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acos(c*x), u, x) def With5102(a, b, c, d, e, m, p, x): u = IntHide(x**m*(-c**S(2)*x**S(2) + S(1))**p, x) return Dist(d**p*(a + b*asin(c*x)), u, x) - Dist(b*c*d**p, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) def With5103(a, b, c, d, e, m, p, x): u = IntHide(x**m*(-c**S(2)*x**S(2) + S(1))**p, x) return Dist(d**p*(a + b*acos(c*x)), u, x) + Dist(b*c*d**p, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) def With5104(a, b, c, d, e, m, p, x): u = IntHide(x**m*(-c**S(2)*x**S(2) + S(1))**p, x) return -Dist(b*c*d**(p + S(-1)/2)*sqrt(d + e*x**S(2))/sqrt(-c**S(2)*x**S(2) + S(1)), Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asin(c*x), Int(x**m*(d + e*x**S(2))**p, x), x) def With5105(a, b, c, d, e, m, p, x): u = IntHide(x**m*(-c**S(2)*x**S(2) + S(1))**p, x) return Dist(b*c*d**(p + S(-1)/2)*sqrt(d + e*x**S(2))/sqrt(-c**S(2)*x**S(2) + S(1)), Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acos(c*x), Int(x**m*(d + e*x**S(2))**p, x), x) def replacement5106(a, b, c, d, e, f, m, n, x): return Dist(c**S(2)*sqrt(d + e*x**S(2))/(f**S(2)*(m + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(2))*(a + b*asin(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) - Dist(b*c*n*sqrt(d + e*x**S(2))/(f*(m + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(-1)), x), x) + Simp((f*x)**(m + S(1))*(a + b*asin(c*x))**n*sqrt(d + e*x**S(2))/(f*(m + S(1))), x) def replacement5107(a, b, c, d, e, f, m, n, x): return Dist(c**S(2)*sqrt(d + e*x**S(2))/(f**S(2)*(m + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(2))*(a + b*acos(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Dist(b*c*n*sqrt(d + e*x**S(2))/(f*(m + S(1))*sqrt(-c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(-1)), x), x) + Simp((f*x)**(m + S(1))*(a + b*acos(c*x))**n*sqrt(d + e*x**S(2))/(f*(m + S(1))), x) def replacement5108(a, b, c, d, e, f, m, n, p, x): return -Dist(S(2)*e*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asin(c*x))**n*(d + e*x**S(2))**p/(f*(m + S(1))), x) def replacement5109(a, b, c, d, e, f, m, n, p, x): return -Dist(S(2)*e*p/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) + Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acos(c*x))**n*(d + e*x**S(2))**p/(f*(m + S(1))), x) def replacement5110(a, b, c, d, e, f, m, n, x): return Dist(sqrt(d + e*x**S(2))/((m + S(2))*sqrt(-c**S(2)*x**S(2) + S(1))), Int((f*x)**m*(a + b*asin(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) - Dist(b*c*n*sqrt(d + e*x**S(2))/(f*(m + S(2))*sqrt(-c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(-1)), x), x) + Simp((f*x)**(m + S(1))*(a + b*asin(c*x))**n*sqrt(d + e*x**S(2))/(f*(m + S(2))), x) def replacement5111(a, b, c, d, e, f, m, n, x): return Dist(sqrt(d + e*x**S(2))/((m + S(2))*sqrt(-c**S(2)*x**S(2) + S(1))), Int((f*x)**m*(a + b*acos(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Dist(b*c*n*sqrt(d + e*x**S(2))/(f*(m + S(2))*sqrt(-c**S(2)*x**S(2) + S(1))), Int((f*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(-1)), x), x) + Simp((f*x)**(m + S(1))*(a + b*acos(c*x))**n*sqrt(d + e*x**S(2))/(f*(m + S(2))), x) def replacement5112(a, b, c, d, e, f, m, n, p, x): return Dist(S(2)*d*p/(m + S(2)*p + S(1)), Int((f*x)**m*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(2)*p + S(1))), Int((f*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asin(c*x))**n*(d + e*x**S(2))**p/(f*(m + S(2)*p + S(1))), x) def replacement5113(a, b, c, d, e, f, m, n, p, x): return Dist(S(2)*d*p/(m + S(2)*p + S(1)), Int((f*x)**m*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) + Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(2)*p + S(1))), Int((f*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acos(c*x))**n*(d + e*x**S(2))**p/(f*(m + S(2)*p + S(1))), x) def replacement5114(a, b, c, d, e, f, m, n, p, x): return Dist(c**S(2)*(m + S(2)*p + S(3))/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*asin(c*x))**n*(d + e*x**S(2))**p, x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*f*(m + S(1))), x) def replacement5115(a, b, c, d, e, f, m, n, p, x): return Dist(c**S(2)*(m + S(2)*p + S(3))/(f**S(2)*(m + S(1))), Int((f*x)**(m + S(2))*(a + b*acos(c*x))**n*(d + e*x**S(2))**p, x), x) + Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(f*(m + S(1))), Int((f*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp((f*x)**(m + S(1))*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*f*(m + S(1))), x) def replacement5116(a, b, c, d, e, f, m, n, p, x): return -Dist(f**S(2)*(m + S(-1))/(S(2)*e*(p + S(1))), Int((f*x)**(m + S(-2))*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Dist(b*d**IntPart(p)*f*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((f*x)**(m + S(-1))*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5117(a, b, c, d, e, f, m, n, p, x): return -Dist(f**S(2)*(m + S(-1))/(S(2)*e*(p + S(1))), Int((f*x)**(m + S(-2))*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b*d**IntPart(p)*f*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*c*(p + S(1))), Int((f*x)**(m + S(-1))*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5118(a, b, c, d, e, f, m, n, p, x): return Dist((m + S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((f*x)**m*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) + Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*f*(p + S(1))), Int((f*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) - Simp((f*x)**(m + S(1))*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*f*(p + S(1))), x) def replacement5119(a, b, c, d, e, f, m, n, p, x): return Dist((m + S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((f*x)**m*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b*c*d**IntPart(p)*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(S(2)*f*(p + S(1))), Int((f*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) - Simp((f*x)**(m + S(1))*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*f*(p + S(1))), x) def replacement5120(a, b, c, d, e, f, m, n, x): return Dist(f**S(2)*(m + S(-1))/(c**S(2)*m), Int((f*x)**(m + S(-2))*(a + b*asin(c*x))**n/sqrt(d + e*x**S(2)), x), x) + Dist(b*f*n*sqrt(-c**S(2)*x**S(2) + S(1))/(c*m*sqrt(d + e*x**S(2))), Int((f*x)**(m + S(-1))*(a + b*asin(c*x))**(n + S(-1)), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*asin(c*x))**n*sqrt(d + e*x**S(2))/(e*m), x) def replacement5121(a, b, c, d, e, f, m, n, x): return Dist(f**S(2)*(m + S(-1))/(c**S(2)*m), Int((f*x)**(m + S(-2))*(a + b*acos(c*x))**n/sqrt(d + e*x**S(2)), x), x) - Dist(b*f*n*sqrt(-c**S(2)*x**S(2) + S(1))/(c*m*sqrt(d + e*x**S(2))), Int((f*x)**(m + S(-1))*(a + b*acos(c*x))**(n + S(-1)), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acos(c*x))**n*sqrt(d + e*x**S(2))/(e*m), x) def replacement5122(a, b, c, d, e, m, n, x): return Dist(c**(-m + S(-1))/sqrt(d), Subst(Int((a + b*x)**n*sin(x)**m, x), x, asin(c*x)), x) def replacement5123(a, b, c, d, e, m, n, x): return -Dist(c**(-m + S(-1))/sqrt(d), Subst(Int((a + b*x)**n*cos(x)**m, x), x, acos(c*x)), x) def replacement5124(a, b, c, d, e, f, m, x): return Simp((f*x)**(m + S(1))*(a + b*asin(c*x))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, c**S(2)*x**S(2))/(sqrt(d)*f*(m + S(1))), x) - Simp(b*c*(f*x)**(m + S(2))*HypergeometricPFQ(List(S(1), m/S(2) + S(1), m/S(2) + S(1)), List(m/S(2) + S(3)/2, m/S(2) + S(2)), c**S(2)*x**S(2))/(sqrt(d)*f**S(2)*(m + S(1))*(m + S(2))), x) def replacement5125(a, b, c, d, e, f, m, x): return Simp((f*x)**(m + S(1))*(a + b*acos(c*x))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, c**S(2)*x**S(2))/(sqrt(d)*f*(m + S(1))), x) + Simp(b*c*(f*x)**(m + S(2))*HypergeometricPFQ(List(S(1), m/S(2) + S(1), m/S(2) + S(1)), List(m/S(2) + S(3)/2, m/S(2) + S(2)), c**S(2)*x**S(2))/(sqrt(d)*f**S(2)*(m + S(1))*(m + S(2))), x) def replacement5126(a, b, c, d, e, f, m, n, x): return Dist(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((f*x)**m*(a + b*asin(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) def replacement5127(a, b, c, d, e, f, m, n, x): return Dist(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((f*x)**m*(a + b*acos(c*x))**n/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) def replacement5128(a, b, c, d, e, f, m, n, p, x): return Dist(f**S(2)*(m + S(-1))/(c**S(2)*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-2))*(a + b*asin(c*x))**n*(d + e*x**S(2))**p, x), x) + Dist(b*d**IntPart(p)*f*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(c*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-1))*(a + b*asin(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*asin(c*x))**n*(d + e*x**S(2))**(p + S(1))/(e*(m + S(2)*p + S(1))), x) def replacement5129(a, b, c, d, e, f, m, n, p, x): return Dist(f**S(2)*(m + S(-1))/(c**S(2)*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-2))*(a + b*acos(c*x))**n*(d + e*x**S(2))**p, x), x) - Dist(b*d**IntPart(p)*f*n*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(c*(m + S(2)*p + S(1))), Int((f*x)**(m + S(-1))*(a + b*acos(c*x))**(n + S(-1))*(-c**S(2)*x**S(2) + S(1))**(p + S(1)/2), x), x) + Simp(f*(f*x)**(m + S(-1))*(a + b*acos(c*x))**n*(d + e*x**S(2))**(p + S(1))/(e*(m + S(2)*p + S(1))), x) def replacement5130(a, b, c, d, e, f, m, n, p, x): return -Dist(d**IntPart(p)*f*m*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*asin(c*x))**(n + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*asin(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5131(a, b, c, d, e, f, m, n, p, x): return Dist(d**IntPart(p)*f*m*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acos(c*x))**(n + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) - Simp((f*x)**m*(a + b*acos(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5132(a, b, c, d, e, f, m, n, x): return -Dist(f*m/(b*c*sqrt(d)*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*asin(c*x))**(n + S(1)), x), x) + Simp((f*x)**m*(a + b*asin(c*x))**(n + S(1))/(b*c*sqrt(d)*(n + S(1))), x) def replacement5133(a, b, c, d, e, f, m, n, x): return Dist(f*m/(b*c*sqrt(d)*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acos(c*x))**(n + S(1)), x), x) - Simp((f*x)**m*(a + b*acos(c*x))**(n + S(1))/(b*c*sqrt(d)*(n + S(1))), x) def replacement5134(a, b, c, d, e, f, m, n, p, x): return -Dist(d**IntPart(p)*f*m*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*asin(c*x))**(n + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Dist(c*d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))*(m + S(2)*p + S(1))/(b*f*(n + S(1))), Int((f*x)**(m + S(1))*(a + b*asin(c*x))**(n + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) + Simp((f*x)**m*(a + b*asin(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5135(a, b, c, d, e, f, m, n, p, x): return Dist(d**IntPart(p)*f*m*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))/(b*c*(n + S(1))), Int((f*x)**(m + S(-1))*(a + b*acos(c*x))**(n + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) - Dist(c*d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p))*(m + S(2)*p + S(1))/(b*f*(n + S(1))), Int((f*x)**(m + S(1))*(a + b*acos(c*x))**(n + S(1))*(-c**S(2)*x**S(2) + S(1))**(p + S(-1)/2), x), x) - Simp((f*x)**m*(a + b*acos(c*x))**(n + S(1))*(d + e*x**S(2))**p*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(n + S(1))), x) def replacement5136(a, b, c, d, e, m, n, p, x): return Dist(c**(-m + S(-1))*d**p, Subst(Int((a + b*x)**n*sin(x)**m*cos(x)**(S(2)*p + S(1)), x), x, asin(c*x)), x) def replacement5137(a, b, c, d, e, m, n, p, x): return -Dist(c**(-m + S(-1))*d**p, Subst(Int((a + b*x)**n*sin(x)**(S(2)*p + S(1))*cos(x)**m, x), x, acos(c*x)), x) def replacement5138(a, b, c, d, e, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int(x**m*(a + b*asin(c*x))**n*(-c**S(2)*x**S(2) + S(1))**p, x), x) def replacement5139(a, b, c, d, e, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int(x**m*(a + b*acos(c*x))**n*(-c**S(2)*x**S(2) + S(1))**p, x), x) def replacement5140(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*asin(c*x))**n/sqrt(d + e*x**S(2)), (f*x)**m*(d + e*x**S(2))**(p + S(1)/2), x), x) def replacement5141(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*acos(c*x))**n/sqrt(d + e*x**S(2)), (f*x)**m*(d + e*x**S(2))**(p + S(1)/2), x), x) def replacement5142(a, b, c, d, e, p, x): return -Dist(b*c/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*asin(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5143(a, b, c, d, e, p, x): return Dist(b*c/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*acos(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def With5144(a, b, c, d, e, f, m, p, x): u = IntHide((f*x)**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asin(c*x), u, x) def With5145(a, b, c, d, e, f, m, p, x): u = IntHide((f*x)**m*(d + e*x**S(2))**p, x) return Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acos(c*x), u, x) def replacement5146(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*asin(c*x))**n, (f*x)**m*(d + e*x**S(2))**p, x), x) def replacement5147(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*acos(c*x))**n, (f*x)**m*(d + e*x**S(2))**p, x), x) def replacement5148(a, b, c, d, e, f, m, n, p, x): return Int((f*x)**m*(a + b*asin(c*x))**n*(d + e*x**S(2))**p, x) def replacement5149(a, b, c, d, e, f, m, n, p, x): return Int((f*x)**m*(a + b*acos(c*x))**n*(d + e*x**S(2))**p, x) def replacement5150(a, b, c, d, e, f, g, h, m, n, p, x): return Dist((d + e*x)**FracPart(p)*(f + g*x)**FracPart(p)*(d*f + e*g*x**S(2))**(-FracPart(p)), Int((h*x)**m*(a + b*asin(c*x))**n*(d*f + e*g*x**S(2))**p, x), x) def replacement5151(a, b, c, d, e, f, g, h, m, n, p, x): return Dist((d + e*x)**FracPart(p)*(f + g*x)**FracPart(p)*(d*f + e*g*x**S(2))**(-FracPart(p)), Int((h*x)**m*(a + b*acos(c*x))**n*(d*f + e*g*x**S(2))**p, x), x) def replacement5152(a, b, c, d, e, n, x): return Subst(Int((a + b*x)**n*cos(x)/(c*d + e*sin(x)), x), x, asin(c*x)) def replacement5153(a, b, c, d, e, n, x): return -Subst(Int((a + b*x)**n*sin(x)/(c*d + e*cos(x)), x), x, acos(c*x)) def replacement5154(a, b, c, d, e, m, n, x): return -Dist(b*c*n/(e*(m + S(1))), Int((a + b*asin(c*x))**(n + S(-1))*(d + e*x)**(m + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*asin(c*x))**n*(d + e*x)**(m + S(1))/(e*(m + S(1))), x) def replacement5155(a, b, c, d, e, m, n, x): return Dist(b*c*n/(e*(m + S(1))), Int((a + b*acos(c*x))**(n + S(-1))*(d + e*x)**(m + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*acos(c*x))**n*(d + e*x)**(m + S(1))/(e*(m + S(1))), x) def replacement5156(a, b, c, d, e, m, n, x): return Int(ExpandIntegrand((a + b*asin(c*x))**n*(d + e*x)**m, x), x) def replacement5157(a, b, c, d, e, m, n, x): return Int(ExpandIntegrand((a + b*acos(c*x))**n*(d + e*x)**m, x), x) def replacement5158(a, b, c, d, e, m, n, x): return Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*(c*d + e*sin(x))**m*cos(x), x), x, asin(c*x)), x) def replacement5159(a, b, c, d, e, m, n, x): return -Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*(c*d + e*cos(x))**m*sin(x), x), x, acos(c*x)), x) def With5160(Px, a, b, c, x): u = IntHide(Px, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asin(c*x), u, x) def With5161(Px, a, b, c, x): u = IntHide(Px, x) return Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acos(c*x), u, x) def replacement5162(Px, a, b, c, n, x): return Int(ExpandIntegrand(Px*(a + b*asin(c*x))**n, x), x) def replacement5163(Px, a, b, c, n, x): return Int(ExpandIntegrand(Px*(a + b*acos(c*x))**n, x), x) def With5164(Px, a, b, c, d, e, m, x): u = IntHide(Px*(d + e*x)**m, x) return -Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asin(c*x), u, x) def With5165(Px, a, b, c, d, e, m, x): u = IntHide(Px*(d + e*x)**m, x) return Dist(b*c, Int(SimplifyIntegrand(u/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acos(c*x), u, x) def With5166(a, b, c, d, e, f, g, m, n, p, x): u = IntHide((d + e*x)**m*(f + g*x)**p, x) return -Dist(b*c*n, Int(SimplifyIntegrand(u*(a + b*asin(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist((a + b*asin(c*x))**n, u, x) def With5167(a, b, c, d, e, f, g, m, n, p, x): u = IntHide((d + e*x)**m*(f + g*x)**p, x) return Dist(b*c*n, Int(SimplifyIntegrand(u*(a + b*acos(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist((a + b*acos(c*x))**n, u, x) def With5168(a, b, c, d, e, f, g, h, n, p, x): u = IntHide((f + g*x + h*x**S(2))**p/(d + e*x)**S(2), x) return -Dist(b*c*n, Int(SimplifyIntegrand(u*(a + b*asin(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist((a + b*asin(c*x))**n, u, x) def With5169(a, b, c, d, e, f, g, h, n, p, x): u = IntHide((f + g*x + h*x**S(2))**p/(d + e*x)**S(2), x) return Dist(b*c*n, Int(SimplifyIntegrand(u*(a + b*acos(c*x))**(n + S(-1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist((a + b*acos(c*x))**n, u, x) def replacement5170(Px, a, b, c, d, e, m, n, x): return Int(ExpandIntegrand(Px*(a + b*asin(c*x))**n*(d + e*x)**m, x), x) def replacement5171(Px, a, b, c, d, e, m, n, x): return Int(ExpandIntegrand(Px*(a + b*acos(c*x))**n*(d + e*x)**m, x), x) def With5172(a, b, c, d, e, f, g, m, p, x): u = IntHide((d + e*x**S(2))**p*(f + g*x)**m, x) return -Dist(b*c, Int(Dist(S(1)/sqrt(-c**S(2)*x**S(2) + S(1)), u, x), x), x) + Dist(a + b*asin(c*x), u, x) def With5173(a, b, c, d, e, f, g, m, p, x): u = IntHide((d + e*x**S(2))**p*(f + g*x)**m, x) return Dist(b*c, Int(Dist(S(1)/sqrt(-c**S(2)*x**S(2) + S(1)), u, x), x), x) + Dist(a + b*acos(c*x), u, x) def replacement5174(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*asin(c*x))**n*(d + e*x**S(2))**p, (f + g*x)**m, x), x) def replacement5175(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*acos(c*x))**n*(d + e*x**S(2))**p, (f + g*x)**m, x), x) def replacement5176(a, b, c, d, e, f, g, m, n, x): return -Dist(S(1)/(b*c*sqrt(d)*(n + S(1))), Int((a + b*asin(c*x))**(n + S(1))*(f + g*x)**(m + S(-1))*(d*g*m + S(2)*e*f*x + e*g*x**S(2)*(m + S(2))), x), x) + Simp((a + b*asin(c*x))**(n + S(1))*(d + e*x**S(2))*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement5177(a, b, c, d, e, f, g, m, n, x): return Dist(S(1)/(b*c*sqrt(d)*(n + S(1))), Int((a + b*acos(c*x))**(n + S(1))*(f + g*x)**(m + S(-1))*(d*g*m + S(2)*e*f*x + e*g*x**S(2)*(m + S(2))), x), x) - Simp((a + b*acos(c*x))**(n + S(1))*(d + e*x**S(2))*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement5178(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*asin(c*x))**n*sqrt(d + e*x**S(2)), (d + e*x**S(2))**(p + S(-1)/2)*(f + g*x)**m, x), x) def replacement5179(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*acos(c*x))**n*sqrt(d + e*x**S(2)), (d + e*x**S(2))**(p + S(-1)/2)*(f + g*x)**m, x), x) def replacement5180(a, b, c, d, e, f, g, m, n, p, x): return -Dist(S(1)/(b*c*sqrt(d)*(n + S(1))), Int(ExpandIntegrand((a + b*asin(c*x))**(n + S(1))*(f + g*x)**(m + S(-1)), (d + e*x**S(2))**(p + S(-1)/2)*(d*g*m + e*f*x*(S(2)*p + S(1)) + e*g*x**S(2)*(m + S(2)*p + S(1))), x), x), x) + Simp((a + b*asin(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1)/2)*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement5181(a, b, c, d, e, f, g, m, n, p, x): return Dist(S(1)/(b*c*sqrt(d)*(n + S(1))), Int(ExpandIntegrand((a + b*acos(c*x))**(n + S(1))*(f + g*x)**(m + S(-1)), (d + e*x**S(2))**(p + S(-1)/2)*(d*g*m + e*f*x*(S(2)*p + S(1)) + e*g*x**S(2)*(m + S(2)*p + S(1))), x), x), x) - Simp((a + b*acos(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1)/2)*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement5182(a, b, c, d, e, f, g, m, n, x): return -Dist(g*m/(b*c*sqrt(d)*(n + S(1))), Int((a + b*asin(c*x))**(n + S(1))*(f + g*x)**(m + S(-1)), x), x) + Simp((a + b*asin(c*x))**(n + S(1))*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement5183(a, b, c, d, e, f, g, m, n, x): return Dist(g*m/(b*c*sqrt(d)*(n + S(1))), Int((a + b*acos(c*x))**(n + S(1))*(f + g*x)**(m + S(-1)), x), x) - Simp((a + b*acos(c*x))**(n + S(1))*(f + g*x)**m/(b*c*sqrt(d)*(n + S(1))), x) def replacement5184(a, b, c, d, e, f, g, m, n, x): return Dist(c**(-m + S(-1))/sqrt(d), Subst(Int((a + b*x)**n*(c*f + g*sin(x))**m, x), x, asin(c*x)), x) def replacement5185(a, b, c, d, e, f, g, m, n, x): return -Dist(c**(-m + S(-1))/sqrt(d), Subst(Int((a + b*x)**n*(c*f + g*cos(x))**m, x), x, acos(c*x)), x) def replacement5186(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*asin(c*x))**n/sqrt(d + e*x**S(2)), (d + e*x**S(2))**(p + S(1)/2)*(f + g*x)**m, x), x) def replacement5187(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((a + b*acos(c*x))**n/sqrt(d + e*x**S(2)), (d + e*x**S(2))**(p + S(1)/2)*(f + g*x)**m, x), x) def replacement5188(a, b, c, d, e, f, g, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((a + b*asin(c*x))**n*(f + g*x)**m*(-c**S(2)*x**S(2) + S(1))**p, x), x) def replacement5189(a, b, c, d, e, f, g, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((a + b*acos(c*x))**n*(f + g*x)**m*(-c**S(2)*x**S(2) + S(1))**p, x), x) def replacement5190(a, b, c, d, e, f, g, h, m, n, x): return -Dist(g*m/(b*c*sqrt(d)*(n + S(1))), Int((a + b*asin(c*x))**(n + S(1))/(f + g*x), x), x) + Simp((a + b*asin(c*x))**(n + S(1))*log(h*(f + g*x)**m)/(b*c*sqrt(d)*(n + S(1))), x) def replacement5191(a, b, c, d, e, f, g, h, m, n, x): return Dist(g*m/(b*c*sqrt(d)*(n + S(1))), Int((a + b*acos(c*x))**(n + S(1))/(f + g*x), x), x) - Simp((a + b*acos(c*x))**(n + S(1))*log(h*(f + g*x)**m)/(b*c*sqrt(d)*(n + S(1))), x) def replacement5192(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((a + b*asin(c*x))**n*(-c**S(2)*x**S(2) + S(1))**p*log(h*(f + g*x)**m), x), x) def replacement5193(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(d**IntPart(p)*(d + e*x**S(2))**FracPart(p)*(-c**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((a + b*acos(c*x))**n*(-c**S(2)*x**S(2) + S(1))**p*log(h*(f + g*x)**m), x), x) def With5194(a, b, c, d, e, f, g, m, x): u = IntHide((d + e*x)**m*(f + g*x)**m, x) return -Dist(b*c, Int(Dist(S(1)/sqrt(-c**S(2)*x**S(2) + S(1)), u, x), x), x) + Dist(a + b*asin(c*x), u, x) def With5195(a, b, c, d, e, f, g, m, x): u = IntHide((d + e*x)**m*(f + g*x)**m, x) return Dist(b*c, Int(Dist(S(1)/sqrt(-c**S(2)*x**S(2) + S(1)), u, x), x), x) + Dist(a + b*acos(c*x), u, x) def replacement5196(a, b, c, d, e, f, g, m, n, x): return Int(ExpandIntegrand((a + b*asin(c*x))**n*(d + e*x)**m*(f + g*x)**m, x), x) def replacement5197(a, b, c, d, e, f, g, m, n, x): return Int(ExpandIntegrand((a + b*acos(c*x))**n*(d + e*x)**m*(f + g*x)**m, x), x) def With5198(a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False v = IntHide(u, x) if InverseFunctionFreeQ(v, x): return True return False def replacement5198(a, b, c, u, x): v = IntHide(u, x) return -Dist(b*c, Int(SimplifyIntegrand(v/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*asin(c*x), v, x) def With5199(a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False v = IntHide(u, x) if InverseFunctionFreeQ(v, x): return True return False def replacement5199(a, b, c, u, x): v = IntHide(u, x) return Dist(b*c, Int(SimplifyIntegrand(v/sqrt(-c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acos(c*x), v, x) def With5200(Px, a, b, c, d, e, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(Px*(a + b*asin(c*x))**n*(d + e*x**S(2))**p, x) if SumQ(u): return True return False def replacement5200(Px, a, b, c, d, e, n, p, x): u = ExpandIntegrand(Px*(a + b*asin(c*x))**n*(d + e*x**S(2))**p, x) return Int(u, x) def With5201(Px, a, b, c, d, e, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(Px*(a + b*acos(c*x))**n*(d + e*x**S(2))**p, x) if SumQ(u): return True return False def replacement5201(Px, a, b, c, d, e, n, p, x): u = ExpandIntegrand(Px*(a + b*acos(c*x))**n*(d + e*x**S(2))**p, x) return Int(u, x) def With5202(Px, a, b, c, d, e, f, g, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(Px*(a + b*asin(c*x))**n*(f + g*(d + e*x**S(2))**p)**m, x) if SumQ(u): return True return False def replacement5202(Px, a, b, c, d, e, f, g, m, n, p, x): u = ExpandIntegrand(Px*(a + b*asin(c*x))**n*(f + g*(d + e*x**S(2))**p)**m, x) return Int(u, x) def With5203(Px, a, b, c, d, e, f, g, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(Px*(a + b*acos(c*x))**n*(f + g*(d + e*x**S(2))**p)**m, x) if SumQ(u): return True return False def replacement5203(Px, a, b, c, d, e, f, g, m, n, p, x): u = ExpandIntegrand(Px*(a + b*acos(c*x))**n*(f + g*(d + e*x**S(2))**p)**m, x) return Int(u, x) def With5204(RFx, c, n, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(asin(c*x)**n, RFx, x) if SumQ(u): return True return False def replacement5204(RFx, c, n, x): u = ExpandIntegrand(asin(c*x)**n, RFx, x) return Int(u, x) def With5205(RFx, c, n, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(acos(c*x)**n, RFx, x) if SumQ(u): return True return False def replacement5205(RFx, c, n, x): u = ExpandIntegrand(acos(c*x)**n, RFx, x) return Int(u, x) def replacement5206(RFx, a, b, c, n, x): return Int(ExpandIntegrand(RFx*(a + b*asin(c*x))**n, x), x) def replacement5207(RFx, a, b, c, n, x): return Int(ExpandIntegrand(RFx*(a + b*acos(c*x))**n, x), x) def With5208(RFx, c, d, e, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand((d + e*x**S(2))**p*asin(c*x)**n, RFx, x) if SumQ(u): return True return False def replacement5208(RFx, c, d, e, n, p, x): u = ExpandIntegrand((d + e*x**S(2))**p*asin(c*x)**n, RFx, x) return Int(u, x) def With5209(RFx, c, d, e, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand((d + e*x**S(2))**p*acos(c*x)**n, RFx, x) if SumQ(u): return True return False def replacement5209(RFx, c, d, e, n, p, x): u = ExpandIntegrand((d + e*x**S(2))**p*acos(c*x)**n, RFx, x) return Int(u, x) def replacement5210(RFx, a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((d + e*x**S(2))**p, RFx*(a + b*asin(c*x))**n, x), x) def replacement5211(RFx, a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((d + e*x**S(2))**p, RFx*(a + b*acos(c*x))**n, x), x) def replacement5212(a, b, c, n, u, x): return Int(u*(a + b*asin(c*x))**n, x) def replacement5213(a, b, c, n, u, x): return Int(u*(a + b*acos(c*x))**n, x) def replacement5214(a, b, c, d, n, x): return Dist(S(1)/d, Subst(Int((a + b*asin(x))**n, x), x, c + d*x), x) def replacement5215(a, b, c, d, n, x): return Dist(S(1)/d, Subst(Int((a + b*acos(x))**n, x), x, c + d*x), x) def replacement5216(a, b, c, d, e, f, m, n, x): return Dist(S(1)/d, Subst(Int((a + b*asin(x))**n*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement5217(a, b, c, d, e, f, m, n, x): return Dist(S(1)/d, Subst(Int((a + b*acos(x))**n*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement5218(A, B, C, a, b, c, d, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*asin(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p, x), x, c + d*x), x) def replacement5219(A, B, C, a, b, c, d, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*acos(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p, x), x, c + d*x), x) def replacement5220(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*asin(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement5221(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*acos(x))**n*(C*x**S(2)/d**S(2) - C/d**S(2))**p*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement5222(a, b, c, d, x): return Simp(x*sqrt(a + b*asin(c + d*x**S(2))), x) + Simp(sqrt(Pi)*x*(-c*sin(a/(S(2)*b)) + cos(a/(S(2)*b)))*FresnelS(sqrt(c/(Pi*b))*sqrt(a + b*asin(c + d*x**S(2))))/(sqrt(c/b)*(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2)))), x) - Simp(sqrt(Pi)*x*(c*sin(a/(S(2)*b)) + cos(a/(S(2)*b)))*FresnelC(sqrt(c/(Pi*b))*sqrt(a + b*asin(c + d*x**S(2))))/(sqrt(c/b)*(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2)))), x) def replacement5223(a, b, d, x): return Simp(-S(2)*sqrt(a + b*acos(d*x**S(2) + S(1)))*sin(acos(d*x**S(2) + S(1))/S(2))**S(2)/(d*x), x) - Simp(S(2)*sqrt(Pi)*FresnelC(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(1))))*sin(a/(S(2)*b))*sin(acos(d*x**S(2) + S(1))/S(2))/(d*x*sqrt(S(1)/b)), x) + Simp(S(2)*sqrt(Pi)*FresnelS(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(1))))*sin(acos(d*x**S(2) + S(1))/S(2))*cos(a/(S(2)*b))/(d*x*sqrt(S(1)/b)), x) def replacement5224(a, b, d, x): return Simp(S(2)*sqrt(a + b*acos(d*x**S(2) + S(-1)))*cos(acos(d*x**S(2) + S(-1))/S(2))**S(2)/(d*x), x) - Simp(S(2)*sqrt(Pi)*FresnelC(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(-1))))*cos(a/(S(2)*b))*cos(acos(d*x**S(2) + S(-1))/S(2))/(d*x*sqrt(S(1)/b)), x) - Simp(S(2)*sqrt(Pi)*FresnelS(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(-1))))*sin(a/(S(2)*b))*cos(acos(d*x**S(2) + S(-1))/S(2))/(d*x*sqrt(S(1)/b)), x) def replacement5225(a, b, c, d, n, x): return -Dist(S(4)*b**S(2)*n*(n + S(-1)), Int((a + b*asin(c + d*x**S(2)))**(n + S(-2)), x), x) + Simp(x*(a + b*asin(c + d*x**S(2)))**n, x) + Simp(S(2)*b*n*(a + b*asin(c + d*x**S(2)))**(n + S(-1))*sqrt(-S(2)*c*d*x**S(2) - d**S(2)*x**S(4))/(d*x), x) def replacement5226(a, b, c, d, n, x): return -Dist(S(4)*b**S(2)*n*(n + S(-1)), Int((a + b*acos(c + d*x**S(2)))**(n + S(-2)), x), x) + Simp(x*(a + b*acos(c + d*x**S(2)))**n, x) - Simp(S(2)*b*n*(a + b*acos(c + d*x**S(2)))**(n + S(-1))*sqrt(-S(2)*c*d*x**S(2) - d**S(2)*x**S(4))/(d*x), x) def replacement5227(a, b, c, d, x): return -Simp(x*(c*cos(a/(S(2)*b)) - sin(a/(S(2)*b)))*CosIntegral(c*(a + b*asin(c + d*x**S(2)))/(S(2)*b))/(S(2)*b*(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2)))), x) - Simp(x*(c*cos(a/(S(2)*b)) + sin(a/(S(2)*b)))*SinIntegral(c*(a + b*asin(c + d*x**S(2)))/(S(2)*b))/(S(2)*b*(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2)))), x) def replacement5228(a, b, d, x): return Simp(sqrt(S(2))*x*CosIntegral((a + b*acos(d*x**S(2) + S(1)))/(S(2)*b))*cos(a/(S(2)*b))/(S(2)*b*sqrt(-d*x**S(2))), x) + Simp(sqrt(S(2))*x*SinIntegral((a + b*acos(d*x**S(2) + S(1)))/(S(2)*b))*sin(a/(S(2)*b))/(S(2)*b*sqrt(-d*x**S(2))), x) def replacement5229(a, b, d, x): return Simp(sqrt(S(2))*x*CosIntegral((a + b*acos(d*x**S(2) + S(-1)))/(S(2)*b))*sin(a/(S(2)*b))/(S(2)*b*sqrt(d*x**S(2))), x) - Simp(sqrt(S(2))*x*SinIntegral((a + b*acos(d*x**S(2) + S(-1)))/(S(2)*b))*cos(a/(S(2)*b))/(S(2)*b*sqrt(d*x**S(2))), x) def replacement5230(a, b, c, d, x): return -Simp(sqrt(Pi)*x*(-c*sin(a/(S(2)*b)) + cos(a/(S(2)*b)))*FresnelC(sqrt(a + b*asin(c + d*x**S(2)))/(sqrt(Pi)*sqrt(b*c)))/(sqrt(b*c)*(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2)))), x) - Simp(sqrt(Pi)*x*(c*sin(a/(S(2)*b)) + cos(a/(S(2)*b)))*FresnelS(sqrt(a + b*asin(c + d*x**S(2)))/(sqrt(Pi)*sqrt(b*c)))/(sqrt(b*c)*(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2)))), x) def replacement5231(a, b, d, x): return Simp(-S(2)*sqrt(Pi/b)*FresnelC(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(1))))*sin(acos(d*x**S(2) + S(1))/S(2))*cos(a/(S(2)*b))/(d*x), x) - Simp(S(2)*sqrt(Pi/b)*FresnelS(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(1))))*sin(a/(S(2)*b))*sin(acos(d*x**S(2) + S(1))/S(2))/(d*x), x) def replacement5232(a, b, d, x): return Simp(S(2)*sqrt(Pi/b)*FresnelC(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(-1))))*sin(a/(S(2)*b))*cos(acos(d*x**S(2) + S(-1))/S(2))/(d*x), x) - Simp(S(2)*sqrt(Pi/b)*FresnelS(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(-1))))*cos(a/(S(2)*b))*cos(acos(d*x**S(2) + S(-1))/S(2))/(d*x), x) def replacement5233(a, b, c, d, x): return -Simp(sqrt(-S(2)*c*d*x**S(2) - d**S(2)*x**S(4))/(b*d*x*sqrt(a + b*asin(c + d*x**S(2)))), x) + Simp(sqrt(Pi)*x*(c/b)**(S(3)/2)*(-c*sin(a/(S(2)*b)) + cos(a/(S(2)*b)))*FresnelS(sqrt(c/(Pi*b))*sqrt(a + b*asin(c + d*x**S(2))))/(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2))), x) - Simp(sqrt(Pi)*x*(c/b)**(S(3)/2)*(c*sin(a/(S(2)*b)) + cos(a/(S(2)*b)))*FresnelC(sqrt(c/(Pi*b))*sqrt(a + b*asin(c + d*x**S(2))))/(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2))), x) def replacement5234(a, b, d, x): return Simp(sqrt(-d**S(2)*x**S(4) - S(2)*d*x**S(2))/(b*d*x*sqrt(a + b*acos(d*x**S(2) + S(1)))), x) - Simp(S(2)*sqrt(Pi)*(S(1)/b)**(S(3)/2)*FresnelC(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(1))))*sin(a/(S(2)*b))*sin(acos(d*x**S(2) + S(1))/S(2))/(d*x), x) + Simp(S(2)*sqrt(Pi)*(S(1)/b)**(S(3)/2)*FresnelS(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(1))))*sin(acos(d*x**S(2) + S(1))/S(2))*cos(a/(S(2)*b))/(d*x), x) def replacement5235(a, b, d, x): return Simp(sqrt(-d**S(2)*x**S(4) + S(2)*d*x**S(2))/(b*d*x*sqrt(a + b*acos(d*x**S(2) + S(-1)))), x) - Simp(S(2)*sqrt(Pi)*(S(1)/b)**(S(3)/2)*FresnelC(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(-1))))*cos(a/(S(2)*b))*cos(acos(d*x**S(2) + S(-1))/S(2))/(d*x), x) - Simp(S(2)*sqrt(Pi)*(S(1)/b)**(S(3)/2)*FresnelS(sqrt(S(1)/(Pi*b))*sqrt(a + b*acos(d*x**S(2) + S(-1))))*sin(a/(S(2)*b))*cos(acos(d*x**S(2) + S(-1))/S(2))/(d*x), x) def replacement5236(a, b, c, d, x): return Simp(x*(-c*sin(a/(S(2)*b)) + cos(a/(S(2)*b)))*SinIntegral(c*(a + b*asin(c + d*x**S(2)))/(S(2)*b))/(S(4)*b**S(2)*(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2)))), x) - Simp(x*(c*sin(a/(S(2)*b)) + cos(a/(S(2)*b)))*CosIntegral(c*(a + b*asin(c + d*x**S(2)))/(S(2)*b))/(S(4)*b**S(2)*(-c*sin(asin(c + d*x**S(2))/S(2)) + cos(asin(c + d*x**S(2))/S(2)))), x) - Simp(sqrt(-S(2)*c*d*x**S(2) - d**S(2)*x**S(4))/(S(2)*b*d*x*(a + b*asin(c + d*x**S(2)))), x) def replacement5237(a, b, d, x): return Simp(sqrt(-d**S(2)*x**S(4) - S(2)*d*x**S(2))/(S(2)*b*d*x*(a + b*acos(d*x**S(2) + S(1)))), x) + Simp(sqrt(S(2))*x*CosIntegral((a + b*acos(d*x**S(2) + S(1)))/(S(2)*b))*sin(a/(S(2)*b))/(S(4)*b**S(2)*sqrt(-d*x**S(2))), x) - Simp(sqrt(S(2))*x*SinIntegral((a + b*acos(d*x**S(2) + S(1)))/(S(2)*b))*cos(a/(S(2)*b))/(S(4)*b**S(2)*sqrt(-d*x**S(2))), x) def replacement5238(a, b, d, x): return Simp(sqrt(-d**S(2)*x**S(4) + S(2)*d*x**S(2))/(S(2)*b*d*x*(a + b*acos(d*x**S(2) + S(-1)))), x) - Simp(sqrt(S(2))*x*CosIntegral((a + b*acos(d*x**S(2) + S(-1)))/(S(2)*b))*cos(a/(S(2)*b))/(S(4)*b**S(2)*sqrt(d*x**S(2))), x) - Simp(sqrt(S(2))*x*SinIntegral((a + b*acos(d*x**S(2) + S(-1)))/(S(2)*b))*sin(a/(S(2)*b))/(S(4)*b**S(2)*sqrt(d*x**S(2))), x) def replacement5239(a, b, c, d, n, x): return -Dist(S(1)/(S(4)*b**S(2)*(n + S(1))*(n + S(2))), Int((a + b*asin(c + d*x**S(2)))**(n + S(2)), x), x) + Simp(x*(a + b*asin(c + d*x**S(2)))**(n + S(2))/(S(4)*b**S(2)*(n + S(1))*(n + S(2))), x) + Simp((a + b*asin(c + d*x**S(2)))**(n + S(1))*sqrt(-S(2)*c*d*x**S(2) - d**S(2)*x**S(4))/(S(2)*b*d*x*(n + S(1))), x) def replacement5240(a, b, c, d, n, x): return -Dist(S(1)/(S(4)*b**S(2)*(n + S(1))*(n + S(2))), Int((a + b*acos(c + d*x**S(2)))**(n + S(2)), x), x) + Simp(x*(a + b*acos(c + d*x**S(2)))**(n + S(2))/(S(4)*b**S(2)*(n + S(1))*(n + S(2))), x) - Simp((a + b*acos(c + d*x**S(2)))**(n + S(1))*sqrt(-S(2)*c*d*x**S(2) - d**S(2)*x**S(4))/(S(2)*b*d*x*(n + S(1))), x) def replacement5241(a, n, p, x): return Dist(S(1)/p, Subst(Int(x**n/tan(x), x), x, asin(a*x**p)), x) def replacement5242(a, n, p, x): return -Dist(S(1)/p, Subst(Int(x**n*tan(x), x), x, acos(a*x**p)), x) def replacement5243(a, b, c, m, n, u, x): return Int(u*acsc(a/c + b*x**n/c)**m, x) def replacement5244(a, b, c, m, n, u, x): return Int(u*asec(a/c + b*x**n/c)**m, x) def replacement5245(b, n, x): return Dist(sqrt(-b*x**S(2))/(b*x), Subst(Int(asin(x)**n/sqrt(S(1) - x**S(2)), x), x, sqrt(b*x**S(2) + S(1))), x) def replacement5246(b, n, x): return Dist(sqrt(-b*x**S(2))/(b*x), Subst(Int(acos(x)**n/sqrt(S(1) - x**S(2)), x), x, sqrt(b*x**S(2) + S(1))), x) def replacement5247(a, b, c, f, n, u, x): return Dist(S(1)/b, Subst(Int(f**(c*x**n)*ReplaceAll(u, Rule(x, -a/b + sin(x)/b))*cos(x), x), x, asin(a + b*x)), x) def replacement5248(a, b, c, f, n, u, x): return -Dist(S(1)/b, Subst(Int(f**(c*x**n)*ReplaceAll(u, Rule(x, -a/b + cos(x)/b))*sin(x), x), x, acos(a + b*x)), x) def replacement5249(a, b, c, d, x): return -Dist(x*sqrt(a**S(2)*x**S(2) + S(2)*a*b*sqrt(c + d*x**S(2)) + b**S(2)*d)/sqrt(-x**S(2)*(a**S(2)*x**S(2) + S(2)*a*b*sqrt(c + d*x**S(2)) + b**S(2)*d)), Int(x*(S(2)*a*sqrt(c + d*x**S(2)) + b*d)/(sqrt(c + d*x**S(2))*sqrt(a**S(2)*x**S(2) + S(2)*a*b*sqrt(c + d*x**S(2)) + b**S(2)*d)), x), x) + Simp(x*asin(a*x**S(2) + b*sqrt(c + d*x**S(2))), x) def replacement5250(a, b, c, d, x): return Dist(x*sqrt(a**S(2)*x**S(2) + S(2)*a*b*sqrt(c + d*x**S(2)) + b**S(2)*d)/sqrt(-x**S(2)*(a**S(2)*x**S(2) + S(2)*a*b*sqrt(c + d*x**S(2)) + b**S(2)*d)), Int(x*(S(2)*a*sqrt(c + d*x**S(2)) + b*d)/(sqrt(c + d*x**S(2))*sqrt(a**S(2)*x**S(2) + S(2)*a*b*sqrt(c + d*x**S(2)) + b**S(2)*d)), x), x) + Simp(x*acos(a*x**S(2) + b*sqrt(c + d*x**S(2))), x) def replacement5251(u, x): return -Int(SimplifyIntegrand(x*D(u, x)/sqrt(S(1) - u**S(2)), x), x) + Simp(x*asin(u), x) def replacement5252(u, x): return Int(SimplifyIntegrand(x*D(u, x)/sqrt(S(1) - u**S(2)), x), x) + Simp(x*acos(u), x) def replacement5253(a, b, c, d, m, u, x): return -Dist(b/(d*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/sqrt(S(1) - u**S(2)), x), x), x) + Simp((a + b*asin(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement5254(a, b, c, d, m, u, x): return Dist(b/(d*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/sqrt(S(1) - u**S(2)), x), x), x) + Simp((a + b*acos(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def With5255(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement5255(a, b, u, v, x): w = IntHide(v, x) return -Dist(b, Int(SimplifyIntegrand(w*D(u, x)/sqrt(S(1) - u**S(2)), x), x), x) + Dist(a + b*asin(u), w, x) def With5256(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement5256(a, b, u, v, x): w = IntHide(v, x) return Dist(b, Int(SimplifyIntegrand(w*D(u, x)/sqrt(S(1) - u**S(2)), x), x), x) + Dist(a + b*acos(u), w, x) def replacement5257(a, b, c, n, x): return -Dist(b*c*n, Int(x*(a + b*ArcTan(c*x))**(n + S(-1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*ArcTan(c*x))**n, x) def replacement5258(a, b, c, n, x): return Dist(b*c*n, Int(x*(a + b*acot(c*x))**(n + S(-1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp(x*(a + b*acot(c*x))**n, x) def replacement5259(a, b, c, n, x): return Int((a + b*ArcTan(c*x))**n, x) def replacement5260(a, b, c, n, x): return Int((a + b*acot(c*x))**n, x) def replacement5261(a, b, c, d, e, n, x): return Dist(b*c*n/e, Int((a + b*ArcTan(c*x))**(n + S(-1))*log(S(2)*d/(d + e*x))/(c**S(2)*x**S(2) + S(1)), x), x) - Simp((a + b*ArcTan(c*x))**n*log(S(2)*d/(d + e*x))/e, x) def replacement5262(a, b, c, d, e, n, x): return -Dist(b*c*n/e, Int((a + b*acot(c*x))**(n + S(-1))*log(S(2)*d/(d + e*x))/(c**S(2)*x**S(2) + S(1)), x), x) - Simp((a + b*acot(c*x))**n*log(S(2)*d/(d + e*x))/e, x) def replacement5263(c, d, e, x): return Simp(I*PolyLog(S(2), Simp(I*c*(d + e*x)/(I*c*d - e), x))/(S(2)*e), x) - Simp(I*PolyLog(S(2), Simp(I*c*(d + e*x)/(I*c*d + e), x))/(S(2)*e), x) - Simp(ArcTan(c*d/e)*log(d + e*x)/e, x) def replacement5264(c, d, e, x): return Dist(I/S(2), Int(log(-I*c*x + S(1))/(d + e*x), x), x) - Dist(I/S(2), Int(log(I*c*x + S(1))/(d + e*x), x), x) def replacement5265(c, d, e, x): return Dist(I/S(2), Int(log(S(1) - I/(c*x))/(d + e*x), x), x) - Dist(I/S(2), Int(log(S(1) + I/(c*x))/(d + e*x), x), x) def replacement5266(a, b, c, d, e, x): return Dist(b, Int(ArcTan(c*x)/(d + e*x), x), x) + Simp(a*log(RemoveContent(d + e*x, x))/e, x) def replacement5267(a, b, c, d, e, x): return Dist(b, Int(acot(c*x)/(d + e*x), x), x) + Simp(a*log(RemoveContent(d + e*x, x))/e, x) def replacement5268(a, b, c, d, e, p, x): return -Dist(b*c/(e*(p + S(1))), Int((d + e*x)**(p + S(1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*ArcTan(c*x))*(d + e*x)**(p + S(1))/(e*(p + S(1))), x) def replacement5269(a, b, c, d, e, p, x): return Dist(b*c/(e*(p + S(1))), Int((d + e*x)**(p + S(1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*acot(c*x))*(d + e*x)**(p + S(1))/(e*(p + S(1))), x) def replacement5270(a, b, c, n, x): return -Dist(S(2)*b*c*n, Int((a + b*ArcTan(c*x))**(n + S(-1))*atanh(S(1) - S(2)*I/(-c*x + I))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp(S(2)*(a + b*ArcTan(c*x))**n*atanh(S(1) - S(2)*I/(-c*x + I)), x) def replacement5271(a, b, c, n, x): return Dist(S(2)*b*c*n, Int((a + b*acot(c*x))**(n + S(-1))*acoth(S(1) - S(2)*I/(-c*x + I))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp(S(2)*(a + b*acot(c*x))**n*acoth(S(1) - S(2)*I/(-c*x + I)), x) def replacement5272(a, b, c, m, n, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*ArcTan(c*x))**(n + S(-1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**(m + S(1))*(a + b*ArcTan(c*x))**n/(m + S(1)), x) def replacement5273(a, b, c, m, n, x): return Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*acot(c*x))**(n + S(-1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp(x**(m + S(1))*(a + b*acot(c*x))**n/(m + S(1)), x) def replacement5274(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*ArcTan(c*x))**n*(d + e*x)**p, x), x) def replacement5275(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*acot(c*x))**n*(d + e*x)**p, x), x) def replacement5276(a, b, c, d, e, n, p, x): return Int((a + b*ArcTan(c*x))**n*(d + e*x)**p, x) def replacement5277(a, b, c, d, e, n, p, x): return Int((a + b*acot(c*x))**n*(d + e*x)**p, x) def replacement5278(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-1))*(a + b*ArcTan(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-1))*(a + b*ArcTan(c*x))**n/(d + e*x), x), x) def replacement5279(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-1))*(a + b*acot(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-1))*(a + b*acot(c*x))**n/(d + e*x), x), x) def replacement5280(a, b, c, d, e, n, x): return -Dist(b*c*n/d, Int((a + b*ArcTan(c*x))**(n + S(-1))*log(S(2)*e*x/(d + e*x))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*ArcTan(c*x))**n*log(S(2)*e*x/(d + e*x))/d, x) def replacement5281(a, b, c, d, e, n, x): return Dist(b*c*n/d, Int((a + b*acot(c*x))**(n + S(-1))*log(S(2)*e*x/(d + e*x))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*acot(c*x))**n*log(S(2)*e*x/(d + e*x))/d, x) def replacement5282(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*ArcTan(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(1))*(a + b*ArcTan(c*x))**n/(d + e*x), x), x) def replacement5283(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*acot(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(1))*(a + b*acot(c*x))**n/(d + e*x), x), x) def replacement5284(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(x**m*(a + b*ArcTan(c*x))**n*(d + e*x)**p, x), x) def replacement5285(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(x**m*(a + b*acot(c*x))**n*(d + e*x)**p, x), x) def replacement5286(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*ArcTan(c*x))**n*(d + e*x)**p, x) def replacement5287(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*acot(c*x))**n*(d + e*x)**p, x) def replacement5288(a, b, c, d, e, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*ArcTan(c*x))*(d + e*x**S(2))**(p + S(-1)), x), x) + Simp(x*(a + b*ArcTan(c*x))*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) - Simp(b*(d + e*x**S(2))**p/(S(2)*c*p*(S(2)*p + S(1))), x) def replacement5289(a, b, c, d, e, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*acot(c*x))*(d + e*x**S(2))**(p + S(-1)), x), x) + Simp(x*(a + b*acot(c*x))*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) + Simp(b*(d + e*x**S(2))**p/(S(2)*c*p*(S(2)*p + S(1))), x) def replacement5290(a, b, c, d, e, n, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) + Dist(b**S(2)*d*n*(n + S(-1))/(S(2)*p*(S(2)*p + S(1))), Int((a + b*ArcTan(c*x))**(n + S(-2))*(d + e*x**S(2))**(p + S(-1)), x), x) + Simp(x*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) - Simp(b*n*(a + b*ArcTan(c*x))**(n + S(-1))*(d + e*x**S(2))**p/(S(2)*c*p*(S(2)*p + S(1))), x) def replacement5291(a, b, c, d, e, n, p, x): return Dist(S(2)*d*p/(S(2)*p + S(1)), Int((a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) + Dist(b**S(2)*d*n*(n + S(-1))/(S(2)*p*(S(2)*p + S(1))), Int((a + b*acot(c*x))**(n + S(-2))*(d + e*x**S(2))**(p + S(-1)), x), x) + Simp(x*(a + b*acot(c*x))**n*(d + e*x**S(2))**p/(S(2)*p + S(1)), x) + Simp(b*n*(a + b*acot(c*x))**(n + S(-1))*(d + e*x**S(2))**p/(S(2)*c*p*(S(2)*p + S(1))), x) def replacement5292(a, b, c, d, e, x): return Simp(log(RemoveContent(a + b*ArcTan(c*x), x))/(b*c*d), x) def replacement5293(a, b, c, d, e, x): return -Simp(log(RemoveContent(a + b*acot(c*x), x))/(b*c*d), x) def replacement5294(a, b, c, d, e, n, x): return Simp((a + b*ArcTan(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement5295(a, b, c, d, e, n, x): return -Simp((a + b*acot(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement5296(a, b, c, d, e, x): return Simp(I*b*PolyLog(S(2), -I*sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/(c*sqrt(d)), x) - Simp(I*b*PolyLog(S(2), I*sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/(c*sqrt(d)), x) + Simp(-S(2)*I*(a + b*ArcTan(c*x))*ArcTan(sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/(c*sqrt(d)), x) def replacement5297(a, b, c, d, e, x): return -Simp(I*b*PolyLog(S(2), -I*sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/(c*sqrt(d)), x) + Simp(I*b*PolyLog(S(2), I*sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/(c*sqrt(d)), x) + Simp(-S(2)*I*(a + b*acot(c*x))*ArcTan(sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/(c*sqrt(d)), x) def replacement5298(a, b, c, d, e, n, x): return Dist(S(1)/(c*sqrt(d)), Subst(Int((a + b*x)**n/cos(x), x), x, ArcTan(c*x)), x) def replacement5299(a, b, c, d, e, n, x): return -Dist(x*sqrt(S(1) + S(1)/(c**S(2)*x**S(2)))/sqrt(d + e*x**S(2)), Subst(Int((a + b*x)**n/sin(x), x), x, acot(c*x)), x) def replacement5300(a, b, c, d, e, n, x): return Dist(sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*ArcTan(c*x))**n/sqrt(c**S(2)*x**S(2) + S(1)), x), x) def replacement5301(a, b, c, d, e, n, x): return Dist(sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*acot(c*x))**n/sqrt(c**S(2)*x**S(2) + S(1)), x), x) def replacement5302(a, b, c, d, e, n, x): return -Dist(b*c*n/S(2), Int(x*(a + b*ArcTan(c*x))**(n + S(-1))/(d + e*x**S(2))**S(2), x), x) + Simp(x*(a + b*ArcTan(c*x))**n/(S(2)*d*(d + e*x**S(2))), x) + Simp((a + b*ArcTan(c*x))**(n + S(1))/(S(2)*b*c*d**S(2)*(n + S(1))), x) def replacement5303(a, b, c, d, e, n, x): return Dist(b*c*n/S(2), Int(x*(a + b*acot(c*x))**(n + S(-1))/(d + e*x**S(2))**S(2), x), x) + Simp(x*(a + b*acot(c*x))**n/(S(2)*d*(d + e*x**S(2))), x) - Simp((a + b*acot(c*x))**(n + S(1))/(S(2)*b*c*d**S(2)*(n + S(1))), x) def replacement5304(a, b, c, d, e, x): return Simp(b/(c*d*sqrt(d + e*x**S(2))), x) + Simp(x*(a + b*ArcTan(c*x))/(d*sqrt(d + e*x**S(2))), x) def replacement5305(a, b, c, d, e, x): return -Simp(b/(c*d*sqrt(d + e*x**S(2))), x) + Simp(x*(a + b*acot(c*x))/(d*sqrt(d + e*x**S(2))), x) def replacement5306(a, b, c, d, e, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*ArcTan(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) + Simp(b*(d + e*x**S(2))**(p + S(1))/(S(4)*c*d*(p + S(1))**S(2)), x) - Simp(x*(a + b*ArcTan(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) def replacement5307(a, b, c, d, e, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*acot(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*(d + e*x**S(2))**(p + S(1))/(S(4)*c*d*(p + S(1))**S(2)), x) - Simp(x*(a + b*acot(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) def replacement5308(a, b, c, d, e, n, x): return -Dist(b**S(2)*n*(n + S(-1)), Int((a + b*ArcTan(c*x))**(n + S(-2))/(d + e*x**S(2))**(S(3)/2), x), x) + Simp(x*(a + b*ArcTan(c*x))**n/(d*sqrt(d + e*x**S(2))), x) + Simp(b*n*(a + b*ArcTan(c*x))**(n + S(-1))/(c*d*sqrt(d + e*x**S(2))), x) def replacement5309(a, b, c, d, e, n, x): return -Dist(b**S(2)*n*(n + S(-1)), Int((a + b*acot(c*x))**(n + S(-2))/(d + e*x**S(2))**(S(3)/2), x), x) + Simp(x*(a + b*acot(c*x))**n/(d*sqrt(d + e*x**S(2))), x) - Simp(b*n*(a + b*acot(c*x))**(n + S(-1))/(c*d*sqrt(d + e*x**S(2))), x) def replacement5310(a, b, c, d, e, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b**S(2)*n*(n + S(-1))/(S(4)*(p + S(1))**S(2)), Int((a + b*ArcTan(c*x))**(n + S(-2))*(d + e*x**S(2))**p, x), x) - Simp(x*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) + Simp(b*n*(a + b*ArcTan(c*x))**(n + S(-1))*(d + e*x**S(2))**(p + S(1))/(S(4)*c*d*(p + S(1))**S(2)), x) def replacement5311(a, b, c, d, e, n, p, x): return Dist((S(2)*p + S(3))/(S(2)*d*(p + S(1))), Int((a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(b**S(2)*n*(n + S(-1))/(S(4)*(p + S(1))**S(2)), Int((a + b*acot(c*x))**(n + S(-2))*(d + e*x**S(2))**p, x), x) - Simp(x*(a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*d*(p + S(1))), x) - Simp(b*n*(a + b*acot(c*x))**(n + S(-1))*(d + e*x**S(2))**(p + S(1))/(S(4)*c*d*(p + S(1))**S(2)), x) def replacement5312(a, b, c, d, e, n, p, x): return -Dist(S(2)*c*(p + S(1))/(b*(n + S(1))), Int(x*(a + b*ArcTan(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp((a + b*ArcTan(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement5313(a, b, c, d, e, n, p, x): return Dist(S(2)*c*(p + S(1))/(b*(n + S(1))), Int(x*(a + b*acot(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) - Simp((a + b*acot(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement5314(a, b, c, d, e, n, p, x): return Dist(d**p/c, Subst(Int((a + b*x)**n*cos(x)**(-S(2)*p + S(-2)), x), x, ArcTan(c*x)), x) def replacement5315(a, b, c, d, e, n, p, x): return Dist(d**(p + S(1)/2)*sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*ArcTan(c*x))**n*(c**S(2)*x**S(2) + S(1))**p, x), x) def replacement5316(a, b, c, d, e, n, p, x): return -Dist(d**p/c, Subst(Int((a + b*x)**n*sin(x)**(-S(2)*p + S(-2)), x), x, acot(c*x)), x) def replacement5317(a, b, c, d, e, n, p, x): return -Dist(d**(p + S(1)/2)*x*sqrt((c**S(2)*x**S(2) + S(1))/(c**S(2)*x**S(2)))/sqrt(d + e*x**S(2)), Subst(Int((a + b*x)**n*sin(x)**(-S(2)*p + S(-2)), x), x, acot(c*x)), x) def replacement5318(c, d, e, x): return Dist(I/S(2), Int(log(-I*c*x + S(1))/(d + e*x**S(2)), x), x) - Dist(I/S(2), Int(log(I*c*x + S(1))/(d + e*x**S(2)), x), x) def replacement5319(c, d, e, x): return Dist(I/S(2), Int(log(S(1) - I/(c*x))/(d + e*x**S(2)), x), x) - Dist(I/S(2), Int(log(S(1) + I/(c*x))/(d + e*x**S(2)), x), x) def replacement5320(a, b, c, d, e, x): return Dist(a, Int(S(1)/(d + e*x**S(2)), x), x) + Dist(b, Int(ArcTan(c*x)/(d + e*x**S(2)), x), x) def replacement5321(a, b, c, d, e, x): return Dist(a, Int(S(1)/(d + e*x**S(2)), x), x) + Dist(b, Int(acot(c*x)/(d + e*x**S(2)), x), x) def With5322(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c, Int(ExpandIntegrand(u/(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*ArcTan(c*x), u, x) def With5323(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return Dist(b*c, Int(ExpandIntegrand(u/(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acot(c*x), u, x) def replacement5324(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*ArcTan(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement5325(a, b, c, d, e, n, p, x): return Int(ExpandIntegrand((a + b*acot(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement5326(a, b, c, d, e, n, p, x): return Int((a + b*ArcTan(c*x))**n*(d + e*x**S(2))**p, x) def replacement5327(a, b, c, d, e, n, p, x): return Int((a + b*acot(c*x))**n*(d + e*x**S(2))**p, x) def replacement5328(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*ArcTan(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*ArcTan(c*x))**n/(d + e*x**S(2)), x), x) def replacement5329(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*acot(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*acot(c*x))**n/(d + e*x**S(2)), x), x) def replacement5330(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*ArcTan(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*ArcTan(c*x))**n/(d + e*x**S(2)), x), x) def replacement5331(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*acot(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*acot(c*x))**n/(d + e*x**S(2)), x), x) def replacement5332(a, b, c, d, e, n, x): return -Dist(S(1)/(c*d), Int((a + b*ArcTan(c*x))**n/(-c*x + I), x), x) - Simp(I*(a + b*ArcTan(c*x))**(n + S(1))/(b*e*(n + S(1))), x) def replacement5333(a, b, c, d, e, n, x): return -Dist(S(1)/(c*d), Int((a + b*acot(c*x))**n/(-c*x + I), x), x) + Simp(I*(a + b*acot(c*x))**(n + S(1))/(b*e*(n + S(1))), x) def replacement5334(a, b, c, d, e, n, x): return -Dist(S(1)/(b*c*d*(n + S(1))), Int((a + b*ArcTan(c*x))**(n + S(1)), x), x) + Simp(x*(a + b*ArcTan(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement5335(a, b, c, d, e, n, x): return Dist(S(1)/(b*c*d*(n + S(1))), Int((a + b*acot(c*x))**(n + S(1)), x), x) - Simp(x*(a + b*acot(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement5336(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*ArcTan(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*ArcTan(c*x))**n/(d + e*x**S(2)), x), x) def replacement5337(a, b, c, d, e, m, n, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*acot(c*x))**n, x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*acot(c*x))**n/(d + e*x**S(2)), x), x) def replacement5338(a, b, c, d, e, n, x): return Dist(I/d, Int((a + b*ArcTan(c*x))**n/(x*(c*x + I)), x), x) - Simp(I*(a + b*ArcTan(c*x))**(n + S(1))/(b*d*(n + S(1))), x) def replacement5339(a, b, c, d, e, n, x): return Dist(I/d, Int((a + b*acot(c*x))**n/(x*(c*x + I)), x), x) + Simp(I*(a + b*acot(c*x))**(n + S(1))/(b*d*(n + S(1))), x) def replacement5340(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*ArcTan(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*ArcTan(c*x))**n/(d + e*x**S(2)), x), x) def replacement5341(a, b, c, d, e, m, n, x): return Dist(S(1)/d, Int(x**m*(a + b*acot(c*x))**n, x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*acot(c*x))**n/(d + e*x**S(2)), x), x) def replacement5342(a, b, c, d, e, m, n, x): return -Dist(m/(b*c*d*(n + S(1))), Int(x**(m + S(-1))*(a + b*ArcTan(c*x))**(n + S(1)), x), x) + Simp(x**m*(a + b*ArcTan(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement5343(a, b, c, d, e, m, n, x): return Dist(m/(b*c*d*(n + S(1))), Int(x**(m + S(-1))*(a + b*acot(c*x))**(n + S(1)), x), x) - Simp(x**m*(a + b*acot(c*x))**(n + S(1))/(b*c*d*(n + S(1))), x) def replacement5344(a, b, c, d, e, m, x): return Int(ExpandIntegrand(a + b*ArcTan(c*x), x**m/(d + e*x**S(2)), x), x) def replacement5345(a, b, c, d, e, m, x): return Int(ExpandIntegrand(a + b*acot(c*x), x**m/(d + e*x**S(2)), x), x) def replacement5346(a, b, c, d, e, n, p, x): return -Dist(b*n/(S(2)*c*(p + S(1))), Int((a + b*ArcTan(c*x))**(n + S(-1))*(d + e*x**S(2))**p, x), x) + Simp((a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5347(a, b, c, d, e, n, p, x): return Dist(b*n/(S(2)*c*(p + S(1))), Int((a + b*acot(c*x))**(n + S(-1))*(d + e*x**S(2))**p, x), x) + Simp((a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5348(a, b, c, d, e, n, x): return -Dist(S(4)/(b**S(2)*(n + S(1))*(n + S(2))), Int(x*(a + b*ArcTan(c*x))**(n + S(2))/(d + e*x**S(2))**S(2), x), x) - Simp((a + b*ArcTan(c*x))**(n + S(2))*(-c**S(2)*x**S(2) + S(1))/(b**S(2)*e*(d + e*x**S(2))*(n + S(1))*(n + S(2))), x) + Simp(x*(a + b*ArcTan(c*x))**(n + S(1))/(b*c*d*(d + e*x**S(2))*(n + S(1))), x) def replacement5349(a, b, c, d, e, n, x): return -Dist(S(4)/(b**S(2)*(n + S(1))*(n + S(2))), Int(x*(a + b*acot(c*x))**(n + S(2))/(d + e*x**S(2))**S(2), x), x) - Simp((a + b*acot(c*x))**(n + S(2))*(-c**S(2)*x**S(2) + S(1))/(b**S(2)*e*(d + e*x**S(2))*(n + S(1))*(n + S(2))), x) - Simp(x*(a + b*acot(c*x))**(n + S(1))/(b*c*d*(d + e*x**S(2))*(n + S(1))), x) def replacement5350(a, b, c, d, e, p, x): return -Dist(S(1)/(S(2)*c**S(2)*d*(p + S(1))), Int((a + b*ArcTan(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*(d + e*x**S(2))**(p + S(1))/(S(4)*c**S(3)*d*(p + S(1))**S(2)), x) + Simp(x*(a + b*ArcTan(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*c**S(2)*d*(p + S(1))), x) def replacement5351(a, b, c, d, e, p, x): return -Dist(S(1)/(S(2)*c**S(2)*d*(p + S(1))), Int((a + b*acot(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) + Simp(b*(d + e*x**S(2))**(p + S(1))/(S(4)*c**S(3)*d*(p + S(1))**S(2)), x) + Simp(x*(a + b*acot(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*c**S(2)*d*(p + S(1))), x) def replacement5352(a, b, c, d, e, n, x): return Dist(b*n/(S(2)*c), Int(x*(a + b*ArcTan(c*x))**(n + S(-1))/(d + e*x**S(2))**S(2), x), x) + Simp((a + b*ArcTan(c*x))**(n + S(1))/(S(2)*b*c**S(3)*d**S(2)*(n + S(1))), x) - Simp(x*(a + b*ArcTan(c*x))**n/(S(2)*c**S(2)*d*(d + e*x**S(2))), x) def replacement5353(a, b, c, d, e, n, x): return -Dist(b*n/(S(2)*c), Int(x*(a + b*acot(c*x))**(n + S(-1))/(d + e*x**S(2))**S(2), x), x) - Simp((a + b*acot(c*x))**(n + S(1))/(S(2)*b*c**S(3)*d**S(2)*(n + S(1))), x) - Simp(x*(a + b*acot(c*x))**n/(S(2)*c**S(2)*d*(d + e*x**S(2))), x) def replacement5354(a, b, c, d, e, m, p, x): return Dist((m + S(-1))/(c**S(2)*d*m), Int(x**(m + S(-2))*(a + b*ArcTan(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) + Simp(b*x**m*(d + e*x**S(2))**(p + S(1))/(c*d*m**S(2)), x) - Simp(x**(m + S(-1))*(a + b*ArcTan(c*x))*(d + e*x**S(2))**(p + S(1))/(c**S(2)*d*m), x) def replacement5355(a, b, c, d, e, m, p, x): return Dist((m + S(-1))/(c**S(2)*d*m), Int(x**(m + S(-2))*(a + b*acot(c*x))*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(b*x**m*(d + e*x**S(2))**(p + S(1))/(c*d*m**S(2)), x) - Simp(x**(m + S(-1))*(a + b*acot(c*x))*(d + e*x**S(2))**(p + S(1))/(c**S(2)*d*m), x) def replacement5356(a, b, c, d, e, m, n, p, x): return -Dist(b**S(2)*n*(n + S(-1))/m**S(2), Int(x**m*(a + b*ArcTan(c*x))**(n + S(-2))*(d + e*x**S(2))**p, x), x) + Dist((m + S(-1))/(c**S(2)*d*m), Int(x**(m + S(-2))*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(x**(m + S(-1))*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(1))/(c**S(2)*d*m), x) + Simp(b*n*x**m*(a + b*ArcTan(c*x))**(n + S(-1))*(d + e*x**S(2))**(p + S(1))/(c*d*m**S(2)), x) def replacement5357(a, b, c, d, e, m, n, p, x): return -Dist(b**S(2)*n*(n + S(-1))/m**S(2), Int(x**m*(a + b*acot(c*x))**(n + S(-2))*(d + e*x**S(2))**p, x), x) + Dist((m + S(-1))/(c**S(2)*d*m), Int(x**(m + S(-2))*(a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Simp(x**(m + S(-1))*(a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(1))/(c**S(2)*d*m), x) - Simp(b*n*x**m*(a + b*acot(c*x))**(n + S(-1))*(d + e*x**S(2))**(p + S(1))/(c*d*m**S(2)), x) def replacement5358(a, b, c, d, e, m, n, p, x): return -Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*ArcTan(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp(x**m*(a + b*ArcTan(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement5359(a, b, c, d, e, m, n, p, x): return Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*acot(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) - Simp(x**m*(a + b*acot(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement5360(a, b, c, d, e, m, n, p, x): return -Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*ArcTan(c*x))**(n + S(-1))*(d + e*x**S(2))**p, x), x) + Simp(x**(m + S(1))*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*(m + S(1))), x) def replacement5361(a, b, c, d, e, m, n, p, x): return Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*acot(c*x))**(n + S(-1))*(d + e*x**S(2))**p, x), x) + Simp(x**(m + S(1))*(a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(1))/(d*(m + S(1))), x) def replacement5362(a, b, c, d, e, m, x): return Dist(d/(m + S(2)), Int(x**m*(a + b*ArcTan(c*x))/sqrt(d + e*x**S(2)), x), x) - Dist(b*c*d/(m + S(2)), Int(x**(m + S(1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*ArcTan(c*x))*sqrt(d + e*x**S(2))/(m + S(2)), x) def replacement5363(a, b, c, d, e, m, x): return Dist(d/(m + S(2)), Int(x**m*(a + b*acot(c*x))/sqrt(d + e*x**S(2)), x), x) + Dist(b*c*d/(m + S(2)), Int(x**(m + S(1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*acot(c*x))*sqrt(d + e*x**S(2))/(m + S(2)), x) def replacement5364(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(x**m*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement5365(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(x**m*(a + b*acot(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement5366(a, b, c, d, e, m, n, p, x): return Dist(d, Int(x**m*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) + Dist(c**S(2)*d, Int(x**(m + S(2))*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) def replacement5367(a, b, c, d, e, m, n, p, x): return Dist(d, Int(x**m*(a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) + Dist(c**S(2)*d, Int(x**(m + S(2))*(a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(-1)), x), x) def replacement5368(a, b, c, d, e, m, n, x): return -Dist((m + S(-1))/(c**S(2)*m), Int(x**(m + S(-2))*(a + b*ArcTan(c*x))**n/sqrt(d + e*x**S(2)), x), x) - Dist(b*n/(c*m), Int(x**(m + S(-1))*(a + b*ArcTan(c*x))**(n + S(-1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(-1))*(a + b*ArcTan(c*x))**n*sqrt(d + e*x**S(2))/(c**S(2)*d*m), x) def replacement5369(a, b, c, d, e, m, n, x): return -Dist((m + S(-1))/(c**S(2)*m), Int(x**(m + S(-2))*(a + b*acot(c*x))**n/sqrt(d + e*x**S(2)), x), x) + Dist(b*n/(c*m), Int(x**(m + S(-1))*(a + b*acot(c*x))**(n + S(-1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(-1))*(a + b*acot(c*x))**n*sqrt(d + e*x**S(2))/(c**S(2)*d*m), x) def replacement5370(a, b, c, d, e, x): return Simp(-S(2)*(a + b*ArcTan(c*x))*atanh(sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/sqrt(d), x) + Simp(I*b*PolyLog(S(2), -sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/sqrt(d), x) - Simp(I*b*PolyLog(S(2), sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/sqrt(d), x) def replacement5371(a, b, c, d, e, x): return Simp(-S(2)*(a + b*acot(c*x))*atanh(sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/sqrt(d), x) - Simp(I*b*PolyLog(S(2), -sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/sqrt(d), x) + Simp(I*b*PolyLog(S(2), sqrt(I*c*x + S(1))/sqrt(-I*c*x + S(1)))/sqrt(d), x) def replacement5372(a, b, c, d, e, n, x): return Dist(S(1)/sqrt(d), Subst(Int((a + b*x)**n/sin(x), x), x, ArcTan(c*x)), x) def replacement5373(a, b, c, d, e, n, x): return -Dist(c*x*sqrt(S(1) + S(1)/(c**S(2)*x**S(2)))/sqrt(d + e*x**S(2)), Subst(Int((a + b*x)**n/cos(x), x), x, acot(c*x)), x) def replacement5374(a, b, c, d, e, n, x): return Dist(sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*ArcTan(c*x))**n/(x*sqrt(c**S(2)*x**S(2) + S(1))), x), x) def replacement5375(a, b, c, d, e, n, x): return Dist(sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int((a + b*acot(c*x))**n/(x*sqrt(c**S(2)*x**S(2) + S(1))), x), x) def replacement5376(a, b, c, d, e, n, x): return Dist(b*c*n, Int((a + b*ArcTan(c*x))**(n + S(-1))/(x*sqrt(d + e*x**S(2))), x), x) - Simp((a + b*ArcTan(c*x))**n*sqrt(d + e*x**S(2))/(d*x), x) def replacement5377(a, b, c, d, e, n, x): return -Dist(b*c*n, Int((a + b*acot(c*x))**(n + S(-1))/(x*sqrt(d + e*x**S(2))), x), x) - Simp((a + b*acot(c*x))**n*sqrt(d + e*x**S(2))/(d*x), x) def replacement5378(a, b, c, d, e, m, n, x): return -Dist(c**S(2)*(m + S(2))/(m + S(1)), Int(x**(m + S(2))*(a + b*ArcTan(c*x))**n/sqrt(d + e*x**S(2)), x), x) - Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*ArcTan(c*x))**(n + S(-1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*ArcTan(c*x))**n*sqrt(d + e*x**S(2))/(d*(m + S(1))), x) def replacement5379(a, b, c, d, e, m, n, x): return -Dist(c**S(2)*(m + S(2))/(m + S(1)), Int(x**(m + S(2))*(a + b*acot(c*x))**n/sqrt(d + e*x**S(2)), x), x) + Dist(b*c*n/(m + S(1)), Int(x**(m + S(1))*(a + b*acot(c*x))**(n + S(-1))/sqrt(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*acot(c*x))**n*sqrt(d + e*x**S(2))/(d*(m + S(1))), x) def replacement5380(a, b, c, d, e, m, n, p, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement5381(a, b, c, d, e, m, n, p, x): return Dist(S(1)/e, Int(x**(m + S(-2))*(a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(d/e, Int(x**(m + S(-2))*(a + b*acot(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement5382(a, b, c, d, e, m, n, p, x): return Dist(S(1)/d, Int(x**m*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement5383(a, b, c, d, e, m, n, p, x): return Dist(S(1)/d, Int(x**m*(a + b*acot(c*x))**n*(d + e*x**S(2))**(p + S(1)), x), x) - Dist(e/d, Int(x**(m + S(2))*(a + b*acot(c*x))**n*(d + e*x**S(2))**p, x), x) def replacement5384(a, b, c, d, e, m, n, p, x): return -Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*ArcTan(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) - Dist(c*(m + S(2)*p + S(2))/(b*(n + S(1))), Int(x**(m + S(1))*(a + b*ArcTan(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Simp(x**m*(a + b*ArcTan(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement5385(a, b, c, d, e, m, n, p, x): return Dist(m/(b*c*(n + S(1))), Int(x**(m + S(-1))*(a + b*acot(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) + Dist(c*(m + S(2)*p + S(2))/(b*(n + S(1))), Int(x**(m + S(1))*(a + b*acot(c*x))**(n + S(1))*(d + e*x**S(2))**p, x), x) - Simp(x**m*(a + b*acot(c*x))**(n + S(1))*(d + e*x**S(2))**(p + S(1))/(b*c*d*(n + S(1))), x) def replacement5386(a, b, c, d, e, m, n, p, x): return Dist(c**(-m + S(-1))*d**p, Subst(Int((a + b*x)**n*sin(x)**m*cos(x)**(-m - S(2)*p + S(-2)), x), x, ArcTan(c*x)), x) def replacement5387(a, b, c, d, e, m, n, p, x): return Dist(d**(p + S(1)/2)*sqrt(c**S(2)*x**S(2) + S(1))/sqrt(d + e*x**S(2)), Int(x**m*(a + b*ArcTan(c*x))**n*(c**S(2)*x**S(2) + S(1))**p, x), x) def replacement5388(a, b, c, d, e, m, n, p, x): return -Dist(c**(-m + S(-1))*d**p, Subst(Int((a + b*x)**n*sin(x)**(-m - S(2)*p + S(-2))*cos(x)**m, x), x, acot(c*x)), x) def replacement5389(a, b, c, d, e, m, n, p, x): return -Dist(c**(-m)*d**(p + S(1)/2)*x*sqrt((c**S(2)*x**S(2) + S(1))/(c**S(2)*x**S(2)))/sqrt(d + e*x**S(2)), Subst(Int((a + b*x)**n*sin(x)**(-m - S(2)*p + S(-2))*cos(x)**m, x), x, acot(c*x)), x) def replacement5390(a, b, c, d, e, p, x): return -Dist(b*c/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*ArcTan(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5391(a, b, c, d, e, p, x): return Dist(b*c/(S(2)*e*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(c**S(2)*x**S(2) + S(1)), x), x) + Simp((a + b*acot(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def With5392(a, b, c, d, e, m, p, x): u = IntHide(x**m*(d + e*x**S(2))**p, x) return -Dist(b*c, Int(SimplifyIntegrand(u/(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*ArcTan(c*x), u, x) def With5393(a, b, c, d, e, m, p, x): u = IntHide(x**m*(d + e*x**S(2))**p, x) return Dist(b*c, Int(SimplifyIntegrand(u/(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acot(c*x), u, x) def replacement5394(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand((a + b*ArcTan(c*x))**n, x**m*(d + e*x**S(2))**p, x), x) def replacement5395(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand((a + b*acot(c*x))**n, x**m*(d + e*x**S(2))**p, x), x) def replacement5396(a, b, c, d, e, m, p, x): return Dist(a, Int(x**m*(d + e*x**S(2))**p, x), x) + Dist(b, Int(x**m*(d + e*x**S(2))**p*ArcTan(c*x), x), x) def replacement5397(a, b, c, d, e, m, p, x): return Dist(a, Int(x**m*(d + e*x**S(2))**p, x), x) + Dist(b, Int(x**m*(d + e*x**S(2))**p*acot(c*x), x), x) def replacement5398(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*ArcTan(c*x))**n*(d + e*x**S(2))**p, x) def replacement5399(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*acot(c*x))**n*(d + e*x**S(2))**p, x) def replacement5400(a, b, c, d, e, n, u, x): return -Dist(S(1)/2, Int((a + b*ArcTan(c*x))**n*log(S(1) - u)/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int((a + b*ArcTan(c*x))**n*log(u + S(1))/(d + e*x**S(2)), x), x) def replacement5401(a, b, c, d, e, n, u, x): return -Dist(S(1)/2, Int((a + b*acot(c*x))**n*log(SimplifyIntegrand(S(1) - S(1)/u, x))/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int((a + b*acot(c*x))**n*log(SimplifyIntegrand(S(1) + S(1)/u, x))/(d + e*x**S(2)), x), x) def replacement5402(a, b, c, d, e, n, u, x): return -Dist(S(1)/2, Int((a + b*ArcTan(c*x))**n*log(S(1) - u)/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int((a + b*ArcTan(c*x))**n*log(u + S(1))/(d + e*x**S(2)), x), x) def replacement5403(a, b, c, d, e, n, u, x): return -Dist(S(1)/2, Int((a + b*acot(c*x))**n*log(SimplifyIntegrand(S(1) - S(1)/u, x))/(d + e*x**S(2)), x), x) + Dist(S(1)/2, Int((a + b*acot(c*x))**n*log(SimplifyIntegrand(S(1) + S(1)/u, x))/(d + e*x**S(2)), x), x) def replacement5404(a, b, c, d, e, n, u, x): return -Dist(I*b*n/S(2), Int((a + b*ArcTan(c*x))**(n + S(-1))*PolyLog(S(2), Together(S(1) - u))/(d + e*x**S(2)), x), x) + Simp(I*(a + b*ArcTan(c*x))**n*PolyLog(S(2), Together(S(1) - u))/(S(2)*c*d), x) def replacement5405(a, b, c, d, e, n, u, x): return Dist(I*b*n/S(2), Int((a + b*acot(c*x))**(n + S(-1))*PolyLog(S(2), Together(S(1) - u))/(d + e*x**S(2)), x), x) + Simp(I*(a + b*acot(c*x))**n*PolyLog(S(2), Together(S(1) - u))/(S(2)*c*d), x) def replacement5406(a, b, c, d, e, n, u, x): return Dist(I*b*n/S(2), Int((a + b*ArcTan(c*x))**(n + S(-1))*PolyLog(S(2), Together(S(1) - u))/(d + e*x**S(2)), x), x) - Simp(I*(a + b*ArcTan(c*x))**n*PolyLog(S(2), Together(S(1) - u))/(S(2)*c*d), x) def replacement5407(a, b, c, d, e, n, u, x): return -Dist(I*b*n/S(2), Int((a + b*acot(c*x))**(n + S(-1))*PolyLog(S(2), Together(S(1) - u))/(d + e*x**S(2)), x), x) - Simp(I*(a + b*acot(c*x))**n*PolyLog(S(2), Together(S(1) - u))/(S(2)*c*d), x) def replacement5408(a, b, c, d, e, n, p, u, x): return Dist(I*b*n/S(2), Int((a + b*ArcTan(c*x))**(n + S(-1))*PolyLog(p + S(1), u)/(d + e*x**S(2)), x), x) - Simp(I*(a + b*ArcTan(c*x))**n*PolyLog(p + S(1), u)/(S(2)*c*d), x) def replacement5409(a, b, c, d, e, n, p, u, x): return -Dist(I*b*n/S(2), Int((a + b*acot(c*x))**(n + S(-1))*PolyLog(p + S(1), u)/(d + e*x**S(2)), x), x) - Simp(I*(a + b*acot(c*x))**n*PolyLog(p + S(1), u)/(S(2)*c*d), x) def replacement5410(a, b, c, d, e, n, p, u, x): return -Dist(I*b*n/S(2), Int((a + b*ArcTan(c*x))**(n + S(-1))*PolyLog(p + S(1), u)/(d + e*x**S(2)), x), x) + Simp(I*(a + b*ArcTan(c*x))**n*PolyLog(p + S(1), u)/(S(2)*c*d), x) def replacement5411(a, b, c, d, e, n, p, u, x): return Dist(I*b*n/S(2), Int((a + b*acot(c*x))**(n + S(-1))*PolyLog(p + S(1), u)/(d + e*x**S(2)), x), x) + Simp(I*(a + b*acot(c*x))**n*PolyLog(p + S(1), u)/(S(2)*c*d), x) def replacement5412(a, b, c, d, e, x): return Simp((log(a + b*ArcTan(c*x)) - log(a + b*acot(c*x)))/(b*c*d*(S(2)*a + b*ArcTan(c*x) + b*acot(c*x))), x) def replacement5413(a, b, c, d, e, m, n, x): return Dist(n/(m + S(1)), Int((a + b*ArcTan(c*x))**(n + S(-1))*(a + b*acot(c*x))**(m + S(1))/(d + e*x**S(2)), x), x) - Simp((a + b*ArcTan(c*x))**n*(a + b*acot(c*x))**(m + S(1))/(b*c*d*(m + S(1))), x) def replacement5414(a, b, c, d, e, m, n, x): return Dist(n/(m + S(1)), Int((a + b*ArcTan(c*x))**(m + S(1))*(a + b*acot(c*x))**(n + S(-1))/(d + e*x**S(2)), x), x) + Simp((a + b*ArcTan(c*x))**(m + S(1))*(a + b*acot(c*x))**n/(b*c*d*(m + S(1))), x) def replacement5415(a, c, d, n, x): return Dist(I/S(2), Int(log(-I*a*x + S(1))/(c + d*x**n), x), x) - Dist(I/S(2), Int(log(I*a*x + S(1))/(c + d*x**n), x), x) def replacement5416(a, c, d, n, x): return Dist(I/S(2), Int(log(S(1) - I/(a*x))/(c + d*x**n), x), x) - Dist(I/S(2), Int(log(S(1) + I/(a*x))/(c + d*x**n), x), x) def replacement5417(a, b, c, d, e, f, g, x): return -Dist(b*c, Int(x*(d + e*log(f + g*x**S(2)))/(c**S(2)*x**S(2) + S(1)), x), x) - Dist(S(2)*e*g, Int(x**S(2)*(a + b*ArcTan(c*x))/(f + g*x**S(2)), x), x) + Simp(x*(a + b*ArcTan(c*x))*(d + e*log(f + g*x**S(2))), x) def replacement5418(a, b, c, d, e, f, g, x): return Dist(b*c, Int(x*(d + e*log(f + g*x**S(2)))/(c**S(2)*x**S(2) + S(1)), x), x) - Dist(S(2)*e*g, Int(x**S(2)*(a + b*acot(c*x))/(f + g*x**S(2)), x), x) + Simp(x*(a + b*acot(c*x))*(d + e*log(f + g*x**S(2))), x) def replacement5419(a, b, c, d, e, f, g, m, x): return -Dist(b*c/(m + S(1)), Int(x**(m + S(1))*(d + e*log(f + g*x**S(2)))/(c**S(2)*x**S(2) + S(1)), x), x) - Dist(S(2)*e*g/(m + S(1)), Int(x**(m + S(2))*(a + b*ArcTan(c*x))/(f + g*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*ArcTan(c*x))*(d + e*log(f + g*x**S(2)))/(m + S(1)), x) def replacement5420(a, b, c, d, e, f, g, m, x): return Dist(b*c/(m + S(1)), Int(x**(m + S(1))*(d + e*log(f + g*x**S(2)))/(c**S(2)*x**S(2) + S(1)), x), x) - Dist(S(2)*e*g/(m + S(1)), Int(x**(m + S(2))*(a + b*acot(c*x))/(f + g*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*acot(c*x))*(d + e*log(f + g*x**S(2)))/(m + S(1)), x) def With5421(a, b, c, d, e, f, g, m, x): u = IntHide(x**m*(d + e*log(f + g*x**S(2))), x) return -Dist(b*c, Int(ExpandIntegrand(u/(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*ArcTan(c*x), u, x) def With5422(a, b, c, d, e, f, g, m, x): u = IntHide(x**m*(d + e*log(f + g*x**S(2))), x) return Dist(b*c, Int(ExpandIntegrand(u/(c**S(2)*x**S(2) + S(1)), x), x), x) + Dist(a + b*acot(c*x), u, x) def With5423(a, b, c, d, e, f, g, m, x): u = IntHide(x**m*(a + b*ArcTan(c*x)), x) return -Dist(S(2)*e*g, Int(ExpandIntegrand(u*x/(f + g*x**S(2)), x), x), x) + Dist(d + e*log(f + g*x**S(2)), u, x) def With5424(a, b, c, d, e, f, g, m, x): u = IntHide(x**m*(a + b*acot(c*x)), x) return -Dist(S(2)*e*g, Int(ExpandIntegrand(u*x/(f + g*x**S(2)), x), x), x) + Dist(d + e*log(f + g*x**S(2)), u, x) def replacement5425(a, b, c, d, e, f, g, x): return -Dist(b/c, Int((a + b*ArcTan(c*x))*(d + e*log(f + g*x**S(2))), x), x) + Dist(b*c*e, Int(x**S(2)*(a + b*ArcTan(c*x))/(c**S(2)*x**S(2) + S(1)), x), x) - Simp(e*x**S(2)*(a + b*ArcTan(c*x))**S(2)/S(2), x) + Simp((a + b*ArcTan(c*x))**S(2)*(d + e*log(f + g*x**S(2)))*(f + g*x**S(2))/(S(2)*g), x) def replacement5426(a, b, c, d, e, f, g, x): return Dist(b/c, Int((a + b*acot(c*x))*(d + e*log(f + g*x**S(2))), x), x) - Dist(b*c*e, Int(x**S(2)*(a + b*acot(c*x))/(c**S(2)*x**S(2) + S(1)), x), x) - Simp(e*x**S(2)*(a + b*acot(c*x))**S(2)/S(2), x) + Simp((a + b*acot(c*x))**S(2)*(d + e*log(f + g*x**S(2)))*(f + g*x**S(2))/(S(2)*g), x) def replacement5427(a, n, x): return Int((-I*a*x + S(1))**(I*n/S(2) + S(1)/2)*(I*a*x + S(1))**(-I*n/S(2) + S(1)/2)/sqrt(a**S(2)*x**S(2) + S(1)), x) def replacement5428(a, m, n, x): return Int(x**m*(-I*a*x + S(1))**(I*n/S(2) + S(1)/2)*(I*a*x + S(1))**(-I*n/S(2) + S(1)/2)/sqrt(a**S(2)*x**S(2) + S(1)), x) def replacement5429(a, n, x): return Int((-I*a*x + S(1))**(I*n/S(2))*(I*a*x + S(1))**(-I*n/S(2)), x) def replacement5430(a, m, n, x): return Int(x**m*(-I*a*x + S(1))**(I*n/S(2))*(I*a*x + S(1))**(-I*n/S(2)), x) def replacement5431(a, c, d, n, p, u, x): return Dist(c**p, Int(u*(S(1) + d*x/c)**p*(-I*a*x + S(1))**(I*n/S(2))*(I*a*x + S(1))**(-I*n/S(2)), x), x) def replacement5432(a, c, d, n, p, u, x): return Int(u*(c + d*x)**p*(-I*a*x + S(1))**(I*n/S(2))*(I*a*x + S(1))**(-I*n/S(2)), x) def replacement5433(a, c, d, n, p, u, x): return Dist(d**p, Int(u*x**(-p)*(c*x/d + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5434(a, c, d, n, p, u, x): return Dist((S(-1))**(n/S(2))*c**p, Int(u*(S(1) - I/(a*x))**(-I*n/S(2))*(S(1) + I/(a*x))**(I*n/S(2))*(S(1) + d/(c*x))**p, x), x) def replacement5435(a, c, d, n, p, u, x): return Int(u*(c + d/x)**p*(-I*a*x + S(1))**(I*n/S(2))*(I*a*x + S(1))**(-I*n/S(2)), x) def replacement5436(a, c, d, n, p, u, x): return Dist(x**p*(c + d/x)**p*(c*x/d + S(1))**(-p), Int(u*x**(-p)*(c*x/d + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5437(a, c, d, n, x): return Simp((a*x + n)*exp(n*ArcTan(a*x))/(a*c*sqrt(c + d*x**S(2))*(n**S(2) + S(1))), x) def replacement5438(a, c, d, n, p, x): return Dist(S(2)*(p + S(1))*(S(2)*p + S(3))/(c*(n**S(2) + S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*ArcTan(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*(-S(2)*a*x*(p + S(1)) + n)*exp(n*ArcTan(a*x))/(a*c*(n**S(2) + S(4)*(p + S(1))**S(2))), x) def replacement5439(a, c, d, n, x): return Simp(exp(n*ArcTan(a*x))/(a*c*n), x) def replacement5440(a, c, d, n, p, x): return Dist(c**p, Int((a**S(2)*x**S(2) + S(1))**(-I*n/S(2) + p)*(-I*a*x + S(1))**(I*n), x), x) def replacement5441(a, c, d, n, p, x): return Dist(c**p, Int((-I*a*x + S(1))**(I*n/S(2) + p)*(I*a*x + S(1))**(-I*n/S(2) + p), x), x) def replacement5442(a, c, d, n, p, x): return Dist(c**(I*n/S(2)), Int((c + d*x**S(2))**(-I*n/S(2) + p)*(-I*a*x + S(1))**(I*n), x), x) def replacement5443(a, c, d, n, p, x): return Dist(c**(-I*n/S(2)), Int((c + d*x**S(2))**(I*n/S(2) + p)*(I*a*x + S(1))**(-I*n), x), x) def replacement5444(a, c, d, n, p, x): return Dist(c**IntPart(p)*(c + d*x**S(2))**FracPart(p)*(a**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int((a**S(2)*x**S(2) + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5445(a, c, d, n, x): return -Simp((-a*n*x + S(1))*exp(n*ArcTan(a*x))/(d*sqrt(c + d*x**S(2))*(n**S(2) + S(1))), x) def replacement5446(a, c, d, n, p, x): return -Dist(a*c*n/(S(2)*d*(p + S(1))), Int((c + d*x**S(2))**p*exp(n*ArcTan(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*exp(n*ArcTan(a*x))/(S(2)*d*(p + S(1))), x) def replacement5447(a, c, d, n, p, x): return -Simp((c + d*x**S(2))**(p + S(1))*(-a*n*x + S(1))*exp(n*ArcTan(a*x))/(a*d*n*(n**S(2) + S(1))), x) def replacement5448(a, c, d, n, p, x): return Dist((n**S(2) - S(2)*p + S(-2))/(d*(n**S(2) + S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*ArcTan(a*x)), x), x) - Simp((c + d*x**S(2))**(p + S(1))*(-S(2)*a*x*(p + S(1)) + n)*exp(n*ArcTan(a*x))/(a*d*(n**S(2) + S(4)*(p + S(1))**S(2))), x) def replacement5449(a, c, d, m, n, p, x): return Dist(c**p, Int(x**m*(a**S(2)*x**S(2) + S(1))**(-I*n/S(2) + p)*(-I*a*x + S(1))**(I*n), x), x) def replacement5450(a, c, d, m, n, p, x): return Dist(c**p, Int(x**m*(-I*a*x + S(1))**(I*n/S(2) + p)*(I*a*x + S(1))**(-I*n/S(2) + p), x), x) def replacement5451(a, c, d, m, n, p, x): return Dist(c**(I*n/S(2)), Int(x**m*(c + d*x**S(2))**(-I*n/S(2) + p)*(-I*a*x + S(1))**(I*n), x), x) def replacement5452(a, c, d, m, n, p, x): return Dist(c**(-I*n/S(2)), Int(x**m*(c + d*x**S(2))**(I*n/S(2) + p)*(I*a*x + S(1))**(-I*n), x), x) def replacement5453(a, c, d, m, n, p, x): return Dist(c**IntPart(p)*(c + d*x**S(2))**FracPart(p)*(a**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int(x**m*(a**S(2)*x**S(2) + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5454(a, c, d, n, p, u, x): return Dist(c**p, Int(u*(-I*a*x + S(1))**(I*n/S(2) + p)*(I*a*x + S(1))**(-I*n/S(2) + p), x), x) def replacement5455(a, c, d, n, p, u, x): return Dist(c**IntPart(p)*(c + d*x**S(2))**FracPart(p)*(-I*a*x + S(1))**(-FracPart(p))*(I*a*x + S(1))**(-FracPart(p)), Int(u*(-I*a*x + S(1))**(I*n/S(2) + p)*(I*a*x + S(1))**(-I*n/S(2) + p), x), x) def replacement5456(a, c, d, n, p, u, x): return Dist(c**IntPart(p)*(c + d*x**S(2))**FracPart(p)*(a**S(2)*x**S(2) + S(1))**(-FracPart(p)), Int(u*(a**S(2)*x**S(2) + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5457(a, c, d, n, p, u, x): return Dist(d**p, Int(u*x**(-S(2)*p)*(a**S(2)*x**S(2) + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5458(a, c, d, n, p, u, x): return Dist(c**p, Int(u*(S(1) - I/(a*x))**p*(S(1) + I/(a*x))**p*exp(n*ArcTan(a*x)), x), x) def replacement5459(a, c, d, n, p, u, x): return Dist(x**(S(2)*p)*(c + d/x**S(2))**p*(-I*a*x + S(1))**(-p)*(I*a*x + S(1))**(-p), Int(u*x**(-S(2)*p)*(-I*a*x + S(1))**p*(I*a*x + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5460(a, c, d, n, p, u, x): return Dist(x**(S(2)*p)*(c + d/x**S(2))**p*(a**S(2)*x**S(2) + S(1))**(-p), Int(u*x**(-S(2)*p)*(a**S(2)*x**S(2) + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5461(a, b, c, n, x): return Int((-I*a*c - I*b*c*x + S(1))**(I*n/S(2))*(I*a*c + I*b*c*x + S(1))**(-I*n/S(2)), x) def replacement5462(a, b, c, m, n, x): return Dist(S(4)*I**(-m)*b**(-m + S(-1))*c**(-m + S(-1))/n, Subst(Int(x**(-S(2)*I/n)*(S(1) + x**(-S(2)*I/n))**(-m + S(-2))*(-I*a*c + S(1) - x**(-S(2)*I/n)*(I*a*c + S(1)))**m, x), x, (-I*c*(a + b*x) + S(1))**(I*n/S(2))*(I*c*(a + b*x) + S(1))**(-I*n/S(2))), x) def replacement5463(a, b, c, d, e, m, n, x): return Int((d + e*x)**m*(-I*a*c - I*b*c*x + S(1))**(I*n/S(2))*(I*a*c + I*b*c*x + S(1))**(-I*n/S(2)), x) def replacement5464(a, b, c, d, e, n, p, u, x): return Dist((c/(a**S(2) + S(1)))**p, Int(u*(-I*a - I*b*x + S(1))**(I*n/S(2) + p)*(I*a + I*b*x + S(1))**(-I*n/S(2) + p), x), x) def replacement5465(a, b, c, d, e, n, p, u, x): return Dist((c + d*x + e*x**S(2))**p*(a**S(2) + S(2)*a*b*x + b**S(2)*x**S(2) + S(1))**(-p), Int(u*(a**S(2) + S(2)*a*b*x + b**S(2)*x**S(2) + S(1))**p*exp(n*ArcTan(a*x)), x), x) def replacement5466(a, b, c, n, u, x): return Int(u*exp(n*acot(a/c + b*x/c)), x) def replacement5467(a, n, u, x): return Dist((S(-1))**(I*n/S(2)), Int(u*exp(-n*ArcTan(a*x)), x), x) def replacement5468(a, n, x): return -Subst(Int((S(1) - I*x/a)**(I*n/S(2) + S(1)/2)*(S(1) + I*x/a)**(-I*n/S(2) + S(1)/2)/(x**S(2)*sqrt(S(1) + x**S(2)/a**S(2))), x), x, S(1)/x) def replacement5469(a, m, n, x): return -Subst(Int(x**(-m + S(-2))*(S(1) - I*x/a)**(I*n/S(2) + S(1)/2)*(S(1) + I*x/a)**(-I*n/S(2) + S(1)/2)/sqrt(S(1) + x**S(2)/a**S(2)), x), x, S(1)/x) def replacement5470(a, n, x): return -Subst(Int((S(1) - I*x/a)**(I*n/S(2))*(S(1) + I*x/a)**(-I*n/S(2))/x**S(2), x), x, S(1)/x) def replacement5471(a, m, n, x): return -Subst(Int(x**(-m + S(-2))*(S(1) - I*x/a)**(n/S(2))*(S(1) + I*x/a)**(-n/S(2)), x), x, S(1)/x) def replacement5472(a, m, n, x): return -Dist(x**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(S(1) - I*x/a)**(I*n/S(2) + S(1)/2)*(S(1) + I*x/a)**(-I*n/S(2) + S(1)/2)/sqrt(S(1) + x**S(2)/a**S(2)), x), x, S(1)/x), x) def replacement5473(a, m, n, x): return -Subst(Int(x**(-m + S(-2))*(S(1) - I*x/a)**(n/S(2))*(S(1) + I*x/a)**(-n/S(2)), x), x, S(1)/x) def replacement5474(a, c, d, n, p, u, x): return Dist(d**p, Int(u*x**p*(c/(d*x) + S(1))**p*exp(n*acot(a*x)), x), x) def replacement5475(a, c, d, n, p, u, x): return Dist(x**(-p)*(c + d*x)**p*(c/(d*x) + S(1))**(-p), Int(u*x**p*(c/(d*x) + S(1))**p*exp(n*acot(a*x)), x), x) def replacement5476(a, c, d, n, p, x): return -Dist(c**p, Subst(Int((S(1) - I*x/a)**(I*n/S(2))*(S(1) + I*x/a)**(-I*n/S(2))*(S(1) + d*x/c)**p/x**S(2), x), x, S(1)/x), x) def replacement5477(a, c, d, m, n, p, x): return -Dist(c**p, Subst(Int(x**(-m + S(-2))*(S(1) - I*x/a)**(I*n/S(2))*(S(1) + I*x/a)**(-I*n/S(2))*(S(1) + d*x/c)**p, x), x, S(1)/x), x) def replacement5478(a, c, d, n, p, x): return Dist((S(1) + d/(c*x))**(-p)*(c + d/x)**p, Int((S(1) + d/(c*x))**p*exp(n*acot(a*x)), x), x) def replacement5479(a, c, d, m, n, p, x): return -Dist(c**p*x**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(S(1) - I*x/a)**(I*n/S(2))*(S(1) + I*x/a)**(-I*n/S(2))*(S(1) + d*x/c)**p, x), x, S(1)/x), x) def replacement5480(a, c, d, n, p, u, x): return Dist((S(1) + d/(c*x))**(-p)*(c + d/x)**p, Int(u*(S(1) + d/(c*x))**p*exp(n*acot(a*x)), x), x) def replacement5481(a, c, d, n, x): return -Simp(exp(n*acot(a*x))/(a*c*n), x) def replacement5482(a, c, d, n, x): return -Simp((-a*x + n)*exp(n*acot(a*x))/(a*c*sqrt(c + d*x**S(2))*(n**S(2) + S(1))), x) def replacement5483(a, c, d, n, p, x): return Dist(S(2)*(p + S(1))*(S(2)*p + S(3))/(c*(n**S(2) + S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*acot(a*x)), x), x) - Simp((c + d*x**S(2))**(p + S(1))*(S(2)*a*x*(p + S(1)) + n)*exp(n*acot(a*x))/(a*c*(n**S(2) + S(4)*(p + S(1))**S(2))), x) def replacement5484(a, c, d, n, x): return -Simp((a*n*x + S(1))*exp(n*acot(a*x))/(a**S(2)*c*sqrt(c + d*x**S(2))*(n**S(2) + S(1))), x) def replacement5485(a, c, d, n, p, x): return Dist(n*(S(2)*p + S(3))/(a*c*(n**S(2) + S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*acot(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*(-a*n*x + S(2)*p + S(2))*exp(n*acot(a*x))/(a**S(2)*c*(n**S(2) + S(4)*(p + S(1))**S(2))), x) def replacement5486(a, c, d, n, p, x): return Simp((c + d*x**S(2))**(p + S(1))*(S(2)*a*x*(p + S(1)) + n)*exp(n*acot(a*x))/(a**S(3)*c*n**S(2)*(n**S(2) + S(1))), x) def replacement5487(a, c, d, n, p, x): return Dist((n**S(2) - S(2)*p + S(-2))/(a**S(2)*c*(n**S(2) + S(4)*(p + S(1))**S(2))), Int((c + d*x**S(2))**(p + S(1))*exp(n*acot(a*x)), x), x) + Simp((c + d*x**S(2))**(p + S(1))*(S(2)*a*x*(p + S(1)) + n)*exp(n*acot(a*x))/(a**S(3)*c*(n**S(2) + S(4)*(p + S(1))**S(2))), x) def replacement5488(a, c, d, m, n, p, x): return -Dist(a**(-m + S(-1))*c**p, Subst(Int((S(1)/tan(x))**(m + S(2)*p + S(2))*exp(n*x)*cos(x)**(-S(2)*p + S(-2)), x), x, acot(a*x)), x) def replacement5489(a, c, d, n, p, u, x): return Dist(d**p, Int(u*x**(S(2)*p)*(S(1) + S(1)/(a**S(2)*x**S(2)))**p*exp(n*acot(a*x)), x), x) def replacement5490(a, c, d, n, p, u, x): return Dist(x**(-S(2)*p)*(S(1) + S(1)/(a**S(2)*x**S(2)))**(-p)*(c + d*x**S(2))**p, Int(u*x**(S(2)*p)*(S(1) + S(1)/(a**S(2)*x**S(2)))**p*exp(n*acot(a*x)), x), x) def replacement5491(a, c, d, n, p, u, x): return Dist(c**p*(I*a)**(-S(2)*p), Int(u*x**(-S(2)*p)*(I*a*x + S(-1))**(-I*n/S(2) + p)*(I*a*x + S(1))**(I*n/S(2) + p), x), x) def replacement5492(a, c, d, n, p, x): return -Dist(c**p, Subst(Int((S(1) - I*x/a)**(I*n/S(2) + p)*(S(1) + I*x/a)**(-I*n/S(2) + p)/x**S(2), x), x, S(1)/x), x) def replacement5493(a, c, d, m, n, p, x): return -Dist(c**p, Subst(Int(x**(-m + S(-2))*(S(1) - I*x/a)**(I*n/S(2) + p)*(S(1) + I*x/a)**(-I*n/S(2) + p), x), x, S(1)/x), x) def replacement5494(a, c, d, m, n, p, x): return -Dist(c**p*x**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(S(1) - I*x/a)**(I*n/S(2) + p)*(S(1) + I*x/a)**(-I*n/S(2) + p), x), x, S(1)/x), x) def replacement5495(a, c, d, n, p, u, x): return Dist((S(1) + S(1)/(a**S(2)*x**S(2)))**(-p)*(c + d/x**S(2))**p, Int(u*(S(1) + S(1)/(a**S(2)*x**S(2)))**p*exp(n*acot(a*x)), x), x) def replacement5496(a, b, c, n, u, x): return Dist((S(-1))**(I*n/S(2)), Int(u*exp(-n*ArcTan(c*(a + b*x))), x), x) def replacement5497(a, b, c, n, x): return Dist((I*c*(a + b*x))**(I*n/S(2))*(S(1) - I/(c*(a + b*x)))**(I*n/S(2))*(I*a*c + I*b*c*x + S(1))**(-I*n/S(2)), Int((I*a*c + I*b*c*x + S(-1))**(-I*n/S(2))*(I*a*c + I*b*c*x + S(1))**(I*n/S(2)), x), x) def replacement5498(a, b, c, m, n, x): return Dist(S(4)*I**(-m)*b**(-m + S(-1))*c**(-m + S(-1))/n, Subst(Int(x**(-S(2)*I/n)*(S(-1) + x**(-S(2)*I/n))**(-m + S(-2))*(I*a*c + S(1) + x**(-S(2)*I/n)*(-I*a*c + S(1)))**m, x), x, (S(1) - I/(c*(a + b*x)))**(I*n/S(2))*(S(1) + I/(c*(a + b*x)))**(-I*n/S(2))), x) def replacement5499(a, b, c, d, e, m, n, x): return Dist((I*c*(a + b*x))**(I*n/S(2))*(S(1) - I/(c*(a + b*x)))**(I*n/S(2))*(I*a*c + I*b*c*x + S(1))**(-I*n/S(2)), Int((d + e*x)**m*(I*a*c + I*b*c*x + S(-1))**(-I*n/S(2))*(I*a*c + I*b*c*x + S(1))**(I*n/S(2)), x), x) def replacement5500(a, b, c, d, e, n, p, u, x): return Dist((c/(a**S(2) + S(1)))**p*((I*a + I*b*x + S(1))/(I*a + I*b*x))**(I*n/S(2))*((I*a + I*b*x)/(I*a + I*b*x + S(1)))**(I*n/S(2))*(-I*a - I*b*x + S(1))**(I*n/S(2))*(I*a + I*b*x + S(-1))**(-I*n/S(2)), Int(u*(-I*a - I*b*x + S(1))**(-I*n/S(2) + p)*(I*a + I*b*x + S(1))**(I*n/S(2) + p), x), x) def replacement5501(a, b, c, d, e, n, p, u, x): return Dist((c + d*x + e*x**S(2))**p*(a**S(2) + S(2)*a*b*x + b**S(2)*x**S(2) + S(1))**(-p), Int(u*(a**S(2) + S(2)*a*b*x + b**S(2)*x**S(2) + S(1))**p*exp(n*acot(a*x)), x), x) def replacement5502(a, b, c, n, u, x): return Int(u*exp(n*ArcTan(a/c + b*x/c)), x) def replacement5503(a, b, c, d, n, x): return Dist(S(1)/d, Subst(Int((a + b*ArcTan(x))**n, x), x, c + d*x), x) def replacement5504(a, b, c, d, n, x): return Dist(S(1)/d, Subst(Int((a + b*acot(x))**n, x), x, c + d*x), x) def replacement5505(a, b, c, d, n, x): return Int((a + b*ArcTan(c + d*x))**n, x) def replacement5506(a, b, c, d, n, x): return Int((a + b*acot(c + d*x))**n, x) def replacement5507(a, b, c, d, e, f, m, n, x): return Dist(S(1)/d, Subst(Int((a + b*ArcTan(x))**n*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement5508(a, b, c, d, e, f, m, n, x): return Dist(S(1)/d, Subst(Int((a + b*acot(x))**n*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement5509(a, b, c, d, e, f, m, n, x): return Int((a + b*ArcTan(c + d*x))**n*(e + f*x)**m, x) def replacement5510(a, b, c, d, e, f, m, n, x): return Int((a + b*acot(c + d*x))**n*(e + f*x)**m, x) def replacement5511(A, B, C, a, b, c, d, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*ArcTan(x))**n*(C*x**S(2)/d**S(2) + C/d**S(2))**p, x), x, c + d*x), x) def replacement5512(A, B, C, a, b, c, d, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*acot(x))**n*(C*x**S(2)/d**S(2) + C/d**S(2))**p, x), x, c + d*x), x) def replacement5513(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*ArcTan(x))**n*(C*x**S(2)/d**S(2) + C/d**S(2))**p*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement5514(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/d, Subst(Int((a + b*acot(x))**n*(C*x**S(2)/d**S(2) + C/d**S(2))**p*(f*x/d + (-c*f + d*e)/d)**m, x), x, c + d*x), x) def replacement5515(a, b, c, d, n, x): return Dist(I/S(2), Int(log(-I*a - I*b*x + S(1))/(c + d*x**n), x), x) - Dist(I/S(2), Int(log(I*a + I*b*x + S(1))/(c + d*x**n), x), x) def replacement5516(a, b, c, d, n, x): return Dist(I/S(2), Int(log((a + b*x - I)/(a + b*x))/(c + d*x**n), x), x) - Dist(I/S(2), Int(log((a + b*x + I)/(a + b*x))/(c + d*x**n), x), x) def replacement5517(a, b, c, d, n, x): return Int(ArcTan(a + b*x)/(c + d*x**n), x) def replacement5518(a, b, c, d, n, x): return Int(acot(a + b*x)/(c + d*x**n), x) def replacement5519(a, b, n, x): return -Dist(b*n, Int(x**n/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n) + S(1)), x), x) + Simp(x*ArcTan(a + b*x**n), x) def replacement5520(a, b, n, x): return Dist(b*n, Int(x**n/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n) + S(1)), x), x) + Simp(x*acot(a + b*x**n), x) def replacement5521(a, b, n, x): return Dist(I/S(2), Int(log(-I*a - I*b*x**n + S(1))/x, x), x) - Dist(I/S(2), Int(log(I*a + I*b*x**n + S(1))/x, x), x) def replacement5522(a, b, n, x): return Dist(I/S(2), Int(log(S(1) - I/(a + b*x**n))/x, x), x) - Dist(I/S(2), Int(log(S(1) + I/(a + b*x**n))/x, x), x) def replacement5523(a, b, m, n, x): return -Dist(b*n/(m + S(1)), Int(x**(m + n)/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n) + S(1)), x), x) + Simp(x**(m + S(1))*ArcTan(a + b*x**n)/(m + S(1)), x) def replacement5524(a, b, m, n, x): return Dist(b*n/(m + S(1)), Int(x**(m + n)/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n) + S(1)), x), x) + Simp(x**(m + S(1))*acot(a + b*x**n)/(m + S(1)), x) def replacement5525(a, b, c, d, f, x): return Dist(I/S(2), Int(log(-I*a - I*b*f**(c + d*x) + S(1)), x), x) - Dist(I/S(2), Int(log(I*a + I*b*f**(c + d*x) + S(1)), x), x) def replacement5526(a, b, c, d, f, x): return Dist(I/S(2), Int(log(S(1) - I/(a + b*f**(c + d*x))), x), x) - Dist(I/S(2), Int(log(S(1) + I/(a + b*f**(c + d*x))), x), x) def replacement5527(a, b, c, d, f, m, x): return Dist(I/S(2), Int(x**m*log(-I*a - I*b*f**(c + d*x) + S(1)), x), x) - Dist(I/S(2), Int(x**m*log(I*a + I*b*f**(c + d*x) + S(1)), x), x) def replacement5528(a, b, c, d, f, m, x): return Dist(I/S(2), Int(x**m*log(S(1) - I/(a + b*f**(c + d*x))), x), x) - Dist(I/S(2), Int(x**m*log(S(1) + I/(a + b*f**(c + d*x))), x), x) def replacement5529(a, b, c, m, n, u, x): return Int(u*acot(a/c + b*x**n/c)**m, x) def replacement5530(a, b, c, m, n, u, x): return Int(u*ArcTan(a/c + b*x**n/c)**m, x) def replacement5531(a, b, c, x): return Simp(log(ArcTan(c*x/sqrt(a + b*x**S(2))))/c, x) def replacement5532(a, b, c, x): return -Simp(log(acot(c*x/sqrt(a + b*x**S(2))))/c, x) def replacement5533(a, b, c, m, x): return Simp(ArcTan(c*x/sqrt(a + b*x**S(2)))**(m + S(1))/(c*(m + S(1))), x) def replacement5534(a, b, c, m, x): return -Simp(acot(c*x/sqrt(a + b*x**S(2)))**(m + S(1))/(c*(m + S(1))), x) def replacement5535(a, b, c, d, e, m, x): return Dist(sqrt(a + b*x**S(2))/sqrt(d + e*x**S(2)), Int(ArcTan(c*x/sqrt(a + b*x**S(2)))**m/sqrt(a + b*x**S(2)), x), x) def replacement5536(a, b, c, d, e, m, x): return Dist(sqrt(a + b*x**S(2))/sqrt(d + e*x**S(2)), Int(acot(c*x/sqrt(a + b*x**S(2)))**m/sqrt(a + b*x**S(2)), x), x) def replacement5537(s, u, v, w, x): return Dist(S(1)/2, Int(u*ArcTan(v), x), x) + Dist(Pi*s/S(4), Int(u, x), x) def replacement5538(s, u, v, w, x): return -Dist(S(1)/2, Int(u*ArcTan(v), x), x) + Dist(Pi*s/S(4), Int(u, x), x) def With5539(n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: tmp = InverseFunctionOfLinear(u, x) res = And(Not(FalseQ(tmp)), SameQ(Head(tmp), ArcTan), ZeroQ(D(v, x)**S(2) + Discriminant(v, x)*Part(tmp, S(1))**S(2))) except (TypeError, AttributeError): return False if res: return True return False def replacement5539(n, u, v, x): tmp = InverseFunctionOfLinear(u, x) return Dist((-Discriminant(v, x)/(S(4)*Coefficient(v, x, S(2))))**n/Coefficient(Part(tmp, S(1)), x, S(1)), Subst(Int(SimplifyIntegrand((S(1)/cos(x))**(S(2)*n + S(2))*SubstForInverseFunction(u, tmp, x), x), x), x, tmp), x) def With5540(n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: tmp = InverseFunctionOfLinear(u, x) res = And(Not(FalseQ(tmp)), SameQ(Head(tmp), ArcCot), ZeroQ(D(v, x)**S(2) + Discriminant(v, x)*Part(tmp, S(1))**S(2))) except (TypeError, AttributeError): return False if res: return True return False def replacement5540(n, u, v, x): tmp = InverseFunctionOfLinear(u, x) return -Dist((-Discriminant(v, x)/(S(4)*Coefficient(v, x, S(2))))**n/Coefficient(Part(tmp, S(1)), x, S(1)), Subst(Int(SimplifyIntegrand((S(1)/sin(x))**(S(2)*n + S(2))*SubstForInverseFunction(u, tmp, x), x), x), x, tmp), x) def replacement5541(a, b, c, d, x): return -Dist(I*b, Int(x/(c*exp(S(2)*I*a + S(2)*I*b*x) + c + I*d), x), x) + Simp(x*ArcTan(c + d*tan(a + b*x)), x) def replacement5542(a, b, c, d, x): return Dist(I*b, Int(x/(c*exp(S(2)*I*a + S(2)*I*b*x) + c + I*d), x), x) + Simp(x*acot(c + d*tan(a + b*x)), x) def replacement5543(a, b, c, d, x): return -Dist(I*b, Int(x/(-c*exp(S(2)*I*a + S(2)*I*b*x) + c - I*d), x), x) + Simp(x*ArcTan(c + d/tan(a + b*x)), x) def replacement5544(a, b, c, d, x): return Dist(I*b, Int(x/(-c*exp(S(2)*I*a + S(2)*I*b*x) + c - I*d), x), x) + Simp(x*acot(c + d/tan(a + b*x)), x) def replacement5545(a, b, c, d, x): return Dist(b*(-I*c - d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(-I*c + d + (-I*c - d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) - Dist(b*(I*c + d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(I*c - d + (I*c + d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp(x*ArcTan(c + d*tan(a + b*x)), x) def replacement5546(a, b, c, d, x): return -Dist(b*(-I*c - d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(-I*c + d + (-I*c - d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Dist(b*(I*c + d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(I*c - d + (I*c + d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp(x*acot(c + d*tan(a + b*x)), x) def replacement5547(a, b, c, d, x): return -Dist(b*(-I*c + d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(-I*c - d - (-I*c + d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Dist(b*(I*c - d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(I*c + d - (I*c - d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp(x*ArcTan(c + d/tan(a + b*x)), x) def replacement5548(a, b, c, d, x): return Dist(b*(-I*c + d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(-I*c - d - (-I*c + d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) - Dist(b*(I*c - d + S(1)), Int(x*exp(S(2)*I*a + S(2)*I*b*x)/(I*c + d - (I*c - d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp(x*acot(c + d/tan(a + b*x)), x) def replacement5549(a, b, c, d, e, f, m, x): return -Dist(I*b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(c*exp(S(2)*I*a + S(2)*I*b*x) + c + I*d), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(c + d*tan(a + b*x))/(f*(m + S(1))), x) def replacement5550(a, b, c, d, e, f, m, x): return Dist(I*b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(c*exp(S(2)*I*a + S(2)*I*b*x) + c + I*d), x), x) + Simp((e + f*x)**(m + S(1))*acot(c + d*tan(a + b*x))/(f*(m + S(1))), x) def replacement5551(a, b, c, d, e, f, m, x): return -Dist(I*b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(-c*exp(S(2)*I*a + S(2)*I*b*x) + c - I*d), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(c + d/tan(a + b*x))/(f*(m + S(1))), x) def replacement5552(a, b, c, d, e, f, m, x): return Dist(I*b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(-c*exp(S(2)*I*a + S(2)*I*b*x) + c - I*d), x), x) + Simp((e + f*x)**(m + S(1))*acot(c + d/tan(a + b*x))/(f*(m + S(1))), x) def replacement5553(a, b, c, d, e, f, m, x): return Dist(b*(-I*c - d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(-I*c + d + (-I*c - d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) - Dist(b*(I*c + d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(I*c - d + (I*c + d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(c + d*tan(a + b*x))/(f*(m + S(1))), x) def replacement5554(a, b, c, d, e, f, m, x): return -Dist(b*(-I*c - d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(-I*c + d + (-I*c - d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Dist(b*(I*c + d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(I*c - d + (I*c + d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*acot(c + d*tan(a + b*x))/(f*(m + S(1))), x) def replacement5555(a, b, c, d, e, f, m, x): return -Dist(b*(-I*c + d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(-I*c - d - (-I*c + d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Dist(b*(I*c - d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(I*c + d - (I*c - d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(c + d/tan(a + b*x))/(f*(m + S(1))), x) def replacement5556(a, b, c, d, e, f, m, x): return Dist(b*(-I*c + d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(-I*c - d - (-I*c + d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) - Dist(b*(I*c - d + S(1))/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*I*a + S(2)*I*b*x)/(I*c + d - (I*c - d + S(1))*exp(S(2)*I*a + S(2)*I*b*x) + S(1)), x), x) + Simp((e + f*x)**(m + S(1))*acot(c + d/tan(a + b*x))/(f*(m + S(1))), x) def replacement5557(a, b, x): return -Dist(b, Int(x/cosh(S(2)*a + S(2)*b*x), x), x) + Simp(x*ArcTan(tanh(a + b*x)), x) def replacement5558(a, b, x): return Dist(b, Int(x/cosh(S(2)*a + S(2)*b*x), x), x) + Simp(x*acot(tanh(a + b*x)), x) def replacement5559(a, b, x): return Dist(b, Int(x/cosh(S(2)*a + S(2)*b*x), x), x) + Simp(x*ArcTan(S(1)/tanh(a + b*x)), x) def replacement5560(a, b, x): return -Dist(b, Int(x/cosh(S(2)*a + S(2)*b*x), x), x) + Simp(x*acot(S(1)/tanh(a + b*x)), x) def replacement5561(a, b, e, f, m, x): return -Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/cosh(S(2)*a + S(2)*b*x), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(tanh(a + b*x))/(f*(m + S(1))), x) def replacement5562(a, b, e, f, m, x): return Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/cosh(S(2)*a + S(2)*b*x), x), x) + Simp((e + f*x)**(m + S(1))*acot(tanh(a + b*x))/(f*(m + S(1))), x) def replacement5563(a, b, e, f, m, x): return Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/cosh(S(2)*a + S(2)*b*x), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(S(1)/tanh(a + b*x))/(f*(m + S(1))), x) def replacement5564(a, b, e, f, m, x): return -Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/cosh(S(2)*a + S(2)*b*x), x), x) + Simp((e + f*x)**(m + S(1))*acot(S(1)/tanh(a + b*x))/(f*(m + S(1))), x) def replacement5565(a, b, c, d, x): return -Dist(b, Int(x/(c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp(x*ArcTan(c + d*tanh(a + b*x)), x) def replacement5566(a, b, c, d, x): return Dist(b, Int(x/(c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp(x*acot(c + d*tanh(a + b*x)), x) def replacement5567(a, b, c, d, x): return -Dist(b, Int(x/(-c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp(x*ArcTan(c + d/tanh(a + b*x)), x) def replacement5568(a, b, c, d, x): return Dist(b, Int(x/(-c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp(x*acot(c + d/tanh(a + b*x)), x) def replacement5569(a, b, c, d, x): return Dist(I*b*(-c - d + I), Int(x*exp(S(2)*a + S(2)*b*x)/(-c + d + (-c - d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) - Dist(I*b*(c + d + I), Int(x*exp(S(2)*a + S(2)*b*x)/(c - d + (c + d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Simp(x*ArcTan(c + d*tanh(a + b*x)), x) def replacement5570(a, b, c, d, x): return -Dist(I*b*(-c - d + I), Int(x*exp(S(2)*a + S(2)*b*x)/(-c + d + (-c - d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Dist(I*b*(c + d + I), Int(x*exp(S(2)*a + S(2)*b*x)/(c - d + (c + d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Simp(x*acot(c + d*tanh(a + b*x)), x) def replacement5571(a, b, c, d, x): return -Dist(I*b*(-c - d + I), Int(x*exp(S(2)*a + S(2)*b*x)/(-c + d - (-c - d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Dist(I*b*(c + d + I), Int(x*exp(S(2)*a + S(2)*b*x)/(c - d - (c + d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Simp(x*ArcTan(c + d/tanh(a + b*x)), x) def replacement5572(a, b, c, d, x): return Dist(I*b*(-c - d + I), Int(x*exp(S(2)*a + S(2)*b*x)/(-c + d - (-c - d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) - Dist(I*b*(c + d + I), Int(x*exp(S(2)*a + S(2)*b*x)/(c - d - (c + d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Simp(x*acot(c + d/tanh(a + b*x)), x) def replacement5573(a, b, c, d, e, f, m, x): return -Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(c + d*tanh(a + b*x))/(f*(m + S(1))), x) def replacement5574(a, b, c, d, e, f, m, x): return Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp((e + f*x)**(m + S(1))*acot(c + d*tanh(a + b*x))/(f*(m + S(1))), x) def replacement5575(a, b, c, d, e, f, m, x): return -Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(-c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(c + d/tanh(a + b*x))/(f*(m + S(1))), x) def replacement5576(a, b, c, d, e, f, m, x): return Dist(b/(f*(m + S(1))), Int((e + f*x)**(m + S(1))/(-c*exp(S(2)*a + S(2)*b*x) + c - d), x), x) + Simp((e + f*x)**(m + S(1))*acot(c + d/tanh(a + b*x))/(f*(m + S(1))), x) def replacement5577(a, b, c, d, e, f, m, x): return Dist(I*b*(-c - d + I)/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(-c + d + (-c - d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) - Dist(I*b*(c + d + I)/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(c - d + (c + d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(c + d*tanh(a + b*x))/(f*(m + S(1))), x) def replacement5578(a, b, c, d, e, f, m, x): return -Dist(I*b*(-c - d + I)/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(-c + d + (-c - d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Dist(I*b*(c + d + I)/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(c - d + (c + d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Simp((e + f*x)**(m + S(1))*acot(c + d*tanh(a + b*x))/(f*(m + S(1))), x) def replacement5579(a, b, c, d, e, f, m, x): return -Dist(I*b*(-c - d + I)/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(-c + d - (-c - d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Dist(I*b*(c + d + I)/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(c - d - (c + d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Simp((e + f*x)**(m + S(1))*ArcTan(c + d/tanh(a + b*x))/(f*(m + S(1))), x) def replacement5580(a, b, c, d, e, f, m, x): return Dist(I*b*(-c - d + I)/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(-c + d - (-c - d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) - Dist(I*b*(c + d + I)/(f*(m + S(1))), Int((e + f*x)**(m + S(1))*exp(S(2)*a + S(2)*b*x)/(c - d - (c + d + I)*exp(S(2)*a + S(2)*b*x) + I), x), x) + Simp((e + f*x)**(m + S(1))*acot(c + d/tanh(a + b*x))/(f*(m + S(1))), x) def replacement5581(u, x): return -Int(SimplifyIntegrand(x*D(u, x)/(u**S(2) + S(1)), x), x) + Simp(x*ArcTan(u), x) def replacement5582(u, x): return Int(SimplifyIntegrand(x*D(u, x)/(u**S(2) + S(1)), x), x) + Simp(x*acot(u), x) def replacement5583(a, b, c, d, m, u, x): return -Dist(b/(d*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(u**S(2) + S(1)), x), x), x) + Simp((a + b*ArcTan(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement5584(a, b, c, d, m, u, x): return Dist(b/(d*(m + S(1))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(u**S(2) + S(1)), x), x), x) + Simp((a + b*acot(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def With5585(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement5585(a, b, u, v, x): w = IntHide(v, x) return -Dist(b, Int(SimplifyIntegrand(w*D(u, x)/(u**S(2) + S(1)), x), x), x) + Dist(a + b*ArcTan(u), w, x) def With5586(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement5586(a, b, u, v, x): w = IntHide(v, x) return Dist(b, Int(SimplifyIntegrand(w*D(u, x)/(u**S(2) + S(1)), x), x), x) + Dist(a + b*acot(u), w, x) def replacement5587(a, b, v, w, x): return Dist(I/S(2), Int(log(w)*log(-I*v + S(1))/(a + b*x), x), x) - Dist(I/S(2), Int(log(w)*log(I*v + S(1))/(a + b*x), x), x) def replacement5588(v, w, x): return -Int(SimplifyIntegrand(x*ArcTan(v)*D(w, x)/w, x), x) - Int(SimplifyIntegrand(x*D(v, x)*log(w)/(v**S(2) + S(1)), x), x) + Simp(x*ArcTan(v)*log(w), x) def replacement5589(v, w, x): return -Int(SimplifyIntegrand(x*D(w, x)*acot(v)/w, x), x) + Int(SimplifyIntegrand(x*D(v, x)*log(w)/(v**S(2) + S(1)), x), x) + Simp(x*log(w)*acot(v), x) def With5590(u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False z = IntHide(u, x) if InverseFunctionFreeQ(z, x): return True return False def replacement5590(u, v, w, x): z = IntHide(u, x) return Dist(ArcTan(v)*log(w), z, x) - Int(SimplifyIntegrand(z*ArcTan(v)*D(w, x)/w, x), x) - Int(SimplifyIntegrand(z*D(v, x)*log(w)/(v**S(2) + S(1)), x), x) def With5591(u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False z = IntHide(u, x) if InverseFunctionFreeQ(z, x): return True return False def replacement5591(u, v, w, x): z = IntHide(u, x) return Dist(log(w)*acot(v), z, x) - Int(SimplifyIntegrand(z*D(w, x)*acot(v)/w, x), x) + Int(SimplifyIntegrand(z*D(v, x)*log(w)/(v**S(2) + S(1)), x), x) def replacement5592(c, x): return -Dist(S(1)/c, Int(S(1)/(x*sqrt(S(1) - S(1)/(c**S(2)*x**S(2)))), x), x) + Simp(x*asec(c*x), x) def replacement5593(c, x): return Dist(S(1)/c, Int(S(1)/(x*sqrt(S(1) - S(1)/(c**S(2)*x**S(2)))), x), x) + Simp(x*acsc(c*x), x) def replacement5594(a, b, c, n, x): return Dist(S(1)/c, Subst(Int((a + b*x)**n*tan(x)/cos(x), x), x, asec(c*x)), x) def replacement5595(a, b, c, n, x): return -Dist(S(1)/c, Subst(Int((a + b*x)**n/(sin(x)*tan(x)), x), x, acsc(c*x)), x) def replacement5596(a, b, c, x): return -Subst(Int((a + b*acos(x/c))/x, x), x, S(1)/x) def replacement5597(a, b, c, x): return -Subst(Int((a + b*asin(x/c))/x, x), x, S(1)/x) def replacement5598(a, b, c, m, x): return -Dist(b/(c*(m + S(1))), Int(x**(m + S(-1))/sqrt(S(1) - S(1)/(c**S(2)*x**S(2))), x), x) + Simp(x**(m + S(1))*(a + b*asec(c*x))/(m + S(1)), x) def replacement5599(a, b, c, m, x): return Dist(b/(c*(m + S(1))), Int(x**(m + S(-1))/sqrt(S(1) - S(1)/(c**S(2)*x**S(2))), x), x) + Simp(x**(m + S(1))*(a + b*acsc(c*x))/(m + S(1)), x) def replacement5600(a, b, c, m, n, x): return Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*(S(1)/cos(x))**(m + S(1))*tan(x), x), x, asec(c*x)), x) def replacement5601(a, b, c, m, n, x): return -Dist(c**(-m + S(-1)), Subst(Int((a + b*x)**n*(S(1)/sin(x))**(m + S(1))/tan(x), x), x, acsc(c*x)), x) def replacement5602(a, b, c, m, n, x): return Int(x**m*(a + b*asec(c*x))**n, x) def replacement5603(a, b, c, m, n, x): return Int(x**m*(a + b*acsc(c*x))**n, x) def With5604(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return -Dist(b*c*x/sqrt(c**S(2)*x**S(2)), Int(SimplifyIntegrand(u/(x*sqrt(c**S(2)*x**S(2) + S(-1))), x), x), x) + Dist(a + b*asec(c*x), u, x) def With5605(a, b, c, d, e, p, x): u = IntHide((d + e*x**S(2))**p, x) return Dist(b*c*x/sqrt(c**S(2)*x**S(2)), Int(SimplifyIntegrand(u/(x*sqrt(c**S(2)*x**S(2) + S(-1))), x), x), x) + Dist(a + b*acsc(c*x), u, x) def replacement5606(a, b, c, d, e, n, p, x): return -Subst(Int(x**(-S(2)*p + S(-2))*(a + b*acos(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x) def replacement5607(a, b, c, d, e, n, p, x): return -Subst(Int(x**(-S(2)*p + S(-2))*(a + b*asin(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x) def replacement5608(a, b, c, d, e, n, p, x): return -Dist(sqrt(x**S(2))/x, Subst(Int(x**(-S(2)*p + S(-2))*(a + b*acos(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement5609(a, b, c, d, e, n, p, x): return -Dist(sqrt(x**S(2))/x, Subst(Int(x**(-S(2)*p + S(-2))*(a + b*asin(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement5610(a, b, c, d, e, n, p, x): return -Dist(sqrt(d + e*x**S(2))/(x*sqrt(d/x**S(2) + e)), Subst(Int(x**(-S(2)*p + S(-2))*(a + b*acos(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement5611(a, b, c, d, e, n, p, x): return -Dist(sqrt(d + e*x**S(2))/(x*sqrt(d/x**S(2) + e)), Subst(Int(x**(-S(2)*p + S(-2))*(a + b*asin(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement5612(a, b, c, d, e, n, p, x): return Int((a + b*asec(c*x))**n*(d + e*x**S(2))**p, x) def replacement5613(a, b, c, d, e, n, p, x): return Int((a + b*acsc(c*x))**n*(d + e*x**S(2))**p, x) def replacement5614(a, b, c, d, e, p, x): return -Dist(b*c*x/(S(2)*e*sqrt(c**S(2)*x**S(2))*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(x*sqrt(c**S(2)*x**S(2) + S(-1))), x), x) + Simp((a + b*asec(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def replacement5615(a, b, c, d, e, p, x): return Dist(b*c*x/(S(2)*e*sqrt(c**S(2)*x**S(2))*(p + S(1))), Int((d + e*x**S(2))**(p + S(1))/(x*sqrt(c**S(2)*x**S(2) + S(-1))), x), x) + Simp((a + b*acsc(c*x))*(d + e*x**S(2))**(p + S(1))/(S(2)*e*(p + S(1))), x) def With5616(a, b, c, d, e, m, p, x): u = IntHide(x**m*(d + e*x**S(2))**p, x) return -Dist(b*c*x/sqrt(c**S(2)*x**S(2)), Int(SimplifyIntegrand(u/(x*sqrt(c**S(2)*x**S(2) + S(-1))), x), x), x) + Dist(a + b*asec(c*x), u, x) def With5617(a, b, c, d, e, m, p, x): u = IntHide(x**m*(d + e*x**S(2))**p, x) return Dist(b*c*x/sqrt(c**S(2)*x**S(2)), Int(SimplifyIntegrand(u/(x*sqrt(c**S(2)*x**S(2) + S(-1))), x), x), x) + Dist(a + b*acsc(c*x), u, x) def replacement5618(a, b, c, d, e, m, n, p, x): return -Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*acos(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x) def replacement5619(a, b, c, d, e, m, n, p, x): return -Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*asin(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x) def replacement5620(a, b, c, d, e, m, n, p, x): return -Dist(sqrt(x**S(2))/x, Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*acos(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement5621(a, b, c, d, e, m, n, p, x): return -Dist(sqrt(x**S(2))/x, Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*asin(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement5622(a, b, c, d, e, m, n, p, x): return -Dist(sqrt(d + e*x**S(2))/(x*sqrt(d/x**S(2) + e)), Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*acos(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement5623(a, b, c, d, e, m, n, p, x): return -Dist(sqrt(d + e*x**S(2))/(x*sqrt(d/x**S(2) + e)), Subst(Int(x**(-m - S(2)*p + S(-2))*(a + b*asin(x/c))**n*(d*x**S(2) + e)**p, x), x, S(1)/x), x) def replacement5624(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*asec(c*x))**n*(d + e*x**S(2))**p, x) def replacement5625(a, b, c, d, e, m, n, p, x): return Int(x**m*(a + b*acsc(c*x))**n*(d + e*x**S(2))**p, x) def replacement5626(a, b, x): return -Int(S(1)/(sqrt(S(1) - S(1)/(a + b*x)**S(2))*(a + b*x)), x) + Simp((a + b*x)*asec(a + b*x)/b, x) def replacement5627(a, b, x): return Int(S(1)/(sqrt(S(1) - S(1)/(a + b*x)**S(2))*(a + b*x)), x) + Simp((a + b*x)*acsc(a + b*x)/b, x) def replacement5628(a, b, n, x): return Dist(S(1)/b, Subst(Int(x**n*tan(x)/cos(x), x), x, asec(a + b*x)), x) def replacement5629(a, b, n, x): return -Dist(S(1)/b, Subst(Int(x**n/(sin(x)*tan(x)), x), x, acsc(a + b*x)), x) def replacement5630(a, b, x): return -Simp(I*PolyLog(S(2), (S(1) - sqrt(S(1) - a**S(2)))*exp(I*asec(a + b*x))/a), x) - Simp(I*PolyLog(S(2), (sqrt(S(1) - a**S(2)) + S(1))*exp(I*asec(a + b*x))/a), x) + Simp(I*PolyLog(S(2), -exp(S(2)*I*asec(a + b*x)))/S(2), x) + Simp(log(S(1) - (S(1) - sqrt(S(1) - a**S(2)))*exp(I*asec(a + b*x))/a)*asec(a + b*x), x) + Simp(log(S(1) - (sqrt(S(1) - a**S(2)) + S(1))*exp(I*asec(a + b*x))/a)*asec(a + b*x), x) - Simp(log(exp(S(2)*I*asec(a + b*x)) + S(1))*asec(a + b*x), x) def replacement5631(a, b, x): return Simp(I*PolyLog(S(2), I*(S(1) - sqrt(S(1) - a**S(2)))*exp(-I*acsc(a + b*x))/a), x) + Simp(I*PolyLog(S(2), I*(sqrt(S(1) - a**S(2)) + S(1))*exp(-I*acsc(a + b*x))/a), x) + Simp(I*PolyLog(S(2), exp(S(2)*I*acsc(a + b*x)))/S(2), x) + Simp(I*acsc(a + b*x)**S(2), x) + Simp(log(S(1) - I*(S(1) - sqrt(S(1) - a**S(2)))*exp(-I*acsc(a + b*x))/a)*acsc(a + b*x), x) + Simp(log(S(1) - I*(sqrt(S(1) - a**S(2)) + S(1))*exp(-I*acsc(a + b*x))/a)*acsc(a + b*x), x) - Simp(log(S(1) - exp(S(2)*I*acsc(a + b*x)))*acsc(a + b*x), x) def replacement5632(a, b, m, x): return -Dist(b**(-m + S(-1))/(m + S(1)), Subst(Int(x**(-m + S(-1))*((-a*x)**(m + S(1)) - (-a*x + S(1))**(m + S(1)))/sqrt(S(1) - x**S(2)), x), x, S(1)/(a + b*x)), x) - Simp(b**(-m + S(-1))*(-b**(m + S(1))*x**(m + S(1)) + (-a)**(m + S(1)))*asec(a + b*x)/(m + S(1)), x) def replacement5633(a, b, m, x): return Dist(b**(-m + S(-1))/(m + S(1)), Subst(Int(x**(-m + S(-1))*((-a*x)**(m + S(1)) - (-a*x + S(1))**(m + S(1)))/sqrt(S(1) - x**S(2)), x), x, S(1)/(a + b*x)), x) - Simp(b**(-m + S(-1))*(-b**(m + S(1))*x**(m + S(1)) + (-a)**(m + S(1)))*acsc(a + b*x)/(m + S(1)), x) def replacement5634(a, b, m, n, x): return Dist(b**(-m + S(-1)), Subst(Int(x**n*(-a + S(1)/cos(x))**m*tan(x)/cos(x), x), x, asec(a + b*x)), x) def replacement5635(a, b, m, n, x): return -Dist(b**(-m + S(-1)), Subst(Int(x**n*(-a + S(1)/sin(x))**m/(sin(x)*tan(x)), x), x, acsc(a + b*x)), x) def replacement5636(a, b, c, m, n, u, x): return Int(u*acos(a/c + b*x**n/c)**m, x) def replacement5637(a, b, c, m, n, u, x): return Int(u*asin(a/c + b*x**n/c)**m, x) def replacement5638(a, b, c, f, n, u, x): return Dist(S(1)/b, Subst(Int(f**(c*x**n)*ReplaceAll(u, Rule(x, -a/b + S(1)/(b*cos(x))))*tan(x)/cos(x), x), x, asec(a + b*x)), x) def replacement5639(a, b, c, f, n, u, x): return -Dist(S(1)/b, Subst(Int(f**(c*x**n)*ReplaceAll(u, Rule(x, -a/b + S(1)/(b*sin(x))))/(sin(x)*tan(x)), x), x, acsc(a + b*x)), x) def replacement5640(u, x): return -Dist(u/sqrt(u**S(2)), Int(SimplifyIntegrand(x*D(u, x)/(u*sqrt(u**S(2) + S(-1))), x), x), x) + Simp(x*asec(u), x) def replacement5641(u, x): return Dist(u/sqrt(u**S(2)), Int(SimplifyIntegrand(x*D(u, x)/(u*sqrt(u**S(2) + S(-1))), x), x), x) + Simp(x*acsc(u), x) def replacement5642(a, b, c, d, m, u, x): return -Dist(b*u/(d*(m + S(1))*sqrt(u**S(2))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(u*sqrt(u**S(2) + S(-1))), x), x), x) + Simp((a + b*asec(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement5643(a, b, c, d, m, u, x): return Dist(b*u/(d*(m + S(1))*sqrt(u**S(2))), Int(SimplifyIntegrand((c + d*x)**(m + S(1))*D(u, x)/(u*sqrt(u**S(2) + S(-1))), x), x), x) + Simp((a + b*acsc(u))*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def With5644(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement5644(a, b, u, v, x): w = IntHide(v, x) return -Dist(b*u/sqrt(u**S(2)), Int(SimplifyIntegrand(w*D(u, x)/(u*sqrt(u**S(2) + S(-1))), x), x), x) + Dist(a + b*asec(u), w, x) def With5645(a, b, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement5645(a, b, u, v, x): w = IntHide(v, x) return Dist(b*u/sqrt(u**S(2)), Int(SimplifyIntegrand(w*D(u, x)/(u*sqrt(u**S(2) + S(-1))), x), x), x) + Dist(a + b*acsc(u), w, x)
6ce949aaca0ecd80e4e0b768cf449f140a234d2134212b0cf5e06b6af872ceaa
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def piecewise_linear(): from sympy.integrals.rubi.constraints import cons1092, cons19, cons1093, cons89, cons90, cons1094, cons91, cons25, cons74, cons68, cons4, cons1095, cons216, cons685, cons102, cons103, cons1096, cons1097, cons33, cons96, cons358, cons1098, cons21, cons1099, cons2, cons3 pattern1885 = Pattern(Integral(u_**WC('m', S(1)), x_), cons19, cons1092) rule1885 = ReplacementRule(pattern1885, With1885) pattern1886 = Pattern(Integral(v_/u_, x_), cons1093, CustomConstraint(With1886)) rule1886 = ReplacementRule(pattern1886, replacement1886) pattern1887 = Pattern(Integral(v_**n_/u_, x_), cons1093, cons89, cons90, cons1094, CustomConstraint(With1887)) rule1887 = ReplacementRule(pattern1887, replacement1887) pattern1888 = Pattern(Integral(S(1)/(u_*v_), x_), cons1093, CustomConstraint(With1888)) rule1888 = ReplacementRule(pattern1888, replacement1888) pattern1889 = Pattern(Integral(S(1)/(u_*sqrt(v_)), x_), cons1093, CustomConstraint(With1889)) rule1889 = ReplacementRule(pattern1889, replacement1889) pattern1890 = Pattern(Integral(S(1)/(u_*sqrt(v_)), x_), cons1093, CustomConstraint(With1890)) rule1890 = ReplacementRule(pattern1890, replacement1890) pattern1891 = Pattern(Integral(v_**n_/u_, x_), cons1093, cons89, cons91, CustomConstraint(With1891)) rule1891 = ReplacementRule(pattern1891, replacement1891) pattern1892 = Pattern(Integral(v_**n_/u_, x_), cons1093, cons25, CustomConstraint(With1892)) rule1892 = ReplacementRule(pattern1892, replacement1892) pattern1893 = Pattern(Integral(S(1)/(sqrt(u_)*sqrt(v_)), x_), cons1093, CustomConstraint(With1893)) rule1893 = ReplacementRule(pattern1893, replacement1893) pattern1894 = Pattern(Integral(S(1)/(sqrt(u_)*sqrt(v_)), x_), cons1093, CustomConstraint(With1894)) rule1894 = ReplacementRule(pattern1894, replacement1894) pattern1895 = Pattern(Integral(u_**m_*v_**n_, x_), cons19, cons4, cons1093, cons74, cons68, CustomConstraint(With1895)) rule1895 = ReplacementRule(pattern1895, replacement1895) pattern1896 = Pattern(Integral(u_**m_*v_**WC('n', S(1)), x_), cons19, cons4, cons1093, cons68, cons1095, CustomConstraint(With1896)) rule1896 = ReplacementRule(pattern1896, replacement1896) pattern1897 = Pattern(Integral(u_**m_*v_**WC('n', S(1)), x_), cons1093, cons216, cons89, cons90, cons685, cons102, cons103, CustomConstraint(With1897)) rule1897 = ReplacementRule(pattern1897, replacement1897) pattern1898 = Pattern(Integral(u_**m_*v_**n_, x_), cons1093, cons685, cons1096, cons1097, CustomConstraint(With1898)) rule1898 = ReplacementRule(pattern1898, replacement1898) pattern1899 = Pattern(Integral(u_**m_*v_**n_, x_), cons1093, cons216, cons33, cons96, CustomConstraint(With1899)) rule1899 = ReplacementRule(pattern1899, replacement1899) pattern1900 = Pattern(Integral(u_**m_*v_**n_, x_), cons1093, cons358, cons1098, CustomConstraint(With1900)) rule1900 = ReplacementRule(pattern1900, replacement1900) pattern1901 = Pattern(Integral(u_**m_*v_**n_, x_), cons1093, cons21, cons25, CustomConstraint(With1901)) rule1901 = ReplacementRule(pattern1901, replacement1901) pattern1902 = Pattern(Integral(u_**WC('n', S(1))*log(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons1092, cons1099, cons89, cons90) rule1902 = ReplacementRule(pattern1902, With1902) pattern1903 = Pattern(Integral(u_**WC('n', S(1))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*log(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons1092, cons1099, cons89, cons90, cons68) rule1903 = ReplacementRule(pattern1903, With1903) return [rule1885, rule1886, rule1887, rule1888, rule1889, rule1890, rule1891, rule1892, rule1893, rule1894, rule1895, rule1896, rule1897, rule1898, rule1899, rule1900, rule1901, rule1902, rule1903, ] def With1885(m, u, x): c = D(u, x) return Dist(S(1)/c, Subst(Int(x**m, x), x, u), x) def With1886(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1886(u, v, x): a = D(u, x) b = D(v, x) return -Dist((-a*v + b*u)/a, Int(S(1)/u, x), x) + Simp(b*x/a, x) def With1887(n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1887(n, u, v, x): a = D(u, x) b = D(v, x) return -Dist((-a*v + b*u)/a, Int(v**(n + S(-1))/u, x), x) + Simp(v**n/(a*n), x) def With1888(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1888(u, v, x): a = D(u, x) b = D(v, x) return -Dist(a/(-a*v + b*u), Int(S(1)/u, x), x) + Dist(b/(-a*v + b*u), Int(S(1)/v, x), x) def With1889(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if And(NonzeroQ(-a*v + b*u), PosQ((-a*v + b*u)/a)): return True return False def replacement1889(u, v, x): a = D(u, x) b = D(v, x) return Simp(S(2)*ArcTan(sqrt(v)/Rt((-a*v + b*u)/a, S(2)))/(a*Rt((-a*v + b*u)/a, S(2))), x) def With1890(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if And(NonzeroQ(-a*v + b*u), NegQ((-a*v + b*u)/a)): return True return False def replacement1890(u, v, x): a = D(u, x) b = D(v, x) return Simp(-S(2)*atanh(sqrt(v)/Rt(-(-a*v + b*u)/a, S(2)))/(a*Rt(-(-a*v + b*u)/a, S(2))), x) def With1891(n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1891(n, u, v, x): a = D(u, x) b = D(v, x) return -Dist(a/(-a*v + b*u), Int(v**(n + S(1))/u, x), x) + Simp(v**(n + S(1))/((n + S(1))*(-a*v + b*u)), x) def With1892(n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1892(n, u, v, x): a = D(u, x) b = D(v, x) return Simp(v**(n + S(1))*Hypergeometric2F1(S(1), n + S(1), n + S(2), -a*v/(-a*v + b*u))/((n + S(1))*(-a*v + b*u)), x) def With1893(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if And(NonzeroQ(-a*v + b*u), PosQ(a*b)): return True return False def replacement1893(u, v, x): a = D(u, x) b = D(v, x) return Simp(S(2)*atanh(sqrt(u)*Rt(a*b, S(2))/(a*sqrt(v)))/Rt(a*b, S(2)), x) def With1894(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if And(NonzeroQ(-a*v + b*u), NegQ(a*b)): return True return False def replacement1894(u, v, x): a = D(u, x) b = D(v, x) return Simp(S(2)*ArcTan(sqrt(u)*Rt(-a*b, S(2))/(a*sqrt(v)))/Rt(-a*b, S(2)), x) def With1895(m, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1895(m, n, u, v, x): a = D(u, x) b = D(v, x) return -Simp(u**(m + S(1))*v**(n + S(1))/((m + S(1))*(-a*v + b*u)), x) def With1896(m, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1896(m, n, u, v, x): a = D(u, x) b = D(v, x) return -Dist(b*n/(a*(m + S(1))), Int(u**(m + S(1))*v**(n + S(-1)), x), x) + Simp(u**(m + S(1))*v**n/(a*(m + S(1))), x) def With1897(m, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1897(m, n, u, v, x): a = D(u, x) b = D(v, x) return -Dist(n*(-a*v + b*u)/(a*(m + n + S(1))), Int(u**m*v**(n + S(-1)), x), x) + Simp(u**(m + S(1))*v**n/(a*(m + n + S(1))), x) def With1898(m, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1898(m, n, u, v, x): a = D(u, x) b = D(v, x) return -Dist(n*(-a*v + b*u)/(a*(m + n + S(1))), Int(u**m*v**(n + S(-1)), x), x) + Simp(u**(m + S(1))*v**n/(a*(m + n + S(1))), x) def With1899(m, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1899(m, n, u, v, x): a = D(u, x) b = D(v, x) return Dist(b*(m + n + S(2))/((m + S(1))*(-a*v + b*u)), Int(u**(m + S(1))*v**n, x), x) - Simp(u**(m + S(1))*v**(n + S(1))/((m + S(1))*(-a*v + b*u)), x) def With1900(m, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1900(m, n, u, v, x): a = D(u, x) b = D(v, x) return Dist(b*(m + n + S(2))/((m + S(1))*(-a*v + b*u)), Int(u**(m + S(1))*v**n, x), x) - Simp(u**(m + S(1))*v**(n + S(1))/((m + S(1))*(-a*v + b*u)), x) def With1901(m, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = D(u, x) b = D(v, x) if NonzeroQ(-a*v + b*u): return True return False def replacement1901(m, n, u, v, x): a = D(u, x) b = D(v, x) return Simp(u**m*v**(n + S(1))*(b*u/(-a*v + b*u))**(-m)*Hypergeometric2F1(-m, n + S(1), n + S(2), -a*v/(-a*v + b*u))/(b*(n + S(1))), x) def With1902(a, b, n, u, x): c = D(u, x) return -Dist(c*n/b, Int(u**(n + S(-1))*(a + b*x)*log(a + b*x), x), x) - Int(u**n, x) + Simp(u**n*(a + b*x)*log(a + b*x)/b, x) def With1903(a, b, m, n, u, x): c = D(u, x) return -Dist(c*n/(b*(m + S(1))), Int(u**(n + S(-1))*(a + b*x)**(m + S(1))*log(a + b*x), x), x) - Dist(S(1)/(m + S(1)), Int(u**n*(a + b*x)**m, x), x) + Simp(u**n*(a + b*x)**(m + S(1))*log(a + b*x)/(b*(m + S(1))), x)
21906f19a70d32e0b7032fa0ec7bb5afc61f57bb84d4ca6dfc7fe4d9f6ffecf0
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def miscellaneous_integration(): from sympy.integrals.rubi.constraints import cons149, cons2004, cons2, cons3, cons8, cons4, cons5, cons388, cons29, cons52, cons2005, cons2006, cons2007, cons2008, cons50, cons127, cons210, cons36, cons37, cons38, cons1101, cons2009, cons68, cons19, cons86, cons1039, cons1038, cons40, cons2010, cons10, cons2011, cons2012, cons2013, cons211, cons1833, cons1246, cons2014, cons48, cons2015, cons2016, cons2017, cons2018, cons54, cons2019, cons802, cons2020, cons20, cons2021, cons588, cons2022, cons2023, cons2024, cons2025, cons2026, cons2027, cons2028, cons2029, cons2030, cons669, cons198, cons2031, cons842, cons2032, cons21, cons2033, cons150, cons47, cons2034, cons1856, cons1249, cons263, cons2035, cons369, cons2036, cons69, cons1481, cons746, cons1484, cons167, cons2037, cons2038, cons1678, cons1257, cons2039, cons349 pattern6934 = Pattern(Integral(u_*((x_*WC('b', S(1)) + WC('a', S(0)))**n_*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons149, cons2004) rule6934 = ReplacementRule(pattern6934, replacement6934) pattern6935 = Pattern(Integral(((d_*(x_*WC('b', S(1)) + WC('a', S(0))))**p_*WC('c', S(1)))**q_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons52, cons149, cons388) rule6935 = ReplacementRule(pattern6935, replacement6935) pattern6936 = Pattern(Integral((((x_*WC('b', S(1)) + WC('a', S(0)))**n_*WC('d', S(1)))**p_*WC('c', S(1)))**q_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons149, cons388) rule6936 = ReplacementRule(pattern6936, replacement6936) pattern6937 = Pattern(Integral((F_*sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*WC('b', S(1))*WC('c', S(1))/sqrt(x_*WC('g', S(1)) + WC('f', S(0))) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons36, cons37, cons38, cons1101, cons2005, cons2006, cons2007, cons2008) rule6937 = ReplacementRule(pattern6937, replacement6937) pattern6938 = Pattern(Integral((F_*sqrt(x_*WC('e', S(1)) + S(1))*WC('b', S(1))*WC('c', S(1))/sqrt(x_*WC('g', S(1)) + S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*WC('C', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons50, cons210, cons36, cons38, cons1101, cons2005, cons2009) rule6938 = ReplacementRule(pattern6938, replacement6938) pattern6939 = Pattern(Integral((F_**(sqrt(x_*WC('e', S(1)) + WC('d', S(0)))*WC('c', S(1))/sqrt(x_*WC('g', S(1)) + WC('f', S(0))))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons36, cons37, cons38, cons1101, cons2005, cons2006, cons2007, cons2008) rule6939 = ReplacementRule(pattern6939, replacement6939) pattern6940 = Pattern(Integral((F_**(sqrt(x_*WC('e', S(1)) + S(1))*WC('c', S(1))/sqrt(x_*WC('g', S(1)) + S(1)))*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/(x_**S(2)*WC('C', S(1)) + WC('A', S(0))), x_), cons2, cons3, cons8, cons50, cons210, cons36, cons38, cons1101, cons2005, cons2009) rule6940 = ReplacementRule(pattern6940, replacement6940) pattern6941 = Pattern(Integral(u_/y_, x_), CustomConstraint(With6941)) rule6941 = ReplacementRule(pattern6941, replacement6941) pattern6942 = Pattern(Integral(u_/(w_*y_), x_), CustomConstraint(With6942)) rule6942 = ReplacementRule(pattern6942, replacement6942) pattern6943 = Pattern(Integral(u_*y_**WC('m', S(1)), x_), cons19, cons68, CustomConstraint(With6943)) rule6943 = ReplacementRule(pattern6943, replacement6943) pattern6944 = Pattern(Integral(u_*y_**WC('m', S(1))*z_**WC('n', S(1)), x_), cons19, cons4, cons68, CustomConstraint(With6944)) rule6944 = ReplacementRule(pattern6944, replacement6944) pattern6945 = Pattern(Integral(u_, x_), CustomConstraint(With6945)) rule6945 = ReplacementRule(pattern6945, replacement6945) pattern6946 = Pattern(Integral((sqrt(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1)) + sqrt(x_**WC('n', S(1))*WC('d', S(1)) + WC('c', S(0)))*WC('f', S(1)))**m_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons86, cons1039) rule6946 = ReplacementRule(pattern6946, replacement6946) pattern6947 = Pattern(Integral((sqrt(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1)) + sqrt(x_**WC('n', S(1))*WC('d', S(1)) + WC('c', S(0)))*WC('f', S(1)))**m_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons86, cons1038) rule6947 = ReplacementRule(pattern6947, replacement6947) pattern6948 = Pattern(Integral(u_**WC('m', S(1))*w_*(u_**n_*WC('a', S(1)) + v_)**WC('p', S(1)), x_), cons2, cons19, cons4, cons40, cons2010, cons10) rule6948 = ReplacementRule(pattern6948, replacement6948) pattern6949 = Pattern(Integral(u_*(v_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(y_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons2011, CustomConstraint(With6949)) rule6949 = ReplacementRule(pattern6949, replacement6949) pattern6950 = Pattern(Integral(u_*(v_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(w_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*(y_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons2011, cons2012, CustomConstraint(With6950)) rule6950 = ReplacementRule(pattern6950, replacement6950) pattern6951 = Pattern(Integral(u_*(v_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(w_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*(y_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(z_*WC('h', S(1)) + WC('g', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons52, cons2011, cons2012, cons2013, CustomConstraint(With6951)) rule6951 = ReplacementRule(pattern6951, replacement6951) pattern6952 = Pattern(Integral((a_ + y_**n_*WC('b', S(1)))*WC('u', S(1)), x_), cons2, cons3, cons4, cons1833, CustomConstraint(With6952)) rule6952 = ReplacementRule(pattern6952, replacement6952) pattern6953 = Pattern(Integral((y_**n_*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), cons2, cons3, cons4, cons5, cons1246, CustomConstraint(With6953)) rule6953 = ReplacementRule(pattern6953, replacement6953) pattern6954 = Pattern(Integral(v_**WC('m', S(1))*(y_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons19, cons4, cons5, cons2014, CustomConstraint(With6954)) rule6954 = ReplacementRule(pattern6954, replacement6954) pattern6955 = Pattern(Integral((v_**WC('n2', S(1))*WC('c', S(1)) + y_**n_*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons48, cons2011, CustomConstraint(With6955)) rule6955 = ReplacementRule(pattern6955, replacement6955) pattern6956 = Pattern(Integral((A_ + y_**n_*WC('B', S(1)))*(v_**n_*WC('b', S(1)) + w_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons5, cons48, cons2011, cons2012, CustomConstraint(With6956)) rule6956 = ReplacementRule(pattern6956, replacement6956) pattern6957 = Pattern(Integral((A_ + y_**n_*WC('B', S(1)))*(w_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons8, cons36, cons37, cons4, cons5, cons48, cons2012, CustomConstraint(With6957)) rule6957 = ReplacementRule(pattern6957, replacement6957) pattern6958 = Pattern(Integral(v_**WC('m', S(1))*(w_**WC('n2', S(1))*WC('c', S(1)) + y_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons48, cons2012, CustomConstraint(With6958)) rule6958 = ReplacementRule(pattern6958, replacement6958) pattern6959 = Pattern(Integral(z_**WC('m', S(1))*(A_ + y_**n_*WC('B', S(1)))*(v_**n_*WC('b', S(1)) + w_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons19, cons4, cons5, cons48, cons2011, cons2012, CustomConstraint(With6959)) rule6959 = ReplacementRule(pattern6959, replacement6959) pattern6960 = Pattern(Integral(z_**WC('m', S(1))*(A_ + y_**n_*WC('B', S(1)))*(w_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons8, cons36, cons37, cons19, cons4, cons5, cons48, cons2012, CustomConstraint(With6960)) rule6960 = ReplacementRule(pattern6960, replacement6960) pattern6961 = Pattern(Integral((v_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('p', S(1))*(y_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons2011, CustomConstraint(With6961)) rule6961 = ReplacementRule(pattern6961, replacement6961) pattern6962 = Pattern(Integral((v_**n_*WC('d', S(1)) + WC('c', S(0)))**WC('p', S(1))*(w_**n_*WC('f', S(1)) + WC('e', S(0)))**WC('q', S(1))*(y_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons2011, cons2012, CustomConstraint(With6962)) rule6962 = ReplacementRule(pattern6962, replacement6962) pattern6963 = Pattern(Integral(F_**v_*u_, x_), cons1101, cons1101, CustomConstraint(With6963)) rule6963 = ReplacementRule(pattern6963, replacement6963) pattern6964 = Pattern(Integral(F_**v_*u_*w_**WC('m', S(1)), x_), cons1101, cons19, cons2015, CustomConstraint(With6964)) rule6964 = ReplacementRule(pattern6964, replacement6964) pattern6965 = Pattern(Integral(u_*(a_ + v_**WC('p', S(1))*w_**WC('p', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), cons2, cons3, cons19, cons5, cons40, CustomConstraint(With6965)) rule6965 = ReplacementRule(pattern6965, replacement6965) pattern6966 = Pattern(Integral(u_*v_**WC('r', S(1))*(a_ + v_**WC('p', S(1))*w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), cons2, cons3, cons19, cons5, cons52, cons54, cons2016, cons2017, cons2018, CustomConstraint(With6966)) rule6966 = ReplacementRule(pattern6966, replacement6966) pattern6967 = Pattern(Integral(u_*v_**WC('r', S(1))*w_**WC('s', S(1))*(a_ + v_**WC('p', S(1))*w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), cons2, cons3, cons19, cons5, cons52, cons54, cons802, cons2019, cons2017, cons2018, CustomConstraint(With6967)) rule6967 = ReplacementRule(pattern6967, replacement6967) pattern6968 = Pattern(Integral(u_*(v_**WC('p', S(1))*WC('a', S(1)) + w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), cons2, cons3, cons19, cons5, cons52, cons2020, cons40, cons20, CustomConstraint(With6968)) rule6968 = ReplacementRule(pattern6968, replacement6968) pattern6969 = Pattern(Integral(u_*v_**WC('r', S(1))*(v_**WC('p', S(1))*WC('a', S(1)) + w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), cons2, cons3, cons19, cons5, cons52, cons54, cons2021, cons588, cons20, CustomConstraint(With6969)) rule6969 = ReplacementRule(pattern6969, replacement6969) pattern6970 = Pattern(Integral(u_*w_**WC('s', S(1))*(v_**WC('p', S(1))*WC('a', S(1)) + w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), cons2, cons3, cons19, cons5, cons52, cons802, cons2022, cons2023, cons2024, cons20, CustomConstraint(With6970)) rule6970 = ReplacementRule(pattern6970, replacement6970) pattern6971 = Pattern(Integral(u_*v_**WC('r', S(1))*w_**WC('s', S(1))*(v_**WC('p', S(1))*WC('a', S(1)) + w_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1)), x_), cons2, cons3, cons19, cons5, cons52, cons54, cons802, cons2025, cons2023, cons2024, cons20, CustomConstraint(With6971)) rule6971 = ReplacementRule(pattern6971, replacement6971) pattern6972 = Pattern(Integral(u_*x_**WC('m', S(1)), x_), cons19, cons68, cons2026) rule6972 = ReplacementRule(pattern6972, replacement6972) pattern6973 = Pattern(Integral(u_, x_), CustomConstraint(With6973)) rule6973 = ReplacementRule(pattern6973, replacement6973) pattern6974 = Pattern(Integral(u_, x_), CustomConstraint(With6974)) rule6974 = ReplacementRule(pattern6974, replacement6974) pattern6975 = Pattern(Integral((v_**WC('m', S(1))*w_**WC('n', S(1))*z_**WC('q', S(1))*WC('a', S(1)))**p_*WC('u', S(1)), x_), cons2, cons19, cons4, cons5, cons52, cons149, cons10, cons2027, cons2028) rule6975 = ReplacementRule(pattern6975, replacement6975) pattern6976 = Pattern(Integral((v_**WC('m', S(1))*w_**WC('n', S(1))*WC('a', S(1)))**p_*WC('u', S(1)), x_), cons2, cons19, cons4, cons5, cons149, cons10, cons2027) rule6976 = ReplacementRule(pattern6976, replacement6976) pattern6977 = Pattern(Integral((v_**WC('m', S(1))*WC('a', S(1)))**p_*WC('u', S(1)), x_), cons2, cons19, cons5, cons149, cons10, cons2029, cons2030) rule6977 = ReplacementRule(pattern6977, replacement6977) pattern6978 = Pattern(Integral((x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), cons2, cons3, cons5, cons669, cons198, cons2031) rule6978 = ReplacementRule(pattern6978, replacement6978) pattern6979 = Pattern(Integral((v_**n_*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), cons2, cons3, cons5, cons149, cons198, cons842, cons2032) rule6979 = ReplacementRule(pattern6979, replacement6979) pattern6980 = Pattern(Integral((v_**n_*x_**WC('m', S(1))*WC('b', S(1)) + WC('a', S(0)))**p_*WC('u', S(1)), x_), cons2, cons3, cons19, cons5, cons149, cons198, cons842) rule6980 = ReplacementRule(pattern6980, replacement6980) pattern6981 = Pattern(Integral((x_**WC('r', S(1))*WC('a', S(1)) + x_**WC('s', S(1))*WC('b', S(1)))**m_*WC('u', S(1)), x_), cons2, cons3, cons19, cons54, cons802, cons21, cons2033, CustomConstraint(With6981)) rule6981 = ReplacementRule(pattern6981, replacement6981) pattern6982 = Pattern(Integral(u_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons150, CustomConstraint(With6982)) rule6982 = ReplacementRule(pattern6982, replacement6982) pattern6983 = Pattern(Integral(u_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons48, cons47, cons40, cons2034) rule6983 = ReplacementRule(pattern6983, replacement6983) pattern6984 = Pattern(Integral(u_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons48, cons47, cons149, cons2034) rule6984 = ReplacementRule(pattern6984, replacement6984) pattern6985 = Pattern(Integral(u_/(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons48, cons150, CustomConstraint(With6985)) rule6985 = ReplacementRule(pattern6985, replacement6985) pattern6986 = Pattern(Integral(WC('u', S(1))/(x_**WC('m', S(1))*WC('a', S(1)) + sqrt(x_**n_*WC('c', S(1)))*WC('b', S(1))), x_), cons2, cons3, cons8, cons19, cons4, cons1856) rule6986 = ReplacementRule(pattern6986, replacement6986) pattern6987 = Pattern(Integral(u_, x_), CustomConstraint(With6987)) rule6987 = ReplacementRule(pattern6987, replacement6987) pattern6988 = Pattern(Integral(u_/x_, x_), cons1249, cons2031, CustomConstraint(With6988)) rule6988 = ReplacementRule(pattern6988, replacement6988) pattern6989 = Pattern(Integral(u_*x_**WC('m', S(1)), x_), cons20, cons263, cons1249, cons2035, CustomConstraint(With6989)) rule6989 = ReplacementRule(pattern6989, replacement6989) pattern6990 = Pattern(Integral(u_*x_**m_, x_), cons369) rule6990 = ReplacementRule(pattern6990, With6990) pattern6991 = Pattern(Integral(u_, x_), cons2036, CustomConstraint(With6991)) rule6991 = ReplacementRule(pattern6991, replacement6991) pattern6992 = Pattern(Integral(S(1)/(a_ + v_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons69) rule6992 = ReplacementRule(pattern6992, replacement6992) pattern6993 = Pattern(Integral(S(1)/(a_ + v_**n_*WC('b', S(1))), x_), cons2, cons3, cons1481, cons746) rule6993 = ReplacementRule(pattern6993, replacement6993) pattern6994 = Pattern(Integral(S(1)/(a_ + v_**n_*WC('b', S(1))), x_), cons2, cons3, cons1484, cons167) rule6994 = ReplacementRule(pattern6994, replacement6994) pattern6995 = Pattern(Integral(v_/(a_ + u_**WC('n', S(1))*WC('b', S(1))), x_), cons2, cons3, cons150, cons2037) rule6995 = ReplacementRule(pattern6995, replacement6995) pattern6996 = Pattern(Integral(u_, x_), CustomConstraint(With6996)) rule6996 = ReplacementRule(pattern6996, replacement6996) pattern6997 = Pattern(Integral(u_, x_), CustomConstraint(With6997)) rule6997 = ReplacementRule(pattern6997, replacement6997) pattern6998 = Pattern(Integral((x_**WC('m', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(x_**WC('n', S(1))*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons52, cons2038, cons1678, cons1257, cons2039) rule6998 = ReplacementRule(pattern6998, replacement6998) pattern6999 = Pattern(Integral(u_*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons48, cons47, cons349) rule6999 = ReplacementRule(pattern6999, replacement6999) pattern7000 = Pattern(Integral(u_, x_), CustomConstraint(With7000)) rule7000 = ReplacementRule(pattern7000, replacement7000) pattern7001 = Pattern(Integral(u_, x_)) rule7001 = ReplacementRule(pattern7001, replacement7001) return [rule6934, rule6935, rule6936, rule6937, rule6938, rule6939, rule6940, rule6941, rule6942, rule6943, rule6944, rule6945, rule6946, rule6947, rule6948, rule6949, rule6950, rule6951, rule6952, rule6953, rule6954, rule6955, rule6956, rule6957, rule6958, rule6959, rule6960, rule6961, rule6962, rule6963, rule6964, rule6965, rule6966, rule6967, rule6968, rule6969, rule6970, rule6971, rule6972, rule6973, rule6974, rule6975, rule6976, rule6977, rule6978, rule6979, rule6980, rule6981, rule6982, rule6983, rule6984, rule6985, rule6986, rule6987, rule6988, rule6989, rule6990, rule6991, rule6992, rule6993, rule6994, rule6995, rule6996, rule6997, rule6998, rule6999, rule7000, rule7001, ] def replacement6934(a, b, c, n, p, u, x): return Dist(c**IntPart(p)*(c*(a + b*x)**n)**FracPart(p)*(a + b*x)**(-n*FracPart(p)), Int(u*(a + b*x)**(n*p), x), x) def replacement6935(a, b, c, d, p, q, u, x): return Dist((c*(d*(a + b*x))**p)**q*(a + b*x)**(-p*q), Int(u*(a + b*x)**(p*q), x), x) def replacement6936(a, b, c, d, n, p, q, u, x): return Dist((c*(d*(a + b*x)**n)**p)**q*(a + b*x)**(-n*p*q), Int(u*(a + b*x)**(n*p*q), x), x) def replacement6937(A, B, C, F, a, b, c, d, e, f, g, n, x): return Dist(g/C, Subst(Int((a + b*F(c*x))**n/x, x), x, sqrt(d + e*x)/sqrt(f + g*x)), x) def replacement6938(A, C, F, a, b, c, e, g, n, x): return Dist(g/C, Subst(Int((a + b*F(c*x))**n/x, x), x, sqrt(e*x + S(1))/sqrt(g*x + S(1))), x) def replacement6939(A, B, C, F, a, b, c, d, e, f, g, n, x): return Dist(g/C, Subst(Int((F**(c*x)*b + a)**n/x, x), x, sqrt(d + e*x)/sqrt(f + g*x)), x) def replacement6940(A, C, F, a, b, c, e, g, n, x): return Dist(g/C, Subst(Int((F**(c*x)*b + a)**n/x, x), x, sqrt(e*x + S(1))/sqrt(g*x + S(1))), x) def With6941(u, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6941(u, x, y): q = DerivativeDivides(y, u, x) return Simp(q*log(RemoveContent(y, x)), x) def With6942(u, w, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(w*y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6942(u, w, x, y): q = DerivativeDivides(w*y, u, x) return Simp(q*log(RemoveContent(w*y, x)), x) def With6943(m, u, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6943(m, u, x, y): q = DerivativeDivides(y, u, x) return Simp(q*y**(m + S(1))/(m + S(1)), x) def With6944(m, n, u, x, y, z): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y*z, u*z**(-m + n), x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6944(m, n, u, x, y, z): q = DerivativeDivides(y*z, u*z**(-m + n), x) return Simp(q*y**(m + S(1))*z**(m + S(1))/(m + S(1)), x) def With6945(u, x): if isinstance(x, (int, Integer, float, Float)): return False v = SimplifyIntegrand(u, x) if SimplerIntegrandQ(v, u, x): return True return False def replacement6945(u, x): v = SimplifyIntegrand(u, x) return Int(v, x) def replacement6946(a, b, c, d, e, f, m, n, u, x): return Dist((a*e**S(2) - c*f**S(2))**m, Int(ExpandIntegrand(u*(e*sqrt(a + b*x**n) - f*sqrt(c + d*x**n))**(-m), x), x), x) def replacement6947(a, b, c, d, e, f, m, n, u, x): return Dist((b*e**S(2) - d*f**S(2))**m, Int(ExpandIntegrand(u*x**(m*n)*(e*sqrt(a + b*x**n) - f*sqrt(c + d*x**n))**(-m), x), x), x) def replacement6948(a, m, n, p, u, v, w, x): return Int(u**(m + n*p)*w*(a + u**(-n)*v)**p, x) def With6949(a, b, c, d, m, n, u, v, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6949(a, b, c, d, m, n, u, v, x, y): q = DerivativeDivides(y, u, x) return Dist(q, Subst(Int((a + b*x)**m*(c + d*x)**n, x), x, y), x) def With6950(a, b, c, d, e, f, m, n, p, u, v, w, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6950(a, b, c, d, e, f, m, n, p, u, v, w, x, y): q = DerivativeDivides(y, u, x) return Dist(q, Subst(Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p, x), x, y), x) def With6951(a, b, c, d, e, f, g, h, m, n, p, q, u, v, w, x, y, z): if isinstance(x, (int, Integer, float, Float)): return False try: r = DerivativeDivides(y, u, x) res = Not(FalseQ(r)) except (TypeError, AttributeError): return False if res: return True return False def replacement6951(a, b, c, d, e, f, g, h, m, n, p, q, u, v, w, x, y, z): r = DerivativeDivides(y, u, x) return Dist(r, Subst(Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p*(g + h*x)**q, x), x, y), x) def With6952(a, b, n, u, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6952(a, b, n, u, x, y): q = DerivativeDivides(y, u, x) return Dist(a, Int(u, x), x) + Dist(b*q, Subst(Int(x**n, x), x, y), x) def With6953(a, b, n, p, u, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6953(a, b, n, p, u, x, y): q = DerivativeDivides(y, u, x) return Dist(q, Subst(Int((a + b*x**n)**p, x), x, y), x) def With6954(a, b, m, n, p, u, v, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = Symbol('q') r = Symbol('r') r = Divides(y**m, v**m, x) q = DerivativeDivides(y, u, x) res = And(Not(FalseQ(Set(r, Divides(y**m, v**m, x)))), Not(FalseQ(Set(q, DerivativeDivides(y, u, x))))) except (TypeError, AttributeError): return False if res: return True return False def replacement6954(a, b, m, n, p, u, v, x, y): q = Symbol('q') r = Symbol('r') r = Divides(y**m, v**m, x) q = DerivativeDivides(y, u, x) return Dist(q*r, Subst(Int(x**m*(a + b*x**n)**p, x), x, y), x) def With6955(a, b, c, n, n2, p, u, v, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6955(a, b, c, n, n2, p, u, v, x, y): q = DerivativeDivides(y, u, x) return Dist(q, Subst(Int((a + b*x**n + c*x**(S(2)*n))**p, x), x, y), x) def With6956(A, B, a, b, c, n, n2, p, u, v, w, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6956(A, B, a, b, c, n, n2, p, u, v, w, x, y): q = DerivativeDivides(y, u, x) return Dist(q, Subst(Int((A + B*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, y), x) def With6957(A, B, a, c, n, n2, p, u, w, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6957(A, B, a, c, n, n2, p, u, w, x, y): q = DerivativeDivides(y, u, x) return Dist(q, Subst(Int((A + B*x**n)*(a + c*x**(S(2)*n))**p, x), x, y), x) def With6958(a, b, c, m, n, n2, p, u, v, w, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = Symbol('q') r = Symbol('r') r = Divides(y**m, v**m, x) q = DerivativeDivides(y, u, x) res = And(Not(FalseQ(Set(r, Divides(y**m, v**m, x)))), Not(FalseQ(Set(q, DerivativeDivides(y, u, x))))) except (TypeError, AttributeError): return False if res: return True return False def replacement6958(a, b, c, m, n, n2, p, u, v, w, x, y): q = Symbol('q') r = Symbol('r') r = Divides(y**m, v**m, x) q = DerivativeDivides(y, u, x) return Dist(q*r, Subst(Int(x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x, y), x) def With6959(A, B, a, b, c, m, n, n2, p, u, v, w, x, y, z): if isinstance(x, (int, Integer, float, Float)): return False try: q = Symbol('q') r = Symbol('r') r = Divides(y**m, z**m, x) q = DerivativeDivides(y, u, x) res = And(Not(FalseQ(Set(r, Divides(y**m, z**m, x)))), Not(FalseQ(Set(q, DerivativeDivides(y, u, x))))) except (TypeError, AttributeError): return False if res: return True return False def replacement6959(A, B, a, b, c, m, n, n2, p, u, v, w, x, y, z): q = Symbol('q') r = Symbol('r') r = Divides(y**m, z**m, x) q = DerivativeDivides(y, u, x) return Dist(q*r, Subst(Int(x**m*(A + B*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, y), x) def With6960(A, B, a, c, m, n, n2, p, u, w, x, y, z): if isinstance(x, (int, Integer, float, Float)): return False try: q = Symbol('q') r = Symbol('r') r = Divides(y**m, z**m, x) q = DerivativeDivides(y, u, x) res = And(Not(FalseQ(Set(r, Divides(y**m, z**m, x)))), Not(FalseQ(Set(q, DerivativeDivides(y, u, x))))) except (TypeError, AttributeError): return False if res: return True return False def replacement6960(A, B, a, c, m, n, n2, p, u, w, x, y, z): q = Symbol('q') r = Symbol('r') r = Divides(y**m, z**m, x) q = DerivativeDivides(y, u, x) return Dist(q*r, Subst(Int(x**m*(A + B*x**n)*(a + c*x**(S(2)*n))**p, x), x, y), x) def With6961(a, b, c, d, m, n, p, u, v, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(y, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6961(a, b, c, d, m, n, p, u, v, x, y): q = DerivativeDivides(y, u, x) return Dist(q, Subst(Int((a + b*x**n)**m*(c + d*x**n)**p, x), x, y), x) def With6962(a, b, c, d, e, f, m, n, p, q, u, v, w, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: r = DerivativeDivides(y, u, x) res = Not(FalseQ(r)) except (TypeError, AttributeError): return False if res: return True return False def replacement6962(a, b, c, d, e, f, m, n, p, q, u, v, w, x, y): r = DerivativeDivides(y, u, x) return Dist(r, Subst(Int((a + b*x**n)**m*(c + d*x**n)**p*(e + f*x**n)**q, x), x, y), x) def With6963(F, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(v, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6963(F, u, v, x): q = DerivativeDivides(v, u, x) return Simp(F**v*q/log(F), x) def With6964(F, m, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(v, u, x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement6964(F, m, u, v, w, x): q = DerivativeDivides(v, u, x) return Dist(q, Subst(Int(F**x*x**m, x), x, v), x) def With6965(a, b, m, p, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False c = u/(v*D(w, x) + w*D(v, x)) if FreeQ(c, x): return True return False def replacement6965(a, b, m, p, u, v, w, x): c = u/(v*D(w, x) + w*D(v, x)) return Dist(c, Subst(Int((a + b*x**p)**m, x), x, v*w), x) def With6966(a, b, m, p, q, r, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False c = u/(p*w*D(v, x) + q*v*D(w, x)) if FreeQ(c, x): return True return False def replacement6966(a, b, m, p, q, r, u, v, w, x): c = u/(p*w*D(v, x) + q*v*D(w, x)) return Dist(c*p/(r + S(1)), Subst(Int((a + b*x**(p/(r + S(1))))**m, x), x, v**(r + S(1))*w), x) def With6967(a, b, m, p, q, r, s, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False c = u/(p*w*D(v, x) + q*v*D(w, x)) if FreeQ(c, x): return True return False def replacement6967(a, b, m, p, q, r, s, u, v, w, x): c = u/(p*w*D(v, x) + q*v*D(w, x)) return Dist(c*p/(r + S(1)), Subst(Int((a + b*x**(p/(r + S(1))))**m, x), x, v**(r + S(1))*w**(s + S(1))), x) def With6968(a, b, m, p, q, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False c = u/(p*w*D(v, x) - q*v*D(w, x)) if FreeQ(c, x): return True return False def replacement6968(a, b, m, p, q, u, v, w, x): c = u/(p*w*D(v, x) - q*v*D(w, x)) return Dist(c*p, Subst(Int((a*x**p + b)**m, x), x, v*w**(m*q + S(1))), x) def With6969(a, b, m, p, q, r, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False c = u/(p*w*D(v, x) - q*v*D(w, x)) if FreeQ(c, x): return True return False def replacement6969(a, b, m, p, q, r, u, v, w, x): c = u/(p*w*D(v, x) - q*v*D(w, x)) return -Dist(c*q, Subst(Int((a + b*x**q)**m, x), x, v**(m*p + r + S(1))*w), x) def With6970(a, b, m, p, q, s, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False c = u/(p*w*D(v, x) - q*v*D(w, x)) if FreeQ(c, x): return True return False def replacement6970(a, b, m, p, q, s, u, v, w, x): c = u/(p*w*D(v, x) - q*v*D(w, x)) return -Dist(c*q/(s + S(1)), Subst(Int((a + b*x**(q/(s + S(1))))**m, x), x, v**(m*p + S(1))*w**(s + S(1))), x) def With6971(a, b, m, p, q, r, s, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False c = u/(p*w*D(v, x) - q*v*D(w, x)) if FreeQ(c, x): return True return False def replacement6971(a, b, m, p, q, r, s, u, v, w, x): c = u/(p*w*D(v, x) - q*v*D(w, x)) return -Dist(c*q/(s + S(1)), Subst(Int((a + b*x**(q/(s + S(1))))**m, x), x, v**(m*p + r + S(1))*w**(s + S(1))), x) def replacement6972(m, u, x): return Dist(S(1)/(m + S(1)), Subst(Int(SubstFor(x**(m + S(1)), u, x), x), x, x**(m + S(1))), x) def With6973(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = SubstForFractionalPowerOfLinear(u, x) res = And(Not(FalseQ(lst)), SubstForFractionalPowerQ(u, Part(lst, S(3)), x)) except (TypeError, AttributeError): return False if res: return True return False def replacement6973(u, x): lst = SubstForFractionalPowerOfLinear(u, x) return Dist(Part(lst, S(2))*Part(lst, S(4)), Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(3))**(S(1)/Part(lst, S(2)))), x) def With6974(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = SubstForFractionalPowerOfQuotientOfLinears(u, x) res = Not(FalseQ(lst)) except (TypeError, AttributeError): return False if res: return True return False def replacement6974(u, x): lst = SubstForFractionalPowerOfQuotientOfLinears(u, x) return Dist(Part(lst, S(2))*Part(lst, S(4)), Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(3))**(S(1)/Part(lst, S(2)))), x) def replacement6975(a, m, n, p, q, u, v, w, x, z): return Dist(a**IntPart(p)*v**(-m*FracPart(p))*w**(-n*FracPart(p))*z**(-q*FracPart(p))*(a*v**m*w**n*z**q)**FracPart(p), Int(u*v**(m*p)*w**(n*p)*z**(p*q), x), x) def replacement6976(a, m, n, p, u, v, w, x): return Dist(a**IntPart(p)*v**(-m*FracPart(p))*w**(-n*FracPart(p))*(a*v**m*w**n)**FracPart(p), Int(u*v**(m*p)*w**(n*p), x), x) def replacement6977(a, m, p, u, v, x): return Dist(a**IntPart(p)*v**(-m*FracPart(p))*(a*v**m)**FracPart(p), Int(u*v**(m*p), x), x) def replacement6978(a, b, n, p, u, x): return Dist(FullSimplify(x**(-n/S(2))*sqrt(a + b*x**n)/sqrt(a*x**(-n) + b)), Int(u*x**(n*p)*(a*x**(-n) + b)**p, x), x) def replacement6979(a, b, n, p, u, v, x): return Dist(v**(-n*FracPart(p))*(a + b*v**n)**FracPart(p)*(a*v**(-n) + b)**(-FracPart(p)), Int(u*v**(n*p)*(a*v**(-n) + b)**p, x), x) def replacement6980(a, b, m, n, p, u, v, x): return Dist(v**(-n*FracPart(p))*(a + b*v**n*x**m)**FracPart(p)*(a*v**(-n) + b*x**m)**(-FracPart(p)), Int(u*v**(n*p)*(a*v**(-n) + b*x**m)**p, x), x) def With6981(a, b, m, r, s, u, x): if isinstance(x, (int, Integer, float, Float)): return False v = x**(-r*FracPart(m))*(a + b*x**(-r + s))**(-FracPart(m))*(a*x**r + b*x**s)**FracPart(m) if Not(EqQ(v, S(1))): return True return False def replacement6981(a, b, m, r, s, u, x): v = x**(-r*FracPart(m))*(a + b*x**(-r + s))**(-FracPart(m))*(a*x**r + b*x**s)**FracPart(m) return Dist(v, Int(u*x**(m*r)*(a + b*x**(-r + s))**m, x), x) def With6982(a, b, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False v = RationalFunctionExpand(u/(a + b*x**n), x) if SumQ(v): return True return False def replacement6982(a, b, n, u, x): v = RationalFunctionExpand(u/(a + b*x**n), x) return Int(v, x) def replacement6983(a, b, c, n, n2, p, u, x): return Dist(S(4)**(-p)*c**(-p), Int(u*(b + S(2)*c*x**n)**(S(2)*p), x), x) def replacement6984(a, b, c, n, n2, p, u, x): return Dist((b + S(2)*c*x**n)**(-S(2)*p)*(a + b*x**n + c*x**(S(2)*n))**p, Int(u*(b + S(2)*c*x**n)**(S(2)*p), x), x) def With6985(a, b, c, n, n2, u, x): if isinstance(x, (int, Integer, float, Float)): return False v = RationalFunctionExpand(u/(a + b*x**n + c*x**(S(2)*n)), x) if SumQ(v): return True return False def replacement6985(a, b, c, n, n2, u, x): v = RationalFunctionExpand(u/(a + b*x**n + c*x**(S(2)*n)), x) return Int(v, x) def replacement6986(a, b, c, m, n, u, x): return Int(u*(a*x**m - b*sqrt(c*x**n))/(a**S(2)*x**(S(2)*m) - b**S(2)*c*x**n), x) def With6987(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = FunctionOfLinear(u, x) res = Not(FalseQ(lst)) except (TypeError, AttributeError): return False if res: return True return False def replacement6987(u, x): lst = FunctionOfLinear(u, x) return Dist(S(1)/Part(lst, S(3)), Subst(Int(Part(lst, S(1)), x), x, x*Part(lst, S(3)) + Part(lst, S(2))), x) def With6988(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = PowerVariableExpn(u, S(0), x) res = And(Not(FalseQ(lst)), NonzeroQ(Part(lst, S(2)))) except (TypeError, AttributeError): return False if res: return True return False def replacement6988(u, x): lst = PowerVariableExpn(u, S(0), x) return Dist(S(1)/Part(lst, S(2)), Subst(Int(NormalizeIntegrand(Part(lst, S(1))/x, x), x), x, (x*Part(lst, S(3)))**Part(lst, S(2))), x) def With6989(m, u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = PowerVariableExpn(u, m + S(1), x) res = And(Not(FalseQ(lst)), NonzeroQ(-m + Part(lst, S(2)) + S(-1))) except (TypeError, AttributeError): return False if res: return True return False def replacement6989(m, u, x): lst = PowerVariableExpn(u, m + S(1), x) return Dist(S(1)/Part(lst, S(2)), Subst(Int(NormalizeIntegrand(Part(lst, S(1))/x, x), x), x, (x*Part(lst, S(3)))**Part(lst, S(2))), x) def With6990(m, u, x): k = Denominator(m) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*ReplaceAll(u, Rule(x, x**k)), x), x, x**(S(1)/k)), x) def With6991(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = FunctionOfSquareRootOfQuadratic(u, x) res = Not(FalseQ(lst)) except (TypeError, AttributeError): return False if res: return True return False def replacement6991(u, x): lst = FunctionOfSquareRootOfQuadratic(u, x) return Dist(S(2), Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(2))), x) def replacement6992(a, b, v, x): return Dist(S(1)/(S(2)*a), Int(Together(S(1)/(-v/Rt(-a/b, S(2)) + S(1))), x), x) + Dist(S(1)/(S(2)*a), Int(Together(S(1)/(v/Rt(-a/b, S(2)) + S(1))), x), x) def replacement6993(a, b, n, v, x): return Dist(S(2)/(a*n), Sum_doit(Int(Together(S(1)/(S(1) - (S(-1))**(-S(4)*k/n)*v**S(2)/Rt(-a/b, n/S(2)))), x), List(k, S(1), n/S(2))), x) def replacement6994(a, b, n, v, x): return Dist(S(1)/(a*n), Sum_doit(Int(Together(S(1)/(S(1) - (S(-1))**(-S(2)*k/n)*v/Rt(-a/b, n))), x), List(k, S(1), n)), x) def replacement6995(a, b, n, u, v, x): return Int(ReplaceAll(ExpandIntegrand(PolynomialInSubst(v, u, x)/(a + b*x**n), x), Rule(x, u)), x) def With6996(u, x): if isinstance(x, (int, Integer, float, Float)): return False v = NormalizeIntegrand(u, x) if UnsameQ(v, u): return True return False def replacement6996(u, x): v = NormalizeIntegrand(u, x) return Int(v, x) def With6997(u, x): if isinstance(x, (int, Integer, float, Float)): return False v = ExpandIntegrand(u, x) if SumQ(v): return True return False def replacement6997(u, x): v = ExpandIntegrand(u, x) return Int(v, x) def replacement6998(a, b, c, d, m, n, p, q, u, x): return Dist(x**(-m*p)*(a + b*x**m)**p*(c + d*x**n)**q, Int(u*x**(m*p), x), x) def replacement6999(a, b, c, n, n2, p, u, x): return Dist((S(4)*c)**(S(1)/2 - p)*sqrt(a + b*x**n + c*x**(S(2)*n))/(b + S(2)*c*x**n), Int(u*(b + S(2)*c*x**n)**(S(2)*p), x), x) def With7000(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = SubstForFractionalPowerOfLinear(u, x) res = Not(FalseQ(lst)) except (TypeError, AttributeError): return False if res: return True return False def replacement7000(u, x): lst = SubstForFractionalPowerOfLinear(u, x) return Dist(Part(lst, S(2))*Part(lst, S(4)), Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(3))**(S(1)/Part(lst, S(2)))), x) def replacement7001(u, x): return Int(u, x)
95df7162c378c2f524e75d2c620c594ca91581fbe52dc94af6abab8be711c732
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def exponential(): from sympy.integrals.rubi.constraints import cons33, cons170, cons517, cons1100, cons1101, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons96, cons20, cons21, cons19, cons1102, cons130, cons2, cons246, cons139, cons554, cons1103, cons1104, cons5, cons382, cons56, cons1105, cons1106, cons1107, cons211, cons226, cons798, cons799, cons52, cons1108, cons806, cons1109, cons814, cons1110, cons1111, cons1112, cons1113, cons586, cons1114, cons1115, cons481, cons482, cons1116, cons198, cons25, cons1117, cons55, cons1118, cons1119, cons1120, cons1121, cons87, cons1122, cons358, cons533, cons1123, cons1124, cons537, cons95, cons1125, cons1126, cons178, cons369, cons168, cons746, cons70, cons842, cons1127, cons1128, cons1129, cons27, cons73, cons1130, cons1131, cons1132, cons820, cons1133, cons1134, cons1135, cons1136, cons821, cons1137, cons1138, cons1139, cons1140, cons150, cons812, cons813, cons1141, cons1142, cons54, cons802, cons1143, cons1144, cons1145, cons815, cons1146, cons228, cons64, cons1147, cons1148, cons1149, cons1150, cons1151, cons1152, cons1153, cons465, cons1154, cons45, cons450, cons1155, cons1156, cons1157, cons1019 pattern1904 = Pattern(Integral((F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1)))*WC('b', S(1)))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons33, cons170, cons517, cons1100) rule1904 = ReplacementRule(pattern1904, replacement1904) pattern1905 = Pattern(Integral((F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1)))*WC('b', S(1)))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons1101, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons33, cons96, cons517, cons1100) rule1905 = ReplacementRule(pattern1905, replacement1905) pattern1906 = Pattern(Integral(F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons1101, cons8, cons29, cons50, cons127, cons210, cons1100) rule1906 = ReplacementRule(pattern1906, replacement1906) pattern1907 = Pattern(Integral(F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons8, cons29, cons50, cons127, cons210, cons20) rule1907 = ReplacementRule(pattern1907, replacement1907) pattern1908 = Pattern(Integral(F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1)))/sqrt(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons1101, cons8, cons29, cons50, cons127, cons210, cons1100) rule1908 = ReplacementRule(pattern1908, replacement1908) pattern1909 = Pattern(Integral(F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1)))*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons1101, cons8, cons29, cons50, cons127, cons210, cons19, cons21) rule1909 = ReplacementRule(pattern1909, replacement1909) pattern1910 = Pattern(Integral((F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1)))*WC('b', S(1)))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons1102) rule1910 = ReplacementRule(pattern1910, replacement1910) pattern1911 = Pattern(Integral((a_ + (F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons130) rule1911 = ReplacementRule(pattern1911, replacement1911) pattern1912 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + (F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons33, cons170) rule1912 = ReplacementRule(pattern1912, replacement1912) pattern1913 = Pattern(Integral((a_ + (F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1)))**p_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons246, cons170, cons139) rule1913 = ReplacementRule(pattern1913, With1913) pattern1914 = Pattern(Integral(u_**WC('m', S(1))*((F_**(v_*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons1101, cons2, cons3, cons210, cons4, cons5, cons554, cons1103, cons1104, cons20) rule1914 = ReplacementRule(pattern1914, replacement1914) pattern1915 = Pattern(Integral(u_**WC('m', S(1))*((F_**(v_*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons1101, cons2, cons3, cons210, cons19, cons4, cons5, cons554, cons1103, cons1104, cons21) rule1915 = ReplacementRule(pattern1915, With1915) pattern1916 = Pattern(Integral((a_ + (F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons382) rule1916 = ReplacementRule(pattern1916, replacement1916) pattern1917 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))/(a_ + (F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons33, cons170) rule1917 = ReplacementRule(pattern1917, replacement1917) pattern1918 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*((F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons56) rule1918 = ReplacementRule(pattern1918, replacement1918) pattern1919 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*((F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*(F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons1105) rule1919 = ReplacementRule(pattern1919, replacement1919) pattern1920 = Pattern(Integral((G_**((x_*WC('i', S(1)) + WC('h', S(0)))*WC('j', S(1)))*WC('k', S(1)))**WC('q', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*((F_**((x_*WC('f', S(1)) + WC('e', S(0)))*WC('g', S(1))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons798, cons799, cons19, cons4, cons5, cons52, cons1106, cons1107) rule1920 = ReplacementRule(pattern1920, replacement1920) pattern1921 = Pattern(Integral((F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons4, cons1108) rule1921 = ReplacementRule(pattern1921, replacement1921) pattern1922 = Pattern(Integral(F_**(v_*WC('c', S(1)))*u_, x_), cons1101, cons8, cons806, cons554, cons1109) rule1922 = ReplacementRule(pattern1922, replacement1922) pattern1923 = Pattern(Integral(F_**(v_*WC('c', S(1)))*u_, x_), cons1101, cons8, cons806, cons554, cons1100) rule1923 = ReplacementRule(pattern1923, replacement1923) pattern1924 = Pattern(Integral(F_**(v_*WC('c', S(1)))*u_**WC('m', S(1))*w_, x_), cons1101, cons8, cons19, cons814, cons1110) rule1924 = ReplacementRule(pattern1924, replacement1924) pattern1925 = Pattern(Integral(F_**(v_*WC('c', S(1)))*u_**WC('m', S(1))*w_, x_), cons1101, cons8, cons1111, cons554, cons1103, cons20, cons1109) rule1925 = ReplacementRule(pattern1925, replacement1925) pattern1926 = Pattern(Integral(F_**(v_*WC('c', S(1)))*u_**WC('m', S(1))*w_, x_), cons1101, cons8, cons1111, cons554, cons1103, cons20, cons1100) rule1926 = ReplacementRule(pattern1926, replacement1926) pattern1927 = Pattern(Integral(F_**(v_*WC('c', S(1)))*u_**WC('m', S(1))*w_, x_), cons1101, cons8, cons19, cons1111, cons554, cons1103, cons21) rule1927 = ReplacementRule(pattern1927, With1927) pattern1928 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(e_ + (x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1))*log(x_*WC('d', S(1))))*log(x_*WC('d', S(1)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons1112, cons1113, cons586) rule1928 = ReplacementRule(pattern1928, replacement1928) pattern1929 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*x_**WC('m', S(1))*(e_ + (x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1))*log(x_*WC('d', S(1))))*log(x_*WC('d', S(1)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons1114, cons1113, cons586) rule1929 = ReplacementRule(pattern1929, replacement1929) pattern1930 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons1115) rule1930 = ReplacementRule(pattern1930, replacement1930) pattern1931 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**S(2)*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons481) rule1931 = ReplacementRule(pattern1931, replacement1931) pattern1932 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**S(2)*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons482) rule1932 = ReplacementRule(pattern1932, replacement1932) pattern1933 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons1116, cons198) rule1933 = ReplacementRule(pattern1933, replacement1933) pattern1934 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons1116, cons25) rule1934 = ReplacementRule(pattern1934, With1934) pattern1935 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons4, cons1117) rule1935 = ReplacementRule(pattern1935, replacement1935) pattern1936 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons55, cons1118) rule1936 = ReplacementRule(pattern1936, replacement1936) pattern1937 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))/(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1118) rule1937 = ReplacementRule(pattern1937, replacement1937) pattern1938 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons19, cons4, cons1119) rule1938 = ReplacementRule(pattern1938, replacement1938) pattern1939 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons33, cons1120, cons1121, cons87, cons1122) rule1939 = ReplacementRule(pattern1939, replacement1939) pattern1940 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons19, cons4, cons1120, cons1121, cons358, cons533) rule1940 = ReplacementRule(pattern1940, replacement1940) pattern1941 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons33, cons1120, cons1123, cons87, cons1124) rule1941 = ReplacementRule(pattern1941, replacement1941) pattern1942 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons19, cons4, cons1120, cons1123, cons358, cons537) rule1942 = ReplacementRule(pattern1942, replacement1942) pattern1943 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons95, cons1120, cons1121, cons25) rule1943 = ReplacementRule(pattern1943, With1943) pattern1944 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1118, cons1120, cons1125, cons21, cons1126) rule1944 = ReplacementRule(pattern1944, replacement1944) pattern1945 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1118) rule1945 = ReplacementRule(pattern1945, replacement1945) pattern1946 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**S(2)*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons178, cons369, cons168) rule1946 = ReplacementRule(pattern1946, replacement1946) pattern1947 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**S(2)*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons178, cons33, cons96) rule1947 = ReplacementRule(pattern1947, replacement1947) pattern1948 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons178, cons87, cons746, cons33, cons96) rule1948 = ReplacementRule(pattern1948, replacement1948) pattern1949 = Pattern(Integral(F_**(WC('a', S(0)) + WC('b', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))/(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons178) rule1949 = ReplacementRule(pattern1949, replacement1949) pattern1950 = Pattern(Integral(F_**(WC('a', S(0)) + WC('b', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))*(x_*WC('f', S(1)) + WC('e', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons178, cons20, cons96) rule1950 = ReplacementRule(pattern1950, replacement1950) pattern1951 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))/(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons178) rule1951 = ReplacementRule(pattern1951, replacement1951) pattern1952 = Pattern(Integral(F_**v_*u_**WC('m', S(1)), x_), cons1101, cons19, cons70, cons842, cons1127) rule1952 = ReplacementRule(pattern1952, replacement1952) pattern1953 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))**n_*WC('b', S(1)) + WC('a', S(0)))*u_, x_), cons1101, cons2, cons3, cons8, cons29, cons4, cons806) rule1953 = ReplacementRule(pattern1953, replacement1953) pattern1954 = Pattern(Integral(F_**(v_*WC('b', S(1)) + WC('a', S(0)))*WC('u', S(1)), x_), cons1101, cons2, cons3, cons806, cons1128, cons1129) rule1954 = ReplacementRule(pattern1954, replacement1954) pattern1955 = Pattern(Integral(F_**(WC('a', S(0)) + WC('b', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))/((x_*WC('f', S(1)) + WC('e', S(0)))*(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons1118) rule1955 = ReplacementRule(pattern1955, replacement1955) pattern1956 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))) + WC('e', S(0)))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons27) rule1956 = ReplacementRule(pattern1956, replacement1956) pattern1957 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))) + WC('e', S(0)))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons73, cons1130) rule1957 = ReplacementRule(pattern1957, replacement1957) pattern1958 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))) + WC('e', S(0)))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons73, cons1131) rule1958 = ReplacementRule(pattern1958, replacement1958) pattern1959 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))) + WC('e', S(0)))*(x_*WC('h', S(1)) + WC('g', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons73, cons1131, cons20, cons96) rule1959 = ReplacementRule(pattern1959, replacement1959) pattern1960 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))) + WC('e', S(0)))/((x_*WC('h', S(1)) + WC('g', S(0)))*(x_*WC('j', S(1)) + WC('i', S(0)))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons1130) rule1960 = ReplacementRule(pattern1960, replacement1960) pattern1961 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons1132) rule1961 = ReplacementRule(pattern1961, replacement1961) pattern1962 = Pattern(Integral(F_**v_, x_), cons1101, cons820, cons1133) rule1962 = ReplacementRule(pattern1962, replacement1962) pattern1963 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1134) rule1963 = ReplacementRule(pattern1963, replacement1963) pattern1964 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1134, cons33, cons168) rule1964 = ReplacementRule(pattern1964, replacement1964) pattern1965 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1134) rule1965 = ReplacementRule(pattern1965, replacement1965) pattern1966 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1134, cons33, cons96) rule1966 = ReplacementRule(pattern1966, replacement1966) pattern1967 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1135) rule1967 = ReplacementRule(pattern1967, replacement1967) pattern1968 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1135, cons33, cons168) rule1968 = ReplacementRule(pattern1968, replacement1968) pattern1969 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1135, cons33, cons96) rule1969 = ReplacementRule(pattern1969, replacement1969) pattern1970 = Pattern(Integral(F_**(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons19, cons1136) rule1970 = ReplacementRule(pattern1970, replacement1970) pattern1971 = Pattern(Integral(F_**v_*u_**WC('m', S(1)), x_), cons1101, cons19, cons70, cons820, cons821) rule1971 = ReplacementRule(pattern1971, replacement1971) pattern1972 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*x_**WC('m', S(1))*(F_**v_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1137, cons33, cons170, cons198) rule1972 = ReplacementRule(pattern1972, With1972) pattern1973 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**WC('n', S(1)), x_), cons1101, cons1139, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons1138, CustomConstraint(With1973)) rule1973 = ReplacementRule(pattern1973, replacement1973) pattern1974 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**WC('n', S(1)), x_), cons1101, cons1139, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons1138, CustomConstraint(With1974)) rule1974 = ReplacementRule(pattern1974, replacement1974) pattern1975 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**WC('n', S(1)), x_), cons1101, cons1139, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons1140, cons150) rule1975 = ReplacementRule(pattern1975, replacement1975) pattern1976 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**n_, x_), cons1101, cons1139, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons1140, cons198) rule1976 = ReplacementRule(pattern1976, replacement1976) pattern1977 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**n_, x_), cons1101, cons1139, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons1140, cons25) rule1977 = ReplacementRule(pattern1977, replacement1977) pattern1978 = Pattern(Integral(G_**(u_*WC('h', S(1)))*(F_**(v_*WC('e', S(1)))*WC('b', S(1)) + a_)**n_, x_), cons1101, cons1139, cons2, cons3, cons50, cons211, cons4, cons812, cons813) rule1978 = ReplacementRule(pattern1978, replacement1978) pattern1979 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*H_**((x_*WC('s', S(1)) + WC('r', S(0)))*WC('t', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**WC('n', S(1)), x_), cons1101, cons1139, cons1142, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons54, cons802, cons1143, cons4, cons1141, CustomConstraint(With1979)) rule1979 = ReplacementRule(pattern1979, replacement1979) pattern1980 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*H_**((x_*WC('s', S(1)) + WC('r', S(0)))*WC('t', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**WC('n', S(1)), x_), cons1101, cons1139, cons1142, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons54, cons802, cons1143, cons1144, cons87) rule1980 = ReplacementRule(pattern1980, replacement1980) pattern1981 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*H_**((x_*WC('s', S(1)) + WC('r', S(0)))*WC('t', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**WC('n', S(1)), x_), cons1101, cons1139, cons1142, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons54, cons802, cons1143, cons1145, cons150) rule1981 = ReplacementRule(pattern1981, replacement1981) pattern1982 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*H_**((x_*WC('s', S(1)) + WC('r', S(0)))*WC('t', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**n_, x_), cons1101, cons1139, cons1142, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons54, cons802, cons1143, cons1145, cons198) rule1982 = ReplacementRule(pattern1982, replacement1982) pattern1983 = Pattern(Integral(G_**((x_*WC('g', S(1)) + WC('f', S(0)))*WC('h', S(1)))*H_**((x_*WC('s', S(1)) + WC('r', S(0)))*WC('t', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + a_)**n_, x_), cons1101, cons1139, cons1142, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons54, cons802, cons1143, cons4, cons1145, cons25) rule1983 = ReplacementRule(pattern1983, replacement1983) pattern1984 = Pattern(Integral(G_**(u_*WC('h', S(1)))*H_**(w_*WC('t', S(1)))*(F_**(v_*WC('e', S(1)))*WC('b', S(1)) + a_)**n_, x_), cons1101, cons1139, cons1142, cons2, cons3, cons50, cons211, cons1143, cons4, cons814, cons815) rule1984 = ReplacementRule(pattern1984, replacement1984) pattern1985 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + x_**WC('n', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons56) rule1985 = ReplacementRule(pattern1985, replacement1985) pattern1986 = Pattern(Integral(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*x_**WC('m', S(1))*(F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1)))*WC('b', S(1)) + x_**WC('n', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons56) rule1986 = ReplacementRule(pattern1986, replacement1986) pattern1987 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/(F_**u_*WC('b', S(1)) + F_**v_*WC('c', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons127, cons210, cons1146, cons70, cons228, cons64) rule1987 = ReplacementRule(pattern1987, With1987) pattern1988 = Pattern(Integral(F_**u_*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/(F_**u_*WC('b', S(1)) + F_**v_*WC('c', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons127, cons210, cons1146, cons70, cons228, cons64) rule1988 = ReplacementRule(pattern1988, With1988) pattern1989 = Pattern(Integral((F_**u_*WC('i', S(1)) + h_)*(x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/(F_**u_*WC('b', S(1)) + F_**v_*WC('c', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons127, cons210, cons211, cons226, cons1146, cons70, cons228, cons64) rule1989 = ReplacementRule(pattern1989, With1989) pattern1990 = Pattern(Integral(x_**WC('m', S(1))/(F_**v_*WC('b', S(1)) + F_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('a', S(1))), x_), cons1101, cons2, cons3, cons8, cons29, cons1147, cons33, cons170) rule1990 = ReplacementRule(pattern1990, With1990) pattern1991 = Pattern(Integral(u_/(F_**v_*WC('b', S(1)) + F_**w_*WC('c', S(1)) + a_), x_), cons1101, cons2, cons3, cons8, cons554, cons1148, cons1149, cons1150) rule1991 = ReplacementRule(pattern1991, replacement1991) pattern1992 = Pattern(Integral(F_**((x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1))*WC('g', S(1)))/(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons210, cons4, cons1151) rule1992 = ReplacementRule(pattern1992, replacement1992) pattern1993 = Pattern(Integral(F_**((x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1))*WC('g', S(1)))/(a_ + x_**S(2)*WC('c', S(1))), x_), cons1101, cons2, cons8, cons29, cons50, cons210, cons4, cons1152) rule1993 = ReplacementRule(pattern1993, replacement1993) pattern1994 = Pattern(Integral(F_**((x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1))*WC('g', S(1)))*u_**WC('m', S(1))/(c_*x_**S(2) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons210, cons4, cons806, cons20) rule1994 = ReplacementRule(pattern1994, replacement1994) pattern1995 = Pattern(Integral(F_**((x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1))*WC('g', S(1)))*u_**WC('m', S(1))/(a_ + c_*x_**S(2)), x_), cons1101, cons2, cons8, cons29, cons50, cons210, cons4, cons806, cons20) rule1995 = ReplacementRule(pattern1995, replacement1995) pattern1996 = Pattern(Integral(F_**((x_**S(4)*WC('b', S(1)) + WC('a', S(0)))/x_**S(2)), x_), cons1101, cons2, cons3, cons1153) rule1996 = ReplacementRule(pattern1996, replacement1996) pattern1997 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('m', S(1)) + exp(x_))**n_, x_), cons95, cons170, cons465, cons1154) rule1997 = ReplacementRule(pattern1997, replacement1997) pattern1998 = Pattern(Integral(log(a_ + (F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1))))**WC('n', S(1))*WC('b', S(1))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons45) rule1998 = ReplacementRule(pattern1998, replacement1998) pattern1999 = Pattern(Integral(log(a_ + (F_**((x_*WC('d', S(1)) + WC('c', S(0)))*WC('e', S(1))))**WC('n', S(1))*WC('b', S(1))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons450) rule1999 = ReplacementRule(pattern1999, replacement1999) pattern2000 = Pattern(Integral((F_**v_*WC('a', S(1)))**n_*WC('u', S(1)), x_), cons1101, cons2, cons4, cons25) rule2000 = ReplacementRule(pattern2000, replacement2000) pattern2001 = Pattern(Integral(u_, x_), cons1155) rule2001 = ReplacementRule(pattern2001, With2001) pattern2002 = Pattern(Integral((F_**v_*WC('a', S(1)) + F_**w_*WC('b', S(1)))**n_*WC('u', S(1)), x_), cons1101, cons2, cons3, cons4, cons198, cons1156) rule2002 = ReplacementRule(pattern2002, replacement2002) pattern2003 = Pattern(Integral((F_**v_*WC('a', S(1)) + G_**w_*WC('b', S(1)))**n_*WC('u', S(1)), x_), cons1101, cons1139, cons2, cons3, cons4, cons198, cons1156) rule2003 = ReplacementRule(pattern2003, replacement2003) pattern2004 = Pattern(Integral((F_**v_*WC('a', S(1)) + F_**w_*WC('b', S(1)))**n_*WC('u', S(1)), x_), cons1101, cons2, cons3, cons4, cons25, cons1156) rule2004 = ReplacementRule(pattern2004, replacement2004) pattern2005 = Pattern(Integral((F_**v_*WC('a', S(1)) + G_**w_*WC('b', S(1)))**n_*WC('u', S(1)), x_), cons1101, cons1139, cons2, cons3, cons4, cons25, cons1156) rule2005 = ReplacementRule(pattern2005, replacement2005) pattern2006 = Pattern(Integral(F_**v_*G_**w_*WC('u', S(1)), x_), cons1101, cons1139, cons1157) rule2006 = ReplacementRule(pattern2006, replacement2006) pattern2007 = Pattern(Integral(F_**u_*(v_ + w_)*WC('y', S(1)), x_), cons1101, cons1101, CustomConstraint(With2007)) rule2007 = ReplacementRule(pattern2007, replacement2007) pattern2008 = Pattern(Integral(F_**u_*v_**WC('n', S(1))*w_, x_), cons1101, cons4, cons806, cons1019, cons1111, CustomConstraint(With2008)) rule2008 = ReplacementRule(pattern2008, replacement2008) return [rule1904, rule1905, rule1906, rule1907, rule1908, rule1909, rule1910, rule1911, rule1912, rule1913, rule1914, rule1915, rule1916, rule1917, rule1918, rule1919, rule1920, rule1921, rule1922, rule1923, rule1924, rule1925, rule1926, rule1927, rule1928, rule1929, rule1930, rule1931, rule1932, rule1933, rule1934, rule1935, rule1936, rule1937, rule1938, rule1939, rule1940, rule1941, rule1942, rule1943, rule1944, rule1945, rule1946, rule1947, rule1948, rule1949, rule1950, rule1951, rule1952, rule1953, rule1954, rule1955, rule1956, rule1957, rule1958, rule1959, rule1960, rule1961, rule1962, rule1963, rule1964, rule1965, rule1966, rule1967, rule1968, rule1969, rule1970, rule1971, rule1972, rule1973, rule1974, rule1975, rule1976, rule1977, rule1978, rule1979, rule1980, rule1981, rule1982, rule1983, rule1984, rule1985, rule1986, rule1987, rule1988, rule1989, rule1990, rule1991, rule1992, rule1993, rule1994, rule1995, rule1996, rule1997, rule1998, rule1999, rule2000, rule2001, rule2002, rule2003, rule2004, rule2005, rule2006, rule2007, rule2008, ] def replacement1904(F, b, c, d, e, f, g, m, n, x): return -Dist(d*m/(f*g*n*log(F)), Int((F**(g*(e + f*x))*b)**n*(c + d*x)**(m + S(-1)), x), x) + Simp((F**(g*(e + f*x))*b)**n*(c + d*x)**m/(f*g*n*log(F)), x) def replacement1905(F, b, c, d, e, f, g, m, n, x): return -Dist(f*g*n*log(F)/(d*(m + S(1))), Int((F**(g*(e + f*x))*b)**n*(c + d*x)**(m + S(1)), x), x) + Simp((F**(g*(e + f*x))*b)**n*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement1906(F, c, d, e, f, g, x): return Simp(F**(g*(-c*f/d + e))*ExpIntegralEi(f*g*(c + d*x)*log(F)/d)/d, x) def replacement1907(F, c, d, e, f, g, m, x): return Simp(F**(g*(-c*f/d + e))*f**(-m + S(-1))*g**(-m + S(-1))*(-d)**m*Gamma(m + S(1), -f*g*(c + d*x)*log(F)/d)*log(F)**(-m + S(-1)), x) def replacement1908(F, c, d, e, f, g, x): return Dist(S(2)/d, Subst(Int(F**(g*(-c*f/d + e) + f*g*x**S(2)/d), x), x, sqrt(c + d*x)), x) def replacement1909(F, c, d, e, f, g, m, x): return -Simp(F**(g*(-c*f/d + e))*(-f*g*log(F)/d)**(-IntPart(m) + S(-1))*(-f*g*(c + d*x)*log(F)/d)**(-FracPart(m))*(c + d*x)**FracPart(m)*Gamma(m + S(1), -f*g*(c + d*x)*log(F)/d)/d, x) def replacement1910(F, b, c, d, e, f, g, m, n, x): return Dist(F**(-g*n*(e + f*x))*(F**(g*(e + f*x))*b)**n, Int(F**(g*n*(e + f*x))*(c + d*x)**m, x), x) def replacement1911(F, a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b*(F**(g*(e + f*x)))**n)**p, x), x) def replacement1912(F, a, b, c, d, e, f, g, m, n, x): return Dist(d*m/(a*f*g*n*log(F)), Int((c + d*x)**(m + S(-1))*log(a*(F**(g*(e + f*x)))**(-n)/b + S(1)), x), x) - Simp((c + d*x)**m*log(a*(F**(g*(e + f*x)))**(-n)/b + S(1))/(a*f*g*n*log(F)), x) def With1913(F, a, b, c, d, e, f, g, m, n, p, x): u = IntHide((a + b*(F**(g*(e + f*x)))**n)**p, x) return -Dist(d*m, Int(u*(c + d*x)**(m + S(-1)), x), x) + Dist((c + d*x)**m, u, x) def replacement1914(F, a, b, g, m, n, p, u, v, x): return Int((a + b*(F**(g*ExpandToSum(v, x)))**n)**p*NormalizePowerOfLinear(u, x)**m, x) def With1915(F, a, b, g, m, n, p, u, v, x): uu = NormalizePowerOfLinear(u, x) z = Symbol('z') z = If(And(PowerQ(uu), FreeQ(Part(uu, S(2)), x)), Part(uu, S(1))**(m*Part(uu, S(2))), uu**m) z = If(And(PowerQ(uu), FreeQ(Part(uu, 2), x)), Part(uu, 1)**(m*Part(uu, 2)), uu**m) return Simp(uu**m*Int(z*(a + b*(F**(g*ExpandToSum(v, x)))**n)**p, x)/z, x) def replacement1916(F, a, b, c, d, e, f, g, m, n, p, x): return Int((a + b*(F**(g*(e + f*x)))**n)**p*(c + d*x)**m, x) def replacement1917(F, a, b, c, d, e, f, g, m, n, x): return -Dist(d*m/(b*f*g*n*log(F)), Int((c + d*x)**(m + S(-1))*log(S(1) + b*(F**(g*(e + f*x)))**n/a), x), x) + Simp((c + d*x)**m*log(S(1) + b*(F**(g*(e + f*x)))**n/a)/(b*f*g*n*log(F)), x) def replacement1918(F, a, b, c, d, e, f, g, m, n, p, x): return -Dist(d*m/(b*f*g*n*(p + S(1))*log(F)), Int((a + b*(F**(g*(e + f*x)))**n)**(p + S(1))*(c + d*x)**(m + S(-1)), x), x) + Simp((a + b*(F**(g*(e + f*x)))**n)**(p + S(1))*(c + d*x)**m/(b*f*g*n*(p + S(1))*log(F)), x) def replacement1919(F, a, b, c, d, e, f, g, m, n, p, x): return Int((a + b*(F**(g*(e + f*x)))**n)**p*(c + d*x)**m*(F**(g*(e + f*x)))**n, x) def replacement1920(F, G, a, b, c, d, e, f, g, h, i, j, k, m, n, p, q, x): return Dist((G**(j*(h + i*x))*k)**q*(F**(g*(e + f*x)))**(-n), Int((a + b*(F**(g*(e + f*x)))**n)**p*(c + d*x)**m*(F**(g*(e + f*x)))**n, x), x) def replacement1921(F, a, b, c, n, x): return Simp((F**(c*(a + b*x)))**n/(b*c*n*log(F)), x) def replacement1922(F, c, u, v, x): return Int(ExpandIntegrand(F**(c*ExpandToSum(v, x))*u, x), x) def replacement1923(F, c, u, v, x): return Int(ExpandIntegrand(F**(c*ExpandToSum(v, x)), u, x), x) def replacement1924(F, c, m, u, v, w, x): return Simp(F**(c*v)*u**(m + S(1))*Coefficient(w, x, S(1))/(c*Coefficient(u, x, S(1))*Coefficient(v, x, S(1))*log(F)), x) def replacement1925(F, c, m, u, v, w, x): return Int(ExpandIntegrand(F**(c*ExpandToSum(v, x))*w*NormalizePowerOfLinear(u, x)**m, x), x) def replacement1926(F, c, m, u, v, w, x): return Int(ExpandIntegrand(F**(c*ExpandToSum(v, x)), w*NormalizePowerOfLinear(u, x)**m, x), x) def With1927(F, c, m, u, v, w, x): uu = NormalizePowerOfLinear(u, x) z = Symbol('z') z = If(And(PowerQ(uu), FreeQ(Part(uu, S(2)), x)), Part(uu, S(1))**(m*Part(uu, S(2))), uu**m) z = If(And(PowerQ(uu), FreeQ(Part(uu, 2), x)), Part(uu, 1)**(m*Part(uu, 2)), uu**m) return Simp(uu**m*Int(ExpandIntegrand(F**(c*ExpandToSum(v, x))*w*z, x), x)/z, x) def replacement1928(F, a, b, c, d, e, f, g, h, n, x): return Simp(F**(c*(a + b*x))*e*x*log(d*x)**(n + S(1))/(n + S(1)), x) def replacement1929(F, a, b, c, d, e, f, g, h, m, n, x): return Simp(F**(c*(a + b*x))*e*x**(m + S(1))*log(d*x)**(n + S(1))/(n + S(1)), x) def replacement1930(F, a, b, c, d, x): return Simp(F**(a + b*(c + d*x))/(b*d*log(F)), x) def replacement1931(F, a, b, c, d, x): return Simp(F**a*sqrt(Pi)*Erfi((c + d*x)*Rt(b*log(F), S(2)))/(S(2)*d*Rt(b*log(F), S(2))), x) def replacement1932(F, a, b, c, d, x): return Simp(F**a*sqrt(Pi)*Erf((c + d*x)*Rt(-b*log(F), S(2)))/(S(2)*d*Rt(-b*log(F), S(2))), x) def replacement1933(F, a, b, c, d, n, x): return -Dist(b*n*log(F), Int(F**(a + b*(c + d*x)**n)*(c + d*x)**n, x), x) + Simp(F**(a + b*(c + d*x)**n)*(c + d*x)/d, x) def With1934(F, a, b, c, d, n, x): k = Denominator(n) return Dist(k/d, Subst(Int(F**(a + b*x**(k*n))*x**(k + S(-1)), x), x, (c + d*x)**(S(1)/k)), x) def replacement1935(F, a, b, c, d, n, x): return -Simp(F**a*(-b*(c + d*x)**n*log(F))**(-S(1)/n)*(c + d*x)*Gamma(S(1)/n, -b*(c + d*x)**n*log(F))/(d*n), x) def replacement1936(F, a, b, c, d, e, f, m, n, x): return Simp(F**(a + b*(c + d*x)**n)*(c + d*x)**(-n)*(e + f*x)**n/(b*f*n*log(F)), x) def replacement1937(F, a, b, c, d, e, f, n, x): return Simp(F**a*ExpIntegralEi(b*(c + d*x)**n*log(F))/(f*n), x) def replacement1938(F, a, b, c, d, m, n, x): return Dist(S(1)/(d*(m + S(1))), Subst(Int(F**(a + b*x**S(2)), x), x, (c + d*x)**(m + S(1))), x) def replacement1939(F, a, b, c, d, m, n, x): return -Dist((m - n + S(1))/(b*n*log(F)), Int(F**(a + b*(c + d*x)**n)*(c + d*x)**(m - n), x), x) + Simp(F**(a + b*(c + d*x)**n)*(c + d*x)**(m - n + S(1))/(b*d*n*log(F)), x) def replacement1940(F, a, b, c, d, m, n, x): return -Dist((m - n + S(1))/(b*n*log(F)), Int(F**(a + b*(c + d*x)**n)*(c + d*x)**(m - n), x), x) + Simp(F**(a + b*(c + d*x)**n)*(c + d*x)**(m - n + S(1))/(b*d*n*log(F)), x) def replacement1941(F, a, b, c, d, m, n, x): return -Dist(b*n*log(F)/(m + S(1)), Int(F**(a + b*(c + d*x)**n)*(c + d*x)**(m + n), x), x) + Simp(F**(a + b*(c + d*x)**n)*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement1942(F, a, b, c, d, m, n, x): return -Dist(b*n*log(F)/(m + S(1)), Int(F**(a + b*(c + d*x)**n)*(c + d*x)**(m + n), x), x) + Simp(F**(a + b*(c + d*x)**n)*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def With1943(F, a, b, c, d, m, n, x): k = Denominator(n) return Dist(k/d, Subst(Int(F**(a + b*x**(k*n))*x**(k*(m + S(1)) + S(-1)), x), x, (c + d*x)**(S(1)/k)), x) def replacement1944(F, a, b, c, d, e, f, m, n, x): return Dist((c + d*x)**(-m)*(e + f*x)**m, Int(F**(a + b*(c + d*x)**n)*(c + d*x)**m, x), x) def replacement1945(F, a, b, c, d, e, f, m, n, x): return -Simp(F**a*(-b*(c + d*x)**n*log(F))**(-(m + S(1))/n)*(e + f*x)**(m + S(1))*Gamma((m + S(1))/n, -b*(c + d*x)**n*log(F))/(f*n), x) def replacement1946(F, a, b, c, d, e, f, m, x): return Dist((-c*f + d*e)/d, Int(F**(a + b*(c + d*x)**S(2))*(e + f*x)**(m + S(-1)), x), x) - Dist(f**S(2)*(m + S(-1))/(S(2)*b*d**S(2)*log(F)), Int(F**(a + b*(c + d*x)**S(2))*(e + f*x)**(m + S(-2)), x), x) + Simp(F**(a + b*(c + d*x)**S(2))*f*(e + f*x)**(m + S(-1))/(S(2)*b*d**S(2)*log(F)), x) def replacement1947(F, a, b, c, d, e, f, m, x): return -Dist(S(2)*b*d**S(2)*log(F)/(f**S(2)*(m + S(1))), Int(F**(a + b*(c + d*x)**S(2))*(e + f*x)**(m + S(2)), x), x) + Dist(S(2)*b*d*(-c*f + d*e)*log(F)/(f**S(2)*(m + S(1))), Int(F**(a + b*(c + d*x)**S(2))*(e + f*x)**(m + S(1)), x), x) + Simp(F**(a + b*(c + d*x)**S(2))*(e + f*x)**(m + S(1))/(f*(m + S(1))), x) def replacement1948(F, a, b, c, d, e, f, m, n, x): return -Dist(b*d*n*log(F)/(f*(m + S(1))), Int(F**(a + b*(c + d*x)**n)*(c + d*x)**(n + S(-1))*(e + f*x)**(m + S(1)), x), x) + Simp(F**(a + b*(c + d*x)**n)*(e + f*x)**(m + S(1))/(f*(m + S(1))), x) def replacement1949(F, a, b, c, d, e, f, x): return Dist(d/f, Int(F**(a + b/(c + d*x))/(c + d*x), x), x) - Dist((-c*f + d*e)/f, Int(F**(a + b/(c + d*x))/((c + d*x)*(e + f*x)), x), x) def replacement1950(F, a, b, c, d, e, f, m, x): return Dist(b*d*log(F)/(f*(m + S(1))), Int(F**(a + b/(c + d*x))*(e + f*x)**(m + S(1))/(c + d*x)**S(2), x), x) + Simp(F**(a + b/(c + d*x))*(e + f*x)**(m + S(1))/(f*(m + S(1))), x) def replacement1951(F, a, b, c, d, e, f, n, x): return Int(F**(a + b*(c + d*x)**n)/(e + f*x), x) def replacement1952(F, m, u, v, x): return Int(F**ExpandToSum(v, x)*ExpandToSum(u, x)**m, x) def replacement1953(F, a, b, c, d, n, u, x): return Int(ExpandLinearProduct(F**(a + b*(c + d*x)**n), u, c, d, x), x) def replacement1954(F, a, b, u, v, x): return Int(F**(a + b*NormalizePowerOfLinear(v, x))*u, x) def replacement1955(F, a, b, c, d, e, f, g, h, x): return -Dist(d/(f*(-c*h + d*g)), Subst(Int(F**(a + b*d*x/(-c*h + d*g) - b*h/(-c*h + d*g))/x, x), x, (g + h*x)/(c + d*x)), x) def replacement1956(F, a, b, c, d, e, f, g, h, m, x): return Dist(F**(b*f/d + e), Int((g + h*x)**m, x), x) def replacement1957(F, a, b, c, d, e, f, g, h, m, x): return Int(F**(-f*(-a*d + b*c)/(d*(c + d*x)) + (b*f + d*e)/d)*(g + h*x)**m, x) def replacement1958(F, a, b, c, d, e, f, g, h, x): return Dist(d/h, Int(F**(e + f*(a + b*x)/(c + d*x))/(c + d*x), x), x) - Dist((-c*h + d*g)/h, Int(F**(e + f*(a + b*x)/(c + d*x))/((c + d*x)*(g + h*x)), x), x) def replacement1959(F, a, b, c, d, e, f, g, h, m, x): return -Dist(f*(-a*d + b*c)*log(F)/(h*(m + S(1))), Int(F**(e + f*(a + b*x)/(c + d*x))*(g + h*x)**(m + S(1))/(c + d*x)**S(2), x), x) + Simp(F**(e + f*(a + b*x)/(c + d*x))*(g + h*x)**(m + S(1))/(h*(m + S(1))), x) def replacement1960(F, a, b, c, d, e, f, g, h, i, j, x): return -Dist(d/(h*(-c*j + d*i)), Subst(Int(F**(e - f*x*(-a*d + b*c)/(-c*j + d*i) + f*(-a*j + b*i)/(-c*j + d*i))/x, x), x, (i + j*x)/(c + d*x)), x) def replacement1961(F, a, b, c, x): return Dist(F**(a - b**S(2)/(S(4)*c)), Int(F**((b + S(2)*c*x)**S(2)/(S(4)*c)), x), x) def replacement1962(F, v, x): return Int(F**ExpandToSum(v, x), x) def replacement1963(F, a, b, c, d, e, x): return Simp(F**(a + b*x + c*x**S(2))*e/(S(2)*c*log(F)), x) def replacement1964(F, a, b, c, d, e, m, x): return -Dist(e**S(2)*(m + S(-1))/(S(2)*c*log(F)), Int(F**(a + b*x + c*x**S(2))*(d + e*x)**(m + S(-2)), x), x) + Simp(F**(a + b*x + c*x**S(2))*e*(d + e*x)**(m + S(-1))/(S(2)*c*log(F)), x) def replacement1965(F, a, b, c, d, e, x): return Simp(F**(a - b**S(2)/(S(4)*c))*ExpIntegralEi((b + S(2)*c*x)**S(2)*log(F)/(S(4)*c))/(S(2)*e), x) def replacement1966(F, a, b, c, d, e, m, x): return -Dist(S(2)*c*log(F)/(e**S(2)*(m + S(1))), Int(F**(a + b*x + c*x**S(2))*(d + e*x)**(m + S(2)), x), x) + Simp(F**(a + b*x + c*x**S(2))*(d + e*x)**(m + S(1))/(e*(m + S(1))), x) def replacement1967(F, a, b, c, d, e, x): return -Dist((b*e - S(2)*c*d)/(S(2)*c), Int(F**(a + b*x + c*x**S(2)), x), x) + Simp(F**(a + b*x + c*x**S(2))*e/(S(2)*c*log(F)), x) def replacement1968(F, a, b, c, d, e, m, x): return -Dist((b*e - S(2)*c*d)/(S(2)*c), Int(F**(a + b*x + c*x**S(2))*(d + e*x)**(m + S(-1)), x), x) - Dist(e**S(2)*(m + S(-1))/(S(2)*c*log(F)), Int(F**(a + b*x + c*x**S(2))*(d + e*x)**(m + S(-2)), x), x) + Simp(F**(a + b*x + c*x**S(2))*e*(d + e*x)**(m + S(-1))/(S(2)*c*log(F)), x) def replacement1969(F, a, b, c, d, e, m, x): return -Dist(S(2)*c*log(F)/(e**S(2)*(m + S(1))), Int(F**(a + b*x + c*x**S(2))*(d + e*x)**(m + S(2)), x), x) - Dist((b*e - S(2)*c*d)*log(F)/(e**S(2)*(m + S(1))), Int(F**(a + b*x + c*x**S(2))*(d + e*x)**(m + S(1)), x), x) + Simp(F**(a + b*x + c*x**S(2))*(d + e*x)**(m + S(1))/(e*(m + S(1))), x) def replacement1970(F, a, b, c, d, e, m, x): return Int(F**(a + b*x + c*x**S(2))*(d + e*x)**m, x) def replacement1971(F, m, u, v, x): return Int(F**ExpandToSum(v, x)*ExpandToSum(u, x)**m, x) def With1972(F, a, b, c, d, e, m, n, v, x): u = IntHide(F**(e*(c + d*x))*(F**v*b + a)**n, x) return -Dist(m, Int(u*x**(m + S(-1)), x), x) + Dist(x**m, u, x) def With1973(F, G, a, b, c, d, e, f, g, h, n, x): if isinstance(x, (int, Integer, float, Float)): return False m = FullSimplify(g*h*log(G)/(d*e*log(F))) if And(RationalQ(m), GreaterEqual(Abs(m), S(1))): return True return False def replacement1973(F, G, a, b, c, d, e, f, g, h, n, x): m = FullSimplify(g*h*log(G)/(d*e*log(F))) return Dist(G**(-c*g*h/d + f*h)*Denominator(m)/(d*e*log(F)), Subst(Int(x**(Numerator(m) + S(-1))*(a + b*x**Denominator(m))**n, x), x, F**(e*(c + d*x)/Denominator(m))), x) def With1974(F, G, a, b, c, d, e, f, g, h, n, x): if isinstance(x, (int, Integer, float, Float)): return False m = FullSimplify(d*e*log(F)/(g*h*log(G))) if And(RationalQ(m), Greater(Abs(m), S(1))): return True return False def replacement1974(F, G, a, b, c, d, e, f, g, h, n, x): m = FullSimplify(d*e*log(F)/(g*h*log(G))) return Dist(Denominator(m)/(g*h*log(G)), Subst(Int(x**(Denominator(m) + S(-1))*(F**(c*e - d*e*f/g)*b*x**Numerator(m) + a)**n, x), x, G**(h*(f + g*x)/Denominator(m))), x) def replacement1975(F, G, a, b, c, d, e, f, g, h, n, x): return Int(G**(f*h)*G**(g*h*x)*(F**(c*e)*F**(d*e*x)*b + a)**n, x) def replacement1976(F, G, a, b, c, d, e, f, g, h, n, x): return Simp(G**(h*(f + g*x))*a**n*Hypergeometric2F1(-n, g*h*log(G)/(d*e*log(F)), S(1) + g*h*log(G)/(d*e*log(F)), -F**(e*(c + d*x))*b/a)/(g*h*log(G)), x) def replacement1977(F, G, a, b, c, d, e, f, g, h, n, x): return Simp(G**(h*(f + g*x))*(F**(e*(c + d*x))*b + a)**(n + S(1))*Hypergeometric2F1(S(1), n + S(1) + g*h*log(G)/(d*e*log(F)), S(1) + g*h*log(G)/(d*e*log(F)), -F**(e*(c + d*x))*b/a)/(a*g*h*log(G)), x) def replacement1978(F, G, a, b, e, h, n, u, v, x): return Int(G**(h*ExpandToSum(u, x))*(F**(e*ExpandToSum(v, x))*b + a)**n, x) def With1979(F, G, H, a, b, c, d, e, f, g, h, n, r, s, t, x): if isinstance(x, (int, Integer, float, Float)): return False m = FullSimplify((g*h*log(G) + s*t*log(H))/(d*e*log(F))) if RationalQ(m): return True return False def replacement1979(F, G, H, a, b, c, d, e, f, g, h, n, r, s, t, x): m = FullSimplify((g*h*log(G) + s*t*log(H))/(d*e*log(F))) return Dist(G**(-c*g*h/d + f*h)*H**(-c*s*t/d + r*t)*Denominator(m)/(d*e*log(F)), Subst(Int(x**(Numerator(m) + S(-1))*(a + b*x**Denominator(m))**n, x), x, F**(e*(c + d*x)/Denominator(m))), x) def replacement1980(F, G, H, a, b, c, d, e, f, g, h, n, r, s, t, x): return Dist(G**(h*(-c*g/d + f)), Int(H**(t*(r + s*x))*(b + F**(-e*(c + d*x))*a)**n, x), x) def replacement1981(F, G, H, a, b, c, d, e, f, g, h, n, r, s, t, x): return Int(G**(f*h)*G**(g*h*x)*H**(r*t)*H**(s*t*x)*(F**(c*e)*F**(d*e*x)*b + a)**n, x) def replacement1982(F, G, H, a, b, c, d, e, f, g, h, n, r, s, t, x): return Simp(G**(h*(f + g*x))*H**(t*(r + s*x))*a**n*Hypergeometric2F1(-n, (g*h*log(G) + s*t*log(H))/(d*e*log(F)), S(1) + (g*h*log(G) + s*t*log(H))/(d*e*log(F)), -F**(e*(c + d*x))*b/a)/(g*h*log(G) + s*t*log(H)), x) def replacement1983(F, G, H, a, b, c, d, e, f, g, h, n, r, s, t, x): return Simp(G**(h*(f + g*x))*H**(t*(r + s*x))*((F**(e*(c + d*x))*b + a)/a)**(-n)*(F**(e*(c + d*x))*b + a)**n*Hypergeometric2F1(-n, (g*h*log(G) + s*t*log(H))/(d*e*log(F)), S(1) + (g*h*log(G) + s*t*log(H))/(d*e*log(F)), -F**(e*(c + d*x))*b/a)/(g*h*log(G) + s*t*log(H)), x) def replacement1984(F, G, H, a, b, e, h, n, t, u, v, w, x): return Int(G**(h*ExpandToSum(u, x))*H**(t*ExpandToSum(w, x))*(F**(e*ExpandToSum(v, x))*b + a)**n, x) def replacement1985(F, a, b, c, d, e, n, p, x): return -Dist(a*n/(b*d*e*log(F)), Int(x**(n + S(-1))*(F**(e*(c + d*x))*b + a*x**n)**p, x), x) + Simp((F**(e*(c + d*x))*b + a*x**n)**(p + S(1))/(b*d*e*(p + S(1))*log(F)), x) def replacement1986(F, a, b, c, d, e, m, n, p, x): return -Dist(a*n/(b*d*e*log(F)), Int(x**(m + n + S(-1))*(F**(e*(c + d*x))*b + a*x**n)**p, x), x) - Dist(m/(b*d*e*(p + S(1))*log(F)), Int(x**(m + S(-1))*(F**(e*(c + d*x))*b + a*x**n)**(p + S(1)), x), x) + Simp(x**m*(F**(e*(c + d*x))*b + a*x**n)**(p + S(1))/(b*d*e*(p + S(1))*log(F)), x) def With1987(F, a, b, c, f, g, m, u, v, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int((f + g*x)**m/(S(2)*F**u*c + b - q), x), x) - Dist(S(2)*c/q, Int((f + g*x)**m/(S(2)*F**u*c + b + q), x), x) def With1988(F, a, b, c, f, g, m, u, v, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(F**u*(f + g*x)**m/(S(2)*F**u*c + b - q), x), x) - Dist(S(2)*c/q, Int(F**u*(f + g*x)**m/(S(2)*F**u*c + b + q), x), x) def With1989(F, a, b, c, f, g, h, i, m, u, v, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return -Dist(-i + (-b*i + S(2)*c*h)/q, Int((f + g*x)**m/(S(2)*F**u*c + b + q), x), x) + Dist(i + (-b*i + S(2)*c*h)/q, Int((f + g*x)**m/(S(2)*F**u*c + b - q), x), x) def With1990(F, a, b, c, d, m, v, x): u = IntHide(S(1)/(F**v*b + F**(c + d*x)*a), x) return -Dist(m, Int(u*x**(m + S(-1)), x), x) + Simp(u*x**m, x) def replacement1991(F, a, b, c, u, v, w, x): return Int(F**v*u/(F**(S(2)*v)*b + F**v*a + c), x) def replacement1992(F, a, b, c, d, e, g, n, x): return Int(ExpandIntegrand(F**(g*(d + e*x)**n), S(1)/(a + b*x + c*x**S(2)), x), x) def replacement1993(F, a, c, d, e, g, n, x): return Int(ExpandIntegrand(F**(g*(d + e*x)**n), S(1)/(a + c*x**S(2)), x), x) def replacement1994(F, a, b, c, d, e, g, m, n, u, x): return Int(ExpandIntegrand(F**(g*(d + e*x)**n), u**m/(a + b*x + c*x**S(2)), x), x) def replacement1995(F, a, c, d, e, g, m, n, u, x): return Int(ExpandIntegrand(F**(g*(d + e*x)**n), u**m/(a + c*x**S(2)), x), x) def replacement1996(F, a, b, x): return -Simp(sqrt(Pi)*Erf((-x**S(2)*sqrt(-b*log(F)) + sqrt(-a*log(F)))/x)*exp(-S(2)*sqrt(-a*log(F))*sqrt(-b*log(F)))/(S(4)*sqrt(-b*log(F))), x) + Simp(sqrt(Pi)*Erf((x**S(2)*sqrt(-b*log(F)) + sqrt(-a*log(F)))/x)*exp(S(2)*sqrt(-a*log(F))*sqrt(-b*log(F)))/(S(4)*sqrt(-b*log(F))), x) def replacement1997(m, n, x): return Dist(m, Int(x**(m + S(-1))*(x**m + exp(x))**n, x), x) + Int((x**m + exp(x))**(n + S(1)), x) - Simp((x**m + exp(x))**(n + S(1))/(n + S(1)), x) def replacement1998(F, a, b, c, d, e, n, x): return Dist(S(1)/(d*e*n*log(F)), Subst(Int(log(a + b*x)/x, x), x, (F**(e*(c + d*x)))**n), x) def replacement1999(F, a, b, c, d, e, n, x): return -Dist(b*d*e*n*log(F), Int(x*(F**(e*(c + d*x)))**n/(a + b*(F**(e*(c + d*x)))**n), x), x) + Simp(x*log(a + b*(F**(e*(c + d*x)))**n), x) def replacement2000(F, a, n, u, v, x): return Dist(F**(-n*v)*(F**v*a)**n, Int(F**(n*v)*u, x), x) def With2001(u, x): v = FunctionOfExponential(u, x) return Dist(v/D(v, x), Subst(Int(FunctionOfExponentialFunction(u, x)/x, x), x, v), x) def replacement2002(F, a, b, n, u, v, w, x): return Int(F**(n*v)*u*(F**ExpandToSum(-v + w, x)*b + a)**n, x) def replacement2003(F, G, a, b, n, u, v, w, x): return Int(F**(n*v)*u*(a + b*exp(ExpandToSum(-v*log(F) + w*log(G), x)))**n, x) def replacement2004(F, a, b, n, u, v, w, x): return Dist(F**(-n*v)*(F**v*a + F**w*b)**n*(F**ExpandToSum(-v + w, x)*b + a)**(-n), Int(F**(n*v)*u*(F**ExpandToSum(-v + w, x)*b + a)**n, x), x) def replacement2005(F, G, a, b, n, u, v, w, x): return Dist(F**(-n*v)*(a + b*exp(ExpandToSum(-v*log(F) + w*log(G), x)))**(-n)*(F**v*a + G**w*b)**n, Int(F**(n*v)*u*(a + b*exp(ExpandToSum(-v*log(F) + w*log(G), x)))**n, x), x) def replacement2006(F, G, u, v, w, x): return Int(u*NormalizeIntegrand(exp(v*log(F) + w*log(G)), x), x) def With2007(F, u, v, w, x, y): if isinstance(x, (int, Integer, float, Float)): return False z = v*y/(D(u, x)*log(F)) if ZeroQ(-w*y + D(z, x)): return True return False def replacement2007(F, u, v, w, x, y): z = v*y/(D(u, x)*log(F)) return Simp(F**u*z, x) def With2008(F, n, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False z = v*D(u, x)*log(F) + (n + S(1))*D(v, x) if And(Equal(Exponent(w, x), Exponent(z, x)), ZeroQ(w*Coefficient(z, x, Exponent(z, x)) - z*Coefficient(w, x, Exponent(w, x)))): return True return False def replacement2008(F, n, u, v, w, x): z = v*D(u, x)*log(F) + (n + S(1))*D(v, x) return Simp(F**u*v**(n + S(1))*Coefficient(w, x, Exponent(w, x))/Coefficient(z, x, Exponent(z, x)), x)
3ffb68394014c9daadc0f39bca66378ca786b974f263bb79bedad2a14a257303
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def linear_products(): from sympy.integrals.rubi.constraints import cons2, cons68, cons19, cons69, cons3, cons70, cons71, cons72, cons8, cons29, cons73, cons74, cons4, cons75, cons76, cons77, cons45, cons78, cons79, cons80, cons81, cons82, cons83, cons84, cons64, cons85, cons86, cons87, cons88, cons89, cons90, cons91, cons92, cons93, cons94, cons25, cons95, cons96, cons97, cons98, cons99, cons100, cons101, cons102, cons103, cons104, cons105, cons106, cons107, cons108, cons33, cons109, cons110, cons111, cons112, cons113, cons114, cons115, cons116, cons21, cons117, cons118, cons119, cons120, cons121, cons122, cons123, cons124, cons125, cons126, cons20, cons50, cons127, cons5, cons128, cons129, cons130, cons131, cons132, cons133, cons134, cons135, cons136, cons137, cons56, cons138, cons13, cons139, cons140, cons12, cons141, cons142, cons143, cons144, cons145, cons146, cons40, cons147, cons148, cons149, cons150, cons151, cons152, cons153, cons154, cons155, cons156, cons157, cons158, cons159, cons160, cons161, cons162, cons163, cons164, cons165, cons166, cons167, cons168, cons169, cons170, cons171, cons172, cons173, cons174, cons175, cons176, cons177, cons178, cons179, cons180, cons181, cons182, cons183, cons184, cons185, cons186, cons187, cons188, cons189, cons190, cons191, cons192, cons193, cons194, cons195, cons196, cons197, cons198, cons199, cons200, cons201, cons202, cons203, cons204, cons205, cons206, cons207, cons208, cons209, cons210, cons211, cons212, cons213, cons214, cons215, cons216, cons217, cons218, cons219, cons220, cons221, cons52, cons222, cons223, cons224, cons225, cons226, cons54 pattern39 = Pattern(Integral(a_, x_), cons2, cons2) rule39 = ReplacementRule(pattern39, replacement39) pattern40 = Pattern(Integral(S(1)/x_, x_)) rule40 = ReplacementRule(pattern40, replacement40) pattern41 = Pattern(Integral(x_**WC('m', S(1)), x_), cons19, cons68) rule41 = ReplacementRule(pattern41, replacement41) pattern42 = Pattern(Integral(S(1)/(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons69) rule42 = ReplacementRule(pattern42, replacement42) pattern43 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_, x_), cons2, cons3, cons19, cons68) rule43 = ReplacementRule(pattern43, replacement43) pattern44 = Pattern(Integral((u_*WC('b', S(1)) + WC('a', S(0)))**m_, x_), cons2, cons3, cons19, cons70, cons71) rule44 = ReplacementRule(pattern44, replacement44) pattern45 = Pattern(Integral(S(1)/((a_ + x_*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons72) rule45 = ReplacementRule(pattern45, replacement45) pattern46 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons73) rule46 = ReplacementRule(pattern46, replacement46) pattern47 = Pattern(Integral((c_ + x_*WC('d', S(1)))**n_*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons73, cons74, cons68) rule47 = ReplacementRule(pattern47, replacement47) pattern48 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**m_, x_), cons2, cons3, cons8, cons29, cons72, cons75) rule48 = ReplacementRule(pattern48, replacement48) pattern49 = Pattern(Integral(S(1)/((a_ + x_*WC('b', S(1)))**(S(3)/2)*(c_ + x_*WC('d', S(1)))**(S(3)/2)), x_), cons2, cons3, cons8, cons29, cons72) rule49 = ReplacementRule(pattern49, replacement49) pattern50 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**m_, x_), cons2, cons3, cons8, cons29, cons72, cons76) rule50 = ReplacementRule(pattern50, replacement50) pattern51 = Pattern(Integral((a_ + x_*WC('b', S(1)))**WC('m', S(1))*(c_ + x_*WC('d', S(1)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons72, cons77) rule51 = ReplacementRule(pattern51, replacement51) pattern52 = Pattern(Integral(S(1)/(sqrt(a_ + x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons72, cons45, cons78) rule52 = ReplacementRule(pattern52, replacement52) pattern53 = Pattern(Integral(S(1)/(sqrt(a_ + x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons72) rule53 = ReplacementRule(pattern53, replacement53) pattern54 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**m_, x_), cons2, cons3, cons8, cons29, cons19, cons72, cons79) rule54 = ReplacementRule(pattern54, replacement54) pattern55 = Pattern(Integral(S(1)/((a_ + x_*WC('b', S(1)))**(S(5)/4)*(c_ + x_*WC('d', S(1)))**(S(1)/4)), x_), cons2, cons3, cons8, cons29, cons72, cons80) rule55 = ReplacementRule(pattern55, replacement55) pattern56 = Pattern(Integral(S(1)/((a_ + x_*WC('b', S(1)))**(S(9)/4)*(c_ + x_*WC('d', S(1)))**(S(1)/4)), x_), cons2, cons3, cons8, cons29, cons72, cons80) rule56 = ReplacementRule(pattern56, replacement56) pattern57 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons2, cons3, cons8, cons29, cons72, cons81, cons82, cons83) rule57 = ReplacementRule(pattern57, replacement57) pattern58 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons2, cons3, cons8, cons29, cons72, cons81, cons82, cons84) rule58 = ReplacementRule(pattern58, replacement58) pattern59 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons73, cons64, cons85) rule59 = ReplacementRule(pattern59, replacement59) pattern60 = Pattern(Integral((a_ + x_*WC('b', S(1)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons73, cons86, cons87, cons88) rule60 = ReplacementRule(pattern60, replacement60) pattern61 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**n_/(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons73, cons89, cons90) rule61 = ReplacementRule(pattern61, replacement61) pattern62 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**n_/(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons73, cons89, cons91) rule62 = ReplacementRule(pattern62, replacement62) pattern63 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**(S(1)/3)), x_), cons2, cons3, cons8, cons29, cons92) rule63 = ReplacementRule(pattern63, With63) pattern64 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**(S(1)/3)), x_), cons2, cons3, cons8, cons29, cons93) rule64 = ReplacementRule(pattern64, With64) pattern65 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**(S(2)/3)), x_), cons2, cons3, cons8, cons29, cons92) rule65 = ReplacementRule(pattern65, With65) pattern66 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**(S(2)/3)), x_), cons2, cons3, cons8, cons29, cons93) rule66 = ReplacementRule(pattern66, With66) pattern67 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**n_/(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons73, cons89, cons94) rule67 = ReplacementRule(pattern67, With67) pattern68 = Pattern(Integral((c_ + x_*WC('d', S(1)))**n_/x_, x_), cons8, cons29, cons4, cons25) rule68 = ReplacementRule(pattern68, replacement68) pattern69 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons73, cons25) rule69 = ReplacementRule(pattern69, replacement69) pattern70 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons73, cons95, cons96, cons90, cons97, cons98, cons99) rule70 = ReplacementRule(pattern70, replacement70) pattern71 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons73, cons95, cons96, cons100, cons99) rule71 = ReplacementRule(pattern71, replacement71) pattern72 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons73, cons95, cons90, cons101, cons102, cons103, cons99) rule72 = ReplacementRule(pattern72, replacement72) pattern73 = Pattern(Integral(S(1)/(sqrt(a_ + x_*WC('b', S(1)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons104, cons105) rule73 = ReplacementRule(pattern73, replacement73) pattern74 = Pattern(Integral(S(1)/(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons106, cons107) rule74 = ReplacementRule(pattern74, replacement74) pattern75 = Pattern(Integral(S(1)/(sqrt(c_ + x_*WC('d', S(1)))*sqrt(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons73, cons108) rule75 = ReplacementRule(pattern75, replacement75) pattern76 = Pattern(Integral(S(1)/(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons73) rule76 = ReplacementRule(pattern76, replacement76) pattern77 = Pattern(Integral((c_ + x_*WC('d', S(1)))**m_*(x_*WC('b', S(1)) + WC('a', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons73, cons33, cons109, cons110) rule77 = ReplacementRule(pattern77, replacement77) pattern78 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))**(S(1)/3)*(x_*WC('d', S(1)) + WC('c', S(0)))**(S(2)/3)), x_), cons2, cons3, cons8, cons29, cons73, cons111) rule78 = ReplacementRule(pattern78, With78) pattern79 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))**(S(1)/3)*(x_*WC('d', S(1)) + WC('c', S(0)))**(S(2)/3)), x_), cons2, cons3, cons8, cons29, cons73, cons112) rule79 = ReplacementRule(pattern79, With79) pattern80 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons73, cons95, cons109, cons113) rule80 = ReplacementRule(pattern80, With80) pattern81 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons73, cons95, cons109, cons94, cons114, cons99) rule81 = ReplacementRule(pattern81, With81) pattern82 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons73, cons115, cons68, cons116) rule82 = ReplacementRule(pattern82, replacement82) pattern83 = Pattern(Integral((x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons3, cons8, cons29, cons19, cons4, cons21, cons117) rule83 = ReplacementRule(pattern83, replacement83) pattern84 = Pattern(Integral((x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons3, cons8, cons29, cons19, cons4, cons25, cons118) rule84 = ReplacementRule(pattern84, replacement84) pattern85 = Pattern(Integral((x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons3, cons8, cons29, cons19, cons4, cons21, cons25, cons119, cons120, cons121) rule85 = ReplacementRule(pattern85, replacement85) pattern86 = Pattern(Integral((x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons3, cons8, cons29, cons19, cons4, cons21, cons25, cons119, cons120) rule86 = ReplacementRule(pattern86, replacement86) pattern87 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons2, cons3, cons8, cons29, cons19, cons73, cons21, cons87) rule87 = ReplacementRule(pattern87, replacement87) pattern88 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons73, cons21, cons25, cons122, cons123) rule88 = ReplacementRule(pattern88, replacement88) pattern89 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons73, cons21, cons25, cons124) rule89 = ReplacementRule(pattern89, replacement89) pattern90 = Pattern(Integral((u_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(u_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons70, cons125) rule90 = ReplacementRule(pattern90, replacement90) pattern91 = Pattern(Integral((a_ + x_*WC('b', S(1)))**WC('m', S(1))*(c_ + x_*WC('d', S(1)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons72, cons126, cons20) rule91 = ReplacementRule(pattern91, replacement91) pattern92 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons128, cons129) rule92 = ReplacementRule(pattern92, replacement92) pattern93 = Pattern(Integral((x_*WC('d', S(1)))**WC('n', S(1))*(a_ + x_*WC('b', S(1)))*(e_ + x_*WC('f', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons130, cons131, cons132) rule93 = ReplacementRule(pattern93, replacement93) pattern94 = Pattern(Integral((x_*WC('d', S(1)))**WC('n', S(1))*(a_ + x_*WC('b', S(1)))*(e_ + x_*WC('f', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons130, cons133, cons134, cons135) rule94 = ReplacementRule(pattern94, replacement94) pattern95 = Pattern(Integral((c_ + x_*WC('d', S(1)))**WC('n', S(1))*(x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons136) rule95 = ReplacementRule(pattern95, replacement95) pattern96 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons137, cons56, cons138) rule96 = ReplacementRule(pattern96, replacement96) pattern97 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons128, cons13, cons139, cons140) rule97 = ReplacementRule(pattern97, replacement97) pattern98 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons128, cons12, cons141) rule98 = ReplacementRule(pattern98, replacement98) pattern99 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons128) rule99 = ReplacementRule(pattern99, replacement99) pattern100 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**S(2)*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons128, cons142, cons143) rule100 = ReplacementRule(pattern100, replacement100) pattern101 = Pattern(Integral((x_*WC('f', S(1)))**WC('p', S(1))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons19, cons4, cons5, cons72, cons144, cons12, cons145, cons146) rule101 = ReplacementRule(pattern101, replacement101) pattern102 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons40) rule102 = ReplacementRule(pattern102, replacement102) pattern103 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons13, cons147) rule103 = ReplacementRule(pattern103, replacement103) pattern104 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons13, cons148) rule104 = ReplacementRule(pattern104, replacement104) pattern105 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons13, cons139) rule105 = ReplacementRule(pattern105, replacement105) pattern106 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons149) rule106 = ReplacementRule(pattern106, replacement106) pattern107 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**p_/(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons150, cons151, cons139) rule107 = ReplacementRule(pattern107, replacement107) pattern108 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons152, cons153) rule108 = ReplacementRule(pattern108, replacement108) pattern109 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**S(2)*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons154) rule109 = ReplacementRule(pattern109, replacement109) pattern110 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**S(2)*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons142) rule110 = ReplacementRule(pattern110, replacement110) pattern111 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))**(S(1)/3)*(x_*WC('d', S(1)) + WC('c', S(0)))**(S(2)/3)*(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule111 = ReplacementRule(pattern111, With111) pattern112 = Pattern(Integral(S(1)/(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons156) rule112 = ReplacementRule(pattern112, replacement112) pattern113 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons157, cons95, cons109, cons158) rule113 = ReplacementRule(pattern113, With113) pattern114 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons159, cons89, cons90, cons160) rule114 = ReplacementRule(pattern114, replacement114) pattern115 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons161, cons162, cons68) rule115 = ReplacementRule(pattern115, replacement115) pattern116 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons161, cons163) rule116 = ReplacementRule(pattern116, replacement116) pattern117 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons164, cons96, cons90, cons165, cons166) rule117 = ReplacementRule(pattern117, replacement117) pattern118 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons164, cons96, cons167, cons166) rule118 = ReplacementRule(pattern118, replacement118) pattern119 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons164, cons96, cons90, cons166) rule119 = ReplacementRule(pattern119, replacement119) pattern120 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons33, cons168, cons169, cons20) rule120 = ReplacementRule(pattern120, replacement120) pattern121 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons164, cons170, cons90, cons169, cons171) rule121 = ReplacementRule(pattern121, replacement121) pattern122 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons33, cons168, cons169, cons172) rule122 = ReplacementRule(pattern122, replacement122) pattern123 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons33, cons96, cons20, cons173) rule123 = ReplacementRule(pattern123, replacement123) pattern124 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons33, cons96, cons172) rule124 = ReplacementRule(pattern124, replacement124) pattern125 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons174, cons175) rule125 = ReplacementRule(pattern125, replacement125) pattern126 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**(S(1)/4)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons176) rule126 = ReplacementRule(pattern126, replacement126) pattern127 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**(S(1)/4)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons177) rule127 = ReplacementRule(pattern127, replacement127) pattern128 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**(S(3)/4)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons176) rule128 = ReplacementRule(pattern128, replacement128) pattern129 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**(S(3)/4)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons177) rule129 = ReplacementRule(pattern129, replacement129) pattern130 = Pattern(Integral(sqrt(e_ + x_*WC('f', S(1)))/(sqrt(x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))), x_), cons3, cons8, cons29, cons50, cons127, cons178, cons179, cons180, cons181) rule130 = ReplacementRule(pattern130, replacement130) pattern131 = Pattern(Integral(sqrt(e_ + x_*WC('f', S(1)))/(sqrt(x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))), x_), cons3, cons8, cons29, cons50, cons127, cons178, cons179, cons180, cons182) rule131 = ReplacementRule(pattern131, replacement131) pattern132 = Pattern(Integral(sqrt(e_ + x_*WC('f', S(1)))/(sqrt(x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))), x_), cons3, cons8, cons29, cons50, cons127, cons178, cons183) rule132 = ReplacementRule(pattern132, replacement132) pattern133 = Pattern(Integral(sqrt(x_*WC('f', S(1)) + WC('e', S(0)))/(sqrt(a_ + x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons122, cons184, cons185, cons186) rule133 = ReplacementRule(pattern133, replacement133) pattern134 = Pattern(Integral(sqrt(x_*WC('f', S(1)) + WC('e', S(0)))/(sqrt(a_ + x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons187, cons185) rule134 = ReplacementRule(pattern134, replacement134) pattern135 = Pattern(Integral(S(1)/(sqrt(x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))*sqrt(e_ + x_*WC('f', S(1)))), x_), cons3, cons8, cons29, cons50, cons127, cons179, cons180, cons188) rule135 = ReplacementRule(pattern135, replacement135) pattern136 = Pattern(Integral(S(1)/(sqrt(x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))*sqrt(e_ + x_*WC('f', S(1)))), x_), cons3, cons8, cons29, cons50, cons127, cons179, cons180, cons189) rule136 = ReplacementRule(pattern136, replacement136) pattern137 = Pattern(Integral(S(1)/(sqrt(x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))*sqrt(e_ + x_*WC('f', S(1)))), x_), cons3, cons8, cons29, cons50, cons127, cons183) rule137 = ReplacementRule(pattern137, replacement137) pattern138 = Pattern(Integral(S(1)/(sqrt(a_ + x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))*sqrt(e_ + x_*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons122, cons184, cons158, cons190, cons191) rule138 = ReplacementRule(pattern138, replacement138) pattern139 = Pattern(Integral(S(1)/(sqrt(a_ + x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))*sqrt(e_ + x_*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons122, cons184, cons158, cons190, cons192) rule139 = ReplacementRule(pattern139, replacement139) pattern140 = Pattern(Integral(S(1)/(sqrt(a_ + x_*WC('b', S(1)))*sqrt(c_ + x_*WC('d', S(1)))*sqrt(e_ + x_*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons187, cons158, cons190) rule140 = ReplacementRule(pattern140, replacement140) pattern141 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))**(S(1)/3)*(x_*WC('f', S(1)) + WC('e', S(0)))**(S(1)/3)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons193) rule141 = ReplacementRule(pattern141, With141) pattern142 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_/((x_*WC('d', S(1)) + WC('c', S(0)))**(S(1)/3)*(x_*WC('f', S(1)) + WC('e', S(0)))**(S(1)/3)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons193, cons20, cons96) rule142 = ReplacementRule(pattern142, replacement142) pattern143 = Pattern(Integral((x_*WC('f', S(1)))**WC('p', S(1))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons19, cons4, cons5, cons72, cons126, cons45, cons179) rule143 = ReplacementRule(pattern143, replacement143) pattern144 = Pattern(Integral((x_*WC('f', S(1)))**WC('p', S(1))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons19, cons4, cons5, cons72, cons126) rule144 = ReplacementRule(pattern144, replacement144) pattern145 = Pattern(Integral((x_*WC('f', S(1)))**WC('p', S(1))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons19, cons4, cons5, cons72, cons194, cons146) rule145 = ReplacementRule(pattern145, replacement145) pattern146 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons195) rule146 = ReplacementRule(pattern146, replacement146) pattern147 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons196, cons68, cons197) rule147 = ReplacementRule(pattern147, replacement147) pattern148 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons159, cons198) rule148 = ReplacementRule(pattern148, replacement148) pattern149 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons159, cons25) rule149 = ReplacementRule(pattern149, replacement149) pattern150 = Pattern(Integral((x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_*(e_ + x_*WC('f', S(1)))**p_, x_), cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons21, cons25, cons179, cons199) rule150 = ReplacementRule(pattern150, replacement150) pattern151 = Pattern(Integral((x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_*(e_ + x_*WC('f', S(1)))**p_, x_), cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons21, cons25, cons200, cons201) rule151 = ReplacementRule(pattern151, replacement151) pattern152 = Pattern(Integral((x_*WC('b', S(1)))**m_*(c_ + x_*WC('d', S(1)))**n_*(e_ + x_*WC('f', S(1)))**p_, x_), cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons21, cons25, cons119) rule152 = ReplacementRule(pattern152, replacement152) pattern153 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons21, cons25, cons40, cons122, cons202) rule153 = ReplacementRule(pattern153, replacement153) pattern154 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons21, cons25, cons40, cons203, cons204) rule154 = ReplacementRule(pattern154, replacement154) pattern155 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons21, cons25, cons149, cons122, cons184, cons205, cons206) rule155 = ReplacementRule(pattern155, replacement155) pattern156 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons21, cons25, cons149, cons122, cons207) rule156 = ReplacementRule(pattern156, replacement156) pattern157 = Pattern(Integral((a_ + x_*WC('b', S(1)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons21, cons25, cons149, cons203, cons204, cons208) rule157 = ReplacementRule(pattern157, replacement157) pattern158 = Pattern(Integral((e_ + u_*WC('f', S(1)))**WC('p', S(1))*(u_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(u_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons70, cons71) rule158 = ReplacementRule(pattern158, replacement158) pattern159 = Pattern(Integral((e_ + x_*WC('f', S(1)))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons209) rule159 = ReplacementRule(pattern159, replacement159) pattern160 = Pattern(Integral((e_ + x_*WC('f', S(1)))*(x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons74, cons68, cons212) rule160 = ReplacementRule(pattern160, replacement160) pattern161 = Pattern(Integral((e_ + x_*WC('f', S(1)))*(x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons95, cons96, cons91) rule161 = ReplacementRule(pattern161, replacement161) pattern162 = Pattern(Integral((e_ + x_*WC('f', S(1)))*(x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons213) rule162 = ReplacementRule(pattern162, replacement162) pattern163 = Pattern(Integral((e_ + x_*WC('f', S(1)))*(x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons214, cons68, cons215) rule163 = ReplacementRule(pattern163, replacement163) pattern164 = Pattern(Integral((e_ + x_*WC('f', S(1)))*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons216, cons215) rule164 = ReplacementRule(pattern164, replacement164) pattern165 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons217) rule165 = ReplacementRule(pattern165, replacement165) pattern166 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons95, cons96, cons90, cons20) rule166 = ReplacementRule(pattern166, replacement166) pattern167 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons95, cons96, cons90, cons172) rule167 = ReplacementRule(pattern167, replacement167) pattern168 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons33, cons96, cons20) rule168 = ReplacementRule(pattern168, replacement168) pattern169 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons33, cons96, cons172) rule169 = ReplacementRule(pattern169, replacement169) pattern170 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons33, cons170, cons146, cons20) rule170 = ReplacementRule(pattern170, replacement170) pattern171 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons33, cons170, cons146, cons172) rule171 = ReplacementRule(pattern171, replacement171) pattern172 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons196, cons68, cons197) rule172 = ReplacementRule(pattern172, replacement172) pattern173 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0)))/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule173 = ReplacementRule(pattern173, replacement173) pattern174 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0)))/(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons219) rule174 = ReplacementRule(pattern174, replacement174) pattern175 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))/(sqrt(c_ + x_*WC('d', S(1)))*sqrt(e_ + x_*WC('f', S(1)))*sqrt(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons190, cons220) rule175 = ReplacementRule(pattern175, replacement175) pattern176 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons221) rule176 = ReplacementRule(pattern176, replacement176) pattern177 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0)))**q_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons52, cons13, cons147) rule177 = ReplacementRule(pattern177, replacement177) pattern178 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule178 = ReplacementRule(pattern178, replacement178) pattern179 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**n_/((x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons82) rule179 = ReplacementRule(pattern179, replacement179) pattern180 = Pattern(Integral(sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))/((x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule180 = ReplacementRule(pattern180, replacement180) pattern181 = Pattern(Integral(S(1)/(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule181 = ReplacementRule(pattern181, replacement181) pattern182 = Pattern(Integral(sqrt(x_*WC('d', S(1)) + WC('c', S(0)))/((x_*WC('b', S(1)) + WC('a', S(0)))**(S(3)/2)*sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule182 = ReplacementRule(pattern182, replacement182) pattern183 = Pattern(Integral(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))/(sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule183 = ReplacementRule(pattern183, replacement183) pattern184 = Pattern(Integral(S(1)/((x_*WC('b', S(1)) + WC('a', S(0)))**(S(3)/2)*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule184 = ReplacementRule(pattern184, replacement184) pattern185 = Pattern(Integral(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))*sqrt(x_*WC('d', S(1)) + WC('c', S(0)))/(sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule185 = ReplacementRule(pattern185, replacement185) pattern186 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**(S(3)/2)/(sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*sqrt(x_*WC('f', S(1)) + WC('e', S(0)))*sqrt(x_*WC('h', S(1)) + WC('g', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons218) rule186 = ReplacementRule(pattern186, replacement186) pattern187 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons222) rule187 = ReplacementRule(pattern187, replacement187) pattern188 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons223, cons221) rule188 = ReplacementRule(pattern188, replacement188) pattern189 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons52, cons224) rule189 = ReplacementRule(pattern189, replacement189) pattern190 = Pattern(Integral((u_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(u_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*(u_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*(u_*WC('h', S(1)) + WC('g', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons52, cons70, cons71) rule190 = ReplacementRule(pattern190, replacement190) pattern191 = Pattern(Integral(((x_*WC('b', S(1)) + WC('a', S(0)))**m_*(x_*WC('d', S(1)) + WC('c', S(0)))**n_*(x_*WC('f', S(1)) + WC('e', S(0)))**p_*(x_*WC('h', S(1)) + WC('g', S(0)))**q_*WC('i', S(1)))**r_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons19, cons4, cons5, cons52, cons54, cons225) rule191 = ReplacementRule(pattern191, replacement191) return [rule39, rule40, rule41, rule42, rule43, rule44, rule45, rule46, rule47, rule48, rule49, rule50, rule51, rule52, rule53, rule54, rule55, rule56, rule57, rule58, rule59, rule60, rule61, rule62, rule63, rule64, rule65, rule66, rule67, rule68, rule69, rule70, rule71, rule72, rule73, rule74, rule75, rule76, rule77, rule78, rule79, rule80, rule81, rule82, rule83, rule84, rule85, rule86, rule87, rule88, rule89, rule90, rule91, rule92, rule93, rule94, rule95, rule96, rule97, rule98, rule99, rule100, rule101, rule102, rule103, rule104, rule105, rule106, rule107, rule108, rule109, rule110, rule111, rule112, rule113, rule114, rule115, rule116, rule117, rule118, rule119, rule120, rule121, rule122, rule123, rule124, rule125, rule126, rule127, rule128, rule129, rule130, rule131, rule132, rule133, rule134, rule135, rule136, rule137, rule138, rule139, rule140, rule141, rule142, rule143, rule144, rule145, rule146, rule147, rule148, rule149, rule150, rule151, rule152, rule153, rule154, rule155, rule156, rule157, rule158, rule159, rule160, rule161, rule162, rule163, rule164, rule165, rule166, rule167, rule168, rule169, rule170, rule171, rule172, rule173, rule174, rule175, rule176, rule177, rule178, rule179, rule180, rule181, rule182, rule183, rule184, rule185, rule186, rule187, rule188, rule189, rule190, rule191, ] def replacement39(x): return Simp(a_*x, x) def replacement40(x): return Simp(log(x), x) def replacement41(m, x): return Simp(x**(m + S(1))/(m + S(1)), x) def replacement42(a, b, x): return Simp(log(RemoveContent(a + b*x, x))/b, x) def replacement43(a, b, m, x): return Simp((a + b*x)**(m + S(1))/(b*(m + S(1))), x) def replacement44(a, b, m, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x)**m, x), x, u), x) def replacement45(a, b, c, d, x): return Int(S(1)/(a*c + b*d*x**S(2)), x) def replacement46(a, b, c, d, x): return Dist(b/(-a*d + b*c), Int(S(1)/(a + b*x), x), x) - Dist(d/(-a*d + b*c), Int(S(1)/(c + d*x), x), x) def replacement47(a, b, c, d, m, n, x): return Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))/((m + S(1))*(-a*d + b*c)), x) def replacement48(a, b, c, d, m, x): return Dist(S(2)*a*c*m/(S(2)*m + S(1)), Int((a + b*x)**(m + S(-1))*(c + d*x)**(m + S(-1)), x), x) + Simp(x*(a + b*x)**m*(c + d*x)**m/(S(2)*m + S(1)), x) def replacement49(a, b, c, d, x): return Simp(x/(a*c*sqrt(a + b*x)*sqrt(c + d*x)), x) def replacement50(a, b, c, d, m, x): return Dist((S(2)*m + S(3))/(S(2)*a*c*(m + S(1))), Int((a + b*x)**(m + S(1))*(c + d*x)**(m + S(1)), x), x) - Simp(x*(a + b*x)**(m + S(1))*(c + d*x)**(m + S(1))/(S(2)*a*c*(m + S(1))), x) def replacement51(a, b, c, d, m, x): return Int((a*c + b*d*x**S(2))**m, x) def replacement52(a, b, c, d, x): return Simp(acosh(b*x/a)/b, x) def replacement53(a, b, c, d, x): return Dist(S(2), Subst(Int(S(1)/(b - d*x**S(2)), x), x, sqrt(a + b*x)/sqrt(c + d*x)), x) def replacement54(a, b, c, d, m, x): return Dist((a + b*x)**FracPart(m)*(c + d*x)**FracPart(m)*(a*c + b*d*x**S(2))**(-FracPart(m)), Int((a*c + b*d*x**S(2))**m, x), x) def replacement55(a, b, c, d, x): return Dist((-a*d + b*c)/(S(2)*b), Int(S(1)/((a + b*x)**(S(5)/4)*(c + d*x)**(S(5)/4)), x), x) + Simp(-S(2)/(b*(a + b*x)**(S(1)/4)*(c + d*x)**(S(1)/4)), x) def replacement56(a, b, c, d, x): return -Dist(d/(S(5)*b), Int(S(1)/((a + b*x)**(S(5)/4)*(c + d*x)**(S(5)/4)), x), x) + Simp(-S(4)/(S(5)*b*(a + b*x)**(S(5)/4)*(c + d*x)**(S(1)/4)), x) def replacement57(a, b, c, d, m, n, x): return Dist(S(2)*c*n/(m + n + S(1)), Int((a + b*x)**m*(c + d*x)**(n + S(-1)), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**n/(b*(m + n + S(1))), x) def replacement58(a, b, c, d, m, n, x): return Dist((m + n + S(2))/(S(2)*a*(m + S(1))), Int((a + b*x)**(m + S(1))*(c + d*x)**n, x), x) - Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))/(S(2)*a*d*(m + S(1))), x) def replacement59(a, b, c, d, m, n, x): return Int(ExpandIntegrand((a + b*x)**m*(c + d*x)**n, x), x) def replacement60(a, b, c, d, m, n, x): return Int(ExpandIntegrand((a + b*x)**m*(c + d*x)**n, x), x) def replacement61(a, b, c, d, n, x): return Dist((-a*d + b*c)/b, Int((c + d*x)**(n + S(-1))/(a + b*x), x), x) + Simp((c + d*x)**n/(b*n), x) def replacement62(a, b, c, d, n, x): return Dist(b/(-a*d + b*c), Int((c + d*x)**(n + S(1))/(a + b*x), x), x) - Simp((c + d*x)**(n + S(1))/((n + S(1))*(-a*d + b*c)), x) def With63(a, b, c, d, x): q = Rt((-a*d + b*c)/b, S(3)) return Dist(S(3)/(S(2)*b), Subst(Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x, (c + d*x)**(S(1)/3)), x) - Dist(S(3)/(S(2)*b*q), Subst(Int(S(1)/(q - x), x), x, (c + d*x)**(S(1)/3)), x) - Simp(log(RemoveContent(a + b*x, x))/(S(2)*b*q), x) def With64(a, b, c, d, x): q = Rt(-(-a*d + b*c)/b, S(3)) return Dist(S(3)/(S(2)*b), Subst(Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x, (c + d*x)**(S(1)/3)), x) - Dist(S(3)/(S(2)*b*q), Subst(Int(S(1)/(q + x), x), x, (c + d*x)**(S(1)/3)), x) + Simp(log(RemoveContent(a + b*x, x))/(S(2)*b*q), x) def With65(a, b, c, d, x): q = Rt((-a*d + b*c)/b, S(3)) return -Dist(S(3)/(S(2)*b*q**S(2)), Subst(Int(S(1)/(q - x), x), x, (c + d*x)**(S(1)/3)), x) - Dist(S(3)/(S(2)*b*q), Subst(Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x, (c + d*x)**(S(1)/3)), x) - Simp(log(RemoveContent(a + b*x, x))/(S(2)*b*q**S(2)), x) def With66(a, b, c, d, x): q = Rt(-(-a*d + b*c)/b, S(3)) return Dist(S(3)/(S(2)*b*q**S(2)), Subst(Int(S(1)/(q + x), x), x, (c + d*x)**(S(1)/3)), x) + Dist(S(3)/(S(2)*b*q), Subst(Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x, (c + d*x)**(S(1)/3)), x) - Simp(log(RemoveContent(a + b*x, x))/(S(2)*b*q**S(2)), x) def With67(a, b, c, d, n, x): p = Denominator(n) return Dist(p, Subst(Int(x**(p*(n + S(1)) + S(-1))/(a*d - b*c + b*x**p), x), x, (c + d*x)**(S(1)/p)), x) def replacement68(c, d, n, x): return -Simp((c + d*x)**(n + S(1))*Hypergeometric2F1(S(1), n + S(1), n + S(2), S(1) + d*x/c)/(c*(n + S(1))), x) def replacement69(a, b, c, d, n, x): return -Simp((c + d*x)**(n + S(1))*Hypergeometric2F1(S(1), n + S(1), n + S(2), TogetherSimplify(b*(c + d*x)/(-a*d + b*c)))/((n + S(1))*(-a*d + b*c)), x) def replacement70(a, b, c, d, m, n, x): return -Dist(d*n/(b*(m + S(1))), Int((a + b*x)**(m + S(1))*(c + d*x)**(n + S(-1)), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**n/(b*(m + S(1))), x) def replacement71(a, b, c, d, m, n, x): return -Dist(d*(m + n + S(2))/((m + S(1))*(-a*d + b*c)), Int((a + b*x)**(m + S(1))*(c + d*x)**n, x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))/((m + S(1))*(-a*d + b*c)), x) def replacement72(a, b, c, d, m, n, x): return Dist(n*(-a*d + b*c)/(b*(m + n + S(1))), Int((a + b*x)**m*(c + d*x)**(n + S(-1)), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**n/(b*(m + n + S(1))), x) def replacement73(a, b, c, d, x): return Int(S(1)/sqrt(a*c - b**S(2)*x**S(2) - b*x*(a - c)), x) def replacement74(a, b, c, d, x): return Dist(S(2)/sqrt(b), Subst(Int(S(1)/sqrt(-a*d + b*c + d*x**S(2)), x), x, sqrt(a + b*x)), x) def replacement75(a, b, c, d, x): return Dist(S(2)/b, Subst(Int(S(1)/sqrt(-a + c + x**S(2)), x), x, sqrt(a + b*x)), x) def replacement76(a, b, c, d, x): return Dist(S(2), Subst(Int(S(1)/(b - d*x**S(2)), x), x, sqrt(a + b*x)/sqrt(c + d*x)), x) def replacement77(a, b, c, d, m, x): return Dist((a + b*x)**m*(c + d*x)**m*(a*c + b*d*x**S(2) + x*(a*d + b*c))**(-m), Int((a*c + b*d*x**S(2) + x*(a*d + b*c))**m, x), x) def With78(a, b, c, d, x): q = Rt(d/b, S(3)) return -Simp(q*log(c + d*x)/(S(2)*d), x) - Simp(S(3)*q*log(q*(a + b*x)**(S(1)/3)/(c + d*x)**(S(1)/3) + S(-1))/(S(2)*d), x) - Simp(sqrt(S(3))*q*ArcTan(S(2)*sqrt(S(3))*q*(a + b*x)**(S(1)/3)/(S(3)*(c + d*x)**(S(1)/3)) + sqrt(S(3))/S(3))/d, x) def With79(a, b, c, d, x): q = Rt(-d/b, S(3)) return Simp(q*log(c + d*x)/(S(2)*d), x) + Simp(S(3)*q*log(q*(a + b*x)**(S(1)/3)/(c + d*x)**(S(1)/3) + S(1))/(S(2)*d), x) + Simp(sqrt(S(3))*q*ArcTan(-S(2)*sqrt(S(3))*q*(a + b*x)**(S(1)/3)/(S(3)*(c + d*x)**(S(1)/3)) + sqrt(S(3))/S(3))/d, x) def With80(a, b, c, d, m, n, x): p = Denominator(m) return Dist(p, Subst(Int(x**(p*(m + S(1)) + S(-1))/(b - d*x**p), x), x, (a + b*x)**(S(1)/p)*(c + d*x)**(-S(1)/p)), x) def With81(a, b, c, d, m, n, x): p = Denominator(m) return Dist(p/b, Subst(Int(x**(p*(m + S(1)) + S(-1))*(-a*d/b + c + d*x**p/b)**n, x), x, (a + b*x)**(S(1)/p)), x) def replacement82(a, b, c, d, m, n, x): return -Dist(d*(m + n + S(2))/((m + S(1))*(-a*d + b*c)), Int((a + b*x)**(m + S(1))*(c + d*x)**n, x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))/((m + S(1))*(-a*d + b*c)), x) def replacement83(b, c, d, m, n, x): return Simp(c**n*(b*x)**(m + S(1))*Hypergeometric2F1(-n, m + S(1), m + S(2), -d*x/c)/(b*(m + S(1))), x) def replacement84(b, c, d, m, n, x): return Simp((-d/(b*c))**(-m)*(c + d*x)**(n + S(1))*Hypergeometric2F1(-m, n + S(1), n + S(2), S(1) + d*x/c)/(d*(n + S(1))), x) def replacement85(b, c, d, m, n, x): return Dist(c**IntPart(n)*(S(1) + d*x/c)**(-FracPart(n))*(c + d*x)**FracPart(n), Int((b*x)**m*(S(1) + d*x/c)**n, x), x) def replacement86(b, c, d, m, n, x): return Dist((b*x)**FracPart(m)*(-b*c/d)**IntPart(m)*(-d*x/c)**(-FracPart(m)), Int((-d*x/c)**m*(c + d*x)**n, x), x) def replacement87(a, b, c, d, m, n, x): return Simp(b**(-n + S(-1))*(a + b*x)**(m + S(1))*(-a*d + b*c)**n*Hypergeometric2F1(-n, m + S(1), m + S(2), -d*(a + b*x)/(-a*d + b*c))/(m + S(1)), x) def replacement88(a, b, c, d, m, n, x): return Simp((b/(-a*d + b*c))**(-n)*(a + b*x)**(m + S(1))*Hypergeometric2F1(-n, m + S(1), m + S(2), -d*(a + b*x)/(-a*d + b*c))/(b*(m + S(1))), x) def replacement89(a, b, c, d, m, n, x): return Dist((b/(-a*d + b*c))**(-IntPart(n))*(b*(c + d*x)/(-a*d + b*c))**(-FracPart(n))*(c + d*x)**FracPart(n), Int((a + b*x)**m*(b*c/(-a*d + b*c) + b*d*x/(-a*d + b*c))**n, x), x) def replacement90(a, b, c, d, m, n, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x)**m*(c + d*x)**n, x), x, u), x) def replacement91(a, b, c, d, e, f, m, n, p, x): return Int((e + f*x)**p*(a*c + b*d*x**S(2))**m, x) def replacement92(a, b, c, d, e, f, n, p, x): return Simp(b*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/(d*f*(n + p + S(2))), x) def replacement93(a, b, d, e, f, n, p, x): return Int(ExpandIntegrand((d*x)**n*(a + b*x)*(e + f*x)**p, x), x) def replacement94(a, b, d, e, f, n, p, x): return Int(ExpandIntegrand((d*x)**n*(a + b*x)*(e + f*x)**p, x), x) def replacement95(a, b, c, d, e, f, n, p, x): return Int(ExpandIntegrand((a + b*x)*(c + d*x)**n*(e + f*x)**p, x), x) def replacement96(a, b, c, d, e, f, n, p, x): return Dist(b/f, Int((c + d*x)**n*(e + f*x)**(p + S(1)), x), x) - Simp((c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))*(-a*f + b*e)/(f*(p + S(1))*(c*f - d*e)), x) def replacement97(a, b, c, d, e, f, n, p, x): return -Dist((a*d*f*(n + p + S(2)) - b*(c*f*(p + S(1)) + d*e*(n + S(1))))/(f*(p + S(1))*(c*f - d*e)), Int((c + d*x)**n*(e + f*x)**(p + S(1)), x), x) - Simp((c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))*(-a*f + b*e)/(f*(p + S(1))*(c*f - d*e)), x) def replacement98(a, b, c, d, e, f, n, p, x): return -Dist((a*d*f*(n + p + S(2)) - b*(c*f*(p + S(1)) + d*e*(n + S(1))))/(f*(p + S(1))*(c*f - d*e)), Int((c + d*x)**n*(e + f*x)**(p + S(1)), x), x) - Simp((c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))*(-a*f + b*e)/(f*(p + S(1))*(c*f - d*e)), x) def replacement99(a, b, c, d, e, f, n, p, x): return Dist((a*d*f*(n + p + S(2)) - b*(c*f*(p + S(1)) + d*e*(n + S(1))))/(d*f*(n + p + S(2))), Int((c + d*x)**n*(e + f*x)**p, x), x) + Simp(b*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/(d*f*(n + p + S(2))), x) def replacement100(a, b, c, d, e, f, n, p, x): return Simp(b*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))*(S(2)*a*d*f*(n + p + S(3)) + b*d*f*x*(n + p + S(2)) - b*(c*f*(p + S(2)) + d*e*(n + S(2))))/(d**S(2)*f**S(2)*(n + p + S(2))*(n + p + S(3))), x) def replacement101(a, b, c, d, f, m, n, p, x): return Dist(a, Int((f*x)**p*(a + b*x)**n*(c + d*x)**n, x), x) + Dist(b/f, Int((f*x)**(p + S(1))*(a + b*x)**n*(c + d*x)**n, x), x) def replacement102(a, b, c, d, e, f, p, x): return Int(ExpandIntegrand((e + f*x)**p/((a + b*x)*(c + d*x)), x), x) def replacement103(a, b, c, d, e, f, p, x): return Dist((-a*f + b*e)/(-a*d + b*c), Int((e + f*x)**(p + S(-1))/(a + b*x), x), x) - Dist((-c*f + d*e)/(-a*d + b*c), Int((e + f*x)**(p + S(-1))/(c + d*x), x), x) def replacement104(a, b, c, d, e, f, p, x): return Dist(S(1)/(b*d), Int((e + f*x)**(p + S(-2))*(-a*c*f**S(2) + b*d*e**S(2) + f*x*(-a*d*f - b*c*f + S(2)*b*d*e))/((a + b*x)*(c + d*x)), x), x) + Simp(f*(e + f*x)**(p + S(-1))/(b*d*(p + S(-1))), x) def replacement105(a, b, c, d, e, f, p, x): return Dist(S(1)/((-a*f + b*e)*(-c*f + d*e)), Int((e + f*x)**(p + S(1))*(-a*d*f - b*c*f + b*d*e - b*d*f*x)/((a + b*x)*(c + d*x)), x), x) + Simp(f*(e + f*x)**(p + S(1))/((p + S(1))*(-a*f + b*e)*(-c*f + d*e)), x) def replacement106(a, b, c, d, e, f, p, x): return Dist(b/(-a*d + b*c), Int((e + f*x)**p/(a + b*x), x), x) - Dist(d/(-a*d + b*c), Int((e + f*x)**p/(c + d*x), x), x) def replacement107(a, b, c, d, e, f, n, p, x): return Int(ExpandIntegrand((e + f*x)**FractionalPart(p), (c + d*x)**n*(e + f*x)**IntegerPart(p)/(a + b*x), x), x) def replacement108(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*x)**m*(c + d*x)**n*(e + f*x)**p, x), x) def replacement109(a, b, c, d, e, f, n, p, x): return -Dist(S(1)/(d**S(2)*(n + S(1))*(-c*f + d*e)), Int((c + d*x)**(n + S(1))*(e + f*x)**p*Simp(a**S(2)*d**S(2)*f*(n + p + S(2)) - S(2)*a*b*d*(c*f*(p + S(1)) + d*e*(n + S(1))) + b**S(2)*c*(c*f*(p + S(1)) + d*e*(n + S(1))) - b**S(2)*d*x*(n + S(1))*(-c*f + d*e), x), x), x) + Simp((c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))*(-a*d + b*c)**S(2)/(d**S(2)*(n + S(1))*(-c*f + d*e)), x) def replacement110(a, b, c, d, e, f, n, p, x): return Dist(S(1)/(d*f*(n + p + S(3))), Int((c + d*x)**n*(e + f*x)**p*Simp(a**S(2)*d*f*(n + p + S(3)) + b*x*(a*d*f*(n + p + S(4)) - b*(c*f*(p + S(2)) + d*e*(n + S(2)))) - b*(a*(c*f*(p + S(1)) + d*e*(n + S(1))) + b*c*e), x), x), x) + Simp(b*(a + b*x)*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/(d*f*(n + p + S(3))), x) def With111(a, b, c, d, e, f, x): q = Rt((-c*f + d*e)/(-a*f + b*e), S(3)) return Simp(q*log(e + f*x)/(-S(2)*c*f + S(2)*d*e), x) - Simp(S(3)*q*log(q*(a + b*x)**(S(1)/3) - (c + d*x)**(S(1)/3))/(-S(2)*c*f + S(2)*d*e), x) - Simp(sqrt(S(3))*q*ArcTan(S(2)*sqrt(S(3))*q*(a + b*x)**(S(1)/3)/(S(3)*(c + d*x)**(S(1)/3)) + sqrt(S(3))/S(3))/(-c*f + d*e), x) def replacement112(a, b, c, d, e, f, x): return Dist(b*f, Subst(Int(S(1)/(b*f**S(2)*x**S(2) + d*(-a*f + b*e)**S(2)), x), x, sqrt(a + b*x)*sqrt(c + d*x)), x) def With113(a, b, c, d, e, f, m, n, x): q = Denominator(m) return Dist(q, Subst(Int(x**(q*(m + S(1)) + S(-1))/(-a*f + b*e - x**q*(-c*f + d*e)), x), x, (a + b*x)**(S(1)/q)*(c + d*x)**(-S(1)/q)), x) def replacement114(a, b, c, d, e, f, m, n, p, x): return -Dist(n*(-c*f + d*e)/((m + S(1))*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**(n + S(-1))*(e + f*x)**p, x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**(p + S(1))/((m + S(1))*(-a*f + b*e)), x) def replacement115(a, b, c, d, e, f, m, n, p, x): return Simp(b*(a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement116(a, b, c, d, e, f, m, n, p, x): return Dist((a*d*f*(m + S(1)) + b*c*f*(n + S(1)) + b*d*e*(p + S(1)))/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p, x), x) + Simp(b*(a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement117(a, b, c, d, e, f, m, n, p, x): return -Dist(S(1)/(b*(m + S(1))), Int((a + b*x)**(m + S(1))*(c + d*x)**(n + S(-1))*(e + f*x)**(p + S(-1))*Simp(c*f*p + d*e*n + d*f*x*(n + p), x), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p/(b*(m + S(1))), x) def replacement118(a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/(b*(m + S(1))*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**(n + S(-2))*(e + f*x)**p*Simp(a*d*(c*f*(p + S(1)) + d*e*(n + S(-1))) + b*c*(-c*f*(m + p + S(2)) + d*e*(m - n + S(2))) + d*x*(a*d*f*(n + p) + b*(-c*f*(m + n + p + S(1)) + d*e*(m + S(1)))), x), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(-1))*(e + f*x)**(p + S(1))*(-a*d + b*c)/(b*(m + S(1))*(-a*f + b*e)), x) def replacement119(a, b, c, d, e, f, m, n, p, x): return -Dist(S(1)/((m + S(1))*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**(n + S(-1))*(e + f*x)**p*Simp(c*f*(m + p + S(2)) + d*e*n + d*f*x*(m + n + p + S(2)), x), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**(p + S(1))/((m + S(1))*(-a*f + b*e)), x) def replacement120(a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/(d*f*(m + n + p + S(1))), Int((a + b*x)**(m + S(-2))*(c + d*x)**n*(e + f*x)**p*Simp(a**S(2)*d*f*(m + n + p + S(1)) + b*x*(a*d*f*(S(2)*m + n + p) - b*(c*f*(m + p) + d*e*(m + n))) - b*(a*(c*f*(p + S(1)) + d*e*(n + S(1))) + b*c*e*(m + S(-1))), x), x), x) + Simp(b*(a + b*x)**(m + S(-1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/(d*f*(m + n + p + S(1))), x) def replacement121(a, b, c, d, e, f, m, n, p, x): return -Dist(S(1)/(f*(m + n + p + S(1))), Int((a + b*x)**(m + S(-1))*(c + d*x)**(n + S(-1))*(e + f*x)**p*Simp(a*n*(-c*f + d*e) + c*m*(-a*f + b*e) + x*(b*n*(-c*f + d*e) + d*m*(-a*f + b*e)), x), x), x) + Simp((a + b*x)**m*(c + d*x)**n*(e + f*x)**(p + S(1))/(f*(m + n + p + S(1))), x) def replacement122(a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/(d*f*(m + n + p + S(1))), Int((a + b*x)**(m + S(-2))*(c + d*x)**n*(e + f*x)**p*Simp(a**S(2)*d*f*(m + n + p + S(1)) + b*x*(a*d*f*(S(2)*m + n + p) - b*(c*f*(m + p) + d*e*(m + n))) - b*(a*(c*f*(p + S(1)) + d*e*(n + S(1))) + b*c*e*(m + S(-1))), x), x), x) + Simp(b*(a + b*x)**(m + S(-1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/(d*f*(m + n + p + S(1))), x) def replacement123(a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p*Simp(a*d*f*(m + S(1)) - b*d*f*x*(m + n + p + S(3)) - b*(c*f*(m + p + S(2)) + d*e*(m + n + S(2))), x), x), x) + Simp(b*(a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement124(a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p*Simp(a*d*f*(m + S(1)) - b*d*f*x*(m + n + p + S(3)) - b*(c*f*(m + p + S(2)) + d*e*(m + n + S(2))), x), x), x) + Simp(b*(a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement125(a, b, c, d, e, f, m, n, x): return Dist(b/f, Int((a + b*x)**(m + S(-1))*(c + d*x)**n, x), x) - Dist((-a*f + b*e)/f, Int((a + b*x)**(m + S(-1))*(c + d*x)**n/(e + f*x), x), x) def replacement126(a, b, c, d, e, f, x): return Dist(S(-4), Subst(Int(x**S(2)/(sqrt(c - d*e/f + d*x**S(4)/f)*(-a*f + b*e - b*x**S(4))), x), x, (e + f*x)**(S(1)/4)), x) def replacement127(a, b, c, d, e, f, x): return Dist(sqrt(-f*(c + d*x)/(-c*f + d*e))/sqrt(c + d*x), Int(S(1)/((a + b*x)*(e + f*x)**(S(1)/4)*sqrt(-c*f/(-c*f + d*e) - d*f*x/(-c*f + d*e))), x), x) def replacement128(a, b, c, d, e, f, x): return Dist(S(-4), Subst(Int(S(1)/(sqrt(c - d*e/f + d*x**S(4)/f)*(-a*f + b*e - b*x**S(4))), x), x, (e + f*x)**(S(1)/4)), x) def replacement129(a, b, c, d, e, f, x): return Dist(sqrt(-f*(c + d*x)/(-c*f + d*e))/sqrt(c + d*x), Int(S(1)/((a + b*x)*(e + f*x)**(S(3)/4)*sqrt(-c*f/(-c*f + d*e) - d*f*x/(-c*f + d*e))), x), x) def replacement130(b, c, d, e, f, x): return Simp(S(2)*sqrt(e)*EllipticE(asin(sqrt(b*x)/(sqrt(c)*Rt(-b/d, S(2)))), c*f/(d*e))*Rt(-b/d, S(2))/b, x) def replacement131(b, c, d, e, f, x): return Dist(sqrt(-b*x)/sqrt(b*x), Int(sqrt(e + f*x)/(sqrt(-b*x)*sqrt(c + d*x)), x), x) def replacement132(b, c, d, e, f, x): return Dist(sqrt(S(1) + d*x/c)*sqrt(e + f*x)/(sqrt(S(1) + f*x/e)*sqrt(c + d*x)), Int(sqrt(S(1) + f*x/e)/(sqrt(b*x)*sqrt(S(1) + d*x/c)), x), x) def replacement133(a, b, c, d, e, f, x): return Simp(S(2)*EllipticE(asin(sqrt(a + b*x)/Rt(-(-a*d + b*c)/d, S(2))), f*(-a*d + b*c)/(d*(-a*f + b*e)))*Rt(-(-a*f + b*e)/d, S(2))/b, x) def replacement134(a, b, c, d, e, f, x): return Dist(sqrt(b*(c + d*x)/(-a*d + b*c))*sqrt(e + f*x)/(sqrt(b*(e + f*x)/(-a*f + b*e))*sqrt(c + d*x)), Int(sqrt(b*e/(-a*f + b*e) + b*f*x/(-a*f + b*e))/(sqrt(a + b*x)*sqrt(b*c/(-a*d + b*c) + b*d*x/(-a*d + b*c))), x), x) def replacement135(b, c, d, e, f, x): return Simp(S(2)*EllipticF(asin(sqrt(b*x)/(sqrt(c)*Rt(-b/d, S(2)))), c*f/(d*e))*Rt(-b/d, S(2))/(b*sqrt(e)), x) def replacement136(b, c, d, e, f, x): return Simp(S(2)*EllipticF(asin(sqrt(b*x)/(sqrt(c)*Rt(-b/d, S(2)))), c*f/(d*e))*Rt(-b/d, S(2))/(b*sqrt(e)), x) def replacement137(b, c, d, e, f, x): return Dist(sqrt(S(1) + d*x/c)*sqrt(S(1) + f*x/e)/(sqrt(c + d*x)*sqrt(e + f*x)), Int(S(1)/(sqrt(b*x)*sqrt(S(1) + d*x/c)*sqrt(S(1) + f*x/e)), x), x) def replacement138(a, b, c, d, e, f, x): return Simp(S(2)*sqrt(b**S(2)/((-a*d + b*c)*(-a*f + b*e)))*EllipticF(asin(sqrt(a + b*x)/Rt(-(-a*d + b*c)/d, S(2))), f*(-a*d + b*c)/(d*(-a*f + b*e)))*Rt(-(-a*d + b*c)/d, S(2))/b, x) def replacement139(a, b, c, d, e, f, x): return Simp(S(2)*sqrt(b**S(2)/((-a*d + b*c)*(-a*f + b*e)))*EllipticF(asin(sqrt(a + b*x)/Rt(-(-a*d + b*c)/d, S(2))), f*(-a*d + b*c)/(d*(-a*f + b*e)))*Rt(-(-a*d + b*c)/d, S(2))/b, x) def replacement140(a, b, c, d, e, f, x): return Dist(sqrt(b*(c + d*x)/(-a*d + b*c))*sqrt(b*(e + f*x)/(-a*f + b*e))/(sqrt(c + d*x)*sqrt(e + f*x)), Int(S(1)/(sqrt(a + b*x)*sqrt(b*c/(-a*d + b*c) + b*d*x/(-a*d + b*c))*sqrt(b*e/(-a*f + b*e) + b*f*x/(-a*f + b*e))), x), x) def With141(a, b, c, d, e, f, x): q = Rt(b*(-a*f + b*e)/(-a*d + b*c)**S(2), S(3)) return -Simp(log(a + b*x)/(S(2)*q*(-a*d + b*c)), x) + Simp(S(3)*log(q*(c + d*x)**(S(2)/3) - (e + f*x)**(S(1)/3))/(S(4)*q*(-a*d + b*c)), x) - Simp(sqrt(S(3))*ArcTan(S(2)*sqrt(S(3))*q*(c + d*x)**(S(2)/3)/(S(3)*(e + f*x)**(S(1)/3)) + sqrt(S(3))/S(3))/(S(2)*q*(-a*d + b*c)), x) def replacement142(a, b, c, d, e, f, m, x): return Dist(f/(S(6)*(m + S(1))*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(a*d*(S(3)*m + S(1)) - S(3)*b*c*(S(3)*m + S(5)) - S(2)*b*d*x*(S(3)*m + S(7)))/((c + d*x)**(S(1)/3)*(e + f*x)**(S(1)/3)), x), x) + Simp(b*(a + b*x)**(m + S(1))*(c + d*x)**(S(2)/3)*(e + f*x)**(S(2)/3)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement143(a, b, c, d, f, m, n, p, x): return Int((f*x)**p*(a*c + b*d*x**S(2))**m, x) def replacement144(a, b, c, d, f, m, n, p, x): return Dist((a + b*x)**FracPart(m)*(c + d*x)**FracPart(m)*(a*c + b*d*x**S(2))**(-FracPart(m)), Int((f*x)**p*(a*c + b*d*x**S(2))**m, x), x) def replacement145(a, b, c, d, f, m, n, p, x): return Int(ExpandIntegrand((f*x)**p*(a + b*x)**n*(c + d*x)**n, (a + b*x)**(m - n), x), x) def replacement146(a, b, c, d, e, f, m, n, p, x): return Int(ExpandIntegrand((a + b*x)**m*(c + d*x)**n*(e + f*x)**p, x), x) def replacement147(a, b, c, d, e, f, m, n, p, x): return Dist(S(1)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p*Simp(a*d*f*(m + S(1)) - b*d*f*x*(m + n + p + S(3)) - b*(c*f*(m + p + S(2)) + d*e*(m + n + S(2))), x), x), x) + Simp(b*(a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement148(a, b, c, d, e, f, m, n, p, x): return Simp((a + b*x)**(m + S(1))*(e + f*x)**(-m + S(-1))*(-a*d + b*c)**n*(-a*f + b*e)**(-n + S(-1))*Hypergeometric2F1(m + S(1), -n, m + S(2), -(a + b*x)*(-c*f + d*e)/((e + f*x)*(-a*d + b*c)))/(m + S(1)), x) def replacement149(a, b, c, d, e, f, m, n, p, x): return Simp(((c + d*x)*(-a*f + b*e)/((e + f*x)*(-a*d + b*c)))**(-n)*(a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**(p + S(1))*Hypergeometric2F1(m + S(1), -n, m + S(2), -(a + b*x)*(-c*f + d*e)/((e + f*x)*(-a*d + b*c)))/((m + S(1))*(-a*f + b*e)), x) def replacement150(b, c, d, e, f, m, n, p, x): return Simp(c**n*e**p*(b*x)**(m + S(1))*AppellF1(m + S(1), -n, -p, m + S(2), -d*x/c, -f*x/e)/(b*(m + S(1))), x) def replacement151(b, c, d, e, f, m, n, p, x): return Simp((d/(-c*f + d*e))**(-p)*(-d/(b*c))**(-m)*(c + d*x)**(n + S(1))*AppellF1(n + S(1), -m, -p, n + S(2), S(1) + d*x/c, -f*(c + d*x)/(-c*f + d*e))/(d*(n + S(1))), x) def replacement152(b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(S(1) + d*x/c)**(-FracPart(n))*(c + d*x)**FracPart(n), Int((b*x)**m*(S(1) + d*x/c)**n*(e + f*x)**p, x), x) def replacement153(a, b, c, d, e, f, m, n, p, x): return Simp(b**(-p + S(-1))*(b/(-a*d + b*c))**(-n)*(a + b*x)**(m + S(1))*(-a*f + b*e)**p*AppellF1(m + S(1), -n, -p, m + S(2), -d*(a + b*x)/(-a*d + b*c), -f*(a + b*x)/(-a*f + b*e))/(m + S(1)), x) def replacement154(a, b, c, d, e, f, m, n, p, x): return Dist((b/(-a*d + b*c))**(-IntPart(n))*(b*(c + d*x)/(-a*d + b*c))**(-FracPart(n))*(c + d*x)**FracPart(n), Int((a + b*x)**m*(e + f*x)**p*(b*c/(-a*d + b*c) + b*d*x/(-a*d + b*c))**n, x), x) def replacement155(a, b, c, d, e, f, m, n, p, x): return Simp((b/(-a*d + b*c))**(-n)*(b/(-a*f + b*e))**(-p)*(a + b*x)**(m + S(1))*AppellF1(m + S(1), -n, -p, m + S(2), -d*(a + b*x)/(-a*d + b*c), -f*(a + b*x)/(-a*f + b*e))/(b*(m + S(1))), x) def replacement156(a, b, c, d, e, f, m, n, p, x): return Dist((b/(-a*f + b*e))**(-IntPart(p))*(b*(e + f*x)/(-a*f + b*e))**(-FracPart(p))*(e + f*x)**FracPart(p), Int((a + b*x)**m*(c + d*x)**n*(b*e/(-a*f + b*e) + b*f*x/(-a*f + b*e))**p, x), x) def replacement157(a, b, c, d, e, f, m, n, p, x): return Dist((b/(-a*d + b*c))**(-IntPart(n))*(b*(c + d*x)/(-a*d + b*c))**(-FracPart(n))*(c + d*x)**FracPart(n), Int((a + b*x)**m*(e + f*x)**p*(b*c/(-a*d + b*c) + b*d*x/(-a*d + b*c))**n, x), x) def replacement158(a, b, c, d, e, f, m, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p, x), x, u), x) def replacement159(a, b, c, d, e, f, g, h, m, n, x): return Int(ExpandIntegrand((a + b*x)**m*(c + d*x)**n*(e + f*x)*(g + h*x), x), x) def replacement160(a, b, c, d, e, f, g, h, m, n, x): return Dist((a*d*f*h*m + b*(-c*f*h*(m + S(2)) + d*(e*h + f*g)))/(b**S(2)*d), Int((a + b*x)**(m + S(1))*(c + d*x)**n, x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(-a**S(2)*d*f*h*m - a*b*(-c*f*h*(m + S(1)) + d*(e*h + f*g)) + b**S(2)*d*e*g + b*f*h*x*(m + S(1))*(-a*d + b*c))/(b**S(2)*d*(m + S(1))*(-a*d + b*c)), x) def replacement161(a, b, c, d, e, f, g, h, m, n, x): return -Dist((a**S(2)*d**S(2)*f*h*(n**S(2) + S(3)*n + S(2)) + a*b*d*(n + S(1))*(S(2)*c*f*h*(m + S(1)) - d*(e*h + f*g)*(m + n + S(3))) + b**S(2)*(c**S(2)*f*h*(m**S(2) + S(3)*m + S(2)) - c*d*(m + S(1))*(e*h + f*g)*(m + n + S(3)) + d**S(2)*e*g*(m**S(2) + m*(S(2)*n + S(5)) + n**S(2) + S(5)*n + S(6))))/(b*d*(m + S(1))*(n + S(1))*(-a*d + b*c)**S(2)), Int((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1)), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(a**S(2)*c*d*f*h*(n + S(1)) + a*b*(c**S(2)*f*h*(m + S(1)) - c*d*(e*h + f*g)*(m + n + S(2)) + d**S(2)*e*g*(m + S(1))) + b**S(2)*c*d*e*g*(n + S(1)) + x*(a**S(2)*d**S(2)*f*h*(n + S(1)) - a*b*d**S(2)*(n + S(1))*(e*h + f*g) + b**S(2)*(c**S(2)*f*h*(m + S(1)) - c*d*(m + S(1))*(e*h + f*g) + d**S(2)*e*g*(m + n + S(2)))))/(b*d*(m + S(1))*(n + S(1))*(-a*d + b*c)**S(2)), x) def replacement162(a, b, c, d, e, f, g, h, m, n, x): return Dist(-d*(m + n + S(3))*(a**S(2)*d*f*h*(m - n) - a*b*(S(2)*c*f*h*(m + S(1)) - d*(n + S(1))*(e*h + f*g)) + b**S(2)*(c*(m + S(1))*(e*h + f*g) - d*e*g*(m + n + S(2))))/(b**S(2)*(m + S(1))*(m + S(2))*(-a*d + b*c)**S(2)) + f*h/b**S(2), Int((a + b*x)**(m + S(2))*(c + d*x)**n, x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(-a**S(3)*d*f*h*(n + S(2)) - a**S(2)*b*(c*f*h*m - d*(e*h + f*g)*(m + n + S(3))) - a*b**S(2)*(c*(e*h + f*g) + d*e*g*(S(2)*m + n + S(4))) + b**S(3)*c*e*g*(m + S(2)) + b*x*(a**S(2)*d*f*h*(m - n) - a*b*(S(2)*c*f*h*(m + S(1)) - d*(n + S(1))*(e*h + f*g)) + b**S(2)*(c*(m + S(1))*(e*h + f*g) - d*e*g*(m + n + S(2)))))/(b**S(2)*(m + S(1))*(m + S(2))*(-a*d + b*c)**S(2)), x) def replacement163(a, b, c, d, e, f, g, h, m, n, x): return -Dist((a**S(2)*d**S(2)*f*h*(n + S(1))*(n + S(2)) + a*b*d*(n + S(1))*(S(2)*c*f*h*(m + S(1)) - d*(e*h + f*g)*(m + n + S(3))) + b**S(2)*(c**S(2)*f*h*(m + S(1))*(m + S(2)) - c*d*(m + S(1))*(e*h + f*g)*(m + n + S(3)) + d**S(2)*e*g*(m + n + S(2))*(m + n + S(3))))/(b**S(2)*d*(m + S(1))*(-a*d + b*c)*(m + n + S(3))), Int((a + b*x)**(m + S(1))*(c + d*x)**n, x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(a**S(2)*d*f*h*(n + S(2)) + a*b*(c*f*h*(m + S(1)) - d*(e*h + f*g)*(m + n + S(3))) + b**S(2)*d*e*g*(m + n + S(3)) + b*f*h*x*(m + S(1))*(-a*d + b*c))/(b**S(2)*d*(m + S(1))*(-a*d + b*c)*(m + n + S(3))), x) def replacement164(a, b, c, d, e, f, g, h, m, n, x): return Dist((a**S(2)*d**S(2)*f*h*(n + S(1))*(n + S(2)) + a*b*d*(n + S(1))*(S(2)*c*f*h*(m + S(1)) - d*(e*h + f*g)*(m + n + S(3))) + b**S(2)*(c**S(2)*f*h*(m + S(1))*(m + S(2)) - c*d*(m + S(1))*(e*h + f*g)*(m + n + S(3)) + d**S(2)*e*g*(m + n + S(2))*(m + n + S(3))))/(b**S(2)*d**S(2)*(m + n + S(2))*(m + n + S(3))), Int((a + b*x)**m*(c + d*x)**n, x), x) - Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(a*d*f*h*(n + S(2)) + b*c*f*h*(m + S(2)) - b*d*f*h*x*(m + n + S(2)) - b*d*(e*h + f*g)*(m + n + S(3)))/(b**S(2)*d**S(2)*(m + n + S(2))*(m + n + S(3))), x) def replacement165(a, b, c, d, e, f, g, h, m, n, p, x): return Int(ExpandIntegrand((a + b*x)**m*(c + d*x)**n*(e + f*x)**p*(g + h*x), x), x) def replacement166(a, b, c, d, e, f, g, h, m, n, p, x): return -Dist(S(1)/(b*(m + S(1))*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**(n + S(-1))*(e + f*x)**p*Simp(b*c*(m + S(1))*(-e*h + f*g) + d*x*(b*(m + S(1))*(-e*h + f*g) + f*(-a*h + b*g)*(n + p + S(1))) + (-a*h + b*g)*(c*f*(p + S(1)) + d*e*n), x), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**(p + S(1))*(-a*h + b*g)/(b*(m + S(1))*(-a*f + b*e)), x) def replacement167(a, b, c, d, e, f, g, h, m, n, p, x): return -Dist(S(1)/(b*(m + S(1))*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**(n + S(-1))*(e + f*x)**p*Simp(b*c*(m + S(1))*(-e*h + f*g) + d*x*(b*(m + S(1))*(-e*h + f*g) + f*(-a*h + b*g)*(n + p + S(1))) + (-a*h + b*g)*(c*f*(p + S(1)) + d*e*n), x), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**(p + S(1))*(-a*h + b*g)/(b*(m + S(1))*(-a*f + b*e)), x) def replacement168(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(S(1)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p*Simp(-d*f*x*(-a*h + b*g)*(m + n + p + S(3)) + (m + S(1))*(a*d*f*g + b*c*e*h - b*g*(c*f + d*e)) - (-a*h + b*g)*(c*f*(p + S(1)) + d*e*(n + S(1))), x), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))*(-a*h + b*g)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement169(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(S(1)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p*Simp(-d*f*x*(-a*h + b*g)*(m + n + p + S(3)) + (m + S(1))*(a*d*f*g + b*c*e*h - b*g*(c*f + d*e)) - (-a*h + b*g)*(c*f*(p + S(1)) + d*e*(n + S(1))), x), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))*(-a*h + b*g)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement170(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(S(1)/(d*f*(m + n + p + S(2))), Int((a + b*x)**(m + S(-1))*(c + d*x)**n*(e + f*x)**p*Simp(a*d*f*g*(m + n + p + S(2)) - h*(a*(c*f*(p + S(1)) + d*e*(n + S(1))) + b*c*e*m) + x*(b*d*f*g*(m + n + p + S(2)) + h*(a*d*f*m - b*(c*f*(m + p + S(1)) + d*e*(m + n + S(1))))), x), x), x) + Simp(h*(a + b*x)**m*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/(d*f*(m + n + p + S(2))), x) def replacement171(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(S(1)/(d*f*(m + n + p + S(2))), Int((a + b*x)**(m + S(-1))*(c + d*x)**n*(e + f*x)**p*Simp(a*d*f*g*(m + n + p + S(2)) - h*(a*(c*f*(p + S(1)) + d*e*(n + S(1))) + b*c*e*m) + x*(b*d*f*g*(m + n + p + S(2)) + h*(a*d*f*m - b*(c*f*(m + p + S(1)) + d*e*(m + n + S(1))))), x), x), x) + Simp(h*(a + b*x)**m*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))/(d*f*(m + n + p + S(2))), x) def replacement172(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(S(1)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p*Simp(-d*f*x*(-a*h + b*g)*(m + n + p + S(3)) + (m + S(1))*(a*d*f*g + b*c*e*h - b*g*(c*f + d*e)) - (-a*h + b*g)*(c*f*(p + S(1)) + d*e*(n + S(1))), x), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(n + S(1))*(e + f*x)**(p + S(1))*(-a*h + b*g)/((m + S(1))*(-a*d + b*c)*(-a*f + b*e)), x) def replacement173(a, b, c, d, e, f, g, h, p, x): return Dist((-a*h + b*g)/(-a*d + b*c), Int((e + f*x)**p/(a + b*x), x), x) - Dist((-c*h + d*g)/(-a*d + b*c), Int((e + f*x)**p/(c + d*x), x), x) def replacement174(a, b, c, d, e, f, g, h, n, p, x): return Dist(h/b, Int((c + d*x)**n*(e + f*x)**p, x), x) + Dist((-a*h + b*g)/b, Int((c + d*x)**n*(e + f*x)**p/(a + b*x), x), x) def replacement175(a, b, c, d, e, f, g, h, x): return Dist(h/f, Int(sqrt(e + f*x)/(sqrt(a + b*x)*sqrt(c + d*x)), x), x) + Dist((-e*h + f*g)/f, Int(S(1)/(sqrt(a + b*x)*sqrt(c + d*x)*sqrt(e + f*x)), x), x) def replacement176(a, b, c, d, e, f, g, h, m, n, p, x): return Dist(h/b, Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p, x), x) + Dist((-a*h + b*g)/b, Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p, x), x) def replacement177(a, b, c, d, e, f, g, h, p, q, x): return Dist((-a*f + b*e)/(-a*d + b*c), Int((e + f*x)**(p + S(-1))*(g + h*x)**q/(a + b*x), x), x) - Dist((-c*f + d*e)/(-a*d + b*c), Int((e + f*x)**(p + S(-1))*(g + h*x)**q/(c + d*x), x), x) def replacement178(a, b, c, d, e, f, g, h, x): return Simp(-S(2)*sqrt(d*(e + f*x)/(-c*f + d*e))*sqrt(d*(g + h*x)/(-c*h + d*g))*EllipticPi(-b*(-c*f + d*e)/(f*(-a*d + b*c)), asin(sqrt(-f/(-c*f + d*e))*sqrt(c + d*x)), h*(-c*f + d*e)/(f*(-c*h + d*g)))/(sqrt(-f/(-c*f + d*e))*sqrt(e + f*x)*sqrt(g + h*x)*(-a*d + b*c)), x) def replacement179(a, b, c, d, e, f, g, h, n, x): return Int(ExpandIntegrand(S(1)/(sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), (c + d*x)**(n + S(1)/2)/(a + b*x), x), x) def replacement180(a, b, c, d, e, f, g, h, x): return Dist(b**(S(-2)), Int((-a*f*h + b*e*h + b*f*g + b*f*h*x)/(sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), x), x) + Dist((-a*f + b*e)*(-a*h + b*g)/b**S(2), Int(S(1)/((a + b*x)*sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), x), x) def replacement181(a, b, c, d, e, f, g, h, x): return Dist(-S(2)*sqrt((c + d*x)*(-a*h + b*g)/((a + b*x)*(-c*h + d*g)))*sqrt((e + f*x)*(-a*h + b*g)/((a + b*x)*(-e*h + f*g)))*(a + b*x)/(sqrt(c + d*x)*sqrt(e + f*x)*(-a*h + b*g)), Subst(Int(S(1)/(sqrt(x**S(2)*(-a*d + b*c)/(-c*h + d*g) + S(1))*sqrt(x**S(2)*(-a*f + b*e)/(-e*h + f*g) + S(1))), x), x, sqrt(g + h*x)/sqrt(a + b*x)), x) def replacement182(a, b, c, d, e, f, g, h, x): return Dist(-S(2)*sqrt((c + d*x)*(-a*h + b*g)/((a + b*x)*(-c*h + d*g)))*sqrt((e + f*x)*(-a*h + b*g)/((a + b*x)*(-e*h + f*g)))*(a + b*x)*(-c*h + d*g)/(sqrt(c + d*x)*sqrt(e + f*x)*(-a*h + b*g)**S(2)), Subst(Int(sqrt(x**S(2)*(-a*d + b*c)/(-c*h + d*g) + S(1))/sqrt(x**S(2)*(-a*f + b*e)/(-e*h + f*g) + S(1)), x), x, sqrt(g + h*x)/sqrt(a + b*x)), x) def replacement183(a, b, c, d, e, f, g, h, x): return Dist(S(2)*sqrt((c + d*x)*(-a*h + b*g)/((a + b*x)*(-c*h + d*g)))*sqrt((e + f*x)*(-a*h + b*g)/((a + b*x)*(-e*h + f*g)))*(a + b*x)/(sqrt(c + d*x)*sqrt(e + f*x)), Subst(Int(S(1)/((-b*x**S(2) + h)*sqrt(x**S(2)*(-a*d + b*c)/(-c*h + d*g) + S(1))*sqrt(x**S(2)*(-a*f + b*e)/(-e*h + f*g) + S(1))), x), x, sqrt(g + h*x)/sqrt(a + b*x)), x) def replacement184(a, b, c, d, e, f, g, h, x): return Dist(b/(-a*d + b*c), Int(sqrt(c + d*x)/((a + b*x)**(S(3)/2)*sqrt(e + f*x)*sqrt(g + h*x)), x), x) - Dist(d/(-a*d + b*c), Int(S(1)/(sqrt(a + b*x)*sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), x), x) def replacement185(a, b, c, d, e, f, g, h, x): return Dist((a*d*f*h - b*(-c*f*h + d*e*h + d*f*g))/(S(2)*f**S(2)*h), Int(sqrt(e + f*x)/(sqrt(a + b*x)*sqrt(c + d*x)*sqrt(g + h*x)), x), x) + Dist((-c*f + d*e)*(-S(2)*a*f*h + b*e*h + b*f*g)/(S(2)*f**S(2)*h), Int(S(1)/(sqrt(a + b*x)*sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), x), x) - Dist((-c*f + d*e)*(-e*h + f*g)/(S(2)*f*h), Int(sqrt(a + b*x)/(sqrt(c + d*x)*(e + f*x)**(S(3)/2)*sqrt(g + h*x)), x), x) + Simp(sqrt(a + b*x)*sqrt(c + d*x)*sqrt(g + h*x)/(h*sqrt(e + f*x)), x) def replacement186(a, b, c, d, e, f, g, h, x): return Dist(b/d, Int(sqrt(a + b*x)*sqrt(c + d*x)/(sqrt(e + f*x)*sqrt(g + h*x)), x), x) - Dist((-a*d + b*c)/d, Int(sqrt(a + b*x)/(sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), x), x) def replacement187(a, b, c, d, e, f, g, h, m, n, p, q, x): return Int(ExpandIntegrand((a + b*x)**m*(c + d*x)**n*(e + f*x)**p*(g + h*x)**q, x), x) def replacement188(a, b, c, d, e, f, g, h, m, n, p, q, x): return Dist(h/b, Int((a + b*x)**(m + S(1))*(c + d*x)**n*(e + f*x)**p*(g + h*x)**(q + S(-1)), x), x) + Dist((-a*h + b*g)/b, Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p*(g + h*x)**(q + S(-1)), x), x) def replacement189(a, b, c, d, e, f, g, h, m, n, p, q, x): return Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p*(g + h*x)**q, x) def replacement190(a, b, c, d, e, f, g, h, m, n, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x)**m*(c + d*x)**n*(e + f*x)**p*(g + h*x)**q, x), x, u), x) def replacement191(a, b, c, d, e, f, g, h, i, m, n, p, q, r, x): return Dist((i*(a + b*x)**m*(c + d*x)**n*(e + f*x)**p*(g + h*x)**q)**r*(a + b*x)**(-m*r)*(c + d*x)**(-n*r)*(e + f*x)**(-p*r)*(g + h*x)**(-q*r), Int((a + b*x)**(m*r)*(c + d*x)**(n*r)*(e + f*x)**(p*r)*(g + h*x)**(q*r), x), x)
be307a4213fe529b08ea8565c00738ba86cc5b4f84f6298a04198ef565538bd6
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def hyperbolic(): from sympy.integrals.rubi.constraints import cons33, cons170, cons8, cons29, cons50, cons127, cons96, cons1118, cons178, cons1490, cons19, cons89, cons167, cons3, cons95, cons168, cons87, cons1491, cons247, cons249, cons91, cons1444, cons150, cons1861, cons2, cons1492, cons1441, cons810, cons1493, cons1494, cons1456, cons1442, cons64, cons1269, cons1495, cons812, cons813, cons4, cons1362, cons130, cons40, cons139, cons746, cons65, cons1496, cons198, cons1497, cons5, cons55, cons13, cons598, cons1498, cons20, cons1499, cons378, cons148, cons491, cons1500, cons70, cons71, cons825, cons826, cons1501, cons1503, cons1257, cons1504, cons58, cons152, cons1505, cons1506, cons685, cons369, cons1507, cons358, cons68, cons856, cons25, cons1508, cons56, cons14, cons820, cons1133, cons1134, cons1135, cons1509, cons821, cons530, cons1267, cons1512, cons21, cons1573, cons1574, cons1575, cons1576, cons1577, cons1578, cons1579, cons1580, cons1581, cons1045, cons1582, cons1646, cons1738, cons1647, cons586, cons466, cons1685, cons1410, cons1686, cons1687, cons1862, cons1863, cons1690, cons814, cons815, cons557, cons1864, cons1865, cons27, cons1693, cons1866, cons1101, cons1867, cons1868, cons1397, cons1869, cons1695, cons1870, cons965, cons1871, cons1872, cons210, cons1702, cons1013, cons1553, cons1703, cons1704, cons211, cons226, cons1701, cons1873, cons1705, cons1706, cons1874, cons1708, cons1709, cons1875, cons1876, cons1877, cons1878, cons1879, cons1880, cons1881, cons1882, cons1883, cons1884, cons1885, cons1886, cons1887, cons1888, cons1722, cons1889, cons1890, cons1891, cons1725, cons1892, cons165, cons340, cons164, cons629, cons73, cons1727, cons1728, cons1729, cons90, cons1730, cons1458, cons465, cons1731, cons1480, cons1732, cons1893, cons36, cons37, cons1476, cons1483, cons1735 pattern5646 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons33, cons170) rule5646 = ReplacementRule(pattern5646, replacement5646) pattern5647 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons33, cons170) rule5647 = ReplacementRule(pattern5647, replacement5647) pattern5648 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*sinh(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons33, cons96) rule5648 = ReplacementRule(pattern5648, replacement5648) pattern5649 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*cosh(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons33, cons96) rule5649 = ReplacementRule(pattern5649, replacement5649) pattern5650 = Pattern(Integral(sinh(x_*WC('f', S(1)) + WC('e', S(0)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons1118) rule5650 = ReplacementRule(pattern5650, replacement5650) pattern5651 = Pattern(Integral(cosh(x_*WC('f', S(1)) + WC('e', S(0)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons1118) rule5651 = ReplacementRule(pattern5651, replacement5651) pattern5652 = Pattern(Integral(sinh(x_*WC('f', S(1)) + WC('e', S(0)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons178) rule5652 = ReplacementRule(pattern5652, replacement5652) pattern5653 = Pattern(Integral(cosh(x_*WC('f', S(1)) + WC('e', S(0)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons178) rule5653 = ReplacementRule(pattern5653, replacement5653) pattern5654 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons19, cons1490) rule5654 = ReplacementRule(pattern5654, replacement5654) pattern5655 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons19, cons1490) rule5655 = ReplacementRule(pattern5655, replacement5655) pattern5656 = Pattern(Integral((WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons167) rule5656 = ReplacementRule(pattern5656, replacement5656) pattern5657 = Pattern(Integral((WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons167) rule5657 = ReplacementRule(pattern5657, replacement5657) pattern5658 = Pattern(Integral((WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons168) rule5658 = ReplacementRule(pattern5658, replacement5658) pattern5659 = Pattern(Integral((WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons168) rule5659 = ReplacementRule(pattern5659, replacement5659) pattern5660 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*sinh(x_*WC('f', S(1)) + WC('e', S(0)))**n_, x_), cons8, cons29, cons50, cons127, cons19, cons87, cons167, cons1491) rule5660 = ReplacementRule(pattern5660, replacement5660) pattern5661 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*cosh(x_*WC('f', S(1)) + WC('e', S(0)))**n_, x_), cons8, cons29, cons50, cons127, cons19, cons87, cons167, cons1491) rule5661 = ReplacementRule(pattern5661, replacement5661) pattern5662 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*sinh(x_*WC('f', S(1)) + WC('e', S(0)))**n_, x_), cons8, cons29, cons50, cons127, cons19, cons87, cons167, cons33, cons247) rule5662 = ReplacementRule(pattern5662, replacement5662) pattern5663 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*cosh(x_*WC('f', S(1)) + WC('e', S(0)))**n_, x_), cons8, cons29, cons50, cons127, cons19, cons87, cons167, cons33, cons247) rule5663 = ReplacementRule(pattern5663, replacement5663) pattern5664 = Pattern(Integral((WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons249) rule5664 = ReplacementRule(pattern5664, replacement5664) pattern5665 = Pattern(Integral((WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons249) rule5665 = ReplacementRule(pattern5665, replacement5665) pattern5666 = Pattern(Integral((WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons91, cons1444) rule5666 = ReplacementRule(pattern5666, replacement5666) pattern5667 = Pattern(Integral((WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons91, cons1444) rule5667 = ReplacementRule(pattern5667, replacement5667) pattern5668 = Pattern(Integral((WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons95, cons91, cons1444, cons168) rule5668 = ReplacementRule(pattern5668, replacement5668) pattern5669 = Pattern(Integral((WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons95, cons91, cons1444, cons168) rule5669 = ReplacementRule(pattern5669, replacement5669) pattern5670 = Pattern(Integral((a_ + WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons150, cons1861) rule5670 = ReplacementRule(pattern5670, replacement5670) pattern5671 = Pattern(Integral((a_ + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons150, cons1492) rule5671 = ReplacementRule(pattern5671, replacement5671) pattern5672 = Pattern(Integral((a_ + WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1441, cons87) rule5672 = ReplacementRule(pattern5672, replacement5672) pattern5673 = Pattern(Integral((a_ + WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1441, cons810, cons1493) rule5673 = ReplacementRule(pattern5673, replacement5673) pattern5674 = Pattern(Integral((a_ + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1494, cons87) rule5674 = ReplacementRule(pattern5674, replacement5674) pattern5675 = Pattern(Integral((a_ + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1456, cons87) rule5675 = ReplacementRule(pattern5675, replacement5675) pattern5676 = Pattern(Integral((a_ + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1494, cons810, cons1493) rule5676 = ReplacementRule(pattern5676, replacement5676) pattern5677 = Pattern(Integral((a_ + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1456, cons810, cons1493) rule5677 = ReplacementRule(pattern5677, replacement5677) pattern5678 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442, cons64) rule5678 = ReplacementRule(pattern5678, replacement5678) pattern5679 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons64) rule5679 = ReplacementRule(pattern5679, replacement5679) pattern5680 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442, cons64) rule5680 = ReplacementRule(pattern5680, replacement5680) pattern5681 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons64) rule5681 = ReplacementRule(pattern5681, replacement5681) pattern5682 = Pattern(Integral((a_ + WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442, cons1495, cons64) rule5682 = ReplacementRule(pattern5682, replacement5682) pattern5683 = Pattern(Integral((a_ + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons1495, cons64) rule5683 = ReplacementRule(pattern5683, replacement5683) pattern5684 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule5684 = ReplacementRule(pattern5684, replacement5684) pattern5685 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule5685 = ReplacementRule(pattern5685, replacement5685) pattern5686 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule5686 = ReplacementRule(pattern5686, replacement5686) pattern5687 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule5687 = ReplacementRule(pattern5687, replacement5687) pattern5688 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons130) rule5688 = ReplacementRule(pattern5688, replacement5688) pattern5689 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons130) rule5689 = ReplacementRule(pattern5689, replacement5689) pattern5690 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons40, cons150, cons139, cons746) rule5690 = ReplacementRule(pattern5690, replacement5690) pattern5691 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons40, cons150, cons139, cons746) rule5691 = ReplacementRule(pattern5691, replacement5691) pattern5692 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons150, cons1496) rule5692 = ReplacementRule(pattern5692, replacement5692) pattern5693 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons150, cons1496) rule5693 = ReplacementRule(pattern5693, replacement5693) pattern5694 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons198) rule5694 = ReplacementRule(pattern5694, replacement5694) pattern5695 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons198) rule5695 = ReplacementRule(pattern5695, replacement5695) pattern5696 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule5696 = ReplacementRule(pattern5696, replacement5696) pattern5697 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule5697 = ReplacementRule(pattern5697, replacement5697) pattern5698 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons130) rule5698 = ReplacementRule(pattern5698, replacement5698) pattern5699 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons130) rule5699 = ReplacementRule(pattern5699, replacement5699) pattern5700 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, cons55, cons13, cons139, cons598) rule5700 = ReplacementRule(pattern5700, replacement5700) pattern5701 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, cons55, cons13, cons139, cons598) rule5701 = ReplacementRule(pattern5701, replacement5701) pattern5702 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons40, cons150, cons33, cons139, cons1498) rule5702 = ReplacementRule(pattern5702, replacement5702) pattern5703 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons40, cons150, cons33, cons139, cons1498) rule5703 = ReplacementRule(pattern5703, replacement5703) pattern5704 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons20, cons150, cons1496) rule5704 = ReplacementRule(pattern5704, replacement5704) pattern5705 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons20, cons150, cons1496) rule5705 = ReplacementRule(pattern5705, replacement5705) pattern5706 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons65, cons198) rule5706 = ReplacementRule(pattern5706, replacement5706) pattern5707 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons65, cons198) rule5707 = ReplacementRule(pattern5707, replacement5707) pattern5708 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5708 = ReplacementRule(pattern5708, replacement5708) pattern5709 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5709 = ReplacementRule(pattern5709, replacement5709) pattern5710 = Pattern(Integral(sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons87, cons167) rule5710 = ReplacementRule(pattern5710, replacement5710) pattern5711 = Pattern(Integral(cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons87, cons167) rule5711 = ReplacementRule(pattern5711, replacement5711) pattern5712 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons378, cons167, cons148) rule5712 = ReplacementRule(pattern5712, replacement5712) pattern5713 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons378, cons167, cons148) rule5713 = ReplacementRule(pattern5713, replacement5713) pattern5714 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons198) rule5714 = ReplacementRule(pattern5714, replacement5714) pattern5715 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons198) rule5715 = ReplacementRule(pattern5715, replacement5715) pattern5716 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons491) rule5716 = ReplacementRule(pattern5716, With5716) pattern5717 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons491) rule5717 = ReplacementRule(pattern5717, With5717) pattern5718 = Pattern(Integral(sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons4, cons1500) rule5718 = ReplacementRule(pattern5718, replacement5718) pattern5719 = Pattern(Integral(cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons4, cons1500) rule5719 = ReplacementRule(pattern5719, replacement5719) pattern5720 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons4, cons130) rule5720 = ReplacementRule(pattern5720, replacement5720) pattern5721 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons4, cons130) rule5721 = ReplacementRule(pattern5721, replacement5721) pattern5722 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sinh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons40, cons70, cons71) rule5722 = ReplacementRule(pattern5722, replacement5722) pattern5723 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cosh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons40, cons70, cons71) rule5723 = ReplacementRule(pattern5723, replacement5723) pattern5724 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sinh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70) rule5724 = ReplacementRule(pattern5724, replacement5724) pattern5725 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cosh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70) rule5725 = ReplacementRule(pattern5725, replacement5725) pattern5726 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sinh(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule5726 = ReplacementRule(pattern5726, replacement5726) pattern5727 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cosh(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule5727 = ReplacementRule(pattern5727, replacement5727) pattern5728 = Pattern(Integral(sinh(x_**n_*WC('d', S(1)))/x_, x_), cons29, cons4, cons1501) rule5728 = ReplacementRule(pattern5728, replacement5728) pattern5729 = Pattern(Integral(cosh(x_**n_*WC('d', S(1)))/x_, x_), cons29, cons4, cons1501) rule5729 = ReplacementRule(pattern5729, replacement5729) pattern5730 = Pattern(Integral(sinh(c_ + x_**n_*WC('d', S(1)))/x_, x_), cons8, cons29, cons4, cons1500) rule5730 = ReplacementRule(pattern5730, replacement5730) pattern5731 = Pattern(Integral(cosh(c_ + x_**n_*WC('d', S(1)))/x_, x_), cons8, cons29, cons4, cons1500) rule5731 = ReplacementRule(pattern5731, replacement5731) pattern5732 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons40, CustomConstraint(With5732)) rule5732 = ReplacementRule(pattern5732, replacement5732) pattern5733 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons40, CustomConstraint(With5733)) rule5733 = ReplacementRule(pattern5733, replacement5733) pattern5734 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, CustomConstraint(With5734)) rule5734 = ReplacementRule(pattern5734, replacement5734) pattern5735 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, CustomConstraint(With5735)) rule5735 = ReplacementRule(pattern5735, replacement5735) pattern5736 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons150, cons33, cons1503) rule5736 = ReplacementRule(pattern5736, replacement5736) pattern5737 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons150, cons33, cons1503) rule5737 = ReplacementRule(pattern5737, replacement5737) pattern5738 = Pattern(Integral((x_*WC('e', S(1)))**m_*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons150, cons33, cons96) rule5738 = ReplacementRule(pattern5738, replacement5738) pattern5739 = Pattern(Integral((x_*WC('e', S(1)))**m_*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons150, cons33, cons96) rule5739 = ReplacementRule(pattern5739, replacement5739) pattern5740 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons19, cons150) rule5740 = ReplacementRule(pattern5740, replacement5740) pattern5741 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons19, cons150) rule5741 = ReplacementRule(pattern5741, replacement5741) pattern5742 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons378, cons1257, cons148, cons1504) rule5742 = ReplacementRule(pattern5742, replacement5742) pattern5743 = Pattern(Integral(x_**WC('m', S(1))*cosh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons378, cons1257, cons148, cons1504) rule5743 = ReplacementRule(pattern5743, replacement5743) pattern5744 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons58, cons13, cons148) rule5744 = ReplacementRule(pattern5744, replacement5744) pattern5745 = Pattern(Integral(x_**WC('m', S(1))*cosh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons58, cons13, cons148) rule5745 = ReplacementRule(pattern5745, replacement5745) pattern5746 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons148, cons1505) rule5746 = ReplacementRule(pattern5746, replacement5746) pattern5747 = Pattern(Integral(x_**WC('m', S(1))*cosh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons148, cons1505) rule5747 = ReplacementRule(pattern5747, replacement5747) pattern5748 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons148, cons1506, cons685) rule5748 = ReplacementRule(pattern5748, replacement5748) pattern5749 = Pattern(Integral(x_**WC('m', S(1))*cosh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons148, cons1506, cons685) rule5749 = ReplacementRule(pattern5749, replacement5749) pattern5750 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons150, cons369) rule5750 = ReplacementRule(pattern5750, With5750) pattern5751 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons150, cons369) rule5751 = ReplacementRule(pattern5751, With5751) pattern5752 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons148) rule5752 = ReplacementRule(pattern5752, replacement5752) pattern5753 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons148) rule5753 = ReplacementRule(pattern5753, replacement5753) pattern5754 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons58, cons13, cons139, cons1507) rule5754 = ReplacementRule(pattern5754, replacement5754) pattern5755 = Pattern(Integral(x_**WC('m', S(1))*cosh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons58, cons13, cons139, cons1507) rule5755 = ReplacementRule(pattern5755, replacement5755) pattern5756 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons139, cons1507, cons1505) rule5756 = ReplacementRule(pattern5756, replacement5756) pattern5757 = Pattern(Integral(x_**WC('m', S(1))*cosh(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons139, cons1507, cons1505) rule5757 = ReplacementRule(pattern5757, replacement5757) pattern5758 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons198, cons20) rule5758 = ReplacementRule(pattern5758, replacement5758) pattern5759 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons198, cons20) rule5759 = ReplacementRule(pattern5759, replacement5759) pattern5760 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons198, cons369) rule5760 = ReplacementRule(pattern5760, With5760) pattern5761 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons198, cons369) rule5761 = ReplacementRule(pattern5761, With5761) pattern5762 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons198, cons358) rule5762 = ReplacementRule(pattern5762, replacement5762) pattern5763 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons198, cons358) rule5763 = ReplacementRule(pattern5763, replacement5763) pattern5764 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons40, cons491) rule5764 = ReplacementRule(pattern5764, With5764) pattern5765 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons40, cons491) rule5765 = ReplacementRule(pattern5765, With5765) pattern5766 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons491) rule5766 = ReplacementRule(pattern5766, replacement5766) pattern5767 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons491) rule5767 = ReplacementRule(pattern5767, replacement5767) pattern5768 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons40, cons68, cons856, cons25) rule5768 = ReplacementRule(pattern5768, replacement5768) pattern5769 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons40, cons68, cons856, cons25) rule5769 = ReplacementRule(pattern5769, replacement5769) pattern5770 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, cons68, cons856, cons25) rule5770 = ReplacementRule(pattern5770, replacement5770) pattern5771 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, cons68, cons856, cons25) rule5771 = ReplacementRule(pattern5771, replacement5771) pattern5772 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons19, cons4, cons1508) rule5772 = ReplacementRule(pattern5772, replacement5772) pattern5773 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons19, cons4, cons1508) rule5773 = ReplacementRule(pattern5773, replacement5773) pattern5774 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons130) rule5774 = ReplacementRule(pattern5774, replacement5774) pattern5775 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons130) rule5775 = ReplacementRule(pattern5775, replacement5775) pattern5776 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71, cons20) rule5776 = ReplacementRule(pattern5776, replacement5776) pattern5777 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71, cons20) rule5777 = ReplacementRule(pattern5777, replacement5777) pattern5778 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons70) rule5778 = ReplacementRule(pattern5778, replacement5778) pattern5779 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons70) rule5779 = ReplacementRule(pattern5779, replacement5779) pattern5780 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sinh(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule5780 = ReplacementRule(pattern5780, replacement5780) pattern5781 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cosh(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule5781 = ReplacementRule(pattern5781, replacement5781) pattern5782 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cosh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons4, cons5, cons55, cons56) rule5782 = ReplacementRule(pattern5782, replacement5782) pattern5783 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*cosh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons19, cons4, cons5, cons55, cons56) rule5783 = ReplacementRule(pattern5783, replacement5783) pattern5784 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cosh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons5, cons95, cons1503, cons56) rule5784 = ReplacementRule(pattern5784, replacement5784) pattern5785 = Pattern(Integral(x_**WC('m', S(1))*sinh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*cosh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons5, cons95, cons1503, cons56) rule5785 = ReplacementRule(pattern5785, replacement5785) pattern5786 = Pattern(Integral(sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons14) rule5786 = ReplacementRule(pattern5786, replacement5786) pattern5787 = Pattern(Integral(cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons14) rule5787 = ReplacementRule(pattern5787, replacement5787) pattern5788 = Pattern(Integral(sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons87, cons167) rule5788 = ReplacementRule(pattern5788, replacement5788) pattern5789 = Pattern(Integral(cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons87, cons167) rule5789 = ReplacementRule(pattern5789, replacement5789) pattern5790 = Pattern(Integral(sinh(v_)**WC('n', S(1)), x_), cons150, cons820, cons1133) rule5790 = ReplacementRule(pattern5790, replacement5790) pattern5791 = Pattern(Integral(cosh(v_)**WC('n', S(1)), x_), cons150, cons820, cons1133) rule5791 = ReplacementRule(pattern5791, replacement5791) pattern5792 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1134) rule5792 = ReplacementRule(pattern5792, replacement5792) pattern5793 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1134) rule5793 = ReplacementRule(pattern5793, replacement5793) pattern5794 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1135) rule5794 = ReplacementRule(pattern5794, replacement5794) pattern5795 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1135) rule5795 = ReplacementRule(pattern5795, replacement5795) pattern5796 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168, cons1134) rule5796 = ReplacementRule(pattern5796, replacement5796) pattern5797 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168, cons1134) rule5797 = ReplacementRule(pattern5797, replacement5797) pattern5798 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168, cons1135) rule5798 = ReplacementRule(pattern5798, replacement5798) pattern5799 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168, cons1135) rule5799 = ReplacementRule(pattern5799, replacement5799) pattern5800 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96, cons1134) rule5800 = ReplacementRule(pattern5800, replacement5800) pattern5801 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96, cons1134) rule5801 = ReplacementRule(pattern5801, replacement5801) pattern5802 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96, cons1135) rule5802 = ReplacementRule(pattern5802, replacement5802) pattern5803 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96, cons1135) rule5803 = ReplacementRule(pattern5803, replacement5803) pattern5804 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1509) rule5804 = ReplacementRule(pattern5804, replacement5804) pattern5805 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1509) rule5805 = ReplacementRule(pattern5805, replacement5805) pattern5806 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*sinh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons87, cons167) rule5806 = ReplacementRule(pattern5806, replacement5806) pattern5807 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*cosh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons87, cons167) rule5807 = ReplacementRule(pattern5807, replacement5807) pattern5808 = Pattern(Integral(u_**WC('m', S(1))*sinh(v_)**WC('n', S(1)), x_), cons19, cons150, cons70, cons820, cons821) rule5808 = ReplacementRule(pattern5808, replacement5808) pattern5809 = Pattern(Integral(u_**WC('m', S(1))*cosh(v_)**WC('n', S(1)), x_), cons19, cons150, cons70, cons820, cons821) rule5809 = ReplacementRule(pattern5809, replacement5809) pattern5810 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons64) rule5810 = ReplacementRule(pattern5810, replacement5810) pattern5811 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons64) rule5811 = ReplacementRule(pattern5811, replacement5811) pattern5812 = Pattern(Integral((WC('c', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons50, cons127, cons95, cons167, cons170) rule5812 = ReplacementRule(pattern5812, replacement5812) pattern5813 = Pattern(Integral((WC('c', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons50, cons127, cons95, cons167, cons170) rule5813 = ReplacementRule(pattern5813, replacement5813) pattern5814 = Pattern(Integral((WC('c', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons50, cons127, cons95, cons91, cons170) rule5814 = ReplacementRule(pattern5814, replacement5814) pattern5815 = Pattern(Integral((WC('c', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons50, cons127, cons95, cons91, cons170) rule5815 = ReplacementRule(pattern5815, replacement5815) pattern5816 = Pattern(Integral((a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons530) rule5816 = ReplacementRule(pattern5816, replacement5816) pattern5817 = Pattern(Integral((a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons530) rule5817 = ReplacementRule(pattern5817, replacement5817) pattern5818 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons33, cons170) rule5818 = ReplacementRule(pattern5818, replacement5818) pattern5819 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons33, cons170) rule5819 = ReplacementRule(pattern5819, replacement5819) pattern5820 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))*(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267) rule5820 = ReplacementRule(pattern5820, replacement5820) pattern5821 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))*(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267) rule5821 = ReplacementRule(pattern5821, replacement5821) pattern5822 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_/(a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons33, cons96, cons1512) rule5822 = ReplacementRule(pattern5822, replacement5822) pattern5823 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_/(a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons33, cons96, cons1512) rule5823 = ReplacementRule(pattern5823, replacement5823) pattern5824 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267) rule5824 = ReplacementRule(pattern5824, replacement5824) pattern5825 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267) rule5825 = ReplacementRule(pattern5825, replacement5825) pattern5826 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_/(a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1267, cons21) rule5826 = ReplacementRule(pattern5826, replacement5826) pattern5827 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_/(a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1267, cons21) rule5827 = ReplacementRule(pattern5827, replacement5827) pattern5828 = Pattern(Integral((a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons1573) rule5828 = ReplacementRule(pattern5828, replacement5828) pattern5829 = Pattern(Integral((a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons1573) rule5829 = ReplacementRule(pattern5829, replacement5829) pattern5830 = Pattern(Integral((a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1267, cons198) rule5830 = ReplacementRule(pattern5830, replacement5830) pattern5831 = Pattern(Integral((a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1267, cons198) rule5831 = ReplacementRule(pattern5831, replacement5831) pattern5832 = Pattern(Integral((a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons1574, cons33, cons170) rule5832 = ReplacementRule(pattern5832, With5832) pattern5833 = Pattern(Integral((a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons1574, cons33, cons170) rule5833 = ReplacementRule(pattern5833, With5833) pattern5834 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons64) rule5834 = ReplacementRule(pattern5834, replacement5834) pattern5835 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons64) rule5835 = ReplacementRule(pattern5835, replacement5835) pattern5836 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269) rule5836 = ReplacementRule(pattern5836, replacement5836) pattern5837 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269) rule5837 = ReplacementRule(pattern5837, replacement5837) pattern5838 = Pattern(Integral((a_ + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons198, cons64) rule5838 = ReplacementRule(pattern5838, replacement5838) pattern5839 = Pattern(Integral((a_ + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons198, cons64) rule5839 = ReplacementRule(pattern5839, replacement5839) pattern5840 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tanh(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule5840 = ReplacementRule(pattern5840, replacement5840) pattern5841 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tanh(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule5841 = ReplacementRule(pattern5841, replacement5841) pattern5842 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tanh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule5842 = ReplacementRule(pattern5842, replacement5842) pattern5843 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tanh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule5843 = ReplacementRule(pattern5843, replacement5843) pattern5844 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1575, cons40) rule5844 = ReplacementRule(pattern5844, replacement5844) pattern5845 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1575, cons40) rule5845 = ReplacementRule(pattern5845, replacement5845) pattern5846 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule5846 = ReplacementRule(pattern5846, replacement5846) pattern5847 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule5847 = ReplacementRule(pattern5847, replacement5847) pattern5848 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tanh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71) rule5848 = ReplacementRule(pattern5848, replacement5848) pattern5849 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tanh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71) rule5849 = ReplacementRule(pattern5849, replacement5849) pattern5850 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tanh(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule5850 = ReplacementRule(pattern5850, replacement5850) pattern5851 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tanh(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule5851 = ReplacementRule(pattern5851, replacement5851) pattern5852 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1576, cons40) rule5852 = ReplacementRule(pattern5852, replacement5852) pattern5853 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1576, cons40) rule5853 = ReplacementRule(pattern5853, replacement5853) pattern5854 = Pattern(Integral(x_**WC('m', S(1))*tanh(x_**n_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons8, cons29, cons19, cons4, cons1577) rule5854 = ReplacementRule(pattern5854, replacement5854) pattern5855 = Pattern(Integral(x_**WC('m', S(1))/tanh(x_**n_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons8, cons29, cons19, cons4, cons1577) rule5855 = ReplacementRule(pattern5855, replacement5855) pattern5856 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1578) rule5856 = ReplacementRule(pattern5856, replacement5856) pattern5857 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1578) rule5857 = ReplacementRule(pattern5857, replacement5857) pattern5858 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5858 = ReplacementRule(pattern5858, replacement5858) pattern5859 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tanh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5859 = ReplacementRule(pattern5859, replacement5859) pattern5860 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tanh(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule5860 = ReplacementRule(pattern5860, replacement5860) pattern5861 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tanh(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule5861 = ReplacementRule(pattern5861, replacement5861) pattern5862 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cosh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1))*tanh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons5, cons33, cons87, cons1579, cons1580) rule5862 = ReplacementRule(pattern5862, replacement5862) pattern5863 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sinh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1))*(S(1)/tanh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('q', S(1)), x_), cons2, cons3, cons5, cons33, cons87, cons1579, cons1580) rule5863 = ReplacementRule(pattern5863, replacement5863) pattern5864 = Pattern(Integral(tanh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons4, cons1581) rule5864 = ReplacementRule(pattern5864, replacement5864) pattern5865 = Pattern(Integral((S(1)/tanh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons4, cons1581) rule5865 = ReplacementRule(pattern5865, replacement5865) pattern5866 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*tanh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule5866 = ReplacementRule(pattern5866, replacement5866) pattern5867 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))/tanh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule5867 = ReplacementRule(pattern5867, replacement5867) pattern5868 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*tanh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1582) rule5868 = ReplacementRule(pattern5868, replacement5868) pattern5869 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(S(1)/tanh(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1582) rule5869 = ReplacementRule(pattern5869, replacement5869) pattern5870 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule5870 = ReplacementRule(pattern5870, replacement5870) pattern5871 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/sinh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule5871 = ReplacementRule(pattern5871, replacement5871) pattern5872 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/cosh(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons33, cons170) rule5872 = ReplacementRule(pattern5872, replacement5872) pattern5873 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/sinh(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons33, cons170) rule5873 = ReplacementRule(pattern5873, replacement5873) pattern5874 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons89, cons167, cons1646) rule5874 = ReplacementRule(pattern5874, replacement5874) pattern5875 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons89, cons167, cons1646) rule5875 = ReplacementRule(pattern5875, replacement5875) pattern5876 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons95, cons167, cons1646, cons168) rule5876 = ReplacementRule(pattern5876, replacement5876) pattern5877 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons95, cons167, cons1646, cons168) rule5877 = ReplacementRule(pattern5877, replacement5877) pattern5878 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons89, cons91) rule5878 = ReplacementRule(pattern5878, replacement5878) pattern5879 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons89, cons91) rule5879 = ReplacementRule(pattern5879, replacement5879) pattern5880 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons95, cons91, cons168) rule5880 = ReplacementRule(pattern5880, replacement5880) pattern5881 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons95, cons91, cons168) rule5881 = ReplacementRule(pattern5881, replacement5881) pattern5882 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons25) rule5882 = ReplacementRule(pattern5882, replacement5882) pattern5883 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons25) rule5883 = ReplacementRule(pattern5883, replacement5883) pattern5884 = Pattern(Integral((a_ + WC('b', S(1))/cosh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons530) rule5884 = ReplacementRule(pattern5884, replacement5884) pattern5885 = Pattern(Integral((a_ + WC('b', S(1))/sinh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons530) rule5885 = ReplacementRule(pattern5885, replacement5885) pattern5886 = Pattern(Integral((a_ + WC('b', S(1))/cosh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons198, cons64) rule5886 = ReplacementRule(pattern5886, replacement5886) pattern5887 = Pattern(Integral((a_ + WC('b', S(1))/sinh(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons198, cons64) rule5887 = ReplacementRule(pattern5887, replacement5887) pattern5888 = Pattern(Integral(u_**WC('m', S(1))*(S(1)/cosh(v_))**WC('n', S(1)), x_), cons19, cons4, cons812, cons813) rule5888 = ReplacementRule(pattern5888, replacement5888) pattern5889 = Pattern(Integral(u_**WC('m', S(1))*(S(1)/sinh(v_))**WC('n', S(1)), x_), cons19, cons4, cons812, cons813) rule5889 = ReplacementRule(pattern5889, replacement5889) pattern5890 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1738) rule5890 = ReplacementRule(pattern5890, replacement5890) pattern5891 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1738) rule5891 = ReplacementRule(pattern5891, replacement5891) pattern5892 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1575, cons40) rule5892 = ReplacementRule(pattern5892, replacement5892) pattern5893 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1575, cons40) rule5893 = ReplacementRule(pattern5893, replacement5893) pattern5894 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule5894 = ReplacementRule(pattern5894, replacement5894) pattern5895 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule5895 = ReplacementRule(pattern5895, replacement5895) pattern5896 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cosh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71) rule5896 = ReplacementRule(pattern5896, replacement5896) pattern5897 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sinh(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71) rule5897 = ReplacementRule(pattern5897, replacement5897) pattern5898 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cosh(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule5898 = ReplacementRule(pattern5898, replacement5898) pattern5899 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sinh(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule5899 = ReplacementRule(pattern5899, replacement5899) pattern5900 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1576, cons40) rule5900 = ReplacementRule(pattern5900, replacement5900) pattern5901 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1576, cons40) rule5901 = ReplacementRule(pattern5901, replacement5901) pattern5902 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1578) rule5902 = ReplacementRule(pattern5902, replacement5902) pattern5903 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1578) rule5903 = ReplacementRule(pattern5903, replacement5903) pattern5904 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cosh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5904 = ReplacementRule(pattern5904, replacement5904) pattern5905 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sinh(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule5905 = ReplacementRule(pattern5905, replacement5905) pattern5906 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cosh(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule5906 = ReplacementRule(pattern5906, replacement5906) pattern5907 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sinh(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule5907 = ReplacementRule(pattern5907, replacement5907) pattern5908 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cosh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**p_*sinh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons5, cons33, cons87, cons1579, cons1647) rule5908 = ReplacementRule(pattern5908, replacement5908) pattern5909 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sinh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**p_*cosh(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons5, cons33, cons87, cons1579, cons1647) rule5909 = ReplacementRule(pattern5909, replacement5909) pattern5910 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sinh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons64, cons586) rule5910 = ReplacementRule(pattern5910, replacement5910) pattern5911 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sinh(x_*WC('b', S(1)) + WC('a', S(0)))*cosh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons64, cons586) rule5911 = ReplacementRule(pattern5911, replacement5911) pattern5912 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sinh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*cosh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons466) rule5912 = ReplacementRule(pattern5912, replacement5912) pattern5913 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sinh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons466) rule5913 = ReplacementRule(pattern5913, replacement5913) pattern5914 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1))*cosh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons466) rule5914 = ReplacementRule(pattern5914, replacement5914) pattern5915 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1685, cons33, cons170) rule5915 = ReplacementRule(pattern5915, replacement5915) pattern5916 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1685, cons33, cons170) rule5916 = ReplacementRule(pattern5916, replacement5916) pattern5917 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/cosh(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons4, cons64, cons586) rule5917 = ReplacementRule(pattern5917, replacement5917) pattern5918 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))/sinh(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons4, cons64, cons586) rule5918 = ReplacementRule(pattern5918, replacement5918) pattern5919 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))**p_/cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons1410) rule5919 = ReplacementRule(pattern5919, replacement5919) pattern5920 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1410) rule5920 = ReplacementRule(pattern5920, replacement5920) pattern5921 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0))))**p_/sinh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons1410) rule5921 = ReplacementRule(pattern5921, replacement5921) pattern5922 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1410) rule5922 = ReplacementRule(pattern5922, replacement5922) pattern5923 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons64, cons1686) rule5923 = ReplacementRule(pattern5923, With5923) pattern5924 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/tanh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons64, cons1686) rule5924 = ReplacementRule(pattern5924, With5924) pattern5925 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons33, cons87) rule5925 = ReplacementRule(pattern5925, replacement5925) pattern5926 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sinh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/cosh(x_*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons378, cons33, cons170, cons1687) rule5926 = ReplacementRule(pattern5926, With5926) pattern5927 = Pattern(Integral(F_**v_*G_**w_*u_**WC('m', S(1)), x_), cons19, cons4, cons5, cons1862, cons1863, cons1690, cons814, cons815) rule5927 = ReplacementRule(pattern5927, replacement5927) pattern5928 = Pattern(Integral((a_ + WC('b', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule5928 = ReplacementRule(pattern5928, replacement5928) pattern5929 = Pattern(Integral((a_ + WC('b', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule5929 = ReplacementRule(pattern5929, replacement5929) pattern5930 = Pattern(Integral((a_ + WC('b', S(1))*tanh(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))/cosh(x_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule5930 = ReplacementRule(pattern5930, replacement5930) pattern5931 = Pattern(Integral((a_ + WC('b', S(1))/tanh(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))/sinh(x_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule5931 = ReplacementRule(pattern5931, replacement5931) pattern5932 = Pattern(Integral((a_ + WC('b', S(1))/cosh(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*tanh(x_*WC('d', S(1)) + WC('c', S(0)))/cosh(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule5932 = ReplacementRule(pattern5932, replacement5932) pattern5933 = Pattern(Integral((a_ + WC('b', S(1))/sinh(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))/(sinh(x_*WC('d', S(1)) + WC('c', S(0)))*tanh(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule5933 = ReplacementRule(pattern5933, replacement5933) pattern5934 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sinh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons557, cons20) rule5934 = ReplacementRule(pattern5934, replacement5934) pattern5935 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cosh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons557, cons20) rule5935 = ReplacementRule(pattern5935, replacement5935) pattern5936 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sinh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons557) rule5936 = ReplacementRule(pattern5936, replacement5936) pattern5937 = Pattern(Integral(F_**(x_*WC('b', S(1)) + WC('a', S(0)))*G_**(x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1864, cons1865, cons557, cons27, cons1693) rule5937 = ReplacementRule(pattern5937, replacement5937) pattern5938 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sinh(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1866) rule5938 = ReplacementRule(pattern5938, replacement5938) pattern5939 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cosh(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1866) rule5939 = ReplacementRule(pattern5939, replacement5939) pattern5940 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1867, cons89, cons167) rule5940 = ReplacementRule(pattern5940, replacement5940) pattern5941 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1867, cons89, cons167) rule5941 = ReplacementRule(pattern5941, replacement5941) pattern5942 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons1868, cons586, cons1397) rule5942 = ReplacementRule(pattern5942, replacement5942) pattern5943 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons1868, cons586, cons1397) rule5943 = ReplacementRule(pattern5943, replacement5943) pattern5944 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1869, cons89, cons91, cons1444) rule5944 = ReplacementRule(pattern5944, replacement5944) pattern5945 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1869, cons89, cons91, cons1444) rule5945 = ReplacementRule(pattern5945, replacement5945) pattern5946 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons25) rule5946 = ReplacementRule(pattern5946, replacement5946) pattern5947 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons25) rule5947 = ReplacementRule(pattern5947, replacement5947) pattern5948 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*tanh(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons87) rule5948 = ReplacementRule(pattern5948, replacement5948) pattern5949 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/tanh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons87) rule5949 = ReplacementRule(pattern5949, replacement5949) pattern5950 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cosh(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1695, cons89, cons91) rule5950 = ReplacementRule(pattern5950, replacement5950) pattern5951 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sinh(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1695, cons89, cons91) rule5951 = ReplacementRule(pattern5951, replacement5951) pattern5952 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cosh(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons1870, cons1504, cons965) rule5952 = ReplacementRule(pattern5952, replacement5952) pattern5953 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sinh(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons1870, cons1504, cons965) rule5953 = ReplacementRule(pattern5953, replacement5953) pattern5954 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cosh(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1871, cons89, cons167, cons1646) rule5954 = ReplacementRule(pattern5954, replacement5954) pattern5955 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sinh(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1871, cons89, cons167, cons1646) rule5955 = ReplacementRule(pattern5955, replacement5955) pattern5956 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cosh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons87) rule5956 = ReplacementRule(pattern5956, replacement5956) pattern5957 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sinh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons87) rule5957 = ReplacementRule(pattern5957, replacement5957) pattern5958 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cosh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons25) rule5958 = ReplacementRule(pattern5958, replacement5958) pattern5959 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sinh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons25) rule5959 = ReplacementRule(pattern5959, replacement5959) pattern5960 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1872, cons198) rule5960 = ReplacementRule(pattern5960, replacement5960) pattern5961 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1702, cons198) rule5961 = ReplacementRule(pattern5961, replacement5961) pattern5962 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1013, cons198) rule5962 = ReplacementRule(pattern5962, replacement5962) pattern5963 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1872, cons152, cons1553) rule5963 = ReplacementRule(pattern5963, replacement5963) pattern5964 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1702, cons152, cons1553) rule5964 = ReplacementRule(pattern5964, replacement5964) pattern5965 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1013, cons152, cons1553) rule5965 = ReplacementRule(pattern5965, replacement5965) pattern5966 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(h_ + WC('i', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0))))/(f_ + WC('g', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons1872, cons1703, cons1704) rule5966 = ReplacementRule(pattern5966, replacement5966) pattern5967 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(h_ + WC('i', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0))))/(f_ + WC('g', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons1701, cons1873, cons1705) rule5967 = ReplacementRule(pattern5967, replacement5967) pattern5968 = Pattern(Integral(F_**(u_*WC('c', S(1)))*G_**v_, x_), cons1101, cons8, cons4, cons1863, cons812, cons813) rule5968 = ReplacementRule(pattern5968, replacement5968) pattern5969 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*x_**WC('m', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons33, cons170, cons150) rule5969 = ReplacementRule(pattern5969, With5969) pattern5970 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*x_**WC('m', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons33, cons170, cons150) rule5970 = ReplacementRule(pattern5970, With5970) pattern5971 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*cosh(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons530) rule5971 = ReplacementRule(pattern5971, replacement5971) pattern5972 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*x_**WC('p', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*cosh(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1706) rule5972 = ReplacementRule(pattern5972, replacement5972) pattern5973 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*G_**(x_*WC('e', S(1)) + WC('d', S(0)))*H_**(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons530, cons1863, cons1874) rule5973 = ReplacementRule(pattern5973, replacement5973) pattern5974 = Pattern(Integral(F_**u_*sinh(v_)**WC('n', S(1)), x_), cons1101, cons1708, cons1709, cons150) rule5974 = ReplacementRule(pattern5974, replacement5974) pattern5975 = Pattern(Integral(F_**u_*cosh(v_)**WC('n', S(1)), x_), cons1101, cons1708, cons1709, cons150) rule5975 = ReplacementRule(pattern5975, replacement5975) pattern5976 = Pattern(Integral(F_**u_*sinh(v_)**WC('m', S(1))*cosh(v_)**WC('n', S(1)), x_), cons1101, cons1708, cons1709, cons530) rule5976 = ReplacementRule(pattern5976, replacement5976) pattern5977 = Pattern(Integral(sinh(WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons8, cons1875) rule5977 = ReplacementRule(pattern5977, replacement5977) pattern5978 = Pattern(Integral(cosh(WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons8, cons1875) rule5978 = ReplacementRule(pattern5978, replacement5978) pattern5979 = Pattern(Integral(sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1876, cons56) rule5979 = ReplacementRule(pattern5979, replacement5979) pattern5980 = Pattern(Integral(cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1876, cons56) rule5980 = ReplacementRule(pattern5980, replacement5980) pattern5981 = Pattern(Integral(sqrt(sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))), x_), cons2, cons3, cons8, cons4, cons1877) rule5981 = ReplacementRule(pattern5981, replacement5981) pattern5982 = Pattern(Integral(sqrt(cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))), x_), cons2, cons3, cons8, cons4, cons1877) rule5982 = ReplacementRule(pattern5982, replacement5982) pattern5983 = Pattern(Integral(sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons130, cons1878) rule5983 = ReplacementRule(pattern5983, replacement5983) pattern5984 = Pattern(Integral(cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons130, cons1878) rule5984 = ReplacementRule(pattern5984, replacement5984) pattern5985 = Pattern(Integral(sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1879) rule5985 = ReplacementRule(pattern5985, replacement5985) pattern5986 = Pattern(Integral(cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1879) rule5986 = ReplacementRule(pattern5986, replacement5986) pattern5987 = Pattern(Integral(sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons148, cons1880) rule5987 = ReplacementRule(pattern5987, replacement5987) pattern5988 = Pattern(Integral(cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons148, cons1880) rule5988 = ReplacementRule(pattern5988, replacement5988) pattern5989 = Pattern(Integral(sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons139, cons1507, cons1881) rule5989 = ReplacementRule(pattern5989, replacement5989) pattern5990 = Pattern(Integral(cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons139, cons1507, cons1881) rule5990 = ReplacementRule(pattern5990, replacement5990) pattern5991 = Pattern(Integral(sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1880) rule5991 = ReplacementRule(pattern5991, replacement5991) pattern5992 = Pattern(Integral(cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1880) rule5992 = ReplacementRule(pattern5992, replacement5992) pattern5993 = Pattern(Integral(x_**WC('m', S(1))*sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1882, cons56, cons68) rule5993 = ReplacementRule(pattern5993, replacement5993) pattern5994 = Pattern(Integral(x_**WC('m', S(1))*cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1882, cons56, cons68) rule5994 = ReplacementRule(pattern5994, replacement5994) pattern5995 = Pattern(Integral(x_**WC('m', S(1))*sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons130, cons1883) rule5995 = ReplacementRule(pattern5995, replacement5995) pattern5996 = Pattern(Integral(x_**WC('m', S(1))*cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons130, cons1883) rule5996 = ReplacementRule(pattern5996, replacement5996) pattern5997 = Pattern(Integral(x_**WC('m', S(1))*sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons4, cons1884, cons68) rule5997 = ReplacementRule(pattern5997, replacement5997) pattern5998 = Pattern(Integral(x_**WC('m', S(1))*cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons4, cons1884, cons68) rule5998 = ReplacementRule(pattern5998, replacement5998) pattern5999 = Pattern(Integral(x_**WC('m', S(1))*sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons1885, cons13, cons148, cons68) rule5999 = ReplacementRule(pattern5999, replacement5999) pattern6000 = Pattern(Integral(x_**WC('m', S(1))*cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons1885, cons13, cons148, cons68) rule6000 = ReplacementRule(pattern6000, replacement6000) pattern6001 = Pattern(Integral(x_**WC('m', S(1))*sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons1886, cons13, cons139, cons1507, cons68) rule6001 = ReplacementRule(pattern6001, replacement6001) pattern6002 = Pattern(Integral(x_**WC('m', S(1))*cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons1886, cons13, cons139, cons1507, cons68) rule6002 = ReplacementRule(pattern6002, replacement6002) pattern6003 = Pattern(Integral(x_**WC('m', S(1))*sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1885) rule6003 = ReplacementRule(pattern6003, replacement6003) pattern6004 = Pattern(Integral(x_**WC('m', S(1))*cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1885) rule6004 = ReplacementRule(pattern6004, replacement6004) pattern6005 = Pattern(Integral((S(1)/cosh(WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons8, cons1875) rule6005 = ReplacementRule(pattern6005, replacement6005) pattern6006 = Pattern(Integral((S(1)/sinh(WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons8, cons1875) rule6006 = ReplacementRule(pattern6006, replacement6006) pattern6007 = Pattern(Integral(S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1887) rule6007 = ReplacementRule(pattern6007, replacement6007) pattern6008 = Pattern(Integral(S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1887) rule6008 = ReplacementRule(pattern6008, replacement6008) pattern6009 = Pattern(Integral((S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1888, cons1647) rule6009 = ReplacementRule(pattern6009, replacement6009) pattern6010 = Pattern(Integral((S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1888, cons1647) rule6010 = ReplacementRule(pattern6010, replacement6010) pattern6011 = Pattern(Integral((S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons148, cons1722, cons1889) rule6011 = ReplacementRule(pattern6011, replacement6011) pattern6012 = Pattern(Integral((S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons148, cons1722, cons1889) rule6012 = ReplacementRule(pattern6012, replacement6012) pattern6013 = Pattern(Integral((S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons139, cons1880) rule6013 = ReplacementRule(pattern6013, replacement6013) pattern6014 = Pattern(Integral((S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons139, cons1880) rule6014 = ReplacementRule(pattern6014, replacement6014) pattern6015 = Pattern(Integral((S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons1880) rule6015 = ReplacementRule(pattern6015, replacement6015) pattern6016 = Pattern(Integral((S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons1880) rule6016 = ReplacementRule(pattern6016, replacement6016) pattern6017 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cosh(WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons8, cons1890) rule6017 = ReplacementRule(pattern6017, replacement6017) pattern6018 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sinh(WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons8, cons1890) rule6018 = ReplacementRule(pattern6018, replacement6018) pattern6019 = Pattern(Integral(x_**WC('m', S(1))/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons4, cons1891) rule6019 = ReplacementRule(pattern6019, replacement6019) pattern6020 = Pattern(Integral(x_**WC('m', S(1))/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons4, cons1891) rule6020 = ReplacementRule(pattern6020, replacement6020) pattern6021 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1725, cons68, cons1647) rule6021 = ReplacementRule(pattern6021, replacement6021) pattern6022 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1725, cons68, cons1647) rule6022 = ReplacementRule(pattern6022, replacement6022) pattern6023 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons148, cons1722, cons1892) rule6023 = ReplacementRule(pattern6023, replacement6023) pattern6024 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons148, cons1722, cons1892) rule6024 = ReplacementRule(pattern6024, replacement6024) pattern6025 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons139, cons1885) rule6025 = ReplacementRule(pattern6025, replacement6025) pattern6026 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons139, cons1885) rule6026 = ReplacementRule(pattern6026, replacement6026) pattern6027 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cosh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1885) rule6027 = ReplacementRule(pattern6027, replacement6027) pattern6028 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sinh(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1885) rule6028 = ReplacementRule(pattern6028, replacement6028) pattern6029 = Pattern(Integral(log(x_*WC('b', S(1)))**WC('p', S(1))*sinh(x_*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons13, cons165) rule6029 = ReplacementRule(pattern6029, replacement6029) pattern6030 = Pattern(Integral(log(x_*WC('b', S(1)))**WC('p', S(1))*cosh(x_*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons13, cons165) rule6030 = ReplacementRule(pattern6030, replacement6030) pattern6031 = Pattern(Integral(log(x_*WC('b', S(1)))**WC('p', S(1))*sinh(x_**n_*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons340, cons165) rule6031 = ReplacementRule(pattern6031, replacement6031) pattern6032 = Pattern(Integral(log(x_*WC('b', S(1)))**WC('p', S(1))*cosh(x_**n_*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons340, cons165) rule6032 = ReplacementRule(pattern6032, replacement6032) pattern6033 = Pattern(Integral(x_**WC('m', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))*sinh(x_**WC('n', S(1))*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons19, cons4, cons55, cons13, cons165) rule6033 = ReplacementRule(pattern6033, replacement6033) pattern6034 = Pattern(Integral(x_**WC('m', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))*cosh(x_**WC('n', S(1))*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons19, cons4, cons55, cons13, cons165) rule6034 = ReplacementRule(pattern6034, replacement6034) pattern6035 = Pattern(Integral(x_**m_*log(x_*WC('b', S(1)))**WC('p', S(1))*sinh(x_**WC('n', S(1))*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons164, cons165, cons629) rule6035 = ReplacementRule(pattern6035, replacement6035) pattern6036 = Pattern(Integral(x_**m_*log(x_*WC('b', S(1)))**WC('p', S(1))*cosh(x_**WC('n', S(1))*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons164, cons165, cons629) rule6036 = ReplacementRule(pattern6036, replacement6036) pattern6037 = Pattern(Integral(sinh(WC('a', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons8, cons29, cons150) rule6037 = ReplacementRule(pattern6037, replacement6037) pattern6038 = Pattern(Integral(cosh(WC('a', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons8, cons29, cons150) rule6038 = ReplacementRule(pattern6038, replacement6038) pattern6039 = Pattern(Integral(sinh((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons150, cons73) rule6039 = ReplacementRule(pattern6039, replacement6039) pattern6040 = Pattern(Integral(cosh((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons150, cons73) rule6040 = ReplacementRule(pattern6040, replacement6040) pattern6041 = Pattern(Integral(sinh(u_)**WC('n', S(1)), x_), cons150, cons1727) rule6041 = ReplacementRule(pattern6041, With6041) pattern6042 = Pattern(Integral(cosh(u_)**WC('n', S(1)), x_), cons150, cons1727) rule6042 = ReplacementRule(pattern6042, With6042) pattern6043 = Pattern(Integral(WC('u', S(1))*sinh(v_)**WC('p', S(1))*sinh(w_)**WC('q', S(1)), x_), cons1690) rule6043 = ReplacementRule(pattern6043, replacement6043) pattern6044 = Pattern(Integral(WC('u', S(1))*cosh(v_)**WC('p', S(1))*cosh(w_)**WC('q', S(1)), x_), cons1690) rule6044 = ReplacementRule(pattern6044, replacement6044) pattern6045 = Pattern(Integral(sinh(v_)**WC('p', S(1))*sinh(w_)**WC('q', S(1)), x_), cons557, cons1728) rule6045 = ReplacementRule(pattern6045, replacement6045) pattern6046 = Pattern(Integral(cosh(v_)**WC('p', S(1))*cosh(w_)**WC('q', S(1)), x_), cons557, cons1728) rule6046 = ReplacementRule(pattern6046, replacement6046) pattern6047 = Pattern(Integral(x_**WC('m', S(1))*sinh(v_)**WC('p', S(1))*sinh(w_)**WC('q', S(1)), x_), cons1729, cons1728) rule6047 = ReplacementRule(pattern6047, replacement6047) pattern6048 = Pattern(Integral(x_**WC('m', S(1))*cosh(v_)**WC('p', S(1))*cosh(w_)**WC('q', S(1)), x_), cons1729, cons1728) rule6048 = ReplacementRule(pattern6048, replacement6048) pattern6049 = Pattern(Integral(WC('u', S(1))*sinh(v_)**WC('p', S(1))*cosh(w_)**WC('p', S(1)), x_), cons1690, cons40) rule6049 = ReplacementRule(pattern6049, replacement6049) pattern6050 = Pattern(Integral(sinh(v_)**WC('p', S(1))*cosh(w_)**WC('q', S(1)), x_), cons557, cons1728) rule6050 = ReplacementRule(pattern6050, replacement6050) pattern6051 = Pattern(Integral(x_**WC('m', S(1))*sinh(v_)**WC('p', S(1))*cosh(w_)**WC('q', S(1)), x_), cons1729, cons1728) rule6051 = ReplacementRule(pattern6051, replacement6051) pattern6052 = Pattern(Integral(sinh(v_)*tanh(w_)**WC('n', S(1)), x_), cons89, cons90, cons1730) rule6052 = ReplacementRule(pattern6052, replacement6052) pattern6053 = Pattern(Integral((S(1)/tanh(w_))**WC('n', S(1))*cosh(v_), x_), cons89, cons90, cons1730) rule6053 = ReplacementRule(pattern6053, replacement6053) pattern6054 = Pattern(Integral((S(1)/tanh(w_))**WC('n', S(1))*sinh(v_), x_), cons89, cons90, cons1730) rule6054 = ReplacementRule(pattern6054, replacement6054) pattern6055 = Pattern(Integral(cosh(v_)*tanh(w_)**WC('n', S(1)), x_), cons89, cons90, cons1730) rule6055 = ReplacementRule(pattern6055, replacement6055) pattern6056 = Pattern(Integral((S(1)/cosh(w_))**WC('n', S(1))*sinh(v_), x_), cons89, cons90, cons1730) rule6056 = ReplacementRule(pattern6056, replacement6056) pattern6057 = Pattern(Integral((S(1)/sinh(w_))**WC('n', S(1))*cosh(v_), x_), cons89, cons90, cons1730) rule6057 = ReplacementRule(pattern6057, replacement6057) pattern6058 = Pattern(Integral((S(1)/sinh(w_))**WC('n', S(1))*sinh(v_), x_), cons89, cons90, cons1730) rule6058 = ReplacementRule(pattern6058, replacement6058) pattern6059 = Pattern(Integral((S(1)/cosh(w_))**WC('n', S(1))*cosh(v_), x_), cons89, cons90, cons1730) rule6059 = ReplacementRule(pattern6059, replacement6059) pattern6060 = Pattern(Integral((a_ + WC('b', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))*cosh(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule6060 = ReplacementRule(pattern6060, replacement6060) pattern6061 = Pattern(Integral(x_**WC('m', S(1))*(a_ + WC('b', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons1458, cons152, cons170, cons465, cons1731) rule6061 = ReplacementRule(pattern6061, replacement6061) pattern6062 = Pattern(Integral(x_**WC('m', S(1))*(a_ + WC('b', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons1480, cons152, cons170, cons465, cons1731) rule6062 = ReplacementRule(pattern6062, replacement6062) pattern6063 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sinh((c_ + x_*WC('d', S(1)))**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons13) rule6063 = ReplacementRule(pattern6063, replacement6063) pattern6064 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cosh((c_ + x_*WC('d', S(1)))**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons13) rule6064 = ReplacementRule(pattern6064, replacement6064) pattern6065 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/(WC('a', S(0)) + WC('b', S(1))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('c', S(1))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons64, cons1480, cons1732) rule6065 = ReplacementRule(pattern6065, replacement6065) pattern6066 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/((b_ + WC('c', S(1))*tanh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons3, cons8, cons29, cons50, cons127, cons210, cons64) rule6066 = ReplacementRule(pattern6066, replacement6066) pattern6067 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/((WC('a', S(1))/cosh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('b', S(0)) + WC('c', S(1))*tanh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))*cosh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons64, cons1480, cons1732) rule6067 = ReplacementRule(pattern6067, replacement6067) pattern6068 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/((c_ + WC('b', S(1))/tanh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons3, cons8, cons29, cons50, cons127, cons210, cons64) rule6068 = ReplacementRule(pattern6068, replacement6068) pattern6069 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/((WC('a', S(1))/sinh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('b', S(1))/tanh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('c', S(0)))*sinh(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons64, cons1480, cons1732) rule6069 = ReplacementRule(pattern6069, replacement6069) pattern6070 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64) rule6070 = ReplacementRule(pattern6070, replacement6070) pattern6071 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64) rule6071 = ReplacementRule(pattern6071, replacement6071) pattern6072 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + WC('b', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons87, cons167, cons1441) rule6072 = ReplacementRule(pattern6072, replacement6072) pattern6073 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + WC('b', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons87, cons167, cons1267) rule6073 = ReplacementRule(pattern6073, replacement6073) pattern6074 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + WC('b', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons87, cons167, cons1442) rule6074 = ReplacementRule(pattern6074, replacement6074) pattern6075 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + WC('b', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons87, cons167, cons1269) rule6075 = ReplacementRule(pattern6075, replacement6075) pattern6076 = Pattern(Integral((A_ + WC('B', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0))))*(x_*WC('f', S(1)) + WC('e', S(0)))/(a_ + WC('b', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1893) rule6076 = ReplacementRule(pattern6076, replacement6076) pattern6077 = Pattern(Integral((A_ + WC('B', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0))))*(x_*WC('f', S(1)) + WC('e', S(0)))/(a_ + WC('b', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1476) rule6077 = ReplacementRule(pattern6077, replacement6077) pattern6078 = Pattern(Integral((a_ + WC('b', S(1))*tanh(v_))**WC('n', S(1))*(S(1)/cosh(v_))**WC('m', S(1)), x_), cons2, cons3, cons152, cons1553, cons1483) rule6078 = ReplacementRule(pattern6078, replacement6078) pattern6079 = Pattern(Integral((a_ + WC('b', S(1))/tanh(v_))**WC('n', S(1))*(S(1)/sinh(v_))**WC('m', S(1)), x_), cons2, cons3, cons152, cons1553, cons1483) rule6079 = ReplacementRule(pattern6079, replacement6079) pattern6080 = Pattern(Integral(WC('u', S(1))*sinh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*sinh(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons530) rule6080 = ReplacementRule(pattern6080, replacement6080) pattern6081 = Pattern(Integral(WC('u', S(1))*cosh(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*cosh(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons530) rule6081 = ReplacementRule(pattern6081, replacement6081) pattern6082 = Pattern(Integral(S(1)/(cosh(c_ + x_*WC('d', S(1)))*cosh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1735, cons73) rule6082 = ReplacementRule(pattern6082, replacement6082) pattern6083 = Pattern(Integral(S(1)/(sinh(c_ + x_*WC('d', S(1)))*sinh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1735, cons73) rule6083 = ReplacementRule(pattern6083, replacement6083) pattern6084 = Pattern(Integral(tanh(c_ + x_*WC('d', S(1)))*tanh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1735, cons73) rule6084 = ReplacementRule(pattern6084, replacement6084) pattern6085 = Pattern(Integral(S(1)/(tanh(c_ + x_*WC('d', S(1)))*tanh(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1735, cons73) rule6085 = ReplacementRule(pattern6085, replacement6085) pattern6086 = Pattern(Integral((WC('a', S(1))*cosh(v_) + WC('b', S(1))*sinh(v_))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons4, cons1267) rule6086 = ReplacementRule(pattern6086, replacement6086) return [rule5646, rule5647, rule5648, rule5649, rule5650, rule5651, rule5652, rule5653, rule5654, rule5655, rule5656, rule5657, rule5658, rule5659, rule5660, rule5661, rule5662, rule5663, rule5664, rule5665, rule5666, rule5667, rule5668, rule5669, rule5670, rule5671, rule5672, rule5673, rule5674, rule5675, rule5676, rule5677, rule5678, rule5679, rule5680, rule5681, rule5682, rule5683, rule5684, rule5685, rule5686, rule5687, rule5688, rule5689, rule5690, rule5691, rule5692, rule5693, rule5694, rule5695, rule5696, rule5697, rule5698, rule5699, rule5700, rule5701, rule5702, rule5703, rule5704, rule5705, rule5706, rule5707, rule5708, rule5709, rule5710, rule5711, rule5712, rule5713, rule5714, rule5715, rule5716, rule5717, rule5718, rule5719, rule5720, rule5721, rule5722, rule5723, rule5724, rule5725, rule5726, rule5727, rule5728, rule5729, rule5730, rule5731, rule5732, rule5733, rule5734, rule5735, rule5736, rule5737, rule5738, rule5739, rule5740, rule5741, rule5742, rule5743, rule5744, rule5745, rule5746, rule5747, rule5748, rule5749, rule5750, rule5751, rule5752, rule5753, rule5754, rule5755, rule5756, rule5757, rule5758, rule5759, rule5760, rule5761, rule5762, rule5763, rule5764, rule5765, rule5766, rule5767, rule5768, rule5769, rule5770, rule5771, rule5772, rule5773, rule5774, rule5775, rule5776, rule5777, rule5778, rule5779, rule5780, rule5781, rule5782, rule5783, rule5784, rule5785, rule5786, rule5787, rule5788, rule5789, rule5790, rule5791, rule5792, rule5793, rule5794, rule5795, rule5796, rule5797, rule5798, rule5799, rule5800, rule5801, rule5802, rule5803, rule5804, rule5805, rule5806, rule5807, rule5808, rule5809, rule5810, rule5811, rule5812, rule5813, rule5814, rule5815, rule5816, rule5817, rule5818, rule5819, rule5820, rule5821, rule5822, rule5823, rule5824, rule5825, rule5826, rule5827, rule5828, rule5829, rule5830, rule5831, rule5832, rule5833, rule5834, rule5835, rule5836, rule5837, rule5838, rule5839, rule5840, rule5841, rule5842, rule5843, rule5844, rule5845, rule5846, rule5847, rule5848, rule5849, rule5850, rule5851, rule5852, rule5853, rule5854, rule5855, rule5856, rule5857, rule5858, rule5859, rule5860, rule5861, rule5862, rule5863, rule5864, rule5865, rule5866, rule5867, rule5868, rule5869, rule5870, rule5871, rule5872, rule5873, rule5874, rule5875, rule5876, rule5877, rule5878, rule5879, rule5880, rule5881, rule5882, rule5883, rule5884, rule5885, rule5886, rule5887, rule5888, rule5889, rule5890, rule5891, rule5892, rule5893, rule5894, rule5895, rule5896, rule5897, rule5898, rule5899, rule5900, rule5901, rule5902, rule5903, rule5904, rule5905, rule5906, rule5907, rule5908, rule5909, rule5910, rule5911, rule5912, rule5913, rule5914, rule5915, rule5916, rule5917, rule5918, rule5919, rule5920, rule5921, rule5922, rule5923, rule5924, rule5925, rule5926, rule5927, rule5928, rule5929, rule5930, rule5931, rule5932, rule5933, rule5934, rule5935, rule5936, rule5937, rule5938, rule5939, rule5940, rule5941, rule5942, rule5943, rule5944, rule5945, rule5946, rule5947, rule5948, rule5949, rule5950, rule5951, rule5952, rule5953, rule5954, rule5955, rule5956, rule5957, rule5958, rule5959, rule5960, rule5961, rule5962, rule5963, rule5964, rule5965, rule5966, rule5967, rule5968, rule5969, rule5970, rule5971, rule5972, rule5973, rule5974, rule5975, rule5976, rule5977, rule5978, rule5979, rule5980, rule5981, rule5982, rule5983, rule5984, rule5985, rule5986, rule5987, rule5988, rule5989, rule5990, rule5991, rule5992, rule5993, rule5994, rule5995, rule5996, rule5997, rule5998, rule5999, rule6000, rule6001, rule6002, rule6003, rule6004, rule6005, rule6006, rule6007, rule6008, rule6009, rule6010, rule6011, rule6012, rule6013, rule6014, rule6015, rule6016, rule6017, rule6018, rule6019, rule6020, rule6021, rule6022, rule6023, rule6024, rule6025, rule6026, rule6027, rule6028, rule6029, rule6030, rule6031, rule6032, rule6033, rule6034, rule6035, rule6036, rule6037, rule6038, rule6039, rule6040, rule6041, rule6042, rule6043, rule6044, rule6045, rule6046, rule6047, rule6048, rule6049, rule6050, rule6051, rule6052, rule6053, rule6054, rule6055, rule6056, rule6057, rule6058, rule6059, rule6060, rule6061, rule6062, rule6063, rule6064, rule6065, rule6066, rule6067, rule6068, rule6069, rule6070, rule6071, rule6072, rule6073, rule6074, rule6075, rule6076, rule6077, rule6078, rule6079, rule6080, rule6081, rule6082, rule6083, rule6084, rule6085, rule6086, ] def replacement5646(c, d, e, f, m, x): return -Dist(d*m/f, Int((c + d*x)**(m + S(-1))*cosh(e + f*x), x), x) + Simp((c + d*x)**m*cosh(e + f*x)/f, x) def replacement5647(c, d, e, f, m, x): return -Dist(d*m/f, Int((c + d*x)**(m + S(-1))*sinh(e + f*x), x), x) + Simp((c + d*x)**m*sinh(e + f*x)/f, x) def replacement5648(c, d, e, f, m, x): return -Dist(f/(d*(m + S(1))), Int((c + d*x)**(m + S(1))*cosh(e + f*x), x), x) + Simp((c + d*x)**(m + S(1))*sinh(e + f*x)/(d*(m + S(1))), x) def replacement5649(c, d, e, f, m, x): return -Dist(f/(d*(m + S(1))), Int((c + d*x)**(m + S(1))*sinh(e + f*x), x), x) + Simp((c + d*x)**(m + S(1))*cosh(e + f*x)/(d*(m + S(1))), x) def replacement5650(c, d, e, f, x): return Simp(SinhIntegral(e + f*x)/d, x) def replacement5651(c, d, e, f, x): return Simp(CoshIntegral(e + f*x)/d, x) def replacement5652(c, d, e, f, x): return Dist(sinh((-c*f + d*e)/d), Int(cosh(c*f/d + f*x)/(c + d*x), x), x) + Dist(cosh((-c*f + d*e)/d), Int(sinh(c*f/d + f*x)/(c + d*x), x), x) def replacement5653(c, d, e, f, x): return Dist(sinh((-c*f + d*e)/d), Int(sinh(c*f/d + f*x)/(c + d*x), x), x) + Dist(cosh((-c*f + d*e)/d), Int(cosh(c*f/d + f*x)/(c + d*x), x), x) def replacement5654(c, d, e, f, m, x): return -Dist(S(1)/2, Int((c + d*x)**m*exp(-e - f*x), x), x) + Dist(S(1)/2, Int((c + d*x)**m*exp(e + f*x), x), x) def replacement5655(c, d, e, f, m, x): return Dist(S(1)/2, Int((c + d*x)**m*exp(-e - f*x), x), x) + Dist(S(1)/2, Int((c + d*x)**m*exp(e + f*x), x), x) def replacement5656(b, c, d, e, f, n, x): return -Dist(b**S(2)*(n + S(-1))/n, Int((b*sinh(e + f*x))**(n + S(-2))*(c + d*x), x), x) - Simp(d*(b*sinh(e + f*x))**n/(f**S(2)*n**S(2)), x) + Simp(b*(b*sinh(e + f*x))**(n + S(-1))*(c + d*x)*cosh(e + f*x)/(f*n), x) def replacement5657(b, c, d, e, f, n, x): return Dist(b**S(2)*(n + S(-1))/n, Int((b*cosh(e + f*x))**(n + S(-2))*(c + d*x), x), x) - Simp(d*(b*cosh(e + f*x))**n/(f**S(2)*n**S(2)), x) + Simp(b*(b*cosh(e + f*x))**(n + S(-1))*(c + d*x)*sinh(e + f*x)/(f*n), x) def replacement5658(b, c, d, e, f, m, n, x): return -Dist(b**S(2)*(n + S(-1))/n, Int((b*sinh(e + f*x))**(n + S(-2))*(c + d*x)**m, x), x) + Dist(d**S(2)*m*(m + S(-1))/(f**S(2)*n**S(2)), Int((b*sinh(e + f*x))**n*(c + d*x)**(m + S(-2)), x), x) + Simp(b*(b*sinh(e + f*x))**(n + S(-1))*(c + d*x)**m*cosh(e + f*x)/(f*n), x) - Simp(d*m*(b*sinh(e + f*x))**n*(c + d*x)**(m + S(-1))/(f**S(2)*n**S(2)), x) def replacement5659(b, c, d, e, f, m, n, x): return Dist(b**S(2)*(n + S(-1))/n, Int((b*cosh(e + f*x))**(n + S(-2))*(c + d*x)**m, x), x) + Dist(d**S(2)*m*(m + S(-1))/(f**S(2)*n**S(2)), Int((b*cosh(e + f*x))**n*(c + d*x)**(m + S(-2)), x), x) + Simp(b*(b*cosh(e + f*x))**(n + S(-1))*(c + d*x)**m*sinh(e + f*x)/(f*n), x) - Simp(d*m*(b*cosh(e + f*x))**n*(c + d*x)**(m + S(-1))/(f**S(2)*n**S(2)), x) def replacement5660(c, d, e, f, m, n, x): return Int(ExpandTrigReduce((c + d*x)**m, sinh(e + f*x)**n, x), x) def replacement5661(c, d, e, f, m, n, x): return Int(ExpandTrigReduce((c + d*x)**m, cosh(e + f*x)**n, x), x) def replacement5662(c, d, e, f, m, n, x): return -Dist(f*n/(d*(m + S(1))), Int(ExpandTrigReduce((c + d*x)**(m + S(1)), sinh(e + f*x)**(n + S(-1))*cosh(e + f*x), x), x), x) + Simp((c + d*x)**(m + S(1))*sinh(e + f*x)**n/(d*(m + S(1))), x) def replacement5663(c, d, e, f, m, n, x): return -Dist(f*n/(d*(m + S(1))), Int(ExpandTrigReduce((c + d*x)**(m + S(1)), sinh(e + f*x)*cosh(e + f*x)**(n + S(-1)), x), x), x) + Simp((c + d*x)**(m + S(1))*cosh(e + f*x)**n/(d*(m + S(1))), x) def replacement5664(b, c, d, e, f, m, n, x): return Dist(f**S(2)*n**S(2)/(d**S(2)*(m + S(1))*(m + S(2))), Int((b*sinh(e + f*x))**n*(c + d*x)**(m + S(2)), x), x) + Dist(b**S(2)*f**S(2)*n*(n + S(-1))/(d**S(2)*(m + S(1))*(m + S(2))), Int((b*sinh(e + f*x))**(n + S(-2))*(c + d*x)**(m + S(2)), x), x) + Simp((b*sinh(e + f*x))**n*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) - Simp(b*f*n*(b*sinh(e + f*x))**(n + S(-1))*(c + d*x)**(m + S(2))*cosh(e + f*x)/(d**S(2)*(m + S(1))*(m + S(2))), x) def replacement5665(b, c, d, e, f, m, n, x): return Dist(f**S(2)*n**S(2)/(d**S(2)*(m + S(1))*(m + S(2))), Int((b*cosh(e + f*x))**n*(c + d*x)**(m + S(2)), x), x) - Dist(b**S(2)*f**S(2)*n*(n + S(-1))/(d**S(2)*(m + S(1))*(m + S(2))), Int((b*cosh(e + f*x))**(n + S(-2))*(c + d*x)**(m + S(2)), x), x) + Simp((b*cosh(e + f*x))**n*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) - Simp(b*f*n*(b*cosh(e + f*x))**(n + S(-1))*(c + d*x)**(m + S(2))*sinh(e + f*x)/(d**S(2)*(m + S(1))*(m + S(2))), x) def replacement5666(b, c, d, e, f, n, x): return -Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*sinh(e + f*x))**(n + S(2))*(c + d*x), x), x) - Simp(d*(b*sinh(e + f*x))**(n + S(2))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), x) + Simp((b*sinh(e + f*x))**(n + S(1))*(c + d*x)*cosh(e + f*x)/(b*f*(n + S(1))), x) def replacement5667(b, c, d, e, f, n, x): return Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*cosh(e + f*x))**(n + S(2))*(c + d*x), x), x) + Simp(d*(b*cosh(e + f*x))**(n + S(2))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), x) - Simp((b*cosh(e + f*x))**(n + S(1))*(c + d*x)*sinh(e + f*x)/(b*f*(n + S(1))), x) def replacement5668(b, c, d, e, f, m, n, x): return -Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*sinh(e + f*x))**(n + S(2))*(c + d*x)**m, x), x) + Dist(d**S(2)*m*(m + S(-1))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), Int((b*sinh(e + f*x))**(n + S(2))*(c + d*x)**(m + S(-2)), x), x) + Simp((b*sinh(e + f*x))**(n + S(1))*(c + d*x)**m*cosh(e + f*x)/(b*f*(n + S(1))), x) - Simp(d*m*(b*sinh(e + f*x))**(n + S(2))*(c + d*x)**(m + S(-1))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), x) def replacement5669(b, c, d, e, f, m, n, x): return Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*cosh(e + f*x))**(n + S(2))*(c + d*x)**m, x), x) - Dist(d**S(2)*m*(m + S(-1))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), Int((b*cosh(e + f*x))**(n + S(2))*(c + d*x)**(m + S(-2)), x), x) - Simp((b*cosh(e + f*x))**(n + S(1))*(c + d*x)**m*sinh(e + f*x)/(b*f*(n + S(1))), x) + Simp(d*m*(b*cosh(e + f*x))**(n + S(2))*(c + d*x)**(m + S(-1))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), x) def replacement5670(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b*sinh(e + f*x))**n, x), x) def replacement5671(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b*cosh(e + f*x))**n, x), x) def replacement5672(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**n, Int((c + d*x)**m*cosh(-Pi*a/(S(4)*b) + e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement5673(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**IntPart(n)*(a + b*sinh(e + f*x))**FracPart(n)*cosh(-Pi*a/(S(4)*b) + e/S(2) + f*x/S(2))**(-S(2)*FracPart(n)), Int((c + d*x)**m*cosh(-Pi*a/(S(4)*b) + e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement5674(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**n, Int((c + d*x)**m*cosh(e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement5675(a, b, c, d, e, f, m, n, x): return Dist((-S(2)*a)**n, Int((c + d*x)**m*sinh(e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement5676(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**IntPart(n)*(a + b*cosh(e + f*x))**FracPart(n)*cosh(e/S(2) + f*x/S(2))**(-S(2)*FracPart(n)), Int((c + d*x)**m*cosh(e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement5677(a, b, c, d, e, f, m, n, x): return Dist((-S(2)*a)**IntPart(n)*(a + b*cosh(e + f*x))**FracPart(n)*sinh(e/S(2) + f*x/S(2))**(-S(2)*FracPart(n)), Int((c + d*x)**m*sinh(e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement5678(a, b, c, d, e, f, m, x): return Dist(S(-2), Int((c + d*x)**m*exp(e + f*x)/(-S(2)*a*exp(e + f*x) - b*exp(S(2)*e + S(2)*f*x) + b), x), x) def replacement5679(a, b, c, d, e, f, m, x): return Dist(S(2), Int((c + d*x)**m*exp(e + f*x)/(S(2)*a*exp(e + f*x) + b*exp(S(2)*e + S(2)*f*x) + b), x), x) def replacement5680(a, b, c, d, e, f, m, x): return Dist(a/(a**S(2) + b**S(2)), Int((c + d*x)**m/(a + b*sinh(e + f*x)), x), x) + Dist(b*d*m/(f*(a**S(2) + b**S(2))), Int((c + d*x)**(m + S(-1))*cosh(e + f*x)/(a + b*sinh(e + f*x)), x), x) - Simp(b*(c + d*x)**m*cosh(e + f*x)/(f*(a + b*sinh(e + f*x))*(a**S(2) + b**S(2))), x) def replacement5681(a, b, c, d, e, f, m, x): return Dist(a/(a**S(2) - b**S(2)), Int((c + d*x)**m/(a + b*cosh(e + f*x)), x), x) + Dist(b*d*m/(f*(a**S(2) - b**S(2))), Int((c + d*x)**(m + S(-1))*sinh(e + f*x)/(a + b*cosh(e + f*x)), x), x) - Simp(b*(c + d*x)**m*sinh(e + f*x)/(f*(a + b*cosh(e + f*x))*(a**S(2) - b**S(2))), x) def replacement5682(a, b, c, d, e, f, m, n, x): return Dist(a/(a**S(2) + b**S(2)), Int((a + b*sinh(e + f*x))**(n + S(1))*(c + d*x)**m, x), x) - Dist(b*(n + S(2))/((a**S(2) + b**S(2))*(n + S(1))), Int((a + b*sinh(e + f*x))**(n + S(1))*(c + d*x)**m*sinh(e + f*x), x), x) - Dist(b*d*m/(f*(a**S(2) + b**S(2))*(n + S(1))), Int((a + b*sinh(e + f*x))**(n + S(1))*(c + d*x)**(m + S(-1))*cosh(e + f*x), x), x) + Simp(b*(a + b*sinh(e + f*x))**(n + S(1))*(c + d*x)**m*cosh(e + f*x)/(f*(a**S(2) + b**S(2))*(n + S(1))), x) def replacement5683(a, b, c, d, e, f, m, n, x): return Dist(a/(a**S(2) - b**S(2)), Int((a + b*cosh(e + f*x))**(n + S(1))*(c + d*x)**m, x), x) - Dist(b*(n + S(2))/((a**S(2) - b**S(2))*(n + S(1))), Int((a + b*cosh(e + f*x))**(n + S(1))*(c + d*x)**m*cosh(e + f*x), x), x) - Dist(b*d*m/(f*(a**S(2) - b**S(2))*(n + S(1))), Int((a + b*cosh(e + f*x))**(n + S(1))*(c + d*x)**(m + S(-1))*sinh(e + f*x), x), x) + Simp(b*(a + b*cosh(e + f*x))**(n + S(1))*(c + d*x)**m*sinh(e + f*x)/(f*(a**S(2) - b**S(2))*(n + S(1))), x) def replacement5684(a, b, m, n, u, v, x): return Int((a + b*sinh(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement5685(a, b, m, n, u, v, x): return Int((a + b*cosh(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement5686(a, b, c, d, e, f, m, n, x): return Int((a + b*sinh(e + f*x))**n*(c + d*x)**m, x) def replacement5687(a, b, c, d, e, f, m, n, x): return Int((a + b*cosh(e + f*x))**n*(c + d*x)**m, x) def replacement5688(a, b, c, d, n, p, x): return Int(ExpandIntegrand(sinh(c + d*x), (a + b*x**n)**p, x), x) def replacement5689(a, b, c, d, n, p, x): return Int(ExpandIntegrand(cosh(c + d*x), (a + b*x**n)**p, x), x) def replacement5690(a, b, c, d, n, p, x): return -Dist(d/(b*n*(p + S(1))), Int(x**(S(1) - n)*(a + b*x**n)**(p + S(1))*cosh(c + d*x), x), x) - Dist((S(1) - n)/(b*n*(p + S(1))), Int(x**(-n)*(a + b*x**n)**(p + S(1))*sinh(c + d*x), x), x) + Simp(x**(S(1) - n)*(a + b*x**n)**(p + S(1))*sinh(c + d*x)/(b*n*(p + S(1))), x) def replacement5691(a, b, c, d, n, p, x): return -Dist(d/(b*n*(p + S(1))), Int(x**(S(1) - n)*(a + b*x**n)**(p + S(1))*sinh(c + d*x), x), x) - Dist((S(1) - n)/(b*n*(p + S(1))), Int(x**(-n)*(a + b*x**n)**(p + S(1))*cosh(c + d*x), x), x) + Simp(x**(S(1) - n)*(a + b*x**n)**(p + S(1))*cosh(c + d*x)/(b*n*(p + S(1))), x) def replacement5692(a, b, c, d, n, p, x): return Int(ExpandIntegrand(sinh(c + d*x), (a + b*x**n)**p, x), x) def replacement5693(a, b, c, d, n, p, x): return Int(ExpandIntegrand(cosh(c + d*x), (a + b*x**n)**p, x), x) def replacement5694(a, b, c, d, n, p, x): return Int(x**(n*p)*(a*x**(-n) + b)**p*sinh(c + d*x), x) def replacement5695(a, b, c, d, n, p, x): return Int(x**(n*p)*(a*x**(-n) + b)**p*cosh(c + d*x), x) def replacement5696(a, b, c, d, n, p, x): return Int((a + b*x**n)**p*sinh(c + d*x), x) def replacement5697(a, b, c, d, n, p, x): return Int((a + b*x**n)**p*cosh(c + d*x), x) def replacement5698(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(sinh(c + d*x), (e*x)**m*(a + b*x**n)**p, x), x) def replacement5699(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(cosh(c + d*x), (e*x)**m*(a + b*x**n)**p, x), x) def replacement5700(a, b, c, d, e, m, n, p, x): return -Dist(d*e**m/(b*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*cosh(c + d*x), x), x) + Simp(e**m*(a + b*x**n)**(p + S(1))*sinh(c + d*x)/(b*n*(p + S(1))), x) def replacement5701(a, b, c, d, e, m, n, p, x): return -Dist(d*e**m/(b*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*sinh(c + d*x), x), x) + Simp(e**m*(a + b*x**n)**(p + S(1))*cosh(c + d*x)/(b*n*(p + S(1))), x) def replacement5702(a, b, c, d, m, n, p, x): return -Dist(d/(b*n*(p + S(1))), Int(x**(m - n + S(1))*(a + b*x**n)**(p + S(1))*cosh(c + d*x), x), x) - Dist((m - n + S(1))/(b*n*(p + S(1))), Int(x**(m - n)*(a + b*x**n)**(p + S(1))*sinh(c + d*x), x), x) + Simp(x**(m - n + S(1))*(a + b*x**n)**(p + S(1))*sinh(c + d*x)/(b*n*(p + S(1))), x) def replacement5703(a, b, c, d, m, n, p, x): return -Dist(d/(b*n*(p + S(1))), Int(x**(m - n + S(1))*(a + b*x**n)**(p + S(1))*sinh(c + d*x), x), x) - Dist((m - n + S(1))/(b*n*(p + S(1))), Int(x**(m - n)*(a + b*x**n)**(p + S(1))*cosh(c + d*x), x), x) + Simp(x**(m - n + S(1))*(a + b*x**n)**(p + S(1))*cosh(c + d*x)/(b*n*(p + S(1))), x) def replacement5704(a, b, c, d, m, n, p, x): return Int(ExpandIntegrand(sinh(c + d*x), x**m*(a + b*x**n)**p, x), x) def replacement5705(a, b, c, d, m, n, p, x): return Int(ExpandIntegrand(cosh(c + d*x), x**m*(a + b*x**n)**p, x), x) def replacement5706(a, b, c, d, m, n, p, x): return Int(x**(m + n*p)*(a*x**(-n) + b)**p*sinh(c + d*x), x) def replacement5707(a, b, c, d, m, n, p, x): return Int(x**(m + n*p)*(a*x**(-n) + b)**p*cosh(c + d*x), x) def replacement5708(a, b, c, d, e, m, n, p, x): return Int((e*x)**m*(a + b*x**n)**p*sinh(c + d*x), x) def replacement5709(a, b, c, d, e, m, n, p, x): return Int((e*x)**m*(a + b*x**n)**p*cosh(c + d*x), x) def replacement5710(c, d, n, x): return -Dist(S(1)/2, Int(exp(-c - d*x**n), x), x) + Dist(S(1)/2, Int(exp(c + d*x**n), x), x) def replacement5711(c, d, n, x): return Dist(S(1)/2, Int(exp(-c - d*x**n), x), x) + Dist(S(1)/2, Int(exp(c + d*x**n), x), x) def replacement5712(a, b, c, d, n, p, x): return Int(ExpandTrigReduce((a + b*sinh(c + d*x**n))**p, x), x) def replacement5713(a, b, c, d, n, p, x): return Int(ExpandTrigReduce((a + b*cosh(c + d*x**n))**p, x), x) def replacement5714(a, b, c, d, n, p, x): return -Subst(Int((a + b*sinh(c + d*x**(-n)))**p/x**S(2), x), x, S(1)/x) def replacement5715(a, b, c, d, n, p, x): return -Subst(Int((a + b*cosh(c + d*x**(-n)))**p/x**S(2), x), x, S(1)/x) def With5716(a, b, c, d, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k + S(-1))*(a + b*sinh(c + d*x**(k*n)))**p, x), x, x**(S(1)/k)), x) def With5717(a, b, c, d, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k + S(-1))*(a + b*cosh(c + d*x**(k*n)))**p, x), x, x**(S(1)/k)), x) def replacement5718(c, d, n, x): return -Dist(S(1)/2, Int(exp(-c - d*x**n), x), x) + Dist(S(1)/2, Int(exp(c + d*x**n), x), x) def replacement5719(c, d, n, x): return Dist(S(1)/2, Int(exp(-c - d*x**n), x), x) + Dist(S(1)/2, Int(exp(c + d*x**n), x), x) def replacement5720(a, b, c, d, n, p, x): return Int(ExpandTrigReduce((a + b*sinh(c + d*x**n))**p, x), x) def replacement5721(a, b, c, d, n, p, x): return Int(ExpandTrigReduce((a + b*cosh(c + d*x**n))**p, x), x) def replacement5722(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*sinh(c + d*x**n))**p, x), x, u), x) def replacement5723(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*cosh(c + d*x**n))**p, x), x, u), x) def replacement5724(a, b, c, d, n, p, u, x): return Int((a + b*sinh(c + d*u**n))**p, x) def replacement5725(a, b, c, d, n, p, u, x): return Int((a + b*cosh(c + d*u**n))**p, x) def replacement5726(a, b, p, u, x): return Int((a + b*sinh(ExpandToSum(u, x)))**p, x) def replacement5727(a, b, p, u, x): return Int((a + b*cosh(ExpandToSum(u, x)))**p, x) def replacement5728(d, n, x): return Simp(SinhIntegral(d*x**n)/n, x) def replacement5729(d, n, x): return Simp(CoshIntegral(d*x**n)/n, x) def replacement5730(c, d, n, x): return Dist(sinh(c), Int(cosh(d*x**n)/x, x), x) + Dist(cosh(c), Int(sinh(d*x**n)/x, x), x) def replacement5731(c, d, n, x): return Dist(sinh(c), Int(sinh(d*x**n)/x, x), x) + Dist(cosh(c), Int(cosh(d*x**n)/x, x), x) def With5732(a, b, c, d, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False mn = (m + S(1))/n if And(IntegerQ(mn), Or(Equal(p, S(1)), Greater(mn, S(0)))): return True return False def replacement5732(a, b, c, d, m, n, p, x): mn = (m + S(1))/n return Dist(S(1)/n, Subst(Int(x**(mn + S(-1))*(a + b*sinh(c + d*x))**p, x), x, x**n), x) def With5733(a, b, c, d, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False mn = (m + S(1))/n if And(IntegerQ(mn), Or(Equal(p, S(1)), Greater(mn, S(0)))): return True return False def replacement5733(a, b, c, d, m, n, p, x): mn = (m + S(1))/n return Dist(S(1)/n, Subst(Int(x**(mn + S(-1))*(a + b*cosh(c + d*x))**p, x), x, x**n), x) def With5734(a, b, c, d, e, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False mn = (m + S(1))/n if And(IntegerQ(mn), Or(Equal(p, S(1)), Greater(mn, S(0)))): return True return False def replacement5734(a, b, c, d, e, m, n, p, x): mn = (m + S(1))/n return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*sinh(c + d*x**n))**p, x), x) def With5735(a, b, c, d, e, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False mn = (m + S(1))/n if And(IntegerQ(mn), Or(Equal(p, S(1)), Greater(mn, S(0)))): return True return False def replacement5735(a, b, c, d, e, m, n, p, x): mn = (m + S(1))/n return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*cosh(c + d*x**n))**p, x), x) def replacement5736(c, d, e, m, n, x): return -Dist(e**n*(m - n + S(1))/(d*n), Int((e*x)**(m - n)*cosh(c + d*x**n), x), x) + Simp(e**(n + S(-1))*(e*x)**(m - n + S(1))*cosh(c + d*x**n)/(d*n), x) def replacement5737(c, d, e, m, n, x): return -Dist(e**n*(m - n + S(1))/(d*n), Int((e*x)**(m - n)*sinh(c + d*x**n), x), x) + Simp(e**(n + S(-1))*(e*x)**(m - n + S(1))*sinh(c + d*x**n)/(d*n), x) def replacement5738(c, d, e, m, n, x): return -Dist(d*e**(-n)*n/(m + S(1)), Int((e*x)**(m + n)*cosh(c + d*x**n), x), x) + Simp((e*x)**(m + S(1))*sinh(c + d*x**n)/(e*(m + S(1))), x) def replacement5739(c, d, e, m, n, x): return -Dist(d*e**(-n)*n/(m + S(1)), Int((e*x)**(m + n)*sinh(c + d*x**n), x), x) + Simp((e*x)**(m + S(1))*cosh(c + d*x**n)/(e*(m + S(1))), x) def replacement5740(c, d, e, m, n, x): return -Dist(S(1)/2, Int((e*x)**m*exp(-c - d*x**n), x), x) + Dist(S(1)/2, Int((e*x)**m*exp(c + d*x**n), x), x) def replacement5741(c, d, e, m, n, x): return Dist(S(1)/2, Int((e*x)**m*exp(-c - d*x**n), x), x) + Dist(S(1)/2, Int((e*x)**m*exp(c + d*x**n), x), x) def replacement5742(a, b, m, n, p, x): return Dist(b*n*p/(n + S(-1)), Int(sinh(a + b*x**n)**(p + S(-1))*cosh(a + b*x**n), x), x) - Simp(x**(S(1) - n)*sinh(a + b*x**n)**p/(n + S(-1)), x) def replacement5743(a, b, m, n, p, x): return Dist(b*n*p/(n + S(-1)), Int(sinh(a + b*x**n)*cosh(a + b*x**n)**(p + S(-1)), x), x) - Simp(x**(S(1) - n)*cosh(a + b*x**n)**p/(n + S(-1)), x) def replacement5744(a, b, m, n, p, x): return -Dist((p + S(-1))/p, Int(x**m*sinh(a + b*x**n)**(p + S(-2)), x), x) - Simp(sinh(a + b*x**n)**p/(b**S(2)*n*p**S(2)), x) + Simp(x**n*sinh(a + b*x**n)**(p + S(-1))*cosh(a + b*x**n)/(b*n*p), x) def replacement5745(a, b, m, n, p, x): return Dist((p + S(-1))/p, Int(x**m*cosh(a + b*x**n)**(p + S(-2)), x), x) - Simp(cosh(a + b*x**n)**p/(b**S(2)*n*p**S(2)), x) + Simp(x**n*sinh(a + b*x**n)*cosh(a + b*x**n)**(p + S(-1))/(b*n*p), x) def replacement5746(a, b, m, n, p, x): return -Dist((p + S(-1))/p, Int(x**m*sinh(a + b*x**n)**(p + S(-2)), x), x) + Dist((m - S(2)*n + S(1))*(m - n + S(1))/(b**S(2)*n**S(2)*p**S(2)), Int(x**(m - S(2)*n)*sinh(a + b*x**n)**p, x), x) - Simp(x**(m - S(2)*n + S(1))*(m - n + S(1))*sinh(a + b*x**n)**p/(b**S(2)*n**S(2)*p**S(2)), x) + Simp(x**(m - n + S(1))*sinh(a + b*x**n)**(p + S(-1))*cosh(a + b*x**n)/(b*n*p), x) def replacement5747(a, b, m, n, p, x): return Dist((p + S(-1))/p, Int(x**m*cosh(a + b*x**n)**(p + S(-2)), x), x) + Dist((m - S(2)*n + S(1))*(m - n + S(1))/(b**S(2)*n**S(2)*p**S(2)), Int(x**(m - S(2)*n)*cosh(a + b*x**n)**p, x), x) - Simp(x**(m - S(2)*n + S(1))*(m - n + S(1))*cosh(a + b*x**n)**p/(b**S(2)*n**S(2)*p**S(2)), x) + Simp(x**(m - n + S(1))*sinh(a + b*x**n)*cosh(a + b*x**n)**(p + S(-1))/(b*n*p), x) def replacement5748(a, b, m, n, p, x): return Dist(b**S(2)*n**S(2)*p**S(2)/((m + S(1))*(m + n + S(1))), Int(x**(m + S(2)*n)*sinh(a + b*x**n)**p, x), x) + Dist(b**S(2)*n**S(2)*p*(p + S(-1))/((m + S(1))*(m + n + S(1))), Int(x**(m + S(2)*n)*sinh(a + b*x**n)**(p + S(-2)), x), x) + Simp(x**(m + S(1))*sinh(a + b*x**n)**p/(m + S(1)), x) - Simp(b*n*p*x**(m + n + S(1))*sinh(a + b*x**n)**(p + S(-1))*cosh(a + b*x**n)/((m + S(1))*(m + n + S(1))), x) def replacement5749(a, b, m, n, p, x): return Dist(b**S(2)*n**S(2)*p**S(2)/((m + S(1))*(m + n + S(1))), Int(x**(m + S(2)*n)*cosh(a + b*x**n)**p, x), x) - Dist(b**S(2)*n**S(2)*p*(p + S(-1))/((m + S(1))*(m + n + S(1))), Int(x**(m + S(2)*n)*cosh(a + b*x**n)**(p + S(-2)), x), x) + Simp(x**(m + S(1))*cosh(a + b*x**n)**p/(m + S(1)), x) - Simp(b*n*p*x**(m + n + S(1))*sinh(a + b*x**n)*cosh(a + b*x**n)**(p + S(-1))/((m + S(1))*(m + n + S(1))), x) def With5750(a, b, c, d, e, m, n, p, x): k = Denominator(m) return Dist(k/e, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*sinh(c + d*e**(-n)*x**(k*n)))**p, x), x, (e*x)**(S(1)/k)), x) def With5751(a, b, c, d, e, m, n, p, x): k = Denominator(m) return Dist(k/e, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*cosh(c + d*e**(-n)*x**(k*n)))**p, x), x, (e*x)**(S(1)/k)), x) def replacement5752(a, b, c, d, e, m, n, p, x): return Int(ExpandTrigReduce((e*x)**m, (a + b*sinh(c + d*x**n))**p, x), x) def replacement5753(a, b, c, d, e, m, n, p, x): return Int(ExpandTrigReduce((e*x)**m, (a + b*cosh(c + d*x**n))**p, x), x) def replacement5754(a, b, m, n, p, x): return -Dist((p + S(2))/(p + S(1)), Int(x**m*sinh(a + b*x**n)**(p + S(2)), x), x) - Simp(sinh(a + b*x**n)**(p + S(2))/(b**S(2)*n*(p + S(1))*(p + S(2))), x) + Simp(x**n*sinh(a + b*x**n)**(p + S(1))*cosh(a + b*x**n)/(b*n*(p + S(1))), x) def replacement5755(a, b, m, n, p, x): return Dist((p + S(2))/(p + S(1)), Int(x**m*cosh(a + b*x**n)**(p + S(2)), x), x) + Simp(cosh(a + b*x**n)**(p + S(2))/(b**S(2)*n*(p + S(1))*(p + S(2))), x) - Simp(x**n*sinh(a + b*x**n)*cosh(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement5756(a, b, m, n, p, x): return -Dist((p + S(2))/(p + S(1)), Int(x**m*sinh(a + b*x**n)**(p + S(2)), x), x) + Dist((m - S(2)*n + S(1))*(m - n + S(1))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(x**(m - S(2)*n)*sinh(a + b*x**n)**(p + S(2)), x), x) + Simp(x**(m - n + S(1))*sinh(a + b*x**n)**(p + S(1))*cosh(a + b*x**n)/(b*n*(p + S(1))), x) - Simp(x**(m - S(2)*n + S(1))*(m - n + S(1))*sinh(a + b*x**n)**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) def replacement5757(a, b, m, n, p, x): return Dist((p + S(2))/(p + S(1)), Int(x**m*cosh(a + b*x**n)**(p + S(2)), x), x) - Dist((m - S(2)*n + S(1))*(m - n + S(1))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(x**(m - S(2)*n)*cosh(a + b*x**n)**(p + S(2)), x), x) - Simp(x**(m - n + S(1))*sinh(a + b*x**n)*cosh(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) + Simp(x**(m - S(2)*n + S(1))*(m - n + S(1))*cosh(a + b*x**n)**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) def replacement5758(a, b, c, d, m, n, p, x): return -Subst(Int(x**(-m + S(-2))*(a + b*sinh(c + d*x**(-n)))**p, x), x, S(1)/x) def replacement5759(a, b, c, d, m, n, p, x): return -Subst(Int(x**(-m + S(-2))*(a + b*cosh(c + d*x**(-n)))**p, x), x, S(1)/x) def With5760(a, b, c, d, e, m, n, p, x): k = Denominator(m) return -Dist(k/e, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a + b*sinh(c + d*e**(-n)*x**(-k*n)))**p, x), x, (e*x)**(-S(1)/k)), x) def With5761(a, b, c, d, e, m, n, p, x): k = Denominator(m) return -Dist(k/e, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a + b*cosh(c + d*e**(-n)*x**(-k*n)))**p, x), x, (e*x)**(-S(1)/k)), x) def replacement5762(a, b, c, d, e, m, n, p, x): return -Dist((e*x)**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(a + b*sinh(c + d*x**(-n)))**p, x), x, S(1)/x), x) def replacement5763(a, b, c, d, e, m, n, p, x): return -Dist((e*x)**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(a + b*cosh(c + d*x**(-n)))**p, x), x, S(1)/x), x) def With5764(a, b, c, d, m, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*sinh(c + d*x**(k*n)))**p, x), x, x**(S(1)/k)), x) def With5765(a, b, c, d, m, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*cosh(c + d*x**(k*n)))**p, x), x, x**(S(1)/k)), x) def replacement5766(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*sinh(c + d*x**n))**p, x), x) def replacement5767(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*cosh(c + d*x**n))**p, x), x) def replacement5768(a, b, c, d, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*sinh(c + d*x**(n/(m + S(1)))))**p, x), x, x**(m + S(1))), x) def replacement5769(a, b, c, d, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*cosh(c + d*x**(n/(m + S(1)))))**p, x), x, x**(m + S(1))), x) def replacement5770(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*sinh(c + d*x**n))**p, x), x) def replacement5771(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*cosh(c + d*x**n))**p, x), x) def replacement5772(c, d, e, m, n, x): return -Dist(S(1)/2, Int((e*x)**m*exp(-c - d*x**n), x), x) + Dist(S(1)/2, Int((e*x)**m*exp(c + d*x**n), x), x) def replacement5773(c, d, e, m, n, x): return Dist(S(1)/2, Int((e*x)**m*exp(-c - d*x**n), x), x) + Dist(S(1)/2, Int((e*x)**m*exp(c + d*x**n), x), x) def replacement5774(a, b, c, d, e, m, n, p, x): return Int(ExpandTrigReduce((e*x)**m, (a + b*sinh(c + d*x**n))**p, x), x) def replacement5775(a, b, c, d, e, m, n, p, x): return Int(ExpandTrigReduce((e*x)**m, (a + b*cosh(c + d*x**n))**p, x), x) def replacement5776(a, b, c, d, m, n, p, u, x): return Dist(Coefficient(u, x, S(1))**(-m + S(-1)), Subst(Int((a + b*sinh(c + d*x**n))**p*(x - Coefficient(u, x, S(0)))**m, x), x, u), x) def replacement5777(a, b, c, d, m, n, p, u, x): return Dist(Coefficient(u, x, S(1))**(-m + S(-1)), Subst(Int((a + b*cosh(c + d*x**n))**p*(x - Coefficient(u, x, S(0)))**m, x), x, u), x) def replacement5778(a, b, c, d, e, m, n, p, u, x): return Int((e*x)**m*(a + b*sinh(c + d*u**n))**p, x) def replacement5779(a, b, c, d, e, m, n, p, u, x): return Int((e*x)**m*(a + b*cosh(c + d*u**n))**p, x) def replacement5780(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b*sinh(ExpandToSum(u, x)))**p, x) def replacement5781(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b*cosh(ExpandToSum(u, x)))**p, x) def replacement5782(a, b, m, n, p, x): return Simp(sinh(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement5783(a, b, m, n, p, x): return Simp(cosh(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement5784(a, b, m, n, p, x): return -Dist((m - n + S(1))/(b*n*(p + S(1))), Int(x**(m - n)*sinh(a + b*x**n)**(p + S(1)), x), x) + Simp(x**(m - n + S(1))*sinh(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement5785(a, b, m, n, p, x): return -Dist((m - n + S(1))/(b*n*(p + S(1))), Int(x**(m - n)*cosh(a + b*x**n)**(p + S(1)), x), x) + Simp(x**(m - n + S(1))*cosh(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement5786(a, b, c, x): return -Dist(S(1)/2, Int(exp(-a - b*x - c*x**S(2)), x), x) + Dist(S(1)/2, Int(exp(a + b*x + c*x**S(2)), x), x) def replacement5787(a, b, c, x): return Dist(S(1)/2, Int(exp(-a - b*x - c*x**S(2)), x), x) + Dist(S(1)/2, Int(exp(a + b*x + c*x**S(2)), x), x) def replacement5788(a, b, c, n, x): return Int(ExpandTrigReduce(sinh(a + b*x + c*x**S(2))**n, x), x) def replacement5789(a, b, c, n, x): return Int(ExpandTrigReduce(cosh(a + b*x + c*x**S(2))**n, x), x) def replacement5790(n, v, x): return Int(sinh(ExpandToSum(v, x))**n, x) def replacement5791(n, v, x): return Int(cosh(ExpandToSum(v, x))**n, x) def replacement5792(a, b, c, d, e, x): return Simp(e*cosh(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement5793(a, b, c, d, e, x): return Simp(e*sinh(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement5794(a, b, c, d, e, x): return -Dist((b*e - S(2)*c*d)/(S(2)*c), Int(sinh(a + b*x + c*x**S(2)), x), x) + Simp(e*cosh(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement5795(a, b, c, d, e, x): return -Dist((b*e - S(2)*c*d)/(S(2)*c), Int(cosh(a + b*x + c*x**S(2)), x), x) + Simp(e*sinh(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement5796(a, b, c, d, e, m, x): return -Dist(e**S(2)*(m + S(-1))/(S(2)*c), Int((d + e*x)**(m + S(-2))*cosh(a + b*x + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(-1))*cosh(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement5797(a, b, c, d, e, m, x): return -Dist(e**S(2)*(m + S(-1))/(S(2)*c), Int((d + e*x)**(m + S(-2))*sinh(a + b*x + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(-1))*sinh(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement5798(a, b, c, d, e, m, x): return -Dist((b*e - S(2)*c*d)/(S(2)*c), Int((d + e*x)**(m + S(-1))*sinh(a + b*x + c*x**S(2)), x), x) - Dist(e**S(2)*(m + S(-1))/(S(2)*c), Int((d + e*x)**(m + S(-2))*cosh(a + b*x + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(-1))*cosh(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement5799(a, b, c, d, e, m, x): return -Dist((b*e - S(2)*c*d)/(S(2)*c), Int((d + e*x)**(m + S(-1))*cosh(a + b*x + c*x**S(2)), x), x) - Dist(e**S(2)*(m + S(-1))/(S(2)*c), Int((d + e*x)**(m + S(-2))*sinh(a + b*x + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(-1))*sinh(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement5800(a, b, c, d, e, m, x): return -Dist(S(2)*c/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(2))*cosh(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*sinh(a + b*x + c*x**S(2))/(e*(m + S(1))), x) def replacement5801(a, b, c, d, e, m, x): return -Dist(S(2)*c/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(2))*sinh(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*cosh(a + b*x + c*x**S(2))/(e*(m + S(1))), x) def replacement5802(a, b, c, d, e, m, x): return -Dist(S(2)*c/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(2))*cosh(a + b*x + c*x**S(2)), x), x) - Dist((b*e - S(2)*c*d)/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(1))*cosh(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*sinh(a + b*x + c*x**S(2))/(e*(m + S(1))), x) def replacement5803(a, b, c, d, e, m, x): return -Dist(S(2)*c/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(2))*sinh(a + b*x + c*x**S(2)), x), x) - Dist((b*e - S(2)*c*d)/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(1))*sinh(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*cosh(a + b*x + c*x**S(2))/(e*(m + S(1))), x) def replacement5804(a, b, c, d, e, m, x): return Int((d + e*x)**m*sinh(a + b*x + c*x**S(2)), x) def replacement5805(a, b, c, d, e, m, x): return Int((d + e*x)**m*cosh(a + b*x + c*x**S(2)), x) def replacement5806(a, b, c, d, e, m, n, x): return Int(ExpandTrigReduce((d + e*x)**m, sinh(a + b*x + c*x**S(2))**n, x), x) def replacement5807(a, b, c, d, e, m, n, x): return Int(ExpandTrigReduce((d + e*x)**m, cosh(a + b*x + c*x**S(2))**n, x), x) def replacement5808(m, n, u, v, x): return Int(ExpandToSum(u, x)**m*sinh(ExpandToSum(v, x))**n, x) def replacement5809(m, n, u, v, x): return Int(ExpandToSum(u, x)**m*cosh(ExpandToSum(v, x))**n, x) def replacement5810(a, b, e, f, m, x): return Dist(S(2), Int((a + b*x)**m*exp(S(2)*e + S(2)*f*x)/(exp(S(2)*e + S(2)*f*x) + S(1)), x), x) - Simp((a + b*x)**(m + S(1))/(b*(m + S(1))), x) def replacement5811(a, b, e, f, m, x): return -Dist(S(2), Int((a + b*x)**m*exp(S(2)*e + S(2)*f*x)/(S(1) - exp(S(2)*e + S(2)*f*x)), x), x) - Simp((a + b*x)**(m + S(1))/(b*(m + S(1))), x) def replacement5812(a, b, c, e, f, m, n, x): return Dist(c**S(2), Int((c*tanh(e + f*x))**(n + S(-2))*(a + b*x)**m, x), x) + Dist(b*c*m/(f*(n + S(-1))), Int((c*tanh(e + f*x))**(n + S(-1))*(a + b*x)**(m + S(-1)), x), x) - Simp(c*(c*tanh(e + f*x))**(n + S(-1))*(a + b*x)**m/(f*(n + S(-1))), x) def replacement5813(a, b, c, e, f, m, n, x): return Dist(c**S(2), Int((c/tanh(e + f*x))**(n + S(-2))*(a + b*x)**m, x), x) + Dist(b*c*m/(f*(n + S(-1))), Int((c/tanh(e + f*x))**(n + S(-1))*(a + b*x)**(m + S(-1)), x), x) - Simp(c*(c/tanh(e + f*x))**(n + S(-1))*(a + b*x)**m/(f*(n + S(-1))), x) def replacement5814(a, b, c, e, f, m, n, x): return Dist(c**(S(-2)), Int((c*tanh(e + f*x))**(n + S(2))*(a + b*x)**m, x), x) - Dist(b*m/(c*f*(n + S(1))), Int((c*tanh(e + f*x))**(n + S(1))*(a + b*x)**(m + S(-1)), x), x) + Simp((c*tanh(e + f*x))**(n + S(1))*(a + b*x)**m/(c*f*(n + S(1))), x) def replacement5815(a, b, c, e, f, m, n, x): return Dist(c**(S(-2)), Int((c/tanh(e + f*x))**(n + S(2))*(a + b*x)**m, x), x) - Dist(b*m/(c*f*(n + S(1))), Int((c/tanh(e + f*x))**(n + S(1))*(a + b*x)**(m + S(-1)), x), x) + Simp((c/tanh(e + f*x))**(n + S(1))*(a + b*x)**m/(c*f*(n + S(1))), x) def replacement5816(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b*tanh(e + f*x))**n, x), x) def replacement5817(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b/tanh(e + f*x))**n, x), x) def replacement5818(a, b, c, d, e, f, m, x): return Dist(a*d*m/(S(2)*b*f), Int((c + d*x)**(m + S(-1))/(a + b*tanh(e + f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(S(2)*a*d*(m + S(1))), x) - Simp(a*(c + d*x)**m/(S(2)*b*f*(a + b*tanh(e + f*x))), x) def replacement5819(a, b, c, d, e, f, m, x): return Dist(a*d*m/(S(2)*b*f), Int((c + d*x)**(m + S(-1))/(a + b/tanh(e + f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(S(2)*a*d*(m + S(1))), x) - Simp(a*(c + d*x)**m/(S(2)*b*f*(a + b/tanh(e + f*x))), x) def replacement5820(a, b, c, d, e, f, x): return Dist(f/(a*d), Int(sinh(S(2)*e + S(2)*f*x)/(c + d*x), x), x) - Dist(f/(b*d), Int(cosh(S(2)*e + S(2)*f*x)/(c + d*x), x), x) - Simp(S(1)/(d*(a + b*tanh(e + f*x))*(c + d*x)), x) def replacement5821(a, b, c, d, e, f, x): return -Dist(f/(a*d), Int(sinh(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Dist(f/(b*d), Int(cosh(S(2)*e + S(2)*f*x)/(c + d*x), x), x) - Simp(S(1)/(d*(a + b/tanh(e + f*x))*(c + d*x)), x) def replacement5822(a, b, c, d, e, f, m, x): return Dist(S(2)*b*f/(a*d*(m + S(1))), Int((c + d*x)**(m + S(1))/(a + b*tanh(e + f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(d*(a + b*tanh(e + f*x))*(m + S(1))), x) - Simp(f*(c + d*x)**(m + S(2))/(b*d**S(2)*(m + S(1))*(m + S(2))), x) def replacement5823(a, b, c, d, e, f, m, x): return Dist(S(2)*b*f/(a*d*(m + S(1))), Int((c + d*x)**(m + S(1))/(a + b/tanh(e + f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(d*(a + b/tanh(e + f*x))*(m + S(1))), x) - Simp(f*(c + d*x)**(m + S(2))/(b*d**S(2)*(m + S(1))*(m + S(2))), x) def replacement5824(a, b, c, d, e, f, x): return Dist(S(1)/(S(2)*a), Int(cosh(S(2)*e + S(2)*f*x)/(c + d*x), x), x) - Dist(S(1)/(S(2)*b), Int(sinh(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Simp(log(c + d*x)/(S(2)*a*d), x) def replacement5825(a, b, c, d, e, f, x): return -Dist(S(1)/(S(2)*a), Int(cosh(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Dist(S(1)/(S(2)*b), Int(sinh(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Simp(log(c + d*x)/(S(2)*a*d), x) def replacement5826(a, b, c, d, e, f, m, x): return Dist(S(1)/(S(2)*a), Int((c + d*x)**m*exp(-S(2)*a*(e + f*x)/b), x), x) + Simp((c + d*x)**(m + S(1))/(S(2)*a*d*(m + S(1))), x) def replacement5827(a, b, c, d, e, f, m, x): return -Dist(S(1)/(S(2)*a), Int((c + d*x)**m*exp(-S(2)*a*(e + f*x)/b), x), x) + Simp((c + d*x)**(m + S(1))/(S(2)*a*d*(m + S(1))), x) def replacement5828(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (-sinh(S(2)*e + S(2)*f*x)/(S(2)*b) + cosh(S(2)*e + S(2)*f*x)/(S(2)*a) + S(1)/(S(2)*a))**(-n), x), x) def replacement5829(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (sinh(S(2)*e + S(2)*f*x)/(S(2)*b) - cosh(S(2)*e + S(2)*f*x)/(S(2)*a) + S(1)/(S(2)*a))**(-n), x), x) def replacement5830(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (S(1)/(S(2)*a) + exp(-S(2)*a*(e + f*x)/b)/(S(2)*a))**(-n), x), x) def replacement5831(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (S(1)/(S(2)*a) - exp(-S(2)*a*(e + f*x)/b)/(S(2)*a))**(-n), x), x) def With5832(a, b, c, d, e, f, m, n, x): u = IntHide((a + b*tanh(e + f*x))**n, x) return -Dist(d*m, Int(Dist((c + d*x)**(m + S(-1)), u, x), x), x) + Dist((c + d*x)**m, u, x) def With5833(a, b, c, d, e, f, m, n, x): u = IntHide((a + b/tanh(e + f*x))**n, x) return -Dist(d*m, Int(Dist((c + d*x)**(m + S(-1)), u, x), x), x) + Dist((c + d*x)**m, u, x) def replacement5834(a, b, c, d, e, f, m, x): return -Dist(S(2)*b, Int((c + d*x)**m/(a**S(2) - b**S(2) + (a - b)**S(2)*exp(-S(2)*e - S(2)*f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(d*(a - b)*(m + S(1))), x) def replacement5835(a, b, c, d, e, f, m, x): return Dist(S(2)*b, Int((c + d*x)**m/(a**S(2) - b**S(2) - (a + b)**S(2)*exp(S(2)*e + S(2)*f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(d*(a + b)*(m + S(1))), x) def replacement5836(a, b, c, d, e, f, x): return -Dist(S(1)/(f*(a**S(2) - b**S(2))), Int((-S(2)*a*c*f - S(2)*a*d*f*x + b*d)/(a + b*tanh(e + f*x)), x), x) - Simp((c + d*x)**S(2)/(S(2)*d*(a**S(2) - b**S(2))), x) + Simp(b*(c + d*x)/(f*(a + b*tanh(e + f*x))*(a**S(2) - b**S(2))), x) def replacement5837(a, b, c, d, e, f, x): return -Dist(S(1)/(f*(a**S(2) - b**S(2))), Int((-S(2)*a*c*f - S(2)*a*d*f*x + b*d)/(a + b/tanh(e + f*x)), x), x) - Simp((c + d*x)**S(2)/(S(2)*d*(a**S(2) - b**S(2))), x) + Simp(b*(c + d*x)/(f*(a + b/tanh(e + f*x))*(a**S(2) - b**S(2))), x) def replacement5838(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (-S(2)*b/(a**S(2) - b**S(2) + (a - b)**S(2)*exp(-S(2)*e - S(2)*f*x)) + S(1)/(a - b))**(-n), x), x) def replacement5839(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (S(2)*b/(a**S(2) - b**S(2) - (a + b)**S(2)*exp(S(2)*e + S(2)*f*x)) + S(1)/(a + b))**(-n), x), x) def replacement5840(a, b, m, n, u, v, x): return Int((a + b*tanh(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement5841(a, b, m, n, u, v, x): return Int((a + b/tanh(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement5842(a, b, c, d, e, f, m, n, x): return Int((a + b*tanh(e + f*x))**n*(c + d*x)**m, x) def replacement5843(a, b, c, d, e, f, m, n, x): return Int((a + b/tanh(e + f*x))**n*(c + d*x)**m, x) def replacement5844(a, b, c, d, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + S(1)/n)*(a + b*tanh(c + d*x))**p, x), x, x**n), x) def replacement5845(a, b, c, d, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + S(1)/n)*(a + b/tanh(c + d*x))**p, x), x, x**n), x) def replacement5846(a, b, c, d, n, p, x): return Int((a + b*tanh(c + d*x**n))**p, x) def replacement5847(a, b, c, d, n, p, x): return Int((a + b/tanh(c + d*x**n))**p, x) def replacement5848(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*tanh(c + d*x**n))**p, x), x, u), x) def replacement5849(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b/tanh(c + d*x**n))**p, x), x, u), x) def replacement5850(a, b, p, u, x): return Int((a + b*tanh(ExpandToSum(u, x)))**p, x) def replacement5851(a, b, p, u, x): return Int((a + b/tanh(ExpandToSum(u, x)))**p, x) def replacement5852(a, b, c, d, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b*tanh(c + d*x))**p, x), x, x**n), x) def replacement5853(a, b, c, d, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b/tanh(c + d*x))**p, x), x, x**n), x) def replacement5854(c, d, m, n, x): return Dist((m - n + S(1))/(d*n), Int(x**(m - n)*tanh(c + d*x**n), x), x) + Int(x**m, x) - Simp(x**(m - n + S(1))*tanh(c + d*x**n)/(d*n), x) def replacement5855(c, d, m, n, x): return Dist((m - n + S(1))/(d*n), Int(x**(m - n)/tanh(c + d*x**n), x), x) + Int(x**m, x) - Simp(x**(m - n + S(1))/(d*n*tanh(c + d*x**n)), x) def replacement5856(a, b, c, d, m, n, p, x): return Int(x**m*(a + b*tanh(c + d*x**n))**p, x) def replacement5857(a, b, c, d, m, n, p, x): return Int(x**m*(a + b/tanh(c + d*x**n))**p, x) def replacement5858(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*tanh(c + d*x**n))**p, x), x) def replacement5859(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b/tanh(c + d*x**n))**p, x), x) def replacement5860(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b*tanh(ExpandToSum(u, x)))**p, x) def replacement5861(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b/tanh(ExpandToSum(u, x)))**p, x) def replacement5862(a, b, m, n, p, q, x): return Dist((m - n + S(1))/(b*n*p), Int(x**(m - n)*(S(1)/cosh(a + b*x**n))**p, x), x) - Simp(x**(m - n + S(1))*(S(1)/cosh(a + b*x**n))**p/(b*n*p), x) def replacement5863(a, b, m, n, p, q, x): return Dist((m - n + S(1))/(b*n*p), Int(x**(m - n)*(S(1)/sinh(a + b*x**n))**p, x), x) - Simp(x**(m - n + S(1))*(S(1)/sinh(a + b*x**n))**p/(b*n*p), x) def replacement5864(a, b, c, n, x): return Int(tanh(a + b*x + c*x**S(2))**n, x) def replacement5865(a, b, c, n, x): return Int((S(1)/tanh(a + b*x + c*x**S(2)))**n, x) def replacement5866(a, b, c, d, e, x): return Dist((-b*e + S(2)*c*d)/(S(2)*c), Int(tanh(a + b*x + c*x**S(2)), x), x) + Simp(e*log(cosh(a + b*x + c*x**S(2)))/(S(2)*c), x) def replacement5867(a, b, c, d, e, x): return Dist((-b*e + S(2)*c*d)/(S(2)*c), Int(S(1)/tanh(a + b*x + c*x**S(2)), x), x) + Simp(e*log(sinh(a + b*x + c*x**S(2)))/(S(2)*c), x) def replacement5868(a, b, c, d, e, m, n, x): return Int((d + e*x)**m*tanh(a + b*x + c*x**S(2))**n, x) def replacement5869(a, b, c, d, e, m, n, x): return Int((d + e*x)**m*(S(1)/tanh(a + b*x + c*x**S(2)))**n, x) def replacement5870(a, b, c, d, m, x): return -Dist(I*d*m/b, Int((c + d*x)**(m + S(-1))*log(-I*exp(a + b*x) + S(1)), x), x) + Dist(I*d*m/b, Int((c + d*x)**(m + S(-1))*log(I*exp(a + b*x) + S(1)), x), x) + Simp(S(2)*(c + d*x)**m*ArcTan(exp(a + b*x))/b, x) def replacement5871(a, b, c, d, m, x): return -Dist(d*m/b, Int((c + d*x)**(m + S(-1))*log(S(1) - exp(a + b*x)), x), x) + Dist(d*m/b, Int((c + d*x)**(m + S(-1))*log(exp(a + b*x) + S(1)), x), x) + Simp(-S(2)*(c + d*x)**m*atanh(exp(a + b*x))/b, x) def replacement5872(a, b, c, d, m, x): return -Dist(d*m/b, Int((c + d*x)**(m + S(-1))*tanh(a + b*x), x), x) + Simp((c + d*x)**m*tanh(a + b*x)/b, x) def replacement5873(a, b, c, d, m, x): return Dist(d*m/b, Int((c + d*x)**(m + S(-1))/tanh(a + b*x), x), x) - Simp((c + d*x)**m/(b*tanh(a + b*x)), x) def replacement5874(a, b, c, d, n, x): return Dist((n + S(-2))/(n + S(-1)), Int((c + d*x)*(S(1)/cosh(a + b*x))**(n + S(-2)), x), x) + Simp(d*(S(1)/cosh(a + b*x))**(n + S(-2))/(b**S(2)*(n + S(-2))*(n + S(-1))), x) + Simp((c + d*x)*(S(1)/cosh(a + b*x))**(n + S(-2))*tanh(a + b*x)/(b*(n + S(-1))), x) def replacement5875(a, b, c, d, n, x): return -Dist((n + S(-2))/(n + S(-1)), Int((c + d*x)*(S(1)/sinh(a + b*x))**(n + S(-2)), x), x) - Simp(d*(S(1)/sinh(a + b*x))**(n + S(-2))/(b**S(2)*(n + S(-2))*(n + S(-1))), x) - Simp((c + d*x)*(S(1)/sinh(a + b*x))**(n + S(-2))/(b*(n + S(-1))*tanh(a + b*x)), x) def replacement5876(a, b, c, d, m, n, x): return Dist((n + S(-2))/(n + S(-1)), Int((c + d*x)**m*(S(1)/cosh(a + b*x))**(n + S(-2)), x), x) - Dist(d**S(2)*m*(m + S(-1))/(b**S(2)*(n + S(-2))*(n + S(-1))), Int((c + d*x)**(m + S(-2))*(S(1)/cosh(a + b*x))**(n + S(-2)), x), x) + Simp((c + d*x)**m*(S(1)/cosh(a + b*x))**(n + S(-2))*tanh(a + b*x)/(b*(n + S(-1))), x) + Simp(d*m*(c + d*x)**(m + S(-1))*(S(1)/cosh(a + b*x))**(n + S(-2))/(b**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement5877(a, b, c, d, m, n, x): return -Dist((n + S(-2))/(n + S(-1)), Int((c + d*x)**m*(S(1)/sinh(a + b*x))**(n + S(-2)), x), x) + Dist(d**S(2)*m*(m + S(-1))/(b**S(2)*(n + S(-2))*(n + S(-1))), Int((c + d*x)**(m + S(-2))*(S(1)/sinh(a + b*x))**(n + S(-2)), x), x) - Simp((c + d*x)**m*(S(1)/sinh(a + b*x))**(n + S(-2))/(b*(n + S(-1))*tanh(a + b*x)), x) - Simp(d*m*(c + d*x)**(m + S(-1))*(S(1)/sinh(a + b*x))**(n + S(-2))/(b**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement5878(a, b, c, d, n, x): return Dist((n + S(1))/n, Int((c + d*x)*(S(1)/cosh(a + b*x))**(n + S(2)), x), x) - Simp(d*(S(1)/cosh(a + b*x))**n/(b**S(2)*n**S(2)), x) - Simp((c + d*x)*(S(1)/cosh(a + b*x))**(n + S(1))*sinh(a + b*x)/(b*n), x) def replacement5879(a, b, c, d, n, x): return -Dist((n + S(1))/n, Int((c + d*x)*(S(1)/sinh(a + b*x))**(n + S(2)), x), x) - Simp(d*(S(1)/sinh(a + b*x))**n/(b**S(2)*n**S(2)), x) - Simp((c + d*x)*(S(1)/sinh(a + b*x))**(n + S(1))*cosh(a + b*x)/(b*n), x) def replacement5880(a, b, c, d, m, n, x): return Dist((n + S(1))/n, Int((c + d*x)**m*(S(1)/cosh(a + b*x))**(n + S(2)), x), x) + Dist(d**S(2)*m*(m + S(-1))/(b**S(2)*n**S(2)), Int((c + d*x)**(m + S(-2))*(S(1)/cosh(a + b*x))**n, x), x) - Simp((c + d*x)**m*(S(1)/cosh(a + b*x))**(n + S(1))*sinh(a + b*x)/(b*n), x) - Simp(d*m*(c + d*x)**(m + S(-1))*(S(1)/cosh(a + b*x))**n/(b**S(2)*n**S(2)), x) def replacement5881(a, b, c, d, m, n, x): return -Dist((n + S(1))/n, Int((c + d*x)**m*(S(1)/sinh(a + b*x))**(n + S(2)), x), x) + Dist(d**S(2)*m*(m + S(-1))/(b**S(2)*n**S(2)), Int((c + d*x)**(m + S(-2))*(S(1)/sinh(a + b*x))**n, x), x) - Simp((c + d*x)**m*(S(1)/sinh(a + b*x))**(n + S(1))*cosh(a + b*x)/(b*n), x) - Simp(d*m*(c + d*x)**(m + S(-1))*(S(1)/sinh(a + b*x))**n/(b**S(2)*n**S(2)), x) def replacement5882(a, b, c, d, m, n, x): return Dist((S(1)/cosh(a + b*x))**n*cosh(a + b*x)**n, Int((c + d*x)**m*cosh(a + b*x)**(-n), x), x) def replacement5883(a, b, c, d, m, n, x): return Dist((S(1)/sinh(a + b*x))**n*sinh(a + b*x)**n, Int((c + d*x)**m*sinh(a + b*x)**(-n), x), x) def replacement5884(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b/cosh(e + f*x))**n, x), x) def replacement5885(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b/sinh(e + f*x))**n, x), x) def replacement5886(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a*cosh(e + f*x) + b)**n*cosh(e + f*x)**(-n), x), x) def replacement5887(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a*sinh(e + f*x) + b)**n*sinh(e + f*x)**(-n), x), x) def replacement5888(m, n, u, v, x): return Int((S(1)/cosh(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement5889(m, n, u, v, x): return Int((S(1)/sinh(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement5890(a, b, c, d, m, n, x): return Int((c + d*x)**m*(S(1)/cosh(a + b*x))**n, x) def replacement5891(a, b, c, d, m, n, x): return Int((c + d*x)**m*(S(1)/sinh(a + b*x))**n, x) def replacement5892(a, b, c, d, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + S(1)/n)*(a + b/cosh(c + d*x))**p, x), x, x**n), x) def replacement5893(a, b, c, d, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + S(1)/n)*(a + b/sinh(c + d*x))**p, x), x, x**n), x) def replacement5894(a, b, c, d, n, p, x): return Int((a + b/cosh(c + d*x**n))**p, x) def replacement5895(a, b, c, d, n, p, x): return Int((a + b/sinh(c + d*x**n))**p, x) def replacement5896(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b/cosh(c + d*x**n))**p, x), x, u), x) def replacement5897(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b/sinh(c + d*x**n))**p, x), x, u), x) def replacement5898(a, b, p, u, x): return Int((a + b/cosh(ExpandToSum(u, x)))**p, x) def replacement5899(a, b, p, u, x): return Int((a + b/sinh(ExpandToSum(u, x)))**p, x) def replacement5900(a, b, c, d, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b/cosh(c + d*x))**p, x), x, x**n), x) def replacement5901(a, b, c, d, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b/sinh(c + d*x))**p, x), x, x**n), x) def replacement5902(a, b, c, d, m, n, p, x): return Int(x**m*(a + b/cosh(c + d*x**n))**p, x) def replacement5903(a, b, c, d, m, n, p, x): return Int(x**m*(a + b/sinh(c + d*x**n))**p, x) def replacement5904(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b/cosh(c + d*x**n))**p, x), x) def replacement5905(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b/sinh(c + d*x**n))**p, x), x) def replacement5906(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b/cosh(ExpandToSum(u, x)))**p, x) def replacement5907(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b/sinh(ExpandToSum(u, x)))**p, x) def replacement5908(a, b, m, n, p, x): return Dist((m - n + S(1))/(b*n*(p + S(-1))), Int(x**(m - n)*(S(1)/cosh(a + b*x**n))**(p + S(-1)), x), x) - Simp(x**(m - n + S(1))*(S(1)/cosh(a + b*x**n))**(p + S(-1))/(b*n*(p + S(-1))), x) def replacement5909(a, b, m, n, p, x): return Dist((m - n + S(1))/(b*n*(p + S(-1))), Int(x**(m - n)*(S(1)/sinh(a + b*x**n))**(p + S(-1)), x), x) - Simp(x**(m - n + S(1))*(S(1)/sinh(a + b*x**n))**(p + S(-1))/(b*n*(p + S(-1))), x) def replacement5910(a, b, c, d, m, n, x): return -Dist(d*m/(b*(n + S(1))), Int((c + d*x)**(m + S(-1))*sinh(a + b*x)**(n + S(1)), x), x) + Simp((c + d*x)**m*sinh(a + b*x)**(n + S(1))/(b*(n + S(1))), x) def replacement5911(a, b, c, d, m, n, x): return -Dist(d*m/(b*(n + S(1))), Int((c + d*x)**(m + S(-1))*cosh(a + b*x)**(n + S(1)), x), x) + Simp((c + d*x)**m*cosh(a + b*x)**(n + S(1))/(b*(n + S(1))), x) def replacement5912(a, b, c, d, m, n, p, x): return Int(ExpandTrigReduce((c + d*x)**m, sinh(a + b*x)**n*cosh(a + b*x)**p, x), x) def replacement5913(a, b, c, d, m, n, p, x): return Int((c + d*x)**m*sinh(a + b*x)**n*tanh(a + b*x)**(p + S(-2)), x) - Int((c + d*x)**m*sinh(a + b*x)**(n + S(-2))*tanh(a + b*x)**p, x) def replacement5914(a, b, c, d, m, n, p, x): return Int((c + d*x)**m*(S(1)/tanh(a + b*x))**p*cosh(a + b*x)**(n + S(-2)), x) + Int((c + d*x)**m*(S(1)/tanh(a + b*x))**(p + S(-2))*cosh(a + b*x)**n, x) def replacement5915(a, b, c, d, m, n, p, x): return Dist(d*m/(b*n), Int((c + d*x)**(m + S(-1))*(S(1)/cosh(a + b*x))**n, x), x) - Simp((c + d*x)**m*(S(1)/cosh(a + b*x))**n/(b*n), x) def replacement5916(a, b, c, d, m, n, p, x): return Dist(d*m/(b*n), Int((c + d*x)**(m + S(-1))*(S(1)/sinh(a + b*x))**n, x), x) - Simp((c + d*x)**m*(S(1)/sinh(a + b*x))**n/(b*n), x) def replacement5917(a, b, c, d, m, n, x): return -Dist(d*m/(b*(n + S(1))), Int((c + d*x)**(m + S(-1))*tanh(a + b*x)**(n + S(1)), x), x) + Simp((c + d*x)**m*tanh(a + b*x)**(n + S(1))/(b*(n + S(1))), x) def replacement5918(a, b, c, d, m, n, x): return Dist(d*m/(b*(n + S(1))), Int((c + d*x)**(m + S(-1))*(S(1)/tanh(a + b*x))**(n + S(1)), x), x) - Simp((c + d*x)**m*(S(1)/tanh(a + b*x))**(n + S(1))/(b*(n + S(1))), x) def replacement5919(a, b, c, d, m, p, x): return -Int((c + d*x)**m*tanh(a + b*x)**(p + S(-2))/cosh(a + b*x)**S(3), x) + Int((c + d*x)**m*tanh(a + b*x)**(p + S(-2))/cosh(a + b*x), x) def replacement5920(a, b, c, d, m, n, p, x): return Int((c + d*x)**m*(S(1)/cosh(a + b*x))**n*tanh(a + b*x)**(p + S(-2)), x) - Int((c + d*x)**m*(S(1)/cosh(a + b*x))**(n + S(2))*tanh(a + b*x)**(p + S(-2)), x) def replacement5921(a, b, c, d, m, p, x): return Int((c + d*x)**m*(S(1)/tanh(a + b*x))**(p + S(-2))/sinh(a + b*x)**S(3), x) + Int((c + d*x)**m*(S(1)/tanh(a + b*x))**(p + S(-2))/sinh(a + b*x), x) def replacement5922(a, b, c, d, m, n, p, x): return Int((c + d*x)**m*(S(1)/sinh(a + b*x))**n*(S(1)/tanh(a + b*x))**(p + S(-2)), x) + Int((c + d*x)**m*(S(1)/sinh(a + b*x))**(n + S(2))*(S(1)/tanh(a + b*x))**(p + S(-2)), x) def With5923(a, b, c, d, m, n, p, x): u = IntHide((S(1)/cosh(a + b*x))**n*tanh(a + b*x)**p, x) return -Dist(d*m, Int(u*(c + d*x)**(m + S(-1)), x), x) + Dist((c + d*x)**m, u, x) def With5924(a, b, c, d, m, n, p, x): u = IntHide((S(1)/sinh(a + b*x))**n*(S(1)/tanh(a + b*x))**p, x) return -Dist(d*m, Int(u*(c + d*x)**(m + S(-1)), x), x) + Dist((c + d*x)**m, u, x) def replacement5925(a, b, c, d, m, n, x): return Dist(S(2)**n, Int((c + d*x)**m*(S(1)/sinh(S(2)*a + S(2)*b*x))**n, x), x) def With5926(a, b, c, d, m, n, p, x): u = IntHide((S(1)/sinh(a + b*x))**n*(S(1)/cosh(a + b*x))**p, x) return -Dist(d*m, Int(u*(c + d*x)**(m + S(-1)), x), x) + Dist((c + d*x)**m, u, x) def replacement5927(F, G, m, n, p, u, v, w, x): return Int(ExpandToSum(u, x)**m*F(ExpandToSum(v, x))**n*G(ExpandToSum(v, x))**p, x) def replacement5928(a, b, c, d, e, f, m, n, x): return -Dist(f*m/(b*d*(n + S(1))), Int((a + b*sinh(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) + Simp((a + b*sinh(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement5929(a, b, c, d, e, f, m, n, x): return -Dist(f*m/(b*d*(n + S(1))), Int((a + b*cosh(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) + Simp((a + b*cosh(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement5930(a, b, c, d, e, f, m, n, x): return -Dist(f*m/(b*d*(n + S(1))), Int((a + b*tanh(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) + Simp((a + b*tanh(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement5931(a, b, c, d, e, f, m, n, x): return Dist(f*m/(b*d*(n + S(1))), Int((a + b/tanh(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) - Simp((a + b/tanh(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement5932(a, b, c, d, e, f, m, n, x): return Dist(f*m/(b*d*(n + S(1))), Int((a + b/cosh(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) - Simp((a + b/cosh(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement5933(a, b, c, d, e, f, m, n, x): return Dist(f*m/(b*d*(n + S(1))), Int((a + b/sinh(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) - Simp((a + b/sinh(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement5934(a, b, c, d, e, f, m, p, q, x): return Int(ExpandTrigReduce((e + f*x)**m, sinh(a + b*x)**p*sinh(c + d*x)**q, x), x) def replacement5935(a, b, c, d, e, f, m, p, q, x): return Int(ExpandTrigReduce((e + f*x)**m, cosh(a + b*x)**p*cosh(c + d*x)**q, x), x) def replacement5936(a, b, c, d, e, f, m, p, q, x): return Int(ExpandTrigReduce((e + f*x)**m, sinh(a + b*x)**p*cosh(c + d*x)**q, x), x) def replacement5937(F, G, a, b, c, d, e, f, m, p, q, x): return Int(ExpandTrigExpand((e + f*x)**m*G(c + d*x)**q, F, c + d*x, p, b/d, x), x) def replacement5938(F, a, b, c, d, e, x): return Simp(F**(c*(a + b*x))*e*cosh(d + e*x)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*sinh(d + e*x)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)), x) def replacement5939(F, a, b, c, d, e, x): return Simp(F**(c*(a + b*x))*e*sinh(d + e*x)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*cosh(d + e*x)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)), x) def replacement5940(F, a, b, c, d, e, n, x): return -Dist(e**S(2)*n*(n + S(-1))/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), Int(F**(c*(a + b*x))*sinh(d + e*x)**(n + S(-2)), x), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*sinh(d + e*x)**n/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) + Simp(F**(c*(a + b*x))*e*n*sinh(d + e*x)**(n + S(-1))*cosh(d + e*x)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) def replacement5941(F, a, b, c, d, e, n, x): return Dist(e**S(2)*n*(n + S(-1))/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), Int(F**(c*(a + b*x))*cosh(d + e*x)**(n + S(-2)), x), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*cosh(d + e*x)**n/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) + Simp(F**(c*(a + b*x))*e*n*sinh(d + e*x)*cosh(d + e*x)**(n + S(-1))/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) def replacement5942(F, a, b, c, d, e, n, x): return Simp(F**(c*(a + b*x))*sinh(d + e*x)**(n + S(1))*cosh(d + e*x)/(e*(n + S(1))), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*sinh(d + e*x)**(n + S(2))/(e**S(2)*(n + S(1))*(n + S(2))), x) def replacement5943(F, a, b, c, d, e, n, x): return -Simp(F**(c*(a + b*x))*sinh(d + e*x)*cosh(d + e*x)**(n + S(1))/(e*(n + S(1))), x) + Simp(F**(c*(a + b*x))*b*c*log(F)*cosh(d + e*x)**(n + S(2))/(e**S(2)*(n + S(1))*(n + S(2))), x) def replacement5944(F, a, b, c, d, e, n, x): return -Dist((-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(2))**S(2))/(e**S(2)*(n + S(1))*(n + S(2))), Int(F**(c*(a + b*x))*sinh(d + e*x)**(n + S(2)), x), x) + Simp(F**(c*(a + b*x))*sinh(d + e*x)**(n + S(1))*cosh(d + e*x)/(e*(n + S(1))), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*sinh(d + e*x)**(n + S(2))/(e**S(2)*(n + S(1))*(n + S(2))), x) def replacement5945(F, a, b, c, d, e, n, x): return Dist((-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(2))**S(2))/(e**S(2)*(n + S(1))*(n + S(2))), Int(F**(c*(a + b*x))*cosh(d + e*x)**(n + S(2)), x), x) - Simp(F**(c*(a + b*x))*sinh(d + e*x)*cosh(d + e*x)**(n + S(1))/(e*(n + S(1))), x) + Simp(F**(c*(a + b*x))*b*c*log(F)*cosh(d + e*x)**(n + S(2))/(e**S(2)*(n + S(1))*(n + S(2))), x) def replacement5946(F, a, b, c, d, e, n, x): return Dist((exp(S(2)*d + S(2)*e*x) + S(-1))**(-n)*exp(n*(d + e*x))*sinh(d + e*x)**n, Int(F**(c*(a + b*x))*(exp(S(2)*d + S(2)*e*x) + S(-1))**n*exp(-n*(d + e*x)), x), x) def replacement5947(F, a, b, c, d, e, n, x): return Dist((exp(S(2)*d + S(2)*e*x) + S(1))**(-n)*exp(n*(d + e*x))*cosh(d + e*x)**n, Int(F**(c*(a + b*x))*(exp(S(2)*d + S(2)*e*x) + S(1))**n*exp(-n*(d + e*x)), x), x) def replacement5948(F, a, b, c, d, e, n, x): return Int(ExpandIntegrand(F**(c*(a + b*x))*(exp(S(2)*d + S(2)*e*x) + S(-1))**n*(exp(S(2)*d + S(2)*e*x) + S(1))**(-n), x), x) def replacement5949(F, a, b, c, d, e, n, x): return Int(ExpandIntegrand(F**(c*(a + b*x))*(exp(S(2)*d + S(2)*e*x) + S(-1))**(-n)*(exp(S(2)*d + S(2)*e*x) + S(1))**n, x), x) def replacement5950(F, a, b, c, d, e, n, x): return Dist(e**S(2)*n*(n + S(1))/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), Int(F**(c*(a + b*x))*(S(1)/cosh(d + e*x))**(n + S(2)), x), x) - Simp(F**(c*(a + b*x))*b*c*(S(1)/cosh(d + e*x))**n*log(F)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) - Simp(F**(c*(a + b*x))*e*n*(S(1)/cosh(d + e*x))**(n + S(1))*sinh(d + e*x)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) def replacement5951(F, a, b, c, d, e, n, x): return -Dist(e**S(2)*n*(n + S(1))/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), Int(F**(c*(a + b*x))*(S(1)/sinh(d + e*x))**(n + S(2)), x), x) - Simp(F**(c*(a + b*x))*b*c*(S(1)/sinh(d + e*x))**n*log(F)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) - Simp(F**(c*(a + b*x))*e*n*(S(1)/sinh(d + e*x))**(n + S(1))*cosh(d + e*x)/(-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) def replacement5952(F, a, b, c, d, e, n, x): return Simp(F**(c*(a + b*x))*(S(1)/cosh(d + e*x))**(n + S(-1))*sinh(d + e*x)/(e*(n + S(-1))), x) + Simp(F**(c*(a + b*x))*b*c*(S(1)/cosh(d + e*x))**(n + S(-2))*log(F)/(e**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement5953(F, a, b, c, d, e, n, x): return -Simp(F**(c*(a + b*x))*(S(1)/sinh(d + e*x))**(n + S(-1))*cosh(d + e*x)/(e*(n + S(-1))), x) - Simp(F**(c*(a + b*x))*b*c*(S(1)/sinh(d + e*x))**(n + S(-2))*log(F)/(e**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement5954(F, a, b, c, d, e, n, x): return Dist((-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(-2))**S(2))/(e**S(2)*(n + S(-2))*(n + S(-1))), Int(F**(c*(a + b*x))*(S(1)/cosh(d + e*x))**(n + S(-2)), x), x) + Simp(F**(c*(a + b*x))*(S(1)/cosh(d + e*x))**(n + S(-1))*sinh(d + e*x)/(e*(n + S(-1))), x) + Simp(F**(c*(a + b*x))*b*c*(S(1)/cosh(d + e*x))**(n + S(-2))*log(F)/(e**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement5955(F, a, b, c, d, e, n, x): return -Dist((-b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(-2))**S(2))/(e**S(2)*(n + S(-2))*(n + S(-1))), Int(F**(c*(a + b*x))*(S(1)/sinh(d + e*x))**(n + S(-2)), x), x) - Simp(F**(c*(a + b*x))*(S(1)/sinh(d + e*x))**(n + S(-1))*cosh(d + e*x)/(e*(n + S(-1))), x) - Simp(F**(c*(a + b*x))*b*c*(S(1)/sinh(d + e*x))**(n + S(-2))*log(F)/(e**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement5956(F, a, b, c, d, e, n, x): return Simp(S(2)**n*F**(c*(a + b*x))*Hypergeometric2F1(n, b*c*log(F)/(S(2)*e) + n/S(2), b*c*log(F)/(S(2)*e) + n/S(2) + S(1), -exp(S(2)*d + S(2)*e*x))*exp(n*(d + e*x))/(b*c*log(F) + e*n), x) def replacement5957(F, a, b, c, d, e, n, x): return Simp((S(-2))**n*F**(c*(a + b*x))*Hypergeometric2F1(n, b*c*log(F)/(S(2)*e) + n/S(2), b*c*log(F)/(S(2)*e) + n/S(2) + S(1), exp(S(2)*d + S(2)*e*x))*exp(n*(d + e*x))/(b*c*log(F) + e*n), x) def replacement5958(F, a, b, c, d, e, n, x): return Dist((exp(S(2)*d + S(2)*e*x) + S(1))**n*(S(1)/cosh(d + e*x))**n*exp(-n*(d + e*x)), Int(SimplifyIntegrand(F**(c*(a + b*x))*(exp(S(2)*d + S(2)*e*x) + S(1))**(-n)*exp(n*(d + e*x)), x), x), x) def replacement5959(F, a, b, c, d, e, n, x): return Dist((S(1) - exp(-S(2)*d - S(2)*e*x))**n*(S(1)/sinh(d + e*x))**n*exp(n*(d + e*x)), Int(SimplifyIntegrand(F**(c*(a + b*x))*(S(1) - exp(-S(2)*d - S(2)*e*x))**(-n)*exp(-n*(d + e*x)), x), x), x) def replacement5960(F, a, b, c, d, e, f, g, n, x): return Dist(S(2)**n*f**n, Int(F**(c*(a + b*x))*cosh(-Pi*f/(S(4)*g) + d/S(2) + e*x/S(2))**(S(2)*n), x), x) def replacement5961(F, a, b, c, d, e, f, g, n, x): return Dist(S(2)**n*g**n, Int(F**(c*(a + b*x))*cosh(d/S(2) + e*x/S(2))**(S(2)*n), x), x) def replacement5962(F, a, b, c, d, e, f, g, n, x): return Dist(S(2)**n*g**n, Int(F**(c*(a + b*x))*sinh(d/S(2) + e*x/S(2))**(S(2)*n), x), x) def replacement5963(F, a, b, c, d, e, f, g, m, n, x): return Dist(g**n, Int(F**(c*(a + b*x))*tanh(-Pi*f/(S(4)*g) + d/S(2) + e*x/S(2))**m, x), x) def replacement5964(F, a, b, c, d, e, f, g, m, n, x): return Dist(g**n, Int(F**(c*(a + b*x))*tanh(d/S(2) + e*x/S(2))**m, x), x) def replacement5965(F, a, b, c, d, e, f, g, m, n, x): return Dist(g**n, Int(F**(c*(a + b*x))*(S(1)/tanh(d/S(2) + e*x/S(2)))**m, x), x) def replacement5966(F, a, b, c, d, e, f, g, h, i, x): return Dist(S(2)*i, Int(F**(c*(a + b*x))*cosh(d + e*x)/(f + g*sinh(d + e*x)), x), x) + Int(F**(c*(a + b*x))*(h - i*cosh(d + e*x))/(f + g*sinh(d + e*x)), x) def replacement5967(F, a, b, c, d, e, f, g, h, i, x): return Dist(S(2)*i, Int(F**(c*(a + b*x))*sinh(d + e*x)/(f + g*cosh(d + e*x)), x), x) + Int(F**(c*(a + b*x))*(h - i*sinh(d + e*x))/(f + g*cosh(d + e*x)), x) def replacement5968(F, G, c, n, u, v, x): return Int(F**(c*ExpandToSum(u, x))*G(ExpandToSum(v, x))**n, x) def With5969(F, a, b, c, d, e, m, n, x): u = IntHide(F**(c*(a + b*x))*sinh(d + e*x)**n, x) return -Dist(m, Int(u*x**(m + S(-1)), x), x) + Simp(u*x**m, x) def With5970(F, a, b, c, d, e, m, n, x): u = IntHide(F**(c*(a + b*x))*cosh(d + e*x)**n, x) return -Dist(m, Int(u*x**(m + S(-1)), x), x) + Simp(u*x**m, x) def replacement5971(F, a, b, c, d, e, f, g, m, n, x): return Int(ExpandTrigReduce(F**(c*(a + b*x)), sinh(d + e*x)**m*cosh(f + g*x)**n, x), x) def replacement5972(F, a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrigReduce(F**(c*(a + b*x))*x**p, sinh(d + e*x)**m*cosh(f + g*x)**n, x), x) def replacement5973(F, G, H, a, b, c, d, e, m, n, x): return Int(ExpandTrigToExp(F**(c*(a + b*x)), G(d + e*x)**m*H(d + e*x)**n, x), x) def replacement5974(F, n, u, v, x): return Int(ExpandTrigToExp(F**u, sinh(v)**n, x), x) def replacement5975(F, n, u, v, x): return Int(ExpandTrigToExp(F**u, cosh(v)**n, x), x) def replacement5976(F, m, n, u, v, x): return Int(ExpandTrigToExp(F**u, sinh(v)**m*cosh(v)**n, x), x) def replacement5977(b, c, n, p, x): return Int(((c*x**n)**b/S(2) - (c*x**n)**(-b)/S(2))**p, x) def replacement5978(b, c, n, p, x): return Int(((c*x**n)**b/S(2) + (c*x**n)**(-b)/S(2))**p, x) def replacement5979(a, b, c, n, p, x): return -Simp(x*(p + S(2))*sinh(a + b*log(c*x**n))**(p + S(2))/(p + S(1)), x) + Simp(x*sinh(a + b*log(c*x**n))**(p + S(2))/(b*n*(p + S(1))*tanh(a + b*log(c*x**n))), x) def replacement5980(a, b, c, n, p, x): return Simp(x*(p + S(2))*cosh(a + b*log(c*x**n))**(p + S(2))/(p + S(1)), x) - Simp(x*cosh(a + b*log(c*x**n))**(p + S(2))*tanh(a + b*log(c*x**n))/(b*n*(p + S(1))), x) def replacement5981(a, b, c, n, x): return Dist(x*sqrt(sinh(a + b*log(c*x**n)))/sqrt((c*x**n)**(S(4)/n)*exp(S(2)*a) + S(-1)), Int(sqrt((c*x**n)**(S(4)/n)*exp(S(2)*a) + S(-1))/x, x), x) def replacement5982(a, b, c, n, x): return Dist(x*sqrt(cosh(a + b*log(c*x**n)))/sqrt((c*x**n)**(S(4)/n)*exp(S(2)*a) + S(1)), Int(sqrt((c*x**n)**(S(4)/n)*exp(S(2)*a) + S(1))/x, x), x) def replacement5983(a, b, c, n, p, x): return Int(ExpandIntegrand(((c*x**n)**(S(1)/(n*p))*exp(a*b*n*p)/(S(2)*b*n*p) - (c*x**n)**(-S(1)/(n*p))*exp(-a*b*n*p)/(S(2)*b*n*p))**p, x), x) def replacement5984(a, b, c, n, p, x): return Int(ExpandIntegrand(((c*x**n)**(S(1)/(n*p))*exp(a*b*n*p)/S(2) + (c*x**n)**(-S(1)/(n*p))*exp(-a*b*n*p)/S(2))**p, x), x) def replacement5985(a, b, c, n, x): return -Simp(x*sinh(a + b*log(c*x**n))/(b**S(2)*n**S(2) + S(-1)), x) + Simp(b*n*x*cosh(a + b*log(c*x**n))/(b**S(2)*n**S(2) + S(-1)), x) def replacement5986(a, b, c, n, x): return -Simp(x*cosh(a + b*log(c*x**n))/(b**S(2)*n**S(2) + S(-1)), x) + Simp(b*n*x*sinh(a + b*log(c*x**n))/(b**S(2)*n**S(2) + S(-1)), x) def replacement5987(a, b, c, n, p, x): return -Dist(b**S(2)*n**S(2)*p*(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + S(-1)), Int(sinh(a + b*log(c*x**n))**(p + S(-2)), x), x) - Simp(x*sinh(a + b*log(c*x**n))**p/(b**S(2)*n**S(2)*p**S(2) + S(-1)), x) + Simp(b*n*p*x*sinh(a + b*log(c*x**n))**(p + S(-1))*cosh(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + S(-1)), x) def replacement5988(a, b, c, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + S(-1)), Int(cosh(a + b*log(c*x**n))**(p + S(-2)), x), x) - Simp(x*cosh(a + b*log(c*x**n))**p/(b**S(2)*n**S(2)*p**S(2) + S(-1)), x) + Simp(b*n*p*x*sinh(a + b*log(c*x**n))*cosh(a + b*log(c*x**n))**(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + S(-1)), x) def replacement5989(a, b, c, n, p, x): return -Dist((b**S(2)*n**S(2)*(p + S(2))**S(2) + S(-1))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(sinh(a + b*log(c*x**n))**(p + S(2)), x), x) - Simp(x*sinh(a + b*log(c*x**n))**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) + Simp(x*sinh(a + b*log(c*x**n))**(p + S(2))/(b*n*(p + S(1))*tanh(a + b*log(c*x**n))), x) def replacement5990(a, b, c, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(2))**S(2) + S(-1))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(cosh(a + b*log(c*x**n))**(p + S(2)), x), x) + Simp(x*cosh(a + b*log(c*x**n))**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) - Simp(x*cosh(a + b*log(c*x**n))**(p + S(2))*tanh(a + b*log(c*x**n))/(b*n*(p + S(1))), x) def replacement5991(a, b, c, n, p, x): return Simp(x*(S(2) - S(2)*(c*x**n)**(-S(2)*b)*exp(-S(2)*a))**(-p)*((c*x**n)**b*exp(a) - (c*x**n)**(-b)*exp(-a))**p*Hypergeometric2F1(-p, -(b*n*p + S(1))/(S(2)*b*n), S(1) - (b*n*p + S(1))/(S(2)*b*n), (c*x**n)**(-S(2)*b)*exp(-S(2)*a))/(b*n*p + S(1)), x) def replacement5992(a, b, c, n, p, x): return Simp(x*(S(2) + S(2)*(c*x**n)**(-S(2)*b)*exp(-S(2)*a))**(-p)*((c*x**n)**b*exp(a) + (c*x**n)**(-b)*exp(-a))**p*Hypergeometric2F1(-p, -(b*n*p + S(1))/(S(2)*b*n), S(1) - (b*n*p + S(1))/(S(2)*b*n), -(c*x**n)**(-S(2)*b)*exp(-S(2)*a))/(b*n*p + S(1)), x) def replacement5993(a, b, c, m, n, p, x): return -Simp(x**(m + S(1))*(p + S(2))*sinh(a + b*log(c*x**n))**(p + S(2))/((m + S(1))*(p + S(1))), x) + Simp(x**(m + S(1))*sinh(a + b*log(c*x**n))**(p + S(2))/(b*n*(p + S(1))*tanh(a + b*log(c*x**n))), x) def replacement5994(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(p + S(2))*cosh(a + b*log(c*x**n))**(p + S(2))/((m + S(1))*(p + S(1))), x) - Simp(x**(m + S(1))*cosh(a + b*log(c*x**n))**(p + S(2))*tanh(a + b*log(c*x**n))/(b*n*(p + S(1))), x) def replacement5995(a, b, c, m, n, p, x): return Dist(S(2)**(-p), Int(ExpandIntegrand(x**m*((c*x**n)**((m + S(1))/(n*p))*(m + S(1))*exp(a*b*n*p/(m + S(1)))/(b*n*p) - (c*x**n)**(-(m + S(1))/(n*p))*(m + S(1))*exp(-a*b*n*p/(m + S(1)))/(b*n*p))**p, x), x), x) def replacement5996(a, b, c, m, n, p, x): return Dist(S(2)**(-p), Int(ExpandIntegrand(x**m*((c*x**n)**((m + S(1))/(n*p))*exp(a*b*n*p/(m + S(1))) + (c*x**n)**(-(m + S(1))/(n*p))*exp(-a*b*n*p/(m + S(1))))**p, x), x), x) def replacement5997(a, b, c, m, n, x): return -Simp(x**(m + S(1))*(m + S(1))*sinh(a + b*log(c*x**n))/(b**S(2)*n**S(2) - (m + S(1))**S(2)), x) + Simp(b*n*x**(m + S(1))*cosh(a + b*log(c*x**n))/(b**S(2)*n**S(2) - (m + S(1))**S(2)), x) def replacement5998(a, b, c, m, n, x): return -Simp(x**(m + S(1))*(m + S(1))*cosh(a + b*log(c*x**n))/(b**S(2)*n**S(2) - (m + S(1))**S(2)), x) + Simp(b*n*x**(m + S(1))*sinh(a + b*log(c*x**n))/(b**S(2)*n**S(2) - (m + S(1))**S(2)), x) def replacement5999(a, b, c, m, n, p, x): return -Dist(b**S(2)*n**S(2)*p*(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), Int(x**m*sinh(a + b*log(c*x**n))**(p + S(-2)), x), x) - Simp(x**(m + S(1))*(m + S(1))*sinh(a + b*log(c*x**n))**p/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), x) + Simp(b*n*p*x**(m + S(1))*sinh(a + b*log(c*x**n))**(p + S(-1))*cosh(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), x) def replacement6000(a, b, c, m, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), Int(x**m*cosh(a + b*log(c*x**n))**(p + S(-2)), x), x) - Simp(x**(m + S(1))*(m + S(1))*cosh(a + b*log(c*x**n))**p/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), x) + Simp(b*n*p*x**(m + S(1))*sinh(a + b*log(c*x**n))*cosh(a + b*log(c*x**n))**(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), x) def replacement6001(a, b, c, m, n, p, x): return -Dist((b**S(2)*n**S(2)*(p + S(2))**S(2) - (m + S(1))**S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(x**m*sinh(a + b*log(c*x**n))**(p + S(2)), x), x) + Simp(x**(m + S(1))*sinh(a + b*log(c*x**n))**(p + S(2))/(b*n*(p + S(1))*tanh(a + b*log(c*x**n))), x) - Simp(x**(m + S(1))*(m + S(1))*sinh(a + b*log(c*x**n))**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) def replacement6002(a, b, c, m, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(2))**S(2) - (m + S(1))**S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(x**m*cosh(a + b*log(c*x**n))**(p + S(2)), x), x) - Simp(x**(m + S(1))*cosh(a + b*log(c*x**n))**(p + S(2))*tanh(a + b*log(c*x**n))/(b*n*(p + S(1))), x) + Simp(x**(m + S(1))*(m + S(1))*cosh(a + b*log(c*x**n))**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) def replacement6003(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(S(2) - S(2)*(c*x**n)**(-S(2)*b)*exp(-S(2)*a))**(-p)*((c*x**n)**b*exp(a) - (c*x**n)**(-b)*exp(-a))**p*Hypergeometric2F1(-p, -(b*n*p + m + S(1))/(S(2)*b*n), S(1) - (b*n*p + m + S(1))/(S(2)*b*n), (c*x**n)**(-S(2)*b)*exp(-S(2)*a))/(b*n*p + m + S(1)), x) def replacement6004(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(S(2) + S(2)*(c*x**n)**(-S(2)*b)*exp(-S(2)*a))**(-p)*((c*x**n)**b*exp(a) + (c*x**n)**(-b)*exp(-a))**p*Hypergeometric2F1(-p, -(b*n*p + m + S(1))/(S(2)*b*n), S(1) - (b*n*p + m + S(1))/(S(2)*b*n), -(c*x**n)**(-S(2)*b)*exp(-S(2)*a))/(b*n*p + m + S(1)), x) def replacement6005(b, c, n, p, x): return Dist(S(2)**p, Int(((c*x**n)**b/((c*x**n)**(S(2)*b) + S(1)))**p, x), x) def replacement6006(b, c, n, p, x): return Dist(S(2)**p, Int(((c*x**n)**b/((c*x**n)**(S(2)*b) + S(-1)))**p, x), x) def replacement6007(a, b, c, n, x): return Dist(S(2)*exp(-a*b*n), Int((c*x**n)**(S(1)/n)/((c*x**n)**(S(2)/n) + exp(-S(2)*a*b*n)), x), x) def replacement6008(a, b, c, n, x): return Dist(-S(2)*b*n*exp(-a*b*n), Int((c*x**n)**(S(1)/n)/(-(c*x**n)**(S(2)/n) + exp(-S(2)*a*b*n)), x), x) def replacement6009(a, b, c, n, p, x): return Simp(x*(p + S(-2))*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2))/(p + S(-1)), x) + Simp(x*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2))*tanh(a + b*log(c*x**n))/(b*n*(p + S(-1))), x) def replacement6010(a, b, c, n, p, x): return -Simp(x*(p + S(-2))*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2))/(p + S(-1)), x) - Simp(x*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2))/(b*n*(p + S(-1))*tanh(a + b*log(c*x**n))), x) def replacement6011(a, b, c, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(-2))**S(2) + S(-1))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), Int((S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2)), x), x) + Simp(x*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), x) + Simp(x*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2))*tanh(a + b*log(c*x**n))/(b*n*(p + S(-1))), x) def replacement6012(a, b, c, n, p, x): return -Dist((b**S(2)*n**S(2)*(p + S(-2))**S(2) + S(-1))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), Int((S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2)), x), x) - Simp(x*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), x) - Simp(x*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2))/(b*n*(p + S(-1))*tanh(a + b*log(c*x**n))), x) def replacement6013(a, b, c, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(1))/(b**S(2)*n**S(2)*p**S(2) + S(-1)), Int((S(1)/cosh(a + b*log(c*x**n)))**(p + S(2)), x), x) - Simp(x*(S(1)/cosh(a + b*log(c*x**n)))**p/(b**S(2)*n**S(2)*p**S(2) + S(-1)), x) - Simp(b*n*p*x*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(1))*sinh(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + S(-1)), x) def replacement6014(a, b, c, n, p, x): return -Dist(b**S(2)*n**S(2)*p*(p + S(1))/(b**S(2)*n**S(2)*p**S(2) + S(-1)), Int((S(1)/sinh(a + b*log(c*x**n)))**(p + S(2)), x), x) - Simp(x*(S(1)/sinh(a + b*log(c*x**n)))**p/(b**S(2)*n**S(2)*p**S(2) + S(-1)), x) - Simp(b*n*p*x*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(1))*cosh(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + S(-1)), x) def replacement6015(a, b, c, n, p, x): return Simp(S(2)**p*x*((c*x**n)**b*exp(a)/((c*x**n)**(S(2)*b)*exp(S(2)*a) + S(1)))**p*((c*x**n)**(S(2)*b)*exp(S(2)*a) + S(1))**p*Hypergeometric2F1(p, (b*n*p + S(1))/(S(2)*b*n), S(1) + (b*n*p + S(1))/(S(2)*b*n), -(c*x**n)**(S(2)*b)*exp(S(2)*a))/(b*n*p + S(1)), x) def replacement6016(a, b, c, n, p, x): return Simp(x*((c*x**n)**b*exp(a)/((c*x**n)**(S(2)*b)*exp(S(2)*a) + S(-1)))**p*(-S(2)*(c*x**n)**(S(2)*b)*exp(S(2)*a) + S(2))**p*Hypergeometric2F1(p, (b*n*p + S(1))/(S(2)*b*n), S(1) + (b*n*p + S(1))/(S(2)*b*n), (c*x**n)**(S(2)*b)*exp(S(2)*a))/(b*n*p + S(1)), x) def replacement6017(b, c, m, n, p, x): return Dist(S(2)**p, Int(x**m*((c*x**n)**b/((c*x**n)**(S(2)*b) + S(1)))**p, x), x) def replacement6018(b, c, m, n, p, x): return Dist(S(2)**p, Int(x**m*((c*x**n)**b/((c*x**n)**(S(2)*b) + S(-1)))**p, x), x) def replacement6019(a, b, c, m, n, x): return Dist(S(2)*exp(-a*b*n/(m + S(1))), Int(x**m*(c*x**n)**((m + S(1))/n)/((c*x**n)**(S(2)*(m + S(1))/n) + exp(-S(2)*a*b*n/(m + S(1)))), x), x) def replacement6020(a, b, c, m, n, x): return Dist(-S(2)*b*n*exp(-a*b*n/(m + S(1)))/(m + S(1)), Int(x**m*(c*x**n)**((m + S(1))/n)/(-(c*x**n)**(S(2)*(m + S(1))/n) + exp(-S(2)*a*b*n/(m + S(1)))), x), x) def replacement6021(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(p + S(-2))*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2))/((m + S(1))*(p + S(-1))), x) + Simp(x**(m + S(1))*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2))*tanh(a + b*log(c*x**n))/(b*n*(p + S(-1))), x) def replacement6022(a, b, c, m, n, p, x): return -Simp(x**(m + S(1))*(p + S(-2))*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2))/((m + S(1))*(p + S(-1))), x) - Simp(x**(m + S(1))*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2))/(b*n*(p + S(-1))*tanh(a + b*log(c*x**n))), x) def replacement6023(a, b, c, m, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(-2))**S(2) - (m + S(1))**S(2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), Int(x**m*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2)), x), x) + Simp(x**(m + S(1))*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2))*tanh(a + b*log(c*x**n))/(b*n*(p + S(-1))), x) + Simp(x**(m + S(1))*(m + S(1))*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(-2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), x) def replacement6024(a, b, c, m, n, p, x): return -Dist((b**S(2)*n**S(2)*(p + S(-2))**S(2) - (m + S(1))**S(2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), Int(x**m*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2)), x), x) - Simp(x**(m + S(1))*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2))/(b*n*(p + S(-1))*tanh(a + b*log(c*x**n))), x) - Simp(x**(m + S(1))*(m + S(1))*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(-2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), x) def replacement6025(a, b, c, m, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(1))/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), Int(x**m*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(2)), x), x) - Simp(x**(m + S(1))*(m + S(1))*(S(1)/cosh(a + b*log(c*x**n)))**p/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), x) - Simp(b*n*p*x**(m + S(1))*(S(1)/cosh(a + b*log(c*x**n)))**(p + S(1))*sinh(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), x) def replacement6026(a, b, c, m, n, p, x): return -Dist(b**S(2)*n**S(2)*p*(p + S(1))/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), Int(x**m*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(2)), x), x) - Simp(x**(m + S(1))*(m + S(1))*(S(1)/sinh(a + b*log(c*x**n)))**p/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), x) - Simp(b*n*p*x**(m + S(1))*(S(1)/sinh(a + b*log(c*x**n)))**(p + S(1))*cosh(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) - (m + S(1))**S(2)), x) def replacement6027(a, b, c, m, n, p, x): return Simp(S(2)**p*x**(m + S(1))*((c*x**n)**b*exp(a)/((c*x**n)**(S(2)*b)*exp(S(2)*a) + S(1)))**p*((c*x**n)**(S(2)*b)*exp(S(2)*a) + S(1))**p*Hypergeometric2F1(p, (b*n*p + m + S(1))/(S(2)*b*n), S(1) + (b*n*p + m + S(1))/(S(2)*b*n), -(c*x**n)**(S(2)*b)*exp(S(2)*a))/(b*n*p + m + S(1)), x) def replacement6028(a, b, c, m, n, p, x): return Simp(S(2)**p*x**(m + S(1))*((c*x**n)**b*exp(a)/((c*x**n)**(S(2)*b)*exp(S(2)*a) + S(-1)))**p*(-(c*x**n)**(S(2)*b)*exp(S(2)*a) + S(1))**p*Hypergeometric2F1(p, (b*n*p + m + S(1))/(S(2)*b*n), S(1) + (b*n*p + m + S(1))/(S(2)*b*n), (c*x**n)**(S(2)*b)*exp(S(2)*a))/(b*n*p + m + S(1)), x) def replacement6029(a, b, p, x): return -Dist(p, Int(log(b*x)**(p + S(-1))*sinh(a*x*log(b*x)**p), x), x) + Simp(cosh(a*x*log(b*x)**p)/a, x) def replacement6030(a, b, p, x): return -Dist(p, Int(log(b*x)**(p + S(-1))*cosh(a*x*log(b*x)**p), x), x) + Simp(sinh(a*x*log(b*x)**p)/a, x) def replacement6031(a, b, n, p, x): return -Dist(p/n, Int(log(b*x)**(p + S(-1))*sinh(a*x**n*log(b*x)**p), x), x) + Dist((n + S(-1))/(a*n), Int(x**(-n)*cosh(a*x**n*log(b*x)**p), x), x) + Simp(x**(S(1) - n)*cosh(a*x**n*log(b*x)**p)/(a*n), x) def replacement6032(a, b, n, p, x): return -Dist(p/n, Int(log(b*x)**(p + S(-1))*cosh(a*x**n*log(b*x)**p), x), x) + Dist((n + S(-1))/(a*n), Int(x**(-n)*sinh(a*x**n*log(b*x)**p), x), x) + Simp(x**(S(1) - n)*sinh(a*x**n*log(b*x)**p)/(a*n), x) def replacement6033(a, b, m, n, p, x): return -Dist(p/n, Int(x**(n + S(-1))*log(b*x)**(p + S(-1))*sinh(a*x**n*log(b*x)**p), x), x) - Simp(cosh(a*x**n*log(b*x)**p)/(a*n), x) def replacement6034(a, b, m, n, p, x): return -Dist(p/n, Int(x**(n + S(-1))*log(b*x)**(p + S(-1))*cosh(a*x**n*log(b*x)**p), x), x) + Simp(sinh(a*x**n*log(b*x)**p)/(a*n), x) def replacement6035(a, b, m, n, p, x): return -Dist(p/n, Int(x**m*log(b*x)**(p + S(-1))*sinh(a*x**n*log(b*x)**p), x), x) - Dist((m - n + S(1))/(a*n), Int(x**(m - n)*cosh(a*x**n*log(b*x)**p), x), x) + Simp(x**(m - n + S(1))*cosh(a*x**n*log(b*x)**p)/(a*n), x) def replacement6036(a, b, m, n, p, x): return -Dist(p/n, Int(x**m*log(b*x)**(p + S(-1))*cosh(a*x**n*log(b*x)**p), x), x) - Dist((m - n + S(1))/(a*n), Int(x**(m - n)*sinh(a*x**n*log(b*x)**p), x), x) + Simp(x**(m - n + S(1))*sinh(a*x**n*log(b*x)**p)/(a*n), x) def replacement6037(a, c, d, n, x): return -Dist(S(1)/d, Subst(Int(sinh(a*x)**n/x**S(2), x), x, S(1)/(c + d*x)), x) def replacement6038(a, c, d, n, x): return -Dist(S(1)/d, Subst(Int(cosh(a*x)**n/x**S(2), x), x, S(1)/(c + d*x)), x) def replacement6039(a, b, c, d, e, n, x): return -Dist(S(1)/d, Subst(Int(sinh(b*e/d - e*x*(-a*d + b*c)/d)**n/x**S(2), x), x, S(1)/(c + d*x)), x) def replacement6040(a, b, c, d, e, n, x): return -Dist(S(1)/d, Subst(Int(cosh(b*e/d - e*x*(-a*d + b*c)/d)**n/x**S(2), x), x, S(1)/(c + d*x)), x) def With6041(n, u, x): lst = QuotientOfLinearsParts(u, x) return Int(sinh((x*Part(lst, S(2)) + Part(lst, S(1)))/(x*Part(lst, S(4)) + Part(lst, S(3))))**n, x) def With6042(n, u, x): lst = QuotientOfLinearsParts(u, x) return Int(cosh((x*Part(lst, S(2)) + Part(lst, S(1)))/(x*Part(lst, S(4)) + Part(lst, S(3))))**n, x) def replacement6043(p, q, u, v, w, x): return Int(u*sinh(v)**(p + q), x) def replacement6044(p, q, u, v, w, x): return Int(u*cosh(v)**(p + q), x) def replacement6045(p, q, v, w, x): return Int(ExpandTrigReduce(sinh(v)**p*sinh(w)**q, x), x) def replacement6046(p, q, v, w, x): return Int(ExpandTrigReduce(cosh(v)**p*cosh(w)**q, x), x) def replacement6047(m, p, q, v, w, x): return Int(ExpandTrigReduce(x**m, sinh(v)**p*sinh(w)**q, x), x) def replacement6048(m, p, q, v, w, x): return Int(ExpandTrigReduce(x**m, cosh(v)**p*cosh(w)**q, x), x) def replacement6049(p, u, v, w, x): return Dist(S(2)**(-p), Int(u*sinh(S(2)*v)**p, x), x) def replacement6050(p, q, v, w, x): return Int(ExpandTrigReduce(sinh(v)**p*cosh(w)**q, x), x) def replacement6051(m, p, q, v, w, x): return Int(ExpandTrigReduce(x**m, sinh(v)**p*cosh(w)**q, x), x) def replacement6052(n, v, w, x): return -Dist(cosh(v - w), Int(tanh(w)**(n + S(-1))/cosh(w), x), x) + Int(cosh(v)*tanh(w)**(n + S(-1)), x) def replacement6053(n, v, w, x): return Dist(cosh(v - w), Int((S(1)/tanh(w))**(n + S(-1))/sinh(w), x), x) + Int((S(1)/tanh(w))**(n + S(-1))*sinh(v), x) def replacement6054(n, v, w, x): return Dist(sinh(v - w), Int((S(1)/tanh(w))**(n + S(-1))/sinh(w), x), x) + Int((S(1)/tanh(w))**(n + S(-1))*cosh(v), x) def replacement6055(n, v, w, x): return -Dist(sinh(v - w), Int(tanh(w)**(n + S(-1))/cosh(w), x), x) + Int(sinh(v)*tanh(w)**(n + S(-1)), x) def replacement6056(n, v, w, x): return Dist(sinh(v - w), Int((S(1)/cosh(w))**(n + S(-1)), x), x) + Dist(cosh(v - w), Int((S(1)/cosh(w))**(n + S(-1))*tanh(w), x), x) def replacement6057(n, v, w, x): return Dist(sinh(v - w), Int((S(1)/sinh(w))**(n + S(-1)), x), x) + Dist(cosh(v - w), Int((S(1)/sinh(w))**(n + S(-1))/tanh(w), x), x) def replacement6058(n, v, w, x): return Dist(sinh(v - w), Int((S(1)/sinh(w))**(n + S(-1))/tanh(w), x), x) + Dist(cosh(v - w), Int((S(1)/sinh(w))**(n + S(-1)), x), x) def replacement6059(n, v, w, x): return Dist(sinh(v - w), Int((S(1)/cosh(w))**(n + S(-1))*tanh(w), x), x) + Dist(cosh(v - w), Int((S(1)/cosh(w))**(n + S(-1)), x), x) def replacement6060(a, b, c, d, e, f, m, n, x): return Int((a + b*sinh(S(2)*c + S(2)*d*x)/S(2))**n*(e + f*x)**m, x) def replacement6061(a, b, c, d, m, n, x): return Dist(S(2)**(-n), Int(x**m*(S(2)*a + b*cosh(S(2)*c + S(2)*d*x) - b)**n, x), x) def replacement6062(a, b, c, d, m, n, x): return Dist(S(2)**(-n), Int(x**m*(S(2)*a + b*cosh(S(2)*c + S(2)*d*x) + b)**n, x), x) def replacement6063(a, b, c, d, e, f, m, n, p, x): return Dist(d**(-m + S(-1)), Subst(Int((-c*f + d*e + f*x)**m*sinh(a + b*x**n)**p, x), x, c + d*x), x) def replacement6064(a, b, c, d, e, f, m, n, p, x): return Dist(d**(-m + S(-1)), Subst(Int((-c*f + d*e + f*x)**m*cosh(a + b*x**n)**p, x), x, c + d*x), x) def replacement6065(a, b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(S(2)*a + b - c + (b + c)*cosh(S(2)*d + S(2)*e*x)), x), x) def replacement6066(b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(b - c + (b + c)*cosh(S(2)*d + S(2)*e*x)), x), x) def replacement6067(a, b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(S(2)*a + b - c + (b + c)*cosh(S(2)*d + S(2)*e*x)), x), x) def replacement6068(b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(b - c + (b + c)*cosh(S(2)*d + S(2)*e*x)), x), x) def replacement6069(a, b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(S(2)*a + b - c + (b + c)*cosh(S(2)*d + S(2)*e*x)), x), x) def replacement6070(a, b, c, d, e, f, m, x): return Int((e + f*x)**m*exp(c + d*x)/(a + b*exp(c + d*x) - Rt(a**S(2) + b**S(2), S(2))), x) + Int((e + f*x)**m*exp(c + d*x)/(a + b*exp(c + d*x) + Rt(a**S(2) + b**S(2), S(2))), x) - Simp((e + f*x)**(m + S(1))/(b*f*(m + S(1))), x) def replacement6071(a, b, c, d, e, f, m, x): return Int((e + f*x)**m*exp(c + d*x)/(a + b*exp(c + d*x) - Rt(a**S(2) - b**S(2), S(2))), x) + Int((e + f*x)**m*exp(c + d*x)/(a + b*exp(c + d*x) + Rt(a**S(2) - b**S(2), S(2))), x) - Simp((e + f*x)**(m + S(1))/(b*f*(m + S(1))), x) def replacement6072(a, b, c, d, e, f, m, n, x): return Dist(S(1)/a, Int((e + f*x)**m*cosh(c + d*x)**(n + S(-2)), x), x) + Dist(S(1)/b, Int((e + f*x)**m*sinh(c + d*x)*cosh(c + d*x)**(n + S(-2)), x), x) def replacement6073(a, b, c, d, e, f, m, n, x): return Dist(S(1)/a, Int((e + f*x)**m*sinh(c + d*x)**(n + S(-2)), x), x) + Dist(S(1)/b, Int((e + f*x)**m*sinh(c + d*x)**(n + S(-2))*cosh(c + d*x), x), x) def replacement6074(a, b, c, d, e, f, m, n, x): return Dist(S(1)/b, Int((e + f*x)**m*sinh(c + d*x)*cosh(c + d*x)**(n + S(-2)), x), x) - Dist(a/b**S(2), Int((e + f*x)**m*cosh(c + d*x)**(n + S(-2)), x), x) + Dist((a**S(2) + b**S(2))/b**S(2), Int((e + f*x)**m*cosh(c + d*x)**(n + S(-2))/(a + b*sinh(c + d*x)), x), x) def replacement6075(a, b, c, d, e, f, m, n, x): return Dist(S(1)/b, Int((e + f*x)**m*sinh(c + d*x)**(n + S(-2))*cosh(c + d*x), x), x) - Dist(a/b**S(2), Int((e + f*x)**m*sinh(c + d*x)**(n + S(-2)), x), x) + Dist((a**S(2) - b**S(2))/b**S(2), Int((e + f*x)**m*sinh(c + d*x)**(n + S(-2))/(a + b*cosh(c + d*x)), x), x) def replacement6076(A, B, a, b, c, d, e, f, x): return -Dist(B*f/(a*d), Int(cosh(c + d*x)/(a + b*sinh(c + d*x)), x), x) + Simp(B*(e + f*x)*cosh(c + d*x)/(a*d*(a + b*sinh(c + d*x))), x) def replacement6077(A, B, a, b, c, d, e, f, x): return -Dist(B*f/(a*d), Int(sinh(c + d*x)/(a + b*cosh(c + d*x)), x), x) + Simp(B*(e + f*x)*sinh(c + d*x)/(a*d*(a + b*cosh(c + d*x))), x) def replacement6078(a, b, m, n, v, x): return Int((a*cosh(v) + b*sinh(v))**n, x) def replacement6079(a, b, m, n, v, x): return Int((a*sinh(v) + b*cosh(v))**n, x) def replacement6080(a, b, c, d, m, n, u, x): return Int(ExpandTrigReduce(u, sinh(a + b*x)**m*sinh(c + d*x)**n, x), x) def replacement6081(a, b, c, d, m, n, u, x): return Int(ExpandTrigReduce(u, cosh(a + b*x)**m*cosh(c + d*x)**n, x), x) def replacement6082(a, b, c, d, x): return Dist(S(1)/sinh((-a*d + b*c)/b), Int(tanh(c + d*x), x), x) - Dist(S(1)/sinh((-a*d + b*c)/d), Int(tanh(a + b*x), x), x) def replacement6083(a, b, c, d, x): return Dist(S(1)/sinh((-a*d + b*c)/b), Int(S(1)/tanh(a + b*x), x), x) - Dist(S(1)/sinh((-a*d + b*c)/d), Int(S(1)/tanh(c + d*x), x), x) def replacement6084(a, b, c, d, x): return -Dist(b*cosh((-a*d + b*c)/d)/d, Int(S(1)/(cosh(a + b*x)*cosh(c + d*x)), x), x) + Simp(b*x/d, x) def replacement6085(a, b, c, d, x): return Dist(cosh((-a*d + b*c)/d), Int(S(1)/(sinh(a + b*x)*sinh(c + d*x)), x), x) + Simp(b*x/d, x) def replacement6086(a, b, n, u, v, x): return Int(u*(a*exp(a*v/b))**n, x)
a6d4d3652b636338e1923191f99c8195ae363275b142f555a56c7f5f371c1d72
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def tangent(): from sympy.integrals.rubi.constraints import cons1510, cons2, cons3, cons50, cons127, cons19, cons4, cons1511, cons20, cons25, cons95, cons167, cons96, cons1512, cons1172, cons89, cons1513, cons91, cons168, cons685, cons33, cons268, cons34, cons1514, cons1515, cons21, cons157, cons1252, cons1516, cons1517, cons1518, cons1519, cons1520, cons1521, cons1522, cons1523, cons1524, cons82, cons81, cons1525, cons1526, cons1527, cons1528, cons29, cons5, cons1529, cons8, cons1263, cons1266, cons1441, cons465, cons1442, cons1530, cons1257, cons1531, cons90, cons1532, cons1533, cons1534, cons517, cons1535, cons1536, cons1537, cons1538, cons1539, cons1540, cons68, cons1541, cons86, cons1230, cons150, cons198, cons1542, cons87, cons72, cons1543, cons73, cons1414, cons269, cons1305, cons170, cons1544, cons1545, cons1324, cons1546, cons1325, cons1547, cons1548, cons1549, cons1550, cons79, cons1551, cons1552, cons1553, cons1425, cons1387, cons113, cons274, cons1327, cons1329, cons1336, cons1554, cons1555, cons1335, cons1556, cons1557, cons1338, cons1558, cons1559, cons810, cons382, cons210, cons149, cons1419, cons52, cons40, cons36, cons37, cons348, cons1420, cons1428, cons1560, cons1561, cons1562, cons1258, cons1563, cons38, cons35, cons1435, cons1564, cons1565, cons1566, cons1567, cons1568, cons1569, cons1570, cons1571, cons1494, cons1458, cons1572, cons1483, cons1481, cons745, cons1499, cons48, cons47, cons228, cons1482, cons64, cons530, cons1573, cons1574, cons812, cons813, cons1362, cons1575, cons1497, cons70, cons71, cons825, cons826, cons1576, cons1577, cons1578, cons1579, cons1580, cons1581, cons49, cons241, cons1582 pattern3401 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1510) rule3401 = ReplacementRule(pattern3401, replacement3401) pattern3402 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1510) rule3402 = ReplacementRule(pattern3402, replacement3402) pattern3403 = Pattern(Integral(sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**WC('n', S(1)), x_), cons50, cons127, cons1511) rule3403 = ReplacementRule(pattern3403, replacement3403) pattern3404 = Pattern(Integral((S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons50, cons127, cons1511) rule3404 = ReplacementRule(pattern3404, replacement3404) pattern3405 = Pattern(Integral((WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons3, cons50, cons127, cons4, cons20, cons25) rule3405 = ReplacementRule(pattern3405, replacement3405) pattern3406 = Pattern(Integral((WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons3, cons50, cons127, cons4, cons20, cons25) rule3406 = ReplacementRule(pattern3406, replacement3406) pattern3407 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons167, cons96, cons1512, cons1172) rule3407 = ReplacementRule(pattern3407, replacement3407) pattern3408 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons167, cons96, cons1512, cons1172) rule3408 = ReplacementRule(pattern3408, replacement3408) pattern3409 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons167, cons1172, cons1513) rule3409 = ReplacementRule(pattern3409, replacement3409) pattern3410 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons167, cons1172, cons1513) rule3410 = ReplacementRule(pattern3410, replacement3410) pattern3411 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons91, cons168, cons1172) rule3411 = ReplacementRule(pattern3411, replacement3411) pattern3412 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons91, cons168, cons1172) rule3412 = ReplacementRule(pattern3412, replacement3412) pattern3413 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons91, cons685, cons1172) rule3413 = ReplacementRule(pattern3413, replacement3413) pattern3414 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons91, cons685, cons1172) rule3414 = ReplacementRule(pattern3414, replacement3414) pattern3415 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons4, cons33, cons268, cons1172) rule3415 = ReplacementRule(pattern3415, replacement3415) pattern3416 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons4, cons33, cons268, cons1172) rule3416 = ReplacementRule(pattern3416, replacement3416) pattern3417 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons4, cons33, cons34, cons685, cons1172) rule3417 = ReplacementRule(pattern3417, replacement3417) pattern3418 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons4, cons33, cons34, cons685, cons1172) rule3418 = ReplacementRule(pattern3418, replacement3418) pattern3419 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**WC('n', S(1)), x_), cons2, cons50, cons127, cons19, cons1514) rule3419 = ReplacementRule(pattern3419, replacement3419) pattern3420 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons50, cons127, cons19, cons1514) rule3420 = ReplacementRule(pattern3420, replacement3420) pattern3421 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1515) rule3421 = ReplacementRule(pattern3421, replacement3421) pattern3422 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1515) rule3422 = ReplacementRule(pattern3422, replacement3422) pattern3423 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule3423 = ReplacementRule(pattern3423, replacement3423) pattern3424 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule3424 = ReplacementRule(pattern3424, replacement3424) pattern3425 = Pattern(Integral((WC('a', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule3425 = ReplacementRule(pattern3425, replacement3425) pattern3426 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons4, cons157) rule3426 = ReplacementRule(pattern3426, replacement3426) pattern3427 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons4, cons157) rule3427 = ReplacementRule(pattern3427, replacement3427) pattern3428 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons50, cons127, cons19, cons1252, cons1516) rule3428 = ReplacementRule(pattern3428, replacement3428) pattern3429 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons50, cons127, cons19, cons1252, cons1516) rule3429 = ReplacementRule(pattern3429, replacement3429) pattern3430 = Pattern(Integral((WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(S(1)/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons3, cons50, cons127, cons4, cons1517, cons1518) rule3430 = ReplacementRule(pattern3430, replacement3430) pattern3431 = Pattern(Integral((WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(S(1)/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons3, cons50, cons127, cons4, cons1517, cons1518) rule3431 = ReplacementRule(pattern3431, replacement3431) pattern3432 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons91, cons1519, cons1172) rule3432 = ReplacementRule(pattern3432, replacement3432) pattern3433 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons91, cons1519, cons1172) rule3433 = ReplacementRule(pattern3433, replacement3433) pattern3434 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons91, cons1172) rule3434 = ReplacementRule(pattern3434, replacement3434) pattern3435 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons91, cons1172) rule3435 = ReplacementRule(pattern3435, replacement3435) pattern3436 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons167, cons1520, cons1172) rule3436 = ReplacementRule(pattern3436, replacement3436) pattern3437 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons167, cons1520, cons1172) rule3437 = ReplacementRule(pattern3437, replacement3437) pattern3438 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons167, cons1521, cons1172) rule3438 = ReplacementRule(pattern3438, replacement3438) pattern3439 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons167, cons1521, cons1172) rule3439 = ReplacementRule(pattern3439, replacement3439) pattern3440 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons1522, cons1172) rule3440 = ReplacementRule(pattern3440, replacement3440) pattern3441 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons1522, cons1172) rule3441 = ReplacementRule(pattern3441, replacement3441) pattern3442 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons1523, cons1521, cons1172) rule3442 = ReplacementRule(pattern3442, replacement3442) pattern3443 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons1523, cons1521, cons1172) rule3443 = ReplacementRule(pattern3443, replacement3443) pattern3444 = Pattern(Integral(S(1)/(sqrt(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons50, cons127, cons1524) rule3444 = ReplacementRule(pattern3444, replacement3444) pattern3445 = Pattern(Integral(S(1)/(sqrt(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons50, cons127, cons1524) rule3445 = ReplacementRule(pattern3445, replacement3445) pattern3446 = Pattern(Integral(sqrt(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons3, cons50, cons127, cons1524) rule3446 = ReplacementRule(pattern3446, replacement3446) pattern3447 = Pattern(Integral(sqrt(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons3, cons50, cons127, cons1524) rule3447 = ReplacementRule(pattern3447, replacement3447) pattern3448 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons82, cons81) rule3448 = ReplacementRule(pattern3448, replacement3448) pattern3449 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons82, cons81) rule3449 = ReplacementRule(pattern3449, replacement3449) pattern3450 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1525, cons1526) rule3450 = ReplacementRule(pattern3450, replacement3450) pattern3451 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1525, cons1526) rule3451 = ReplacementRule(pattern3451, replacement3451) pattern3452 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule3452 = ReplacementRule(pattern3452, replacement3452) pattern3453 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule3453 = ReplacementRule(pattern3453, replacement3453) pattern3454 = Pattern(Integral(((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('a', S(1)))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons5, cons89, cons167, cons1527, cons1528) rule3454 = ReplacementRule(pattern3454, replacement3454) pattern3455 = Pattern(Integral(((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('a', S(1)))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons5, cons89, cons167, cons1527, cons1528) rule3455 = ReplacementRule(pattern3455, replacement3455) pattern3456 = Pattern(Integral(((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('a', S(1)))**WC('m', S(1))*(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons5, cons89, cons91, cons1529, cons1528) rule3456 = ReplacementRule(pattern3456, replacement3456) pattern3457 = Pattern(Integral(((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('a', S(1)))**WC('m', S(1))*(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons5, cons89, cons91, cons1529, cons1528) rule3457 = ReplacementRule(pattern3457, replacement3457) pattern3458 = Pattern(Integral((WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons89, cons167) rule3458 = ReplacementRule(pattern3458, replacement3458) pattern3459 = Pattern(Integral((WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons89, cons167) rule3459 = ReplacementRule(pattern3459, replacement3459) pattern3460 = Pattern(Integral((WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons89, cons91) rule3460 = ReplacementRule(pattern3460, replacement3460) pattern3461 = Pattern(Integral((WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons89, cons91) rule3461 = ReplacementRule(pattern3461, replacement3461) pattern3462 = Pattern(Integral(tan(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons1263) rule3462 = ReplacementRule(pattern3462, replacement3462) pattern3463 = Pattern(Integral(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons1263) rule3463 = ReplacementRule(pattern3463, replacement3463) pattern3464 = Pattern(Integral((WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons4, cons25) rule3464 = ReplacementRule(pattern3464, replacement3464) pattern3465 = Pattern(Integral((WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons4, cons25) rule3465 = ReplacementRule(pattern3465, replacement3465) pattern3466 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons1266) rule3466 = ReplacementRule(pattern3466, replacement3466) pattern3467 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons1266) rule3467 = ReplacementRule(pattern3467, replacement3467) pattern3468 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1441, cons89, cons167) rule3468 = ReplacementRule(pattern3468, replacement3468) pattern3469 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1441, cons89, cons167) rule3469 = ReplacementRule(pattern3469, replacement3469) pattern3470 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1441, cons89, cons465) rule3470 = ReplacementRule(pattern3470, replacement3470) pattern3471 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1441, cons89, cons465) rule3471 = ReplacementRule(pattern3471, replacement3471) pattern3472 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1441) rule3472 = ReplacementRule(pattern3472, replacement3472) pattern3473 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1441) rule3473 = ReplacementRule(pattern3473, replacement3473) pattern3474 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1441) rule3474 = ReplacementRule(pattern3474, replacement3474) pattern3475 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1441) rule3475 = ReplacementRule(pattern3475, replacement3475) pattern3476 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1442, cons89, cons167) rule3476 = ReplacementRule(pattern3476, replacement3476) pattern3477 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1442, cons89, cons167) rule3477 = ReplacementRule(pattern3477, replacement3477) pattern3478 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1442, cons89, cons91) rule3478 = ReplacementRule(pattern3478, replacement3478) pattern3479 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1442, cons89, cons91) rule3479 = ReplacementRule(pattern3479, replacement3479) pattern3480 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442) rule3480 = ReplacementRule(pattern3480, replacement3480) pattern3481 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442) rule3481 = ReplacementRule(pattern3481, replacement3481) pattern3482 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1442) rule3482 = ReplacementRule(pattern3482, replacement3482) pattern3483 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1442) rule3483 = ReplacementRule(pattern3483, replacement3483) pattern3484 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1530) rule3484 = ReplacementRule(pattern3484, replacement3484) pattern3485 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1530) rule3485 = ReplacementRule(pattern3485, replacement3485) pattern3486 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(S(1)/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons4, cons1441, cons1517) rule3486 = ReplacementRule(pattern3486, replacement3486) pattern3487 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(S(1)/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons4, cons1441, cons1517) rule3487 = ReplacementRule(pattern3487, replacement3487) pattern3488 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1257) rule3488 = ReplacementRule(pattern3488, replacement3488) pattern3489 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1257) rule3489 = ReplacementRule(pattern3489, replacement3489) pattern3490 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1441) rule3490 = ReplacementRule(pattern3490, replacement3490) pattern3491 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1441) rule3491 = ReplacementRule(pattern3491, replacement3491) pattern3492 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons1531, cons95, cons90) rule3492 = ReplacementRule(pattern3492, replacement3492) pattern3493 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons1531, cons95, cons90) rule3493 = ReplacementRule(pattern3493, replacement3493) pattern3494 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons1531, cons95, cons91) rule3494 = ReplacementRule(pattern3494, replacement3494) pattern3495 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons1531, cons95, cons91) rule3495 = ReplacementRule(pattern3495, replacement3495) pattern3496 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1531) rule3496 = ReplacementRule(pattern3496, replacement3496) pattern3497 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1531) rule3497 = ReplacementRule(pattern3497, replacement3497) pattern3498 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1532) rule3498 = ReplacementRule(pattern3498, replacement3498) pattern3499 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1532) rule3499 = ReplacementRule(pattern3499, replacement3499) pattern3500 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1533, cons25) rule3500 = ReplacementRule(pattern3500, replacement3500) pattern3501 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1533, cons25) rule3501 = ReplacementRule(pattern3501, replacement3501) pattern3502 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1441) rule3502 = ReplacementRule(pattern3502, replacement3502) pattern3503 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1441) rule3503 = ReplacementRule(pattern3503, replacement3503) pattern3504 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons95, cons167, cons1534, cons517) rule3504 = ReplacementRule(pattern3504, replacement3504) pattern3505 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons95, cons167, cons1535, cons517) rule3505 = ReplacementRule(pattern3505, replacement3505) pattern3506 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons95, cons90, cons96, cons1172) rule3506 = ReplacementRule(pattern3506, replacement3506) pattern3507 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons95, cons90, cons96, cons1172) rule3507 = ReplacementRule(pattern3507, replacement3507) pattern3508 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1441, cons89, cons90, cons1521, cons1172) rule3508 = ReplacementRule(pattern3508, replacement3508) pattern3509 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1441, cons89, cons90, cons1521, cons1172) rule3509 = ReplacementRule(pattern3509, replacement3509) pattern3510 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1441) rule3510 = ReplacementRule(pattern3510, replacement3510) pattern3511 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1441) rule3511 = ReplacementRule(pattern3511, replacement3511) pattern3512 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1441, cons89, cons91, cons1536, cons517) rule3512 = ReplacementRule(pattern3512, replacement3512) pattern3513 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1441, cons89, cons91, cons1536, cons517) rule3513 = ReplacementRule(pattern3513, replacement3513) pattern3514 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons95, cons465, cons168, cons1537, cons1521, cons1172) rule3514 = ReplacementRule(pattern3514, replacement3514) pattern3515 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons1441, cons95, cons465, cons168, cons1537, cons1521, cons1172) rule3515 = ReplacementRule(pattern3515, replacement3515) pattern3516 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1441, cons89, cons465, cons1538, cons1172) rule3516 = ReplacementRule(pattern3516, replacement3516) pattern3517 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1441, cons89, cons465, cons1538, cons1172) rule3517 = ReplacementRule(pattern3517, replacement3517) pattern3518 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1539, cons89) rule3518 = ReplacementRule(pattern3518, replacement3518) pattern3519 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1539, cons89) rule3519 = ReplacementRule(pattern3519, replacement3519) pattern3520 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1540, cons1538) rule3520 = ReplacementRule(pattern3520, replacement3520) pattern3521 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441, cons1540, cons1538) rule3521 = ReplacementRule(pattern3521, replacement3521) pattern3522 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441) rule3522 = ReplacementRule(pattern3522, replacement3522) pattern3523 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1441) rule3523 = ReplacementRule(pattern3523, replacement3523) pattern3524 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(S(1)/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons4, cons1442, cons1517) rule3524 = ReplacementRule(pattern3524, replacement3524) pattern3525 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(S(1)/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons4, cons1442, cons1517) rule3525 = ReplacementRule(pattern3525, replacement3525) pattern3526 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2)*cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1442) rule3526 = ReplacementRule(pattern3526, replacement3526) pattern3527 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2)*tan(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1442) rule3527 = ReplacementRule(pattern3527, replacement3527) pattern3528 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1442, cons68) rule3528 = ReplacementRule(pattern3528, replacement3528) pattern3529 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1442, cons68) rule3529 = ReplacementRule(pattern3529, replacement3529) pattern3530 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1442) rule3530 = ReplacementRule(pattern3530, replacement3530) pattern3531 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1442) rule3531 = ReplacementRule(pattern3531, replacement3531) pattern3532 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1442, cons1541) rule3532 = ReplacementRule(pattern3532, replacement3532) pattern3533 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1442, cons1541) rule3533 = ReplacementRule(pattern3533, replacement3533) pattern3534 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1442, cons86) rule3534 = ReplacementRule(pattern3534, replacement3534) pattern3535 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1442, cons86) rule3535 = ReplacementRule(pattern3535, replacement3535) pattern3536 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1442, cons1526) rule3536 = ReplacementRule(pattern3536, replacement3536) pattern3537 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1442, cons1526) rule3537 = ReplacementRule(pattern3537, replacement3537) pattern3538 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1441) rule3538 = ReplacementRule(pattern3538, replacement3538) pattern3539 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1441) rule3539 = ReplacementRule(pattern3539, replacement3539) pattern3540 = Pattern(Integral(S(1)/((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1441) rule3540 = ReplacementRule(pattern3540, replacement3540) pattern3541 = Pattern(Integral(S(1)/((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1441) rule3541 = ReplacementRule(pattern3541, replacement3541) pattern3542 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons21) rule3542 = ReplacementRule(pattern3542, replacement3542) pattern3543 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons21) rule3543 = ReplacementRule(pattern3543, replacement3543) pattern3544 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**m_, x_), cons2, cons3, cons50, cons127, cons4, cons1517) rule3544 = ReplacementRule(pattern3544, replacement3544) pattern3545 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**m_, x_), cons2, cons3, cons50, cons127, cons4, cons1517) rule3545 = ReplacementRule(pattern3545, replacement3545) pattern3546 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons1230, cons150) rule3546 = ReplacementRule(pattern3546, replacement3546) pattern3547 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons1230, cons150) rule3547 = ReplacementRule(pattern3547, replacement3547) pattern3548 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons1230, cons198, cons1542) rule3548 = ReplacementRule(pattern3548, replacement3548) pattern3549 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons1230, cons198, cons1542) rule3549 = ReplacementRule(pattern3549, replacement3549) pattern3550 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons21) rule3550 = ReplacementRule(pattern3550, replacement3550) pattern3551 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons21) rule3551 = ReplacementRule(pattern3551, replacement3551) pattern3552 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons5, cons87) rule3552 = ReplacementRule(pattern3552, replacement3552) pattern3553 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons5, cons87) rule3553 = ReplacementRule(pattern3553, replacement3553) pattern3554 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1441, cons20, cons1543) rule3554 = ReplacementRule(pattern3554, replacement3554) pattern3555 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1441, cons20, cons1543) rule3555 = ReplacementRule(pattern3555, replacement3555) pattern3556 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1441) rule3556 = ReplacementRule(pattern3556, replacement3556) pattern3557 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1441) rule3557 = ReplacementRule(pattern3557, replacement3557) pattern3558 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons72) rule3558 = ReplacementRule(pattern3558, replacement3558) pattern3559 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons72) rule3559 = ReplacementRule(pattern3559, replacement3559) pattern3560 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1414) rule3560 = ReplacementRule(pattern3560, replacement3560) pattern3561 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1414) rule3561 = ReplacementRule(pattern3561, replacement3561) pattern3562 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons33, cons269) rule3562 = ReplacementRule(pattern3562, replacement3562) pattern3563 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons33, cons269) rule3563 = ReplacementRule(pattern3563, replacement3563) pattern3564 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1441, cons1305) rule3564 = ReplacementRule(pattern3564, replacement3564) pattern3565 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1441, cons1305) rule3565 = ReplacementRule(pattern3565, replacement3565) pattern3566 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons33, cons170) rule3566 = ReplacementRule(pattern3566, replacement3566) pattern3567 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons33, cons170) rule3567 = ReplacementRule(pattern3567, replacement3567) pattern3568 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons33, cons96) rule3568 = ReplacementRule(pattern3568, replacement3568) pattern3569 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons33, cons96) rule3569 = ReplacementRule(pattern3569, replacement3569) pattern3570 = Pattern(Integral((c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1544) rule3570 = ReplacementRule(pattern3570, replacement3570) pattern3571 = Pattern(Integral((c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1544) rule3571 = ReplacementRule(pattern3571, replacement3571) pattern3572 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1545) rule3572 = ReplacementRule(pattern3572, replacement3572) pattern3573 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1545) rule3573 = ReplacementRule(pattern3573, replacement3573) pattern3574 = Pattern(Integral((c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1324) rule3574 = ReplacementRule(pattern3574, replacement3574) pattern3575 = Pattern(Integral((c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1324) rule3575 = ReplacementRule(pattern3575, replacement3575) pattern3576 = Pattern(Integral((c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1546) rule3576 = ReplacementRule(pattern3576, replacement3576) pattern3577 = Pattern(Integral((c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1546) rule3577 = ReplacementRule(pattern3577, replacement3577) pattern3578 = Pattern(Integral((c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1325, cons1547) rule3578 = ReplacementRule(pattern3578, replacement3578) pattern3579 = Pattern(Integral((c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1325, cons1547) rule3579 = ReplacementRule(pattern3579, replacement3579) pattern3580 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons1548) rule3580 = ReplacementRule(pattern3580, replacement3580) pattern3581 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons1548) rule3581 = ReplacementRule(pattern3581, replacement3581) pattern3582 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons1549, cons1550) rule3582 = ReplacementRule(pattern3582, With3582) pattern3583 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons1549, cons1550) rule3583 = ReplacementRule(pattern3583, With3583) pattern3584 = Pattern(Integral((c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1442, cons1546) rule3584 = ReplacementRule(pattern3584, replacement3584) pattern3585 = Pattern(Integral((c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1442, cons1546) rule3585 = ReplacementRule(pattern3585, replacement3585) pattern3586 = Pattern(Integral((WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons19, cons1547, cons79) rule3586 = ReplacementRule(pattern3586, replacement3586) pattern3587 = Pattern(Integral((WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons19, cons1547, cons79) rule3587 = ReplacementRule(pattern3587, replacement3587) pattern3588 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1442, cons1547, cons21) rule3588 = ReplacementRule(pattern3588, replacement3588) pattern3589 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1442, cons1547, cons21) rule3589 = ReplacementRule(pattern3589, replacement3589) pattern3590 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons34, cons1441) rule3590 = ReplacementRule(pattern3590, replacement3590) pattern3591 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons34, cons1441) rule3591 = ReplacementRule(pattern3591, replacement3591) pattern3592 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2)/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442) rule3592 = ReplacementRule(pattern3592, replacement3592) pattern3593 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2)/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442) rule3593 = ReplacementRule(pattern3593, replacement3593) pattern3594 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons96, cons1442) rule3594 = ReplacementRule(pattern3594, replacement3594) pattern3595 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons96, cons1442) rule3595 = ReplacementRule(pattern3595, replacement3595) pattern3596 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1551, cons1552) rule3596 = ReplacementRule(pattern3596, replacement3596) pattern3597 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1551, cons1552) rule3597 = ReplacementRule(pattern3597, replacement3597) pattern3598 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3598 = ReplacementRule(pattern3598, replacement3598) pattern3599 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3599 = ReplacementRule(pattern3599, replacement3599) pattern3600 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons1553, cons1425) rule3600 = ReplacementRule(pattern3600, replacement3600) pattern3601 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons1553, cons1425) rule3601 = ReplacementRule(pattern3601, replacement3601) pattern3602 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons1553, cons1387) rule3602 = ReplacementRule(pattern3602, replacement3602) pattern3603 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons1553, cons1387) rule3603 = ReplacementRule(pattern3603, replacement3603) pattern3604 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons113, cons96) rule3604 = ReplacementRule(pattern3604, replacement3604) pattern3605 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons113, cons96) rule3605 = ReplacementRule(pattern3605, replacement3605) pattern3606 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1441, cons1547, cons157, cons274) rule3606 = ReplacementRule(pattern3606, replacement3606) pattern3607 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1441, cons1547, cons157, cons274) rule3607 = ReplacementRule(pattern3607, replacement3607) pattern3608 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons89, cons1327) rule3608 = ReplacementRule(pattern3608, replacement3608) pattern3609 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons89, cons1327) rule3609 = ReplacementRule(pattern3609, replacement3609) pattern3610 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons89, cons167) rule3610 = ReplacementRule(pattern3610, replacement3610) pattern3611 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons89, cons167) rule3611 = ReplacementRule(pattern3611, replacement3611) pattern3612 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3612 = ReplacementRule(pattern3612, replacement3612) pattern3613 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3613 = ReplacementRule(pattern3613, replacement3613) pattern3614 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1441, cons1547, cons1329) rule3614 = ReplacementRule(pattern3614, replacement3614) pattern3615 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1441, cons1547, cons1329) rule3615 = ReplacementRule(pattern3615, replacement3615) pattern3616 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons168, cons91, cons1336) rule3616 = ReplacementRule(pattern3616, replacement3616) pattern3617 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons168, cons91, cons1336) rule3617 = ReplacementRule(pattern3617, replacement3617) pattern3618 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3618 = ReplacementRule(pattern3618, replacement3618) pattern3619 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3619 = ReplacementRule(pattern3619, replacement3619) pattern3620 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3620 = ReplacementRule(pattern3620, replacement3620) pattern3621 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3621 = ReplacementRule(pattern3621, replacement3621) pattern3622 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1441, cons1547, cons517, cons168, cons1521, cons1336) rule3622 = ReplacementRule(pattern3622, replacement3622) pattern3623 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1441, cons1547, cons517, cons168, cons1521, cons1336) rule3623 = ReplacementRule(pattern3623, replacement3623) pattern3624 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sqrt(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons33, cons269, cons1554) rule3624 = ReplacementRule(pattern3624, replacement3624) pattern3625 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sqrt(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons33, cons269, cons1554) rule3625 = ReplacementRule(pattern3625, replacement3625) pattern3626 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons269, cons167, cons1336) rule3626 = ReplacementRule(pattern3626, replacement3626) pattern3627 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547, cons95, cons269, cons167, cons1336) rule3627 = ReplacementRule(pattern3627, replacement3627) pattern3628 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1441, cons1547, cons33, cons269, cons1336) rule3628 = ReplacementRule(pattern3628, replacement3628) pattern3629 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1441, cons1547, cons33, cons269, cons1336) rule3629 = ReplacementRule(pattern3629, replacement3629) pattern3630 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1441, cons1547, cons89, cons167, cons1521, cons1555) rule3630 = ReplacementRule(pattern3630, replacement3630) pattern3631 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1441, cons1547, cons89, cons167, cons1521, cons1555) rule3631 = ReplacementRule(pattern3631, replacement3631) pattern3632 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1441, cons1547, cons89, cons91, cons1555) rule3632 = ReplacementRule(pattern3632, replacement3632) pattern3633 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1441, cons1547, cons89, cons91, cons1555) rule3633 = ReplacementRule(pattern3633, replacement3633) pattern3634 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1441, cons1547) rule3634 = ReplacementRule(pattern3634, replacement3634) pattern3635 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1441, cons1547) rule3635 = ReplacementRule(pattern3635, replacement3635) pattern3636 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3636 = ReplacementRule(pattern3636, replacement3636) pattern3637 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1441, cons1547) rule3637 = ReplacementRule(pattern3637, replacement3637) pattern3638 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1441, cons1547) rule3638 = ReplacementRule(pattern3638, replacement3638) pattern3639 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1441, cons1547) rule3639 = ReplacementRule(pattern3639, replacement3639) pattern3640 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons95, cons1335, cons91, cons517) rule3640 = ReplacementRule(pattern3640, replacement3640) pattern3641 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons95, cons1335, cons91, cons517) rule3641 = ReplacementRule(pattern3641, replacement3641) pattern3642 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1442, cons1547, cons517, cons1335, cons1556, cons1557) rule3642 = ReplacementRule(pattern3642, replacement3642) pattern3643 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1442, cons1547, cons517, cons1335, cons1556, cons1557) rule3643 = ReplacementRule(pattern3643, replacement3643) pattern3644 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons95, cons96, cons1338, cons517) rule3644 = ReplacementRule(pattern3644, replacement3644) pattern3645 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons95, cons96, cons1338, cons517) rule3645 = ReplacementRule(pattern3645, replacement3645) pattern3646 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons95, cons96, cons90, cons517) rule3646 = ReplacementRule(pattern3646, replacement3646) pattern3647 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons95, cons96, cons90, cons517) rule3647 = ReplacementRule(pattern3647, replacement3647) pattern3648 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1442, cons1547, cons517, cons96, cons1558, cons1559) rule3648 = ReplacementRule(pattern3648, replacement3648) pattern3649 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1442, cons1547, cons517, cons96, cons1558, cons1559) rule3649 = ReplacementRule(pattern3649, replacement3649) pattern3650 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons95, cons168, cons90, cons810) rule3650 = ReplacementRule(pattern3650, replacement3650) pattern3651 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547, cons95, cons168, cons90, cons810) rule3651 = ReplacementRule(pattern3651, replacement3651) pattern3652 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547) rule3652 = ReplacementRule(pattern3652, replacement3652) pattern3653 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547) rule3653 = ReplacementRule(pattern3653, replacement3653) pattern3654 = Pattern(Integral(sqrt(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons73, cons1442, cons1547) rule3654 = ReplacementRule(pattern3654, replacement3654) pattern3655 = Pattern(Integral(sqrt(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons73, cons1442, cons1547) rule3655 = ReplacementRule(pattern3655, replacement3655) pattern3656 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547) rule3656 = ReplacementRule(pattern3656, replacement3656) pattern3657 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1442, cons1547) rule3657 = ReplacementRule(pattern3657, replacement3657) pattern3658 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1442, cons1547, cons21) rule3658 = ReplacementRule(pattern3658, replacement3658) pattern3659 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1442, cons1547, cons21) rule3659 = ReplacementRule(pattern3659, replacement3659) pattern3660 = Pattern(Integral((c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1442, cons1547) rule3660 = ReplacementRule(pattern3660, replacement3660) pattern3661 = Pattern(Integral((c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1442, cons1547) rule3661 = ReplacementRule(pattern3661, replacement3661) pattern3662 = Pattern(Integral((WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons25, cons20) rule3662 = ReplacementRule(pattern3662, replacement3662) pattern3663 = Pattern(Integral((WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons25, cons20) rule3663 = ReplacementRule(pattern3663, replacement3663) pattern3664 = Pattern(Integral(((WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons25, cons21) rule3664 = ReplacementRule(pattern3664, replacement3664) pattern3665 = Pattern(Integral(((WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons25, cons21) rule3665 = ReplacementRule(pattern3665, replacement3665) pattern3666 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons382) rule3666 = ReplacementRule(pattern3666, replacement3666) pattern3667 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons382) rule3667 = ReplacementRule(pattern3667, replacement3667) pattern3668 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons149, cons20, cons87) rule3668 = ReplacementRule(pattern3668, replacement3668) pattern3669 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons149, cons20, cons87) rule3669 = ReplacementRule(pattern3669, replacement3669) pattern3670 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**q_)**p_*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons149, cons1419) rule3670 = ReplacementRule(pattern3670, replacement3670) pattern3671 = Pattern(Integral(((S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**q_*WC('g', S(1)))**p_*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons52, cons149, cons1419) rule3671 = ReplacementRule(pattern3671, replacement3671) pattern3672 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons87) rule3672 = ReplacementRule(pattern3672, replacement3672) pattern3673 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons87) rule3673 = ReplacementRule(pattern3673, replacement3673) pattern3674 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons25, cons20, cons40) rule3674 = ReplacementRule(pattern3674, replacement3674) pattern3675 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons25, cons20, cons40) rule3675 = ReplacementRule(pattern3675, replacement3675) pattern3676 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons25, cons20, cons149) rule3676 = ReplacementRule(pattern3676, replacement3676) pattern3677 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons25, cons20, cons149) rule3677 = ReplacementRule(pattern3677, replacement3677) pattern3678 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons25, cons21) rule3678 = ReplacementRule(pattern3678, replacement3678) pattern3679 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons25, cons21) rule3679 = ReplacementRule(pattern3679, replacement3679) pattern3680 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons72, cons1441) rule3680 = ReplacementRule(pattern3680, replacement3680) pattern3681 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons72, cons1441) rule3681 = ReplacementRule(pattern3681, replacement3681) pattern3682 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73) rule3682 = ReplacementRule(pattern3682, replacement3682) pattern3683 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73) rule3683 = ReplacementRule(pattern3683, replacement3683) pattern3684 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons33, cons96, cons1441) rule3684 = ReplacementRule(pattern3684, replacement3684) pattern3685 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons33, cons96, cons1441) rule3685 = ReplacementRule(pattern3685, replacement3685) pattern3686 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons33, cons96, cons1442) rule3686 = ReplacementRule(pattern3686, replacement3686) pattern3687 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons33, cons96, cons1442) rule3687 = ReplacementRule(pattern3687, replacement3687) pattern3688 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1551) rule3688 = ReplacementRule(pattern3688, replacement3688) pattern3689 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1551) rule3689 = ReplacementRule(pattern3689, replacement3689) pattern3690 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1441, cons95, cons168, cons91) rule3690 = ReplacementRule(pattern3690, replacement3690) pattern3691 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1441, cons95, cons168, cons91) rule3691 = ReplacementRule(pattern3691, replacement3691) pattern3692 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1441, cons33, cons168, cons348) rule3692 = ReplacementRule(pattern3692, replacement3692) pattern3693 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1441, cons33, cons168, cons348) rule3693 = ReplacementRule(pattern3693, replacement3693) pattern3694 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1441, cons95, cons269, cons90) rule3694 = ReplacementRule(pattern3694, replacement3694) pattern3695 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1441, cons95, cons269, cons90) rule3695 = ReplacementRule(pattern3695, replacement3695) pattern3696 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1441, cons33, cons269, cons1329) rule3696 = ReplacementRule(pattern3696, replacement3696) pattern3697 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1441, cons33, cons269, cons1329) rule3697 = ReplacementRule(pattern3697, replacement3697) pattern3698 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1441, cons89, cons90) rule3698 = ReplacementRule(pattern3698, replacement3698) pattern3699 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1441, cons89, cons90) rule3699 = ReplacementRule(pattern3699, replacement3699) pattern3700 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1441, cons89, cons91) rule3700 = ReplacementRule(pattern3700, replacement3700) pattern3701 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1441, cons89, cons91) rule3701 = ReplacementRule(pattern3701, replacement3701) pattern3702 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1441, cons1420) rule3702 = ReplacementRule(pattern3702, replacement3702) pattern3703 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1441, cons1420) rule3703 = ReplacementRule(pattern3703, replacement3703) pattern3704 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1441, cons1428) rule3704 = ReplacementRule(pattern3704, replacement3704) pattern3705 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1441, cons1428) rule3705 = ReplacementRule(pattern3705, replacement3705) pattern3706 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1441, cons1428) rule3706 = ReplacementRule(pattern3706, replacement3706) pattern3707 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1441, cons1428) rule3707 = ReplacementRule(pattern3707, replacement3707) pattern3708 = Pattern(Integral((A_ + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1442, cons21, cons25, cons1515, cons1560) rule3708 = ReplacementRule(pattern3708, replacement3708) pattern3709 = Pattern(Integral((A_ + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1442, cons21, cons25, cons1515, cons1560) rule3709 = ReplacementRule(pattern3709, replacement3709) pattern3710 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1442, cons21, cons25, cons1515, cons1561) rule3710 = ReplacementRule(pattern3710, replacement3710) pattern3711 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1442, cons21, cons25, cons1515, cons1561) rule3711 = ReplacementRule(pattern3711, replacement3711) pattern3712 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547, cons95, cons168, cons91, cons1336) rule3712 = ReplacementRule(pattern3712, replacement3712) pattern3713 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547, cons95, cons168, cons91, cons1336) rule3713 = ReplacementRule(pattern3713, replacement3713) pattern3714 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1442, cons1547, cons33, cons168, cons1336, cons1562) rule3714 = ReplacementRule(pattern3714, replacement3714) pattern3715 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1442, cons1547, cons33, cons168, cons1336, cons1562) rule3715 = ReplacementRule(pattern3715, replacement3715) pattern3716 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547, cons95, cons96, cons1327, cons1336) rule3716 = ReplacementRule(pattern3716, replacement3716) pattern3717 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547, cons95, cons96, cons1327, cons1336) rule3717 = ReplacementRule(pattern3717, replacement3717) pattern3718 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1442, cons1547, cons33, cons96, cons1336, cons1559) rule3718 = ReplacementRule(pattern3718, replacement3718) pattern3719 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1442, cons1547, cons33, cons96, cons1336, cons1559) rule3719 = ReplacementRule(pattern3719, replacement3719) pattern3720 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547, cons95, cons1258, cons1327) rule3720 = ReplacementRule(pattern3720, replacement3720) pattern3721 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547, cons95, cons1258, cons1327) rule3721 = ReplacementRule(pattern3721, replacement3721) pattern3722 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547) rule3722 = ReplacementRule(pattern3722, replacement3722) pattern3723 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547) rule3723 = ReplacementRule(pattern3723, replacement3723) pattern3724 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547) rule3724 = ReplacementRule(pattern3724, replacement3724) pattern3725 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547) rule3725 = ReplacementRule(pattern3725, replacement3725) pattern3726 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1442, cons1547) rule3726 = ReplacementRule(pattern3726, replacement3726) pattern3727 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1442, cons1547) rule3727 = ReplacementRule(pattern3727, replacement3727) pattern3728 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547) rule3728 = ReplacementRule(pattern3728, replacement3728) pattern3729 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1442, cons1547) rule3729 = ReplacementRule(pattern3729, replacement3729) pattern3730 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1442, cons1560) rule3730 = ReplacementRule(pattern3730, replacement3730) pattern3731 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1442, cons1560) rule3731 = ReplacementRule(pattern3731, replacement3731) pattern3732 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1442, cons1561) rule3732 = ReplacementRule(pattern3732, replacement3732) pattern3733 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1442, cons1561) rule3733 = ReplacementRule(pattern3733, replacement3733) pattern3734 = Pattern(Integral((A_ + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1563) rule3734 = ReplacementRule(pattern3734, replacement3734) pattern3735 = Pattern(Integral((A_ + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1563) rule3735 = ReplacementRule(pattern3735, replacement3735) pattern3736 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons35) rule3736 = ReplacementRule(pattern3736, replacement3736) pattern3737 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons35) rule3737 = ReplacementRule(pattern3737, replacement3737) pattern3738 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1435) rule3738 = ReplacementRule(pattern3738, replacement3738) pattern3739 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1435) rule3739 = ReplacementRule(pattern3739, replacement3739) pattern3740 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1564, cons33, cons34, cons1441) rule3740 = ReplacementRule(pattern3740, replacement3740) pattern3741 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1564, cons33, cons34, cons1441) rule3741 = ReplacementRule(pattern3741, replacement3741) pattern3742 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1565, cons33, cons34, cons1441) rule3742 = ReplacementRule(pattern3742, replacement3742) pattern3743 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1565, cons33, cons34, cons1441) rule3743 = ReplacementRule(pattern3743, replacement3743) pattern3744 = Pattern(Integral((A_ + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1442, cons1566) rule3744 = ReplacementRule(pattern3744, replacement3744) pattern3745 = Pattern(Integral((A_ + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1442, cons1566) rule3745 = ReplacementRule(pattern3745, replacement3745) pattern3746 = Pattern(Integral((A_ + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/tan(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons50, cons127, cons36, cons37, cons38, cons1567) rule3746 = ReplacementRule(pattern3746, replacement3746) pattern3747 = Pattern(Integral((A_ + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*tan(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons50, cons127, cons36, cons37, cons38, cons1567) rule3747 = ReplacementRule(pattern3747, replacement3747) pattern3748 = Pattern(Integral((A_ + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/tan(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons50, cons127, cons36, cons38, cons1567) rule3748 = ReplacementRule(pattern3748, replacement3748) pattern3749 = Pattern(Integral((A_ + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*tan(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons50, cons127, cons36, cons38, cons1567) rule3749 = ReplacementRule(pattern3749, replacement3749) pattern3750 = Pattern(Integral((A_ + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1564, cons1442, cons1568) rule3750 = ReplacementRule(pattern3750, replacement3750) pattern3751 = Pattern(Integral((A_ + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1564, cons1442, cons1568) rule3751 = ReplacementRule(pattern3751, replacement3751) pattern3752 = Pattern(Integral((A_ + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1565, cons1442, cons1567) rule3752 = ReplacementRule(pattern3752, replacement3752) pattern3753 = Pattern(Integral((A_ + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1565, cons1442, cons1567) rule3753 = ReplacementRule(pattern3753, replacement3753) pattern3754 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1564, cons33, cons96, cons1442) rule3754 = ReplacementRule(pattern3754, replacement3754) pattern3755 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1564, cons33, cons96, cons1442) rule3755 = ReplacementRule(pattern3755, replacement3755) pattern3756 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1565, cons33, cons96, cons1442) rule3756 = ReplacementRule(pattern3756, replacement3756) pattern3757 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1565, cons33, cons96, cons1442) rule3757 = ReplacementRule(pattern3757, replacement3757) pattern3758 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1564, cons1551) rule3758 = ReplacementRule(pattern3758, replacement3758) pattern3759 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1564, cons1551) rule3759 = ReplacementRule(pattern3759, replacement3759) pattern3760 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1565, cons1551) rule3760 = ReplacementRule(pattern3760, replacement3760) pattern3761 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1565, cons1551) rule3761 = ReplacementRule(pattern3761, replacement3761) pattern3762 = Pattern(Integral((A_ + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons1563) rule3762 = ReplacementRule(pattern3762, replacement3762) pattern3763 = Pattern(Integral((A_ + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons1563) rule3763 = ReplacementRule(pattern3763, replacement3763) pattern3764 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1547, cons89, cons91) rule3764 = ReplacementRule(pattern3764, replacement3764) pattern3765 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1547, cons89, cons91) rule3765 = ReplacementRule(pattern3765, replacement3765) pattern3766 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1547, cons89, cons91) rule3766 = ReplacementRule(pattern3766, replacement3766) pattern3767 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1547, cons89, cons91) rule3767 = ReplacementRule(pattern3767, replacement3767) pattern3768 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1547, cons348) rule3768 = ReplacementRule(pattern3768, replacement3768) pattern3769 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1547, cons348) rule3769 = ReplacementRule(pattern3769, replacement3769) pattern3770 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1547, cons348) rule3770 = ReplacementRule(pattern3770, replacement3770) pattern3771 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1547, cons348) rule3771 = ReplacementRule(pattern3771, replacement3771) pattern3772 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1441, cons1569) rule3772 = ReplacementRule(pattern3772, replacement3772) pattern3773 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1441, cons1569) rule3773 = ReplacementRule(pattern3773, replacement3773) pattern3774 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1441, cons1569) rule3774 = ReplacementRule(pattern3774, replacement3774) pattern3775 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1441, cons1569) rule3775 = ReplacementRule(pattern3775, replacement3775) pattern3776 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons73, cons1441, cons1305, cons89, cons91, cons1547) rule3776 = ReplacementRule(pattern3776, replacement3776) pattern3777 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons73, cons1441, cons1305, cons89, cons91, cons1547) rule3777 = ReplacementRule(pattern3777, replacement3777) pattern3778 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons73, cons1441, cons1305, cons89, cons91, cons1547) rule3778 = ReplacementRule(pattern3778, replacement3778) pattern3779 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons73, cons1441, cons1305, cons89, cons91, cons1547) rule3779 = ReplacementRule(pattern3779, replacement3779) pattern3780 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons73, cons1441, cons1305, cons685) rule3780 = ReplacementRule(pattern3780, replacement3780) pattern3781 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons73, cons1441, cons1305, cons685) rule3781 = ReplacementRule(pattern3781, replacement3781) pattern3782 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons73, cons1441, cons1305, cons685) rule3782 = ReplacementRule(pattern3782, replacement3782) pattern3783 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons73, cons1441, cons1305, cons685) rule3783 = ReplacementRule(pattern3783, replacement3783) pattern3784 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1442, cons1547, cons95, cons170, cons91) rule3784 = ReplacementRule(pattern3784, replacement3784) pattern3785 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1442, cons1547, cons95, cons170, cons91) rule3785 = ReplacementRule(pattern3785, replacement3785) pattern3786 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1442, cons1547, cons95, cons170, cons91) rule3786 = ReplacementRule(pattern3786, replacement3786) pattern3787 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1442, cons1547, cons95, cons170, cons91) rule3787 = ReplacementRule(pattern3787, replacement3787) pattern3788 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1442, cons1547, cons33, cons170, cons1570) rule3788 = ReplacementRule(pattern3788, replacement3788) pattern3789 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1442, cons1547, cons33, cons170, cons1570) rule3789 = ReplacementRule(pattern3789, replacement3789) pattern3790 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1442, cons1547, cons33, cons170, cons1570) rule3790 = ReplacementRule(pattern3790, replacement3790) pattern3791 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1442, cons1547, cons33, cons170, cons1570) rule3791 = ReplacementRule(pattern3791, replacement3791) pattern3792 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1442, cons1547, cons33, cons96, cons1559) rule3792 = ReplacementRule(pattern3792, replacement3792) pattern3793 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1442, cons1547, cons33, cons96, cons1559) rule3793 = ReplacementRule(pattern3793, replacement3793) pattern3794 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1442, cons1547, cons33, cons96, cons1559) rule3794 = ReplacementRule(pattern3794, replacement3794) pattern3795 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1442, cons1547, cons33, cons96, cons1559) rule3795 = ReplacementRule(pattern3795, replacement3795) pattern3796 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1442, cons1547) rule3796 = ReplacementRule(pattern3796, replacement3796) pattern3797 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1442, cons1547) rule3797 = ReplacementRule(pattern3797, replacement3797) pattern3798 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1442, cons1547) rule3798 = ReplacementRule(pattern3798, replacement3798) pattern3799 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1442, cons1547) rule3799 = ReplacementRule(pattern3799, replacement3799) pattern3800 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1442, cons1547, cons1329, cons1571) rule3800 = ReplacementRule(pattern3800, replacement3800) pattern3801 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1442, cons1547, cons1329, cons1571) rule3801 = ReplacementRule(pattern3801, replacement3801) pattern3802 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1442, cons1547, cons1329, cons1571) rule3802 = ReplacementRule(pattern3802, replacement3802) pattern3803 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1442, cons1547, cons1329, cons1571) rule3803 = ReplacementRule(pattern3803, replacement3803) pattern3804 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons73, cons1442, cons1547) rule3804 = ReplacementRule(pattern3804, replacement3804) pattern3805 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons73, cons1442, cons1547) rule3805 = ReplacementRule(pattern3805, replacement3805) pattern3806 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons73, cons1442, cons1547) rule3806 = ReplacementRule(pattern3806, replacement3806) pattern3807 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons73, cons1442, cons1547) rule3807 = ReplacementRule(pattern3807, replacement3807) pattern3808 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons1494) rule3808 = ReplacementRule(pattern3808, replacement3808) pattern3809 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons1494) rule3809 = ReplacementRule(pattern3809, replacement3809) pattern3810 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons1458) rule3810 = ReplacementRule(pattern3810, replacement3810) pattern3811 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons1458) rule3811 = ReplacementRule(pattern3811, replacement3811) pattern3812 = Pattern(Integral((a_ + (WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule3812 = ReplacementRule(pattern3812, replacement3812) pattern3813 = Pattern(Integral((a_ + (WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1572) rule3813 = ReplacementRule(pattern3813, replacement3813) pattern3814 = Pattern(Integral((a_ + (WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1517) rule3814 = ReplacementRule(pattern3814, With3814) pattern3815 = Pattern(Integral((a_ + (WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1517) rule3815 = ReplacementRule(pattern3815, With3815) pattern3816 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**WC('p', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1483, cons1481, cons40) rule3816 = ReplacementRule(pattern3816, With3816) pattern3817 = Pattern(Integral((a_ + (S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1483, cons1481, cons40) rule3817 = ReplacementRule(pattern3817, With3817) pattern3818 = Pattern(Integral((a_ + (WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*(S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1517) rule3818 = ReplacementRule(pattern3818, With3818) pattern3819 = Pattern(Integral((a_ + (WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*(S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1517) rule3819 = ReplacementRule(pattern3819, With3819) pattern3820 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**WC('p', S(1))*(S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1230, cons745, cons40) rule3820 = ReplacementRule(pattern3820, With3820) pattern3821 = Pattern(Integral((a_ + (S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*(S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1230, cons745, cons40) rule3821 = ReplacementRule(pattern3821, With3821) pattern3822 = Pattern(Integral((a_ + (WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule3822 = ReplacementRule(pattern3822, replacement3822) pattern3823 = Pattern(Integral((a_ + (WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule3823 = ReplacementRule(pattern3823, replacement3823) pattern3824 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons47, cons40) rule3824 = ReplacementRule(pattern3824, replacement3824) pattern3825 = Pattern(Integral((a_ + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons47, cons40) rule3825 = ReplacementRule(pattern3825, replacement3825) pattern3826 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons47, cons149) rule3826 = ReplacementRule(pattern3826, replacement3826) pattern3827 = Pattern(Integral((a_ + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons47, cons149) rule3827 = ReplacementRule(pattern3827, replacement3827) pattern3828 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228) rule3828 = ReplacementRule(pattern3828, With3828) pattern3829 = Pattern(Integral(S(1)/((S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228) rule3829 = ReplacementRule(pattern3829, With3829) pattern3830 = Pattern(Integral(((WC('f', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (WC('f', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons48, cons1517) rule3830 = ReplacementRule(pattern3830, replacement3830) pattern3831 = Pattern(Integral(((WC('f', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (WC('f', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons48, cons1517) rule3831 = ReplacementRule(pattern3831, replacement3831) pattern3832 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1483, cons1481, cons40) rule3832 = ReplacementRule(pattern3832, With3832) pattern3833 = Pattern(Integral(((S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1483, cons1481, cons40) rule3833 = ReplacementRule(pattern3833, With3833) pattern3834 = Pattern(Integral(((WC('f', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (WC('f', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons48, cons1482) rule3834 = ReplacementRule(pattern3834, replacement3834) pattern3835 = Pattern(Integral(((WC('f', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (WC('f', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons48, cons1482) rule3835 = ReplacementRule(pattern3835, replacement3835) pattern3836 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1483, cons1481, cons40) rule3836 = ReplacementRule(pattern3836, With3836) pattern3837 = Pattern(Integral(((S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1483, cons1481, cons40) rule3837 = ReplacementRule(pattern3837, With3837) pattern3838 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons47, cons40) rule3838 = ReplacementRule(pattern3838, replacement3838) pattern3839 = Pattern(Integral(((S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons47, cons40) rule3839 = ReplacementRule(pattern3839, replacement3839) pattern3840 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons47, cons149) rule3840 = ReplacementRule(pattern3840, replacement3840) pattern3841 = Pattern(Integral(((S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons47, cons149) rule3841 = ReplacementRule(pattern3841, replacement3841) pattern3842 = Pattern(Integral(((WC('f', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (WC('f', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons48, cons228) rule3842 = ReplacementRule(pattern3842, replacement3842) pattern3843 = Pattern(Integral(((WC('f', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (WC('f', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons48, cons228) rule3843 = ReplacementRule(pattern3843, replacement3843) pattern3844 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons47, cons40) rule3844 = ReplacementRule(pattern3844, replacement3844) pattern3845 = Pattern(Integral(((S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons47, cons40) rule3845 = ReplacementRule(pattern3845, replacement3845) pattern3846 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons47, cons149) rule3846 = ReplacementRule(pattern3846, replacement3846) pattern3847 = Pattern(Integral(((S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons47, cons149) rule3847 = ReplacementRule(pattern3847, replacement3847) pattern3848 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons48, cons228, cons1481) rule3848 = ReplacementRule(pattern3848, With3848) pattern3849 = Pattern(Integral(((S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**n2_*WC('c', S(1)) + (S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons48, cons228, cons1481) rule3849 = ReplacementRule(pattern3849, With3849) pattern3850 = Pattern(Integral((A_ + WC('B', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons87) rule3850 = ReplacementRule(pattern3850, replacement3850) pattern3851 = Pattern(Integral((A_ + WC('B', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons87) rule3851 = ReplacementRule(pattern3851, replacement3851) pattern3852 = Pattern(Integral((A_ + WC('B', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons25) rule3852 = ReplacementRule(pattern3852, replacement3852) pattern3853 = Pattern(Integral((A_ + WC('B', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons25) rule3853 = ReplacementRule(pattern3853, replacement3853) pattern3854 = Pattern(Integral((A_ + WC('B', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228) rule3854 = ReplacementRule(pattern3854, With3854) pattern3855 = Pattern(Integral((A_ + WC('B', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228) rule3855 = ReplacementRule(pattern3855, With3855) pattern3856 = Pattern(Integral((A_ + WC('B', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228, cons87) rule3856 = ReplacementRule(pattern3856, replacement3856) pattern3857 = Pattern(Integral((A_ + WC('B', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228, cons87) rule3857 = ReplacementRule(pattern3857, replacement3857) pattern3858 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons64) rule3858 = ReplacementRule(pattern3858, replacement3858) pattern3859 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons64) rule3859 = ReplacementRule(pattern3859, replacement3859) pattern3860 = Pattern(Integral((WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons170) rule3860 = ReplacementRule(pattern3860, replacement3860) pattern3861 = Pattern(Integral((WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons170) rule3861 = ReplacementRule(pattern3861, replacement3861) pattern3862 = Pattern(Integral((WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons95, cons91, cons170) rule3862 = ReplacementRule(pattern3862, replacement3862) pattern3863 = Pattern(Integral((WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons95, cons91, cons170) rule3863 = ReplacementRule(pattern3863, replacement3863) pattern3864 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons530) rule3864 = ReplacementRule(pattern3864, replacement3864) pattern3865 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons530) rule3865 = ReplacementRule(pattern3865, replacement3865) pattern3866 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441, cons33, cons170) rule3866 = ReplacementRule(pattern3866, replacement3866) pattern3867 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441, cons33, cons170) rule3867 = ReplacementRule(pattern3867, replacement3867) pattern3868 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441) rule3868 = ReplacementRule(pattern3868, replacement3868) pattern3869 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441) rule3869 = ReplacementRule(pattern3869, replacement3869) pattern3870 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441, cons33, cons96, cons1512) rule3870 = ReplacementRule(pattern3870, replacement3870) pattern3871 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441, cons33, cons96, cons1512) rule3871 = ReplacementRule(pattern3871, replacement3871) pattern3872 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441) rule3872 = ReplacementRule(pattern3872, replacement3872) pattern3873 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441) rule3873 = ReplacementRule(pattern3873, replacement3873) pattern3874 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1441, cons21) rule3874 = ReplacementRule(pattern3874, replacement3874) pattern3875 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1441, cons21) rule3875 = ReplacementRule(pattern3875, replacement3875) pattern3876 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441, cons1573) rule3876 = ReplacementRule(pattern3876, replacement3876) pattern3877 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441, cons1573) rule3877 = ReplacementRule(pattern3877, replacement3877) pattern3878 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1441, cons198) rule3878 = ReplacementRule(pattern3878, replacement3878) pattern3879 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1441, cons198) rule3879 = ReplacementRule(pattern3879, replacement3879) pattern3880 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441, cons1574, cons33, cons170) rule3880 = ReplacementRule(pattern3880, With3880) pattern3881 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1441, cons1574, cons33, cons170) rule3881 = ReplacementRule(pattern3881, With3881) pattern3882 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442, cons64) rule3882 = ReplacementRule(pattern3882, replacement3882) pattern3883 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442, cons64) rule3883 = ReplacementRule(pattern3883, replacement3883) pattern3884 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442) rule3884 = ReplacementRule(pattern3884, replacement3884) pattern3885 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442) rule3885 = ReplacementRule(pattern3885, replacement3885) pattern3886 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442, cons198, cons64) rule3886 = ReplacementRule(pattern3886, replacement3886) pattern3887 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1442, cons198, cons64) rule3887 = ReplacementRule(pattern3887, replacement3887) pattern3888 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tan(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule3888 = ReplacementRule(pattern3888, replacement3888) pattern3889 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tan(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule3889 = ReplacementRule(pattern3889, replacement3889) pattern3890 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule3890 = ReplacementRule(pattern3890, replacement3890) pattern3891 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule3891 = ReplacementRule(pattern3891, replacement3891) pattern3892 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1575, cons40) rule3892 = ReplacementRule(pattern3892, replacement3892) pattern3893 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1575, cons40) rule3893 = ReplacementRule(pattern3893, replacement3893) pattern3894 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule3894 = ReplacementRule(pattern3894, replacement3894) pattern3895 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule3895 = ReplacementRule(pattern3895, replacement3895) pattern3896 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71) rule3896 = ReplacementRule(pattern3896, replacement3896) pattern3897 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71) rule3897 = ReplacementRule(pattern3897, replacement3897) pattern3898 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule3898 = ReplacementRule(pattern3898, replacement3898) pattern3899 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule3899 = ReplacementRule(pattern3899, replacement3899) pattern3900 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1576, cons40) rule3900 = ReplacementRule(pattern3900, replacement3900) pattern3901 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1576, cons40) rule3901 = ReplacementRule(pattern3901, replacement3901) pattern3902 = Pattern(Integral(x_**WC('m', S(1))*tan(x_**n_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons8, cons29, cons19, cons4, cons1577) rule3902 = ReplacementRule(pattern3902, replacement3902) pattern3903 = Pattern(Integral(x_**WC('m', S(1))/tan(x_**n_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons8, cons29, cons19, cons4, cons1577) rule3903 = ReplacementRule(pattern3903, replacement3903) pattern3904 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1578) rule3904 = ReplacementRule(pattern3904, replacement3904) pattern3905 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1578) rule3905 = ReplacementRule(pattern3905, replacement3905) pattern3906 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule3906 = ReplacementRule(pattern3906, replacement3906) pattern3907 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tan(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule3907 = ReplacementRule(pattern3907, replacement3907) pattern3908 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*tan(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule3908 = ReplacementRule(pattern3908, replacement3908) pattern3909 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/tan(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule3909 = ReplacementRule(pattern3909, replacement3909) pattern3910 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cos(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1))*tan(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons5, cons33, cons87, cons1579, cons1580) rule3910 = ReplacementRule(pattern3910, replacement3910) pattern3911 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sin(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1))*(S(1)/tan(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**WC('q', S(1)), x_), cons2, cons3, cons5, cons33, cons87, cons1579, cons1580) rule3911 = ReplacementRule(pattern3911, replacement3911) pattern3912 = Pattern(Integral(tan(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons4, cons1581) rule3912 = ReplacementRule(pattern3912, replacement3912) pattern3913 = Pattern(Integral((S(1)/tan(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons4, cons1581) rule3913 = ReplacementRule(pattern3913, replacement3913) pattern3914 = Pattern(Integral((d_ + x_*WC('e', S(1)))*tan(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons49) rule3914 = ReplacementRule(pattern3914, replacement3914) pattern3915 = Pattern(Integral((d_ + x_*WC('e', S(1)))/tan(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons49) rule3915 = ReplacementRule(pattern3915, replacement3915) pattern3916 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*tan(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons241) rule3916 = ReplacementRule(pattern3916, replacement3916) pattern3917 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))/tan(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons241) rule3917 = ReplacementRule(pattern3917, replacement3917) pattern3918 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*tan(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1582) rule3918 = ReplacementRule(pattern3918, replacement3918) pattern3919 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(S(1)/tan(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1582) rule3919 = ReplacementRule(pattern3919, replacement3919) return [rule3401, rule3402, rule3403, rule3404, rule3405, rule3406, rule3407, rule3408, rule3409, rule3410, rule3411, rule3412, rule3413, rule3414, rule3415, rule3416, rule3417, rule3418, rule3419, rule3420, rule3421, rule3422, rule3423, rule3424, rule3425, rule3426, rule3427, rule3428, rule3429, rule3430, rule3431, rule3432, rule3433, rule3434, rule3435, rule3436, rule3437, rule3438, rule3439, rule3440, rule3441, rule3442, rule3443, rule3444, rule3445, rule3446, rule3447, rule3448, rule3449, rule3450, rule3451, rule3452, rule3453, rule3454, rule3455, rule3456, rule3457, rule3458, rule3459, rule3460, rule3461, rule3462, rule3463, rule3464, rule3465, rule3466, rule3467, rule3468, rule3469, rule3470, rule3471, rule3472, rule3473, rule3474, rule3475, rule3476, rule3477, rule3478, rule3479, rule3480, rule3481, rule3482, rule3483, rule3484, rule3485, rule3486, rule3487, rule3488, rule3489, rule3490, rule3491, rule3492, rule3493, rule3494, rule3495, rule3496, rule3497, rule3498, rule3499, rule3500, rule3501, rule3502, rule3503, rule3504, rule3505, rule3506, rule3507, rule3508, rule3509, rule3510, rule3511, rule3512, rule3513, rule3514, rule3515, rule3516, rule3517, rule3518, rule3519, rule3520, rule3521, rule3522, rule3523, rule3524, rule3525, rule3526, rule3527, rule3528, rule3529, rule3530, rule3531, rule3532, rule3533, rule3534, rule3535, rule3536, rule3537, rule3538, rule3539, rule3540, rule3541, rule3542, rule3543, rule3544, rule3545, rule3546, rule3547, rule3548, rule3549, rule3550, rule3551, rule3552, rule3553, rule3554, rule3555, rule3556, rule3557, rule3558, rule3559, rule3560, rule3561, rule3562, rule3563, rule3564, rule3565, rule3566, rule3567, rule3568, rule3569, rule3570, rule3571, rule3572, rule3573, rule3574, rule3575, rule3576, rule3577, rule3578, rule3579, rule3580, rule3581, rule3582, rule3583, rule3584, rule3585, rule3586, rule3587, rule3588, rule3589, rule3590, rule3591, rule3592, rule3593, rule3594, rule3595, rule3596, rule3597, rule3598, rule3599, rule3600, rule3601, rule3602, rule3603, rule3604, rule3605, rule3606, rule3607, rule3608, rule3609, rule3610, rule3611, rule3612, rule3613, rule3614, rule3615, rule3616, rule3617, rule3618, rule3619, rule3620, rule3621, rule3622, rule3623, rule3624, rule3625, rule3626, rule3627, rule3628, rule3629, rule3630, rule3631, rule3632, rule3633, rule3634, rule3635, rule3636, rule3637, rule3638, rule3639, rule3640, rule3641, rule3642, rule3643, rule3644, rule3645, rule3646, rule3647, rule3648, rule3649, rule3650, rule3651, rule3652, rule3653, rule3654, rule3655, rule3656, rule3657, rule3658, rule3659, rule3660, rule3661, rule3662, rule3663, rule3664, rule3665, rule3666, rule3667, rule3668, rule3669, rule3670, rule3671, rule3672, rule3673, rule3674, rule3675, rule3676, rule3677, rule3678, rule3679, rule3680, rule3681, rule3682, rule3683, rule3684, rule3685, rule3686, rule3687, rule3688, rule3689, rule3690, rule3691, rule3692, rule3693, rule3694, rule3695, rule3696, rule3697, rule3698, rule3699, rule3700, rule3701, rule3702, rule3703, rule3704, rule3705, rule3706, rule3707, rule3708, rule3709, rule3710, rule3711, rule3712, rule3713, rule3714, rule3715, rule3716, rule3717, rule3718, rule3719, rule3720, rule3721, rule3722, rule3723, rule3724, rule3725, rule3726, rule3727, rule3728, rule3729, rule3730, rule3731, rule3732, rule3733, rule3734, rule3735, rule3736, rule3737, rule3738, rule3739, rule3740, rule3741, rule3742, rule3743, rule3744, rule3745, rule3746, rule3747, rule3748, rule3749, rule3750, rule3751, rule3752, rule3753, rule3754, rule3755, rule3756, rule3757, rule3758, rule3759, rule3760, rule3761, rule3762, rule3763, rule3764, rule3765, rule3766, rule3767, rule3768, rule3769, rule3770, rule3771, rule3772, rule3773, rule3774, rule3775, rule3776, rule3777, rule3778, rule3779, rule3780, rule3781, rule3782, rule3783, rule3784, rule3785, rule3786, rule3787, rule3788, rule3789, rule3790, rule3791, rule3792, rule3793, rule3794, rule3795, rule3796, rule3797, rule3798, rule3799, rule3800, rule3801, rule3802, rule3803, rule3804, rule3805, rule3806, rule3807, rule3808, rule3809, rule3810, rule3811, rule3812, rule3813, rule3814, rule3815, rule3816, rule3817, rule3818, rule3819, rule3820, rule3821, rule3822, rule3823, rule3824, rule3825, rule3826, rule3827, rule3828, rule3829, rule3830, rule3831, rule3832, rule3833, rule3834, rule3835, rule3836, rule3837, rule3838, rule3839, rule3840, rule3841, rule3842, rule3843, rule3844, rule3845, rule3846, rule3847, rule3848, rule3849, rule3850, rule3851, rule3852, rule3853, rule3854, rule3855, rule3856, rule3857, rule3858, rule3859, rule3860, rule3861, rule3862, rule3863, rule3864, rule3865, rule3866, rule3867, rule3868, rule3869, rule3870, rule3871, rule3872, rule3873, rule3874, rule3875, rule3876, rule3877, rule3878, rule3879, rule3880, rule3881, rule3882, rule3883, rule3884, rule3885, rule3886, rule3887, rule3888, rule3889, rule3890, rule3891, rule3892, rule3893, rule3894, rule3895, rule3896, rule3897, rule3898, rule3899, rule3900, rule3901, rule3902, rule3903, rule3904, rule3905, rule3906, rule3907, rule3908, rule3909, rule3910, rule3911, rule3912, rule3913, rule3914, rule3915, rule3916, rule3917, rule3918, rule3919, ] def replacement3401(a, b, e, f, m, n, x): return -Simp(b*(a*sin(e + f*x))**m*(b*tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3402(a, b, e, f, m, n, x): return Simp(b*(a*cos(e + f*x))**m*(b/tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3403(e, f, m, n, x): return -Dist(S(1)/f, Subst(Int(x**(-n)*(S(1) - x**S(2))**(m/S(2) + n/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement3404(e, f, m, n, x): return Dist(S(1)/f, Subst(Int(x**(-n)*(S(1) - x**S(2))**(m/S(2) + n/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement3405(b, e, f, m, n, x): return Dist(b**(-m), Int((b*tan(e + f*x))**(m + n)*(S(1)/cos(e + f*x))**(-m), x), x) def replacement3406(b, e, f, m, n, x): return Dist(b**(-m), Int((b/tan(e + f*x))**(m + n)*(S(1)/sin(e + f*x))**(-m), x), x) def replacement3407(a, b, e, f, m, n, x): return -Dist(b**S(2)*(m + S(2))/(a**S(2)*(n + S(-1))), Int((a*sin(e + f*x))**(m + S(2))*(b*tan(e + f*x))**(n + S(-2)), x), x) + Simp(b*(a*sin(e + f*x))**(m + S(2))*(b*tan(e + f*x))**(n + S(-1))/(a**S(2)*f*(n + S(-1))), x) def replacement3408(a, b, e, f, m, n, x): return -Dist(b**S(2)*(m + S(2))/(a**S(2)*(n + S(-1))), Int((a*cos(e + f*x))**(m + S(2))*(b/tan(e + f*x))**(n + S(-2)), x), x) - Simp(b*(a*cos(e + f*x))**(m + S(2))*(b/tan(e + f*x))**(n + S(-1))/(a**S(2)*f*(n + S(-1))), x) def replacement3409(a, b, e, f, m, n, x): return -Dist(b**S(2)*(m + n + S(-1))/(n + S(-1)), Int((a*sin(e + f*x))**m*(b*tan(e + f*x))**(n + S(-2)), x), x) + Simp(b*(a*sin(e + f*x))**m*(b*tan(e + f*x))**(n + S(-1))/(f*(n + S(-1))), x) def replacement3410(a, b, e, f, m, n, x): return -Dist(b**S(2)*(m + n + S(-1))/(n + S(-1)), Int((a*cos(e + f*x))**m*(b/tan(e + f*x))**(n + S(-2)), x), x) - Simp(b*(a*cos(e + f*x))**m*(b/tan(e + f*x))**(n + S(-1))/(f*(n + S(-1))), x) def replacement3411(a, b, e, f, m, n, x): return -Dist(a**S(2)*(n + S(1))/(b**S(2)*m), Int((a*sin(e + f*x))**(m + S(-2))*(b*tan(e + f*x))**(n + S(2)), x), x) + Simp((a*sin(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))/(b*f*m), x) def replacement3412(a, b, e, f, m, n, x): return -Dist(a**S(2)*(n + S(1))/(b**S(2)*m), Int((a*cos(e + f*x))**(m + S(-2))*(b/tan(e + f*x))**(n + S(2)), x), x) - Simp((a*cos(e + f*x))**m*(b/tan(e + f*x))**(n + S(1))/(b*f*m), x) def replacement3413(a, b, e, f, m, n, x): return -Dist((n + S(1))/(b**S(2)*(m + n + S(1))), Int((a*sin(e + f*x))**m*(b*tan(e + f*x))**(n + S(2)), x), x) + Simp((a*sin(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))/(b*f*(m + n + S(1))), x) def replacement3414(a, b, e, f, m, n, x): return -Dist((n + S(1))/(b**S(2)*(m + n + S(1))), Int((a*cos(e + f*x))**m*(b/tan(e + f*x))**(n + S(2)), x), x) - Simp((a*cos(e + f*x))**m*(b/tan(e + f*x))**(n + S(1))/(b*f*(m + n + S(1))), x) def replacement3415(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + n + S(-1))/m, Int((a*sin(e + f*x))**(m + S(-2))*(b*tan(e + f*x))**n, x), x) - Simp(b*(a*sin(e + f*x))**m*(b*tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3416(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + n + S(-1))/m, Int((a*cos(e + f*x))**(m + S(-2))*(b/tan(e + f*x))**n, x), x) + Simp(b*(a*cos(e + f*x))**m*(b/tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3417(a, b, e, f, m, n, x): return Dist((m + S(2))/(a**S(2)*(m + n + S(1))), Int((a*sin(e + f*x))**(m + S(2))*(b*tan(e + f*x))**n, x), x) + Simp(b*(a*sin(e + f*x))**(m + S(2))*(b*tan(e + f*x))**(n + S(-1))/(a**S(2)*f*(m + n + S(1))), x) def replacement3418(a, b, e, f, m, n, x): return Dist((m + S(2))/(a**S(2)*(m + n + S(1))), Int((a*cos(e + f*x))**(m + S(2))*(b/tan(e + f*x))**n, x), x) - Simp(b*(a*cos(e + f*x))**(m + S(2))*(b/tan(e + f*x))**(n + S(-1))/(a**S(2)*f*(m + n + S(1))), x) def replacement3419(a, e, f, m, n, x): return Dist(S(1)/f, Subst(Int(x**(m + n)*(a**S(2) - x**S(2))**(-n/S(2) + S(-1)/2), x), x, a*sin(e + f*x)), x) def replacement3420(a, e, f, m, n, x): return -Dist(S(1)/f, Subst(Int(x**(m + n)*(a**S(2) - x**S(2))**(-n/S(2) + S(-1)/2), x), x, a*cos(e + f*x)), x) def replacement3421(a, b, e, f, m, n, x): return Dist(a**(S(1) - S(2)*IntPart(n/S(2) + S(1)/2))*b**(S(2)*IntPart(n/S(2) + S(1)/2) + S(-1))*(a*sin(e + f*x))**(-S(2)*FracPart(n/S(2) + S(1)/2))*(b*tan(e + f*x))**(S(2)*FracPart(n/S(2) + S(1)/2))*(cos(e + f*x)**S(2))**FracPart(n/S(2) + S(1)/2)/f, Subst(Int((a*x)**(m + n)*(S(1) - x**S(2))**(-n/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement3422(a, b, e, f, m, n, x): return -Dist(a**(S(1) - S(2)*IntPart(n/S(2) + S(1)/2))*b**(S(2)*IntPart(n/S(2) + S(1)/2) + S(-1))*(a*cos(e + f*x))**(-S(2)*FracPart(n/S(2) + S(1)/2))*(b/tan(e + f*x))**(S(2)*FracPart(n/S(2) + S(1)/2))*(sin(e + f*x)**S(2))**FracPart(n/S(2) + S(1)/2)/f, Subst(Int((a*x)**(m + n)*(S(1) - x**S(2))**(-n/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement3423(a, b, e, f, m, n, x): return Dist((S(1)/(a*cos(e + f*x)))**FracPart(m)*(a*cos(e + f*x))**FracPart(m), Int((S(1)/(a*cos(e + f*x)))**(-m)*(b*tan(e + f*x))**n, x), x) def replacement3424(a, b, e, f, m, n, x): return Dist((S(1)/(a*sin(e + f*x)))**FracPart(m)*(a*sin(e + f*x))**FracPart(m), Int((S(1)/(a*sin(e + f*x)))**(-m)*(b/tan(e + f*x))**n, x), x) def replacement3425(a, b, e, f, m, n, x): return Dist((a/tan(e + f*x))**m*(b*tan(e + f*x))**m, Int((b*tan(e + f*x))**(-m + n), x), x) def replacement3426(a, b, e, f, m, n, x): return -Simp((a/cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))/(b*f*m), x) def replacement3427(a, b, e, f, m, n, x): return Simp((a/sin(e + f*x))**m*(b/tan(e + f*x))**(n + S(1))/(b*f*m), x) def replacement3428(a, b, e, f, m, n, x): return Dist(a/f, Subst(Int((a*x)**(m + S(-1))*(x**S(2) + S(-1))**(n/S(2) + S(-1)/2), x), x, S(1)/cos(e + f*x)), x) def replacement3429(a, b, e, f, m, n, x): return -Dist(a/f, Subst(Int((a*x)**(m + S(-1))*(x**S(2) + S(-1))**(n/S(2) + S(-1)/2), x), x, S(1)/sin(e + f*x)), x) def replacement3430(b, e, f, m, n, x): return Dist(S(1)/f, Subst(Int((b*x)**n*(x**S(2) + S(1))**(m/S(2) + S(-1)), x), x, tan(e + f*x)), x) def replacement3431(b, e, f, m, n, x): return -Dist(S(1)/f, Subst(Int((b*x)**n*(x**S(2) + S(1))**(m/S(2) + S(-1)), x), x, S(1)/tan(e + f*x)), x) def replacement3432(a, b, e, f, m, n, x): return -Dist(a**S(2)*(m + S(-2))/(b**S(2)*(n + S(1))), Int((a/cos(e + f*x))**(m + S(-2))*(b*tan(e + f*x))**(n + S(2)), x), x) + Simp(a**S(2)*(a/cos(e + f*x))**(m + S(-2))*(b*tan(e + f*x))**(n + S(1))/(b*f*(n + S(1))), x) def replacement3433(a, b, e, f, m, n, x): return -Dist(a**S(2)*(m + S(-2))/(b**S(2)*(n + S(1))), Int((a/sin(e + f*x))**(m + S(-2))*(b/tan(e + f*x))**(n + S(2)), x), x) - Simp(a**S(2)*(a/sin(e + f*x))**(m + S(-2))*(b/tan(e + f*x))**(n + S(1))/(b*f*(n + S(1))), x) def replacement3434(a, b, e, f, m, n, x): return -Dist((m + n + S(1))/(b**S(2)*(n + S(1))), Int((a/cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(2)), x), x) + Simp((a/cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))/(b*f*(n + S(1))), x) def replacement3435(a, b, e, f, m, n, x): return -Dist((m + n + S(1))/(b**S(2)*(n + S(1))), Int((a/sin(e + f*x))**m*(b/tan(e + f*x))**(n + S(2)), x), x) - Simp((a/sin(e + f*x))**m*(b/tan(e + f*x))**(n + S(1))/(b*f*(n + S(1))), x) def replacement3436(a, b, e, f, m, n, x): return -Dist(b**S(2)*(n + S(-1))/(a**S(2)*m), Int((a/cos(e + f*x))**(m + S(2))*(b*tan(e + f*x))**(n + S(-2)), x), x) + Simp(b*(a/cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3437(a, b, e, f, m, n, x): return -Dist(b**S(2)*(n + S(-1))/(a**S(2)*m), Int((a/sin(e + f*x))**(m + S(2))*(b/tan(e + f*x))**(n + S(-2)), x), x) - Simp(b*(a/sin(e + f*x))**m*(b/tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3438(a, b, e, f, m, n, x): return -Dist(b**S(2)*(n + S(-1))/(m + n + S(-1)), Int((a/cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(-2)), x), x) + Simp(b*(a/cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3439(a, b, e, f, m, n, x): return -Dist(b**S(2)*(n + S(-1))/(m + n + S(-1)), Int((a/sin(e + f*x))**m*(b/tan(e + f*x))**(n + S(-2)), x), x) - Simp(b*(a/sin(e + f*x))**m*(b/tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3440(a, b, e, f, m, n, x): return Dist((m + n + S(1))/(a**S(2)*m), Int((a/cos(e + f*x))**(m + S(2))*(b*tan(e + f*x))**n, x), x) - Simp((a/cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))/(b*f*m), x) def replacement3441(a, b, e, f, m, n, x): return Dist((m + n + S(1))/(a**S(2)*m), Int((a/sin(e + f*x))**(m + S(2))*(b/tan(e + f*x))**n, x), x) + Simp((a/sin(e + f*x))**m*(b/tan(e + f*x))**(n + S(1))/(b*f*m), x) def replacement3442(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + S(-2))/(m + n + S(-1)), Int((a/cos(e + f*x))**(m + S(-2))*(b*tan(e + f*x))**n, x), x) + Simp(a**S(2)*(a/cos(e + f*x))**(m + S(-2))*(b*tan(e + f*x))**(n + S(1))/(b*f*(m + n + S(-1))), x) def replacement3443(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + S(-2))/(m + n + S(-1)), Int((a/sin(e + f*x))**(m + S(-2))*(b/tan(e + f*x))**n, x), x) - Simp(a**S(2)*(a/sin(e + f*x))**(m + S(-2))*(b/tan(e + f*x))**(n + S(1))/(b*f*(m + n + S(-1))), x) def replacement3444(b, e, f, x): return Dist(sqrt(sin(e + f*x))/(sqrt(b*tan(e + f*x))*sqrt(cos(e + f*x))), Int(S(1)/(sqrt(sin(e + f*x))*sqrt(cos(e + f*x))), x), x) def replacement3445(b, e, f, x): return Dist(sqrt(cos(e + f*x))/(sqrt(b/tan(e + f*x))*sqrt(sin(e + f*x))), Int(S(1)/(sqrt(sin(e + f*x))*sqrt(cos(e + f*x))), x), x) def replacement3446(b, e, f, x): return Dist(sqrt(b*tan(e + f*x))*sqrt(cos(e + f*x))/sqrt(sin(e + f*x)), Int(sqrt(sin(e + f*x))*sqrt(cos(e + f*x)), x), x) def replacement3447(b, e, f, x): return Dist(sqrt(b/tan(e + f*x))*sqrt(sin(e + f*x))/sqrt(cos(e + f*x)), Int(sqrt(sin(e + f*x))*sqrt(cos(e + f*x)), x), x) def replacement3448(a, b, e, f, m, n, x): return Dist(a**(m + n)*(a/cos(e + f*x))**(-n)*(b*sin(e + f*x))**(-n)*(b*tan(e + f*x))**n, Int((b*sin(e + f*x))**n*cos(e + f*x)**(-m - n), x), x) def replacement3449(a, b, e, f, m, n, x): return Dist(a**(m + n)*(a/sin(e + f*x))**(-n)*(b*cos(e + f*x))**(-n)*(b/tan(e + f*x))**n, Int((b*cos(e + f*x))**n*sin(e + f*x)**(-m - n), x), x) def replacement3450(a, b, e, f, m, n, x): return Simp((a/cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))*(cos(e + f*x)**S(2))**(m/S(2) + n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(1)/2, m/S(2) + n/S(2) + S(1)/2, n/S(2) + S(3)/2, sin(e + f*x)**S(2))/(b*f*(n + S(1))), x) def replacement3451(a, b, e, f, m, n, x): return -Simp((a/sin(e + f*x))**m*(b/tan(e + f*x))**(n + S(1))*(sin(e + f*x)**S(2))**(m/S(2) + n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(1)/2, m/S(2) + n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(e + f*x)**S(2))/(b*f*(n + S(1))), x) def replacement3452(a, b, e, f, m, n, x): return Dist((sin(e + f*x)/a)**FracPart(m)*(a/sin(e + f*x))**FracPart(m), Int((sin(e + f*x)/a)**(-m)*(b*tan(e + f*x))**n, x), x) def replacement3453(a, b, e, f, m, n, x): return Dist((cos(e + f*x)/a)**FracPart(m)*(a/cos(e + f*x))**FracPart(m), Int((cos(e + f*x)/a)**(-m)*(b/tan(e + f*x))**n, x), x) def replacement3454(a, b, d, e, f, m, n, p, x): return -Dist(b**S(2)*(n + S(-1))/(m*p + n + S(-1)), Int((a*(d/cos(e + f*x))**p)**m*(b*tan(e + f*x))**(n + S(-2)), x), x) + Simp(b*(a*(d/cos(e + f*x))**p)**m*(b*tan(e + f*x))**(n + S(-1))/(f*(m*p + n + S(-1))), x) def replacement3455(a, b, d, e, f, m, n, p, x): return -Dist(b**S(2)*(n + S(-1))/(m*p + n + S(-1)), Int((a*(d/sin(e + f*x))**p)**m*(b/tan(e + f*x))**(n + S(-2)), x), x) - Simp(b*(a*(d/sin(e + f*x))**p)**m*(b/tan(e + f*x))**(n + S(-1))/(f*(m*p + n + S(-1))), x) def replacement3456(a, b, d, e, f, m, n, p, x): return -Dist((m*p + n + S(1))/(b**S(2)*(n + S(1))), Int((a*(d/cos(e + f*x))**p)**m*(b*tan(e + f*x))**(n + S(2)), x), x) + Simp((a*(d/cos(e + f*x))**p)**m*(b*tan(e + f*x))**(n + S(1))/(b*f*(n + S(1))), x) def replacement3457(a, b, d, e, f, m, n, p, x): return -Dist((m*p + n + S(1))/(b**S(2)*(n + S(1))), Int((a*(d/sin(e + f*x))**p)**m*(b/tan(e + f*x))**(n + S(2)), x), x) + Simp((a*(d/sin(e + f*x))**p)**m*(b/tan(e + f*x))**(n + S(1))/(b*f*(n + S(1))), x) def replacement3458(b, c, d, n, x): return -Dist(b**S(2), Int((b*tan(c + d*x))**(n + S(-2)), x), x) + Simp(b*(b*tan(c + d*x))**(n + S(-1))/(d*(n + S(-1))), x) def replacement3459(b, c, d, n, x): return -Dist(b**S(2), Int((b/tan(c + d*x))**(n + S(-2)), x), x) - Simp(b*(b/tan(c + d*x))**(n + S(-1))/(d*(n + S(-1))), x) def replacement3460(b, c, d, n, x): return -Dist(b**(S(-2)), Int((b*tan(c + d*x))**(n + S(2)), x), x) + Simp((b*tan(c + d*x))**(n + S(1))/(b*d*(n + S(1))), x) def replacement3461(b, c, d, n, x): return -Dist(b**(S(-2)), Int((b/tan(c + d*x))**(n + S(2)), x), x) - Simp((b/tan(c + d*x))**(n + S(1))/(b*d*(n + S(1))), x) def replacement3462(c, d, x): return -Simp(log(RemoveContent(cos(c + d*x), x))/d, x) def replacement3463(c, d, x): return Simp(log(RemoveContent(sin(c + d*x), x))/d, x) def replacement3464(b, c, d, n, x): return Dist(b/d, Subst(Int(x**n/(b**S(2) + x**S(2)), x), x, b*tan(c + d*x)), x) def replacement3465(b, c, d, n, x): return -Dist(b/d, Subst(Int(x**n/(b**S(2) + x**S(2)), x), x, b/tan(c + d*x)), x) def replacement3466(a, b, c, d, x): return Dist(S(2)*a*b, Int(tan(c + d*x), x), x) + Simp(x*(a**S(2) - b**S(2)), x) + Simp(b**S(2)*tan(c + d*x)/d, x) def replacement3467(a, b, c, d, x): return Dist(S(2)*a*b, Int(S(1)/tan(c + d*x), x), x) + Simp(x*(a**S(2) - b**S(2)), x) - Simp(b**S(2)/(d*tan(c + d*x)), x) def replacement3468(a, b, c, d, n, x): return Dist(S(2)*a, Int((a + b*tan(c + d*x))**(n + S(-1)), x), x) + Simp(b*(a + b*tan(c + d*x))**(n + S(-1))/(d*(n + S(-1))), x) def replacement3469(a, b, c, d, n, x): return Dist(S(2)*a, Int((a + b/tan(c + d*x))**(n + S(-1)), x), x) - Simp(b*(a + b/tan(c + d*x))**(n + S(-1))/(d*(n + S(-1))), x) def replacement3470(a, b, c, d, n, x): return Dist(S(1)/(S(2)*a), Int((a + b*tan(c + d*x))**(n + S(1)), x), x) + Simp(a*(a + b*tan(c + d*x))**n/(S(2)*b*d*n), x) def replacement3471(a, b, c, d, n, x): return Dist(S(1)/(S(2)*a), Int((a + b/tan(c + d*x))**(n + S(1)), x), x) - Simp(a*(a + b/tan(c + d*x))**n/(S(2)*b*d*n), x) def replacement3472(a, b, c, d, x): return Dist(-S(2)*b/d, Subst(Int(S(1)/(S(2)*a - x**S(2)), x), x, sqrt(a + b*tan(c + d*x))), x) def replacement3473(a, b, c, d, x): return Dist(S(2)*b/d, Subst(Int(S(1)/(S(2)*a - x**S(2)), x), x, sqrt(a + b/tan(c + d*x))), x) def replacement3474(a, b, c, d, n, x): return -Dist(b/d, Subst(Int((a + x)**(n + S(-1))/(a - x), x), x, b*tan(c + d*x)), x) def replacement3475(a, b, c, d, n, x): return Dist(b/d, Subst(Int((a + x)**(n + S(-1))/(a - x), x), x, b/tan(c + d*x)), x) def replacement3476(a, b, c, d, n, x): return Int((a + b*tan(c + d*x))**(n + S(-2))*(a**S(2) + S(2)*a*b*tan(c + d*x) - b**S(2)), x) + Simp(b*(a + b*tan(c + d*x))**(n + S(-1))/(d*(n + S(-1))), x) def replacement3477(a, b, c, d, n, x): return Int((a + b/tan(c + d*x))**(n + S(-2))*(a**S(2) + S(2)*a*b/tan(c + d*x) - b**S(2)), x) - Simp(b*(a + b/tan(c + d*x))**(n + S(-1))/(d*(n + S(-1))), x) def replacement3478(a, b, c, d, n, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a - b*tan(c + d*x))*(a + b*tan(c + d*x))**(n + S(1)), x), x) + Simp(b*(a + b*tan(c + d*x))**(n + S(1))/(d*(a**S(2) + b**S(2))*(n + S(1))), x) def replacement3479(a, b, c, d, n, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a - b/tan(c + d*x))*(a + b/tan(c + d*x))**(n + S(1)), x), x) - Simp(b*(a + b/tan(c + d*x))**(n + S(1))/(d*(a**S(2) + b**S(2))*(n + S(1))), x) def replacement3480(a, b, c, d, x): return Dist(b/(a**S(2) + b**S(2)), Int((-a*tan(c + d*x) + b)/(a + b*tan(c + d*x)), x), x) + Simp(a*x/(a**S(2) + b**S(2)), x) def replacement3481(a, b, c, d, x): return Dist(b/(a**S(2) + b**S(2)), Int((-a/tan(c + d*x) + b)/(a + b/tan(c + d*x)), x), x) + Simp(a*x/(a**S(2) + b**S(2)), x) def replacement3482(a, b, c, d, n, x): return Dist(b/d, Subst(Int((a + x)**n/(b**S(2) + x**S(2)), x), x, b*tan(c + d*x)), x) def replacement3483(a, b, c, d, n, x): return -Dist(b/d, Subst(Int((a + x)**n/(b**S(2) + x**S(2)), x), x, b/tan(c + d*x)), x) def replacement3484(a, b, d, e, f, m, x): return Dist(a, Int((d/cos(e + f*x))**m, x), x) + Simp(b*(d/cos(e + f*x))**m/(f*m), x) def replacement3485(a, b, d, e, f, m, x): return Dist(a, Int((d/sin(e + f*x))**m, x), x) - Simp(b*(d/sin(e + f*x))**m/(f*m), x) def replacement3486(a, b, e, f, m, n, x): return Dist(a**(S(2) - m)/(b*f), Subst(Int((a - x)**(m/S(2) + S(-1))*(a + x)**(m/S(2) + n + S(-1)), x), x, b*tan(e + f*x)), x) def replacement3487(a, b, e, f, m, n, x): return -Dist(a**(S(2) - m)/(b*f), Subst(Int((a - x)**(m/S(2) + S(-1))*(a + x)**(m/S(2) + n + S(-1)), x), x, b/tan(e + f*x)), x) def replacement3488(a, b, d, e, f, m, n, x): return Simp(b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**n/(a*f*m), x) def replacement3489(a, b, d, e, f, m, n, x): return -Simp(b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**n/(a*f*m), x) def replacement3490(a, b, e, f, x): return Dist(-S(2)*a/(b*f), Subst(Int(S(1)/(-a*x**S(2) + S(2)), x), x, S(1)/(sqrt(a + b*tan(e + f*x))*cos(e + f*x))), x) def replacement3491(a, b, e, f, x): return Dist(S(2)*a/(b*f), Subst(Int(S(1)/(-a*x**S(2) + S(2)), x), x, S(1)/(sqrt(a + b/tan(e + f*x))*sin(e + f*x))), x) def replacement3492(a, b, d, e, f, m, n, x): return Dist(a/(S(2)*d**S(2)), Int((d/cos(e + f*x))**(m + S(2))*(a + b*tan(e + f*x))**(n + S(-1)), x), x) + Simp(b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**n/(a*f*m), x) def replacement3493(a, b, d, e, f, m, n, x): return Dist(a/(S(2)*d**S(2)), Int((d/sin(e + f*x))**(m + S(2))*(a + b/tan(e + f*x))**(n + S(-1)), x), x) - Simp(b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**n/(a*f*m), x) def replacement3494(a, b, d, e, f, m, n, x): return Dist(S(2)*d**S(2)/a, Int((d/cos(e + f*x))**(m + S(-2))*(a + b*tan(e + f*x))**(n + S(1)), x), x) + Simp(S(2)*d**S(2)*(d/cos(e + f*x))**(m + S(-2))*(a + b*tan(e + f*x))**(n + S(1))/(b*f*(m + S(-2))), x) def replacement3495(a, b, d, e, f, m, n, x): return Dist(S(2)*d**S(2)/a, Int((d/sin(e + f*x))**(m + S(-2))*(a + b/tan(e + f*x))**(n + S(1)), x), x) + Simp(-S(2)*d**S(2)*(d/sin(e + f*x))**(m + S(-2))*(a + b/tan(e + f*x))**(n + S(1))/(b*f*(m + S(-2))), x) def replacement3496(a, b, d, e, f, m, n, x): return Dist((a/d)**(S(2)*IntPart(n))*(d/cos(e + f*x))**(-S(2)*FracPart(n))*(a - b*tan(e + f*x))**FracPart(n)*(a + b*tan(e + f*x))**FracPart(n), Int((a - b*tan(e + f*x))**(-n), x), x) def replacement3497(a, b, d, e, f, m, n, x): return Dist((a/d)**(S(2)*IntPart(n))*(d/sin(e + f*x))**(-S(2)*FracPart(n))*(a - b/tan(e + f*x))**FracPart(n)*(a + b/tan(e + f*x))**FracPart(n), Int((a - b/tan(e + f*x))**(-n), x), x) def replacement3498(a, b, d, e, f, m, n, x): return Simp(S(2)*b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3499(a, b, d, e, f, m, n, x): return Simp(-S(2)*b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3500(a, b, d, e, f, m, n, x): return Dist(a*(m + S(2)*n + S(-2))/(m + n + S(-1)), Int((d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(-1)), x), x) + Simp(b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3501(a, b, d, e, f, m, n, x): return Dist(a*(m + S(2)*n + S(-2))/(m + n + S(-1)), Int((d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(-1)), x), x) - Simp(b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3502(a, b, d, e, f, x): return Dist(-S(4)*b*d**S(2)/f, Subst(Int(x**S(2)/(a**S(2) + d**S(2)*x**S(4)), x), x, sqrt(a + b*tan(e + f*x))/sqrt(d/cos(e + f*x))), x) def replacement3503(a, b, d, e, f, x): return Dist(S(4)*b*d**S(2)/f, Subst(Int(x**S(2)/(a**S(2) + d**S(2)*x**S(4)), x), x, sqrt(a + b/tan(e + f*x))/sqrt(d/sin(e + f*x))), x) def replacement3504(a, b, d, e, f, m, n, x): return -Dist(b**S(2)*(m + S(2)*n + S(-2))/(d**S(2)*m), Int((d/cos(e + f*x))**(m + S(2))*(a + b*tan(e + f*x))**(n + S(-2)), x), x) + Simp(S(2)*b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3505(a, b, d, e, f, m, n, x): return -Dist(b**S(2)*(m + S(2)*n + S(-2))/(d**S(2)*m), Int((d/sin(e + f*x))**(m + S(2))*(a + b/tan(e + f*x))**(n + S(-2)), x), x) + Simp(-S(2)*b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(-1))/(f*m), x) def replacement3506(a, b, d, e, f, m, n, x): return Dist(a*(m + n)/(d**S(2)*m), Int((d/cos(e + f*x))**(m + S(2))*(a + b*tan(e + f*x))**(n + S(-1)), x), x) + Simp(b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**n/(a*f*m), x) def replacement3507(a, b, d, e, f, m, n, x): return Dist(a*(m + n)/(d**S(2)*m), Int((d/sin(e + f*x))**(m + S(2))*(a + b/tan(e + f*x))**(n + S(-1)), x), x) - Simp(b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**n/(a*f*m), x) def replacement3508(a, b, d, e, f, m, n, x): return Dist(a*(m + S(2)*n + S(-2))/(m + n + S(-1)), Int((d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(-1)), x), x) + Simp(b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3509(a, b, d, e, f, m, n, x): return Dist(a*(m + S(2)*n + S(-2))/(m + n + S(-1)), Int((d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(-1)), x), x) - Simp(b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3510(a, b, d, e, f, x): return Dist(d/(sqrt(a - b*tan(e + f*x))*sqrt(a + b*tan(e + f*x))*cos(e + f*x)), Int(sqrt(d/cos(e + f*x))*sqrt(a - b*tan(e + f*x)), x), x) def replacement3511(a, b, d, e, f, x): return Dist(d/(sqrt(a - b/tan(e + f*x))*sqrt(a + b/tan(e + f*x))*sin(e + f*x)), Int(sqrt(d/sin(e + f*x))*sqrt(a - b/tan(e + f*x)), x), x) def replacement3512(a, b, d, e, f, m, n, x): return -Dist(d**S(2)*(m + S(-2))/(b**S(2)*(m + S(2)*n)), Int((d/cos(e + f*x))**(m + S(-2))*(a + b*tan(e + f*x))**(n + S(2)), x), x) + Simp(S(2)*d**S(2)*(d/cos(e + f*x))**(m + S(-2))*(a + b*tan(e + f*x))**(n + S(1))/(b*f*(m + S(2)*n)), x) def replacement3513(a, b, d, e, f, m, n, x): return -Dist(d**S(2)*(m + S(-2))/(b**S(2)*(m + S(2)*n)), Int((d/sin(e + f*x))**(m + S(-2))*(a + b/tan(e + f*x))**(n + S(2)), x), x) + Simp(-S(2)*d**S(2)*(d/sin(e + f*x))**(m + S(-2))*(a + b/tan(e + f*x))**(n + S(1))/(b*f*(m + S(2)*n)), x) def replacement3514(a, b, d, e, f, m, n, x): return Dist(d**S(2)*(m + S(-2))/(a*(m + n + S(-1))), Int((d/cos(e + f*x))**(m + S(-2))*(a + b*tan(e + f*x))**(n + S(1)), x), x) + Simp(d**S(2)*(d/cos(e + f*x))**(m + S(-2))*(a + b*tan(e + f*x))**(n + S(1))/(b*f*(m + n + S(-1))), x) def replacement3515(a, b, d, e, f, m, n, x): return Dist(d**S(2)*(m + S(-2))/(a*(m + n + S(-1))), Int((d/sin(e + f*x))**(m + S(-2))*(a + b/tan(e + f*x))**(n + S(1)), x), x) - Simp(d**S(2)*(d/sin(e + f*x))**(m + S(-2))*(a + b/tan(e + f*x))**(n + S(1))/(b*f*(m + n + S(-1))), x) def replacement3516(a, b, d, e, f, m, n, x): return Dist((m + n)/(a*(m + S(2)*n)), Int((d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(1)), x), x) + Simp(a*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**n/(b*f*(m + S(2)*n)), x) def replacement3517(a, b, d, e, f, m, n, x): return Dist((m + n)/(a*(m + S(2)*n)), Int((d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(1)), x), x) - Simp(a*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**n/(b*f*(m + S(2)*n)), x) def replacement3518(a, b, d, e, f, m, n, x): return Dist(a*(m + S(2)*n + S(-2))/(m + n + S(-1)), Int((d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(-1)), x), x) + Simp(b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3519(a, b, d, e, f, m, n, x): return Dist(a*(m + S(2)*n + S(-2))/(m + n + S(-1)), Int((d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(-1)), x), x) - Simp(b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3520(a, b, d, e, f, m, n, x): return Dist((m + n)/(a*(m + S(2)*n)), Int((d/cos(e + f*x))**m*(a + b*tan(e + f*x))**(n + S(1)), x), x) + Simp(a*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))**n/(b*f*(m + S(2)*n)), x) def replacement3521(a, b, d, e, f, m, n, x): return Dist((m + n)/(a*(m + S(2)*n)), Int((d/sin(e + f*x))**m*(a + b/tan(e + f*x))**(n + S(1)), x), x) - Simp(a*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))**n/(b*f*(m + S(2)*n)), x) def replacement3522(a, b, d, e, f, m, n, x): return Dist((d/cos(e + f*x))**m*(a - b*tan(e + f*x))**(-m/S(2))*(a + b*tan(e + f*x))**(-m/S(2)), Int((a - b*tan(e + f*x))**(m/S(2))*(a + b*tan(e + f*x))**(m/S(2) + n), x), x) def replacement3523(a, b, d, e, f, m, n, x): return Dist((d/sin(e + f*x))**m*(a - b/tan(e + f*x))**(-m/S(2))*(a + b/tan(e + f*x))**(-m/S(2)), Int((a - b/tan(e + f*x))**(m/S(2))*(a + b/tan(e + f*x))**(m/S(2) + n), x), x) def replacement3524(a, b, e, f, m, n, x): return Dist(S(1)/(b*f), Subst(Int((S(1) + x**S(2)/b**S(2))**(m/S(2) + S(-1))*(a + x)**n, x), x, b*tan(e + f*x)), x) def replacement3525(a, b, e, f, m, n, x): return -Dist(S(1)/(b*f), Subst(Int((S(1) + x**S(2)/b**S(2))**(m/S(2) + S(-1))*(a + x)**n, x), x, b/tan(e + f*x)), x) def replacement3526(a, b, e, f, x): return Simp(b**S(2)*atanh(sin(e + f*x))/f, x) + Simp((a**S(2) - b**S(2))*sin(e + f*x)/f, x) - Simp(S(2)*a*b*cos(e + f*x)/f, x) def replacement3527(a, b, e, f, x): return -Simp(b**S(2)*atanh(cos(e + f*x))/f, x) - Simp((a**S(2) - b**S(2))*cos(e + f*x)/f, x) + Simp(S(2)*a*b*sin(e + f*x)/f, x) def replacement3528(a, b, d, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((d/cos(e + f*x))**m*(a**S(2)*(m + S(1)) + a*b*(m + S(2))*tan(e + f*x) - b**S(2)), x), x) + Simp(b*(d/cos(e + f*x))**m*(a + b*tan(e + f*x))/(f*(m + S(1))), x) def replacement3529(a, b, d, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((d/sin(e + f*x))**m*(a**S(2)*(m + S(1)) + a*b*(m + S(2))/tan(e + f*x) - b**S(2)), x), x) - Simp(b*(d/sin(e + f*x))**m*(a + b/tan(e + f*x))/(f*(m + S(1))), x) def replacement3530(a, b, e, f, x): return -Dist(S(1)/f, Subst(Int(S(1)/(a**S(2) + b**S(2) - x**S(2)), x), x, (-a*tan(e + f*x) + b)*cos(e + f*x)), x) def replacement3531(a, b, e, f, x): return Dist(S(1)/f, Subst(Int(S(1)/(a**S(2) + b**S(2) - x**S(2)), x), x, (-a/tan(e + f*x) + b)*sin(e + f*x)), x) def replacement3532(a, b, d, e, f, m, x): return -Dist(d**S(2)/b**S(2), Int((d/cos(e + f*x))**(m + S(-2))*(a - b*tan(e + f*x)), x), x) + Dist(d**S(2)*(a**S(2) + b**S(2))/b**S(2), Int((d/cos(e + f*x))**(m + S(-2))/(a + b*tan(e + f*x)), x), x) def replacement3533(a, b, d, e, f, m, x): return -Dist(d**S(2)/b**S(2), Int((d/sin(e + f*x))**(m + S(-2))*(a - b/tan(e + f*x)), x), x) + Dist(d**S(2)*(a**S(2) + b**S(2))/b**S(2), Int((d/sin(e + f*x))**(m + S(-2))/(a + b/tan(e + f*x)), x), x) def replacement3534(a, b, d, e, f, m, x): return Dist(b**S(2)/(d**S(2)*(a**S(2) + b**S(2))), Int((d/cos(e + f*x))**(m + S(2))/(a + b*tan(e + f*x)), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int((d/cos(e + f*x))**m*(a - b*tan(e + f*x)), x), x) def replacement3535(a, b, d, e, f, m, x): return Dist(b**S(2)/(d**S(2)*(a**S(2) + b**S(2))), Int((d/sin(e + f*x))**(m + S(2))/(a + b/tan(e + f*x)), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int((d/sin(e + f*x))**m*(a - b/tan(e + f*x)), x), x) def replacement3536(a, b, d, e, f, m, n, x): return Dist(d**(S(2)*IntPart(m/S(2)))*(d/cos(e + f*x))**(S(2)*FracPart(m/S(2)))*(cos(e + f*x)**(S(-2)))**(-FracPart(m/S(2)))/(b*f), Subst(Int((S(1) + x**S(2)/b**S(2))**(m/S(2) + S(-1))*(a + x)**n, x), x, b*tan(e + f*x)), x) def replacement3537(a, b, d, e, f, m, n, x): return -Dist(d**(S(2)*IntPart(m/S(2)))*(d/sin(e + f*x))**(S(2)*FracPart(m/S(2)))*(sin(e + f*x)**(S(-2)))**(-FracPart(m/S(2)))/(b*f), Subst(Int((S(1) + x**S(2)/b**S(2))**(m/S(2) + S(-1))*(a + x)**n, x), x, b/tan(e + f*x)), x) def replacement3538(a, b, d, e, f, x): return Dist(-S(4)*b/f, Subst(Int(x**S(2)/(a**S(2)*d**S(2) + x**S(4)), x), x, sqrt(d*cos(e + f*x))*sqrt(a + b*tan(e + f*x))), x) def replacement3539(a, b, d, e, f, x): return Dist(S(4)*b/f, Subst(Int(x**S(2)/(a**S(2)*d**S(2) + x**S(4)), x), x, sqrt(d*sin(e + f*x))*sqrt(a + b/tan(e + f*x))), x) def replacement3540(a, b, d, e, f, x): return Dist(S(1)/(d*sqrt(a - b*tan(e + f*x))*sqrt(a + b*tan(e + f*x))*cos(e + f*x)), Int(sqrt(a - b*tan(e + f*x))/sqrt(d*cos(e + f*x)), x), x) def replacement3541(a, b, d, e, f, x): return Dist(S(1)/(d*sqrt(a - b/tan(e + f*x))*sqrt(a + b/tan(e + f*x))*sin(e + f*x)), Int(sqrt(a - b/tan(e + f*x))/sqrt(d*sin(e + f*x)), x), x) def replacement3542(a, b, d, e, f, m, n, x): return Dist((d/cos(e + f*x))**m*(d*cos(e + f*x))**m, Int((d/cos(e + f*x))**(-m)*(a + b*tan(e + f*x))**n, x), x) def replacement3543(a, b, d, e, f, m, n, x): return Dist((d/sin(e + f*x))**m*(d*sin(e + f*x))**m, Int((d/sin(e + f*x))**(-m)*(a + b/tan(e + f*x))**n, x), x) def replacement3544(a, b, e, f, m, n, x): return Dist(b/f, Subst(Int(x**m*(a + x)**n*(b**S(2) + x**S(2))**(-m/S(2) + S(-1)), x), x, b*tan(e + f*x)), x) def replacement3545(a, b, e, f, m, n, x): return -Dist(b/f, Subst(Int(x**m*(a + x)**n*(b**S(2) + x**S(2))**(-m/S(2) + S(-1)), x), x, b/tan(e + f*x)), x) def replacement3546(a, b, e, f, m, n, x): return Int((a + b*tan(e + f*x))**n*sin(e + f*x)**m, x) def replacement3547(a, b, e, f, m, n, x): return Int((a + b/tan(e + f*x))**n*cos(e + f*x)**m, x) def replacement3548(a, b, e, f, m, n, x): return Int((a*cos(e + f*x) + b*sin(e + f*x))**n*sin(e + f*x)**m*cos(e + f*x)**(-n), x) def replacement3549(a, b, e, f, m, n, x): return Int((a*sin(e + f*x) + b*cos(e + f*x))**n*sin(e + f*x)**(-n)*cos(e + f*x)**m, x) def replacement3550(a, b, d, e, f, m, n, x): return Dist((sin(e + f*x)/d)**FracPart(m)*(d/sin(e + f*x))**FracPart(m), Int((sin(e + f*x)/d)**(-m)*(a + b*tan(e + f*x))**n, x), x) def replacement3551(a, b, d, e, f, m, n, x): return Dist((cos(e + f*x)/d)**FracPart(m)*(d/cos(e + f*x))**FracPart(m), Int((cos(e + f*x)/d)**(-m)*(a + b/tan(e + f*x))**n, x), x) def replacement3552(a, b, e, f, m, n, p, x): return Int((a*cos(e + f*x) + b*sin(e + f*x))**n*sin(e + f*x)**p*cos(e + f*x)**(m - n), x) def replacement3553(a, b, e, f, m, n, p, x): return Int((a*sin(e + f*x) + b*cos(e + f*x))**n*sin(e + f*x)**(m - n)*cos(e + f*x)**p, x) def replacement3554(a, b, c, d, e, f, m, n, x): return Dist(a**m*c**m, Int((c + d*tan(e + f*x))**(-m + n)*(S(1)/cos(e + f*x))**(S(2)*m), x), x) def replacement3555(a, b, c, d, e, f, m, n, x): return Dist(a**m*c**m, Int((c + d/tan(e + f*x))**(-m + n)*(S(1)/sin(e + f*x))**(S(2)*m), x), x) def replacement3556(a, b, c, d, e, f, m, n, x): return Dist(a*c/f, Subst(Int((a + b*x)**(m + S(-1))*(c + d*x)**(n + S(-1)), x), x, tan(e + f*x)), x) def replacement3557(a, b, c, d, e, f, m, n, x): return -Dist(a*c/f, Subst(Int((a + b*x)**(m + S(-1))*(c + d*x)**(n + S(-1)), x), x, S(1)/tan(e + f*x)), x) def replacement3558(a, b, c, d, e, f, x): return Simp(x*(a*c - b*d), x) + Simp(b*d*tan(e + f*x)/f, x) def replacement3559(a, b, c, d, e, f, x): return Simp(x*(a*c - b*d), x) - Simp(b*d/(f*tan(e + f*x)), x) def replacement3560(a, b, c, d, e, f, x): return Dist(a*d + b*c, Int(tan(e + f*x), x), x) + Simp(x*(a*c - b*d), x) + Simp(b*d*tan(e + f*x)/f, x) def replacement3561(a, b, c, d, e, f, x): return Dist(a*d + b*c, Int(S(1)/tan(e + f*x), x), x) + Simp(x*(a*c - b*d), x) - Simp(b*d/(f*tan(e + f*x)), x) def replacement3562(a, b, c, d, e, f, m, x): return Dist((a*d + b*c)/(S(2)*a*b), Int((a + b*tan(e + f*x))**(m + S(1)), x), x) - Simp((a + b*tan(e + f*x))**m*(-a*d + b*c)/(S(2)*a*f*m), x) def replacement3563(a, b, c, d, e, f, m, x): return Dist((a*d + b*c)/(S(2)*a*b), Int((a + b/tan(e + f*x))**(m + S(1)), x), x) + Simp((a + b/tan(e + f*x))**m*(-a*d + b*c)/(S(2)*a*f*m), x) def replacement3564(a, b, c, d, e, f, m, x): return Dist((a*d + b*c)/b, Int((a + b*tan(e + f*x))**m, x), x) + Simp(d*(a + b*tan(e + f*x))**m/(f*m), x) def replacement3565(a, b, c, d, e, f, m, x): return Dist((a*d + b*c)/b, Int((a + b/tan(e + f*x))**m, x), x) - Simp(d*(a + b/tan(e + f*x))**m/(f*m), x) def replacement3566(a, b, c, d, e, f, m, x): return Int((a + b*tan(e + f*x))**(m + S(-1))*Simp(a*c - b*d + (a*d + b*c)*tan(e + f*x), x), x) + Simp(d*(a + b*tan(e + f*x))**m/(f*m), x) def replacement3567(a, b, c, d, e, f, m, x): return Int((a + b/tan(e + f*x))**(m + S(-1))*Simp(a*c - b*d + (a*d + b*c)/tan(e + f*x), x), x) - Simp(d*(a + b/tan(e + f*x))**m/(f*m), x) def replacement3568(a, b, c, d, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(a*c + b*d - (-a*d + b*c)*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(-a*d + b*c)/(f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3569(a, b, c, d, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(a*c + b*d - (-a*d + b*c)/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(-a*d + b*c)/(f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3570(a, b, c, d, e, f, x): return Simp(c*log(RemoveContent(a*cos(e + f*x) + b*sin(e + f*x), x))/(b*f), x) def replacement3571(a, b, c, d, e, f, x): return -Simp(c*log(RemoveContent(a*sin(e + f*x) + b*cos(e + f*x), x))/(b*f), x) def replacement3572(a, b, c, d, e, f, x): return Dist((-a*d + b*c)/(a**S(2) + b**S(2)), Int((-a*tan(e + f*x) + b)/(a + b*tan(e + f*x)), x), x) + Simp(x*(a*c + b*d)/(a**S(2) + b**S(2)), x) def replacement3573(a, b, c, d, e, f, x): return Dist((-a*d + b*c)/(a**S(2) + b**S(2)), Int((-a/tan(e + f*x) + b)/(a + b/tan(e + f*x)), x), x) + Simp(x*(a*c + b*d)/(a**S(2) + b**S(2)), x) def replacement3574(b, c, d, e, f, x): return Dist(-S(2)*d**S(2)/f, Subst(Int(S(1)/(b*x**S(2) + S(2)*c*d), x), x, (c - d*tan(e + f*x))/sqrt(b*tan(e + f*x))), x) def replacement3575(b, c, d, e, f, x): return Dist(S(2)*d**S(2)/f, Subst(Int(S(1)/(b*x**S(2) + S(2)*c*d), x), x, (c - d/tan(e + f*x))/sqrt(b/tan(e + f*x))), x) def replacement3576(b, c, d, e, f, x): return Dist(S(2)*c**S(2)/f, Subst(Int(S(1)/(b*c - d*x**S(2)), x), x, sqrt(b*tan(e + f*x))), x) def replacement3577(b, c, d, e, f, x): return Dist(-S(2)*c**S(2)/f, Subst(Int(S(1)/(b*c - d*x**S(2)), x), x, sqrt(b/tan(e + f*x))), x) def replacement3578(b, c, d, e, f, x): return Dist(S(2)/f, Subst(Int((b*c + d*x**S(2))/(b**S(2) + x**S(4)), x), x, sqrt(b*tan(e + f*x))), x) def replacement3579(b, c, d, e, f, x): return Dist(-S(2)/f, Subst(Int((b*c + d*x**S(2))/(b**S(2) + x**S(4)), x), x, sqrt(b/tan(e + f*x))), x) def replacement3580(a, b, c, d, e, f, x): return Dist(-S(2)*d**S(2)/f, Subst(Int(S(1)/(-S(4)*a*d**S(2) + S(2)*b*c*d + x**S(2)), x), x, (-S(2)*a*d + b*c - b*d*tan(e + f*x))/sqrt(a + b*tan(e + f*x))), x) def replacement3581(a, b, c, d, e, f, x): return Dist(S(2)*d**S(2)/f, Subst(Int(S(1)/(-S(4)*a*d**S(2) + S(2)*b*c*d + x**S(2)), x), x, (-S(2)*a*d + b*c - b*d/tan(e + f*x))/sqrt(a + b/tan(e + f*x))), x) def With3582(a, b, c, d, e, f, x): q = Rt(a**S(2) + b**S(2), S(2)) return -Dist(S(1)/(S(2)*q), Int((a*c + b*d - c*q + (-a*d + b*c - d*q)*tan(e + f*x))/sqrt(a + b*tan(e + f*x)), x), x) + Dist(S(1)/(S(2)*q), Int((a*c + b*d + c*q + (-a*d + b*c + d*q)*tan(e + f*x))/sqrt(a + b*tan(e + f*x)), x), x) def With3583(a, b, c, d, e, f, x): q = Rt(a**S(2) + b**S(2), S(2)) return -Dist(S(1)/(S(2)*q), Int((a*c + b*d - c*q + (-a*d + b*c - d*q)/tan(e + f*x))/sqrt(a + b/tan(e + f*x)), x), x) + Dist(S(1)/(S(2)*q), Int((a*c + b*d + c*q + (-a*d + b*c + d*q)/tan(e + f*x))/sqrt(a + b/tan(e + f*x)), x), x) def replacement3584(a, b, c, d, e, f, m, x): return Dist(c*d/f, Subst(Int((a + b*x/d)**m/(c*x + d**S(2)), x), x, d*tan(e + f*x)), x) def replacement3585(a, b, c, d, e, f, m, x): return -Dist(c*d/f, Subst(Int((a + b*x/d)**m/(c*x + d**S(2)), x), x, d/tan(e + f*x)), x) def replacement3586(b, c, d, e, f, m, x): return Dist(c, Int((b*tan(e + f*x))**m, x), x) + Dist(d/b, Int((b*tan(e + f*x))**(m + S(1)), x), x) def replacement3587(b, c, d, e, f, m, x): return Dist(c, Int((b/tan(e + f*x))**m, x), x) + Dist(d/b, Int((b/tan(e + f*x))**(m + S(1)), x), x) def replacement3588(a, b, c, d, e, f, m, x): return Dist(c/S(2) - I*d/S(2), Int((a + b*tan(e + f*x))**m*(I*tan(e + f*x) + S(1)), x), x) + Dist(c/S(2) + I*d/S(2), Int((a + b*tan(e + f*x))**m*(-I*tan(e + f*x) + S(1)), x), x) def replacement3589(a, b, c, d, e, f, m, x): return Dist(c/S(2) - I*d/S(2), Int((S(1) + I/tan(e + f*x))*(a + b/tan(e + f*x))**m, x), x) + Dist(c/S(2) + I*d/S(2), Int((S(1) - I/tan(e + f*x))*(a + b/tan(e + f*x))**m, x), x) def replacement3590(a, b, c, d, e, f, m, x): return Dist(S(1)/(S(2)*a**S(2)), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(a*c**S(2) + a*d**S(2) - S(2)*b*c*d - S(2)*b*d**S(2)*tan(e + f*x), x), x), x) - Simp(b*(a + b*tan(e + f*x))**m*(a*c + b*d)**S(2)/(S(2)*a**S(3)*f*m), x) def replacement3591(a, b, c, d, e, f, m, x): return Dist(S(1)/(S(2)*a**S(2)), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(a*c**S(2) + a*d**S(2) - S(2)*b*c*d - S(2)*b*d**S(2)/tan(e + f*x), x), x), x) + Simp(b*(a + b/tan(e + f*x))**m*(a*c + b*d)**S(2)/(S(2)*a**S(3)*f*m), x) def replacement3592(a, b, c, d, e, f, x): return Dist((-a*d + b*c)**S(2)/b**S(2), Int(S(1)/(a + b*tan(e + f*x)), x), x) + Dist(d**S(2)/b, Int(tan(e + f*x), x), x) + Simp(d*x*(-a*d + S(2)*b*c)/b**S(2), x) def replacement3593(a, b, c, d, e, f, x): return Dist((-a*d + b*c)**S(2)/b**S(2), Int(S(1)/(a + b/tan(e + f*x)), x), x) + Dist(d**S(2)/b, Int(S(1)/tan(e + f*x), x), x) + Simp(d*x*(-a*d + S(2)*b*c)/b**S(2), x) def replacement3594(a, b, c, d, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(a*c**S(2) - a*d**S(2) + S(2)*b*c*d - (-S(2)*a*c*d + b*c**S(2) - b*d**S(2))*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(-a*d + b*c)**S(2)/(b*f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3595(a, b, c, d, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(a*c**S(2) - a*d**S(2) + S(2)*b*c*d - (-S(2)*a*c*d + b*c**S(2) - b*d**S(2))/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(-a*d + b*c)**S(2)/(b*f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3596(a, b, c, d, e, f, m, x): return Int((a + b*tan(e + f*x))**m*Simp(c**S(2) + S(2)*c*d*tan(e + f*x) - d**S(2), x), x) + Simp(d**S(2)*(a + b*tan(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement3597(a, b, c, d, e, f, m, x): return Int((a + b/tan(e + f*x))**m*Simp(c**S(2) + S(2)*c*d/tan(e + f*x) - d**S(2), x), x) - Simp(d**S(2)*(a + b/tan(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement3598(a, b, c, d, e, f, x): return Dist(-S(2)*a*b/f, Subst(Int(S(1)/(-S(2)*a**S(2)*x**S(2) + a*c - b*d), x), x, sqrt(c + d*tan(e + f*x))/sqrt(a + b*tan(e + f*x))), x) def replacement3599(a, b, c, d, e, f, x): return Dist(S(2)*a*b/f, Subst(Int(S(1)/(-S(2)*a**S(2)*x**S(2) + a*c - b*d), x), x, sqrt(c + d/tan(e + f*x))/sqrt(a + b/tan(e + f*x))), x) def replacement3600(a, b, c, d, e, f, m, n, x): return Dist(S(2)*a**S(2)/(a*c - b*d), Int((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1)), x), x) + Simp(a*b*(a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1))/(f*(m + S(-1))*(a*c - b*d)), x) def replacement3601(a, b, c, d, e, f, m, n, x): return Dist(S(2)*a**S(2)/(a*c - b*d), Int((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1)), x), x) - Simp(a*b*(a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1))/(f*(m + S(-1))*(a*c - b*d)), x) def replacement3602(a, b, c, d, e, f, m, n, x): return -Dist((a*c - b*d)/(S(2)*b**S(2)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(-1)), x), x) + Simp(a*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n/(S(2)*b*f*m), x) def replacement3603(a, b, c, d, e, f, m, n, x): return -Dist((a*c - b*d)/(S(2)*b**S(2)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(-1)), x), x) - Simp(a*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n/(S(2)*b*f*m), x) def replacement3604(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n, x), x) + Simp(a*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(S(2)*f*m*(-a*d + b*c)), x) def replacement3605(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n, x), x) - Simp(a*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(S(2)*f*m*(-a*d + b*c)), x) def replacement3606(a, b, c, d, e, f, m, n, x): return Dist(a/(a*c - b*d), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1)), x), x) - Simp(d*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(f*m*(c**S(2) + d**S(2))), x) def replacement3607(a, b, c, d, e, f, m, n, x): return Dist(a/(a*c - b*d), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1)), x), x) + Simp(d*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(f*m*(c**S(2) + d**S(2))), x) def replacement3608(a, b, c, d, e, f, n, x): return Dist(S(1)/(S(2)*a*(-a*d + b*c)), Int((c + d*tan(e + f*x))**(n + S(-1))*Simp(a*c*d*(n + S(-1)) + b*c**S(2) + b*d**S(2)*n - d*(n + S(-1))*(-a*d + b*c)*tan(e + f*x), x), x), x) - Simp((c + d*tan(e + f*x))**n*(a*c + b*d)/(S(2)*f*(a + b*tan(e + f*x))*(-a*d + b*c)), x) def replacement3609(a, b, c, d, e, f, n, x): return Dist(S(1)/(S(2)*a*(-a*d + b*c)), Int((c + d/tan(e + f*x))**(n + S(-1))*Simp(a*c*d*(n + S(-1)) + b*c**S(2) + b*d**S(2)*n - d*(n + S(-1))*(-a*d + b*c)/tan(e + f*x), x), x), x) + Simp((c + d/tan(e + f*x))**n*(a*c + b*d)/(S(2)*f*(a + b/tan(e + f*x))*(-a*d + b*c)), x) def replacement3610(a, b, c, d, e, f, n, x): return Dist(S(1)/(S(2)*a**S(2)), Int((c + d*tan(e + f*x))**(n + S(-2))*Simp(a*c**S(2) + a*d**S(2)*(n + S(-1)) - b*c*d*n - d*(a*c*(n + S(-2)) + b*d*n)*tan(e + f*x), x), x), x) + Simp((c + d*tan(e + f*x))**(n + S(-1))*(-a*d + b*c)/(S(2)*a*f*(a + b*tan(e + f*x))), x) def replacement3611(a, b, c, d, e, f, n, x): return Dist(S(1)/(S(2)*a**S(2)), Int((c + d/tan(e + f*x))**(n + S(-2))*Simp(a*c**S(2) + a*d**S(2)*(n + S(-1)) - b*c*d*n - d*(a*c*(n + S(-2)) + b*d*n)/tan(e + f*x), x), x), x) - Simp((c + d/tan(e + f*x))**(n + S(-1))*(-a*d + b*c)/(S(2)*a*f*(a + b/tan(e + f*x))), x) def replacement3612(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/(a + b*tan(e + f*x)), x), x) - Dist(d/(-a*d + b*c), Int(S(1)/(c + d*tan(e + f*x)), x), x) def replacement3613(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/(a + b/tan(e + f*x)), x), x) - Dist(d/(-a*d + b*c), Int(S(1)/(c + d/tan(e + f*x)), x), x) def replacement3614(a, b, c, d, e, f, n, x): return Dist(S(1)/(S(2)*a*(-a*d + b*c)), Int((c + d*tan(e + f*x))**n*Simp(a*d*(n + S(-1)) + b*c - b*d*n*tan(e + f*x), x), x), x) - Simp(a*(c + d*tan(e + f*x))**(n + S(1))/(S(2)*f*(a + b*tan(e + f*x))*(-a*d + b*c)), x) def replacement3615(a, b, c, d, e, f, n, x): return Dist(S(1)/(S(2)*a*(-a*d + b*c)), Int((c + d/tan(e + f*x))**n*Simp(a*d*(n + S(-1)) + b*c - b*d*n/tan(e + f*x), x), x), x) + Simp(a*(c + d/tan(e + f*x))**(n + S(1))/(S(2)*f*(a + b/tan(e + f*x))*(-a*d + b*c)), x) def replacement3616(a, b, c, d, e, f, m, n, x): return Dist(a/(d*(n + S(1))*(a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**(n + S(1))*Simp(b*(-a*d*(m - S(2)*n + S(-4)) + b*c*(m + S(-2))) + (-a**S(2)*d*(m + n + S(-1)) + a*b*c*(m + S(-2)) + b**S(2)*d*(n + S(1)))*tan(e + f*x), x), x), x) - Simp(a**S(2)*(a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**(n + S(1))*(-a*d + b*c)/(d*f*(n + S(1))*(a*d + b*c)), x) def replacement3617(a, b, c, d, e, f, m, n, x): return Dist(a/(d*(n + S(1))*(a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**(n + S(1))*Simp(b*(-a*d*(m - S(2)*n + S(-4)) + b*c*(m + S(-2))) + (-a**S(2)*d*(m + n + S(-1)) + a*b*c*(m + S(-2)) + b**S(2)*d*(n + S(1)))/tan(e + f*x), x), x), x) + Simp(a**S(2)*(a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**(n + S(1))*(-a*d + b*c)/(d*f*(n + S(1))*(a*d + b*c)), x) def replacement3618(a, b, c, d, e, f, x): return Dist(S(2)*a**S(2)/(a*c - b*d), Int(sqrt(a + b*tan(e + f*x)), x), x) - Dist((a*(c**S(2) - d**S(2)) + S(2)*b*c*d)/(a*(c**S(2) + d**S(2))), Int((a - b*tan(e + f*x))*sqrt(a + b*tan(e + f*x))/(c + d*tan(e + f*x)), x), x) def replacement3619(a, b, c, d, e, f, x): return Dist(S(2)*a**S(2)/(a*c - b*d), Int(sqrt(a + b/tan(e + f*x)), x), x) - Dist((a*(c**S(2) - d**S(2)) + S(2)*b*c*d)/(a*(c**S(2) + d**S(2))), Int((a - b/tan(e + f*x))*sqrt(a + b/tan(e + f*x))/(c + d/tan(e + f*x)), x), x) def replacement3620(a, b, c, d, e, f, x): return Dist(S(2)*a, Int(sqrt(a + b*tan(e + f*x))/sqrt(c + d*tan(e + f*x)), x), x) + Dist(b/a, Int(sqrt(a + b*tan(e + f*x))*(a*tan(e + f*x) + b)/sqrt(c + d*tan(e + f*x)), x), x) def replacement3621(a, b, c, d, e, f, x): return Dist(S(2)*a, Int(sqrt(a + b/tan(e + f*x))/sqrt(c + d/tan(e + f*x)), x), x) + Dist(b/a, Int(sqrt(a + b/tan(e + f*x))*(a/tan(e + f*x) + b)/sqrt(c + d/tan(e + f*x)), x), x) def replacement3622(a, b, c, d, e, f, m, n, x): return Dist(a/(d*(m + n + S(-1))), Int((a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**n*Simp(a*d*(m + S(2)*n) + b*c*(m + S(-2)) + (a*c*(m + S(-2)) + b*d*(S(3)*m + S(2)*n + S(-4)))*tan(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(-1))), x) def replacement3623(a, b, c, d, e, f, m, n, x): return Dist(a/(d*(m + n + S(-1))), Int((a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**n*Simp(a*d*(m + S(2)*n) + b*c*(m + S(-2)) + (a*c*(m + S(-2)) + b*d*(S(3)*m + S(2)*n + S(-4)))/tan(e + f*x), x), x), x) - Simp(b**S(2)*(a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(-1))), x) def replacement3624(a, b, c, d, e, f, m, x): return Dist(S(1)/(S(4)*a**S(2)*m), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(S(2)*a*c*m + a*d*(S(2)*m + S(1))*tan(e + f*x) + b*d, x)/sqrt(c + d*tan(e + f*x)), x), x) - Simp(b*(a + b*tan(e + f*x))**m*sqrt(c + d*tan(e + f*x))/(S(2)*a*f*m), x) def replacement3625(a, b, c, d, e, f, m, x): return Dist(S(1)/(S(4)*a**S(2)*m), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(S(2)*a*c*m + a*d*(S(2)*m + S(1))/tan(e + f*x) + b*d, x)/sqrt(c + d/tan(e + f*x)), x), x) + Simp(b*(a + b/tan(e + f*x))**m*sqrt(c + d/tan(e + f*x))/(S(2)*a*f*m), x) def replacement3626(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a**S(2)*m), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(-2))*Simp(c*(a*c*m + b*d*(n + S(-1))) - d*(-a*c*(m + n + S(-1)) + b*d*(m - n + S(1)))*tan(e + f*x) - d*(a*d*(n + S(-1)) + b*c*m), x), x), x) - Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(-1))*(-a*d + b*c)/(S(2)*a*f*m), x) def replacement3627(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a**S(2)*m), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(-2))*Simp(c*(a*c*m + b*d*(n + S(-1))) - d*(-a*c*(m + n + S(-1)) + b*d*(m - n + S(1)))/tan(e + f*x) - d*(a*d*(n + S(-1)) + b*c*m), x), x), x) + Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(-1))*(-a*d + b*c)/(S(2)*a*f*m), x) def replacement3628(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a*m*(-a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*Simp(-a*d*(S(2)*m + n + S(1)) + b*c*m + b*d*(m + n + S(1))*tan(e + f*x), x), x), x) + Simp(a*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(S(2)*f*m*(-a*d + b*c)), x) def replacement3629(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a*m*(-a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*Simp(-a*d*(S(2)*m + n + S(1)) + b*c*m + b*d*(m + n + S(1))/tan(e + f*x), x), x), x) - Simp(a*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(S(2)*f*m*(-a*d + b*c)), x) def replacement3630(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*(m + n + S(-1))), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(-2))*Simp(-a*c**S(2)*(m + n + S(-1)) + d*(-a*c*(m + S(2)*n + S(-2)) + b*d*m)*tan(e + f*x) + d*(a*d*(n + S(-1)) + b*c*m), x), x), x) + Simp(d*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3631(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*(m + n + S(-1))), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(-2))*Simp(-a*c**S(2)*(m + n + S(-1)) + d*(-a*c*(m + S(2)*n + S(-2)) + b*d*m)/tan(e + f*x) + d*(a*d*(n + S(-1)) + b*c*m), x), x), x) - Simp(d*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(-1))/(f*(m + n + S(-1))), x) def replacement3632(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*Simp(-a*c*(n + S(1)) + a*d*(m + n + S(1))*tan(e + f*x) + b*d*m, x), x), x) + Simp(d*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3633(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*Simp(-a*c*(n + S(1)) + a*d*(m + n + S(1))/tan(e + f*x) + b*d*m, x), x), x) - Simp(d*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3634(a, b, c, d, e, f, m, x): return Dist(a/(a*c - b*d), Int((a + b*tan(e + f*x))**m, x), x) - Dist(d/(a*c - b*d), Int((a + b*tan(e + f*x))**m*(a*tan(e + f*x) + b)/(c + d*tan(e + f*x)), x), x) def replacement3635(a, b, c, d, e, f, m, x): return Dist(a/(a*c - b*d), Int((a + b/tan(e + f*x))**m, x), x) - Dist(d/(a*c - b*d), Int((a + b/tan(e + f*x))**m*(a/tan(e + f*x) + b)/(c + d/tan(e + f*x)), x), x) def replacement3636(a, b, c, d, e, f, x): return Dist(d/a, Int(sqrt(a + b*tan(e + f*x))*(a*tan(e + f*x) + b)/sqrt(c + d*tan(e + f*x)), x), x) + Dist((a*c - b*d)/a, Int(sqrt(a + b*tan(e + f*x))/sqrt(c + d*tan(e + f*x)), x), x) def replacement3637(a, b, c, d, e, f, x): return Dist(d/a, Int(sqrt(a + b/tan(e + f*x))*(a/tan(e + f*x) + b)/sqrt(c + d/tan(e + f*x)), x), x) + Dist((a*c - b*d)/a, Int(sqrt(a + b/tan(e + f*x))/sqrt(c + d/tan(e + f*x)), x), x) def replacement3638(a, b, c, d, e, f, m, n, x): return Dist(a*b/f, Subst(Int((a + x)**(m + S(-1))*(c + d*x/b)**n/(a*x + b**S(2)), x), x, b*tan(e + f*x)), x) def replacement3639(a, b, c, d, e, f, m, n, x): return -Dist(a*b/f, Subst(Int((a + x)**(m + S(-1))*(c + d*x/b)**n/(a*x + b**S(2)), x), x, b/tan(e + f*x)), x) def replacement3640(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b*tan(e + f*x))**(m + S(-3))*(c + d*tan(e + f*x))**(n + S(1))*Simp(a**S(2)*d*(-a*c*(n + S(1)) + b*d*(m + S(-2))) + b*(-S(2)*a*d + b*c)*(a*d*(n + S(1)) + b*c*(m + S(-2))) - b*(a*d*(-a*d + S(2)*b*c)*(m + n + S(-1)) - b**S(2)*(c**S(2)*(m + S(-2)) - d**S(2)*(n + S(1))))*tan(e + f*x)**S(2) - d*(n + S(1))*(-a**S(3)*d + S(3)*a**S(2)*b*c + S(3)*a*b**S(2)*d - b**S(3)*c)*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**(n + S(1))*(-a*d + b*c)**S(2)/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3641(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b/tan(e + f*x))**(m + S(-3))*(c + d/tan(e + f*x))**(n + S(1))*Simp(a**S(2)*d*(-a*c*(n + S(1)) + b*d*(m + S(-2))) + b*(-S(2)*a*d + b*c)*(a*d*(n + S(1)) + b*c*(m + S(-2))) - b*(a*d*(-a*d + S(2)*b*c)*(m + n + S(-1)) - b**S(2)*(c**S(2)*(m + S(-2)) - d**S(2)*(n + S(1))))/tan(e + f*x)**S(2) - d*(n + S(1))*(-a**S(3)*d + S(3)*a**S(2)*b*c + S(3)*a*b**S(2)*d - b**S(3)*c)/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**(n + S(1))*(-a*d + b*c)**S(2)/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3642(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(-1))), Int((a + b*tan(e + f*x))**(m + S(-3))*(c + d*tan(e + f*x))**n*Simp(a**S(3)*d*(m + n + S(-1)) - b**S(2)*(a*d*(n + S(1)) + b*c*(m + S(-2))) - b**S(2)*(-a*d*(S(3)*m + S(2)*n + S(-4)) + b*c*(m + S(-2)))*tan(e + f*x)**S(2) + b*d*(S(3)*a**S(2) - b**S(2))*(m + n + S(-1))*tan(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(-1))), x) def replacement3643(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(-1))), Int((a + b/tan(e + f*x))**(m + S(-3))*(c + d/tan(e + f*x))**n*Simp(a**S(3)*d*(m + n + S(-1)) - b**S(2)*(a*d*(n + S(1)) + b*c*(m + S(-2))) - b**S(2)*(-a*d*(S(3)*m + S(2)*n + S(-4)) + b*c*(m + S(-2)))/tan(e + f*x)**S(2) + b*d*(S(3)*a**S(2) - b**S(2))*(m + n + S(-1))/tan(e + f*x), x), x), x) - Simp(b**S(2)*(a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(-1))), x) def replacement3644(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(-2))*Simp(a*c**S(2)*(m + S(1)) + a*d**S(2)*(n + S(-1)) + b*c*d*(m - n + S(2)) - d*(m + n)*(-a*d + b*c)*tan(e + f*x)**S(2) - (m + S(1))*(-S(2)*a*c*d + b*c**S(2) - b*d**S(2))*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(-1))*(-a*d + b*c)/(f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3645(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(-2))*Simp(a*c**S(2)*(m + S(1)) + a*d**S(2)*(n + S(-1)) + b*c*d*(m - n + S(2)) - d*(m + n)*(-a*d + b*c)/tan(e + f*x)**S(2) - (m + S(1))*(-S(2)*a*c*d + b*c**S(2) - b*d**S(2))/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(-1))*(-a*d + b*c)/(f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3646(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(-1))*Simp(a*c*(m + S(1)) - b*d*n - b*d*(m + n + S(1))*tan(e + f*x)**S(2) - (m + S(1))*(-a*d + b*c)*tan(e + f*x), x), x), x) + Simp(b*(a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n/(f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3647(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(-1))*Simp(a*c*(m + S(1)) - b*d*n - b*d*(m + n + S(1))/tan(e + f*x)**S(2) - (m + S(1))*(-a*d + b*c)/tan(e + f*x), x), x), x) - Simp(b*(a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n/(f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3648(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*Simp(a*(m + S(1))*(-a*d + b*c) - b**S(2)*d*(m + n + S(2))*tan(e + f*x)**S(2) - b**S(2)*d*(m + n + S(2)) - b*(m + S(1))*(-a*d + b*c)*tan(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(1))/(f*(a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3649(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*Simp(a*(m + S(1))*(-a*d + b*c) - b**S(2)*d*(m + n + S(2)) - b**S(2)*d*(m + n + S(2))/tan(e + f*x)**S(2) - b*(m + S(1))*(-a*d + b*c)/tan(e + f*x), x), x), x) - Simp(b**S(2)*(a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(1))/(f*(a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3650(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(m + n + S(-1)), Int((a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**(n + S(-1))*Simp(a**S(2)*c*(m + n + S(-1)) - b*(a*d*n + b*c*(m + S(-1))) + b*(a*d*(S(2)*m + n + S(-2)) + b*c*n)*tan(e + f*x)**S(2) + (m + n + S(-1))*(a**S(2)*d + S(2)*a*b*c - b**S(2)*d)*tan(e + f*x), x), x), x) + Simp(b*(a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**n/(f*(m + n + S(-1))), x) def replacement3651(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(m + n + S(-1)), Int((a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**(n + S(-1))*Simp(a**S(2)*c*(m + n + S(-1)) - b*(a*d*n + b*c*(m + S(-1))) + b*(a*d*(S(2)*m + n + S(-2)) + b*c*n)/tan(e + f*x)**S(2) + (m + n + S(-1))*(a**S(2)*d + S(2)*a*b*c - b**S(2)*d)/tan(e + f*x), x), x), x) - Simp(b*(a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**n/(f*(m + n + S(-1))), x) def replacement3652(a, b, c, d, e, f, x): return Dist(b**S(2)/((a**S(2) + b**S(2))*(-a*d + b*c)), Int((-a*tan(e + f*x) + b)/(a + b*tan(e + f*x)), x), x) - Dist(d**S(2)/((c**S(2) + d**S(2))*(-a*d + b*c)), Int((-c*tan(e + f*x) + d)/(c + d*tan(e + f*x)), x), x) + Simp(x*(a*c - b*d)/((a**S(2) + b**S(2))*(c**S(2) + d**S(2))), x) def replacement3653(a, b, c, d, e, f, x): return Dist(b**S(2)/((a**S(2) + b**S(2))*(-a*d + b*c)), Int((-a/tan(e + f*x) + b)/(a + b/tan(e + f*x)), x), x) - Dist(d**S(2)/((c**S(2) + d**S(2))*(-a*d + b*c)), Int((-c/tan(e + f*x) + d)/(c + d/tan(e + f*x)), x), x) + Simp(x*(a*c - b*d)/((a**S(2) + b**S(2))*(c**S(2) + d**S(2))), x) def replacement3654(a, b, c, d, e, f, x): return -Dist(d*(-a*d + b*c)/(c**S(2) + d**S(2)), Int((tan(e + f*x)**S(2) + S(1))/(sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))), x), x) + Dist(S(1)/(c**S(2) + d**S(2)), Int(Simp(a*c + b*d + (-a*d + b*c)*tan(e + f*x), x)/sqrt(a + b*tan(e + f*x)), x), x) def replacement3655(a, b, c, d, e, f, x): return -Dist(d*(-a*d + b*c)/(c**S(2) + d**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))/(sqrt(a + b/tan(e + f*x))*(c + d/tan(e + f*x))), x), x) + Dist(S(1)/(c**S(2) + d**S(2)), Int(Simp(a*c + b*d + (-a*d + b*c)/tan(e + f*x), x)/sqrt(a + b/tan(e + f*x)), x), x) def replacement3656(a, b, c, d, e, f, x): return Dist((-a*d + b*c)**S(2)/(c**S(2) + d**S(2)), Int((tan(e + f*x)**S(2) + S(1))/(sqrt(a + b*tan(e + f*x))*(c + d*tan(e + f*x))), x), x) + Dist(S(1)/(c**S(2) + d**S(2)), Int(Simp(a**S(2)*c + S(2)*a*b*d - b**S(2)*c + (-a**S(2)*d + S(2)*a*b*c + b**S(2)*d)*tan(e + f*x), x)/sqrt(a + b*tan(e + f*x)), x), x) def replacement3657(a, b, c, d, e, f, x): return Dist((-a*d + b*c)**S(2)/(c**S(2) + d**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))/(sqrt(a + b/tan(e + f*x))*(c + d/tan(e + f*x))), x), x) + Dist(S(1)/(c**S(2) + d**S(2)), Int(Simp(a**S(2)*c + S(2)*a*b*d - b**S(2)*c + (-a**S(2)*d + S(2)*a*b*c + b**S(2)*d)/tan(e + f*x), x)/sqrt(a + b/tan(e + f*x)), x), x) def replacement3658(a, b, c, d, e, f, m, x): return Dist(d**S(2)/(c**S(2) + d**S(2)), Int((a + b*tan(e + f*x))**m*(tan(e + f*x)**S(2) + S(1))/(c + d*tan(e + f*x)), x), x) + Dist(S(1)/(c**S(2) + d**S(2)), Int((a + b*tan(e + f*x))**m*(c - d*tan(e + f*x)), x), x) def replacement3659(a, b, c, d, e, f, m, x): return Dist(d**S(2)/(c**S(2) + d**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))*(a + b/tan(e + f*x))**m/(c + d/tan(e + f*x)), x), x) + Dist(S(1)/(c**S(2) + d**S(2)), Int((a + b/tan(e + f*x))**m*(c - d/tan(e + f*x)), x), x) def replacement3660(a, b, c, d, e, f, m, n, x): return Dist(b/f, Subst(Int((a + x)**m*(c + d*x/b)**n/(b**S(2) + x**S(2)), x), x, b*tan(e + f*x)), x) def replacement3661(a, b, c, d, e, f, m, n, x): return -Dist(b/f, Subst(Int((a + x)**m*(c + d*x/b)**n/(b**S(2) + x**S(2)), x), x, b/tan(e + f*x)), x) def replacement3662(a, b, d, e, f, m, n, x): return Dist(d**m, Int((d/tan(e + f*x))**(-m + n)*(a/tan(e + f*x) + b)**m, x), x) def replacement3663(a, b, d, e, f, m, n, x): return Dist(d**m, Int((d*tan(e + f*x))**(-m + n)*(a*tan(e + f*x) + b)**m, x), x) def replacement3664(a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d*tan(e + f*x))**p)**FracPart(n)*(d*tan(e + f*x))**(-p*FracPart(n)), Int((d*tan(e + f*x))**(n*p)*(a + b*tan(e + f*x))**m, x), x) def replacement3665(a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d/tan(e + f*x))**p)**FracPart(n)*(d/tan(e + f*x))**(-p*FracPart(n)), Int((d/tan(e + f*x))**(n*p)*(a + b/tan(e + f*x))**m, x), x) def replacement3666(a, b, c, d, e, f, g, m, n, p, x): return Int((g*tan(e + f*x))**p*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n, x) def replacement3667(a, b, c, d, e, f, g, m, n, p, x): return Int((g/tan(e + f*x))**p*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n, x) def replacement3668(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(m + n), Int((g/tan(e + f*x))**(-m - n + p)*(a/tan(e + f*x) + b)**m*(c/tan(e + f*x) + d)**n, x), x) def replacement3669(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(m + n), Int((g*tan(e + f*x))**(-m - n + p)*(a*tan(e + f*x) + b)**m*(c*tan(e + f*x) + d)**n, x), x) def replacement3670(a, b, c, d, e, f, g, m, n, p, q, x): return Dist((g*tan(e + f*x))**(-p*q)*(g*tan(e + f*x)**q)**p, Int((g*tan(e + f*x))**(p*q)*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n, x), x) def replacement3671(a, b, c, d, e, f, g, m, n, p, q, x): return Dist((g*(S(1)/tan(e + f*x))**q)**p*(g/tan(e + f*x))**(-p*q), Int((g/tan(e + f*x))**(p*q)*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n, x), x) def replacement3672(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**n, Int((g*tan(e + f*x))**(-n + p)*(a + b*tan(e + f*x))**m*(c*tan(e + f*x) + d)**n, x), x) def replacement3673(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**n, Int((g/tan(e + f*x))**(-n + p)*(a + b/tan(e + f*x))**m*(c/tan(e + f*x) + d)**n, x), x) def replacement3674(a, b, c, d, e, f, m, n, p, x): return Int((c + d/tan(e + f*x))**n*(a/tan(e + f*x) + b)**m*(S(1)/tan(e + f*x))**(-m - p), x) def replacement3675(a, b, c, d, e, f, m, n, p, x): return Int((c + d*tan(e + f*x))**n*(a*tan(e + f*x) + b)**m*tan(e + f*x)**(-m - p), x) def replacement3676(a, b, c, d, e, f, g, m, n, p, x): return Dist((g*tan(e + f*x))**p*(S(1)/tan(e + f*x))**p, Int((c + d/tan(e + f*x))**n*(a/tan(e + f*x) + b)**m*(S(1)/tan(e + f*x))**(-m - p), x), x) def replacement3677(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/tan(e + f*x))**p*tan(e + f*x)**p, Int((c + d*tan(e + f*x))**n*(a*tan(e + f*x) + b)**m*tan(e + f*x)**(-m - p), x), x) def replacement3678(a, b, c, d, e, f, g, m, n, p, x): return Dist((g*tan(e + f*x))**n*(c + d/tan(e + f*x))**n*(c*tan(e + f*x) + d)**(-n), Int((g*tan(e + f*x))**(-n + p)*(a + b*tan(e + f*x))**m*(c*tan(e + f*x) + d)**n, x), x) def replacement3679(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/tan(e + f*x))**n*(c + d*tan(e + f*x))**n*(c/tan(e + f*x) + d)**(-n), Int((g/tan(e + f*x))**(-n + p)*(a + b/tan(e + f*x))**m*(c/tan(e + f*x) + d)**n, x), x) def replacement3680(A, B, a, b, c, d, e, f, m, n, x): return Dist(a*c/f, Subst(Int((A + B*x)*(a + b*x)**(m + S(-1))*(c + d*x)**(n + S(-1)), x), x, tan(e + f*x)), x) def replacement3681(A, B, a, b, c, d, e, f, m, n, x): return -Dist(a*c/f, Subst(Int((A + B*x)*(a + b*x)**(m + S(-1))*(c + d*x)**(n + S(-1)), x), x, S(1)/tan(e + f*x)), x) def replacement3682(A, B, a, b, c, d, e, f, x): return Dist(S(1)/b, Int(Simp(A*b*c + (A*b*d + B*(-a*d + b*c))*tan(e + f*x), x)/(a + b*tan(e + f*x)), x), x) + Dist(B*d/b, Int(tan(e + f*x), x), x) def replacement3683(A, B, a, b, c, d, e, f, x): return Dist(S(1)/b, Int(Simp(A*b*c + (A*b*d + B*(-a*d + b*c))/tan(e + f*x), x)/(a + b/tan(e + f*x)), x), x) + Dist(B*d/b, Int(S(1)/tan(e + f*x), x), x) def replacement3684(A, B, a, b, c, d, e, f, m, x): return Dist(S(1)/(S(2)*a*b), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(A*a*d + A*b*c + B*a*c + S(2)*B*a*d*tan(e + f*x) + B*b*d, x), x), x) - Simp((a + b*tan(e + f*x))**m*(A*b - B*a)*(a*c + b*d)/(S(2)*a**S(2)*f*m), x) def replacement3685(A, B, a, b, c, d, e, f, m, x): return Dist(S(1)/(S(2)*a*b), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(A*a*d + A*b*c + B*a*c + S(2)*B*a*d/tan(e + f*x) + B*b*d, x), x), x) + Simp((a + b/tan(e + f*x))**m*(A*b - B*a)*(a*c + b*d)/(S(2)*a**S(2)*f*m), x) def replacement3686(A, B, a, b, c, d, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(A*a*c + A*b*d - B*a*d + B*b*c - (-A*a*d + A*b*c - B*a*c - B*b*d)*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(A*b - B*a)*(-a*d + b*c)/(b*f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3687(A, B, a, b, c, d, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(A*a*c + A*b*d - B*a*d + B*b*c - (-A*a*d + A*b*c - B*a*c - B*b*d)/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(A*b - B*a)*(-a*d + b*c)/(b*f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3688(A, B, a, b, c, d, e, f, m, x): return Int((a + b*tan(e + f*x))**m*Simp(A*c - B*d + (A*d + B*c)*tan(e + f*x), x), x) + Simp(B*d*(a + b*tan(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement3689(A, B, a, b, c, d, e, f, m, x): return Int((a + b/tan(e + f*x))**m*Simp(A*c - B*d + (A*d + B*c)/tan(e + f*x), x), x) - Simp(B*d*(a + b/tan(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement3690(A, B, a, b, c, d, e, f, m, n, x): return -Dist(a/(d*(n + S(1))*(a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1))*Simp(A*b*d*(m - n + S(-2)) - B*(a*d*(n + S(1)) + b*c*(m + S(-1))) + (A*a*d*(m + n) - B*(a*c*(m + S(-1)) + b*d*(n + S(1))))*tan(e + f*x), x), x), x) - Simp(a**S(2)*(a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1))*(-A*d + B*c)/(d*f*(n + S(1))*(a*d + b*c)), x) def replacement3691(A, B, a, b, c, d, e, f, m, n, x): return -Dist(a/(d*(n + S(1))*(a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1))*Simp(A*b*d*(m - n + S(-2)) - B*(a*d*(n + S(1)) + b*c*(m + S(-1))) + (A*a*d*(m + n) - B*(a*c*(m + S(-1)) + b*d*(n + S(1))))/tan(e + f*x), x), x), x) + Simp(a**S(2)*(a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1))*(-A*d + B*c)/(d*f*(n + S(1))*(a*d + b*c)), x) def replacement3692(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**n*Simp(A*a*d*(m + n) + B*(a*c*(m + S(-1)) - b*d*(n + S(1))) - (B*(m + S(-1))*(-a*d + b*c) - d*(m + n)*(A*b + B*a))*tan(e + f*x), x), x), x) + Simp(B*b*(a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1))/(d*f*(m + n)), x) def replacement3693(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**n*Simp(A*a*d*(m + n) + B*(a*c*(m + S(-1)) - b*d*(n + S(1))) - (B*(m + S(-1))*(-a*d + b*c) - d*(m + n)*(A*b + B*a))/tan(e + f*x), x), x), x) - Simp(B*b*(a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(m + n)), x) def replacement3694(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a**S(2)*m), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(-1))*Simp(A*(a*c*m + b*d*n) - B*(a*d*n + b*c*m) - d*(-A*a*(m + n) + B*b*(m - n))*tan(e + f*x), x), x), x) - Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n*(A*b - B*a)/(S(2)*a*f*m), x) def replacement3695(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a**S(2)*m), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(-1))*Simp(A*(a*c*m + b*d*n) - B*(a*d*n + b*c*m) - d*(-A*a*(m + n) + B*b*(m - n))/tan(e + f*x), x), x), x) + Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n*(A*b - B*a)/(S(2)*a*f*m), x) def replacement3696(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a*m*(-a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*Simp(A*(-a*d*(S(2)*m + n + S(1)) + b*c*m) + B*(a*c*m - b*d*(n + S(1))) + d*(A*b - B*a)*(m + n + S(1))*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*(A*a + B*b)/(S(2)*f*m*(-a*d + b*c)), x) def replacement3697(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a*m*(-a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*Simp(A*(-a*d*(S(2)*m + n + S(1)) + b*c*m) + B*(a*c*m - b*d*(n + S(1))) + d*(A*b - B*a)*(m + n + S(1))/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*(A*a + B*b)/(S(2)*f*m*(-a*d + b*c)), x) def replacement3698(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(a*(m + n)), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(-1))*Simp(A*a*c*(m + n) - B*(a*d*n + b*c*m) + (A*a*d*(m + n) - B*(-a*c*n + b*d*m))*tan(e + f*x), x), x), x) + Simp(B*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n/(f*(m + n)), x) def replacement3699(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(a*(m + n)), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(-1))*Simp(A*a*c*(m + n) - B*(a*d*n + b*c*m) + (A*a*d*(m + n) - B*(-a*c*n + b*d*m))/tan(e + f*x), x), x), x) - Simp(B*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n/(f*(m + n)), x) def replacement3700(A, B, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*Simp(A*(-a*c*(n + S(1)) + b*d*m) - B*(a*d*(n + S(1)) + b*c*m) - a*(-A*d + B*c)*(m + n + S(1))*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*(A*d - B*c)/(f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3701(A, B, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*Simp(A*(-a*c*(n + S(1)) + b*d*m) - B*(a*d*(n + S(1)) + b*c*m) - a*(-A*d + B*c)*(m + n + S(1))/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*(A*d - B*c)/(f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3702(A, B, a, b, c, d, e, f, m, n, x): return Dist(B*b/f, Subst(Int((a + b*x)**(m + S(-1))*(c + d*x)**n, x), x, tan(e + f*x)), x) def replacement3703(A, B, a, b, c, d, e, f, m, n, x): return -Dist(B*b/f, Subst(Int((a + b*x)**(m + S(-1))*(c + d*x)**n, x), x, S(1)/tan(e + f*x)), x) def replacement3704(A, B, a, b, c, d, e, f, m, x): return Dist((A*b + B*a)/(a*d + b*c), Int((a + b*tan(e + f*x))**m, x), x) - Dist((-A*d + B*c)/(a*d + b*c), Int((a - b*tan(e + f*x))*(a + b*tan(e + f*x))**m/(c + d*tan(e + f*x)), x), x) def replacement3705(A, B, a, b, c, d, e, f, m, x): return Dist((A*b + B*a)/(a*d + b*c), Int((a + b/tan(e + f*x))**m, x), x) - Dist((-A*d + B*c)/(a*d + b*c), Int((a - b/tan(e + f*x))*(a + b/tan(e + f*x))**m/(c + d/tan(e + f*x)), x), x) def replacement3706(A, B, a, b, c, d, e, f, m, n, x): return -Dist(B/b, Int((a - b*tan(e + f*x))*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n, x), x) + Dist((A*b + B*a)/b, Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n, x), x) def replacement3707(A, B, a, b, c, d, e, f, m, n, x): return -Dist(B/b, Int((a - b/tan(e + f*x))*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n, x), x) + Dist((A*b + B*a)/b, Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n, x), x) def replacement3708(A, B, a, b, c, d, e, f, m, n, x): return Dist(A**S(2)/f, Subst(Int((a + b*x)**m*(c + d*x)**n/(A - B*x), x), x, tan(e + f*x)), x) def replacement3709(A, B, a, b, c, d, e, f, m, n, x): return -Dist(A**S(2)/f, Subst(Int((a + b*x)**m*(c + d*x)**n/(A - B*x), x), x, S(1)/tan(e + f*x)), x) def replacement3710(A, B, a, b, c, d, e, f, m, n, x): return Dist(A/S(2) - I*B/S(2), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n*(I*tan(e + f*x) + S(1)), x), x) + Dist(A/S(2) + I*B/S(2), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n*(-I*tan(e + f*x) + S(1)), x), x) def replacement3711(A, B, a, b, c, d, e, f, m, n, x): return Dist(A/S(2) - I*B/S(2), Int((S(1) + I/tan(e + f*x))*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n, x), x) + Dist(A/S(2) + I*B/S(2), Int((S(1) - I/tan(e + f*x))*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n, x), x) def replacement3712(A, B, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**(n + S(1))*Simp(A*a*d*(-a*c*(n + S(1)) + b*d*(m + S(-1))) - b*(-B*b*(c**S(2)*(m + S(-1)) - d**S(2)*(n + S(1))) + d*(m + n)*(-A*a*d + A*b*c + B*a*c))*tan(e + f*x)**S(2) - d*(n + S(1))*((A*a - B*b)*(-a*d + b*c) + (A*b + B*a)*(a*c + b*d))*tan(e + f*x) + (B*b*c - d*(A*b + B*a))*(a*d*(n + S(1)) + b*c*(m + S(-1))), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1))*(-A*d + B*c)*(-a*d + b*c)/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3713(A, B, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**(n + S(1))*Simp(A*a*d*(-a*c*(n + S(1)) + b*d*(m + S(-1))) - b*(-B*b*(c**S(2)*(m + S(-1)) - d**S(2)*(n + S(1))) + d*(m + n)*(-A*a*d + A*b*c + B*a*c))/tan(e + f*x)**S(2) - d*(n + S(1))*((A*a - B*b)*(-a*d + b*c) + (A*b + B*a)*(a*c + b*d))/tan(e + f*x) + (B*b*c - d*(A*b + B*a))*(a*d*(n + S(1)) + b*c*(m + S(-1))), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1))*(-A*d + B*c)*(-a*d + b*c)/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3714(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b*tan(e + f*x))**(m + S(-2))*(c + d*tan(e + f*x))**n*Simp(A*a**S(2)*d*(m + n) - B*b*(a*d*(n + S(1)) + b*c*(m + S(-1))) + d*(m + n)*(S(2)*A*a*b + B*(a**S(2) - b**S(2)))*tan(e + f*x) - (B*b*(m + S(-1))*(-a*d + b*c) - b*d*(m + n)*(A*b + B*a))*tan(e + f*x)**S(2), x), x), x) + Simp(B*b*(a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1))/(d*f*(m + n)), x) def replacement3715(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b/tan(e + f*x))**(m + S(-2))*(c + d/tan(e + f*x))**n*Simp(A*a**S(2)*d*(m + n) - B*b*(a*d*(n + S(1)) + b*c*(m + S(-1))) + d*(m + n)*(S(2)*A*a*b + B*(a**S(2) - b**S(2)))/tan(e + f*x) - (B*b*(m + S(-1))*(-a*d + b*c) - b*d*(m + n)*(A*b + B*a))/tan(e + f*x)**S(2), x), x), x) - Simp(B*b*(a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(m + n)), x) def replacement3716(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(a**S(2) + b**S(2))*(m + S(1))), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(-1))*Simp(A*b*(a*c*(m + S(1)) - b*d*n) + B*b*(a*d*n + b*c*(m + S(1))) - b*d*(A*b - B*a)*(m + n + S(1))*tan(e + f*x)**S(2) - b*(m + S(1))*(A*(-a*d + b*c) - B*(a*c + b*d))*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*(A*b - B*a)/(f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3717(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(a**S(2) + b**S(2))*(m + S(1))), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(-1))*Simp(A*b*(a*c*(m + S(1)) - b*d*n) + B*b*(a*d*n + b*c*(m + S(1))) - b*d*(A*b - B*a)*(m + n + S(1))/tan(e + f*x)**S(2) - b*(m + S(1))*(A*(-a*d + b*c) - B*(a*c + b*d))/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*(A*b - B*a)/(f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3718(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*Simp(A*(a*(m + S(1))*(-a*d + b*c) - b**S(2)*d*(m + n + S(2))) + B*b*(a*d*(n + S(1)) + b*c*(m + S(1))) - b*d*(A*b - B*a)*(m + n + S(2))*tan(e + f*x)**S(2) - (m + S(1))*(A*b - B*a)*(-a*d + b*c)*tan(e + f*x), x), x), x) + Simp(b*(a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(1))*(A*b - B*a)/(f*(a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3719(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*Simp(A*(a*(m + S(1))*(-a*d + b*c) - b**S(2)*d*(m + n + S(2))) + B*b*(a*d*(n + S(1)) + b*c*(m + S(1))) - b*d*(A*b - B*a)*(m + n + S(2))/tan(e + f*x)**S(2) - (m + S(1))*(A*b - B*a)*(-a*d + b*c)/tan(e + f*x), x), x), x) - Simp(b*(a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(1))*(A*b - B*a)/(f*(a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3720(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(m + n), Int((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(-1))*Simp(A*a*c*(m + n) - B*(a*d*n + b*c*m) + (m + n)*(A*a*d + A*b*c + B*a*c - B*b*d)*tan(e + f*x) + (A*b*d*(m + n) + B*(a*d*m + b*c*n))*tan(e + f*x)**S(2), x), x), x) + Simp(B*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n/(f*(m + n)), x) def replacement3721(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(m + n), Int((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(-1))*Simp(A*a*c*(m + n) - B*(a*d*n + b*c*m) + (m + n)*(A*a*d + A*b*c + B*a*c - B*b*d)/tan(e + f*x) + (A*b*d*(m + n) + B*(a*d*m + b*c*n))/tan(e + f*x)**S(2), x), x), x) - Simp(B*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n/(f*(m + n)), x) def replacement3722(A, B, a, b, c, d, e, f, x): return Dist(b*(A*b - B*a)/((a**S(2) + b**S(2))*(-a*d + b*c)), Int((-a*tan(e + f*x) + b)/(a + b*tan(e + f*x)), x), x) + Dist(d*(-A*d + B*c)/((c**S(2) + d**S(2))*(-a*d + b*c)), Int((-c*tan(e + f*x) + d)/(c + d*tan(e + f*x)), x), x) + Simp(x*(A*(a*c - b*d) + B*(a*d + b*c))/((a**S(2) + b**S(2))*(c**S(2) + d**S(2))), x) def replacement3723(A, B, a, b, c, d, e, f, x): return Dist(b*(A*b - B*a)/((a**S(2) + b**S(2))*(-a*d + b*c)), Int((-a/tan(e + f*x) + b)/(a + b/tan(e + f*x)), x), x) + Dist(d*(-A*d + B*c)/((c**S(2) + d**S(2))*(-a*d + b*c)), Int((-c/tan(e + f*x) + d)/(c + d/tan(e + f*x)), x), x) + Simp(x*(A*(a*c - b*d) + B*(a*d + b*c))/((a**S(2) + b**S(2))*(c**S(2) + d**S(2))), x) def replacement3724(A, B, a, b, c, d, e, f, x): return -Dist((-A*b + B*a)*(-a*d + b*c)/(a**S(2) + b**S(2)), Int((tan(e + f*x)**S(2) + S(1))/((a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x))), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int(Simp(A*(a*c + b*d) + B*(-a*d + b*c) - (A*(-a*d + b*c) - B*(a*c + b*d))*tan(e + f*x), x)/sqrt(c + d*tan(e + f*x)), x), x) def replacement3725(A, B, a, b, c, d, e, f, x): return -Dist((-A*b + B*a)*(-a*d + b*c)/(a**S(2) + b**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))/((a + b/tan(e + f*x))*sqrt(c + d/tan(e + f*x))), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int(Simp(A*(a*c + b*d) + B*(-a*d + b*c) - (A*(-a*d + b*c) - B*(a*c + b*d))/tan(e + f*x), x)/sqrt(c + d/tan(e + f*x)), x), x) def replacement3726(A, B, a, b, c, d, e, f, n, x): return Dist(b*(A*b - B*a)/(a**S(2) + b**S(2)), Int((c + d*tan(e + f*x))**n*(tan(e + f*x)**S(2) + S(1))/(a + b*tan(e + f*x)), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int((c + d*tan(e + f*x))**n*Simp(A*a + B*b - (A*b - B*a)*tan(e + f*x), x), x), x) def replacement3727(A, B, a, b, c, d, e, f, n, x): return Dist(b*(A*b - B*a)/(a**S(2) + b**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))*(c + d/tan(e + f*x))**n/(a + b/tan(e + f*x)), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int((c + d/tan(e + f*x))**n*Simp(A*a + B*b - (A*b - B*a)/tan(e + f*x), x), x), x) def replacement3728(A, B, a, b, c, d, e, f, x): return Dist(B*b, Int((tan(e + f*x)**S(2) + S(1))/(sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x))), x), x) + Int(Simp(A*a - B*b + (A*b + B*a)*tan(e + f*x), x)/(sqrt(a + b*tan(e + f*x))*sqrt(c + d*tan(e + f*x))), x) def replacement3729(A, B, a, b, c, d, e, f, x): return Dist(B*b, Int((S(1) + tan(e + f*x)**(S(-2)))/(sqrt(a + b/tan(e + f*x))*sqrt(c + d/tan(e + f*x))), x), x) + Int(Simp(A*a - B*b + (A*b + B*a)/tan(e + f*x), x)/(sqrt(a + b/tan(e + f*x))*sqrt(c + d/tan(e + f*x))), x) def replacement3730(A, B, a, b, c, d, e, f, m, n, x): return Dist(A**S(2)/f, Subst(Int((a + b*x)**m*(c + d*x)**n/(A - B*x), x), x, tan(e + f*x)), x) def replacement3731(A, B, a, b, c, d, e, f, m, n, x): return -Dist(A**S(2)/f, Subst(Int((a + b*x)**m*(c + d*x)**n/(A - B*x), x), x, S(1)/tan(e + f*x)), x) def replacement3732(A, B, a, b, c, d, e, f, m, n, x): return Dist(A/S(2) - I*B/S(2), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n*(I*tan(e + f*x) + S(1)), x), x) + Dist(A/S(2) + I*B/S(2), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n*(-I*tan(e + f*x) + S(1)), x), x) def replacement3733(A, B, a, b, c, d, e, f, m, n, x): return Dist(A/S(2) - I*B/S(2), Int((S(1) + I/tan(e + f*x))*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n, x), x) + Dist(A/S(2) + I*B/S(2), Int((S(1) - I/tan(e + f*x))*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n, x), x) def replacement3734(A, C, a, b, e, f, m, x): return Dist(A/(b*f), Subst(Int((a + x)**m, x), x, b*tan(e + f*x)), x) def replacement3735(A, C, a, b, e, f, m, x): return -Dist(A/(b*f), Subst(Int((a + x)**m, x), x, b/tan(e + f*x)), x) def replacement3736(A, B, C, a, b, e, f, m, x): return Dist(b**(S(-2)), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(B*b - C*a + C*b*tan(e + f*x), x), x), x) def replacement3737(A, B, C, a, b, e, f, m, x): return Dist(b**(S(-2)), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(B*b - C*a + C*b/tan(e + f*x), x), x), x) def replacement3738(A, C, a, b, e, f, m, x): return -Dist(C/b**S(2), Int((a - b*tan(e + f*x))*(a + b*tan(e + f*x))**(m + S(1)), x), x) def replacement3739(A, C, a, b, e, f, m, x): return -Dist(C/b**S(2), Int((a - b/tan(e + f*x))*(a + b/tan(e + f*x))**(m + S(1)), x), x) def replacement3740(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(S(2)*a**S(2)*m), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(A*a*(S(2)*m + S(1)) + B*b - C*a - (C*b*(m + S(-1)) + (m + S(1))*(A*b - B*a))*tan(e + f*x), x), x), x) - Simp((a + b*tan(e + f*x))**m*(A*a + B*b - C*a)*tan(e + f*x)/(S(2)*a*f*m), x) def replacement3741(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(S(2)*a**S(2)*m), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(A*a*(S(2)*m + S(1)) + B*b - C*a - (C*b*(m + S(-1)) + (m + S(1))*(A*b - B*a))/tan(e + f*x), x), x), x) + Simp((a + b/tan(e + f*x))**m*(A*a + B*b - C*a)/(S(2)*a*f*m*tan(e + f*x)), x) def replacement3742(A, C, a, b, e, f, m, x): return Dist(S(1)/(S(2)*a**S(2)*m), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(A*a*(S(2)*m + S(1)) - C*a - (A*b*(m + S(1)) + C*b*(m + S(-1)))*tan(e + f*x), x), x), x) - Simp((a + b*tan(e + f*x))**m*(A*a - C*a)*tan(e + f*x)/(S(2)*a*f*m), x) def replacement3743(A, C, a, b, e, f, m, x): return Dist(S(1)/(S(2)*a**S(2)*m), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(A*a*(S(2)*m + S(1)) - C*a - (A*b*(m + S(1)) + C*b*(m + S(-1)))/tan(e + f*x), x), x), x) + Simp((a + b/tan(e + f*x))**m*(A*a - C*a)/(S(2)*a*f*m*tan(e + f*x)), x) def replacement3744(A, B, C, a, b, e, f, x): return Dist((A*b**S(2) - B*a*b + C*a**S(2))/(a**S(2) + b**S(2)), Int((tan(e + f*x)**S(2) + S(1))/(a + b*tan(e + f*x)), x), x) + Simp(x*(A*a + B*b - C*a)/(a**S(2) + b**S(2)), x) def replacement3745(A, B, C, a, b, e, f, x): return Dist((A*b**S(2) - B*a*b + C*a**S(2))/(a**S(2) + b**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))/(a + b/tan(e + f*x)), x), x) + Simp(x*(A*a + B*b - C*a)/(a**S(2) + b**S(2)), x) def replacement3746(A, B, C, e, f, x): return Dist(A, Int(S(1)/tan(e + f*x), x), x) + Dist(C, Int(tan(e + f*x), x), x) + Simp(B*x, x) def replacement3747(A, B, C, e, f, x): return Dist(A, Int(tan(e + f*x), x), x) + Dist(C, Int(S(1)/tan(e + f*x), x), x) + Simp(B*x, x) def replacement3748(A, C, e, f, x): return Dist(A, Int(S(1)/tan(e + f*x), x), x) + Dist(C, Int(tan(e + f*x), x), x) def replacement3749(A, C, e, f, x): return Dist(A, Int(tan(e + f*x), x), x) + Dist(C, Int(S(1)/tan(e + f*x), x), x) def replacement3750(A, B, C, a, b, e, f, x): return -Dist((A*b - B*a - C*b)/(a**S(2) + b**S(2)), Int(tan(e + f*x), x), x) + Dist((A*b**S(2) - B*a*b + C*a**S(2))/(a**S(2) + b**S(2)), Int((tan(e + f*x)**S(2) + S(1))/(a + b*tan(e + f*x)), x), x) + Simp(x*(A*a + B*b - C*a)/(a**S(2) + b**S(2)), x) def replacement3751(A, B, C, a, b, e, f, x): return -Dist((A*b - B*a - C*b)/(a**S(2) + b**S(2)), Int(S(1)/tan(e + f*x), x), x) + Dist((A*b**S(2) - B*a*b + C*a**S(2))/(a**S(2) + b**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))/(a + b/tan(e + f*x)), x), x) + Simp(x*(A*a + B*b - C*a)/(a**S(2) + b**S(2)), x) def replacement3752(A, C, a, b, e, f, x): return Dist((A*b**S(2) + C*a**S(2))/(a**S(2) + b**S(2)), Int((tan(e + f*x)**S(2) + S(1))/(a + b*tan(e + f*x)), x), x) - Dist(b*(A - C)/(a**S(2) + b**S(2)), Int(tan(e + f*x), x), x) + Simp(a*x*(A - C)/(a**S(2) + b**S(2)), x) def replacement3753(A, C, a, b, e, f, x): return Dist((A*b**S(2) + C*a**S(2))/(a**S(2) + b**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))/(a + b/tan(e + f*x)), x), x) - Dist(b*(A - C)/(a**S(2) + b**S(2)), Int(S(1)/tan(e + f*x), x), x) + Simp(a*x*(A - C)/(a**S(2) + b**S(2)), x) def replacement3754(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(B*b + a*(A - C) - (A*b - B*a - C*b)*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))/(b*f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3755(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(B*b + a*(A - C) - (A*b - B*a - C*b)/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))/(b*f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3756(A, C, a, b, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b*tan(e + f*x))**(m + S(1))*Simp(a*(A - C) - (A*b - C*b)*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))/(b*f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3757(A, C, a, b, e, f, m, x): return Dist(S(1)/(a**S(2) + b**S(2)), Int((a + b/tan(e + f*x))**(m + S(1))*Simp(a*(A - C) - (A*b - C*b)/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))/(b*f*(a**S(2) + b**S(2))*(m + S(1))), x) def replacement3758(A, B, C, a, b, e, f, m, x): return Int((a + b*tan(e + f*x))**m*Simp(A + B*tan(e + f*x) - C, x), x) + Simp(C*(a + b*tan(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement3759(A, B, C, a, b, e, f, m, x): return Int((a + b/tan(e + f*x))**m*Simp(A + B/tan(e + f*x) - C, x), x) - Simp(C*(a + b/tan(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement3760(A, C, a, b, e, f, m, x): return Dist(A - C, Int((a + b*tan(e + f*x))**m, x), x) + Simp(C*(a + b*tan(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement3761(A, C, a, b, e, f, m, x): return Dist(A - C, Int((a + b/tan(e + f*x))**m, x), x) - Simp(C*(a + b/tan(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement3762(A, C, a, b, c, d, e, f, m, n, x): return Dist(A/f, Subst(Int((a + b*x)**m*(c + d*x)**n, x), x, tan(e + f*x)), x) def replacement3763(A, C, a, b, c, d, e, f, m, n, x): return -Dist(A/f, Subst(Int((a + b*x)**m*(c + d*x)**n, x), x, S(1)/tan(e + f*x)), x) def replacement3764(A, B, C, a, b, c, d, e, f, n, x): return Dist(S(1)/(d*(c**S(2) + d**S(2))), Int((c + d*tan(e + f*x))**(n + S(1))*Simp(C*b*(c**S(2) + d**S(2))*tan(e + f*x)**S(2) + a*d*(A*c + B*d - C*c) + b*(A*d**S(2) - B*c*d + C*c**S(2)) + d*(-A*a*d + A*b*c + B*a*c + B*b*d + C*a*d - C*b*c)*tan(e + f*x), x), x), x) - Simp((c + d*tan(e + f*x))**(n + S(1))*(-a*d + b*c)*(A*d**S(2) - B*c*d + C*c**S(2))/(d**S(2)*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3765(A, B, C, a, b, c, d, e, f, n, x): return Dist(S(1)/(d*(c**S(2) + d**S(2))), Int((c + d/tan(e + f*x))**(n + S(1))*Simp(C*b*(c**S(2) + d**S(2))/tan(e + f*x)**S(2) + a*d*(A*c + B*d - C*c) + b*(A*d**S(2) - B*c*d + C*c**S(2)) + d*(-A*a*d + A*b*c + B*a*c + B*b*d + C*a*d - C*b*c)/tan(e + f*x), x), x), x) + Simp((c + d/tan(e + f*x))**(n + S(1))*(-a*d + b*c)*(A*d**S(2) - B*c*d + C*c**S(2))/(d**S(2)*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3766(A, C, a, b, c, d, e, f, n, x): return Dist(S(1)/(d*(c**S(2) + d**S(2))), Int((c + d*tan(e + f*x))**(n + S(1))*Simp(C*b*(c**S(2) + d**S(2))*tan(e + f*x)**S(2) + a*d*(A*c - C*c) + b*(A*d**S(2) + C*c**S(2)) + d*(-A*a*d + A*b*c + C*a*d - C*b*c)*tan(e + f*x), x), x), x) - Simp((c + d*tan(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))*(-a*d + b*c)/(d**S(2)*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3767(A, C, a, b, c, d, e, f, n, x): return Dist(S(1)/(d*(c**S(2) + d**S(2))), Int((c + d/tan(e + f*x))**(n + S(1))*Simp(C*b*(c**S(2) + d**S(2))/tan(e + f*x)**S(2) + a*d*(A*c - C*c) + b*(A*d**S(2) + C*c**S(2)) + d*(-A*a*d + A*b*c + C*a*d - C*b*c)/tan(e + f*x), x), x), x) + Simp((c + d/tan(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))*(-a*d + b*c)/(d**S(2)*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3768(A, B, C, a, b, c, d, e, f, n, x): return -Dist(S(1)/(d*(n + S(2))), Int((c + d*tan(e + f*x))**n*Simp(-A*a*d*(n + S(2)) + C*b*c - d*(n + S(2))*(A*b + B*a - C*b)*tan(e + f*x) - (C*a*d*(n + S(2)) - b*(-B*d*(n + S(2)) + C*c))*tan(e + f*x)**S(2), x), x), x) + Simp(C*b*(c + d*tan(e + f*x))**(n + S(1))*tan(e + f*x)/(d*f*(n + S(2))), x) def replacement3769(A, B, C, a, b, c, d, e, f, n, x): return -Dist(S(1)/(d*(n + S(2))), Int((c + d/tan(e + f*x))**n*Simp(-A*a*d*(n + S(2)) + C*b*c - d*(n + S(2))*(A*b + B*a - C*b)/tan(e + f*x) - (C*a*d*(n + S(2)) - b*(-B*d*(n + S(2)) + C*c))/tan(e + f*x)**S(2), x), x), x) - Simp(C*b*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(n + S(2))*tan(e + f*x)), x) def replacement3770(A, C, a, b, c, d, e, f, n, x): return -Dist(S(1)/(d*(n + S(2))), Int((c + d*tan(e + f*x))**n*Simp(-A*a*d*(n + S(2)) + C*b*c - d*(n + S(2))*(A*b - C*b)*tan(e + f*x) - (C*a*d*(n + S(2)) - C*b*c)*tan(e + f*x)**S(2), x), x), x) + Simp(C*b*(c + d*tan(e + f*x))**(n + S(1))*tan(e + f*x)/(d*f*(n + S(2))), x) def replacement3771(A, C, a, b, c, d, e, f, n, x): return -Dist(S(1)/(d*(n + S(2))), Int((c + d/tan(e + f*x))**n*Simp(-A*a*d*(n + S(2)) + C*b*c - d*(n + S(2))*(A*b - C*b)/tan(e + f*x) - (C*a*d*(n + S(2)) - C*b*c)/tan(e + f*x)**S(2), x), x), x) - Simp(C*b*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(n + S(2))*tan(e + f*x)), x) def replacement3772(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a*m*(-a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*Simp(a*(-A*d*(S(2)*m + n + S(1)) + B*c*m + C*d*(n + S(1))) + b*(-B*d*(n + S(1)) + c*m*(A + C)) + (A*b*d*(m + n + S(1)) + C*b*d*(m - n + S(-1)) + a*(-B*d*(m + n + S(1)) + S(2)*C*c*m))*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*(A*a + B*b - C*a)/(S(2)*f*m*(-a*d + b*c)), x) def replacement3773(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a*m*(-a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*Simp(a*(-A*d*(S(2)*m + n + S(1)) + B*c*m + C*d*(n + S(1))) + b*(-B*d*(n + S(1)) + c*m*(A + C)) + (A*b*d*(m + n + S(1)) + C*b*d*(m - n + S(-1)) + a*(-B*d*(m + n + S(1)) + S(2)*C*c*m))/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*(A*a + B*b - C*a)/(S(2)*f*m*(-a*d + b*c)), x) def replacement3774(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a*m*(-a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*Simp(a*(-A*d*(S(2)*m + n + S(1)) + C*d*(n + S(1))) + b*c*m*(A + C) + (A*b*d*(m + n + S(1)) + S(2)*C*a*c*m + C*b*d*(m - n + S(-1)))*tan(e + f*x), x), x), x) + Simp(a*(A - C)*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(S(2)*f*m*(-a*d + b*c)), x) def replacement3775(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(S(2)*a*m*(-a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*Simp(a*(-A*d*(S(2)*m + n + S(1)) + C*d*(n + S(1))) + b*c*m*(A + C) + (A*b*d*(m + n + S(1)) + S(2)*C*a*c*m + C*b*d*(m - n + S(-1)))/tan(e + f*x), x), x), x) - Simp(a*(A - C)*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(S(2)*f*m*(-a*d + b*c)), x) def replacement3776(A, B, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*Simp(-a*d*(n + S(1))*(A*c + B*d - C*c) - a*(-C*(c**S(2)*m - d**S(2)*(n + S(1))) + d*(-A*d + B*c)*(m + n + S(1)))*tan(e + f*x) + b*m*(A*d**S(2) - B*c*d + C*c**S(2)), x), x), x) + Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*(A*d**S(2) - B*c*d + C*c**S(2))/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3777(A, B, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*Simp(-a*d*(n + S(1))*(A*c + B*d - C*c) - a*(-C*(c**S(2)*m - d**S(2)*(n + S(1))) + d*(-A*d + B*c)*(m + n + S(1)))/tan(e + f*x) + b*m*(A*d**S(2) - B*c*d + C*c**S(2)), x), x), x) - Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*(A*d**S(2) - B*c*d + C*c**S(2))/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3778(A, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*Simp(-a*d*(n + S(1))*(A*c - C*c) - a*(-A*d**S(2)*(m + n + S(1)) - C*(c**S(2)*m - d**S(2)*(n + S(1))))*tan(e + f*x) + b*m*(A*d**S(2) + C*c**S(2)), x), x), x) + Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3779(A, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*Simp(-a*d*(n + S(1))*(A*c - C*c) - a*(-A*d**S(2)*(m + n + S(1)) - C*(c**S(2)*m - d**S(2)*(n + S(1))))/tan(e + f*x) + b*m*(A*d**S(2) + C*c**S(2)), x), x), x) - Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3780(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(1))), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n*Simp(A*b*d*(m + n + S(1)) + C*(a*c*m - b*d*(n + S(1))) - (-B*b*d*(m + n + S(1)) + C*m*(-a*d + b*c))*tan(e + f*x), x), x), x) + Simp(C*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(1))), x) def replacement3781(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(1))), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n*Simp(A*b*d*(m + n + S(1)) + C*(a*c*m - b*d*(n + S(1))) - (-B*b*d*(m + n + S(1)) + C*m*(-a*d + b*c))/tan(e + f*x), x), x), x) - Simp(C*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(1))), x) def replacement3782(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(1))), Int((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**n*Simp(A*b*d*(m + n + S(1)) - C*m*(-a*d + b*c)*tan(e + f*x) + C*(a*c*m - b*d*(n + S(1))), x), x), x) + Simp(C*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(1))), x) def replacement3783(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(1))), Int((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**n*Simp(A*b*d*(m + n + S(1)) - C*m*(-a*d + b*c)/tan(e + f*x) + C*(a*c*m - b*d*(n + S(1))), x), x), x) - Simp(C*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(1))), x) def replacement3784(A, B, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1))*Simp(A*d*(-a*c*(n + S(1)) + b*d*m) - b*(-C*(c**S(2)*m - d**S(2)*(n + S(1))) + d*(-A*d + B*c)*(m + n + S(1)))*tan(e + f*x)**S(2) - d*(n + S(1))*(B*(a*c + b*d) + (A - C)*(-a*d + b*c))*tan(e + f*x) + (-B*d + C*c)*(a*d*(n + S(1)) + b*c*m), x), x), x) + Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*(A*d**S(2) + c*(-B*d + C*c))/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3785(A, B, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1))*Simp(A*d*(-a*c*(n + S(1)) + b*d*m) - b*(-C*(c**S(2)*m - d**S(2)*(n + S(1))) + d*(-A*d + B*c)*(m + n + S(1)))/tan(e + f*x)**S(2) - d*(n + S(1))*(B*(a*c + b*d) + (A - C)*(-a*d + b*c))/tan(e + f*x) + (-B*d + C*c)*(a*d*(n + S(1)) + b*c*m), x), x), x) - Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*(A*d**S(2) + c*(-B*d + C*c))/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3786(A, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**(n + S(1))*Simp(A*d*(-a*c*(n + S(1)) + b*d*m) + C*c*(a*d*(n + S(1)) + b*c*m) + b*(A*d**S(2)*(m + n + S(1)) + C*(c**S(2)*m - d**S(2)*(n + S(1))))*tan(e + f*x)**S(2) - d*(A - C)*(n + S(1))*(-a*d + b*c)*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3787(A, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(d*(c**S(2) + d**S(2))*(n + S(1))), Int((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**(n + S(1))*Simp(A*d*(-a*c*(n + S(1)) + b*d*m) + C*c*(a*d*(n + S(1)) + b*c*m) + b*(A*d**S(2)*(m + n + S(1)) + C*(c**S(2)*m - d**S(2)*(n + S(1))))/tan(e + f*x)**S(2) - d*(A - C)*(n + S(1))*(-a*d + b*c)/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))/(d*f*(c**S(2) + d**S(2))*(n + S(1))), x) def replacement3788(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(1))), Int((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**n*Simp(A*a*d*(m + n + S(1)) - C*(a*d*(n + S(1)) + b*c*m) + d*(m + n + S(1))*(A*b + B*a - C*b)*tan(e + f*x) - (-B*b*d*(m + n + S(1)) + C*m*(-a*d + b*c))*tan(e + f*x)**S(2), x), x), x) + Simp(C*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(1))), x) def replacement3789(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(1))), Int((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**n*Simp(A*a*d*(m + n + S(1)) - C*(a*d*(n + S(1)) + b*c*m) + d*(m + n + S(1))*(A*b + B*a - C*b)/tan(e + f*x) - (-B*b*d*(m + n + S(1)) + C*m*(-a*d + b*c))/tan(e + f*x)**S(2), x), x), x) - Simp(C*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(1))), x) def replacement3790(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(1))), Int((a + b*tan(e + f*x))**(m + S(-1))*(c + d*tan(e + f*x))**n*Simp(A*a*d*(m + n + S(1)) - C*m*(-a*d + b*c)*tan(e + f*x)**S(2) - C*(a*d*(n + S(1)) + b*c*m) + d*(A*b - C*b)*(m + n + S(1))*tan(e + f*x), x), x), x) + Simp(C*(a + b*tan(e + f*x))**m*(c + d*tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(1))), x) def replacement3791(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(1))), Int((a + b/tan(e + f*x))**(m + S(-1))*(c + d/tan(e + f*x))**n*Simp(A*a*d*(m + n + S(1)) - C*m*(-a*d + b*c)/tan(e + f*x)**S(2) - C*(a*d*(n + S(1)) + b*c*m) + d*(A*b - C*b)*(m + n + S(1))/tan(e + f*x), x), x), x) - Simp(C*(a + b/tan(e + f*x))**m*(c + d/tan(e + f*x))**(n + S(1))/(d*f*(m + n + S(1))), x) def replacement3792(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*Simp(A*(a*(m + S(1))*(-a*d + b*c) - b**S(2)*d*(m + n + S(2))) - d*(A*b**S(2) - a*(B*b - C*a))*(m + n + S(2))*tan(e + f*x)**S(2) - (m + S(1))*(-a*d + b*c)*(A*b - B*a - C*b)*tan(e + f*x) + (B*b - C*a)*(a*d*(n + S(1)) + b*c*(m + S(1))), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(1))*(A*b**S(2) - a*(B*b - C*a))/(f*(a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3793(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*Simp(A*(a*(m + S(1))*(-a*d + b*c) - b**S(2)*d*(m + n + S(2))) - d*(A*b**S(2) - a*(B*b - C*a))*(m + n + S(2))/tan(e + f*x)**S(2) - (m + S(1))*(-a*d + b*c)*(A*b - B*a - C*b)/tan(e + f*x) + (B*b - C*a)*(a*d*(n + S(1)) + b*c*(m + S(1))), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(1))*(A*b**S(2) - a*(B*b - C*a))/(f*(a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3794(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**n*Simp(A*(a*(m + S(1))*(-a*d + b*c) - b**S(2)*d*(m + n + S(2))) - C*a*(a*d*(n + S(1)) + b*c*(m + S(1))) - d*(A*b**S(2) + C*a**S(2))*(m + n + S(2))*tan(e + f*x)**S(2) - (m + S(1))*(A*b - C*b)*(-a*d + b*c)*tan(e + f*x), x), x), x) + Simp((a + b*tan(e + f*x))**(m + S(1))*(c + d*tan(e + f*x))**(n + S(1))*(A*b**S(2) + C*a**S(2))/(f*(a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3795(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**n*Simp(A*(a*(m + S(1))*(-a*d + b*c) - b**S(2)*d*(m + n + S(2))) - C*a*(a*d*(n + S(1)) + b*c*(m + S(1))) - d*(A*b**S(2) + C*a**S(2))*(m + n + S(2))/tan(e + f*x)**S(2) - (m + S(1))*(A*b - C*b)*(-a*d + b*c)/tan(e + f*x), x), x), x) - Simp((a + b/tan(e + f*x))**(m + S(1))*(c + d/tan(e + f*x))**(n + S(1))*(A*b**S(2) + C*a**S(2))/(f*(a**S(2) + b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3796(A, B, C, a, b, c, d, e, f, x): return Dist((A*b**S(2) - B*a*b + C*a**S(2))/((a**S(2) + b**S(2))*(-a*d + b*c)), Int((-a*tan(e + f*x) + b)/(a + b*tan(e + f*x)), x), x) - Dist((A*d**S(2) - B*c*d + C*c**S(2))/((c**S(2) + d**S(2))*(-a*d + b*c)), Int((-c*tan(e + f*x) + d)/(c + d*tan(e + f*x)), x), x) + Simp(x*(a*(A*c + B*d - C*c) + b*(-A*d + B*c + C*d))/((a**S(2) + b**S(2))*(c**S(2) + d**S(2))), x) def replacement3797(A, B, C, a, b, c, d, e, f, x): return Dist((A*b**S(2) - B*a*b + C*a**S(2))/((a**S(2) + b**S(2))*(-a*d + b*c)), Int((-a/tan(e + f*x) + b)/(a + b/tan(e + f*x)), x), x) - Dist((A*d**S(2) - B*c*d + C*c**S(2))/((c**S(2) + d**S(2))*(-a*d + b*c)), Int((-c/tan(e + f*x) + d)/(c + d/tan(e + f*x)), x), x) + Simp(x*(a*(A*c + B*d - C*c) + b*(-A*d + B*c + C*d))/((a**S(2) + b**S(2))*(c**S(2) + d**S(2))), x) def replacement3798(A, C, a, b, c, d, e, f, x): return Dist((A*b**S(2) + C*a**S(2))/((a**S(2) + b**S(2))*(-a*d + b*c)), Int((-a*tan(e + f*x) + b)/(a + b*tan(e + f*x)), x), x) - Dist((A*d**S(2) + C*c**S(2))/((c**S(2) + d**S(2))*(-a*d + b*c)), Int((-c*tan(e + f*x) + d)/(c + d*tan(e + f*x)), x), x) + Simp(x*(a*(A*c - C*c) - b*(A*d - C*d))/((a**S(2) + b**S(2))*(c**S(2) + d**S(2))), x) def replacement3799(A, C, a, b, c, d, e, f, x): return Dist((A*b**S(2) + C*a**S(2))/((a**S(2) + b**S(2))*(-a*d + b*c)), Int((-a/tan(e + f*x) + b)/(a + b/tan(e + f*x)), x), x) - Dist((A*d**S(2) + C*c**S(2))/((c**S(2) + d**S(2))*(-a*d + b*c)), Int((-c/tan(e + f*x) + d)/(c + d/tan(e + f*x)), x), x) + Simp(x*(a*(A*c - C*c) - b*(A*d - C*d))/((a**S(2) + b**S(2))*(c**S(2) + d**S(2))), x) def replacement3800(A, B, C, a, b, c, d, e, f, n, x): return Dist((A*b**S(2) - B*a*b + C*a**S(2))/(a**S(2) + b**S(2)), Int((c + d*tan(e + f*x))**n*(tan(e + f*x)**S(2) + S(1))/(a + b*tan(e + f*x)), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int((c + d*tan(e + f*x))**n*Simp(B*b + a*(A - C) + (B*a - b*(A - C))*tan(e + f*x), x), x), x) def replacement3801(A, B, C, a, b, c, d, e, f, n, x): return Dist((A*b**S(2) - B*a*b + C*a**S(2))/(a**S(2) + b**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))*(c + d/tan(e + f*x))**n/(a + b/tan(e + f*x)), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int((c + d/tan(e + f*x))**n*Simp(B*b + a*(A - C) + (B*a - b*(A - C))/tan(e + f*x), x), x), x) def replacement3802(A, C, a, b, c, d, e, f, n, x): return Dist((A*b**S(2) + C*a**S(2))/(a**S(2) + b**S(2)), Int((c + d*tan(e + f*x))**n*(tan(e + f*x)**S(2) + S(1))/(a + b*tan(e + f*x)), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int((c + d*tan(e + f*x))**n*Simp(a*(A - C) - (A*b - C*b)*tan(e + f*x), x), x), x) def replacement3803(A, C, a, b, c, d, e, f, n, x): return Dist((A*b**S(2) + C*a**S(2))/(a**S(2) + b**S(2)), Int((S(1) + tan(e + f*x)**(S(-2)))*(c + d/tan(e + f*x))**n/(a + b/tan(e + f*x)), x), x) + Dist(S(1)/(a**S(2) + b**S(2)), Int((c + d/tan(e + f*x))**n*Simp(a*(A - C) - (A*b - C*b)/tan(e + f*x), x), x), x) def replacement3804(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*f), Subst(Int((a + x)**m*(c + d*x/b)**n*(A*b**S(2) + B*b*x + C*x**S(2))/(b**S(2) + x**S(2)), x), x, b*tan(e + f*x)), x) def replacement3805(A, B, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(b*f), Subst(Int((a + x)**m*(c + d*x/b)**n*(A*b**S(2) + B*b*x + C*x**S(2))/(b**S(2) + x**S(2)), x), x, b/tan(e + f*x)), x) def replacement3806(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*f), Subst(Int((a + x)**m*(c + d*x/b)**n*(A*b**S(2) + C*x**S(2))/(b**S(2) + x**S(2)), x), x, b*tan(e + f*x)), x) def replacement3807(A, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(b*f), Subst(Int((a + x)**m*(c + d*x/b)**n*(A*b**S(2) + C*x**S(2))/(b**S(2) + x**S(2)), x), x, b/tan(e + f*x)), x) def replacement3808(a, b, c, d, x): return Dist(S(1)/a, Int(cos(c + d*x)**S(2), x), x) def replacement3809(a, b, c, d, x): return Dist(S(1)/a, Int(sin(c + d*x)**S(2), x), x) def replacement3810(a, b, c, d, x): return -Dist(b/(a - b), Int(S(1)/((a + b*tan(c + d*x)**S(2))*cos(c + d*x)**S(2)), x), x) + Simp(x/(a - b), x) def replacement3811(a, b, c, d, x): return -Dist(b/(a - b), Int(S(1)/((a + b/tan(c + d*x)**S(2))*sin(c + d*x)**S(2)), x), x) + Simp(x/(a - b), x) def replacement3812(a, b, c, d, e, n, p, x): return Dist(e/d, Subst(Int((a + b*x**n)**p/(e**S(2) + x**S(2)), x), x, e*tan(c + d*x)), x) def replacement3813(a, b, c, d, e, n, p, x): return -Dist(e/d, Subst(Int((a + b*x**n)**p/(e**S(2) + x**S(2)), x), x, e/tan(c + d*x)), x) def With3814(a, b, c, d, e, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f**(m + S(1))/d, Subst(Int(x**m*(a + b*(e*f*x)**n)**p*(f**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1)), x), x, tan(c + d*x)/f), x) def With3815(a, b, c, d, e, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f**(m + S(1))/d, Subst(Int(x**m*(a + b*(e*f*x)**n)**p*(f**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1)), x), x, S(1)/(f*tan(c + d*x))), x) def With3816(a, b, c, d, m, n, p, x): f = FreeFactors(cos(c + d*x), x) return -Dist(f/d, Subst(Int((f*x)**(-n*p)*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*ExpandToSum(a*(f*x)**n + b*(-f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p, x), x, cos(c + d*x)/f), x) def With3817(a, b, c, d, m, n, p, x): f = FreeFactors(sin(c + d*x), x) return Dist(f/d, Subst(Int((f*x)**(-n*p)*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*ExpandToSum(a*(f*x)**n + b*(-f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p, x), x, sin(c + d*x)/f), x) def With3818(a, b, c, d, e, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f/d, Subst(Int((a + b*(e*f*x)**n)**p*(f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)), x), x, tan(c + d*x)/f), x) def With3819(a, b, c, d, e, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f/d, Subst(Int((a + b*(e*f*x)**n)**p*(f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)), x), x, S(1)/(f*tan(c + d*x))), x) def With3820(a, b, c, d, m, n, p, x): f = FreeFactors(sin(c + d*x), x) return Dist(f/d, Subst(Int((-f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1)/2)*ExpandToSum(a*(-f**S(2)*x**S(2) + S(1))**(n/S(2)) + b*(f*x)**n, x)**p, x), x, sin(c + d*x)/f), x) def With3821(a, b, c, d, m, n, p, x): f = FreeFactors(cos(c + d*x), x) return -Dist(f/d, Subst(Int((-f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1)/2)*ExpandToSum(a*(-f**S(2)*x**S(2) + S(1))**(n/S(2)) + b*(f*x)**n, x)**p, x), x, cos(c + d*x)/f), x) def replacement3822(a, b, c, d, e, m, n, p, x): return Dist(e/d, Subst(Int((x/e)**m*(a + b*x**n)**p/(e**S(2) + x**S(2)), x), x, e*tan(c + d*x)), x) def replacement3823(a, b, c, d, e, m, n, p, x): return -Dist(e/d, Subst(Int((x/e)**m*(a + b*x**n)**p/(e**S(2) + x**S(2)), x), x, e/tan(c + d*x)), x) def replacement3824(a, b, c, d, e, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*tan(d + e*x)**n)**(S(2)*p), x), x) def replacement3825(a, b, c, d, e, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(S(2)*p), x), x) def replacement3826(a, b, c, d, e, n, n2, p, x): return Dist((b + S(2)*c*tan(d + e*x)**n)**(-S(2)*p)*(a + b*tan(d + e*x)**n + c*tan(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*tan(d + e*x)**n)**(S(2)*p), x), x) def replacement3827(a, b, c, d, e, n, n2, p, x): return Dist((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(-S(2)*p)*(a + b*(S(1)/tan(d + e*x))**n + c*(S(1)/tan(d + e*x))**(S(2)*n))**p, Int((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(S(2)*p), x), x) def With3828(a, b, c, d, e, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*tan(d + e*x)**n - q), x), x) - Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*tan(d + e*x)**n + q), x), x) def With3829(a, b, c, d, e, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*(S(1)/tan(d + e*x))**n - q), x), x) - Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*(S(1)/tan(d + e*x))**n + q), x), x) def replacement3830(a, b, c, d, e, f, m, n, n2, p, x): return Dist(f/e, Subst(Int(x**m*(f**S(2) + x**S(2))**(-m/S(2) + S(-1))*(a + b*x**n + c*x**(S(2)*n))**p, x), x, f*tan(d + e*x)), x) def replacement3831(a, b, c, d, e, f, m, n, n2, p, x): return -Dist(f/e, Subst(Int(x**m*(f**S(2) + x**S(2))**(-m/S(2) + S(-1))*(a + b*x**n + c*x**(S(2)*n))**p, x), x, f/tan(d + e*x)), x) def With3832(a, b, c, d, e, m, n, n2, p, x): g = FreeFactors(cos(d + e*x), x) return -Dist(g/e, Subst(Int((g*x)**(-S(2)*n*p)*(-g**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*ExpandToSum(a*(g*x)**(S(2)*n) + b*(g*x)**n*(-g**S(2)*x**S(2) + S(1))**(n/S(2)) + c*(-g**S(2)*x**S(2) + S(1))**n, x)**p, x), x, cos(d + e*x)/g), x) def With3833(a, b, c, d, e, m, n, n2, p, x): g = FreeFactors(sin(d + e*x), x) return Dist(g/e, Subst(Int((g*x)**(-S(2)*n*p)*(-g**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*ExpandToSum(a*(g*x)**(S(2)*n) + b*(g*x)**n*(-g**S(2)*x**S(2) + S(1))**(n/S(2)) + c*(-g**S(2)*x**S(2) + S(1))**n, x)**p, x), x, sin(d + e*x)/g), x) def replacement3834(a, b, c, d, e, f, m, n, n2, p, x): return Dist(f**(m + S(1))/e, Subst(Int((f**S(2) + x**S(2))**(-m/S(2) + S(-1))*(a + b*x**n + c*x**(S(2)*n))**p, x), x, f*tan(d + e*x)), x) def replacement3835(a, b, c, d, e, f, m, n, n2, p, x): return -Dist(f**(m + S(1))/e, Subst(Int((f**S(2) + x**S(2))**(-m/S(2) + S(-1))*(a + b*x**n + c*x**(S(2)*n))**p, x), x, f/tan(d + e*x)), x) def With3836(a, b, c, d, e, m, n, n2, p, x): g = FreeFactors(sin(d + e*x), x) return Dist(g/e, Subst(Int((-g**S(2)*x**S(2) + S(1))**(m/S(2) - n*p + S(-1)/2)*ExpandToSum(a*(S(1) - x**S(2))**n + b*x**n*(S(1) - x**S(2))**(n/S(2)) + c*x**(S(2)*n), x)**p, x), x, sin(d + e*x)/g), x) def With3837(a, b, c, d, e, m, n, n2, p, x): g = FreeFactors(cos(d + e*x), x) return -Dist(g/e, Subst(Int((-g**S(2)*x**S(2) + S(1))**(m/S(2) - n*p + S(-1)/2)*ExpandToSum(a*(S(1) - x**S(2))**n + b*x**n*(S(1) - x**S(2))**(n/S(2)) + c*x**(S(2)*n), x)**p, x), x, cos(d + e*x)/g), x) def replacement3838(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*tan(d + e*x)**n)**(S(2)*p)*tan(d + e*x)**m, x), x) def replacement3839(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(S(2)*p)*(S(1)/tan(d + e*x))**m, x), x) def replacement3840(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*tan(d + e*x)**n)**(-S(2)*p)*(a + b*tan(d + e*x)**n + c*tan(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*tan(d + e*x)**n)**(S(2)*p)*tan(d + e*x)**m, x), x) def replacement3841(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(-S(2)*p)*(a + b*(S(1)/tan(d + e*x))**n + c*(S(1)/tan(d + e*x))**(S(2)*n))**p, Int((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(S(2)*p)*(S(1)/tan(d + e*x))**m, x), x) def replacement3842(a, b, c, d, e, f, m, n, n2, p, x): return Dist(f/e, Subst(Int((x/f)**m*(a + b*x**n + c*x**(S(2)*n))**p/(f**S(2) + x**S(2)), x), x, f*tan(d + e*x)), x) def replacement3843(a, b, c, d, e, f, m, n, n2, p, x): return -Dist(f/e, Subst(Int((x/f)**m*(a + b*x**n + c*x**(S(2)*n))**p/(f**S(2) + x**S(2)), x), x, f/tan(d + e*x)), x) def replacement3844(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*tan(d + e*x)**n)**(S(2)*p)*(S(1)/tan(d + e*x))**m, x), x) def replacement3845(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(S(2)*p)*tan(d + e*x)**m, x), x) def replacement3846(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*tan(d + e*x)**n)**(-S(2)*p)*(a + b*tan(d + e*x)**n + c*tan(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*tan(d + e*x)**n)**(S(2)*p)*(S(1)/tan(d + e*x))**m, x), x) def replacement3847(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(-S(2)*p)*(a + b*(S(1)/tan(d + e*x))**n + c*(S(1)/tan(d + e*x))**(S(2)*n))**p, Int((b + S(2)*c*(S(1)/tan(d + e*x))**n)**(S(2)*p)*tan(d + e*x)**m, x), x) def With3848(a, b, c, d, e, m, n, n2, p, x): g = FreeFactors(S(1)/tan(d + e*x), x) return Dist(g/e, Subst(Int((g*x)**(m - S(2)*n*p)*(a*(g*x)**(S(2)*n) + b*(g*x)**n + c)**p/(g**S(2)*x**S(2) + S(1)), x), x, S(1)/(g*tan(d + e*x))), x) def With3849(a, b, c, d, e, m, n, n2, p, x): g = FreeFactors(tan(d + e*x), x) return -Dist(g/e, Subst(Int((g*x)**(m - S(2)*n*p)*(a*(g*x)**(S(2)*n) + b*(g*x)**n + c)**p/(g**S(2)*x**S(2) + S(1)), x), x, tan(d + e*x)/g), x) def replacement3850(A, B, a, b, c, d, e, n, x): return Dist(S(4)**(-n)*c**(-n), Int((A + B*tan(d + e*x))*(b + S(2)*c*tan(d + e*x))**(S(2)*n), x), x) def replacement3851(A, B, a, b, c, d, e, n, x): return Dist(S(4)**(-n)*c**(-n), Int((A + B/tan(d + e*x))*(b + S(2)*c/tan(d + e*x))**(S(2)*n), x), x) def replacement3852(A, B, a, b, c, d, e, n, x): return Dist((b + S(2)*c*tan(d + e*x))**(-S(2)*n)*(a + b*tan(d + e*x) + c*tan(d + e*x)**S(2))**n, Int((A + B*tan(d + e*x))*(b + S(2)*c*tan(d + e*x))**(S(2)*n), x), x) def replacement3853(A, B, a, b, c, d, e, n, x): return Dist((b + S(2)*c/tan(d + e*x))**(-S(2)*n)*(a + b/tan(d + e*x) + c/tan(d + e*x)**S(2))**n, Int((A + B/tan(d + e*x))*(b + S(2)*c/tan(d + e*x))**(S(2)*n), x), x) def With3854(A, B, a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(B - (-S(2)*A*c + B*b)/q, Int(S(1)/Simp(b + S(2)*c*tan(d + e*x) - q, x), x), x) + Dist(B + (-S(2)*A*c + B*b)/q, Int(S(1)/Simp(b + S(2)*c*tan(d + e*x) + q, x), x), x) def With3855(A, B, a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(B - (-S(2)*A*c + B*b)/q, Int(S(1)/Simp(b + S(2)*c/tan(d + e*x) - q, x), x), x) + Dist(B + (-S(2)*A*c + B*b)/q, Int(S(1)/Simp(b + S(2)*c/tan(d + e*x) + q, x), x), x) def replacement3856(A, B, a, b, c, d, e, n, x): return Int(ExpandTrig((A + B*tan(d + e*x))*(a + b*tan(d + e*x) + c*tan(d + e*x)**S(2))**n, x), x) def replacement3857(A, B, a, b, c, d, e, n, x): return Int(ExpandTrig((A + B/tan(d + e*x))*(a + b/tan(d + e*x) + c/tan(d + e*x)**S(2))**n, x), x) def replacement3858(c, d, e, f, m, x): return -Dist(S(2)*I, Int((c + d*x)**m*exp(S(2)*I*(e + f*x))/(exp(S(2)*I*(e + f*x)) + S(1)), x), x) + Simp(I*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement3859(c, d, e, f, m, x): return -Dist(S(2)*I, Int((c + d*x)**m*exp(S(2)*I*(e + f*x))/(S(1) - exp(S(2)*I*(e + f*x))), x), x) - Simp(I*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) def replacement3860(b, c, d, e, f, m, n, x): return -Dist(b**S(2), Int((b*tan(e + f*x))**(n + S(-2))*(c + d*x)**m, x), x) - Dist(b*d*m/(f*(n + S(-1))), Int((b*tan(e + f*x))**(n + S(-1))*(c + d*x)**(m + S(-1)), x), x) + Simp(b*(b*tan(e + f*x))**(n + S(-1))*(c + d*x)**m/(f*(n + S(-1))), x) def replacement3861(b, c, d, e, f, m, n, x): return -Dist(b**S(2), Int((b/tan(e + f*x))**(n + S(-2))*(c + d*x)**m, x), x) + Dist(b*d*m/(f*(n + S(-1))), Int((b/tan(e + f*x))**(n + S(-1))*(c + d*x)**(m + S(-1)), x), x) - Simp(b*(b/tan(e + f*x))**(n + S(-1))*(c + d*x)**m/(f*(n + S(-1))), x) def replacement3862(b, c, d, e, f, m, n, x): return -Dist(b**(S(-2)), Int((b*tan(e + f*x))**(n + S(2))*(c + d*x)**m, x), x) - Dist(d*m/(b*f*(n + S(1))), Int((b*tan(e + f*x))**(n + S(1))*(c + d*x)**(m + S(-1)), x), x) + Simp((b*tan(e + f*x))**(n + S(1))*(c + d*x)**m/(b*f*(n + S(1))), x) def replacement3863(b, c, d, e, f, m, n, x): return -Dist(b**(S(-2)), Int((b/tan(e + f*x))**(n + S(2))*(c + d*x)**m, x), x) + Dist(d*m/(b*f*(n + S(1))), Int((b/tan(e + f*x))**(n + S(1))*(c + d*x)**(m + S(-1)), x), x) - Simp((b/tan(e + f*x))**(n + S(1))*(c + d*x)**m/(b*f*(n + S(1))), x) def replacement3864(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b*tan(e + f*x))**n, x), x) def replacement3865(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b/tan(e + f*x))**n, x), x) def replacement3866(a, b, c, d, e, f, m, x): return Dist(a*d*m/(S(2)*b*f), Int((c + d*x)**(m + S(-1))/(a + b*tan(e + f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(S(2)*a*d*(m + S(1))), x) - Simp(a*(c + d*x)**m/(S(2)*b*f*(a + b*tan(e + f*x))), x) def replacement3867(a, b, c, d, e, f, m, x): return -Dist(a*d*m/(S(2)*b*f), Int((c + d*x)**(m + S(-1))/(a + b/tan(e + f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(S(2)*a*d*(m + S(1))), x) + Simp(a*(c + d*x)**m/(S(2)*b*f*(a + b/tan(e + f*x))), x) def replacement3868(a, b, c, d, e, f, x): return -Dist(f/(a*d), Int(sin(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Dist(f/(b*d), Int(cos(S(2)*e + S(2)*f*x)/(c + d*x), x), x) - Simp(S(1)/(d*(a + b*tan(e + f*x))*(c + d*x)), x) def replacement3869(a, b, c, d, e, f, x): return Dist(f/(a*d), Int(sin(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Dist(f/(b*d), Int(cos(S(2)*e + S(2)*f*x)/(c + d*x), x), x) - Simp(S(1)/(d*(a + b/tan(e + f*x))*(c + d*x)), x) def replacement3870(a, b, c, d, e, f, m, x): return Dist(S(2)*b*f/(a*d*(m + S(1))), Int((c + d*x)**(m + S(1))/(a + b*tan(e + f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(d*(a + b*tan(e + f*x))*(m + S(1))), x) + Simp(f*(c + d*x)**(m + S(2))/(b*d**S(2)*(m + S(1))*(m + S(2))), x) def replacement3871(a, b, c, d, e, f, m, x): return -Dist(S(2)*b*f/(a*d*(m + S(1))), Int((c + d*x)**(m + S(1))/(a + b/tan(e + f*x)), x), x) + Simp((c + d*x)**(m + S(1))/(d*(a + b/tan(e + f*x))*(m + S(1))), x) - Simp(f*(c + d*x)**(m + S(2))/(b*d**S(2)*(m + S(1))*(m + S(2))), x) def replacement3872(a, b, c, d, e, f, x): return Dist(S(1)/(S(2)*a), Int(cos(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Dist(S(1)/(S(2)*b), Int(sin(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Simp(log(c + d*x)/(S(2)*a*d), x) def replacement3873(a, b, c, d, e, f, x): return -Dist(S(1)/(S(2)*a), Int(cos(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Dist(S(1)/(S(2)*b), Int(sin(S(2)*e + S(2)*f*x)/(c + d*x), x), x) + Simp(log(c + d*x)/(S(2)*a*d), x) def replacement3874(a, b, c, d, e, f, m, x): return Dist(S(1)/(S(2)*a), Int((c + d*x)**m*exp(S(2)*a*(e + f*x)/b), x), x) + Simp((c + d*x)**(m + S(1))/(S(2)*a*d*(m + S(1))), x) def replacement3875(a, b, c, d, e, f, m, x): return -Dist(S(1)/(S(2)*a), Int((c + d*x)**m*exp(-S(2)*a*(e + f*x)/b), x), x) + Simp((c + d*x)**(m + S(1))/(S(2)*a*d*(m + S(1))), x) def replacement3876(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (sin(S(2)*e + S(2)*f*x)/(S(2)*b) + cos(S(2)*e + S(2)*f*x)/(S(2)*a) + S(1)/(S(2)*a))**(-n), x), x) def replacement3877(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (sin(S(2)*e + S(2)*f*x)/(S(2)*b) - cos(S(2)*e + S(2)*f*x)/(S(2)*a) + S(1)/(S(2)*a))**(-n), x), x) def replacement3878(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (exp(S(2)*a*(e + f*x)/b)/(S(2)*a) + S(1)/(S(2)*a))**(-n), x), x) def replacement3879(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (S(1)/(S(2)*a) - exp(-S(2)*a*(e + f*x)/b)/(S(2)*a))**(-n), x), x) def With3880(a, b, c, d, e, f, m, n, x): u = IntHide((a + b*tan(e + f*x))**n, x) return -Dist(d*m, Int(Dist((c + d*x)**(m + S(-1)), u, x), x), x) + Dist((c + d*x)**m, u, x) def With3881(a, b, c, d, e, f, m, n, x): u = IntHide((a + b/tan(e + f*x))**n, x) return -Dist(d*m, Int(Dist((c + d*x)**(m + S(-1)), u, x), x), x) + Dist((c + d*x)**m, u, x) def replacement3882(a, b, c, d, e, f, m, x): return -Dist(S(2)*I*b, Int((c + d*x)**m/(a**S(2) + b**S(2) + (a - I*b)**S(2)*exp(S(2)*I*(e + f*x))), x), x) + Simp((c + d*x)**(m + S(1))/(d*(a - I*b)*(m + S(1))), x) def replacement3883(a, b, c, d, e, f, m, x): return Dist(S(2)*I*b, Int((c + d*x)**m/(a**S(2) + b**S(2) - (a + I*b)**S(2)*exp(S(2)*I*(e + f*x))), x), x) + Simp((c + d*x)**(m + S(1))/(d*(a + I*b)*(m + S(1))), x) def replacement3884(a, b, c, d, e, f, x): return Dist(S(1)/(f*(a**S(2) + b**S(2))), Int((S(2)*a*c*f + S(2)*a*d*f*x + b*d)/(a + b*tan(e + f*x)), x), x) - Simp((c + d*x)**S(2)/(S(2)*d*(a**S(2) + b**S(2))), x) - Simp(b*(c + d*x)/(f*(a + b*tan(e + f*x))*(a**S(2) + b**S(2))), x) def replacement3885(a, b, c, d, e, f, x): return -Dist(S(1)/(f*(a**S(2) + b**S(2))), Int((-S(2)*a*c*f - S(2)*a*d*f*x + b*d)/(a + b/tan(e + f*x)), x), x) - Simp((c + d*x)**S(2)/(S(2)*d*(a**S(2) + b**S(2))), x) + Simp(b*(c + d*x)/(f*(a + b/tan(e + f*x))*(a**S(2) + b**S(2))), x) def replacement3886(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (-S(2)*I*b/(a**S(2) + b**S(2) + (a - I*b)**S(2)*exp(S(2)*I*(e + f*x))) + S(1)/(a - I*b))**(-n), x), x) def replacement3887(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (S(2)*I*b/(a**S(2) + b**S(2) - (a + I*b)**S(2)*exp(S(2)*I*(e + f*x))) + S(1)/(a + I*b))**(-n), x), x) def replacement3888(a, b, m, n, u, v, x): return Int((a + b*tan(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement3889(a, b, m, n, u, v, x): return Int((a + b/tan(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement3890(a, b, c, d, e, f, m, n, x): return Int((a + b*tan(e + f*x))**n*(c + d*x)**m, x) def replacement3891(a, b, c, d, e, f, m, n, x): return Int((a + b/tan(e + f*x))**n*(c + d*x)**m, x) def replacement3892(a, b, c, d, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + S(1)/n)*(a + b*tan(c + d*x))**p, x), x, x**n), x) def replacement3893(a, b, c, d, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + S(1)/n)*(a + b/tan(c + d*x))**p, x), x, x**n), x) def replacement3894(a, b, c, d, n, p, x): return Int((a + b*tan(c + d*x**n))**p, x) def replacement3895(a, b, c, d, n, p, x): return Int((a + b/tan(c + d*x**n))**p, x) def replacement3896(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*tan(c + d*x**n))**p, x), x, u), x) def replacement3897(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b/tan(c + d*x**n))**p, x), x, u), x) def replacement3898(a, b, p, u, x): return Int((a + b*tan(ExpandToSum(u, x)))**p, x) def replacement3899(a, b, p, u, x): return Int((a + b/tan(ExpandToSum(u, x)))**p, x) def replacement3900(a, b, c, d, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b*tan(c + d*x))**p, x), x, x**n), x) def replacement3901(a, b, c, d, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b/tan(c + d*x))**p, x), x, x**n), x) def replacement3902(c, d, m, n, x): return -Dist((m - n + S(1))/(d*n), Int(x**(m - n)*tan(c + d*x**n), x), x) - Int(x**m, x) + Simp(x**(m - n + S(1))*tan(c + d*x**n)/(d*n), x) def replacement3903(c, d, m, n, x): return Dist((m - n + S(1))/(d*n), Int(x**(m - n)/tan(c + d*x**n), x), x) - Int(x**m, x) - Simp(x**(m - n + S(1))/(d*n*tan(c + d*x**n)), x) def replacement3904(a, b, c, d, m, n, p, x): return Int(x**m*(a + b*tan(c + d*x**n))**p, x) def replacement3905(a, b, c, d, m, n, p, x): return Int(x**m*(a + b/tan(c + d*x**n))**p, x) def replacement3906(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*tan(c + d*x**n))**p, x), x) def replacement3907(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b/tan(c + d*x**n))**p, x), x) def replacement3908(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b*tan(ExpandToSum(u, x)))**p, x) def replacement3909(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b/tan(ExpandToSum(u, x)))**p, x) def replacement3910(a, b, m, n, p, q, x): return -Dist((m - n + S(1))/(b*n*p), Int(x**(m - n)*(S(1)/cos(a + b*x**n))**p, x), x) + Simp(x**(m - n + S(1))*(S(1)/cos(a + b*x**n))**p/(b*n*p), x) def replacement3911(a, b, m, n, p, q, x): return Dist((m - n + S(1))/(b*n*p), Int(x**(m - n)*(S(1)/sin(a + b*x**n))**p, x), x) - Simp(x**(m - n + S(1))*(S(1)/sin(a + b*x**n))**p/(b*n*p), x) def replacement3912(a, b, c, n, x): return Int(tan(a + b*x + c*x**S(2))**n, x) def replacement3913(a, b, c, n, x): return Int((S(1)/tan(a + b*x + c*x**S(2)))**n, x) def replacement3914(a, b, c, d, e, x): return -Simp(e*log(cos(a + b*x + c*x**S(2)))/(S(2)*c), x) def replacement3915(a, b, c, d, e, x): return Simp(e*log(sin(a + b*x + c*x**S(2)))/(S(2)*c), x) def replacement3916(a, b, c, d, e, x): return Dist((-b*e + S(2)*c*d)/(S(2)*c), Int(tan(a + b*x + c*x**S(2)), x), x) - Simp(e*log(cos(a + b*x + c*x**S(2)))/(S(2)*c), x) def replacement3917(a, b, c, d, e, x): return Dist((-b*e + S(2)*c*d)/(S(2)*c), Int(S(1)/tan(a + b*x + c*x**S(2)), x), x) + Simp(e*log(sin(a + b*x + c*x**S(2)))/(S(2)*c), x) def replacement3918(a, b, c, d, e, m, n, x): return Int((d + e*x)**m*tan(a + b*x + c*x**S(2))**n, x) def replacement3919(a, b, c, d, e, m, n, x): return Int((d + e*x)**m*(S(1)/tan(a + b*x + c*x**S(2)))**n, x)
74fad92aa0da490a3fc26b92760ae087031f0acfd6794d1b4867a5fc2cd0cf8c
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def sine(): from sympy.integrals.rubi.constraints import cons1251, cons74, cons68, cons2, cons3, cons50, cons127, cons19, cons4, cons1252, cons1253, cons1254, cons95, cons168, cons91, cons1255, cons33, cons1172, cons96, cons1256, cons1257, cons1258, cons1259, cons1260, cons1261, cons167, cons1262, cons21, cons25, cons523, cons8, cons29, cons810, cons1263, cons1264, cons1265, cons545, cons1266, cons1267, cons150, cons1268, cons89, cons45, cons450, cons1269, cons1270, cons1271, cons1272, cons1273, cons483, cons484, cons1274, cons1275, cons1276, cons1277, cons1278, cons210, cons5, cons20, cons13, cons139, cons1279, cons1280, cons1281, cons1282, cons1283, cons145, cons1284, cons1285, cons1286, cons1287, cons246, cons170, cons1288, cons1289, cons1290, cons148, cons1291, cons1292, cons1293, cons248, cons1294, cons1295, cons1296, cons1297, cons1298, cons86, cons1299, cons149, cons56, cons1300, cons1301, cons1302, cons1303, cons1304, cons64, cons269, cons1305, cons1306, cons1307, cons1308, cons517, cons274, cons1309, cons1310, cons73, cons72, cons1311, cons1312, cons1313, cons1314, cons348, cons1315, cons157, cons1316, cons1317, cons116, cons1318, cons1319, cons1320, cons1321, cons1322, cons1323, cons79, cons1324, cons1325, cons1326, cons1327, cons1328, cons1329, cons1330, cons465, cons90, cons1331, cons1332, cons87, cons1333, cons1334, cons1335, cons1336, cons1337, cons1338, cons1339, cons1340, cons1341, cons1342, cons1343, cons1344, cons1345, cons1346, cons1347, cons1348, cons1349, cons1350, cons1351, cons1352, cons1353, cons1354, cons1355, cons1356, cons1357, cons1358, cons1359, cons1360, cons1361, cons1362, cons1363, cons1364, cons1365, cons1366, cons144, cons337, cons1367, cons1368, cons1369, cons1370, cons1371, cons1372, cons172, cons1373, cons1374, cons1375, cons1376, cons1377, cons255, cons1378, cons1379, cons1380, cons1381, cons1382, cons360, cons1383, cons1384, cons1385, cons1386, cons1387, cons1388, cons1389, cons1390, cons1391, cons1392, cons1393, cons1394, cons1395, cons1396, cons215, cons586, cons1397, cons1398, cons1399, cons1400, cons1401, cons1402, cons1403, cons1404, cons1405, cons1406, cons1407, cons1408, cons1409, cons1410, cons1411, cons1412, cons1413, cons107, cons1414, cons1415, cons1416, cons1417, cons1418, cons1419, cons40, cons1420, cons36, cons37, cons1421, cons1422, cons1423, cons685, cons1424, cons1425, cons1426, cons1427, cons1428, cons1429, cons1430, cons1431, cons1432, cons1433, cons38, cons1230, cons1434, cons35, cons1435, cons1436, cons1437, cons1438, cons216, cons1439, cons1440, cons1441, cons1442, cons1443, cons1444, cons1445, cons1446, cons1447, cons1448, cons1154, cons1449, cons198, cons130, cons65, cons152, cons377, cons324, cons1450, cons1451, cons1452, cons1453, cons1454, cons1455, cons1456, cons78, cons1457, cons1458, cons1459, cons1460, cons1461, cons1462, cons1463, cons1464, cons1465, cons1466, cons1467, cons1468, cons1469, cons1470, cons1471, cons1472, cons1473, cons1247, cons1474, cons1475, cons1476, cons1477, cons1478, cons1479, cons1045, cons1480, cons1481, cons1482, cons1483, cons1484, cons1485, cons1486, cons1487, cons1488, cons1489, cons48, cons47, cons228, cons378, cons1118, cons178, cons1490, cons1491, cons247, cons249, cons1492, cons1493, cons1494, cons1495, cons812, cons813, cons746, cons1496, cons1497, cons55, cons598, cons1498, cons1499, cons491, cons1500, cons70, cons71, cons825, cons826, cons1501, cons1502, cons1503, cons1504, cons58, cons1505, cons1506, cons369, cons1507, cons358, cons856, cons1508, cons820, cons1133, cons49, cons241, cons1134, cons1135, cons1509, cons821 pattern2167 = Pattern(Integral(u_, x_), cons1251) rule2167 = ReplacementRule(pattern2167, replacement2167) pattern2168 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons4, cons74, cons68) rule2168 = ReplacementRule(pattern2168, replacement2168) pattern2169 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('n', S(1)), x_), cons2, cons50, cons127, cons19, cons1252, cons1253) rule2169 = ReplacementRule(pattern2169, replacement2169) pattern2170 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('n', S(1)), x_), cons2, cons50, cons127, cons19, cons1252, cons1254) rule2170 = ReplacementRule(pattern2170, replacement2170) pattern2171 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons168, cons91, cons1255) rule2171 = ReplacementRule(pattern2171, replacement2171) pattern2172 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons168, cons91, cons1255) rule2172 = ReplacementRule(pattern2172, replacement2172) pattern2173 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons168, cons1172) rule2173 = ReplacementRule(pattern2173, replacement2173) pattern2174 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons168, cons1172) rule2174 = ReplacementRule(pattern2174, replacement2174) pattern2175 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons96, cons1172) rule2175 = ReplacementRule(pattern2175, replacement2175) pattern2176 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons96, cons1172) rule2176 = ReplacementRule(pattern2176, replacement2176) pattern2177 = Pattern(Integral(sqrt(WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1256) rule2177 = ReplacementRule(pattern2177, replacement2177) pattern2178 = Pattern(Integral(S(1)/(sqrt(WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons1256) rule2178 = ReplacementRule(pattern2178, replacement2178) pattern2179 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons1257, cons33, cons1258) rule2179 = ReplacementRule(pattern2179, With2179) pattern2180 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons1257, cons33, cons1258) rule2180 = ReplacementRule(pattern2180, With2180) pattern2181 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1259) rule2181 = ReplacementRule(pattern2181, replacement2181) pattern2182 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1260) rule2182 = ReplacementRule(pattern2182, replacement2182) pattern2183 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1261, cons68) rule2183 = ReplacementRule(pattern2183, replacement2183) pattern2184 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1261, cons68) rule2184 = ReplacementRule(pattern2184, replacement2184) pattern2185 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons168, cons167, cons1172) rule2185 = ReplacementRule(pattern2185, replacement2185) pattern2186 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons168, cons167, cons1172) rule2186 = ReplacementRule(pattern2186, replacement2186) pattern2187 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons168, cons1262, cons1172) rule2187 = ReplacementRule(pattern2187, replacement2187) pattern2188 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons168, cons1262, cons1172) rule2188 = ReplacementRule(pattern2188, replacement2188) pattern2189 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons96, cons1172) rule2189 = ReplacementRule(pattern2189, replacement2189) pattern2190 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons4, cons33, cons96, cons1172) rule2190 = ReplacementRule(pattern2190, replacement2190) pattern2191 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule2191 = ReplacementRule(pattern2191, replacement2191) pattern2192 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule2192 = ReplacementRule(pattern2192, replacement2192) pattern2193 = Pattern(Integral((WC('a', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule2193 = ReplacementRule(pattern2193, replacement2193) pattern2194 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons21, cons25) rule2194 = ReplacementRule(pattern2194, replacement2194) pattern2195 = Pattern(Integral(sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_, x_), cons8, cons29, cons523) rule2195 = ReplacementRule(pattern2195, replacement2195) pattern2196 = Pattern(Integral(cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_, x_), cons8, cons29, cons523) rule2196 = ReplacementRule(pattern2196, replacement2196) pattern2197 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons810, cons167) rule2197 = ReplacementRule(pattern2197, replacement2197) pattern2198 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons810, cons167) rule2198 = ReplacementRule(pattern2198, replacement2198) pattern2199 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons810, cons91) rule2199 = ReplacementRule(pattern2199, replacement2199) pattern2200 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons810, cons91) rule2200 = ReplacementRule(pattern2200, replacement2200) pattern2201 = Pattern(Integral(sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons1263) rule2201 = ReplacementRule(pattern2201, replacement2201) pattern2202 = Pattern(Integral(cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons8, cons1264) rule2202 = ReplacementRule(pattern2202, replacement2202) pattern2203 = Pattern(Integral(sqrt(sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons8, cons29, cons1263) rule2203 = ReplacementRule(pattern2203, replacement2203) pattern2204 = Pattern(Integral(sqrt(cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons8, cons29, cons1263) rule2204 = ReplacementRule(pattern2204, replacement2204) pattern2205 = Pattern(Integral(sqrt(b_*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons3, cons8, cons29, cons1265) rule2205 = ReplacementRule(pattern2205, replacement2205) pattern2206 = Pattern(Integral(sqrt(b_*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons3, cons8, cons29, cons1265) rule2206 = ReplacementRule(pattern2206, replacement2206) pattern2207 = Pattern(Integral(S(1)/sqrt(sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons8, cons29, cons1263) rule2207 = ReplacementRule(pattern2207, replacement2207) pattern2208 = Pattern(Integral(S(1)/sqrt(cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons8, cons29, cons1263) rule2208 = ReplacementRule(pattern2208, replacement2208) pattern2209 = Pattern(Integral(S(1)/sqrt(b_*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons3, cons8, cons29, cons1265) rule2209 = ReplacementRule(pattern2209, replacement2209) pattern2210 = Pattern(Integral(S(1)/sqrt(b_*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons3, cons8, cons29, cons1265) rule2210 = ReplacementRule(pattern2210, replacement2210) pattern2211 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons4, cons545) rule2211 = ReplacementRule(pattern2211, replacement2211) pattern2212 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons4, cons545) rule2212 = ReplacementRule(pattern2212, replacement2212) pattern2213 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons1266) rule2213 = ReplacementRule(pattern2213, replacement2213) pattern2214 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons1266) rule2214 = ReplacementRule(pattern2214, replacement2214) pattern2215 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons150) rule2215 = ReplacementRule(pattern2215, replacement2215) pattern2216 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons150) rule2216 = ReplacementRule(pattern2216, replacement2216) pattern2217 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule2217 = ReplacementRule(pattern2217, replacement2217) pattern2218 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule2218 = ReplacementRule(pattern2218, replacement2218) pattern2219 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1267, cons1268) rule2219 = ReplacementRule(pattern2219, replacement2219) pattern2220 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1267, cons1268) rule2220 = ReplacementRule(pattern2220, replacement2220) pattern2221 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule2221 = ReplacementRule(pattern2221, replacement2221) pattern2222 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule2222 = ReplacementRule(pattern2222, replacement2222) pattern2223 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule2223 = ReplacementRule(pattern2223, replacement2223) pattern2224 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule2224 = ReplacementRule(pattern2224, replacement2224) pattern2225 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1267, cons89, cons91, cons810) rule2225 = ReplacementRule(pattern2225, replacement2225) pattern2226 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1267, cons89, cons91, cons810) rule2226 = ReplacementRule(pattern2226, replacement2226) pattern2227 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons545, cons45) rule2227 = ReplacementRule(pattern2227, replacement2227) pattern2228 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons545, cons45) rule2228 = ReplacementRule(pattern2228, replacement2228) pattern2229 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons545, cons450) rule2229 = ReplacementRule(pattern2229, replacement2229) pattern2230 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons545, cons450) rule2230 = ReplacementRule(pattern2230, replacement2230) pattern2231 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1270) rule2231 = ReplacementRule(pattern2231, replacement2231) pattern2232 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1270) rule2232 = ReplacementRule(pattern2232, replacement2232) pattern2233 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1271) rule2233 = ReplacementRule(pattern2233, replacement2233) pattern2234 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1271) rule2234 = ReplacementRule(pattern2234, replacement2234) pattern2235 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1272) rule2235 = ReplacementRule(pattern2235, replacement2235) pattern2236 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1272) rule2236 = ReplacementRule(pattern2236, replacement2236) pattern2237 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1269, cons89, cons167, cons810) rule2237 = ReplacementRule(pattern2237, replacement2237) pattern2238 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1269, cons89, cons167, cons810) rule2238 = ReplacementRule(pattern2238, replacement2238) pattern2239 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1273, cons483) rule2239 = ReplacementRule(pattern2239, With2239) pattern2240 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1273, cons483) rule2240 = ReplacementRule(pattern2240, With2240) pattern2241 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1273, cons484) rule2241 = ReplacementRule(pattern2241, With2241) pattern2242 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1273, cons484) rule2242 = ReplacementRule(pattern2242, With2242) pattern2243 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1274) rule2243 = ReplacementRule(pattern2243, With2243) pattern2244 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269) rule2244 = ReplacementRule(pattern2244, With2244) pattern2245 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269) rule2245 = ReplacementRule(pattern2245, With2245) pattern2246 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1270) rule2246 = ReplacementRule(pattern2246, replacement2246) pattern2247 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1270) rule2247 = ReplacementRule(pattern2247, replacement2247) pattern2248 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1271) rule2248 = ReplacementRule(pattern2248, replacement2248) pattern2249 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1271) rule2249 = ReplacementRule(pattern2249, replacement2249) pattern2250 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1272) rule2250 = ReplacementRule(pattern2250, replacement2250) pattern2251 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269, cons1272) rule2251 = ReplacementRule(pattern2251, replacement2251) pattern2252 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1269, cons89, cons91, cons810) rule2252 = ReplacementRule(pattern2252, replacement2252) pattern2253 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1269, cons89, cons91, cons810) rule2253 = ReplacementRule(pattern2253, replacement2253) pattern2254 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1269, cons545) rule2254 = ReplacementRule(pattern2254, replacement2254) pattern2255 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1269, cons545) rule2255 = ReplacementRule(pattern2255, replacement2255) pattern2256 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1275) rule2256 = ReplacementRule(pattern2256, replacement2256) pattern2257 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1276, cons1267, cons1277) rule2257 = ReplacementRule(pattern2257, replacement2257) pattern2258 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1276, cons1267, cons1277) rule2258 = ReplacementRule(pattern2258, replacement2258) pattern2259 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1276, cons1269) rule2259 = ReplacementRule(pattern2259, replacement2259) pattern2260 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1276, cons1269) rule2260 = ReplacementRule(pattern2260, replacement2260) pattern2261 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1278) rule2261 = ReplacementRule(pattern2261, replacement2261) pattern2262 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1278) rule2262 = ReplacementRule(pattern2262, replacement2262) pattern2263 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons20, cons13, cons139, cons1279) rule2263 = ReplacementRule(pattern2263, replacement2263) pattern2264 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons20, cons13, cons139, cons1279) rule2264 = ReplacementRule(pattern2264, replacement2264) pattern2265 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1280, cons1281) rule2265 = ReplacementRule(pattern2265, replacement2265) pattern2266 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1280, cons1281) rule2266 = ReplacementRule(pattern2266, replacement2266) pattern2267 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1282, cons1283, cons145) rule2267 = ReplacementRule(pattern2267, replacement2267) pattern2268 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1282, cons1283, cons145) rule2268 = ReplacementRule(pattern2268, replacement2268) pattern2269 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1284, cons1285) rule2269 = ReplacementRule(pattern2269, replacement2269) pattern2270 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1284, cons1285) rule2270 = ReplacementRule(pattern2270, replacement2270) pattern2271 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1286, cons1287) rule2271 = ReplacementRule(pattern2271, replacement2271) pattern2272 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1286, cons1287) rule2272 = ReplacementRule(pattern2272, replacement2272) pattern2273 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons246, cons170, cons1288, cons1289) rule2273 = ReplacementRule(pattern2273, replacement2273) pattern2274 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons246, cons170, cons1288, cons1289) rule2274 = ReplacementRule(pattern2274, replacement2274) pattern2275 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons246, cons168, cons139, cons1290) rule2275 = ReplacementRule(pattern2275, replacement2275) pattern2276 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons246, cons168, cons139, cons1290) rule2276 = ReplacementRule(pattern2276, replacement2276) pattern2277 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267) rule2277 = ReplacementRule(pattern2277, replacement2277) pattern2278 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267) rule2278 = ReplacementRule(pattern2278, replacement2278) pattern2279 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons33, cons170, cons1287, cons1290) rule2279 = ReplacementRule(pattern2279, replacement2279) pattern2280 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons33, cons170, cons1287, cons1290) rule2280 = ReplacementRule(pattern2280, replacement2280) pattern2281 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons246, cons96, cons148, cons1291, cons1287, cons1290) rule2281 = ReplacementRule(pattern2281, replacement2281) pattern2282 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons246, cons96, cons148, cons1291, cons1287, cons1290) rule2282 = ReplacementRule(pattern2282, replacement2282) pattern2283 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons246, cons1292, cons148, cons1283, cons1293, cons1290) rule2283 = ReplacementRule(pattern2283, replacement2283) pattern2284 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons246, cons1292, cons148, cons1283, cons1293, cons1290) rule2284 = ReplacementRule(pattern2284, replacement2284) pattern2285 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons33, cons96, cons1283, cons1290) rule2285 = ReplacementRule(pattern2285, replacement2285) pattern2286 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons33, cons96, cons1283, cons1290) rule2286 = ReplacementRule(pattern2286, replacement2286) pattern2287 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons13, cons148, cons248) rule2287 = ReplacementRule(pattern2287, replacement2287) pattern2288 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons13, cons148, cons248) rule2288 = ReplacementRule(pattern2288, replacement2288) pattern2289 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons1294, cons248) rule2289 = ReplacementRule(pattern2289, replacement2289) pattern2290 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons1294, cons248) rule2290 = ReplacementRule(pattern2290, replacement2290) pattern2291 = Pattern(Integral(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267) rule2291 = ReplacementRule(pattern2291, replacement2291) pattern2292 = Pattern(Integral(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267) rule2292 = ReplacementRule(pattern2292, replacement2292) pattern2293 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267) rule2293 = ReplacementRule(pattern2293, replacement2293) pattern2294 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267) rule2294 = ReplacementRule(pattern2294, replacement2294) pattern2295 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons13, cons1295, cons248) rule2295 = ReplacementRule(pattern2295, replacement2295) pattern2296 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons13, cons1295, cons248) rule2296 = ReplacementRule(pattern2296, replacement2296) pattern2297 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons13, cons139, cons248) rule2297 = ReplacementRule(pattern2297, replacement2297) pattern2298 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1267, cons13, cons139, cons248) rule2298 = ReplacementRule(pattern2298, replacement2298) pattern2299 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons20) rule2299 = ReplacementRule(pattern2299, replacement2299) pattern2300 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons20) rule2300 = ReplacementRule(pattern2300, replacement2300) pattern2301 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons21) rule2301 = ReplacementRule(pattern2301, replacement2301) pattern2302 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons21) rule2302 = ReplacementRule(pattern2302, replacement2302) pattern2303 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons246, cons1258, cons139, cons1296) rule2303 = ReplacementRule(pattern2303, replacement2303) pattern2304 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons246, cons1258, cons139, cons1296) rule2304 = ReplacementRule(pattern2304, replacement2304) pattern2305 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons246, cons168, cons139, cons1296) rule2305 = ReplacementRule(pattern2305, replacement2305) pattern2306 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons246, cons168, cons139, cons1296) rule2306 = ReplacementRule(pattern2306, replacement2306) pattern2307 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons33, cons168, cons1287, cons1296) rule2307 = ReplacementRule(pattern2307, replacement2307) pattern2308 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons33, cons168, cons1287, cons1296) rule2308 = ReplacementRule(pattern2308, replacement2308) pattern2309 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons246, cons96, cons148, cons1290) rule2309 = ReplacementRule(pattern2309, replacement2309) pattern2310 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons246, cons96, cons148, cons1290) rule2310 = ReplacementRule(pattern2310, replacement2310) pattern2311 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons33, cons96, cons1290) rule2311 = ReplacementRule(pattern2311, replacement2311) pattern2312 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons33, cons96, cons1290) rule2312 = ReplacementRule(pattern2312, replacement2312) pattern2313 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons1269, cons13, cons148, cons1287, cons1290) rule2313 = ReplacementRule(pattern2313, replacement2313) pattern2314 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons1269, cons13, cons148, cons1287, cons1290) rule2314 = ReplacementRule(pattern2314, replacement2314) pattern2315 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons1269, cons13, cons139, cons1290) rule2315 = ReplacementRule(pattern2315, replacement2315) pattern2316 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons1269, cons13, cons139, cons1290) rule2316 = ReplacementRule(pattern2316, replacement2316) pattern2317 = Pattern(Integral(S(1)/(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2317 = ReplacementRule(pattern2317, replacement2317) pattern2318 = Pattern(Integral(S(1)/(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2318 = ReplacementRule(pattern2318, replacement2318) pattern2319 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1269, cons1280) rule2319 = ReplacementRule(pattern2319, replacement2319) pattern2320 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1269, cons1280) rule2320 = ReplacementRule(pattern2320, replacement2320) pattern2321 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1269, cons1297) rule2321 = ReplacementRule(pattern2321, replacement2321) pattern2322 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1269, cons1297) rule2322 = ReplacementRule(pattern2322, replacement2322) pattern2323 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1269, cons1298) rule2323 = ReplacementRule(pattern2323, replacement2323) pattern2324 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1269, cons1298) rule2324 = ReplacementRule(pattern2324, replacement2324) pattern2325 = Pattern(Integral(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2325 = ReplacementRule(pattern2325, With2325) pattern2326 = Pattern(Integral(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2326 = ReplacementRule(pattern2326, With2326) pattern2327 = Pattern(Integral(S(1)/(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2327 = ReplacementRule(pattern2327, With2327) pattern2328 = Pattern(Integral(S(1)/(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2328 = ReplacementRule(pattern2328, With2328) pattern2329 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons86, cons1299) rule2329 = ReplacementRule(pattern2329, replacement2329) pattern2330 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons86, cons1299) rule2330 = ReplacementRule(pattern2330, replacement2330) pattern2331 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1269, cons145) rule2331 = ReplacementRule(pattern2331, replacement2331) pattern2332 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1269, cons145) rule2332 = ReplacementRule(pattern2332, replacement2332) pattern2333 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons149) rule2333 = ReplacementRule(pattern2333, replacement2333) pattern2334 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons149) rule2334 = ReplacementRule(pattern2334, replacement2334) pattern2335 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons56) rule2335 = ReplacementRule(pattern2335, replacement2335) pattern2336 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons56) rule2336 = ReplacementRule(pattern2336, replacement2336) pattern2337 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1300) rule2337 = ReplacementRule(pattern2337, replacement2337) pattern2338 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1300) rule2338 = ReplacementRule(pattern2338, replacement2338) pattern2339 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons50, cons127, cons1267, cons1301, cons1302) rule2339 = ReplacementRule(pattern2339, replacement2339) pattern2340 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_, x_), cons2, cons3, cons50, cons127, cons1267, cons1301, cons1302) rule2340 = ReplacementRule(pattern2340, replacement2340) pattern2341 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons50, cons127, cons1267, cons1303, cons1304) rule2341 = ReplacementRule(pattern2341, replacement2341) pattern2342 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_, x_), cons2, cons3, cons50, cons127, cons1267, cons1303, cons1304) rule2342 = ReplacementRule(pattern2342, replacement2342) pattern2343 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons64) rule2343 = ReplacementRule(pattern2343, replacement2343) pattern2344 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons64) rule2344 = ReplacementRule(pattern2344, replacement2344) pattern2345 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons86) rule2345 = ReplacementRule(pattern2345, replacement2345) pattern2346 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons86) rule2346 = ReplacementRule(pattern2346, replacement2346) pattern2347 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1267, cons21, cons33, cons269) rule2347 = ReplacementRule(pattern2347, replacement2347) pattern2348 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1267, cons21, cons33, cons269) rule2348 = ReplacementRule(pattern2348, replacement2348) pattern2349 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons21, cons1305) rule2349 = ReplacementRule(pattern2349, replacement2349) pattern2350 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons21, cons1305) rule2350 = ReplacementRule(pattern2350, replacement2350) pattern2351 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1306) rule2351 = ReplacementRule(pattern2351, replacement2351) pattern2352 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1306) rule2352 = ReplacementRule(pattern2352, replacement2352) pattern2353 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1267, cons1306, cons96) rule2353 = ReplacementRule(pattern2353, replacement2353) pattern2354 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1267, cons1306, cons96) rule2354 = ReplacementRule(pattern2354, replacement2354) pattern2355 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1306, cons1307) rule2355 = ReplacementRule(pattern2355, replacement2355) pattern2356 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1306, cons1307) rule2356 = ReplacementRule(pattern2356, replacement2356) pattern2357 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons1267, cons1306, cons96) rule2357 = ReplacementRule(pattern2357, replacement2357) pattern2358 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons1267, cons1306, cons96) rule2358 = ReplacementRule(pattern2358, replacement2358) pattern2359 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1306, cons1307) rule2359 = ReplacementRule(pattern2359, replacement2359) pattern2360 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1306, cons1307) rule2360 = ReplacementRule(pattern2360, replacement2360) pattern2361 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons21, cons1308) rule2361 = ReplacementRule(pattern2361, replacement2361) pattern2362 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_, x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons21, cons1308) rule2362 = ReplacementRule(pattern2362, replacement2362) pattern2363 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons21, cons149) rule2363 = ReplacementRule(pattern2363, replacement2363) pattern2364 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons21, cons149) rule2364 = ReplacementRule(pattern2364, replacement2364) pattern2365 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons1300) rule2365 = ReplacementRule(pattern2365, replacement2365) pattern2366 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons1300) rule2366 = ReplacementRule(pattern2366, replacement2366) pattern2367 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons64) rule2367 = ReplacementRule(pattern2367, replacement2367) pattern2368 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons64) rule2368 = ReplacementRule(pattern2368, replacement2368) pattern2369 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1269) rule2369 = ReplacementRule(pattern2369, replacement2369) pattern2370 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1269) rule2370 = ReplacementRule(pattern2370, replacement2370) pattern2371 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons96, cons517) rule2371 = ReplacementRule(pattern2371, replacement2371) pattern2372 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons96, cons517) rule2372 = ReplacementRule(pattern2372, replacement2372) pattern2373 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons274, cons517) rule2373 = ReplacementRule(pattern2373, replacement2373) pattern2374 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons274, cons517) rule2374 = ReplacementRule(pattern2374, replacement2374) pattern2375 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(6), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons1285, cons517) rule2375 = ReplacementRule(pattern2375, replacement2375) pattern2376 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**S(6), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons1285, cons517) rule2376 = ReplacementRule(pattern2376, replacement2376) pattern2377 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons1309, cons148) rule2377 = ReplacementRule(pattern2377, replacement2377) pattern2378 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons1309, cons148) rule2378 = ReplacementRule(pattern2378, replacement2378) pattern2379 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons1309, cons139) rule2379 = ReplacementRule(pattern2379, replacement2379) pattern2380 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons1309, cons139) rule2380 = ReplacementRule(pattern2380, replacement2380) pattern2381 = Pattern(Integral(sqrt(WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2381 = ReplacementRule(pattern2381, replacement2381) pattern2382 = Pattern(Integral(sqrt(WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2382 = ReplacementRule(pattern2382, replacement2382) pattern2383 = Pattern(Integral(S(1)/(sqrt(g_*tan(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2383 = ReplacementRule(pattern2383, replacement2383) pattern2384 = Pattern(Integral(S(1)/(sqrt(g_/tan(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2384 = ReplacementRule(pattern2384, replacement2384) pattern2385 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*tan(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons50, cons127, cons1269, cons1303) rule2385 = ReplacementRule(pattern2385, replacement2385) pattern2386 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(S(1)/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_, x_), cons2, cons3, cons50, cons127, cons1269, cons1303) rule2386 = ReplacementRule(pattern2386, replacement2386) pattern2387 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1310) rule2387 = ReplacementRule(pattern2387, replacement2387) pattern2388 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1310) rule2388 = ReplacementRule(pattern2388, replacement2388) pattern2389 = Pattern(Integral((WC('g', S(1))/tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons149) rule2389 = ReplacementRule(pattern2389, replacement2389) pattern2390 = Pattern(Integral((WC('g', S(1))*tan(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons149) rule2390 = ReplacementRule(pattern2390, replacement2390) pattern2391 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule2391 = ReplacementRule(pattern2391, replacement2391) pattern2392 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule2392 = ReplacementRule(pattern2392, replacement2392) pattern2393 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule2393 = ReplacementRule(pattern2393, replacement2393) pattern2394 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule2394 = ReplacementRule(pattern2394, replacement2394) pattern2395 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons20, cons1311) rule2395 = ReplacementRule(pattern2395, replacement2395) pattern2396 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons20, cons1311) rule2396 = ReplacementRule(pattern2396, replacement2396) pattern2397 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267) rule2397 = ReplacementRule(pattern2397, replacement2397) pattern2398 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267) rule2398 = ReplacementRule(pattern2398, replacement2398) pattern2399 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons1312) rule2399 = ReplacementRule(pattern2399, replacement2399) pattern2400 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons1312) rule2400 = ReplacementRule(pattern2400, replacement2400) pattern2401 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons1313, cons89, cons91, cons1314) rule2401 = ReplacementRule(pattern2401, replacement2401) pattern2402 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons1313, cons89, cons91, cons1314) rule2402 = ReplacementRule(pattern2402, replacement2402) pattern2403 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons1313, cons348, cons1315, cons1314) rule2403 = ReplacementRule(pattern2403, replacement2403) pattern2404 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons1313, cons348, cons1315, cons1314) rule2404 = ReplacementRule(pattern2404, replacement2404) pattern2405 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267) rule2405 = ReplacementRule(pattern2405, replacement2405) pattern2406 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267) rule2406 = ReplacementRule(pattern2406, replacement2406) pattern2407 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons157, cons1316) rule2407 = ReplacementRule(pattern2407, replacement2407) pattern2408 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons157, cons1316) rule2408 = ReplacementRule(pattern2408, replacement2408) pattern2409 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons1317, cons1316, cons116) rule2409 = ReplacementRule(pattern2409, replacement2409) pattern2410 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons1317, cons1316, cons116) rule2410 = ReplacementRule(pattern2410, replacement2410) pattern2411 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons33, cons96, cons1318, cons1172) rule2411 = ReplacementRule(pattern2411, replacement2411) pattern2412 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons33, cons96, cons1318, cons1172) rule2412 = ReplacementRule(pattern2412, replacement2412) pattern2413 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons1319) rule2413 = ReplacementRule(pattern2413, replacement2413) pattern2414 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons1319) rule2414 = ReplacementRule(pattern2414, replacement2414) pattern2415 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2)/(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule2415 = ReplacementRule(pattern2415, replacement2415) pattern2416 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**S(2)/(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule2416 = ReplacementRule(pattern2416, replacement2416) pattern2417 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule2417 = ReplacementRule(pattern2417, replacement2417) pattern2418 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule2418 = ReplacementRule(pattern2418, replacement2418) pattern2419 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons19, cons1320) rule2419 = ReplacementRule(pattern2419, replacement2419) pattern2420 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons19, cons1320) rule2420 = ReplacementRule(pattern2420, replacement2420) pattern2421 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1267, cons1321) rule2421 = ReplacementRule(pattern2421, replacement2421) pattern2422 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1267, cons1321) rule2422 = ReplacementRule(pattern2422, replacement2422) pattern2423 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons33, cons1322) rule2423 = ReplacementRule(pattern2423, replacement2423) pattern2424 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons33, cons1322) rule2424 = ReplacementRule(pattern2424, replacement2424) pattern2425 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1267, cons1323) rule2425 = ReplacementRule(pattern2425, replacement2425) pattern2426 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1267, cons1323) rule2426 = ReplacementRule(pattern2426, replacement2426) pattern2427 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule2427 = ReplacementRule(pattern2427, replacement2427) pattern2428 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule2428 = ReplacementRule(pattern2428, replacement2428) pattern2429 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons33, cons170, cons517) rule2429 = ReplacementRule(pattern2429, replacement2429) pattern2430 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons33, cons170, cons517) rule2430 = ReplacementRule(pattern2430, replacement2430) pattern2431 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons33, cons96, cons517) rule2431 = ReplacementRule(pattern2431, replacement2431) pattern2432 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons33, cons96, cons517) rule2432 = ReplacementRule(pattern2432, replacement2432) pattern2433 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1269, cons79, cons1324) rule2433 = ReplacementRule(pattern2433, replacement2433) pattern2434 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1269, cons79, cons1324) rule2434 = ReplacementRule(pattern2434, replacement2434) pattern2435 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1269) rule2435 = ReplacementRule(pattern2435, replacement2435) pattern2436 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1269) rule2436 = ReplacementRule(pattern2436, replacement2436) pattern2437 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons64, cons89) rule2437 = ReplacementRule(pattern2437, replacement2437) pattern2438 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons64, cons89) rule2438 = ReplacementRule(pattern2438, replacement2438) pattern2439 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1322) rule2439 = ReplacementRule(pattern2439, replacement2439) pattern2440 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1322) rule2440 = ReplacementRule(pattern2440, replacement2440) pattern2441 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1323) rule2441 = ReplacementRule(pattern2441, replacement2441) pattern2442 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1323) rule2442 = ReplacementRule(pattern2442, replacement2442) pattern2443 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons33, cons96) rule2443 = ReplacementRule(pattern2443, replacement2443) pattern2444 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons33, cons96) rule2444 = ReplacementRule(pattern2444, replacement2444) pattern2445 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1267, cons274) rule2445 = ReplacementRule(pattern2445, replacement2445) pattern2446 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1267, cons274) rule2446 = ReplacementRule(pattern2446, replacement2446) pattern2447 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons95, cons168, cons91, cons1326) rule2447 = ReplacementRule(pattern2447, replacement2447) pattern2448 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons95, cons168, cons91, cons1326) rule2448 = ReplacementRule(pattern2448, replacement2448) pattern2449 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons33, cons168, cons348, cons1326) rule2449 = ReplacementRule(pattern2449, replacement2449) pattern2450 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons33, cons168, cons348, cons1326) rule2450 = ReplacementRule(pattern2450, replacement2450) pattern2451 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons95, cons96, cons1327, cons1328) rule2451 = ReplacementRule(pattern2451, replacement2451) pattern2452 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons95, cons96, cons1327, cons1328) rule2452 = ReplacementRule(pattern2452, replacement2452) pattern2453 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons95, cons96, cons167, cons1328) rule2453 = ReplacementRule(pattern2453, replacement2453) pattern2454 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons95, cons96, cons167, cons1328) rule2454 = ReplacementRule(pattern2454, replacement2454) pattern2455 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons33, cons96, cons1329, cons1328) rule2455 = ReplacementRule(pattern2455, replacement2455) pattern2456 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons33, cons96, cons1329, cons1328) rule2456 = ReplacementRule(pattern2456, replacement2456) pattern2457 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons167, cons1330) rule2457 = ReplacementRule(pattern2457, replacement2457) pattern2458 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons167, cons1330) rule2458 = ReplacementRule(pattern2458, replacement2458) pattern2459 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons465, cons1330) rule2459 = ReplacementRule(pattern2459, replacement2459) pattern2460 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons465, cons1330) rule2460 = ReplacementRule(pattern2460, replacement2460) pattern2461 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons1330) rule2461 = ReplacementRule(pattern2461, replacement2461) pattern2462 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons1330) rule2462 = ReplacementRule(pattern2462, replacement2462) pattern2463 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons90, cons810) rule2463 = ReplacementRule(pattern2463, replacement2463) pattern2464 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons90, cons810) rule2464 = ReplacementRule(pattern2464, replacement2464) pattern2465 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2465 = ReplacementRule(pattern2465, replacement2465) pattern2466 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2466 = ReplacementRule(pattern2466, replacement2466) pattern2467 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons91, cons1331, cons810) rule2467 = ReplacementRule(pattern2467, replacement2467) pattern2468 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons91, cons810) rule2468 = ReplacementRule(pattern2468, replacement2468) pattern2469 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2469 = ReplacementRule(pattern2469, replacement2469) pattern2470 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2470 = ReplacementRule(pattern2470, replacement2470) pattern2471 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1332) rule2471 = ReplacementRule(pattern2471, replacement2471) pattern2472 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1332) rule2472 = ReplacementRule(pattern2472, replacement2472) pattern2473 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2473 = ReplacementRule(pattern2473, replacement2473) pattern2474 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2474 = ReplacementRule(pattern2474, replacement2474) pattern2475 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons545) rule2475 = ReplacementRule(pattern2475, replacement2475) pattern2476 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons545) rule2476 = ReplacementRule(pattern2476, replacement2476) pattern2477 = Pattern(Integral(sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2477 = ReplacementRule(pattern2477, replacement2477) pattern2478 = Pattern(Integral(sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2478 = ReplacementRule(pattern2478, replacement2478) pattern2479 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons167, cons810) rule2479 = ReplacementRule(pattern2479, replacement2479) pattern2480 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons167, cons810) rule2480 = ReplacementRule(pattern2480, replacement2480) pattern2481 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons91, cons810) rule2481 = ReplacementRule(pattern2481, replacement2481) pattern2482 = Pattern(Integral((WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325, cons89, cons91, cons810) rule2482 = ReplacementRule(pattern2482, replacement2482) pattern2483 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2483 = ReplacementRule(pattern2483, replacement2483) pattern2484 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2484 = ReplacementRule(pattern2484, replacement2484) pattern2485 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1332, cons45) rule2485 = ReplacementRule(pattern2485, replacement2485) pattern2486 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1332, cons45) rule2486 = ReplacementRule(pattern2486, replacement2486) pattern2487 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2487 = ReplacementRule(pattern2487, replacement2487) pattern2488 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule2488 = ReplacementRule(pattern2488, replacement2488) pattern2489 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1267, cons1325, cons89, cons167, cons87) rule2489 = ReplacementRule(pattern2489, replacement2489) pattern2490 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1267, cons1325, cons89, cons167, cons87) rule2490 = ReplacementRule(pattern2490, replacement2490) pattern2491 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons20) rule2491 = ReplacementRule(pattern2491, replacement2491) pattern2492 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1267, cons1325, cons20) rule2492 = ReplacementRule(pattern2492, replacement2492) pattern2493 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45, cons1333) rule2493 = ReplacementRule(pattern2493, replacement2493) pattern2494 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45, cons1333) rule2494 = ReplacementRule(pattern2494, replacement2494) pattern2495 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45, cons1334) rule2495 = ReplacementRule(pattern2495, replacement2495) pattern2496 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45, cons1334) rule2496 = ReplacementRule(pattern2496, replacement2496) pattern2497 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons450) rule2497 = ReplacementRule(pattern2497, replacement2497) pattern2498 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons450) rule2498 = ReplacementRule(pattern2498, replacement2498) pattern2499 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1267, cons1325, cons21) rule2499 = ReplacementRule(pattern2499, replacement2499) pattern2500 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1267, cons1325, cons21) rule2500 = ReplacementRule(pattern2500, replacement2500) pattern2501 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons3, cons8, cons29, cons50, cons127, cons19, cons1320) rule2501 = ReplacementRule(pattern2501, replacement2501) pattern2502 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons3, cons8, cons29, cons50, cons127, cons19, cons1320) rule2502 = ReplacementRule(pattern2502, replacement2502) pattern2503 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons33, cons96) rule2503 = ReplacementRule(pattern2503, replacement2503) pattern2504 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons33, cons96) rule2504 = ReplacementRule(pattern2504, replacement2504) pattern2505 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1269, cons274) rule2505 = ReplacementRule(pattern2505, replacement2505) pattern2506 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons1269, cons274) rule2506 = ReplacementRule(pattern2506, replacement2506) pattern2507 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons95, cons1335, cons91, cons1336) rule2507 = ReplacementRule(pattern2507, replacement2507) pattern2508 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons95, cons1335, cons91, cons1336) rule2508 = ReplacementRule(pattern2508, replacement2508) pattern2509 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1269, cons1325, cons33, cons1335, cons1336, cons1337) rule2509 = ReplacementRule(pattern2509, replacement2509) pattern2510 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1269, cons1325, cons33, cons1335, cons1336, cons1337) rule2510 = ReplacementRule(pattern2510, replacement2510) pattern2511 = Pattern(Integral(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2511 = ReplacementRule(pattern2511, replacement2511) pattern2512 = Pattern(Integral(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2512 = ReplacementRule(pattern2512, replacement2512) pattern2513 = Pattern(Integral(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2513 = ReplacementRule(pattern2513, replacement2513) pattern2514 = Pattern(Integral(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2514 = ReplacementRule(pattern2514, replacement2514) pattern2515 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons95, cons96, cons1327, cons1172) rule2515 = ReplacementRule(pattern2515, replacement2515) pattern2516 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons95, cons96, cons1327, cons1172) rule2516 = ReplacementRule(pattern2516, replacement2516) pattern2517 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2517 = ReplacementRule(pattern2517, replacement2517) pattern2518 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2518 = ReplacementRule(pattern2518, replacement2518) pattern2519 = Pattern(Integral((c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2519 = ReplacementRule(pattern2519, replacement2519) pattern2520 = Pattern(Integral((c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2520 = ReplacementRule(pattern2520, replacement2520) pattern2521 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons95, cons96, cons1338, cons1172) rule2521 = ReplacementRule(pattern2521, replacement2521) pattern2522 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons95, cons96, cons1338, cons1172) rule2522 = ReplacementRule(pattern2522, replacement2522) pattern2523 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2523 = ReplacementRule(pattern2523, replacement2523) pattern2524 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2524 = ReplacementRule(pattern2524, replacement2524) pattern2525 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2525 = ReplacementRule(pattern2525, replacement2525) pattern2526 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2526 = ReplacementRule(pattern2526, replacement2526) pattern2527 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1269, cons1325, cons33, cons96, cons1172, cons1339) rule2527 = ReplacementRule(pattern2527, replacement2527) pattern2528 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons1269, cons1325, cons33, cons96, cons1172, cons1339) rule2528 = ReplacementRule(pattern2528, replacement2528) pattern2529 = Pattern(Integral(sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2529 = ReplacementRule(pattern2529, replacement2529) pattern2530 = Pattern(Integral(sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2530 = ReplacementRule(pattern2530, replacement2530) pattern2531 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2531 = ReplacementRule(pattern2531, replacement2531) pattern2532 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2532 = ReplacementRule(pattern2532, replacement2532) pattern2533 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1340) rule2533 = ReplacementRule(pattern2533, replacement2533) pattern2534 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1340) rule2534 = ReplacementRule(pattern2534, replacement2534) pattern2535 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1341) rule2535 = ReplacementRule(pattern2535, replacement2535) pattern2536 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1341) rule2536 = ReplacementRule(pattern2536, replacement2536) pattern2537 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1342) rule2537 = ReplacementRule(pattern2537, replacement2537) pattern2538 = Pattern(Integral(S(1)/((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1342) rule2538 = ReplacementRule(pattern2538, replacement2538) pattern2539 = Pattern(Integral(sqrt(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1343, cons1344, cons1345) rule2539 = ReplacementRule(pattern2539, replacement2539) pattern2540 = Pattern(Integral(sqrt(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1343, cons1344, cons1345) rule2540 = ReplacementRule(pattern2540, replacement2540) pattern2541 = Pattern(Integral(sqrt(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1325, cons1344) rule2541 = ReplacementRule(pattern2541, replacement2541) pattern2542 = Pattern(Integral(sqrt(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1325, cons1344) rule2542 = ReplacementRule(pattern2542, replacement2542) pattern2543 = Pattern(Integral(sqrt(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1325, cons1346) rule2543 = ReplacementRule(pattern2543, replacement2543) pattern2544 = Pattern(Integral(sqrt(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons3, cons8, cons29, cons50, cons127, cons1325, cons1346) rule2544 = ReplacementRule(pattern2544, replacement2544) pattern2545 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1347) rule2545 = ReplacementRule(pattern2545, replacement2545) pattern2546 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1347) rule2546 = ReplacementRule(pattern2546, replacement2546) pattern2547 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1348) rule2547 = ReplacementRule(pattern2547, replacement2547) pattern2548 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1348) rule2548 = ReplacementRule(pattern2548, replacement2548) pattern2549 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1349, cons1350, cons1351) rule2549 = ReplacementRule(pattern2549, replacement2549) pattern2550 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1349, cons1350, cons1351) rule2550 = ReplacementRule(pattern2550, replacement2550) pattern2551 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1349, cons1352, cons1353) rule2551 = ReplacementRule(pattern2551, replacement2551) pattern2552 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1349, cons1352, cons1353) rule2552 = ReplacementRule(pattern2552, replacement2552) pattern2553 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1273, cons1354, cons1355) rule2553 = ReplacementRule(pattern2553, replacement2553) pattern2554 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1273, cons1354, cons1355) rule2554 = ReplacementRule(pattern2554, replacement2554) pattern2555 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1354) rule2555 = ReplacementRule(pattern2555, replacement2555) pattern2556 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1354) rule2556 = ReplacementRule(pattern2556, replacement2556) pattern2557 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1356) rule2557 = ReplacementRule(pattern2557, replacement2557) pattern2558 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1356) rule2558 = ReplacementRule(pattern2558, replacement2558) pattern2559 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1357) rule2559 = ReplacementRule(pattern2559, replacement2559) pattern2560 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1357) rule2560 = ReplacementRule(pattern2560, replacement2560) pattern2561 = Pattern(Integral(S(1)/(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1358) rule2561 = ReplacementRule(pattern2561, replacement2561) pattern2562 = Pattern(Integral(S(1)/(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons1358) rule2562 = ReplacementRule(pattern2562, replacement2562) pattern2563 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2563 = ReplacementRule(pattern2563, replacement2563) pattern2564 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2564 = ReplacementRule(pattern2564, replacement2564) pattern2565 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons95, cons1359, cons1360, cons1361, cons1336) rule2565 = ReplacementRule(pattern2565, replacement2565) pattern2566 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325, cons95, cons1359, cons1360, cons1361, cons1336) rule2566 = ReplacementRule(pattern2566, replacement2566) pattern2567 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons64) rule2567 = ReplacementRule(pattern2567, replacement2567) pattern2568 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons73, cons64) rule2568 = ReplacementRule(pattern2568, replacement2568) pattern2569 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1269, cons1325) rule2569 = ReplacementRule(pattern2569, replacement2569) pattern2570 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1269, cons1325) rule2570 = ReplacementRule(pattern2570, replacement2570) pattern2571 = Pattern(Integral(((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons25) rule2571 = ReplacementRule(pattern2571, replacement2571) pattern2572 = Pattern(Integral(((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons25) rule2572 = ReplacementRule(pattern2572, replacement2572) pattern2573 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons87) rule2573 = ReplacementRule(pattern2573, replacement2573) pattern2574 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons87) rule2574 = ReplacementRule(pattern2574, replacement2574) pattern2575 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons25, cons20) rule2575 = ReplacementRule(pattern2575, replacement2575) pattern2576 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons25, cons20) rule2576 = ReplacementRule(pattern2576, replacement2576) pattern2577 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons25, cons21) rule2577 = ReplacementRule(pattern2577, replacement2577) pattern2578 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons25, cons21) rule2578 = ReplacementRule(pattern2578, replacement2578) pattern2579 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule2579 = ReplacementRule(pattern2579, replacement2579) pattern2580 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule2580 = ReplacementRule(pattern2580, replacement2580) pattern2581 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons5, cons1276, cons87, cons1363) rule2581 = ReplacementRule(pattern2581, replacement2581) pattern2582 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons5, cons1276, cons87, cons1363) rule2582 = ReplacementRule(pattern2582, replacement2582) pattern2583 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons5, cons1276, cons1267, cons87, cons1364) rule2583 = ReplacementRule(pattern2583, replacement2583) pattern2584 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons5, cons1276, cons1267, cons87, cons1364) rule2584 = ReplacementRule(pattern2584, replacement2584) pattern2585 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons50, cons127, cons8, cons29, cons19, cons4, cons1276, cons1267) rule2585 = ReplacementRule(pattern2585, replacement2585) pattern2586 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons50, cons127, cons8, cons29, cons19, cons4, cons1276, cons1267) rule2586 = ReplacementRule(pattern2586, replacement2586) pattern2587 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1276, cons1269) rule2587 = ReplacementRule(pattern2587, replacement2587) pattern2588 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1276, cons1269) rule2588 = ReplacementRule(pattern2588, replacement2588) pattern2589 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1365) rule2589 = ReplacementRule(pattern2589, replacement2589) pattern2590 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1365) rule2590 = ReplacementRule(pattern2590, replacement2590) pattern2591 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1267) rule2591 = ReplacementRule(pattern2591, replacement2591) pattern2592 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1267) rule2592 = ReplacementRule(pattern2592, replacement2592) pattern2593 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons20, cons1366) rule2593 = ReplacementRule(pattern2593, replacement2593) pattern2594 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons20, cons1366) rule2594 = ReplacementRule(pattern2594, replacement2594) pattern2595 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons72, cons1267, cons1308) rule2595 = ReplacementRule(pattern2595, replacement2595) pattern2596 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons72, cons1267, cons1308) rule2596 = ReplacementRule(pattern2596, replacement2596) pattern2597 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons72, cons1267) rule2597 = ReplacementRule(pattern2597, replacement2597) pattern2598 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons72, cons1267) rule2598 = ReplacementRule(pattern2598, replacement2598) pattern2599 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1284, cons144) rule2599 = ReplacementRule(pattern2599, replacement2599) pattern2600 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1284, cons144) rule2600 = ReplacementRule(pattern2600, replacement2600) pattern2601 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1284, cons337) rule2601 = ReplacementRule(pattern2601, replacement2601) pattern2602 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1284, cons337) rule2602 = ReplacementRule(pattern2602, replacement2602) pattern2603 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons72, cons1267, cons1286, cons89, cons91, cons1367, cons1368) rule2603 = ReplacementRule(pattern2603, replacement2603) pattern2604 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons72, cons1267, cons1286, cons89, cons91, cons1367, cons1368) rule2604 = ReplacementRule(pattern2604, replacement2604) pattern2605 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons1286, cons348, cons1369, cons1368) rule2605 = ReplacementRule(pattern2605, replacement2605) pattern2606 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons1286, cons348, cons1369, cons1368) rule2606 = ReplacementRule(pattern2606, replacement2606) pattern2607 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons72, cons1267, cons1370) rule2607 = ReplacementRule(pattern2607, replacement2607) pattern2608 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons72, cons1267, cons1370) rule2608 = ReplacementRule(pattern2608, replacement2608) pattern2609 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1371, cons1262) rule2609 = ReplacementRule(pattern2609, replacement2609) pattern2610 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1371, cons1262) rule2610 = ReplacementRule(pattern2610, replacement2610) pattern2611 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1372, cons1283, cons116) rule2611 = ReplacementRule(pattern2611, replacement2611) pattern2612 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1372, cons1283, cons116) rule2612 = ReplacementRule(pattern2612, replacement2612) pattern2613 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons72, cons1267, cons95, cons170, cons91, cons1367, cons172) rule2613 = ReplacementRule(pattern2613, replacement2613) pattern2614 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons72, cons1267, cons95, cons170, cons91, cons1367, cons172) rule2614 = ReplacementRule(pattern2614, replacement2614) pattern2615 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons33, cons170, cons1373, cons1374, cons172) rule2615 = ReplacementRule(pattern2615, replacement2615) pattern2616 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons33, cons170, cons1373, cons1374, cons172) rule2616 = ReplacementRule(pattern2616, replacement2616) pattern2617 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons33, cons96, cons1283, cons1318, cons172) rule2617 = ReplacementRule(pattern2617, replacement2617) pattern2618 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons33, cons96, cons1283, cons1318, cons172) rule2618 = ReplacementRule(pattern2618, replacement2618) pattern2619 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1319) rule2619 = ReplacementRule(pattern2619, replacement2619) pattern2620 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267, cons1319) rule2620 = ReplacementRule(pattern2620, replacement2620) pattern2621 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons1267, cons1375) rule2621 = ReplacementRule(pattern2621, replacement2621) pattern2622 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons1267, cons1375) rule2622 = ReplacementRule(pattern2622, replacement2622) pattern2623 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1267, cons246, cons1376, cons139) rule2623 = ReplacementRule(pattern2623, replacement2623) pattern2624 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1267, cons246, cons1376, cons139) rule2624 = ReplacementRule(pattern2624, replacement2624) pattern2625 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons1267, cons1377, cons255) rule2625 = ReplacementRule(pattern2625, replacement2625) pattern2626 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons1267, cons1377, cons255) rule2626 = ReplacementRule(pattern2626, replacement2626) pattern2627 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons33, cons1378) rule2627 = ReplacementRule(pattern2627, replacement2627) pattern2628 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons33, cons1378) rule2628 = ReplacementRule(pattern2628, replacement2628) pattern2629 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons33, cons1379) rule2629 = ReplacementRule(pattern2629, replacement2629) pattern2630 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1267, cons33, cons1379) rule2630 = ReplacementRule(pattern2630, replacement2630) pattern2631 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons1267, cons1380, cons1283) rule2631 = ReplacementRule(pattern2631, replacement2631) pattern2632 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons1267, cons1380, cons1283) rule2632 = ReplacementRule(pattern2632, replacement2632) pattern2633 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons1267, cons255) rule2633 = ReplacementRule(pattern2633, replacement2633) pattern2634 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons1267, cons255) rule2634 = ReplacementRule(pattern2634, replacement2634) pattern2635 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1269, cons246, cons170, cons139, cons517) rule2635 = ReplacementRule(pattern2635, replacement2635) pattern2636 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1269, cons246, cons170, cons139, cons517) rule2636 = ReplacementRule(pattern2636, replacement2636) pattern2637 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons1269, cons33, cons170, cons1381, cons517) rule2637 = ReplacementRule(pattern2637, replacement2637) pattern2638 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons1269, cons33, cons170, cons1381, cons517) rule2638 = ReplacementRule(pattern2638, replacement2638) pattern2639 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1269, cons246, cons96, cons148, cons255, cons517) rule2639 = ReplacementRule(pattern2639, replacement2639) pattern2640 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1269, cons246, cons96, cons148, cons255, cons517) rule2640 = ReplacementRule(pattern2640, replacement2640) pattern2641 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons1269, cons33, cons96, cons517) rule2641 = ReplacementRule(pattern2641, replacement2641) pattern2642 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons1269, cons33, cons96, cons517) rule2642 = ReplacementRule(pattern2642, replacement2642) pattern2643 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons1269, cons13, cons148, cons1287, cons255, cons517) rule2643 = ReplacementRule(pattern2643, replacement2643) pattern2644 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons1269, cons13, cons148, cons1287, cons255, cons517) rule2644 = ReplacementRule(pattern2644, replacement2644) pattern2645 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons1269, cons13, cons139, cons517) rule2645 = ReplacementRule(pattern2645, replacement2645) pattern2646 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons1269, cons13, cons139, cons517) rule2646 = ReplacementRule(pattern2646, replacement2646) pattern2647 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1269) rule2647 = ReplacementRule(pattern2647, replacement2647) pattern2648 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1269) rule2648 = ReplacementRule(pattern2648, replacement2648) pattern2649 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1269, cons1324) rule2649 = ReplacementRule(pattern2649, replacement2649) pattern2650 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons1269, cons1324) rule2650 = ReplacementRule(pattern2650, replacement2650) pattern2651 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons1301, cons1382) rule2651 = ReplacementRule(pattern2651, replacement2651) pattern2652 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons1301, cons1382) rule2652 = ReplacementRule(pattern2652, replacement2652) pattern2653 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons360) rule2653 = ReplacementRule(pattern2653, replacement2653) pattern2654 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons360) rule2654 = ReplacementRule(pattern2654, replacement2654) pattern2655 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1280) rule2655 = ReplacementRule(pattern2655, replacement2655) pattern2656 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1280) rule2656 = ReplacementRule(pattern2656, replacement2656) pattern2657 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1383, cons1384) rule2657 = ReplacementRule(pattern2657, replacement2657) pattern2658 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1383, cons1384) rule2658 = ReplacementRule(pattern2658, replacement2658) pattern2659 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1267, cons64) rule2659 = ReplacementRule(pattern2659, replacement2659) pattern2660 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1267, cons64) rule2660 = ReplacementRule(pattern2660, replacement2660) pattern2661 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1385) rule2661 = ReplacementRule(pattern2661, replacement2661) pattern2662 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1385) rule2662 = ReplacementRule(pattern2662, replacement2662) pattern2663 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1267, cons86) rule2663 = ReplacementRule(pattern2663, replacement2663) pattern2664 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1267, cons86) rule2664 = ReplacementRule(pattern2664, replacement2664) pattern2665 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons1267, cons20, cons13, cons1386) rule2665 = ReplacementRule(pattern2665, replacement2665) pattern2666 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons1267, cons20, cons13, cons1386) rule2666 = ReplacementRule(pattern2666, replacement2666) pattern2667 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons33, cons1387, cons1283) rule2667 = ReplacementRule(pattern2667, replacement2667) pattern2668 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1267, cons33, cons1387, cons1283) rule2668 = ReplacementRule(pattern2668, replacement2668) pattern2669 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1388) rule2669 = ReplacementRule(pattern2669, replacement2669) pattern2670 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1267, cons1388) rule2670 = ReplacementRule(pattern2670, replacement2670) pattern2671 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1172) rule2671 = ReplacementRule(pattern2671, replacement2671) pattern2672 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1172) rule2672 = ReplacementRule(pattern2672, replacement2672) pattern2673 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons33, cons96) rule2673 = ReplacementRule(pattern2673, replacement2673) pattern2674 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons33, cons96) rule2674 = ReplacementRule(pattern2674, replacement2674) pattern2675 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons145) rule2675 = ReplacementRule(pattern2675, replacement2675) pattern2676 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons145) rule2676 = ReplacementRule(pattern2676, replacement2676) pattern2677 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons1308, cons20) rule2677 = ReplacementRule(pattern2677, replacement2677) pattern2678 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons1308, cons20) rule2678 = ReplacementRule(pattern2678, replacement2678) pattern2679 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1308, cons21) rule2679 = ReplacementRule(pattern2679, replacement2679) pattern2680 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1308, cons21) rule2680 = ReplacementRule(pattern2680, replacement2680) pattern2681 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1267, cons64, cons1389) rule2681 = ReplacementRule(pattern2681, replacement2681) pattern2682 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1267, cons64, cons1389) rule2682 = ReplacementRule(pattern2682, replacement2682) pattern2683 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons5, cons1267, cons20) rule2683 = ReplacementRule(pattern2683, replacement2683) pattern2684 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons5, cons1267, cons20) rule2684 = ReplacementRule(pattern2684, replacement2684) pattern2685 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons5, cons1267, cons21) rule2685 = ReplacementRule(pattern2685, replacement2685) pattern2686 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons5, cons1267, cons21) rule2686 = ReplacementRule(pattern2686, replacement2686) pattern2687 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons33, cons96, cons1390) rule2687 = ReplacementRule(pattern2687, replacement2687) pattern2688 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons33, cons96, cons1390) rule2688 = ReplacementRule(pattern2688, replacement2688) pattern2689 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons33, cons170, cons1391) rule2689 = ReplacementRule(pattern2689, replacement2689) pattern2690 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons1269, cons33, cons170, cons1391) rule2690 = ReplacementRule(pattern2690, replacement2690) pattern2691 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1269, cons1392) rule2691 = ReplacementRule(pattern2691, replacement2691) pattern2692 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1269, cons1392) rule2692 = ReplacementRule(pattern2692, replacement2692) pattern2693 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1172, cons96, cons91) rule2693 = ReplacementRule(pattern2693, replacement2693) pattern2694 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1172, cons96, cons91) rule2694 = ReplacementRule(pattern2694, replacement2694) pattern2695 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1269, cons1172, cons96, cons1393, cons1394) rule2695 = ReplacementRule(pattern2695, replacement2695) pattern2696 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1269, cons1172, cons96, cons1393, cons1394) rule2696 = ReplacementRule(pattern2696, replacement2696) pattern2697 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1269, cons1172, cons96, cons1393, cons1395) rule2697 = ReplacementRule(pattern2697, replacement2697) pattern2698 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1269, cons1172, cons96, cons1393, cons1395) rule2698 = ReplacementRule(pattern2698, replacement2698) pattern2699 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1269, cons1392, cons1307, cons89, cons91, cons1396) rule2699 = ReplacementRule(pattern2699, replacement2699) pattern2700 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1269, cons1392, cons1307, cons89, cons91, cons1396) rule2700 = ReplacementRule(pattern2700, replacement2700) pattern2701 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1269, cons1392, cons1307, cons89, cons91, cons1395) rule2701 = ReplacementRule(pattern2701, replacement2701) pattern2702 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1269, cons1392, cons1307, cons89, cons91, cons1395) rule2702 = ReplacementRule(pattern2702, replacement2702) pattern2703 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1269, cons1392, cons1307, cons348, cons215, cons1395) rule2703 = ReplacementRule(pattern2703, replacement2703) pattern2704 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(4), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1269, cons1392, cons1307, cons348, cons215, cons1395) rule2704 = ReplacementRule(pattern2704, replacement2704) pattern2705 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(6), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1269, cons1172, cons586, cons1397, cons1398, cons1399, cons145) rule2705 = ReplacementRule(pattern2705, replacement2705) pattern2706 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(6), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1269, cons1172, cons586, cons1397, cons1398, cons1399, cons145) rule2706 = ReplacementRule(pattern2706, replacement2706) pattern2707 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1400, cons1401) rule2707 = ReplacementRule(pattern2707, replacement2707) pattern2708 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1400, cons1401) rule2708 = ReplacementRule(pattern2708, replacement2708) pattern2709 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**n_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons87, cons1402) rule2709 = ReplacementRule(pattern2709, replacement2709) pattern2710 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**n_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons1269, cons87, cons1402) rule2710 = ReplacementRule(pattern2710, replacement2710) pattern2711 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons148, cons1404) rule2711 = ReplacementRule(pattern2711, replacement2711) pattern2712 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons148, cons1404) rule2712 = ReplacementRule(pattern2712, replacement2712) pattern2713 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons148, cons1405) rule2713 = ReplacementRule(pattern2713, replacement2713) pattern2714 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons148, cons1405) rule2714 = ReplacementRule(pattern2714, replacement2714) pattern2715 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons148) rule2715 = ReplacementRule(pattern2715, replacement2715) pattern2716 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons148) rule2716 = ReplacementRule(pattern2716, replacement2716) pattern2717 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons139, cons167) rule2717 = ReplacementRule(pattern2717, replacement2717) pattern2718 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons139, cons167) rule2718 = ReplacementRule(pattern2718, replacement2718) pattern2719 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons139, cons90) rule2719 = ReplacementRule(pattern2719, replacement2719) pattern2720 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons139, cons90) rule2720 = ReplacementRule(pattern2720, replacement2720) pattern2721 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons139) rule2721 = ReplacementRule(pattern2721, replacement2721) pattern2722 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons139) rule2722 = ReplacementRule(pattern2722, replacement2722) pattern2723 = Pattern(Integral(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2723 = ReplacementRule(pattern2723, replacement2723) pattern2724 = Pattern(Integral(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons210, cons1269) rule2724 = ReplacementRule(pattern2724, replacement2724) pattern2725 = Pattern(Integral(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(d_*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269) rule2725 = ReplacementRule(pattern2725, replacement2725) pattern2726 = Pattern(Integral(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(d_*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269) rule2726 = ReplacementRule(pattern2726, replacement2726) pattern2727 = Pattern(Integral(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2727 = ReplacementRule(pattern2727, With2727) pattern2728 = Pattern(Integral(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule2728 = ReplacementRule(pattern2728, With2728) pattern2729 = Pattern(Integral(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269) rule2729 = ReplacementRule(pattern2729, replacement2729) pattern2730 = Pattern(Integral(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269) rule2730 = ReplacementRule(pattern2730, replacement2730) pattern2731 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons1406, cons90) rule2731 = ReplacementRule(pattern2731, replacement2731) pattern2732 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons1406, cons90) rule2732 = ReplacementRule(pattern2732, replacement2732) pattern2733 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons1406, cons465) rule2733 = ReplacementRule(pattern2733, replacement2733) pattern2734 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1403, cons1406, cons465) rule2734 = ReplacementRule(pattern2734, replacement2734) pattern2735 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1269, cons20, cons1407) rule2735 = ReplacementRule(pattern2735, replacement2735) pattern2736 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons4, cons5, cons1269, cons20, cons1407) rule2736 = ReplacementRule(pattern2736, replacement2736) pattern2737 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1408, cons269, cons148, cons1409) rule2737 = ReplacementRule(pattern2737, replacement2737) pattern2738 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons210, cons1269, cons1408, cons269, cons148, cons1409) rule2738 = ReplacementRule(pattern2738, replacement2738) pattern2739 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1267, cons1301, cons1382) rule2739 = ReplacementRule(pattern2739, replacement2739) pattern2740 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1267, cons1301, cons1382) rule2740 = ReplacementRule(pattern2740, replacement2740) pattern2741 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1267, cons20, cons13, cons1386) rule2741 = ReplacementRule(pattern2741, replacement2741) pattern2742 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons1267, cons20, cons13, cons1386) rule2742 = ReplacementRule(pattern2742, replacement2742) pattern2743 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1267, cons1172) rule2743 = ReplacementRule(pattern2743, replacement2743) pattern2744 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1267, cons1172) rule2744 = ReplacementRule(pattern2744, replacement2744) pattern2745 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1267, cons1308, cons20) rule2745 = ReplacementRule(pattern2745, replacement2745) pattern2746 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1267, cons1308, cons20) rule2746 = ReplacementRule(pattern2746, replacement2746) pattern2747 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1267, cons1308, cons21) rule2747 = ReplacementRule(pattern2747, replacement2747) pattern2748 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1267, cons1308, cons21) rule2748 = ReplacementRule(pattern2748, replacement2748) pattern2749 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons1267, cons64, cons1389) rule2749 = ReplacementRule(pattern2749, replacement2749) pattern2750 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons1267, cons64, cons1389) rule2750 = ReplacementRule(pattern2750, replacement2750) pattern2751 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons1267, cons20) rule2751 = ReplacementRule(pattern2751, replacement2751) pattern2752 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons1267, cons20) rule2752 = ReplacementRule(pattern2752, replacement2752) pattern2753 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons1267, cons21) rule2753 = ReplacementRule(pattern2753, replacement2753) pattern2754 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons1267, cons21) rule2754 = ReplacementRule(pattern2754, replacement2754) pattern2755 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1269, cons1392) rule2755 = ReplacementRule(pattern2755, replacement2755) pattern2756 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1269, cons1392) rule2756 = ReplacementRule(pattern2756, replacement2756) pattern2757 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1269, cons1410, cons1392) rule2757 = ReplacementRule(pattern2757, replacement2757) pattern2758 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1269, cons1410, cons1392) rule2758 = ReplacementRule(pattern2758, replacement2758) pattern2759 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons1269, cons1172) rule2759 = ReplacementRule(pattern2759, replacement2759) pattern2760 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons1269, cons1172) rule2760 = ReplacementRule(pattern2760, replacement2760) pattern2761 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons1269) rule2761 = ReplacementRule(pattern2761, replacement2761) pattern2762 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons1269) rule2762 = ReplacementRule(pattern2762, replacement2762) pattern2763 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons149) rule2763 = ReplacementRule(pattern2763, replacement2763) pattern2764 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons149) rule2764 = ReplacementRule(pattern2764, replacement2764) pattern2765 = Pattern(Integral(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1411) rule2765 = ReplacementRule(pattern2765, replacement2765) pattern2766 = Pattern(Integral(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1411) rule2766 = ReplacementRule(pattern2766, replacement2766) pattern2767 = Pattern(Integral(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1325) rule2767 = ReplacementRule(pattern2767, replacement2767) pattern2768 = Pattern(Integral(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1325) rule2768 = ReplacementRule(pattern2768, replacement2768) pattern2769 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule2769 = ReplacementRule(pattern2769, replacement2769) pattern2770 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule2770 = ReplacementRule(pattern2770, replacement2770) pattern2771 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1412, cons1413, cons107) rule2771 = ReplacementRule(pattern2771, replacement2771) pattern2772 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1412, cons1413, cons107) rule2772 = ReplacementRule(pattern2772, replacement2772) pattern2773 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1324) rule2773 = ReplacementRule(pattern2773, replacement2773) pattern2774 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1324) rule2774 = ReplacementRule(pattern2774, replacement2774) pattern2775 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1325) rule2775 = ReplacementRule(pattern2775, replacement2775) pattern2776 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1325) rule2776 = ReplacementRule(pattern2776, replacement2776) pattern2777 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule2777 = ReplacementRule(pattern2777, replacement2777) pattern2778 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule2778 = ReplacementRule(pattern2778, replacement2778) pattern2779 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule2779 = ReplacementRule(pattern2779, replacement2779) pattern2780 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule2780 = ReplacementRule(pattern2780, replacement2780) pattern2781 = Pattern(Integral(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1411) rule2781 = ReplacementRule(pattern2781, replacement2781) pattern2782 = Pattern(Integral(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1411) rule2782 = ReplacementRule(pattern2782, replacement2782) pattern2783 = Pattern(Integral(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1325) rule2783 = ReplacementRule(pattern2783, replacement2783) pattern2784 = Pattern(Integral(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1325) rule2784 = ReplacementRule(pattern2784, replacement2784) pattern2785 = Pattern(Integral(S(1)/(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1411) rule2785 = ReplacementRule(pattern2785, replacement2785) pattern2786 = Pattern(Integral(S(1)/(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1411) rule2786 = ReplacementRule(pattern2786, replacement2786) pattern2787 = Pattern(Integral(S(1)/(sqrt(WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1325) rule2787 = ReplacementRule(pattern2787, replacement2787) pattern2788 = Pattern(Integral(S(1)/(sqrt(WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269, cons1325) rule2788 = ReplacementRule(pattern2788, replacement2788) pattern2789 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule2789 = ReplacementRule(pattern2789, replacement2789) pattern2790 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule2790 = ReplacementRule(pattern2790, replacement2790) pattern2791 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule2791 = ReplacementRule(pattern2791, replacement2791) pattern2792 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule2792 = ReplacementRule(pattern2792, replacement2792) pattern2793 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons72) rule2793 = ReplacementRule(pattern2793, replacement2793) pattern2794 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons72) rule2794 = ReplacementRule(pattern2794, replacement2794) pattern2795 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1414) rule2795 = ReplacementRule(pattern2795, replacement2795) pattern2796 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1414) rule2796 = ReplacementRule(pattern2796, replacement2796) pattern2797 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1324) rule2797 = ReplacementRule(pattern2797, replacement2797) pattern2798 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1324) rule2798 = ReplacementRule(pattern2798, replacement2798) pattern2799 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2799 = ReplacementRule(pattern2799, replacement2799) pattern2800 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule2800 = ReplacementRule(pattern2800, replacement2800) pattern2801 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule2801 = ReplacementRule(pattern2801, replacement2801) pattern2802 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule2802 = ReplacementRule(pattern2802, replacement2802) pattern2803 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1415) rule2803 = ReplacementRule(pattern2803, replacement2803) pattern2804 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1415) rule2804 = ReplacementRule(pattern2804, replacement2804) pattern2805 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule2805 = ReplacementRule(pattern2805, replacement2805) pattern2806 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule2806 = ReplacementRule(pattern2806, replacement2806) pattern2807 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1415) rule2807 = ReplacementRule(pattern2807, replacement2807) pattern2808 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1415) rule2808 = ReplacementRule(pattern2808, replacement2808) pattern2809 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons72, cons1267, cons1416, cons87) rule2809 = ReplacementRule(pattern2809, replacement2809) pattern2810 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons72, cons1267, cons1416, cons87) rule2810 = ReplacementRule(pattern2810, replacement2810) pattern2811 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons1267, cons1325, cons1306) rule2811 = ReplacementRule(pattern2811, replacement2811) pattern2812 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons1267, cons1325, cons1306) rule2812 = ReplacementRule(pattern2812, replacement2812) pattern2813 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons73, cons1417, cons1418) rule2813 = ReplacementRule(pattern2813, replacement2813) pattern2814 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons73, cons1417, cons1418) rule2814 = ReplacementRule(pattern2814, replacement2814) pattern2815 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons1418) rule2815 = ReplacementRule(pattern2815, replacement2815) pattern2816 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons1418) rule2816 = ReplacementRule(pattern2816, replacement2816) pattern2817 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons73, cons149, cons20, cons87) rule2817 = ReplacementRule(pattern2817, replacement2817) pattern2818 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons73, cons149, cons20, cons87) rule2818 = ReplacementRule(pattern2818, replacement2818) pattern2819 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons149, cons1419) rule2819 = ReplacementRule(pattern2819, replacement2819) pattern2820 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons149, cons1419) rule2820 = ReplacementRule(pattern2820, replacement2820) pattern2821 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons87) rule2821 = ReplacementRule(pattern2821, replacement2821) pattern2822 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons87) rule2822 = ReplacementRule(pattern2822, replacement2822) pattern2823 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons25, cons20, cons40) rule2823 = ReplacementRule(pattern2823, replacement2823) pattern2824 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons25, cons20, cons40) rule2824 = ReplacementRule(pattern2824, replacement2824) pattern2825 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons25, cons20, cons149) rule2825 = ReplacementRule(pattern2825, replacement2825) pattern2826 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons25, cons20, cons149) rule2826 = ReplacementRule(pattern2826, replacement2826) pattern2827 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons25, cons21) rule2827 = ReplacementRule(pattern2827, replacement2827) pattern2828 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons25, cons21) rule2828 = ReplacementRule(pattern2828, replacement2828) pattern2829 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons73, cons149, cons20, cons87) rule2829 = ReplacementRule(pattern2829, replacement2829) pattern2830 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons73, cons149, cons20, cons87) rule2830 = ReplacementRule(pattern2830, replacement2830) pattern2831 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons149, cons1419) rule2831 = ReplacementRule(pattern2831, replacement2831) pattern2832 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons149, cons1419) rule2832 = ReplacementRule(pattern2832, replacement2832) pattern2833 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons20) rule2833 = ReplacementRule(pattern2833, replacement2833) pattern2834 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons20) rule2834 = ReplacementRule(pattern2834, replacement2834) pattern2835 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(S(1)/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons21, cons87, cons40) rule2835 = ReplacementRule(pattern2835, replacement2835) pattern2836 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(S(1)/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons21, cons87, cons40) rule2836 = ReplacementRule(pattern2836, replacement2836) pattern2837 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons21, cons87, cons149) rule2837 = ReplacementRule(pattern2837, replacement2837) pattern2838 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons5, cons21, cons87, cons149) rule2838 = ReplacementRule(pattern2838, replacement2838) pattern2839 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons21, cons25) rule2839 = ReplacementRule(pattern2839, replacement2839) pattern2840 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons21, cons25) rule2840 = ReplacementRule(pattern2840, replacement2840) pattern2841 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1420, cons1267, cons20, cons87) rule2841 = ReplacementRule(pattern2841, replacement2841) pattern2842 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1420, cons1267, cons20, cons87) rule2842 = ReplacementRule(pattern2842, replacement2842) pattern2843 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons72, cons1267, cons20, cons1311) rule2843 = ReplacementRule(pattern2843, replacement2843) pattern2844 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons72, cons1267, cons20, cons1311) rule2844 = ReplacementRule(pattern2844, replacement2844) pattern2845 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73) rule2845 = ReplacementRule(pattern2845, replacement2845) pattern2846 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73) rule2846 = ReplacementRule(pattern2846, replacement2846) pattern2847 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons72, cons1267) rule2847 = ReplacementRule(pattern2847, replacement2847) pattern2848 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons72, cons1267) rule2848 = ReplacementRule(pattern2848, replacement2848) pattern2849 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons72, cons1267, cons1421, cons1316) rule2849 = ReplacementRule(pattern2849, replacement2849) pattern2850 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons72, cons1267, cons1421, cons1316) rule2850 = ReplacementRule(pattern2850, replacement2850) pattern2851 = Pattern(Integral((c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons72, cons1267) rule2851 = ReplacementRule(pattern2851, replacement2851) pattern2852 = Pattern(Integral((c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons72, cons1267) rule2852 = ReplacementRule(pattern2852, replacement2852) pattern2853 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons72, cons1267, cons1422, cons1423) rule2853 = ReplacementRule(pattern2853, replacement2853) pattern2854 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons72, cons1267, cons1422, cons1423) rule2854 = ReplacementRule(pattern2854, replacement2854) pattern2855 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons72, cons1267, cons1323, cons685) rule2855 = ReplacementRule(pattern2855, replacement2855) pattern2856 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons72, cons1267, cons1323, cons685) rule2856 = ReplacementRule(pattern2856, replacement2856) pattern2857 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1267, cons1325, cons74, cons1424) rule2857 = ReplacementRule(pattern2857, replacement2857) pattern2858 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1267, cons1325, cons74, cons1424) rule2858 = ReplacementRule(pattern2858, replacement2858) pattern2859 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325, cons95, cons1425, cons91, cons517, cons1330) rule2859 = ReplacementRule(pattern2859, replacement2859) pattern2860 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325, cons95, cons1425, cons91, cons517, cons1330) rule2860 = ReplacementRule(pattern2860, replacement2860) pattern2861 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1267, cons1325, cons33, cons1425, cons348, cons517, cons1330) rule2861 = ReplacementRule(pattern2861, replacement2861) pattern2862 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1267, cons1325, cons33, cons1425, cons348, cons517, cons1330) rule2862 = ReplacementRule(pattern2862, replacement2862) pattern2863 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325, cons95, cons1322, cons90, cons517, cons1330) rule2863 = ReplacementRule(pattern2863, replacement2863) pattern2864 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325, cons95, cons1322, cons90, cons517, cons1330) rule2864 = ReplacementRule(pattern2864, replacement2864) pattern2865 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1267, cons1325, cons33, cons1322, cons1329, cons517, cons1330) rule2865 = ReplacementRule(pattern2865, replacement2865) pattern2866 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1267, cons1325, cons33, cons1322, cons1329, cons517, cons1330) rule2866 = ReplacementRule(pattern2866, replacement2866) pattern2867 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1267, cons1325, cons1426) rule2867 = ReplacementRule(pattern2867, replacement2867) pattern2868 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1267, cons1325, cons1426) rule2868 = ReplacementRule(pattern2868, replacement2868) pattern2869 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325, cons89, cons91) rule2869 = ReplacementRule(pattern2869, replacement2869) pattern2870 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325, cons89, cons91) rule2870 = ReplacementRule(pattern2870, replacement2870) pattern2871 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1267, cons1325, cons348) rule2871 = ReplacementRule(pattern2871, replacement2871) pattern2872 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1267, cons1325, cons348) rule2872 = ReplacementRule(pattern2872, replacement2872) pattern2873 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325) rule2873 = ReplacementRule(pattern2873, replacement2873) pattern2874 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325) rule2874 = ReplacementRule(pattern2874, replacement2874) pattern2875 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1267, cons1325, cons89, cons90, cons1427) rule2875 = ReplacementRule(pattern2875, replacement2875) pattern2876 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1267, cons1325, cons89, cons90, cons1427) rule2876 = ReplacementRule(pattern2876, replacement2876) pattern2877 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1267, cons1325, cons89, cons91, cons1427) rule2877 = ReplacementRule(pattern2877, replacement2877) pattern2878 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1267, cons1325, cons89, cons91, cons1427) rule2878 = ReplacementRule(pattern2878, replacement2878) pattern2879 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325) rule2879 = ReplacementRule(pattern2879, replacement2879) pattern2880 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1267, cons1325) rule2880 = ReplacementRule(pattern2880, replacement2880) pattern2881 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1267, cons1325, cons1316) rule2881 = ReplacementRule(pattern2881, replacement2881) pattern2882 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1267, cons1325, cons1316) rule2882 = ReplacementRule(pattern2882, replacement2882) pattern2883 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1267, cons1325, cons1428) rule2883 = ReplacementRule(pattern2883, replacement2883) pattern2884 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1267, cons1325, cons1428) rule2884 = ReplacementRule(pattern2884, replacement2884) pattern2885 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons95, cons168, cons91) rule2885 = ReplacementRule(pattern2885, replacement2885) pattern2886 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons95, cons168, cons91) rule2886 = ReplacementRule(pattern2886, replacement2886) pattern2887 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1269, cons1325, cons33, cons168, cons1429) rule2887 = ReplacementRule(pattern2887, replacement2887) pattern2888 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1269, cons1325, cons33, cons168, cons1429) rule2888 = ReplacementRule(pattern2888, replacement2888) pattern2889 = Pattern(Integral(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1325) rule2889 = ReplacementRule(pattern2889, replacement2889) pattern2890 = Pattern(Integral(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1325) rule2890 = ReplacementRule(pattern2890, replacement2890) pattern2891 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325) rule2891 = ReplacementRule(pattern2891, replacement2891) pattern2892 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325) rule2892 = ReplacementRule(pattern2892, replacement2892) pattern2893 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1269) rule2893 = ReplacementRule(pattern2893, replacement2893) pattern2894 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1269) rule2894 = ReplacementRule(pattern2894, replacement2894) pattern2895 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1325, cons1430, cons1344) rule2895 = ReplacementRule(pattern2895, replacement2895) pattern2896 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1325, cons1430, cons1344) rule2896 = ReplacementRule(pattern2896, replacement2896) pattern2897 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1325, cons1430, cons1346) rule2897 = ReplacementRule(pattern2897, replacement2897) pattern2898 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1325, cons1430, cons1346) rule2898 = ReplacementRule(pattern2898, replacement2898) pattern2899 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons1430, cons1347) rule2899 = ReplacementRule(pattern2899, replacement2899) pattern2900 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons1430, cons1347) rule2900 = ReplacementRule(pattern2900, replacement2900) pattern2901 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons1430, cons1348) rule2901 = ReplacementRule(pattern2901, replacement2901) pattern2902 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons1430, cons1348) rule2902 = ReplacementRule(pattern2902, replacement2902) pattern2903 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons1431) rule2903 = ReplacementRule(pattern2903, replacement2903) pattern2904 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons1431) rule2904 = ReplacementRule(pattern2904, replacement2904) pattern2905 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons95, cons96, cons90) rule2905 = ReplacementRule(pattern2905, replacement2905) pattern2906 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons95, cons96, cons90) rule2906 = ReplacementRule(pattern2906, replacement2906) pattern2907 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1269, cons1325, cons33, cons96, cons1339) rule2907 = ReplacementRule(pattern2907, replacement2907) pattern2908 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons73, cons1269, cons1325, cons33, cons96, cons1339) rule2908 = ReplacementRule(pattern2908, replacement2908) pattern2909 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325) rule2909 = ReplacementRule(pattern2909, replacement2909) pattern2910 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325) rule2910 = ReplacementRule(pattern2910, replacement2910) pattern2911 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1269, cons1325) rule2911 = ReplacementRule(pattern2911, replacement2911) pattern2912 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons73, cons1269, cons1325) rule2912 = ReplacementRule(pattern2912, replacement2912) pattern2913 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons89, cons1432) rule2913 = ReplacementRule(pattern2913, replacement2913) pattern2914 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons89, cons1432) rule2914 = ReplacementRule(pattern2914, replacement2914) pattern2915 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons107, cons1413, cons1430) rule2915 = ReplacementRule(pattern2915, replacement2915) pattern2916 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons107, cons1413, cons1430) rule2916 = ReplacementRule(pattern2916, replacement2916) pattern2917 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(d_*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons29, cons36, cons37, cons107, cons1413, cons1430) rule2917 = ReplacementRule(pattern2917, replacement2917) pattern2918 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(d_*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons50, cons127, cons29, cons36, cons37, cons107, cons1413, cons1430) rule2918 = ReplacementRule(pattern2918, replacement2918) pattern2919 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325) rule2919 = ReplacementRule(pattern2919, replacement2919) pattern2920 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325) rule2920 = ReplacementRule(pattern2920, replacement2920) pattern2921 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1269, cons1325) rule2921 = ReplacementRule(pattern2921, replacement2921) pattern2922 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons73, cons1269, cons1325) rule2922 = ReplacementRule(pattern2922, replacement2922) pattern2923 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons5, cons72, cons1267) rule2923 = ReplacementRule(pattern2923, replacement2923) pattern2924 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons5, cons72, cons1267) rule2924 = ReplacementRule(pattern2924, replacement2924) pattern2925 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons37, cons38, cons19, cons1433) rule2925 = ReplacementRule(pattern2925, replacement2925) pattern2926 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons37, cons38, cons19, cons1433) rule2926 = ReplacementRule(pattern2926, replacement2926) pattern2927 = Pattern(Integral((A_ + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons50, cons127, cons36, cons38, cons1230) rule2927 = ReplacementRule(pattern2927, replacement2927) pattern2928 = Pattern(Integral((A_ + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons50, cons127, cons36, cons38, cons1230) rule2928 = ReplacementRule(pattern2928, replacement2928) pattern2929 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(A_ + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons1434) rule2929 = ReplacementRule(pattern2929, replacement2929) pattern2930 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(A_ + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons1434) rule2930 = ReplacementRule(pattern2930, replacement2930) pattern2931 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(A_ + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons33, cons96) rule2931 = ReplacementRule(pattern2931, replacement2931) pattern2932 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(A_ + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons33, cons96) rule2932 = ReplacementRule(pattern2932, replacement2932) pattern2933 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons274) rule2933 = ReplacementRule(pattern2933, replacement2933) pattern2934 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons274) rule2934 = ReplacementRule(pattern2934, replacement2934) pattern2935 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons35) rule2935 = ReplacementRule(pattern2935, replacement2935) pattern2936 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons35) rule2936 = ReplacementRule(pattern2936, replacement2936) pattern2937 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1435) rule2937 = ReplacementRule(pattern2937, replacement2937) pattern2938 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1435) rule2938 = ReplacementRule(pattern2938, replacement2938) pattern2939 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1436, cons79) rule2939 = ReplacementRule(pattern2939, replacement2939) pattern2940 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1436, cons79) rule2940 = ReplacementRule(pattern2940, replacement2940) pattern2941 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1437, cons79) rule2941 = ReplacementRule(pattern2941, replacement2941) pattern2942 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1437, cons79) rule2942 = ReplacementRule(pattern2942, replacement2942) pattern2943 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons33, cons96, cons1267) rule2943 = ReplacementRule(pattern2943, replacement2943) pattern2944 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons33, cons96, cons1267) rule2944 = ReplacementRule(pattern2944, replacement2944) pattern2945 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons33, cons96, cons1267) rule2945 = ReplacementRule(pattern2945, replacement2945) pattern2946 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons33, cons96, cons1267) rule2946 = ReplacementRule(pattern2946, replacement2946) pattern2947 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons33, cons96, cons1269) rule2947 = ReplacementRule(pattern2947, replacement2947) pattern2948 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons33, cons96, cons1269) rule2948 = ReplacementRule(pattern2948, replacement2948) pattern2949 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons33, cons96, cons1269) rule2949 = ReplacementRule(pattern2949, replacement2949) pattern2950 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons33, cons96, cons1269) rule2950 = ReplacementRule(pattern2950, replacement2950) pattern2951 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons274) rule2951 = ReplacementRule(pattern2951, replacement2951) pattern2952 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons274) rule2952 = ReplacementRule(pattern2952, replacement2952) pattern2953 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons274) rule2953 = ReplacementRule(pattern2953, replacement2953) pattern2954 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons274) rule2954 = ReplacementRule(pattern2954, replacement2954) pattern2955 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_)**m_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons5, cons21) rule2955 = ReplacementRule(pattern2955, replacement2955) pattern2956 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_)**m_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons5, cons21) rule2956 = ReplacementRule(pattern2956, replacement2956) pattern2957 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_)**m_*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons5, cons21) rule2957 = ReplacementRule(pattern2957, replacement2957) pattern2958 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_)**m_*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons5, cons21) rule2958 = ReplacementRule(pattern2958, replacement2958) pattern2959 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons33, cons96) rule2959 = ReplacementRule(pattern2959, replacement2959) pattern2960 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons33, cons96) rule2960 = ReplacementRule(pattern2960, replacement2960) pattern2961 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons33, cons96) rule2961 = ReplacementRule(pattern2961, replacement2961) pattern2962 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons33, cons96) rule2962 = ReplacementRule(pattern2962, replacement2962) pattern2963 = Pattern(Integral((c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons73, cons1269, cons274) rule2963 = ReplacementRule(pattern2963, replacement2963) pattern2964 = Pattern(Integral((c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons73, cons1269, cons274) rule2964 = ReplacementRule(pattern2964, replacement2964) pattern2965 = Pattern(Integral((c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons73, cons1269, cons274) rule2965 = ReplacementRule(pattern2965, replacement2965) pattern2966 = Pattern(Integral((c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons73, cons1269, cons274) rule2966 = ReplacementRule(pattern2966, replacement2966) pattern2967 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons72, cons1267, cons1438) rule2967 = ReplacementRule(pattern2967, replacement2967) pattern2968 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons72, cons1267, cons1438) rule2968 = ReplacementRule(pattern2968, replacement2968) pattern2969 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons72, cons1267, cons1438) rule2969 = ReplacementRule(pattern2969, replacement2969) pattern2970 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons72, cons1267, cons1438) rule2970 = ReplacementRule(pattern2970, replacement2970) pattern2971 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons72, cons1267, cons1323) rule2971 = ReplacementRule(pattern2971, replacement2971) pattern2972 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons72, cons1267, cons1323) rule2972 = ReplacementRule(pattern2972, replacement2972) pattern2973 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))/sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons72, cons1267, cons1323) rule2973 = ReplacementRule(pattern2973, replacement2973) pattern2974 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))/sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons72, cons1267, cons1323) rule2974 = ReplacementRule(pattern2974, replacement2974) pattern2975 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons72, cons1267, cons1323, cons216) rule2975 = ReplacementRule(pattern2975, replacement2975) pattern2976 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons72, cons1267, cons1323, cons216) rule2976 = ReplacementRule(pattern2976, replacement2976) pattern2977 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons72, cons1267, cons1323, cons216) rule2977 = ReplacementRule(pattern2977, replacement2977) pattern2978 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons72, cons1267, cons1323, cons216) rule2978 = ReplacementRule(pattern2978, replacement2978) pattern2979 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1267, cons1325, cons33, cons1322) rule2979 = ReplacementRule(pattern2979, replacement2979) pattern2980 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1267, cons1325, cons33, cons1322) rule2980 = ReplacementRule(pattern2980, replacement2980) pattern2981 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1267, cons1325, cons33, cons1322) rule2981 = ReplacementRule(pattern2981, replacement2981) pattern2982 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1267, cons1325, cons33, cons1322) rule2982 = ReplacementRule(pattern2982, replacement2982) pattern2983 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons73, cons1267, cons1325, cons1323, cons1439) rule2983 = ReplacementRule(pattern2983, replacement2983) pattern2984 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons73, cons1267, cons1325, cons1323, cons1439) rule2984 = ReplacementRule(pattern2984, replacement2984) pattern2985 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons73, cons1267, cons1325, cons1323, cons1439) rule2985 = ReplacementRule(pattern2985, replacement2985) pattern2986 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons73, cons1267, cons1325, cons1323, cons1439) rule2986 = ReplacementRule(pattern2986, replacement2986) pattern2987 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons73, cons1267, cons1325, cons1323, cons216) rule2987 = ReplacementRule(pattern2987, replacement2987) pattern2988 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons73, cons1267, cons1325, cons1323, cons216) rule2988 = ReplacementRule(pattern2988, replacement2988) pattern2989 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons73, cons1267, cons1325, cons1323, cons216) rule2989 = ReplacementRule(pattern2989, replacement2989) pattern2990 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons73, cons1267, cons1325, cons1323, cons216) rule2990 = ReplacementRule(pattern2990, replacement2990) pattern2991 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325, cons95, cons170, cons91) rule2991 = ReplacementRule(pattern2991, replacement2991) pattern2992 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325, cons95, cons170, cons91) rule2992 = ReplacementRule(pattern2992, replacement2992) pattern2993 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325, cons95, cons170, cons91) rule2993 = ReplacementRule(pattern2993, replacement2993) pattern2994 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325, cons95, cons170, cons91) rule2994 = ReplacementRule(pattern2994, replacement2994) pattern2995 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1269, cons1325, cons33, cons170, cons1440) rule2995 = ReplacementRule(pattern2995, replacement2995) pattern2996 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1269, cons1325, cons33, cons170, cons1440) rule2996 = ReplacementRule(pattern2996, replacement2996) pattern2997 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1269, cons1325, cons33, cons170, cons1440) rule2997 = ReplacementRule(pattern2997, replacement2997) pattern2998 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1269, cons1325, cons33, cons170, cons1440) rule2998 = ReplacementRule(pattern2998, replacement2998) pattern2999 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269) rule2999 = ReplacementRule(pattern2999, replacement2999) pattern3000 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269) rule3000 = ReplacementRule(pattern3000, replacement3000) pattern3001 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269) rule3001 = ReplacementRule(pattern3001, replacement3001) pattern3002 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269) rule3002 = ReplacementRule(pattern3002, replacement3002) pattern3003 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325) rule3003 = ReplacementRule(pattern3003, replacement3003) pattern3004 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325) rule3004 = ReplacementRule(pattern3004, replacement3004) pattern3005 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325) rule3005 = ReplacementRule(pattern3005, replacement3005) pattern3006 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325) rule3006 = ReplacementRule(pattern3006, replacement3006) pattern3007 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1269, cons1325, cons33, cons96, cons1339) rule3007 = ReplacementRule(pattern3007, replacement3007) pattern3008 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons73, cons1269, cons1325, cons33, cons96, cons1339) rule3008 = ReplacementRule(pattern3008, replacement3008) pattern3009 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1269, cons1325, cons33, cons96, cons1339) rule3009 = ReplacementRule(pattern3009, replacement3009) pattern3010 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons4, cons73, cons1269, cons1325, cons33, cons96, cons1339) rule3010 = ReplacementRule(pattern3010, replacement3010) pattern3011 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325) rule3011 = ReplacementRule(pattern3011, replacement3011) pattern3012 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325) rule3012 = ReplacementRule(pattern3012, replacement3012) pattern3013 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325) rule3013 = ReplacementRule(pattern3013, replacement3013) pattern3014 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325) rule3014 = ReplacementRule(pattern3014, replacement3014) pattern3015 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325) rule3015 = ReplacementRule(pattern3015, replacement3015) pattern3016 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325) rule3016 = ReplacementRule(pattern3016, replacement3016) pattern3017 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325) rule3017 = ReplacementRule(pattern3017, replacement3017) pattern3018 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325) rule3018 = ReplacementRule(pattern3018, replacement3018) pattern3019 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325) rule3019 = ReplacementRule(pattern3019, replacement3019) pattern3020 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons73, cons1269, cons1325) rule3020 = ReplacementRule(pattern3020, replacement3020) pattern3021 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(c_ + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325) rule3021 = ReplacementRule(pattern3021, replacement3021) pattern3022 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(c_ + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons73, cons1269, cons1325) rule3022 = ReplacementRule(pattern3022, replacement3022) pattern3023 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons73, cons1269, cons1325) rule3023 = ReplacementRule(pattern3023, replacement3023) pattern3024 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons73, cons1269, cons1325) rule3024 = ReplacementRule(pattern3024, replacement3024) pattern3025 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons73, cons1269, cons1325) rule3025 = ReplacementRule(pattern3025, replacement3025) pattern3026 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons73, cons1269, cons1325) rule3026 = ReplacementRule(pattern3026, replacement3026) pattern3027 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_)**m_*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons21) rule3027 = ReplacementRule(pattern3027, replacement3027) pattern3028 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_)**m_*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons21) rule3028 = ReplacementRule(pattern3028, replacement3028) pattern3029 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**p_)**m_*(WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons5, cons21) rule3029 = ReplacementRule(pattern3029, replacement3029) pattern3030 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**p_)**m_*(WC('A', S(0)) + WC('C', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))*(WC('c', S(0)) + WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons5, cons21) rule3030 = ReplacementRule(pattern3030, replacement3030) pattern3031 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1441) rule3031 = ReplacementRule(pattern3031, replacement3031) pattern3032 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1442, cons523) rule3032 = ReplacementRule(pattern3032, replacement3032) pattern3033 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1442, cons1443, cons89, cons167) rule3033 = ReplacementRule(pattern3033, replacement3033) pattern3034 = Pattern(Integral(S(1)/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442) rule3034 = ReplacementRule(pattern3034, replacement3034) pattern3035 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**(S(-2)), x_), cons2, cons3, cons8, cons29, cons1442) rule3035 = ReplacementRule(pattern3035, replacement3035) pattern3036 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1442, cons89, cons91, cons1444) rule3036 = ReplacementRule(pattern3036, replacement3036) pattern3037 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1445, cons1446) rule3037 = ReplacementRule(pattern3037, replacement3037) pattern3038 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1445, cons1447) rule3038 = ReplacementRule(pattern3038, replacement3038) pattern3039 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1257, cons1441, cons89, cons167) rule3039 = ReplacementRule(pattern3039, replacement3039) pattern3040 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1257, cons1441, cons89, cons167) rule3040 = ReplacementRule(pattern3040, replacement3040) pattern3041 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1257, cons1441, cons89, cons465) rule3041 = ReplacementRule(pattern3041, replacement3041) pattern3042 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1257, cons1441, cons89, cons465) rule3042 = ReplacementRule(pattern3042, replacement3042) pattern3043 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1257, cons1441, cons25) rule3043 = ReplacementRule(pattern3043, replacement3043) pattern3044 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1257, cons1441, cons25) rule3044 = ReplacementRule(pattern3044, replacement3044) pattern3045 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1257, cons87, cons1442) rule3045 = ReplacementRule(pattern3045, replacement3045) pattern3046 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1257, cons87, cons1442) rule3046 = ReplacementRule(pattern3046, replacement3046) pattern3047 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons87, cons1448, cons1154, cons1449) rule3047 = ReplacementRule(pattern3047, replacement3047) pattern3048 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons87, cons1448, cons1154, cons1449) rule3048 = ReplacementRule(pattern3048, replacement3048) pattern3049 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons20, cons150) rule3049 = ReplacementRule(pattern3049, replacement3049) pattern3050 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons20, cons150) rule3050 = ReplacementRule(pattern3050, replacement3050) pattern3051 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons1441, cons198) rule3051 = ReplacementRule(pattern3051, replacement3051) pattern3052 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons1441, cons198) rule3052 = ReplacementRule(pattern3052, replacement3052) pattern3053 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_/sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1442, cons89, cons91) rule3053 = ReplacementRule(pattern3053, replacement3053) pattern3054 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_/cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1442, cons89, cons91) rule3054 = ReplacementRule(pattern3054, replacement3054) pattern3055 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1442, cons95, cons167, cons96) rule3055 = ReplacementRule(pattern3055, replacement3055) pattern3056 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1442, cons95, cons167, cons96) rule3056 = ReplacementRule(pattern3056, replacement3056) pattern3057 = Pattern(Integral(sin(x_*WC('d', S(1)) + WC('c', S(0)))/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442) rule3057 = ReplacementRule(pattern3057, replacement3057) pattern3058 = Pattern(Integral(cos(x_*WC('d', S(1)) + WC('c', S(0)))/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442) rule3058 = ReplacementRule(pattern3058, replacement3058) pattern3059 = Pattern(Integral(sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442, cons33, cons168) rule3059 = ReplacementRule(pattern3059, replacement3059) pattern3060 = Pattern(Integral(cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442, cons33, cons168) rule3060 = ReplacementRule(pattern3060, replacement3060) pattern3061 = Pattern(Integral(S(1)/((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442) rule3061 = ReplacementRule(pattern3061, replacement3061) pattern3062 = Pattern(Integral(S(1)/((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442) rule3062 = ReplacementRule(pattern3062, replacement3062) pattern3063 = Pattern(Integral(sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442, cons33, cons96) rule3063 = ReplacementRule(pattern3063, replacement3063) pattern3064 = Pattern(Integral(cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442, cons33, cons96) rule3064 = ReplacementRule(pattern3064, replacement3064) pattern3065 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1442, cons95, cons91, cons96) rule3065 = ReplacementRule(pattern3065, replacement3065) pattern3066 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1442, cons95, cons91, cons96) rule3066 = ReplacementRule(pattern3066, replacement3066) pattern3067 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons130) rule3067 = ReplacementRule(pattern3067, replacement3067) pattern3068 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1441, cons65) rule3068 = ReplacementRule(pattern3068, replacement3068) pattern3069 = Pattern(Integral(sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1442, cons152, cons170, cons90) rule3069 = ReplacementRule(pattern3069, replacement3069) pattern3070 = Pattern(Integral(sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons152) rule3070 = ReplacementRule(pattern3070, replacement3070) pattern3071 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1442, cons377, cons170, cons90, cons324) rule3071 = ReplacementRule(pattern3071, replacement3071) pattern3072 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1450) rule3072 = ReplacementRule(pattern3072, replacement3072) pattern3073 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1450, cons89, cons90) rule3073 = ReplacementRule(pattern3073, replacement3073) pattern3074 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1450) rule3074 = ReplacementRule(pattern3074, replacement3074) pattern3075 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1450) rule3075 = ReplacementRule(pattern3075, replacement3075) pattern3076 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1450, cons89, cons91) rule3076 = ReplacementRule(pattern3076, replacement3076) pattern3077 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1451) rule3077 = ReplacementRule(pattern3077, replacement3077) pattern3078 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1452, cons1453) rule3078 = ReplacementRule(pattern3078, replacement3078) pattern3079 = Pattern(Integral(sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1454, cons1452, cons1455) rule3079 = ReplacementRule(pattern3079, replacement3079) pattern3080 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1454, cons89, cons167) rule3080 = ReplacementRule(pattern3080, replacement3080) pattern3081 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1456) rule3081 = ReplacementRule(pattern3081, With3081) pattern3082 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons78) rule3082 = ReplacementRule(pattern3082, With3082) pattern3083 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1457, cons1458) rule3083 = ReplacementRule(pattern3083, With3083) pattern3084 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1454) rule3084 = ReplacementRule(pattern3084, With3084) pattern3085 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1451) rule3085 = ReplacementRule(pattern3085, replacement3085) pattern3086 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1452, cons1453) rule3086 = ReplacementRule(pattern3086, replacement3086) pattern3087 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1454, cons1452, cons1455) rule3087 = ReplacementRule(pattern3087, replacement3087) pattern3088 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**(S(-3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons1454) rule3088 = ReplacementRule(pattern3088, replacement3088) pattern3089 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons1454, cons89, cons91, cons1459) rule3089 = ReplacementRule(pattern3089, replacement3089) pattern3090 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1451) rule3090 = ReplacementRule(pattern3090, replacement3090) pattern3091 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons1451) rule3091 = ReplacementRule(pattern3091, replacement3091) pattern3092 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))/(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons1451) rule3092 = ReplacementRule(pattern3092, replacement3092) pattern3093 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1452, cons1460) rule3093 = ReplacementRule(pattern3093, replacement3093) pattern3094 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons1452, cons1461) rule3094 = ReplacementRule(pattern3094, replacement3094) pattern3095 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons1452, cons1462) rule3095 = ReplacementRule(pattern3095, replacement3095) pattern3096 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1452, cons1463) rule3096 = ReplacementRule(pattern3096, replacement3096) pattern3097 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons1452, cons1464) rule3097 = ReplacementRule(pattern3097, replacement3097) pattern3098 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons1452, cons1465) rule3098 = ReplacementRule(pattern3098, replacement3098) pattern3099 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons4, cons586, cons1450, cons1466) rule3099 = ReplacementRule(pattern3099, replacement3099) pattern3100 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons4, cons586, cons1450, cons1467) rule3100 = ReplacementRule(pattern3100, replacement3100) pattern3101 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons4, cons586, cons1450, cons1468) rule3101 = ReplacementRule(pattern3101, replacement3101) pattern3102 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons4, cons586, cons1450, cons1469) rule3102 = ReplacementRule(pattern3102, replacement3102) pattern3103 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons4, cons586, cons1450, cons1470) rule3103 = ReplacementRule(pattern3103, replacement3103) pattern3104 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons4, cons586, cons1450, cons1471) rule3104 = ReplacementRule(pattern3104, replacement3104) pattern3105 = Pattern(Integral((WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons3, cons8, cons29, cons50, cons37, cons38, cons586, cons1452, cons1472) rule3105 = ReplacementRule(pattern3105, replacement3105) pattern3106 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons89, cons90, cons1454) rule3106 = ReplacementRule(pattern3106, replacement3106) pattern3107 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons89, cons90, cons1454) rule3107 = ReplacementRule(pattern3107, replacement3107) pattern3108 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons89, cons90, cons1454) rule3108 = ReplacementRule(pattern3108, replacement3108) pattern3109 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/sqrt(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1473, cons1247) rule3109 = ReplacementRule(pattern3109, replacement3109) pattern3110 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1454, cons1474) rule3110 = ReplacementRule(pattern3110, replacement3110) pattern3111 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons1454, cons1475) rule3111 = ReplacementRule(pattern3111, replacement3111) pattern3112 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons1454, cons1476) rule3112 = ReplacementRule(pattern3112, replacement3112) pattern3113 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1454, cons1477) rule3113 = ReplacementRule(pattern3113, replacement3113) pattern3114 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons1454, cons1478) rule3114 = ReplacementRule(pattern3114, replacement3114) pattern3115 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons1454, cons1479) rule3115 = ReplacementRule(pattern3115, replacement3115) pattern3116 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons89, cons91, cons1454, cons1444) rule3116 = ReplacementRule(pattern3116, replacement3116) pattern3117 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons89, cons91, cons1454, cons1444) rule3117 = ReplacementRule(pattern3117, replacement3117) pattern3118 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons89, cons91, cons1454, cons1444) rule3118 = ReplacementRule(pattern3118, replacement3118) pattern3119 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule3119 = ReplacementRule(pattern3119, replacement3119) pattern3120 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule3120 = ReplacementRule(pattern3120, replacement3120) pattern3121 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons87) rule3121 = ReplacementRule(pattern3121, replacement3121) pattern3122 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons87) rule3122 = ReplacementRule(pattern3122, replacement3122) pattern3123 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**n_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons25) rule3123 = ReplacementRule(pattern3123, replacement3123) pattern3124 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**n_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons25) rule3124 = ReplacementRule(pattern3124, replacement3124) pattern3125 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**m_*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1257, cons87) rule3125 = ReplacementRule(pattern3125, replacement3125) pattern3126 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**m_*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1257, cons87) rule3126 = ReplacementRule(pattern3126, replacement3126) pattern3127 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0))))**m_*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1257, cons25) rule3127 = ReplacementRule(pattern3127, replacement3127) pattern3128 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0))))**m_*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons1257, cons25) rule3128 = ReplacementRule(pattern3128, replacement3128) pattern3129 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons3, cons8, cons29, cons13, cons148) rule3129 = ReplacementRule(pattern3129, replacement3129) pattern3130 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons3, cons8, cons29, cons13, cons148) rule3130 = ReplacementRule(pattern3130, replacement3130) pattern3131 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons3, cons8, cons29, cons13, cons139) rule3131 = ReplacementRule(pattern3131, replacement3131) pattern3132 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons3, cons8, cons29, cons13, cons139) rule3132 = ReplacementRule(pattern3132, replacement3132) pattern3133 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons1456, cons40) rule3133 = ReplacementRule(pattern3133, replacement3133) pattern3134 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons1456, cons40) rule3134 = ReplacementRule(pattern3134, replacement3134) pattern3135 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1456, cons149) rule3135 = ReplacementRule(pattern3135, replacement3135) pattern3136 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1456, cons149) rule3136 = ReplacementRule(pattern3136, replacement3136) pattern3137 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons40) rule3137 = ReplacementRule(pattern3137, With3137) pattern3138 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons40) rule3138 = ReplacementRule(pattern3138, With3138) pattern3139 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1480, cons149) rule3139 = ReplacementRule(pattern3139, replacement3139) pattern3140 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1480, cons149) rule3140 = ReplacementRule(pattern3140, replacement3140) pattern3141 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_, x_), cons2, cons3, cons8, cons29, cons87, cons130) rule3141 = ReplacementRule(pattern3141, replacement3141) pattern3142 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_, x_), cons2, cons3, cons8, cons29, cons87, cons130) rule3142 = ReplacementRule(pattern3142, replacement3142) pattern3143 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_, x_), cons2, cons3, cons8, cons29, cons1481, cons40, cons139) rule3143 = ReplacementRule(pattern3143, With3143) pattern3144 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_, x_), cons2, cons3, cons8, cons29, cons1481, cons40, cons139) rule3144 = ReplacementRule(pattern3144, With3144) pattern3145 = Pattern(Integral(u_*(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons1456, cons40) rule3145 = ReplacementRule(pattern3145, replacement3145) pattern3146 = Pattern(Integral(u_*(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons1456, cons40) rule3146 = ReplacementRule(pattern3146, replacement3146) pattern3147 = Pattern(Integral(u_*(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1456, cons149) rule3147 = ReplacementRule(pattern3147, replacement3147) pattern3148 = Pattern(Integral(u_*(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1456, cons149) rule3148 = ReplacementRule(pattern3148, replacement3148) pattern3149 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1481, cons1482, cons40) rule3149 = ReplacementRule(pattern3149, With3149) pattern3150 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1481, cons1482, cons40) rule3150 = ReplacementRule(pattern3150, With3150) pattern3151 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1481, cons1483) rule3151 = ReplacementRule(pattern3151, With3151) pattern3152 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1481, cons1483) rule3152 = ReplacementRule(pattern3152, With3152) pattern3153 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons377) rule3153 = ReplacementRule(pattern3153, replacement3153) pattern3154 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons377) rule3154 = ReplacementRule(pattern3154, replacement3154) pattern3155 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1482, cons1481, cons40) rule3155 = ReplacementRule(pattern3155, With3155) pattern3156 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1482, cons1481, cons40) rule3156 = ReplacementRule(pattern3156, With3156) pattern3157 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1482, cons1484, cons40, cons170) rule3157 = ReplacementRule(pattern3157, replacement3157) pattern3158 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1482, cons1484, cons40, cons170) rule3158 = ReplacementRule(pattern3158, replacement3158) pattern3159 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1482, cons1484, cons40, cons269, cons139) rule3159 = ReplacementRule(pattern3159, replacement3159) pattern3160 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons1482, cons1484, cons40, cons269, cons139) rule3160 = ReplacementRule(pattern3160, replacement3160) pattern3161 = Pattern(Integral((a_ + (WC('e', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1483) rule3161 = ReplacementRule(pattern3161, With3161) pattern3162 = Pattern(Integral((a_ + (WC('e', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1483) rule3162 = ReplacementRule(pattern3162, With3162) pattern3163 = Pattern(Integral((a_ + (WC('e', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1483, cons248) rule3163 = ReplacementRule(pattern3163, With3163) pattern3164 = Pattern(Integral((a_ + (WC('e', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1483, cons248) rule3164 = ReplacementRule(pattern3164, With3164) pattern3165 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**WC('p', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons19, cons1485, cons1481, cons40) rule3165 = ReplacementRule(pattern3165, With3165) pattern3166 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**WC('p', S(1))*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons19, cons1485, cons1481, cons40) rule3166 = ReplacementRule(pattern3166, With3166) pattern3167 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**WC('p', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons1485, cons1481, cons149) rule3167 = ReplacementRule(pattern3167, With3167) pattern3168 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_)**WC('p', S(1))*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons1485, cons1481, cons149) rule3168 = ReplacementRule(pattern3168, With3168) pattern3169 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**p_ + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**q_)**n_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons1482, cons1486, cons1487, cons87, cons1488) rule3169 = ReplacementRule(pattern3169, With3169) pattern3170 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**p_ + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**q_)**n_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons1482, cons1486, cons1487, cons87, cons1488) rule3170 = ReplacementRule(pattern3170, With3170) pattern3171 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**p_ + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**q_)**n_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons1482, cons1486, cons1487, cons87, cons1489) rule3171 = ReplacementRule(pattern3171, With3171) pattern3172 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**p_ + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**q_)**n_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons1482, cons1486, cons1487, cons87, cons1489) rule3172 = ReplacementRule(pattern3172, With3172) pattern3173 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons47, cons40) rule3173 = ReplacementRule(pattern3173, replacement3173) pattern3174 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons47, cons40) rule3174 = ReplacementRule(pattern3174, replacement3174) pattern3175 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons48, cons47, cons149) rule3175 = ReplacementRule(pattern3175, replacement3175) pattern3176 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons48, cons47, cons149) rule3176 = ReplacementRule(pattern3176, replacement3176) pattern3177 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228) rule3177 = ReplacementRule(pattern3177, With3177) pattern3178 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228) rule3178 = ReplacementRule(pattern3178, With3178) pattern3179 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons47, cons40) rule3179 = ReplacementRule(pattern3179, replacement3179) pattern3180 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons47, cons40) rule3180 = ReplacementRule(pattern3180, replacement3180) pattern3181 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons47, cons149) rule3181 = ReplacementRule(pattern3181, replacement3181) pattern3182 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons47, cons149) rule3182 = ReplacementRule(pattern3182, replacement3182) pattern3183 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**p_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons1481, cons40) rule3183 = ReplacementRule(pattern3183, With3183) pattern3184 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**p_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons1481, cons40) rule3184 = ReplacementRule(pattern3184, With3184) pattern3185 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons228, cons377) rule3185 = ReplacementRule(pattern3185, replacement3185) pattern3186 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons228, cons377) rule3186 = ReplacementRule(pattern3186, replacement3186) pattern3187 = Pattern(Integral(((WC('f', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (WC('f', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons48, cons1483) rule3187 = ReplacementRule(pattern3187, With3187) pattern3188 = Pattern(Integral(((WC('f', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (WC('f', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons48, cons1483) rule3188 = ReplacementRule(pattern3188, With3188) pattern3189 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons1485, cons47, cons40) rule3189 = ReplacementRule(pattern3189, replacement3189) pattern3190 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons1485, cons47, cons40) rule3190 = ReplacementRule(pattern3190, replacement3190) pattern3191 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons1485, cons47, cons149) rule3191 = ReplacementRule(pattern3191, replacement3191) pattern3192 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons1485, cons47, cons149) rule3192 = ReplacementRule(pattern3192, replacement3192) pattern3193 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons1481, cons40) rule3193 = ReplacementRule(pattern3193, With3193) pattern3194 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons1481, cons40) rule3194 = ReplacementRule(pattern3194, With3194) pattern3195 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons378) rule3195 = ReplacementRule(pattern3195, replacement3195) pattern3196 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons378) rule3196 = ReplacementRule(pattern3196, replacement3196) pattern3197 = Pattern(Integral((a_ + (WC('f', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + (WC('f', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1483, cons248) rule3197 = ReplacementRule(pattern3197, With3197) pattern3198 = Pattern(Integral((a_ + (WC('f', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + (WC('f', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1483, cons248) rule3198 = ReplacementRule(pattern3198, With3198) pattern3199 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons1485, cons47, cons40) rule3199 = ReplacementRule(pattern3199, replacement3199) pattern3200 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons1485, cons47, cons40) rule3200 = ReplacementRule(pattern3200, replacement3200) pattern3201 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*tan(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons1485, cons47, cons149) rule3201 = ReplacementRule(pattern3201, replacement3201) pattern3202 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons1485, cons47, cons149) rule3202 = ReplacementRule(pattern3202, replacement3202) pattern3203 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons48, cons1485, cons228, cons1481, cons40) rule3203 = ReplacementRule(pattern3203, With3203) pattern3204 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons48, cons1485, cons228, cons1481, cons40) rule3204 = ReplacementRule(pattern3204, With3204) pattern3205 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons378) rule3205 = ReplacementRule(pattern3205, replacement3205) pattern3206 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons378) rule3206 = ReplacementRule(pattern3206, replacement3206) pattern3207 = Pattern(Integral((a_ + (WC('f', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + (WC('f', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1483, cons248) rule3207 = ReplacementRule(pattern3207, With3207) pattern3208 = Pattern(Integral((a_ + (WC('f', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + (WC('f', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons1483, cons248) rule3208 = ReplacementRule(pattern3208, With3208) pattern3209 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons1485, cons47, cons40) rule3209 = ReplacementRule(pattern3209, replacement3209) pattern3210 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons1485, cons47, cons40) rule3210 = ReplacementRule(pattern3210, replacement3210) pattern3211 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons1485, cons47, cons149) rule3211 = ReplacementRule(pattern3211, replacement3211) pattern3212 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**p_*tan(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons1485, cons47, cons149) rule3212 = ReplacementRule(pattern3212, replacement3212) pattern3213 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons48, cons1481, cons40) rule3213 = ReplacementRule(pattern3213, With3213) pattern3214 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n_ + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n2_)**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons48, cons1481, cons40) rule3214 = ReplacementRule(pattern3214, With3214) pattern3215 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons378) rule3215 = ReplacementRule(pattern3215, replacement3215) pattern3216 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n2', S(1)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons228, cons378) rule3216 = ReplacementRule(pattern3216, replacement3216) pattern3217 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons87) rule3217 = ReplacementRule(pattern3217, replacement3217) pattern3218 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons87) rule3218 = ReplacementRule(pattern3218, replacement3218) pattern3219 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons25) rule3219 = ReplacementRule(pattern3219, replacement3219) pattern3220 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons25) rule3220 = ReplacementRule(pattern3220, replacement3220) pattern3221 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228) rule3221 = ReplacementRule(pattern3221, With3221) pattern3222 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228) rule3222 = ReplacementRule(pattern3222, With3222) pattern3223 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228, cons87) rule3223 = ReplacementRule(pattern3223, replacement3223) pattern3224 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228, cons87) rule3224 = ReplacementRule(pattern3224, replacement3224) pattern3225 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons33, cons170) rule3225 = ReplacementRule(pattern3225, replacement3225) pattern3226 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons33, cons170) rule3226 = ReplacementRule(pattern3226, replacement3226) pattern3227 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons33, cons96) rule3227 = ReplacementRule(pattern3227, replacement3227) pattern3228 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons33, cons96) rule3228 = ReplacementRule(pattern3228, replacement3228) pattern3229 = Pattern(Integral(sin(x_*WC('f', S(1)) + WC('e', S(0)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons1118) rule3229 = ReplacementRule(pattern3229, replacement3229) pattern3230 = Pattern(Integral(cos(x_*WC('f', S(1)) + WC('e', S(0)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons1118) rule3230 = ReplacementRule(pattern3230, replacement3230) pattern3231 = Pattern(Integral(sin(x_*WC('f', S(1)) + WC('e', S(0)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons178) rule3231 = ReplacementRule(pattern3231, replacement3231) pattern3232 = Pattern(Integral(cos(x_*WC('f', S(1)) + WC('e', S(0)))/(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons178) rule3232 = ReplacementRule(pattern3232, replacement3232) pattern3233 = Pattern(Integral(sin(x_*WC('f', S(1)) + WC('e', S(0)))/sqrt(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons1118) rule3233 = ReplacementRule(pattern3233, replacement3233) pattern3234 = Pattern(Integral(cos(x_*WC('f', S(1)) + WC('e', S(0)))/sqrt(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons1118) rule3234 = ReplacementRule(pattern3234, replacement3234) pattern3235 = Pattern(Integral(sin(x_*WC('f', S(1)) + WC('e', S(0)))/sqrt(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons178) rule3235 = ReplacementRule(pattern3235, replacement3235) pattern3236 = Pattern(Integral(cos(x_*WC('f', S(1)) + WC('e', S(0)))/sqrt(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons127, cons178) rule3236 = ReplacementRule(pattern3236, replacement3236) pattern3237 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons19, cons1490) rule3237 = ReplacementRule(pattern3237, replacement3237) pattern3238 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons19, cons1490) rule3238 = ReplacementRule(pattern3238, replacement3238) pattern3239 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons167) rule3239 = ReplacementRule(pattern3239, replacement3239) pattern3240 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons167) rule3240 = ReplacementRule(pattern3240, replacement3240) pattern3241 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons168) rule3241 = ReplacementRule(pattern3241, replacement3241) pattern3242 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons168) rule3242 = ReplacementRule(pattern3242, replacement3242) pattern3243 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**n_, x_), cons8, cons29, cons50, cons127, cons19, cons87, cons167, cons1491) rule3243 = ReplacementRule(pattern3243, replacement3243) pattern3244 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**n_, x_), cons8, cons29, cons50, cons127, cons19, cons87, cons167, cons1491) rule3244 = ReplacementRule(pattern3244, replacement3244) pattern3245 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**n_, x_), cons8, cons29, cons50, cons127, cons19, cons87, cons167, cons33, cons247) rule3245 = ReplacementRule(pattern3245, replacement3245) pattern3246 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**n_, x_), cons8, cons29, cons50, cons127, cons19, cons87, cons167, cons33, cons247) rule3246 = ReplacementRule(pattern3246, replacement3246) pattern3247 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons249) rule3247 = ReplacementRule(pattern3247, replacement3247) pattern3248 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons249) rule3248 = ReplacementRule(pattern3248, replacement3248) pattern3249 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons91, cons1444) rule3249 = ReplacementRule(pattern3249, replacement3249) pattern3250 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons91, cons1444) rule3250 = ReplacementRule(pattern3250, replacement3250) pattern3251 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons95, cons91, cons1444, cons168) rule3251 = ReplacementRule(pattern3251, replacement3251) pattern3252 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons95, cons91, cons1444, cons168) rule3252 = ReplacementRule(pattern3252, replacement3252) pattern3253 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons150, cons1492) rule3253 = ReplacementRule(pattern3253, replacement3253) pattern3254 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons150, cons1492) rule3254 = ReplacementRule(pattern3254, replacement3254) pattern3255 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1267, cons87) rule3255 = ReplacementRule(pattern3255, replacement3255) pattern3256 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1267, cons810, cons1493) rule3256 = ReplacementRule(pattern3256, replacement3256) pattern3257 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1494, cons87) rule3257 = ReplacementRule(pattern3257, replacement3257) pattern3258 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1456, cons87) rule3258 = ReplacementRule(pattern3258, replacement3258) pattern3259 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1494, cons810, cons1493) rule3259 = ReplacementRule(pattern3259, replacement3259) pattern3260 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1456, cons810, cons1493) rule3260 = ReplacementRule(pattern3260, replacement3260) pattern3261 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons64) rule3261 = ReplacementRule(pattern3261, replacement3261) pattern3262 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons64) rule3262 = ReplacementRule(pattern3262, replacement3262) pattern3263 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons64) rule3263 = ReplacementRule(pattern3263, replacement3263) pattern3264 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/(a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons64) rule3264 = ReplacementRule(pattern3264, replacement3264) pattern3265 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons1495, cons64) rule3265 = ReplacementRule(pattern3265, replacement3265) pattern3266 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1269, cons1495, cons64) rule3266 = ReplacementRule(pattern3266, replacement3266) pattern3267 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule3267 = ReplacementRule(pattern3267, replacement3267) pattern3268 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule3268 = ReplacementRule(pattern3268, replacement3268) pattern3269 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule3269 = ReplacementRule(pattern3269, replacement3269) pattern3270 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule3270 = ReplacementRule(pattern3270, replacement3270) pattern3271 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons130) rule3271 = ReplacementRule(pattern3271, replacement3271) pattern3272 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons130) rule3272 = ReplacementRule(pattern3272, replacement3272) pattern3273 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons40, cons150, cons139, cons746) rule3273 = ReplacementRule(pattern3273, replacement3273) pattern3274 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons40, cons150, cons139, cons746) rule3274 = ReplacementRule(pattern3274, replacement3274) pattern3275 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons150, cons1496) rule3275 = ReplacementRule(pattern3275, replacement3275) pattern3276 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons150, cons1496) rule3276 = ReplacementRule(pattern3276, replacement3276) pattern3277 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons198) rule3277 = ReplacementRule(pattern3277, replacement3277) pattern3278 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons198) rule3278 = ReplacementRule(pattern3278, replacement3278) pattern3279 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule3279 = ReplacementRule(pattern3279, replacement3279) pattern3280 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule3280 = ReplacementRule(pattern3280, replacement3280) pattern3281 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons130) rule3281 = ReplacementRule(pattern3281, replacement3281) pattern3282 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons130) rule3282 = ReplacementRule(pattern3282, replacement3282) pattern3283 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, cons55, cons13, cons139, cons598) rule3283 = ReplacementRule(pattern3283, replacement3283) pattern3284 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, cons55, cons13, cons139, cons598) rule3284 = ReplacementRule(pattern3284, replacement3284) pattern3285 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons40, cons150, cons33, cons139, cons1498) rule3285 = ReplacementRule(pattern3285, replacement3285) pattern3286 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons40, cons150, cons33, cons139, cons1498) rule3286 = ReplacementRule(pattern3286, replacement3286) pattern3287 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons20, cons150, cons1496) rule3287 = ReplacementRule(pattern3287, replacement3287) pattern3288 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons65, cons20, cons150, cons1496) rule3288 = ReplacementRule(pattern3288, replacement3288) pattern3289 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons65, cons198) rule3289 = ReplacementRule(pattern3289, replacement3289) pattern3290 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons65, cons198) rule3290 = ReplacementRule(pattern3290, replacement3290) pattern3291 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule3291 = ReplacementRule(pattern3291, replacement3291) pattern3292 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule3292 = ReplacementRule(pattern3292, replacement3292) pattern3293 = Pattern(Integral(sin(x_**S(2)*WC('d', S(1))), x_), cons29, cons29) rule3293 = ReplacementRule(pattern3293, replacement3293) pattern3294 = Pattern(Integral(cos(x_**S(2)*WC('d', S(1))), x_), cons29, cons29) rule3294 = ReplacementRule(pattern3294, replacement3294) pattern3295 = Pattern(Integral(sin(c_ + x_**S(2)*WC('d', S(1))), x_), cons8, cons29, cons1263) rule3295 = ReplacementRule(pattern3295, replacement3295) pattern3296 = Pattern(Integral(cos(c_ + x_**S(2)*WC('d', S(1))), x_), cons8, cons29, cons1263) rule3296 = ReplacementRule(pattern3296, replacement3296) pattern3297 = Pattern(Integral(sin(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons87, cons746) rule3297 = ReplacementRule(pattern3297, replacement3297) pattern3298 = Pattern(Integral(cos(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons87, cons746) rule3298 = ReplacementRule(pattern3298, replacement3298) pattern3299 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons378, cons167, cons148) rule3299 = ReplacementRule(pattern3299, replacement3299) pattern3300 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons378, cons167, cons148) rule3300 = ReplacementRule(pattern3300, replacement3300) pattern3301 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons198) rule3301 = ReplacementRule(pattern3301, replacement3301) pattern3302 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons198) rule3302 = ReplacementRule(pattern3302, replacement3302) pattern3303 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons491) rule3303 = ReplacementRule(pattern3303, With3303) pattern3304 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons491) rule3304 = ReplacementRule(pattern3304, With3304) pattern3305 = Pattern(Integral(sin(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons4, cons1500) rule3305 = ReplacementRule(pattern3305, replacement3305) pattern3306 = Pattern(Integral(cos(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons4, cons1500) rule3306 = ReplacementRule(pattern3306, replacement3306) pattern3307 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons4, cons130) rule3307 = ReplacementRule(pattern3307, replacement3307) pattern3308 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons4, cons130) rule3308 = ReplacementRule(pattern3308, replacement3308) pattern3309 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons40, cons70, cons71) rule3309 = ReplacementRule(pattern3309, replacement3309) pattern3310 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons40, cons70, cons71) rule3310 = ReplacementRule(pattern3310, replacement3310) pattern3311 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(u_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70) rule3311 = ReplacementRule(pattern3311, replacement3311) pattern3312 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(u_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70) rule3312 = ReplacementRule(pattern3312, replacement3312) pattern3313 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*sin(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule3313 = ReplacementRule(pattern3313, replacement3313) pattern3314 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule3314 = ReplacementRule(pattern3314, replacement3314) pattern3315 = Pattern(Integral(sin(x_**n_*WC('d', S(1)))/x_, x_), cons29, cons4, cons1501) rule3315 = ReplacementRule(pattern3315, replacement3315) pattern3316 = Pattern(Integral(cos(x_**n_*WC('d', S(1)))/x_, x_), cons29, cons4, cons1501) rule3316 = ReplacementRule(pattern3316, replacement3316) pattern3317 = Pattern(Integral(sin(c_ + x_**n_*WC('d', S(1)))/x_, x_), cons8, cons29, cons4, cons1500) rule3317 = ReplacementRule(pattern3317, replacement3317) pattern3318 = Pattern(Integral(cos(c_ + x_**n_*WC('d', S(1)))/x_, x_), cons8, cons29, cons4, cons1500) rule3318 = ReplacementRule(pattern3318, replacement3318) pattern3319 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons40, CustomConstraint(With3319)) rule3319 = ReplacementRule(pattern3319, replacement3319) pattern3320 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons40, CustomConstraint(With3320)) rule3320 = ReplacementRule(pattern3320, replacement3320) pattern3321 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, CustomConstraint(With3321)) rule3321 = ReplacementRule(pattern3321, replacement3321) pattern3322 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, CustomConstraint(With3322)) rule3322 = ReplacementRule(pattern3322, replacement3322) pattern3323 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**n_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons4, cons1502) rule3323 = ReplacementRule(pattern3323, replacement3323) pattern3324 = Pattern(Integral(x_**WC('m', S(1))*cos(x_**n_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons4, cons1502) rule3324 = ReplacementRule(pattern3324, replacement3324) pattern3325 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons150, cons33, cons1503) rule3325 = ReplacementRule(pattern3325, replacement3325) pattern3326 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons150, cons33, cons1503) rule3326 = ReplacementRule(pattern3326, replacement3326) pattern3327 = Pattern(Integral((x_*WC('e', S(1)))**m_*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons150, cons33, cons96) rule3327 = ReplacementRule(pattern3327, replacement3327) pattern3328 = Pattern(Integral((x_*WC('e', S(1)))**m_*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons150, cons33, cons96) rule3328 = ReplacementRule(pattern3328, replacement3328) pattern3329 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons19, cons150) rule3329 = ReplacementRule(pattern3329, replacement3329) pattern3330 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons19, cons150) rule3330 = ReplacementRule(pattern3330, replacement3330) pattern3331 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons378, cons1257, cons148, cons1504) rule3331 = ReplacementRule(pattern3331, replacement3331) pattern3332 = Pattern(Integral(x_**WC('m', S(1))*cos(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons378, cons1257, cons148, cons1504) rule3332 = ReplacementRule(pattern3332, replacement3332) pattern3333 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons58, cons13, cons148) rule3333 = ReplacementRule(pattern3333, replacement3333) pattern3334 = Pattern(Integral(x_**WC('m', S(1))*cos(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons58, cons13, cons148) rule3334 = ReplacementRule(pattern3334, replacement3334) pattern3335 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons148, cons1505) rule3335 = ReplacementRule(pattern3335, replacement3335) pattern3336 = Pattern(Integral(x_**WC('m', S(1))*cos(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons148, cons1505) rule3336 = ReplacementRule(pattern3336, replacement3336) pattern3337 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons148, cons1506, cons685) rule3337 = ReplacementRule(pattern3337, replacement3337) pattern3338 = Pattern(Integral(x_**WC('m', S(1))*cos(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons148, cons1506, cons685) rule3338 = ReplacementRule(pattern3338, replacement3338) pattern3339 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons150, cons369) rule3339 = ReplacementRule(pattern3339, With3339) pattern3340 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons150, cons369) rule3340 = ReplacementRule(pattern3340, With3340) pattern3341 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons148) rule3341 = ReplacementRule(pattern3341, replacement3341) pattern3342 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons150, cons148) rule3342 = ReplacementRule(pattern3342, replacement3342) pattern3343 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons58, cons13, cons139, cons1507) rule3343 = ReplacementRule(pattern3343, replacement3343) pattern3344 = Pattern(Integral(x_**WC('m', S(1))*cos(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons19, cons4, cons58, cons13, cons139, cons1507) rule3344 = ReplacementRule(pattern3344, replacement3344) pattern3345 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons139, cons1507, cons1505) rule3345 = ReplacementRule(pattern3345, replacement3345) pattern3346 = Pattern(Integral(x_**WC('m', S(1))*cos(x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons152, cons13, cons139, cons1507, cons1505) rule3346 = ReplacementRule(pattern3346, replacement3346) pattern3347 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons198, cons20) rule3347 = ReplacementRule(pattern3347, replacement3347) pattern3348 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons40, cons198, cons20) rule3348 = ReplacementRule(pattern3348, replacement3348) pattern3349 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons198, cons369) rule3349 = ReplacementRule(pattern3349, With3349) pattern3350 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons40, cons198, cons369) rule3350 = ReplacementRule(pattern3350, With3350) pattern3351 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons198, cons358) rule3351 = ReplacementRule(pattern3351, replacement3351) pattern3352 = Pattern(Integral((x_*WC('e', S(1)))**m_*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons198, cons358) rule3352 = ReplacementRule(pattern3352, replacement3352) pattern3353 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons40, cons491) rule3353 = ReplacementRule(pattern3353, With3353) pattern3354 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons40, cons491) rule3354 = ReplacementRule(pattern3354, With3354) pattern3355 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons491) rule3355 = ReplacementRule(pattern3355, replacement3355) pattern3356 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons40, cons491) rule3356 = ReplacementRule(pattern3356, replacement3356) pattern3357 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons40, cons68, cons856, cons25) rule3357 = ReplacementRule(pattern3357, replacement3357) pattern3358 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons40, cons68, cons856, cons25) rule3358 = ReplacementRule(pattern3358, replacement3358) pattern3359 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, cons68, cons856, cons25) rule3359 = ReplacementRule(pattern3359, replacement3359) pattern3360 = Pattern(Integral((e_*x_)**m_*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons40, cons68, cons856, cons25) rule3360 = ReplacementRule(pattern3360, replacement3360) pattern3361 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons19, cons4, cons1508) rule3361 = ReplacementRule(pattern3361, replacement3361) pattern3362 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons50, cons19, cons4, cons1508) rule3362 = ReplacementRule(pattern3362, replacement3362) pattern3363 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons130) rule3363 = ReplacementRule(pattern3363, replacement3363) pattern3364 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons130) rule3364 = ReplacementRule(pattern3364, replacement3364) pattern3365 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71, cons20) rule3365 = ReplacementRule(pattern3365, replacement3365) pattern3366 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71, cons20) rule3366 = ReplacementRule(pattern3366, replacement3366) pattern3367 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons70) rule3367 = ReplacementRule(pattern3367, replacement3367) pattern3368 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons70) rule3368 = ReplacementRule(pattern3368, replacement3368) pattern3369 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*sin(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule3369 = ReplacementRule(pattern3369, replacement3369) pattern3370 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*cos(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule3370 = ReplacementRule(pattern3370, replacement3370) pattern3371 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cos(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons4, cons5, cons55, cons56) rule3371 = ReplacementRule(pattern3371, replacement3371) pattern3372 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*cos(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons19, cons4, cons5, cons55, cons56) rule3372 = ReplacementRule(pattern3372, replacement3372) pattern3373 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cos(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons5, cons95, cons1503, cons56) rule3373 = ReplacementRule(pattern3373, replacement3373) pattern3374 = Pattern(Integral(x_**WC('m', S(1))*sin(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*cos(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons5, cons95, cons1503, cons56) rule3374 = ReplacementRule(pattern3374, replacement3374) pattern3375 = Pattern(Integral(sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons47) rule3375 = ReplacementRule(pattern3375, replacement3375) pattern3376 = Pattern(Integral(cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons47) rule3376 = ReplacementRule(pattern3376, replacement3376) pattern3377 = Pattern(Integral(sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons228) rule3377 = ReplacementRule(pattern3377, replacement3377) pattern3378 = Pattern(Integral(cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons228) rule3378 = ReplacementRule(pattern3378, replacement3378) pattern3379 = Pattern(Integral(sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons87, cons167) rule3379 = ReplacementRule(pattern3379, replacement3379) pattern3380 = Pattern(Integral(cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons87, cons167) rule3380 = ReplacementRule(pattern3380, replacement3380) pattern3381 = Pattern(Integral(sin(v_)**WC('n', S(1)), x_), cons150, cons820, cons1133) rule3381 = ReplacementRule(pattern3381, replacement3381) pattern3382 = Pattern(Integral(cos(v_)**WC('n', S(1)), x_), cons150, cons820, cons1133) rule3382 = ReplacementRule(pattern3382, replacement3382) pattern3383 = Pattern(Integral((d_ + x_*WC('e', S(1)))*sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons49) rule3383 = ReplacementRule(pattern3383, replacement3383) pattern3384 = Pattern(Integral((d_ + x_*WC('e', S(1)))*cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons49) rule3384 = ReplacementRule(pattern3384, replacement3384) pattern3385 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons241) rule3385 = ReplacementRule(pattern3385, replacement3385) pattern3386 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))*cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons241) rule3386 = ReplacementRule(pattern3386, replacement3386) pattern3387 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168, cons1134) rule3387 = ReplacementRule(pattern3387, replacement3387) pattern3388 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168, cons1134) rule3388 = ReplacementRule(pattern3388, replacement3388) pattern3389 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168, cons1135) rule3389 = ReplacementRule(pattern3389, replacement3389) pattern3390 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168, cons1135) rule3390 = ReplacementRule(pattern3390, replacement3390) pattern3391 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96, cons1134) rule3391 = ReplacementRule(pattern3391, replacement3391) pattern3392 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96, cons1134) rule3392 = ReplacementRule(pattern3392, replacement3392) pattern3393 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96, cons1135) rule3393 = ReplacementRule(pattern3393, replacement3393) pattern3394 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**m_*cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96, cons1135) rule3394 = ReplacementRule(pattern3394, replacement3394) pattern3395 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1509) rule3395 = ReplacementRule(pattern3395, replacement3395) pattern3396 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1509) rule3396 = ReplacementRule(pattern3396, replacement3396) pattern3397 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*sin(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons87, cons167) rule3397 = ReplacementRule(pattern3397, replacement3397) pattern3398 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*cos(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons87, cons167) rule3398 = ReplacementRule(pattern3398, replacement3398) pattern3399 = Pattern(Integral(u_**WC('m', S(1))*sin(v_)**WC('n', S(1)), x_), cons19, cons150, cons70, cons820, cons821) rule3399 = ReplacementRule(pattern3399, replacement3399) pattern3400 = Pattern(Integral(u_**WC('m', S(1))*cos(v_)**WC('n', S(1)), x_), cons19, cons150, cons70, cons820, cons821) rule3400 = ReplacementRule(pattern3400, replacement3400) return [rule2167, rule2168, rule2169, rule2170, rule2171, rule2172, rule2173, rule2174, rule2175, rule2176, rule2177, rule2178, rule2179, rule2180, rule2181, rule2182, rule2183, rule2184, rule2185, rule2186, rule2187, rule2188, rule2189, rule2190, rule2191, rule2192, rule2193, rule2194, rule2195, rule2196, rule2197, rule2198, rule2199, rule2200, rule2201, rule2202, rule2203, rule2204, rule2205, rule2206, rule2207, rule2208, rule2209, rule2210, rule2211, rule2212, rule2213, rule2214, rule2215, rule2216, rule2217, rule2218, rule2219, rule2220, rule2221, rule2222, rule2223, rule2224, rule2225, rule2226, rule2227, rule2228, rule2229, rule2230, rule2231, rule2232, rule2233, rule2234, rule2235, rule2236, rule2237, rule2238, rule2239, rule2240, rule2241, rule2242, rule2243, rule2244, rule2245, rule2246, rule2247, rule2248, rule2249, rule2250, rule2251, rule2252, rule2253, rule2254, rule2255, rule2256, rule2257, rule2258, rule2259, rule2260, rule2261, rule2262, rule2263, rule2264, rule2265, rule2266, rule2267, rule2268, rule2269, rule2270, rule2271, rule2272, rule2273, rule2274, rule2275, rule2276, rule2277, rule2278, rule2279, rule2280, rule2281, rule2282, rule2283, rule2284, rule2285, rule2286, rule2287, rule2288, rule2289, rule2290, rule2291, rule2292, rule2293, rule2294, rule2295, rule2296, rule2297, rule2298, rule2299, rule2300, rule2301, rule2302, rule2303, rule2304, rule2305, rule2306, rule2307, rule2308, rule2309, rule2310, rule2311, rule2312, rule2313, rule2314, rule2315, rule2316, rule2317, rule2318, rule2319, rule2320, rule2321, rule2322, rule2323, rule2324, rule2325, rule2326, rule2327, rule2328, rule2329, rule2330, rule2331, rule2332, rule2333, rule2334, rule2335, rule2336, rule2337, rule2338, rule2339, rule2340, rule2341, rule2342, rule2343, rule2344, rule2345, rule2346, rule2347, rule2348, rule2349, rule2350, rule2351, rule2352, rule2353, rule2354, rule2355, rule2356, rule2357, rule2358, rule2359, rule2360, rule2361, rule2362, rule2363, rule2364, rule2365, rule2366, rule2367, rule2368, rule2369, rule2370, rule2371, rule2372, rule2373, rule2374, rule2375, rule2376, rule2377, rule2378, rule2379, rule2380, rule2381, rule2382, rule2383, rule2384, rule2385, rule2386, rule2387, rule2388, rule2389, rule2390, rule2391, rule2392, rule2393, rule2394, rule2395, rule2396, rule2397, rule2398, rule2399, rule2400, rule2401, rule2402, rule2403, rule2404, rule2405, rule2406, rule2407, rule2408, rule2409, rule2410, rule2411, rule2412, rule2413, rule2414, rule2415, rule2416, rule2417, rule2418, rule2419, rule2420, rule2421, rule2422, rule2423, rule2424, rule2425, rule2426, rule2427, rule2428, rule2429, rule2430, rule2431, rule2432, rule2433, rule2434, rule2435, rule2436, rule2437, rule2438, rule2439, rule2440, rule2441, rule2442, rule2443, rule2444, rule2445, rule2446, rule2447, rule2448, rule2449, rule2450, rule2451, rule2452, rule2453, rule2454, rule2455, rule2456, rule2457, rule2458, rule2459, rule2460, rule2461, rule2462, rule2463, rule2464, rule2465, rule2466, rule2467, rule2468, rule2469, rule2470, rule2471, rule2472, rule2473, rule2474, rule2475, rule2476, rule2477, rule2478, rule2479, rule2480, rule2481, rule2482, rule2483, rule2484, rule2485, rule2486, rule2487, rule2488, rule2489, rule2490, rule2491, rule2492, rule2493, rule2494, rule2495, rule2496, rule2497, rule2498, rule2499, rule2500, rule2501, rule2502, rule2503, rule2504, rule2505, rule2506, rule2507, rule2508, rule2509, rule2510, rule2511, rule2512, rule2513, rule2514, rule2515, rule2516, rule2517, rule2518, rule2519, rule2520, rule2521, rule2522, rule2523, rule2524, rule2525, rule2526, rule2527, rule2528, rule2529, rule2530, rule2531, rule2532, rule2533, rule2534, rule2535, rule2536, rule2537, rule2538, rule2539, rule2540, rule2541, rule2542, rule2543, rule2544, rule2545, rule2546, rule2547, rule2548, rule2549, rule2550, rule2551, rule2552, rule2553, rule2554, rule2555, rule2556, rule2557, rule2558, rule2559, rule2560, rule2561, rule2562, rule2563, rule2564, rule2565, rule2566, rule2567, rule2568, rule2569, rule2570, rule2571, rule2572, rule2573, rule2574, rule2575, rule2576, rule2577, rule2578, rule2579, rule2580, rule2581, rule2582, rule2583, rule2584, rule2585, rule2586, rule2587, rule2588, rule2589, rule2590, rule2591, rule2592, rule2593, rule2594, rule2595, rule2596, rule2597, rule2598, rule2599, rule2600, rule2601, rule2602, rule2603, rule2604, rule2605, rule2606, rule2607, rule2608, rule2609, rule2610, rule2611, rule2612, rule2613, rule2614, rule2615, rule2616, rule2617, rule2618, rule2619, rule2620, rule2621, rule2622, rule2623, rule2624, rule2625, rule2626, rule2627, rule2628, rule2629, rule2630, rule2631, rule2632, rule2633, rule2634, rule2635, rule2636, rule2637, rule2638, rule2639, rule2640, rule2641, rule2642, rule2643, rule2644, rule2645, rule2646, rule2647, rule2648, rule2649, rule2650, rule2651, rule2652, rule2653, rule2654, rule2655, rule2656, rule2657, rule2658, rule2659, rule2660, rule2661, rule2662, rule2663, rule2664, rule2665, rule2666, rule2667, rule2668, rule2669, rule2670, rule2671, rule2672, rule2673, rule2674, rule2675, rule2676, rule2677, rule2678, rule2679, rule2680, rule2681, rule2682, rule2683, rule2684, rule2685, rule2686, rule2687, rule2688, rule2689, rule2690, rule2691, rule2692, rule2693, rule2694, rule2695, rule2696, rule2697, rule2698, rule2699, rule2700, rule2701, rule2702, rule2703, rule2704, rule2705, rule2706, rule2707, rule2708, rule2709, rule2710, rule2711, rule2712, rule2713, rule2714, rule2715, rule2716, rule2717, rule2718, rule2719, rule2720, rule2721, rule2722, rule2723, rule2724, rule2725, rule2726, rule2727, rule2728, rule2729, rule2730, rule2731, rule2732, rule2733, rule2734, rule2735, rule2736, rule2737, rule2738, rule2739, rule2740, rule2741, rule2742, rule2743, rule2744, rule2745, rule2746, rule2747, rule2748, rule2749, rule2750, rule2751, rule2752, rule2753, rule2754, rule2755, rule2756, rule2757, rule2758, rule2759, rule2760, rule2761, rule2762, rule2763, rule2764, rule2765, rule2766, rule2767, rule2768, rule2769, rule2770, rule2771, rule2772, rule2773, rule2774, rule2775, rule2776, rule2777, rule2778, rule2779, rule2780, rule2781, rule2782, rule2783, rule2784, rule2785, rule2786, rule2787, rule2788, rule2789, rule2790, rule2791, rule2792, rule2793, rule2794, rule2795, rule2796, rule2797, rule2798, rule2799, rule2800, rule2801, rule2802, rule2803, rule2804, rule2805, rule2806, rule2807, rule2808, rule2809, rule2810, rule2811, rule2812, rule2813, rule2814, rule2815, rule2816, rule2817, rule2818, rule2819, rule2820, rule2821, rule2822, rule2823, rule2824, rule2825, rule2826, rule2827, rule2828, rule2829, rule2830, rule2831, rule2832, rule2833, rule2834, rule2835, rule2836, rule2837, rule2838, rule2839, rule2840, rule2841, rule2842, rule2843, rule2844, rule2845, rule2846, rule2847, rule2848, rule2849, rule2850, rule2851, rule2852, rule2853, rule2854, rule2855, rule2856, rule2857, rule2858, rule2859, rule2860, rule2861, rule2862, rule2863, rule2864, rule2865, rule2866, rule2867, rule2868, rule2869, rule2870, rule2871, rule2872, rule2873, rule2874, rule2875, rule2876, rule2877, rule2878, rule2879, rule2880, rule2881, rule2882, rule2883, rule2884, rule2885, rule2886, rule2887, rule2888, rule2889, rule2890, rule2891, rule2892, rule2893, rule2894, rule2895, rule2896, rule2897, rule2898, rule2899, rule2900, rule2901, rule2902, rule2903, rule2904, rule2905, rule2906, rule2907, rule2908, rule2909, rule2910, rule2911, rule2912, rule2913, rule2914, rule2915, rule2916, rule2917, rule2918, rule2919, rule2920, rule2921, rule2922, rule2923, rule2924, rule2925, rule2926, rule2927, rule2928, rule2929, rule2930, rule2931, rule2932, rule2933, rule2934, rule2935, rule2936, rule2937, rule2938, rule2939, rule2940, rule2941, rule2942, rule2943, rule2944, rule2945, rule2946, rule2947, rule2948, rule2949, rule2950, rule2951, rule2952, rule2953, rule2954, rule2955, rule2956, rule2957, rule2958, rule2959, rule2960, rule2961, rule2962, rule2963, rule2964, rule2965, rule2966, rule2967, rule2968, rule2969, rule2970, rule2971, rule2972, rule2973, rule2974, rule2975, rule2976, rule2977, rule2978, rule2979, rule2980, rule2981, rule2982, rule2983, rule2984, rule2985, rule2986, rule2987, rule2988, rule2989, rule2990, rule2991, rule2992, rule2993, rule2994, rule2995, rule2996, rule2997, rule2998, rule2999, rule3000, rule3001, rule3002, rule3003, rule3004, rule3005, rule3006, rule3007, rule3008, rule3009, rule3010, rule3011, rule3012, rule3013, rule3014, rule3015, rule3016, rule3017, rule3018, rule3019, rule3020, rule3021, rule3022, rule3023, rule3024, rule3025, rule3026, rule3027, rule3028, rule3029, rule3030, rule3031, rule3032, rule3033, rule3034, rule3035, rule3036, rule3037, rule3038, rule3039, rule3040, rule3041, rule3042, rule3043, rule3044, rule3045, rule3046, rule3047, rule3048, rule3049, rule3050, rule3051, rule3052, rule3053, rule3054, rule3055, rule3056, rule3057, rule3058, rule3059, rule3060, rule3061, rule3062, rule3063, rule3064, rule3065, rule3066, rule3067, rule3068, rule3069, rule3070, rule3071, rule3072, rule3073, rule3074, rule3075, rule3076, rule3077, rule3078, rule3079, rule3080, rule3081, rule3082, rule3083, rule3084, rule3085, rule3086, rule3087, rule3088, rule3089, rule3090, rule3091, rule3092, rule3093, rule3094, rule3095, rule3096, rule3097, rule3098, rule3099, rule3100, rule3101, rule3102, rule3103, rule3104, rule3105, rule3106, rule3107, rule3108, rule3109, rule3110, rule3111, rule3112, rule3113, rule3114, rule3115, rule3116, rule3117, rule3118, rule3119, rule3120, rule3121, rule3122, rule3123, rule3124, rule3125, rule3126, rule3127, rule3128, rule3129, rule3130, rule3131, rule3132, rule3133, rule3134, rule3135, rule3136, rule3137, rule3138, rule3139, rule3140, rule3141, rule3142, rule3143, rule3144, rule3145, rule3146, rule3147, rule3148, rule3149, rule3150, rule3151, rule3152, rule3153, rule3154, rule3155, rule3156, rule3157, rule3158, rule3159, rule3160, rule3161, rule3162, rule3163, rule3164, rule3165, rule3166, rule3167, rule3168, rule3169, rule3170, rule3171, rule3172, rule3173, rule3174, rule3175, rule3176, rule3177, rule3178, rule3179, rule3180, rule3181, rule3182, rule3183, rule3184, rule3185, rule3186, rule3187, rule3188, rule3189, rule3190, rule3191, rule3192, rule3193, rule3194, rule3195, rule3196, rule3197, rule3198, rule3199, rule3200, rule3201, rule3202, rule3203, rule3204, rule3205, rule3206, rule3207, rule3208, rule3209, rule3210, rule3211, rule3212, rule3213, rule3214, rule3215, rule3216, rule3217, rule3218, rule3219, rule3220, rule3221, rule3222, rule3223, rule3224, rule3225, rule3226, rule3227, rule3228, rule3229, rule3230, rule3231, rule3232, rule3233, rule3234, rule3235, rule3236, rule3237, rule3238, rule3239, rule3240, rule3241, rule3242, rule3243, rule3244, rule3245, rule3246, rule3247, rule3248, rule3249, rule3250, rule3251, rule3252, rule3253, rule3254, rule3255, rule3256, rule3257, rule3258, rule3259, rule3260, rule3261, rule3262, rule3263, rule3264, rule3265, rule3266, rule3267, rule3268, rule3269, rule3270, rule3271, rule3272, rule3273, rule3274, rule3275, rule3276, rule3277, rule3278, rule3279, rule3280, rule3281, rule3282, rule3283, rule3284, rule3285, rule3286, rule3287, rule3288, rule3289, rule3290, rule3291, rule3292, rule3293, rule3294, rule3295, rule3296, rule3297, rule3298, rule3299, rule3300, rule3301, rule3302, rule3303, rule3304, rule3305, rule3306, rule3307, rule3308, rule3309, rule3310, rule3311, rule3312, rule3313, rule3314, rule3315, rule3316, rule3317, rule3318, rule3319, rule3320, rule3321, rule3322, rule3323, rule3324, rule3325, rule3326, rule3327, rule3328, rule3329, rule3330, rule3331, rule3332, rule3333, rule3334, rule3335, rule3336, rule3337, rule3338, rule3339, rule3340, rule3341, rule3342, rule3343, rule3344, rule3345, rule3346, rule3347, rule3348, rule3349, rule3350, rule3351, rule3352, rule3353, rule3354, rule3355, rule3356, rule3357, rule3358, rule3359, rule3360, rule3361, rule3362, rule3363, rule3364, rule3365, rule3366, rule3367, rule3368, rule3369, rule3370, rule3371, rule3372, rule3373, rule3374, rule3375, rule3376, rule3377, rule3378, rule3379, rule3380, rule3381, rule3382, rule3383, rule3384, rule3385, rule3386, rule3387, rule3388, rule3389, rule3390, rule3391, rule3392, rule3393, rule3394, rule3395, rule3396, rule3397, rule3398, rule3399, rule3400, ] def replacement2167(u, x): return Int(DeactivateTrig(u, x), x) def replacement2168(a, b, e, f, m, n, x): return Simp((a*sin(e + f*x))**(m + S(1))*(b*cos(e + f*x))**(n + S(1))/(a*b*f*(m + S(1))), x) def replacement2169(a, e, f, m, n, x): return Dist(S(1)/(a*f), Subst(Int(x**m*(S(1) - x**S(2)/a**S(2))**(n/S(2) + S(-1)/2), x), x, a*sin(e + f*x)), x) def replacement2170(a, e, f, m, n, x): return -Dist(S(1)/(a*f), Subst(Int(x**m*(S(1) - x**S(2)/a**S(2))**(n/S(2) + S(-1)/2), x), x, a*cos(e + f*x)), x) def replacement2171(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + S(-1))/(b**S(2)*(n + S(1))), Int((a*sin(e + f*x))**(m + S(-2))*(b*cos(e + f*x))**(n + S(2)), x), x) - Simp(a*(a*sin(e + f*x))**(m + S(-1))*(b*cos(e + f*x))**(n + S(1))/(b*f*(n + S(1))), x) def replacement2172(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + S(-1))/(b**S(2)*(n + S(1))), Int((a*cos(e + f*x))**(m + S(-2))*(b*sin(e + f*x))**(n + S(2)), x), x) + Simp(a*(a*cos(e + f*x))**(m + S(-1))*(b*sin(e + f*x))**(n + S(1))/(b*f*(n + S(1))), x) def replacement2173(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + S(-1))/(m + n), Int((a*sin(e + f*x))**(m + S(-2))*(b*cos(e + f*x))**n, x), x) - Simp(a*(a*sin(e + f*x))**(m + S(-1))*(b*cos(e + f*x))**(n + S(1))/(b*f*(m + n)), x) def replacement2174(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + S(-1))/(m + n), Int((a*cos(e + f*x))**(m + S(-2))*(b*sin(e + f*x))**n, x), x) + Simp(a*(a*cos(e + f*x))**(m + S(-1))*(b*sin(e + f*x))**(n + S(1))/(b*f*(m + n)), x) def replacement2175(a, b, e, f, m, n, x): return Dist((m + n + S(2))/(a**S(2)*(m + S(1))), Int((a*sin(e + f*x))**(m + S(2))*(b*cos(e + f*x))**n, x), x) + Simp((a*sin(e + f*x))**(m + S(1))*(b*cos(e + f*x))**(n + S(1))/(a*b*f*(m + S(1))), x) def replacement2176(a, b, e, f, m, n, x): return Dist((m + n + S(2))/(a**S(2)*(m + S(1))), Int((a*cos(e + f*x))**(m + S(2))*(b*sin(e + f*x))**n, x), x) - Simp((a*cos(e + f*x))**(m + S(1))*(b*sin(e + f*x))**(n + S(1))/(a*b*f*(m + S(1))), x) def replacement2177(a, b, e, f, x): return Dist(sqrt(a*sin(e + f*x))*sqrt(b*cos(e + f*x))/sqrt(sin(S(2)*e + S(2)*f*x)), Int(sqrt(sin(S(2)*e + S(2)*f*x)), x), x) def replacement2178(a, b, e, f, x): return Dist(sqrt(sin(S(2)*e + S(2)*f*x))/(sqrt(a*sin(e + f*x))*sqrt(b*cos(e + f*x))), Int(S(1)/sqrt(sin(S(2)*e + S(2)*f*x)), x), x) def With2179(a, b, e, f, m, n, x): k = Denominator(m) return Dist(a*b*k/f, Subst(Int(x**(k*(m + S(1)) + S(-1))/(a**S(2) + b**S(2)*x**(S(2)*k)), x), x, (a*sin(e + f*x))**(S(1)/k)*(b*cos(e + f*x))**(-S(1)/k)), x) def With2180(a, b, e, f, m, n, x): k = Denominator(m) return -Dist(a*b*k/f, Subst(Int(x**(k*(m + S(1)) + S(-1))/(a**S(2) + b**S(2)*x**(S(2)*k)), x), x, (a*cos(e + f*x))**(S(1)/k)*(b*sin(e + f*x))**(-S(1)/k)), x) def replacement2181(a, b, e, f, m, n, x): return Simp(b**(S(2)*IntPart(n/S(2) + S(-1)/2) + S(1))*(a*sin(e + f*x))**(m + S(1))*(b*cos(e + f*x))**(S(2)*FracPart(n/S(2) + S(-1)/2))*(cos(e + f*x)**S(2))**(-FracPart(n/S(2) + S(-1)/2))*Hypergeometric2F1(m/S(2) + S(1)/2, S(1)/2 - n/S(2), m/S(2) + S(3)/2, sin(e + f*x)**S(2))/(a*f*(m + S(1))), x) def replacement2182(a, b, e, f, m, n, x): return -Simp(b**(S(2)*IntPart(n/S(2) + S(-1)/2) + S(1))*(a*cos(e + f*x))**(m + S(1))*(b*sin(e + f*x))**(S(2)*FracPart(n/S(2) + S(-1)/2))*(sin(e + f*x)**S(2))**(-FracPart(n/S(2) + S(-1)/2))*Hypergeometric2F1(m/S(2) + S(1)/2, S(1)/2 - n/S(2), m/S(2) + S(3)/2, cos(e + f*x)**S(2))/(a*f*(m + S(1))), x) def replacement2183(a, b, e, f, m, n, x): return Simp(b*(a*sin(e + f*x))**(m + S(1))*(b/cos(e + f*x))**(n + S(-1))/(a*f*(m + S(1))), x) def replacement2184(a, b, e, f, m, n, x): return -Simp(b*(a*cos(e + f*x))**(m + S(1))*(b/sin(e + f*x))**(n + S(-1))/(a*f*(m + S(1))), x) def replacement2185(a, b, e, f, m, n, x): return -Dist(a**S(2)*b**S(2)*(m + S(-1))/(n + S(-1)), Int((a*sin(e + f*x))**(m + S(-2))*(b/cos(e + f*x))**(n + S(-2)), x), x) + Simp(a*b*(a*sin(e + f*x))**(m + S(-1))*(b/cos(e + f*x))**(n + S(-1))/(f*(n + S(-1))), x) def replacement2186(a, b, e, f, m, n, x): return -Dist(a**S(2)*b**S(2)*(m + S(-1))/(n + S(-1)), Int((a*cos(e + f*x))**(m + S(-2))*(b/sin(e + f*x))**(n + S(-2)), x), x) - Simp(a*b*(a*cos(e + f*x))**(m + S(-1))*(b/sin(e + f*x))**(n + S(-1))/(f*(n + S(-1))), x) def replacement2187(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + S(-1))/(m - n), Int((a*sin(e + f*x))**(m + S(-2))*(b/cos(e + f*x))**n, x), x) - Simp(a*b*(a*sin(e + f*x))**(m + S(-1))*(b/cos(e + f*x))**(n + S(-1))/(f*(m - n)), x) def replacement2188(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + S(-1))/(m - n), Int((a*cos(e + f*x))**(m + S(-2))*(b/sin(e + f*x))**n, x), x) + Simp(a*b*(a*cos(e + f*x))**(m + S(-1))*(b/sin(e + f*x))**(n + S(-1))/(f*(m - n)), x) def replacement2189(a, b, e, f, m, n, x): return Dist((m - n + S(2))/(a**S(2)*(m + S(1))), Int((a*sin(e + f*x))**(m + S(2))*(b/cos(e + f*x))**n, x), x) + Simp(b*(a*sin(e + f*x))**(m + S(1))*(b/cos(e + f*x))**(n + S(-1))/(a*f*(m + S(1))), x) def replacement2190(a, b, e, f, m, n, x): return Dist((m - n + S(2))/(a**S(2)*(m + S(1))), Int((a*cos(e + f*x))**(m + S(2))*(b/sin(e + f*x))**n, x), x) - Simp(b*(a*cos(e + f*x))**(m + S(1))*(b/sin(e + f*x))**(n + S(-1))/(a*f*(m + S(1))), x) def replacement2191(a, b, e, f, m, n, x): return Dist((cos(e + f*x)/b)**(FracPart(n) + S(1))*(b/cos(e + f*x))**(FracPart(n) + S(1)), Int((a*sin(e + f*x))**m*(cos(e + f*x)/b)**(-n), x), x) def replacement2192(a, b, e, f, m, n, x): return Dist((sin(e + f*x)/b)**(FracPart(n) + S(1))*(b/sin(e + f*x))**(FracPart(n) + S(1)), Int((a*cos(e + f*x))**m*(sin(e + f*x)/b)**(-n), x), x) def replacement2193(a, b, e, f, m, n, x): return Dist((a*b)**IntPart(n)*(a*sin(e + f*x))**FracPart(n)*(b/sin(e + f*x))**FracPart(n), Int((a*sin(e + f*x))**(m - n), x), x) def replacement2194(a, b, e, f, m, n, x): return Dist((a*b)**IntPart(n)*(a*cos(e + f*x))**FracPart(n)*(b/cos(e + f*x))**FracPart(n), Int((a*cos(e + f*x))**(m - n), x), x) def replacement2195(c, d, n, x): return -Dist(S(1)/d, Subst(Int((S(1) - x**S(2))**(n/S(2))/sqrt(S(1) - x**S(2)), x), x, cos(c + d*x)), x) def replacement2196(c, d, n, x): return Dist(S(1)/d, Subst(Int((S(1) - x**S(2))**(n/S(2))/sqrt(S(1) - x**S(2)), x), x, sin(c + d*x)), x) def replacement2197(b, c, d, n, x): return Dist(b**S(2)*(n + S(-1))/n, Int((b*sin(c + d*x))**(n + S(-2)), x), x) - Simp(b*(b*sin(c + d*x))**(n + S(-1))*cos(c + d*x)/(d*n), x) def replacement2198(b, c, d, n, x): return Dist(b**S(2)*(n + S(-1))/n, Int((b*cos(c + d*x))**(n + S(-2)), x), x) + Simp(b*(b*cos(c + d*x))**(n + S(-1))*sin(c + d*x)/(d*n), x) def replacement2199(b, c, d, n, x): return Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*sin(c + d*x))**(n + S(2)), x), x) + Simp((b*sin(c + d*x))**(n + S(1))*cos(c + d*x)/(b*d*(n + S(1))), x) def replacement2200(b, c, d, n, x): return Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*cos(c + d*x))**(n + S(2)), x), x) - Simp((b*cos(c + d*x))**(n + S(1))*sin(c + d*x)/(b*d*(n + S(1))), x) def replacement2201(c, d, x): return -Simp(cos(c + d*x)/d, x) def replacement2202(c, d, x): return Simp(sin(c + d*x)/d, x) def replacement2203(c, d, x): return Simp(S(2)*EllipticE(-Pi/S(4) + c/S(2) + d*x/S(2), S(2))/d, x) def replacement2204(c, d, x): return Simp(S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/d, x) def replacement2205(b, c, d, x): return Dist(sqrt(b*sin(c + d*x))/sqrt(sin(c + d*x)), Int(sqrt(sin(c + d*x)), x), x) def replacement2206(b, c, d, x): return Dist(sqrt(b*cos(c + d*x))/sqrt(cos(c + d*x)), Int(sqrt(cos(c + d*x)), x), x) def replacement2207(c, d, x): return Simp(S(2)*EllipticF(-Pi/S(4) + c/S(2) + d*x/S(2), S(2))/d, x) def replacement2208(c, d, x): return Simp(S(2)*EllipticF(c/S(2) + d*x/S(2), S(2))/d, x) def replacement2209(b, c, d, x): return Dist(sqrt(sin(c + d*x))/sqrt(b*sin(c + d*x)), Int(S(1)/sqrt(sin(c + d*x)), x), x) def replacement2210(b, c, d, x): return Dist(sqrt(cos(c + d*x))/sqrt(b*cos(c + d*x)), Int(S(1)/sqrt(cos(c + d*x)), x), x) def replacement2211(b, c, d, n, x): return Simp((b*sin(c + d*x))**(n + S(1))*Hypergeometric2F1(S(1)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, sin(c + d*x)**S(2))*cos(c + d*x)/(b*d*(n + S(1))*sqrt(cos(c + d*x)**S(2))), x) def replacement2212(b, c, d, n, x): return -Simp((b*cos(c + d*x))**(n + S(1))*Hypergeometric2F1(S(1)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(b*d*(n + S(1))*sqrt(sin(c + d*x)**S(2))), x) def replacement2213(a, b, c, d, x): return Dist(S(2)*a*b, Int(sin(c + d*x), x), x) + Simp(x*(S(2)*a**S(2) + b**S(2))/S(2), x) - Simp(b**S(2)*sin(c + d*x)*cos(c + d*x)/(S(2)*d), x) def replacement2214(a, b, c, d, x): return Dist(S(2)*a*b, Int(cos(c + d*x), x), x) + Simp(x*(S(2)*a**S(2) + b**S(2))/S(2), x) + Simp(b**S(2)*sin(c + d*x)*cos(c + d*x)/(S(2)*d), x) def replacement2215(a, b, c, d, n, x): return Int(ExpandTrig((a + b*sin(c + d*x))**n, x), x) def replacement2216(a, b, c, d, n, x): return Int(ExpandTrig((a + b*cos(c + d*x))**n, x), x) def replacement2217(a, b, c, d, x): return Simp(-S(2)*b*cos(c + d*x)/(d*sqrt(a + b*sin(c + d*x))), x) def replacement2218(a, b, c, d, x): return Simp(S(2)*b*sin(c + d*x)/(d*sqrt(a + b*cos(c + d*x))), x) def replacement2219(a, b, c, d, n, x): return Dist(a*(S(2)*n + S(-1))/n, Int((a + b*sin(c + d*x))**(n + S(-1)), x), x) - Simp(b*(a + b*sin(c + d*x))**(n + S(-1))*cos(c + d*x)/(d*n), x) def replacement2220(a, b, c, d, n, x): return Dist(a*(S(2)*n + S(-1))/n, Int((a + b*cos(c + d*x))**(n + S(-1)), x), x) + Simp(b*(a + b*cos(c + d*x))**(n + S(-1))*sin(c + d*x)/(d*n), x) def replacement2221(a, b, c, d, x): return -Simp(cos(c + d*x)/(d*(a*sin(c + d*x) + b)), x) def replacement2222(a, b, c, d, x): return Simp(sin(c + d*x)/(d*(a*cos(c + d*x) + b)), x) def replacement2223(a, b, c, d, x): return Dist(-S(2)/d, Subst(Int(S(1)/(S(2)*a - x**S(2)), x), x, b*cos(c + d*x)/sqrt(a + b*sin(c + d*x))), x) def replacement2224(a, b, c, d, x): return Dist(S(2)/d, Subst(Int(S(1)/(S(2)*a - x**S(2)), x), x, b*sin(c + d*x)/sqrt(a + b*cos(c + d*x))), x) def replacement2225(a, b, c, d, n, x): return Dist((n + S(1))/(a*(S(2)*n + S(1))), Int((a + b*sin(c + d*x))**(n + S(1)), x), x) + Simp(b*(a + b*sin(c + d*x))**n*cos(c + d*x)/(a*d*(S(2)*n + S(1))), x) def replacement2226(a, b, c, d, n, x): return Dist((n + S(1))/(a*(S(2)*n + S(1))), Int((a + b*cos(c + d*x))**(n + S(1)), x), x) - Simp(b*(a + b*cos(c + d*x))**n*sin(c + d*x)/(a*d*(S(2)*n + S(1))), x) def replacement2227(a, b, c, d, n, x): return -Simp(S(2)**(n + S(1)/2)*a**(n + S(-1)/2)*b*Hypergeometric2F1(S(1)/2, S(1)/2 - n, S(3)/2, S(1)/2 - b*sin(c + d*x)/(S(2)*a))*cos(c + d*x)/(d*sqrt(a + b*sin(c + d*x))), x) def replacement2228(a, b, c, d, n, x): return Simp(S(2)**(n + S(1)/2)*a**(n + S(-1)/2)*b*Hypergeometric2F1(S(1)/2, S(1)/2 - n, S(3)/2, S(1)/2 - b*cos(c + d*x)/(S(2)*a))*sin(c + d*x)/(d*sqrt(a + b*cos(c + d*x))), x) def replacement2229(a, b, c, d, n, x): return Dist(a**IntPart(n)*(S(1) + b*sin(c + d*x)/a)**(-FracPart(n))*(a + b*sin(c + d*x))**FracPart(n), Int((S(1) + b*sin(c + d*x)/a)**n, x), x) def replacement2230(a, b, c, d, n, x): return Dist(a**IntPart(n)*(S(1) + b*cos(c + d*x)/a)**(-FracPart(n))*(a + b*cos(c + d*x))**FracPart(n), Int((S(1) + b*cos(c + d*x)/a)**n, x), x) def replacement2231(a, b, c, d, x): return Simp(S(2)*sqrt(a + b)*EllipticE(-Pi/S(4) + c/S(2) + d*x/S(2), S(2)*b/(a + b))/d, x) def replacement2232(a, b, c, d, x): return Simp(S(2)*sqrt(a + b)*EllipticE(c/S(2) + d*x/S(2), S(2)*b/(a + b))/d, x) def replacement2233(a, b, c, d, x): return Simp(S(2)*sqrt(a - b)*EllipticE(Pi/S(4) + c/S(2) + d*x/S(2), -S(2)*b/(a - b))/d, x) def replacement2234(a, b, c, d, x): return Simp(S(2)*sqrt(a - b)*EllipticE(Pi/S(2) + c/S(2) + d*x/S(2), -S(2)*b/(a - b))/d, x) def replacement2235(a, b, c, d, x): return Dist(sqrt(a + b*sin(c + d*x))/sqrt((a + b*sin(c + d*x))/(a + b)), Int(sqrt(a/(a + b) + b*sin(c + d*x)/(a + b)), x), x) def replacement2236(a, b, c, d, x): return Dist(sqrt(a + b*cos(c + d*x))/sqrt((a + b*cos(c + d*x))/(a + b)), Int(sqrt(a/(a + b) + b*cos(c + d*x)/(a + b)), x), x) def replacement2237(a, b, c, d, n, x): return Dist(S(1)/n, Int((a + b*sin(c + d*x))**(n + S(-2))*Simp(a**S(2)*n + a*b*(S(2)*n + S(-1))*sin(c + d*x) + b**S(2)*(n + S(-1)), x), x), x) - Simp(b*(a + b*sin(c + d*x))**(n + S(-1))*cos(c + d*x)/(d*n), x) def replacement2238(a, b, c, d, n, x): return Dist(S(1)/n, Int((a + b*cos(c + d*x))**(n + S(-2))*Simp(a**S(2)*n + a*b*(S(2)*n + S(-1))*cos(c + d*x) + b**S(2)*(n + S(-1)), x), x), x) + Simp(b*(a + b*cos(c + d*x))**(n + S(-1))*sin(c + d*x)/(d*n), x) def With2239(a, b, c, d, x): q = Rt(a**S(2) - b**S(2), S(2)) return Simp(x/q, x) + Simp(S(2)*ArcTan(b*cos(c + d*x)/(a + b*sin(c + d*x) + q))/(d*q), x) def With2240(a, b, c, d, x): q = Rt(a**S(2) - b**S(2), S(2)) return Simp(x/q, x) - Simp(S(2)*ArcTan(b*sin(c + d*x)/(a + b*cos(c + d*x) + q))/(d*q), x) def With2241(a, b, c, d, x): q = Rt(a**S(2) - b**S(2), S(2)) return -Simp(x/q, x) - Simp(S(2)*ArcTan(b*cos(c + d*x)/(a + b*sin(c + d*x) - q))/(d*q), x) def With2242(a, b, c, d, x): q = Rt(a**S(2) - b**S(2), S(2)) return -Simp(x/q, x) + Simp(S(2)*ArcTan(b*sin(c + d*x)/(a + b*cos(c + d*x) - q))/(d*q), x) def With2243(a, b, c, d, x): e = FreeFactors(tan(-Pi/S(4) + c/S(2) + d*x/S(2)), x) return Dist(S(2)*e/d, Subst(Int(S(1)/(a + b + e**S(2)*x**S(2)*(a - b)), x), x, tan(-Pi/S(4) + c/S(2) + d*x/S(2))/e), x) def With2244(a, b, c, d, x): e = FreeFactors(tan(c/S(2) + d*x/S(2)), x) return Dist(S(2)*e/d, Subst(Int(S(1)/(a*e**S(2)*x**S(2) + a + S(2)*b*e*x), x), x, tan(c/S(2) + d*x/S(2))/e), x) def With2245(a, b, c, d, x): e = FreeFactors(tan(c/S(2) + d*x/S(2)), x) return Dist(S(2)*e/d, Subst(Int(S(1)/(a + b + e**S(2)*x**S(2)*(a - b)), x), x, tan(c/S(2) + d*x/S(2))/e), x) def replacement2246(a, b, c, d, x): return Simp(S(2)*EllipticF(-Pi/S(4) + c/S(2) + d*x/S(2), S(2)*b/(a + b))/(d*sqrt(a + b)), x) def replacement2247(a, b, c, d, x): return Simp(S(2)*EllipticF(c/S(2) + d*x/S(2), S(2)*b/(a + b))/(d*sqrt(a + b)), x) def replacement2248(a, b, c, d, x): return Simp(S(2)*EllipticF(Pi/S(4) + c/S(2) + d*x/S(2), -S(2)*b/(a - b))/(d*sqrt(a - b)), x) def replacement2249(a, b, c, d, x): return Simp(S(2)*EllipticF(Pi/S(2) + c/S(2) + d*x/S(2), -S(2)*b/(a - b))/(d*sqrt(a - b)), x) def replacement2250(a, b, c, d, x): return Dist(sqrt((a + b*sin(c + d*x))/(a + b))/sqrt(a + b*sin(c + d*x)), Int(S(1)/sqrt(a/(a + b) + b*sin(c + d*x)/(a + b)), x), x) def replacement2251(a, b, c, d, x): return Dist(sqrt((a + b*cos(c + d*x))/(a + b))/sqrt(a + b*cos(c + d*x)), Int(S(1)/sqrt(a/(a + b) + b*cos(c + d*x)/(a + b)), x), x) def replacement2252(a, b, c, d, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(n + S(1))), Int((a + b*sin(c + d*x))**(n + S(1))*Simp(a*(n + S(1)) - b*(n + S(2))*sin(c + d*x), x), x), x) - Simp(b*(a + b*sin(c + d*x))**(n + S(1))*cos(c + d*x)/(d*(a**S(2) - b**S(2))*(n + S(1))), x) def replacement2253(a, b, c, d, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(n + S(1))), Int((a + b*cos(c + d*x))**(n + S(1))*Simp(a*(n + S(1)) - b*(n + S(2))*cos(c + d*x), x), x), x) + Simp(b*(a + b*cos(c + d*x))**(n + S(1))*sin(c + d*x)/(d*(a**S(2) - b**S(2))*(n + S(1))), x) def replacement2254(a, b, c, d, n, x): return Dist(cos(c + d*x)/(d*sqrt(S(1) - sin(c + d*x))*sqrt(sin(c + d*x) + S(1))), Subst(Int((a + b*x)**n/(sqrt(S(1) - x)*sqrt(x + S(1))), x), x, sin(c + d*x)), x) def replacement2255(a, b, c, d, n, x): return -Dist(sin(c + d*x)/(d*sqrt(S(1) - cos(c + d*x))*sqrt(cos(c + d*x) + S(1))), Subst(Int((a + b*x)**n/(sqrt(S(1) - x)*sqrt(x + S(1))), x), x, cos(c + d*x)), x) def replacement2256(a, b, c, d, n, x): return Int((a + b*sin(S(2)*c + S(2)*d*x)/S(2))**n, x) def replacement2257(a, b, e, f, m, p, x): return Dist(b**(-p)/f, Subst(Int((a - x)**(p/S(2) + S(-1)/2)*(a + x)**(m + p/S(2) + S(-1)/2), x), x, b*sin(e + f*x)), x) def replacement2258(a, b, e, f, m, p, x): return -Dist(b**(-p)/f, Subst(Int((a - x)**(p/S(2) + S(-1)/2)*(a + x)**(m + p/S(2) + S(-1)/2), x), x, b*cos(e + f*x)), x) def replacement2259(a, b, e, f, m, p, x): return Dist(b**(-p)/f, Subst(Int((a + x)**m*(b**S(2) - x**S(2))**(p/S(2) + S(-1)/2), x), x, b*sin(e + f*x)), x) def replacement2260(a, b, e, f, m, p, x): return -Dist(b**(-p)/f, Subst(Int((a + x)**m*(b**S(2) - x**S(2))**(p/S(2) + S(-1)/2), x), x, b*cos(e + f*x)), x) def replacement2261(a, b, e, f, g, p, x): return Dist(a, Int((g*cos(e + f*x))**p, x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))/(f*g*(p + S(1))), x) def replacement2262(a, b, e, f, g, p, x): return Dist(a, Int((g*sin(e + f*x))**p, x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))/(f*g*(p + S(1))), x) def replacement2263(a, b, e, f, g, m, p, x): return Dist((a/g)**(S(2)*m), Int((g*cos(e + f*x))**(S(2)*m + p)*(a - b*sin(e + f*x))**(-m), x), x) def replacement2264(a, b, e, f, g, m, p, x): return Dist((a/g)**(S(2)*m), Int((g*sin(e + f*x))**(S(2)*m + p)*(a - b*cos(e + f*x))**(-m), x), x) def replacement2265(a, b, e, f, g, m, p, x): return Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(a*f*g*m), x) def replacement2266(a, b, e, f, g, m, p, x): return -Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(a*f*g*m), x) def replacement2267(a, b, e, f, g, m, p, x): return Dist((m + p + S(1))/(a*(S(2)*m + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(1)), x), x) + Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2268(a, b, e, f, g, m, p, x): return Dist((m + p + S(1))/(a*(S(2)*m + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(1)), x), x) - Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2269(a, b, e, f, g, m, p, x): return Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))/(f*g*(m + S(-1))), x) def replacement2270(a, b, e, f, g, m, p, x): return -Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))/(f*g*(m + S(-1))), x) def replacement2271(a, b, e, f, g, m, p, x): return Dist(a*(S(2)*m + p + S(-1))/(m + p), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(-1)), x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))/(f*g*(m + p)), x) def replacement2272(a, b, e, f, g, m, p, x): return Dist(a*(S(2)*m + p + S(-1))/(m + p), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(-1)), x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))/(f*g*(m + p)), x) def replacement2273(a, b, e, f, g, m, p, x): return Dist(a*(m + p + S(1))/(g**S(2)*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**(m + S(-1)), x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(a*f*g*(p + S(1))), x) def replacement2274(a, b, e, f, g, m, p, x): return Dist(a*(m + p + S(1))/(g**S(2)*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**(m + S(-1)), x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(a*f*g*(p + S(1))), x) def replacement2275(a, b, e, f, g, m, p, x): return Dist(b**S(2)*(S(2)*m + p + S(-1))/(g**S(2)*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**(m + S(-2)), x), x) + Simp(-S(2)*b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))/(f*g*(p + S(1))), x) def replacement2276(a, b, e, f, g, m, p, x): return Dist(b**S(2)*(S(2)*m + p + S(-1))/(g**S(2)*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**(m + S(-2)), x), x) + Simp(S(2)*b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))/(f*g*(p + S(1))), x) def replacement2277(a, b, e, f, g, x): return Dist(a*sqrt(a + b*sin(e + f*x))*sqrt(cos(e + f*x) + S(1))/(a*cos(e + f*x) + a + b*sin(e + f*x)), Int(sqrt(cos(e + f*x) + S(1))/sqrt(g*cos(e + f*x)), x), x) + Dist(b*sqrt(a + b*sin(e + f*x))*sqrt(cos(e + f*x) + S(1))/(a*cos(e + f*x) + a + b*sin(e + f*x)), Int(sin(e + f*x)/(sqrt(g*cos(e + f*x))*sqrt(cos(e + f*x) + S(1))), x), x) def replacement2278(a, b, e, f, g, x): return Dist(a*sqrt(a + b*cos(e + f*x))*sqrt(sin(e + f*x) + S(1))/(a*sin(e + f*x) + a + b*cos(e + f*x)), Int(sqrt(sin(e + f*x) + S(1))/sqrt(g*sin(e + f*x)), x), x) + Dist(b*sqrt(a + b*cos(e + f*x))*sqrt(sin(e + f*x) + S(1))/(a*sin(e + f*x) + a + b*cos(e + f*x)), Int(cos(e + f*x)/(sqrt(g*sin(e + f*x))*sqrt(sin(e + f*x) + S(1))), x), x) def replacement2279(a, b, e, f, g, m, p, x): return Dist(a*(S(2)*m + p + S(-1))/(m + p), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(-1)), x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))/(f*g*(m + p)), x) def replacement2280(a, b, e, f, g, m, p, x): return Dist(a*(S(2)*m + p + S(-1))/(m + p), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(-1)), x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))/(f*g*(m + p)), x) def replacement2281(a, b, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(a*(m + p)), Int((g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**(m + S(1)), x), x) + Simp(g*(g*cos(e + f*x))**(p + S(-1))*(a + b*sin(e + f*x))**(m + S(1))/(b*f*(m + p)), x) def replacement2282(a, b, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(a*(m + p)), Int((g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**(m + S(1)), x), x) - Simp(g*(g*sin(e + f*x))**(p + S(-1))*(a + b*cos(e + f*x))**(m + S(1))/(b*f*(m + p)), x) def replacement2283(a, b, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b**S(2)*(S(2)*m + p + S(1))), Int((g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**(m + S(2)), x), x) + Simp(S(2)*g*(g*cos(e + f*x))**(p + S(-1))*(a + b*sin(e + f*x))**(m + S(1))/(b*f*(S(2)*m + p + S(1))), x) def replacement2284(a, b, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b**S(2)*(S(2)*m + p + S(1))), Int((g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**(m + S(2)), x), x) + Simp(-S(2)*g*(g*sin(e + f*x))**(p + S(-1))*(a + b*cos(e + f*x))**(m + S(1))/(b*f*(S(2)*m + p + S(1))), x) def replacement2285(a, b, e, f, g, m, p, x): return Dist((m + p + S(1))/(a*(S(2)*m + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(1)), x), x) + Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2286(a, b, e, f, g, m, p, x): return Dist((m + p + S(1))/(a*(S(2)*m + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(1)), x), x) - Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2287(a, b, e, f, g, p, x): return Dist(g**S(2)/a, Int((g*cos(e + f*x))**(p + S(-2)), x), x) + Simp(g*(g*cos(e + f*x))**(p + S(-1))/(b*f*(p + S(-1))), x) def replacement2288(a, b, e, f, g, p, x): return Dist(g**S(2)/a, Int((g*sin(e + f*x))**(p + S(-2)), x), x) - Simp(g*(g*sin(e + f*x))**(p + S(-1))/(b*f*(p + S(-1))), x) def replacement2289(a, b, e, f, g, p, x): return Dist(p/(a*(p + S(-1))), Int((g*cos(e + f*x))**p, x), x) + Simp(b*(g*cos(e + f*x))**(p + S(1))/(a*f*g*(a + b*sin(e + f*x))*(p + S(-1))), x) def replacement2290(a, b, e, f, g, p, x): return Dist(p/(a*(p + S(-1))), Int((g*sin(e + f*x))**p, x), x) - Simp(b*(g*sin(e + f*x))**(p + S(1))/(a*f*g*(a + b*cos(e + f*x))*(p + S(-1))), x) def replacement2291(a, b, e, f, g, x): return -Dist(g*sqrt(a + b*sin(e + f*x))*sqrt(cos(e + f*x) + S(1))/(a*sin(e + f*x) + b*cos(e + f*x) + b), Int(sin(e + f*x)/(sqrt(g*cos(e + f*x))*sqrt(cos(e + f*x) + S(1))), x), x) + Dist(g*sqrt(a + b*sin(e + f*x))*sqrt(cos(e + f*x) + S(1))/(a*cos(e + f*x) + a + b*sin(e + f*x)), Int(sqrt(cos(e + f*x) + S(1))/sqrt(g*cos(e + f*x)), x), x) def replacement2292(a, b, e, f, g, x): return Dist(g*sqrt(a + b*cos(e + f*x))*sqrt(sin(e + f*x) + S(1))/(a*sin(e + f*x) + a + b*cos(e + f*x)), Int(sqrt(sin(e + f*x) + S(1))/sqrt(g*sin(e + f*x)), x), x) - Dist(g*sqrt(a + b*cos(e + f*x))*sqrt(sin(e + f*x) + S(1))/(a*cos(e + f*x) + b*sin(e + f*x) + b), Int(cos(e + f*x)/(sqrt(g*sin(e + f*x))*sqrt(sin(e + f*x) + S(1))), x), x) def replacement2293(a, b, e, f, g, x): return Dist(g**S(2)/(S(2)*a), Int(sqrt(a + b*sin(e + f*x))/sqrt(g*cos(e + f*x)), x), x) + Simp(g*sqrt(g*cos(e + f*x))*sqrt(a + b*sin(e + f*x))/(b*f), x) def replacement2294(a, b, e, f, g, x): return Dist(g**S(2)/(S(2)*a), Int(sqrt(a + b*cos(e + f*x))/sqrt(g*sin(e + f*x)), x), x) - Simp(g*sqrt(g*sin(e + f*x))*sqrt(a + b*cos(e + f*x))/(b*f), x) def replacement2295(a, b, e, f, g, p, x): return Dist(S(2)*a*(p + S(-2))/(S(2)*p + S(-1)), Int((g*cos(e + f*x))**p/(a + b*sin(e + f*x))**(S(3)/2), x), x) + Simp(-S(2)*b*(g*cos(e + f*x))**(p + S(1))/(f*g*(a + b*sin(e + f*x))**(S(3)/2)*(S(2)*p + S(-1))), x) def replacement2296(a, b, e, f, g, p, x): return Dist(S(2)*a*(p + S(-2))/(S(2)*p + S(-1)), Int((g*sin(e + f*x))**p/(a + b*cos(e + f*x))**(S(3)/2), x), x) + Simp(S(2)*b*(g*sin(e + f*x))**(p + S(1))/(f*g*(a + b*cos(e + f*x))**(S(3)/2)*(S(2)*p + S(-1))), x) def replacement2297(a, b, e, f, g, p, x): return Dist(a*(S(2)*p + S(1))/(S(2)*g**S(2)*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))/(a + b*sin(e + f*x))**(S(3)/2), x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))/(a*f*g*sqrt(a + b*sin(e + f*x))*(p + S(1))), x) def replacement2298(a, b, e, f, g, p, x): return Dist(a*(S(2)*p + S(1))/(S(2)*g**S(2)*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))/(a + b*cos(e + f*x))**(S(3)/2), x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))/(a*f*g*sqrt(a + b*cos(e + f*x))*(p + S(1))), x) def replacement2299(a, b, e, f, g, m, p, x): return Dist(a**m*(g*cos(e + f*x))**(p + S(1))*(S(1) - sin(e + f*x))**(-p/S(2) + S(-1)/2)*(sin(e + f*x) + S(1))**(-p/S(2) + S(-1)/2)/(f*g), Subst(Int((S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement2300(a, b, e, f, g, m, p, x): return -Dist(a**m*(g*sin(e + f*x))**(p + S(1))*(S(1) - cos(e + f*x))**(-p/S(2) + S(-1)/2)*(cos(e + f*x) + S(1))**(-p/S(2) + S(-1)/2)/(f*g), Subst(Int((S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement2301(a, b, e, f, g, m, p, x): return Dist(a**S(2)*(g*cos(e + f*x))**(p + S(1))*(a - b*sin(e + f*x))**(-p/S(2) + S(-1)/2)*(a + b*sin(e + f*x))**(-p/S(2) + S(-1)/2)/(f*g), Subst(Int((a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement2302(a, b, e, f, g, m, p, x): return -Dist(a**S(2)*(g*sin(e + f*x))**(p + S(1))*(a - b*cos(e + f*x))**(-p/S(2) + S(-1)/2)*(a + b*cos(e + f*x))**(-p/S(2) + S(-1)/2)/(f*g), Subst(Int((a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement2303(a, b, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**(m + S(-1))*(a*(p + S(2)) + b*(m + p + S(2))*sin(e + f*x)), x), x) - Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m*sin(e + f*x)/(f*g*(p + S(1))), x) def replacement2304(a, b, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**(m + S(-1))*(a*(p + S(2)) + b*(m + p + S(2))*cos(e + f*x)), x), x) + Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m*cos(e + f*x)/(f*g*(p + S(1))), x) def replacement2305(a, b, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**(m + S(-2))*(a**S(2)*(p + S(2)) + a*b*(m + p + S(1))*sin(e + f*x) + b**S(2)*(m + S(-1))), x), x) - Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))*(a*sin(e + f*x) + b)/(f*g*(p + S(1))), x) def replacement2306(a, b, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**(m + S(-2))*(a**S(2)*(p + S(2)) + a*b*(m + p + S(1))*cos(e + f*x) + b**S(2)*(m + S(-1))), x), x) + Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))*(a*cos(e + f*x) + b)/(f*g*(p + S(1))), x) def replacement2307(a, b, e, f, g, m, p, x): return Dist(S(1)/(m + p), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(-2))*(a**S(2)*(m + p) + a*b*(S(2)*m + p + S(-1))*sin(e + f*x) + b**S(2)*(m + S(-1))), x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))/(f*g*(m + p)), x) def replacement2308(a, b, e, f, g, m, p, x): return Dist(S(1)/(m + p), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(-2))*(a**S(2)*(m + p) + a*b*(S(2)*m + p + S(-1))*cos(e + f*x) + b**S(2)*(m + S(-1))), x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))/(f*g*(m + p)), x) def replacement2309(a, b, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b*(m + S(1))), Int((g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**(m + S(1))*sin(e + f*x), x), x) + Simp(g*(g*cos(e + f*x))**(p + S(-1))*(a + b*sin(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement2310(a, b, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b*(m + S(1))), Int((g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**(m + S(1))*cos(e + f*x), x), x) - Simp(g*(g*sin(e + f*x))**(p + S(-1))*(a + b*cos(e + f*x))**(m + S(1))/(b*f*(m + S(1))), x) def replacement2311(a, b, e, f, g, m, p, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(1))*(a*(m + S(1)) - b*(m + p + S(2))*sin(e + f*x)), x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(1))/(f*g*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2312(a, b, e, f, g, m, p, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(1))*(a*(m + S(1)) - b*(m + p + S(2))*cos(e + f*x)), x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(1))/(f*g*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2313(a, b, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b*(m + p)), Int((g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**m*(a*sin(e + f*x) + b), x), x) + Simp(g*(g*cos(e + f*x))**(p + S(-1))*(a + b*sin(e + f*x))**(m + S(1))/(b*f*(m + p)), x) def replacement2314(a, b, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b*(m + p)), Int((g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**m*(a*cos(e + f*x) + b), x), x) - Simp(g*(g*sin(e + f*x))**(p + S(-1))*(a + b*cos(e + f*x))**(m + S(1))/(b*f*(m + p)), x) def replacement2315(a, b, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(a**S(2) - b**S(2))*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**m*(a**S(2)*(p + S(2)) + a*b*(m + p + S(3))*sin(e + f*x) - b**S(2)*(m + p + S(2))), x), x) + Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(1))*(-a*sin(e + f*x) + b)/(f*g*(a**S(2) - b**S(2))*(p + S(1))), x) def replacement2316(a, b, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(a**S(2) - b**S(2))*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**m*(a**S(2)*(p + S(2)) + a*b*(m + p + S(3))*cos(e + f*x) - b**S(2)*(m + p + S(2))), x), x) - Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(1))*(-a*cos(e + f*x) + b)/(f*g*(a**S(2) - b**S(2))*(p + S(1))), x) def replacement2317(a, b, e, f, g, x): return Dist(S(2)*sqrt(S(2))*sqrt(g*cos(e + f*x))*sqrt((a + b*sin(e + f*x))/((S(1) - sin(e + f*x))*(a - b)))/(f*g*sqrt((sin(e + f*x) + cos(e + f*x) + S(1))/(-sin(e + f*x) + cos(e + f*x) + S(1)))*sqrt(a + b*sin(e + f*x))), Subst(Int(S(1)/sqrt(x**S(4)*(a + b)/(a - b) + S(1)), x), x, sqrt((sin(e + f*x) + cos(e + f*x) + S(1))/(-sin(e + f*x) + cos(e + f*x) + S(1)))), x) def replacement2318(a, b, e, f, g, x): return Dist(-S(2)*sqrt(S(2))*sqrt(g*sin(e + f*x))*sqrt((a + b*cos(e + f*x))/((S(1) - cos(e + f*x))*(a - b)))/(f*g*sqrt((sin(e + f*x) + cos(e + f*x) + S(1))/(sin(e + f*x) - cos(e + f*x) + S(1)))*sqrt(a + b*cos(e + f*x))), Subst(Int(S(1)/sqrt(x**S(4)*(a + b)/(a - b) + S(1)), x), x, sqrt((sin(e + f*x) + cos(e + f*x) + S(1))/(sin(e + f*x) - cos(e + f*x) + S(1)))), x) def replacement2319(a, b, e, f, g, m, p, x): return Simp(g*(g*cos(e + f*x))**(p + S(-1))*(-(S(1) - sin(e + f*x))*(a - b)/((a + b)*(sin(e + f*x) + S(1))))**(m/S(2))*(S(1) - sin(e + f*x))*(a + b*sin(e + f*x))**(m + S(1))*Hypergeometric2F1(m + S(1), m/S(2) + S(1), m + S(2), S(2)*(a + b*sin(e + f*x))/((a + b)*(sin(e + f*x) + S(1))))/(f*(a + b)*(m + S(1))), x) def replacement2320(a, b, e, f, g, m, p, x): return -Simp(g*(g*sin(e + f*x))**(p + S(-1))*(-(S(1) - cos(e + f*x))*(a - b)/((a + b)*(cos(e + f*x) + S(1))))**(m/S(2))*(S(1) - cos(e + f*x))*(a + b*cos(e + f*x))**(m + S(1))*Hypergeometric2F1(m + S(1), m/S(2) + S(1), m + S(2), S(2)*(a + b*cos(e + f*x))/((a + b)*(cos(e + f*x) + S(1))))/(f*(a + b)*(m + S(1))), x) def replacement2321(a, b, e, f, g, m, p, x): return Dist(a/(g**S(2)*(a - b)), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**m/(S(1) - sin(e + f*x)), x), x) + Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(1))/(f*g*(a - b)*(p + S(1))), x) def replacement2322(a, b, e, f, g, m, p, x): return Dist(a/(g**S(2)*(a - b)), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**m/(S(1) - cos(e + f*x)), x), x) - Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(1))/(f*g*(a - b)*(p + S(1))), x) def replacement2323(a, b, e, f, g, m, p, x): return Dist(a/(g**S(2)*(a - b)), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**m/(S(1) - sin(e + f*x)), x), x) - Dist(b*(m + p + S(2))/(g**S(2)*(a - b)*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**m, x), x) + Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(1))/(f*g*(a - b)*(p + S(1))), x) def replacement2324(a, b, e, f, g, m, p, x): return Dist(a/(g**S(2)*(a - b)), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**m/(S(1) - cos(e + f*x)), x), x) - Dist(b*(m + p + S(2))/(g**S(2)*(a - b)*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**m, x), x) - Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(1))/(f*g*(a - b)*(p + S(1))), x) def With2325(a, b, e, f, g, x): q = Rt(-a**S(2) + b**S(2), S(2)) return -Dist(a*g/(S(2)*b), Int(S(1)/(sqrt(g*cos(e + f*x))*(-b*cos(e + f*x) + q)), x), x) + Dist(a*g/(S(2)*b), Int(S(1)/(sqrt(g*cos(e + f*x))*(b*cos(e + f*x) + q)), x), x) + Dist(b*g/f, Subst(Int(sqrt(x)/(b**S(2)*x**S(2) + g**S(2)*(a**S(2) - b**S(2))), x), x, g*cos(e + f*x)), x) def With2326(a, b, e, f, g, x): q = Rt(-a**S(2) + b**S(2), S(2)) return -Dist(a*g/(S(2)*b), Int(S(1)/(sqrt(g*sin(e + f*x))*(-b*sin(e + f*x) + q)), x), x) + Dist(a*g/(S(2)*b), Int(S(1)/(sqrt(g*sin(e + f*x))*(b*sin(e + f*x) + q)), x), x) - Dist(b*g/f, Subst(Int(sqrt(x)/(b**S(2)*x**S(2) + g**S(2)*(a**S(2) - b**S(2))), x), x, g*sin(e + f*x)), x) def With2327(a, b, e, f, g, x): q = Rt(-a**S(2) + b**S(2), S(2)) return -Dist(a/(S(2)*q), Int(S(1)/(sqrt(g*cos(e + f*x))*(-b*cos(e + f*x) + q)), x), x) - Dist(a/(S(2)*q), Int(S(1)/(sqrt(g*cos(e + f*x))*(b*cos(e + f*x) + q)), x), x) + Dist(b*g/f, Subst(Int(S(1)/(sqrt(x)*(b**S(2)*x**S(2) + g**S(2)*(a**S(2) - b**S(2)))), x), x, g*cos(e + f*x)), x) def With2328(a, b, e, f, g, x): q = Rt(-a**S(2) + b**S(2), S(2)) return -Dist(a/(S(2)*q), Int(S(1)/(sqrt(g*sin(e + f*x))*(-b*sin(e + f*x) + q)), x), x) - Dist(a/(S(2)*q), Int(S(1)/(sqrt(g*sin(e + f*x))*(b*sin(e + f*x) + q)), x), x) - Dist(b*g/f, Subst(Int(S(1)/(sqrt(x)*(b**S(2)*x**S(2) + g**S(2)*(a**S(2) - b**S(2)))), x), x, g*sin(e + f*x)), x) def replacement2329(a, b, e, f, g, m, p, x): return Simp(g*(g*cos(e + f*x))**(p + S(-1))*(b*(sin(e + f*x) + S(1))/(a + b*sin(e + f*x)))**(S(1)/2 - p/S(2))*(-b*(S(1) - sin(e + f*x))/(a + b*sin(e + f*x)))**(S(1)/2 - p/S(2))*(a + b*sin(e + f*x))**(m + S(1))*AppellF1(-m - p, S(1)/2 - p/S(2), S(1)/2 - p/S(2), -m - p + S(1), (a + b)/(a + b*sin(e + f*x)), (a - b)/(a + b*sin(e + f*x)))/(b*f*(m + p)), x) def replacement2330(a, b, e, f, g, m, p, x): return -Simp(g*(g*sin(e + f*x))**(p + S(-1))*(b*(cos(e + f*x) + S(1))/(a + b*cos(e + f*x)))**(S(1)/2 - p/S(2))*(-b*(S(1) - cos(e + f*x))/(a + b*cos(e + f*x)))**(S(1)/2 - p/S(2))*(a + b*cos(e + f*x))**(m + S(1))*AppellF1(-m - p, S(1)/2 - p/S(2), S(1)/2 - p/S(2), -m - p + S(1), (a + b)/(a + b*cos(e + f*x)), (a - b)/(a + b*cos(e + f*x)))/(b*f*(m + p)), x) def replacement2331(a, b, e, f, g, m, p, x): return Dist(g*(g*cos(e + f*x))**(p + S(-1))*(S(1) - (a + b*sin(e + f*x))/(a - b))**(S(1)/2 - p/S(2))*(S(1) - (a + b*sin(e + f*x))/(a + b))**(S(1)/2 - p/S(2))/f, Subst(Int((a + b*x)**m*(-b*x/(a - b) - b/(a - b))**(p/S(2) + S(-1)/2)*(-b*x/(a + b) + b/(a + b))**(p/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement2332(a, b, e, f, g, m, p, x): return -Dist(g*(g*sin(e + f*x))**(p + S(-1))*(S(1) - (a + b*cos(e + f*x))/(a - b))**(S(1)/2 - p/S(2))*(S(1) - (a + b*cos(e + f*x))/(a + b))**(S(1)/2 - p/S(2))/f, Subst(Int((a + b*x)**m*(-b*x/(a - b) - b/(a - b))**(p/S(2) + S(-1)/2)*(-b*x/(a + b) + b/(a + b))**(p/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement2333(a, b, e, f, g, m, p, x): return Dist(g**(S(2)*IntPart(p))*(g/cos(e + f*x))**FracPart(p)*(g*cos(e + f*x))**FracPart(p), Int((g*cos(e + f*x))**(-p)*(a + b*sin(e + f*x))**m, x), x) def replacement2334(a, b, e, f, g, m, p, x): return Dist(g**(S(2)*IntPart(p))*(g/sin(e + f*x))**FracPart(p)*(g*sin(e + f*x))**FracPart(p), Int((g*sin(e + f*x))**(-p)*(a + b*cos(e + f*x))**m, x), x) def replacement2335(a, b, e, f, g, p, x): return Dist(S(1)/a, Int((g*tan(e + f*x))**p/cos(e + f*x)**S(2), x), x) - Dist(S(1)/(b*g), Int((g*tan(e + f*x))**(p + S(1))/cos(e + f*x), x), x) def replacement2336(a, b, e, f, g, p, x): return Dist(S(1)/a, Int((g/tan(e + f*x))**p/sin(e + f*x)**S(2), x), x) - Dist(S(1)/(b*g), Int((g/tan(e + f*x))**(p + S(1))/sin(e + f*x), x), x) def replacement2337(a, b, e, f, m, p, x): return Dist(S(1)/f, Subst(Int(x**p*(a - x)**(-p/S(2) + S(-1)/2)*(a + x)**(m - p/S(2) + S(-1)/2), x), x, b*sin(e + f*x)), x) def replacement2338(a, b, e, f, m, p, x): return -Dist(S(1)/f, Subst(Int(x**p*(a - x)**(-p/S(2) + S(-1)/2)*(a + x)**(m - p/S(2) + S(-1)/2), x), x, b*cos(e + f*x)), x) def replacement2339(a, b, e, f, m, p, x): return Dist(a**p, Int((a - b*sin(e + f*x))**(-m)*sin(e + f*x)**p, x), x) def replacement2340(a, b, e, f, m, p, x): return Dist(a**p, Int((a - b*cos(e + f*x))**(-m)*cos(e + f*x)**p, x), x) def replacement2341(a, b, e, f, m, p, x): return Dist(a**p, Int(ExpandIntegrand((a - b*sin(e + f*x))**(-p/S(2))*(a + b*sin(e + f*x))**(m - p/S(2))*sin(e + f*x)**p, x), x), x) def replacement2342(a, b, e, f, m, p, x): return Dist(a**p, Int(ExpandIntegrand((a - b*cos(e + f*x))**(-p/S(2))*(a + b*cos(e + f*x))**(m - p/S(2))*cos(e + f*x)**p, x), x), x) def replacement2343(a, b, e, f, g, m, p, x): return Int(ExpandIntegrand((g*tan(e + f*x))**p, (a + b*sin(e + f*x))**m, x), x) def replacement2344(a, b, e, f, g, m, p, x): return Int(ExpandIntegrand((g/tan(e + f*x))**p, (a + b*cos(e + f*x))**m, x), x) def replacement2345(a, b, e, f, g, m, p, x): return Dist(a**(S(2)*m), Int(ExpandIntegrand((g*tan(e + f*x))**p*(S(1)/cos(e + f*x))**(-m), (a/cos(e + f*x) - b*tan(e + f*x))**(-m), x), x), x) def replacement2346(a, b, e, f, g, m, p, x): return Dist(a**(S(2)*m), Int(ExpandIntegrand((g/tan(e + f*x))**p*(S(1)/sin(e + f*x))**(-m), (a/sin(e + f*x) - b/tan(e + f*x))**(-m), x), x), x) def replacement2347(a, b, e, f, m, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + S(-1))), Int((a + b*sin(e + f*x))**(m + S(1))*(a*m - b*(S(2)*m + S(-1))*sin(e + f*x))/cos(e + f*x)**S(2), x), x) + Simp(b*(a + b*sin(e + f*x))**m/(a*f*(S(2)*m + S(-1))*cos(e + f*x)), x) def replacement2348(a, b, e, f, m, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + S(-1))), Int((a + b*cos(e + f*x))**(m + S(1))*(a*m - b*(S(2)*m + S(-1))*cos(e + f*x))/sin(e + f*x)**S(2), x), x) - Simp(b*(a + b*cos(e + f*x))**m/(a*f*(S(2)*m + S(-1))*sin(e + f*x)), x) def replacement2349(a, b, e, f, m, x): return Dist(S(1)/(b*m), Int((a + b*sin(e + f*x))**m*(a*sin(e + f*x) + b*(m + S(1)))/cos(e + f*x)**S(2), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))/(b*f*m*cos(e + f*x)), x) def replacement2350(a, b, e, f, m, x): return Dist(S(1)/(b*m), Int((a + b*cos(e + f*x))**m*(a*cos(e + f*x) + b*(m + S(1)))/sin(e + f*x)**S(2), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))/(b*f*m*sin(e + f*x)), x) def replacement2351(a, b, e, f, m, x): return -Int((S(1) - S(2)*sin(e + f*x)**S(2))*(a + b*sin(e + f*x))**m/cos(e + f*x)**S(4), x) + Int((a + b*sin(e + f*x))**m, x) def replacement2352(a, b, e, f, m, x): return -Int((S(1) - S(2)*cos(e + f*x)**S(2))*(a + b*cos(e + f*x))**m/sin(e + f*x)**S(4), x) + Int((a + b*cos(e + f*x))**m, x) def replacement2353(a, b, e, f, m, x): return Dist(b**(S(-2)), Int((a + b*sin(e + f*x))**(m + S(1))*(-a*(m + S(1))*sin(e + f*x) + b*m)/sin(e + f*x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))/(a*f*tan(e + f*x)), x) def replacement2354(a, b, e, f, m, x): return Dist(b**(S(-2)), Int((a + b*cos(e + f*x))**(m + S(1))*(-a*(m + S(1))*cos(e + f*x) + b*m)/cos(e + f*x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*tan(e + f*x)/(a*f), x) def replacement2355(a, b, e, f, m, x): return Dist(S(1)/a, Int((a + b*sin(e + f*x))**m*(-a*(m + S(1))*sin(e + f*x) + b*m)/sin(e + f*x), x), x) - Simp((a + b*sin(e + f*x))**m/(f*tan(e + f*x)), x) def replacement2356(a, b, e, f, m, x): return Dist(S(1)/a, Int((a + b*cos(e + f*x))**m*(-a*(m + S(1))*cos(e + f*x) + b*m)/cos(e + f*x), x), x) + Simp((a + b*cos(e + f*x))**m*tan(e + f*x)/f, x) def replacement2357(a, b, e, f, m, x): return Dist(a**(S(-2)), Int((a + b*sin(e + f*x))**(m + S(2))*(sin(e + f*x)**S(2) + S(1))/sin(e + f*x)**S(4), x), x) + Dist(-S(2)/(a*b), Int((a + b*sin(e + f*x))**(m + S(2))/sin(e + f*x)**S(3), x), x) def replacement2358(a, b, e, f, m, x): return Dist(a**(S(-2)), Int((a + b*cos(e + f*x))**(m + S(2))*(cos(e + f*x)**S(2) + S(1))/cos(e + f*x)**S(4), x), x) + Dist(-S(2)/(a*b), Int((a + b*cos(e + f*x))**(m + S(2))/cos(e + f*x)**S(3), x), x) def replacement2359(a, b, e, f, m, x): return Int((S(1) - S(2)*sin(e + f*x)**S(2))*(a + b*sin(e + f*x))**m/sin(e + f*x)**S(4), x) + Int((a + b*sin(e + f*x))**m, x) def replacement2360(a, b, e, f, m, x): return Int((S(1) - S(2)*cos(e + f*x)**S(2))*(a + b*cos(e + f*x))**m/cos(e + f*x)**S(4), x) + Int((a + b*cos(e + f*x))**m, x) def replacement2361(a, b, e, f, m, p, x): return Dist(sqrt(a - b*sin(e + f*x))*sqrt(a + b*sin(e + f*x))/(b*f*cos(e + f*x)), Subst(Int(x**p*(a - x)**(-p/S(2) + S(-1)/2)*(a + x)**(m - p/S(2) + S(-1)/2), x), x, b*sin(e + f*x)), x) def replacement2362(a, b, e, f, m, p, x): return -Dist(sqrt(a - b*cos(e + f*x))*sqrt(a + b*cos(e + f*x))/(b*f*sin(e + f*x)), Subst(Int(x**p*(a - x)**(-p/S(2) + S(-1)/2)*(a + x)**(m - p/S(2) + S(-1)/2), x), x, b*cos(e + f*x)), x) def replacement2363(a, b, e, f, g, m, p, x): return Dist((b*sin(e + f*x))**(-p + S(-1))*(g*tan(e + f*x))**(p + S(1))*(a - b*sin(e + f*x))**(p/S(2) + S(1)/2)*(a + b*sin(e + f*x))**(p/S(2) + S(1)/2)/(f*g), Subst(Int(x**p*(a - x)**(-p/S(2) + S(-1)/2)*(a + x)**(m - p/S(2) + S(-1)/2), x), x, b*sin(e + f*x)), x) def replacement2364(a, b, e, f, g, m, p, x): return -Dist((b*cos(e + f*x))**(-p + S(-1))*(g/tan(e + f*x))**(p + S(1))*(a - b*cos(e + f*x))**(p/S(2) + S(1)/2)*(a + b*cos(e + f*x))**(p/S(2) + S(1)/2)/(f*g), Subst(Int(x**p*(a - x)**(-p/S(2) + S(-1)/2)*(a + x)**(m - p/S(2) + S(-1)/2), x), x, b*cos(e + f*x)), x) def replacement2365(a, b, e, f, m, p, x): return Dist(S(1)/f, Subst(Int(x**p*(a + x)**m*(b**S(2) - x**S(2))**(-p/S(2) + S(-1)/2), x), x, b*sin(e + f*x)), x) def replacement2366(a, b, e, f, m, p, x): return -Dist(S(1)/f, Subst(Int(x**p*(a + x)**m*(b**S(2) - x**S(2))**(-p/S(2) + S(-1)/2), x), x, b*cos(e + f*x)), x) def replacement2367(a, b, e, f, g, m, p, x): return Int(ExpandIntegrand((g*tan(e + f*x))**p, (a + b*sin(e + f*x))**m, x), x) def replacement2368(a, b, e, f, g, m, p, x): return Int(ExpandIntegrand((g/tan(e + f*x))**p, (a + b*cos(e + f*x))**m, x), x) def replacement2369(a, b, e, f, m, x): return Int((S(1) - sin(e + f*x)**S(2))*(a + b*sin(e + f*x))**m/sin(e + f*x)**S(2), x) def replacement2370(a, b, e, f, m, x): return Int((S(1) - cos(e + f*x)**S(2))*(a + b*cos(e + f*x))**m/cos(e + f*x)**S(2), x) def replacement2371(a, b, e, f, m, x): return -Dist(S(1)/(S(3)*a**S(2)*b*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(S(6)*a**S(2) + a*b*(m + S(1))*sin(e + f*x) - b**S(2)*(m + S(-2))*(m + S(-1)) - (S(3)*a**S(2) - b**S(2)*m*(m + S(-2)))*sin(e + f*x)**S(2), x)/sin(e + f*x)**S(3), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(S(3)*a*f*sin(e + f*x)**S(3)), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(S(3)*a**S(2) + b**S(2)*(m + S(-2)))*cos(e + f*x)/(S(3)*a**S(2)*b*f*(m + S(1))*sin(e + f*x)**S(2)), x) def replacement2372(a, b, e, f, m, x): return -Dist(S(1)/(S(3)*a**S(2)*b*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(S(6)*a**S(2) + a*b*(m + S(1))*cos(e + f*x) - b**S(2)*(m + S(-2))*(m + S(-1)) - (S(3)*a**S(2) - b**S(2)*m*(m + S(-2)))*cos(e + f*x)**S(2), x)/cos(e + f*x)**S(3), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(S(3)*a*f*cos(e + f*x)**S(3)), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(S(3)*a**S(2) + b**S(2)*(m + S(-2)))*sin(e + f*x)/(S(3)*a**S(2)*b*f*(m + S(1))*cos(e + f*x)**S(2)), x) def replacement2373(a, b, e, f, m, x): return -Dist(S(1)/(S(6)*a**S(2)), Int((a + b*sin(e + f*x))**m*Simp(S(8)*a**S(2) + a*b*m*sin(e + f*x) - b**S(2)*(m + S(-2))*(m + S(-1)) - (S(6)*a**S(2) - b**S(2)*m*(m + S(-2)))*sin(e + f*x)**S(2), x)/sin(e + f*x)**S(2), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(S(3)*a*f*sin(e + f*x)**S(3)), x) - Simp(b*(a + b*sin(e + f*x))**(m + S(1))*(m + S(-2))*cos(e + f*x)/(S(6)*a**S(2)*f*sin(e + f*x)**S(2)), x) def replacement2374(a, b, e, f, m, x): return -Dist(S(1)/(S(6)*a**S(2)), Int((a + b*cos(e + f*x))**m*Simp(S(8)*a**S(2) + a*b*m*cos(e + f*x) - b**S(2)*(m + S(-2))*(m + S(-1)) - (S(6)*a**S(2) - b**S(2)*m*(m + S(-2)))*cos(e + f*x)**S(2), x)/cos(e + f*x)**S(2), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(S(3)*a*f*cos(e + f*x)**S(3)), x) + Simp(b*(a + b*cos(e + f*x))**(m + S(1))*(m + S(-2))*sin(e + f*x)/(S(6)*a**S(2)*f*cos(e + f*x)**S(2)), x) def replacement2375(a, b, e, f, m, x): return Dist(S(1)/(S(20)*a**S(2)*b**S(2)*m*(m + S(-1))), Int((a + b*sin(e + f*x))**m*Simp(S(60)*a**S(4) - S(44)*a**S(2)*b**S(2)*m*(m + S(-1)) + a*b*m*(S(20)*a**S(2) - b**S(2)*m*(m + S(-1)))*sin(e + f*x) + b**S(4)*m*(m + S(-4))*(m + S(-3))*(m + S(-1)) - (S(40)*a**S(4) - S(20)*a**S(2)*b**S(2)*(m + S(-1))*(S(2)*m + S(1)) + b**S(4)*m*(m + S(-4))*(m + S(-2))*(m + S(-1)))*sin(e + f*x)**S(2), x)/sin(e + f*x)**S(4), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(S(5)*a*f*sin(e + f*x)**S(5)), x) + Simp((a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*m*sin(e + f*x)**S(2)), x) - Simp(b*(a + b*sin(e + f*x))**(m + S(1))*(m + S(-4))*cos(e + f*x)/(S(20)*a**S(2)*f*sin(e + f*x)**S(4)), x) + Simp(a*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b**S(2)*f*m*(m + S(-1))*sin(e + f*x)**S(3)), x) def replacement2376(a, b, e, f, m, x): return Dist(S(1)/(S(20)*a**S(2)*b**S(2)*m*(m + S(-1))), Int((a + b*cos(e + f*x))**m*Simp(S(60)*a**S(4) - S(44)*a**S(2)*b**S(2)*m*(m + S(-1)) + a*b*m*(S(20)*a**S(2) - b**S(2)*m*(m + S(-1)))*cos(e + f*x) + b**S(4)*m*(m + S(-4))*(m + S(-3))*(m + S(-1)) - (S(40)*a**S(4) - S(20)*a**S(2)*b**S(2)*(m + S(-1))*(S(2)*m + S(1)) + b**S(4)*m*(m + S(-4))*(m + S(-2))*(m + S(-1)))*cos(e + f*x)**S(2), x)/cos(e + f*x)**S(4), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(S(5)*a*f*cos(e + f*x)**S(5)), x) - Simp((a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*m*cos(e + f*x)**S(2)), x) + Simp(b*(a + b*cos(e + f*x))**(m + S(1))*(m + S(-4))*sin(e + f*x)/(S(20)*a**S(2)*f*cos(e + f*x)**S(4)), x) - Simp(a*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b**S(2)*f*m*(m + S(-1))*cos(e + f*x)**S(3)), x) def replacement2377(a, b, e, f, g, p, x): return Dist(a/(a**S(2) - b**S(2)), Int((g*tan(e + f*x))**p/sin(e + f*x)**S(2), x), x) - Dist(a**S(2)*g**S(2)/(a**S(2) - b**S(2)), Int((g*tan(e + f*x))**(p + S(-2))/(a + b*sin(e + f*x)), x), x) - Dist(b*g/(a**S(2) - b**S(2)), Int((g*tan(e + f*x))**(p + S(-1))/cos(e + f*x), x), x) def replacement2378(a, b, e, f, g, p, x): return Dist(a/(a**S(2) - b**S(2)), Int((g/tan(e + f*x))**p/cos(e + f*x)**S(2), x), x) - Dist(a**S(2)*g**S(2)/(a**S(2) - b**S(2)), Int((g/tan(e + f*x))**(p + S(-2))/(a + b*cos(e + f*x)), x), x) - Dist(b*g/(a**S(2) - b**S(2)), Int((g/tan(e + f*x))**(p + S(-1))/sin(e + f*x), x), x) def replacement2379(a, b, e, f, g, p, x): return Dist(S(1)/a, Int((g*tan(e + f*x))**p/cos(e + f*x)**S(2), x), x) - Dist(b/(a**S(2)*g), Int((g*tan(e + f*x))**(p + S(1))/cos(e + f*x), x), x) - Dist((a**S(2) - b**S(2))/(a**S(2)*g**S(2)), Int((g*tan(e + f*x))**(p + S(2))/(a + b*sin(e + f*x)), x), x) def replacement2380(a, b, e, f, g, p, x): return Dist(S(1)/a, Int((g/tan(e + f*x))**p/sin(e + f*x)**S(2), x), x) - Dist(b/(a**S(2)*g), Int((g/tan(e + f*x))**(p + S(1))/sin(e + f*x), x), x) - Dist((a**S(2) - b**S(2))/(a**S(2)*g**S(2)), Int((g/tan(e + f*x))**(p + S(2))/(a + b*cos(e + f*x)), x), x) def replacement2381(a, b, e, f, g, x): return Dist(sqrt(g*tan(e + f*x))*sqrt(cos(e + f*x))/sqrt(sin(e + f*x)), Int(sqrt(sin(e + f*x))/((a + b*sin(e + f*x))*sqrt(cos(e + f*x))), x), x) def replacement2382(a, b, e, f, g, x): return Dist(sqrt(g/tan(e + f*x))*sqrt(sin(e + f*x))/sqrt(cos(e + f*x)), Int(sqrt(cos(e + f*x))/((a + b*cos(e + f*x))*sqrt(sin(e + f*x))), x), x) def replacement2383(a, b, e, f, g, x): return Dist(sqrt(sin(e + f*x))/(sqrt(g*tan(e + f*x))*sqrt(cos(e + f*x))), Int(sqrt(cos(e + f*x))/((a + b*sin(e + f*x))*sqrt(sin(e + f*x))), x), x) def replacement2384(a, b, e, f, g, x): return Dist(sqrt(cos(e + f*x))/(sqrt(g/tan(e + f*x))*sqrt(sin(e + f*x))), Int(sqrt(sin(e + f*x))/((a + b*cos(e + f*x))*sqrt(cos(e + f*x))), x), x) def replacement2385(a, b, e, f, m, p, x): return Int(ExpandIntegrand((S(1) - sin(e + f*x)**S(2))**(-p/S(2))*(a + b*sin(e + f*x))**m*sin(e + f*x)**p, x), x) def replacement2386(a, b, e, f, m, p, x): return Int(ExpandIntegrand((S(1) - cos(e + f*x)**S(2))**(-p/S(2))*(a + b*cos(e + f*x))**m*cos(e + f*x)**p, x), x) def replacement2387(a, b, e, f, g, m, p, x): return Int((g*tan(e + f*x))**p*(a + b*sin(e + f*x))**m, x) def replacement2388(a, b, e, f, g, m, p, x): return Int((g/tan(e + f*x))**p*(a + b*cos(e + f*x))**m, x) def replacement2389(a, b, e, f, g, m, p, x): return Dist(g**(S(2)*IntPart(p))*(g/tan(e + f*x))**FracPart(p)*(g*tan(e + f*x))**FracPart(p), Int((g*tan(e + f*x))**(-p)*(a + b*sin(e + f*x))**m, x), x) def replacement2390(a, b, e, f, g, m, p, x): return Dist(g**(S(2)*IntPart(p))*(g/tan(e + f*x))**FracPart(p)*(g*tan(e + f*x))**FracPart(p), Int((g/tan(e + f*x))**(-p)*(a + b*cos(e + f*x))**m, x), x) def replacement2391(a, b, c, d, e, f, x): return Simp(x*(S(2)*a*c + b*d)/S(2), x) - Simp((a*d + b*c)*cos(e + f*x)/f, x) - Simp(b*d*sin(e + f*x)*cos(e + f*x)/(S(2)*f), x) def replacement2392(a, b, c, d, e, f, x): return Simp(x*(S(2)*a*c + b*d)/S(2), x) + Simp((a*d + b*c)*sin(e + f*x)/f, x) + Simp(b*d*sin(e + f*x)*cos(e + f*x)/(S(2)*f), x) def replacement2393(a, b, c, d, e, f, x): return -Dist((-a*d + b*c)/d, Int(S(1)/(c + d*sin(e + f*x)), x), x) + Simp(b*x/d, x) def replacement2394(a, b, c, d, e, f, x): return -Dist((-a*d + b*c)/d, Int(S(1)/(c + d*cos(e + f*x)), x), x) + Simp(b*x/d, x) def replacement2395(a, b, c, d, e, f, m, n, x): return Dist(a**m*c**m, Int((c + d*sin(e + f*x))**(-m + n)*cos(e + f*x)**(S(2)*m), x), x) def replacement2396(a, b, c, d, e, f, m, n, x): return Dist(a**m*c**m, Int((c + d*cos(e + f*x))**(-m + n)*sin(e + f*x)**(S(2)*m), x), x) def replacement2397(a, b, c, d, e, f, x): return Dist(a*c*cos(e + f*x)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), Int(cos(e + f*x)/(c + d*sin(e + f*x)), x), x) def replacement2398(a, b, c, d, e, f, x): return Dist(a*c*sin(e + f*x)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), Int(sin(e + f*x)/(c + d*cos(e + f*x)), x), x) def replacement2399(a, b, c, d, e, f, n, x): return Simp(-S(2)*b*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*sqrt(a + b*sin(e + f*x))*(S(2)*n + S(1))), x) def replacement2400(a, b, c, d, e, f, n, x): return Simp(S(2)*b*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*sqrt(a + b*cos(e + f*x))*(S(2)*n + S(1))), x) def replacement2401(a, b, c, d, e, f, m, n, x): return -Dist(b*(S(2)*m + S(-1))/(d*(S(2)*n + S(1))), Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1)), x), x) + Simp(-S(2)*b*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*(S(2)*n + S(1))), x) def replacement2402(a, b, c, d, e, f, m, n, x): return -Dist(b*(S(2)*m + S(-1))/(d*(S(2)*n + S(1))), Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1)), x), x) + Simp(S(2)*b*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*(S(2)*n + S(1))), x) def replacement2403(a, b, c, d, e, f, m, n, x): return Dist(a*(S(2)*m + S(-1))/(m + n), Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n, x), x) - Simp(b*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*(m + n)), x) def replacement2404(a, b, c, d, e, f, m, n, x): return Dist(a*(S(2)*m + S(-1))/(m + n), Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n, x), x) + Simp(b*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*(m + n)), x) def replacement2405(a, b, c, d, e, f, x): return Dist(cos(e + f*x)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), Int(S(1)/cos(e + f*x), x), x) def replacement2406(a, b, c, d, e, f, x): return Dist(sin(e + f*x)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), Int(S(1)/sin(e + f*x), x), x) def replacement2407(a, b, c, d, e, f, m, n, x): return Simp(b*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2408(a, b, c, d, e, f, m, n, x): return -Simp(b*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2409(a, b, c, d, e, f, m, n, x): return Dist((m + n + S(1))/(a*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n, x), x) + Simp(b*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2410(a, b, c, d, e, f, m, n, x): return Dist((m + n + S(1))/(a*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n, x), x) - Simp(b*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2411(a, b, c, d, e, f, m, n, x): return Dist((m + n + S(1))/(a*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n, x), x) + Simp(b*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2412(a, b, c, d, e, f, m, n, x): return Dist((m + n + S(1))/(a*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n, x), x) - Simp(b*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2413(a, b, c, d, e, f, m, n, x): return Dist(a**IntPart(m)*c**IntPart(m)*(a + b*sin(e + f*x))**FracPart(m)*(c + d*sin(e + f*x))**FracPart(m)*cos(e + f*x)**(-S(2)*FracPart(m)), Int((c + d*sin(e + f*x))**(-m + n)*cos(e + f*x)**(S(2)*m), x), x) def replacement2414(a, b, c, d, e, f, m, n, x): return Dist(a**IntPart(m)*c**IntPart(m)*(a + b*cos(e + f*x))**FracPart(m)*(c + d*cos(e + f*x))**FracPart(m)*sin(e + f*x)**(-S(2)*FracPart(m)), Int((c + d*cos(e + f*x))**(-m + n)*sin(e + f*x)**(S(2)*m), x), x) def replacement2415(a, b, c, d, e, f, x): return Dist(S(1)/d, Int(Simp(a**S(2)*d - b*(-S(2)*a*d + b*c)*sin(e + f*x), x)/(c + d*sin(e + f*x)), x), x) - Simp(b**S(2)*cos(e + f*x)/(d*f), x) def replacement2416(a, b, c, d, e, f, x): return Dist(S(1)/d, Int(Simp(a**S(2)*d - b*(-S(2)*a*d + b*c)*cos(e + f*x), x)/(c + d*cos(e + f*x)), x), x) + Simp(b**S(2)*sin(e + f*x)/(d*f), x) def replacement2417(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/(a + b*sin(e + f*x)), x), x) - Dist(d/(-a*d + b*c), Int(S(1)/(c + d*sin(e + f*x)), x), x) def replacement2418(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/(a + b*cos(e + f*x)), x), x) - Dist(d/(-a*d + b*c), Int(S(1)/(c + d*cos(e + f*x)), x), x) def replacement2419(b, c, d, e, f, m, x): return Dist(c, Int((b*sin(e + f*x))**m, x), x) + Dist(d/b, Int((b*sin(e + f*x))**(m + S(1)), x), x) def replacement2420(b, c, d, e, f, m, x): return Dist(c, Int((b*cos(e + f*x))**m, x), x) + Dist(d/b, Int((b*cos(e + f*x))**(m + S(1)), x), x) def replacement2421(a, b, c, d, e, f, m, x): return -Simp(d*(a + b*sin(e + f*x))**m*cos(e + f*x)/(f*(m + S(1))), x) def replacement2422(a, b, c, d, e, f, m, x): return Simp(d*(a + b*cos(e + f*x))**m*sin(e + f*x)/(f*(m + S(1))), x) def replacement2423(a, b, c, d, e, f, m, x): return Dist((a*d*m + b*c*(m + S(1)))/(a*b*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1)), x), x) + Simp((a + b*sin(e + f*x))**m*(-a*d + b*c)*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2424(a, b, c, d, e, f, m, x): return Dist((a*d*m + b*c*(m + S(1)))/(a*b*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1)), x), x) - Simp((a + b*cos(e + f*x))**m*(-a*d + b*c)*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2425(a, b, c, d, e, f, m, x): return Dist((a*d*m + b*c*(m + S(1)))/(b*(m + S(1))), Int((a + b*sin(e + f*x))**m, x), x) - Simp(d*(a + b*sin(e + f*x))**m*cos(e + f*x)/(f*(m + S(1))), x) def replacement2426(a, b, c, d, e, f, m, x): return Dist((a*d*m + b*c*(m + S(1)))/(b*(m + S(1))), Int((a + b*cos(e + f*x))**m, x), x) + Simp(d*(a + b*cos(e + f*x))**m*sin(e + f*x)/(f*(m + S(1))), x) def replacement2427(a, b, c, d, e, f, x): return Dist(d/b, Int(sqrt(a + b*sin(e + f*x)), x), x) + Dist((-a*d + b*c)/b, Int(S(1)/sqrt(a + b*sin(e + f*x)), x), x) def replacement2428(a, b, c, d, e, f, x): return Dist(d/b, Int(sqrt(a + b*cos(e + f*x)), x), x) + Dist((-a*d + b*c)/b, Int(S(1)/sqrt(a + b*cos(e + f*x)), x), x) def replacement2429(a, b, c, d, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((a + b*sin(e + f*x))**(m + S(-1))*Simp(a*c*(m + S(1)) + b*d*m + (a*d*m + b*c*(m + S(1)))*sin(e + f*x), x), x), x) - Simp(d*(a + b*sin(e + f*x))**m*cos(e + f*x)/(f*(m + S(1))), x) def replacement2430(a, b, c, d, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((a + b*cos(e + f*x))**(m + S(-1))*Simp(a*c*(m + S(1)) + b*d*m + (a*d*m + b*c*(m + S(1)))*cos(e + f*x), x), x), x) + Simp(d*(a + b*cos(e + f*x))**m*sin(e + f*x)/(f*(m + S(1))), x) def replacement2431(a, b, c, d, e, f, m, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp((m + S(1))*(a*c - b*d) - (m + S(2))*(-a*d + b*c)*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(-a*d + b*c)*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2432(a, b, c, d, e, f, m, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp((m + S(1))*(a*c - b*d) - (m + S(2))*(-a*d + b*c)*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(-a*d + b*c)*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2433(a, b, c, d, e, f, m, x): return Dist(c*cos(e + f*x)/(f*sqrt(S(1) - sin(e + f*x))*sqrt(sin(e + f*x) + S(1))), Subst(Int(sqrt(S(1) + d*x/c)*(a + b*x)**m/sqrt(S(1) - d*x/c), x), x, sin(e + f*x)), x) def replacement2434(a, b, c, d, e, f, m, x): return -Dist(c*sin(e + f*x)/(f*sqrt(S(1) - cos(e + f*x))*sqrt(cos(e + f*x) + S(1))), Subst(Int(sqrt(S(1) + d*x/c)*(a + b*x)**m/sqrt(S(1) - d*x/c), x), x, cos(e + f*x)), x) def replacement2435(a, b, c, d, e, f, m, x): return Dist(d/b, Int((a + b*sin(e + f*x))**(m + S(1)), x), x) + Dist((-a*d + b*c)/b, Int((a + b*sin(e + f*x))**m, x), x) def replacement2436(a, b, c, d, e, f, m, x): return Dist(d/b, Int((a + b*cos(e + f*x))**(m + S(1)), x), x) + Dist((-a*d + b*c)/b, Int((a + b*cos(e + f*x))**m, x), x) def replacement2437(a, b, d, e, f, m, n, x): return Int(ExpandTrig((d*sin(e + f*x))**n*(a + b*sin(e + f*x))**m, x), x) def replacement2438(a, b, d, e, f, m, n, x): return Int(ExpandTrig((d*cos(e + f*x))**n*(a + b*cos(e + f*x))**m, x), x) def replacement2439(a, b, e, f, m, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(a*m - b*(S(2)*m + S(1))*sin(e + f*x)), x), x) + Simp(b*(a + b*sin(e + f*x))**m*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2440(a, b, e, f, m, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(a*m - b*(S(2)*m + S(1))*cos(e + f*x)), x), x) - Simp(b*(a + b*cos(e + f*x))**m*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2441(a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*sin(e + f*x))**m*(-a*sin(e + f*x) + b*(m + S(1))), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*(m + S(2))), x) def replacement2442(a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*cos(e + f*x))**m*(-a*cos(e + f*x) + b*(m + S(1))), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*(m + S(2))), x) def replacement2443(a, b, c, d, e, f, m, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(a*c*d*(m + S(-1)) + b*(c**S(2)*(m + S(1)) + d**S(2)) + d*(a*d*(m + S(-1)) + b*c*(m + S(2)))*sin(e + f*x), x), x), x) + Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))*(-a*d + b*c)*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2444(a, b, c, d, e, f, m, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(a*c*d*(m + S(-1)) + b*(c**S(2)*(m + S(1)) + d**S(2)) + d*(a*d*(m + S(-1)) + b*c*(m + S(2)))*cos(e + f*x), x), x), x) - Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))*(-a*d + b*c)*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2445(a, b, c, d, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*sin(e + f*x))**m*Simp(b*(c**S(2)*(m + S(2)) + d**S(2)*(m + S(1))) - d*(a*d - S(2)*b*c*(m + S(2)))*sin(e + f*x), x), x), x) - Simp(d**S(2)*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*(m + S(2))), x) def replacement2446(a, b, c, d, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*cos(e + f*x))**m*Simp(b*(c**S(2)*(m + S(2)) + d**S(2)*(m + S(1))) - d*(a*d - S(2)*b*c*(m + S(2)))*cos(e + f*x), x), x), x) + Simp(d**S(2)*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*(m + S(2))), x) def replacement2447(a, b, c, d, e, f, m, n, x): return Dist(b**S(2)/(d*(n + S(1))*(a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**(n + S(1))*Simp(a*c*(m + S(-2)) - b*d*(m - S(2)*n + S(-4)) - (-a*d*(m + S(2)*n + S(1)) + b*c*(m + S(-1)))*sin(e + f*x), x), x), x) - Simp(b**S(2)*(a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**(n + S(1))*(-a*d + b*c)*cos(e + f*x)/(d*f*(n + S(1))*(a*d + b*c)), x) def replacement2448(a, b, c, d, e, f, m, n, x): return Dist(b**S(2)/(d*(n + S(1))*(a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**(n + S(1))*Simp(a*c*(m + S(-2)) - b*d*(m - S(2)*n + S(-4)) - (-a*d*(m + S(2)*n + S(1)) + b*c*(m + S(-1)))*cos(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**(n + S(1))*(-a*d + b*c)*sin(e + f*x)/(d*f*(n + S(1))*(a*d + b*c)), x) def replacement2449(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**n*Simp(a**S(2)*d*(m + n) + a*b*c*(m + S(-2)) + b**S(2)*d*(n + S(1)) - b*(-a*d*(S(3)*m + S(2)*n + S(-2)) + b*c*(m + S(-1)))*sin(e + f*x), x), x), x) - Simp(b**S(2)*(a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n)), x) def replacement2450(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**n*Simp(a**S(2)*d*(m + n) + a*b*c*(m + S(-2)) + b**S(2)*d*(n + S(1)) - b*(-a*d*(S(3)*m + S(2)*n + S(-2)) + b*c*(m + S(-1)))*cos(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n)), x) def replacement2451(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(-1))*Simp(a*d*n - b*c*(m + S(1)) - b*d*(m + n + S(1))*sin(e + f*x), x), x), x) + Simp(b*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2452(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(-1))*Simp(a*d*n - b*c*(m + S(1)) - b*d*(m + n + S(1))*cos(e + f*x), x), x), x) - Simp(b*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2453(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(-2))*Simp(a*c*d*(m - n + S(1)) + b*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(-1))) + d*(a*d*(m - n + S(1)) + b*c*(m + n))*sin(e + f*x), x), x), x) + Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(-1))*(-a*d + b*c)*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2454(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(-2))*Simp(a*c*d*(m - n + S(1)) + b*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(-1))) + d*(a*d*(m - n + S(1)) + b*c*(m + n))*cos(e + f*x), x), x), x) - Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(-1))*(-a*d + b*c)*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2455(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(a*(S(2)*m + S(1))*(-a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(-a*d*(S(2)*m + n + S(2)) + b*c*(m + S(1)) + b*d*(m + n + S(2))*sin(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(a*f*(S(2)*m + S(1))*(-a*d + b*c)), x) def replacement2456(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(a*(S(2)*m + S(1))*(-a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(-a*d*(S(2)*m + n + S(2)) + b*c*(m + S(1)) + b*d*(m + n + S(2))*cos(e + f*x), x), x), x) - Simp(b**S(2)*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(a*f*(S(2)*m + S(1))*(-a*d + b*c)), x) def replacement2457(a, b, c, d, e, f, n, x): return -Dist(d/(a*b), Int((c + d*sin(e + f*x))**(n + S(-2))*Simp(-a*c*n + b*d*(n + S(-1)) + (-a*d*n + b*c*(n + S(-1)))*sin(e + f*x), x), x), x) - Simp((c + d*sin(e + f*x))**(n + S(-1))*(-a*d + b*c)*cos(e + f*x)/(a*f*(a + b*sin(e + f*x))), x) def replacement2458(a, b, c, d, e, f, n, x): return -Dist(d/(a*b), Int((c + d*cos(e + f*x))**(n + S(-2))*Simp(-a*c*n + b*d*(n + S(-1)) + (-a*d*n + b*c*(n + S(-1)))*cos(e + f*x), x), x), x) + Simp((c + d*cos(e + f*x))**(n + S(-1))*(-a*d + b*c)*sin(e + f*x)/(a*f*(a + b*cos(e + f*x))), x) def replacement2459(a, b, c, d, e, f, n, x): return Dist(d/(a*(-a*d + b*c)), Int((c + d*sin(e + f*x))**n*(a*n - b*(n + S(1))*sin(e + f*x)), x), x) - Simp(b**S(2)*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(a*f*(a + b*sin(e + f*x))*(-a*d + b*c)), x) def replacement2460(a, b, c, d, e, f, n, x): return Dist(d/(a*(-a*d + b*c)), Int((c + d*cos(e + f*x))**n*(a*n - b*(n + S(1))*cos(e + f*x)), x), x) + Simp(b**S(2)*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(a*f*(a + b*cos(e + f*x))*(-a*d + b*c)), x) def replacement2461(a, b, c, d, e, f, n, x): return Dist(d*n/(a*b), Int((a - b*sin(e + f*x))*(c + d*sin(e + f*x))**(n + S(-1)), x), x) - Simp(b*(c + d*sin(e + f*x))**n*cos(e + f*x)/(a*f*(a + b*sin(e + f*x))), x) def replacement2462(a, b, c, d, e, f, n, x): return Dist(d*n/(a*b), Int((a - b*cos(e + f*x))*(c + d*cos(e + f*x))**(n + S(-1)), x), x) + Simp(b*(c + d*cos(e + f*x))**n*sin(e + f*x)/(a*f*(a + b*cos(e + f*x))), x) def replacement2463(a, b, c, d, e, f, n, x): return Dist(S(2)*n*(a*d + b*c)/(b*(S(2)*n + S(1))), Int(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))**(n + S(-1)), x), x) + Simp(-S(2)*b*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*sqrt(a + b*sin(e + f*x))*(S(2)*n + S(1))), x) def replacement2464(a, b, c, d, e, f, n, x): return Dist(S(2)*n*(a*d + b*c)/(b*(S(2)*n + S(1))), Int(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))**(n + S(-1)), x), x) + Simp(S(2)*b*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*sqrt(a + b*cos(e + f*x))*(S(2)*n + S(1))), x) def replacement2465(a, b, c, d, e, f, x): return Simp(-S(2)*b**S(2)*cos(e + f*x)/(f*sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))*(a*d + b*c)), x) def replacement2466(a, b, c, d, e, f, x): return Simp(S(2)*b**S(2)*sin(e + f*x)/(f*sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))*(a*d + b*c)), x) def replacement2467(a, b, c, d, e, f, n, x): return Dist((S(2)*n + S(3))*(-a*d + b*c)/(S(2)*b*(c**S(2) - d**S(2))*(n + S(1))), Int(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))**(n + S(1)), x), x) + Simp((c + d*sin(e + f*x))**(n + S(1))*(-a*d + b*c)*cos(e + f*x)/(f*sqrt(a + b*sin(e + f*x))*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2468(a, b, c, d, e, f, n, x): return Dist((S(2)*n + S(3))*(-a*d + b*c)/(S(2)*b*(c**S(2) - d**S(2))*(n + S(1))), Int(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))**(n + S(1)), x), x) - Simp((c + d*cos(e + f*x))**(n + S(1))*(-a*d + b*c)*sin(e + f*x)/(f*sqrt(a + b*cos(e + f*x))*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2469(a, b, c, d, e, f, x): return Dist(-S(2)*b/f, Subst(Int(S(1)/(a*d + b*c - d*x**S(2)), x), x, b*cos(e + f*x)/sqrt(a + b*sin(e + f*x))), x) def replacement2470(a, b, c, d, e, f, x): return Dist(S(2)*b/f, Subst(Int(S(1)/(a*d + b*c - d*x**S(2)), x), x, b*sin(e + f*x)/sqrt(a + b*cos(e + f*x))), x) def replacement2471(a, b, d, e, f, x): return Dist(-S(2)/f, Subst(Int(S(1)/sqrt(S(1) - x**S(2)/a), x), x, b*cos(e + f*x)/sqrt(a + b*sin(e + f*x))), x) def replacement2472(a, b, d, e, f, x): return Dist(S(2)/f, Subst(Int(S(1)/sqrt(S(1) - x**S(2)/a), x), x, b*sin(e + f*x)/sqrt(a + b*cos(e + f*x))), x) def replacement2473(a, b, c, d, e, f, x): return Dist(-S(2)*b/f, Subst(Int(S(1)/(b + d*x**S(2)), x), x, b*cos(e + f*x)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x)))), x) def replacement2474(a, b, c, d, e, f, x): return Dist(S(2)*b/f, Subst(Int(S(1)/(b + d*x**S(2)), x), x, b*sin(e + f*x)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x)))), x) def replacement2475(a, b, c, d, e, f, n, x): return Dist(a**S(2)*cos(e + f*x)/(f*sqrt(a - b*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), Subst(Int((c + d*x)**n/sqrt(a - b*x), x), x, sin(e + f*x)), x) def replacement2476(a, b, c, d, e, f, n, x): return -Dist(a**S(2)*sin(e + f*x)/(f*sqrt(a - b*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), Subst(Int((c + d*x)**n/sqrt(a - b*x), x), x, cos(e + f*x)), x) def replacement2477(a, b, c, d, e, f, x): return Dist(d/b, Int(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) + Dist((-a*d + b*c)/b, Int(S(1)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) def replacement2478(a, b, c, d, e, f, x): return Dist(d/b, Int(sqrt(a + b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) + Dist((-a*d + b*c)/b, Int(S(1)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) def replacement2479(a, b, c, d, e, f, n, x): return -Dist(S(1)/(b*(S(2)*n + S(-1))), Int((c + d*sin(e + f*x))**(n + S(-2))*Simp(a*c*d - b*(c**S(2)*(S(2)*n + S(-1)) + S(2)*d**S(2)*(n + S(-1))) + d*(a*d - b*c*(S(4)*n + S(-3)))*sin(e + f*x), x)/sqrt(a + b*sin(e + f*x)), x), x) + Simp(-S(2)*d*(c + d*sin(e + f*x))**(n + S(-1))*cos(e + f*x)/(f*sqrt(a + b*sin(e + f*x))*(S(2)*n + S(-1))), x) def replacement2480(a, b, c, d, e, f, n, x): return -Dist(S(1)/(b*(S(2)*n + S(-1))), Int((c + d*cos(e + f*x))**(n + S(-2))*Simp(a*c*d - b*(c**S(2)*(S(2)*n + S(-1)) + S(2)*d**S(2)*(n + S(-1))) + d*(a*d - b*c*(S(4)*n + S(-3)))*cos(e + f*x), x)/sqrt(a + b*cos(e + f*x)), x), x) + Simp(S(2)*d*(c + d*cos(e + f*x))**(n + S(-1))*sin(e + f*x)/(f*sqrt(a + b*cos(e + f*x))*(S(2)*n + S(-1))), x) def replacement2481(a, b, c, d, e, f, n, x): return -Dist(S(1)/(S(2)*b*(c**S(2) - d**S(2))*(n + S(1))), Int((c + d*sin(e + f*x))**(n + S(1))*Simp(a*d - S(2)*b*c*(n + S(1)) + b*d*(S(2)*n + S(3))*sin(e + f*x), x)/sqrt(a + b*sin(e + f*x)), x), x) - Simp(d*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(f*sqrt(a + b*sin(e + f*x))*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2482(a, b, c, d, e, f, n, x): return -Dist(S(1)/(S(2)*b*(c**S(2) - d**S(2))*(n + S(1))), Int((c + d*cos(e + f*x))**(n + S(1))*Simp(a*d - S(2)*b*c*(n + S(1)) + b*d*(S(2)*n + S(3))*cos(e + f*x), x)/sqrt(a + b*cos(e + f*x)), x), x) + Simp(d*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(f*sqrt(a + b*cos(e + f*x))*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2483(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/sqrt(a + b*sin(e + f*x)), x), x) - Dist(d/(-a*d + b*c), Int(sqrt(a + b*sin(e + f*x))/(c + d*sin(e + f*x)), x), x) def replacement2484(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/sqrt(a + b*cos(e + f*x)), x), x) - Dist(d/(-a*d + b*c), Int(sqrt(a + b*cos(e + f*x))/(c + d*cos(e + f*x)), x), x) def replacement2485(a, b, d, e, f, x): return -Dist(sqrt(S(2))/(sqrt(a)*f), Subst(Int(S(1)/sqrt(S(1) - x**S(2)), x), x, b*cos(e + f*x)/(a + b*sin(e + f*x))), x) def replacement2486(a, b, d, e, f, x): return Dist(sqrt(S(2))/(sqrt(a)*f), Subst(Int(S(1)/sqrt(S(1) - x**S(2)), x), x, b*sin(e + f*x)/(a + b*cos(e + f*x))), x) def replacement2487(a, b, c, d, e, f, x): return Dist(-S(2)*a/f, Subst(Int(S(1)/(S(2)*b**S(2) - x**S(2)*(a*c - b*d)), x), x, b*cos(e + f*x)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x)))), x) def replacement2488(a, b, c, d, e, f, x): return Dist(S(2)*a/f, Subst(Int(S(1)/(S(2)*b**S(2) - x**S(2)*(a*c - b*d)), x), x, b*sin(e + f*x)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x)))), x) def replacement2489(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(m + n)), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(-2))*Simp(b*c**S(2)*(m + n) + d*(a*c*m + b*d*(n + S(-1))) + d*(a*d*m + b*c*(m + S(2)*n + S(-1)))*sin(e + f*x), x), x), x) - Simp(d*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(-1))*cos(e + f*x)/(f*(m + n)), x) def replacement2490(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(m + n)), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(-2))*Simp(b*c**S(2)*(m + n) + d*(a*c*m + b*d*(n + S(-1))) + d*(a*d*m + b*c*(m + S(2)*n + S(-1)))*cos(e + f*x), x), x), x) + Simp(d*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(-1))*sin(e + f*x)/(f*(m + n)), x) def replacement2491(a, b, c, d, e, f, m, n, x): return Dist(a**m*cos(e + f*x)/(f*sqrt(S(1) - sin(e + f*x))*sqrt(sin(e + f*x) + S(1))), Subst(Int((S(1) + b*x/a)**(m + S(-1)/2)*(c + d*x)**n/sqrt(S(1) - b*x/a), x), x, sin(e + f*x)), x) def replacement2492(a, b, c, d, e, f, m, n, x): return -Dist(a**m*sin(e + f*x)/(f*sqrt(S(1) - cos(e + f*x))*sqrt(cos(e + f*x) + S(1))), Subst(Int((S(1) + b*x/a)**(m + S(-1)/2)*(c + d*x)**n/sqrt(S(1) - b*x/a), x), x, cos(e + f*x)), x) def replacement2493(a, b, d, e, f, m, n, x): return -Dist(b*(d/b)**n*cos(e + f*x)/(f*sqrt(a - b*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), Subst(Int((a - x)**n*(S(2)*a - x)**(m + S(-1)/2)/sqrt(x), x), x, a - b*sin(e + f*x)), x) def replacement2494(a, b, d, e, f, m, n, x): return Dist(b*(d/b)**n*sin(e + f*x)/(f*sqrt(a - b*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), Subst(Int((a - x)**n*(S(2)*a - x)**(m + S(-1)/2)/sqrt(x), x), x, a - b*cos(e + f*x)), x) def replacement2495(a, b, d, e, f, m, n, x): return Dist((d/b)**IntPart(n)*(b*sin(e + f*x))**(-FracPart(n))*(d*sin(e + f*x))**FracPart(n), Int((b*sin(e + f*x))**n*(a + b*sin(e + f*x))**m, x), x) def replacement2496(a, b, d, e, f, m, n, x): return Dist((d/b)**IntPart(n)*(b*cos(e + f*x))**(-FracPart(n))*(d*cos(e + f*x))**FracPart(n), Int((b*cos(e + f*x))**n*(a + b*cos(e + f*x))**m, x), x) def replacement2497(a, b, d, e, f, m, n, x): return Dist(a**IntPart(m)*(S(1) + b*sin(e + f*x)/a)**(-FracPart(m))*(a + b*sin(e + f*x))**FracPart(m), Int((d*sin(e + f*x))**n*(S(1) + b*sin(e + f*x)/a)**m, x), x) def replacement2498(a, b, d, e, f, m, n, x): return Dist(a**IntPart(m)*(S(1) + b*cos(e + f*x)/a)**(-FracPart(m))*(a + b*cos(e + f*x))**FracPart(m), Int((d*cos(e + f*x))**n*(S(1) + b*cos(e + f*x)/a)**m, x), x) def replacement2499(a, b, c, d, e, f, m, n, x): return Dist(a**S(2)*cos(e + f*x)/(f*sqrt(a - b*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), Subst(Int((a + b*x)**(m + S(-1)/2)*(c + d*x)**n/sqrt(a - b*x), x), x, sin(e + f*x)), x) def replacement2500(a, b, c, d, e, f, m, n, x): return -Dist(a**S(2)*sin(e + f*x)/(f*sqrt(a - b*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), Subst(Int((a + b*x)**(m + S(-1)/2)*(c + d*x)**n/sqrt(a - b*x), x), x, cos(e + f*x)), x) def replacement2501(b, c, d, e, f, m, x): return Dist(S(2)*c*d/b, Int((b*sin(e + f*x))**(m + S(1)), x), x) + Int((b*sin(e + f*x))**m*(c**S(2) + d**S(2)*sin(e + f*x)**S(2)), x) def replacement2502(b, c, d, e, f, m, x): return Dist(S(2)*c*d/b, Int((b*cos(e + f*x))**(m + S(1)), x), x) + Int((b*cos(e + f*x))**m*(c**S(2) + d**S(2)*cos(e + f*x)**S(2)), x) def replacement2503(a, b, c, d, e, f, m, x): return -Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(b*(m + S(1))*(-a*(c**S(2) + d**S(2)) + S(2)*b*c*d) + (a**S(2)*d**S(2) - S(2)*a*b*c*d*(m + S(2)) + b**S(2)*(c**S(2)*(m + S(2)) + d**S(2)*(m + S(1))))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(a**S(2)*d**S(2) - S(2)*a*b*c*d + b**S(2)*c**S(2))*cos(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2504(a, b, c, d, e, f, m, x): return -Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(b*(m + S(1))*(-a*(c**S(2) + d**S(2)) + S(2)*b*c*d) + (a**S(2)*d**S(2) - S(2)*a*b*c*d*(m + S(2)) + b**S(2)*(c**S(2)*(m + S(2)) + d**S(2)*(m + S(1))))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(a**S(2)*d**S(2) - S(2)*a*b*c*d + b**S(2)*c**S(2))*sin(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2505(a, b, c, d, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*sin(e + f*x))**m*Simp(b*(c**S(2)*(m + S(2)) + d**S(2)*(m + S(1))) - d*(a*d - S(2)*b*c*(m + S(2)))*sin(e + f*x), x), x), x) - Simp(d**S(2)*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*(m + S(2))), x) def replacement2506(a, b, c, d, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*cos(e + f*x))**m*Simp(b*(c**S(2)*(m + S(2)) + d**S(2)*(m + S(1))) - d*(a*d - S(2)*b*c*(m + S(2)))*cos(e + f*x), x), x), x) + Simp(d**S(2)*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*(m + S(2))), x) def replacement2507(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**(m + S(-3))*(c + d*sin(e + f*x))**(n + S(1))*Simp(a*d*(n + S(1))*(-S(2)*a*b*d + c*(a**S(2) + b**S(2))) + b*(m + S(-2))*(-a*d + b*c)**S(2) + b*(b**S(2)*(c**S(2) - d**S(2)) + d*n*(S(2)*a*b*c - d*(a**S(2) + b**S(2))) - m*(-a*d + b*c)**S(2))*sin(e + f*x)**S(2) + (-a*(n + S(2))*(-a*d + b*c)**S(2) + b*(n + S(1))*(a*b*c**S(2) - S(3)*a*b*d**S(2) + c*d*(a**S(2) + b**S(2))))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**(n + S(1))*(a**S(2)*d**S(2) - S(2)*a*b*c*d + b**S(2)*c**S(2))*cos(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2508(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**(m + S(-3))*(c + d*cos(e + f*x))**(n + S(1))*Simp(a*d*(n + S(1))*(-S(2)*a*b*d + c*(a**S(2) + b**S(2))) + b*(m + S(-2))*(-a*d + b*c)**S(2) + b*(b**S(2)*(c**S(2) - d**S(2)) + d*n*(S(2)*a*b*c - d*(a**S(2) + b**S(2))) - m*(-a*d + b*c)**S(2))*cos(e + f*x)**S(2) + (-a*(n + S(2))*(-a*d + b*c)**S(2) + b*(n + S(1))*(a*b*c**S(2) - S(3)*a*b*d**S(2) + c*d*(a**S(2) + b**S(2))))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**(n + S(1))*(a**S(2)*d**S(2) - S(2)*a*b*c*d + b**S(2)*c**S(2))*sin(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2509(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b*sin(e + f*x))**(m + S(-3))*(c + d*sin(e + f*x))**n*Simp(a**S(3)*d*(m + n) + b**S(2)*(a*d*(n + S(1)) + b*c*(m + S(-2))) - b**S(2)*(-a*d*(S(3)*m + S(2)*n + S(-2)) + b*c*(m + S(-1)))*sin(e + f*x)**S(2) - b*(-S(3)*a**S(2)*d*(m + n) + a*b*c - b**S(2)*d*(m + n + S(-1)))*sin(e + f*x), x), x), x) - Simp(b**S(2)*(a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n)), x) def replacement2510(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b*cos(e + f*x))**(m + S(-3))*(c + d*cos(e + f*x))**n*Simp(a**S(3)*d*(m + n) + b**S(2)*(a*d*(n + S(1)) + b*c*(m + S(-2))) - b**S(2)*(-a*d*(S(3)*m + S(2)*n + S(-2)) + b*c*(m + S(-1)))*cos(e + f*x)**S(2) - b*(-S(3)*a**S(2)*d*(m + n) + a*b*c - b**S(2)*d*(m + n + S(-1)))*cos(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n)), x) def replacement2511(a, b, d, e, f, x): return -Dist(d**S(2)/(a**S(2) - b**S(2)), Int(sqrt(a + b*sin(e + f*x))/(d*sin(e + f*x))**(S(3)/2), x), x) + Simp(-S(2)*a*d*cos(e + f*x)/(f*sqrt(d*sin(e + f*x))*sqrt(a + b*sin(e + f*x))*(a**S(2) - b**S(2))), x) def replacement2512(a, b, d, e, f, x): return -Dist(d**S(2)/(a**S(2) - b**S(2)), Int(sqrt(a + b*cos(e + f*x))/(d*cos(e + f*x))**(S(3)/2), x), x) + Simp(S(2)*a*d*sin(e + f*x)/(f*sqrt(d*cos(e + f*x))*sqrt(a + b*cos(e + f*x))*(a**S(2) - b**S(2))), x) def replacement2513(a, b, c, d, e, f, x): return Dist((c - d)/(a - b), Int(S(1)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) - Dist((-a*d + b*c)/(a - b), Int((sin(e + f*x) + S(1))/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) def replacement2514(a, b, c, d, e, f, x): return Dist((c - d)/(a - b), Int(S(1)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) - Dist((-a*d + b*c)/(a - b), Int((cos(e + f*x) + S(1))/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) def replacement2515(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(-1))*Simp(a*c*(m + S(1)) + b*d*n - b*d*(m + n + S(2))*sin(e + f*x)**S(2) + (a*d*(m + S(1)) - b*c*(m + S(2)))*sin(e + f*x), x), x), x) - Simp(b*(a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2516(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(-1))*Simp(a*c*(m + S(1)) + b*d*n - b*d*(m + n + S(2))*cos(e + f*x)**S(2) + (a*d*(m + S(1)) - b*c*(m + S(2)))*cos(e + f*x), x), x), x) + Simp(b*(a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2517(a, b, d, e, f, x): return Dist(d/b, Int(sqrt(d*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) - Dist(a*d/b, Int(sqrt(d*sin(e + f*x))/(a + b*sin(e + f*x))**(S(3)/2), x), x) def replacement2518(a, b, d, e, f, x): return Dist(d/b, Int(sqrt(d*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) - Dist(a*d/b, Int(sqrt(d*cos(e + f*x))/(a + b*cos(e + f*x))**(S(3)/2), x), x) def replacement2519(a, b, c, d, e, f, x): return Dist(d**S(2)/b**S(2), Int(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) + Dist((-a*d + b*c)/b**S(2), Int(Simp(a*d + b*c + S(2)*b*d*sin(e + f*x), x)/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) def replacement2520(a, b, c, d, e, f, x): return Dist(d**S(2)/b**S(2), Int(sqrt(a + b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) + Dist((-a*d + b*c)/b**S(2), Int(Simp(a*d + b*c + S(2)*b*d*cos(e + f*x), x)/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) def replacement2521(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(-2))*Simp(c*(m + S(1))*(a*c - b*d) + d*(n + S(-1))*(-a*d + b*c) - d*(-a*d + b*c)*(m + n + S(1))*sin(e + f*x)**S(2) + (-c*(m + S(2))*(-a*d + b*c) + d*(m + S(1))*(a*c - b*d))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(-1))*(-a*d + b*c)*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2522(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(-2))*Simp(c*(m + S(1))*(a*c - b*d) + d*(n + S(-1))*(-a*d + b*c) - d*(-a*d + b*c)*(m + n + S(1))*cos(e + f*x)**S(2) + (-c*(m + S(2))*(-a*d + b*c) + d*(m + S(1))*(a*c - b*d))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(-1))*(-a*d + b*c)*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2523(a, b, d, e, f, x): return Dist(d/(a**S(2) - b**S(2)), Int((a*sin(e + f*x) + b)/((d*sin(e + f*x))**(S(3)/2)*sqrt(a + b*sin(e + f*x))), x), x) + Simp(S(2)*b*cos(e + f*x)/(f*sqrt(d*sin(e + f*x))*sqrt(a + b*sin(e + f*x))*(a**S(2) - b**S(2))), x) def replacement2524(a, b, d, e, f, x): return Dist(d/(a**S(2) - b**S(2)), Int((a*cos(e + f*x) + b)/((d*cos(e + f*x))**(S(3)/2)*sqrt(a + b*cos(e + f*x))), x), x) + Simp(-S(2)*b*sin(e + f*x)/(f*sqrt(d*cos(e + f*x))*sqrt(a + b*cos(e + f*x))*(a**S(2) - b**S(2))), x) def replacement2525(a, b, c, d, e, f, x): return -Dist(b/(a - b), Int((sin(e + f*x) + S(1))/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) + Dist(S(1)/(a - b), Int(S(1)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) def replacement2526(a, b, c, d, e, f, x): return -Dist(b/(a - b), Int((cos(e + f*x) + S(1))/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) + Dist(S(1)/(a - b), Int(S(1)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) def replacement2527(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(a*(m + S(1))*(-a*d + b*c) + b**S(2)*d*(m + n + S(2)) - b**S(2)*d*(m + n + S(3))*sin(e + f*x)**S(2) - (b**S(2)*c + b*(m + S(1))*(-a*d + b*c))*sin(e + f*x), x), x), x) - Simp(b**S(2)*(a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement2528(a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(a*(m + S(1))*(-a*d + b*c) + b**S(2)*d*(m + n + S(2)) - b**S(2)*d*(m + n + S(3))*cos(e + f*x)**S(2) - (b**S(2)*c + b*(m + S(1))*(-a*d + b*c))*cos(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement2529(a, b, c, d, e, f, x): return Dist(d/b, Int(S(1)/sqrt(c + d*sin(e + f*x)), x), x) + Dist((-a*d + b*c)/b, Int(S(1)/((a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) def replacement2530(a, b, c, d, e, f, x): return Dist(d/b, Int(S(1)/sqrt(c + d*cos(e + f*x)), x), x) + Dist((-a*d + b*c)/b, Int(S(1)/((a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) def replacement2531(a, b, c, d, e, f, x): return Dist(b/d, Int(sqrt(a + b*sin(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int(sqrt(a + b*sin(e + f*x))/(c + d*sin(e + f*x)), x), x) def replacement2532(a, b, c, d, e, f, x): return Dist(b/d, Int(sqrt(a + b*cos(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int(sqrt(a + b*cos(e + f*x))/(c + d*cos(e + f*x)), x), x) def replacement2533(a, b, c, d, e, f, x): return Simp(S(2)*EllipticPi(S(2)*b/(a + b), -Pi/S(4) + e/S(2) + f*x/S(2), S(2)*d/(c + d))/(f*(a + b)*sqrt(c + d)), x) def replacement2534(a, b, c, d, e, f, x): return Simp(S(2)*EllipticPi(S(2)*b/(a + b), e/S(2) + f*x/S(2), S(2)*d/(c + d))/(f*(a + b)*sqrt(c + d)), x) def replacement2535(a, b, c, d, e, f, x): return Simp(S(2)*EllipticPi(-S(2)*b/(a - b), Pi/S(4) + e/S(2) + f*x/S(2), -S(2)*d/(c - d))/(f*(a - b)*sqrt(c - d)), x) def replacement2536(a, b, c, d, e, f, x): return Simp(S(2)*EllipticPi(-S(2)*b/(a - b), Pi/S(2) + e/S(2) + f*x/S(2), -S(2)*d/(c - d))/(f*(a - b)*sqrt(c - d)), x) def replacement2537(a, b, c, d, e, f, x): return Dist(sqrt((c + d*sin(e + f*x))/(c + d))/sqrt(c + d*sin(e + f*x)), Int(S(1)/((a + b*sin(e + f*x))*sqrt(c/(c + d) + d*sin(e + f*x)/(c + d))), x), x) def replacement2538(a, b, c, d, e, f, x): return Dist(sqrt((c + d*cos(e + f*x))/(c + d))/sqrt(c + d*cos(e + f*x)), Int(S(1)/((a + b*cos(e + f*x))*sqrt(c/(c + d) + d*cos(e + f*x)/(c + d))), x), x) def replacement2539(b, c, d, e, f, x): return Simp(S(2)*c*sqrt(S(1) - S(1)/sin(e + f*x))*sqrt(S(1) + S(1)/sin(e + f*x))*EllipticPi((c + d)/d, asin(sqrt(c + d*sin(e + f*x))/(sqrt(b*sin(e + f*x))*Rt((c + d)/b, S(2)))), -(c + d)/(c - d))*Rt(b*(c + d), S(2))*tan(e + f*x)/(d*f*sqrt(c**S(2) - d**S(2))), x) def replacement2540(b, c, d, e, f, x): return Simp(-S(2)*c*sqrt(S(1) - S(1)/cos(e + f*x))*sqrt(S(1) + S(1)/cos(e + f*x))*EllipticPi((c + d)/d, asin(sqrt(c + d*cos(e + f*x))/(sqrt(b*cos(e + f*x))*Rt((c + d)/b, S(2)))), -(c + d)/(c - d))*Rt(b*(c + d), S(2))/(d*f*sqrt(c**S(2) - d**S(2))*tan(e + f*x)), x) def replacement2541(b, c, d, e, f, x): return Simp(S(2)*b*sqrt(c*(S(1) - S(1)/sin(e + f*x))/(c + d))*sqrt(c*(S(1) + S(1)/sin(e + f*x))/(c - d))*EllipticPi((c + d)/d, asin(sqrt(c + d*sin(e + f*x))/(sqrt(b*sin(e + f*x))*Rt((c + d)/b, S(2)))), -(c + d)/(c - d))*Rt((c + d)/b, S(2))*tan(e + f*x)/(d*f), x) def replacement2542(b, c, d, e, f, x): return Simp(-S(2)*b*sqrt(c*(S(1) - S(1)/cos(e + f*x))/(c + d))*sqrt(c*(S(1) + S(1)/cos(e + f*x))/(c - d))*EllipticPi((c + d)/d, asin(sqrt(c + d*cos(e + f*x))/(sqrt(b*cos(e + f*x))*Rt((c + d)/b, S(2)))), -(c + d)/(c - d))*Rt((c + d)/b, S(2))/(d*f*tan(e + f*x)), x) def replacement2543(b, c, d, e, f, x): return Dist(sqrt(b*sin(e + f*x))/sqrt(-b*sin(e + f*x)), Int(sqrt(-b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) def replacement2544(b, c, d, e, f, x): return Dist(sqrt(b*cos(e + f*x))/sqrt(-b*cos(e + f*x)), Int(sqrt(-b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) def replacement2545(a, b, c, d, e, f, x): return Simp(S(2)*sqrt((-a*d + b*c)*(sin(e + f*x) + S(1))/((a + b*sin(e + f*x))*(c - d)))*sqrt(-(S(1) - sin(e + f*x))*(-a*d + b*c)/((a + b*sin(e + f*x))*(c + d)))*(a + b*sin(e + f*x))*EllipticPi(b*(c + d)/(d*(a + b)), asin(sqrt(c + d*sin(e + f*x))*Rt((a + b)/(c + d), S(2))/sqrt(a + b*sin(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))/(d*f*Rt((a + b)/(c + d), S(2))*cos(e + f*x)), x) def replacement2546(a, b, c, d, e, f, x): return Simp(-S(2)*sqrt((-a*d + b*c)*(cos(e + f*x) + S(1))/((a + b*cos(e + f*x))*(c - d)))*sqrt(-(S(1) - cos(e + f*x))*(-a*d + b*c)/((a + b*cos(e + f*x))*(c + d)))*(a + b*cos(e + f*x))*EllipticPi(b*(c + d)/(d*(a + b)), asin(sqrt(c + d*cos(e + f*x))*Rt((a + b)/(c + d), S(2))/sqrt(a + b*cos(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))/(d*f*Rt((a + b)/(c + d), S(2))*sin(e + f*x)), x) def replacement2547(a, b, c, d, e, f, x): return Dist(sqrt(-c - d*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), Int(sqrt(a + b*sin(e + f*x))/sqrt(-c - d*sin(e + f*x)), x), x) def replacement2548(a, b, c, d, e, f, x): return Dist(sqrt(-c - d*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), Int(sqrt(a + b*cos(e + f*x))/sqrt(-c - d*cos(e + f*x)), x), x) def replacement2549(a, b, d, e, f, x): return Simp(-S(2)*d*EllipticF(asin(cos(e + f*x)/(d*sin(e + f*x) + S(1))), -(a - b*d)/(a + b*d))/(f*sqrt(a + b*d)), x) def replacement2550(a, b, d, e, f, x): return Simp(S(2)*d*EllipticF(asin(sin(e + f*x)/(d*cos(e + f*x) + S(1))), -(a - b*d)/(a + b*d))/(f*sqrt(a + b*d)), x) def replacement2551(a, b, d, e, f, x): return Dist(sqrt(sin(e + f*x)*sign(b))/sqrt(d*sin(e + f*x)), Int(S(1)/(sqrt(sin(e + f*x)*sign(b))*sqrt(a + b*sin(e + f*x))), x), x) def replacement2552(a, b, d, e, f, x): return Dist(sqrt(cos(e + f*x)*sign(b))/sqrt(d*cos(e + f*x)), Int(S(1)/(sqrt(cos(e + f*x)*sign(b))*sqrt(a + b*cos(e + f*x))), x), x) def replacement2553(a, b, d, e, f, x): return Simp(-S(2)*sqrt(-S(1)/tan(e + f*x)**S(2))*sqrt(a**S(2))*EllipticF(asin(sqrt(a + b*sin(e + f*x))/(sqrt(d*sin(e + f*x))*Rt((a + b)/d, S(2)))), -(a + b)/(a - b))*Rt((a + b)/d, S(2))*tan(e + f*x)/(a*f*sqrt(a**S(2) - b**S(2))), x) def replacement2554(a, b, d, e, f, x): return Simp(S(2)*sqrt(-tan(e + f*x)**S(2))*sqrt(a**S(2))*EllipticF(asin(sqrt(a + b*cos(e + f*x))/(sqrt(d*cos(e + f*x))*Rt((a + b)/d, S(2)))), -(a + b)/(a - b))*Rt((a + b)/d, S(2))/(a*f*sqrt(a**S(2) - b**S(2))*tan(e + f*x)), x) def replacement2555(a, b, d, e, f, x): return Simp(-S(2)*sqrt(a*(S(1) - S(1)/sin(e + f*x))/(a + b))*sqrt(a*(S(1) + S(1)/sin(e + f*x))/(a - b))*EllipticF(asin(sqrt(a + b*sin(e + f*x))/(sqrt(d*sin(e + f*x))*Rt((a + b)/d, S(2)))), -(a + b)/(a - b))*Rt((a + b)/d, S(2))*tan(e + f*x)/(a*f), x) def replacement2556(a, b, d, e, f, x): return Simp(S(2)*sqrt(a*(S(1) - S(1)/cos(e + f*x))/(a + b))*sqrt(a*(S(1) + S(1)/cos(e + f*x))/(a - b))*EllipticF(asin(sqrt(a + b*cos(e + f*x))/(sqrt(d*cos(e + f*x))*Rt((a + b)/d, S(2)))), -(a + b)/(a - b))*Rt((a + b)/d, S(2))/(a*f*tan(e + f*x)), x) def replacement2557(a, b, d, e, f, x): return Dist(sqrt(-d*sin(e + f*x))/sqrt(d*sin(e + f*x)), Int(S(1)/(sqrt(-d*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), x), x) def replacement2558(a, b, d, e, f, x): return Dist(sqrt(-d*cos(e + f*x))/sqrt(d*cos(e + f*x)), Int(S(1)/(sqrt(-d*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), x), x) def replacement2559(a, b, c, d, e, f, x): return Simp(S(2)*sqrt((S(1) - sin(e + f*x))*(-a*d + b*c)/((a + b)*(c + d*sin(e + f*x))))*sqrt(-(-a*d + b*c)*(sin(e + f*x) + S(1))/((a - b)*(c + d*sin(e + f*x))))*(c + d*sin(e + f*x))*EllipticF(asin(sqrt(a + b*sin(e + f*x))*Rt((c + d)/(a + b), S(2))/sqrt(c + d*sin(e + f*x))), (a + b)*(c - d)/((a - b)*(c + d)))/(f*(-a*d + b*c)*Rt((c + d)/(a + b), S(2))*cos(e + f*x)), x) def replacement2560(a, b, c, d, e, f, x): return Simp(-S(2)*sqrt((S(1) - cos(e + f*x))*(-a*d + b*c)/((a + b)*(c + d*cos(e + f*x))))*sqrt(-(-a*d + b*c)*(cos(e + f*x) + S(1))/((a - b)*(c + d*cos(e + f*x))))*(c + d*cos(e + f*x))*EllipticF(asin(sqrt(a + b*cos(e + f*x))*Rt((c + d)/(a + b), S(2))/sqrt(c + d*cos(e + f*x))), (a + b)*(c - d)/((a - b)*(c + d)))/(f*(-a*d + b*c)*Rt((c + d)/(a + b), S(2))*sin(e + f*x)), x) def replacement2561(a, b, c, d, e, f, x): return Dist(sqrt(-a - b*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), Int(S(1)/(sqrt(-a - b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) def replacement2562(a, b, c, d, e, f, x): return Dist(sqrt(-a - b*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), Int(S(1)/(sqrt(-a - b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) def replacement2563(a, b, d, e, f, x): return Dist(d/(S(2)*b), Int(sqrt(d*sin(e + f*x))*(a + S(2)*b*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) - Dist(a*d/(S(2)*b), Int(sqrt(d*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) def replacement2564(a, b, d, e, f, x): return Dist(d/(S(2)*b), Int(sqrt(d*cos(e + f*x))*(a + S(2)*b*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) - Dist(a*d/(S(2)*b), Int(sqrt(d*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) def replacement2565(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**(n + S(-1))*Simp(a**S(2)*c*d*(m + n) + b*d*(a*d*n + b*c*(m + S(-1))) + b*d*(a*d*(S(2)*m + n + S(-1)) + b*c*n)*sin(e + f*x)**S(2) + (a*d*(m + n)*(a*d + S(2)*b*c) - b*d*(a*c - b*d*(m + n + S(-1))))*sin(e + f*x), x), x), x) - Simp(b*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*(m + n)), x) def replacement2566(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**(n + S(-1))*Simp(a**S(2)*c*d*(m + n) + b*d*(a*d*n + b*c*(m + S(-1))) + b*d*(a*d*(S(2)*m + n + S(-1)) + b*c*n)*cos(e + f*x)**S(2) + (a*d*(m + n)*(a*d + S(2)*b*c) - b*d*(a*c - b*d*(m + n + S(-1))))*cos(e + f*x), x), x), x) + Simp(b*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*(m + n)), x) def replacement2567(a, b, c, d, e, f, m, n, x): return Dist(b/d, Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1)), x), x) - Dist((-a*d + b*c)/d, Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n, x), x) def replacement2568(a, b, c, d, e, f, m, n, x): return Dist(b/d, Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1)), x), x) - Dist((-a*d + b*c)/d, Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n, x), x) def replacement2569(a, b, c, d, e, f, m, n, x): return Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x) def replacement2570(a, b, c, d, e, f, m, n, x): return Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x) def replacement2571(a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d*sin(e + f*x))**p)**FracPart(n)*(d*sin(e + f*x))**(-p*FracPart(n)), Int((d*sin(e + f*x))**(n*p)*(a + b*sin(e + f*x))**m, x), x) def replacement2572(a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d*cos(e + f*x))**p)**FracPart(n)*(d*cos(e + f*x))**(-p*FracPart(n)), Int((d*cos(e + f*x))**(n*p)*(a + b*cos(e + f*x))**m, x), x) def replacement2573(a, b, c, d, e, f, m, n, x): return Int((a + b*sin(e + f*x))**m*(c*sin(e + f*x) + d)**n*sin(e + f*x)**(-n), x) def replacement2574(a, b, c, d, e, f, m, n, x): return Int((a + b*cos(e + f*x))**m*(c*cos(e + f*x) + d)**n*cos(e + f*x)**(-n), x) def replacement2575(a, b, c, d, e, f, m, n, x): return Int((c + d/sin(e + f*x))**n*(a/sin(e + f*x) + b)**m*(S(1)/sin(e + f*x))**(-m), x) def replacement2576(a, b, c, d, e, f, m, n, x): return Int((c + d/cos(e + f*x))**n*(a/cos(e + f*x) + b)**m*(S(1)/cos(e + f*x))**(-m), x) def replacement2577(a, b, c, d, e, f, m, n, x): return Dist((c + d/sin(e + f*x))**n*(c*sin(e + f*x) + d)**(-n)*sin(e + f*x)**n, Int((a + b*sin(e + f*x))**m*(c*sin(e + f*x) + d)**n*sin(e + f*x)**(-n), x), x) def replacement2578(a, b, c, d, e, f, m, n, x): return Dist((c + d/cos(e + f*x))**n*(c*cos(e + f*x) + d)**(-n)*cos(e + f*x)**n, Int((a + b*cos(e + f*x))**m*(c*cos(e + f*x) + d)**n*cos(e + f*x)**(-n), x), x) def replacement2579(a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*f), Subst(Int((a + x)**m*(c + d*x/b)**n, x), x, b*sin(e + f*x)), x) def replacement2580(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(b*f), Subst(Int((a + x)**m*(c + d*x/b)**n, x), x, b*cos(e + f*x)), x) def replacement2581(a, b, d, e, f, n, p, x): return Dist(a, Int((d*sin(e + f*x))**n*cos(e + f*x)**p, x), x) + Dist(b/d, Int((d*sin(e + f*x))**(n + S(1))*cos(e + f*x)**p, x), x) def replacement2582(a, b, d, e, f, n, p, x): return Dist(a, Int((d*cos(e + f*x))**n*sin(e + f*x)**p, x), x) + Dist(b/d, Int((d*cos(e + f*x))**(n + S(1))*sin(e + f*x)**p, x), x) def replacement2583(a, b, d, e, f, n, p, x): return Dist(S(1)/a, Int((d*sin(e + f*x))**n*cos(e + f*x)**(p + S(-2)), x), x) - Dist(S(1)/(b*d), Int((d*sin(e + f*x))**(n + S(1))*cos(e + f*x)**(p + S(-2)), x), x) def replacement2584(a, b, d, e, f, n, p, x): return Dist(S(1)/a, Int((d*cos(e + f*x))**n*sin(e + f*x)**(p + S(-2)), x), x) - Dist(S(1)/(b*d), Int((d*cos(e + f*x))**(n + S(1))*sin(e + f*x)**(p + S(-2)), x), x) def replacement2585(a, b, c, d, e, f, m, n, p, x): return Dist(b**(-p)/f, Subst(Int((a - x)**(p/S(2) + S(-1)/2)*(a + x)**(m + p/S(2) + S(-1)/2)*(c + d*x/b)**n, x), x, b*sin(e + f*x)), x) def replacement2586(a, b, c, d, e, f, m, n, p, x): return -Dist(b**(-p)/f, Subst(Int((a - x)**(p/S(2) + S(-1)/2)*(a + x)**(m + p/S(2) + S(-1)/2)*(c + d*x/b)**n, x), x, b*cos(e + f*x)), x) def replacement2587(a, b, c, d, e, f, m, n, p, x): return Dist(b**(-p)/f, Subst(Int((a + x)**m*(b**S(2) - x**S(2))**(p/S(2) + S(-1)/2)*(c + d*x/b)**n, x), x, b*sin(e + f*x)), x) def replacement2588(a, b, c, d, e, f, m, n, p, x): return -Dist(b**(-p)/f, Subst(Int((a + x)**m*(b**S(2) - x**S(2))**(p/S(2) + S(-1)/2)*(c + d*x/b)**n, x), x, b*cos(e + f*x)), x) def replacement2589(a, b, d, e, f, g, n, p, x): return Dist(a, Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**p, x), x) + Dist(b/d, Int((d*sin(e + f*x))**(n + S(1))*(g*cos(e + f*x))**p, x), x) def replacement2590(a, b, d, e, f, g, n, p, x): return Dist(a, Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**p, x), x) + Dist(b/d, Int((d*cos(e + f*x))**(n + S(1))*(g*sin(e + f*x))**p, x), x) def replacement2591(a, b, d, e, f, g, n, p, x): return Dist(g**S(2)/a, Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(p + S(-2)), x), x) - Dist(g**S(2)/(b*d), Int((d*sin(e + f*x))**(n + S(1))*(g*cos(e + f*x))**(p + S(-2)), x), x) def replacement2592(a, b, d, e, f, g, n, p, x): return Dist(g**S(2)/a, Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(p + S(-2)), x), x) - Dist(g**S(2)/(b*d), Int((d*cos(e + f*x))**(n + S(1))*(g*sin(e + f*x))**(p + S(-2)), x), x) def replacement2593(a, b, c, d, e, f, g, m, n, p, x): return Dist(a**m*c**m*g**(-S(2)*m), Int((g*cos(e + f*x))**(S(2)*m + p)*(c + d*sin(e + f*x))**(-m + n), x), x) def replacement2594(a, b, c, d, e, f, g, m, n, p, x): return Dist(a**m*c**m*g**(-S(2)*m), Int((g*sin(e + f*x))**(S(2)*m + p)*(c + d*cos(e + f*x))**(-m + n), x), x) def replacement2595(a, b, c, d, e, f, m, n, p, x): return Dist(a**(-p/S(2))*c**(-p/S(2)), Int((a + b*sin(e + f*x))**(m + p/S(2))*(c + d*sin(e + f*x))**(n + p/S(2)), x), x) def replacement2596(a, b, c, d, e, f, m, n, p, x): return Dist(a**(-p/S(2))*c**(-p/S(2)), Int((a + b*cos(e + f*x))**(m + p/S(2))*(c + d*cos(e + f*x))**(n + p/S(2)), x), x) def replacement2597(a, b, c, d, e, f, g, p, x): return Dist(g*cos(e + f*x)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), Int((g*cos(e + f*x))**(p + S(-1)), x), x) def replacement2598(a, b, c, d, e, f, g, p, x): return Dist(g*sin(e + f*x)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), Int((g*sin(e + f*x))**(p + S(-1)), x), x) def replacement2599(a, b, c, d, e, f, g, m, n, p, x): return Dist(a**IntPart(m)*c**IntPart(m)*g**(-S(2)*IntPart(m))*(g*cos(e + f*x))**(-S(2)*FracPart(m))*(a + b*sin(e + f*x))**FracPart(m)*(c + d*sin(e + f*x))**FracPart(m), Int((g*cos(e + f*x))**(S(2)*m + p)/(c + d*sin(e + f*x)), x), x) def replacement2600(a, b, c, d, e, f, g, m, n, p, x): return Dist(a**IntPart(m)*c**IntPart(m)*g**(-S(2)*IntPart(m))*(g*sin(e + f*x))**(-S(2)*FracPart(m))*(a + b*cos(e + f*x))**FracPart(m)*(c + d*cos(e + f*x))**FracPart(m), Int((g*sin(e + f*x))**(S(2)*m + p)/(c + d*cos(e + f*x)), x), x) def replacement2601(a, b, c, d, e, f, g, m, n, p, x): return Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n/(f*g*(m - n + S(-1))), x) def replacement2602(a, b, c, d, e, f, g, m, n, p, x): return -Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n/(f*g*(m - n + S(-1))), x) def replacement2603(a, b, c, d, e, f, g, m, n, p, x): return -Dist(b*(S(2)*m + p + S(-1))/(d*(S(2)*n + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1)), x), x) + Simp(-S(2)*b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n/(f*g*(S(2)*n + p + S(1))), x) def replacement2604(a, b, c, d, e, f, g, m, n, p, x): return -Dist(b*(S(2)*m + p + S(-1))/(d*(S(2)*n + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1)), x), x) + Simp(S(2)*b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n/(f*g*(S(2)*n + p + S(1))), x) def replacement2605(a, b, c, d, e, f, g, m, n, p, x): return Dist(a*(S(2)*m + p + S(-1))/(m + n + p), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n, x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n/(f*g*(m + n + p)), x) def replacement2606(a, b, c, d, e, f, g, m, n, p, x): return Dist(a*(S(2)*m + p + S(-1))/(m + n + p), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n, x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n/(f*g*(m + n + p)), x) def replacement2607(a, b, c, d, e, f, g, m, p, x): return Dist(a**IntPart(m)*c**IntPart(m)*g**(-S(2)*IntPart(m))*(g*cos(e + f*x))**(-S(2)*FracPart(m))*(a + b*sin(e + f*x))**FracPart(m)*(c + d*sin(e + f*x))**FracPart(m), Int((g*cos(e + f*x))**(S(2)*m + p), x), x) def replacement2608(a, b, c, d, e, f, g, m, p, x): return Dist(a**IntPart(m)*c**IntPart(m)*g**(-S(2)*IntPart(m))*(g*sin(e + f*x))**(-S(2)*FracPart(m))*(a + b*cos(e + f*x))**FracPart(m)*(c + d*cos(e + f*x))**FracPart(m), Int((g*sin(e + f*x))**(S(2)*m + p), x), x) def replacement2609(a, b, c, d, e, f, g, m, n, p, x): return Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n/(a*f*g*(m - n)), x) def replacement2610(a, b, c, d, e, f, g, m, n, p, x): return -Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n/(a*f*g*(m - n)), x) def replacement2611(a, b, c, d, e, f, g, m, n, p, x): return Dist((m + n + p + S(1))/(a*(S(2)*m + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n, x), x) + Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2612(a, b, c, d, e, f, g, m, n, p, x): return Dist((m + n + p + S(1))/(a*(S(2)*m + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n, x), x) - Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2613(a, b, c, d, e, f, g, m, n, p, x): return -Dist(b*(S(2)*m + p + S(-1))/(d*(S(2)*n + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1)), x), x) + Simp(-S(2)*b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n/(f*g*(S(2)*n + p + S(1))), x) def replacement2614(a, b, c, d, e, f, g, m, n, p, x): return -Dist(b*(S(2)*m + p + S(-1))/(d*(S(2)*n + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1)), x), x) + Simp(S(2)*b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n/(f*g*(S(2)*n + p + S(1))), x) def replacement2615(a, b, c, d, e, f, g, m, n, p, x): return Dist(a*(S(2)*m + p + S(-1))/(m + n + p), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n, x), x) - Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n/(f*g*(m + n + p)), x) def replacement2616(a, b, c, d, e, f, g, m, n, p, x): return Dist(a*(S(2)*m + p + S(-1))/(m + n + p), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n, x), x) + Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n/(f*g*(m + n + p)), x) def replacement2617(a, b, c, d, e, f, g, m, n, p, x): return Dist((m + n + p + S(1))/(a*(S(2)*m + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n, x), x) + Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2618(a, b, c, d, e, f, g, m, n, p, x): return Dist((m + n + p + S(1))/(a*(S(2)*m + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n, x), x) - Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2619(a, b, c, d, e, f, g, m, n, p, x): return Dist(a**IntPart(m)*c**IntPart(m)*g**(-S(2)*IntPart(m))*(g*cos(e + f*x))**(-S(2)*FracPart(m))*(a + b*sin(e + f*x))**FracPart(m)*(c + d*sin(e + f*x))**FracPart(m), Int((g*cos(e + f*x))**(S(2)*m + p)*(c + d*sin(e + f*x))**(-m + n), x), x) def replacement2620(a, b, c, d, e, f, g, m, n, p, x): return Dist(a**IntPart(m)*c**IntPart(m)*g**(-S(2)*IntPart(m))*(g*sin(e + f*x))**(-S(2)*FracPart(m))*(a + b*cos(e + f*x))**FracPart(m)*(c + d*cos(e + f*x))**FracPart(m), Int((g*sin(e + f*x))**(S(2)*m + p)*(c + d*cos(e + f*x))**(-m + n), x), x) def replacement2621(a, b, c, d, e, f, g, m, p, x): return -Simp(d*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(f*g*(m + p + S(1))), x) def replacement2622(a, b, c, d, e, f, g, m, p, x): return Simp(d*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(f*g*(m + p + S(1))), x) def replacement2623(a, b, c, d, e, f, g, m, p, x): return Dist(b*(a*d*m + b*c*(m + p + S(1)))/(a*g**S(2)*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**(m + S(-1)), x), x) - Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m*(a*d + b*c)/(a*f*g*(p + S(1))), x) def replacement2624(a, b, c, d, e, f, g, m, p, x): return Dist(b*(a*d*m + b*c*(m + p + S(1)))/(a*g**S(2)*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**(m + S(-1)), x), x) + Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m*(a*d + b*c)/(a*f*g*(p + S(1))), x) def replacement2625(a, b, c, d, e, f, g, m, p, x): return Dist((a*d*m + b*c*(m + p + S(1)))/(b*(m + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**m, x), x) - Simp(d*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(f*g*(m + p + S(1))), x) def replacement2626(a, b, c, d, e, f, g, m, p, x): return Dist((a*d*m + b*c*(m + p + S(1)))/(b*(m + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**m, x), x) + Simp(d*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(f*g*(m + p + S(1))), x) def replacement2627(a, b, c, d, e, f, m, x): return Dist(S(1)/(b**S(3)*(S(2)*m + S(3))), Int((a + b*sin(e + f*x))**(m + S(2))*(S(2)*a*d*(m + S(1)) + b*c - b*d*(S(2)*m + S(3))*sin(e + f*x)), x), x) + Simp(S(2)*(a + b*sin(e + f*x))**(m + S(1))*(-a*d + b*c)*cos(e + f*x)/(b**S(2)*f*(S(2)*m + S(3))), x) def replacement2628(a, b, c, d, e, f, m, x): return Dist(S(1)/(b**S(3)*(S(2)*m + S(3))), Int((a + b*cos(e + f*x))**(m + S(2))*(S(2)*a*d*(m + S(1)) + b*c - b*d*(S(2)*m + S(3))*cos(e + f*x)), x), x) + Simp(-S(2)*(a + b*cos(e + f*x))**(m + S(1))*(-a*d + b*c)*sin(e + f*x)/(b**S(2)*f*(S(2)*m + S(3))), x) def replacement2629(a, b, c, d, e, f, m, x): return -Dist(S(1)/(b**S(2)*(m + S(3))), Int((a + b*sin(e + f*x))**(m + S(1))*(-a*c*(m + S(3)) + b*d*(m + S(2)) + (-a*d*(m + S(4)) + b*c*(m + S(3)))*sin(e + f*x)), x), x) + Simp(d*(a + b*sin(e + f*x))**(m + S(2))*cos(e + f*x)/(b**S(2)*f*(m + S(3))), x) def replacement2630(a, b, c, d, e, f, m, x): return -Dist(S(1)/(b**S(2)*(m + S(3))), Int((a + b*cos(e + f*x))**(m + S(1))*(-a*c*(m + S(3)) + b*d*(m + S(2)) + (-a*d*(m + S(4)) + b*c*(m + S(3)))*cos(e + f*x)), x), x) - Simp(d*(a + b*cos(e + f*x))**(m + S(2))*sin(e + f*x)/(b**S(2)*f*(m + S(3))), x) def replacement2631(a, b, c, d, e, f, g, m, p, x): return Dist((a*d*m + b*c*(m + p + S(1)))/(a*b*(S(2)*m + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(1)), x), x) + Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m*(-a*d + b*c)/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2632(a, b, c, d, e, f, g, m, p, x): return Dist((a*d*m + b*c*(m + p + S(1)))/(a*b*(S(2)*m + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(1)), x), x) - Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m*(-a*d + b*c)/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2633(a, b, c, d, e, f, g, m, p, x): return Dist((a*d*m + b*c*(m + p + S(1)))/(b*(m + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**m, x), x) - Simp(d*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(f*g*(m + p + S(1))), x) def replacement2634(a, b, c, d, e, f, g, m, p, x): return Dist((a*d*m + b*c*(m + p + S(1)))/(b*(m + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**m, x), x) + Simp(d*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(f*g*(m + p + S(1))), x) def replacement2635(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**(m + S(-1))*Simp(a*c*(p + S(2)) + b*c*(m + p + S(2))*sin(e + f*x) + b*d*m, x), x), x) - Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m*(c*sin(e + f*x) + d)/(f*g*(p + S(1))), x) def replacement2636(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**(m + S(-1))*Simp(a*c*(p + S(2)) + b*c*(m + p + S(2))*cos(e + f*x) + b*d*m, x), x), x) + Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m*(c*cos(e + f*x) + d)/(f*g*(p + S(1))), x) def replacement2637(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/(m + p + S(1)), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(-1))*Simp(a*c*(m + p + S(1)) + b*d*m + (a*d*m + b*c*(m + p + S(1)))*sin(e + f*x), x), x), x) - Simp(d*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(f*g*(m + p + S(1))), x) def replacement2638(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/(m + p + S(1)), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(-1))*Simp(a*c*(m + p + S(1)) + b*d*m + (a*d*m + b*c*(m + p + S(1)))*cos(e + f*x), x), x), x) + Simp(d*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(f*g*(m + p + S(1))), x) def replacement2639(a, b, c, d, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b**S(2)*(m + S(1))*(m + p + S(1))), Int((g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**(m + S(1))*Simp(b*d*(m + S(1)) + (-a*d*p + b*c*(m + p + S(1)))*sin(e + f*x), x), x), x) + Simp(g*(g*cos(e + f*x))**(p + S(-1))*(a + b*sin(e + f*x))**(m + S(1))*(-a*d*p + b*c*(m + p + S(1)) + b*d*(m + S(1))*sin(e + f*x))/(b**S(2)*f*(m + S(1))*(m + p + S(1))), x) def replacement2640(a, b, c, d, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b**S(2)*(m + S(1))*(m + p + S(1))), Int((g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**(m + S(1))*Simp(b*d*(m + S(1)) + (-a*d*p + b*c*(m + p + S(1)))*cos(e + f*x), x), x), x) - Simp(g*(g*sin(e + f*x))**(p + S(-1))*(a + b*cos(e + f*x))**(m + S(1))*(-a*d*p + b*c*(m + p + S(1)) + b*d*(m + S(1))*cos(e + f*x))/(b**S(2)*f*(m + S(1))*(m + p + S(1))), x) def replacement2641(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(1))*Simp((m + S(1))*(a*c - b*d) - (-a*d + b*c)*(m + p + S(2))*sin(e + f*x), x), x), x) - Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(1))*(-a*d + b*c)/(f*g*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2642(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(1))*Simp((m + S(1))*(a*c - b*d) - (-a*d + b*c)*(m + p + S(2))*cos(e + f*x), x), x), x) + Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(1))*(-a*d + b*c)/(f*g*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2643(a, b, c, d, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b**S(2)*(m + p)*(m + p + S(1))), Int((g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**m*Simp(b*(a*d*m + b*c*(m + p + S(1))) + (a*b*c*(m + p + S(1)) - d*(a**S(2)*p - b**S(2)*(m + p)))*sin(e + f*x), x), x), x) + Simp(g*(g*cos(e + f*x))**(p + S(-1))*(a + b*sin(e + f*x))**(m + S(1))*(-a*d*p + b*c*(m + p + S(1)) + b*d*(m + p)*sin(e + f*x))/(b**S(2)*f*(m + p)*(m + p + S(1))), x) def replacement2644(a, b, c, d, e, f, g, m, p, x): return Dist(g**S(2)*(p + S(-1))/(b**S(2)*(m + p)*(m + p + S(1))), Int((g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**m*Simp(b*(a*d*m + b*c*(m + p + S(1))) + (a*b*c*(m + p + S(1)) - d*(a**S(2)*p - b**S(2)*(m + p)))*cos(e + f*x), x), x), x) - Simp(g*(g*sin(e + f*x))**(p + S(-1))*(a + b*cos(e + f*x))**(m + S(1))*(-a*d*p + b*c*(m + p + S(1)) + b*d*(m + p)*cos(e + f*x))/(b**S(2)*f*(m + p)*(m + p + S(1))), x) def replacement2645(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(a**S(2) - b**S(2))*(p + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**m*Simp(a*b*d*m + b*(a*c - b*d)*(m + p + S(3))*sin(e + f*x) + c*(a**S(2)*(p + S(2)) - b**S(2)*(m + p + S(2))), x), x), x) + Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(1))*(-a*d + b*c - (a*c - b*d)*sin(e + f*x))/(f*g*(a**S(2) - b**S(2))*(p + S(1))), x) def replacement2646(a, b, c, d, e, f, g, m, p, x): return Dist(S(1)/(g**S(2)*(a**S(2) - b**S(2))*(p + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**m*Simp(a*b*d*m + b*(a*c - b*d)*(m + p + S(3))*cos(e + f*x) + c*(a**S(2)*(p + S(2)) - b**S(2)*(m + p + S(2))), x), x), x) - Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(1))*(-a*d + b*c - (a*c - b*d)*cos(e + f*x))/(f*g*(a**S(2) - b**S(2))*(p + S(1))), x) def replacement2647(a, b, c, d, e, f, g, p, x): return Dist(d/b, Int((g*cos(e + f*x))**p, x), x) + Dist((-a*d + b*c)/b, Int((g*cos(e + f*x))**p/(a + b*sin(e + f*x)), x), x) def replacement2648(a, b, c, d, e, f, g, p, x): return Dist(d/b, Int((g*sin(e + f*x))**p, x), x) + Dist((-a*d + b*c)/b, Int((g*sin(e + f*x))**p/(a + b*cos(e + f*x)), x), x) def replacement2649(a, b, c, d, e, f, g, m, p, x): return Dist(c*g*(g*cos(e + f*x))**(p + S(-1))*(S(1) - sin(e + f*x))**(S(1)/2 - p/S(2))*(sin(e + f*x) + S(1))**(S(1)/2 - p/S(2))/f, Subst(Int((S(1) - d*x/c)**(p/S(2) + S(-1)/2)*(S(1) + d*x/c)**(p/S(2) + S(1)/2)*(a + b*x)**m, x), x, sin(e + f*x)), x) def replacement2650(a, b, c, d, e, f, g, m, p, x): return -Dist(c*g*(g*sin(e + f*x))**(p + S(-1))*(S(1) - cos(e + f*x))**(S(1)/2 - p/S(2))*(cos(e + f*x) + S(1))**(S(1)/2 - p/S(2))/f, Subst(Int((S(1) - d*x/c)**(p/S(2) + S(-1)/2)*(S(1) + d*x/c)**(p/S(2) + S(1)/2)*(a + b*x)**m, x), x, cos(e + f*x)), x) def replacement2651(a, b, d, e, f, m, n, p, x): return Dist(a**(S(2)*m), Int((d*sin(e + f*x))**n*(a - b*sin(e + f*x))**(-m), x), x) def replacement2652(a, b, d, e, f, m, n, p, x): return Dist(a**(S(2)*m), Int((d*cos(e + f*x))**n*(a - b*cos(e + f*x))**(-m), x), x) def replacement2653(a, b, e, f, g, m, p, x): return Dist(a/(S(2)*g**S(2)), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**(m + S(-1)), x), x) - Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(1))/(S(2)*b*f*g*(m + S(1))), x) def replacement2654(a, b, e, f, g, m, p, x): return Dist(a/(S(2)*g**S(2)), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**(m + S(-1)), x), x) + Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(1))/(S(2)*b*f*g*(m + S(1))), x) def replacement2655(a, b, e, f, g, m, p, x): return -Dist(g**(S(-2)), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**m, x), x) + Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(a*f*g*m), x) def replacement2656(a, b, e, f, g, m, p, x): return -Dist(g**(S(-2)), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**m, x), x) - Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(a*f*g*m), x) def replacement2657(a, b, d, e, f, m, n, p, x): return Dist(a**(-p), Int(ExpandTrig((d*sin(e + f*x))**n*(a - b*sin(e + f*x))**(p/S(2))*(a + b*sin(e + f*x))**(m + p/S(2)), x), x), x) def replacement2658(a, b, d, e, f, m, n, p, x): return Dist(a**(-p), Int(ExpandTrig((d*cos(e + f*x))**n*(a - b*cos(e + f*x))**(p/S(2))*(a + b*cos(e + f*x))**(m + p/S(2)), x), x), x) def replacement2659(a, b, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*cos(e + f*x))**p, (d*sin(e + f*x))**n*(a + b*sin(e + f*x))**m, x), x) def replacement2660(a, b, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*sin(e + f*x))**p, (d*cos(e + f*x))**n*(a + b*cos(e + f*x))**m, x), x) def replacement2661(a, b, d, e, f, m, n, x): return Dist(b**(S(-2)), Int((d*sin(e + f*x))**n*(a - b*sin(e + f*x))*(a + b*sin(e + f*x))**(m + S(1)), x), x) def replacement2662(a, b, d, e, f, m, n, x): return Dist(b**(S(-2)), Int((d*cos(e + f*x))**n*(a - b*cos(e + f*x))*(a + b*cos(e + f*x))**(m + S(1)), x), x) def replacement2663(a, b, d, e, f, g, m, n, p, x): return Dist((a/g)**(S(2)*m), Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(S(2)*m + p)*(a - b*sin(e + f*x))**(-m), x), x) def replacement2664(a, b, d, e, f, g, m, n, p, x): return Dist((a/g)**(S(2)*m), Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(S(2)*m + p)*(a - b*cos(e + f*x))**(-m), x), x) def replacement2665(a, b, d, e, f, g, m, n, p, x): return Dist((a/g)**(S(2)*m), Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(S(2)*m + p)*(a - b*sin(e + f*x))**(-m), x), x) def replacement2666(a, b, d, e, f, g, m, n, p, x): return Dist((a/g)**(S(2)*m), Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(S(2)*m + p)*(a - b*cos(e + f*x))**(-m), x), x) def replacement2667(a, b, e, f, g, m, p, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + p + S(1))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**(m + S(1))*(a*m - b*(S(2)*m + p + S(1))*sin(e + f*x)), x), x) + Simp(b*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2668(a, b, e, f, g, m, p, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + p + S(1))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**(m + S(1))*(a*m - b*(S(2)*m + p + S(1))*cos(e + f*x)), x), x) - Simp(b*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(a*f*g*(S(2)*m + p + S(1))), x) def replacement2669(a, b, e, f, g, m, p, x): return Dist(S(1)/(b*(m + p + S(2))), Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**m*(-a*(p + S(1))*sin(e + f*x) + b*(m + S(1))), x), x) - Simp((g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**(m + S(1))/(b*f*g*(m + p + S(2))), x) def replacement2670(a, b, e, f, g, m, p, x): return Dist(S(1)/(b*(m + p + S(2))), Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**m*(-a*(p + S(1))*cos(e + f*x) + b*(m + S(1))), x), x) + Simp((g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**(m + S(1))/(b*f*g*(m + p + S(2))), x) def replacement2671(a, b, d, e, f, m, n, x): return Dist(b**(S(-2)), Int((d*sin(e + f*x))**n*(a - b*sin(e + f*x))*(a + b*sin(e + f*x))**(m + S(1)), x), x) def replacement2672(a, b, d, e, f, m, n, x): return Dist(b**(S(-2)), Int((d*cos(e + f*x))**n*(a - b*cos(e + f*x))*(a + b*cos(e + f*x))**(m + S(1)), x), x) def replacement2673(a, b, d, e, f, m, n, x): return Dist(a**(S(-2)), Int((d*sin(e + f*x))**n*(a + b*sin(e + f*x))**(m + S(2))*(sin(e + f*x)**S(2) + S(1)), x), x) + Dist(-S(2)/(a*b*d), Int((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(2)), x), x) def replacement2674(a, b, d, e, f, m, n, x): return Dist(a**(S(-2)), Int((d*cos(e + f*x))**n*(a + b*cos(e + f*x))**(m + S(2))*(cos(e + f*x)**S(2) + S(1)), x), x) + Dist(-S(2)/(a*b*d), Int((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(2)), x), x) def replacement2675(a, b, d, e, f, m, n, x): return Dist(d**(S(-4)), Int((d*sin(e + f*x))**(n + S(4))*(a + b*sin(e + f*x))**m, x), x) + Int((d*sin(e + f*x))**n*(S(1) - S(2)*sin(e + f*x)**S(2))*(a + b*sin(e + f*x))**m, x) def replacement2676(a, b, d, e, f, m, n, x): return Dist(d**(S(-4)), Int((d*cos(e + f*x))**(n + S(4))*(a + b*cos(e + f*x))**m, x), x) + Int((d*cos(e + f*x))**n*(S(1) - S(2)*cos(e + f*x)**S(2))*(a + b*cos(e + f*x))**m, x) def replacement2677(a, b, d, e, f, m, n, p, x): return Dist(a**m*cos(e + f*x)/(f*sqrt(S(1) - sin(e + f*x))*sqrt(sin(e + f*x) + S(1))), Subst(Int((d*x)**n*(S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement2678(a, b, d, e, f, m, n, p, x): return -Dist(a**m*sin(e + f*x)/(f*sqrt(S(1) - cos(e + f*x))*sqrt(cos(e + f*x) + S(1))), Subst(Int((d*x)**n*(S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement2679(a, b, d, e, f, m, n, p, x): return Dist(a**(S(2) - p)*cos(e + f*x)/(f*sqrt(a - b*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), Subst(Int((d*x)**n*(a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement2680(a, b, d, e, f, m, n, p, x): return -Dist(a**(S(2) - p)*sin(e + f*x)/(f*sqrt(a - b*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), Subst(Int((d*x)**n*(a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement2681(a, b, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*cos(e + f*x))**p, (d*sin(e + f*x))**n*(a + b*sin(e + f*x))**m, x), x) def replacement2682(a, b, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*sin(e + f*x))**p, (d*cos(e + f*x))**n*(a + b*cos(e + f*x))**m, x), x) def replacement2683(a, b, d, e, f, g, m, n, p, x): return Dist(a**m*g*(g*cos(e + f*x))**(p + S(-1))*(S(1) - sin(e + f*x))**(S(1)/2 - p/S(2))*(sin(e + f*x) + S(1))**(S(1)/2 - p/S(2))/f, Subst(Int((d*x)**n*(S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement2684(a, b, d, e, f, g, m, n, p, x): return -Dist(a**m*g*(g*sin(e + f*x))**(p + S(-1))*(S(1) - cos(e + f*x))**(S(1)/2 - p/S(2))*(cos(e + f*x) + S(1))**(S(1)/2 - p/S(2))/f, Subst(Int((d*x)**n*(S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement2685(a, b, d, e, f, g, m, n, p, x): return Dist(g*(g*cos(e + f*x))**(p + S(-1))*(a - b*sin(e + f*x))**(S(1)/2 - p/S(2))*(a + b*sin(e + f*x))**(S(1)/2 - p/S(2))/f, Subst(Int((d*x)**n*(a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2), x), x, sin(e + f*x)), x) def replacement2686(a, b, d, e, f, g, m, n, p, x): return -Dist(g*(g*sin(e + f*x))**(p + S(-1))*(a - b*cos(e + f*x))**(S(1)/2 - p/S(2))*(a + b*cos(e + f*x))**(S(1)/2 - p/S(2))/f, Subst(Int((d*x)**n*(a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2), x), x, cos(e + f*x)), x) def replacement2687(a, b, d, e, f, g, m, p, x): return Dist(g**S(2)*(S(2)*m + S(3))/(S(2)*a*(m + S(1))), Int((g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**(m + S(1))/sqrt(d*sin(e + f*x)), x), x) - Simp(g*sqrt(d*sin(e + f*x))*(g*cos(e + f*x))**(p + S(-1))*(a + b*sin(e + f*x))**(m + S(1))/(a*d*f*(m + S(1))), x) def replacement2688(a, b, d, e, f, g, m, p, x): return Dist(g**S(2)*(S(2)*m + S(3))/(S(2)*a*(m + S(1))), Int((g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**(m + S(1))/sqrt(d*cos(e + f*x)), x), x) + Simp(g*sqrt(d*cos(e + f*x))*(g*sin(e + f*x))**(p + S(-1))*(a + b*cos(e + f*x))**(m + S(1))/(a*d*f*(m + S(1))), x) def replacement2689(a, b, d, e, f, g, m, p, x): return Dist(S(2)*a*m/(g**S(2)*(S(2)*m + S(1))), Int((g*cos(e + f*x))**(p + S(2))*(a + b*sin(e + f*x))**(m + S(-1))/sqrt(d*sin(e + f*x)), x), x) + Simp(S(2)*sqrt(d*sin(e + f*x))*(g*cos(e + f*x))**(p + S(1))*(a + b*sin(e + f*x))**m/(d*f*g*(S(2)*m + S(1))), x) def replacement2690(a, b, d, e, f, g, m, p, x): return Dist(S(2)*a*m/(g**S(2)*(S(2)*m + S(1))), Int((g*sin(e + f*x))**(p + S(2))*(a + b*cos(e + f*x))**(m + S(-1))/sqrt(d*cos(e + f*x)), x), x) + Simp(-S(2)*sqrt(d*cos(e + f*x))*(g*sin(e + f*x))**(p + S(1))*(a + b*cos(e + f*x))**m/(d*f*g*(S(2)*m + S(1))), x) def replacement2691(a, b, d, e, f, m, n, x): return Int((d*sin(e + f*x))**n*(S(1) - sin(e + f*x)**S(2))*(a + b*sin(e + f*x))**m, x) def replacement2692(a, b, d, e, f, m, n, x): return Int((d*cos(e + f*x))**n*(S(1) - cos(e + f*x)**S(2))*(a + b*cos(e + f*x))**m, x) def replacement2693(a, b, d, e, f, m, n, x): return Dist(S(1)/(a**S(2)*b*d*(m + S(1))*(n + S(1))), Int((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(1))*Simp(a**S(2)*(n + S(1))*(n + S(2)) + a*b*(m + S(1))*sin(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(3)) - (a**S(2)*(n + S(1))*(n + S(3)) - b**S(2)*(m + n + S(2))*(m + n + S(4)))*sin(e + f*x)**S(2), x), x), x) + Simp((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(a*d*f*(n + S(1))), x) - Simp((d*sin(e + f*x))**(n + S(2))*(a + b*sin(e + f*x))**(m + S(1))*(a**S(2)*(n + S(1)) - b**S(2)*(m + n + S(2)))*cos(e + f*x)/(a**S(2)*b*d**S(2)*f*(m + S(1))*(n + S(1))), x) def replacement2694(a, b, d, e, f, m, n, x): return Dist(S(1)/(a**S(2)*b*d*(m + S(1))*(n + S(1))), Int((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(1))*Simp(a**S(2)*(n + S(1))*(n + S(2)) + a*b*(m + S(1))*cos(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(3)) - (a**S(2)*(n + S(1))*(n + S(3)) - b**S(2)*(m + n + S(2))*(m + n + S(4)))*cos(e + f*x)**S(2), x), x), x) - Simp((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(a*d*f*(n + S(1))), x) + Simp((d*cos(e + f*x))**(n + S(2))*(a + b*cos(e + f*x))**(m + S(1))*(a**S(2)*(n + S(1)) - b**S(2)*(m + n + S(2)))*sin(e + f*x)/(a**S(2)*b*d**S(2)*f*(m + S(1))*(n + S(1))), x) def replacement2695(a, b, d, e, f, m, n, x): return -Dist(S(1)/(a**S(2)*b**S(2)*(m + S(1))*(m + S(2))), Int((d*sin(e + f*x))**n*(a + b*sin(e + f*x))**(m + S(2))*Simp(a**S(2)*(n + S(1))*(n + S(3)) + a*b*(m + S(2))*sin(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(3)) - (a**S(2)*(n + S(2))*(n + S(3)) - b**S(2)*(m + n + S(2))*(m + n + S(4)))*sin(e + f*x)**S(2), x), x), x) + Simp((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(1))*(a**S(2) - b**S(2))*cos(e + f*x)/(a*b**S(2)*d*f*(m + S(1))), x) + Simp((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(2))*(a**S(2)*(-m + n + S(1)) - b**S(2)*(m + n + S(2)))*cos(e + f*x)/(a**S(2)*b**S(2)*d*f*(m + S(1))*(m + S(2))), x) def replacement2696(a, b, d, e, f, m, n, x): return -Dist(S(1)/(a**S(2)*b**S(2)*(m + S(1))*(m + S(2))), Int((d*cos(e + f*x))**n*(a + b*cos(e + f*x))**(m + S(2))*Simp(a**S(2)*(n + S(1))*(n + S(3)) + a*b*(m + S(2))*cos(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(3)) - (a**S(2)*(n + S(2))*(n + S(3)) - b**S(2)*(m + n + S(2))*(m + n + S(4)))*cos(e + f*x)**S(2), x), x), x) - Simp((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(1))*(a**S(2) - b**S(2))*sin(e + f*x)/(a*b**S(2)*d*f*(m + S(1))), x) - Simp((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(2))*(a**S(2)*(-m + n + S(1)) - b**S(2)*(m + n + S(2)))*sin(e + f*x)/(a**S(2)*b**S(2)*d*f*(m + S(1))*(m + S(2))), x) def replacement2697(a, b, d, e, f, m, n, x): return -Dist(S(1)/(a*b**S(2)*(m + S(1))*(m + n + S(4))), Int((d*sin(e + f*x))**n*(a + b*sin(e + f*x))**(m + S(1))*Simp(a**S(2)*(n + S(1))*(n + S(3)) + a*b*(m + S(1))*sin(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(4)) - (a**S(2)*(n + S(2))*(n + S(3)) - b**S(2)*(m + n + S(3))*(m + n + S(4)))*sin(e + f*x)**S(2), x), x), x) - Simp((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(2))*cos(e + f*x)/(b**S(2)*d*f*(m + n + S(4))), x) + Simp((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(1))*(a**S(2) - b**S(2))*cos(e + f*x)/(a*b**S(2)*d*f*(m + S(1))), x) def replacement2698(a, b, d, e, f, m, n, x): return -Dist(S(1)/(a*b**S(2)*(m + S(1))*(m + n + S(4))), Int((d*cos(e + f*x))**n*(a + b*cos(e + f*x))**(m + S(1))*Simp(a**S(2)*(n + S(1))*(n + S(3)) + a*b*(m + S(1))*cos(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(4)) - (a**S(2)*(n + S(2))*(n + S(3)) - b**S(2)*(m + n + S(3))*(m + n + S(4)))*cos(e + f*x)**S(2), x), x), x) + Simp((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(2))*sin(e + f*x)/(b**S(2)*d*f*(m + n + S(4))), x) - Simp((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(1))*(a**S(2) - b**S(2))*sin(e + f*x)/(a*b**S(2)*d*f*(m + S(1))), x) def replacement2699(a, b, d, e, f, m, n, x): return -Dist(S(1)/(a**S(2)*d**S(2)*(n + S(1))*(n + S(2))), Int((d*sin(e + f*x))**(n + S(2))*(a + b*sin(e + f*x))**m*Simp(a**S(2)*n*(n + S(2)) + a*b*m*sin(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(3)) - (a**S(2)*(n + S(1))*(n + S(2)) - b**S(2)*(m + n + S(2))*(m + n + S(4)))*sin(e + f*x)**S(2), x), x), x) + Simp((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(a*d*f*(n + S(1))), x) - Simp(b*(d*sin(e + f*x))**(n + S(2))*(a + b*sin(e + f*x))**(m + S(1))*(m + n + S(2))*cos(e + f*x)/(a**S(2)*d**S(2)*f*(n + S(1))*(n + S(2))), x) def replacement2700(a, b, d, e, f, m, n, x): return -Dist(S(1)/(a**S(2)*d**S(2)*(n + S(1))*(n + S(2))), Int((d*cos(e + f*x))**(n + S(2))*(a + b*cos(e + f*x))**m*Simp(a**S(2)*n*(n + S(2)) + a*b*m*cos(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(3)) - (a**S(2)*(n + S(1))*(n + S(2)) - b**S(2)*(m + n + S(2))*(m + n + S(4)))*cos(e + f*x)**S(2), x), x), x) - Simp((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(a*d*f*(n + S(1))), x) + Simp(b*(d*cos(e + f*x))**(n + S(2))*(a + b*cos(e + f*x))**(m + S(1))*(m + n + S(2))*sin(e + f*x)/(a**S(2)*d**S(2)*f*(n + S(1))*(n + S(2))), x) def replacement2701(a, b, d, e, f, m, n, x): return Dist(S(1)/(a*b*d*(n + S(1))*(m + n + S(4))), Int((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**m*Simp(a**S(2)*(n + S(1))*(n + S(2)) + a*b*(m + S(3))*sin(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(4)) - (a**S(2)*(n + S(1))*(n + S(3)) - b**S(2)*(m + n + S(3))*(m + n + S(4)))*sin(e + f*x)**S(2), x), x), x) + Simp((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(a*d*f*(n + S(1))), x) - Simp((d*sin(e + f*x))**(n + S(2))*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*d**S(2)*f*(m + n + S(4))), x) def replacement2702(a, b, d, e, f, m, n, x): return Dist(S(1)/(a*b*d*(n + S(1))*(m + n + S(4))), Int((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**m*Simp(a**S(2)*(n + S(1))*(n + S(2)) + a*b*(m + S(3))*cos(e + f*x) - b**S(2)*(m + n + S(2))*(m + n + S(4)) - (a**S(2)*(n + S(1))*(n + S(3)) - b**S(2)*(m + n + S(3))*(m + n + S(4)))*cos(e + f*x)**S(2), x), x), x) - Simp((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(a*d*f*(n + S(1))), x) + Simp((d*cos(e + f*x))**(n + S(2))*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*d**S(2)*f*(m + n + S(4))), x) def replacement2703(a, b, d, e, f, m, n, x): return -Dist(S(1)/(b**S(2)*(m + n + S(3))*(m + n + S(4))), Int((d*sin(e + f*x))**n*(a + b*sin(e + f*x))**m*Simp(a**S(2)*(n + S(1))*(n + S(3)) + a*b*m*sin(e + f*x) - b**S(2)*(m + n + S(3))*(m + n + S(4)) - (a**S(2)*(n + S(2))*(n + S(3)) - b**S(2)*(m + n + S(3))*(m + n + S(5)))*sin(e + f*x)**S(2), x), x), x) - Simp((d*sin(e + f*x))**(n + S(2))*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*d**S(2)*f*(m + n + S(4))), x) + Simp(a*(d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(1))*(n + S(3))*cos(e + f*x)/(b**S(2)*d*f*(m + n + S(3))*(m + n + S(4))), x) def replacement2704(a, b, d, e, f, m, n, x): return -Dist(S(1)/(b**S(2)*(m + n + S(3))*(m + n + S(4))), Int((d*cos(e + f*x))**n*(a + b*cos(e + f*x))**m*Simp(a**S(2)*(n + S(1))*(n + S(3)) + a*b*m*cos(e + f*x) - b**S(2)*(m + n + S(3))*(m + n + S(4)) - (a**S(2)*(n + S(2))*(n + S(3)) - b**S(2)*(m + n + S(3))*(m + n + S(5)))*cos(e + f*x)**S(2), x), x), x) + Simp((d*cos(e + f*x))**(n + S(2))*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*d**S(2)*f*(m + n + S(4))), x) - Simp(a*(d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(1))*(n + S(3))*sin(e + f*x)/(b**S(2)*d*f*(m + n + S(3))*(m + n + S(4))), x) def replacement2705(a, b, d, e, f, m, n, x): return Dist(S(1)/(a**S(2)*b**S(2)*d**S(2)*(n + S(1))*(n + S(2))*(m + n + S(5))*(m + n + S(6))), Int((d*sin(e + f*x))**(n + S(2))*(a + b*sin(e + f*x))**m*Simp(a**S(4)*(n + S(1))*(n + S(2))*(n + S(3))*(n + S(5)) - a**S(2)*b**S(2)*(n + S(2))*(S(2)*n + S(1))*(m + n + S(5))*(m + n + S(6)) + a*b*m*(a**S(2)*(n + S(1))*(n + S(2)) - b**S(2)*(m + n + S(5))*(m + n + S(6)))*sin(e + f*x) + b**S(4)*(m + n + S(2))*(m + n + S(3))*(m + n + S(5))*(m + n + S(6)) - (a**S(4)*(n + S(1))*(n + S(2))*(n + S(4))*(n + S(5)) - a**S(2)*b**S(2)*(n + S(1))*(n + S(2))*(m + n + S(5))*(S(2)*m + S(2)*n + S(13)) + b**S(4)*(m + n + S(2))*(m + n + S(4))*(m + n + S(5))*(m + n + S(6)))*sin(e + f*x)**S(2), x), x), x) + Simp((d*sin(e + f*x))**(n + S(1))*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(a*d*f*(n + S(1))), x) + Simp((d*sin(e + f*x))**(n + S(4))*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*d**S(4)*f*(m + n + S(6))), x) - Simp(b*(d*sin(e + f*x))**(n + S(2))*(a + b*sin(e + f*x))**(m + S(1))*(m + n + S(2))*cos(e + f*x)/(a**S(2)*d**S(2)*f*(n + S(1))*(n + S(2))), x) - Simp(a*(d*sin(e + f*x))**(n + S(3))*(a + b*sin(e + f*x))**(m + S(1))*(n + S(5))*cos(e + f*x)/(b**S(2)*d**S(3)*f*(m + n + S(5))*(m + n + S(6))), x) def replacement2706(a, b, d, e, f, m, n, x): return Dist(S(1)/(a**S(2)*b**S(2)*d**S(2)*(n + S(1))*(n + S(2))*(m + n + S(5))*(m + n + S(6))), Int((d*cos(e + f*x))**(n + S(2))*(a + b*cos(e + f*x))**m*Simp(a**S(4)*(n + S(1))*(n + S(2))*(n + S(3))*(n + S(5)) - a**S(2)*b**S(2)*(n + S(2))*(S(2)*n + S(1))*(m + n + S(5))*(m + n + S(6)) + a*b*m*(a**S(2)*(n + S(1))*(n + S(2)) - b**S(2)*(m + n + S(5))*(m + n + S(6)))*cos(e + f*x) + b**S(4)*(m + n + S(2))*(m + n + S(3))*(m + n + S(5))*(m + n + S(6)) - (a**S(4)*(n + S(1))*(n + S(2))*(n + S(4))*(n + S(5)) - a**S(2)*b**S(2)*(n + S(1))*(n + S(2))*(m + n + S(5))*(S(2)*m + S(2)*n + S(13)) + b**S(4)*(m + n + S(2))*(m + n + S(4))*(m + n + S(5))*(m + n + S(6)))*cos(e + f*x)**S(2), x), x), x) - Simp((d*cos(e + f*x))**(n + S(1))*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(a*d*f*(n + S(1))), x) - Simp((d*cos(e + f*x))**(n + S(4))*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*d**S(4)*f*(m + n + S(6))), x) + Simp(b*(d*cos(e + f*x))**(n + S(2))*(a + b*cos(e + f*x))**(m + S(1))*(m + n + S(2))*sin(e + f*x)/(a**S(2)*d**S(2)*f*(n + S(1))*(n + S(2))), x) + Simp(a*(d*cos(e + f*x))**(n + S(3))*(a + b*cos(e + f*x))**(m + S(1))*(n + S(5))*sin(e + f*x)/(b**S(2)*d**S(3)*f*(m + n + S(5))*(m + n + S(6))), x) def replacement2707(a, b, d, e, f, m, n, p, x): return Int(ExpandTrig((d*sin(e + f*x))**n*(S(1) - sin(e + f*x)**S(2))**(p/S(2))*(a + b*sin(e + f*x))**m, x), x) def replacement2708(a, b, d, e, f, m, n, p, x): return Int(ExpandTrig((d*cos(e + f*x))**n*(S(1) - cos(e + f*x)**S(2))**(p/S(2))*(a + b*cos(e + f*x))**m, x), x) def replacement2709(a, b, e, f, g, n, p, x): return Int(ExpandTrig((g*cos(e + f*x))**p, sin(e + f*x)**n/(a + b*sin(e + f*x)), x), x) def replacement2710(a, b, e, f, g, n, p, x): return Int(ExpandTrig((g*sin(e + f*x))**p, cos(e + f*x)**n/(a + b*cos(e + f*x)), x), x) def replacement2711(a, b, d, e, f, g, n, p, x): return Dist(g**S(2)/a, Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(p + S(-2)), x), x) - Dist(b*g**S(2)/(a**S(2)*d), Int((d*sin(e + f*x))**(n + S(1))*(g*cos(e + f*x))**(p + S(-2)), x), x) - Dist(g**S(2)*(a**S(2) - b**S(2))/(a**S(2)*d**S(2)), Int((d*sin(e + f*x))**(n + S(2))*(g*cos(e + f*x))**(p + S(-2))/(a + b*sin(e + f*x)), x), x) def replacement2712(a, b, d, e, f, g, n, p, x): return Dist(g**S(2)/a, Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(p + S(-2)), x), x) - Dist(b*g**S(2)/(a**S(2)*d), Int((d*cos(e + f*x))**(n + S(1))*(g*sin(e + f*x))**(p + S(-2)), x), x) - Dist(g**S(2)*(a**S(2) - b**S(2))/(a**S(2)*d**S(2)), Int((d*cos(e + f*x))**(n + S(2))*(g*sin(e + f*x))**(p + S(-2))/(a + b*cos(e + f*x)), x), x) def replacement2713(a, b, d, e, f, g, n, p, x): return Dist(g**S(2)/(a*b), Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(p + S(-2))*(-a*sin(e + f*x) + b), x), x) + Dist(g**S(2)*(a**S(2) - b**S(2))/(a*b*d), Int((d*sin(e + f*x))**(n + S(1))*(g*cos(e + f*x))**(p + S(-2))/(a + b*sin(e + f*x)), x), x) def replacement2714(a, b, d, e, f, g, n, p, x): return Dist(g**S(2)/(a*b), Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(p + S(-2))*(-a*cos(e + f*x) + b), x), x) + Dist(g**S(2)*(a**S(2) - b**S(2))/(a*b*d), Int((d*cos(e + f*x))**(n + S(1))*(g*sin(e + f*x))**(p + S(-2))/(a + b*cos(e + f*x)), x), x) def replacement2715(a, b, d, e, f, g, n, p, x): return Dist(g**S(2)/b**S(2), Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(p + S(-2))*(a - b*sin(e + f*x)), x), x) - Dist(g**S(2)*(a**S(2) - b**S(2))/b**S(2), Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(p + S(-2))/(a + b*sin(e + f*x)), x), x) def replacement2716(a, b, d, e, f, g, n, p, x): return Dist(g**S(2)/b**S(2), Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(p + S(-2))*(a - b*cos(e + f*x)), x), x) - Dist(g**S(2)*(a**S(2) - b**S(2))/b**S(2), Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(p + S(-2))/(a + b*cos(e + f*x)), x), x) def replacement2717(a, b, d, e, f, g, n, p, x): return Dist(a*d**S(2)/(a**S(2) - b**S(2)), Int((d*sin(e + f*x))**(n + S(-2))*(g*cos(e + f*x))**p, x), x) - Dist(b*d/(a**S(2) - b**S(2)), Int((d*sin(e + f*x))**(n + S(-1))*(g*cos(e + f*x))**p, x), x) - Dist(a**S(2)*d**S(2)/(g**S(2)*(a**S(2) - b**S(2))), Int((d*sin(e + f*x))**(n + S(-2))*(g*cos(e + f*x))**(p + S(2))/(a + b*sin(e + f*x)), x), x) def replacement2718(a, b, d, e, f, g, n, p, x): return Dist(a*d**S(2)/(a**S(2) - b**S(2)), Int((d*cos(e + f*x))**(n + S(-2))*(g*sin(e + f*x))**p, x), x) - Dist(b*d/(a**S(2) - b**S(2)), Int((d*cos(e + f*x))**(n + S(-1))*(g*sin(e + f*x))**p, x), x) - Dist(a**S(2)*d**S(2)/(g**S(2)*(a**S(2) - b**S(2))), Int((d*cos(e + f*x))**(n + S(-2))*(g*sin(e + f*x))**(p + S(2))/(a + b*cos(e + f*x)), x), x) def replacement2719(a, b, d, e, f, g, n, p, x): return -Dist(d/(a**S(2) - b**S(2)), Int((d*sin(e + f*x))**(n + S(-1))*(g*cos(e + f*x))**p*(-a*sin(e + f*x) + b), x), x) + Dist(a*b*d/(g**S(2)*(a**S(2) - b**S(2))), Int((d*sin(e + f*x))**(n + S(-1))*(g*cos(e + f*x))**(p + S(2))/(a + b*sin(e + f*x)), x), x) def replacement2720(a, b, d, e, f, g, n, p, x): return -Dist(d/(a**S(2) - b**S(2)), Int((d*cos(e + f*x))**(n + S(-1))*(g*sin(e + f*x))**p*(-a*cos(e + f*x) + b), x), x) + Dist(a*b*d/(g**S(2)*(a**S(2) - b**S(2))), Int((d*cos(e + f*x))**(n + S(-1))*(g*sin(e + f*x))**(p + S(2))/(a + b*cos(e + f*x)), x), x) def replacement2721(a, b, d, e, f, g, n, p, x): return -Dist(b**S(2)/(g**S(2)*(a**S(2) - b**S(2))), Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(p + S(2))/(a + b*sin(e + f*x)), x), x) + Dist(S(1)/(a**S(2) - b**S(2)), Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**p*(a - b*sin(e + f*x)), x), x) def replacement2722(a, b, d, e, f, g, n, p, x): return -Dist(b**S(2)/(g**S(2)*(a**S(2) - b**S(2))), Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(p + S(2))/(a + b*cos(e + f*x)), x), x) + Dist(S(1)/(a**S(2) - b**S(2)), Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**p*(a - b*cos(e + f*x)), x), x) def replacement2723(a, b, e, f, g, x): return Dist(-S(4)*sqrt(S(2))*g/f, Subst(Int(x**S(2)/(sqrt(S(1) - x**S(4)/g**S(2))*(g**S(2)*(a + b) + x**S(4)*(a - b))), x), x, sqrt(g*cos(e + f*x))/sqrt(sin(e + f*x) + S(1))), x) def replacement2724(a, b, e, f, g, x): return Dist(S(4)*sqrt(S(2))*g/f, Subst(Int(x**S(2)/(sqrt(S(1) - x**S(4)/g**S(2))*(g**S(2)*(a + b) + x**S(4)*(a - b))), x), x, sqrt(g*sin(e + f*x))/sqrt(cos(e + f*x) + S(1))), x) def replacement2725(a, b, d, e, f, g, x): return Dist(sqrt(sin(e + f*x))/sqrt(d*sin(e + f*x)), Int(sqrt(g*cos(e + f*x))/((a + b*sin(e + f*x))*sqrt(sin(e + f*x))), x), x) def replacement2726(a, b, d, e, f, g, x): return Dist(sqrt(cos(e + f*x))/sqrt(d*cos(e + f*x)), Int(sqrt(g*sin(e + f*x))/((a + b*cos(e + f*x))*sqrt(cos(e + f*x))), x), x) def With2727(a, b, d, e, f, x): q = Rt(-a**S(2) + b**S(2), S(2)) return -Dist(S(2)*sqrt(S(2))*d*(b - q)/(f*q), Subst(Int(S(1)/(sqrt(S(1) - x**S(4)/d**S(2))*(a*x**S(2) + d*(b - q))), x), x, sqrt(d*sin(e + f*x))/sqrt(cos(e + f*x) + S(1))), x) + Dist(S(2)*sqrt(S(2))*d*(b + q)/(f*q), Subst(Int(S(1)/(sqrt(S(1) - x**S(4)/d**S(2))*(a*x**S(2) + d*(b + q))), x), x, sqrt(d*sin(e + f*x))/sqrt(cos(e + f*x) + S(1))), x) def With2728(a, b, d, e, f, x): q = Rt(-a**S(2) + b**S(2), S(2)) return Dist(S(2)*sqrt(S(2))*d*(b - q)/(f*q), Subst(Int(S(1)/(sqrt(S(1) - x**S(4)/d**S(2))*(a*x**S(2) + d*(b - q))), x), x, sqrt(d*cos(e + f*x))/sqrt(sin(e + f*x) + S(1))), x) + Dist(-S(2)*sqrt(S(2))*d*(b + q)/(f*q), Subst(Int(S(1)/(sqrt(S(1) - x**S(4)/d**S(2))*(a*x**S(2) + d*(b + q))), x), x, sqrt(d*cos(e + f*x))/sqrt(sin(e + f*x) + S(1))), x) def replacement2729(a, b, d, e, f, g, x): return Dist(sqrt(cos(e + f*x))/sqrt(g*cos(e + f*x)), Int(sqrt(d*sin(e + f*x))/((a + b*sin(e + f*x))*sqrt(cos(e + f*x))), x), x) def replacement2730(a, b, d, e, f, g, x): return Dist(sqrt(sin(e + f*x))/sqrt(g*sin(e + f*x)), Int(sqrt(d*cos(e + f*x))/((a + b*cos(e + f*x))*sqrt(sin(e + f*x))), x), x) def replacement2731(a, b, d, e, f, g, n, p, x): return Dist(d/b, Int((d*sin(e + f*x))**(n + S(-1))*(g*cos(e + f*x))**p, x), x) - Dist(a*d/b, Int((d*sin(e + f*x))**(n + S(-1))*(g*cos(e + f*x))**p/(a + b*sin(e + f*x)), x), x) def replacement2732(a, b, d, e, f, g, n, p, x): return Dist(d/b, Int((d*cos(e + f*x))**(n + S(-1))*(g*sin(e + f*x))**p, x), x) - Dist(a*d/b, Int((d*cos(e + f*x))**(n + S(-1))*(g*sin(e + f*x))**p/(a + b*cos(e + f*x)), x), x) def replacement2733(a, b, d, e, f, g, n, p, x): return Dist(S(1)/a, Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**p, x), x) - Dist(b/(a*d), Int((d*sin(e + f*x))**(n + S(1))*(g*cos(e + f*x))**p/(a + b*sin(e + f*x)), x), x) def replacement2734(a, b, d, e, f, g, n, p, x): return Dist(S(1)/a, Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**p, x), x) - Dist(b/(a*d), Int((d*cos(e + f*x))**(n + S(1))*(g*sin(e + f*x))**p/(a + b*cos(e + f*x)), x), x) def replacement2735(a, b, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*cos(e + f*x))**p, (d*sin(e + f*x))**n*(a + b*sin(e + f*x))**m, x), x) def replacement2736(a, b, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*sin(e + f*x))**p, (d*cos(e + f*x))**n*(a + b*cos(e + f*x))**m, x), x) def replacement2737(a, b, d, e, f, g, m, n, p, x): return Dist(g**S(2)/a, Int((d*sin(e + f*x))**n*(g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**(m + S(1)), x), x) - Dist(b*g**S(2)/(a**S(2)*d), Int((d*sin(e + f*x))**(n + S(1))*(g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**(m + S(1)), x), x) - Dist(g**S(2)*(a**S(2) - b**S(2))/(a**S(2)*d**S(2)), Int((d*sin(e + f*x))**(n + S(2))*(g*cos(e + f*x))**(p + S(-2))*(a + b*sin(e + f*x))**m, x), x) def replacement2738(a, b, d, e, f, g, m, n, p, x): return Dist(g**S(2)/a, Int((d*cos(e + f*x))**n*(g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**(m + S(1)), x), x) - Dist(b*g**S(2)/(a**S(2)*d), Int((d*cos(e + f*x))**(n + S(1))*(g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**(m + S(1)), x), x) - Dist(g**S(2)*(a**S(2) - b**S(2))/(a**S(2)*d**S(2)), Int((d*cos(e + f*x))**(n + S(2))*(g*sin(e + f*x))**(p + S(-2))*(a + b*cos(e + f*x))**m, x), x) def replacement2739(a, b, c, d, e, f, m, n, p, x): return Dist(a**(S(2)*m), Int((a - b*sin(e + f*x))**(-m)*(c + d*sin(e + f*x))**n, x), x) def replacement2740(a, b, c, d, e, f, m, n, p, x): return Dist(a**(S(2)*m), Int((a - b*cos(e + f*x))**(-m)*(c + d*cos(e + f*x))**n, x), x) def replacement2741(a, b, c, d, e, f, g, m, n, p, x): return Dist((a/g)**(S(2)*m), Int((g*cos(e + f*x))**(S(2)*m + p)*(a - b*sin(e + f*x))**(-m)*(c + d*sin(e + f*x))**n, x), x) def replacement2742(a, b, c, d, e, f, g, m, n, p, x): return Dist((a/g)**(S(2)*m), Int((g*sin(e + f*x))**(S(2)*m + p)*(a - b*cos(e + f*x))**(-m)*(c + d*cos(e + f*x))**n, x), x) def replacement2743(a, b, c, d, e, f, m, n, x): return Dist(b**(S(-2)), Int((a - b*sin(e + f*x))*(a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n, x), x) def replacement2744(a, b, c, d, e, f, m, n, x): return Dist(b**(S(-2)), Int((a - b*cos(e + f*x))*(a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n, x), x) def replacement2745(a, b, c, d, e, f, m, n, p, x): return Dist(a**m*cos(e + f*x)/(f*sqrt(S(1) - sin(e + f*x))*sqrt(sin(e + f*x) + S(1))), Subst(Int((S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2)*(c + d*x)**n, x), x, sin(e + f*x)), x) def replacement2746(a, b, c, d, e, f, m, n, p, x): return -Dist(a**m*sin(e + f*x)/(f*sqrt(S(1) - cos(e + f*x))*sqrt(cos(e + f*x) + S(1))), Subst(Int((S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2)*(c + d*x)**n, x), x, cos(e + f*x)), x) def replacement2747(a, b, c, d, e, f, m, n, p, x): return Dist(a**(S(2) - p)*cos(e + f*x)/(f*sqrt(a - b*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), Subst(Int((a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2)*(c + d*x)**n, x), x, sin(e + f*x)), x) def replacement2748(a, b, c, d, e, f, m, n, p, x): return -Dist(a**(S(2) - p)*sin(e + f*x)/(f*sqrt(a - b*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), Subst(Int((a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2)*(c + d*x)**n, x), x, cos(e + f*x)), x) def replacement2749(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*cos(e + f*x))**p, (a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x), x) def replacement2750(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*sin(e + f*x))**p, (a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x), x) def replacement2751(a, b, c, d, e, f, g, m, n, p, x): return Dist(a**m*g*(g*cos(e + f*x))**(p + S(-1))*(S(1) - sin(e + f*x))**(S(1)/2 - p/S(2))*(sin(e + f*x) + S(1))**(S(1)/2 - p/S(2))/f, Subst(Int((S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2)*(c + d*x)**n, x), x, sin(e + f*x)), x) def replacement2752(a, b, c, d, e, f, g, m, n, p, x): return -Dist(a**m*g*(g*sin(e + f*x))**(p + S(-1))*(S(1) - cos(e + f*x))**(S(1)/2 - p/S(2))*(cos(e + f*x) + S(1))**(S(1)/2 - p/S(2))/f, Subst(Int((S(1) - b*x/a)**(p/S(2) + S(-1)/2)*(S(1) + b*x/a)**(m + p/S(2) + S(-1)/2)*(c + d*x)**n, x), x, cos(e + f*x)), x) def replacement2753(a, b, c, d, e, f, g, m, n, p, x): return Dist(g*(g*cos(e + f*x))**(p + S(-1))*(a - b*sin(e + f*x))**(S(1)/2 - p/S(2))*(a + b*sin(e + f*x))**(S(1)/2 - p/S(2))/f, Subst(Int((a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2)*(c + d*x)**n, x), x, sin(e + f*x)), x) def replacement2754(a, b, c, d, e, f, g, m, n, p, x): return -Dist(g*(g*sin(e + f*x))**(p + S(-1))*(a - b*cos(e + f*x))**(S(1)/2 - p/S(2))*(a + b*cos(e + f*x))**(S(1)/2 - p/S(2))/f, Subst(Int((a - b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2)*(c + d*x)**n, x), x, cos(e + f*x)), x) def replacement2755(a, b, c, d, e, f, m, n, x): return Int((S(1) - sin(e + f*x)**S(2))*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x) def replacement2756(a, b, c, d, e, f, m, n, x): return Int((S(1) - cos(e + f*x)**S(2))*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x) def replacement2757(a, b, c, d, e, f, m, n, p, x): return Int(ExpandTrig((S(1) - sin(e + f*x)**S(2))**(p/S(2))*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x), x) def replacement2758(a, b, c, d, e, f, m, n, p, x): return Int(ExpandTrig((S(1) - cos(e + f*x)**S(2))**(p/S(2))*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x), x) def replacement2759(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x), x) def replacement2760(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x), x) def replacement2761(a, b, c, d, e, f, g, m, n, p, x): return Int((g*cos(e + f*x))**p*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x) def replacement2762(a, b, c, d, e, f, g, m, n, p, x): return Int((g*sin(e + f*x))**p*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x) def replacement2763(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(S(2)*IntPart(p))*(g/cos(e + f*x))**FracPart(p)*(g*cos(e + f*x))**FracPart(p), Int((g*cos(e + f*x))**(-p)*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x), x) def replacement2764(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(S(2)*IntPart(p))*(g/sin(e + f*x))**FracPart(p)*(g*sin(e + f*x))**FracPart(p), Int((g*sin(e + f*x))**(-p)*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x), x) def replacement2765(a, b, c, d, e, f, g, x): return Dist(g/d, Int(sqrt(a + b*sin(e + f*x))/sqrt(g*sin(e + f*x)), x), x) - Dist(c*g/d, Int(sqrt(a + b*sin(e + f*x))/(sqrt(g*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) def replacement2766(a, b, c, d, e, f, g, x): return Dist(g/d, Int(sqrt(a + b*cos(e + f*x))/sqrt(g*cos(e + f*x)), x), x) - Dist(c*g/d, Int(sqrt(a + b*cos(e + f*x))/(sqrt(g*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) def replacement2767(a, b, c, d, e, f, g, x): return Dist(b/d, Int(sqrt(g*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int(sqrt(g*sin(e + f*x))/(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) def replacement2768(a, b, c, d, e, f, g, x): return Dist(b/d, Int(sqrt(g*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int(sqrt(g*cos(e + f*x))/(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) def replacement2769(a, b, c, d, e, f, g, x): return Dist(-S(2)*b/f, Subst(Int(S(1)/(a*d + b*c + c*g*x**S(2)), x), x, b*cos(e + f*x)/(sqrt(g*sin(e + f*x))*sqrt(a + b*sin(e + f*x)))), x) def replacement2770(a, b, c, d, e, f, g, x): return Dist(S(2)*b/f, Subst(Int(S(1)/(a*d + b*c + c*g*x**S(2)), x), x, b*sin(e + f*x)/(sqrt(g*cos(e + f*x))*sqrt(a + b*cos(e + f*x)))), x) def replacement2771(a, b, c, d, e, f, x): return -Simp(sqrt(a + b)*EllipticE(asin(cos(e + f*x)/(sin(e + f*x) + S(1))), -(a - b)/(a + b))/(c*f), x) def replacement2772(a, b, c, d, e, f, x): return Simp(sqrt(a + b)*EllipticE(asin(sin(e + f*x)/(cos(e + f*x) + S(1))), -(a - b)/(a + b))/(c*f), x) def replacement2773(a, b, c, d, e, f, g, x): return -Simp(sqrt(d*sin(e + f*x)/(c + d*sin(e + f*x)))*sqrt(a + b*sin(e + f*x))*EllipticE(asin(c*cos(e + f*x)/(c + d*sin(e + f*x))), (-a*d + b*c)/(a*d + b*c))/(d*f*sqrt(g*sin(e + f*x))*sqrt(c**S(2)*(a + b*sin(e + f*x))/((c + d*sin(e + f*x))*(a*c + b*d)))), x) def replacement2774(a, b, c, d, e, f, g, x): return Simp(sqrt(d*cos(e + f*x)/(c + d*cos(e + f*x)))*sqrt(a + b*cos(e + f*x))*EllipticE(asin(c*sin(e + f*x)/(c + d*cos(e + f*x))), (-a*d + b*c)/(a*d + b*c))/(d*f*sqrt(g*cos(e + f*x))*sqrt(c**S(2)*(a + b*cos(e + f*x))/((c + d*cos(e + f*x))*(a*c + b*d)))), x) def replacement2775(a, b, c, d, e, f, g, x): return Dist(a/c, Int(S(1)/(sqrt(g*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), x), x) + Dist((-a*d + b*c)/(c*g), Int(sqrt(g*sin(e + f*x))/(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) def replacement2776(a, b, c, d, e, f, g, x): return Dist(a/c, Int(S(1)/(sqrt(g*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), x), x) + Dist((-a*d + b*c)/(c*g), Int(sqrt(g*cos(e + f*x))/(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) def replacement2777(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b*sin(e + f*x))/sin(e + f*x), x), x) - Dist(d/c, Int(sqrt(a + b*sin(e + f*x))/(c + d*sin(e + f*x)), x), x) def replacement2778(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b*cos(e + f*x))/cos(e + f*x), x), x) - Dist(d/c, Int(sqrt(a + b*cos(e + f*x))/(c + d*cos(e + f*x)), x), x) def replacement2779(a, b, c, d, e, f, x): return Dist(a/c, Int(S(1)/(sqrt(a + b*sin(e + f*x))*sin(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(S(1)/(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) def replacement2780(a, b, c, d, e, f, x): return Dist(a/c, Int(S(1)/(sqrt(a + b*cos(e + f*x))*cos(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(S(1)/(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) def replacement2781(a, b, c, d, e, f, g, x): return -Dist(a*g/(-a*d + b*c), Int(S(1)/(sqrt(g*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), x), x) + Dist(c*g/(-a*d + b*c), Int(sqrt(a + b*sin(e + f*x))/(sqrt(g*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) def replacement2782(a, b, c, d, e, f, g, x): return -Dist(a*g/(-a*d + b*c), Int(S(1)/(sqrt(g*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), x), x) + Dist(c*g/(-a*d + b*c), Int(sqrt(a + b*cos(e + f*x))/(sqrt(g*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) def replacement2783(a, b, c, d, e, f, g, x): return Simp(S(2)*sqrt(-S(1)/tan(e + f*x)**S(2))*sqrt(g*sin(e + f*x))*sqrt((a/sin(e + f*x) + b)/(a + b))*EllipticPi(S(2)*c/(c + d), asin(sqrt(S(2))*sqrt(S(1) - S(1)/sin(e + f*x))/S(2)), S(2)*a/(a + b))*tan(e + f*x)/(f*sqrt(a + b*sin(e + f*x))*(c + d)), x) def replacement2784(a, b, c, d, e, f, g, x): return Simp(-S(2)*sqrt(-tan(e + f*x)**S(2))*sqrt(g*cos(e + f*x))*sqrt((a/cos(e + f*x) + b)/(a + b))*EllipticPi(S(2)*c/(c + d), asin(sqrt(S(2))*sqrt(S(1) - S(1)/cos(e + f*x))/S(2)), S(2)*a/(a + b))/(f*sqrt(a + b*cos(e + f*x))*(c + d)*tan(e + f*x)), x) def replacement2785(a, b, c, d, e, f, g, x): return Dist(b/(-a*d + b*c), Int(S(1)/(sqrt(g*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), x), x) - Dist(d/(-a*d + b*c), Int(sqrt(a + b*sin(e + f*x))/(sqrt(g*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) def replacement2786(a, b, c, d, e, f, g, x): return Dist(b/(-a*d + b*c), Int(S(1)/(sqrt(g*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), x), x) - Dist(d/(-a*d + b*c), Int(sqrt(a + b*cos(e + f*x))/(sqrt(g*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) def replacement2787(a, b, c, d, e, f, g, x): return Dist(S(1)/c, Int(S(1)/(sqrt(g*sin(e + f*x))*sqrt(a + b*sin(e + f*x))), x), x) - Dist(d/(c*g), Int(sqrt(g*sin(e + f*x))/(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) def replacement2788(a, b, c, d, e, f, g, x): return Dist(S(1)/c, Int(S(1)/(sqrt(g*cos(e + f*x))*sqrt(a + b*cos(e + f*x))), x), x) - Dist(d/(c*g), Int(sqrt(g*cos(e + f*x))/(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) def replacement2789(a, b, c, d, e, f, x): return Dist(S(1)/(c*(-a*d + b*c)), Int((-a*d + b*c - b*d*sin(e + f*x))/(sqrt(a + b*sin(e + f*x))*sin(e + f*x)), x), x) + Dist(d**S(2)/(c*(-a*d + b*c)), Int(sqrt(a + b*sin(e + f*x))/(c + d*sin(e + f*x)), x), x) def replacement2790(a, b, c, d, e, f, x): return Dist(S(1)/(c*(-a*d + b*c)), Int((-a*d + b*c - b*d*cos(e + f*x))/(sqrt(a + b*cos(e + f*x))*cos(e + f*x)), x), x) + Dist(d**S(2)/(c*(-a*d + b*c)), Int(sqrt(a + b*cos(e + f*x))/(c + d*cos(e + f*x)), x), x) def replacement2791(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(S(1)/(sqrt(a + b*sin(e + f*x))*sin(e + f*x)), x), x) - Dist(d/c, Int(S(1)/(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) def replacement2792(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(S(1)/(sqrt(a + b*cos(e + f*x))*cos(e + f*x)), x), x) - Dist(d/c, Int(S(1)/(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) def replacement2793(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))/sin(e + f*x), x), x) - Dist(d/c, Int(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) def replacement2794(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))/cos(e + f*x), x), x) - Dist(d/c, Int(sqrt(a + b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) def replacement2795(a, b, c, d, e, f, x): return Dist(-S(2)*a/f, Subst(Int(S(1)/(-a*c*x**S(2) + S(1)), x), x, cos(e + f*x)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x)))), x) def replacement2796(a, b, c, d, e, f, x): return Dist(S(2)*a/f, Subst(Int(S(1)/(-a*c*x**S(2) + S(1)), x), x, sin(e + f*x)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x)))), x) def replacement2797(a, b, c, d, e, f, x): return Dist(a/c, Int(sqrt(c + d*sin(e + f*x))/(sqrt(a + b*sin(e + f*x))*sin(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(S(1)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) def replacement2798(a, b, c, d, e, f, x): return Dist(a/c, Int(sqrt(c + d*cos(e + f*x))/(sqrt(a + b*cos(e + f*x))*cos(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(S(1)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) def replacement2799(a, b, c, d, e, f, x): return Simp(-S(2)*sqrt((-a*d + b*c)*(sin(e + f*x) + S(1))/((a + b*sin(e + f*x))*(c - d)))*sqrt(-(S(1) - sin(e + f*x))*(-a*d + b*c)/((a + b*sin(e + f*x))*(c + d)))*(a + b*sin(e + f*x))*EllipticPi(a*(c + d)/(c*(a + b)), asin(sqrt(c + d*sin(e + f*x))*Rt((a + b)/(c + d), S(2))/sqrt(a + b*sin(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))/(c*f*Rt((a + b)/(c + d), S(2))*cos(e + f*x)), x) def replacement2800(a, b, c, d, e, f, x): return Simp(S(2)*sqrt((-a*d + b*c)*(cos(e + f*x) + S(1))/((a + b*cos(e + f*x))*(c - d)))*sqrt(-(S(1) - cos(e + f*x))*(-a*d + b*c)/((a + b*cos(e + f*x))*(c + d)))*(a + b*cos(e + f*x))*EllipticPi(a*(c + d)/(c*(a + b)), asin(sqrt(c + d*cos(e + f*x))*Rt((a + b)/(c + d), S(2))/sqrt(a + b*cos(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))/(c*f*Rt((a + b)/(c + d), S(2))*sin(e + f*x)), x) def replacement2801(a, b, c, d, e, f, x): return Dist(cos(e + f*x)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), Int(S(1)/(sin(e + f*x)*cos(e + f*x)), x), x) def replacement2802(a, b, c, d, e, f, x): return Dist(sin(e + f*x)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), Int(S(1)/(sin(e + f*x)*cos(e + f*x)), x), x) def replacement2803(a, b, c, d, e, f, x): return Dist(S(1)/a, Int(sqrt(a + b*sin(e + f*x))/(sqrt(c + d*sin(e + f*x))*sin(e + f*x)), x), x) - Dist(b/a, Int(S(1)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) def replacement2804(a, b, c, d, e, f, x): return Dist(S(1)/a, Int(sqrt(a + b*cos(e + f*x))/(sqrt(c + d*cos(e + f*x))*cos(e + f*x)), x), x) - Dist(b/a, Int(S(1)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) def replacement2805(a, b, c, d, e, f, x): return Dist(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))/cos(e + f*x), Int(S(1)/tan(e + f*x), x), x) def replacement2806(a, b, c, d, e, f, x): return Dist(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))/sin(e + f*x), Int(tan(e + f*x), x), x) def replacement2807(a, b, c, d, e, f, x): return Dist(c, Int(sqrt(a + b*sin(e + f*x))/(sqrt(c + d*sin(e + f*x))*sin(e + f*x)), x), x) + Dist(d, Int(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) def replacement2808(a, b, c, d, e, f, x): return Dist(c, Int(sqrt(a + b*cos(e + f*x))/(sqrt(c + d*cos(e + f*x))*cos(e + f*x)), x), x) + Dist(d, Int(sqrt(a + b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) def replacement2809(a, b, c, d, e, f, m, n, p, x): return Dist(a**n*c**n, Int((a + b*sin(e + f*x))**(m - n)*tan(e + f*x)**p, x), x) def replacement2810(a, b, c, d, e, f, m, n, p, x): return Dist(a**n*c**n, Int((a + b*cos(e + f*x))**(m - n)*(S(1)/tan(e + f*x))**p, x), x) def replacement2811(a, b, c, d, e, f, g, m, n, p, x): return Dist(sqrt(a - b*sin(e + f*x))*sqrt(a + b*sin(e + f*x))/(f*cos(e + f*x)), Subst(Int((g*x)**p*(a + b*x)**(m + S(-1)/2)*(c + d*x)**n/sqrt(a - b*x), x), x, sin(e + f*x)), x) def replacement2812(a, b, c, d, e, f, g, m, n, p, x): return -Dist(sqrt(a - b*cos(e + f*x))*sqrt(a + b*cos(e + f*x))/(f*sin(e + f*x)), Subst(Int((g*x)**p*(a + b*x)**(m + S(-1)/2)*(c + d*x)**n/sqrt(a - b*x), x), x, cos(e + f*x)), x) def replacement2813(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*sin(e + f*x))**p*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x), x) def replacement2814(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g*cos(e + f*x))**p*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x), x) def replacement2815(a, b, c, d, e, f, g, m, n, p, x): return Int((g*sin(e + f*x))**p*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x) def replacement2816(a, b, c, d, e, f, g, m, n, p, x): return Int((g*cos(e + f*x))**p*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x) def replacement2817(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(m + n), Int((g*sin(e + f*x))**(-m - n + p)*(a*sin(e + f*x) + b)**m*(c*sin(e + f*x) + d)**n, x), x) def replacement2818(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(m + n), Int((g*cos(e + f*x))**(-m - n + p)*(a*cos(e + f*x) + b)**m*(c*cos(e + f*x) + d)**n, x), x) def replacement2819(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/sin(e + f*x))**p*(g*sin(e + f*x))**p, Int((g/sin(e + f*x))**(-p)*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n, x), x) def replacement2820(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/cos(e + f*x))**p*(g*cos(e + f*x))**p, Int((g/cos(e + f*x))**(-p)*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n, x), x) def replacement2821(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**n, Int((g*sin(e + f*x))**(-n + p)*(a + b*sin(e + f*x))**m*(c*sin(e + f*x) + d)**n, x), x) def replacement2822(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**n, Int((g*cos(e + f*x))**(-n + p)*(a + b*cos(e + f*x))**m*(c*cos(e + f*x) + d)**n, x), x) def replacement2823(a, b, c, d, e, f, m, n, p, x): return Int((c + d/sin(e + f*x))**n*(a/sin(e + f*x) + b)**m*(S(1)/sin(e + f*x))**(-m - p), x) def replacement2824(a, b, c, d, e, f, m, n, p, x): return Int((c + d/cos(e + f*x))**n*(a/cos(e + f*x) + b)**m*(S(1)/cos(e + f*x))**(-m - p), x) def replacement2825(a, b, c, d, e, f, g, m, n, p, x): return Dist((g*sin(e + f*x))**p*(S(1)/sin(e + f*x))**p, Int((c + d/sin(e + f*x))**n*(a/sin(e + f*x) + b)**m*(S(1)/sin(e + f*x))**(-m - p), x), x) def replacement2826(a, b, c, d, e, f, g, m, n, p, x): return Dist((g*cos(e + f*x))**p*(S(1)/cos(e + f*x))**p, Int((c + d/cos(e + f*x))**n*(a/cos(e + f*x) + b)**m*(S(1)/cos(e + f*x))**(-m - p), x), x) def replacement2827(a, b, c, d, e, f, g, m, n, p, x): return Dist((g*sin(e + f*x))**n*(c + d/sin(e + f*x))**n*(c*sin(e + f*x) + d)**(-n), Int((g*sin(e + f*x))**(-n + p)*(a + b*sin(e + f*x))**m*(c*sin(e + f*x) + d)**n, x), x) def replacement2828(a, b, c, d, e, f, g, m, n, p, x): return Dist((g*cos(e + f*x))**n*(c + d/cos(e + f*x))**n*(c*cos(e + f*x) + d)**(-n), Int((g*cos(e + f*x))**(-n + p)*(a + b*cos(e + f*x))**m*(c*cos(e + f*x) + d)**n, x), x) def replacement2829(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(m + n), Int((g/sin(e + f*x))**(-m - n + p)*(a/sin(e + f*x) + b)**m*(c/sin(e + f*x) + d)**n, x), x) def replacement2830(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(m + n), Int((g/cos(e + f*x))**(-m - n + p)*(a/cos(e + f*x) + b)**m*(c/cos(e + f*x) + d)**n, x), x) def replacement2831(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/sin(e + f*x))**p*(g*sin(e + f*x))**p, Int((g*sin(e + f*x))**(-p)*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x), x) def replacement2832(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/cos(e + f*x))**p*(g*cos(e + f*x))**p, Int((g*cos(e + f*x))**(-p)*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x), x) def replacement2833(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**m, Int((g/sin(e + f*x))**(-m + p)*(c + d/sin(e + f*x))**n*(a/sin(e + f*x) + b)**m, x), x) def replacement2834(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**m, Int((g/cos(e + f*x))**(-m + p)*(c + d/cos(e + f*x))**n*(a/cos(e + f*x) + b)**m, x), x) def replacement2835(a, b, c, d, e, f, m, n, p, x): return Int((a + b*sin(e + f*x))**m*(c*sin(e + f*x) + d)**n*sin(e + f*x)**(-n - p), x) def replacement2836(a, b, c, d, e, f, m, n, p, x): return Int((a + b*cos(e + f*x))**m*(c*cos(e + f*x) + d)**n*cos(e + f*x)**(-n - p), x) def replacement2837(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/sin(e + f*x))**p*sin(e + f*x)**p, Int((a + b*sin(e + f*x))**m*(c*sin(e + f*x) + d)**n*sin(e + f*x)**(-n - p), x), x) def replacement2838(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/cos(e + f*x))**p*cos(e + f*x)**p, Int((a + b*cos(e + f*x))**m*(c*cos(e + f*x) + d)**n*cos(e + f*x)**(-n - p), x), x) def replacement2839(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/sin(e + f*x))**m*(a + b*sin(e + f*x))**m*(a/sin(e + f*x) + b)**(-m), Int((g/sin(e + f*x))**(-m + p)*(c + d/sin(e + f*x))**n*(a/sin(e + f*x) + b)**m, x), x) def replacement2840(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/cos(e + f*x))**m*(a + b*cos(e + f*x))**m*(a/cos(e + f*x) + b)**(-m), Int((g/cos(e + f*x))**(-m + p)*(c + d/cos(e + f*x))**n*(a/cos(e + f*x) + b)**m, x), x) def replacement2841(A, B, a, b, e, f, m, n, x): return Int(ExpandTrig((A + B*sin(e + f*x))*(a + b*sin(e + f*x))**m*sin(e + f*x)**n, x), x) def replacement2842(A, B, a, b, e, f, m, n, x): return Int(ExpandTrig((A + B*cos(e + f*x))*(a + b*cos(e + f*x))**m*cos(e + f*x)**n, x), x) def replacement2843(A, B, a, b, c, d, e, f, m, n, x): return Dist(a**m*c**m, Int((A + B*sin(e + f*x))*(c + d*sin(e + f*x))**(-m + n)*cos(e + f*x)**(S(2)*m), x), x) def replacement2844(A, B, a, b, c, d, e, f, m, n, x): return Dist(a**m*c**m, Int((A + B*cos(e + f*x))*(c + d*cos(e + f*x))**(-m + n)*sin(e + f*x)**(S(2)*m), x), x) def replacement2845(A, B, a, b, c, d, e, f, m, x): return Int((a + b*sin(e + f*x))**m*(A*c + B*d*sin(e + f*x)**S(2) + (A*d + B*c)*sin(e + f*x)), x) def replacement2846(A, B, a, b, c, d, e, f, m, x): return Int((a + b*cos(e + f*x))**m*(A*c + B*d*cos(e + f*x)**S(2) + (A*d + B*c)*cos(e + f*x)), x) def replacement2847(A, B, a, b, c, d, e, f, x): return Dist((A*b + B*a)/(S(2)*a*b), Int(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) + Dist((A*d + B*c)/(S(2)*c*d), Int(sqrt(c + d*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) def replacement2848(A, B, a, b, c, d, e, f, x): return Dist((A*b + B*a)/(S(2)*a*b), Int(sqrt(a + b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) + Dist((A*d + B*c)/(S(2)*c*d), Int(sqrt(c + d*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) def replacement2849(A, B, a, b, c, d, e, f, m, n, x): return -Simp(B*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*(m + n + S(1))), x) def replacement2850(A, B, a, b, c, d, e, f, m, n, x): return Simp(B*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*(m + n + S(1))), x) def replacement2851(A, B, a, b, c, d, e, f, n, x): return Dist(B/d, Int(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))**(n + S(1)), x), x) - Dist((-A*d + B*c)/d, Int(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))**n, x), x) def replacement2852(A, B, a, b, c, d, e, f, n, x): return Dist(B/d, Int(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))**(n + S(1)), x), x) - Dist((-A*d + B*c)/d, Int(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))**n, x), x) def replacement2853(A, B, a, b, c, d, e, f, m, n, x): return Dist((A*b*(m + n + S(1)) + B*a*(m - n))/(a*b*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n, x), x) + Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*(A*b - B*a)*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2854(A, B, a, b, c, d, e, f, m, n, x): return Dist((A*b*(m + n + S(1)) + B*a*(m - n))/(a*b*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n, x), x) - Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*(A*b - B*a)*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2855(A, B, a, b, c, d, e, f, m, n, x): return -Dist((-A*d*(m + n + S(1)) + B*c*(m - n))/(d*(m + n + S(1))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x), x) - Simp(B*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*(m + n + S(1))), x) def replacement2856(A, B, a, b, c, d, e, f, m, n, x): return -Dist((-A*d*(m + n + S(1)) + B*c*(m - n))/(d*(m + n + S(1))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x), x) + Simp(B*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*(m + n + S(1))), x) def replacement2857(A, B, a, b, c, d, e, f, m, n, x): return Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(-A*d + B*c)*cos(e + f*x)/(f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2858(A, B, a, b, c, d, e, f, m, n, x): return -Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(-A*d + B*c)*sin(e + f*x)/(f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2859(A, B, a, b, c, d, e, f, m, n, x): return -Dist(b/(d*(n + S(1))*(a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1))*Simp(A*a*d*(m - n + S(-2)) - B*(a*c*(m + S(-1)) + b*d*(n + S(1))) - (A*b*d*(m + n + S(1)) - B*(-a*d*(n + S(1)) + b*c*m))*sin(e + f*x), x), x), x) - Simp(b**S(2)*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1))*(-A*d + B*c)*cos(e + f*x)/(d*f*(n + S(1))*(a*d + b*c)), x) def replacement2860(A, B, a, b, c, d, e, f, m, n, x): return -Dist(b/(d*(n + S(1))*(a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1))*Simp(A*a*d*(m - n + S(-2)) - B*(a*c*(m + S(-1)) + b*d*(n + S(1))) - (A*b*d*(m + n + S(1)) - B*(-a*d*(n + S(1)) + b*c*m))*cos(e + f*x), x), x), x) + Simp(b**S(2)*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1))*(-A*d + B*c)*sin(e + f*x)/(d*f*(n + S(1))*(a*d + b*c)), x) def replacement2861(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(1))), Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n*Simp(A*a*d*(m + n + S(1)) + B*(a*c*(m + S(-1)) + b*d*(n + S(1))) + (A*b*d*(m + n + S(1)) - B*(-a*d*(S(2)*m + n) + b*c*m))*sin(e + f*x), x), x), x) - Simp(B*b*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n + S(1))), x) def replacement2862(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(1))), Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n*Simp(A*a*d*(m + n + S(1)) + B*(a*c*(m + S(-1)) + b*d*(n + S(1))) + (A*b*d*(m + n + S(1)) - B*(-a*d*(S(2)*m + n) + b*c*m))*cos(e + f*x), x), x), x) + Simp(B*b*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n + S(1))), x) def replacement2863(A, B, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(-1))*Simp(A*(a*d*n - b*c*(m + S(1))) - B*(a*c*m + b*d*n) - d*(A*b*(m + n + S(1)) + B*a*(m - n))*sin(e + f*x), x), x), x) + Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*(A*b - B*a)*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2864(A, B, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(-1))*Simp(A*(a*d*n - b*c*(m + S(1))) - B*(a*c*m + b*d*n) - d*(A*b*(m + n + S(1)) + B*a*(m - n))*cos(e + f*x), x), x), x) - Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*(A*b - B*a)*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2865(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(a*(S(2)*m + S(1))*(-a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(A*(-a*d*(S(2)*m + n + S(2)) + b*c*(m + S(1))) + B*(a*c*m + b*d*(n + S(1))) + d*(A*b - B*a)*(m + n + S(2))*sin(e + f*x), x), x), x) + Simp(b*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(A*b - B*a)*cos(e + f*x)/(a*f*(S(2)*m + S(1))*(-a*d + b*c)), x) def replacement2866(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(a*(S(2)*m + S(1))*(-a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(A*(-a*d*(S(2)*m + n + S(2)) + b*c*(m + S(1))) + B*(a*c*m + b*d*(n + S(1))) + d*(A*b - B*a)*(m + n + S(2))*cos(e + f*x), x), x), x) - Simp(b*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(A*b - B*a)*sin(e + f*x)/(a*f*(S(2)*m + S(1))*(-a*d + b*c)), x) def replacement2867(A, B, a, b, c, d, e, f, n, x): return Simp(-S(2)*B*b*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*sqrt(a + b*sin(e + f*x))*(S(2)*n + S(3))), x) def replacement2868(A, B, a, b, c, d, e, f, n, x): return Simp(S(2)*B*b*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*sqrt(a + b*cos(e + f*x))*(S(2)*n + S(3))), x) def replacement2869(A, B, a, b, c, d, e, f, n, x): return Dist((A*b*d*(S(2)*n + S(3)) - B*(-S(2)*a*d*(n + S(1)) + b*c))/(S(2)*d*(n + S(1))*(a*d + b*c)), Int(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))**(n + S(1)), x), x) - Simp(b**S(2)*(c + d*sin(e + f*x))**(n + S(1))*(-A*d + B*c)*cos(e + f*x)/(d*f*sqrt(a + b*sin(e + f*x))*(n + S(1))*(a*d + b*c)), x) def replacement2870(A, B, a, b, c, d, e, f, n, x): return Dist((A*b*d*(S(2)*n + S(3)) - B*(-S(2)*a*d*(n + S(1)) + b*c))/(S(2)*d*(n + S(1))*(a*d + b*c)), Int(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))**(n + S(1)), x), x) + Simp(b**S(2)*(c + d*cos(e + f*x))**(n + S(1))*(-A*d + B*c)*sin(e + f*x)/(d*f*sqrt(a + b*cos(e + f*x))*(n + S(1))*(a*d + b*c)), x) def replacement2871(A, B, a, b, c, d, e, f, n, x): return Dist((A*b*d*(S(2)*n + S(3)) - B*(-S(2)*a*d*(n + S(1)) + b*c))/(b*d*(S(2)*n + S(3))), Int(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))**n, x), x) + Simp(-S(2)*B*b*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*sqrt(a + b*sin(e + f*x))*(S(2)*n + S(3))), x) def replacement2872(A, B, a, b, c, d, e, f, n, x): return Dist((A*b*d*(S(2)*n + S(3)) - B*(-S(2)*a*d*(n + S(1)) + b*c))/(b*d*(S(2)*n + S(3))), Int(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))**n, x), x) + Simp(S(2)*B*b*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*sqrt(a + b*cos(e + f*x))*(S(2)*n + S(3))), x) def replacement2873(A, B, a, b, c, d, e, f, x): return Dist(B/b, Int(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) + Dist((A*b - B*a)/b, Int(S(1)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) def replacement2874(A, B, a, b, c, d, e, f, x): return Dist(B/b, Int(sqrt(a + b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) + Dist((A*b - B*a)/b, Int(S(1)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) def replacement2875(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(m + n + S(1))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(-1))*Simp(A*b*c*(m + n + S(1)) + B*(a*c*m + b*d*n) + (A*b*d*(m + n + S(1)) + B*(a*d*m + b*c*n))*sin(e + f*x), x), x), x) - Simp(B*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*(m + n + S(1))), x) def replacement2876(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(m + n + S(1))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(-1))*Simp(A*b*c*(m + n + S(1)) + B*(a*c*m + b*d*n) + (A*b*d*(m + n + S(1)) + B*(a*d*m + b*c*n))*cos(e + f*x), x), x), x) + Simp(B*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*(m + n + S(1))), x) def replacement2877(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*Simp(A*(a*d*m + b*c*(n + S(1))) - B*(a*c*m + b*d*(n + S(1))) + b*(-A*d + B*c)*(m + n + S(2))*sin(e + f*x), x), x), x) + Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(-A*d + B*c)*cos(e + f*x)/(f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2878(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*Simp(A*(a*d*m + b*c*(n + S(1))) - B*(a*c*m + b*d*(n + S(1))) + b*(-A*d + B*c)*(m + n + S(2))*cos(e + f*x), x), x), x) - Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(-A*d + B*c)*sin(e + f*x)/(f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2879(A, B, a, b, c, d, e, f, x): return Dist((A*b - B*a)/(-a*d + b*c), Int(S(1)/sqrt(a + b*sin(e + f*x)), x), x) + Dist((-A*d + B*c)/(-a*d + b*c), Int(sqrt(a + b*sin(e + f*x))/(c + d*sin(e + f*x)), x), x) def replacement2880(A, B, a, b, c, d, e, f, x): return Dist((A*b - B*a)/(-a*d + b*c), Int(S(1)/sqrt(a + b*cos(e + f*x)), x), x) + Dist((-A*d + B*c)/(-a*d + b*c), Int(sqrt(a + b*cos(e + f*x))/(c + d*cos(e + f*x)), x), x) def replacement2881(A, B, a, b, c, d, e, f, m, x): return Dist(B/d, Int((a + b*sin(e + f*x))**m, x), x) - Dist((-A*d + B*c)/d, Int((a + b*sin(e + f*x))**m/(c + d*sin(e + f*x)), x), x) def replacement2882(A, B, a, b, c, d, e, f, m, x): return Dist(B/d, Int((a + b*cos(e + f*x))**m, x), x) - Dist((-A*d + B*c)/d, Int((a + b*cos(e + f*x))**m/(c + d*cos(e + f*x)), x), x) def replacement2883(A, B, a, b, c, d, e, f, m, n, x): return Dist(B/b, Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n, x), x) + Dist((A*b - B*a)/b, Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x), x) def replacement2884(A, B, a, b, c, d, e, f, m, n, x): return Dist(B/b, Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n, x), x) + Dist((A*b - B*a)/b, Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x), x) def replacement2885(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**(n + S(1))*Simp(a*d*(n + S(1))*(A*a*c + B*b*c - d*(A*b + B*a)) + b*(m + S(-1))*(-A*d + B*c)*(-a*d + b*c) + b*(-B*b*(c**S(2)*m + d**S(2)*(n + S(1))) + d*(m + n + S(1))*(-A*a*d + A*b*c + B*a*c))*sin(e + f*x)**S(2) + (-a*(n + S(2))*(-A*d + B*c)*(-a*d + b*c) + b*(n + S(1))*(a*(A*c*d + B*(c**S(2) - S(2)*d**S(2))) + b*d*(-A*d + B*c)))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1))*(-A*d + B*c)*(-a*d + b*c)*cos(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2886(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**(n + S(1))*Simp(a*d*(n + S(1))*(A*a*c + B*b*c - d*(A*b + B*a)) + b*(m + S(-1))*(-A*d + B*c)*(-a*d + b*c) + b*(-B*b*(c**S(2)*m + d**S(2)*(n + S(1))) + d*(m + n + S(1))*(-A*a*d + A*b*c + B*a*c))*cos(e + f*x)**S(2) + (-a*(n + S(2))*(-A*d + B*c)*(-a*d + b*c) + b*(n + S(1))*(a*(A*c*d + B*(c**S(2) - S(2)*d**S(2))) + b*d*(-A*d + B*c)))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1))*(-A*d + B*c)*(-a*d + b*c)*sin(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2887(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(1))), Int((a + b*sin(e + f*x))**(m + S(-2))*(c + d*sin(e + f*x))**n*Simp(A*a**S(2)*d*(m + n + S(1)) + B*b*(a*d*(n + S(1)) + b*c*(m + S(-1))) + b*(A*b*d*(m + n + S(1)) - B*(-a*d*(S(2)*m + n) + b*c*m))*sin(e + f*x)**S(2) + (-B*b*(a*c - b*d*(m + n)) + a*d*(S(2)*A*b + B*a)*(m + n + S(1)))*sin(e + f*x), x), x), x) - Simp(B*b*(a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n + S(1))), x) def replacement2888(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(1))), Int((a + b*cos(e + f*x))**(m + S(-2))*(c + d*cos(e + f*x))**n*Simp(A*a**S(2)*d*(m + n + S(1)) + B*b*(a*d*(n + S(1)) + b*c*(m + S(-1))) + b*(A*b*d*(m + n + S(1)) - B*(-a*d*(S(2)*m + n) + b*c*m))*cos(e + f*x)**S(2) + (-B*b*(a*c - b*d*(m + n)) + a*d*(S(2)*A*b + B*a)*(m + n + S(1)))*cos(e + f*x), x), x), x) + Simp(B*b*(a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n + S(1))), x) def replacement2889(A, B, b, c, d, e, f, x): return Dist(B*d/b**S(2), Int(sqrt(b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) + Int((A*c + (A*d + B*c)*sin(e + f*x))/((b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x) def replacement2890(A, B, b, c, d, e, f, x): return Dist(B*d/b**S(2), Int(sqrt(b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) + Int((A*c + (A*d + B*c)*cos(e + f*x))/((b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x) def replacement2891(A, B, a, b, c, d, e, f, x): return Dist(B/b, Int(sqrt(c + d*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) + Dist((A*b - B*a)/b, Int(sqrt(c + d*sin(e + f*x))/(a + b*sin(e + f*x))**(S(3)/2), x), x) def replacement2892(A, B, a, b, c, d, e, f, x): return Dist(B/b, Int(sqrt(c + d*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) + Dist((A*b - B*a)/b, Int(sqrt(c + d*cos(e + f*x))/(a + b*cos(e + f*x))**(S(3)/2), x), x) def replacement2893(A, B, a, b, d, e, f, x): return Dist(d/(a**S(2) - b**S(2)), Int((A*b - B*a + (A*a - B*b)*sin(e + f*x))/((d*sin(e + f*x))**(S(3)/2)*sqrt(a + b*sin(e + f*x))), x), x) + Simp(S(2)*(A*b - B*a)*cos(e + f*x)/(f*sqrt(d*sin(e + f*x))*sqrt(a + b*sin(e + f*x))*(a**S(2) - b**S(2))), x) def replacement2894(A, B, a, b, d, e, f, x): return Dist(d/(a**S(2) - b**S(2)), Int((A*b - B*a + (A*a - B*b)*cos(e + f*x))/((d*cos(e + f*x))**(S(3)/2)*sqrt(a + b*cos(e + f*x))), x), x) + Simp(-S(2)*(A*b - B*a)*sin(e + f*x)/(f*sqrt(d*cos(e + f*x))*sqrt(a + b*cos(e + f*x))*(a**S(2) - b**S(2))), x) def replacement2895(A, B, b, c, d, e, f, x): return Simp(-S(2)*A*sqrt(c*(S(1) - S(1)/sin(e + f*x))/(c + d))*sqrt(c*(S(1) + S(1)/sin(e + f*x))/(c - d))*(c - d)*EllipticE(asin(sqrt(c + d*sin(e + f*x))/(sqrt(b*sin(e + f*x))*Rt((c + d)/b, S(2)))), -(c + d)/(c - d))*Rt((c + d)/b, S(2))*tan(e + f*x)/(b*c**S(2)*f), x) def replacement2896(A, B, b, c, d, e, f, x): return Simp(S(2)*A*sqrt(c*(S(1) - S(1)/cos(e + f*x))/(c + d))*sqrt(c*(S(1) + S(1)/cos(e + f*x))/(c - d))*(c - d)*EllipticE(asin(sqrt(c + d*cos(e + f*x))/(sqrt(b*cos(e + f*x))*Rt((c + d)/b, S(2)))), -(c + d)/(c - d))*Rt((c + d)/b, S(2))/(b*c**S(2)*f*tan(e + f*x)), x) def replacement2897(A, B, b, c, d, e, f, x): return -Dist(sqrt(-b*sin(e + f*x))/sqrt(b*sin(e + f*x)), Int((A + B*sin(e + f*x))/((-b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) def replacement2898(A, B, b, c, d, e, f, x): return -Dist(sqrt(-b*cos(e + f*x))/sqrt(b*cos(e + f*x)), Int((A + B*cos(e + f*x))/((-b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) def replacement2899(A, B, a, b, c, d, e, f, x): return Simp(-S(2)*A*sqrt((-a*d + b*c)*(sin(e + f*x) + S(1))/((a + b*sin(e + f*x))*(c - d)))*sqrt(-(S(1) - sin(e + f*x))*(-a*d + b*c)/((a + b*sin(e + f*x))*(c + d)))*(a + b*sin(e + f*x))*(c - d)*EllipticE(asin(sqrt(c + d*sin(e + f*x))*Rt((a + b)/(c + d), S(2))/sqrt(a + b*sin(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))/(f*(-a*d + b*c)**S(2)*Rt((a + b)/(c + d), S(2))*cos(e + f*x)), x) def replacement2900(A, B, a, b, c, d, e, f, x): return Simp(S(2)*A*sqrt((-a*d + b*c)*(cos(e + f*x) + S(1))/((a + b*cos(e + f*x))*(c - d)))*sqrt(-(S(1) - cos(e + f*x))*(-a*d + b*c)/((a + b*cos(e + f*x))*(c + d)))*(a + b*cos(e + f*x))*(c - d)*EllipticE(asin(sqrt(c + d*cos(e + f*x))*Rt((a + b)/(c + d), S(2))/sqrt(a + b*cos(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))/(f*(-a*d + b*c)**S(2)*Rt((a + b)/(c + d), S(2))*sin(e + f*x)), x) def replacement2901(A, B, a, b, c, d, e, f, x): return Dist(sqrt(-c - d*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), Int((A + B*sin(e + f*x))/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(-c - d*sin(e + f*x))), x), x) def replacement2902(A, B, a, b, c, d, e, f, x): return Dist(sqrt(-c - d*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), Int((A + B*cos(e + f*x))/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(-c - d*cos(e + f*x))), x), x) def replacement2903(A, B, a, b, c, d, e, f, x): return Dist((A - B)/(a - b), Int(S(1)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) - Dist((A*b - B*a)/(a - b), Int((sin(e + f*x) + S(1))/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) def replacement2904(A, B, a, b, c, d, e, f, x): return Dist((A - B)/(a - b), Int(S(1)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) - Dist((A*b - B*a)/(a - b), Int((cos(e + f*x) + S(1))/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) def replacement2905(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(-1))*Simp(c*(m + S(1))*(A*a - B*b) + d*n*(A*b - B*a) - d*(A*b - B*a)*(m + n + S(2))*sin(e + f*x)**S(2) + (-c*(m + S(2))*(A*b - B*a) + d*(m + S(1))*(A*a - B*b))*sin(e + f*x), x), x), x) + Simp((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*(-A*b + B*a)*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2906(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(-1))*Simp(c*(m + S(1))*(A*a - B*b) + d*n*(A*b - B*a) - d*(A*b - B*a)*(m + n + S(2))*cos(e + f*x)**S(2) + (-c*(m + S(2))*(A*b - B*a) + d*(m + S(1))*(A*a - B*b))*cos(e + f*x), x), x), x) - Simp((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*(-A*b + B*a)*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2907(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(b*d*(A*b - B*a)*(m + n + S(2)) - b*d*(A*b - B*a)*(m + n + S(3))*sin(e + f*x)**S(2) + (m + S(1))*(A*a - B*b)*(-a*d + b*c) + (A*b - B*a)*(a*d*(m + S(1)) - b*c*(m + S(2)))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(1))*(A*b**S(2) - B*a*b)*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement2908(A, B, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(b*d*(A*b - B*a)*(m + n + S(2)) - b*d*(A*b - B*a)*(m + n + S(3))*cos(e + f*x)**S(2) + (m + S(1))*(A*a - B*b)*(-a*d + b*c) + (A*b - B*a)*(a*d*(m + S(1)) - b*c*(m + S(2)))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(1))*(A*b**S(2) - B*a*b)*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement2909(A, B, a, b, c, d, e, f, x): return Dist((A*b - B*a)/(-a*d + b*c), Int(S(1)/(a + b*sin(e + f*x)), x), x) + Dist((-A*d + B*c)/(-a*d + b*c), Int(S(1)/(c + d*sin(e + f*x)), x), x) def replacement2910(A, B, a, b, c, d, e, f, x): return Dist((A*b - B*a)/(-a*d + b*c), Int(S(1)/(a + b*cos(e + f*x)), x), x) + Dist((-A*d + B*c)/(-a*d + b*c), Int(S(1)/(c + d*cos(e + f*x)), x), x) def replacement2911(A, B, a, b, c, d, e, f, m, x): return Dist(B/d, Int((a + b*sin(e + f*x))**m, x), x) - Dist((-A*d + B*c)/d, Int((a + b*sin(e + f*x))**m/(c + d*sin(e + f*x)), x), x) def replacement2912(A, B, a, b, c, d, e, f, m, x): return Dist(B/d, Int((a + b*cos(e + f*x))**m, x), x) - Dist((-A*d + B*c)/d, Int((a + b*cos(e + f*x))**m/(c + d*cos(e + f*x)), x), x) def replacement2913(A, B, a, b, c, d, e, f, n, x): return Dist(S(1)/(S(2)*n + S(3)), Int((c + d*sin(e + f*x))**(n + S(-1))*Simp(A*a*c*(S(2)*n + S(3)) + B*(S(2)*a*d*n + b*c) + (A*(S(2)*n + S(3))*(a*d + b*c) + B*(S(2)*n + S(1))*(a*c + b*d))*sin(e + f*x) + (A*b*d*(S(2)*n + S(3)) + B*(a*d + S(2)*b*c*n))*sin(e + f*x)**S(2), x)/sqrt(a + b*sin(e + f*x)), x), x) + Simp(-S(2)*B*sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))**n*cos(e + f*x)/(f*(S(2)*n + S(3))), x) def replacement2914(A, B, a, b, c, d, e, f, n, x): return Dist(S(1)/(S(2)*n + S(3)), Int((c + d*cos(e + f*x))**(n + S(-1))*Simp(A*a*c*(S(2)*n + S(3)) + B*(S(2)*a*d*n + b*c) + (A*(S(2)*n + S(3))*(a*d + b*c) + B*(S(2)*n + S(1))*(a*c + b*d))*cos(e + f*x) + (A*b*d*(S(2)*n + S(3)) + B*(a*d + S(2)*b*c*n))*cos(e + f*x)**S(2), x)/sqrt(a + b*cos(e + f*x)), x), x) + Simp(S(2)*B*sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))**n*sin(e + f*x)/(f*(S(2)*n + S(3))), x) def replacement2915(A, B, a, b, e, f, x): return Simp(S(4)*A*EllipticPi(S(-1), -asin(cos(e + f*x)/(sin(e + f*x) + S(1))), -(a - b)/(a + b))/(f*sqrt(a + b)), x) def replacement2916(A, B, a, b, e, f, x): return Simp(S(4)*A*EllipticPi(S(-1), asin(sin(e + f*x)/(cos(e + f*x) + S(1))), -(a - b)/(a + b))/(f*sqrt(a + b)), x) def replacement2917(A, B, a, b, d, e, f, x): return Dist(sqrt(sin(e + f*x))/sqrt(d*sin(e + f*x)), Int((A + B*sin(e + f*x))/(sqrt(a + b*sin(e + f*x))*sqrt(sin(e + f*x))), x), x) def replacement2918(A, B, a, b, d, e, f, x): return Dist(sqrt(cos(e + f*x))/sqrt(d*cos(e + f*x)), Int((A + B*cos(e + f*x))/(sqrt(a + b*cos(e + f*x))*sqrt(cos(e + f*x))), x), x) def replacement2919(A, B, a, b, c, d, e, f, x): return Dist(B/d, Int(sqrt(c + d*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) - Dist((-A*d + B*c)/d, Int(S(1)/(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))), x), x) def replacement2920(A, B, a, b, c, d, e, f, x): return Dist(B/d, Int(sqrt(c + d*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) - Dist((-A*d + B*c)/d, Int(S(1)/(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))), x), x) def replacement2921(A, B, a, b, c, d, e, f, m, n, x): return Int((A + B*sin(e + f*x))*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x) def replacement2922(A, B, a, b, c, d, e, f, m, n, x): return Int((A + B*cos(e + f*x))*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x) def replacement2923(A, B, a, b, c, d, e, f, m, n, p, x): return Dist(sqrt(a + b*sin(e + f*x))*sqrt(c + d*sin(e + f*x))/(f*cos(e + f*x)), Subst(Int((A + B*x)**p*(a + b*x)**(m + S(-1)/2)*(c + d*x)**(n + S(-1)/2), x), x, sin(e + f*x)), x) def replacement2924(A, B, a, b, c, d, e, f, m, n, p, x): return -Dist(sqrt(a + b*cos(e + f*x))*sqrt(c + d*cos(e + f*x))/(f*sin(e + f*x)), Subst(Int((A + B*x)**p*(a + b*x)**(m + S(-1)/2)*(c + d*x)**(n + S(-1)/2), x), x, cos(e + f*x)), x) def replacement2925(B, C, b, e, f, m, x): return Dist(S(1)/b, Int((b*sin(e + f*x))**(m + S(1))*(B + C*sin(e + f*x)), x), x) def replacement2926(B, C, b, e, f, m, x): return Dist(S(1)/b, Int((b*cos(e + f*x))**(m + S(1))*(B + C*cos(e + f*x)), x), x) def replacement2927(A, C, e, f, m, x): return -Dist(S(1)/f, Subst(Int((S(1) - x**S(2))**(m/S(2) + S(-1)/2)*(A - C*x**S(2) + C), x), x, cos(e + f*x)), x) def replacement2928(A, C, e, f, m, x): return Dist(S(1)/f, Subst(Int((S(1) - x**S(2))**(m/S(2) + S(-1)/2)*(A - C*x**S(2) + C), x), x, sin(e + f*x)), x) def replacement2929(A, C, b, e, f, m, x): return Simp(A*(b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*(m + S(1))), x) def replacement2930(A, C, b, e, f, m, x): return -Simp(A*(b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*(m + S(1))), x) def replacement2931(A, C, b, e, f, m, x): return Dist((A*(m + S(2)) + C*(m + S(1)))/(b**S(2)*(m + S(1))), Int((b*sin(e + f*x))**(m + S(2)), x), x) + Simp(A*(b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*(m + S(1))), x) def replacement2932(A, C, b, e, f, m, x): return Dist((A*(m + S(2)) + C*(m + S(1)))/(b**S(2)*(m + S(1))), Int((b*cos(e + f*x))**(m + S(2)), x), x) - Simp(A*(b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*(m + S(1))), x) def replacement2933(A, C, b, e, f, m, x): return Dist((A*(m + S(2)) + C*(m + S(1)))/(m + S(2)), Int((b*sin(e + f*x))**m, x), x) - Simp(C*(b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*(m + S(2))), x) def replacement2934(A, C, b, e, f, m, x): return Dist((A*(m + S(2)) + C*(m + S(1)))/(m + S(2)), Int((b*cos(e + f*x))**m, x), x) + Simp(C*(b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*(m + S(2))), x) def replacement2935(A, B, C, a, b, e, f, m, x): return Dist(b**(S(-2)), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(B*b - C*a + C*b*sin(e + f*x), x), x), x) def replacement2936(A, B, C, a, b, e, f, m, x): return Dist(b**(S(-2)), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(B*b - C*a + C*b*cos(e + f*x), x), x), x) def replacement2937(A, C, a, b, e, f, m, x): return Dist(C/b**S(2), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(-a + b*sin(e + f*x), x), x), x) def replacement2938(A, C, a, b, e, f, m, x): return Dist(C/b**S(2), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(-a + b*cos(e + f*x), x), x), x) def replacement2939(A, B, C, a, b, e, f, m, x): return Dist(C, Int((a + b*sin(e + f*x))**m*(sin(e + f*x) + S(1))**S(2), x), x) + Dist(A - C, Int((a + b*sin(e + f*x))**m*(sin(e + f*x) + S(1)), x), x) def replacement2940(A, B, C, a, b, e, f, m, x): return Dist(C, Int((a + b*cos(e + f*x))**m*(cos(e + f*x) + S(1))**S(2), x), x) + Dist(A - C, Int((a + b*cos(e + f*x))**m*(cos(e + f*x) + S(1)), x), x) def replacement2941(A, C, a, b, e, f, m, x): return Dist(C, Int((a + b*sin(e + f*x))**m*(sin(e + f*x) + S(1))**S(2), x), x) + Dist(A - C, Int((a + b*sin(e + f*x))**m*(sin(e + f*x) + S(1)), x), x) def replacement2942(A, C, a, b, e, f, m, x): return Dist(C, Int((a + b*cos(e + f*x))**m*(cos(e + f*x) + S(1))**S(2), x), x) + Dist(A - C, Int((a + b*cos(e + f*x))**m*(cos(e + f*x) + S(1)), x), x) def replacement2943(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(A*a*(m + S(1)) + C*b*(S(2)*m + S(1))*sin(e + f*x) + m*(B*b - C*a), x), x), x) + Simp((a + b*sin(e + f*x))**m*(A*b - B*a + C*b)*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2944(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(A*a*(m + S(1)) + C*b*(S(2)*m + S(1))*cos(e + f*x) + m*(B*b - C*a), x), x), x) - Simp((a + b*cos(e + f*x))**m*(A*b - B*a + C*b)*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2945(A, C, a, b, e, f, m, x): return Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(A*a*(m + S(1)) - C*a*m + C*b*(S(2)*m + S(1))*sin(e + f*x), x), x), x) + Simp(b*(A + C)*(a + b*sin(e + f*x))**m*cos(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2946(A, C, a, b, e, f, m, x): return Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(A*a*(m + S(1)) - C*a*m + C*b*(S(2)*m + S(1))*cos(e + f*x), x), x), x) - Simp(b*(A + C)*(a + b*cos(e + f*x))**m*sin(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement2947(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(b*(m + S(1))*(A*a - B*b + C*a) - (A*b**S(2) - B*a*b + C*a**S(2) + b*(m + S(1))*(A*b - B*a + C*b))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*cos(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2948(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(b*(m + S(1))*(A*a - B*b + C*a) - (A*b**S(2) - B*a*b + C*a**S(2) + b*(m + S(1))*(A*b - B*a + C*b))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*sin(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2949(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(a*b*(A + C)*(m + S(1)) - (A*b**S(2) + C*a**S(2) + b**S(2)*(A + C)*(m + S(1)))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*cos(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2950(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(a*b*(A + C)*(m + S(1)) - (A*b**S(2) + C*a**S(2) + b**S(2)*(A + C)*(m + S(1)))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*sin(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2951(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*sin(e + f*x))**m*Simp(A*b*(m + S(2)) + C*b*(m + S(1)) + (B*b*(m + S(2)) - C*a)*sin(e + f*x), x), x), x) - Simp(C*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*(m + S(2))), x) def replacement2952(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*cos(e + f*x))**m*Simp(A*b*(m + S(2)) + C*b*(m + S(1)) + (B*b*(m + S(2)) - C*a)*cos(e + f*x), x), x), x) + Simp(C*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*(m + S(2))), x) def replacement2953(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*sin(e + f*x))**m*Simp(A*b*(m + S(2)) - C*a*sin(e + f*x) + C*b*(m + S(1)), x), x), x) - Simp(C*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*(m + S(2))), x) def replacement2954(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b*cos(e + f*x))**m*Simp(A*b*(m + S(2)) - C*a*cos(e + f*x) + C*b*(m + S(1)), x), x), x) + Simp(C*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*(m + S(2))), x) def replacement2955(A, B, C, b, e, f, m, p, x): return Dist((b*sin(e + f*x))**(-m*p)*(b*sin(e + f*x)**p)**m, Int((b*sin(e + f*x))**(m*p)*(A + B*sin(e + f*x) + C*sin(e + f*x)**S(2)), x), x) def replacement2956(A, B, C, b, e, f, m, p, x): return Dist((b*cos(e + f*x))**(-m*p)*(b*cos(e + f*x)**p)**m, Int((b*cos(e + f*x))**(m*p)*(A + B*cos(e + f*x) + C*cos(e + f*x)**S(2)), x), x) def replacement2957(A, C, b, e, f, m, p, x): return Dist((b*sin(e + f*x))**(-m*p)*(b*sin(e + f*x)**p)**m, Int((b*sin(e + f*x))**(m*p)*(A + C*sin(e + f*x)**S(2)), x), x) def replacement2958(A, C, b, e, f, m, p, x): return Dist((b*cos(e + f*x))**(-m*p)*(b*cos(e + f*x)**p)**m, Int((b*cos(e + f*x))**(m*p)*(A + C*cos(e + f*x)**S(2)), x), x) def replacement2959(A, B, C, a, b, c, d, e, f, m, x): return -Dist(S(1)/(b**S(2)*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(-C*b*d*(a**S(2) - b**S(2))*(m + S(1))*sin(e + f*x)**S(2) + b*(m + S(1))*(-A*b*(a*c - b*d) + (B*b - C*a)*(-a*d + b*c)) + (B*b*(a**S(2)*d - a*b*c*(m + S(2)) + b**S(2)*d*(m + S(1))) + (-a*d + b*c)*(A*b**S(2)*(m + S(2)) + C*(a**S(2) + b**S(2)*(m + S(1)))))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(-a*d + b*c)*(A*b**S(2) - B*a*b + C*a**S(2))*cos(e + f*x)/(b**S(2)*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2960(A, B, C, a, b, c, d, e, f, m, x): return -Dist(S(1)/(b**S(2)*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(-C*b*d*(a**S(2) - b**S(2))*(m + S(1))*cos(e + f*x)**S(2) + b*(m + S(1))*(-A*b*(a*c - b*d) + (B*b - C*a)*(-a*d + b*c)) + (B*b*(a**S(2)*d - a*b*c*(m + S(2)) + b**S(2)*d*(m + S(1))) + (-a*d + b*c)*(A*b**S(2)*(m + S(2)) + C*(a**S(2) + b**S(2)*(m + S(1)))))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(-a*d + b*c)*(A*b**S(2) - B*a*b + C*a**S(2))*sin(e + f*x)/(b**S(2)*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2961(A, C, a, b, c, d, e, f, m, x): return Dist(S(1)/(b**S(2)*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*Simp(C*b*d*(a**S(2) - b**S(2))*(m + S(1))*sin(e + f*x)**S(2) + b*(m + S(1))*(A*b*(a*c - b*d) + C*a*(-a*d + b*c)) - (-a*d + b*c)*(A*b**S(2)*(m + S(2)) + C*(a**S(2) + b**S(2)*(m + S(1))))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*(-a*d + b*c)*cos(e + f*x)/(b**S(2)*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2962(A, C, a, b, c, d, e, f, m, x): return Dist(S(1)/(b**S(2)*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*Simp(C*b*d*(a**S(2) - b**S(2))*(m + S(1))*cos(e + f*x)**S(2) + b*(m + S(1))*(A*b*(a*c - b*d) + C*a*(-a*d + b*c)) - (-a*d + b*c)*(A*b**S(2)*(m + S(2)) + C*(a**S(2) + b**S(2)*(m + S(1))))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*(-a*d + b*c)*sin(e + f*x)/(b**S(2)*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement2963(A, B, C, a, b, c, d, e, f, m, x): return Dist(S(1)/(b*(m + S(3))), Int((a + b*sin(e + f*x))**m*Simp(A*b*c*(m + S(3)) + C*a*d + b*(B*c*(m + S(3)) + d*(A*(m + S(3)) + C*(m + S(2))))*sin(e + f*x) - (S(2)*C*a*d - b*(m + S(3))*(B*d + C*c))*sin(e + f*x)**S(2), x), x), x) - Simp(C*d*(a + b*sin(e + f*x))**(m + S(1))*sin(e + f*x)*cos(e + f*x)/(b*f*(m + S(3))), x) def replacement2964(A, B, C, a, b, c, d, e, f, m, x): return Dist(S(1)/(b*(m + S(3))), Int((a + b*cos(e + f*x))**m*Simp(A*b*c*(m + S(3)) + C*a*d + b*(B*c*(m + S(3)) + d*(A*(m + S(3)) + C*(m + S(2))))*cos(e + f*x) - (S(2)*C*a*d - b*(m + S(3))*(B*d + C*c))*cos(e + f*x)**S(2), x), x), x) + Simp(C*d*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)*cos(e + f*x)/(b*f*(m + S(3))), x) def replacement2965(A, C, a, b, c, d, e, f, m, x): return Dist(S(1)/(b*(m + S(3))), Int((a + b*sin(e + f*x))**m*Simp(A*b*c*(m + S(3)) + C*a*d + b*d*(A*(m + S(3)) + C*(m + S(2)))*sin(e + f*x) - (S(2)*C*a*d - C*b*c*(m + S(3)))*sin(e + f*x)**S(2), x), x), x) - Simp(C*d*(a + b*sin(e + f*x))**(m + S(1))*sin(e + f*x)*cos(e + f*x)/(b*f*(m + S(3))), x) def replacement2966(A, C, a, b, c, d, e, f, m, x): return Dist(S(1)/(b*(m + S(3))), Int((a + b*cos(e + f*x))**m*Simp(A*b*c*(m + S(3)) + C*a*d + b*d*(A*(m + S(3)) + C*(m + S(2)))*cos(e + f*x) - (S(2)*C*a*d - C*b*c*(m + S(3)))*cos(e + f*x)**S(2), x), x), x) + Simp(C*d*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)*cos(e + f*x)/(b*f*(m + S(3))), x) def replacement2967(A, B, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(S(2)*b*c*d*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(A*(c**S(2)*(m + S(1)) + d**S(2)*(S(2)*m + n + S(2))) - B*c*d*(m - n + S(-1)) - C*(c**S(2)*m - d**S(2)*(n + S(1))) + d*(-C*c*(S(3)*m - n) + (A*c + B*d)*(m + n + S(2)))*sin(e + f*x), x), x), x) + Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(A*a - B*b + C*a)*cos(e + f*x)/(S(2)*b*c*f*(S(2)*m + S(1))), x) def replacement2968(A, B, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(S(2)*b*c*d*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(A*(c**S(2)*(m + S(1)) + d**S(2)*(S(2)*m + n + S(2))) - B*c*d*(m - n + S(-1)) - C*(c**S(2)*m - d**S(2)*(n + S(1))) + d*(-C*c*(S(3)*m - n) + (A*c + B*d)*(m + n + S(2)))*cos(e + f*x), x), x), x) - Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(A*a - B*b + C*a)*sin(e + f*x)/(S(2)*b*c*f*(S(2)*m + S(1))), x) def replacement2969(A, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(S(2)*b*c*d*(S(2)*m + S(1))), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(A*(c**S(2)*(m + S(1)) + d**S(2)*(S(2)*m + n + S(2))) - C*(c**S(2)*m - d**S(2)*(n + S(1))) + d*(A*c*(m + n + S(2)) - C*c*(S(3)*m - n))*sin(e + f*x), x), x), x) + Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(A*a + C*a)*cos(e + f*x)/(S(2)*b*c*f*(S(2)*m + S(1))), x) def replacement2970(A, C, a, b, c, d, e, f, m, n, x): return -Dist(S(1)/(S(2)*b*c*d*(S(2)*m + S(1))), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(A*(c**S(2)*(m + S(1)) + d**S(2)*(S(2)*m + n + S(2))) - C*(c**S(2)*m - d**S(2)*(n + S(1))) + d*(A*c*(m + n + S(2)) - C*c*(S(3)*m - n))*cos(e + f*x), x), x), x) - Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(A*a + C*a)*sin(e + f*x)/(S(2)*b*c*f*(S(2)*m + S(1))), x) def replacement2971(A, B, C, a, b, c, d, e, f, m, x): return Int((a + b*sin(e + f*x))**m*Simp(A + B*sin(e + f*x) + C, x)/sqrt(c + d*sin(e + f*x)), x) + Simp(-S(2)*C*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*sqrt(c + d*sin(e + f*x))*(S(2)*m + S(3))), x) def replacement2972(A, B, C, a, b, c, d, e, f, m, x): return Int((a + b*cos(e + f*x))**m*Simp(A + B*cos(e + f*x) + C, x)/sqrt(c + d*cos(e + f*x)), x) + Simp(S(2)*C*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*sqrt(c + d*cos(e + f*x))*(S(2)*m + S(3))), x) def replacement2973(A, C, a, b, c, d, e, f, m, x): return Dist(A + C, Int((a + b*sin(e + f*x))**m/sqrt(c + d*sin(e + f*x)), x), x) + Simp(-S(2)*C*(a + b*sin(e + f*x))**(m + S(1))*cos(e + f*x)/(b*f*sqrt(c + d*sin(e + f*x))*(S(2)*m + S(3))), x) def replacement2974(A, C, a, b, c, d, e, f, m, x): return Dist(A + C, Int((a + b*cos(e + f*x))**m/sqrt(c + d*cos(e + f*x)), x), x) + Simp(S(2)*C*(a + b*cos(e + f*x))**(m + S(1))*sin(e + f*x)/(b*f*sqrt(c + d*cos(e + f*x))*(S(2)*m + S(3))), x) def replacement2975(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(2))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*Simp(A*b*d*(m + n + S(2)) + C*(a*c*m + b*d*(n + S(1))) + (B*b*d*(m + n + S(2)) - C*b*c*(S(2)*m + S(1)))*sin(e + f*x), x), x), x) - Simp(C*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2976(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(2))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*Simp(A*b*d*(m + n + S(2)) + C*(a*c*m + b*d*(n + S(1))) + (B*b*d*(m + n + S(2)) - C*b*c*(S(2)*m + S(1)))*cos(e + f*x), x), x), x) + Simp(C*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2977(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(2))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*Simp(A*b*d*(m + n + S(2)) - C*b*c*(S(2)*m + S(1))*sin(e + f*x) + C*(a*c*m + b*d*(n + S(1))), x), x), x) - Simp(C*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2978(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(2))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*Simp(A*b*d*(m + n + S(2)) - C*b*c*(S(2)*m + S(1))*cos(e + f*x) + C*(a*c*m + b*d*(n + S(1))), x), x), x) + Simp(C*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2979(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(S(2)*m + S(1))*(-a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(A*(a*c*(m + S(1)) - b*d*(S(2)*m + n + S(2))) + B*(a*d*(n + S(1)) + b*c*m) - C*(a*c*m + b*d*(n + S(1))) + (C*(-a*d*(m - n + S(-1)) + b*c*(S(2)*m + S(1))) + d*(A*a - B*b)*(m + n + S(2)))*sin(e + f*x), x), x), x) + Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(A*a - B*b + C*a)*cos(e + f*x)/(f*(S(2)*m + S(1))*(-a*d + b*c)), x) def replacement2980(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(S(2)*m + S(1))*(-a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(A*(a*c*(m + S(1)) - b*d*(S(2)*m + n + S(2))) + B*(a*d*(n + S(1)) + b*c*m) - C*(a*c*m + b*d*(n + S(1))) + (C*(-a*d*(m - n + S(-1)) + b*c*(S(2)*m + S(1))) + d*(A*a - B*b)*(m + n + S(2)))*cos(e + f*x), x), x), x) - Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(A*a - B*b + C*a)*sin(e + f*x)/(f*(S(2)*m + S(1))*(-a*d + b*c)), x) def replacement2981(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(S(2)*m + S(1))*(-a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(A*(a*c*(m + S(1)) - b*d*(S(2)*m + n + S(2))) - C*(a*c*m + b*d*(n + S(1))) + (A*a*d*(m + n + S(2)) + C*(-a*d*(m - n + S(-1)) + b*c*(S(2)*m + S(1))))*sin(e + f*x), x), x), x) + Simp(a*(A + C)*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(f*(S(2)*m + S(1))*(-a*d + b*c)), x) def replacement2982(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*(S(2)*m + S(1))*(-a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(A*(a*c*(m + S(1)) - b*d*(S(2)*m + n + S(2))) - C*(a*c*m + b*d*(n + S(1))) + (A*a*d*(m + n + S(2)) + C*(-a*d*(m - n + S(-1)) + b*c*(S(2)*m + S(1))))*cos(e + f*x), x), x), x) - Simp(a*(A + C)*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(f*(S(2)*m + S(1))*(-a*d + b*c)), x) def replacement2983(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*Simp(A*d*(a*d*m + b*c*(n + S(1))) + b*(-C*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(1))) + d*(-A*d + B*c)*(m + n + S(2)))*sin(e + f*x) + (-B*d + C*c)*(a*c*m + b*d*(n + S(1))), x), x), x) - Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(A*d**S(2) - B*c*d + C*c**S(2))*cos(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2984(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*Simp(A*d*(a*d*m + b*c*(n + S(1))) + b*(-C*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(1))) + d*(-A*d + B*c)*(m + n + S(2)))*cos(e + f*x) + (-B*d + C*c)*(a*c*m + b*d*(n + S(1))), x), x), x) + Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(A*d**S(2) - B*c*d + C*c**S(2))*sin(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2985(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*Simp(A*d*(a*d*m + b*c*(n + S(1))) + C*c*(a*c*m + b*d*(n + S(1))) - b*(A*d**S(2)*(m + n + S(2)) + C*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(1))))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))*cos(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2986(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*Simp(A*d*(a*d*m + b*c*(n + S(1))) + C*c*(a*c*m + b*d*(n + S(1))) - b*(A*d**S(2)*(m + n + S(2)) + C*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(1))))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))*sin(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2987(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(2))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*Simp(A*b*d*(m + n + S(2)) + C*(a*c*m + b*d*(n + S(1))) + (B*b*d*(m + n + S(2)) + C*(a*d*m - b*c*(m + S(1))))*sin(e + f*x), x), x), x) - Simp(C*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2988(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(2))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*Simp(A*b*d*(m + n + S(2)) + C*(a*c*m + b*d*(n + S(1))) + (B*b*d*(m + n + S(2)) + C*(a*d*m - b*c*(m + S(1))))*cos(e + f*x), x), x), x) + Simp(C*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2989(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(2))), Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*Simp(A*b*d*(m + n + S(2)) + C*(a*c*m + b*d*(n + S(1))) + C*(a*d*m - b*c*(m + S(1)))*sin(e + f*x), x), x), x) - Simp(C*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2990(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(b*d*(m + n + S(2))), Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*Simp(A*b*d*(m + n + S(2)) + C*(a*c*m + b*d*(n + S(1))) + C*(a*d*m - b*c*(m + S(1)))*cos(e + f*x), x), x), x) + Simp(C*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2991(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1))*Simp(A*d*(a*c*(n + S(1)) + b*d*m) + b*(-C*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(1))) + d*(-A*d + B*c)*(m + n + S(2)))*sin(e + f*x)**S(2) + (-B*d + C*c)*(a*d*(n + S(1)) + b*c*m) - (-C*(-a*(c**S(2) + d**S(2)*(n + S(1))) + b*c*d*(n + S(1))) + d*(A*(a*d*(n + S(2)) - b*c*(n + S(1))) + B*(-a*c*(n + S(2)) + b*d*(n + S(1)))))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(A*d**S(2) - B*c*d + C*c**S(2))*cos(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2992(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1))*Simp(A*d*(a*c*(n + S(1)) + b*d*m) + b*(-C*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(1))) + d*(-A*d + B*c)*(m + n + S(2)))*cos(e + f*x)**S(2) + (-B*d + C*c)*(a*d*(n + S(1)) + b*c*m) - (-C*(-a*(c**S(2) + d**S(2)*(n + S(1))) + b*c*d*(n + S(1))) + d*(A*(a*d*(n + S(2)) - b*c*(n + S(1))) + B*(-a*c*(n + S(2)) + b*d*(n + S(1)))))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(A*d**S(2) - B*c*d + C*c**S(2))*sin(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2993(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**(n + S(1))*Simp(A*d*(a*c*(n + S(1)) + b*d*m) + C*c*(a*d*(n + S(1)) + b*c*m) - b*(A*d**S(2)*(m + n + S(2)) + C*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(1))))*sin(e + f*x)**S(2) - (A*d*(a*d*(n + S(2)) - b*c*(n + S(1))) - C*(-a*(c**S(2) + d**S(2)*(n + S(1))) + b*c*d*(n + S(1))))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))*cos(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2994(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(c**S(2) - d**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**(n + S(1))*Simp(A*d*(a*c*(n + S(1)) + b*d*m) + C*c*(a*d*(n + S(1)) + b*c*m) - b*(A*d**S(2)*(m + n + S(2)) + C*(c**S(2)*(m + S(1)) + d**S(2)*(n + S(1))))*cos(e + f*x)**S(2) - (A*d*(a*d*(n + S(2)) - b*c*(n + S(1))) - C*(-a*(c**S(2) + d**S(2)*(n + S(1))) + b*c*d*(n + S(1))))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*(A*d**S(2) + C*c**S(2))*sin(e + f*x)/(d*f*(c**S(2) - d**S(2))*(n + S(1))), x) def replacement2995(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(2))), Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n*Simp(A*a*d*(m + n + S(2)) + C*(a*d*(n + S(1)) + b*c*m) + (-C*(a*c - b*d*(m + n + S(1))) + d*(A*b + B*a)*(m + n + S(2)))*sin(e + f*x) + (B*b*d*(m + n + S(2)) + C*(a*d*m - b*c*(m + S(1))))*sin(e + f*x)**S(2), x), x), x) - Simp(C*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2996(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(2))), Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n*Simp(A*a*d*(m + n + S(2)) + C*(a*d*(n + S(1)) + b*c*m) + (-C*(a*c - b*d*(m + n + S(1))) + d*(A*b + B*a)*(m + n + S(2)))*cos(e + f*x) + (B*b*d*(m + n + S(2)) + C*(a*d*m - b*c*(m + S(1))))*cos(e + f*x)**S(2), x), x), x) + Simp(C*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2997(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(2))), Int((a + b*sin(e + f*x))**(m + S(-1))*(c + d*sin(e + f*x))**n*Simp(A*a*d*(m + n + S(2)) + C*(a*d*m - b*c*(m + S(1)))*sin(e + f*x)**S(2) + C*(a*d*(n + S(1)) + b*c*m) + (A*b*d*(m + n + S(2)) - C*(a*c - b*d*(m + n + S(1))))*sin(e + f*x), x), x), x) - Simp(C*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**(n + S(1))*cos(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2998(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(2))), Int((a + b*cos(e + f*x))**(m + S(-1))*(c + d*cos(e + f*x))**n*Simp(A*a*d*(m + n + S(2)) + C*(a*d*m - b*c*(m + S(1)))*cos(e + f*x)**S(2) + C*(a*d*(n + S(1)) + b*c*m) + (A*b*d*(m + n + S(2)) - C*(a*c - b*d*(m + n + S(1))))*cos(e + f*x), x), x), x) + Simp(C*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**(n + S(1))*sin(e + f*x)/(d*f*(m + n + S(2))), x) def replacement2999(A, B, C, a, b, d, e, f, x): return Dist(S(1)/b, Int((A*b + (B*b - C*a)*sin(e + f*x))/(sqrt(d*sin(e + f*x))*(a + b*sin(e + f*x))**(S(3)/2)), x), x) + Dist(C/(b*d), Int(sqrt(d*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) def replacement3000(A, B, C, a, b, d, e, f, x): return Dist(S(1)/b, Int((A*b + (B*b - C*a)*cos(e + f*x))/(sqrt(d*cos(e + f*x))*(a + b*cos(e + f*x))**(S(3)/2)), x), x) + Dist(C/(b*d), Int(sqrt(d*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) def replacement3001(A, C, a, b, d, e, f, x): return Dist(S(1)/b, Int((A*b - C*a*sin(e + f*x))/(sqrt(d*sin(e + f*x))*(a + b*sin(e + f*x))**(S(3)/2)), x), x) + Dist(C/(b*d), Int(sqrt(d*sin(e + f*x))/sqrt(a + b*sin(e + f*x)), x), x) def replacement3002(A, C, a, b, d, e, f, x): return Dist(S(1)/b, Int((A*b - C*a*cos(e + f*x))/(sqrt(d*cos(e + f*x))*(a + b*cos(e + f*x))**(S(3)/2)), x), x) + Dist(C/(b*d), Int(sqrt(d*cos(e + f*x))/sqrt(a + b*cos(e + f*x)), x), x) def replacement3003(A, B, C, a, b, c, d, e, f, x): return Dist(b**(S(-2)), Int((A*b**S(2) - C*a**S(2) + b*(B*b - S(2)*C*a)*sin(e + f*x))/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) + Dist(C/b**S(2), Int(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) def replacement3004(A, B, C, a, b, c, d, e, f, x): return Dist(b**(S(-2)), Int((A*b**S(2) - C*a**S(2) + b*(B*b - S(2)*C*a)*cos(e + f*x))/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) + Dist(C/b**S(2), Int(sqrt(a + b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) def replacement3005(A, C, a, b, c, d, e, f, x): return Dist(b**(S(-2)), Int((A*b**S(2) - C*a**S(2) - S(2)*C*a*b*sin(e + f*x))/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) + Dist(C/b**S(2), Int(sqrt(a + b*sin(e + f*x))/sqrt(c + d*sin(e + f*x)), x), x) def replacement3006(A, C, a, b, c, d, e, f, x): return Dist(b**(S(-2)), Int((A*b**S(2) - C*a**S(2) - S(2)*C*a*b*cos(e + f*x))/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) + Dist(C/b**S(2), Int(sqrt(a + b*cos(e + f*x))/sqrt(c + d*cos(e + f*x)), x), x) def replacement3007(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(d*(m + n + S(2))*(A*b**S(2) - B*a*b + C*a**S(2)) - d*(m + n + S(3))*(A*b**S(2) - B*a*b + C*a**S(2))*sin(e + f*x)**S(2) + (m + S(1))*(-a*d + b*c)*(A*a - B*b + C*a) - (c*(A*b**S(2) - B*a*b + C*a**S(2)) + (m + S(1))*(-a*d + b*c)*(A*b - B*a + C*b))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3008(A, B, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(d*(m + n + S(2))*(A*b**S(2) - B*a*b + C*a**S(2)) - d*(m + n + S(3))*(A*b**S(2) - B*a*b + C*a**S(2))*cos(e + f*x)**S(2) + (m + S(1))*(-a*d + b*c)*(A*a - B*b + C*a) - (c*(A*b**S(2) - B*a*b + C*a**S(2)) + (m + S(1))*(-a*d + b*c)*(A*b - B*a + C*b))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3009(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**n*Simp(a*(A + C)*(m + S(1))*(-a*d + b*c) + d*(A*b**S(2) + C*a**S(2))*(m + n + S(2)) - d*(A*b**S(2) + C*a**S(2))*(m + n + S(3))*sin(e + f*x)**S(2) - (b*(A + C)*(m + S(1))*(-a*d + b*c) + c*(A*b**S(2) + C*a**S(2)))*sin(e + f*x), x), x), x) - Simp((a + b*sin(e + f*x))**(m + S(1))*(c + d*sin(e + f*x))**(n + S(1))*(A*b**S(2) + C*a**S(2))*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3010(A, C, a, b, c, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), Int((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**n*Simp(a*(A + C)*(m + S(1))*(-a*d + b*c) + d*(A*b**S(2) + C*a**S(2))*(m + n + S(2)) - d*(A*b**S(2) + C*a**S(2))*(m + n + S(3))*cos(e + f*x)**S(2) - (b*(A + C)*(m + S(1))*(-a*d + b*c) + c*(A*b**S(2) + C*a**S(2)))*cos(e + f*x), x), x), x) + Simp((a + b*cos(e + f*x))**(m + S(1))*(c + d*cos(e + f*x))**(n + S(1))*(A*b**S(2) + C*a**S(2))*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))*(-a*d + b*c)), x) def replacement3011(A, B, C, a, b, c, d, e, f, x): return Dist((A*b**S(2) - B*a*b + C*a**S(2))/(b*(-a*d + b*c)), Int(S(1)/(a + b*sin(e + f*x)), x), x) - Dist((A*d**S(2) - B*c*d + C*c**S(2))/(d*(-a*d + b*c)), Int(S(1)/(c + d*sin(e + f*x)), x), x) + Simp(C*x/(b*d), x) def replacement3012(A, B, C, a, b, c, d, e, f, x): return Dist((A*b**S(2) - B*a*b + C*a**S(2))/(b*(-a*d + b*c)), Int(S(1)/(a + b*cos(e + f*x)), x), x) - Dist((A*d**S(2) - B*c*d + C*c**S(2))/(d*(-a*d + b*c)), Int(S(1)/(c + d*cos(e + f*x)), x), x) + Simp(C*x/(b*d), x) def replacement3013(A, C, a, b, c, d, e, f, x): return Dist((A*b**S(2) + C*a**S(2))/(b*(-a*d + b*c)), Int(S(1)/(a + b*sin(e + f*x)), x), x) - Dist((A*d**S(2) + C*c**S(2))/(d*(-a*d + b*c)), Int(S(1)/(c + d*sin(e + f*x)), x), x) + Simp(C*x/(b*d), x) def replacement3014(A, C, a, b, c, d, e, f, x): return Dist((A*b**S(2) + C*a**S(2))/(b*(-a*d + b*c)), Int(S(1)/(a + b*cos(e + f*x)), x), x) - Dist((A*d**S(2) + C*c**S(2))/(d*(-a*d + b*c)), Int(S(1)/(c + d*cos(e + f*x)), x), x) + Simp(C*x/(b*d), x) def replacement3015(A, B, C, a, b, c, d, e, f, x): return -Dist(S(1)/(b*d), Int(Simp(-A*b*d + C*a*c + (-B*b*d + C*a*d + C*b*c)*sin(e + f*x), x)/(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) + Dist(C/(b*d), Int(sqrt(a + b*sin(e + f*x)), x), x) def replacement3016(A, B, C, a, b, c, d, e, f, x): return -Dist(S(1)/(b*d), Int(Simp(-A*b*d + C*a*c + (-B*b*d + C*a*d + C*b*c)*cos(e + f*x), x)/(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) + Dist(C/(b*d), Int(sqrt(a + b*cos(e + f*x)), x), x) def replacement3017(A, C, a, b, c, d, e, f, x): return -Dist(S(1)/(b*d), Int(Simp(-A*b*d + C*a*c + (C*a*d + C*b*c)*sin(e + f*x), x)/(sqrt(a + b*sin(e + f*x))*(c + d*sin(e + f*x))), x), x) + Dist(C/(b*d), Int(sqrt(a + b*sin(e + f*x)), x), x) def replacement3018(A, C, a, b, c, d, e, f, x): return -Dist(S(1)/(b*d), Int(Simp(-A*b*d + C*a*c + (C*a*d + C*b*c)*cos(e + f*x), x)/(sqrt(a + b*cos(e + f*x))*(c + d*cos(e + f*x))), x), x) + Dist(C/(b*d), Int(sqrt(a + b*cos(e + f*x)), x), x) def replacement3019(A, B, C, a, b, c, d, e, f, x): return Dist(S(1)/(S(2)*d), Int(Simp(S(2)*A*a*d - C*(-a*d + b*c) + (S(2)*B*b*d - C*(a*d + b*c))*sin(e + f*x)**S(2) - S(2)*(C*a*c - d*(A*b + B*a))*sin(e + f*x), x)/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) - Simp(C*sqrt(c + d*sin(e + f*x))*cos(e + f*x)/(d*f*sqrt(a + b*sin(e + f*x))), x) def replacement3020(A, B, C, a, b, c, d, e, f, x): return Dist(S(1)/(S(2)*d), Int(Simp(S(2)*A*a*d - C*(-a*d + b*c) + (S(2)*B*b*d - C*(a*d + b*c))*cos(e + f*x)**S(2) - S(2)*(C*a*c - d*(A*b + B*a))*cos(e + f*x), x)/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) + Simp(C*sqrt(c + d*cos(e + f*x))*sin(e + f*x)/(d*f*sqrt(a + b*cos(e + f*x))), x) def replacement3021(A, C, a, b, c, d, e, f, x): return Dist(S(1)/(S(2)*d), Int(Simp(S(2)*A*a*d - C*(-a*d + b*c) - C*(a*d + b*c)*sin(e + f*x)**S(2) - S(2)*(-A*b*d + C*a*c)*sin(e + f*x), x)/((a + b*sin(e + f*x))**(S(3)/2)*sqrt(c + d*sin(e + f*x))), x), x) - Simp(C*sqrt(c + d*sin(e + f*x))*cos(e + f*x)/(d*f*sqrt(a + b*sin(e + f*x))), x) def replacement3022(A, C, a, b, c, d, e, f, x): return Dist(S(1)/(S(2)*d), Int(Simp(S(2)*A*a*d - C*(-a*d + b*c) - C*(a*d + b*c)*cos(e + f*x)**S(2) - S(2)*(-A*b*d + C*a*c)*cos(e + f*x), x)/((a + b*cos(e + f*x))**(S(3)/2)*sqrt(c + d*cos(e + f*x))), x), x) + Simp(C*sqrt(c + d*cos(e + f*x))*sin(e + f*x)/(d*f*sqrt(a + b*cos(e + f*x))), x) def replacement3023(A, B, C, a, b, c, d, e, f, m, n, x): return Int((a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n*(A + B*sin(e + f*x) + C*sin(e + f*x)**S(2)), x) def replacement3024(A, B, C, a, b, c, d, e, f, m, n, x): return Int((a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n*(A + B*cos(e + f*x) + C*cos(e + f*x)**S(2)), x) def replacement3025(A, C, a, b, c, d, e, f, m, n, x): return Int((A + C*sin(e + f*x)**S(2))*(a + b*sin(e + f*x))**m*(c + d*sin(e + f*x))**n, x) def replacement3026(A, C, a, b, c, d, e, f, m, n, x): return Int((A + C*cos(e + f*x)**S(2))*(a + b*cos(e + f*x))**m*(c + d*cos(e + f*x))**n, x) def replacement3027(A, B, C, b, c, d, e, f, m, n, p, x): return Dist((b*sin(e + f*x))**(-m*p)*(b*sin(e + f*x)**p)**m, Int((b*sin(e + f*x))**(m*p)*(c + d*sin(e + f*x))**n*(A + B*sin(e + f*x) + C*sin(e + f*x)**S(2)), x), x) def replacement3028(A, B, C, b, c, d, e, f, m, n, p, x): return Dist((b*cos(e + f*x))**(-m*p)*(b*cos(e + f*x)**p)**m, Int((b*cos(e + f*x))**(m*p)*(c + d*cos(e + f*x))**n*(A + B*cos(e + f*x) + C*cos(e + f*x)**S(2)), x), x) def replacement3029(A, C, b, c, d, e, f, m, n, p, x): return Dist((b*sin(e + f*x))**(-m*p)*(b*sin(e + f*x)**p)**m, Int((b*sin(e + f*x))**(m*p)*(A + C*sin(e + f*x)**S(2))*(c + d*sin(e + f*x))**n, x), x) def replacement3030(A, C, b, c, d, e, f, m, n, p, x): return Dist((b*cos(e + f*x))**(-m*p)*(b*cos(e + f*x)**p)**m, Int((b*cos(e + f*x))**(m*p)*(A + C*cos(e + f*x)**S(2))*(c + d*cos(e + f*x))**n, x), x) def replacement3031(a, b, c, d, n, x): return Simp(a*(a*cos(c + d*x) + b*sin(c + d*x))**n/(b*d*n), x) def replacement3032(a, b, c, d, n, x): return -Dist(S(1)/d, Subst(Int((a**S(2) + b**S(2) - x**S(2))**(n/S(2) + S(-1)/2), x), x, -a*sin(c + d*x) + b*cos(c + d*x)), x) def replacement3033(a, b, c, d, n, x): return Dist((a**S(2) + b**S(2))*(n + S(-1))/n, Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-2)), x), x) - Simp((-a*sin(c + d*x) + b*cos(c + d*x))*(a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-1))/(d*n), x) def replacement3034(a, b, c, d, x): return -Dist(S(1)/d, Subst(Int(S(1)/(a**S(2) + b**S(2) - x**S(2)), x), x, -a*sin(c + d*x) + b*cos(c + d*x)), x) def replacement3035(a, b, c, d, x): return Simp(sin(c + d*x)/(a*d*(a*cos(c + d*x) + b*sin(c + d*x))), x) def replacement3036(a, b, c, d, n, x): return Dist((n + S(2))/((a**S(2) + b**S(2))*(n + S(1))), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(2)), x), x) + Simp((-a*sin(c + d*x) + b*cos(c + d*x))*(a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1))/(d*(a**S(2) + b**S(2))*(n + S(1))), x) def replacement3037(a, b, c, d, n, x): return Dist((a**S(2) + b**S(2))**(n/S(2)), Int(cos(c + d*x - ArcTan(a, b))**n, x), x) def replacement3038(a, b, c, d, n, x): return Dist(((a*cos(c + d*x) + b*sin(c + d*x))/sqrt(a**S(2) + b**S(2)))**(-n)*(a*cos(c + d*x) + b*sin(c + d*x))**n, Int(cos(c + d*x - ArcTan(a, b))**n, x), x) def replacement3039(a, b, c, d, m, n, x): return Dist(S(2)*b, Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-1))*sin(c + d*x)**(S(1) - n), x), x) - Simp(a*(a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-1))*sin(c + d*x)**(S(1) - n)/(d*(n + S(-1))), x) def replacement3040(a, b, c, d, m, n, x): return Dist(S(2)*a, Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-1))*cos(c + d*x)**(S(1) - n), x), x) + Simp(b*(a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-1))*cos(c + d*x)**(S(1) - n)/(d*(n + S(-1))), x) def replacement3041(a, b, c, d, m, n, x): return Dist(S(1)/(S(2)*b), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1))*sin(c + d*x)**(-n + S(-1)), x), x) + Simp(a*(a*cos(c + d*x) + b*sin(c + d*x))**n*sin(c + d*x)**(-n)/(S(2)*b*d*n), x) def replacement3042(a, b, c, d, m, n, x): return Dist(S(1)/(S(2)*a), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1))*cos(c + d*x)**(-n + S(-1)), x), x) - Simp(b*(a*cos(c + d*x) + b*sin(c + d*x))**n*cos(c + d*x)**(-n)/(S(2)*a*d*n), x) def replacement3043(a, b, c, d, m, n, x): return Simp(a*(a*cos(c + d*x) + b*sin(c + d*x))**n*Hypergeometric2F1(S(1), n, n + S(1), (a/tan(c + d*x) + b)/(S(2)*b))*sin(c + d*x)**(-n)/(S(2)*b*d*n), x) def replacement3044(a, b, c, d, m, n, x): return -Simp(b*(a*cos(c + d*x) + b*sin(c + d*x))**n*Hypergeometric2F1(S(1), n, n + S(1), (a + b*tan(c + d*x))/(S(2)*a))*cos(c + d*x)**(-n)/(S(2)*a*d*n), x) def replacement3045(a, b, c, d, m, n, x): return Int((a/tan(c + d*x) + b)**n, x) def replacement3046(a, b, c, d, m, n, x): return Int((a + b*tan(c + d*x))**n, x) def replacement3047(a, b, c, d, m, n, x): return Dist(S(1)/d, Subst(Int(x**m*(a + b*x)**n*(x**S(2) + S(1))**(-m/S(2) - n/S(2) + S(-1)), x), x, tan(c + d*x)), x) def replacement3048(a, b, c, d, m, n, x): return -Dist(S(1)/d, Subst(Int(x**m*(x**S(2) + S(1))**(-m/S(2) - n/S(2) + S(-1))*(a*x + b)**n, x), x, S(1)/tan(c + d*x)), x) def replacement3049(a, b, c, d, m, n, x): return Int(ExpandTrig((a*cos(c + d*x) + b*sin(c + d*x))**n*sin(c + d*x)**m, x), x) def replacement3050(a, b, c, d, m, n, x): return Int(ExpandTrig((a*cos(c + d*x) + b*sin(c + d*x))**n*cos(c + d*x)**m, x), x) def replacement3051(a, b, c, d, m, n, x): return Dist(a**n*b**n, Int((a*sin(c + d*x) + b*cos(c + d*x))**(-n)*sin(c + d*x)**m, x), x) def replacement3052(a, b, c, d, m, n, x): return Dist(a**n*b**n, Int((a*sin(c + d*x) + b*cos(c + d*x))**(-n)*cos(c + d*x)**m, x), x) def replacement3053(a, b, c, d, n, x): return Dist(a**(S(-2)), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(2))/sin(c + d*x), x), x) - Dist(b/a**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1)), x), x) - Simp((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1))/(a*d*(n + S(1))), x) def replacement3054(a, b, c, d, n, x): return Dist(b**(S(-2)), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(2))/cos(c + d*x), x), x) - Dist(a/b**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1)), x), x) + Simp((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1))/(b*d*(n + S(1))), x) def replacement3055(a, b, c, d, m, n, x): return Dist(a**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-2))*sin(c + d*x)**m, x), x) + Dist(S(2)*b, Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-1))*sin(c + d*x)**(m + S(1)), x), x) - Dist(a**S(2) + b**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-2))*sin(c + d*x)**(m + S(2)), x), x) def replacement3056(a, b, c, d, m, n, x): return Dist(S(2)*a, Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-1))*cos(c + d*x)**(m + S(1)), x), x) + Dist(b**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-2))*cos(c + d*x)**m, x), x) - Dist(a**S(2) + b**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(-2))*cos(c + d*x)**(m + S(2)), x), x) def replacement3057(a, b, c, d, x): return -Dist(a/(a**S(2) + b**S(2)), Int((-a*sin(c + d*x) + b*cos(c + d*x))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) + Simp(b*x/(a**S(2) + b**S(2)), x) def replacement3058(a, b, c, d, x): return Dist(b/(a**S(2) + b**S(2)), Int((-a*sin(c + d*x) + b*cos(c + d*x))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) + Simp(a*x/(a**S(2) + b**S(2)), x) def replacement3059(a, b, c, d, m, x): return Dist(a**S(2)/(a**S(2) + b**S(2)), Int(sin(c + d*x)**(m + S(-2))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) + Dist(b/(a**S(2) + b**S(2)), Int(sin(c + d*x)**(m + S(-1)), x), x) - Simp(a*sin(c + d*x)**(m + S(-1))/(d*(a**S(2) + b**S(2))*(m + S(-1))), x) def replacement3060(a, b, c, d, m, x): return Dist(a/(a**S(2) + b**S(2)), Int(cos(c + d*x)**(m + S(-1)), x), x) + Dist(b**S(2)/(a**S(2) + b**S(2)), Int(cos(c + d*x)**(m + S(-2))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) + Simp(b*cos(c + d*x)**(m + S(-1))/(d*(a**S(2) + b**S(2))*(m + S(-1))), x) def replacement3061(a, b, c, d, x): return -Dist(S(1)/a, Int((-a*sin(c + d*x) + b*cos(c + d*x))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) + Dist(S(1)/a, Int(S(1)/tan(c + d*x), x), x) def replacement3062(a, b, c, d, x): return Dist(S(1)/b, Int((-a*sin(c + d*x) + b*cos(c + d*x))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) + Dist(S(1)/b, Int(tan(c + d*x), x), x) def replacement3063(a, b, c, d, m, x): return -Dist(b/a**S(2), Int(sin(c + d*x)**(m + S(1)), x), x) + Dist((a**S(2) + b**S(2))/a**S(2), Int(sin(c + d*x)**(m + S(2))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) + Simp(sin(c + d*x)**(m + S(1))/(a*d*(m + S(1))), x) def replacement3064(a, b, c, d, m, x): return -Dist(a/b**S(2), Int(cos(c + d*x)**(m + S(1)), x), x) + Dist((a**S(2) + b**S(2))/b**S(2), Int(cos(c + d*x)**(m + S(2))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) - Simp(cos(c + d*x)**(m + S(1))/(b*d*(m + S(1))), x) def replacement3065(a, b, c, d, m, n, x): return Dist(a**(S(-2)), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(2))*sin(c + d*x)**m, x), x) - Dist(S(2)*b/a**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1))*sin(c + d*x)**(m + S(1)), x), x) + Dist((a**S(2) + b**S(2))/a**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**n*sin(c + d*x)**(m + S(2)), x), x) def replacement3066(a, b, c, d, m, n, x): return Dist(b**(S(-2)), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(2))*cos(c + d*x)**m, x), x) - Dist(S(2)*a/b**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**(n + S(1))*cos(c + d*x)**(m + S(1)), x), x) + Dist((a**S(2) + b**S(2))/b**S(2), Int((a*cos(c + d*x) + b*sin(c + d*x))**n*cos(c + d*x)**(m + S(2)), x), x) def replacement3067(a, b, c, d, m, n, p, x): return Int(ExpandTrig((a*cos(c + d*x) + b*sin(c + d*x))**p*sin(c + d*x)**n*cos(c + d*x)**m, x), x) def replacement3068(a, b, c, d, m, n, p, x): return Dist(a**p*b**p, Int((a*sin(c + d*x) + b*cos(c + d*x))**(-p)*sin(c + d*x)**n*cos(c + d*x)**m, x), x) def replacement3069(a, b, c, d, m, n, x): return Dist(a/(a**S(2) + b**S(2)), Int(sin(c + d*x)**n*cos(c + d*x)**(m + S(-1)), x), x) + Dist(b/(a**S(2) + b**S(2)), Int(sin(c + d*x)**(n + S(-1))*cos(c + d*x)**m, x), x) - Dist(a*b/(a**S(2) + b**S(2)), Int(sin(c + d*x)**(n + S(-1))*cos(c + d*x)**(m + S(-1))/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) def replacement3070(a, b, c, d, m, n, x): return Int(ExpandTrig(sin(c + d*x)**n*cos(c + d*x)**m/(a*cos(c + d*x) + b*sin(c + d*x)), x), x) def replacement3071(a, b, c, d, m, n, p, x): return Dist(a/(a**S(2) + b**S(2)), Int((a*cos(c + d*x) + b*sin(c + d*x))**(p + S(1))*sin(c + d*x)**n*cos(c + d*x)**(m + S(-1)), x), x) + Dist(b/(a**S(2) + b**S(2)), Int((a*cos(c + d*x) + b*sin(c + d*x))**(p + S(1))*sin(c + d*x)**(n + S(-1))*cos(c + d*x)**m, x), x) - Dist(a*b/(a**S(2) + b**S(2)), Int((a*cos(c + d*x) + b*sin(c + d*x))**p*sin(c + d*x)**(n + S(-1))*cos(c + d*x)**(m + S(-1)), x), x) def replacement3072(a, b, c, d, e, x): return Simp(-S(2)*(-b*sin(d + e*x) + c*cos(d + e*x))/(e*sqrt(a + b*cos(d + e*x) + c*sin(d + e*x))), x) def replacement3073(a, b, c, d, e, n, x): return Dist(a*(S(2)*n + S(-1))/n, Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(-1)), x), x) - Simp((-b*sin(d + e*x) + c*cos(d + e*x))*(a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(-1))/(e*n), x) def replacement3074(a, b, c, d, e, x): return -Simp((-a*sin(d + e*x) + c)/(c*e*(-b*sin(d + e*x) + c*cos(d + e*x))), x) def replacement3075(a, b, c, d, e, x): return Int(S(1)/sqrt(a + sqrt(b**S(2) + c**S(2))*cos(d + e*x - ArcTan(b, c))), x) def replacement3076(a, b, c, d, e, n, x): return Dist((n + S(1))/(a*(S(2)*n + S(1))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1)), x), x) + Simp((-b*sin(d + e*x) + c*cos(d + e*x))*(a + b*cos(d + e*x) + c*sin(d + e*x))**n/(a*e*(S(2)*n + S(1))), x) def replacement3077(a, b, c, d, e, x): return Dist(b/(c*e), Subst(Int(sqrt(a + x)/x, x), x, b*cos(d + e*x) + c*sin(d + e*x)), x) def replacement3078(a, b, c, d, e, x): return Int(sqrt(a + sqrt(b**S(2) + c**S(2))*cos(d + e*x - ArcTan(b, c))), x) def replacement3079(a, b, c, d, e, x): return Dist(sqrt(a + b*cos(d + e*x) + c*sin(d + e*x))/sqrt((a + b*cos(d + e*x) + c*sin(d + e*x))/(a + sqrt(b**S(2) + c**S(2)))), Int(sqrt(a/(a + sqrt(b**S(2) + c**S(2))) + sqrt(b**S(2) + c**S(2))*cos(d + e*x - ArcTan(b, c))/(a + sqrt(b**S(2) + c**S(2)))), x), x) def replacement3080(a, b, c, d, e, n, x): return Dist(S(1)/n, Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(-2))*Simp(a**S(2)*n + a*b*(S(2)*n + S(-1))*cos(d + e*x) + a*c*(S(2)*n + S(-1))*sin(d + e*x) + (b**S(2) + c**S(2))*(n + S(-1)), x), x), x) - Simp((-b*sin(d + e*x) + c*cos(d + e*x))*(a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(-1))/(e*n), x) def With3081(a, b, c, d, e, x): f = FreeFactors(S(1)/tan(d/S(2) + e*x/S(2)), x) return -Dist(f/e, Subst(Int(S(1)/(a + c*f*x), x), x, S(1)/(f*tan(d/S(2) + e*x/S(2)))), x) def With3082(a, b, c, d, e, x): f = FreeFactors(tan(Pi/S(4) + d/S(2) + e*x/S(2)), x) return Dist(f/e, Subst(Int(S(1)/(a + b*f*x), x), x, tan(Pi/S(4) + d/S(2) + e*x/S(2))/f), x) def With3083(a, b, c, d, e, x): f = FreeFactors(S(1)/tan(Pi/S(4) + d/S(2) + e*x/S(2)), x) return -Dist(f/e, Subst(Int(S(1)/(a + b*f*x), x), x, S(1)/(f*tan(Pi/S(4) + d/S(2) + e*x/S(2)))), x) def With3084(a, b, c, d, e, x): f = FreeFactors(tan(d/S(2) + e*x/S(2)), x) return Dist(S(2)*f/e, Subst(Int(S(1)/(a + b + S(2)*c*f*x + f**S(2)*x**S(2)*(a - b)), x), x, tan(d/S(2) + e*x/S(2))/f), x) def replacement3085(a, b, c, d, e, x): return Dist(b/(c*e), Subst(Int(S(1)/(x*sqrt(a + x)), x), x, b*cos(d + e*x) + c*sin(d + e*x)), x) def replacement3086(a, b, c, d, e, x): return Int(S(1)/sqrt(a + sqrt(b**S(2) + c**S(2))*cos(d + e*x - ArcTan(b, c))), x) def replacement3087(a, b, c, d, e, x): return Dist(sqrt((a + b*cos(d + e*x) + c*sin(d + e*x))/(a + sqrt(b**S(2) + c**S(2))))/sqrt(a + b*cos(d + e*x) + c*sin(d + e*x)), Int(S(1)/sqrt(a/(a + sqrt(b**S(2) + c**S(2))) + sqrt(b**S(2) + c**S(2))*cos(d + e*x - ArcTan(b, c))/(a + sqrt(b**S(2) + c**S(2)))), x), x) def replacement3088(a, b, c, d, e, x): return Dist(S(1)/(a**S(2) - b**S(2) - c**S(2)), Int(sqrt(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) + Simp(S(2)*(-b*sin(d + e*x) + c*cos(d + e*x))/(e*sqrt(a + b*cos(d + e*x) + c*sin(d + e*x))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3089(a, b, c, d, e, n, x): return Dist(S(1)/((n + S(1))*(a**S(2) - b**S(2) - c**S(2))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))*(a*(n + S(1)) - b*(n + S(2))*cos(d + e*x) - c*(n + S(2))*sin(d + e*x)), x), x) + Simp((b*sin(d + e*x) - c*cos(d + e*x))*(a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))/(e*(n + S(1))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3090(A, B, C, a, b, c, d, e, x): return Simp(x*(S(2)*A*a - B*b - C*c)/(S(2)*a**S(2)), x) + Simp((-S(2)*A*a*b**S(2) + a**S(2)*(B*b - C*c) + b**S(2)*(B*b + C*c))*log(RemoveContent(a + b*cos(d + e*x) + c*sin(d + e*x), x))/(S(2)*a**S(2)*b*c*e), x) - Simp((B*b + C*c)*(b*cos(d + e*x) - c*sin(d + e*x))/(S(2)*a*b*c*e), x) def replacement3091(A, C, a, b, c, d, e, x): return Simp(x*(S(2)*A*a - C*c)/(S(2)*a**S(2)), x) - Simp(C*cos(d + e*x)/(S(2)*a*e), x) + Simp((S(2)*A*a*c - C*a**S(2) + C*b**S(2))*log(RemoveContent(a + b*cos(d + e*x) + c*sin(d + e*x), x))/(S(2)*a**S(2)*b*e), x) + Simp(C*c*sin(d + e*x)/(S(2)*a*b*e), x) def replacement3092(A, B, a, b, c, d, e, x): return Simp(x*(S(2)*A*a - B*b)/(S(2)*a**S(2)), x) + Simp(B*sin(d + e*x)/(S(2)*a*e), x) + Simp((-S(2)*A*a*b + B*a**S(2) + B*b**S(2))*log(RemoveContent(a + b*cos(d + e*x) + c*sin(d + e*x), x))/(S(2)*a**S(2)*c*e), x) - Simp(B*b*cos(d + e*x)/(S(2)*a*c*e), x) def replacement3093(A, B, C, a, b, c, d, e, x): return Simp(x*(B*b + C*c)/(b**S(2) + c**S(2)), x) + Simp((B*c - C*b)*log(a + b*cos(d + e*x) + c*sin(d + e*x))/(e*(b**S(2) + c**S(2))), x) def replacement3094(A, C, a, b, c, d, e, x): return Simp(C*c*x/(b**S(2) + c**S(2)), x) - Simp(C*b*log(a + b*cos(d + e*x) + c*sin(d + e*x))/(e*(b**S(2) + c**S(2))), x) def replacement3095(A, B, a, b, c, d, e, x): return Simp(B*b*x/(b**S(2) + c**S(2)), x) + Simp(B*c*log(a + b*cos(d + e*x) + c*sin(d + e*x))/(e*(b**S(2) + c**S(2))), x) def replacement3096(A, B, C, a, b, c, d, e, x): return Dist((A*(b**S(2) + c**S(2)) - a*(B*b + C*c))/(b**S(2) + c**S(2)), Int(S(1)/(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) + Simp(x*(B*b + C*c)/(b**S(2) + c**S(2)), x) + Simp((B*c - C*b)*log(a + b*cos(d + e*x) + c*sin(d + e*x))/(e*(b**S(2) + c**S(2))), x) def replacement3097(A, C, a, b, c, d, e, x): return Dist((A*(b**S(2) + c**S(2)) - C*a*c)/(b**S(2) + c**S(2)), Int(S(1)/(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) - Simp(C*b*log(a + b*cos(d + e*x) + c*sin(d + e*x))/(e*(b**S(2) + c**S(2))), x) + Simp(C*c*(d + e*x)/(e*(b**S(2) + c**S(2))), x) def replacement3098(A, B, a, b, c, d, e, x): return Dist((A*(b**S(2) + c**S(2)) - B*a*b)/(b**S(2) + c**S(2)), Int(S(1)/(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) + Simp(B*b*(d + e*x)/(e*(b**S(2) + c**S(2))), x) + Simp(B*c*log(a + b*cos(d + e*x) + c*sin(d + e*x))/(e*(b**S(2) + c**S(2))), x) def replacement3099(A, B, C, a, b, c, d, e, n, x): return Simp((a + b*cos(d + e*x) + c*sin(d + e*x))**n*(B*a*sin(d + e*x) + B*c - C*a*cos(d + e*x) - C*b)/(a*e*(n + S(1))), x) def replacement3100(A, C, a, b, c, d, e, n, x): return -Simp((C*a*cos(d + e*x) + C*b)*(a + b*cos(d + e*x) + c*sin(d + e*x))**n/(a*e*(n + S(1))), x) def replacement3101(A, B, a, b, c, d, e, n, x): return Simp((B*a*sin(d + e*x) + B*c)*(a + b*cos(d + e*x) + c*sin(d + e*x))**n/(a*e*(n + S(1))), x) def replacement3102(A, B, C, a, b, c, d, e, n, x): return Dist((A*a*(n + S(1)) + n*(B*b + C*c))/(a*(n + S(1))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**n, x), x) + Simp((a + b*cos(d + e*x) + c*sin(d + e*x))**n*(B*a*sin(d + e*x) + B*c - C*a*cos(d + e*x) - C*b)/(a*e*(n + S(1))), x) def replacement3103(A, C, a, b, c, d, e, n, x): return Dist((A*a*(n + S(1)) + C*c*n)/(a*(n + S(1))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**n, x), x) - Simp((C*a*cos(d + e*x) + C*b)*(a + b*cos(d + e*x) + c*sin(d + e*x))**n/(a*e*(n + S(1))), x) def replacement3104(A, B, a, b, c, d, e, n, x): return Dist((A*a*(n + S(1)) + B*b*n)/(a*(n + S(1))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**n, x), x) + Simp((B*a*sin(d + e*x) + B*c)*(a + b*cos(d + e*x) + c*sin(d + e*x))**n/(a*e*(n + S(1))), x) def replacement3105(B, C, b, c, d, e, n, x): return Simp((B*c - C*b)*(b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))/(e*(b**S(2) + c**S(2))*(n + S(1))), x) def replacement3106(A, B, C, a, b, c, d, e, n, x): return Dist(S(1)/(a*(n + S(1))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(-1))*Simp(A*a**S(2)*(n + S(1)) + a*n*(B*b + C*c) + (A*a*b*(n + S(1)) + n*(B*a**S(2) - B*c**S(2) + C*b*c))*cos(d + e*x) + (A*a*c*(n + S(1)) + n*(B*b*c + C*a**S(2) - C*b**S(2)))*sin(d + e*x), x), x), x) + Simp((a + b*cos(d + e*x) + c*sin(d + e*x))**n*(B*a*sin(d + e*x) + B*c - C*a*cos(d + e*x) - C*b)/(a*e*(n + S(1))), x) def replacement3107(A, C, a, b, c, d, e, n, x): return Dist(S(1)/(a*(n + S(1))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(-1))*Simp(A*a**S(2)*(n + S(1)) + C*a*c*n + (A*a*b*(n + S(1)) + C*b*c*n)*cos(d + e*x) + (A*a*c*(n + S(1)) + C*a**S(2)*n - C*b**S(2)*n)*sin(d + e*x), x), x), x) - Simp((C*a*cos(d + e*x) + C*b)*(a + b*cos(d + e*x) + c*sin(d + e*x))**n/(a*e*(n + S(1))), x) def replacement3108(A, B, a, b, c, d, e, n, x): return Dist(S(1)/(a*(n + S(1))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(-1))*Simp(A*a**S(2)*(n + S(1)) + B*a*b*n + (A*a*c*(n + S(1)) + B*b*c*n)*sin(d + e*x) + (A*a*b*(n + S(1)) + B*a**S(2)*n - B*c**S(2)*n)*cos(d + e*x), x), x), x) + Simp((B*a*sin(d + e*x) + B*c)*(a + b*cos(d + e*x) + c*sin(d + e*x))**n/(a*e*(n + S(1))), x) def replacement3109(A, B, C, a, b, c, d, e, x): return Dist(B/b, Int(sqrt(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) + Dist((A*b - B*a)/b, Int(S(1)/sqrt(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) def replacement3110(A, B, C, a, b, c, d, e, x): return Simp((B*c - C*b + (-A*b + B*a)*sin(d + e*x) - (-A*c + C*a)*cos(d + e*x))/(e*(a + b*cos(d + e*x) + c*sin(d + e*x))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3111(A, C, a, b, c, d, e, x): return -Simp((A*b*sin(d + e*x) + C*b + (-A*c + C*a)*cos(d + e*x))/(e*(a + b*cos(d + e*x) + c*sin(d + e*x))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3112(A, B, a, b, c, d, e, x): return Simp((A*c*cos(d + e*x) + B*c + (-A*b + B*a)*sin(d + e*x))/(e*(a + b*cos(d + e*x) + c*sin(d + e*x))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3113(A, B, C, a, b, c, d, e, x): return Dist((A*a - B*b - C*c)/(a**S(2) - b**S(2) - c**S(2)), Int(S(1)/(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) + Simp((B*c - C*b + (-A*b + B*a)*sin(d + e*x) - (-A*c + C*a)*cos(d + e*x))/(e*(a + b*cos(d + e*x) + c*sin(d + e*x))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3114(A, C, a, b, c, d, e, x): return Dist((A*a - C*c)/(a**S(2) - b**S(2) - c**S(2)), Int(S(1)/(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) - Simp((A*b*sin(d + e*x) + C*b + (-A*c + C*a)*cos(d + e*x))/(e*(a + b*cos(d + e*x) + c*sin(d + e*x))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3115(A, B, a, b, c, d, e, x): return Dist((A*a - B*b)/(a**S(2) - b**S(2) - c**S(2)), Int(S(1)/(a + b*cos(d + e*x) + c*sin(d + e*x)), x), x) + Simp((A*c*cos(d + e*x) + B*c + (-A*b + B*a)*sin(d + e*x))/(e*(a + b*cos(d + e*x) + c*sin(d + e*x))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3116(A, B, C, a, b, c, d, e, n, x): return Dist(S(1)/((n + S(1))*(a**S(2) - b**S(2) - c**S(2))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))*Simp((n + S(1))*(A*a - B*b - C*c) + (n + S(2))*(-A*b + B*a)*cos(d + e*x) + (n + S(2))*(-A*c + C*a)*sin(d + e*x), x), x), x) - Simp((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))*(B*c - C*b + (-A*b + B*a)*sin(d + e*x) - (-A*c + C*a)*cos(d + e*x))/(e*(n + S(1))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3117(A, C, a, b, c, d, e, n, x): return Dist(S(1)/((n + S(1))*(a**S(2) - b**S(2) - c**S(2))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))*Simp(-A*b*(n + S(2))*cos(d + e*x) + (n + S(1))*(A*a - C*c) + (n + S(2))*(-A*c + C*a)*sin(d + e*x), x), x), x) + Simp((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))*(A*b*sin(d + e*x) + C*b + (-A*c + C*a)*cos(d + e*x))/(e*(n + S(1))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3118(A, B, a, b, c, d, e, n, x): return Dist(S(1)/((n + S(1))*(a**S(2) - b**S(2) - c**S(2))), Int((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))*Simp(-A*c*(n + S(2))*sin(d + e*x) + (n + S(1))*(A*a - B*b) + (n + S(2))*(-A*b + B*a)*cos(d + e*x), x), x), x) - Simp((a + b*cos(d + e*x) + c*sin(d + e*x))**(n + S(1))*(A*c*cos(d + e*x) + B*c + (-A*b + B*a)*sin(d + e*x))/(e*(n + S(1))*(a**S(2) - b**S(2) - c**S(2))), x) def replacement3119(a, b, c, d, e, x): return Int(cos(d + e*x)/(a*cos(d + e*x) + b + c*sin(d + e*x)), x) def replacement3120(a, b, c, d, e, x): return Int(sin(d + e*x)/(a*sin(d + e*x) + b + c*cos(d + e*x)), x) def replacement3121(a, b, c, d, e, n, x): return Int((a*cos(d + e*x) + b + c*sin(d + e*x))**n, x) def replacement3122(a, b, c, d, e, n, x): return Int((a*sin(d + e*x) + b + c*cos(d + e*x))**n, x) def replacement3123(a, b, c, d, e, n, x): return Dist((a + b/cos(d + e*x) + c*tan(d + e*x))**n*(a*cos(d + e*x) + b + c*sin(d + e*x))**(-n)*cos(d + e*x)**n, Int((a*cos(d + e*x) + b + c*sin(d + e*x))**n, x), x) def replacement3124(a, b, c, d, e, n, x): return Dist((a + b/sin(d + e*x) + c/tan(d + e*x))**n*(a*sin(d + e*x) + b + c*cos(d + e*x))**(-n)*sin(d + e*x)**n, Int((a*sin(d + e*x) + b + c*cos(d + e*x))**n, x), x) def replacement3125(a, b, c, d, e, m, n, x): return Int((a*cos(d + e*x) + b + c*sin(d + e*x))**(-n), x) def replacement3126(a, b, c, d, e, m, n, x): return Int((a*sin(d + e*x) + b + c*cos(d + e*x))**(-n), x) def replacement3127(a, b, c, d, e, m, n, x): return Dist((a + b/cos(d + e*x) + c*tan(d + e*x))**(-n)*(a*cos(d + e*x) + b + c*sin(d + e*x))**n*(S(1)/cos(d + e*x))**n, Int((a*cos(d + e*x) + b + c*sin(d + e*x))**(-n), x), x) def replacement3128(a, b, c, d, e, m, n, x): return Dist((a + b/sin(d + e*x) + c/tan(d + e*x))**(-n)*(a*sin(d + e*x) + b + c*cos(d + e*x))**n*(S(1)/sin(d + e*x))**n, Int((a*sin(d + e*x) + b + c*cos(d + e*x))**(-n), x), x) def replacement3129(b, c, d, p, x): return Dist(b*(S(2)*p + S(-1))/(S(2)*p), Int((b*sin(c + d*x)**S(2))**(p + S(-1)), x), x) - Simp((b*sin(c + d*x)**S(2))**p/(S(2)*d*p*tan(c + d*x)), x) def replacement3130(b, c, d, p, x): return Dist(b*(S(2)*p + S(-1))/(S(2)*p), Int((b*cos(c + d*x)**S(2))**(p + S(-1)), x), x) + Simp((b*cos(c + d*x)**S(2))**p*tan(c + d*x)/(S(2)*d*p), x) def replacement3131(b, c, d, p, x): return Dist(S(2)*(p + S(1))/(b*(S(2)*p + S(1))), Int((b*sin(c + d*x)**S(2))**(p + S(1)), x), x) + Simp((b*sin(c + d*x)**S(2))**(p + S(1))/(b*d*(S(2)*p + S(1))*tan(c + d*x)), x) def replacement3132(b, c, d, p, x): return Dist(S(2)*(p + S(1))/(b*(S(2)*p + S(1))), Int((b*cos(c + d*x)**S(2))**(p + S(1)), x), x) - Simp((b*cos(c + d*x)**S(2))**(p + S(1))*tan(c + d*x)/(b*d*(S(2)*p + S(1))), x) def replacement3133(a, b, c, d, p, x): return Dist(a**p, Int(cos(c + d*x)**(S(2)*p), x), x) def replacement3134(a, b, c, d, p, x): return Dist(a**p, Int(sin(c + d*x)**(S(2)*p), x), x) def replacement3135(a, b, c, d, p, x): return Int((a*cos(c + d*x)**S(2))**p, x) def replacement3136(a, b, c, d, p, x): return Int((a*sin(c + d*x)**S(2))**p, x) def With3137(a, b, c, d, p, x): e = FreeFactors(tan(c + d*x), x) return Dist(e/d, Subst(Int((a + e**S(2)*x**S(2)*(a + b))**p*(e**S(2)*x**S(2) + S(1))**(-p + S(-1)), x), x, tan(c + d*x)/e), x) def With3138(a, b, c, d, p, x): e = FreeFactors(tan(c + d*x), x) return Dist(e/d, Subst(Int((e**S(2)*x**S(2) + S(1))**(-p + S(-1))*(a*e**S(2)*x**S(2) + a + b)**p, x), x, tan(c + d*x)/e), x) def replacement3139(a, b, c, d, p, x): return Dist(S(2)**(-p), Int((S(2)*a - b*cos(S(2)*c + S(2)*d*x) + b)**p, x), x) def replacement3140(a, b, c, d, p, x): return Dist(S(2)**(-p), Int((S(2)*a + b*cos(S(2)*c + S(2)*d*x) + b)**p, x), x) def replacement3141(a, b, c, d, n, p, x): return Int((a + b*sin(c + d*x)**n)**p, x) def replacement3142(a, b, c, d, n, p, x): return Int((a + b*cos(c + d*x)**n)**p, x) def With3143(a, b, c, d, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f/d, Subst(Int((f**S(2)*x**S(2) + S(1))**(-n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b, x)**p, x), x, S(1)/(f*tan(c + d*x))), x) def With3144(a, b, c, d, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f/d, Subst(Int((f**S(2)*x**S(2) + S(1))**(-n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b, x)**p, x), x, tan(c + d*x)/f), x) def replacement3145(a, b, c, d, p, u, x): return Dist(a**p, Int(ActivateTrig(u)*cos(c + d*x)**(S(2)*p), x), x) def replacement3146(a, b, c, d, p, u, x): return Dist(a**p, Int(ActivateTrig(u)*sin(c + d*x)**(S(2)*p), x), x) def replacement3147(a, b, c, d, p, u, x): return Dist((a*cos(c + d*x)**S(2))**p*cos(c + d*x)**(-S(2)*p), Int(ActivateTrig(u)*cos(c + d*x)**(S(2)*p), x), x) def replacement3148(a, b, c, d, p, u, x): return Dist((a*sin(c + d*x)**S(2))**p*sin(c + d*x)**(-S(2)*p), Int(ActivateTrig(u)*sin(c + d*x)**(S(2)*p), x), x) def With3149(a, b, c, d, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f/d, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b, x)**p, x), x, S(1)/(f*tan(c + d*x))), x) def With3150(a, b, c, d, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f/d, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b, x)**p, x), x, tan(c + d*x)/f), x) def With3151(a, b, c, d, m, n, p, x): f = FreeFactors(cos(c + d*x), x) return -Dist(f/d, Subst(Int((-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*ExpandToSum(a + b*(-f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p, x), x, cos(c + d*x)/f), x) def With3152(a, b, c, d, m, n, p, x): f = FreeFactors(sin(c + d*x), x) return Dist(f/d, Subst(Int((-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*ExpandToSum(a + b*(-f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p, x), x, sin(c + d*x)/f), x) def replacement3153(a, b, c, d, m, n, p, x): return Int(ExpandTrig((a + b*sin(c + d*x)**n)**p*sin(c + d*x)**m, x), x) def replacement3154(a, b, c, d, m, n, p, x): return Int(ExpandTrig((a + b*cos(c + d*x)**n)**p*cos(c + d*x)**m, x), x) def With3155(a, b, c, d, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f/d, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b*f**n*x**n, x)**p, x), x, tan(c + d*x)/f), x) def With3156(a, b, c, d, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f/d, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b*f**n*x**n, x)**p, x), x, S(1)/(f*tan(c + d*x))), x) def replacement3157(a, b, c, d, m, n, p, x): return Int((S(1) - sin(c + d*x)**S(2))**(m/S(2))*(a + b*sin(c + d*x)**n)**p, x) def replacement3158(a, b, c, d, m, n, p, x): return Int((S(1) - cos(c + d*x)**S(2))**(m/S(2))*(a + b*cos(c + d*x)**n)**p, x) def replacement3159(a, b, c, d, m, n, p, x): return Int(ExpandTrig((S(1) - sin(c + d*x)**S(2))**(m/S(2))*(a + b*sin(c + d*x)**n)**p, x), x) def replacement3160(a, b, c, d, m, n, p, x): return Int(ExpandTrig((S(1) - cos(c + d*x)**S(2))**(m/S(2))*(a + b*cos(c + d*x)**n)**p, x), x) def With3161(a, b, c, d, e, m, n, p, x): f = FreeFactors(sin(c + d*x), x) return Dist(f/d, Subst(Int((a + b*(e*f*x)**n)**p*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2), x), x, sin(c + d*x)/f), x) def With3162(a, b, c, d, e, m, n, p, x): f = FreeFactors(cos(c + d*x), x) return -Dist(f/d, Subst(Int((a + b*(e*f*x)**n)**p*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2), x), x, cos(c + d*x)/f), x) def With3163(a, b, c, d, e, m, n, p, x): f = FreeFactors(sin(c + d*x), x) return Dist(f**(m + S(1))/d, Subst(Int(x**m*(a + b*(e*f*x)**n)**p*(-f**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1)/2), x), x, sin(c + d*x)/f), x) def With3164(a, b, c, d, e, m, n, p, x): f = FreeFactors(cos(c + d*x), x) return -Dist(f**(m + S(1))/d, Subst(Int(x**m*(a + b*(e*f*x)**n)**p*(-f**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1)/2), x), x, cos(c + d*x)/f), x) def With3165(a, b, c, d, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f**(m + S(1))/d, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b*f**n*x**n, x)**p, x), x, tan(c + d*x)/f), x) def With3166(a, b, c, d, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f**(m + S(1))/d, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b*f**n*x**n, x)**p, x), x, S(1)/(f*tan(c + d*x))), x) def With3167(a, b, c, d, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f**(m + S(1))/d, Subst(Int(x**m*((f**S(2)*x**S(2) + S(1))**(-n/S(2))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b*f**n*x**n, x))**p/(f**S(2)*x**S(2) + S(1)), x), x, tan(c + d*x)/f), x) def With3168(a, b, c, d, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f**(m + S(1))/d, Subst(Int(x**m*((f**S(2)*x**S(2) + S(1))**(-n/S(2))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + b*f**n*x**n, x))**p/(f**S(2)*x**S(2) + S(1)), x), x, S(1)/(f*tan(c + d*x))), x) def With3169(a, b, c, d, e, m, n, p, q, x): f = FreeFactors(S(1)/tan(d + e*x), x) return -Dist(f/e, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*q/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(q/S(2)) + b*(f**S(2)*x**S(2) + S(1))**(-p/S(2) + q/S(2)) + c, x)**n, x), x, S(1)/(f*tan(d + e*x))), x) def With3170(a, b, c, d, e, m, n, p, q, x): f = FreeFactors(tan(d + e*x), x) return Dist(f/e, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*q/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(q/S(2)) + b*(f**S(2)*x**S(2) + S(1))**(-p/S(2) + q/S(2)) + c, x)**n, x), x, tan(d + e*x)/f), x) def With3171(a, b, c, d, e, m, n, p, q, x): f = FreeFactors(S(1)/tan(d + e*x), x) return -Dist(f/e, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(p/S(2)) + b*f**p*x**p + c*(f**S(2)*x**S(2) + S(1))**(p/S(2) - q/S(2)), x)**n, x), x, S(1)/(f*tan(d + e*x))), x) def With3172(a, b, c, d, e, m, n, p, q, x): f = FreeFactors(tan(d + e*x), x) return Dist(f/e, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**(p/S(2)) + b*f**p*x**p + c*(f**S(2)*x**S(2) + S(1))**(p/S(2) - q/S(2)), x)**n, x), x, tan(d + e*x)/f), x) def replacement3173(a, b, c, d, e, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p), x), x) def replacement3174(a, b, c, d, e, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p), x), x) def replacement3175(a, b, c, d, e, n, n2, p, x): return Dist((b + S(2)*c*sin(d + e*x)**n)**(-S(2)*p)*(a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p, Int(u*(b + S(2)*c*sin(d + e*x)**n)**(S(2)*p), x), x) def replacement3176(a, b, c, d, e, n, n2, p, x): return Dist((b + S(2)*c*cos(d + e*x)**n)**(-S(2)*p)*(a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p, Int(u*(b + S(2)*c*cos(d + e*x)**n)**(S(2)*p), x), x) def With3177(a, b, c, d, e, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*sin(d + e*x)**n - q), x), x) - Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*sin(d + e*x)**n + q), x), x) def With3178(a, b, c, d, e, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*cos(d + e*x)**n - q), x), x) - Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*cos(d + e*x)**n + q), x), x) def replacement3179(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p)*sin(d + e*x)**m, x), x) def replacement3180(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p)*cos(d + e*x)**m, x), x) def replacement3181(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*sin(d + e*x)**n)**(-S(2)*p)*(a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p)*sin(d + e*x)**m, x), x) def replacement3182(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*cos(d + e*x)**n)**(-S(2)*p)*(a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p)*cos(d + e*x)**m, x), x) def With3183(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(S(1)/tan(d + e*x), x) return -Dist(f/e, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p + S(-1))*ExpandToSum(a*(x**S(2) + S(1))**n + b*(x**S(2) + S(1))**(n/S(2)) + c, x)**p, x), x, S(1)/(f*tan(d + e*x))), x) def With3184(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(tan(d + e*x), x) return Dist(f/e, Subst(Int((f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p + S(-1))*ExpandToSum(a*(x**S(2) + S(1))**n + b*(x**S(2) + S(1))**(n/S(2)) + c, x)**p, x), x, tan(d + e*x)/f), x) def replacement3185(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p*sin(d + e*x)**m, x), x) def replacement3186(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p*cos(d + e*x)**m, x), x) def With3187(a, b, c, d, e, f, m, n, n2, p, x): g = FreeFactors(sin(d + e*x), x) return Dist(g/e, Subst(Int((-g**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*(a + b*(f*g*x)**n + c*(f*g*x)**(S(2)*n))**p, x), x, sin(d + e*x)/g), x) def With3188(a, b, c, d, e, f, m, n, n2, p, x): g = FreeFactors(cos(d + e*x), x) return -Dist(g/e, Subst(Int((-g**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*(a + b*(f*g*x)**n + c*(f*g*x)**(S(2)*n))**p, x), x, cos(d + e*x)/g), x) def replacement3189(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p)*cos(d + e*x)**m, x), x) def replacement3190(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p)*sin(d + e*x)**m, x), x) def replacement3191(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*sin(d + e*x)**n)**(-S(2)*p)*(a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p)*cos(d + e*x)**m, x), x) def replacement3192(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*cos(d + e*x)**n)**(-S(2)*p)*(a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p)*sin(d + e*x)**m, x), x) def With3193(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(S(1)/tan(d + e*x), x) return -Dist(f**(m + S(1))/e, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p + S(-1))*ExpandToSum(a*(x**S(2) + S(1))**n + b*(x**S(2) + S(1))**(n/S(2)) + c, x)**p, x), x, S(1)/(f*tan(d + e*x))), x) def With3194(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(tan(d + e*x), x) return Dist(f**(m + S(1))/e, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p + S(-1))*ExpandToSum(a*(x**S(2) + S(1))**n + b*(x**S(2) + S(1))**(n/S(2)) + c, x)**p, x), x, tan(d + e*x)/f), x) def replacement3195(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((S(1) - sin(d + e*x)**S(2))**(m/S(2))*(a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p, x), x) def replacement3196(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((S(1) - cos(d + e*x)**S(2))**(m/S(2))*(a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p, x), x) def With3197(a, b, c, d, e, f, m, n, n2, p, x): g = FreeFactors(sin(d + e*x), x) return Dist(g**(m + S(1))/e, Subst(Int(x**m*(-g**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1)/2)*(a + b*(f*g*x)**n + c*(f*g*x)**(S(2)*n))**p, x), x, sin(d + e*x)/g), x) def With3198(a, b, c, d, e, f, m, n, n2, p, x): g = FreeFactors(cos(d + e*x), x) return -Dist(g**(m + S(1))/e, Subst(Int(x**m*(-g**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1)/2)*(a + b*(f*g*x)**n + c*(f*g*x)**(S(2)*n))**p, x), x, cos(d + e*x)/g), x) def replacement3199(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p)*tan(d + e*x)**m, x), x) def replacement3200(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p)*(S(1)/tan(d + e*x))**m, x), x) def replacement3201(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*sin(d + e*x)**n)**(-S(2)*p)*(a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p)*tan(d + e*x)**m, x), x) def replacement3202(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*cos(d + e*x)**n)**(-S(2)*p)*(a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p)*(S(1)/tan(d + e*x))**m, x), x) def With3203(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(tan(d + e*x), x) return Dist(f**(m + S(1))/e, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-n*p + S(-1))*ExpandToSum(a*(x**S(2) + S(1))**n + b*x**n*(x**S(2) + S(1))**(n/S(2)) + c*x**(S(2)*n), x)**p, x), x, tan(d + e*x)/f), x) def With3204(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(S(1)/tan(d + e*x), x) return -Dist(f**(m + S(1))/e, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-n*p + S(-1))*ExpandToSum(a*(x**S(2) + S(1))**n + b*x**n*(x**S(2) + S(1))**(n/S(2)) + c*x**(S(2)*n), x)**p, x), x, S(1)/(f*tan(d + e*x))), x) def replacement3205(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((S(1) - sin(d + e*x)**S(2))**(-m/S(2))*(a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p*sin(d + e*x)**m, x), x) def replacement3206(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((S(1) - cos(d + e*x)**S(2))**(-m/S(2))*(a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p*cos(d + e*x)**m, x), x) def With3207(a, b, c, d, e, f, m, n, n2, p, x): g = FreeFactors(sin(d + e*x), x) return Dist(g**(m + S(1))/e, Subst(Int(x**(-m)*(-g**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*(a + b*(f*g*x)**n + c*(f*g*x)**(S(2)*n))**p, x), x, sin(d + e*x)/g), x) def With3208(a, b, c, d, e, f, m, n, n2, p, x): g = FreeFactors(cos(d + e*x), x) return -Dist(g**(m + S(1))/e, Subst(Int(x**(-m)*(-g**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*(a + b*(f*g*x)**n + c*(f*g*x)**(S(2)*n))**p, x), x, cos(d + e*x)/g), x) def replacement3209(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p)*(S(1)/tan(d + e*x))**m, x), x) def replacement3210(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p)*tan(d + e*x)**m, x), x) def replacement3211(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*sin(d + e*x)**n)**(-S(2)*p)*(a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*sin(d + e*x)**n)**(S(2)*p)*(S(1)/tan(d + e*x))**m, x), x) def replacement3212(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*cos(d + e*x)**n)**(-S(2)*p)*(a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p, Int((b + S(2)*c*cos(d + e*x)**n)**(S(2)*p)*tan(d + e*x)**m, x), x) def With3213(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(S(1)/tan(d + e*x), x) return -Dist(f**(m + S(1))/e, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-n*p + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**n + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + c, x)**p, x), x, S(1)/(f*tan(d + e*x))), x) def With3214(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(tan(d + e*x), x) return Dist(f**(m + S(1))/e, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-n*p + S(-1))*ExpandToSum(a*(f**S(2)*x**S(2) + S(1))**n + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + c, x)**p, x), x, tan(d + e*x)/f), x) def replacement3215(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((S(1) - sin(d + e*x)**S(2))**(m/S(2))*(a + b*sin(d + e*x)**n + c*sin(d + e*x)**(S(2)*n))**p*sin(d + e*x)**(-m), x), x) def replacement3216(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((S(1) - cos(d + e*x)**S(2))**(m/S(2))*(a + b*cos(d + e*x)**n + c*cos(d + e*x)**(S(2)*n))**p*cos(d + e*x)**(-m), x), x) def replacement3217(A, B, a, b, c, d, e, n, x): return Dist(S(4)**(-n)*c**(-n), Int((A + B*sin(d + e*x))*(b + S(2)*c*sin(d + e*x))**(S(2)*n), x), x) def replacement3218(A, B, a, b, c, d, e, n, x): return Dist(S(4)**(-n)*c**(-n), Int((A + B*cos(d + e*x))*(b + S(2)*c*cos(d + e*x))**(S(2)*n), x), x) def replacement3219(A, B, a, b, c, d, e, n, x): return Dist((b + S(2)*c*sin(d + e*x))**(-S(2)*n)*(a + b*sin(d + e*x) + c*sin(d + e*x)**S(2))**n, Int((A + B*sin(d + e*x))*(b + S(2)*c*sin(d + e*x))**(S(2)*n), x), x) def replacement3220(A, B, a, b, c, d, e, n, x): return Dist((b + S(2)*c*cos(d + e*x))**(-S(2)*n)*(a + b*cos(d + e*x) + c*cos(d + e*x)**S(2))**n, Int((A + B*cos(d + e*x))*(b + S(2)*c*cos(d + e*x))**(S(2)*n), x), x) def With3221(A, B, a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(B - (-S(2)*A*c + B*b)/q, Int(S(1)/(b + S(2)*c*sin(d + e*x) - q), x), x) + Dist(B + (-S(2)*A*c + B*b)/q, Int(S(1)/(b + S(2)*c*sin(d + e*x) + q), x), x) def With3222(A, B, a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(B - (-S(2)*A*c + B*b)/q, Int(S(1)/(b + S(2)*c*cos(d + e*x) - q), x), x) + Dist(B + (-S(2)*A*c + B*b)/q, Int(S(1)/(b + S(2)*c*cos(d + e*x) + q), x), x) def replacement3223(A, B, a, b, c, d, e, n, x): return Int(ExpandTrig((A + B*sin(d + e*x))*(a + b*sin(d + e*x) + c*sin(d + e*x)**S(2))**n, x), x) def replacement3224(A, B, a, b, c, d, e, n, x): return Int(ExpandTrig((A + B*cos(d + e*x))*(a + b*cos(d + e*x) + c*cos(d + e*x)**S(2))**n, x), x) def replacement3225(c, d, e, f, m, x): return Dist(d*m/f, Int((c + d*x)**(m + S(-1))*cos(e + f*x), x), x) - Simp((c + d*x)**m*cos(e + f*x)/f, x) def replacement3226(c, d, e, f, m, x): return -Dist(d*m/f, Int((c + d*x)**(m + S(-1))*sin(e + f*x), x), x) + Simp((c + d*x)**m*sin(e + f*x)/f, x) def replacement3227(c, d, e, f, m, x): return -Dist(f/(d*(m + S(1))), Int((c + d*x)**(m + S(1))*cos(e + f*x), x), x) + Simp((c + d*x)**(m + S(1))*sin(e + f*x)/(d*(m + S(1))), x) def replacement3228(c, d, e, f, m, x): return Dist(f/(d*(m + S(1))), Int((c + d*x)**(m + S(1))*sin(e + f*x), x), x) + Simp((c + d*x)**(m + S(1))*cos(e + f*x)/(d*(m + S(1))), x) def replacement3229(c, d, e, f, x): return Simp(SinIntegral(e + f*x)/d, x) def replacement3230(c, d, e, f, x): return Simp(CosIntegral(e + f*x)/d, x) def replacement3231(c, d, e, f, x): return Dist(sin((-c*f + d*e)/d), Int(cos(c*f/d + f*x)/(c + d*x), x), x) + Dist(cos((-c*f + d*e)/d), Int(sin(c*f/d + f*x)/(c + d*x), x), x) def replacement3232(c, d, e, f, x): return -Dist(sin((-c*f + d*e)/d), Int(sin(c*f/d + f*x)/(c + d*x), x), x) + Dist(cos((-c*f + d*e)/d), Int(cos(c*f/d + f*x)/(c + d*x), x), x) def replacement3233(c, d, e, f, x): return Dist(S(2)/d, Subst(Int(sin(f*x**S(2)/d), x), x, sqrt(c + d*x)), x) def replacement3234(c, d, e, f, x): return Dist(S(2)/d, Subst(Int(cos(f*x**S(2)/d), x), x, sqrt(c + d*x)), x) def replacement3235(c, d, e, f, x): return Dist(sin((-c*f + d*e)/d), Int(cos(c*f/d + f*x)/sqrt(c + d*x), x), x) + Dist(cos((-c*f + d*e)/d), Int(sin(c*f/d + f*x)/sqrt(c + d*x), x), x) def replacement3236(c, d, e, f, x): return -Dist(sin((-c*f + d*e)/d), Int(sin(c*f/d + f*x)/sqrt(c + d*x), x), x) + Dist(cos((-c*f + d*e)/d), Int(cos(c*f/d + f*x)/sqrt(c + d*x), x), x) def replacement3237(c, d, e, f, m, x): return Dist(I/S(2), Int((c + d*x)**m*exp(-I*(e + f*x)), x), x) - Dist(I/S(2), Int((c + d*x)**m*exp(I*(e + f*x)), x), x) def replacement3238(c, d, e, f, m, x): return Dist(S(1)/2, Int((c + d*x)**m*exp(-I*(e + f*x)), x), x) + Dist(S(1)/2, Int((c + d*x)**m*exp(I*(e + f*x)), x), x) def replacement3239(b, c, d, e, f, n, x): return Dist(b**S(2)*(n + S(-1))/n, Int((b*sin(e + f*x))**(n + S(-2))*(c + d*x), x), x) + Simp(d*(b*sin(e + f*x))**n/(f**S(2)*n**S(2)), x) - Simp(b*(b*sin(e + f*x))**(n + S(-1))*(c + d*x)*cos(e + f*x)/(f*n), x) def replacement3240(b, c, d, e, f, n, x): return Dist(b**S(2)*(n + S(-1))/n, Int((b*cos(e + f*x))**(n + S(-2))*(c + d*x), x), x) + Simp(d*(b*cos(e + f*x))**n/(f**S(2)*n**S(2)), x) + Simp(b*(b*cos(e + f*x))**(n + S(-1))*(c + d*x)*sin(e + f*x)/(f*n), x) def replacement3241(b, c, d, e, f, m, n, x): return Dist(b**S(2)*(n + S(-1))/n, Int((b*sin(e + f*x))**(n + S(-2))*(c + d*x)**m, x), x) - Dist(d**S(2)*m*(m + S(-1))/(f**S(2)*n**S(2)), Int((b*sin(e + f*x))**n*(c + d*x)**(m + S(-2)), x), x) - Simp(b*(b*sin(e + f*x))**(n + S(-1))*(c + d*x)**m*cos(e + f*x)/(f*n), x) + Simp(d*m*(b*sin(e + f*x))**n*(c + d*x)**(m + S(-1))/(f**S(2)*n**S(2)), x) def replacement3242(b, c, d, e, f, m, n, x): return Dist(b**S(2)*(n + S(-1))/n, Int((b*cos(e + f*x))**(n + S(-2))*(c + d*x)**m, x), x) - Dist(d**S(2)*m*(m + S(-1))/(f**S(2)*n**S(2)), Int((b*cos(e + f*x))**n*(c + d*x)**(m + S(-2)), x), x) + Simp(b*(b*cos(e + f*x))**(n + S(-1))*(c + d*x)**m*sin(e + f*x)/(f*n), x) + Simp(d*m*(b*cos(e + f*x))**n*(c + d*x)**(m + S(-1))/(f**S(2)*n**S(2)), x) def replacement3243(c, d, e, f, m, n, x): return Int(ExpandTrigReduce((c + d*x)**m, sin(e + f*x)**n, x), x) def replacement3244(c, d, e, f, m, n, x): return Int(ExpandTrigReduce((c + d*x)**m, cos(e + f*x)**n, x), x) def replacement3245(c, d, e, f, m, n, x): return -Dist(f*n/(d*(m + S(1))), Int(ExpandTrigReduce((c + d*x)**(m + S(1)), sin(e + f*x)**(n + S(-1))*cos(e + f*x), x), x), x) + Simp((c + d*x)**(m + S(1))*sin(e + f*x)**n/(d*(m + S(1))), x) def replacement3246(c, d, e, f, m, n, x): return Dist(f*n/(d*(m + S(1))), Int(ExpandTrigReduce((c + d*x)**(m + S(1)), sin(e + f*x)*cos(e + f*x)**(n + S(-1)), x), x), x) + Simp((c + d*x)**(m + S(1))*cos(e + f*x)**n/(d*(m + S(1))), x) def replacement3247(b, c, d, e, f, m, n, x): return -Dist(f**S(2)*n**S(2)/(d**S(2)*(m + S(1))*(m + S(2))), Int((b*sin(e + f*x))**n*(c + d*x)**(m + S(2)), x), x) + Dist(b**S(2)*f**S(2)*n*(n + S(-1))/(d**S(2)*(m + S(1))*(m + S(2))), Int((b*sin(e + f*x))**(n + S(-2))*(c + d*x)**(m + S(2)), x), x) + Simp((b*sin(e + f*x))**n*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) - Simp(b*f*n*(b*sin(e + f*x))**(n + S(-1))*(c + d*x)**(m + S(2))*cos(e + f*x)/(d**S(2)*(m + S(1))*(m + S(2))), x) def replacement3248(b, c, d, e, f, m, n, x): return -Dist(f**S(2)*n**S(2)/(d**S(2)*(m + S(1))*(m + S(2))), Int((b*cos(e + f*x))**n*(c + d*x)**(m + S(2)), x), x) + Dist(b**S(2)*f**S(2)*n*(n + S(-1))/(d**S(2)*(m + S(1))*(m + S(2))), Int((b*cos(e + f*x))**(n + S(-2))*(c + d*x)**(m + S(2)), x), x) + Simp((b*cos(e + f*x))**n*(c + d*x)**(m + S(1))/(d*(m + S(1))), x) + Simp(b*f*n*(b*cos(e + f*x))**(n + S(-1))*(c + d*x)**(m + S(2))*sin(e + f*x)/(d**S(2)*(m + S(1))*(m + S(2))), x) def replacement3249(b, c, d, e, f, n, x): return Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*sin(e + f*x))**(n + S(2))*(c + d*x), x), x) - Simp(d*(b*sin(e + f*x))**(n + S(2))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), x) + Simp((b*sin(e + f*x))**(n + S(1))*(c + d*x)*cos(e + f*x)/(b*f*(n + S(1))), x) def replacement3250(b, c, d, e, f, n, x): return Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*cos(e + f*x))**(n + S(2))*(c + d*x), x), x) - Simp(d*(b*cos(e + f*x))**(n + S(2))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), x) - Simp((b*cos(e + f*x))**(n + S(1))*(c + d*x)*sin(e + f*x)/(b*f*(n + S(1))), x) def replacement3251(b, c, d, e, f, m, n, x): return Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*sin(e + f*x))**(n + S(2))*(c + d*x)**m, x), x) + Dist(d**S(2)*m*(m + S(-1))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), Int((b*sin(e + f*x))**(n + S(2))*(c + d*x)**(m + S(-2)), x), x) + Simp((b*sin(e + f*x))**(n + S(1))*(c + d*x)**m*cos(e + f*x)/(b*f*(n + S(1))), x) - Simp(d*m*(b*sin(e + f*x))**(n + S(2))*(c + d*x)**(m + S(-1))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), x) def replacement3252(b, c, d, e, f, m, n, x): return Dist((n + S(2))/(b**S(2)*(n + S(1))), Int((b*cos(e + f*x))**(n + S(2))*(c + d*x)**m, x), x) + Dist(d**S(2)*m*(m + S(-1))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), Int((b*cos(e + f*x))**(n + S(2))*(c + d*x)**(m + S(-2)), x), x) - Simp((b*cos(e + f*x))**(n + S(1))*(c + d*x)**m*sin(e + f*x)/(b*f*(n + S(1))), x) - Simp(d*m*(b*cos(e + f*x))**(n + S(2))*(c + d*x)**(m + S(-1))/(b**S(2)*f**S(2)*(n + S(1))*(n + S(2))), x) def replacement3253(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b*sin(e + f*x))**n, x), x) def replacement3254(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b*cos(e + f*x))**n, x), x) def replacement3255(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**n, Int((c + d*x)**m*cos(-Pi*a/(S(4)*b) + e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement3256(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**IntPart(n)*(a + b*sin(e + f*x))**FracPart(n)*cos(-Pi*a/(S(4)*b) + e/S(2) + f*x/S(2))**(-S(2)*FracPart(n)), Int((c + d*x)**m*cos(-Pi*a/(S(4)*b) + e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement3257(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**n, Int((c + d*x)**m*cos(e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement3258(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**n, Int((c + d*x)**m*sin(e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement3259(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**IntPart(n)*(a + b*cos(e + f*x))**FracPart(n)*cos(e/S(2) + f*x/S(2))**(-S(2)*FracPart(n)), Int((c + d*x)**m*cos(e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement3260(a, b, c, d, e, f, m, n, x): return Dist((S(2)*a)**IntPart(n)*(a + b*cos(e + f*x))**FracPart(n)*sin(e/S(2) + f*x/S(2))**(-S(2)*FracPart(n)), Int((c + d*x)**m*sin(e/S(2) + f*x/S(2))**(S(2)*n), x), x) def replacement3261(a, b, c, d, e, f, m, x): return Dist(S(2), Int((c + d*x)**m*exp(I*(e + f*x))/(S(2)*a*exp(I*(e + f*x)) - I*b*exp(S(2)*I*(e + f*x)) + I*b), x), x) def replacement3262(a, b, c, d, e, f, m, x): return Dist(S(2), Int((c + d*x)**m*exp(I*(e + f*x))/(S(2)*a*exp(I*(e + f*x)) + b*exp(S(2)*I*(e + f*x)) + b), x), x) def replacement3263(a, b, c, d, e, f, m, x): return Dist(a/(a**S(2) - b**S(2)), Int((c + d*x)**m/(a + b*sin(e + f*x)), x), x) - Dist(b*d*m/(f*(a**S(2) - b**S(2))), Int((c + d*x)**(m + S(-1))*cos(e + f*x)/(a + b*sin(e + f*x)), x), x) + Simp(b*(c + d*x)**m*cos(e + f*x)/(f*(a + b*sin(e + f*x))*(a**S(2) - b**S(2))), x) def replacement3264(a, b, c, d, e, f, m, x): return Dist(a/(a**S(2) - b**S(2)), Int((c + d*x)**m/(a + b*cos(e + f*x)), x), x) + Dist(b*d*m/(f*(a**S(2) - b**S(2))), Int((c + d*x)**(m + S(-1))*sin(e + f*x)/(a + b*cos(e + f*x)), x), x) - Simp(b*(c + d*x)**m*sin(e + f*x)/(f*(a + b*cos(e + f*x))*(a**S(2) - b**S(2))), x) def replacement3265(a, b, c, d, e, f, m, n, x): return Dist(a/(a**S(2) - b**S(2)), Int((a + b*sin(e + f*x))**(n + S(1))*(c + d*x)**m, x), x) - Dist(b*(n + S(2))/((a**S(2) - b**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**(n + S(1))*(c + d*x)**m*sin(e + f*x), x), x) + Dist(b*d*m/(f*(a**S(2) - b**S(2))*(n + S(1))), Int((a + b*sin(e + f*x))**(n + S(1))*(c + d*x)**(m + S(-1))*cos(e + f*x), x), x) - Simp(b*(a + b*sin(e + f*x))**(n + S(1))*(c + d*x)**m*cos(e + f*x)/(f*(a**S(2) - b**S(2))*(n + S(1))), x) def replacement3266(a, b, c, d, e, f, m, n, x): return Dist(a/(a**S(2) - b**S(2)), Int((a + b*cos(e + f*x))**(n + S(1))*(c + d*x)**m, x), x) - Dist(b*(n + S(2))/((a**S(2) - b**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**(n + S(1))*(c + d*x)**m*cos(e + f*x), x), x) - Dist(b*d*m/(f*(a**S(2) - b**S(2))*(n + S(1))), Int((a + b*cos(e + f*x))**(n + S(1))*(c + d*x)**(m + S(-1))*sin(e + f*x), x), x) + Simp(b*(a + b*cos(e + f*x))**(n + S(1))*(c + d*x)**m*sin(e + f*x)/(f*(a**S(2) - b**S(2))*(n + S(1))), x) def replacement3267(a, b, m, n, u, v, x): return Int((a + b*sin(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement3268(a, b, m, n, u, v, x): return Int((a + b*cos(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement3269(a, b, c, d, e, f, m, n, x): return Int((a + b*sin(e + f*x))**n*(c + d*x)**m, x) def replacement3270(a, b, c, d, e, f, m, n, x): return Int((a + b*cos(e + f*x))**n*(c + d*x)**m, x) def replacement3271(a, b, c, d, n, p, x): return Int(ExpandIntegrand(sin(c + d*x), (a + b*x**n)**p, x), x) def replacement3272(a, b, c, d, n, p, x): return Int(ExpandIntegrand(cos(c + d*x), (a + b*x**n)**p, x), x) def replacement3273(a, b, c, d, n, p, x): return -Dist(d/(b*n*(p + S(1))), Int(x**(S(1) - n)*(a + b*x**n)**(p + S(1))*cos(c + d*x), x), x) - Dist((S(1) - n)/(b*n*(p + S(1))), Int(x**(-n)*(a + b*x**n)**(p + S(1))*sin(c + d*x), x), x) + Simp(x**(S(1) - n)*(a + b*x**n)**(p + S(1))*sin(c + d*x)/(b*n*(p + S(1))), x) def replacement3274(a, b, c, d, n, p, x): return Dist(d/(b*n*(p + S(1))), Int(x**(S(1) - n)*(a + b*x**n)**(p + S(1))*sin(c + d*x), x), x) - Dist((S(1) - n)/(b*n*(p + S(1))), Int(x**(-n)*(a + b*x**n)**(p + S(1))*cos(c + d*x), x), x) + Simp(x**(S(1) - n)*(a + b*x**n)**(p + S(1))*cos(c + d*x)/(b*n*(p + S(1))), x) def replacement3275(a, b, c, d, n, p, x): return Int(ExpandIntegrand(sin(c + d*x), (a + b*x**n)**p, x), x) def replacement3276(a, b, c, d, n, p, x): return Int(ExpandIntegrand(cos(c + d*x), (a + b*x**n)**p, x), x) def replacement3277(a, b, c, d, n, p, x): return Int(x**(n*p)*(a*x**(-n) + b)**p*sin(c + d*x), x) def replacement3278(a, b, c, d, n, p, x): return Int(x**(n*p)*(a*x**(-n) + b)**p*cos(c + d*x), x) def replacement3279(a, b, c, d, n, p, x): return Int((a + b*x**n)**p*sin(c + d*x), x) def replacement3280(a, b, c, d, n, p, x): return Int((a + b*x**n)**p*cos(c + d*x), x) def replacement3281(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(sin(c + d*x), (e*x)**m*(a + b*x**n)**p, x), x) def replacement3282(a, b, c, d, e, m, n, p, x): return Int(ExpandIntegrand(cos(c + d*x), (e*x)**m*(a + b*x**n)**p, x), x) def replacement3283(a, b, c, d, e, m, n, p, x): return -Dist(d*e**m/(b*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*cos(c + d*x), x), x) + Simp(e**m*(a + b*x**n)**(p + S(1))*sin(c + d*x)/(b*n*(p + S(1))), x) def replacement3284(a, b, c, d, e, m, n, p, x): return Dist(d*e**m/(b*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*sin(c + d*x), x), x) + Simp(e**m*(a + b*x**n)**(p + S(1))*cos(c + d*x)/(b*n*(p + S(1))), x) def replacement3285(a, b, c, d, m, n, p, x): return -Dist(d/(b*n*(p + S(1))), Int(x**(m - n + S(1))*(a + b*x**n)**(p + S(1))*cos(c + d*x), x), x) - Dist((m - n + S(1))/(b*n*(p + S(1))), Int(x**(m - n)*(a + b*x**n)**(p + S(1))*sin(c + d*x), x), x) + Simp(x**(m - n + S(1))*(a + b*x**n)**(p + S(1))*sin(c + d*x)/(b*n*(p + S(1))), x) def replacement3286(a, b, c, d, m, n, p, x): return Dist(d/(b*n*(p + S(1))), Int(x**(m - n + S(1))*(a + b*x**n)**(p + S(1))*sin(c + d*x), x), x) - Dist((m - n + S(1))/(b*n*(p + S(1))), Int(x**(m - n)*(a + b*x**n)**(p + S(1))*cos(c + d*x), x), x) + Simp(x**(m - n + S(1))*(a + b*x**n)**(p + S(1))*cos(c + d*x)/(b*n*(p + S(1))), x) def replacement3287(a, b, c, d, m, n, p, x): return Int(ExpandIntegrand(sin(c + d*x), x**m*(a + b*x**n)**p, x), x) def replacement3288(a, b, c, d, m, n, p, x): return Int(ExpandIntegrand(cos(c + d*x), x**m*(a + b*x**n)**p, x), x) def replacement3289(a, b, c, d, m, n, p, x): return Int(x**(m + n*p)*(a*x**(-n) + b)**p*sin(c + d*x), x) def replacement3290(a, b, c, d, m, n, p, x): return Int(x**(m + n*p)*(a*x**(-n) + b)**p*cos(c + d*x), x) def replacement3291(a, b, c, d, e, m, n, p, x): return Int((e*x)**m*(a + b*x**n)**p*sin(c + d*x), x) def replacement3292(a, b, c, d, e, m, n, p, x): return Int((e*x)**m*(a + b*x**n)**p*cos(c + d*x), x) def replacement3293(d, x): return Simp(sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*x*sqrt(S(1)/Pi)*Rt(d, S(2)))/(S(2)*Rt(d, S(2))), x) def replacement3294(d, x): return Simp(sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*x*sqrt(S(1)/Pi)*Rt(d, S(2)))/(S(2)*Rt(d, S(2))), x) def replacement3295(c, d, x): return Dist(sin(c), Int(cos(d*x**S(2)), x), x) + Dist(cos(c), Int(sin(d*x**S(2)), x), x) def replacement3296(c, d, x): return -Dist(sin(c), Int(sin(d*x**S(2)), x), x) + Dist(cos(c), Int(cos(d*x**S(2)), x), x) def replacement3297(c, d, n, x): return Dist(I/S(2), Int(exp(-I*c - I*d*x**n), x), x) - Dist(I/S(2), Int(exp(I*c + I*d*x**n), x), x) def replacement3298(c, d, n, x): return Dist(S(1)/2, Int(exp(-I*c - I*d*x**n), x), x) + Dist(S(1)/2, Int(exp(I*c + I*d*x**n), x), x) def replacement3299(a, b, c, d, n, p, x): return Int(ExpandTrigReduce((a + b*sin(c + d*x**n))**p, x), x) def replacement3300(a, b, c, d, n, p, x): return Int(ExpandTrigReduce((a + b*cos(c + d*x**n))**p, x), x) def replacement3301(a, b, c, d, n, p, x): return -Subst(Int((a + b*sin(c + d*x**(-n)))**p/x**S(2), x), x, S(1)/x) def replacement3302(a, b, c, d, n, p, x): return -Subst(Int((a + b*cos(c + d*x**(-n)))**p/x**S(2), x), x, S(1)/x) def With3303(a, b, c, d, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k + S(-1))*(a + b*sin(c + d*x**(k*n)))**p, x), x, x**(S(1)/k)), x) def With3304(a, b, c, d, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k + S(-1))*(a + b*cos(c + d*x**(k*n)))**p, x), x, x**(S(1)/k)), x) def replacement3305(c, d, n, x): return Dist(I/S(2), Int(exp(-I*c - I*d*x**n), x), x) - Dist(I/S(2), Int(exp(I*c + I*d*x**n), x), x) def replacement3306(c, d, n, x): return Dist(S(1)/2, Int(exp(-I*c - I*d*x**n), x), x) + Dist(S(1)/2, Int(exp(I*c + I*d*x**n), x), x) def replacement3307(a, b, c, d, n, p, x): return Int(ExpandTrigReduce((a + b*sin(c + d*x**n))**p, x), x) def replacement3308(a, b, c, d, n, p, x): return Int(ExpandTrigReduce((a + b*cos(c + d*x**n))**p, x), x) def replacement3309(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*sin(c + d*x**n))**p, x), x, u), x) def replacement3310(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*cos(c + d*x**n))**p, x), x, u), x) def replacement3311(a, b, c, d, n, p, u, x): return Int((a + b*sin(c + d*u**n))**p, x) def replacement3312(a, b, c, d, n, p, u, x): return Int((a + b*cos(c + d*u**n))**p, x) def replacement3313(a, b, p, u, x): return Int((a + b*sin(ExpandToSum(u, x)))**p, x) def replacement3314(a, b, p, u, x): return Int((a + b*cos(ExpandToSum(u, x)))**p, x) def replacement3315(d, n, x): return Simp(SinIntegral(d*x**n)/n, x) def replacement3316(d, n, x): return Simp(CosIntegral(d*x**n)/n, x) def replacement3317(c, d, n, x): return Dist(sin(c), Int(cos(d*x**n)/x, x), x) + Dist(cos(c), Int(sin(d*x**n)/x, x), x) def replacement3318(c, d, n, x): return -Dist(sin(c), Int(sin(d*x**n)/x, x), x) + Dist(cos(c), Int(cos(d*x**n)/x, x), x) def With3319(a, b, c, d, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False mn = (m + S(1))/n if And(IntegerQ(mn), Or(Equal(p, S(1)), Greater(mn, S(0)))): return True return False def replacement3319(a, b, c, d, m, n, p, x): mn = (m + S(1))/n return Dist(S(1)/n, Subst(Int(x**(mn + S(-1))*(a + b*sin(c + d*x))**p, x), x, x**n), x) def With3320(a, b, c, d, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False mn = (m + S(1))/n if And(IntegerQ(mn), Or(Equal(p, S(1)), Greater(mn, S(0)))): return True return False def replacement3320(a, b, c, d, m, n, p, x): mn = (m + S(1))/n return Dist(S(1)/n, Subst(Int(x**(mn + S(-1))*(a + b*cos(c + d*x))**p, x), x, x**n), x) def With3321(a, b, c, d, e, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False mn = (m + S(1))/n if And(IntegerQ(mn), Or(Equal(p, S(1)), Greater(mn, S(0)))): return True return False def replacement3321(a, b, c, d, e, m, n, p, x): mn = (m + S(1))/n return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*sin(c + d*x**n))**p, x), x) def With3322(a, b, c, d, e, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False mn = (m + S(1))/n if And(IntegerQ(mn), Or(Equal(p, S(1)), Greater(mn, S(0)))): return True return False def replacement3322(a, b, c, d, e, m, n, p, x): mn = (m + S(1))/n return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*cos(c + d*x**n))**p, x), x) def replacement3323(a, b, m, n, x): return Dist(S(2)/n, Subst(Int(sin(a + b*x**S(2)), x), x, x**(n/S(2))), x) def replacement3324(a, b, m, n, x): return Dist(S(2)/n, Subst(Int(cos(a + b*x**S(2)), x), x, x**(n/S(2))), x) def replacement3325(c, d, e, m, n, x): return Dist(e**n*(m - n + S(1))/(d*n), Int((e*x)**(m - n)*cos(c + d*x**n), x), x) - Simp(e**(n + S(-1))*(e*x)**(m - n + S(1))*cos(c + d*x**n)/(d*n), x) def replacement3326(c, d, e, m, n, x): return -Dist(e**n*(m - n + S(1))/(d*n), Int((e*x)**(m - n)*sin(c + d*x**n), x), x) + Simp(e**(n + S(-1))*(e*x)**(m - n + S(1))*sin(c + d*x**n)/(d*n), x) def replacement3327(c, d, e, m, n, x): return -Dist(d*e**(-n)*n/(m + S(1)), Int((e*x)**(m + n)*cos(c + d*x**n), x), x) + Simp((e*x)**(m + S(1))*sin(c + d*x**n)/(e*(m + S(1))), x) def replacement3328(c, d, e, m, n, x): return Dist(d*e**(-n)*n/(m + S(1)), Int((e*x)**(m + n)*sin(c + d*x**n), x), x) + Simp((e*x)**(m + S(1))*cos(c + d*x**n)/(e*(m + S(1))), x) def replacement3329(c, d, e, m, n, x): return Dist(I/S(2), Int((e*x)**m*exp(-I*c - I*d*x**n), x), x) - Dist(I/S(2), Int((e*x)**m*exp(I*c + I*d*x**n), x), x) def replacement3330(c, d, e, m, n, x): return Dist(S(1)/2, Int((e*x)**m*exp(-I*c - I*d*x**n), x), x) + Dist(S(1)/2, Int((e*x)**m*exp(I*c + I*d*x**n), x), x) def replacement3331(a, b, m, n, p, x): return Dist(b*n*p/(n + S(-1)), Int(sin(a + b*x**n)**(p + S(-1))*cos(a + b*x**n), x), x) - Simp(x**(S(1) - n)*sin(a + b*x**n)**p/(n + S(-1)), x) def replacement3332(a, b, m, n, p, x): return -Dist(b*n*p/(n + S(-1)), Int(sin(a + b*x**n)*cos(a + b*x**n)**(p + S(-1)), x), x) - Simp(x**(S(1) - n)*cos(a + b*x**n)**p/(n + S(-1)), x) def replacement3333(a, b, m, n, p, x): return Dist((p + S(-1))/p, Int(x**m*sin(a + b*x**n)**(p + S(-2)), x), x) + Simp(sin(a + b*x**n)**p/(b**S(2)*n*p**S(2)), x) - Simp(x**n*sin(a + b*x**n)**(p + S(-1))*cos(a + b*x**n)/(b*n*p), x) def replacement3334(a, b, m, n, p, x): return Dist((p + S(-1))/p, Int(x**m*cos(a + b*x**n)**(p + S(-2)), x), x) + Simp(cos(a + b*x**n)**p/(b**S(2)*n*p**S(2)), x) + Simp(x**n*sin(a + b*x**n)*cos(a + b*x**n)**(p + S(-1))/(b*n*p), x) def replacement3335(a, b, m, n, p, x): return Dist((p + S(-1))/p, Int(x**m*sin(a + b*x**n)**(p + S(-2)), x), x) - Dist((m - S(2)*n + S(1))*(m - n + S(1))/(b**S(2)*n**S(2)*p**S(2)), Int(x**(m - S(2)*n)*sin(a + b*x**n)**p, x), x) + Simp(x**(m - S(2)*n + S(1))*(m - n + S(1))*sin(a + b*x**n)**p/(b**S(2)*n**S(2)*p**S(2)), x) - Simp(x**(m - n + S(1))*sin(a + b*x**n)**(p + S(-1))*cos(a + b*x**n)/(b*n*p), x) def replacement3336(a, b, m, n, p, x): return Dist((p + S(-1))/p, Int(x**m*cos(a + b*x**n)**(p + S(-2)), x), x) - Dist((m - S(2)*n + S(1))*(m - n + S(1))/(b**S(2)*n**S(2)*p**S(2)), Int(x**(m - S(2)*n)*cos(a + b*x**n)**p, x), x) + Simp(x**(m - S(2)*n + S(1))*(m - n + S(1))*cos(a + b*x**n)**p/(b**S(2)*n**S(2)*p**S(2)), x) + Simp(x**(m - n + S(1))*sin(a + b*x**n)*cos(a + b*x**n)**(p + S(-1))/(b*n*p), x) def replacement3337(a, b, m, n, p, x): return -Dist(b**S(2)*n**S(2)*p**S(2)/((m + S(1))*(m + n + S(1))), Int(x**(m + S(2)*n)*sin(a + b*x**n)**p, x), x) + Dist(b**S(2)*n**S(2)*p*(p + S(-1))/((m + S(1))*(m + n + S(1))), Int(x**(m + S(2)*n)*sin(a + b*x**n)**(p + S(-2)), x), x) + Simp(x**(m + S(1))*sin(a + b*x**n)**p/(m + S(1)), x) - Simp(b*n*p*x**(m + n + S(1))*sin(a + b*x**n)**(p + S(-1))*cos(a + b*x**n)/((m + S(1))*(m + n + S(1))), x) def replacement3338(a, b, m, n, p, x): return -Dist(b**S(2)*n**S(2)*p**S(2)/((m + S(1))*(m + n + S(1))), Int(x**(m + S(2)*n)*cos(a + b*x**n)**p, x), x) + Dist(b**S(2)*n**S(2)*p*(p + S(-1))/((m + S(1))*(m + n + S(1))), Int(x**(m + S(2)*n)*cos(a + b*x**n)**(p + S(-2)), x), x) + Simp(x**(m + S(1))*cos(a + b*x**n)**p/(m + S(1)), x) + Simp(b*n*p*x**(m + n + S(1))*sin(a + b*x**n)*cos(a + b*x**n)**(p + S(-1))/((m + S(1))*(m + n + S(1))), x) def With3339(a, b, c, d, e, m, n, p, x): k = Denominator(m) return Dist(k/e, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*sin(c + d*e**(-n)*x**(k*n)))**p, x), x, (e*x)**(S(1)/k)), x) def With3340(a, b, c, d, e, m, n, p, x): k = Denominator(m) return Dist(k/e, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*cos(c + d*e**(-n)*x**(k*n)))**p, x), x, (e*x)**(S(1)/k)), x) def replacement3341(a, b, c, d, e, m, n, p, x): return Int(ExpandTrigReduce((e*x)**m, (a + b*sin(c + d*x**n))**p, x), x) def replacement3342(a, b, c, d, e, m, n, p, x): return Int(ExpandTrigReduce((e*x)**m, (a + b*cos(c + d*x**n))**p, x), x) def replacement3343(a, b, m, n, p, x): return Dist((p + S(2))/(p + S(1)), Int(x**m*sin(a + b*x**n)**(p + S(2)), x), x) - Simp(sin(a + b*x**n)**(p + S(2))/(b**S(2)*n*(p + S(1))*(p + S(2))), x) + Simp(x**n*sin(a + b*x**n)**(p + S(1))*cos(a + b*x**n)/(b*n*(p + S(1))), x) def replacement3344(a, b, m, n, p, x): return Dist((p + S(2))/(p + S(1)), Int(x**m*cos(a + b*x**n)**(p + S(2)), x), x) - Simp(cos(a + b*x**n)**(p + S(2))/(b**S(2)*n*(p + S(1))*(p + S(2))), x) - Simp(x**n*sin(a + b*x**n)*cos(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement3345(a, b, m, n, p, x): return Dist((p + S(2))/(p + S(1)), Int(x**m*sin(a + b*x**n)**(p + S(2)), x), x) + Dist((m - S(2)*n + S(1))*(m - n + S(1))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(x**(m - S(2)*n)*sin(a + b*x**n)**(p + S(2)), x), x) + Simp(x**(m - n + S(1))*sin(a + b*x**n)**(p + S(1))*cos(a + b*x**n)/(b*n*(p + S(1))), x) - Simp(x**(m - S(2)*n + S(1))*(m - n + S(1))*sin(a + b*x**n)**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) def replacement3346(a, b, m, n, p, x): return Dist((p + S(2))/(p + S(1)), Int(x**m*cos(a + b*x**n)**(p + S(2)), x), x) + Dist((m - S(2)*n + S(1))*(m - n + S(1))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(x**(m - S(2)*n)*cos(a + b*x**n)**(p + S(2)), x), x) - Simp(x**(m - n + S(1))*sin(a + b*x**n)*cos(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) - Simp(x**(m - S(2)*n + S(1))*(m - n + S(1))*cos(a + b*x**n)**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) def replacement3347(a, b, c, d, m, n, p, x): return -Subst(Int(x**(-m + S(-2))*(a + b*sin(c + d*x**(-n)))**p, x), x, S(1)/x) def replacement3348(a, b, c, d, m, n, p, x): return -Subst(Int(x**(-m + S(-2))*(a + b*cos(c + d*x**(-n)))**p, x), x, S(1)/x) def With3349(a, b, c, d, e, m, n, p, x): k = Denominator(m) return -Dist(k/e, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a + b*sin(c + d*e**(-n)*x**(-k*n)))**p, x), x, (e*x)**(-S(1)/k)), x) def With3350(a, b, c, d, e, m, n, p, x): k = Denominator(m) return -Dist(k/e, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a + b*cos(c + d*e**(-n)*x**(-k*n)))**p, x), x, (e*x)**(-S(1)/k)), x) def replacement3351(a, b, c, d, e, m, n, p, x): return -Dist((e*x)**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(a + b*sin(c + d*x**(-n)))**p, x), x, S(1)/x), x) def replacement3352(a, b, c, d, e, m, n, p, x): return -Dist((e*x)**m*(S(1)/x)**m, Subst(Int(x**(-m + S(-2))*(a + b*cos(c + d*x**(-n)))**p, x), x, S(1)/x), x) def With3353(a, b, c, d, m, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*sin(c + d*x**(k*n)))**p, x), x, x**(S(1)/k)), x) def With3354(a, b, c, d, m, n, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*cos(c + d*x**(k*n)))**p, x), x, x**(S(1)/k)), x) def replacement3355(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*sin(c + d*x**n))**p, x), x) def replacement3356(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*cos(c + d*x**n))**p, x), x) def replacement3357(a, b, c, d, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*sin(c + d*x**(n/(m + S(1)))))**p, x), x, x**(m + S(1))), x) def replacement3358(a, b, c, d, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*cos(c + d*x**(n/(m + S(1)))))**p, x), x, x**(m + S(1))), x) def replacement3359(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*sin(c + d*x**n))**p, x), x) def replacement3360(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b*cos(c + d*x**n))**p, x), x) def replacement3361(c, d, e, m, n, x): return Dist(I/S(2), Int((e*x)**m*exp(-I*c - I*d*x**n), x), x) - Dist(I/S(2), Int((e*x)**m*exp(I*c + I*d*x**n), x), x) def replacement3362(c, d, e, m, n, x): return Dist(S(1)/2, Int((e*x)**m*exp(-I*c - I*d*x**n), x), x) + Dist(S(1)/2, Int((e*x)**m*exp(I*c + I*d*x**n), x), x) def replacement3363(a, b, c, d, e, m, n, p, x): return Int(ExpandTrigReduce((e*x)**m, (a + b*sin(c + d*x**n))**p, x), x) def replacement3364(a, b, c, d, e, m, n, p, x): return Int(ExpandTrigReduce((e*x)**m, (a + b*cos(c + d*x**n))**p, x), x) def replacement3365(a, b, c, d, m, n, p, u, x): return Dist(Coefficient(u, x, S(1))**(-m + S(-1)), Subst(Int((a + b*sin(c + d*x**n))**p*(x - Coefficient(u, x, S(0)))**m, x), x, u), x) def replacement3366(a, b, c, d, m, n, p, u, x): return Dist(Coefficient(u, x, S(1))**(-m + S(-1)), Subst(Int((a + b*cos(c + d*x**n))**p*(x - Coefficient(u, x, S(0)))**m, x), x, u), x) def replacement3367(a, b, c, d, e, m, n, p, u, x): return Int((e*x)**m*(a + b*sin(c + d*u**n))**p, x) def replacement3368(a, b, c, d, e, m, n, p, u, x): return Int((e*x)**m*(a + b*cos(c + d*u**n))**p, x) def replacement3369(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b*sin(ExpandToSum(u, x)))**p, x) def replacement3370(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b*cos(ExpandToSum(u, x)))**p, x) def replacement3371(a, b, m, n, p, x): return Simp(sin(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement3372(a, b, m, n, p, x): return -Simp(cos(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement3373(a, b, m, n, p, x): return -Dist((m - n + S(1))/(b*n*(p + S(1))), Int(x**(m - n)*sin(a + b*x**n)**(p + S(1)), x), x) + Simp(x**(m - n + S(1))*sin(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement3374(a, b, m, n, p, x): return Dist((m - n + S(1))/(b*n*(p + S(1))), Int(x**(m - n)*cos(a + b*x**n)**(p + S(1)), x), x) - Simp(x**(m - n + S(1))*cos(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement3375(a, b, c, x): return Int(sin((b + S(2)*c*x)**S(2)/(S(4)*c)), x) def replacement3376(a, b, c, x): return Int(cos((b + S(2)*c*x)**S(2)/(S(4)*c)), x) def replacement3377(a, b, c, x): return -Dist(sin((-S(4)*a*c + b**S(2))/(S(4)*c)), Int(cos((b + S(2)*c*x)**S(2)/(S(4)*c)), x), x) + Dist(cos((-S(4)*a*c + b**S(2))/(S(4)*c)), Int(sin((b + S(2)*c*x)**S(2)/(S(4)*c)), x), x) def replacement3378(a, b, c, x): return Dist(sin((-S(4)*a*c + b**S(2))/(S(4)*c)), Int(sin((b + S(2)*c*x)**S(2)/(S(4)*c)), x), x) + Dist(cos((-S(4)*a*c + b**S(2))/(S(4)*c)), Int(cos((b + S(2)*c*x)**S(2)/(S(4)*c)), x), x) def replacement3379(a, b, c, n, x): return Int(ExpandTrigReduce(sin(a + b*x + c*x**S(2))**n, x), x) def replacement3380(a, b, c, n, x): return Int(ExpandTrigReduce(cos(a + b*x + c*x**S(2))**n, x), x) def replacement3381(n, v, x): return Int(sin(ExpandToSum(v, x))**n, x) def replacement3382(n, v, x): return Int(cos(ExpandToSum(v, x))**n, x) def replacement3383(a, b, c, d, e, x): return -Simp(e*cos(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement3384(a, b, c, d, e, x): return Simp(e*sin(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement3385(a, b, c, d, e, x): return Dist((-b*e + S(2)*c*d)/(S(2)*c), Int(sin(a + b*x + c*x**S(2)), x), x) - Simp(e*cos(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement3386(a, b, c, d, e, x): return Dist((-b*e + S(2)*c*d)/(S(2)*c), Int(cos(a + b*x + c*x**S(2)), x), x) + Simp(e*sin(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement3387(a, b, c, d, e, m, x): return Dist(e**S(2)*(m + S(-1))/(S(2)*c), Int((d + e*x)**(m + S(-2))*cos(a + b*x + c*x**S(2)), x), x) - Simp(e*(d + e*x)**(m + S(-1))*cos(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement3388(a, b, c, d, e, m, x): return -Dist(e**S(2)*(m + S(-1))/(S(2)*c), Int((d + e*x)**(m + S(-2))*sin(a + b*x + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(-1))*sin(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement3389(a, b, c, d, e, m, x): return -Dist((b*e - S(2)*c*d)/(S(2)*c), Int((d + e*x)**(m + S(-1))*sin(a + b*x + c*x**S(2)), x), x) + Dist(e**S(2)*(m + S(-1))/(S(2)*c), Int((d + e*x)**(m + S(-2))*cos(a + b*x + c*x**S(2)), x), x) - Simp(e*(d + e*x)**(m + S(-1))*cos(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement3390(a, b, c, d, e, m, x): return -Dist((b*e - S(2)*c*d)/(S(2)*c), Int((d + e*x)**(m + S(-1))*cos(a + b*x + c*x**S(2)), x), x) - Dist(e**S(2)*(m + S(-1))/(S(2)*c), Int((d + e*x)**(m + S(-2))*sin(a + b*x + c*x**S(2)), x), x) + Simp(e*(d + e*x)**(m + S(-1))*sin(a + b*x + c*x**S(2))/(S(2)*c), x) def replacement3391(a, b, c, d, e, m, x): return -Dist(S(2)*c/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(2))*cos(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*sin(a + b*x + c*x**S(2))/(e*(m + S(1))), x) def replacement3392(a, b, c, d, e, m, x): return Dist(S(2)*c/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(2))*sin(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*cos(a + b*x + c*x**S(2))/(e*(m + S(1))), x) def replacement3393(a, b, c, d, e, m, x): return -Dist(S(2)*c/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(2))*cos(a + b*x + c*x**S(2)), x), x) - Dist((b*e - S(2)*c*d)/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(1))*cos(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*sin(a + b*x + c*x**S(2))/(e*(m + S(1))), x) def replacement3394(a, b, c, d, e, m, x): return Dist(S(2)*c/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(2))*sin(a + b*x + c*x**S(2)), x), x) + Dist((b*e - S(2)*c*d)/(e**S(2)*(m + S(1))), Int((d + e*x)**(m + S(1))*sin(a + b*x + c*x**S(2)), x), x) + Simp((d + e*x)**(m + S(1))*cos(a + b*x + c*x**S(2))/(e*(m + S(1))), x) def replacement3395(a, b, c, d, e, m, x): return Int((d + e*x)**m*sin(a + b*x + c*x**S(2)), x) def replacement3396(a, b, c, d, e, m, x): return Int((d + e*x)**m*cos(a + b*x + c*x**S(2)), x) def replacement3397(a, b, c, d, e, m, n, x): return Int(ExpandTrigReduce((d + e*x)**m, sin(a + b*x + c*x**S(2))**n, x), x) def replacement3398(a, b, c, d, e, m, n, x): return Int(ExpandTrigReduce((d + e*x)**m, cos(a + b*x + c*x**S(2))**n, x), x) def replacement3399(m, n, u, v, x): return Int(ExpandToSum(u, x)**m*sin(ExpandToSum(v, x))**n, x) def replacement3400(m, n, u, v, x): return Int(ExpandToSum(u, x)**m*cos(ExpandToSum(v, x))**n, x)
5777be5aaf1b2b0fa9c4e862dbe2bd0ece40d5c4e4649180e02f4a0578ca29f6
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def logarithms(): from sympy.integrals.rubi.constraints import cons1158, cons8, cons29, cons50, cons127, cons5, cons52, cons89, cons90, cons2, cons3, cons1159, cons417, cons1160, cons1161, cons91, cons545, cons1162, cons210, cons211, cons586, cons4, cons68, cons19, cons1163, cons1164, cons1165, cons1166, cons1167, cons1168, cons1169, cons1170, cons1171, cons150, cons1172, cons1173, cons64, cons95, cons170, cons812, cons813, cons224, cons1174, cons226, cons798, cons81, cons1175, cons20, cons1176, cons1177, cons1178, cons1179, cons1180, cons1181, cons1182, cons1183, cons1184, cons1185, cons1186, cons1187, cons1188, cons1189, cons1190, cons1191, cons1192, cons799, cons1193, cons54, cons927, cons1194, cons1195, cons1196, cons1197, cons1198, cons1199, cons1200, cons1201, cons40, cons554, cons1202, cons1203, cons1204, cons27, cons654, cons1205, cons73, cons130, cons1206, cons1207, cons1208, cons1209, cons1210, cons148, cons1211, cons1212, cons13, cons165, cons1213, cons139, cons1214, cons1215, cons1216, cons1217, cons1218, cons1219, cons1220, cons1221, cons1222, cons1223, cons1224, cons72, cons1225, cons1226, cons808, cons842, cons1227, cons1228, cons70, cons1127, cons1229, cons1230, cons1231, cons1232, cons465, cons1233, cons1234, cons1235, cons1236, cons1237, cons1238, cons33, cons1101, cons1239, cons1057, cons517, cons818, cons819, cons1240, cons1241, cons1242, cons1243, cons1244, cons1245, cons1246, cons1247, cons36, cons37, cons1248, cons1249, cons1250 pattern2009 = Pattern(Integral(log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))), x_), cons8, cons29, cons50, cons127, cons5, cons52, cons1158) rule2009 = ReplacementRule(pattern2009, replacement2009) pattern2010 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons89, cons90) rule2010 = ReplacementRule(pattern2010, replacement2010) pattern2011 = Pattern(Integral(S(1)/log((x_*WC('f', S(1)) + WC('e', S(0)))*WC('d', S(1))), x_), cons29, cons50, cons127, cons1159) rule2011 = ReplacementRule(pattern2011, replacement2011) pattern2012 = Pattern(Integral(S(1)/(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons417) rule2012 = ReplacementRule(pattern2012, replacement2012) pattern2013 = Pattern(Integral(S(1)/sqrt(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons1160) rule2013 = ReplacementRule(pattern2013, replacement2013) pattern2014 = Pattern(Integral(S(1)/sqrt(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons1161) rule2014 = ReplacementRule(pattern2014, replacement2014) pattern2015 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons89, cons91) rule2015 = ReplacementRule(pattern2015, replacement2015) pattern2016 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons545) rule2016 = ReplacementRule(pattern2016, replacement2016) pattern2017 = Pattern(Integral(S(1)/((x_*WC('h', S(1)) + WC('g', S(0)))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons1162) rule2017 = ReplacementRule(pattern2017, replacement2017) pattern2018 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons52, cons1162, cons586) rule2018 = ReplacementRule(pattern2018, replacement2018) pattern2019 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons1162, cons68, cons89, cons90) rule2019 = ReplacementRule(pattern2019, replacement2019) pattern2020 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))/log((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1))), x_), cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons1163, cons1162, cons1164) rule2020 = ReplacementRule(pattern2020, replacement2020) pattern2021 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**m_/log((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1))), x_), cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons1163, cons1162, cons1165) rule2021 = ReplacementRule(pattern2021, replacement2021) pattern2022 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))/(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons1162, cons68) rule2022 = ReplacementRule(pattern2022, replacement2022) pattern2023 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))/sqrt(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons1162, cons68, cons1166) rule2023 = ReplacementRule(pattern2023, replacement2023) pattern2024 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))/sqrt(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons1162, cons68, cons1167) rule2024 = ReplacementRule(pattern2024, replacement2024) pattern2025 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons1162, cons68, cons89, cons91) rule2025 = ReplacementRule(pattern2025, replacement2025) pattern2026 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons1162, cons68) rule2026 = ReplacementRule(pattern2026, replacement2026) pattern2027 = Pattern(Integral(log((x_*WC('f', S(1)) + WC('e', S(0)))*WC('c', S(1)))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons8, cons50, cons127, cons210, cons211, cons1168) rule2027 = ReplacementRule(pattern2027, replacement2027) pattern2028 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log((x_*WC('f', S(1)) + WC('e', S(0)))*WC('c', S(1))))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons50, cons127, cons210, cons211, cons1169, cons1170) rule2028 = ReplacementRule(pattern2028, replacement2028) pattern2029 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons1171, cons150) rule2029 = ReplacementRule(pattern2029, replacement2029) pattern2030 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons1171, cons68) rule2030 = ReplacementRule(pattern2030, replacement2030) pattern2031 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_/(x_*WC('h', S(1)) + WC('g', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons1171, cons89, cons90) rule2031 = ReplacementRule(pattern2031, replacement2031) pattern2032 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons5, cons52, cons1171, cons89, cons90, cons68, cons1172, cons1173) rule2032 = ReplacementRule(pattern2032, replacement2032) pattern2033 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))/(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons1171, cons64) rule2033 = ReplacementRule(pattern2033, replacement2033) pattern2034 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons1171, cons95, cons91, cons170) rule2034 = ReplacementRule(pattern2034, replacement2034) pattern2035 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons52, cons1171, cons64) rule2035 = ReplacementRule(pattern2035, replacement2035) pattern2036 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log((v_**p_*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons52, cons812, cons813) rule2036 = ReplacementRule(pattern2036, replacement2036) pattern2037 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons52, cons224) rule2037 = ReplacementRule(pattern2037, replacement2037) pattern2038 = Pattern(Integral(log(WC('c', S(1))/(x_*WC('f', S(1)) + WC('e', S(0))))/((x_*WC('h', S(1)) + WC('g', S(0)))*(x_*WC('j', S(1)) + WC('i', S(0)))), x_), cons8, cons50, cons127, cons210, cons211, cons226, cons798, cons1162, cons1174) rule2038 = ReplacementRule(pattern2038, replacement2038) pattern2039 = Pattern(Integral((a_ + WC('b', S(1))*log(WC('c', S(1))/(x_*WC('f', S(1)) + WC('e', S(0)))))/((x_*WC('h', S(1)) + WC('g', S(0)))*(x_*WC('j', S(1)) + WC('i', S(0)))), x_), cons2, cons3, cons8, cons50, cons127, cons210, cons211, cons226, cons798, cons1162, cons1174) rule2039 = ReplacementRule(pattern2039, replacement2039) pattern2040 = Pattern(Integral((x_*WC('j', S(1)) + WC('i', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons798, cons5, cons52, cons1162, cons81) rule2040 = ReplacementRule(pattern2040, With2040) pattern2041 = Pattern(Integral((x_*WC('j', S(1)) + WC('i', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log((x_*WC('f', S(1)) + WC('e', S(0)))*WC('c', S(1))))**WC('n', S(1))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons50, cons127, cons210, cons211, cons226, cons798, cons4, cons1162, cons64, cons1175) rule2041 = ReplacementRule(pattern2041, replacement2041) pattern2042 = Pattern(Integral((x_*WC('j', S(1)) + WC('i', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons798, cons5, cons52, cons20, cons150, CustomConstraint(With2042)) rule2042 = ReplacementRule(pattern2042, replacement2042) pattern2043 = Pattern(Integral((x_*WC('j', S(1)) + WC('i', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons798, cons19, cons4, cons5, cons52, cons1176) rule2043 = ReplacementRule(pattern2043, replacement2043) pattern2044 = Pattern(Integral(log(WC('c', S(1))/(x_*WC('f', S(1)) + WC('e', S(0))))/(g_ + x_**S(2)*WC('h', S(1))), x_), cons8, cons50, cons127, cons210, cons211, cons1177, cons1178) rule2044 = ReplacementRule(pattern2044, replacement2044) pattern2045 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(WC('c', S(1))/(x_*WC('f', S(1)) + WC('e', S(0)))))/(g_ + x_**S(2)*WC('h', S(1))), x_), cons8, cons50, cons127, cons210, cons211, cons1177, cons1179, cons1180) rule2045 = ReplacementRule(pattern2045, replacement2045) pattern2046 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))/(x_**S(2)*WC('i', S(1)) + x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons5, cons52, cons1181) rule2046 = ReplacementRule(pattern2046, replacement2046) pattern2047 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((e_ + x_*WC('f', S(1)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))/(g_ + x_**S(2)*WC('i', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons226, cons5, cons52, cons1182) rule2047 = ReplacementRule(pattern2047, replacement2047) pattern2048 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))/sqrt(g_ + x_**S(2)*WC('h', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons1183) rule2048 = ReplacementRule(pattern2048, With2048) pattern2049 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))/(sqrt(g1_ + x_*WC('h1', S(1)))*sqrt(g2_ + x_*WC('h2', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1187, cons1188, cons1189, cons1190, cons5, cons52, cons1184, cons1185, cons1186) rule2049 = ReplacementRule(pattern2049, With2049) pattern2050 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))/sqrt(g_ + x_**S(2)*WC('h', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons1191) rule2050 = ReplacementRule(pattern2050, replacement2050) pattern2051 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))/(sqrt(g1_ + x_*WC('h1', S(1)))*sqrt(g2_ + x_*WC('h2', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1187, cons1188, cons1189, cons1190, cons5, cons52, cons1184) rule2051 = ReplacementRule(pattern2051, replacement2051) pattern2052 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('k', S(1)) + WC('j', S(0)))*WC('i', S(1)))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons798, cons799, cons5, cons52, cons89, cons90, cons1192) rule2052 = ReplacementRule(pattern2052, replacement2052) pattern2053 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))*log((x_*WC('k', S(1)) + WC('j', S(0)))**WC('m', S(1))*WC('i', S(1)) + S(1))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons798, cons799, cons19, cons5, cons52, cons89, cons90, cons1193) rule2053 = ReplacementRule(pattern2053, replacement2053) pattern2054 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))*PolyLog(r_, (x_*WC('k', S(1)) + WC('j', S(0)))**WC('m', S(1))*WC('i', S(1)))/(x_*WC('h', S(1)) + WC('g', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons798, cons799, cons19, cons5, cons52, cons54, cons89, cons90, cons1193) rule2054 = ReplacementRule(pattern2054, replacement2054) pattern2055 = Pattern(Integral(F_**(x_*WC('h', S(1)) + WC('g', S(0)))*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))*WC('Px', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons5, cons52, cons927, cons64, cons1194) rule2055 = ReplacementRule(pattern2055, With2055) pattern2056 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((e_ + x_**m_*WC('f', S(1)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))/x_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons150) rule2056 = ReplacementRule(pattern2056, replacement2056) pattern2057 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_**m_*(f_ + x_**WC('r', S(1))*WC('e', S(1))))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))/x_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons1195, cons150) rule2057 = ReplacementRule(pattern2057, replacement2057) pattern2058 = Pattern(Integral(x_**WC('r1', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_**r_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons52, cons54, cons1196) rule2058 = ReplacementRule(pattern2058, replacement2058) pattern2059 = Pattern(Integral(x_**WC('r1', S(1))*(x_**r_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(((x_**r_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons52, cons54, cons1196) rule2059 = ReplacementRule(pattern2059, replacement2059) pattern2060 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1197) rule2060 = ReplacementRule(pattern2060, With2060) pattern2061 = Pattern(Integral(log((x_**mn_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))/(x_*(d_ + x_**WC('n', S(1))*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1198, cons1199) rule2061 = ReplacementRule(pattern2061, replacement2061) pattern2062 = Pattern(Integral(log(x_**mn_*(x_**WC('n', S(1))*WC('a', S(1)) + WC('b', S(0)))*WC('c', S(1)))/(x_*(d_ + x_**WC('n', S(1))*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1198, cons1199) rule2062 = ReplacementRule(pattern2062, replacement2062) pattern2063 = Pattern(Integral(Px_*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons52, cons927) rule2063 = ReplacementRule(pattern2063, replacement2063) pattern2064 = Pattern(Integral(RFx_*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons1200, cons150, CustomConstraint(With2064)) rule2064 = ReplacementRule(pattern2064, replacement2064) pattern2065 = Pattern(Integral(RFx_*(WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons1200, cons150, CustomConstraint(With2065)) rule2065 = ReplacementRule(pattern2065, replacement2065) pattern2066 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_**S(2)*WC('g', S(1)) + x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons52, cons4, cons1201, cons40) rule2066 = ReplacementRule(pattern2066, replacement2066) pattern2067 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log((v_**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons52, cons554, cons1202) rule2067 = ReplacementRule(pattern2067, replacement2067) pattern2068 = Pattern(Integral(log(((x_**WC('n', S(1))*WC('c', S(1)))**p_*WC('b', S(1)))**q_*WC('a', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons52, cons54, cons1203) rule2068 = ReplacementRule(pattern2068, replacement2068) pattern2069 = Pattern(Integral(x_**WC('m', S(1))*log(((x_**WC('n', S(1))*WC('c', S(1)))**p_*WC('b', S(1)))**q_*WC('a', S(1)))**WC('r', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons52, cons54, cons68, cons1204) rule2069 = ReplacementRule(pattern2069, replacement2069) pattern2070 = Pattern(Integral(WC('u', S(1))*log(((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e1', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons654, cons27) rule2070 = ReplacementRule(pattern2070, replacement2070) pattern2071 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons654, cons1206, cons1205, cons73, cons130) rule2071 = ReplacementRule(pattern2071, replacement2071) pattern2072 = Pattern(Integral(log((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))/(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1207, cons1208) rule2072 = ReplacementRule(pattern2072, replacement2072) pattern2073 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1207, cons130) rule2073 = ReplacementRule(pattern2073, replacement2073) pattern2074 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1209, cons130) rule2074 = ReplacementRule(pattern2074, replacement2074) pattern2075 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))/(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1210) rule2075 = ReplacementRule(pattern2075, replacement2075) pattern2076 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**p_/(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1210, cons40, cons148) rule2076 = ReplacementRule(pattern2076, replacement2076) pattern2077 = Pattern(Integral(S(1)/((x_*WC('g', S(1)) + WC('f', S(0)))**S(2)*log((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1207) rule2077 = ReplacementRule(pattern2077, replacement2077) pattern2078 = Pattern(Integral(S(1)/((x_*WC('g', S(1)) + WC('f', S(0)))**S(2)*log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1207) rule2078 = ReplacementRule(pattern2078, replacement2078) pattern2079 = Pattern(Integral(S(1)/((x_*WC('g', S(1)) + WC('f', S(0)))**S(2)*log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1209) rule2079 = ReplacementRule(pattern2079, replacement2079) pattern2080 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/(x_*WC('g', S(1)) + WC('f', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1211, cons130) rule2080 = ReplacementRule(pattern2080, replacement2080) pattern2081 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/(x_*WC('g', S(1)) + WC('f', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1210, cons130) rule2081 = ReplacementRule(pattern2081, replacement2081) pattern2082 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**p_/(x_*WC('g', S(1)) + WC('f', S(0)))**S(3), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons654, cons1206, cons1205, cons73, cons1211, cons1207) rule2082 = ReplacementRule(pattern2082, replacement2082) pattern2083 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**p_/(x_*WC('g', S(1)) + WC('f', S(0)))**S(3), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons654, cons1206, cons1205, cons73, cons1210, cons1209) rule2083 = ReplacementRule(pattern2083, replacement2083) pattern2084 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons130, cons20, cons68) rule2084 = ReplacementRule(pattern2084, replacement2084) pattern2085 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m2', S(1))*log(u_**n_*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1213, cons1212, cons73, cons68, cons13, cons165) rule2085 = ReplacementRule(pattern2085, replacement2085) pattern2086 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m2', S(1))*log(u_)**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons1213, cons1212, cons73, cons68, cons13, cons165) rule2086 = ReplacementRule(pattern2086, replacement2086) pattern2087 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m2', S(1))/log(u_**n_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1213, cons1212, cons73, cons68) rule2087 = ReplacementRule(pattern2087, replacement2087) pattern2088 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m2', S(1))/log(u_), x_), cons2, cons3, cons8, cons29, cons1213, cons1212, cons73, cons68) rule2088 = ReplacementRule(pattern2088, replacement2088) pattern2089 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m2', S(1))*log(u_**n_*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1213, cons1212, cons73, cons68, cons13, cons139) rule2089 = ReplacementRule(pattern2089, replacement2089) pattern2090 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m2', S(1))*log(u_)**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons1213, cons1212, cons73, cons68, cons13, cons139) rule2090 = ReplacementRule(pattern2090, replacement2090) pattern2091 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/((x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1211, cons1207) rule2091 = ReplacementRule(pattern2091, replacement2091) pattern2092 = Pattern(Integral(log((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))/((x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1211, cons1210, cons1214) rule2092 = ReplacementRule(pattern2092, replacement2092) pattern2093 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/((x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons654, cons1206, cons1205, cons73, cons1211, cons1210, cons130) rule2093 = ReplacementRule(pattern2093, replacement2093) pattern2094 = Pattern(Integral(log((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))/(f_ + x_**S(2)*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1215, cons1216) rule2094 = ReplacementRule(pattern2094, replacement2094) pattern2095 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/(x_**S(2)*WC('h', S(1)) + x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons654, cons1206, cons1205, cons73, cons1217) rule2095 = ReplacementRule(pattern2095, replacement2095) pattern2096 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/(x_**S(2)*WC('h', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons211, cons4, cons5, cons654, cons1206, cons1205, cons73, cons1218) rule2096 = ReplacementRule(pattern2096, replacement2096) pattern2097 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/((x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('g', S(1)) + WC('f', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons654, cons1206, cons1205, cons73, cons1210, cons1209) rule2097 = ReplacementRule(pattern2097, replacement2097) pattern2098 = Pattern(Integral(log(v_)*log(u_**n_*WC('e', S(1)))**WC('p', S(1))/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1219, cons1213, cons73, cons13, cons165) rule2098 = ReplacementRule(pattern2098, replacement2098) pattern2099 = Pattern(Integral(log(u_)**WC('p', S(1))*log(v_)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1219, cons1213, cons73, cons13, cons165) rule2099 = ReplacementRule(pattern2099, replacement2099) pattern2100 = Pattern(Integral(log(v_)*log(u_**n_*WC('e', S(1)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1219, cons1213, cons73, cons13, cons139) rule2100 = ReplacementRule(pattern2100, With2100) pattern2101 = Pattern(Integral(log(u_)**p_*log(v_)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1219, cons1213, cons73, cons13, cons139) rule2101 = ReplacementRule(pattern2101, With2101) pattern2102 = Pattern(Integral(log(v_)*log(u_**n_*WC('e', S(1)))**WC('p', S(1))/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1220, cons1213, cons73, cons13, cons165) rule2102 = ReplacementRule(pattern2102, replacement2102) pattern2103 = Pattern(Integral(log(u_)**WC('p', S(1))*log(v_)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1220, cons1213, cons73, cons13, cons165) rule2103 = ReplacementRule(pattern2103, replacement2103) pattern2104 = Pattern(Integral(log(v_)*log(u_**n_*WC('e', S(1)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1220, cons1213, cons73, cons13, cons139) rule2104 = ReplacementRule(pattern2104, With2104) pattern2105 = Pattern(Integral(log(u_)**p_*log(v_)/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1220, cons1213, cons73, cons13, cons139) rule2105 = ReplacementRule(pattern2105, With2105) pattern2106 = Pattern(Integral(PolyLog(q_, v_)*log(u_**n_*WC('e', S(1)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons1221, cons1213, cons73, cons13, cons148) rule2106 = ReplacementRule(pattern2106, replacement2106) pattern2107 = Pattern(Integral(PolyLog(q_, v_)*log(u_)**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons52, cons1221, cons1213, cons73, cons13, cons148) rule2107 = ReplacementRule(pattern2107, replacement2107) pattern2108 = Pattern(Integral(PolyLog(q_, v_)*log(u_**n_*WC('e', S(1)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons1221, cons1213, cons73, cons13, cons139) rule2108 = ReplacementRule(pattern2108, replacement2108) pattern2109 = Pattern(Integral(PolyLog(q_, v_)*log(u_)**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons52, cons1221, cons1213, cons73, cons13, cons139) rule2109 = ReplacementRule(pattern2109, replacement2109) pattern2110 = Pattern(Integral(PolyLog(q_, v_)*log(u_**n_*WC('e', S(1)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons1222, cons1213, cons73, cons13, cons148) rule2110 = ReplacementRule(pattern2110, replacement2110) pattern2111 = Pattern(Integral(PolyLog(q_, v_)*log(u_)**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons52, cons1222, cons1213, cons73, cons13, cons148) rule2111 = ReplacementRule(pattern2111, replacement2111) pattern2112 = Pattern(Integral(PolyLog(q_, v_)*log(u_**n_*WC('e', S(1)))**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons1222, cons1213, cons73, cons13, cons139) rule2112 = ReplacementRule(pattern2112, replacement2112) pattern2113 = Pattern(Integral(PolyLog(q_, v_)*log(u_)**p_/((x_*WC('b', S(1)) + WC('a', S(0)))*(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons52, cons1222, cons1213, cons73, cons13, cons139) rule2113 = ReplacementRule(pattern2113, replacement2113) pattern2114 = Pattern(Integral(WC('u', S(1))*log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/(x_**S(2)*WC('h', S(1)) + x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons5, cons654, cons1206, cons1205, cons73, cons1223, cons1224) rule2114 = ReplacementRule(pattern2114, replacement2114) pattern2115 = Pattern(Integral(WC('u', S(1))*log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1))/(x_**S(2)*WC('h', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons211, cons4, cons5, cons654, cons1206, cons1205, cons73, cons1223, cons72) rule2115 = ReplacementRule(pattern2115, replacement2115) pattern2116 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))/(f_ + x_**S(2)*WC('h', S(1)) + x_*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons654, cons127, cons210, cons211, cons4, cons1206, cons1205) rule2116 = ReplacementRule(pattern2116, With2116) pattern2117 = Pattern(Integral(log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))/(f_ + x_**S(2)*WC('h', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons654, cons127, cons211, cons4, cons1206, cons1205) rule2117 = ReplacementRule(pattern2117, With2117) pattern2118 = Pattern(Integral(RFx_*log(((x_*WC('b', S(1)) + WC('a', S(0)))**WC('n1', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**n2_*WC('e1', S(1)))**WC('n', S(1))*WC('e', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons654, cons1206, cons1205, cons1200, cons130, CustomConstraint(With2118)) rule2118 = ReplacementRule(pattern2118, replacement2118) pattern2119 = Pattern(Integral(WC('u', S(1))*log(v_)**WC('p', S(1)), x_), cons5, cons1225, cons1226, CustomConstraint(With2119)) rule2119 = ReplacementRule(pattern2119, replacement2119) pattern2120 = Pattern(Integral(log((x_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons4, cons5, cons808) rule2120 = ReplacementRule(pattern2120, replacement2120) pattern2121 = Pattern(Integral(log(v_**WC('p', S(1))*WC('c', S(1))), x_), cons8, cons5, cons842, cons1227) rule2121 = ReplacementRule(pattern2121, replacement2121) pattern2122 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log((x_**n_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*WC('c', S(1))))/(x_*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons1228) rule2122 = ReplacementRule(pattern2122, replacement2122) pattern2123 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log((x_**n_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons68) rule2123 = ReplacementRule(pattern2123, replacement2123) pattern2124 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(v_**WC('p', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons5, cons70, cons842, cons1127) rule2124 = ReplacementRule(pattern2124, replacement2124) pattern2125 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log((x_**n_*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*WC('c', S(1))))*asin(x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons64) rule2125 = ReplacementRule(pattern2125, With2125) pattern2126 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log((x_**S(2)*WC('e', S(1)) + WC('d', S(0)))**WC('p', S(1))*WC('c', S(1))))/(x_**S(2)*WC('g', S(1)) + WC('f', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons1229) rule2126 = ReplacementRule(pattern2126, With2126) pattern2127 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons150) rule2127 = ReplacementRule(pattern2127, replacement2127) pattern2128 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons150, cons1230) rule2128 = ReplacementRule(pattern2128, replacement2128) pattern2129 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log((d_ + x_**S(2)*WC('e', S(1)))**WC('p', S(1))*WC('c', S(1))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons150, cons1231) rule2129 = ReplacementRule(pattern2129, replacement2129) pattern2130 = Pattern(Integral(u_*log(v_), x_), CustomConstraint(With2130)) rule2130 = ReplacementRule(pattern2130, replacement2130) pattern2131 = Pattern(Integral(w_*(WC('a', S(0)) + WC('b', S(1))*log(u_))*log(v_), x_), cons2, cons3, cons1232, CustomConstraint(With2131)) rule2131 = ReplacementRule(pattern2131, replacement2131) pattern2132 = Pattern(Integral(log((a_ + (x_*WC('e', S(1)) + WC('d', S(0)))**n_*WC('b', S(1)))**WC('p', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons89, cons465) rule2132 = ReplacementRule(pattern2132, replacement2132) pattern2133 = Pattern(Integral(log((a_ + (x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons1233) rule2133 = ReplacementRule(pattern2133, replacement2133) pattern2134 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log((d_ + WC('e', S(1))/(x_*WC('g', S(1)) + WC('f', S(0))))**WC('p', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons150) rule2134 = ReplacementRule(pattern2134, replacement2134) pattern2135 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(RFx_**WC('p', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons5, cons1200, cons150) rule2135 = ReplacementRule(pattern2135, replacement2135) pattern2136 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(RFx_**WC('p', S(1))*WC('c', S(1))))**WC('n', S(1))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1200, cons150) rule2136 = ReplacementRule(pattern2136, replacement2136) pattern2137 = Pattern(Integral((x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))*log(RFx_**WC('p', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons1200, cons150, cons1234, cons68) rule2137 = ReplacementRule(pattern2137, replacement2137) pattern2138 = Pattern(Integral(log(RFx_**WC('n', S(1))*WC('c', S(1)))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons8, cons29, cons50, cons4, cons1200, cons1235) rule2138 = ReplacementRule(pattern2138, With2138) pattern2139 = Pattern(Integral(log(Px_**WC('n', S(1))*WC('c', S(1)))/Qx_, x_), cons8, cons4, cons1236, cons1237) rule2139 = ReplacementRule(pattern2139, With2139) pattern2140 = Pattern(Integral(RGx_*(WC('a', S(0)) + WC('b', S(1))*log(RFx_**WC('p', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons5, cons1200, cons1238, cons150, CustomConstraint(With2140)) rule2140 = ReplacementRule(pattern2140, replacement2140) pattern2141 = Pattern(Integral(RGx_*(WC('a', S(0)) + WC('b', S(1))*log(RFx_**WC('p', S(1))*WC('c', S(1))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons5, cons1200, cons1238, cons150, CustomConstraint(With2141)) rule2141 = ReplacementRule(pattern2141, replacement2141) pattern2142 = Pattern(Integral(RFx_*(WC('a', S(0)) + WC('b', S(1))*log(u_)), x_), cons2, cons3, cons1200, CustomConstraint(With2142)) rule2142 = ReplacementRule(pattern2142, replacement2142) pattern2143 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*log((F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1))))**WC('n', S(1))*WC('e', S(1)) + S(1)), x_), cons1101, cons2, cons3, cons8, cons50, cons127, cons210, cons4, cons33, cons170) rule2143 = ReplacementRule(pattern2143, replacement2143) pattern2144 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))*log(d_ + (F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1))))**WC('n', S(1))*WC('e', S(1))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons33, cons170, cons1239) rule2144 = ReplacementRule(pattern2144, replacement2144) pattern2145 = Pattern(Integral(log(x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1057) rule2145 = ReplacementRule(pattern2145, replacement2145) pattern2146 = Pattern(Integral(log(x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons1057) rule2146 = ReplacementRule(pattern2146, replacement2146) pattern2147 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*log(x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons1057, cons68, cons517) rule2147 = ReplacementRule(pattern2147, replacement2147) pattern2148 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*log(x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons19, cons1057, cons68, cons517) rule2148 = ReplacementRule(pattern2148, replacement2148) pattern2149 = Pattern(Integral(WC('v', S(1))*log(sqrt(u_)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0))), x_), cons29, cons50, cons127, cons818, cons819, cons1240) rule2149 = ReplacementRule(pattern2149, replacement2149) pattern2150 = Pattern(Integral(log(u_), x_), cons1232) rule2150 = ReplacementRule(pattern2150, replacement2150) pattern2151 = Pattern(Integral(log(u_)/(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons1241, cons1242) rule2151 = ReplacementRule(pattern2151, replacement2151) pattern2152 = Pattern(Integral((x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*log(u_), x_), cons2, cons3, cons19, cons1232, cons68) rule2152 = ReplacementRule(pattern2152, replacement2152) pattern2153 = Pattern(Integral(log(u_)/Qx_, x_), cons1243, cons1232) rule2153 = ReplacementRule(pattern2153, With2153) pattern2154 = Pattern(Integral(u_**(x_*WC('a', S(1)))*log(u_), x_), cons2, cons1232) rule2154 = ReplacementRule(pattern2154, replacement2154) pattern2155 = Pattern(Integral(v_*log(u_), x_), cons1232, CustomConstraint(With2155)) rule2155 = ReplacementRule(pattern2155, replacement2155) pattern2156 = Pattern(Integral(log(v_)*log(w_), x_), cons1244, cons1245) rule2156 = ReplacementRule(pattern2156, replacement2156) pattern2157 = Pattern(Integral(u_*log(v_)*log(w_), x_), cons1244, cons1245, CustomConstraint(With2157)) rule2157 = ReplacementRule(pattern2157, replacement2157) pattern2158 = Pattern(Integral(log(WC('a', S(1))*log(x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons4, cons5, cons1246) rule2158 = ReplacementRule(pattern2158, replacement2158) pattern2159 = Pattern(Integral(log(WC('a', S(1))*log(x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1)))/x_, x_), cons2, cons3, cons4, cons5, cons1246) rule2159 = ReplacementRule(pattern2159, replacement2159) pattern2160 = Pattern(Integral(x_**WC('m', S(1))*log(WC('a', S(1))*log(x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons19, cons4, cons5, cons68) rule2160 = ReplacementRule(pattern2160, replacement2160) pattern2161 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))*log(x_*WC('d', S(1)) + WC('c', S(0))))/sqrt(a_ + WC('b', S(1))*log(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons1247) rule2161 = ReplacementRule(pattern2161, replacement2161) pattern2162 = Pattern(Integral(f_**(WC('a', S(1))*log(u_)), x_), cons2, cons127, cons1248) rule2162 = ReplacementRule(pattern2162, replacement2162) pattern2163 = Pattern(Integral(u_, x_), cons1249, CustomConstraint(With2163)) rule2163 = ReplacementRule(pattern2163, replacement2163) pattern2164 = Pattern(Integral(WC('u', S(1))*log(Gamma(v_)), x_)) rule2164 = ReplacementRule(pattern2164, replacement2164) pattern2165 = Pattern(Integral((w_*WC('a', S(1)) + w_*WC('b', S(1))*log(v_)**WC('n', S(1)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons4, cons40) rule2165 = ReplacementRule(pattern2165, replacement2165) pattern2166 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*log(((x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1))*WC('d', S(1)))**WC('q', S(1))*WC('c', S(1))))**n_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons52, cons1250) rule2166 = ReplacementRule(pattern2166, replacement2166) return [rule2009, rule2010, rule2011, rule2012, rule2013, rule2014, rule2015, rule2016, rule2017, rule2018, rule2019, rule2020, rule2021, rule2022, rule2023, rule2024, rule2025, rule2026, rule2027, rule2028, rule2029, rule2030, rule2031, rule2032, rule2033, rule2034, rule2035, rule2036, rule2037, rule2038, rule2039, rule2040, rule2041, rule2042, rule2043, rule2044, rule2045, rule2046, rule2047, rule2048, rule2049, rule2050, rule2051, rule2052, rule2053, rule2054, rule2055, rule2056, rule2057, rule2058, rule2059, rule2060, rule2061, rule2062, rule2063, rule2064, rule2065, rule2066, rule2067, rule2068, rule2069, rule2070, rule2071, rule2072, rule2073, rule2074, rule2075, rule2076, rule2077, rule2078, rule2079, rule2080, rule2081, rule2082, rule2083, rule2084, rule2085, rule2086, rule2087, rule2088, rule2089, rule2090, rule2091, rule2092, rule2093, rule2094, rule2095, rule2096, rule2097, rule2098, rule2099, rule2100, rule2101, rule2102, rule2103, rule2104, rule2105, rule2106, rule2107, rule2108, rule2109, rule2110, rule2111, rule2112, rule2113, rule2114, rule2115, rule2116, rule2117, rule2118, rule2119, rule2120, rule2121, rule2122, rule2123, rule2124, rule2125, rule2126, rule2127, rule2128, rule2129, rule2130, rule2131, rule2132, rule2133, rule2134, rule2135, rule2136, rule2137, rule2138, rule2139, rule2140, rule2141, rule2142, rule2143, rule2144, rule2145, rule2146, rule2147, rule2148, rule2149, rule2150, rule2151, rule2152, rule2153, rule2154, rule2155, rule2156, rule2157, rule2158, rule2159, rule2160, rule2161, rule2162, rule2163, rule2164, rule2165, rule2166, ] def replacement2009(c, d, e, f, p, q, x): return Simp((e + f*x)*log(c*(d*(e + f*x)**p)**q)/f, x) - Simp(p*q*x, x) def replacement2010(a, b, c, d, e, f, n, p, q, x): return -Dist(b*n*p*q, Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(-1)), x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)/f, x) def replacement2011(d, e, f, x): return Simp(LogIntegral(d*(e + f*x))/(d*f), x) def replacement2012(a, b, c, d, e, f, p, q, x): return Simp((c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*ExpIntegralEi((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-a/(b*p*q))/(b*f*p*q), x) def replacement2013(a, b, c, d, e, f, p, q, x): return Simp(sqrt(Pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*Erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/Rt(b*p*q, S(2)))*Rt(b*p*q, S(2))*exp(-a/(b*p*q))/(b*f*p*q), x) def replacement2014(a, b, c, d, e, f, p, q, x): return Simp(sqrt(Pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*Erf(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/Rt(-b*p*q, S(2)))*Rt(-b*p*q, S(2))*exp(-a/(b*p*q))/(b*f*p*q), x) def replacement2015(a, b, c, d, e, f, n, p, q, x): return -Dist(S(1)/(b*p*q*(n + S(1))), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(1)), x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(1))*(e + f*x)/(b*f*p*q*(n + S(1))), x) def replacement2016(a, b, c, d, e, f, n, p, q, x): return Simp((c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(-(a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)*Gamma(n + S(1), -(a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-a/(b*p*q))/f, x) def replacement2017(a, b, c, d, e, f, g, h, p, q, x): return Simp(log(RemoveContent(a + b*log(c*(d*(e + f*x)**p)**q), x))/(b*h*p*q), x) def replacement2018(a, b, c, d, e, f, g, h, n, p, q, x): return Simp((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(1))/(b*h*p*q*(n + S(1))), x) def replacement2019(a, b, c, d, e, f, g, h, m, n, p, q, x): return -Dist(b*n*p*q/(m + S(1)), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(-1))*(g + h*x)**m, x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**(m + S(1))/(h*(m + S(1))), x) def replacement2020(d, e, f, g, h, m, p, x): return Simp((h/f)**(p + S(-1))*LogIntegral(d*(e + f*x)**p)/(d*f*p), x) def replacement2021(d, e, f, g, h, m, p, x): return Dist((e + f*x)**(S(1) - p)*(g + h*x)**(p + S(-1)), Int((e + f*x)**(p + S(-1))/log(d*(e + f*x)**p), x), x) def replacement2022(a, b, c, d, e, f, g, h, m, p, q, x): return Simp((c*(d*(e + f*x)**p)**q)**(-(m + S(1))/(p*q))*(g + h*x)**(m + S(1))*ExpIntegralEi((a + b*log(c*(d*(e + f*x)**p)**q))*(m + S(1))/(b*p*q))*exp(-a*(m + S(1))/(b*p*q))/(b*h*p*q), x) def replacement2023(a, b, c, d, e, f, g, h, m, p, q, x): return Simp(sqrt(Pi)*(c*(d*(e + f*x)**p)**q)**(-(m + S(1))/(p*q))*(g + h*x)**(m + S(1))*Erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*Rt((m + S(1))/(b*p*q), S(2)))*exp(-a*(m + S(1))/(b*p*q))/(b*h*p*q*Rt((m + S(1))/(b*p*q), S(2))), x) def replacement2024(a, b, c, d, e, f, g, h, m, p, q, x): return Simp(sqrt(Pi)*(c*(d*(e + f*x)**p)**q)**(-(m + S(1))/(p*q))*(g + h*x)**(m + S(1))*Erf(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*Rt(-(m + S(1))/(b*p*q), S(2)))*exp(-a*(m + S(1))/(b*p*q))/(b*h*p*q*Rt(-(m + S(1))/(b*p*q), S(2))), x) def replacement2025(a, b, c, d, e, f, g, h, m, n, p, q, x): return -Dist((m + S(1))/(b*p*q*(n + S(1))), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(1))*(g + h*x)**m, x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(1))*(g + h*x)**(m + S(1))/(b*h*p*q*(n + S(1))), x) def replacement2026(a, b, c, d, e, f, g, h, m, n, p, q, x): return Simp((c*(d*(e + f*x)**p)**q)**(-(m + S(1))/(p*q))*(-(a + b*log(c*(d*(e + f*x)**p)**q))*(m + S(1))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**(m + S(1))*Gamma(n + S(1), -(a + b*log(c*(d*(e + f*x)**p)**q))*(m + S(1))/(b*p*q))*exp(-a*(m + S(1))/(b*p*q))/(h*(m + S(1))), x) def replacement2027(c, e, f, g, h, x): return -Simp(PolyLog(S(2), -(g + h*x)*Together(c*f/h))/h, x) def replacement2028(a, b, c, e, f, g, h, x): return Dist(b, Int(log(-h*(e + f*x)/(-e*h + f*g))/(g + h*x), x), x) + Simp((a + b*log(c*(e - f*g/h)))*log(g + h*x)/h, x) def replacement2029(a, b, c, d, e, f, g, h, n, p, q, x): return -Dist(b*f*n*p*q/h, Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(-1))*log(f*(g + h*x)/(-e*h + f*g))/(e + f*x), x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**n*log(f*(g + h*x)/(-e*h + f*g))/h, x) def replacement2030(a, b, c, d, e, f, g, h, m, p, q, x): return -Dist(b*f*p*q/(h*(m + S(1))), Int((g + h*x)**(m + S(1))/(e + f*x), x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(m + S(1))/(h*(m + S(1))), x) def replacement2031(a, b, c, d, e, f, g, h, n, p, q, x): return -Dist(b*f*n*p*q/(-e*h + f*g), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(-1))/(g + h*x), x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)/((g + h*x)*(-e*h + f*g)), x) def replacement2032(a, b, c, d, e, f, g, h, m, n, p, q, x): return -Dist(b*f*n*p*q/(h*(m + S(1))), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(-1))*(g + h*x)**(m + S(1))/(e + f*x), x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**(m + S(1))/(h*(m + S(1))), x) def replacement2033(a, b, c, d, e, f, g, h, m, p, q, x): return Int(ExpandIntegrand((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q)), x), x) def replacement2034(a, b, c, d, e, f, g, h, m, n, p, q, x): return -Dist((m + S(1))/(b*p*q*(n + S(1))), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(1))*(g + h*x)**m, x), x) + Dist(m*(-e*h + f*g)/(b*f*p*q*(n + S(1))), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(1))*(g + h*x)**(m + S(-1)), x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(1))*(e + f*x)*(g + h*x)**m/(b*f*p*q*(n + S(1))), x) def replacement2035(a, b, c, d, e, f, g, h, m, n, p, q, x): return Int(ExpandIntegrand((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**m, x), x) def replacement2036(a, b, c, d, m, n, p, q, u, v, x): return Int((a + b*log(c*(d*ExpandToSum(v, x)**p)**q))**n*ExpandToSum(u, x)**m, x) def replacement2037(a, b, c, d, e, f, g, h, m, n, p, q, x): return Int((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**m, x) def replacement2038(c, e, f, g, h, i, j, x): return Simp(f*PolyLog(S(2), f*(i + j*x)/(j*(e + f*x)))/(h*(-e*j + f*i)), x) def replacement2039(a, b, c, e, f, g, h, i, j, x): return Dist(a, Int(S(1)/((g + h*x)*(i + j*x)), x), x) + Dist(b, Int(log(c/(e + f*x))/((g + h*x)*(i + j*x)), x), x) def With2040(a, b, c, d, e, f, g, h, i, j, m, p, q, x): u = IntHide((i + j*x)**m/(g + h*x), x) return -Dist(b*h*p*q, Int(SimplifyIntegrand(u/(g + h*x), x), x), x) + Dist(a + b*log(c*(d*(e + f*x)**p)**q), u, x) def replacement2041(a, b, c, e, f, g, h, i, j, m, n, x): return Dist(c**(-m)*f**(-m)/h, Subst(Int((a + b*x)**n*(-c*e*j + c*f*i + j*exp(x))**m, x), x, log(c*(e + f*x))), x) def With2042(a, b, c, d, e, f, g, h, i, j, m, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand((a + b*log(c*(d*(e + f*x)**p)**q))**n, (i + j*x)**m/(g + h*x), x) if SumQ(u): return True return False def replacement2042(a, b, c, d, e, f, g, h, i, j, m, n, p, q, x): u = ExpandIntegrand((a + b*log(c*(d*(e + f*x)**p)**q))**n, (i + j*x)**m/(g + h*x), x) return Int(u, x) def replacement2043(a, b, c, d, e, f, g, h, i, j, m, n, p, q, x): return Int((a + b*log(c*(d*(e + f*x)**p)**q))**n*(i + j*x)**m/(g + h*x), x) def replacement2044(c, e, f, g, h, x): return -Simp(f*PolyLog(S(2), (-e + f*x)/(e + f*x))/(S(2)*e*h), x) def replacement2045(a, b, c, e, f, g, h, x): return Dist(b, Int(log(S(2)*e/(e + f*x))/(g + h*x**S(2)), x), x) + Dist(a + b*log(c/(S(2)*e)), Int(S(1)/(g + h*x**S(2)), x), x) def replacement2046(a, b, c, d, e, f, g, h, i, p, q, x): return Dist(e*f, Int((a + b*log(c*(d*(e + f*x)**p)**q))/((e + f*x)*(e*i*x + f*g)), x), x) def replacement2047(a, b, c, d, e, f, g, i, p, q, x): return Dist(e*f, Int((a + b*log(c*(d*(e + f*x)**p)**q))/((e + f*x)*(e*i*x + f*g)), x), x) def With2048(a, b, c, d, e, f, g, h, p, q, x): u = IntHide(S(1)/sqrt(g + h*x**S(2)), x) return -Dist(b*f*p*q, Int(SimplifyIntegrand(u/(e + f*x), x), x), x) + Simp(u*(a + b*log(c*(d*(e + f*x)**p)**q)), x) def With2049(a, b, c, d, e, f, g1, g2, h1, h2, p, q, x): u = IntHide(S(1)/sqrt(g1*g2 + h1*h2*x**S(2)), x) return -Dist(b*f*p*q, Int(SimplifyIntegrand(u/(e + f*x), x), x), x) + Simp(u*(a + b*log(c*(d*(e + f*x)**p)**q)), x) def replacement2050(a, b, c, d, e, f, g, h, p, q, x): return Dist(sqrt(S(1) + h*x**S(2)/g)/sqrt(g + h*x**S(2)), Int((a + b*log(c*(d*(e + f*x)**p)**q))/sqrt(S(1) + h*x**S(2)/g), x), x) def replacement2051(a, b, c, d, e, f, g1, g2, h1, h2, p, q, x): return Dist(sqrt(S(1) + h1*h2*x**S(2)/(g1*g2))/(sqrt(g1 + h1*x)*sqrt(g2 + h2*x)), Int((a + b*log(c*(d*(e + f*x)**p)**q))/sqrt(S(1) + h1*h2*x**S(2)/(g1*g2)), x), x) def replacement2052(a, b, c, d, e, f, g, h, i, j, k, n, p, q, x): return Dist(b*f*n*p*q/h, Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(-1))*PolyLog(S(2), Together(-i*(j + k*x) + S(1)))/(e + f*x), x), x) - Simp((a + b*log(c*(d*(e + f*x)**p)**q))**n*PolyLog(S(2), Together(-i*(j + k*x) + S(1)))/h, x) def replacement2053(a, b, c, d, e, f, g, h, i, j, k, m, n, p, q, x): return Dist(b*f*n*p*q/(h*m), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(-1))*PolyLog(S(2), -i*(j + k*x)**m)/(e + f*x), x), x) - Simp((a + b*log(c*(d*(e + f*x)**p)**q))**n*PolyLog(S(2), -i*(j + k*x)**m)/(h*m), x) def replacement2054(a, b, c, d, e, f, g, h, i, j, k, m, n, p, q, r, x): return -Dist(b*f*n*p*q/(h*m), Int((a + b*log(c*(d*(e + f*x)**p)**q))**(n + S(-1))*PolyLog(r + S(1), i*(j + k*x)**m)/(e + f*x), x), x) + Simp((a + b*log(c*(d*(e + f*x)**p)**q))**n*PolyLog(r + S(1), i*(j + k*x)**m)/(h*m), x) def With2055(F, Px, a, b, c, d, e, f, g, h, m, p, q, x): u = IntHide(Px*F(g + h*x)**m, x) return -Dist(b*f*p*q, Int(SimplifyIntegrand(u/(e + f*x), x), x), x) + Dist(a + b*log(c*(d*(e + f*x)**p)**q), u, x) def replacement2056(a, b, c, d, e, f, m, n, p, q, x): return Dist(S(1)/m, Subst(Int((a + b*log(c*(d*(e + f*x)**p)**q))**n/x, x), x, x**m), x) def replacement2057(a, b, c, d, e, f, m, n, p, q, r, x): return Dist(S(1)/m, Subst(Int((a + b*log(c*(d*(e + f*x)**p)**q))**n/x, x), x, x**m), x) def replacement2058(a, b, c, d, e, f, n, p, q, r, r1, x): return Dist(S(1)/r, Subst(Int((a + b*log(c*(d*(e + f*x)**p)**q))**n, x), x, x**r), x) def replacement2059(a, b, c, d, e, f, g, h, m, n, p, q, r, r1, x): return Dist(S(1)/r, Subst(Int((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**m, x), x, x**r), x) def With2060(a, b, c, d, e, n, x): u = IntHide(S(1)/(d + e*x**S(2)), x) return -Dist(b*n, Int(u/x, x), x) + Dist(a + b*log(c*x**n), u, x) def replacement2061(a, b, c, d, e, mn, n, x): return Simp(PolyLog(S(2), -Together(b*c*x**(-n)*(d + e*x**n)/d))/(d*n), x) def replacement2062(a, b, c, d, e, mn, n, x): return Simp(PolyLog(S(2), -Together(b*c*x**(-n)*(d + e*x**n)/d))/(d*n), x) def replacement2063(Px, a, b, c, d, e, f, n, p, q, x): return Int(ExpandIntegrand(Px*(a + b*log(c*(d*(e + f*x)**p)**q))**n, x), x) def With2064(RFx, a, b, c, d, e, f, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand((a + b*log(c*(d*(e + f*x)**p)**q))**n, RFx, x) if SumQ(u): return True return False def replacement2064(RFx, a, b, c, d, e, f, n, p, q, x): u = ExpandIntegrand((a + b*log(c*(d*(e + f*x)**p)**q))**n, RFx, x) return Int(u, x) def With2065(RFx, a, b, c, d, e, f, n, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(RFx*(a + b*log(c*(d*(e + f*x)**p)**q))**n, x) if SumQ(u): return True return False def replacement2065(RFx, a, b, c, d, e, f, n, p, q, x): u = ExpandIntegrand(RFx*(a + b*log(c*(d*(e + f*x)**p)**q))**n, x) return Int(u, x) def replacement2066(a, b, c, d, e, f, g, n, p, q, u, x): return Int(u*(a + b*log(c*(S(4)**(-p)*d*g**(-p)*(f + S(2)*g*x)**(S(2)*p))**q))**n, x) def replacement2067(a, b, c, d, n, p, q, u, v, x): return Int(u*(a + b*log(c*(d*ExpandToSum(v, x)**p)**q))**n, x) def replacement2068(a, b, c, n, p, q, r, x): return Subst(Int(log(x**(n*p*q))**r, x), x**(n*p*q), a*(b*(c*x**n)**p)**q) def replacement2069(a, b, c, m, n, p, q, r, x): return Subst(Int(x**m*log(x**(n*p*q))**r, x), x**(n*p*q), a*(b*(c*x**n)**p)**q) def replacement2070(a, b, c, d, e, e1, n, p, u, x): return Dist(log(e*(b*e1/d)**n)**p, Int(u, x), x) def replacement2071(a, b, c, d, e, e1, n, n1, n2, p, x): return -Dist(n*n1*p*(-a*d + b*c)/b, Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**(p + S(-1))/(c + d*x), x), x) + Simp((a + b*x)*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/b, x) def replacement2072(a, b, c, d, e, f, g, x): return Simp(PolyLog(S(2), Together(-a*e + c)/(c + d*x))/g, x) def replacement2073(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return Dist(n*n1*p*(-a*d + b*c)/g, Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**(p + S(-1))*log((-a*d + b*c)/(b*(c + d*x)))/((a + b*x)*(c + d*x)), x), x) - Simp(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p*log((-a*d + b*c)/(b*(c + d*x)))/g, x) def replacement2074(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return Dist(n*n1*p*(-a*d + b*c)/g, Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**(p + S(-1))*log(-(-a*d + b*c)/(d*(a + b*x)))/((a + b*x)*(c + d*x)), x), x) - Simp(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p*log(-(-a*d + b*c)/(d*(a + b*x)))/g, x) def replacement2075(a, b, c, d, e, e1, f, g, n, n1, n2, x): return -Dist(n*n1*(-a*d + b*c)/g, Int(log(f + g*x)/((a + b*x)*(c + d*x)), x), x) + Simp(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)*log(f + g*x)/g, x) def replacement2076(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return Dist(d/g, Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/(c + d*x), x), x) - Dist((-c*g + d*f)/g, Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/((c + d*x)*(f + g*x)), x), x) def replacement2077(a, b, c, d, e, f, g, x): return Simp(d**S(2)*LogIntegral(e*(a + b*x)/(c + d*x))/(e*g**S(2)*(-a*d + b*c)), x) def replacement2078(a, b, c, d, e, e1, f, g, n, n1, n2, x): return Simp(d**S(2)*(e*(e1*(a + b*x)**n1*(c + d*x)**n2)**n)**(-S(1)/(n*n1))*(a + b*x)*ExpIntegralEi(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)/(n*n1))/(g**S(2)*n*n1*(c + d*x)*(-a*d + b*c)), x) def replacement2079(a, b, c, d, e, e1, f, g, n, n1, n2, x): return Simp(b**S(2)*(e*(e1*(a + b*x)**n1*(c + d*x)**n2)**n)**(S(1)/(n*n1))*(c + d*x)*ExpIntegralEi(-log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)/(n*n1))/(g**S(2)*n*n1*(a + b*x)*(-a*d + b*c)), x) def replacement2080(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return -Dist(n*n1*p*(-a*d + b*c)/(-a*g + b*f), Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**(p + S(-1))/((c + d*x)*(f + g*x)), x), x) + Simp((a + b*x)*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/((f + g*x)*(-a*g + b*f)), x) def replacement2081(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return -Dist(n*n1*p*(-a*d + b*c)/(-c*g + d*f), Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**(p + S(-1))/((a + b*x)*(f + g*x)), x), x) + Simp((c + d*x)*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/((f + g*x)*(-c*g + d*f)), x) def replacement2082(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return Dist(b/(-a*g + b*f), Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/(f + g*x)**S(2), x), x) - Dist(g/(-a*g + b*f), Int((a + b*x)*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/(f + g*x)**S(3), x), x) def replacement2083(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return Dist(d/(-c*g + d*f), Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/(f + g*x)**S(2), x), x) - Dist(g/(-c*g + d*f), Int((c + d*x)*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/(f + g*x)**S(3), x), x) def replacement2084(a, b, c, d, e, e1, f, g, m, n, n1, n2, p, x): return -Dist(n*n1*p*(-a*d + b*c)/(g*(m + S(1))), Int((f + g*x)**(m + S(1))*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) + Simp((f + g*x)**(m + S(1))*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/(g*(m + S(1))), x) def replacement2085(a, b, c, d, e, m, m2, n, p, u, x): return -Dist(n*p/(m + S(1)), Int((a + b*x)**m*(c + d*x)**(-m + S(-2))*log(e*u**n)**(p + S(-1)), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(-m + S(-1))*log(e*u**n)**p/((m + S(1))*(-a*d + b*c)), x) def replacement2086(a, b, c, d, m, m2, p, u, x): return -Dist(p/(m + S(1)), Int((a + b*x)**m*(c + d*x)**(-m + S(-2))*log(u)**(p + S(-1)), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(-m + S(-1))*log(u)**p/((m + S(1))*(-a*d + b*c)), x) def replacement2087(a, b, c, d, e, m, m2, n, u, x): return Simp((e*u**n)**(-(m + S(1))/n)*(a + b*x)**(m + S(1))*(c + d*x)**(-m + S(-1))*ExpIntegralEi((m + S(1))*log(e*u**n)/n)/(n*(-a*d + b*c)), x) def replacement2088(a, b, c, d, m, m2, u, x): return Simp(u**(-m + S(-1))*(a + b*x)**(m + S(1))*(c + d*x)**(-m + S(-1))*ExpIntegralEi((m + S(1))*log(u))/(-a*d + b*c), x) def replacement2089(a, b, c, d, e, m, m2, n, p, u, x): return -Dist((m + S(1))/(n*(p + S(1))), Int((a + b*x)**m*(c + d*x)**(-m + S(-2))*log(e*u**n)**(p + S(1)), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(-m + S(-1))*log(e*u**n)**(p + S(1))/(n*(p + S(1))*(-a*d + b*c)), x) def replacement2090(a, b, c, d, m, m2, p, u, x): return -Dist((m + S(1))/(p + S(1)), Int((a + b*x)**m*(c + d*x)**(-m + S(-2))*log(u)**(p + S(1)), x), x) + Simp((a + b*x)**(m + S(1))*(c + d*x)**(-m + S(-1))*log(u)**(p + S(1))/((p + S(1))*(-a*d + b*c)), x) def replacement2091(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return Dist(d/g, Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/(c + d*x)**S(2), x), x) def replacement2092(a, b, c, d, e, f, g, x): return Simp(PolyLog(S(2), -(f + g*x)*(a*e - c)/(f*(c + d*x)))/(-c*g + d*f), x) def replacement2093(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return Dist(n*n1*p*(-a*d + b*c)/(-c*g + d*f), Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**(p + S(-1))*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/((a + b*x)*(c + d*x)), x), x) - Simp(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f), x) def replacement2094(a, b, c, d, e, f, g, x): return Simp(c*PolyLog(S(2), -(c - d*x)*(a*e - c)/(c*(c + d*x)))/(S(2)*d*f), x) def replacement2095(a, b, c, d, e, e1, f, g, h, n, n1, n2, p, x): return Dist(d**S(2), Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/((c + d*x)*(-c*h + d*g + d*h*x)), x), x) def replacement2096(a, b, c, d, e, e1, f, h, n, n1, n2, p, x): return -Dist(d**S(2)/h, Int(log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/((c - d*x)*(c + d*x)), x), x) def replacement2097(a, b, c, d, e, e1, f, g, n, n1, n2, p, x): return Dist(b/(g*n*n1*(-a*d + b*c)), Subst(Int(x**p, x), x, log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)), x) def replacement2098(a, b, c, d, e, n, p, u, v, x): return Dist(n*p, Int(PolyLog(S(2), Together(S(1) - v))*log(e*u**n)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) - Simp(PolyLog(S(2), Together(S(1) - v))*log(e*u**n)**p/(-a*d + b*c), x) def replacement2099(a, b, c, d, p, u, v, x): return Dist(p, Int(PolyLog(S(2), Together(S(1) - v))*log(u)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) - Simp(PolyLog(S(2), Together(S(1) - v))*log(u)**p/(-a*d + b*c), x) def With2100(a, b, c, d, e, n, p, u, v, x): f = (S(1) - v)/u return Dist(f/(n*(p + S(1))), Int(log(e*u**n)**(p + S(1))/((c + d*x)*(-a*f - b*f + c + d)), x), x) + Simp(log(v)*log(e*u**n)**(p + S(1))/(n*(p + S(1))*(-a*d + b*c)), x) def With2101(a, b, c, d, p, u, v, x): f = (S(1) - v)/u return Dist(f/(p + S(1)), Int(log(u)**(p + S(1))/((c + d*x)*(-a*f - b*f + c + d)), x), x) + Simp(log(u)**(p + S(1))*log(v)/((p + S(1))*(-a*d + b*c)), x) def replacement2102(a, b, c, d, e, n, p, u, v, x): return -Dist(n*p, Int(PolyLog(S(2), Together(S(1) - v))*log(e*u**n)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) + Simp(PolyLog(S(2), Together(S(1) - v))*log(e*u**n)**p/(-a*d + b*c), x) def replacement2103(a, b, c, d, p, u, v, x): return -Dist(p, Int(PolyLog(S(2), Together(S(1) - v))*log(u)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) + Simp(PolyLog(S(2), Together(S(1) - v))*log(u)**p/(-a*d + b*c), x) def With2104(a, b, c, d, e, n, p, u, v, x): f = u*(S(1) - v) return -Dist(f/(n*(p + S(1))), Int(log(e*u**n)**(p + S(1))/((a + b*x)*(a + b - c*f - d*f)), x), x) + Simp(log(v)*log(e*u**n)**(p + S(1))/(n*(p + S(1))*(-a*d + b*c)), x) def With2105(a, b, c, d, p, u, v, x): f = u*(S(1) - v) return -Dist(f/(p + S(1)), Int(log(u)**(p + S(1))/((a + b*x)*(a + b - c*f - d*f)), x), x) + Simp(log(u)**(p + S(1))*log(v)/((p + S(1))*(-a*d + b*c)), x) def replacement2106(a, b, c, d, e, n, p, q, u, v, x): return -Dist(n*p, Int(PolyLog(q + S(1), v)*log(e*u**n)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) + Simp(PolyLog(q + S(1), v)*log(e*u**n)**p/(-a*d + b*c), x) def replacement2107(a, b, c, d, p, q, u, v, x): return -Dist(p, Int(PolyLog(q + S(1), v)*log(u)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) + Simp(PolyLog(q + S(1), v)*log(u)**p/(-a*d + b*c), x) def replacement2108(a, b, c, d, e, n, p, q, u, v, x): return -Dist(S(1)/(n*(p + S(1))), Int(PolyLog(q + S(-1), v)*log(e*u**n)**(p + S(1))/((a + b*x)*(c + d*x)), x), x) + Simp(PolyLog(q, v)*log(e*u**n)**(p + S(1))/(n*(p + S(1))*(-a*d + b*c)), x) def replacement2109(a, b, c, d, p, q, u, v, x): return -Dist(S(1)/(p + S(1)), Int(PolyLog(q + S(-1), v)*log(u)**(p + S(1))/((a + b*x)*(c + d*x)), x), x) + Simp(PolyLog(q, v)*log(u)**(p + S(1))/((p + S(1))*(-a*d + b*c)), x) def replacement2110(a, b, c, d, e, n, p, q, u, v, x): return Dist(n*p, Int(PolyLog(q + S(1), v)*log(e*u**n)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) - Simp(PolyLog(q + S(1), v)*log(e*u**n)**p/(-a*d + b*c), x) def replacement2111(a, b, c, d, p, q, u, v, x): return Dist(p, Int(PolyLog(q + S(1), v)*log(u)**(p + S(-1))/((a + b*x)*(c + d*x)), x), x) - Simp(PolyLog(q + S(1), v)*log(u)**p/(-a*d + b*c), x) def replacement2112(a, b, c, d, e, n, p, q, u, v, x): return Dist(S(1)/(n*(p + S(1))), Int(PolyLog(q + S(-1), v)*log(e*u**n)**(p + S(1))/((a + b*x)*(c + d*x)), x), x) + Simp(PolyLog(q, v)*log(e*u**n)**(p + S(1))/(n*(p + S(1))*(-a*d + b*c)), x) def replacement2113(a, b, c, d, p, q, u, v, x): return Dist(S(1)/(p + S(1)), Int(PolyLog(q + S(-1), v)*log(u)**(p + S(1))/((a + b*x)*(c + d*x)), x), x) + Simp(PolyLog(q, v)*log(u)**(p + S(1))/((p + S(1))*(-a*d + b*c)), x) def replacement2114(a, b, c, d, e, e1, f, g, h, n, n1, n2, p, u, x): return Dist(b*d/h, Int(u*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/((a + b*x)*(c + d*x)), x), x) def replacement2115(a, b, c, d, e, e1, f, h, n, n1, n2, p, u, x): return Dist(b*d/h, Int(u*log(e*(e1*(a + b*x)**n1*(c + d*x)**(-n1))**n)**p/((a + b*x)*(c + d*x)), x), x) def With2116(a, b, c, d, e, e1, f, g, h, n, n1, n2, x): u = IntHide(S(1)/(f + g*x + h*x**S(2)), x) return -Dist(n*(-a*d + b*c), Int(u/((a + b*x)*(c + d*x)), x), x) + Simp(u*log(e*(e1*(a + b*x)**n1*(c + d*x)**n2)**n), x) def With2117(a, b, c, d, e, e1, f, h, n, n1, n2, x): u = IntHide(S(1)/(f + h*x**S(2)), x) return -Dist(n*(-a*d + b*c), Int(u/((a + b*x)*(c + d*x)), x), x) + Simp(u*log(e*(e1*(a + b*x)**n1*(c + d*x)**n2)**n), x) def With2118(RFx, a, b, c, d, e, e1, n, n1, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(log(e*(e1*(a + b*x)**n1*(c + d*x)**n2)**n)**p, RFx, x) if SumQ(u): return True return False def replacement2118(RFx, a, b, c, d, e, e1, n, n1, n2, p, x): u = ExpandIntegrand(log(e*(e1*(a + b*x)**n1*(c + d*x)**n2)**n)**p, RFx, x) return Int(u, x) def With2119(p, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False lst = QuotientOfLinearsParts(v, x) if Not(And(OneQ(p), ZeroQ(Part(lst, S(3))))): return True return False def replacement2119(p, u, v, x): lst = QuotientOfLinearsParts(v, x) return Int(u*log((x*Part(lst, S(2)) + Part(lst, S(1)))/(x*Part(lst, S(4)) + Part(lst, S(3))))**p, x) def replacement2120(a, b, c, n, p, x): return -Dist(b*n*p, Int(x**n/(a + b*x**n), x), x) + Simp(x*log(c*(a + b*x**n)**p), x) def replacement2121(c, p, v, x): return Int(log(c*ExpandToSum(v, x)**p), x) def replacement2122(a, b, c, d, e, f, g, n, p, x): return -Dist(b*e*n*p/g, Int(x**(n + S(-1))*log(f + g*x)/(d + e*x**n), x), x) + Simp((a + b*log(c*(d + e*x**n)**p))*log(f + g*x)/g, x) def replacement2123(a, b, c, d, e, f, g, m, n, p, x): return -Dist(b*e*n*p/(g*(m + S(1))), Int(x**(n + S(-1))*(f + g*x)**(m + S(1))/(d + e*x**n), x), x) + Simp((a + b*log(c*(d + e*x**n)**p))*(f + g*x)**(m + S(1))/(g*(m + S(1))), x) def replacement2124(a, b, c, m, p, u, v, x): return Int((a + b*log(c*ExpandToSum(v, x)**p))*ExpandToSum(u, x)**m, x) def With2125(a, b, c, d, e, f, g, m, n, p, x): w = IntHide(asin(f + g*x)**m, x) return -Dist(b*e*n*p, Int(SimplifyIntegrand(w*x**(n + S(-1))/(d + e*x**n), x), x), x) + Dist(a + b*log(c*(d + e*x**n)**p), w, x) def With2126(a, b, c, d, e, f, g, p, x): u = IntHide(S(1)/(f + g*x**S(2)), x) return -Dist(S(2)*b*e*p, Int(u*x/(d + e*x**S(2)), x), x) + Simp(u*(a + b*log(c*(d + e*x**S(2))**p)), x) def replacement2127(a, b, c, d, e, n, p, x): return -Dist(S(2)*b*e*n*p, Int(x**S(2)*(a + b*log(c*(d + e*x**S(2))**p))**(n + S(-1))/(d + e*x**S(2)), x), x) + Simp(x*(a + b*log(c*(d + e*x**S(2))**p))**n, x) def replacement2128(a, b, c, d, e, m, n, p, x): return Dist(S(1)/2, Subst(Int(x**(m/S(2) + S(-1)/2)*(a + b*log(c*(d + e*x)**p))**n, x), x, x**S(2)), x) def replacement2129(a, b, c, d, e, m, n, p, x): return -Dist(S(2)*b*e*n*p/(m + S(1)), Int(x**(m + S(2))*(a + b*log(c*(d + e*x**S(2))**p))**(n + S(-1))/(d + e*x**S(2)), x), x) + Simp(x**(m + S(1))*(a + b*log(c*(d + e*x**S(2))**p))**n/(m + S(1)), x) def With2130(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: w = DerivativeDivides(v, u*(S(1) - v), x) res = Not(FalseQ(w)) except (TypeError, AttributeError): return False if res: return True return False def replacement2130(u, v, x): w = DerivativeDivides(v, u*(S(1) - v), x) return Simp(w*PolyLog(S(2), Together(S(1) - v)), x) def With2131(a, b, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False try: z = DerivativeDivides(v, w*(S(1) - v), x) res = Not(FalseQ(z)) except (TypeError, AttributeError): return False if res: return True return False def replacement2131(a, b, u, v, w, x): z = DerivativeDivides(v, w*(S(1) - v), x) return -Dist(b, Int(SimplifyIntegrand(z*D(u, x)*PolyLog(S(2), Together(S(1) - v))/u, x), x), x) + Simp(z*(a + b*log(u))*PolyLog(S(2), Together(S(1) - v)), x) def replacement2132(a, b, c, d, e, n, p, x): return -Dist(b*n*p, Int(S(1)/(a*(d + e*x)**(-n) + b), x), x) + Simp((d + e*x)*log(c*(a + b*(d + e*x)**n)**p)/e, x) def replacement2133(a, b, c, d, e, n, p, x): return Dist(a*n*p, Int(S(1)/(a + b*(d + e*x)**n), x), x) + Simp((d + e*x)*log(c*(a + b*(d + e*x)**n)**p)/e, x) - Simp(n*p*x, x) def replacement2134(a, b, c, d, e, f, g, n, p, x): return -Dist(b*e*n*p/(d*g), Subst(Int((a + b*log(c*(d + e*x)**p))**(n + S(-1))/x, x), x, S(1)/(f + g*x)), x) + Simp((a + b*log(c*(d + e/(f + g*x))**p))**n*(d*(f + g*x) + e)/(d*g), x) def replacement2135(RFx, a, b, c, n, p, x): return -Dist(b*n*p, Int(SimplifyIntegrand(x*(a + b*log(RFx**p*c))**(n + S(-1))*D(RFx, x)/RFx, x), x), x) + Simp(x*(a + b*log(RFx**p*c))**n, x) def replacement2136(RFx, a, b, c, d, e, n, p, x): return -Dist(b*n*p/e, Int((a + b*log(RFx**p*c))**(n + S(-1))*D(RFx, x)*log(d + e*x)/RFx, x), x) + Simp((a + b*log(RFx**p*c))**n*log(d + e*x)/e, x) def replacement2137(RFx, a, b, c, d, e, m, n, p, x): return -Dist(b*n*p/(e*(m + S(1))), Int(SimplifyIntegrand((a + b*log(RFx**p*c))**(n + S(-1))*(d + e*x)**(m + S(1))*D(RFx, x)/RFx, x), x), x) + Simp((a + b*log(RFx**p*c))**n*(d + e*x)**(m + S(1))/(e*(m + S(1))), x) def With2138(RFx, c, d, e, n, x): u = IntHide(S(1)/(d + e*x**S(2)), x) return -Dist(n, Int(SimplifyIntegrand(u*D(RFx, x)/RFx, x), x), x) + Simp(u*log(RFx**n*c), x) def With2139(Px, Qx, c, n, x): u = IntHide(S(1)/Qx, x) return -Dist(n, Int(SimplifyIntegrand(u*D(Px, x)/Px, x), x), x) + Simp(u*log(Px**n*c), x) def With2140(RFx, RGx, a, b, c, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand((a + b*log(RFx**p*c))**n, RGx, x) if SumQ(u): return True return False def replacement2140(RFx, RGx, a, b, c, n, p, x): u = ExpandIntegrand((a + b*log(RFx**p*c))**n, RGx, x) return Int(u, x) def With2141(RFx, RGx, a, b, c, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = ExpandIntegrand(RGx*(a + b*log(RFx**p*c))**n, x) if SumQ(u): return True return False def replacement2141(RFx, RGx, a, b, c, n, p, x): u = ExpandIntegrand(RGx*(a + b*log(RFx**p*c))**n, x) return Int(u, x) def With2142(RFx, a, b, u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = SubstForFractionalPowerOfLinear(RFx*(a + b*log(u)), x) res = Not(FalseQ(lst)) except (TypeError, AttributeError): return False if res: return True return False def replacement2142(RFx, a, b, u, x): lst = SubstForFractionalPowerOfLinear(RFx*(a + b*log(u)), x) return Dist(Part(lst, S(2))*Part(lst, S(4)), Subst(Int(Part(lst, S(1)), x), x, Part(lst, S(3))**(S(1)/Part(lst, S(2)))), x) def replacement2143(F, a, b, c, e, f, g, m, n, x): return Dist(g*m/(b*c*n*log(F)), Int((f + g*x)**(m + S(-1))*PolyLog(S(2), -e*(F**(c*(a + b*x)))**n), x), x) - Simp((f + g*x)**m*PolyLog(S(2), -e*(F**(c*(a + b*x)))**n)/(b*c*n*log(F)), x) def replacement2144(F, a, b, c, d, e, f, g, m, n, x): return Int((f + g*x)**m*log(S(1) + e*(F**(c*(a + b*x)))**n/d), x) - Simp((f + g*x)**(m + S(1))*log(S(1) + e*(F**(c*(a + b*x)))**n/d)/(g*(m + S(1))), x) + Simp((f + g*x)**(m + S(1))*log(d + e*(F**(c*(a + b*x)))**n)/(g*(m + S(1))), x) def replacement2145(a, b, c, d, e, f, x): return Dist(f**S(2)*(-S(4)*a*c + b**S(2))/S(2), Int(x/(-f*sqrt(a + b*x + c*x**S(2))*(-S(2)*a*e + b*d + x*(-b*e + S(2)*c*d)) + (-b*f**S(2) + S(2)*d*e)*(a + b*x + c*x**S(2))), x), x) + Simp(x*log(d + e*x + f*sqrt(a + b*x + c*x**S(2))), x) def replacement2146(a, c, d, e, f, x): return -Dist(a*c*f**S(2), Int(x/(d*e*(a + c*x**S(2)) + f*sqrt(a + c*x**S(2))*(a*e - c*d*x)), x), x) + Simp(x*log(d + e*x + f*sqrt(a + c*x**S(2))), x) def replacement2147(a, b, c, d, e, f, g, m, x): return Dist(f**S(2)*(-S(4)*a*c + b**S(2))/(S(2)*g*(m + S(1))), Int((g*x)**(m + S(1))/(-f*sqrt(a + b*x + c*x**S(2))*(-S(2)*a*e + b*d + x*(-b*e + S(2)*c*d)) + (-b*f**S(2) + S(2)*d*e)*(a + b*x + c*x**S(2))), x), x) + Simp((g*x)**(m + S(1))*log(d + e*x + f*sqrt(a + b*x + c*x**S(2)))/(g*(m + S(1))), x) def replacement2148(a, c, d, e, f, g, m, x): return -Dist(a*c*f**S(2)/(g*(m + S(1))), Int((g*x)**(m + S(1))/(d*e*(a + c*x**S(2)) + f*sqrt(a + c*x**S(2))*(a*e - c*d*x)), x), x) + Simp((g*x)**(m + S(1))*log(d + e*x + f*sqrt(a + c*x**S(2)))/(g*(m + S(1))), x) def replacement2149(d, e, f, u, v, x): return Int(v*log(d + e*x + f*sqrt(ExpandToSum(u, x))), x) def replacement2150(u, x): return -Int(SimplifyIntegrand(x*D(u, x)/u, x), x) + Simp(x*log(u), x) def replacement2151(a, b, u, x): return -Dist(S(1)/b, Int(SimplifyIntegrand(D(u, x)*log(a + b*x)/u, x), x), x) + Simp(log(u)*log(a + b*x)/b, x) def replacement2152(a, b, m, u, x): return -Dist(S(1)/(b*(m + S(1))), Int(SimplifyIntegrand((a + b*x)**(m + S(1))*D(u, x)/u, x), x), x) + Simp((a + b*x)**(m + S(1))*log(u)/(b*(m + S(1))), x) def With2153(Qx, u, x): v = IntHide(S(1)/Qx, x) return -Int(SimplifyIntegrand(v*D(u, x)/u, x), x) + Simp(v*log(u), x) def replacement2154(a, u, x): return -Int(SimplifyIntegrand(u**(a*x + S(-1))*x*D(u, x), x), x) + Simp(u**(a*x)/a, x) def With2155(u, v, x): if isinstance(x, (int, Integer, float, Float)): return False w = IntHide(v, x) if InverseFunctionFreeQ(w, x): return True return False def replacement2155(u, v, x): w = IntHide(v, x) return Dist(log(u), w, x) - Int(SimplifyIntegrand(w*D(u, x)/u, x), x) def replacement2156(v, w, x): return -Int(SimplifyIntegrand(x*D(v, x)*log(w)/v, x), x) - Int(SimplifyIntegrand(x*D(w, x)*log(v)/w, x), x) + Simp(x*log(v)*log(w), x) def With2157(u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False z = IntHide(u, x) if InverseFunctionFreeQ(z, x): return True return False def replacement2157(u, v, w, x): z = IntHide(u, x) return Dist(log(v)*log(w), z, x) - Int(SimplifyIntegrand(z*D(v, x)*log(w)/v, x), x) - Int(SimplifyIntegrand(z*D(w, x)*log(v)/w, x), x) def replacement2158(a, b, n, p, x): return -Dist(n*p, Int(S(1)/log(b*x**n), x), x) + Simp(x*log(a*log(b*x**n)**p), x) def replacement2159(a, b, n, p, x): return Simp((-p + log(a*log(b*x**n)**p))*log(b*x**n)/n, x) def replacement2160(a, b, m, n, p, x): return -Dist(n*p/(m + S(1)), Int(x**m/log(b*x**n), x), x) + Simp(x**(m + S(1))*log(a*log(b*x**n)**p)/(m + S(1)), x) def replacement2161(A, B, a, b, c, d, x): return Dist(B/b, Int(sqrt(a + b*log(c + d*x)), x), x) + Dist((A*b - B*a)/b, Int(S(1)/sqrt(a + b*log(c + d*x)), x), x) def replacement2162(a, f, u, x): return Int(u**(a*log(f)), x) def With2163(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: lst = FunctionOfLog(u*x, x) res = Not(FalseQ(lst)) except (TypeError, AttributeError): return False if res: return True return False def replacement2163(u, x): lst = FunctionOfLog(u*x, x) return Dist(S(1)/Part(lst, S(3)), Subst(Int(Part(lst, S(1)), x), x, log(Part(lst, S(2)))), x) def replacement2164(u, v, x): return Dist(-LogGamma(v) + log(Gamma(v)), Int(u, x), x) + Int(u*LogGamma(v), x) def replacement2165(a, b, n, p, u, v, w, x): return Int(u*w**p*(a + b*log(v)**n)**p, x) def replacement2166(a, b, c, d, e, f, n, p, q, u, x): return Int(u*(a + b*log(c*(d*(e + f*x)**p)**q))**n, x)
0900af68c5367d105b38b5f8426b37b6859aa85d74aa8e6d434a5c6b2da9982e
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def trinomial_products(): from sympy.integrals.rubi.constraints import cons48, cons89, cons465, cons40, cons2, cons3, cons8, cons491, cons5, cons47, cons149, cons666, cons4, cons667, cons586, cons668, cons13, cons165, cons669, cons316, cons670, cons464, cons198, cons671, cons672, cons148, cons673, cons674, cons340, cons139, cons228, cons130, cons248, cons675, cons676, cons415, cons677, cons295, cons678, cons679, cons486, cons179, cons680, cons681, cons682, cons587, cons683, cons70, cons71, cons55, cons19, cons503, cons29, cons65, cons504, cons684, cons157, cons685, cons686, cons227, cons58, cons245, cons150, cons246, cons687, cons20, cons688, cons689, cons512, cons690, cons691, cons692, cons531, cons33, cons532, cons693, cons96, cons369, cons358, cons502, cons694, cons695, cons696, cons697, cons698, cons699, cons700, cons701, cons702, cons703, cons543, cons25, cons704, cons554, cons555, cons556, cons222, cons50, cons52, cons705, cons706, cons258, cons259, cons281, cons223, cons282, cons397, cons398, cons707, cons708, cons709, cons710, cons711, cons87, cons712, cons713, cons714, cons715, cons588, cons388, cons151, cons716, cons45, cons717, cons450, cons718, cons402, cons719, cons720, cons721, cons349, cons566, cons722, cons270, cons723, cons724, cons725, cons726, cons727, cons728, cons729, cons730, cons127, cons210, cons54, cons595, cons731, cons732, cons733, cons654, cons734, cons656, cons36, cons37, cons735, cons21, cons736, cons466, cons737, cons170, cons269, cons738, cons739, cons740, cons741, cons742, cons83, cons436, cons743, cons744, cons745, cons746, cons613, cons405, cons747, cons748, cons749, cons750, cons751, cons752, cons753, cons754, cons755, cons756, cons757, cons758, cons759, cons760, cons761, cons762, cons608, cons763, cons764, cons765, cons766, cons767, cons768, cons769, cons770, cons771, cons772, cons773, cons774, cons775, cons776, cons777, cons778, cons779, cons780, cons781, cons782, cons783, cons784, cons785, cons786, cons787, cons788, cons789, cons790, cons791, cons792, cons793, cons794, cons795, cons796, cons797, cons798, cons799 pattern1079 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons48, cons89, cons465, cons40) rule1079 = ReplacementRule(pattern1079, replacement1079) pattern1080 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons48, cons491) rule1080 = ReplacementRule(pattern1080, With1080) pattern1081 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons48, cons47, cons149, cons666) rule1081 = ReplacementRule(pattern1081, replacement1081) pattern1082 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons48, cons47, cons149, cons667, cons586) rule1082 = ReplacementRule(pattern1082, replacement1082) pattern1083 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons48, cons47, cons668, cons13, cons165, cons669) rule1083 = ReplacementRule(pattern1083, replacement1083) pattern1084 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons48, cons47, cons668, cons13, cons165, cons316) rule1084 = ReplacementRule(pattern1084, replacement1084) pattern1085 = Pattern(Integral(sqrt(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons4, cons48, cons47, cons586, cons670, cons464) rule1085 = ReplacementRule(pattern1085, replacement1085) pattern1086 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons48, cons47, cons149, cons198) rule1086 = ReplacementRule(pattern1086, replacement1086) pattern1087 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons48, cons47, cons149, cons671, cons672, cons13, cons148) rule1087 = ReplacementRule(pattern1087, replacement1087) pattern1088 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons48, cons47, cons149, cons673, cons674, cons340, cons139) rule1088 = ReplacementRule(pattern1088, replacement1088) pattern1089 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons48, cons47, cons149) rule1089 = ReplacementRule(pattern1089, replacement1089) pattern1090 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons48, cons198) rule1090 = ReplacementRule(pattern1090, replacement1090) pattern1091 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons48, cons228, cons130) rule1091 = ReplacementRule(pattern1091, replacement1091) pattern1092 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons48, cons228, cons13, cons165, cons671, cons248, cons675) rule1092 = ReplacementRule(pattern1092, replacement1092) pattern1093 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons48, cons228, cons13, cons139, cons248, cons675) rule1093 = ReplacementRule(pattern1093, replacement1093) pattern1094 = Pattern(Integral(S(1)/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons48, cons228, cons676, cons415) rule1094 = ReplacementRule(pattern1094, With1094) pattern1095 = Pattern(Integral(S(1)/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons48, cons228) rule1095 = ReplacementRule(pattern1095, With1095) pattern1096 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, cons295) rule1096 = ReplacementRule(pattern1096, With1096) pattern1097 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, cons678, cons679) rule1097 = ReplacementRule(pattern1097, With1097) pattern1098 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, cons486, cons179, CustomConstraint(With1098)) rule1098 = ReplacementRule(pattern1098, replacement1098) pattern1099 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, cons486, cons179) rule1099 = ReplacementRule(pattern1099, With1099) pattern1100 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, CustomConstraint(With1100)) rule1100 = ReplacementRule(pattern1100, replacement1100) pattern1101 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, CustomConstraint(With1101)) rule1101 = ReplacementRule(pattern1101, replacement1101) pattern1102 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, CustomConstraint(With1102)) rule1102 = ReplacementRule(pattern1102, replacement1102) pattern1103 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, CustomConstraint(With1103)) rule1103 = ReplacementRule(pattern1103, replacement1103) pattern1104 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons228, cons680) rule1104 = ReplacementRule(pattern1104, With1104) pattern1105 = Pattern(Integral(S(1)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons228, cons681) rule1105 = ReplacementRule(pattern1105, With1105) pattern1106 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons682) rule1106 = ReplacementRule(pattern1106, replacement1106) pattern1107 = Pattern(Integral((a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons587, cons40, cons683) rule1107 = ReplacementRule(pattern1107, replacement1107) pattern1108 = Pattern(Integral((a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons587, cons149, cons683) rule1108 = ReplacementRule(pattern1108, replacement1108) pattern1109 = Pattern(Integral((a_ + u_**n_*WC('b', S(1)) + u_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons48, cons70, cons71) rule1109 = ReplacementRule(pattern1109, replacement1109) pattern1110 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons682, cons55) rule1110 = ReplacementRule(pattern1110, replacement1110) pattern1111 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons682, cons130, cons503) rule1111 = ReplacementRule(pattern1111, replacement1111) pattern1112 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons682, cons65, cons504) rule1112 = ReplacementRule(pattern1112, replacement1112) pattern1113 = Pattern(Integral(sqrt(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))/x_, x_), cons2, cons3, cons8, cons4, cons682, cons47) rule1113 = ReplacementRule(pattern1113, replacement1113) pattern1114 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_/x_, x_), cons2, cons3, cons8, cons4, cons682, cons47, cons13, cons148) rule1114 = ReplacementRule(pattern1114, replacement1114) pattern1115 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_/x_, x_), cons2, cons3, cons8, cons4, cons682, cons47, cons13, cons139) rule1115 = ReplacementRule(pattern1115, replacement1115) pattern1116 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_/x_, x_), cons2, cons3, cons8, cons4, cons5, cons682, cons47, cons149) rule1116 = ReplacementRule(pattern1116, replacement1116) pattern1117 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons682, cons47, cons684) rule1117 = ReplacementRule(pattern1117, replacement1117) pattern1118 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*sqrt(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons682, cons47, cons157) rule1118 = ReplacementRule(pattern1118, replacement1118) pattern1119 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*sqrt(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons682, cons47, cons685) rule1119 = ReplacementRule(pattern1119, replacement1119) pattern1120 = Pattern(Integral(x_**WC('m', S(1))/sqrt(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons19, cons4, cons682, cons47, cons157) rule1120 = ReplacementRule(pattern1120, replacement1120) pattern1121 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons682, cons47, cons686, cons227) rule1121 = ReplacementRule(pattern1121, replacement1121) pattern1122 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons682, cons47, cons58, cons245) rule1122 = ReplacementRule(pattern1122, replacement1122) pattern1123 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons682, cons47, cons150, cons246, cons148, cons687, cons248, cons20) rule1123 = ReplacementRule(pattern1123, replacement1123) pattern1124 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons682, cons47, cons150, cons246, cons148, cons688, cons689, cons248, cons20) rule1124 = ReplacementRule(pattern1124, replacement1124) pattern1125 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons682, cons47, cons150, cons13, cons148, cons512, cons690, cons689, cons691, cons248) rule1125 = ReplacementRule(pattern1125, replacement1125) pattern1126 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons682, cons47, cons150, cons246, cons139, cons692, cons248) rule1126 = ReplacementRule(pattern1126, replacement1126) pattern1127 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons682, cons47, cons150, cons246, cons139, cons531, cons248) rule1127 = ReplacementRule(pattern1127, replacement1127) pattern1128 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons682, cons47, cons150, cons246, cons139, cons248) rule1128 = ReplacementRule(pattern1128, replacement1128) pattern1129 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons682, cons47, cons150, cons33, cons532, cons512, cons693) rule1129 = ReplacementRule(pattern1129, replacement1129) pattern1130 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons682, cons47, cons150, cons33, cons96, cons693) rule1130 = ReplacementRule(pattern1130, replacement1130) pattern1131 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons682, cons47, cons198, cons20) rule1131 = ReplacementRule(pattern1131, replacement1131) pattern1132 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons682, cons47, cons198, cons369) rule1132 = ReplacementRule(pattern1132, With1132) pattern1133 = Pattern(Integral((x_*WC('d', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons682, cons47, cons198, cons358) rule1133 = ReplacementRule(pattern1133, replacement1133) pattern1134 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons682, cons47, cons149) rule1134 = ReplacementRule(pattern1134, replacement1134) pattern1135 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons682, cons228, cons502) rule1135 = ReplacementRule(pattern1135, replacement1135) pattern1136 = Pattern(Integral((d_*x_)**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons682, cons228, cons502) rule1136 = ReplacementRule(pattern1136, replacement1136) pattern1137 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons682, cons228, cons150, cons20, CustomConstraint(With1137)) rule1137 = ReplacementRule(pattern1137, replacement1137) pattern1138 = Pattern(Integral((x_*WC('d', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons682, cons228, cons150, cons369, cons40) rule1138 = ReplacementRule(pattern1138, With1138) pattern1139 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons682, cons228, cons150, cons246, cons165, cons532, cons694, cons695, cons696) rule1139 = ReplacementRule(pattern1139, replacement1139) pattern1140 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons682, cons228, cons150, cons246, cons165, cons96, cons696) rule1140 = ReplacementRule(pattern1140, replacement1140) pattern1141 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons682, cons228, cons150, cons13, cons165, cons512, cons696) rule1141 = ReplacementRule(pattern1141, replacement1141) pattern1142 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons682, cons228, cons150, cons246, cons139, cons692, cons696) rule1142 = ReplacementRule(pattern1142, replacement1142) pattern1143 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons682, cons228, cons150, cons246, cons139, cons531, cons696) rule1143 = ReplacementRule(pattern1143, replacement1143) pattern1144 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons682, cons228, cons150, cons13, cons139, cons696) rule1144 = ReplacementRule(pattern1144, replacement1144) pattern1145 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons682, cons228, cons150, cons33, cons531, cons512, cons696) rule1145 = ReplacementRule(pattern1145, replacement1145) pattern1146 = Pattern(Integral((x_*WC('d', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons682, cons228, cons150, cons33, cons96, cons696) rule1146 = ReplacementRule(pattern1146, replacement1146) pattern1147 = Pattern(Integral((x_*WC('d', S(1)))**m_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons682, cons228, cons150, cons33, cons96) rule1147 = ReplacementRule(pattern1147, replacement1147) pattern1148 = Pattern(Integral(x_**m_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons682, cons228, cons150, cons20, cons697) rule1148 = ReplacementRule(pattern1148, replacement1148) pattern1149 = Pattern(Integral((x_*WC('d', S(1)))**m_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons682, cons228, cons150, cons33, cons531) rule1149 = ReplacementRule(pattern1149, replacement1149) pattern1150 = Pattern(Integral(x_**S(2)/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons698, cons699) rule1150 = ReplacementRule(pattern1150, With1150) pattern1151 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons48, cons228, cons700, cons701, cons415) rule1151 = ReplacementRule(pattern1151, With1151) pattern1152 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons48, cons228, cons700, cons702, cons415) rule1152 = ReplacementRule(pattern1152, With1152) pattern1153 = Pattern(Integral((x_*WC('d', S(1)))**m_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons682, cons228, cons150, cons33, cons703) rule1153 = ReplacementRule(pattern1153, With1153) pattern1154 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons682, cons228, cons150) rule1154 = ReplacementRule(pattern1154, With1154) pattern1155 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, cons295) rule1155 = ReplacementRule(pattern1155, With1155) pattern1156 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, cons678, cons679) rule1156 = ReplacementRule(pattern1156, With1156) pattern1157 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, cons486, cons179) rule1157 = ReplacementRule(pattern1157, With1157) pattern1158 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, CustomConstraint(With1158)) rule1158 = ReplacementRule(pattern1158, replacement1158) pattern1159 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, CustomConstraint(With1159)) rule1159 = ReplacementRule(pattern1159, replacement1159) pattern1160 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, CustomConstraint(With1160)) rule1160 = ReplacementRule(pattern1160, replacement1160) pattern1161 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons677, CustomConstraint(With1161)) rule1161 = ReplacementRule(pattern1161, replacement1161) pattern1162 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons228, cons680) rule1162 = ReplacementRule(pattern1162, With1162) pattern1163 = Pattern(Integral(x_**S(2)/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons228, cons681) rule1163 = ReplacementRule(pattern1163, With1163) pattern1164 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons682, cons228, cons198, cons20) rule1164 = ReplacementRule(pattern1164, replacement1164) pattern1165 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons682, cons228, cons198, cons369) rule1165 = ReplacementRule(pattern1165, With1165) pattern1166 = Pattern(Integral((x_*WC('d', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons682, cons228, cons198, cons358) rule1166 = ReplacementRule(pattern1166, replacement1166) pattern1167 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons682, cons228, cons491) rule1167 = ReplacementRule(pattern1167, With1167) pattern1168 = Pattern(Integral((d_*x_)**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons682, cons228, cons491) rule1168 = ReplacementRule(pattern1168, replacement1168) pattern1169 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons682, cons228, cons543, cons25) rule1169 = ReplacementRule(pattern1169, replacement1169) pattern1170 = Pattern(Integral((d_*x_)**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons682, cons228, cons543, cons25) rule1170 = ReplacementRule(pattern1170, replacement1170) pattern1171 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons682, cons228) rule1171 = ReplacementRule(pattern1171, With1171) pattern1172 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons682, cons228, cons704) rule1172 = ReplacementRule(pattern1172, replacement1172) pattern1173 = Pattern(Integral((x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons682) rule1173 = ReplacementRule(pattern1173, replacement1173) pattern1174 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons587, cons40, cons683) rule1174 = ReplacementRule(pattern1174, replacement1174) pattern1175 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons587, cons149, cons683) rule1175 = ReplacementRule(pattern1175, replacement1175) pattern1176 = Pattern(Integral((d_*x_)**WC('m', S(1))*(a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons587) rule1176 = ReplacementRule(pattern1176, replacement1176) pattern1177 = Pattern(Integral(x_**WC('m', S(1))*(v_**n_*WC('b', S(1)) + v_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons682, cons554, cons20, cons555) rule1177 = ReplacementRule(pattern1177, replacement1177) pattern1178 = Pattern(Integral(u_**WC('m', S(1))*(v_**n_*WC('b', S(1)) + v_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons682, cons556) rule1178 = ReplacementRule(pattern1178, replacement1178) pattern1179 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons222, cons504) rule1179 = ReplacementRule(pattern1179, replacement1179) pattern1180 = Pattern(Integral((a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons4, cons48, cons222, cons504) rule1180 = ReplacementRule(pattern1180, replacement1180) pattern1181 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons48, cons198) rule1181 = ReplacementRule(pattern1181, replacement1181) pattern1182 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons5, cons52, cons48, cons198) rule1182 = ReplacementRule(pattern1182, replacement1182) pattern1183 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons48, cons491) rule1183 = ReplacementRule(pattern1183, With1183) pattern1184 = Pattern(Integral((a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons5, cons52, cons48, cons491) rule1184 = ReplacementRule(pattern1184, With1184) pattern1185 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons3, cons8, cons29, cons50, cons4, cons5, cons48, cons149, cons666) rule1185 = ReplacementRule(pattern1185, replacement1185) pattern1186 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons3, cons8, cons29, cons50, cons4, cons5, cons48, cons149, cons673, cons705) rule1186 = ReplacementRule(pattern1186, replacement1186) pattern1187 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons3, cons8, cons29, cons50, cons4, cons5, cons48, cons149, cons673, cons706) rule1187 = ReplacementRule(pattern1187, replacement1187) pattern1188 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons3, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons149) rule1188 = ReplacementRule(pattern1188, replacement1188) pattern1189 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons47, cons149) rule1189 = ReplacementRule(pattern1189, replacement1189) pattern1190 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons48, cons228, cons258, cons40) rule1190 = ReplacementRule(pattern1190, replacement1190) pattern1191 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons4, cons52, cons48, cons259, cons40) rule1191 = ReplacementRule(pattern1191, replacement1191) pattern1192 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons228, cons258, cons149) rule1192 = ReplacementRule(pattern1192, replacement1192) pattern1193 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons259, cons149) rule1193 = ReplacementRule(pattern1193, replacement1193) pattern1194 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228, cons281, cons223) rule1194 = ReplacementRule(pattern1194, replacement1194) pattern1195 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons4, cons48, cons282, cons223) rule1195 = ReplacementRule(pattern1195, replacement1195) pattern1196 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228, cons281, cons397, cons398) rule1196 = ReplacementRule(pattern1196, replacement1196) pattern1197 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons4, cons48, cons282, cons397, cons398) rule1197 = ReplacementRule(pattern1197, replacement1197) pattern1198 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons48, cons228, cons281) rule1198 = ReplacementRule(pattern1198, replacement1198) pattern1199 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons4, cons52, cons48, cons282) rule1199 = ReplacementRule(pattern1199, replacement1199) pattern1200 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons48, cons707, cons676, cons708) rule1200 = ReplacementRule(pattern1200, With1200) pattern1201 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons48, cons707, cons676, cons709) rule1201 = ReplacementRule(pattern1201, With1201) pattern1202 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons710, cons699) rule1202 = ReplacementRule(pattern1202, With1202) pattern1203 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons48, cons282, cons710, cons676, cons699) rule1203 = ReplacementRule(pattern1203, With1203) pattern1204 = Pattern(Integral((d_ + x_**S(3)*WC('e', S(1)))/(a_ + x_**S(6)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons680) rule1204 = ReplacementRule(pattern1204, With1204) pattern1205 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons4, cons48, cons282, cons711, cons87) rule1205 = ReplacementRule(pattern1205, With1205) pattern1206 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons4, cons48, cons282, cons712) rule1206 = ReplacementRule(pattern1206, replacement1206) pattern1207 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons228, cons707, cons676, cons713) rule1207 = ReplacementRule(pattern1207, With1207) pattern1208 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228, cons707, cons676, cons677) rule1208 = ReplacementRule(pattern1208, With1208) pattern1209 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons228, cons707, cons676, cons714) rule1209 = ReplacementRule(pattern1209, With1209) pattern1210 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228, cons281, cons715) rule1210 = ReplacementRule(pattern1210, With1210) pattern1211 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons228, cons281, cons676, cons415) rule1211 = ReplacementRule(pattern1211, With1211) pattern1212 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228, cons281, cons588) rule1212 = ReplacementRule(pattern1212, replacement1212) pattern1213 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons4, cons48, cons282, cons588) rule1213 = ReplacementRule(pattern1213, replacement1213) pattern1214 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228, cons281, cons388, cons397, cons398) rule1214 = ReplacementRule(pattern1214, replacement1214) pattern1215 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons4, cons48, cons282, cons388, cons397, cons398) rule1215 = ReplacementRule(pattern1215, replacement1215) pattern1216 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons48, cons228, cons281, cons388) rule1216 = ReplacementRule(pattern1216, With1216) pattern1217 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons4, cons52, cons48, cons282, cons388) rule1217 = ReplacementRule(pattern1217, With1217) pattern1218 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228, cons151, cons165, cons671, cons716, cons248, cons675) rule1218 = ReplacementRule(pattern1218, replacement1218) pattern1219 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons4, cons48, cons151, cons165, cons671, cons716, cons248, cons675) rule1219 = ReplacementRule(pattern1219, replacement1219) pattern1220 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228, cons13, cons139, cons248, cons675) rule1220 = ReplacementRule(pattern1220, replacement1220) pattern1221 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons4, cons48, cons13, cons139, cons248, cons675) rule1221 = ReplacementRule(pattern1221, replacement1221) pattern1222 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, cons295) rule1222 = ReplacementRule(pattern1222, With1222) pattern1223 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons45, cons295) rule1223 = ReplacementRule(pattern1223, With1223) pattern1224 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, cons678, cons679, CustomConstraint(With1224)) rule1224 = ReplacementRule(pattern1224, replacement1224) pattern1225 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, cons678, cons679, CustomConstraint(With1225)) rule1225 = ReplacementRule(pattern1225, replacement1225) pattern1226 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, cons486, cons179, CustomConstraint(With1226)) rule1226 = ReplacementRule(pattern1226, replacement1226) pattern1227 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons486, cons179, CustomConstraint(With1227)) rule1227 = ReplacementRule(pattern1227, replacement1227) pattern1228 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons486, cons179, CustomConstraint(With1228)) rule1228 = ReplacementRule(pattern1228, replacement1228) pattern1229 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, cons486, cons179, CustomConstraint(With1229)) rule1229 = ReplacementRule(pattern1229, replacement1229) pattern1230 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons486, cons179, CustomConstraint(With1230)) rule1230 = ReplacementRule(pattern1230, replacement1230) pattern1231 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, CustomConstraint(With1231)) rule1231 = ReplacementRule(pattern1231, replacement1231) pattern1232 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons717) rule1232 = ReplacementRule(pattern1232, replacement1232) pattern1233 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, CustomConstraint(With1233)) rule1233 = ReplacementRule(pattern1233, replacement1233) pattern1234 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, CustomConstraint(With1234)) rule1234 = ReplacementRule(pattern1234, replacement1234) pattern1235 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, CustomConstraint(With1235)) rule1235 = ReplacementRule(pattern1235, replacement1235) pattern1236 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons677, CustomConstraint(With1236)) rule1236 = ReplacementRule(pattern1236, replacement1236) pattern1237 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons680, CustomConstraint(With1237)) rule1237 = ReplacementRule(pattern1237, replacement1237) pattern1238 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons680, CustomConstraint(With1238)) rule1238 = ReplacementRule(pattern1238, replacement1238) pattern1239 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons680, CustomConstraint(With1239)) rule1239 = ReplacementRule(pattern1239, replacement1239) pattern1240 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons680, CustomConstraint(With1240)) rule1240 = ReplacementRule(pattern1240, replacement1240) pattern1241 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons681, cons259, cons45) rule1241 = ReplacementRule(pattern1241, replacement1241) pattern1242 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons681, cons259, cons450) rule1242 = ReplacementRule(pattern1242, replacement1242) pattern1243 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons681, cons282) rule1243 = ReplacementRule(pattern1243, With1243) pattern1244 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))/sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons681) rule1244 = ReplacementRule(pattern1244, With1244) pattern1245 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228) rule1245 = ReplacementRule(pattern1245, replacement1245) pattern1246 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons4, cons48) rule1246 = ReplacementRule(pattern1246, replacement1246) pattern1247 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons48, cons228, cons130, cons718, cons150, cons402) rule1247 = ReplacementRule(pattern1247, replacement1247) pattern1248 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons4, cons52, cons48, cons130, cons718, cons150, cons402) rule1248 = ReplacementRule(pattern1248, replacement1248) pattern1249 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281) rule1249 = ReplacementRule(pattern1249, replacement1249) pattern1250 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('c', S(1)))/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons282) rule1250 = ReplacementRule(pattern1250, replacement1250) pattern1251 = Pattern(Integral((a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**(S(3)/2)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons677) rule1251 = ReplacementRule(pattern1251, With1251) pattern1252 = Pattern(Integral((a_ + x_**S(4)*WC('c', S(1)))**(S(3)/2)/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons717) rule1252 = ReplacementRule(pattern1252, With1252) pattern1253 = Pattern(Integral((a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**p_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons719) rule1253 = ReplacementRule(pattern1253, replacement1253) pattern1254 = Pattern(Integral((a_ + x_**S(4)*WC('c', S(1)))**p_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons719) rule1254 = ReplacementRule(pattern1254, replacement1254) pattern1255 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons677, cons295) rule1255 = ReplacementRule(pattern1255, With1255) pattern1256 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons45, cons295) rule1256 = ReplacementRule(pattern1256, With1256) pattern1257 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons677, cons720) rule1257 = ReplacementRule(pattern1257, With1257) pattern1258 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons717, cons720) rule1258 = ReplacementRule(pattern1258, With1258) pattern1259 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons680, CustomConstraint(With1259)) rule1259 = ReplacementRule(pattern1259, replacement1259) pattern1260 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons282, cons680, CustomConstraint(With1260)) rule1260 = ReplacementRule(pattern1260, replacement1260) pattern1261 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons681, cons45) rule1261 = ReplacementRule(pattern1261, With1261) pattern1262 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons681, cons450) rule1262 = ReplacementRule(pattern1262, replacement1262) pattern1263 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons681) rule1263 = ReplacementRule(pattern1263, With1263) pattern1264 = Pattern(Integral((a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**p_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281, cons721) rule1264 = ReplacementRule(pattern1264, replacement1264) pattern1265 = Pattern(Integral((a_ + x_**S(4)*WC('c', S(1)))**p_/(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons282, cons721) rule1265 = ReplacementRule(pattern1265, replacement1265) pattern1266 = Pattern(Integral(S(1)/((d_ + x_**S(2)*WC('e', S(1)))**S(2)*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons228, cons281) rule1266 = ReplacementRule(pattern1266, replacement1266) pattern1267 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))**S(2)), x_), cons2, cons8, cons29, cons50, cons282) rule1267 = ReplacementRule(pattern1267, replacement1267) pattern1268 = Pattern(Integral((d_ + x_**S(2)*WC('e', S(1)))**q_*(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons52, cons228, cons281, cons349, cons566) rule1268 = ReplacementRule(pattern1268, With1268) pattern1269 = Pattern(Integral((a_ + x_**S(4)*WC('c', S(1)))**p_*(d_ + x_**S(2)*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons52, cons282, cons349, cons566) rule1269 = ReplacementRule(pattern1269, With1269) pattern1270 = Pattern(Integral(S(1)/(sqrt(d_ + x_**S(2)*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons722, cons45, cons270) rule1270 = ReplacementRule(pattern1270, replacement1270) pattern1271 = Pattern(Integral(S(1)/(sqrt(d_ + x_**S(2)*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons722, cons723) rule1271 = ReplacementRule(pattern1271, replacement1271) pattern1272 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons722, cons45, cons270) rule1272 = ReplacementRule(pattern1272, replacement1272) pattern1273 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))/sqrt(d_ + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons722, cons723) rule1273 = ReplacementRule(pattern1273, replacement1273) pattern1274 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons228, cons281, cons724) rule1274 = ReplacementRule(pattern1274, replacement1274) pattern1275 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons282, cons724) rule1275 = ReplacementRule(pattern1275, replacement1275) pattern1276 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons4, cons5, cons48, cons282, cons566, cons725) rule1276 = ReplacementRule(pattern1276, replacement1276) pattern1277 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons726) rule1277 = ReplacementRule(pattern1277, replacement1277) pattern1278 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons726) rule1278 = ReplacementRule(pattern1278, replacement1278) pattern1279 = Pattern(Integral((d_ + u_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + u_**n2_*WC('c', S(1)) + u_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons70, cons71) rule1279 = ReplacementRule(pattern1279, replacement1279) pattern1280 = Pattern(Integral((a_ + u_**n2_*WC('c', S(1)))**WC('p', S(1))*(d_ + u_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons4, cons5, cons52, cons48, cons70, cons71) rule1280 = ReplacementRule(pattern1280, replacement1280) pattern1281 = Pattern(Integral((d_ + x_**WC('mn', S(1))*WC('e', S(1)))**WC('q', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons682, cons587, cons588) rule1281 = ReplacementRule(pattern1281, replacement1281) pattern1282 = Pattern(Integral((a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons728, cons5, cons727, cons588) rule1282 = ReplacementRule(pattern1282, replacement1282) pattern1283 = Pattern(Integral((d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons682, cons587, cons388, cons40) rule1283 = ReplacementRule(pattern1283, replacement1283) pattern1284 = Pattern(Integral((a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons728, cons52, cons727, cons388, cons40) rule1284 = ReplacementRule(pattern1284, replacement1284) pattern1285 = Pattern(Integral((d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons52, cons682, cons587, cons388, cons149, cons683) rule1285 = ReplacementRule(pattern1285, replacement1285) pattern1286 = Pattern(Integral((a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons728, cons5, cons52, cons727, cons388, cons149, cons729) rule1286 = ReplacementRule(pattern1286, replacement1286) pattern1287 = Pattern(Integral((d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons682, cons587, cons388, cons149, cons504) rule1287 = ReplacementRule(pattern1287, replacement1287) pattern1288 = Pattern(Integral((a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons728, cons52, cons727, cons388, cons149, cons730) rule1288 = ReplacementRule(pattern1288, replacement1288) pattern1289 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons52, cons587, cons40) rule1289 = ReplacementRule(pattern1289, replacement1289) pattern1290 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons52, cons587, cons149) rule1290 = ReplacementRule(pattern1290, replacement1290) pattern1291 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(f_ + x_**n_*WC('g', S(1)))**WC('r', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons52, cons54, cons48, cons47, cons149) rule1291 = ReplacementRule(pattern1291, replacement1291) pattern1292 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(f_ + x_**n_*WC('g', S(1)))**WC('r', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons52, cons54, cons48, cons228, cons258, cons40) rule1292 = ReplacementRule(pattern1292, replacement1292) pattern1293 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(f_ + x_**n_*WC('g', S(1)))**WC('r', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons4, cons52, cons54, cons48, cons259, cons40) rule1293 = ReplacementRule(pattern1293, replacement1293) pattern1294 = Pattern(Integral((d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(f_ + x_**n_*WC('g', S(1)))**WC('r', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons52, cons54, cons48, cons228, cons258, cons149) rule1294 = ReplacementRule(pattern1294, replacement1294) pattern1295 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(f_ + x_**n_*WC('g', S(1)))**WC('r', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons52, cons54, cons48, cons259, cons149) rule1295 = ReplacementRule(pattern1295, replacement1295) pattern1296 = Pattern(Integral((x_**S(2)*WC('g', S(1)) + WC('f', S(0)))/((d_ + x_**S(2)*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons677, cons281, cons720, CustomConstraint(With1296)) rule1296 = ReplacementRule(pattern1296, replacement1296) pattern1297 = Pattern(Integral((f_ + x_**S(2)*WC('g', S(1)))/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons717, cons282, cons720, CustomConstraint(With1297)) rule1297 = ReplacementRule(pattern1297, replacement1297) pattern1298 = Pattern(Integral((d1_ + x_**WC('non2', S(1))*WC('e1', S(1)))**WC('q', S(1))*(d2_ + x_**WC('non2', S(1))*WC('e2', S(1)))**WC('q', S(1))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons5, cons52, cons48, cons595, cons731, cons732) rule1298 = ReplacementRule(pattern1298, replacement1298) pattern1299 = Pattern(Integral((d1_ + x_**WC('non2', S(1))*WC('e1', S(1)))**WC('q', S(1))*(d2_ + x_**WC('non2', S(1))*WC('e2', S(1)))**WC('q', S(1))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons4, cons5, cons52, cons48, cons595, cons731) rule1299 = ReplacementRule(pattern1299, replacement1299) pattern1300 = Pattern(Integral((A_ + x_**WC('m', S(1))*WC('B', S(1)))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons19, cons4, cons5, cons52, cons48, cons55) rule1300 = ReplacementRule(pattern1300, replacement1300) pattern1301 = Pattern(Integral((A_ + x_**WC('m', S(1))*WC('B', S(1)))*(a_ + x_**n2_*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons36, cons37, cons19, cons4, cons5, cons52, cons48, cons55) rule1301 = ReplacementRule(pattern1301, replacement1301) pattern1302 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)))**q_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons735, cons502) rule1302 = ReplacementRule(pattern1302, replacement1302) pattern1303 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)))**q_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons735, cons502) rule1303 = ReplacementRule(pattern1303, replacement1303) pattern1304 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)))**q_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons735, cons503) rule1304 = ReplacementRule(pattern1304, replacement1304) pattern1305 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)))**q_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons735, cons503) rule1305 = ReplacementRule(pattern1305, replacement1305) pattern1306 = Pattern(Integral((f_*x_)**WC('m', S(1))*(x_**n_*WC('e', S(1)))**q_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons21) rule1306 = ReplacementRule(pattern1306, replacement1306) pattern1307 = Pattern(Integral((f_*x_)**WC('m', S(1))*(x_**n_*WC('e', S(1)))**q_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons21) rule1307 = ReplacementRule(pattern1307, replacement1307) pattern1308 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons48, cons55) rule1308 = ReplacementRule(pattern1308, replacement1308) pattern1309 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons48, cons55) rule1309 = ReplacementRule(pattern1309, replacement1309) pattern1310 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons222, cons504) rule1310 = ReplacementRule(pattern1310, replacement1310) pattern1311 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons4, cons48, cons222, cons504) rule1311 = ReplacementRule(pattern1311, replacement1311) pattern1312 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons48, cons47, cons149, cons736) rule1312 = ReplacementRule(pattern1312, replacement1312) pattern1313 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons47, cons149) rule1313 = ReplacementRule(pattern1313, replacement1313) pattern1314 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons48, cons502) rule1314 = ReplacementRule(pattern1314, replacement1314) pattern1315 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons48, cons502) rule1315 = ReplacementRule(pattern1315, replacement1315) pattern1316 = Pattern(Integral((f_*x_)**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons502) rule1316 = ReplacementRule(pattern1316, replacement1316) pattern1317 = Pattern(Integral((f_*x_)**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons502) rule1317 = ReplacementRule(pattern1317, replacement1317) pattern1318 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons52, cons48, cons228, cons258, cons40) rule1318 = ReplacementRule(pattern1318, replacement1318) pattern1319 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons52, cons19, cons4, cons52, cons48, cons259, cons40) rule1319 = ReplacementRule(pattern1319, replacement1319) pattern1320 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons228, cons258, cons149) rule1320 = ReplacementRule(pattern1320, replacement1320) pattern1321 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons259, cons149) rule1321 = ReplacementRule(pattern1321, replacement1321) pattern1322 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons228, cons466, cons737, cons398, cons170) rule1322 = ReplacementRule(pattern1322, replacement1322) pattern1323 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons48, cons466, cons737, cons398, cons170) rule1323 = ReplacementRule(pattern1323, replacement1323) pattern1324 = Pattern(Integral(x_**m_*(d_ + x_**n_*WC('e', S(1)))**q_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons228, cons466, cons737, cons398, cons269) rule1324 = ReplacementRule(pattern1324, replacement1324) pattern1325 = Pattern(Integral(x_**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons48, cons466, cons737, cons398, cons269) rule1325 = ReplacementRule(pattern1325, replacement1325) pattern1326 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons52, cons48, cons228, cons466, cons738, cons388, cons739) rule1326 = ReplacementRule(pattern1326, replacement1326) pattern1327 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons52, cons48, cons466, cons738, cons388, cons739) rule1327 = ReplacementRule(pattern1327, replacement1327) pattern1328 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons52, cons48, cons466) rule1328 = ReplacementRule(pattern1328, replacement1328) pattern1329 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons52, cons48, cons48, cons466) rule1329 = ReplacementRule(pattern1329, replacement1329) pattern1330 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons48, cons228, cons150, cons20, CustomConstraint(With1330)) rule1330 = ReplacementRule(pattern1330, replacement1330) pattern1331 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons5, cons52, cons48, cons150, cons20, CustomConstraint(With1331)) rule1331 = ReplacementRule(pattern1331, replacement1331) pattern1332 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons48, cons228, cons150, cons369, cons40) rule1332 = ReplacementRule(pattern1332, With1332) pattern1333 = Pattern(Integral((x_*WC('f', S(1)))**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons5, cons52, cons48, cons150, cons369, cons40) rule1333 = ReplacementRule(pattern1333, With1333) pattern1334 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons246, cons165, cons96, cons740, cons696) rule1334 = ReplacementRule(pattern1334, replacement1334) pattern1335 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons246, cons165, cons96, cons740, cons696) rule1335 = ReplacementRule(pattern1335, replacement1335) pattern1336 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons48, cons228, cons150, cons13, cons165, cons512, cons741, cons696) rule1336 = ReplacementRule(pattern1336, replacement1336) pattern1337 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons48, cons150, cons13, cons165, cons512, cons741, cons696) rule1337 = ReplacementRule(pattern1337, replacement1337) pattern1338 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons246, cons139, cons532, cons696) rule1338 = ReplacementRule(pattern1338, replacement1338) pattern1339 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons246, cons139, cons532, cons696) rule1339 = ReplacementRule(pattern1339, replacement1339) pattern1340 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons48, cons228, cons150, cons13, cons139, cons696) rule1340 = ReplacementRule(pattern1340, replacement1340) pattern1341 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons48, cons150, cons13, cons139, cons696) rule1341 = ReplacementRule(pattern1341, replacement1341) pattern1342 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons48, cons228, cons150, cons33, cons532, cons741, cons696) rule1342 = ReplacementRule(pattern1342, replacement1342) pattern1343 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons5, cons48, cons150, cons33, cons532, cons741, cons696) rule1343 = ReplacementRule(pattern1343, replacement1343) pattern1344 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons48, cons228, cons150, cons33, cons96, cons696) rule1344 = ReplacementRule(pattern1344, replacement1344) pattern1345 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons5, cons48, cons150, cons33, cons96, cons696) rule1345 = ReplacementRule(pattern1345, replacement1345) pattern1346 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons698, cons742, cons83, cons699, CustomConstraint(With1346)) rule1346 = ReplacementRule(pattern1346, replacement1346) pattern1347 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons436, cons742, cons83, CustomConstraint(With1347)) rule1347 = ReplacementRule(pattern1347, replacement1347) pattern1348 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons228, cons707, cons743, cons744) rule1348 = ReplacementRule(pattern1348, With1348) pattern1349 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**S(2)*WC('e', S(1)))/(a_ + x_**S(4)*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons707, cons743) rule1349 = ReplacementRule(pattern1349, With1349) pattern1350 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons48, cons698, cons745, cons746, cons699, CustomConstraint(With1350)) rule1350 = ReplacementRule(pattern1350, replacement1350) pattern1351 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons48, cons745, cons746, cons436, CustomConstraint(With1351)) rule1351 = ReplacementRule(pattern1351, replacement1351) pattern1352 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons48, cons228, cons150) rule1352 = ReplacementRule(pattern1352, With1352) pattern1353 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons48, cons150) rule1353 = ReplacementRule(pattern1353, With1353) pattern1354 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons48, cons228, cons150, cons588, cons20) rule1354 = ReplacementRule(pattern1354, replacement1354) pattern1355 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons48, cons150, cons588, cons20) rule1355 = ReplacementRule(pattern1355, replacement1355) pattern1356 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons48, cons228, cons150, cons588, cons21) rule1356 = ReplacementRule(pattern1356, replacement1356) pattern1357 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons48, cons150, cons588, cons21) rule1357 = ReplacementRule(pattern1357, replacement1357) pattern1358 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons388, cons613, cons405, cons531) rule1358 = ReplacementRule(pattern1358, replacement1358) pattern1359 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons52, cons48, cons150, cons388, cons33, cons531) rule1359 = ReplacementRule(pattern1359, replacement1359) pattern1360 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons388, cons613, cons405, cons692) rule1360 = ReplacementRule(pattern1360, replacement1360) pattern1361 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons388, cons613, cons405, cons692) rule1361 = ReplacementRule(pattern1361, replacement1361) pattern1362 = Pattern(Integral((x_*WC('f', S(1)))**m_*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons388, cons613, cons405, cons269) rule1362 = ReplacementRule(pattern1362, replacement1362) pattern1363 = Pattern(Integral((x_*WC('f', S(1)))**m_*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons388, cons613, cons405, cons269) rule1363 = ReplacementRule(pattern1363, replacement1363) pattern1364 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons388, cons613, cons398, cons531) rule1364 = ReplacementRule(pattern1364, replacement1364) pattern1365 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons388, cons613, cons398, cons531) rule1365 = ReplacementRule(pattern1365, replacement1365) pattern1366 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons388, cons613, cons398, cons692) rule1366 = ReplacementRule(pattern1366, replacement1366) pattern1367 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('e', S(1)) + WC('d', S(0)))**q_/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons388, cons613, cons398, cons692) rule1367 = ReplacementRule(pattern1367, replacement1367) pattern1368 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons48, cons228, cons150, cons388, cons397, cons398) rule1368 = ReplacementRule(pattern1368, replacement1368) pattern1369 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n2_*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons48, cons150, cons388, cons397, cons398) rule1369 = ReplacementRule(pattern1369, replacement1369) pattern1370 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons52, cons4, cons48, cons228, cons150, cons388, cons20) rule1370 = ReplacementRule(pattern1370, replacement1370) pattern1371 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons52, cons4, cons48, cons150, cons388, cons20) rule1371 = ReplacementRule(pattern1371, replacement1371) pattern1372 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons52, cons4, cons48, cons228, cons150, cons388, cons21) rule1372 = ReplacementRule(pattern1372, replacement1372) pattern1373 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons52, cons4, cons48, cons150, cons388, cons21) rule1373 = ReplacementRule(pattern1373, replacement1373) pattern1374 = Pattern(Integral((x_*WC('f', S(1)))**m_*(x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))/(x_**n_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons246, cons165, cons747) rule1374 = ReplacementRule(pattern1374, replacement1374) pattern1375 = Pattern(Integral((x_*WC('f', S(1)))**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))/(x_**n_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons246, cons165, cons747) rule1375 = ReplacementRule(pattern1375, replacement1375) pattern1376 = Pattern(Integral((x_*WC('f', S(1)))**m_*(x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1))/(x_**n_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons246, cons165, cons269) rule1376 = ReplacementRule(pattern1376, replacement1376) pattern1377 = Pattern(Integral((x_*WC('f', S(1)))**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))/(x_**n_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons246, cons165, cons269) rule1377 = ReplacementRule(pattern1377, replacement1377) pattern1378 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_/(x_**n_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons246, cons139, cons748) rule1378 = ReplacementRule(pattern1378, replacement1378) pattern1379 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_/(x_**n_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons246, cons139, cons748) rule1379 = ReplacementRule(pattern1379, replacement1379) pattern1380 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_/(x_**n_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons48, cons228, cons150, cons246, cons139, cons170) rule1380 = ReplacementRule(pattern1380, replacement1380) pattern1381 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_/(x_**n_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons8, cons29, cons50, cons127, cons48, cons150, cons246, cons139, cons170) rule1381 = ReplacementRule(pattern1381, replacement1381) pattern1382 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons52, cons48, cons228, cons150, cons749) rule1382 = ReplacementRule(pattern1382, replacement1382) pattern1383 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons52, cons48, cons150, cons749) rule1383 = ReplacementRule(pattern1383, replacement1383) pattern1384 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons48, cons228, cons198, cons20) rule1384 = ReplacementRule(pattern1384, replacement1384) pattern1385 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons5, cons52, cons48, cons198, cons20) rule1385 = ReplacementRule(pattern1385, replacement1385) pattern1386 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons5, cons52, cons48, cons228, cons198, cons369) rule1386 = ReplacementRule(pattern1386, With1386) pattern1387 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons5, cons52, cons48, cons198, cons369) rule1387 = ReplacementRule(pattern1387, With1387) pattern1388 = Pattern(Integral((x_*WC('f', S(1)))**m_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons52, cons48, cons228, cons198, cons358) rule1388 = ReplacementRule(pattern1388, replacement1388) pattern1389 = Pattern(Integral((x_*WC('f', S(1)))**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons5, cons52, cons48, cons198, cons358) rule1389 = ReplacementRule(pattern1389, replacement1389) pattern1390 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons5, cons52, cons48, cons228, cons491) rule1390 = ReplacementRule(pattern1390, With1390) pattern1391 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons5, cons52, cons48, cons491) rule1391 = ReplacementRule(pattern1391, With1391) pattern1392 = Pattern(Integral((f_*x_)**m_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons52, cons48, cons228, cons491) rule1392 = ReplacementRule(pattern1392, replacement1392) pattern1393 = Pattern(Integral((f_*x_)**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons5, cons52, cons48, cons491) rule1393 = ReplacementRule(pattern1393, replacement1393) pattern1394 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons48, cons228, cons543, cons25) rule1394 = ReplacementRule(pattern1394, replacement1394) pattern1395 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons48, cons543, cons25) rule1395 = ReplacementRule(pattern1395, replacement1395) pattern1396 = Pattern(Integral((f_*x_)**m_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons52, cons48, cons228, cons543, cons25) rule1396 = ReplacementRule(pattern1396, replacement1396) pattern1397 = Pattern(Integral((f_*x_)**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons5, cons52, cons48, cons543, cons25) rule1397 = ReplacementRule(pattern1397, replacement1397) pattern1398 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons52, cons48, cons228) rule1398 = ReplacementRule(pattern1398, With1398) pattern1399 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**q_/(a_ + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons4, cons52, cons48) rule1399 = ReplacementRule(pattern1399, With1399) pattern1400 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons48, cons228, cons704) rule1400 = ReplacementRule(pattern1400, replacement1400) pattern1401 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons4, cons48, cons704) rule1401 = ReplacementRule(pattern1401, replacement1401) pattern1402 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons228, cons750) rule1402 = ReplacementRule(pattern1402, replacement1402) pattern1403 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons750) rule1403 = ReplacementRule(pattern1403, replacement1403) pattern1404 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons566, cons735) rule1404 = ReplacementRule(pattern1404, replacement1404) pattern1405 = Pattern(Integral((x_*WC('f', S(1)))**m_*(a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n_*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48, cons566, cons751) rule1405 = ReplacementRule(pattern1405, replacement1405) pattern1406 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48) rule1406 = ReplacementRule(pattern1406, replacement1406) pattern1407 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons48) rule1407 = ReplacementRule(pattern1407, replacement1407) pattern1408 = Pattern(Integral(u_**WC('m', S(1))*(d_ + v_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + v_**n_*WC('b', S(1)) + v_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons48, cons556) rule1408 = ReplacementRule(pattern1408, replacement1408) pattern1409 = Pattern(Integral(u_**WC('m', S(1))*(a_ + v_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + v_**n_*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons556) rule1409 = ReplacementRule(pattern1409, replacement1409) pattern1410 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**WC('q', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons682, cons587, cons588) rule1410 = ReplacementRule(pattern1410, replacement1410) pattern1411 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons19, cons728, cons5, cons727, cons588) rule1411 = ReplacementRule(pattern1411, replacement1411) pattern1412 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons52, cons682, cons587, cons388, cons40) rule1412 = ReplacementRule(pattern1412, replacement1412) pattern1413 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons19, cons728, cons52, cons727, cons388, cons40) rule1413 = ReplacementRule(pattern1413, replacement1413) pattern1414 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons682, cons587, cons388, cons149) rule1414 = ReplacementRule(pattern1414, replacement1414) pattern1415 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**q_, x_), cons2, cons8, cons29, cons50, cons19, cons728, cons5, cons52, cons727, cons388, cons149) rule1415 = ReplacementRule(pattern1415, replacement1415) pattern1416 = Pattern(Integral((f_*x_)**m_*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**WC('q', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons682, cons587) rule1416 = ReplacementRule(pattern1416, replacement1416) pattern1417 = Pattern(Integral((f_*x_)**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)))**p_*(d_ + x_**WC('mn', S(1))*WC('e', S(1)))**WC('q', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons19, cons728, cons5, cons52, cons727) rule1417 = ReplacementRule(pattern1417, replacement1417) pattern1418 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons52, cons587, cons40) rule1418 = ReplacementRule(pattern1418, replacement1418) pattern1419 = Pattern(Integral(x_**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons52, cons587, cons149) rule1419 = ReplacementRule(pattern1419, replacement1419) pattern1420 = Pattern(Integral((f_*x_)**WC('m', S(1))*(d_ + x_**n_*WC('e', S(1)))**WC('q', S(1))*(a_ + x_**mn_*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons587) rule1420 = ReplacementRule(pattern1420, replacement1420) pattern1421 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d1_ + x_**WC('non2', S(1))*WC('e1', S(1)))**WC('q', S(1))*(d2_ + x_**WC('non2', S(1))*WC('e2', S(1)))**WC('q', S(1))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons4, cons5, cons52, cons48, cons595, cons731, cons732) rule1421 = ReplacementRule(pattern1421, replacement1421) pattern1422 = Pattern(Integral((x_*WC('f', S(1)))**WC('m', S(1))*(d1_ + x_**WC('non2', S(1))*WC('e1', S(1)))**WC('q', S(1))*(d2_ + x_**WC('non2', S(1))*WC('e2', S(1)))**WC('q', S(1))*(x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons733, cons654, cons734, cons656, cons127, cons4, cons5, cons52, cons48, cons595, cons731) rule1422 = ReplacementRule(pattern1422, replacement1422) pattern1423 = Pattern(Integral((x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons752, cons753) rule1423 = ReplacementRule(pattern1423, replacement1423) pattern1424 = Pattern(Integral((x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons52, cons754, cons755, cons40) rule1424 = ReplacementRule(pattern1424, replacement1424) pattern1425 = Pattern(Integral(sqrt(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons4, cons52, cons754, cons755) rule1425 = ReplacementRule(pattern1425, replacement1425) pattern1426 = Pattern(Integral(S(1)/sqrt(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons4, cons52, cons754, cons755) rule1426 = ReplacementRule(pattern1426, replacement1426) pattern1427 = Pattern(Integral((x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons52, cons754, cons755, cons149, cons228, cons13, cons165, cons756) rule1427 = ReplacementRule(pattern1427, replacement1427) pattern1428 = Pattern(Integral((x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons52, cons754, cons755, cons149, cons228, cons13, cons139) rule1428 = ReplacementRule(pattern1428, replacement1428) pattern1429 = Pattern(Integral((x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons52, cons754, cons755, cons149) rule1429 = ReplacementRule(pattern1429, replacement1429) pattern1430 = Pattern(Integral((x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons52, cons754) rule1430 = ReplacementRule(pattern1430, replacement1430) pattern1431 = Pattern(Integral((u_**WC('n', S(1))*WC('b', S(1)) + u_**WC('q', S(1))*WC('a', S(1)) + u_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons52, cons754, cons70, cons71) rule1431 = ReplacementRule(pattern1431, replacement1431) pattern1432 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons757, cons753) rule1432 = ReplacementRule(pattern1432, replacement1432) pattern1433 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons52, cons754, cons40, cons755) rule1433 = ReplacementRule(pattern1433, replacement1433) pattern1434 = Pattern(Integral(x_**WC('m', S(1))/sqrt(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons19, cons4, cons52, cons754, cons755, cons758) rule1434 = ReplacementRule(pattern1434, replacement1434) pattern1435 = Pattern(Integral(x_**WC('m', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons4, cons759, cons760, cons761, cons228) rule1435 = ReplacementRule(pattern1435, replacement1435) pattern1436 = Pattern(Integral(x_**WC('m', S(1))/(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons4, cons762, cons760, cons761, cons228) rule1436 = ReplacementRule(pattern1436, replacement1436) pattern1437 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons763) rule1437 = ReplacementRule(pattern1437, replacement1437) pattern1438 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons165, cons764) rule1438 = ReplacementRule(pattern1438, replacement1438) pattern1439 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons165, cons765, cons766, cons767) rule1439 = ReplacementRule(pattern1439, replacement1439) pattern1440 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons165, cons768, cons769) rule1440 = ReplacementRule(pattern1440, replacement1440) pattern1441 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons165, cons770, cons766) rule1441 = ReplacementRule(pattern1441, replacement1441) pattern1442 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons139, cons771) rule1442 = ReplacementRule(pattern1442, replacement1442) pattern1443 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons139, cons772) rule1443 = ReplacementRule(pattern1443, replacement1443) pattern1444 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons139, cons773) rule1444 = ReplacementRule(pattern1444, replacement1444) pattern1445 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons139, cons774) rule1445 = ReplacementRule(pattern1445, replacement1445) pattern1446 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons775, cons776) rule1446 = ReplacementRule(pattern1446, replacement1446) pattern1447 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons775, cons777) rule1447 = ReplacementRule(pattern1447, replacement1447) pattern1448 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons775, cons772) rule1448 = ReplacementRule(pattern1448, replacement1448) pattern1449 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons754, cons755, cons149, cons228, cons150, cons608, cons775, cons778) rule1449 = ReplacementRule(pattern1449, replacement1449) pattern1450 = Pattern(Integral(x_**WC('m', S(1))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons52, cons754, cons149, cons755) rule1450 = ReplacementRule(pattern1450, replacement1450) pattern1451 = Pattern(Integral(u_**WC('m', S(1))*(u_**WC('n', S(1))*WC('b', S(1)) + u_**WC('q', S(1))*WC('a', S(1)) + u_**WC('r', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons52, cons754, cons70, cons71) rule1451 = ReplacementRule(pattern1451, replacement1451) pattern1452 = Pattern(Integral((A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons52, cons779, cons780, cons40, cons755) rule1452 = ReplacementRule(pattern1452, replacement1452) pattern1453 = Pattern(Integral((A_ + x_**WC('j', S(1))*WC('B', S(1)))/sqrt(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons52, cons781, cons754, cons755, cons782, cons783) rule1453 = ReplacementRule(pattern1453, replacement1453) pattern1454 = Pattern(Integral((A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons36, cons37, cons4, cons52, cons779, cons780, cons149, cons228, cons13, cons165, cons756, cons784) rule1454 = ReplacementRule(pattern1454, replacement1454) pattern1455 = Pattern(Integral((A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**p_, x_), cons2, cons8, cons36, cons37, cons52, cons149, cons13, cons165, CustomConstraint(With1455)) rule1455 = ReplacementRule(pattern1455, replacement1455) pattern1456 = Pattern(Integral((A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons36, cons37, cons4, cons52, cons779, cons780, cons149, cons228, cons13, cons139) rule1456 = ReplacementRule(pattern1456, replacement1456) pattern1457 = Pattern(Integral((A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**p_, x_), cons2, cons8, cons36, cons37, cons52, cons149, cons13, cons139, CustomConstraint(With1457)) rule1457 = ReplacementRule(pattern1457, replacement1457) pattern1458 = Pattern(Integral((A_ + x_**WC('j', S(1))*WC('B', S(1)))*(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons5, cons52, cons781, cons754) rule1458 = ReplacementRule(pattern1458, replacement1458) pattern1459 = Pattern(Integral((A_ + u_**WC('j', S(1))*WC('B', S(1)))*(u_**WC('n', S(1))*WC('b', S(1)) + u_**WC('q', S(1))*WC('a', S(1)) + u_**WC('r', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons5, cons52, cons781, cons754, cons70, cons71) rule1459 = ReplacementRule(pattern1459, replacement1459) pattern1460 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons19, cons4, cons52, cons779, cons780, cons40, cons755) rule1460 = ReplacementRule(pattern1460, replacement1460) pattern1461 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons779, cons780, cons149, cons228, cons150, cons608, cons165, cons785, cons786, cons787) rule1461 = ReplacementRule(pattern1461, replacement1461) pattern1462 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons36, cons37, cons149, cons608, cons165, CustomConstraint(With1462)) rule1462 = ReplacementRule(pattern1462, replacement1462) pattern1463 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons779, cons780, cons149, cons228, cons150, cons608, cons139, cons788) rule1463 = ReplacementRule(pattern1463, replacement1463) pattern1464 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons36, cons37, cons149, cons608, cons139, CustomConstraint(With1464)) rule1464 = ReplacementRule(pattern1464, replacement1464) pattern1465 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons779, cons780, cons149, cons228, cons150, cons608, cons165, cons789, cons766, cons787) rule1465 = ReplacementRule(pattern1465, replacement1465) pattern1466 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons36, cons37, cons149, cons608, cons165, CustomConstraint(With1466)) rule1466 = ReplacementRule(pattern1466, replacement1466) pattern1467 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons779, cons780, cons149, cons228, cons150, cons608, cons139, cons790) rule1467 = ReplacementRule(pattern1467, replacement1467) pattern1468 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons36, cons37, cons149, cons608, cons139, CustomConstraint(With1468)) rule1468 = ReplacementRule(pattern1468, replacement1468) pattern1469 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons779, cons780, cons149, cons228, cons150, cons608, cons775, cons791, cons787) rule1469 = ReplacementRule(pattern1469, replacement1469) pattern1470 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons36, cons37, cons149, cons608, cons775, CustomConstraint(With1470)) rule1470 = ReplacementRule(pattern1470, replacement1470) pattern1471 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons779, cons780, cons149, cons228, cons150, cons608, cons792, cons785, cons786) rule1471 = ReplacementRule(pattern1471, replacement1471) pattern1472 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('r', S(1))*WC('B', S(1)))*(x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('q', S(1))*WC('a', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons36, cons37, cons149, cons608, CustomConstraint(With1472)) rule1472 = ReplacementRule(pattern1472, replacement1472) pattern1473 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('j', S(1))*WC('B', S(1)))/sqrt(x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('q', S(1))*WC('a', S(1)) + x_**WC('r', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons36, cons37, cons19, cons4, cons52, cons781, cons754, cons755, cons793, cons782, cons794) rule1473 = ReplacementRule(pattern1473, replacement1473) pattern1474 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**q_*WC('B', S(1)))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('k', S(1))*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons36, cons37, cons798, cons799, cons19, cons5, cons795, cons796, cons149, cons797) rule1474 = ReplacementRule(pattern1474, replacement1474) pattern1475 = Pattern(Integral(u_**WC('m', S(1))*(A_ + u_**WC('j', S(1))*WC('B', S(1)))*(u_**WC('n', S(1))*WC('b', S(1)) + u_**WC('q', S(1))*WC('a', S(1)) + u_**WC('r', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons19, cons4, cons5, cons52, cons781, cons754, cons70, cons71) rule1475 = ReplacementRule(pattern1475, replacement1475) return [rule1079, rule1080, rule1081, rule1082, rule1083, rule1084, rule1085, rule1086, rule1087, rule1088, rule1089, rule1090, rule1091, rule1092, rule1093, rule1094, rule1095, rule1096, rule1097, rule1098, rule1099, rule1100, rule1101, rule1102, rule1103, rule1104, rule1105, rule1106, rule1107, rule1108, rule1109, rule1110, rule1111, rule1112, rule1113, rule1114, rule1115, rule1116, rule1117, rule1118, rule1119, rule1120, rule1121, rule1122, rule1123, rule1124, rule1125, rule1126, rule1127, rule1128, rule1129, rule1130, rule1131, rule1132, rule1133, rule1134, rule1135, rule1136, rule1137, rule1138, rule1139, rule1140, rule1141, rule1142, rule1143, rule1144, rule1145, rule1146, rule1147, rule1148, rule1149, rule1150, rule1151, rule1152, rule1153, rule1154, rule1155, rule1156, rule1157, rule1158, rule1159, rule1160, rule1161, rule1162, rule1163, rule1164, rule1165, rule1166, rule1167, rule1168, rule1169, rule1170, rule1171, rule1172, rule1173, rule1174, rule1175, rule1176, rule1177, rule1178, rule1179, rule1180, rule1181, rule1182, rule1183, rule1184, rule1185, rule1186, rule1187, rule1188, rule1189, rule1190, rule1191, rule1192, rule1193, rule1194, rule1195, rule1196, rule1197, rule1198, rule1199, rule1200, rule1201, rule1202, rule1203, rule1204, rule1205, rule1206, rule1207, rule1208, rule1209, rule1210, rule1211, rule1212, rule1213, rule1214, rule1215, rule1216, rule1217, rule1218, rule1219, rule1220, rule1221, rule1222, rule1223, rule1224, rule1225, rule1226, rule1227, rule1228, rule1229, rule1230, rule1231, rule1232, rule1233, rule1234, rule1235, rule1236, rule1237, rule1238, rule1239, rule1240, rule1241, rule1242, rule1243, rule1244, rule1245, rule1246, rule1247, rule1248, rule1249, rule1250, rule1251, rule1252, rule1253, rule1254, rule1255, rule1256, rule1257, rule1258, rule1259, rule1260, rule1261, rule1262, rule1263, rule1264, rule1265, rule1266, rule1267, rule1268, rule1269, rule1270, rule1271, rule1272, rule1273, rule1274, rule1275, rule1276, rule1277, rule1278, rule1279, rule1280, rule1281, rule1282, rule1283, rule1284, rule1285, rule1286, rule1287, rule1288, rule1289, rule1290, rule1291, rule1292, rule1293, rule1294, rule1295, rule1296, rule1297, rule1298, rule1299, rule1300, rule1301, rule1302, rule1303, rule1304, rule1305, rule1306, rule1307, rule1308, rule1309, rule1310, rule1311, rule1312, rule1313, rule1314, rule1315, rule1316, rule1317, rule1318, rule1319, rule1320, rule1321, rule1322, rule1323, rule1324, rule1325, rule1326, rule1327, rule1328, rule1329, rule1330, rule1331, rule1332, rule1333, rule1334, rule1335, rule1336, rule1337, rule1338, rule1339, rule1340, rule1341, rule1342, rule1343, rule1344, rule1345, rule1346, rule1347, rule1348, rule1349, rule1350, rule1351, rule1352, rule1353, rule1354, rule1355, rule1356, rule1357, rule1358, rule1359, rule1360, rule1361, rule1362, rule1363, rule1364, rule1365, rule1366, rule1367, rule1368, rule1369, rule1370, rule1371, rule1372, rule1373, rule1374, rule1375, rule1376, rule1377, rule1378, rule1379, rule1380, rule1381, rule1382, rule1383, rule1384, rule1385, rule1386, rule1387, rule1388, rule1389, rule1390, rule1391, rule1392, rule1393, rule1394, rule1395, rule1396, rule1397, rule1398, rule1399, rule1400, rule1401, rule1402, rule1403, rule1404, rule1405, rule1406, rule1407, rule1408, rule1409, rule1410, rule1411, rule1412, rule1413, rule1414, rule1415, rule1416, rule1417, rule1418, rule1419, rule1420, rule1421, rule1422, rule1423, rule1424, rule1425, rule1426, rule1427, rule1428, rule1429, rule1430, rule1431, rule1432, rule1433, rule1434, rule1435, rule1436, rule1437, rule1438, rule1439, rule1440, rule1441, rule1442, rule1443, rule1444, rule1445, rule1446, rule1447, rule1448, rule1449, rule1450, rule1451, rule1452, rule1453, rule1454, rule1455, rule1456, rule1457, rule1458, rule1459, rule1460, rule1461, rule1462, rule1463, rule1464, rule1465, rule1466, rule1467, rule1468, rule1469, rule1470, rule1471, rule1472, rule1473, rule1474, rule1475, ] def replacement1079(a, b, c, n, n2, p, x): return Int(x**(S(2)*n*p)*(a*x**(-S(2)*n) + b*x**(-n) + c)**p, x) def With1080(a, b, c, n, n2, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k + S(-1))*(a + b*x**(k*n) + c*x**(S(2)*k*n))**p, x), x, x**(S(1)/k)), x) def replacement1081(a, b, c, n, n2, p, x): return Simp(x*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*a), x) def replacement1082(a, b, c, n, n2, p, x): return -Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(a*(S(2)*p + S(1))), x) + Simp(x*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*a*(n + S(1))), x) def replacement1083(a, b, c, n, n2, p, x): return Dist(sqrt(a + b*x**n + c*x**(S(2)*n))/(b + S(2)*c*x**n), Int((b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)/2), x), x) def replacement1084(a, b, c, n, n2, p, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((b + S(2)*c*x**n)**(S(2)*p), x), x) def replacement1085(a, b, c, n, n2, x): return Simp(x*sqrt(a + b*x**n + c*x**(S(2)*n))/(n + S(1)), x) + Simp(b*n*x*sqrt(a + b*x**n + c*x**(S(2)*n))/((b + S(2)*c*x**n)*(n + S(1))), x) def replacement1086(a, b, c, n, n2, p, x): return -Subst(Int((a + b*x**(-n) + c*x**(-S(2)*n))**p/x**S(2), x), x, S(1)/x) def replacement1087(a, b, c, n, n2, p, x): return Dist(S(2)*a*n**S(2)*p*(S(2)*p + S(-1))/((S(2)*n*p + S(1))*(n*(S(2)*p + S(-1)) + S(1))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) + Simp(x*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*n*p + S(1)), x) + Simp(n*p*x*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))/((S(2)*n*p + S(1))*(n*(S(2)*p + S(-1)) + S(1))), x) def replacement1088(a, b, c, n, n2, p, x): return Dist((S(2)*n*(p + S(1)) + S(1))*(n*(S(2)*p + S(1)) + S(1))/(S(2)*a*n**S(2)*(p + S(1))*(S(2)*p + S(1))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1)), x), x) - Simp(x*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*a*n*(S(2)*p + S(1))), x) - Simp(x*(n*(S(2)*p + S(1)) + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(S(2)*a*n**S(2)*(p + S(1))*(S(2)*p + S(1))), x) def replacement1089(a, b, c, n, n2, p, x): return Dist(c**(-IntPart(p))*(b/S(2) + c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((b/S(2) + c*x**n)**(S(2)*p), x), x) def replacement1090(a, b, c, n, n2, p, x): return -Subst(Int((a + b*x**(-n) + c*x**(-S(2)*n))**p/x**S(2), x), x, S(1)/x) def replacement1091(a, b, c, n, n2, p, x): return Int(ExpandIntegrand((a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1092(a, b, c, n, n2, p, x): return Dist(n*p/(S(2)*n*p + S(1)), Int((S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) + Simp(x*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*n*p + S(1)), x) def replacement1093(a, b, c, n, n2, p, x): return Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**n*(n*(S(2)*p + S(3)) + S(1)) + n*(p + S(1))*(-S(4)*a*c + b**S(2))), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def With1094(a, b, c, n, n2, x): q = Rt(a/c, S(2)) r = Rt(-b/c + S(2)*q, S(2)) return Dist(1/(2*c*q*r), Int((r - x**(n/2))/(q - r*x**(n/2) + x**n), x), x) + Dist(1/(2*c*q*r), Int((r + x**(n/2))/(q + r*x**(n/2) + x**n), x), x) def With1095(a, b, c, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(c/q, Int(S(1)/(b/S(2) + c*x**n - q/S(2)), x), x) - Dist(c/q, Int(S(1)/(b/S(2) + c*x**n + q/S(2)), x), x) def With1096(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*sqrt(-c), Int(S(1)/(sqrt(-b - S(2)*c*x**S(2) + q)*sqrt(b + S(2)*c*x**S(2) + q)), x), x) def With1097(a, b, c, x): q = Rt(c/a, S(4)) return Simp(sqrt((a + b*x**S(2) + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))**S(2)))*(q**S(2)*x**S(2) + S(1))*EllipticF(S(2)*ArcTan(q*x), -b*q**S(2)/(S(4)*c) + S(1)/2)/(S(2)*q*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1098(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if IntegerQ(q): return True return False def replacement1098(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(sqrt((S(2)*a + x**S(2)*(b + q))/q)*sqrt(-S(2)*a - x**S(2)*(b - q))*EllipticF(asin(sqrt(S(2))*x/sqrt((S(2)*a + x**S(2)*(b + q))/q)), (b + q)/(S(2)*q))/(S(2)*sqrt(-a)*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1099(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(sqrt((S(2)*a + x**S(2)*(b + q))/q)*sqrt((S(2)*a + x**S(2)*(b - q))/(S(2)*a + x**S(2)*(b + q)))*EllipticF(asin(sqrt(S(2))*x/sqrt((S(2)*a + x**S(2)*(b + q))/q)), (b + q)/(S(2)*q))/(S(2)*sqrt(a/(S(2)*a + x**S(2)*(b + q)))*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1100(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if And(PosQ((b + q)/a), Not(And(PosQ((b - q)/a), SimplerSqrtQ((b - q)/(S(2)*a), (b + q)/(S(2)*a))))): return True return False def replacement1100(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(sqrt((S(2)*a + x**S(2)*(b - q))/(S(2)*a + x**S(2)*(b + q)))*(S(2)*a + x**S(2)*(b + q))*EllipticF(ArcTan(x*Rt((b + q)/(S(2)*a), S(2))), S(2)*q/(b + q))/(S(2)*a*sqrt(a + b*x**S(2) + c*x**S(4))*Rt((b + q)/(S(2)*a), S(2))), x) def With1101(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if PosQ((b - q)/a): return True return False def replacement1101(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(sqrt((S(2)*a + x**S(2)*(b + q))/(S(2)*a + x**S(2)*(b - q)))*(S(2)*a + x**S(2)*(b - q))*EllipticF(ArcTan(x*Rt((b - q)/(S(2)*a), S(2))), -S(2)*q/(b - q))/(S(2)*a*sqrt(a + b*x**S(2) + c*x**S(4))*Rt((b - q)/(S(2)*a), S(2))), x) def With1102(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if And(NegQ((b + q)/a), Not(And(NegQ((b - q)/a), SimplerSqrtQ(-(b - q)/(S(2)*a), -(b + q)/(S(2)*a))))): return True return False def replacement1102(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(sqrt(S(1) + x**S(2)*(b - q)/(S(2)*a))*sqrt(S(1) + x**S(2)*(b + q)/(S(2)*a))*EllipticF(asin(x*Rt(-(b + q)/(S(2)*a), S(2))), (b - q)/(b + q))/(sqrt(a + b*x**S(2) + c*x**S(4))*Rt(-(b + q)/(S(2)*a), S(2))), x) def With1103(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if NegQ((b - q)/a): return True return False def replacement1103(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(sqrt(S(1) + x**S(2)*(b - q)/(S(2)*a))*sqrt(S(1) + x**S(2)*(b + q)/(S(2)*a))*EllipticF(asin(x*Rt(-(b - q)/(S(2)*a), S(2))), (b + q)/(b - q))/(sqrt(a + b*x**S(2) + c*x**S(4))*Rt(-(b - q)/(S(2)*a), S(2))), x) def With1104(a, b, c, x): q = Rt(c/a, S(4)) return Simp(sqrt((a + b*x**S(2) + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))**S(2)))*(q**S(2)*x**S(2) + S(1))*EllipticF(S(2)*ArcTan(q*x), -b*q**S(2)/(S(4)*c) + S(1)/2)/(S(2)*q*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1105(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(sqrt(S(2)*c*x**S(2)/(b - q) + S(1))*sqrt(S(2)*c*x**S(2)/(b + q) + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), Int(S(1)/(sqrt(S(2)*c*x**S(2)/(b - q) + S(1))*sqrt(S(2)*c*x**S(2)/(b + q) + S(1))), x), x) def replacement1106(a, b, c, n, n2, p, x): return Dist(a**IntPart(p)*(S(2)*c*x**n/(b - Rt(-S(4)*a*c + b**S(2), S(2))) + S(1))**(-FracPart(p))*(S(2)*c*x**n/(b + Rt(-S(4)*a*c + b**S(2), S(2))) + S(1))**(-FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**p*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**p, x), x) def replacement1107(a, b, c, mn, n, p, x): return Int(x**(-n*p)*(a*x**n + b + c*x**(S(2)*n))**p, x) def replacement1108(a, b, c, mn, n, p, x): return Dist(x**(n*FracPart(p))*(a + b*x**(-n) + c*x**n)**FracPart(p)*(a*x**n + b + c*x**(S(2)*n))**(-FracPart(p)), Int(x**(-n*p)*(a*x**n + b + c*x**(S(2)*n))**p, x), x) def replacement1109(a, b, c, n, n2, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b*x**n + c*x**(S(2)*n))**p, x), x, u), x) def replacement1110(a, b, c, m, n, n2, p, x): return Dist(S(1)/n, Subst(Int((a + b*x + c*x**S(2))**p, x), x, x**n), x) def replacement1111(a, b, c, d, m, n, n2, p, x): return Int(ExpandIntegrand((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1112(a, b, c, m, n, n2, p, x): return Int(x**(m + S(2)*n*p)*(a*x**(-S(2)*n) + b*x**(-n) + c)**p, x) def replacement1113(a, b, c, n, n2, x): return Simp(sqrt(a + b*x**n + c*x**(S(2)*n))/n, x) + Simp(b*sqrt(a + b*x**n + c*x**(S(2)*n))*log(x)/(b + S(2)*c*x**n), x) def replacement1114(a, b, c, n, n2, p, x): return Dist(a, Int((a + b*x**n + c*x**(S(2)*n))**(p + S(-1))/x, x), x) + Simp((a + b*x**n + c*x**(S(2)*n))**p/(S(2)*n*p), x) + Simp((S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))/(S(2)*n*(S(2)*p + S(-1))), x) def replacement1115(a, b, c, n, n2, p, x): return Dist(S(1)/a, Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))/x, x), x) - Simp((a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(S(2)*a*n*(p + S(1))), x) - Simp((S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*a*n*(S(2)*p + S(1))), x) def replacement1116(a, b, c, n, n2, p, x): return Dist(c**(-IntPart(p))*(b/S(2) + c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((b/S(2) + c*x**n)**(S(2)*p)/x, x), x) def replacement1117(a, b, c, d, m, n, n2, p, x): return Simp((d*x)**(m + S(1))*(b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(b*d*(m + S(1))), x) def replacement1118(a, b, c, d, m, n, n2, x): return Dist(sqrt(a + b*x**n + c*x**(S(2)*n))/(b + S(2)*c*x**n), Int((d*x)**m*(b + S(2)*c*x**n), x), x) def replacement1119(a, b, c, d, m, n, n2, x): return Simp((d*x)**(m + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))/(d*(m + n + S(1))), x) + Simp(b*n*(d*x)**(m + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))/(d*(b + S(2)*c*x**n)*(m + S(1))*(m + n + S(1))), x) def replacement1120(a, b, c, m, n, n2, x): return -Dist(b/(S(2)*a), Int(S(1)/(x*sqrt(a + b*x**n + c*x**(S(2)*n))), x), x) - Simp(x**(m + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))/(a*n), x) def replacement1121(a, b, c, d, m, n, n2, p, x): return -Simp((d*x)**(m + S(1))*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*a*d*n*(S(2)*p + S(1))), x) + Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(S(2)*a*d*n*(p + S(1))*(S(2)*p + S(1))), x) def replacement1122(a, b, c, m, n, n2, p, x): return -Dist(b/(S(2)*c), Int(x**(n + S(-1))*(a + b*x**n + c*x**(S(2)*n))**p, x), x) + Simp((a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(S(2)*c*n*(p + S(1))), x) def replacement1123(a, b, c, d, m, n, n2, p, x): return -Dist(b*d**(-n)*n**S(2)*p*(S(2)*p + S(-1))/((m + S(1))*(m + S(2)*n*p + S(1))), Int((d*x)**(m + n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) + Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**p/(d*(m + S(2)*n*p + S(1))), x) + Simp(n*p*(d*x)**(m + S(1))*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))/(d*(m + S(1))*(m + S(2)*n*p + S(1))), x) def replacement1124(a, b, c, d, m, n, n2, p, x): return Dist(S(2)*c*d**(-S(2)*n)*n**S(2)*p*(S(2)*p + S(-1))/((m + S(1))*(m + n + S(1))), Int((d*x)**(m + S(2)*n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) + Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**p*(m - n*(S(2)*p + S(-1)) + S(1))/(d*(m + S(1))*(m + n + S(1))), x) + Simp(n*p*(d*x)**(m + S(1))*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))/(d*(m + S(1))*(m + n + S(1))), x) def replacement1125(a, b, c, d, m, n, n2, p, x): return Dist(S(2)*a*n**S(2)*p*(S(2)*p + S(-1))/((m + S(2)*n*p + S(1))*(m + n*(S(2)*p + S(-1)) + S(1))), Int((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) + Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**p/(d*(m + S(2)*n*p + S(1))), x) + Simp(n*p*(d*x)**(m + S(1))*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))/(d*(m + S(2)*n*p + S(1))*(m + n*(S(2)*p + S(-1)) + S(1))), x) def replacement1126(a, b, c, d, m, n, n2, p, x): return -Dist(d**n*(m - n + S(1))*(m + n*(S(2)*p + S(1)) + S(1))/(b*n**S(2)*(p + S(1))*(S(2)*p + S(1))), Int((d*x)**(m - n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(1)), x), x) - Simp((d*x)**(m + S(1))*(b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(b*d*n*(S(2)*p + S(1))), x) + Simp(d**(n + S(-1))*(d*x)**(m - n + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(m + n*(S(2)*p + S(1)) + S(1))/(b*n**S(2)*(p + S(1))*(S(2)*p + S(1))), x) def replacement1127(a, b, c, d, m, n, n2, p, x): return Dist(d**(S(2)*n)*(m - S(2)*n + S(1))*(m - n + S(1))/(S(2)*c*n**S(2)*(p + S(1))*(S(2)*p + S(1))), Int((d*x)**(m - S(2)*n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(1)), x), x) - Simp(d**(S(2)*n + S(-1))*(d*x)**(m - S(2)*n + S(1))*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*c*n*(S(2)*p + S(1))), x) - Simp(d**(S(2)*n + S(-1))*(d*x)**(m - S(2)*n + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(m - S(2)*n*p - S(3)*n + S(1))/(S(2)*c*n**S(2)*(p + S(1))*(S(2)*p + S(1))), x) def replacement1128(a, b, c, d, m, n, n2, p, x): return Dist((m + S(2)*n*(p + S(1)) + S(1))*(m + n*(S(2)*p + S(1)) + S(1))/(S(2)*a*n**S(2)*(p + S(1))*(S(2)*p + S(1))), Int((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**(p + S(1)), x), x) - Simp((d*x)**(m + S(1))*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*a*d*n*(S(2)*p + S(1))), x) - Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(m + n*(S(2)*p + S(1)) + S(1))/(S(2)*a*d*n**S(2)*(p + S(1))*(S(2)*p + S(1))), x) def replacement1129(a, b, c, d, m, n, n2, p, x): return -Dist(b*d**n*(m - n + S(1))/(S(2)*c*(m + S(2)*n*p + S(1))), Int((d*x)**(m - n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x) + Simp(d**(n + S(-1))*(d*x)**(m - n + S(1))*(b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(S(2)*c*(m + S(2)*n*p + S(1))), x) def replacement1130(a, b, c, d, m, n, n2, p, x): return -Dist(S(2)*c*d**(-n)*(m + n*(S(2)*p + S(1)) + S(1))/(b*(m + S(1))), Int((d*x)**(m + n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x) + Simp((d*x)**(m + S(1))*(b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**p/(b*d*(m + S(1))), x) def replacement1131(a, b, c, m, n, n2, p, x): return -Subst(Int(x**(-m + S(-2))*(a + b*x**(-n) + c*x**(-S(2)*n))**p, x), x, S(1)/x) def With1132(a, b, c, d, m, n, n2, p, x): k = Denominator(m) return -Dist(k/d, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a + b*d**(-n)*x**(-k*n) + c*d**(-S(2)*n)*x**(-S(2)*k*n))**p, x), x, (d*x)**(-S(1)/k)), x) def replacement1133(a, b, c, d, m, n, n2, p, x): return -Dist(d**IntPart(m)*(d*x)**FracPart(m)*(S(1)/x)**FracPart(m), Subst(Int(x**(-m + S(-2))*(a + b*x**(-n) + c*x**(-S(2)*n))**p, x), x, S(1)/x), x) def replacement1134(a, b, c, d, m, n, n2, p, x): return Dist(c**(-IntPart(p))*(b/S(2) + c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((d*x)**m*(b/S(2) + c*x**n)**(S(2)*p), x), x) def replacement1135(a, b, c, m, n, n2, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b*x + c*x**S(2))**p, x), x, x**n), x) def replacement1136(a, b, c, d, m, n, n2, p, x): return Dist(d**IntPart(m)*x**(-FracPart(m))*(d*x)**FracPart(m), Int(x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def With1137(a, b, c, m, n, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False k = GCD(m + S(1), n) if Unequal(k, S(1)): return True return False def replacement1137(a, b, c, m, n, n2, p, x): k = GCD(m + S(1), n) return Dist(S(1)/k, Subst(Int(x**(S(-1) + (m + S(1))/k)*(a + b*x**(n/k) + c*x**(S(2)*n/k))**p, x), x, x**k), x) def With1138(a, b, c, d, m, n, n2, p, x): k = Denominator(m) return Dist(k/d, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*d**(-n)*x**(k*n) + c*d**(-S(2)*n)*x**(S(2)*k*n))**p, x), x, (d*x)**(S(1)/k)), x) def replacement1139(a, b, c, d, m, n, n2, p, x): return -Dist(d**n*n*p/(c*(m + S(2)*n*p + S(1))*(m + n*(S(2)*p + S(-1)) + S(1))), Int((d*x)**(m - n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))*Simp(a*b*(m - n + S(1)) - x**n*(S(2)*a*c*(m + n*(S(2)*p + S(-1)) + S(1)) - b**S(2)*(m + n*(p + S(-1)) + S(1))), x), x), x) + Simp(d**(n + S(-1))*(d*x)**(m - n + S(1))*(b*n*p + c*x**n*(m + n*(S(2)*p + S(-1)) + S(1)))*(a + b*x**n + c*x**(S(2)*n))**p/(c*(m + S(2)*n*p + S(1))*(m + n*(S(2)*p + S(-1)) + S(1))), x) def replacement1140(a, b, c, d, m, n, n2, p, x): return -Dist(d**(-n)*n*p/(m + S(1)), Int((d*x)**(m + n)*(b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) + Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**p/(d*(m + S(1))), x) def replacement1141(a, b, c, d, m, n, n2, p, x): return Dist(n*p/(m + S(2)*n*p + S(1)), Int((d*x)**m*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) + Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**p/(d*(m + S(2)*n*p + S(1))), x) def replacement1142(a, b, c, d, m, n, n2, p, x): return -Dist(d**n/(n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((d*x)**(m - n)*(b*(m - n + S(1)) + S(2)*c*x**n*(m + S(2)*n*(p + S(1)) + S(1)))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1)), x), x) + Simp(d**(n + S(-1))*(d*x)**(m - n + S(1))*(b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1143(a, b, c, d, m, n, n2, p, x): return Dist(d**(S(2)*n)/(n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((d*x)**(m - S(2)*n)*(S(2)*a*(m - S(2)*n + S(1)) + b*x**n*(m + n*(S(2)*p + S(1)) + S(1)))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1)), x), x) - Simp(d**(S(2)*n + S(-1))*(d*x)**(m - S(2)*n + S(1))*(S(2)*a + b*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1144(a, b, c, d, m, n, n2, p, x): return Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(-S(2)*a*c*(m + S(2)*n*(p + S(1)) + S(1)) + b**S(2)*(m + n*(p + S(1)) + S(1)) + b*c*x**n*(m + S(2)*n*p + S(3)*n + S(1)), x), x), x) - Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*d*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1145(a, b, c, d, m, n, n2, p, x): return -Dist(d**(S(2)*n)/(c*(m + S(2)*n*p + S(1))), Int((d*x)**(m - S(2)*n)*(a + b*x**n + c*x**(S(2)*n))**p*Simp(a*(m - S(2)*n + S(1)) + b*x**n*(m + n*(p + S(-1)) + S(1)), x), x), x) + Simp(d**(S(2)*n + S(-1))*(d*x)**(m - S(2)*n + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(c*(m + S(2)*n*p + S(1))), x) def replacement1146(a, b, c, d, m, n, n2, p, x): return -Dist(d**(-n)/(a*(m + S(1))), Int((d*x)**(m + n)*(b*(m + n*(p + S(1)) + S(1)) + c*x**n*(m + S(2)*n*(p + S(1)) + S(1)))*(a + b*x**n + c*x**(S(2)*n))**p, x), x) + Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(a*d*(m + S(1))), x) def replacement1147(a, b, c, d, m, n, n2, x): return -Dist(d**(-n)/a, Int((d*x)**(m + n)*(b + c*x**n)/(a + b*x**n + c*x**(S(2)*n)), x), x) + Simp((d*x)**(m + S(1))/(a*d*(m + S(1))), x) def replacement1148(a, b, c, m, n, n2, x): return Int(PolynomialDivide(x**m, a + b*x**n + c*x**(S(2)*n), x), x) def replacement1149(a, b, c, d, m, n, n2, x): return -Dist(d**(S(2)*n)/c, Int((d*x)**(m - S(2)*n)*(a + b*x**n)/(a + b*x**n + c*x**(S(2)*n)), x), x) + Simp(d**(S(2)*n + S(-1))*(d*x)**(m - S(2)*n + S(1))/(c*(m - S(2)*n + S(1))), x) def With1150(a, b, c, x): q = Rt(a/c, S(2)) return -Dist(S(1)/2, Int((q - x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x) + Dist(S(1)/2, Int((q + x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x) def With1151(a, b, c, m, n, n2, x): q = Rt(a/c, S(2)) r = Rt(-b/c + S(2)*q, S(2)) return -Dist(1/(2*c*r), Int(x**(m - 3*n/2)*(q - r*x**(n/2))/(q - r*x**(n/2) + x**n), x), x) + Dist(1/(2*c*r), Int(x**(m - 3*n/2)*(q + r*x**(n/2))/(q + r*x**(n/2) + x**n), x), x) def With1152(a, b, c, m, n, n2, x): q = Rt(a/c, S(2)) r = Rt(-b/c + S(2)*q, S(2)) return Dist(1/(2*c*r), Int(x**(m - n/2)/(q - r*x**(n/2) + x**n), x), x) - Dist(1/(2*c*r), Int(x**(m - n/2)/(q + r*x**(n/2) + x**n), x), x) def With1153(a, b, c, d, m, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return -Dist(d**n*(b/q + S(-1))/S(2), Int((d*x)**(m - n)/(b/S(2) + c*x**n - q/S(2)), x), x) + Dist(d**n*(b/q + S(1))/S(2), Int((d*x)**(m - n)/(b/S(2) + c*x**n + q/S(2)), x), x) def With1154(a, b, c, d, m, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(c/q, Int((d*x)**m/(b/S(2) + c*x**n - q/S(2)), x), x) - Dist(c/q, Int((d*x)**m/(b/S(2) + c*x**n + q/S(2)), x), x) def With1155(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*sqrt(-c), Int(x**S(2)/(sqrt(-b - S(2)*c*x**S(2) + q)*sqrt(b + S(2)*c*x**S(2) + q)), x), x) def With1156(a, b, c, x): q = Rt(c/a, S(2)) return -Dist(S(1)/q, Int((-q*x**S(2) + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist(S(1)/q, Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1157(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(1)/(S(2)*c), Int((b + S(2)*c*x**S(2) - q)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) - Dist((b - q)/(S(2)*c), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1158(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if And(PosQ((b + q)/a), Not(And(PosQ((b - q)/a), SimplerSqrtQ((b - q)/(S(2)*a), (b + q)/(S(2)*a))))): return True return False def replacement1158(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(x*(b + S(2)*c*x**S(2) + q)/(S(2)*c*sqrt(a + b*x**S(2) + c*x**S(4))), x) - Simp(sqrt((S(2)*a + x**S(2)*(b - q))/(S(2)*a + x**S(2)*(b + q)))*(S(2)*a + x**S(2)*(b + q))*EllipticE(ArcTan(x*Rt((b + q)/(S(2)*a), S(2))), S(2)*q/(b + q))*Rt((b + q)/(S(2)*a), S(2))/(S(2)*c*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1159(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if PosQ((b - q)/a): return True return False def replacement1159(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(x*(b + S(2)*c*x**S(2) - q)/(S(2)*c*sqrt(a + b*x**S(2) + c*x**S(4))), x) - Simp(sqrt((S(2)*a + x**S(2)*(b + q))/(S(2)*a + x**S(2)*(b - q)))*(S(2)*a + x**S(2)*(b - q))*EllipticE(ArcTan(x*Rt((b - q)/(S(2)*a), S(2))), -S(2)*q/(b - q))*Rt((b - q)/(S(2)*a), S(2))/(S(2)*c*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1160(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if And(NegQ((b + q)/a), Not(And(NegQ((b - q)/a), SimplerSqrtQ(-(b - q)/(S(2)*a), -(b + q)/(S(2)*a))))): return True return False def replacement1160(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(1)/(S(2)*c), Int((b + S(2)*c*x**S(2) + q)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) - Dist((b + q)/(S(2)*c), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1161(a, b, c, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if NegQ((b - q)/a): return True return False def replacement1161(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(1)/(S(2)*c), Int((b + S(2)*c*x**S(2) - q)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) - Dist((b - q)/(S(2)*c), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1162(a, b, c, x): q = Rt(c/a, S(2)) return -Dist(S(1)/q, Int((-q*x**S(2) + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist(S(1)/q, Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1163(a, b, c, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(sqrt(S(2)*c*x**S(2)/(b - q) + S(1))*sqrt(S(2)*c*x**S(2)/(b + q) + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), Int(x**S(2)/(sqrt(S(2)*c*x**S(2)/(b - q) + S(1))*sqrt(S(2)*c*x**S(2)/(b + q) + S(1))), x), x) def replacement1164(a, b, c, m, n, n2, p, x): return -Subst(Int(x**(-m + S(-2))*(a + b*x**(-n) + c*x**(-S(2)*n))**p, x), x, S(1)/x) def With1165(a, b, c, d, m, n, n2, p, x): k = Denominator(m) return -Dist(k/d, Subst(Int(x**(-k*(m + S(1)) + S(-1))*(a + b*d**(-n)*x**(-k*n) + c*d**(-S(2)*n)*x**(-S(2)*k*n))**p, x), x, (d*x)**(-S(1)/k)), x) def replacement1166(a, b, c, d, m, n, n2, p, x): return -Dist(d**IntPart(m)*(d*x)**FracPart(m)*(S(1)/x)**FracPart(m), Subst(Int(x**(-m + S(-2))*(a + b*x**(-n) + c*x**(-S(2)*n))**p, x), x, S(1)/x), x) def With1167(a, b, c, m, n, n2, p, x): k = Denominator(n) return Dist(k, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + b*x**(k*n) + c*x**(S(2)*k*n))**p, x), x, x**(S(1)/k)), x) def replacement1168(a, b, c, d, m, n, n2, p, x): return Dist(d**IntPart(m)*x**(-FracPart(m))*(d*x)**FracPart(m), Int(x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1169(a, b, c, m, n, n2, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*x**(n/(m + S(1))) + c*x**(S(2)*n/(m + S(1))))**p, x), x, x**(m + S(1))), x) def replacement1170(a, b, c, d, m, n, n2, p, x): return Dist(d**IntPart(m)*x**(-FracPart(m))*(d*x)**FracPart(m), Int(x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def With1171(a, b, c, d, m, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int((d*x)**m/(b + S(2)*c*x**n - q), x), x) - Dist(S(2)*c/q, Int((d*x)**m/(b + S(2)*c*x**n + q), x), x) def replacement1172(a, b, c, d, m, n, n2, p, x): return Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(-S(2)*a*c*(m + S(2)*n*(p + S(1)) + S(1)) + b**S(2)*(m + n*(p + S(1)) + S(1)) + b*c*x**n*(m + S(2)*n*p + S(3)*n + S(1)), x), x), x) - Simp((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*d*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1173(a, b, c, d, m, n, n2, p, x): return Dist(a**IntPart(p)*(S(2)*c*x**n/(b - Rt(-S(4)*a*c + b**S(2), S(2))) + S(1))**(-FracPart(p))*(S(2)*c*x**n/(b + Rt(-S(4)*a*c + b**S(2), S(2))) + S(1))**(-FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((d*x)**m*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**p*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**p, x), x) def replacement1174(a, b, c, m, mn, n, p, x): return Int(x**(m - n*p)*(a*x**n + b + c*x**(S(2)*n))**p, x) def replacement1175(a, b, c, m, mn, n, p, x): return Dist(x**(n*FracPart(p))*(a + b*x**(-n) + c*x**n)**FracPart(p)*(a*x**n + b + c*x**(S(2)*n))**(-FracPart(p)), Int(x**(m - n*p)*(a*x**n + b + c*x**(S(2)*n))**p, x), x) def replacement1176(a, b, c, d, m, mn, n, p, x): return Dist(d**IntPart(m)*x**(-FracPart(m))*(d*x)**FracPart(m), Int(x**m*(a + b*x**(-n) + c*x**n)**p, x), x) def replacement1177(a, b, c, m, n, n2, p, v, x): return Dist(Coefficient(v, x, S(1))**(-m + S(-1)), Subst(Int(SimplifyIntegrand((x - Coefficient(v, x, S(0)))**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x), x, v), x) def replacement1178(a, b, c, m, n, n2, p, u, v, x): return Dist(u**m*v**(-m)/Coefficient(v, x, S(1)), Subst(Int(x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x, v), x) def replacement1179(a, b, c, d, e, n, n2, p, q, x): return Int(x**(n*(S(2)*p + q))*(d*x**(-n) + e)**q*(a*x**(-S(2)*n) + b*x**(-n) + c)**p, x) def replacement1180(a, c, d, e, n, n2, p, q, x): return Int(x**(n*(S(2)*p + q))*(a*x**(-S(2)*n) + c)**p*(d*x**(-n) + e)**q, x) def replacement1181(a, b, c, d, e, n, n2, p, q, x): return -Subst(Int((d + e*x**(-n))**q*(a + b*x**(-n) + c*x**(-S(2)*n))**p/x**S(2), x), x, S(1)/x) def replacement1182(a, c, d, e, n, n2, p, q, x): return -Subst(Int((a + c*x**(-S(2)*n))**p*(d + e*x**(-n))**q/x**S(2), x), x, S(1)/x) def With1183(a, b, c, d, e, n, n2, p, q, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g + S(-1))*(d + e*x**(g*n))**q*(a + b*x**(g*n) + c*x**(S(2)*g*n))**p, x), x, x**(S(1)/g)), x) def With1184(a, c, d, e, n, n2, p, q, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g + S(-1))*(a + c*x**(S(2)*g*n))**p*(d + e*x**(g*n))**q, x), x, x**(S(1)/g)), x) def replacement1185(b, c, d, e, n, n2, p, x): return Dist(e/c, Int(x**(-n)*(b*x**n + c*x**(S(2)*n))**(p + S(1)), x), x) + Simp(x**(-S(2)*n*(p + S(1)))*(b*e - c*d)*(b*x**n + c*x**(S(2)*n))**(p + S(1))/(b*c*n*(p + S(1))), x) def replacement1186(b, c, d, e, n, n2, p, x): return Simp(e*x**(S(1) - n)*(b*x**n + c*x**(S(2)*n))**(p + S(1))/(c*(n*(S(2)*p + S(1)) + S(1))), x) def replacement1187(b, c, d, e, n, n2, p, x): return -Dist((b*e*(n*p + S(1)) - c*d*(n*(S(2)*p + S(1)) + S(1)))/(c*(n*(S(2)*p + S(1)) + S(1))), Int((b*x**n + c*x**(S(2)*n))**p, x), x) + Simp(e*x**(S(1) - n)*(b*x**n + c*x**(S(2)*n))**(p + S(1))/(c*(n*(S(2)*p + S(1)) + S(1))), x) def replacement1188(b, c, d, e, n, n2, p, q, x): return Dist(x**(-n*FracPart(p))*(b + c*x**n)**(-FracPart(p))*(b*x**n + c*x**(S(2)*n))**FracPart(p), Int(x**(n*p)*(b + c*x**n)**p*(d + e*x**n)**q, x), x) def replacement1189(a, b, c, d, e, n, n2, p, q, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((b + S(2)*c*x**n)**(S(2)*p)*(d + e*x**n)**q, x), x) def replacement1190(a, b, c, d, e, n, n2, p, q, x): return Int((d + e*x**n)**(p + q)*(a/d + c*x**n/e)**p, x) def replacement1191(a, c, d, e, n, n2, p, q, x): return Int((d + e*x**n)**(p + q)*(a/d + c*x**n/e)**p, x) def replacement1192(a, b, c, d, e, n, n2, p, q, x): return Dist((d + e*x**n)**(-FracPart(p))*(a/d + c*x**n/e)**(-FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((d + e*x**n)**(p + q)*(a/d + c*x**n/e)**p, x), x) def replacement1193(a, c, d, e, n, n2, p, q, x): return Dist((a + c*x**(S(2)*n))**FracPart(p)*(d + e*x**n)**(-FracPart(p))*(a/d + c*x**n/e)**(-FracPart(p)), Int((d + e*x**n)**(p + q)*(a/d + c*x**n/e)**p, x), x) def replacement1194(a, b, c, d, e, n, n2, q, x): return Int(ExpandIntegrand((d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1195(a, c, d, e, n, n2, q, x): return Int(ExpandIntegrand((a + c*x**(S(2)*n))*(d + e*x**n)**q, x), x) def replacement1196(a, b, c, d, e, n, n2, q, x): return Dist(S(1)/(d*e**S(2)*n*(q + S(1))), Int((d + e*x**n)**(q + S(1))*Simp(a*e**S(2)*(n*(q + S(1)) + S(1)) - b*d*e + c*d**S(2) + c*d*e*n*x**n*(q + S(1)), x), x), x) - Simp(x*(d + e*x**n)**(q + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))/(d*e**S(2)*n*(q + S(1))), x) def replacement1197(a, c, d, e, n, n2, q, x): return Dist(S(1)/(d*e**S(2)*n*(q + S(1))), Int((d + e*x**n)**(q + S(1))*Simp(a*e**S(2)*(n*(q + S(1)) + S(1)) + c*d**S(2) + c*d*e*n*x**n*(q + S(1)), x), x), x) - Simp(x*(d + e*x**n)**(q + S(1))*(a*e**S(2) + c*d**S(2))/(d*e**S(2)*n*(q + S(1))), x) def replacement1198(a, b, c, d, e, n, n2, q, x): return Dist(S(1)/(e*(n*(q + S(2)) + S(1))), Int((d + e*x**n)**q*(a*e*(n*(q + S(2)) + S(1)) - x**n*(-b*e*(n*(q + S(2)) + S(1)) + c*d*(n + S(1)))), x), x) + Simp(c*x**(n + S(1))*(d + e*x**n)**(q + S(1))/(e*(n*(q + S(2)) + S(1))), x) def replacement1199(a, c, d, e, n, n2, q, x): return Dist(S(1)/(e*(n*(q + S(2)) + S(1))), Int((d + e*x**n)**q*(a*e*(n*(q + S(2)) + S(1)) - c*d*x**n*(n + S(1))), x), x) + Simp(c*x**(n + S(1))*(d + e*x**n)**(q + S(1))/(e*(n*(q + S(2)) + S(1))), x) def With1200(a, c, d, e, n, n2, x): q = Rt(S(2)*d*e, S(2)) return Dist(e**S(2)/(S(2)*c), Int(S(1)/(d + e*x**n - q*x**(n/S(2))), x), x) + Dist(e**S(2)/(S(2)*c), Int(S(1)/(d + e*x**n + q*x**(n/S(2))), x), x) def With1201(a, c, d, e, n, n2, x): q = Rt(-S(2)*d*e, S(2)) return Dist(d/(S(2)*a), Int((d - q*x**(n/S(2)))/(d - e*x**n - q*x**(n/S(2))), x), x) + Dist(d/(S(2)*a), Int((d + q*x**(n/S(2)))/(d - e*x**n + q*x**(n/S(2))), x), x) def With1202(a, c, d, e, x): q = Rt(a*c, S(2)) return Dist((-a*e + d*q)/(S(2)*a*c), Int((-c*x**S(2) + q)/(a + c*x**S(4)), x), x) + Dist((a*e + d*q)/(S(2)*a*c), Int((c*x**S(2) + q)/(a + c*x**S(4)), x), x) def With1203(a, c, d, e, n, n2, x): q = Rt(a/c, S(4)) return Dist(sqrt(S(2))/(S(4)*c*q**S(3)), Int((sqrt(S(2))*d*q - x**(n/S(2))*(d - e*q**S(2)))/(q**S(2) - sqrt(S(2))*q*x**(n/S(2)) + x**n), x), x) + Dist(sqrt(S(2))/(S(4)*c*q**S(3)), Int((sqrt(S(2))*d*q + x**(n/S(2))*(d - e*q**S(2)))/(q**S(2) + sqrt(S(2))*q*x**(n/S(2)) + x**n), x), x) def With1204(a, c, d, e, x): q = Rt(c/a, S(6)) return Dist(S(1)/(S(6)*a*q**S(2)), Int((S(2)*d*q**S(2) - x*(sqrt(S(3))*d*q**S(3) - e))/(q**S(2)*x**S(2) - sqrt(S(3))*q*x + S(1)), x), x) + Dist(S(1)/(S(6)*a*q**S(2)), Int((S(2)*d*q**S(2) + x*(sqrt(S(3))*d*q**S(3) + e))/(q**S(2)*x**S(2) + sqrt(S(3))*q*x + S(1)), x), x) + Dist(S(1)/(S(3)*a*q**S(2)), Int((d*q**S(2) - e*x)/(q**S(2)*x**S(2) + S(1)), x), x) def With1205(a, c, d, e, n, n2, x): q = Rt(-a/c, S(2)) return Dist(d/S(2) - e*q/S(2), Int(S(1)/(a - c*q*x**n), x), x) + Dist(d/S(2) + e*q/S(2), Int(S(1)/(a + c*q*x**n), x), x) def replacement1206(a, c, d, e, n, n2, x): return Dist(d, Int(S(1)/(a + c*x**(S(2)*n)), x), x) + Dist(e, Int(x**n/(a + c*x**(S(2)*n)), x), x) def With1207(a, b, c, d, e, n, n2, x): q = Rt(-b/c + S(2)*d/e, S(2)) return Dist(e**S(2)/(S(2)*c), Int(S(1)/(d - e*q*x**(n/S(2)) + e*x**n), x), x) + Dist(e**S(2)/(S(2)*c), Int(S(1)/(d + e*q*x**(n/S(2)) + e*x**n), x), x) def With1208(a, b, c, d, e, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(e/S(2) - (-b*e + S(2)*c*d)/(S(2)*q), Int(S(1)/(b/S(2) + c*x**n + q/S(2)), x), x) + Dist(e/S(2) + (-b*e + S(2)*c*d)/(S(2)*q), Int(S(1)/(b/S(2) + c*x**n - q/S(2)), x), x) def With1209(a, b, c, d, e, n, n2, x): q = Rt(a/c, S(2)) r = Rt(-b/c + S(2)*q, S(2)) return Dist(1/(2*c*q*r), Int((d*r - x**(n/2)*(d - e*q))/(q - r*x**(n/2) + x**n), x), x) + Dist(1/(2*c*q*r), Int((d*r + x**(n/2)*(d - e*q))/(q + r*x**(n/2) + x**n), x), x) def With1210(a, b, c, d, e, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(e/S(2) - (-b*e + S(2)*c*d)/(S(2)*q), Int(S(1)/(b/S(2) + c*x**n + q/S(2)), x), x) + Dist(e/S(2) + (-b*e + S(2)*c*d)/(S(2)*q), Int(S(1)/(b/S(2) + c*x**n - q/S(2)), x), x) def With1211(a, b, c, d, e, n, n2, x): q = Rt(a/c, S(2)) r = Rt(-b/c + S(2)*q, S(2)) return Dist(1/(2*c*q*r), Int((d*r - x**(n/2)*(d - e*q))/(q - r*x**(n/2) + x**n), x), x) + Dist(1/(2*c*q*r), Int((d*r + x**(n/2)*(d - e*q))/(q + r*x**(n/2) + x**n), x), x) def replacement1212(a, b, c, d, e, n, n2, q, x): return Int(ExpandIntegrand((d + e*x**n)**q/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1213(a, c, d, e, n, n2, q, x): return Int(ExpandIntegrand((d + e*x**n)**q/(a + c*x**(S(2)*n)), x), x) def replacement1214(a, b, c, d, e, n, n2, q, x): return Dist(e**S(2)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((d + e*x**n)**q, x), x) + Dist(S(1)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((d + e*x**n)**(q + S(1))*(-b*e + c*d - c*e*x**n)/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1215(a, c, d, e, n, n2, q, x): return Dist(c/(a*e**S(2) + c*d**S(2)), Int((d - e*x**n)*(d + e*x**n)**(q + S(1))/(a + c*x**(S(2)*n)), x), x) + Dist(e**S(2)/(a*e**S(2) + c*d**S(2)), Int((d + e*x**n)**q, x), x) def With1216(a, b, c, d, e, n, n2, q, x): r = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/r, Int((d + e*x**n)**q/(b + S(2)*c*x**n - r), x), x) - Dist(S(2)*c/r, Int((d + e*x**n)**q/(b + S(2)*c*x**n + r), x), x) def With1217(a, c, d, e, n, n2, q, x): r = Rt(-a*c, S(2)) return -Dist(c/(S(2)*r), Int((d + e*x**n)**q/(-c*x**n + r), x), x) - Dist(c/(S(2)*r), Int((d + e*x**n)**q/(c*x**n + r), x), x) def replacement1218(a, b, c, d, e, n, n2, p, x): return Dist(n*p/(c*(S(2)*n*p + S(1))*(S(2)*n*p + n + S(1))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(-1))*Simp(-a*b*e + S(2)*a*c*d*(S(2)*n*p + n + S(1)) + x**n*(S(2)*a*c*e*(S(2)*n*p + S(1)) - b**S(2)*e*(n*p + S(1)) + b*c*d*(S(2)*n*p + n + S(1))), x), x), x) + Simp(x*(a + b*x**n + c*x**(S(2)*n))**p*(b*e*n*p + c*d*(S(2)*n*p + n + S(1)) + c*e*x**n*(S(2)*n*p + S(1)))/(c*(S(2)*n*p + S(1))*(S(2)*n*p + n + S(1))), x) def replacement1219(a, c, d, e, n, n2, p, x): return Dist(S(2)*a*n*p/((S(2)*n*p + S(1))*(S(2)*n*p + n + S(1))), Int((a + c*x**(S(2)*n))**(p + S(-1))*(d*(S(2)*n*p + n + S(1)) + e*x**n*(S(2)*n*p + S(1))), x), x) + Simp(x*(a + c*x**(S(2)*n))**p*(d*(S(2)*n*p + n + S(1)) + e*x**n*(S(2)*n*p + S(1)))/((S(2)*n*p + S(1))*(S(2)*n*p + n + S(1))), x) def replacement1220(a, b, c, d, e, n, n2, p, x): return Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(-a*b*e - S(2)*a*c*d*(S(2)*n*p + S(2)*n + S(1)) + b**S(2)*d*(n*p + n + S(1)) + c*x**n*(-S(2)*a*e + b*d)*(S(2)*n*p + S(3)*n + S(1)), x), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-a*b*e - S(2)*a*c*d + b**S(2)*d + c*x**n*(-S(2)*a*e + b*d))/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1221(a, c, d, e, n, n2, p, x): return Dist(S(1)/(S(2)*a*n*(p + S(1))), Int((a + c*x**(S(2)*n))**(p + S(1))*(d*(S(2)*n*p + S(2)*n + S(1)) + e*x**n*(S(2)*n*p + S(3)*n + S(1))), x), x) - Simp(x*(a + c*x**(S(2)*n))**(p + S(1))*(d + e*x**n)/(S(2)*a*n*(p + S(1))), x) def With1222(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*sqrt(-c), Int((d + e*x**S(2))/(sqrt(-b - S(2)*c*x**S(2) + q)*sqrt(b + S(2)*c*x**S(2) + q)), x), x) def With1223(a, c, d, e, x): q = Rt(-a*c, S(2)) return Dist(sqrt(-c), Int((d + e*x**S(2))/(sqrt(-c*x**S(2) + q)*sqrt(c*x**S(2) + q)), x), x) def With1224(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(c/a, S(4)) if ZeroQ(d*q**S(2) + e): return True return False def replacement1224(a, b, c, d, e, x): q = Rt(c/a, S(4)) return -Simp(d*x*sqrt(a + b*x**S(2) + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))), x) + Simp(d*sqrt((a + b*x**S(2) + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))**S(2)))*(q**S(2)*x**S(2) + S(1))*EllipticE(S(2)*ArcTan(q*x), -b*q**S(2)/(S(4)*c) + S(1)/2)/(q*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1225(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(c/a, S(2)) if NonzeroQ(d*q + e): return True return False def replacement1225(a, b, c, d, e, x): q = Rt(c/a, S(2)) return -Dist(e/q, Int((-q*x**S(2) + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist((d*q + e)/q, Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1226(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if ZeroQ(S(2)*c*d - e*(b - q)): return True return False def replacement1226(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Simp(e*x*(b + S(2)*c*x**S(2) + q)/(S(2)*c*sqrt(a + b*x**S(2) + c*x**S(4))), x) - Simp(e*q*sqrt((S(2)*a + x**S(2)*(b + q))/q)*sqrt((S(2)*a + x**S(2)*(b - q))/(S(2)*a + x**S(2)*(b + q)))*EllipticE(asin(sqrt(S(2))*x/sqrt((S(2)*a + x**S(2)*(b + q))/q)), (b + q)/(S(2)*q))/(S(2)*c*sqrt(a/(S(2)*a + x**S(2)*(b + q)))*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1227(a, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-a*c, S(2)) if And(ZeroQ(c*d + e*q), IntegerQ(q)): return True return False def replacement1227(a, c, d, e, x): q = Rt(-a*c, S(2)) return Simp(e*x*(c*x**S(2) + q)/(c*sqrt(a + c*x**S(4))), x) - Simp(sqrt(S(2))*e*q*sqrt((a + q*x**S(2))/q)*sqrt(-a + q*x**S(2))*EllipticE(asin(sqrt(S(2))*x/sqrt((a + q*x**S(2))/q)), S(1)/2)/(c*sqrt(-a)*sqrt(a + c*x**S(4))), x) def With1228(a, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-a*c, S(2)) if ZeroQ(c*d + e*q): return True return False def replacement1228(a, c, d, e, x): q = Rt(-a*c, S(2)) return Simp(e*x*(c*x**S(2) + q)/(c*sqrt(a + c*x**S(4))), x) - Simp(sqrt(S(2))*e*q*sqrt((a + q*x**S(2))/q)*sqrt((a - q*x**S(2))/(a + q*x**S(2)))*EllipticE(asin(sqrt(S(2))*x/sqrt((a + q*x**S(2))/q)), S(1)/2)/(c*sqrt(a/(a + q*x**S(2)))*sqrt(a + c*x**S(4))), x) def With1229(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if NonzeroQ(S(2)*c*d - e*(b - q)): return True return False def replacement1229(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(e/(S(2)*c), Int((b + S(2)*c*x**S(2) - q)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist((S(2)*c*d - e*(b - q))/(S(2)*c), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1230(a, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-a*c, S(2)) if NonzeroQ(c*d + e*q): return True return False def replacement1230(a, c, d, e, x): q = Rt(-a*c, S(2)) return -Dist(e/c, Int((-c*x**S(2) + q)/sqrt(a + c*x**S(4)), x), x) + Dist((c*d + e*q)/c, Int(S(1)/sqrt(a + c*x**S(4)), x), x) def With1231(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if Or(PosQ((b + q)/a), PosQ((b - q)/a)): return True return False def replacement1231(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(d, Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist(e, Int(x**S(2)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def replacement1232(a, c, d, e, x): return Dist(d, Int(S(1)/sqrt(a + c*x**S(4)), x), x) + Dist(e, Int(x**S(2)/sqrt(a + c*x**S(4)), x), x) def With1233(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if And(NegQ((b + q)/a), ZeroQ(S(2)*c*d - e*(b + q)), Not(SimplerSqrtQ(-(b - q)/(S(2)*a), -(b + q)/(S(2)*a)))): return True return False def replacement1233(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return -Simp(a*e*sqrt(S(1) + x**S(2)*(b - q)/(S(2)*a))*sqrt(S(1) + x**S(2)*(b + q)/(S(2)*a))*EllipticE(asin(x*Rt(-(b + q)/(S(2)*a), S(2))), (b - q)/(b + q))*Rt(-(b + q)/(S(2)*a), S(2))/(c*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1234(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if And(NegQ((b + q)/a), NonzeroQ(S(2)*c*d - e*(b + q)), Not(SimplerSqrtQ(-(b - q)/(S(2)*a), -(b + q)/(S(2)*a)))): return True return False def replacement1234(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(e/(S(2)*c), Int((b + S(2)*c*x**S(2) + q)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist((S(2)*c*d - e*(b + q))/(S(2)*c), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1235(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if And(NegQ((b - q)/a), ZeroQ(S(2)*c*d - e*(b - q))): return True return False def replacement1235(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return -Simp(a*e*sqrt(S(1) + x**S(2)*(b - q)/(S(2)*a))*sqrt(S(1) + x**S(2)*(b + q)/(S(2)*a))*EllipticE(asin(x*Rt(-(b - q)/(S(2)*a), S(2))), (b + q)/(b - q))*Rt(-(b - q)/(S(2)*a), S(2))/(c*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1236(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if And(NegQ((b - q)/a), NonzeroQ(S(2)*c*d - e*(b - q))): return True return False def replacement1236(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(e/(S(2)*c), Int((b + S(2)*c*x**S(2) - q)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist((S(2)*c*d - e*(b - q))/(S(2)*c), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1237(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(c/a, S(4)) if ZeroQ(d*q**S(2) + e): return True return False def replacement1237(a, b, c, d, e, x): q = Rt(c/a, S(4)) return -Simp(d*x*sqrt(a + b*x**S(2) + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))), x) + Simp(d*sqrt((a + b*x**S(2) + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))**S(2)))*(q**S(2)*x**S(2) + S(1))*EllipticE(S(2)*ArcTan(q*x), -b*q**S(2)/(S(4)*c) + S(1)/2)/(q*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1238(a, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(c/a, S(4)) if ZeroQ(d*q**S(2) + e): return True return False def replacement1238(a, c, d, e, x): q = Rt(c/a, S(4)) return -Simp(d*x*sqrt(a + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))), x) + Simp(d*sqrt((a + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))**S(2)))*(q**S(2)*x**S(2) + S(1))*EllipticE(S(2)*ArcTan(q*x), S(1)/2)/(q*sqrt(a + c*x**S(4))), x) def With1239(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(c/a, S(2)) if NonzeroQ(d*q + e): return True return False def replacement1239(a, b, c, d, e, x): q = Rt(c/a, S(2)) return -Dist(e/q, Int((-q*x**S(2) + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist((d*q + e)/q, Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) def With1240(a, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(c/a, S(2)) if NonzeroQ(d*q + e): return True return False def replacement1240(a, c, d, e, x): q = Rt(c/a, S(2)) return -Dist(e/q, Int((-q*x**S(2) + S(1))/sqrt(a + c*x**S(4)), x), x) + Dist((d*q + e)/q, Int(S(1)/sqrt(a + c*x**S(4)), x), x) def replacement1241(a, c, d, e, x): return Dist(d/sqrt(a), Int(sqrt(S(1) + e*x**S(2)/d)/sqrt(S(1) - e*x**S(2)/d), x), x) def replacement1242(a, c, d, e, x): return Dist(sqrt(S(1) + c*x**S(4)/a)/sqrt(a + c*x**S(4)), Int((d + e*x**S(2))/sqrt(S(1) + c*x**S(4)/a), x), x) def With1243(a, c, d, e, x): q = Rt(-c/a, S(2)) return Dist(e/q, Int((q*x**S(2) + S(1))/sqrt(a + c*x**S(4)), x), x) + Dist((d*q - e)/q, Int(S(1)/sqrt(a + c*x**S(4)), x), x) def With1244(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(sqrt(S(2)*c*x**S(2)/(b - q) + S(1))*sqrt(S(2)*c*x**S(2)/(b + q) + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), Int((d + e*x**S(2))/(sqrt(S(2)*c*x**S(2)/(b - q) + S(1))*sqrt(S(2)*c*x**S(2)/(b + q) + S(1))), x), x) def replacement1245(a, b, c, d, e, n, n2, p, x): return Int(ExpandIntegrand((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1246(a, c, d, e, n, n2, p, x): return Int(ExpandIntegrand((a + c*x**(S(2)*n))**p*(d + e*x**n), x), x) def replacement1247(a, b, c, d, e, n, n2, p, q, x): return Int((d + e*x**n)**q*ExpandToSum(-c**p*d*x**(S(2)*n*p - n)*(S(2)*n*p - n + S(1))/(e*(S(2)*n*p + n*q + S(1))) - c**p*x**(S(2)*n*p) + (a + b*x**n + c*x**(S(2)*n))**p, x), x) + Simp(c**p*x**(S(2)*n*p - n + S(1))*(d + e*x**n)**(q + S(1))/(e*(S(2)*n*p + n*q + S(1))), x) def replacement1248(a, c, d, e, n, n2, p, q, x): return Int((d + e*x**n)**q*ExpandToSum(-c**p*d*x**(S(2)*n*p - n)*(S(2)*n*p - n + S(1))/(e*(S(2)*n*p + n*q + S(1))) - c**p*x**(S(2)*n*p) + (a + c*x**(S(2)*n))**p, x), x) + Simp(c**p*x**(S(2)*n*p - n + S(1))*(d + e*x**n)**(q + S(1))/(e*(S(2)*n*p + n*q + S(1))), x) def replacement1249(a, b, c, d, e, x): return -Dist(e**(S(-2)), Int((-b*e + c*d - c*e*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist((a*e**S(2) - b*d*e + c*d**S(2))/e**S(2), Int(S(1)/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x) def replacement1250(a, c, d, e, x): return -Dist(c/e**S(2), Int((d - e*x**S(2))/sqrt(a + c*x**S(4)), x), x) + Dist((a*e**S(2) + c*d**S(2))/e**S(2), Int(S(1)/(sqrt(a + c*x**S(4))*(d + e*x**S(2))), x), x) def With1251(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return -Dist(e**(S(-4)), Int(Simp(-c**S(2)*e**S(3)*x**S(6) + c*e**S(2)*x**S(4)*(-S(2)*b*e + c*d) - S(2)*c*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)/(S(2)*c*d - e*(b + q)) - e*x**S(2)*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - S(2)*c*e*(-a*e + b*d)) + (-b*e + c*d)*(S(2)*a*e**S(2) - b*d*e + c*d**S(2)), x)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) - Dist((a*e**S(2) - b*d*e + c*d**S(2))**S(2)/(e**S(3)*(S(2)*c*d - e*(b + q))), Int((b + S(2)*c*x**S(2) + q)/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x) def With1252(a, c, d, e, x): q = Rt(-a*c, S(2)) return -Dist(c/e**S(4), Int(Simp(c*d*e**S(2)*x**S(4) - c*e**S(3)*x**S(6) + d*(S(2)*a*e**S(2) + c*d**S(2)) - e*x**S(2)*(S(2)*a*e**S(2) + c*d**S(2)) - (a*e**S(2) + c*d**S(2))**S(2)/(c*d - e*q), x)/sqrt(a + c*x**S(4)), x), x) - Dist((a*e**S(2) + c*d**S(2))**S(2)/(e**S(3)*(c*d - e*q)), Int((c*x**S(2) + q)/(sqrt(a + c*x**S(4))*(d + e*x**S(2))), x), x) def replacement1253(a, b, c, d, e, p, x): return Dist(a, Int((a + b*x**S(2) + c*x**S(4))**(p + S(-1))/(d + e*x**S(2)), x), x) + Dist(b, Int(x**S(2)*(a + b*x**S(2) + c*x**S(4))**(p + S(-1))/(d + e*x**S(2)), x), x) + Dist(c, Int(x**S(4)*(a + b*x**S(2) + c*x**S(4))**(p + S(-1))/(d + e*x**S(2)), x), x) def replacement1254(a, c, d, e, p, x): return Dist(a, Int((a + c*x**S(4))**(p + S(-1))/(d + e*x**S(2)), x), x) + Dist(c, Int(x**S(4)*(a + c*x**S(4))**(p + S(-1))/(d + e*x**S(2)), x), x) def With1255(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*sqrt(-c), Int(S(1)/((d + e*x**S(2))*sqrt(-b - S(2)*c*x**S(2) + q)*sqrt(b + S(2)*c*x**S(2) + q)), x), x) def With1256(a, c, d, e, x): q = Rt(-a*c, S(2)) return Dist(sqrt(-c), Int(S(1)/((d + e*x**S(2))*sqrt(-c*x**S(2) + q)*sqrt(c*x**S(2) + q)), x), x) def With1257(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/(S(2)*c*d - e*(b - q)), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) - Dist(e/(S(2)*c*d - e*(b - q)), Int((b + S(2)*c*x**S(2) - q)/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x) def With1258(a, c, d, e, x): q = Rt(-a*c, S(2)) return Dist(c/(c*d + e*q), Int(S(1)/sqrt(a + c*x**S(4)), x), x) + Dist(e/(c*d + e*q), Int((-c*x**S(2) + q)/(sqrt(a + c*x**S(4))*(d + e*x**S(2))), x), x) def With1259(a, b, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(c/a, S(4)) if NonzeroQ(-d*q**S(2) + e): return True return False def replacement1259(a, b, c, d, e, x): q = Rt(c/a, S(4)) return -Dist(q**S(2)/(-d*q**S(2) + e), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Simp(ArcTan(x*sqrt((a*e**S(2) - b*d*e + c*d**S(2))/(d*e))/sqrt(a + b*x**S(2) + c*x**S(4)))/(S(2)*d*sqrt((a*e**S(2) - b*d*e + c*d**S(2))/(d*e))), x) + Simp(sqrt((a + b*x**S(2) + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))**S(2)))*(d*q**S(2) + e)*(q**S(2)*x**S(2) + S(1))*EllipticPi(-(-d*q**S(2) + e)**S(2)/(S(4)*d*e*q**S(2)), S(2)*ArcTan(q*x), -b*q**S(2)/(S(4)*c) + S(1)/2)/(S(4)*d*q*(-d*q**S(2) + e)*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1260(a, c, d, e, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(c/a, S(4)) if NonzeroQ(-d*q**S(2) + e): return True return False def replacement1260(a, c, d, e, x): q = Rt(c/a, S(4)) return -Dist(q**S(2)/(-d*q**S(2) + e), Int(S(1)/sqrt(a + c*x**S(4)), x), x) + Simp(ArcTan(x*sqrt((a*e**S(2) + c*d**S(2))/(d*e))/sqrt(a + c*x**S(4)))/(S(2)*d*sqrt((a*e**S(2) + c*d**S(2))/(d*e))), x) + Simp(sqrt((a + c*x**S(4))/(a*(q**S(2)*x**S(2) + S(1))**S(2)))*(d*q**S(2) + e)*(q**S(2)*x**S(2) + S(1))*EllipticPi(-(-d*q**S(2) + e)**S(2)/(S(4)*d*e*q**S(2)), S(2)*ArcTan(q*x), S(1)/2)/(S(4)*d*q*sqrt(a + c*x**S(4))*(-d*q**S(2) + e)), x) def With1261(a, c, d, e, x): q = Rt(-c/a, S(4)) return Simp(EllipticPi(-e/(d*q**S(2)), asin(q*x), S(-1))/(sqrt(a)*d*q), x) def replacement1262(a, c, d, e, x): return Dist(sqrt(S(1) + c*x**S(4)/a)/sqrt(a + c*x**S(4)), Int(S(1)/(sqrt(S(1) + c*x**S(4)/a)*(d + e*x**S(2))), x), x) def With1263(a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(sqrt(S(2)*c*x**S(2)/(b - q) + S(1))*sqrt(S(2)*c*x**S(2)/(b + q) + S(1))/sqrt(a + b*x**S(2) + c*x**S(4)), Int(S(1)/((d + e*x**S(2))*sqrt(S(2)*c*x**S(2)/(b - q) + S(1))*sqrt(S(2)*c*x**S(2)/(b + q) + S(1))), x), x) def replacement1264(a, b, c, d, e, p, x): return -Dist(S(1)/(S(2)*a*(p + S(1))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), Int((a + b*x**S(2) + c*x**S(4))**(p + S(1))*Simp(-a*b*c*d*e*(S(8)*p + S(11)) + S(2)*a*c*(S(4)*a*e**S(2)*(p + S(1)) + c*d**S(2)*(S(4)*p + S(5))) + b**S(3)*d*e*(S(2)*p + S(3)) - b**S(2)*(S(2)*a*e**S(2)*(p + S(1)) + c*d**S(2)*(S(2)*p + S(3))) - c*e*x**S(4)*(S(4)*p + S(7))*(S(2)*a*c*e - b**S(2)*e + b*c*d) - x**S(2)*(S(4)*a*c**S(2)*d*e - b**S(3)*e**S(2)*(S(2)*p + S(3)) - S(2)*b**S(2)*c*d*e*(p + S(2)) + b*c*(a*e**S(2)*(S(8)*p + S(11)) + c*d**S(2)*(S(4)*p + S(7)))), x)/(d + e*x**S(2)), x), x) - Simp(x*(a + b*x**S(2) + c*x**S(4))**(p + S(1))*(S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d + c*x**S(2)*(S(2)*a*c*e - b**S(2)*e + b*c*d))/(S(2)*a*(p + S(1))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement1265(a, c, d, e, p, x): return -Dist(-S(1)/(S(8)*a**S(2)*c*(p + S(1))*(a*e**S(2) + c*d**S(2))), Int((a + c*x**S(4))**(p + S(1))*Simp(-S(4)*a*c**S(2)*d*e*x**S(2) - S(2)*a*c**S(2)*e**S(2)*x**S(4)*(S(4)*p + S(7)) + S(2)*a*c*(S(4)*a*e**S(2)*(p + S(1)) + c*d**S(2)*(S(4)*p + S(5))), x)/(d + e*x**S(2)), x), x) - Simp(-x*(a + c*x**S(4))**(p + S(1))*(-S(2)*a*c**S(2)*d + S(2)*a*c**S(2)*e*x**S(2))/(S(8)*a**S(2)*c*(p + S(1))*(a*e**S(2) + c*d**S(2))), x) def replacement1266(a, b, c, d, e, x): return -Dist(c/(S(2)*d*(a*e**S(2) - b*d*e + c*d**S(2))), Int((d + e*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist((a*e**S(2) - S(2)*b*d*e + S(3)*c*d**S(2))/(S(2)*d*(a*e**S(2) - b*d*e + c*d**S(2))), Int(S(1)/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x) + Simp(e**S(2)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*d*(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), x) def replacement1267(a, c, d, e, x): return -Dist(c/(S(2)*d*(a*e**S(2) + c*d**S(2))), Int((d + e*x**S(2))/sqrt(a + c*x**S(4)), x), x) + Dist((a*e**S(2) + S(3)*c*d**S(2))/(S(2)*d*(a*e**S(2) + c*d**S(2))), Int(S(1)/(sqrt(a + c*x**S(4))*(d + e*x**S(2))), x), x) + Simp(e**S(2)*x*sqrt(a + c*x**S(4))/(S(2)*d*(d + e*x**S(2))*(a*e**S(2) + c*d**S(2))), x) def With1268(a, b, c, d, e, p, q, x): r = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(a**IntPart(p)*(S(2)*c*x**S(2)/(b - r) + S(1))**(-FracPart(p))*(S(2)*c*x**S(2)/(b + r) + S(1))**(-FracPart(p))*(a + b*x**S(2) + c*x**S(4))**FracPart(p), Int((d + e*x**S(2))**q*(S(2)*c*x**S(2)/(b - r) + S(1))**p*(S(2)*c*x**S(2)/(b + r) + S(1))**p, x), x) def With1269(a, c, d, e, p, q, x): r = Rt(-a*c, S(2)) return Dist(a**IntPart(p)*(a + c*x**S(4))**FracPart(p)*(-c*x**S(2)/r + S(1))**(-FracPart(p))*(c*x**S(2)/r + S(1))**(-FracPart(p)), Int((d + e*x**S(2))**q*(-c*x**S(2)/r + S(1))**p*(c*x**S(2)/r + S(1))**p, x), x) def replacement1270(a, b, c, d, e, x): return Simp(EllipticF(S(2)*asin(x*Rt(-e/d, S(2))), b*d/(S(4)*a*e))/(S(2)*sqrt(a)*sqrt(d)*Rt(-e/d, S(2))), x) def replacement1271(a, b, c, d, e, x): return Dist(sqrt((a + b*x**S(2) + c*x**S(4))/a)*sqrt((d + e*x**S(2))/d)/(sqrt(d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), Int(S(1)/(sqrt(S(1) + e*x**S(2)/d)*sqrt(S(1) + b*x**S(2)/a + c*x**S(4)/a)), x), x) def replacement1272(a, b, c, d, e, x): return Simp(sqrt(a)*EllipticE(S(2)*asin(x*Rt(-e/d, S(2))), b*d/(S(4)*a*e))/(S(2)*sqrt(d)*Rt(-e/d, S(2))), x) def replacement1273(a, b, c, d, e, x): return Dist(sqrt((d + e*x**S(2))/d)*sqrt(a + b*x**S(2) + c*x**S(4))/(sqrt((a + b*x**S(2) + c*x**S(4))/a)*sqrt(d + e*x**S(2))), Int(sqrt(S(1) + b*x**S(2)/a + c*x**S(4)/a)/sqrt(S(1) + e*x**S(2)/d), x), x) def replacement1274(a, b, c, d, e, n, n2, p, q, x): return Int(ExpandIntegrand((d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1275(a, c, d, e, n, n2, p, q, x): return Int(ExpandIntegrand((a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) def replacement1276(a, c, d, e, n, n2, p, q, x): return Int(ExpandIntegrand((a + c*x**(S(2)*n))**p, (d/(d**S(2) - e**S(2)*x**(S(2)*n)) - e*x**n/(d**S(2) - e**S(2)*x**(S(2)*n)))**(-q), x), x) def replacement1277(a, b, c, d, e, n, n2, p, q, x): return Int((d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x) def replacement1278(a, c, d, e, n, n2, p, q, x): return Int((a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x) def replacement1279(a, b, c, d, e, n, n2, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x, u), x) def replacement1280(a, c, d, e, n, n2, p, q, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x, u), x) def replacement1281(a, b, c, d, e, mn, n, n2, p, q, x): return Int(x**(-n*q)*(d*x**n + e)**q*(a + b*x**n + c*x**(S(2)*n))**p, x) def replacement1282(a, c, d, e, mn, n2, p, q, x): return Int(x**(mn*q)*(a + c*x**n2)**p*(d*x**(-mn) + e)**q, x) def replacement1283(a, b, c, d, e, mn, n, n2, p, q, x): return Int(x**(S(2)*n*p)*(d + e*x**(-n))**q*(a*x**(-S(2)*n) + b*x**(-n) + c)**p, x) def replacement1284(a, c, d, e, mn, n2, p, q, x): return Int(x**(-S(2)*mn*p)*(d + e*x**mn)**q*(a*x**(S(2)*mn) + c)**p, x) def replacement1285(a, b, c, d, e, mn, n, n2, p, q, x): return Dist(x**(n*FracPart(q))*(d + e*x**(-n))**FracPart(q)*(d*x**n + e)**(-FracPart(q)), Int(x**(-n*q)*(d*x**n + e)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1286(a, c, d, e, mn, n2, p, q, x): return Dist(x**(-mn*FracPart(q))*(d + e*x**mn)**FracPart(q)*(d*x**(-mn) + e)**(-FracPart(q)), Int(x**(mn*q)*(a + c*x**n2)**p*(d*x**(-mn) + e)**q, x), x) def replacement1287(a, b, c, d, e, mn, n, n2, p, q, x): return Dist(x**(-S(2)*n*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p)*(a*x**(-S(2)*n) + b*x**(-n) + c)**(-FracPart(p)), Int(x**(S(2)*n*p)*(d + e*x**(-n))**q*(a*x**(-S(2)*n) + b*x**(-n) + c)**p, x), x) def replacement1288(a, c, d, e, mn, n2, p, q, x): return Dist(x**(-n2*FracPart(p))*(a + c*x**n2)**FracPart(p)*(a*x**(S(2)*mn) + c)**(-FracPart(p)), Int(x**(n2*p)*(d + e*x**mn)**q*(a*x**(S(2)*mn) + c)**p, x), x) def replacement1289(a, b, c, d, e, mn, n, p, q, x): return Int(x**(-n*p)*(d + e*x**n)**q*(a*x**n + b + c*x**(S(2)*n))**p, x) def replacement1290(a, b, c, d, e, mn, n, p, q, x): return Dist(x**(n*FracPart(p))*(a + b*x**(-n) + c*x**n)**FracPart(p)*(a*x**n + b + c*x**(S(2)*n))**(-FracPart(p)), Int(x**(-n*p)*(d + e*x**n)**q*(a*x**n + b + c*x**(S(2)*n))**p, x), x) def replacement1291(a, b, c, d, e, f, g, n, n2, p, q, r, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((b + S(2)*c*x**n)**(S(2)*p)*(d + e*x**n)**q*(f + g*x**n)**r, x), x) def replacement1292(a, b, c, d, e, f, g, n, n2, p, q, r, x): return Int((d + e*x**n)**(p + q)*(f + g*x**n)**r*(a/d + c*x**n/e)**p, x) def replacement1293(a, c, d, e, f, g, n, n2, p, q, r, x): return Int((d + e*x**n)**(p + q)*(f + g*x**n)**r*(a/d + c*x**n/e)**p, x) def replacement1294(a, b, c, d, e, f, g, n, n2, p, q, r, x): return Dist((d + e*x**n)**(-FracPart(p))*(a/d + c*x**n/e)**(-FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((d + e*x**n)**(p + q)*(f + g*x**n)**r*(a/d + c*x**n/e)**p, x), x) def replacement1295(a, c, d, e, f, g, n, n2, p, q, r, x): return Dist((a + c*x**(S(2)*n))**FracPart(p)*(d + e*x**n)**(-FracPart(p))*(a/d + c*x**n/e)**(-FracPart(p)), Int((d + e*x**n)**(p + q)*(f + g*x**n)**r*(a/d + c*x**n/e)**p, x), x) def With1296(a, b, c, d, e, f, g, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-S(4)*a*c + b**S(2), S(2)) if NonzeroQ(S(2)*c*f - g*(b - q)): return True return False def replacement1296(a, b, c, d, e, f, g, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist((S(2)*c*f - g*(b - q))/(S(2)*c*d - e*(b - q)), Int(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) - Dist((-d*g + e*f)/(S(2)*c*d - e*(b - q)), Int((b + S(2)*c*x**S(2) - q)/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x) def With1297(a, c, d, e, f, g, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-a*c, S(2)) if NonzeroQ(c*f + g*q): return True return False def replacement1297(a, c, d, e, f, g, x): q = Rt(-a*c, S(2)) return Dist((c*f + g*q)/(c*d + e*q), Int(S(1)/sqrt(a + c*x**S(4)), x), x) + Dist((-d*g + e*f)/(c*d + e*q), Int((-c*x**S(2) + q)/(sqrt(a + c*x**S(4))*(d + e*x**S(2))), x), x) def replacement1298(a, b, c, d1, d2, e1, e2, n, n2, non2, p, q, x): return Int((d1*d2 + e1*e2*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x) def replacement1299(a, b, c, d1, d2, e1, e2, n, n2, non2, p, q, x): return Dist((d1 + e1*x**(n/S(2)))**FracPart(q)*(d2 + e2*x**(n/S(2)))**FracPart(q)*(d1*d2 + e1*e2*x**n)**(-FracPart(q)), Int((d1*d2 + e1*e2*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1300(A, B, a, b, c, d, e, m, n, n2, p, q, x): return Dist(A, Int((d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) + Dist(B, Int(x**m*(d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1301(A, B, a, c, d, e, m, n, n2, p, q, x): return Dist(A, Int((a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) + Dist(B, Int(x**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) def replacement1302(a, b, c, e, f, m, n, n2, p, q, x): return Dist(e**(S(1) - (m + S(1))/n)*f**m/n, Subst(Int((e*x)**(q + S(-1) + (m + S(1))/n)*(a + b*x + c*x**S(2))**p, x), x, x**n), x) def replacement1303(a, c, e, f, m, n, n2, p, q, x): return Dist(e**(S(1) - (m + S(1))/n)*f**m/n, Subst(Int((e*x)**(q + S(-1) + (m + S(1))/n)*(a + c*x**S(2))**p, x), x, x**n), x) def replacement1304(a, b, c, e, f, m, n, n2, p, q, x): return Dist(e**IntPart(q)*f**m*x**(-n*FracPart(q))*(e*x**n)**FracPart(q), Int(x**(m + n*q)*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1305(a, c, e, f, m, n, n2, p, q, x): return Dist(e**IntPart(q)*f**m*x**(-n*FracPart(q))*(e*x**n)**FracPart(q), Int(x**(m + n*q)*(a + c*x**(S(2)*n))**p, x), x) def replacement1306(a, b, c, e, f, m, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1307(a, c, e, f, m, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(e*x**n)**q*(a + c*x**(S(2)*n))**p, x), x) def replacement1308(a, b, c, d, e, m, n, n2, p, q, x): return Dist(S(1)/n, Subst(Int((d + e*x)**q*(a + b*x + c*x**S(2))**p, x), x, x**n), x) def replacement1309(a, c, d, e, m, n, n2, p, q, x): return Dist(S(1)/n, Subst(Int((a + c*x**S(2))**p*(d + e*x)**q, x), x, x**n), x) def replacement1310(a, b, c, d, e, m, n, n2, p, q, x): return Int(x**(m + n*(S(2)*p + q))*(d*x**(-n) + e)**q*(a*x**(-S(2)*n) + b*x**(-n) + c)**p, x) def replacement1311(a, c, d, e, m, n, n2, p, q, x): return Int(x**(m + n*(S(2)*p + q))*(a*x**(-S(2)*n) + c)**p*(d*x**(-n) + e)**q, x) def replacement1312(a, b, c, d, e, m, n, n2, p, q, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(d + e*x)**q*(a + b*x + c*x**S(2))**p, x), x, x**n), x) def replacement1313(a, b, c, d, e, f, m, n, n2, p, q, x): return Dist(c**(-IntPart(p))*(b/S(2) + c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((f*x)**m*(b/S(2) + c*x**n)**(S(2)*p)*(d + e*x**n)**q, x), x) def replacement1314(a, b, c, d, e, m, n, n2, p, q, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(d + e*x)**q*(a + b*x + c*x**S(2))**p, x), x, x**n), x) def replacement1315(a, c, d, e, m, n, n2, p, q, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + c*x**S(2))**p*(d + e*x)**q, x), x, x**n), x) def replacement1316(a, b, c, d, e, f, m, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1317(a, c, d, e, f, m, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) def replacement1318(a, b, c, d, e, f, m, n, n2, p, q, x): return Int((f*x)**m*(d + e*x**n)**(p + q)*(a/d + c*x**n/e)**p, x) def replacement1319(a, c, d, e, f, m, n, n2, p, q, x): return Int((f*x)**m*(d + e*x**n)**(p + q)*(a/d + c*x**n/e)**p, x) def replacement1320(a, b, c, d, e, f, m, n, n2, p, q, x): return Dist((d + e*x**n)**(-FracPart(p))*(a/d + c*x**n/e)**(-FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int((f*x)**m*(d + e*x**n)**(p + q)*(a/d + c*x**n/e)**p, x), x) def replacement1321(a, c, d, e, f, m, n, n2, p, q, x): return Dist((a + c*x**(S(2)*n))**FracPart(p)*(d + e*x**n)**(-FracPart(p))*(a/d + c*x**n/e)**(-FracPart(p)), Int((f*x)**m*(d + e*x**n)**(p + q)*(a/d + c*x**n/e)**p, x), x) def replacement1322(a, b, c, d, e, m, n, n2, p, q, x): return Dist(e**(-S(2)*p - (m - Mod(m, n))/n)/(n*(q + S(1))), Int(x**Mod(m, n)*(d + e*x**n)**(q + S(1))*ExpandToSum(Together((e**(S(2)*p + (m - Mod(m, n))/n)*n*x**(m - Mod(m, n))*(q + S(1))*(a + b*x**n + c*x**(S(2)*n))**p - (-d)**(S(-1) + (m - Mod(m, n))/n)*(d*(Mod(m, n) + S(1)) + e*x**n*(n*(q + S(1)) + Mod(m, n) + S(1)))*(a*e**S(2) - b*d*e + c*d**S(2))**p)/(d + e*x**n)), x), x), x) + Simp(e**(-S(2)*p - (m - Mod(m, n))/n)*x**(Mod(m, n) + S(1))*(-d)**(S(-1) + (m - Mod(m, n))/n)*(d + e*x**n)**(q + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))**p/(n*(q + S(1))), x) def replacement1323(a, c, d, e, m, n, n2, p, q, x): return Dist(e**(-S(2)*p - (m - Mod(m, n))/n)/(n*(q + S(1))), Int(x**Mod(m, n)*(d + e*x**n)**(q + S(1))*ExpandToSum(Together((e**(S(2)*p + (m - Mod(m, n))/n)*n*x**(m - Mod(m, n))*(a + c*x**(S(2)*n))**p*(q + S(1)) - (-d)**(S(-1) + (m - Mod(m, n))/n)*(a*e**S(2) + c*d**S(2))**p*(d*(Mod(m, n) + S(1)) + e*x**n*(n*(q + S(1)) + Mod(m, n) + S(1))))/(d + e*x**n)), x), x), x) + Simp(e**(-S(2)*p - (m - Mod(m, n))/n)*x**(Mod(m, n) + S(1))*(-d)**(S(-1) + (m - Mod(m, n))/n)*(d + e*x**n)**(q + S(1))*(a*e**S(2) + c*d**S(2))**p/(n*(q + S(1))), x) def replacement1324(a, b, c, d, e, m, n, n2, p, q, x): return Dist(e**(-S(2)*p)*(-d)**(S(-1) + (m - Mod(m, n))/n)/(n*(q + S(1))), Int(x**m*(d + e*x**n)**(q + S(1))*ExpandToSum(Together((e**(S(2)*p)*n*(-d)**(S(1) - (m - Mod(m, n))/n)*(q + S(1))*(a + b*x**n + c*x**(S(2)*n))**p - e**(-(m - Mod(m, n))/n)*x**(-m + Mod(m, n))*(d*(Mod(m, n) + S(1)) + e*x**n*(n*(q + S(1)) + Mod(m, n) + S(1)))*(a*e**S(2) - b*d*e + c*d**S(2))**p)/(d + e*x**n)), x), x), x) + Simp(e**(-S(2)*p - (m - Mod(m, n))/n)*x**(Mod(m, n) + S(1))*(-d)**(S(-1) + (m - Mod(m, n))/n)*(d + e*x**n)**(q + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))**p/(n*(q + S(1))), x) def replacement1325(a, c, d, e, m, n, n2, p, q, x): return Dist(e**(-S(2)*p)*(-d)**(S(-1) + (m - Mod(m, n))/n)/(n*(q + S(1))), Int(x**m*(d + e*x**n)**(q + S(1))*ExpandToSum(Together((e**(S(2)*p)*n*(-d)**(S(1) - (m - Mod(m, n))/n)*(a + c*x**(S(2)*n))**p*(q + S(1)) - e**(-(m - Mod(m, n))/n)*x**(-m + Mod(m, n))*(a*e**S(2) + c*d**S(2))**p*(d*(Mod(m, n) + S(1)) + e*x**n*(n*(q + S(1)) + Mod(m, n) + S(1))))/(d + e*x**n)), x), x), x) + Simp(e**(-S(2)*p - (m - Mod(m, n))/n)*x**(Mod(m, n) + S(1))*(-d)**(S(-1) + (m - Mod(m, n))/n)*(d + e*x**n)**(q + S(1))*(a*e**S(2) + c*d**S(2))**p/(n*(q + S(1))), x) def replacement1326(a, b, c, d, e, f, m, n, n2, p, q, x): return Dist(S(1)/(e*(m + S(2)*n*p + n*q + S(1))), Int((f*x)**m*(d + e*x**n)**q*ExpandToSum(-c**p*d*x**(S(2)*n*p - n)*(m + S(2)*n*p - n + S(1)) + e*(-c**p*x**(S(2)*n*p) + (a + b*x**n + c*x**(S(2)*n))**p)*(m + S(2)*n*p + n*q + S(1)), x), x), x) + Simp(c**p*f**(-S(2)*n*p + n + S(-1))*(f*x)**(m + S(2)*n*p - n + S(1))*(d + e*x**n)**(q + S(1))/(e*(m + S(2)*n*p + n*q + S(1))), x) def replacement1327(a, c, d, e, f, m, n, n2, p, q, x): return Dist(S(1)/(e*(m + S(2)*n*p + n*q + S(1))), Int((f*x)**m*(d + e*x**n)**q*ExpandToSum(-c**p*d*x**(S(2)*n*p - n)*(m + S(2)*n*p - n + S(1)) + e*(-c**p*x**(S(2)*n*p) + (a + c*x**(S(2)*n))**p)*(m + S(2)*n*p + n*q + S(1)), x), x), x) + Simp(c**p*f**(-S(2)*n*p + n + S(-1))*(f*x)**(m + S(2)*n*p - n + S(1))*(d + e*x**n)**(q + S(1))/(e*(m + S(2)*n*p + n*q + S(1))), x) def replacement1328(a, b, c, d, e, f, m, n, n2, p, q, x): return Int(ExpandIntegrand((f*x)**m*(d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1329(a, c, d, e, f, m, n, n2, p, q, x): return Int(ExpandIntegrand((f*x)**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) def With1330(a, b, c, d, e, m, n, n2, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False k = GCD(m + S(1), n) if Unequal(k, S(1)): return True return False def replacement1330(a, b, c, d, e, m, n, n2, p, q, x): k = GCD(m + S(1), n) return Dist(S(1)/k, Subst(Int(x**(S(-1) + (m + S(1))/k)*(d + e*x**(n/k))**q*(a + b*x**(n/k) + c*x**(S(2)*n/k))**p, x), x, x**k), x) def With1331(a, c, d, e, m, n, n2, p, q, x): if isinstance(x, (int, Integer, float, Float)): return False k = GCD(m + S(1), n) if Unequal(k, S(1)): return True return False def replacement1331(a, c, d, e, m, n, n2, p, q, x): k = GCD(m + S(1), n) return Dist(S(1)/k, Subst(Int(x**(S(-1) + (m + S(1))/k)*(a + c*x**(S(2)*n/k))**p*(d + e*x**(n/k))**q, x), x, x**k), x) def With1332(a, b, c, d, e, f, m, n, n2, p, q, x): k = Denominator(m) return Dist(k/f, Subst(Int(x**(k*(m + S(1)) + S(-1))*(d + e*f**(-n)*x**(k*n))**q*(a + b*f**(-n)*x**(k*n) + c*f**(-S(2)*n)*x**(S(2)*k*n))**p, x), x, (f*x)**(S(1)/k)), x) def With1333(a, c, d, e, f, m, n, n2, p, q, x): k = Denominator(m) return Dist(k/f, Subst(Int(x**(k*(m + S(1)) + S(-1))*(a + c*x**(S(2)*k*n)/f)**p*(d + e*x**(k*n)/f)**q, x), x, (f*x)**(S(1)/k)), x) def replacement1334(a, b, c, d, e, f, m, n, n2, p, x): return Dist(f**(-n)*n*p/((m + S(1))*(m + n*(S(2)*p + S(1)) + S(1))), Int((f*x)**(m + n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))*Simp(S(2)*a*e*(m + S(1)) - b*d*(m + n*(S(2)*p + S(1)) + S(1)) + x**n*(b*e*(m + S(1)) - S(2)*c*d*(m + n*(S(2)*p + S(1)) + S(1))), x), x), x) + Simp((f*x)**(m + S(1))*(d*(m + n*(S(2)*p + S(1)) + S(1)) + e*x**n*(m + S(1)))*(a + b*x**n + c*x**(S(2)*n))**p/(f*(m + S(1))*(m + n*(S(2)*p + S(1)) + S(1))), x) def replacement1335(a, c, d, e, f, m, n, n2, p, x): return Dist(S(2)*f**(-n)*n*p/((m + S(1))*(m + n*(S(2)*p + S(1)) + S(1))), Int((f*x)**(m + n)*(a + c*x**(S(2)*n))**(p + S(-1))*(a*e*(m + S(1)) - c*d*x**n*(m + n*(S(2)*p + S(1)) + S(1))), x), x) + Simp((f*x)**(m + S(1))*(a + c*x**(S(2)*n))**p*(d*(m + n*(S(2)*p + S(1)) + S(1)) + e*x**n*(m + S(1)))/(f*(m + S(1))*(m + n*(S(2)*p + S(1)) + S(1))), x) def replacement1336(a, b, c, d, e, f, m, n, n2, p, x): return Dist(n*p/(c*(m + S(2)*n*p + S(1))*(m + n*(S(2)*p + S(1)) + S(1))), Int((f*x)**m*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))*Simp(-a*b*e*(m + S(1)) + S(2)*a*c*d*(m + n*(S(2)*p + S(1)) + S(1)) + x**n*(S(2)*a*c*e*(m + S(2)*n*p + S(1)) - b**S(2)*e*(m + n*p + S(1)) + b*c*d*(m + n*(S(2)*p + S(1)) + S(1))), x), x), x) + Simp((f*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**p*(b*e*n*p + c*d*(m + n*(S(2)*p + S(1)) + S(1)) + c*e*x**n*(m + S(2)*n*p + S(1)))/(c*f*(m + S(2)*n*p + S(1))*(m + n*(S(2)*p + S(1)) + S(1))), x) def replacement1337(a, c, d, e, f, m, n, n2, p, x): return Dist(S(2)*a*n*p/((m + S(2)*n*p + S(1))*(m + n*(S(2)*p + S(1)) + S(1))), Int((f*x)**m*(a + c*x**(S(2)*n))**(p + S(-1))*Simp(d*(m + n*(S(2)*p + S(1)) + S(1)) + e*x**n*(m + S(2)*n*p + S(1)), x), x), x) + Simp((f*x)**(m + S(1))*(a + c*x**(S(2)*n))**p*(c*d*(m + n*(S(2)*p + S(1)) + S(1)) + c*e*x**n*(m + S(2)*n*p + S(1)))/(c*f*(m + S(2)*n*p + S(1))*(m + n*(S(2)*p + S(1)) + S(1))), x) def replacement1338(a, b, c, d, e, f, m, n, n2, p, x): return Dist(f**n/(n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((f*x)**(m - n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(x**n*(b*e - S(2)*c*d)*(m + S(2)*n*p + S(2)*n + S(1)) + (-S(2)*a*e + b*d)*(-m + n + S(-1)), x), x), x) + Simp(f**(n + S(-1))*(f*x)**(m - n + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*e + b*d - x**n*(b*e - S(2)*c*d))/(n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1339(a, c, d, e, f, m, n, n2, p, x): return Dist(f**n/(S(2)*a*c*n*(p + S(1))), Int((f*x)**(m - n)*(a + c*x**(S(2)*n))**(p + S(1))*(a*e*(-m + n + S(-1)) + c*d*x**n*(m + S(2)*n*p + S(2)*n + S(1))), x), x) + Simp(f**(n + S(-1))*(f*x)**(m - n + S(1))*(a + c*x**(S(2)*n))**(p + S(1))*(a*e - c*d*x**n)/(S(2)*a*c*n*(p + S(1))), x) def replacement1340(a, b, c, d, e, f, m, n, n2, p, x): return Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((f*x)**m*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(-a*b*e*(m + S(1)) + c*x**n*(-S(2)*a*e + b*d)*(m + n*(S(2)*p + S(3)) + S(1)) + d*(-S(2)*a*c*(m + S(2)*n*(p + S(1)) + S(1)) + b**S(2)*(m + n*(p + S(1)) + S(1))), x), x), x) - Simp((f*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-a*b*e + c*x**n*(-S(2)*a*e + b*d) + d*(-S(2)*a*c + b**S(2)))/(a*f*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1341(a, c, d, e, f, m, n, n2, p, x): return Dist(S(1)/(S(2)*a*n*(p + S(1))), Int((f*x)**m*(a + c*x**(S(2)*n))**(p + S(1))*Simp(d*(m + S(2)*n*(p + S(1)) + S(1)) + e*x**n*(m + n*(S(2)*p + S(3)) + S(1)), x), x), x) - Simp((f*x)**(m + S(1))*(a + c*x**(S(2)*n))**(p + S(1))*(d + e*x**n)/(S(2)*a*f*n*(p + S(1))), x) def replacement1342(a, b, c, d, e, f, m, n, n2, p, x): return -Dist(f**n/(c*(m + n*(S(2)*p + S(1)) + S(1))), Int((f*x)**(m - n)*(a + b*x**n + c*x**(S(2)*n))**p*Simp(a*e*(m - n + S(1)) + x**n*(b*e*(m + n*p + S(1)) - c*d*(m + n*(S(2)*p + S(1)) + S(1))), x), x), x) + Simp(e*f**(n + S(-1))*(f*x)**(m - n + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(c*(m + n*(S(2)*p + S(1)) + S(1))), x) def replacement1343(a, c, d, e, f, m, n, n2, p, x): return -Dist(f**n/(c*(m + n*(S(2)*p + S(1)) + S(1))), Int((f*x)**(m - n)*(a + c*x**(S(2)*n))**p*(a*e*(m - n + S(1)) - c*d*x**n*(m + n*(S(2)*p + S(1)) + S(1))), x), x) + Simp(e*f**(n + S(-1))*(f*x)**(m - n + S(1))*(a + c*x**(S(2)*n))**(p + S(1))/(c*(m + n*(S(2)*p + S(1)) + S(1))), x) def replacement1344(a, b, c, d, e, f, m, n, n2, p, x): return Dist(f**(-n)/(a*(m + S(1))), Int((f*x)**(m + n)*(a + b*x**n + c*x**(S(2)*n))**p*Simp(a*e*(m + S(1)) - b*d*(m + n*(p + S(1)) + S(1)) - c*d*x**n*(m + S(2)*n*(p + S(1)) + S(1)), x), x), x) + Simp(d*(f*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(a*f*(m + S(1))), x) def replacement1345(a, c, d, e, f, m, n, n2, p, x): return Dist(f**(-n)/(a*(m + S(1))), Int((f*x)**(m + n)*(a + c*x**(S(2)*n))**p*(a*e*(m + S(1)) - c*d*x**n*(m + S(2)*n*(p + S(1)) + S(1))), x), x) + Simp(d*(f*x)**(m + S(1))*(a + c*x**(S(2)*n))**(p + S(1))/(a*f*(m + S(1))), x) def With1346(a, b, c, d, e, f, m, n, n2, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(a*c, S(2)) r = Rt(-b*c + S(2)*c*q, S(2)) if Not(NegativeQ(-b*c + S(2)*c*q)): return True return False def replacement1346(a, b, c, d, e, f, m, n, n2, x): q = Rt(a*c, S(2)) r = Rt(-b*c + S(2)*c*q, S(2)) return Dist(c/(2*q*r), Int((f*x)**m*Simp(d*r - x**(n/2)*(c*d - e*q), x)/(c*x**n + q - r*x**(n/2)), x), x) + Dist(c/(2*q*r), Int((f*x)**m*Simp(d*r + x**(n/2)*(c*d - e*q), x)/(c*x**n + q + r*x**(n/2)), x), x) def With1347(a, c, d, e, f, m, n, n2, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(a*c, S(2)) r = Rt(S(2)*c*q, S(2)) if Not(NegativeQ(S(2)*c*q)): return True return False def replacement1347(a, c, d, e, f, m, n, n2, x): q = Rt(a*c, S(2)) r = Rt(S(2)*c*q, S(2)) return Dist(c/(2*q*r), Int((f*x)**m*Simp(d*r - x**(n/2)*(c*d - e*q), x)/(c*x**n + q - r*x**(n/2)), x), x) + Dist(c/(2*q*r), Int((f*x)**m*Simp(d*r + x**(n/2)*(c*d - e*q), x)/(c*x**n + q + r*x**(n/2)), x), x) def With1348(a, b, c, d, e, f, m, x): r = Rt(c*(-b*e + S(2)*c*d)/e, S(2)) return Dist(e/S(2), Int((f*x)**m/(c*d/e + c*x**S(2) - r*x), x), x) + Dist(e/S(2), Int((f*x)**m/(c*d/e + c*x**S(2) + r*x), x), x) def With1349(a, c, d, e, f, m, x): r = Rt(S(2)*c**S(2)*d/e, S(2)) return Dist(e/S(2), Int((f*x)**m/(c*d/e + c*x**S(2) - r*x), x), x) + Dist(e/S(2), Int((f*x)**m/(c*d/e + c*x**S(2) + r*x), x), x) def With1350(a, b, c, d, e, f, m, n, n2, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(a*c, S(2)) r = Rt(-b*c + S(2)*c*q, S(2)) if Not(NegativeQ(-b*c + S(2)*c*q)): return True return False def replacement1350(a, b, c, d, e, f, m, n, n2, x): q = Rt(a*c, S(2)) r = Rt(-b*c + S(2)*c*q, S(2)) return Dist(c/(2*q*r), Int((f*x)**m*(d*r - x**(n/2)*(c*d - e*q))/(c*x**n + q - r*x**(n/2)), x), x) + Dist(c/(2*q*r), Int((f*x)**m*(d*r + x**(n/2)*(c*d - e*q))/(c*x**n + q + r*x**(n/2)), x), x) def With1351(a, c, d, e, f, m, n, n2, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(a*c, S(2)) r = Rt(S(2)*c*q, S(2)) if Not(NegativeQ(S(2)*c*q)): return True return False def replacement1351(a, c, d, e, f, m, n, n2, x): q = Rt(a*c, S(2)) r = Rt(S(2)*c*q, S(2)) return Dist(c/(2*q*r), Int((f*x)**m*(d*r - x**(n/2)*(c*d - e*q))/(c*x**n + q - r*x**(n/2)), x), x) + Dist(c/(2*q*r), Int((f*x)**m*(d*r + x**(n/2)*(c*d - e*q))/(c*x**n + q + r*x**(n/2)), x), x) def With1352(a, b, c, d, e, f, m, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(e/S(2) - (-b*e + S(2)*c*d)/(S(2)*q), Int((f*x)**m/(b/S(2) + c*x**n + q/S(2)), x), x) + Dist(e/S(2) + (-b*e + S(2)*c*d)/(S(2)*q), Int((f*x)**m/(b/S(2) + c*x**n - q/S(2)), x), x) def With1353(a, c, d, e, f, m, n, n2, x): q = Rt(-a*c, S(2)) return Dist(-c*d/(S(2)*q) + e/S(2), Int((f*x)**m/(c*x**n + q), x), x) - Dist(c*d/(S(2)*q) + e/S(2), Int((f*x)**m/(-c*x**n + q), x), x) def replacement1354(a, b, c, d, e, f, m, n, n2, q, x): return Int(ExpandIntegrand((f*x)**m*(d + e*x**n)**q/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1355(a, c, d, e, f, m, n, n2, q, x): return Int(ExpandIntegrand((f*x)**m*(d + e*x**n)**q/(a + c*x**(S(2)*n)), x), x) def replacement1356(a, b, c, d, e, f, m, n, n2, q, x): return Int(ExpandIntegrand((f*x)**m, (d + e*x**n)**q/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1357(a, c, d, e, f, m, n, n2, q, x): return Int(ExpandIntegrand((f*x)**m, (d + e*x**n)**q/(a + c*x**(S(2)*n)), x), x) def replacement1358(a, b, c, d, e, f, m, n, n2, q, x): return Dist(f**(S(2)*n)/c**S(2), Int((f*x)**(m - S(2)*n)*(d + e*x**n)**(q + S(-1))*(-b*e + c*d + c*e*x**n), x), x) - Dist(f**(S(2)*n)/c**S(2), Int((f*x)**(m - S(2)*n)*(d + e*x**n)**(q + S(-1))*Simp(a*(-b*e + c*d) + x**n*(a*c*e - b**S(2)*e + b*c*d), x)/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1359(a, c, d, e, f, m, n, n2, q, x): return Dist(f**(S(2)*n)/c, Int((f*x)**(m - S(2)*n)*(d + e*x**n)**q, x), x) - Dist(a*f**(S(2)*n)/c, Int((f*x)**(m - S(2)*n)*(d + e*x**n)**q/(a + c*x**(S(2)*n)), x), x) def replacement1360(a, b, c, d, e, f, m, n, n2, q, x): return -Dist(f**n/c, Int((f*x)**(m - n)*(d + e*x**n)**(q + S(-1))*Simp(a*e - x**n*(-b*e + c*d), x)/(a + b*x**n + c*x**(S(2)*n)), x), x) + Dist(e*f**n/c, Int((f*x)**(m - n)*(d + e*x**n)**(q + S(-1)), x), x) def replacement1361(a, c, d, e, f, m, n, n2, q, x): return -Dist(f**n/c, Int((f*x)**(m - n)*(d + e*x**n)**(q + S(-1))*Simp(a*e - c*d*x**n, x)/(a + c*x**(S(2)*n)), x), x) + Dist(e*f**n/c, Int((f*x)**(m - n)*(d + e*x**n)**(q + S(-1)), x), x) def replacement1362(a, b, c, d, e, f, m, n, n2, q, x): return Dist(d/a, Int((f*x)**m*(d + e*x**n)**(q + S(-1)), x), x) - Dist(f**(-n)/a, Int((f*x)**(m + n)*(d + e*x**n)**(q + S(-1))*Simp(-a*e + b*d + c*d*x**n, x)/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1363(a, c, d, e, f, m, n, n2, q, x): return Dist(d/a, Int((f*x)**m*(d + e*x**n)**(q + S(-1)), x), x) + Dist(f**(-n)/a, Int((f*x)**(m + n)*(d + e*x**n)**(q + S(-1))*Simp(a*e - c*d*x**n, x)/(a + c*x**(S(2)*n)), x), x) def replacement1364(a, b, c, d, e, f, m, n, n2, q, x): return -Dist(f**(S(2)*n)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**(m - S(2)*n)*(d + e*x**n)**(q + S(1))*Simp(a*d + x**n*(-a*e + b*d), x)/(a + b*x**n + c*x**(S(2)*n)), x), x) + Dist(d**S(2)*f**(S(2)*n)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**(m - S(2)*n)*(d + e*x**n)**q, x), x) def replacement1365(a, c, d, e, f, m, n, n2, q, x): return -Dist(a*f**(S(2)*n)/(a*e**S(2) + c*d**S(2)), Int((f*x)**(m - S(2)*n)*(d - e*x**n)*(d + e*x**n)**(q + S(1))/(a + c*x**(S(2)*n)), x), x) + Dist(d**S(2)*f**(S(2)*n)/(a*e**S(2) + c*d**S(2)), Int((f*x)**(m - S(2)*n)*(d + e*x**n)**q, x), x) def replacement1366(a, b, c, d, e, f, m, n, n2, q, x): return Dist(f**n/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**(m - n)*(d + e*x**n)**(q + S(1))*Simp(a*e + c*d*x**n, x)/(a + b*x**n + c*x**(S(2)*n)), x), x) - Dist(d*e*f**n/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**(m - n)*(d + e*x**n)**q, x), x) def replacement1367(a, c, d, e, f, m, n, n2, q, x): return Dist(f**n/(a*e**S(2) + c*d**S(2)), Int((f*x)**(m - n)*(d + e*x**n)**(q + S(1))*Simp(a*e + c*d*x**n, x)/(a + c*x**(S(2)*n)), x), x) - Dist(d*e*f**n/(a*e**S(2) + c*d**S(2)), Int((f*x)**(m - n)*(d + e*x**n)**q, x), x) def replacement1368(a, b, c, d, e, f, m, n, n2, q, x): return Dist(e**S(2)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**m*(d + e*x**n)**q, x), x) + Dist(S(1)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**m*(d + e*x**n)**(q + S(1))*Simp(-b*e + c*d - c*e*x**n, x)/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1369(a, c, d, e, f, m, n, n2, q, x): return Dist(c/(a*e**S(2) + c*d**S(2)), Int((f*x)**m*(d - e*x**n)*(d + e*x**n)**(q + S(1))/(a + c*x**(S(2)*n)), x), x) + Dist(e**S(2)/(a*e**S(2) + c*d**S(2)), Int((f*x)**m*(d + e*x**n)**q, x), x) def replacement1370(a, b, c, d, e, f, m, n, n2, q, x): return Int(ExpandIntegrand((d + e*x**n)**q, (f*x)**m/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1371(a, c, d, e, f, m, n, n2, q, x): return Int(ExpandIntegrand((d + e*x**n)**q, (f*x)**m/(a + c*x**(S(2)*n)), x), x) def replacement1372(a, b, c, d, e, f, m, n, n2, q, x): return Int(ExpandIntegrand((f*x)**m*(d + e*x**n)**q, S(1)/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1373(a, c, d, e, f, m, n, n2, q, x): return Int(ExpandIntegrand((f*x)**m*(d + e*x**n)**q, S(1)/(a + c*x**(S(2)*n)), x), x) def replacement1374(a, b, c, d, e, f, m, n, n2, p, x): return Dist(d**(S(-2)), Int((f*x)**m*(a*d + x**n*(-a*e + b*d))*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) + Dist(f**(-S(2)*n)*(a*e**S(2) - b*d*e + c*d**S(2))/d**S(2), Int((f*x)**(m + S(2)*n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))/(d + e*x**n), x), x) def replacement1375(a, c, d, e, f, m, n, n2, p, x): return Dist(a/d**S(2), Int((f*x)**m*(a + c*x**(S(2)*n))**(p + S(-1))*(d - e*x**n), x), x) + Dist(f**(-S(2)*n)*(a*e**S(2) + c*d**S(2))/d**S(2), Int((f*x)**(m + S(2)*n)*(a + c*x**(S(2)*n))**(p + S(-1))/(d + e*x**n), x), x) def replacement1376(a, b, c, d, e, f, m, n, n2, p, x): return Dist(S(1)/(d*e), Int((f*x)**m*(a*e + c*d*x**n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1)), x), x) - Dist(f**(-n)*(a*e**S(2) - b*d*e + c*d**S(2))/(d*e), Int((f*x)**(m + n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(-1))/(d + e*x**n), x), x) def replacement1377(a, c, d, e, f, m, n, n2, p, x): return Dist(S(1)/(d*e), Int((f*x)**m*(a + c*x**(S(2)*n))**(p + S(-1))*(a*e + c*d*x**n), x), x) - Dist(f**(-n)*(a*e**S(2) + c*d**S(2))/(d*e), Int((f*x)**(m + n)*(a + c*x**(S(2)*n))**(p + S(-1))/(d + e*x**n), x), x) def replacement1378(a, b, c, d, e, f, m, n, n2, p, x): return -Dist(f**(S(2)*n)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**(m - S(2)*n)*(a*d + x**n*(-a*e + b*d))*(a + b*x**n + c*x**(S(2)*n))**p, x), x) + Dist(d**S(2)*f**(S(2)*n)/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**(m - S(2)*n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(d + e*x**n), x), x) def replacement1379(a, c, d, e, f, m, n, n2, p, x): return -Dist(a*f**(S(2)*n)/(a*e**S(2) + c*d**S(2)), Int((f*x)**(m - S(2)*n)*(a + c*x**(S(2)*n))**p*(d - e*x**n), x), x) + Dist(d**S(2)*f**(S(2)*n)/(a*e**S(2) + c*d**S(2)), Int((f*x)**(m - S(2)*n)*(a + c*x**(S(2)*n))**(p + S(1))/(d + e*x**n), x), x) def replacement1380(a, b, c, d, e, f, m, n, n2, p, x): return Dist(f**n/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**(m - n)*(a*e + c*d*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x) - Dist(d*e*f**n/(a*e**S(2) - b*d*e + c*d**S(2)), Int((f*x)**(m - n)*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(d + e*x**n), x), x) def replacement1381(a, c, d, e, f, m, n, n2, p, x): return Dist(f**n/(a*e**S(2) + c*d**S(2)), Int((f*x)**(m - n)*(a + c*x**(S(2)*n))**p*(a*e + c*d*x**n), x), x) - Dist(d*e*f**n/(a*e**S(2) + c*d**S(2)), Int((f*x)**(m - n)*(a + c*x**(S(2)*n))**(p + S(1))/(d + e*x**n), x), x) def replacement1382(a, b, c, d, e, f, m, n, n2, p, q, x): return Int(ExpandIntegrand((a + b*x**n + c*x**(S(2)*n))**p, (f*x)**m*(d + e*x**n)**q, x), x) def replacement1383(a, c, d, e, f, m, n, n2, p, q, x): return Int(ExpandIntegrand((a + c*x**(S(2)*n))**p, (f*x)**m*(d + e*x**n)**q, x), x) def replacement1384(a, b, c, d, e, m, n, n2, p, q, x): return -Subst(Int(x**(-m + S(-2))*(d + e*x**(-n))**q*(a + b*x**(-n) + c*x**(-S(2)*n))**p, x), x, S(1)/x) def replacement1385(a, c, d, e, m, n, n2, p, q, x): return -Subst(Int(x**(-m + S(-2))*(a + c*x**(-S(2)*n))**p*(d + e*x**(-n))**q, x), x, S(1)/x) def With1386(a, b, c, d, e, f, m, n, n2, p, q, x): g = Denominator(m) return -Dist(g/f, Subst(Int(x**(-g*(m + S(1)) + S(-1))*(d + e*f**(-n)*x**(-g*n))**q*(a + b*f**(-n)*x**(-g*n) + c*f**(-S(2)*n)*x**(-S(2)*g*n))**p, x), x, (f*x)**(-S(1)/g)), x) def With1387(a, c, d, e, f, m, n, n2, p, q, x): g = Denominator(m) return -Dist(g/f, Subst(Int(x**(-g*(m + S(1)) + S(-1))*(a + c*f**(-S(2)*n)*x**(-S(2)*g*n))**p*(d + e*f**(-n)*x**(-g*n))**q, x), x, (f*x)**(-S(1)/g)), x) def replacement1388(a, b, c, d, e, f, m, n, n2, p, q, x): return -Dist(f**IntPart(m)*(f*x)**FracPart(m)*(S(1)/x)**FracPart(m), Subst(Int(x**(-m + S(-2))*(d + e*x**(-n))**q*(a + b*x**(-n) + c*x**(-S(2)*n))**p, x), x, S(1)/x), x) def replacement1389(a, c, d, e, f, m, n, n2, p, q, x): return -Dist(f**IntPart(m)*(f*x)**FracPart(m)*(S(1)/x)**FracPart(m), Subst(Int(x**(-m + S(-2))*(a + c*x**(-S(2)*n))**p*(d + e*x**(-n))**q, x), x, S(1)/x), x) def With1390(a, b, c, d, e, m, n, n2, p, q, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g*(m + S(1)) + S(-1))*(d + e*x**(g*n))**q*(a + b*x**(g*n) + c*x**(S(2)*g*n))**p, x), x, x**(S(1)/g)), x) def With1391(a, c, d, e, m, n, n2, p, q, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g*(m + S(1)) + S(-1))*(a + c*x**(S(2)*g*n))**p*(d + e*x**(g*n))**q, x), x, x**(S(1)/g)), x) def replacement1392(a, b, c, d, e, f, m, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1393(a, c, d, e, f, m, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) def replacement1394(a, b, c, d, e, m, n, n2, p, q, x): return Dist(S(1)/(m + S(1)), Subst(Int((d + e*x**(n/(m + S(1))))**q*(a + b*x**(n/(m + S(1))) + c*x**(S(2)*n/(m + S(1))))**p, x), x, x**(m + S(1))), x) def replacement1395(a, c, d, e, m, n, n2, p, q, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + c*x**(S(2)*n/(m + S(1))))**p*(d + e*x**(n/(m + S(1))))**q, x), x, x**(m + S(1))), x) def replacement1396(a, b, c, d, e, f, m, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1397(a, c, d, e, f, m, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) def With1398(a, b, c, d, e, f, m, n, n2, q, x): r = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/r, Int((f*x)**m*(d + e*x**n)**q/(b + S(2)*c*x**n - r), x), x) - Dist(S(2)*c/r, Int((f*x)**m*(d + e*x**n)**q/(b + S(2)*c*x**n + r), x), x) def With1399(a, c, d, e, f, m, n, n2, q, x): r = Rt(-a*c, S(2)) return -Dist(c/(S(2)*r), Int((f*x)**m*(d + e*x**n)**q/(-c*x**n + r), x), x) - Dist(c/(S(2)*r), Int((f*x)**m*(d + e*x**n)**q/(c*x**n + r), x), x) def replacement1400(a, b, c, d, e, f, m, n, n2, p, x): return Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((f*x)**m*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(-a*b*e*(m + S(1)) + c*x**n*(-S(2)*a*e + b*d)*(m + n*(S(2)*p + S(3)) + S(1)) + d*(-S(2)*a*c*(m + S(2)*n*(p + S(1)) + S(1)) + b**S(2)*(m + n*(p + S(1)) + S(1))), x), x), x) - Simp((f*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-a*b*e + c*x**n*(-S(2)*a*e + b*d) + d*(-S(2)*a*c + b**S(2)))/(a*f*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1401(a, c, d, e, f, m, n, n2, p, x): return Dist(S(1)/(S(2)*a*n*(p + S(1))), Int((f*x)**m*(a + c*x**(S(2)*n))**(p + S(1))*Simp(d*(m + S(2)*n*(p + S(1)) + S(1)) + e*x**n*(m + n*(S(2)*p + S(3)) + S(1)), x), x), x) - Simp((f*x)**(m + S(1))*(a + c*x**(S(2)*n))**(p + S(1))*(d + e*x**n)/(S(2)*a*f*n*(p + S(1))), x) def replacement1402(a, b, c, d, e, f, m, n, n2, p, q, x): return Int(ExpandIntegrand((f*x)**m*(d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1403(a, c, d, e, f, m, n, n2, p, q, x): return Int(ExpandIntegrand((f*x)**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) def replacement1404(a, c, d, e, f, m, n, n2, p, q, x): return Dist(f**m, Int(ExpandIntegrand(x**m*(a + c*x**(S(2)*n))**p, (d/(d**S(2) - e**S(2)*x**(S(2)*n)) - e*x**n/(d**S(2) - e**S(2)*x**(S(2)*n)))**(-q), x), x), x) def replacement1405(a, c, d, e, f, m, n, n2, p, q, x): return Dist(x**(-m)*(f*x)**m, Int(x**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x) def replacement1406(a, b, c, d, e, f, m, n, n2, p, q, x): return Int((f*x)**m*(d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x) def replacement1407(a, c, d, e, f, m, n, n2, p, q, x): return Int((f*x)**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x) def replacement1408(a, b, c, d, e, m, n, n2, p, q, u, v, x): return Dist(u**m*v**(-m)/Coefficient(v, x, S(1)), Subst(Int(x**m*(d + e*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x, v), x) def replacement1409(a, c, d, e, m, n, n2, p, q, u, v, x): return Dist(u**m*v**(-m)/Coefficient(v, x, S(1)), Subst(Int(x**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**q, x), x, v), x) def replacement1410(a, b, c, d, e, m, mn, n, n2, p, q, x): return Int(x**(m - n*q)*(d*x**n + e)**q*(a + b*x**n + c*x**(S(2)*n))**p, x) def replacement1411(a, c, d, e, m, mn, n2, p, q, x): return Int(x**(m + mn*q)*(a + c*x**n2)**p*(d*x**(-mn) + e)**q, x) def replacement1412(a, b, c, d, e, m, mn, n, n2, p, q, x): return Int(x**(m + S(2)*n*p)*(d + e*x**(-n))**q*(a*x**(-S(2)*n) + b*x**(-n) + c)**p, x) def replacement1413(a, c, d, e, m, mn, n2, p, q, x): return Int(x**(m - S(2)*mn*p)*(d + e*x**mn)**q*(a*x**(S(2)*mn) + c)**p, x) def replacement1414(a, b, c, d, e, m, mn, n, n2, p, q, x): return Dist(x**(n*FracPart(q))*(d + e*x**(-n))**FracPart(q)*(d*x**n + e)**(-FracPart(q)), Int(x**(m - n*q)*(d*x**n + e)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1415(a, c, d, e, m, mn, n2, p, q, x): return Dist(x**(-mn*FracPart(q))*(d + e*x**mn)**FracPart(q)*(d*x**(-mn) + e)**(-FracPart(q)), Int(x**(m + mn*q)*(a + c*x**n2)**p*(d*x**(-mn) + e)**q, x), x) def replacement1416(a, b, c, d, e, f, m, mn, n, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(d + e*x**mn)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1417(a, c, d, e, f, m, mn, n2, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(a + c*x**(S(2)*n))**p*(d + e*x**mn)**q, x), x) def replacement1418(a, b, c, d, e, m, mn, n, p, q, x): return Int(x**(m - n*p)*(d + e*x**n)**q*(a*x**n + b + c*x**(S(2)*n))**p, x) def replacement1419(a, b, c, d, e, m, mn, n, p, q, x): return Dist(x**(n*FracPart(p))*(a + b*x**(-n) + c*x**n)**FracPart(p)*(a*x**n + b + c*x**(S(2)*n))**(-FracPart(p)), Int(x**(m - n*p)*(d + e*x**n)**q*(a*x**n + b + c*x**(S(2)*n))**p, x), x) def replacement1420(a, b, c, d, e, f, m, mn, n, p, q, x): return Dist(f**IntPart(m)*x**(-FracPart(m))*(f*x)**FracPart(m), Int(x**m*(d + e*x**n)**q*(a + b*x**(-n) + c*x**n)**p, x), x) def replacement1421(a, b, c, d1, d2, e1, e2, f, m, n, n2, non2, p, q, x): return Int((f*x)**m*(d1*d2 + e1*e2*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x) def replacement1422(a, b, c, d1, d2, e1, e2, f, m, n, n2, non2, p, q, x): return Dist((d1 + e1*x**(n/S(2)))**FracPart(q)*(d2 + e2*x**(n/S(2)))**FracPart(q)*(d1*d2 + e1*e2*x**n)**(-FracPart(q)), Int((f*x)**m*(d1*d2 + e1*e2*x**n)**q*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1423(a, b, c, n, p, q, r, x): return Int((x**n*(a + b + c))**p, x) def replacement1424(a, b, c, n, p, q, r, x): return Int(x**(p*q)*(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))**p, x) def replacement1425(a, b, c, n, q, r, x): return Dist(x**(-q/S(2))*sqrt(a*x**q + b*x**n + c*x**(S(2)*n - q))/sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q)), Int(x**(q/S(2))*sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q)), x), x) def replacement1426(a, b, c, n, q, r, x): return Dist(x**(q/S(2))*sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))/sqrt(a*x**q + b*x**n + c*x**(S(2)*n - q)), Int(x**(-q/S(2))/sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q)), x), x) def replacement1427(a, b, c, n, p, q, r, x): return Dist(p*(n - q)/(p*(S(2)*n - q) + S(1)), Int(x**q*(S(2)*a + b*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(-1)), x), x) + Simp(x*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p/(p*(S(2)*n - q) + S(1)), x) def replacement1428(a, b, c, n, p, q, r, x): return Dist(S(1)/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), Int(x**(-q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))*(b*c*x**(n - q)*(p*q + (n - q)*(S(2)*p + S(3)) + S(1)) + (n - q)*(p + S(1))*(-S(4)*a*c + b**S(2)) + (-S(2)*a*c + b**S(2))*(p*q + S(1))), x), x) - Simp(x**(S(1) - q)*(-S(2)*a*c + b**S(2) + b*c*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1429(a, b, c, n, p, q, r, x): return Dist(x**(-p*q)*(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))**(-p)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, Int(x**(p*q)*(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))**p, x), x) def replacement1430(a, b, c, n, p, q, r, x): return Int((a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x) def replacement1431(a, b, c, n, p, q, r, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x), x, u), x) def replacement1432(a, b, c, m, n, p, q, r, x): return Int(x**m*(x**n*(a + b + c))**p, x) def replacement1433(a, b, c, m, n, p, q, r, x): return Int(x**(m + p*q)*(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))**p, x) def replacement1434(a, b, c, m, n, q, r, x): return Dist(x**(q/S(2))*sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))/sqrt(a*x**q + b*x**n + c*x**(S(2)*n - q)), Int(x**(m - q/S(2))/sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q)), x), x) def replacement1435(a, b, c, m, n, q, r, x): return Simp(-S(2)*x**(n/S(2) + S(-1)/2)*(b + S(2)*c*x)/((-S(4)*a*c + b**S(2))*sqrt(a*x**(n + S(-1)) + b*x**n + c*x**(n + S(1)))), x) def replacement1436(a, b, c, m, n, q, r, x): return Simp(x**(n/S(2) + S(-1)/2)*(S(4)*a + S(2)*b*x)/((-S(4)*a*c + b**S(2))*sqrt(a*x**(n + S(-1)) + b*x**n + c*x**(n + S(1)))), x) def replacement1437(a, b, c, m, n, p, q, r, x): return -Dist(b/(S(2)*c), Int(x**(m + S(-1))*(a*x**(n + S(-1)) + b*x**n + c*x**(n + S(1)))**p, x), x) + Simp(x**(m - n)*(a*x**(n + S(-1)) + b*x**n + c*x**(n + S(1)))**(p + S(1))/(S(2)*c*(p + S(1))), x) def replacement1438(a, b, c, m, n, p, q, r, x): return -Dist(p*(-S(4)*a*c + b**S(2))/(S(2)*c*(S(2)*p + S(1))), Int(x**(m + q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(-1)), x), x) + Simp(x**(m - n + q + S(1))*(b + S(2)*c*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p/(S(2)*c*(n - q)*(S(2)*p + S(1))), x) def replacement1439(a, b, c, m, n, p, q, r, x): return Dist(p*(n - q)/(c*(m + p*(S(2)*n - q) + S(1))*(m + p*q + (n - q)*(S(2)*p + S(-1)) + S(1))), Int(x**(m - n + S(2)*q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(-1))*Simp(-a*b*(m - n + p*q + q + S(1)) + x**(n - q)*(S(2)*a*c*(m + p*q + (n - q)*(S(2)*p + S(-1)) + S(1)) - b**S(2)*(m + p*q + (n - q)*(p + S(-1)) + S(1))), x), x), x) + Simp(x**(m - n + q + S(1))*(b*p*(n - q) + c*x**(n - q)*(m + p*q + (n - q)*(S(2)*p + S(-1)) + S(1)))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p/(c*(m + p*(S(2)*n - q) + S(1))*(m + p*q + (n - q)*(S(2)*p + S(-1)) + S(1))), x) def replacement1440(a, b, c, m, n, p, q, r, x): return -Dist(p*(n - q)/(m + p*q + S(1)), Int(x**(m + n)*(b + S(2)*c*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(-1)), x), x) + Simp(x**(m + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p/(m + p*q + S(1)), x) def replacement1441(a, b, c, m, n, p, q, r, x): return Dist(p*(n - q)/(m + p*(S(2)*n - q) + S(1)), Int(x**(m + q)*(S(2)*a + b*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(-1)), x), x) + Simp(x**(m + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p/(m + p*(S(2)*n - q) + S(1)), x) def replacement1442(a, b, c, m, n, p, q, r, x): return Dist((S(2)*a*c - b**S(2)*(p + S(2)))/(a*(p + S(1))*(-S(4)*a*c + b**S(2))), Int(x**(m - q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1)), x), x) - Simp(x**(m - q + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1443(a, b, c, m, n, p, q, r, x): return Dist(S(1)/((n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), Int(x**(m - S(2)*n + q)*(S(2)*a*(m - S(2)*n + p*q + S(2)*q + S(1)) + b*x**(n - q)*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1)), x), x) - Simp(x**(m - S(2)*n + q + S(1))*(S(2)*a + b*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/((n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1444(a, b, c, m, n, p, q, r, x): return Dist(S(1)/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), Int(x**(m - q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))*(-S(2)*a*c*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + b**S(2)*(m + p*q + (n - q)*(p + S(1)) + S(1)) + b*c*x**(n - q)*(m + p*q + (n - q)*(S(2)*p + S(3)) + S(1))), x), x) - Simp(x**(m - q + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1445(a, b, c, m, n, p, q, r, x): return -Dist(S(1)/((n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), Int(x**(m - n)*(b*(m - n + p*q + q + S(1)) + S(2)*c*x**(n - q)*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1)), x), x) + Simp(x**(m - n + S(1))*(b + S(2)*c*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/((n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1446(a, b, c, m, n, p, q, r, x): return -Dist(b/(S(2)*c), Int(x**(m - n + q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x), x) + Simp(x**(m - S(2)*n + q + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(S(2)*c*(n - q)*(p + S(1))), x) def replacement1447(a, b, c, m, n, p, q, r, x): return -Dist(b/(S(2)*a), Int(x**(m + n - q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x), x) - Simp(x**(m - q + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(S(2)*a*(n - q)*(p + S(1))), x) def replacement1448(a, b, c, m, n, p, q, r, x): return -Dist(S(1)/(c*(m + p*q + S(2)*p*(n - q) + S(1))), Int(x**(m - S(2)*n + S(2)*q)*(a*(m - S(2)*n + p*q + S(2)*q + S(1)) + b*x**(n - q)*(m + p*q + (n - q)*(p + S(-1)) + S(1)))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x), x) + Simp(x**(m - S(2)*n + q + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(c*(m + p*q + S(2)*p*(n - q) + S(1))), x) def replacement1449(a, b, c, m, n, p, q, r, x): return -Dist(S(1)/(a*(m + p*q + S(1))), Int(x**(m + n - q)*(b*(m + p*q + (n - q)*(p + S(1)) + S(1)) + c*x**(n - q)*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x), x) + Simp(x**(m - q + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(a*(m + p*q + S(1))), x) def replacement1450(a, b, c, m, n, p, q, r, x): return Dist(x**(-p*q)*(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))**(-p)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, Int(x**(m + p*q)*(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))**p, x), x) def replacement1451(a, b, c, m, n, p, q, r, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int(x**m*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x), x, u), x) def replacement1452(A, B, a, b, c, j, n, p, q, r, x): return Int(x**(p*q)*(A + B*x**(n - q))*(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))**p, x) def replacement1453(A, B, a, b, c, j, n, q, r, x): return Dist(x**(q/S(2))*sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))/sqrt(a*x**q + b*x**n + c*x**(S(2)*n - q)), Int(x**(-q/S(2))*(A + B*x**(n - q))/sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q)), x), x) def replacement1454(A, B, a, b, c, j, n, p, q, r, x): return Dist(p*(n - q)/(c*(p*(S(2)*n - q) + S(1))*(p*q + (n - q)*(S(2)*p + S(1)) + S(1))), Int(x**q*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(-1))*(S(2)*A*a*c*(p*q + (n - q)*(S(2)*p + S(1)) + S(1)) - B*a*b*(p*q + S(1)) + x**(n - q)*(A*b*c*(p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + S(2)*B*a*c*(p*(S(2)*n - q) + S(1)) - B*b**S(2)*(p*q + p*(n - q) + S(1)))), x), x) + Simp(x*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p*(A*c*(p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*b*p*(n - q) + B*c*x**(n - q)*(p*(S(2)*n - q) + S(1)))/(c*(p*(S(2)*n - q) + S(1))*(p*q + (n - q)*(S(2)*p + S(1)) + S(1))), x) def With1455(A, B, a, c, j, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False n = q + r if And(ZeroQ(j - S(2)*n + q), NonzeroQ(p*(S(2)*n - q) + S(1)), NonzeroQ(p*q + (n - q)*(S(2)*p + S(1)) + S(1))): return True return False def replacement1455(A, B, a, c, j, p, q, r, x): n = q + r return Dist(p*(n - q)/((p*(S(2)*n - q) + S(1))*(p*q + (n - q)*(S(2)*p + S(1)) + S(1))), Int(x**q*(a*x**q + c*x**(S(2)*n - q))**(p + S(-1))*(S(2)*A*a*(p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + S(2)*B*a*x**(n - q)*(p*(S(2)*n - q) + S(1))), x), x) + Simp(x*(A*(p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*x**(n - q)*(p*(S(2)*n - q) + S(1)))*(a*x**q + c*x**(S(2)*n - q))**p/((p*(S(2)*n - q) + S(1))*(p*q + (n - q)*(S(2)*p + S(1)) + S(1))), x) def replacement1456(A, B, a, b, c, j, n, p, q, r, x): return Dist(S(1)/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), Int(x**(-q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))*(-S(2)*A*a*c*(p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + A*b**S(2)*(p*q + (n - q)*(p + S(1)) + S(1)) - B*a*b*(p*q + S(1)) + c*x**(n - q)*(A*b - S(2)*B*a)*(p*q + (n - q)*(S(2)*p + S(3)) + S(1))), x), x) - Simp(x**(S(1) - q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))*(-S(2)*A*a*c + A*b**S(2) - B*a*b + c*x**(n - q)*(A*b - S(2)*B*a))/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def With1457(A, B, a, c, j, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False n = q + r if ZeroQ(j - S(2)*n + q): return True return False def replacement1457(A, B, a, c, j, p, q, r, x): n = q + r return Dist(S(1)/(S(2)*a**S(2)*c*(n - q)*(p + S(1))), Int(x**(-q)*(a*x**q + c*x**(S(2)*n - q))**(p + S(1))*(A*a*c*(p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + B*a*c*x**(n - q)*(p*q + (n - q)*(S(2)*p + S(3)) + S(1))), x), x) - Simp(x**(S(1) - q)*(a*x**q + c*x**(S(2)*n - q))**(p + S(1))*(A*a*c + B*a*c*x**(n - q))/(S(2)*a**S(2)*c*(n - q)*(p + S(1))), x) def replacement1458(A, B, a, b, c, j, n, p, q, r, x): return Int((A + B*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x) def replacement1459(A, B, a, b, c, j, n, p, q, r, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((A + B*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x), x, u), x) def replacement1460(A, B, a, b, c, j, m, n, p, q, r, x): return Int(x**(m + p*q)*(A + B*x**(n - q))*(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))**p, x) def replacement1461(A, B, a, b, c, j, m, n, p, q, r, x): return Dist(p*(n - q)/((m + p*q + S(1))*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), Int(x**(m + n)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(-1))*Simp(-A*b*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + S(2)*B*a*(m + p*q + S(1)) + x**(n - q)*(-S(2)*A*c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*b*(m + p*q + S(1))), x), x), x) + Simp(x**(m + S(1))*(A*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*x**(n - q)*(m + p*q + S(1)))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p/((m + p*q + S(1))*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), x) def With1462(A, B, a, c, j, m, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False n = q + r if And(ZeroQ(j - S(2)*n + q), PositiveIntegerQ(n), LessEqual(m + p*q, -n + q), Unequal(m + p*q + S(1), S(0)), Unequal(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1), S(0))): return True return False def replacement1462(A, B, a, c, j, m, p, q, r, x): n = q + r return Dist(S(2)*p*(n - q)/((m + p*q + S(1))*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), Int(x**(m + n)*(a*x**q + c*x**(S(2)*n - q))**(p + S(-1))*Simp(-A*c*x**(n - q)*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*a*(m + p*q + S(1)), x), x), x) + Simp(x**(m + S(1))*(A*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*x**(n - q)*(m + p*q + S(1)))*(a*x**q + c*x**(S(2)*n - q))**p/((m + p*q + S(1))*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), x) def replacement1463(A, B, a, b, c, j, m, n, p, q, r, x): return Dist(S(1)/((n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), Int(x**(m - n)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))*Simp(x**(n - q)*(-S(2)*A*c + B*b)*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + (-A*b + S(2)*B*a)*(m - n + p*q + q + S(1)), x), x), x) + Simp(x**(m - n + S(1))*(A*b - S(2)*B*a - x**(n - q)*(-S(2)*A*c + B*b))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/((n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def With1464(A, B, a, c, j, m, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False n = q + r if And(ZeroQ(j - S(2)*n + q), PositiveIntegerQ(n), Greater(m + p*q, n - q + S(-1))): return True return False def replacement1464(A, B, a, c, j, m, p, q, r, x): n = q + r return -Dist(S(1)/(S(2)*a*c*(n - q)*(p + S(1))), Int(x**(m - n)*(a*x**q + c*x**(S(2)*n - q))**(p + S(1))*Simp(-A*c*x**(n - q)*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + B*a*(m - n + p*q + q + S(1)), x), x), x) + Simp(x**(m - n + S(1))*(a*x**q + c*x**(S(2)*n - q))**(p + S(1))*(-A*c*x**(n - q) + B*a)/(S(2)*a*c*(n - q)*(p + S(1))), x) def replacement1465(A, B, a, b, c, j, m, n, p, q, r, x): return Dist(p*(n - q)/(c*(m + p*(S(2)*n - q) + S(1))*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), Int(x**(m + q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(-1))*Simp(S(2)*A*a*c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) - B*a*b*(m + p*q + S(1)) + x**(n - q)*(A*b*c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + S(2)*B*a*c*(m + p*q + S(2)*p*(n - q) + S(1)) - B*b**S(2)*(m + p*q + p*(n - q) + S(1))), x), x), x) + Simp(x**(m + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p*(A*c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*b*p*(n - q) + B*c*x**(n - q)*(m + p*q + S(2)*p*(n - q) + S(1)))/(c*(m + p*(S(2)*n - q) + S(1))*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), x) def With1466(A, B, a, c, j, m, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False n = q + r if And(ZeroQ(j - S(2)*n + q), PositiveIntegerQ(n), Greater(m + p*q, -n + q), Unequal(m + p*q + S(2)*p*(n - q) + S(1), S(0)), Unequal(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1), S(0)), Unequal(m + S(1), n)): return True return False def replacement1466(A, B, a, c, j, m, p, q, r, x): n = q + r return Dist(p*(n - q)/((m + p*(S(2)*n - q) + S(1))*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), Int(x**(m + q)*(a*x**q + c*x**(S(2)*n - q))**(p + S(-1))*Simp(S(2)*A*a*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + S(2)*B*a*x**(n - q)*(m + p*q + S(2)*p*(n - q) + S(1)), x), x), x) + Simp(x**(m + S(1))*(A*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*x**(n - q)*(m + p*q + S(2)*p*(n - q) + S(1)))*(a*x**q + c*x**(S(2)*n - q))**p/((m + p*(S(2)*n - q) + S(1))*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), x) def replacement1467(A, B, a, b, c, j, m, n, p, q, r, x): return Dist(S(1)/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), Int(x**(m - q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))*Simp(-S(2)*A*a*c*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + A*b**S(2)*(m + p*q + (n - q)*(p + S(1)) + S(1)) - B*a*b*(m + p*q + S(1)) + c*x**(n - q)*(A*b - S(2)*B*a)*(m + p*q + (n - q)*(S(2)*p + S(3)) + S(1)), x), x), x) - Simp(x**(m - q + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))*(-S(2)*A*a*c + A*b**S(2) - B*a*b + c*x**(n - q)*(A*b - S(2)*B*a))/(a*(n - q)*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def With1468(A, B, a, c, j, m, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False n = q + r if And(ZeroQ(j - S(2)*n + q), PositiveIntegerQ(n), Less(m + p*q, n - q + S(-1))): return True return False def replacement1468(A, B, a, c, j, m, p, q, r, x): n = q + r return Dist(S(1)/(S(2)*a*c*(n - q)*(p + S(1))), Int(x**(m - q)*(a*x**q + c*x**(S(2)*n - q))**(p + S(1))*Simp(A*c*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + B*c*x**(n - q)*(m + p*q + (n - q)*(S(2)*p + S(3)) + S(1)), x), x), x) - Simp(x**(m - q + S(1))*(A*c + B*c*x**(n - q))*(a*x**q + c*x**(S(2)*n - q))**(p + S(1))/(S(2)*a*c*(n - q)*(p + S(1))), x) def replacement1469(A, B, a, b, c, j, m, n, p, q, r, x): return -Dist(S(1)/(c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), Int(x**(m - n + q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p*Simp(B*a*(m - n + p*q + q + S(1)) + x**(n - q)*(-A*c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*b*(m + p*q + p*(n - q) + S(1))), x), x), x) + Simp(B*x**(m - n + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), x) def With1470(A, B, a, c, j, m, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False n = q + r if And(ZeroQ(j - S(2)*n + q), PositiveIntegerQ(n), GreaterEqual(m + p*q, n - q + S(-1)), Unequal(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1), S(0))): return True return False def replacement1470(A, B, a, c, j, m, p, q, r, x): n = q + r return -Dist(S(1)/(c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), Int(x**(m - n + q)*(a*x**q + c*x**(S(2)*n - q))**p*Simp(-A*c*x**(n - q)*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1)) + B*a*(m - n + p*q + q + S(1)), x), x), x) + Simp(B*x**(m - n + S(1))*(a*x**q + c*x**(S(2)*n - q))**(p + S(1))/(c*(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1))), x) def replacement1471(A, B, a, b, c, j, m, n, p, q, r, x): return Dist(S(1)/(a*(m + p*q + S(1))), Int(x**(m + n - q)*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p*Simp(-A*b*(m + p*q + (n - q)*(p + S(1)) + S(1)) - A*c*x**(n - q)*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + B*a*(m + p*q + S(1)), x), x), x) + Simp(A*x**(m - q + S(1))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**(p + S(1))/(a*(m + p*q + S(1))), x) def With1472(A, B, a, c, j, m, p, q, r, x): if isinstance(x, (int, Integer, float, Float)): return False n = q + r if And(ZeroQ(j - S(2)*n + q), PositiveIntegerQ(n), Or(Inequality(S(-1), LessEqual, p, Less, S(0)), Equal(m + p*q + (n - q)*(S(2)*p + S(1)) + S(1), S(0))), LessEqual(m + p*q, -n + q), Unequal(m + p*q + S(1), S(0))): return True return False def replacement1472(A, B, a, c, j, m, p, q, r, x): n = q + r return Dist(S(1)/(a*(m + p*q + S(1))), Int(x**(m + n - q)*(a*x**q + c*x**(S(2)*n - q))**p*Simp(-A*c*x**(n - q)*(m + p*q + S(2)*(n - q)*(p + S(1)) + S(1)) + B*a*(m + p*q + S(1)), x), x), x) + Simp(A*x**(m - q + S(1))*(a*x**q + c*x**(S(2)*n - q))**(p + S(1))/(a*(m + p*q + S(1))), x) def replacement1473(A, B, a, b, c, j, m, n, q, r, x): return Dist(x**(q/S(2))*sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q))/sqrt(a*x**q + b*x**n + c*x**(S(2)*n - q)), Int(x**(m - q/S(2))*(A + B*x**(n - q))/sqrt(a + b*x**(n - q) + c*x**(S(2)*n - S(2)*q)), x), x) def replacement1474(A, B, a, b, c, j, k, m, n, p, q, x): return Dist(x**(-j*p)*(a + b*x**(-j + k) + c*x**(-S(2)*j + S(2)*k))**(-p)*(a*x**j + b*x**k + c*x**n)**p, Int(x**(j*p + m)*(A + B*x**(-j + k))*(a + b*x**(-j + k) + c*x**(-S(2)*j + S(2)*k))**p, x), x) def replacement1475(A, B, a, b, c, j, m, n, p, q, r, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int(x**m*(A + B*x**(n - q))*(a*x**q + b*x**n + c*x**(S(2)*n - q))**p, x), x, u), x)
31bfba886ddaaf63462f6c7ff111cc27c2289ea7df8758565b0b5c5470269340
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def secant(): from sympy.integrals.rubi.constraints import cons1583, cons1504, cons2, cons3, cons50, cons127, cons19, cons4, cons1584, cons1514, cons1585, cons21, cons95, cons168, cons91, cons1172, cons96, cons167, cons33, cons1586, cons89, cons1361, cons25, cons1257, cons1260, cons676, cons8, cons29, cons810, cons1263, cons1587, cons1266, cons1267, cons1588, cons545, cons45, cons450, cons1269, cons746, cons1589, cons1256, cons64, cons1425, cons517, cons1322, cons1323, cons1590, cons1591, cons1592, cons1332, cons113, cons157, cons1593, cons1521, cons1338, cons1594, cons465, cons87, cons1595, cons79, cons170, cons274, cons1335, cons1596, cons1336, cons1597, cons1327, cons1598, cons1599, cons1600, cons1601, cons1555, cons1602, cons1359, cons1603, cons1604, cons1605, cons1606, cons20, cons210, cons5, cons1276, cons1607, cons1608, cons1310, cons149, cons1230, cons1509, cons150, cons1517, cons1609, cons198, cons1313, cons1610, cons1611, cons1582, cons72, cons1612, cons1613, cons81, cons1614, cons1615, cons1306, cons73, cons1414, cons1411, cons1325, cons1324, cons1616, cons82, cons1362, cons1423, cons1317, cons1233, cons1617, cons1316, cons1268, cons1618, cons152, cons1619, cons1620, cons1621, cons1622, cons1623, cons40, cons1624, cons1417, cons382, cons1430, cons36, cons37, cons1247, cons1571, cons1625, cons1626, cons1627, cons1628, cons1629, cons34, cons1551, cons1630, cons1631, cons348, cons90, cons1329, cons1632, cons1633, cons1258, cons1634, cons377, cons35, cons38, cons1435, cons1635, cons1636, cons1433, cons1637, cons1638, cons1639, cons1640, cons1641, cons1642, cons685, cons1643, cons1644, cons1645, cons1456, cons1480, cons56, cons1482, cons1481, cons1483, cons378, cons48, cons47, cons228, cons1646, cons530, cons812, cons813, cons1575, cons1497, cons70, cons71, cons825, cons826, cons1576, cons1578, cons1499, cons1579, cons1647 pattern3920 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1583, cons1504) rule3920 = ReplacementRule(pattern3920, replacement3920) pattern3921 = Pattern(Integral((S(1)/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(S(1)/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons50, cons127, cons1584) rule3921 = ReplacementRule(pattern3921, replacement3921) pattern3922 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(S(1)/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons50, cons127, cons19, cons1514, cons1585, cons21) rule3922 = ReplacementRule(pattern3922, replacement3922) pattern3923 = Pattern(Integral((WC('a', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(S(1)/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons50, cons127, cons19, cons1514, cons1585, cons21) rule3923 = ReplacementRule(pattern3923, replacement3923) pattern3924 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons168, cons91, cons1172) rule3924 = ReplacementRule(pattern3924, replacement3924) pattern3925 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons95, cons96, cons167, cons1172) rule3925 = ReplacementRule(pattern3925, replacement3925) pattern3926 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons4, cons33, cons168, cons1172, cons1586) rule3926 = ReplacementRule(pattern3926, replacement3926) pattern3927 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons167, cons1172) rule3927 = ReplacementRule(pattern3927, replacement3927) pattern3928 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons50, cons127, cons4, cons33, cons96, cons1361, cons1172) rule3928 = ReplacementRule(pattern3928, replacement3928) pattern3929 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons89, cons91, cons1361, cons1172) rule3929 = ReplacementRule(pattern3929, replacement3929) pattern3930 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons25, cons1257) rule3930 = ReplacementRule(pattern3930, replacement3930) pattern3931 = Pattern(Integral((WC('a', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons50, cons127, cons19, cons4, cons1260) rule3931 = ReplacementRule(pattern3931, replacement3931) pattern3932 = Pattern(Integral((S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons8, cons29, cons676) rule3932 = ReplacementRule(pattern3932, replacement3932) pattern3933 = Pattern(Integral((S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons8, cons29, cons676) rule3933 = ReplacementRule(pattern3933, replacement3933) pattern3934 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons167, cons810) rule3934 = ReplacementRule(pattern3934, replacement3934) pattern3935 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons167, cons810) rule3935 = ReplacementRule(pattern3935, replacement3935) pattern3936 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons91, cons810) rule3936 = ReplacementRule(pattern3936, replacement3936) pattern3937 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons91, cons810) rule3937 = ReplacementRule(pattern3937, replacement3937) pattern3938 = Pattern(Integral(S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons1263) rule3938 = ReplacementRule(pattern3938, replacement3938) pattern3939 = Pattern(Integral(S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons8, cons29, cons1263) rule3939 = ReplacementRule(pattern3939, replacement3939) pattern3940 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons1587) rule3940 = ReplacementRule(pattern3940, replacement3940) pattern3941 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons1587) rule3941 = ReplacementRule(pattern3941, replacement3941) pattern3942 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons4, cons25) rule3942 = ReplacementRule(pattern3942, replacement3942) pattern3943 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons3, cons8, cons29, cons4, cons25) rule3943 = ReplacementRule(pattern3943, replacement3943) pattern3944 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons1266) rule3944 = ReplacementRule(pattern3944, replacement3944) pattern3945 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons1266) rule3945 = ReplacementRule(pattern3945, replacement3945) pattern3946 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule3946 = ReplacementRule(pattern3946, replacement3946) pattern3947 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule3947 = ReplacementRule(pattern3947, replacement3947) pattern3948 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1267, cons89, cons167, cons810) rule3948 = ReplacementRule(pattern3948, replacement3948) pattern3949 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1267, cons89, cons167, cons810) rule3949 = ReplacementRule(pattern3949, replacement3949) pattern3950 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule3950 = ReplacementRule(pattern3950, replacement3950) pattern3951 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1267) rule3951 = ReplacementRule(pattern3951, replacement3951) pattern3952 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1267, cons89, cons1588, cons810) rule3952 = ReplacementRule(pattern3952, replacement3952) pattern3953 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1267, cons89, cons1588, cons810) rule3953 = ReplacementRule(pattern3953, replacement3953) pattern3954 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons545, cons45) rule3954 = ReplacementRule(pattern3954, replacement3954) pattern3955 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons545, cons45) rule3955 = ReplacementRule(pattern3955, replacement3955) pattern3956 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons545, cons450) rule3956 = ReplacementRule(pattern3956, replacement3956) pattern3957 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1267, cons545, cons450) rule3957 = ReplacementRule(pattern3957, replacement3957) pattern3958 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269) rule3958 = ReplacementRule(pattern3958, replacement3958) pattern3959 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269) rule3959 = ReplacementRule(pattern3959, replacement3959) pattern3960 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons1269) rule3960 = ReplacementRule(pattern3960, replacement3960) pattern3961 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons1269) rule3961 = ReplacementRule(pattern3961, replacement3961) pattern3962 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1269, cons89, cons746, cons810) rule3962 = ReplacementRule(pattern3962, replacement3962) pattern3963 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1269, cons89, cons746, cons810) rule3963 = ReplacementRule(pattern3963, replacement3963) pattern3964 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269) rule3964 = ReplacementRule(pattern3964, replacement3964) pattern3965 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269) rule3965 = ReplacementRule(pattern3965, replacement3965) pattern3966 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269) rule3966 = ReplacementRule(pattern3966, replacement3966) pattern3967 = Pattern(Integral(S(1)/sqrt(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons1269) rule3967 = ReplacementRule(pattern3967, replacement3967) pattern3968 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1269, cons89, cons91, cons810) rule3968 = ReplacementRule(pattern3968, replacement3968) pattern3969 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons1269, cons89, cons91, cons810) rule3969 = ReplacementRule(pattern3969, replacement3969) pattern3970 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1269, cons545) rule3970 = ReplacementRule(pattern3970, replacement3970) pattern3971 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons4, cons1269, cons545) rule3971 = ReplacementRule(pattern3971, replacement3971) pattern3972 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1589) rule3972 = ReplacementRule(pattern3972, replacement3972) pattern3973 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1589) rule3973 = ReplacementRule(pattern3973, replacement3973) pattern3974 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1589) rule3974 = ReplacementRule(pattern3974, replacement3974) pattern3975 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**S(2), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1589) rule3975 = ReplacementRule(pattern3975, replacement3975) pattern3976 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons1256) rule3976 = ReplacementRule(pattern3976, replacement3976) pattern3977 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons1256) rule3977 = ReplacementRule(pattern3977, replacement3977) pattern3978 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(3)), x_), cons2, cons3, cons50, cons127, cons1256) rule3978 = ReplacementRule(pattern3978, replacement3978) pattern3979 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(3)), x_), cons2, cons3, cons50, cons127, cons1256) rule3979 = ReplacementRule(pattern3979, replacement3979) pattern3980 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons64, cons89) rule3980 = ReplacementRule(pattern3980, replacement3980) pattern3981 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons64, cons89) rule3981 = ReplacementRule(pattern3981, replacement3981) pattern3982 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1267) rule3982 = ReplacementRule(pattern3982, replacement3982) pattern3983 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1267) rule3983 = ReplacementRule(pattern3983, replacement3983) pattern3984 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1425, cons517) rule3984 = ReplacementRule(pattern3984, replacement3984) pattern3985 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1425, cons517) rule3985 = ReplacementRule(pattern3985, replacement3985) pattern3986 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1267) rule3986 = ReplacementRule(pattern3986, replacement3986) pattern3987 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1267) rule3987 = ReplacementRule(pattern3987, replacement3987) pattern3988 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1267) rule3988 = ReplacementRule(pattern3988, replacement3988) pattern3989 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1267) rule3989 = ReplacementRule(pattern3989, replacement3989) pattern3990 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1322, cons517) rule3990 = ReplacementRule(pattern3990, replacement3990) pattern3991 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1322, cons517) rule3991 = ReplacementRule(pattern3991, replacement3991) pattern3992 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1322) rule3992 = ReplacementRule(pattern3992, replacement3992) pattern3993 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1322) rule3993 = ReplacementRule(pattern3993, replacement3993) pattern3994 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1323) rule3994 = ReplacementRule(pattern3994, replacement3994) pattern3995 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1323) rule3995 = ReplacementRule(pattern3995, replacement3995) pattern3996 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(3), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1322) rule3996 = ReplacementRule(pattern3996, replacement3996) pattern3997 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(3), x_), cons2, cons3, cons50, cons127, cons1267, cons33, cons1322) rule3997 = ReplacementRule(pattern3997, replacement3997) pattern3998 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(3), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1323) rule3998 = ReplacementRule(pattern3998, replacement3998) pattern3999 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(3), x_), cons2, cons3, cons50, cons127, cons19, cons1267, cons1323) rule3999 = ReplacementRule(pattern3999, replacement3999) pattern4000 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1590) rule4000 = ReplacementRule(pattern4000, replacement4000) pattern4001 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1590) rule4001 = ReplacementRule(pattern4001, replacement4001) pattern4002 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1591) rule4002 = ReplacementRule(pattern4002, replacement4002) pattern4003 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1591) rule4003 = ReplacementRule(pattern4003, replacement4003) pattern4004 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons167, cons810) rule4004 = ReplacementRule(pattern4004, replacement4004) pattern4005 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons167, cons810) rule4005 = ReplacementRule(pattern4005, replacement4005) pattern4006 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267) rule4006 = ReplacementRule(pattern4006, replacement4006) pattern4007 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267) rule4007 = ReplacementRule(pattern4007, replacement4007) pattern4008 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons1592, cons810) rule4008 = ReplacementRule(pattern4008, replacement4008) pattern4009 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons1592, cons810) rule4009 = ReplacementRule(pattern4009, replacement4009) pattern4010 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267) rule4010 = ReplacementRule(pattern4010, replacement4010) pattern4011 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267) rule4011 = ReplacementRule(pattern4011, replacement4011) pattern4012 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1332, cons45) rule4012 = ReplacementRule(pattern4012, replacement4012) pattern4013 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons1332, cons45) rule4013 = ReplacementRule(pattern4013, replacement4013) pattern4014 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267) rule4014 = ReplacementRule(pattern4014, replacement4014) pattern4015 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267) rule4015 = ReplacementRule(pattern4015, replacement4015) pattern4016 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1257, cons33, cons1425, cons517) rule4016 = ReplacementRule(pattern4016, replacement4016) pattern4017 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1257, cons33, cons1425, cons517) rule4017 = ReplacementRule(pattern4017, replacement4017) pattern4018 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1257, cons33, cons1322, cons517) rule4018 = ReplacementRule(pattern4018, replacement4018) pattern4019 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons1257, cons33, cons1322, cons517) rule4019 = ReplacementRule(pattern4019, replacement4019) pattern4020 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons95, cons113, cons1322) rule4020 = ReplacementRule(pattern4020, replacement4020) pattern4021 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons95, cons113, cons1322) rule4021 = ReplacementRule(pattern4021, replacement4021) pattern4022 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons157, cons1323) rule4022 = ReplacementRule(pattern4022, replacement4022) pattern4023 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons157, cons1323) rule4023 = ReplacementRule(pattern4023, replacement4023) pattern4024 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons95, cons168, cons1593, cons517) rule4024 = ReplacementRule(pattern4024, replacement4024) pattern4025 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons95, cons168, cons1593, cons517) rule4025 = ReplacementRule(pattern4025, replacement4025) pattern4026 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons33, cons168, cons1521, cons517) rule4026 = ReplacementRule(pattern4026, replacement4026) pattern4027 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons33, cons168, cons1521, cons517) rule4027 = ReplacementRule(pattern4027, replacement4027) pattern4028 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons95, cons96, cons1338, cons1594) rule4028 = ReplacementRule(pattern4028, replacement4028) pattern4029 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons95, cons96, cons1338, cons1594) rule4029 = ReplacementRule(pattern4029, replacement4029) pattern4030 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons95, cons96, cons746, cons1594) rule4030 = ReplacementRule(pattern4030, replacement4030) pattern4031 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons95, cons96, cons746, cons1594) rule4031 = ReplacementRule(pattern4031, replacement4031) pattern4032 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons33, cons96, cons1594) rule4032 = ReplacementRule(pattern4032, replacement4032) pattern4033 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267, cons33, cons96, cons1594) rule4033 = ReplacementRule(pattern4033, replacement4033) pattern4034 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons167) rule4034 = ReplacementRule(pattern4034, replacement4034) pattern4035 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons167) rule4035 = ReplacementRule(pattern4035, replacement4035) pattern4036 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons465) rule4036 = ReplacementRule(pattern4036, replacement4036) pattern4037 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons465) rule4037 = ReplacementRule(pattern4037, replacement4037) pattern4038 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267) rule4038 = ReplacementRule(pattern4038, replacement4038) pattern4039 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1267) rule4039 = ReplacementRule(pattern4039, replacement4039) pattern4040 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267) rule4040 = ReplacementRule(pattern4040, replacement4040) pattern4041 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267) rule4041 = ReplacementRule(pattern4041, replacement4041) pattern4042 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons746, cons810) rule4042 = ReplacementRule(pattern4042, replacement4042) pattern4043 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons746, cons810) rule4043 = ReplacementRule(pattern4043, replacement4043) pattern4044 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons465, cons810) rule4044 = ReplacementRule(pattern4044, replacement4044) pattern4045 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1267, cons89, cons465, cons810) rule4045 = ReplacementRule(pattern4045, replacement4045) pattern4046 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1267, cons89, cons746, cons1521, cons87) rule4046 = ReplacementRule(pattern4046, replacement4046) pattern4047 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1267, cons89, cons746, cons1521, cons87) rule4047 = ReplacementRule(pattern4047, replacement4047) pattern4048 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45, cons25, cons1590) rule4048 = ReplacementRule(pattern4048, replacement4048) pattern4049 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45, cons25, cons1590) rule4049 = ReplacementRule(pattern4049, replacement4049) pattern4050 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45, cons25, cons1595) rule4050 = ReplacementRule(pattern4050, replacement4050) pattern4051 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45, cons25, cons1595) rule4051 = ReplacementRule(pattern4051, replacement4051) pattern4052 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45) rule4052 = ReplacementRule(pattern4052, replacement4052) pattern4053 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons45) rule4053 = ReplacementRule(pattern4053, replacement4053) pattern4054 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons450) rule4054 = ReplacementRule(pattern4054, replacement4054) pattern4055 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1267, cons21, cons450) rule4055 = ReplacementRule(pattern4055, replacement4055) pattern4056 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1269) rule4056 = ReplacementRule(pattern4056, replacement4056) pattern4057 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1269) rule4057 = ReplacementRule(pattern4057, replacement4057) pattern4058 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons168, cons517) rule4058 = ReplacementRule(pattern4058, replacement4058) pattern4059 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons168, cons517) rule4059 = ReplacementRule(pattern4059, replacement4059) pattern4060 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1269) rule4060 = ReplacementRule(pattern4060, replacement4060) pattern4061 = Pattern(Integral(S(1)/((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1269) rule4061 = ReplacementRule(pattern4061, replacement4061) pattern4062 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1269) rule4062 = ReplacementRule(pattern4062, replacement4062) pattern4063 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1269) rule4063 = ReplacementRule(pattern4063, replacement4063) pattern4064 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons96, cons517) rule4064 = ReplacementRule(pattern4064, replacement4064) pattern4065 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons96, cons517) rule4065 = ReplacementRule(pattern4065, replacement4065) pattern4066 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons79) rule4066 = ReplacementRule(pattern4066, replacement4066) pattern4067 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons79) rule4067 = ReplacementRule(pattern4067, replacement4067) pattern4068 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons170) rule4068 = ReplacementRule(pattern4068, replacement4068) pattern4069 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons170) rule4069 = ReplacementRule(pattern4069, replacement4069) pattern4070 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons96) rule4070 = ReplacementRule(pattern4070, replacement4070) pattern4071 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons96) rule4071 = ReplacementRule(pattern4071, replacement4071) pattern4072 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons1269) rule4072 = ReplacementRule(pattern4072, replacement4072) pattern4073 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons1269) rule4073 = ReplacementRule(pattern4073, replacement4073) pattern4074 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1269) rule4074 = ReplacementRule(pattern4074, replacement4074) pattern4075 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1269) rule4075 = ReplacementRule(pattern4075, replacement4075) pattern4076 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(3), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons96) rule4076 = ReplacementRule(pattern4076, replacement4076) pattern4077 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(3), x_), cons2, cons3, cons50, cons127, cons1269, cons33, cons96) rule4077 = ReplacementRule(pattern4077, replacement4077) pattern4078 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(3), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons274) rule4078 = ReplacementRule(pattern4078, replacement4078) pattern4079 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(3), x_), cons2, cons3, cons50, cons127, cons19, cons1269, cons274) rule4079 = ReplacementRule(pattern4079, replacement4079) pattern4080 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons1335, cons1596) rule4080 = ReplacementRule(pattern4080, replacement4080) pattern4081 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons1335, cons1596) rule4081 = ReplacementRule(pattern4081, replacement4081) pattern4082 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1269, cons33, cons1335, cons1336, cons1597) rule4082 = ReplacementRule(pattern4082, replacement4082) pattern4083 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1269, cons33, cons1335, cons1336, cons1597) rule4083 = ReplacementRule(pattern4083, replacement4083) pattern4084 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons96, cons1327, cons1172) rule4084 = ReplacementRule(pattern4084, replacement4084) pattern4085 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons96, cons1327, cons1172) rule4085 = ReplacementRule(pattern4085, replacement4085) pattern4086 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons96, cons1338, cons1172) rule4086 = ReplacementRule(pattern4086, replacement4086) pattern4087 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons96, cons1338, cons1172) rule4087 = ReplacementRule(pattern4087, replacement4087) pattern4088 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons96, cons1598) rule4088 = ReplacementRule(pattern4088, replacement4088) pattern4089 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons96, cons1598) rule4089 = ReplacementRule(pattern4089, replacement4089) pattern4090 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1599) rule4090 = ReplacementRule(pattern4090, replacement4090) pattern4091 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons1599) rule4091 = ReplacementRule(pattern4091, replacement4091) pattern4092 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1269, cons33, cons96, cons1172) rule4092 = ReplacementRule(pattern4092, replacement4092) pattern4093 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons1269, cons33, cons96, cons1172) rule4093 = ReplacementRule(pattern4093, replacement4093) pattern4094 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4094 = ReplacementRule(pattern4094, replacement4094) pattern4095 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4095 = ReplacementRule(pattern4095, replacement4095) pattern4096 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4096 = ReplacementRule(pattern4096, replacement4096) pattern4097 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4097 = ReplacementRule(pattern4097, replacement4097) pattern4098 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(5)/2)/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4098 = ReplacementRule(pattern4098, replacement4098) pattern4099 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(5)/2)/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4099 = ReplacementRule(pattern4099, replacement4099) pattern4100 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons1600) rule4100 = ReplacementRule(pattern4100, replacement4100) pattern4101 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons1600) rule4101 = ReplacementRule(pattern4101, replacement4101) pattern4102 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4102 = ReplacementRule(pattern4102, replacement4102) pattern4103 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4103 = ReplacementRule(pattern4103, replacement4103) pattern4104 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons1588, cons810) rule4104 = ReplacementRule(pattern4104, replacement4104) pattern4105 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons1588, cons810) rule4105 = ReplacementRule(pattern4105, replacement4105) pattern4106 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4106 = ReplacementRule(pattern4106, replacement4106) pattern4107 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4107 = ReplacementRule(pattern4107, replacement4107) pattern4108 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons167, cons810) rule4108 = ReplacementRule(pattern4108, replacement4108) pattern4109 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons167, cons810) rule4109 = ReplacementRule(pattern4109, replacement4109) pattern4110 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4110 = ReplacementRule(pattern4110, replacement4110) pattern4111 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4111 = ReplacementRule(pattern4111, replacement4111) pattern4112 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons1588, cons810) rule4112 = ReplacementRule(pattern4112, replacement4112) pattern4113 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons1588, cons810) rule4113 = ReplacementRule(pattern4113, replacement4113) pattern4114 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4114 = ReplacementRule(pattern4114, replacement4114) pattern4115 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4115 = ReplacementRule(pattern4115, replacement4115) pattern4116 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4116 = ReplacementRule(pattern4116, replacement4116) pattern4117 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4117 = ReplacementRule(pattern4117, replacement4117) pattern4118 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons746, cons810) rule4118 = ReplacementRule(pattern4118, replacement4118) pattern4119 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons746, cons810) rule4119 = ReplacementRule(pattern4119, replacement4119) pattern4120 = Pattern(Integral(cos(x_*WC('f', S(1)) + WC('e', S(0)))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1269) rule4120 = ReplacementRule(pattern4120, replacement4120) pattern4121 = Pattern(Integral(sin(x_*WC('f', S(1)) + WC('e', S(0)))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons1269) rule4121 = ReplacementRule(pattern4121, replacement4121) pattern4122 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4122 = ReplacementRule(pattern4122, replacement4122) pattern4123 = Pattern(Integral(S(1)/(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4123 = ReplacementRule(pattern4123, replacement4123) pattern4124 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons91, cons810) rule4124 = ReplacementRule(pattern4124, replacement4124) pattern4125 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons91, cons810) rule4125 = ReplacementRule(pattern4125, replacement4125) pattern4126 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons1588, cons1601) rule4126 = ReplacementRule(pattern4126, replacement4126) pattern4127 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons89, cons1588, cons1601) rule4127 = ReplacementRule(pattern4127, replacement4127) pattern4128 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1269, cons89, cons1600, cons1555, cons1602) rule4128 = ReplacementRule(pattern4128, replacement4128) pattern4129 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons1269, cons89, cons1600, cons1555, cons1602) rule4129 = ReplacementRule(pattern4129, replacement4129) pattern4130 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons1359, cons1603, cons1521, cons1336) rule4130 = ReplacementRule(pattern4130, replacement4130) pattern4131 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons1359, cons1603, cons1521, cons1336) rule4131 = ReplacementRule(pattern4131, replacement4131) pattern4132 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons1604, cons1605, cons1521, cons1555) rule4132 = ReplacementRule(pattern4132, replacement4132) pattern4133 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons1269, cons95, cons1604, cons1605, cons1521, cons1555) rule4133 = ReplacementRule(pattern4133, replacement4133) pattern4134 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4134 = ReplacementRule(pattern4134, replacement4134) pattern4135 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons1269) rule4135 = ReplacementRule(pattern4135, replacement4135) pattern4136 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons64) rule4136 = ReplacementRule(pattern4136, replacement4136) pattern4137 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons4, cons64) rule4137 = ReplacementRule(pattern4137, replacement4137) pattern4138 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1606) rule4138 = ReplacementRule(pattern4138, replacement4138) pattern4139 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons19, cons4, cons1606) rule4139 = ReplacementRule(pattern4139, replacement4139) pattern4140 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons20) rule4140 = ReplacementRule(pattern4140, replacement4140) pattern4141 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons5, cons20) rule4141 = ReplacementRule(pattern4141, replacement4141) pattern4142 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1276, cons1267) rule4142 = ReplacementRule(pattern4142, replacement4142) pattern4143 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1276, cons1267) rule4143 = ReplacementRule(pattern4143, replacement4143) pattern4144 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*sin(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1276, cons1269) rule4144 = ReplacementRule(pattern4144, replacement4144) pattern4145 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*cos(x_*WC('f', S(1)) + WC('e', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons50, cons127, cons19, cons1276, cons1269) rule4145 = ReplacementRule(pattern4145, replacement4145) pattern4146 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1607) rule4146 = ReplacementRule(pattern4146, replacement4146) pattern4147 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons19, cons1607) rule4147 = ReplacementRule(pattern4147, replacement4147) pattern4148 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1608) rule4148 = ReplacementRule(pattern4148, replacement4148) pattern4149 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1608) rule4149 = ReplacementRule(pattern4149, replacement4149) pattern4150 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1310) rule4150 = ReplacementRule(pattern4150, replacement4150) pattern4151 = Pattern(Integral((WC('g', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons1310) rule4151 = ReplacementRule(pattern4151, replacement4151) pattern4152 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons149) rule4152 = ReplacementRule(pattern4152, replacement4152) pattern4153 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons50, cons127, cons210, cons19, cons5, cons149) rule4153 = ReplacementRule(pattern4153, replacement4153) pattern4154 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1230, cons1267, cons87) rule4154 = ReplacementRule(pattern4154, replacement4154) pattern4155 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1230, cons1267, cons87) rule4155 = ReplacementRule(pattern4155, replacement4155) pattern4156 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1230, cons1267, cons25) rule4156 = ReplacementRule(pattern4156, replacement4156) pattern4157 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1230, cons1267, cons25) rule4157 = ReplacementRule(pattern4157, replacement4157) pattern4158 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168) rule4158 = ReplacementRule(pattern4158, replacement4158) pattern4159 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons168) rule4159 = ReplacementRule(pattern4159, replacement4159) pattern4160 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96) rule4160 = ReplacementRule(pattern4160, replacement4160) pattern4161 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons33, cons96) rule4161 = ReplacementRule(pattern4161, replacement4161) pattern4162 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))/tan(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule4162 = ReplacementRule(pattern4162, replacement4162) pattern4163 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))*tan(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule4163 = ReplacementRule(pattern4163, replacement4163) pattern4164 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1509) rule4164 = ReplacementRule(pattern4164, replacement4164) pattern4165 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1509) rule4165 = ReplacementRule(pattern4165, replacement4165) pattern4166 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1230, cons1269) rule4166 = ReplacementRule(pattern4166, replacement4166) pattern4167 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1230, cons1269) rule4167 = ReplacementRule(pattern4167, replacement4167) pattern4168 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons150) rule4168 = ReplacementRule(pattern4168, replacement4168) pattern4169 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons150) rule4169 = ReplacementRule(pattern4169, replacement4169) pattern4170 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1267, cons1517, cons1609) rule4170 = ReplacementRule(pattern4170, replacement4170) pattern4171 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1267, cons1517, cons1609) rule4171 = ReplacementRule(pattern4171, replacement4171) pattern4172 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1267, cons198) rule4172 = ReplacementRule(pattern4172, replacement4172) pattern4173 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1267, cons198) rule4173 = ReplacementRule(pattern4173, replacement4173) pattern4174 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1267, cons25) rule4174 = ReplacementRule(pattern4174, replacement4174) pattern4175 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1267, cons25) rule4175 = ReplacementRule(pattern4175, replacement4175) pattern4176 = Pattern(Integral(sqrt(WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))/(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1269) rule4176 = ReplacementRule(pattern4176, replacement4176) pattern4177 = Pattern(Integral(sqrt(WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))/(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1269) rule4177 = ReplacementRule(pattern4177, replacement4177) pattern4178 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_/(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1269, cons1313) rule4178 = ReplacementRule(pattern4178, replacement4178) pattern4179 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_/(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1269, cons1313) rule4179 = ReplacementRule(pattern4179, replacement4179) pattern4180 = Pattern(Integral(S(1)/(sqrt(WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons1269) rule4180 = ReplacementRule(pattern4180, replacement4180) pattern4181 = Pattern(Integral(S(1)/(sqrt(WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons1269) rule4181 = ReplacementRule(pattern4181, replacement4181) pattern4182 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_/(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1269, cons1610) rule4182 = ReplacementRule(pattern4182, replacement4182) pattern4183 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_/(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons1269, cons1610) rule4183 = ReplacementRule(pattern4183, replacement4183) pattern4184 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*tan(x_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons1269) rule4184 = ReplacementRule(pattern4184, replacement4184) pattern4185 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_/tan(x_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons1269) rule4185 = ReplacementRule(pattern4185, replacement4185) pattern4186 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1269, cons150) rule4186 = ReplacementRule(pattern4186, replacement4186) pattern4187 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**m_*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons1269, cons150) rule4187 = ReplacementRule(pattern4187, replacement4187) pattern4188 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1269, cons87, cons20, cons1611) rule4188 = ReplacementRule(pattern4188, replacement4188) pattern4189 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1269, cons87, cons20, cons1611) rule4189 = ReplacementRule(pattern4189, replacement4189) pattern4190 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1582) rule4190 = ReplacementRule(pattern4190, replacement4190) pattern4191 = Pattern(Integral((WC('e', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1582) rule4191 = ReplacementRule(pattern4191, replacement4191) pattern4192 = Pattern(Integral((WC('e', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**p_)**m_*(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons21) rule4192 = ReplacementRule(pattern4192, replacement4192) pattern4193 = Pattern(Integral(((S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**p_*WC('e', S(1)))**m_*(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons21) rule4193 = ReplacementRule(pattern4193, replacement4193) pattern4194 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons64, cons198, cons1612) rule4194 = ReplacementRule(pattern4194, replacement4194) pattern4195 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons64, cons198, cons1612) rule4195 = ReplacementRule(pattern4195, replacement4195) pattern4196 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons20, cons89, cons1613) rule4196 = ReplacementRule(pattern4196, replacement4196) pattern4197 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons20, cons89, cons1613) rule4197 = ReplacementRule(pattern4197, replacement4197) pattern4198 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons72, cons1267, cons81) rule4198 = ReplacementRule(pattern4198, replacement4198) pattern4199 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons72, cons1267, cons81) rule4199 = ReplacementRule(pattern4199, replacement4199) pattern4200 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons89, cons1614) rule4200 = ReplacementRule(pattern4200, replacement4200) pattern4201 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons89, cons1614) rule4201 = ReplacementRule(pattern4201, replacement4201) pattern4202 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons89, cons1592) rule4202 = ReplacementRule(pattern4202, replacement4202) pattern4203 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons89, cons1592) rule4203 = ReplacementRule(pattern4203, replacement4203) pattern4204 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons89, cons1592) rule4204 = ReplacementRule(pattern4204, replacement4204) pattern4205 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons89, cons1592) rule4205 = ReplacementRule(pattern4205, replacement4205) pattern4206 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons1615) rule4206 = ReplacementRule(pattern4206, replacement4206) pattern4207 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons1615) rule4207 = ReplacementRule(pattern4207, replacement4207) pattern4208 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(5)/2)*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons89, cons1592) rule4208 = ReplacementRule(pattern4208, replacement4208) pattern4209 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(5)/2)*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons89, cons1592) rule4209 = ReplacementRule(pattern4209, replacement4209) pattern4210 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons1306, cons1257) rule4210 = ReplacementRule(pattern4210, replacement4210) pattern4211 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons1306, cons1257) rule4211 = ReplacementRule(pattern4211, replacement4211) pattern4212 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267) rule4212 = ReplacementRule(pattern4212, replacement4212) pattern4213 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267) rule4213 = ReplacementRule(pattern4213, replacement4213) pattern4214 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72) rule4214 = ReplacementRule(pattern4214, replacement4214) pattern4215 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72) rule4215 = ReplacementRule(pattern4215, replacement4215) pattern4216 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1414) rule4216 = ReplacementRule(pattern4216, replacement4216) pattern4217 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1414) rule4217 = ReplacementRule(pattern4217, replacement4217) pattern4218 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule4218 = ReplacementRule(pattern4218, replacement4218) pattern4219 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule4219 = ReplacementRule(pattern4219, replacement4219) pattern4220 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule4220 = ReplacementRule(pattern4220, replacement4220) pattern4221 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule4221 = ReplacementRule(pattern4221, replacement4221) pattern4222 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons168, cons1267, cons517) rule4222 = ReplacementRule(pattern4222, replacement4222) pattern4223 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons168, cons1267, cons517) rule4223 = ReplacementRule(pattern4223, replacement4223) pattern4224 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons168, cons1269, cons517) rule4224 = ReplacementRule(pattern4224, replacement4224) pattern4225 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons168, cons1269, cons517) rule4225 = ReplacementRule(pattern4225, replacement4225) pattern4226 = Pattern(Integral((c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule4226 = ReplacementRule(pattern4226, replacement4226) pattern4227 = Pattern(Integral((c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule4227 = ReplacementRule(pattern4227, replacement4227) pattern4228 = Pattern(Integral((c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule4228 = ReplacementRule(pattern4228, replacement4228) pattern4229 = Pattern(Integral((c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule4229 = ReplacementRule(pattern4229, replacement4229) pattern4230 = Pattern(Integral((c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule4230 = ReplacementRule(pattern4230, replacement4230) pattern4231 = Pattern(Integral((c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule4231 = ReplacementRule(pattern4231, replacement4231) pattern4232 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons96, cons1267, cons517) rule4232 = ReplacementRule(pattern4232, replacement4232) pattern4233 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons96, cons1267, cons517) rule4233 = ReplacementRule(pattern4233, replacement4233) pattern4234 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons96, cons1269, cons517) rule4234 = ReplacementRule(pattern4234, replacement4234) pattern4235 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons33, cons96, cons1269, cons517) rule4235 = ReplacementRule(pattern4235, replacement4235) pattern4236 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons79) rule4236 = ReplacementRule(pattern4236, replacement4236) pattern4237 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons73, cons79) rule4237 = ReplacementRule(pattern4237, replacement4237) pattern4238 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4238 = ReplacementRule(pattern4238, replacement4238) pattern4239 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4239 = ReplacementRule(pattern4239, replacement4239) pattern4240 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4240 = ReplacementRule(pattern4240, replacement4240) pattern4241 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4241 = ReplacementRule(pattern4241, replacement4241) pattern4242 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4242 = ReplacementRule(pattern4242, replacement4242) pattern4243 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4243 = ReplacementRule(pattern4243, replacement4243) pattern4244 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4244 = ReplacementRule(pattern4244, replacement4244) pattern4245 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4245 = ReplacementRule(pattern4245, replacement4245) pattern4246 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4246 = ReplacementRule(pattern4246, replacement4246) pattern4247 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4247 = ReplacementRule(pattern4247, replacement4247) pattern4248 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule4248 = ReplacementRule(pattern4248, replacement4248) pattern4249 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269) rule4249 = ReplacementRule(pattern4249, replacement4249) pattern4250 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule4250 = ReplacementRule(pattern4250, replacement4250) pattern4251 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule4251 = ReplacementRule(pattern4251, replacement4251) pattern4252 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule4252 = ReplacementRule(pattern4252, replacement4252) pattern4253 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule4253 = ReplacementRule(pattern4253, replacement4253) pattern4254 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule4254 = ReplacementRule(pattern4254, replacement4254) pattern4255 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule4255 = ReplacementRule(pattern4255, replacement4255) pattern4256 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule4256 = ReplacementRule(pattern4256, replacement4256) pattern4257 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule4257 = ReplacementRule(pattern4257, replacement4257) pattern4258 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1324) rule4258 = ReplacementRule(pattern4258, replacement4258) pattern4259 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1324) rule4259 = ReplacementRule(pattern4259, replacement4259) pattern4260 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4260 = ReplacementRule(pattern4260, replacement4260) pattern4261 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4261 = ReplacementRule(pattern4261, replacement4261) pattern4262 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule4262 = ReplacementRule(pattern4262, replacement4262) pattern4263 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1324) rule4263 = ReplacementRule(pattern4263, replacement4263) pattern4264 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule4264 = ReplacementRule(pattern4264, replacement4264) pattern4265 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule4265 = ReplacementRule(pattern4265, replacement4265) pattern4266 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1325) rule4266 = ReplacementRule(pattern4266, replacement4266) pattern4267 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1325) rule4267 = ReplacementRule(pattern4267, replacement4267) pattern4268 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1267, cons1325, cons1306) rule4268 = ReplacementRule(pattern4268, replacement4268) pattern4269 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1267, cons1325, cons1306) rule4269 = ReplacementRule(pattern4269, replacement4269) pattern4270 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons20, cons87, cons1616) rule4270 = ReplacementRule(pattern4270, replacement4270) pattern4271 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons20, cons87, cons1616) rule4271 = ReplacementRule(pattern4271, replacement4271) pattern4272 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons81, cons82, cons1616) rule4272 = ReplacementRule(pattern4272, replacement4272) pattern4273 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons81, cons82, cons1616) rule4273 = ReplacementRule(pattern4273, replacement4273) pattern4274 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1257, cons79) rule4274 = ReplacementRule(pattern4274, replacement4274) pattern4275 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1257, cons79) rule4275 = ReplacementRule(pattern4275, replacement4275) pattern4276 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons150) rule4276 = ReplacementRule(pattern4276, replacement4276) pattern4277 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons150) rule4277 = ReplacementRule(pattern4277, replacement4277) pattern4278 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule4278 = ReplacementRule(pattern4278, replacement4278) pattern4279 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule4279 = ReplacementRule(pattern4279, replacement4279) pattern4280 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons25, cons20) rule4280 = ReplacementRule(pattern4280, replacement4280) pattern4281 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons29, cons50, cons127, cons4, cons25, cons20) rule4281 = ReplacementRule(pattern4281, replacement4281) pattern4282 = Pattern(Integral(((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons25) rule4282 = ReplacementRule(pattern4282, replacement4282) pattern4283 = Pattern(Integral(((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons25) rule4283 = ReplacementRule(pattern4283, replacement4283) pattern4284 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons157, cons1423) rule4284 = ReplacementRule(pattern4284, replacement4284) pattern4285 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons157, cons1423) rule4285 = ReplacementRule(pattern4285, replacement4285) pattern4286 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons1317, cons1423, cons1233, cons1617) rule4286 = ReplacementRule(pattern4286, replacement4286) pattern4287 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267, cons1317, cons1423, cons1233, cons1617) rule4287 = ReplacementRule(pattern4287, replacement4287) pattern4288 = Pattern(Integral(sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267) rule4288 = ReplacementRule(pattern4288, replacement4288) pattern4289 = Pattern(Integral(sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267) rule4289 = ReplacementRule(pattern4289, replacement4289) pattern4290 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons72, cons1267, cons1316) rule4290 = ReplacementRule(pattern4290, replacement4290) pattern4291 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons72, cons1267, cons1316) rule4291 = ReplacementRule(pattern4291, replacement4291) pattern4292 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons1268, cons33, cons1322) rule4292 = ReplacementRule(pattern4292, replacement4292) pattern4293 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons1268, cons33, cons1322) rule4293 = ReplacementRule(pattern4293, replacement4293) pattern4294 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons72, cons1267, cons1268, cons1323, cons1618) rule4294 = ReplacementRule(pattern4294, replacement4294) pattern4295 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons72, cons1267, cons1268, cons1323, cons1618) rule4295 = ReplacementRule(pattern4295, replacement4295) pattern4296 = Pattern(Integral((c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons150) rule4296 = ReplacementRule(pattern4296, replacement4296) pattern4297 = Pattern(Integral((c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons150) rule4297 = ReplacementRule(pattern4297, replacement4297) pattern4298 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons150, cons1322, cons517) rule4298 = ReplacementRule(pattern4298, replacement4298) pattern4299 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons150, cons1322, cons517) rule4299 = ReplacementRule(pattern4299, replacement4299) pattern4300 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons152, cons1619, cons1620) rule4300 = ReplacementRule(pattern4300, replacement4300) pattern4301 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons152, cons1619, cons1620) rule4301 = ReplacementRule(pattern4301, replacement4301) pattern4302 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons81) rule4302 = ReplacementRule(pattern4302, replacement4302) pattern4303 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons72, cons1267, cons81) rule4303 = ReplacementRule(pattern4303, replacement4303) pattern4304 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons1621) rule4304 = ReplacementRule(pattern4304, replacement4304) pattern4305 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons72, cons1267, cons1621) rule4305 = ReplacementRule(pattern4305, replacement4305) pattern4306 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267) rule4306 = ReplacementRule(pattern4306, replacement4306) pattern4307 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons72, cons1267) rule4307 = ReplacementRule(pattern4307, replacement4307) pattern4308 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons152, cons1619, cons1620) rule4308 = ReplacementRule(pattern4308, replacement4308) pattern4309 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons72, cons1267, cons152, cons1619, cons1620) rule4309 = ReplacementRule(pattern4309, replacement4309) pattern4310 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons72, cons1267, cons81) rule4310 = ReplacementRule(pattern4310, replacement4310) pattern4311 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons72, cons1267, cons81) rule4311 = ReplacementRule(pattern4311, replacement4311) pattern4312 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267) rule4312 = ReplacementRule(pattern4312, replacement4312) pattern4313 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons72, cons1267) rule4313 = ReplacementRule(pattern4313, replacement4313) pattern4314 = Pattern(Integral(sqrt(WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule4314 = ReplacementRule(pattern4314, replacement4314) pattern4315 = Pattern(Integral(sqrt(WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule4315 = ReplacementRule(pattern4315, replacement4315) pattern4316 = Pattern(Integral(sqrt(WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269) rule4316 = ReplacementRule(pattern4316, replacement4316) pattern4317 = Pattern(Integral(sqrt(WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269) rule4317 = ReplacementRule(pattern4317, replacement4317) pattern4318 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule4318 = ReplacementRule(pattern4318, replacement4318) pattern4319 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267) rule4319 = ReplacementRule(pattern4319, replacement4319) pattern4320 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1324) rule4320 = ReplacementRule(pattern4320, replacement4320) pattern4321 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1324) rule4321 = ReplacementRule(pattern4321, replacement4321) pattern4322 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4322 = ReplacementRule(pattern4322, replacement4322) pattern4323 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4323 = ReplacementRule(pattern4323, replacement4323) pattern4324 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule4324 = ReplacementRule(pattern4324, replacement4324) pattern4325 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule4325 = ReplacementRule(pattern4325, replacement4325) pattern4326 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269) rule4326 = ReplacementRule(pattern4326, replacement4326) pattern4327 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269) rule4327 = ReplacementRule(pattern4327, replacement4327) pattern4328 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4328 = ReplacementRule(pattern4328, replacement4328) pattern4329 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4329 = ReplacementRule(pattern4329, replacement4329) pattern4330 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4330 = ReplacementRule(pattern4330, replacement4330) pattern4331 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4331 = ReplacementRule(pattern4331, replacement4331) pattern4332 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule4332 = ReplacementRule(pattern4332, replacement4332) pattern4333 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule4333 = ReplacementRule(pattern4333, replacement4333) pattern4334 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269) rule4334 = ReplacementRule(pattern4334, replacement4334) pattern4335 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269) rule4335 = ReplacementRule(pattern4335, replacement4335) pattern4336 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4336 = ReplacementRule(pattern4336, replacement4336) pattern4337 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1411) rule4337 = ReplacementRule(pattern4337, replacement4337) pattern4338 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4338 = ReplacementRule(pattern4338, replacement4338) pattern4339 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4339 = ReplacementRule(pattern4339, replacement4339) pattern4340 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(5)/2)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule4340 = ReplacementRule(pattern4340, replacement4340) pattern4341 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(5)/2)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1267) rule4341 = ReplacementRule(pattern4341, replacement4341) pattern4342 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(5)/2)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269) rule4342 = ReplacementRule(pattern4342, replacement4342) pattern4343 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(5)/2)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons73, cons1269) rule4343 = ReplacementRule(pattern4343, replacement4343) pattern4344 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule4344 = ReplacementRule(pattern4344, replacement4344) pattern4345 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule4345 = ReplacementRule(pattern4345, replacement4345) pattern4346 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1324) rule4346 = ReplacementRule(pattern4346, replacement4346) pattern4347 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1324) rule4347 = ReplacementRule(pattern4347, replacement4347) pattern4348 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4348 = ReplacementRule(pattern4348, replacement4348) pattern4349 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4349 = ReplacementRule(pattern4349, replacement4349) pattern4350 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule4350 = ReplacementRule(pattern4350, replacement4350) pattern4351 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1267, cons1325) rule4351 = ReplacementRule(pattern4351, replacement4351) pattern4352 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4352 = ReplacementRule(pattern4352, replacement4352) pattern4353 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4353 = ReplacementRule(pattern4353, replacement4353) pattern4354 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule4354 = ReplacementRule(pattern4354, replacement4354) pattern4355 = Pattern(Integral(S(1)/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73) rule4355 = ReplacementRule(pattern4355, replacement4355) pattern4356 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4356 = ReplacementRule(pattern4356, replacement4356) pattern4357 = Pattern(Integral(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/((c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1269, cons1325) rule4357 = ReplacementRule(pattern4357, replacement4357) pattern4358 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons1267, cons1325, cons1622) rule4358 = ReplacementRule(pattern4358, replacement4358) pattern4359 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons1267, cons1325, cons1622) rule4359 = ReplacementRule(pattern4359, replacement4359) pattern4360 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons73, cons20, cons87) rule4360 = ReplacementRule(pattern4360, replacement4360) pattern4361 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons73, cons20, cons87) rule4361 = ReplacementRule(pattern4361, replacement4361) pattern4362 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons73, cons1623, cons20) rule4362 = ReplacementRule(pattern4362, replacement4362) pattern4363 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons73, cons1623, cons20) rule4363 = ReplacementRule(pattern4363, replacement4363) pattern4364 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons1623, cons21) rule4364 = ReplacementRule(pattern4364, replacement4364) pattern4365 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons1623, cons21) rule4365 = ReplacementRule(pattern4365, replacement4365) pattern4366 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(S(1)/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1306, cons1609, cons40, cons1624) rule4366 = ReplacementRule(pattern4366, replacement4366) pattern4367 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(S(1)/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons73, cons1306, cons1609, cons40, cons1624) rule4367 = ReplacementRule(pattern4367, replacement4367) pattern4368 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons1417) rule4368 = ReplacementRule(pattern4368, replacement4368) pattern4369 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons73, cons1417) rule4369 = ReplacementRule(pattern4369, replacement4369) pattern4370 = Pattern(Integral((WC('g', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons382) rule4370 = ReplacementRule(pattern4370, replacement4370) pattern4371 = Pattern(Integral((WC('g', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('c', S(0)) + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons382) rule4371 = ReplacementRule(pattern4371, replacement4371) pattern4372 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons1430) rule4372 = ReplacementRule(pattern4372, replacement4372) pattern4373 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**(S(3)/2)*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons73, cons1269, cons1325, cons1430) rule4373 = ReplacementRule(pattern4373, replacement4373) pattern4374 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons89, cons1588) rule4374 = ReplacementRule(pattern4374, replacement4374) pattern4375 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons89, cons1588) rule4375 = ReplacementRule(pattern4375, replacement4375) pattern4376 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1571) rule4376 = ReplacementRule(pattern4376, replacement4376) pattern4377 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1571) rule4377 = ReplacementRule(pattern4377, replacement4377) pattern4378 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1247) rule4378 = ReplacementRule(pattern4378, replacement4378) pattern4379 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1247) rule4379 = ReplacementRule(pattern4379, replacement4379) pattern4380 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons19, cons1247, cons1267, cons1625) rule4380 = ReplacementRule(pattern4380, replacement4380) pattern4381 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons19, cons1247, cons1267, cons1625) rule4381 = ReplacementRule(pattern4381, replacement4381) pattern4382 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons1247, cons1267, cons1626, cons33, cons1322) rule4382 = ReplacementRule(pattern4382, replacement4382) pattern4383 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons1247, cons1267, cons1626, cons33, cons1322) rule4383 = ReplacementRule(pattern4383, replacement4383) pattern4384 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons19, cons1247, cons1267, cons1626, cons1323) rule4384 = ReplacementRule(pattern4384, replacement4384) pattern4385 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons19, cons1247, cons1267, cons1626, cons1323) rule4385 = ReplacementRule(pattern4385, replacement4385) pattern4386 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons1247, cons1269, cons33, cons170) rule4386 = ReplacementRule(pattern4386, replacement4386) pattern4387 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons1247, cons1269, cons33, cons170) rule4387 = ReplacementRule(pattern4387, replacement4387) pattern4388 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons1247, cons1269, cons33, cons96) rule4388 = ReplacementRule(pattern4388, replacement4388) pattern4389 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons1247, cons1269, cons33, cons96) rule4389 = ReplacementRule(pattern4389, replacement4389) pattern4390 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1269, cons1627) rule4390 = ReplacementRule(pattern4390, replacement4390) pattern4391 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1269, cons1627) rule4391 = ReplacementRule(pattern4391, replacement4391) pattern4392 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1269, cons1628) rule4392 = ReplacementRule(pattern4392, replacement4392) pattern4393 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1269, cons1628) rule4393 = ReplacementRule(pattern4393, replacement4393) pattern4394 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons1247, cons1269, cons1627, cons79) rule4394 = ReplacementRule(pattern4394, replacement4394) pattern4395 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons1247, cons1269, cons1627, cons79) rule4395 = ReplacementRule(pattern4395, replacement4395) pattern4396 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons19, cons1247, cons1269) rule4396 = ReplacementRule(pattern4396, replacement4396) pattern4397 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons36, cons37, cons50, cons127, cons19, cons1247, cons1269) rule4397 = ReplacementRule(pattern4397, replacement4397) pattern4398 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1247, cons1267, cons33, cons1322) rule4398 = ReplacementRule(pattern4398, replacement4398) pattern4399 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1247, cons1267, cons33, cons1322) rule4399 = ReplacementRule(pattern4399, replacement4399) pattern4400 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1247, cons1269, cons33, cons96) rule4400 = ReplacementRule(pattern4400, replacement4400) pattern4401 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons1247, cons1269, cons33, cons96) rule4401 = ReplacementRule(pattern4401, replacement4401) pattern4402 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons19, cons1247, cons274) rule4402 = ReplacementRule(pattern4402, replacement4402) pattern4403 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons19, cons1247, cons274) rule4403 = ReplacementRule(pattern4403, replacement4403) pattern4404 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons1247, cons1267, cons157, cons1629) rule4404 = ReplacementRule(pattern4404, replacement4404) pattern4405 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons1247, cons1267, cons157, cons1629) rule4405 = ReplacementRule(pattern4405, replacement4405) pattern4406 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons157, cons33, cons34) rule4406 = ReplacementRule(pattern4406, replacement4406) pattern4407 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons157, cons33, cons34) rule4407 = ReplacementRule(pattern4407, replacement4407) pattern4408 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons1247, cons1267, cons157, cons1551) rule4408 = ReplacementRule(pattern4408, replacement4408) pattern4409 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons1247, cons1267, cons157, cons1551) rule4409 = ReplacementRule(pattern4409, replacement4409) pattern4410 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons1630) rule4410 = ReplacementRule(pattern4410, replacement4410) pattern4411 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons1630) rule4411 = ReplacementRule(pattern4411, replacement4411) pattern4412 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1267, cons1631, cons89, cons465) rule4412 = ReplacementRule(pattern4412, replacement4412) pattern4413 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1267, cons1631, cons89, cons465) rule4413 = ReplacementRule(pattern4413, replacement4413) pattern4414 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons1631, cons1233) rule4414 = ReplacementRule(pattern4414, replacement4414) pattern4415 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons1631, cons1233) rule4415 = ReplacementRule(pattern4415, replacement4415) pattern4416 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1267, cons95, cons1425, cons91) rule4416 = ReplacementRule(pattern4416, replacement4416) pattern4417 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1267, cons95, cons1425, cons91) rule4417 = ReplacementRule(pattern4417, replacement4417) pattern4418 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons33, cons1425, cons348) rule4418 = ReplacementRule(pattern4418, replacement4418) pattern4419 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons33, cons1425, cons348) rule4419 = ReplacementRule(pattern4419, replacement4419) pattern4420 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1267, cons95, cons1322, cons90) rule4420 = ReplacementRule(pattern4420, replacement4420) pattern4421 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1267, cons95, cons1322, cons90) rule4421 = ReplacementRule(pattern4421, replacement4421) pattern4422 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons33, cons1322, cons1329) rule4422 = ReplacementRule(pattern4422, replacement4422) pattern4423 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1267, cons33, cons1322, cons1329) rule4423 = ReplacementRule(pattern4423, replacement4423) pattern4424 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1267, cons89, cons167) rule4424 = ReplacementRule(pattern4424, replacement4424) pattern4425 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1267, cons89, cons167) rule4425 = ReplacementRule(pattern4425, replacement4425) pattern4426 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1267, cons89, cons465) rule4426 = ReplacementRule(pattern4426, replacement4426) pattern4427 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1267, cons89, cons465) rule4427 = ReplacementRule(pattern4427, replacement4427) pattern4428 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1267) rule4428 = ReplacementRule(pattern4428, replacement4428) pattern4429 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1267) rule4429 = ReplacementRule(pattern4429, replacement4429) pattern4430 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons168, cons1588) rule4430 = ReplacementRule(pattern4430, replacement4430) pattern4431 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons168, cons1588) rule4431 = ReplacementRule(pattern4431, replacement4431) pattern4432 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1269, cons33, cons168, cons1632) rule4432 = ReplacementRule(pattern4432, replacement4432) pattern4433 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1269, cons33, cons168, cons1632) rule4433 = ReplacementRule(pattern4433, replacement4433) pattern4434 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons96, cons1327) rule4434 = ReplacementRule(pattern4434, replacement4434) pattern4435 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons96, cons1327) rule4435 = ReplacementRule(pattern4435, replacement4435) pattern4436 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons96, cons167) rule4436 = ReplacementRule(pattern4436, replacement4436) pattern4437 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons96, cons167) rule4437 = ReplacementRule(pattern4437, replacement4437) pattern4438 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1269, cons33, cons96, cons1633) rule4438 = ReplacementRule(pattern4438, replacement4438) pattern4439 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1269, cons33, cons96, cons1633) rule4439 = ReplacementRule(pattern4439, replacement4439) pattern4440 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons1258, cons90) rule4440 = ReplacementRule(pattern4440, replacement4440) pattern4441 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons1258, cons90) rule4441 = ReplacementRule(pattern4441, replacement4441) pattern4442 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons1258, cons1588) rule4442 = ReplacementRule(pattern4442, replacement4442) pattern4443 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269, cons95, cons1258, cons1588) rule4443 = ReplacementRule(pattern4443, replacement4443) pattern4444 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1269, cons89, cons167, cons1361, cons1634) rule4444 = ReplacementRule(pattern4444, replacement4444) pattern4445 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1269, cons89, cons167, cons1361, cons1634) rule4445 = ReplacementRule(pattern4445, replacement4445) pattern4446 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1269, cons89, cons1588) rule4446 = ReplacementRule(pattern4446, replacement4446) pattern4447 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons1247, cons1269, cons89, cons1588) rule4447 = ReplacementRule(pattern4447, replacement4447) pattern4448 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269) rule4448 = ReplacementRule(pattern4448, replacement4448) pattern4449 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269) rule4449 = ReplacementRule(pattern4449, replacement4449) pattern4450 = Pattern(Integral(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269) rule4450 = ReplacementRule(pattern4450, replacement4450) pattern4451 = Pattern(Integral(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269) rule4451 = ReplacementRule(pattern4451, replacement4451) pattern4452 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269) rule4452 = ReplacementRule(pattern4452, replacement4452) pattern4453 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons1247, cons1269) rule4453 = ReplacementRule(pattern4453, replacement4453) pattern4454 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1269) rule4454 = ReplacementRule(pattern4454, replacement4454) pattern4455 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons4, cons1247, cons1269) rule4455 = ReplacementRule(pattern4455, replacement4455) pattern4456 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons1247, cons1269) rule4456 = ReplacementRule(pattern4456, replacement4456) pattern4457 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_, x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons19, cons4, cons1247, cons1269) rule4457 = ReplacementRule(pattern4457, replacement4457) pattern4458 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons5, cons72, cons1267, cons377) rule4458 = ReplacementRule(pattern4458, replacement4458) pattern4459 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(c_ + WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons4, cons5, cons72, cons1267, cons377) rule4459 = ReplacementRule(pattern4459, replacement4459) pattern4460 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons35) rule4460 = ReplacementRule(pattern4460, replacement4460) pattern4461 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons35) rule4461 = ReplacementRule(pattern4461, replacement4461) pattern4462 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1435) rule4462 = ReplacementRule(pattern4462, replacement4462) pattern4463 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1435) rule4463 = ReplacementRule(pattern4463, replacement4463) pattern4464 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons1635) rule4464 = ReplacementRule(pattern4464, replacement4464) pattern4465 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons1635) rule4465 = ReplacementRule(pattern4465, replacement4465) pattern4466 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons1636, cons33, cons34) rule4466 = ReplacementRule(pattern4466, replacement4466) pattern4467 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons1636, cons33, cons34) rule4467 = ReplacementRule(pattern4467, replacement4467) pattern4468 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons1636, cons1551) rule4468 = ReplacementRule(pattern4468, replacement4468) pattern4469 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons1636, cons1551) rule4469 = ReplacementRule(pattern4469, replacement4469) pattern4470 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons37, cons38, cons19, cons1433) rule4470 = ReplacementRule(pattern4470, replacement4470) pattern4471 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons37, cons38, cons19, cons1433) rule4471 = ReplacementRule(pattern4471, replacement4471) pattern4472 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1637) rule4472 = ReplacementRule(pattern4472, replacement4472) pattern4473 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(A_ + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1637) rule4473 = ReplacementRule(pattern4473, replacement4473) pattern4474 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1638) rule4474 = ReplacementRule(pattern4474, replacement4474) pattern4475 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1638) rule4475 = ReplacementRule(pattern4475, replacement4475) pattern4476 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1639) rule4476 = ReplacementRule(pattern4476, replacement4476) pattern4477 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1639) rule4477 = ReplacementRule(pattern4477, replacement4477) pattern4478 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1638) rule4478 = ReplacementRule(pattern4478, replacement4478) pattern4479 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1638) rule4479 = ReplacementRule(pattern4479, replacement4479) pattern4480 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1639) rule4480 = ReplacementRule(pattern4480, replacement4480) pattern4481 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1639) rule4481 = ReplacementRule(pattern4481, replacement4481) pattern4482 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1267, cons33, cons1322) rule4482 = ReplacementRule(pattern4482, replacement4482) pattern4483 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1267, cons33, cons1322) rule4483 = ReplacementRule(pattern4483, replacement4483) pattern4484 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1267, cons33, cons1322) rule4484 = ReplacementRule(pattern4484, replacement4484) pattern4485 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1267, cons33, cons1322) rule4485 = ReplacementRule(pattern4485, replacement4485) pattern4486 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1267, cons1323) rule4486 = ReplacementRule(pattern4486, replacement4486) pattern4487 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1267, cons1323) rule4487 = ReplacementRule(pattern4487, replacement4487) pattern4488 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1267, cons1323) rule4488 = ReplacementRule(pattern4488, replacement4488) pattern4489 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1267, cons1323) rule4489 = ReplacementRule(pattern4489, replacement4489) pattern4490 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1269, cons1640) rule4490 = ReplacementRule(pattern4490, replacement4490) pattern4491 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1269, cons1640) rule4491 = ReplacementRule(pattern4491, replacement4491) pattern4492 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1269, cons1640) rule4492 = ReplacementRule(pattern4492, replacement4492) pattern4493 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1269, cons1640) rule4493 = ReplacementRule(pattern4493, replacement4493) pattern4494 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1269) rule4494 = ReplacementRule(pattern4494, replacement4494) pattern4495 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1269) rule4495 = ReplacementRule(pattern4495, replacement4495) pattern4496 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1269) rule4496 = ReplacementRule(pattern4496, replacement4496) pattern4497 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1269) rule4497 = ReplacementRule(pattern4497, replacement4497) pattern4498 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1269, cons517, cons96) rule4498 = ReplacementRule(pattern4498, replacement4498) pattern4499 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1269, cons33, cons96) rule4499 = ReplacementRule(pattern4499, replacement4499) pattern4500 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1269, cons517, cons96) rule4500 = ReplacementRule(pattern4500, replacement4500) pattern4501 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1269, cons517, cons96) rule4501 = ReplacementRule(pattern4501, replacement4501) pattern4502 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1269, cons79) rule4502 = ReplacementRule(pattern4502, replacement4502) pattern4503 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1269, cons79) rule4503 = ReplacementRule(pattern4503, replacement4503) pattern4504 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1269, cons79) rule4504 = ReplacementRule(pattern4504, replacement4504) pattern4505 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1269, cons79) rule4505 = ReplacementRule(pattern4505, replacement4505) pattern4506 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons21) rule4506 = ReplacementRule(pattern4506, replacement4506) pattern4507 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons21) rule4507 = ReplacementRule(pattern4507, replacement4507) pattern4508 = Pattern(Integral((WC('b', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons21) rule4508 = ReplacementRule(pattern4508, replacement4508) pattern4509 = Pattern(Integral((WC('b', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons3, cons50, cons127, cons36, cons38, cons19, cons21) rule4509 = ReplacementRule(pattern4509, replacement4509) pattern4510 = Pattern(Integral(((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('a', S(1)))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons5, cons21) rule4510 = ReplacementRule(pattern4510, replacement4510) pattern4511 = Pattern(Integral(((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('a', S(1)))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons5, cons21) rule4511 = ReplacementRule(pattern4511, replacement4511) pattern4512 = Pattern(Integral(((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('a', S(1)))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons5, cons21) rule4512 = ReplacementRule(pattern4512, replacement4512) pattern4513 = Pattern(Integral(((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('a', S(1)))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons5, cons21) rule4513 = ReplacementRule(pattern4513, replacement4513) pattern4514 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons89, cons91) rule4514 = ReplacementRule(pattern4514, replacement4514) pattern4515 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons89, cons91) rule4515 = ReplacementRule(pattern4515, replacement4515) pattern4516 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons89, cons91) rule4516 = ReplacementRule(pattern4516, replacement4516) pattern4517 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons89, cons91) rule4517 = ReplacementRule(pattern4517, replacement4517) pattern4518 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons348) rule4518 = ReplacementRule(pattern4518, replacement4518) pattern4519 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons348) rule4519 = ReplacementRule(pattern4519, replacement4519) pattern4520 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons348) rule4520 = ReplacementRule(pattern4520, replacement4520) pattern4521 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons348) rule4521 = ReplacementRule(pattern4521, replacement4521) pattern4522 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons33, cons96, cons1267) rule4522 = ReplacementRule(pattern4522, replacement4522) pattern4523 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons33, cons96, cons1267) rule4523 = ReplacementRule(pattern4523, replacement4523) pattern4524 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons33, cons96, cons1267) rule4524 = ReplacementRule(pattern4524, replacement4524) pattern4525 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons33, cons96, cons1267) rule4525 = ReplacementRule(pattern4525, replacement4525) pattern4526 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons33, cons96, cons1269) rule4526 = ReplacementRule(pattern4526, replacement4526) pattern4527 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons33, cons96, cons1269) rule4527 = ReplacementRule(pattern4527, replacement4527) pattern4528 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons33, cons96, cons1269) rule4528 = ReplacementRule(pattern4528, replacement4528) pattern4529 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons33, cons96, cons1269) rule4529 = ReplacementRule(pattern4529, replacement4529) pattern4530 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons274) rule4530 = ReplacementRule(pattern4530, replacement4530) pattern4531 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons274) rule4531 = ReplacementRule(pattern4531, replacement4531) pattern4532 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons274) rule4532 = ReplacementRule(pattern4532, replacement4532) pattern4533 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons274) rule4533 = ReplacementRule(pattern4533, replacement4533) pattern4534 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons1267, cons33, cons1322) rule4534 = ReplacementRule(pattern4534, replacement4534) pattern4535 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons1267, cons33, cons1322) rule4535 = ReplacementRule(pattern4535, replacement4535) pattern4536 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons1267, cons33, cons1322) rule4536 = ReplacementRule(pattern4536, replacement4536) pattern4537 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons1267, cons33, cons1322) rule4537 = ReplacementRule(pattern4537, replacement4537) pattern4538 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons1267, cons1323, cons1641) rule4538 = ReplacementRule(pattern4538, replacement4538) pattern4539 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons1267, cons1323, cons1641) rule4539 = ReplacementRule(pattern4539, replacement4539) pattern4540 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons1267, cons1323, cons1641) rule4540 = ReplacementRule(pattern4540, replacement4540) pattern4541 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons1267, cons1323, cons1641) rule4541 = ReplacementRule(pattern4541, replacement4541) pattern4542 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons1267, cons1323, cons1642, cons685) rule4542 = ReplacementRule(pattern4542, replacement4542) pattern4543 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons1267, cons1323, cons1642, cons685) rule4543 = ReplacementRule(pattern4543, replacement4543) pattern4544 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons1267, cons1323, cons1642, cons685) rule4544 = ReplacementRule(pattern4544, replacement4544) pattern4545 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons1267, cons1323, cons1642, cons685) rule4545 = ReplacementRule(pattern4545, replacement4545) pattern4546 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1269, cons33, cons96) rule4546 = ReplacementRule(pattern4546, replacement4546) pattern4547 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons1269, cons33, cons96) rule4547 = ReplacementRule(pattern4547, replacement4547) pattern4548 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1269, cons33, cons96) rule4548 = ReplacementRule(pattern4548, replacement4548) pattern4549 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons1269, cons33, cons96) rule4549 = ReplacementRule(pattern4549, replacement4549) pattern4550 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1269, cons274) rule4550 = ReplacementRule(pattern4550, replacement4550) pattern4551 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons37, cons38, cons19, cons1269, cons274) rule4551 = ReplacementRule(pattern4551, replacement4551) pattern4552 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1269, cons274) rule4552 = ReplacementRule(pattern4552, replacement4552) pattern4553 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons2, cons3, cons50, cons127, cons36, cons38, cons19, cons1269, cons274) rule4553 = ReplacementRule(pattern4553, replacement4553) pattern4554 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269, cons95, cons170, cons1588) rule4554 = ReplacementRule(pattern4554, replacement4554) pattern4555 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269, cons95, cons170, cons1588) rule4555 = ReplacementRule(pattern4555, replacement4555) pattern4556 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269, cons95, cons170, cons1588) rule4556 = ReplacementRule(pattern4556, replacement4556) pattern4557 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269, cons95, cons170, cons1588) rule4557 = ReplacementRule(pattern4557, replacement4557) pattern4558 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons1269, cons33, cons170, cons1571) rule4558 = ReplacementRule(pattern4558, replacement4558) pattern4559 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons1269, cons33, cons170, cons1571) rule4559 = ReplacementRule(pattern4559, replacement4559) pattern4560 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons1269, cons33, cons170, cons1571) rule4560 = ReplacementRule(pattern4560, replacement4560) pattern4561 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons1269, cons33, cons170, cons1571) rule4561 = ReplacementRule(pattern4561, replacement4561) pattern4562 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269, cons95, cons96, cons90) rule4562 = ReplacementRule(pattern4562, replacement4562) pattern4563 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269, cons95, cons96, cons90) rule4563 = ReplacementRule(pattern4563, replacement4563) pattern4564 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269, cons95, cons96, cons90) rule4564 = ReplacementRule(pattern4564, replacement4564) pattern4565 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269, cons95, cons96, cons90) rule4565 = ReplacementRule(pattern4565, replacement4565) pattern4566 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons1269, cons33, cons96, cons1633) rule4566 = ReplacementRule(pattern4566, replacement4566) pattern4567 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons1269, cons33, cons96, cons1633) rule4567 = ReplacementRule(pattern4567, replacement4567) pattern4568 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons1269, cons33, cons96, cons1633) rule4568 = ReplacementRule(pattern4568, replacement4568) pattern4569 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons1269, cons33, cons96, cons1633) rule4569 = ReplacementRule(pattern4569, replacement4569) pattern4570 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons1269, cons89, cons90) rule4570 = ReplacementRule(pattern4570, replacement4570) pattern4571 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons1269, cons89, cons90) rule4571 = ReplacementRule(pattern4571, replacement4571) pattern4572 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons1269, cons89, cons90) rule4572 = ReplacementRule(pattern4572, replacement4572) pattern4573 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons1269, cons89, cons90) rule4573 = ReplacementRule(pattern4573, replacement4573) pattern4574 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons1269, cons89, cons1588) rule4574 = ReplacementRule(pattern4574, replacement4574) pattern4575 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons1269, cons89, cons1588) rule4575 = ReplacementRule(pattern4575, replacement4575) pattern4576 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons1269, cons89, cons1588) rule4576 = ReplacementRule(pattern4576, replacement4576) pattern4577 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**m_*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons1269, cons89, cons1588) rule4577 = ReplacementRule(pattern4577, replacement4577) pattern4578 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269) rule4578 = ReplacementRule(pattern4578, replacement4578) pattern4579 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269) rule4579 = ReplacementRule(pattern4579, replacement4579) pattern4580 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269) rule4580 = ReplacementRule(pattern4580, replacement4580) pattern4581 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269) rule4581 = ReplacementRule(pattern4581, replacement4581) pattern4582 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269) rule4582 = ReplacementRule(pattern4582, replacement4582) pattern4583 = Pattern(Integral((WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons1269) rule4583 = ReplacementRule(pattern4583, replacement4583) pattern4584 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269) rule4584 = ReplacementRule(pattern4584, replacement4584) pattern4585 = Pattern(Integral((WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2))/(sqrt(WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))*sqrt(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons1269) rule4585 = ReplacementRule(pattern4585, replacement4585) pattern4586 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons1643) rule4586 = ReplacementRule(pattern4586, replacement4586) pattern4587 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons1643) rule4587 = ReplacementRule(pattern4587, replacement4587) pattern4588 = Pattern(Integral((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons1644) rule4588 = ReplacementRule(pattern4588, replacement4588) pattern4589 = Pattern(Integral((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons1644) rule4589 = ReplacementRule(pattern4589, replacement4589) pattern4590 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons25, cons20) rule4590 = ReplacementRule(pattern4590, replacement4590) pattern4591 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons37, cons38, cons4, cons25, cons20) rule4591 = ReplacementRule(pattern4591, replacement4591) pattern4592 = Pattern(Integral((WC('d', S(1))*cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons25, cons20) rule4592 = ReplacementRule(pattern4592, replacement4592) pattern4593 = Pattern(Integral((WC('d', S(1))*sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons29, cons50, cons127, cons36, cons38, cons4, cons25, cons20) rule4593 = ReplacementRule(pattern4593, replacement4593) pattern4594 = Pattern(Integral(((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons25) rule4594 = ReplacementRule(pattern4594, replacement4594) pattern4595 = Pattern(Integral(((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons38, cons19, cons4, cons5, cons25) rule4595 = ReplacementRule(pattern4595, replacement4595) pattern4596 = Pattern(Integral(((WC('d', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons5, cons25) rule4596 = ReplacementRule(pattern4596, replacement4596) pattern4597 = Pattern(Integral(((WC('d', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**p_*WC('c', S(1)))**n_*(a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('m', S(1))*(WC('A', S(0)) + WC('C', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons38, cons19, cons4, cons5, cons25) rule4597 = ReplacementRule(pattern4597, replacement4597) pattern4598 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**n_, x_), cons3, cons8, cons29, cons4, cons1645) rule4598 = ReplacementRule(pattern4598, replacement4598) pattern4599 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**n_, x_), cons3, cons8, cons29, cons4, cons1645) rule4599 = ReplacementRule(pattern4599, replacement4599) pattern4600 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1456) rule4600 = ReplacementRule(pattern4600, replacement4600) pattern4601 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1456) rule4601 = ReplacementRule(pattern4601, replacement4601) pattern4602 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons1480) rule4602 = ReplacementRule(pattern4602, replacement4602) pattern4603 = Pattern(Integral(S(1)/(a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons1480) rule4603 = ReplacementRule(pattern4603, replacement4603) pattern4604 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1480, cons56) rule4604 = ReplacementRule(pattern4604, replacement4604) pattern4605 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons1480, cons56) rule4605 = ReplacementRule(pattern4605, replacement4605) pattern4606 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*sin(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons5, cons1482, cons1481) rule4606 = ReplacementRule(pattern4606, With4606) pattern4607 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*cos(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons5, cons1482, cons1481) rule4607 = ReplacementRule(pattern4607, With4607) pattern4608 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1483, cons378) rule4608 = ReplacementRule(pattern4608, With4608) pattern4609 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1483, cons378) rule4609 = ReplacementRule(pattern4609, With4609) pattern4610 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*(S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons5, cons1482, cons1481) rule4610 = ReplacementRule(pattern4610, With4610) pattern4611 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*(S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**m_, x_), cons2, cons3, cons8, cons29, cons5, cons1482, cons1481) rule4611 = ReplacementRule(pattern4611, With4611) pattern4612 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*(S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1483, cons1481, cons40) rule4612 = ReplacementRule(pattern4612, With4612) pattern4613 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*(S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1483, cons1481, cons40) rule4613 = ReplacementRule(pattern4613, With4613) pattern4614 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*(S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons377) rule4614 = ReplacementRule(pattern4614, replacement4614) pattern4615 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**p_*(S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons377) rule4615 = ReplacementRule(pattern4615, replacement4615) pattern4616 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1483, cons87, cons40) rule4616 = ReplacementRule(pattern4616, With4616) pattern4617 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1483, cons87, cons40) rule4617 = ReplacementRule(pattern4617, With4617) pattern4618 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1482, cons1481) rule4618 = ReplacementRule(pattern4618, With4618) pattern4619 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**n_*WC('b', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons1482, cons1481) rule4619 = ReplacementRule(pattern4619, With4619) pattern4620 = Pattern(Integral(((S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons47, cons40) rule4620 = ReplacementRule(pattern4620, replacement4620) pattern4621 = Pattern(Integral(((S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons47, cons40) rule4621 = ReplacementRule(pattern4621, replacement4621) pattern4622 = Pattern(Integral(((S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons48, cons47, cons149) rule4622 = ReplacementRule(pattern4622, replacement4622) pattern4623 = Pattern(Integral(((S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons48, cons47, cons149) rule4623 = ReplacementRule(pattern4623, replacement4623) pattern4624 = Pattern(Integral(S(1)/((S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228) rule4624 = ReplacementRule(pattern4624, With4624) pattern4625 = Pattern(Integral(S(1)/((S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons228) rule4625 = ReplacementRule(pattern4625, With4625) pattern4626 = Pattern(Integral(((S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**n2_*WC('c', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1483, cons378) rule4626 = ReplacementRule(pattern4626, With4626) pattern4627 = Pattern(Integral(((S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**n2_*WC('c', S(1)) + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1483, cons378) rule4627 = ReplacementRule(pattern4627, With4627) pattern4628 = Pattern(Integral(((S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**n2_*WC('c', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons48, cons1482, cons1481) rule4628 = ReplacementRule(pattern4628, With4628) pattern4629 = Pattern(Integral(((S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**n2_*WC('c', S(1)) + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons48, cons1482, cons1481) rule4629 = ReplacementRule(pattern4629, With4629) pattern4630 = Pattern(Integral(((S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons47, cons40) rule4630 = ReplacementRule(pattern4630, replacement4630) pattern4631 = Pattern(Integral(((S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons48, cons47, cons40) rule4631 = ReplacementRule(pattern4631, replacement4631) pattern4632 = Pattern(Integral(((S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons47, cons149) rule4632 = ReplacementRule(pattern4632, replacement4632) pattern4633 = Pattern(Integral(((S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons47, cons149) rule4633 = ReplacementRule(pattern4633, replacement4633) pattern4634 = Pattern(Integral(((S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons377) rule4634 = ReplacementRule(pattern4634, replacement4634) pattern4635 = Pattern(Integral(((S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**p_*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons377) rule4635 = ReplacementRule(pattern4635, replacement4635) pattern4636 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons1483, cons87, cons40) rule4636 = ReplacementRule(pattern4636, With4636) pattern4637 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons48, cons1483, cons87, cons40) rule4637 = ReplacementRule(pattern4637, With4637) pattern4638 = Pattern(Integral((a_ + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons1481) rule4638 = ReplacementRule(pattern4638, With4638) pattern4639 = Pattern(Integral((a_ + (S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_*WC('b', S(1)) + (S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons48, cons1482, cons1481) rule4639 = ReplacementRule(pattern4639, With4639) pattern4640 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons87) rule4640 = ReplacementRule(pattern4640, replacement4640) pattern4641 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons87) rule4641 = ReplacementRule(pattern4641, replacement4641) pattern4642 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons25) rule4642 = ReplacementRule(pattern4642, replacement4642) pattern4643 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))))*(a_ + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons47, cons25) rule4643 = ReplacementRule(pattern4643, replacement4643) pattern4644 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228) rule4644 = ReplacementRule(pattern4644, With4644) pattern4645 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))))/(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228) rule4645 = ReplacementRule(pattern4645, With4645) pattern4646 = Pattern(Integral((A_ + WC('B', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228, cons87) rule4646 = ReplacementRule(pattern4646, replacement4646) pattern4647 = Pattern(Integral((A_ + WC('B', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))))*(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0))) + WC('c', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons228, cons87) rule4647 = ReplacementRule(pattern4647, replacement4647) pattern4648 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons64) rule4648 = ReplacementRule(pattern4648, replacement4648) pattern4649 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons8, cons29, cons50, cons127, cons64) rule4649 = ReplacementRule(pattern4649, replacement4649) pattern4650 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons8, cons29, cons50, cons127, cons33, cons170) rule4650 = ReplacementRule(pattern4650, replacement4650) pattern4651 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0)))**S(2), x_), cons8, cons29, cons50, cons127, cons33, cons170) rule4651 = ReplacementRule(pattern4651, replacement4651) pattern4652 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons167, cons1646) rule4652 = ReplacementRule(pattern4652, replacement4652) pattern4653 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons167, cons1646) rule4653 = ReplacementRule(pattern4653, replacement4653) pattern4654 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons1646, cons168) rule4654 = ReplacementRule(pattern4654, replacement4654) pattern4655 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons167, cons1646, cons168) rule4655 = ReplacementRule(pattern4655, replacement4655) pattern4656 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons91) rule4656 = ReplacementRule(pattern4656, replacement4656) pattern4657 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons3, cons8, cons29, cons50, cons127, cons89, cons91) rule4657 = ReplacementRule(pattern4657, replacement4657) pattern4658 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons91, cons168) rule4658 = ReplacementRule(pattern4658, replacement4658) pattern4659 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**m_, x_), cons3, cons8, cons29, cons50, cons127, cons95, cons91, cons168) rule4659 = ReplacementRule(pattern4659, replacement4659) pattern4660 = Pattern(Integral((WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons25) rule4660 = ReplacementRule(pattern4660, replacement4660) pattern4661 = Pattern(Integral((WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**n_*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons25) rule4661 = ReplacementRule(pattern4661, replacement4661) pattern4662 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons530) rule4662 = ReplacementRule(pattern4662, replacement4662) pattern4663 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons530) rule4663 = ReplacementRule(pattern4663, replacement4663) pattern4664 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons198, cons64) rule4664 = ReplacementRule(pattern4664, replacement4664) pattern4665 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1))*(x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons198, cons64) rule4665 = ReplacementRule(pattern4665, replacement4665) pattern4666 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule4666 = ReplacementRule(pattern4666, replacement4666) pattern4667 = Pattern(Integral(u_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(v_))**WC('n', S(1)), x_), cons2, cons3, cons19, cons4, cons812, cons813) rule4667 = ReplacementRule(pattern4667, replacement4667) pattern4668 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule4668 = ReplacementRule(pattern4668, replacement4668) pattern4669 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(x_*WC('f', S(1)) + WC('e', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule4669 = ReplacementRule(pattern4669, replacement4669) pattern4670 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1575, cons40) rule4670 = ReplacementRule(pattern4670, replacement4670) pattern4671 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons1575, cons40) rule4671 = ReplacementRule(pattern4671, replacement4671) pattern4672 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule4672 = ReplacementRule(pattern4672, replacement4672) pattern4673 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1497) rule4673 = ReplacementRule(pattern4673, replacement4673) pattern4674 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cos(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71) rule4674 = ReplacementRule(pattern4674, replacement4674) pattern4675 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sin(u_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons70, cons71) rule4675 = ReplacementRule(pattern4675, replacement4675) pattern4676 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/cos(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule4676 = ReplacementRule(pattern4676, replacement4676) pattern4677 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/sin(u_))**WC('p', S(1)), x_), cons2, cons3, cons5, cons825, cons826) rule4677 = ReplacementRule(pattern4677, replacement4677) pattern4678 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1576, cons40) rule4678 = ReplacementRule(pattern4678, replacement4678) pattern4679 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1576, cons40) rule4679 = ReplacementRule(pattern4679, replacement4679) pattern4680 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1578) rule4680 = ReplacementRule(pattern4680, replacement4680) pattern4681 = Pattern(Integral(x_**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons1578) rule4681 = ReplacementRule(pattern4681, replacement4681) pattern4682 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule4682 = ReplacementRule(pattern4682, replacement4682) pattern4683 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(x_**n_*WC('d', S(1)) + WC('c', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons1499) rule4683 = ReplacementRule(pattern4683, replacement4683) pattern4684 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/cos(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule4684 = ReplacementRule(pattern4684, replacement4684) pattern4685 = Pattern(Integral((e_*x_)**WC('m', S(1))*(WC('a', S(0)) + WC('b', S(1))/sin(u_))**WC('p', S(1)), x_), cons2, cons3, cons50, cons19, cons5, cons825, cons826) rule4685 = ReplacementRule(pattern4685, replacement4685) pattern4686 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cos(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**p_*sin(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons5, cons33, cons87, cons1579, cons1647) rule4686 = ReplacementRule(pattern4686, replacement4686) pattern4687 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sin(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))))**p_*cos(x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons5, cons33, cons87, cons1579, cons1647) rule4687 = ReplacementRule(pattern4687, replacement4687) return [rule3920, rule3921, rule3922, rule3923, rule3924, rule3925, rule3926, rule3927, rule3928, rule3929, rule3930, rule3931, rule3932, rule3933, rule3934, rule3935, rule3936, rule3937, rule3938, rule3939, rule3940, rule3941, rule3942, rule3943, rule3944, rule3945, rule3946, rule3947, rule3948, rule3949, rule3950, rule3951, rule3952, rule3953, rule3954, rule3955, rule3956, rule3957, rule3958, rule3959, rule3960, rule3961, rule3962, rule3963, rule3964, rule3965, rule3966, rule3967, rule3968, rule3969, rule3970, rule3971, rule3972, rule3973, rule3974, rule3975, rule3976, rule3977, rule3978, rule3979, rule3980, rule3981, rule3982, rule3983, rule3984, rule3985, rule3986, rule3987, rule3988, rule3989, rule3990, rule3991, rule3992, rule3993, rule3994, rule3995, rule3996, rule3997, rule3998, rule3999, rule4000, rule4001, rule4002, rule4003, rule4004, rule4005, rule4006, rule4007, rule4008, rule4009, rule4010, rule4011, rule4012, rule4013, rule4014, rule4015, rule4016, rule4017, rule4018, rule4019, rule4020, rule4021, rule4022, rule4023, rule4024, rule4025, rule4026, rule4027, rule4028, rule4029, rule4030, rule4031, rule4032, rule4033, rule4034, rule4035, rule4036, rule4037, rule4038, rule4039, rule4040, rule4041, rule4042, rule4043, rule4044, rule4045, rule4046, rule4047, rule4048, rule4049, rule4050, rule4051, rule4052, rule4053, rule4054, rule4055, rule4056, rule4057, rule4058, rule4059, rule4060, rule4061, rule4062, rule4063, rule4064, rule4065, rule4066, rule4067, rule4068, rule4069, rule4070, rule4071, rule4072, rule4073, rule4074, rule4075, rule4076, rule4077, rule4078, rule4079, rule4080, rule4081, rule4082, rule4083, rule4084, rule4085, rule4086, rule4087, rule4088, rule4089, rule4090, rule4091, rule4092, rule4093, rule4094, rule4095, rule4096, rule4097, rule4098, rule4099, rule4100, rule4101, rule4102, rule4103, rule4104, rule4105, rule4106, rule4107, rule4108, rule4109, rule4110, rule4111, rule4112, rule4113, rule4114, rule4115, rule4116, rule4117, rule4118, rule4119, rule4120, rule4121, rule4122, rule4123, rule4124, rule4125, rule4126, rule4127, rule4128, rule4129, rule4130, rule4131, rule4132, rule4133, rule4134, rule4135, rule4136, rule4137, rule4138, rule4139, rule4140, rule4141, rule4142, rule4143, rule4144, rule4145, rule4146, rule4147, rule4148, rule4149, rule4150, rule4151, rule4152, rule4153, rule4154, rule4155, rule4156, rule4157, rule4158, rule4159, rule4160, rule4161, rule4162, rule4163, rule4164, rule4165, rule4166, rule4167, rule4168, rule4169, rule4170, rule4171, rule4172, rule4173, rule4174, rule4175, rule4176, rule4177, rule4178, rule4179, rule4180, rule4181, rule4182, rule4183, rule4184, rule4185, rule4186, rule4187, rule4188, rule4189, rule4190, rule4191, rule4192, rule4193, rule4194, rule4195, rule4196, rule4197, rule4198, rule4199, rule4200, rule4201, rule4202, rule4203, rule4204, rule4205, rule4206, rule4207, rule4208, rule4209, rule4210, rule4211, rule4212, rule4213, rule4214, rule4215, rule4216, rule4217, rule4218, rule4219, rule4220, rule4221, rule4222, rule4223, rule4224, rule4225, rule4226, rule4227, rule4228, rule4229, rule4230, rule4231, rule4232, rule4233, rule4234, rule4235, rule4236, rule4237, rule4238, rule4239, rule4240, rule4241, rule4242, rule4243, rule4244, rule4245, rule4246, rule4247, rule4248, rule4249, rule4250, rule4251, rule4252, rule4253, rule4254, rule4255, rule4256, rule4257, rule4258, rule4259, rule4260, rule4261, rule4262, rule4263, rule4264, rule4265, rule4266, rule4267, rule4268, rule4269, rule4270, rule4271, rule4272, rule4273, rule4274, rule4275, rule4276, rule4277, rule4278, rule4279, rule4280, rule4281, rule4282, rule4283, rule4284, rule4285, rule4286, rule4287, rule4288, rule4289, rule4290, rule4291, rule4292, rule4293, rule4294, rule4295, rule4296, rule4297, rule4298, rule4299, rule4300, rule4301, rule4302, rule4303, rule4304, rule4305, rule4306, rule4307, rule4308, rule4309, rule4310, rule4311, rule4312, rule4313, rule4314, rule4315, rule4316, rule4317, rule4318, rule4319, rule4320, rule4321, rule4322, rule4323, rule4324, rule4325, rule4326, rule4327, rule4328, rule4329, rule4330, rule4331, rule4332, rule4333, rule4334, rule4335, rule4336, rule4337, rule4338, rule4339, rule4340, rule4341, rule4342, rule4343, rule4344, rule4345, rule4346, rule4347, rule4348, rule4349, rule4350, rule4351, rule4352, rule4353, rule4354, rule4355, rule4356, rule4357, rule4358, rule4359, rule4360, rule4361, rule4362, rule4363, rule4364, rule4365, rule4366, rule4367, rule4368, rule4369, rule4370, rule4371, rule4372, rule4373, rule4374, rule4375, rule4376, rule4377, rule4378, rule4379, rule4380, rule4381, rule4382, rule4383, rule4384, rule4385, rule4386, rule4387, rule4388, rule4389, rule4390, rule4391, rule4392, rule4393, rule4394, rule4395, rule4396, rule4397, rule4398, rule4399, rule4400, rule4401, rule4402, rule4403, rule4404, rule4405, rule4406, rule4407, rule4408, rule4409, rule4410, rule4411, rule4412, rule4413, rule4414, rule4415, rule4416, rule4417, rule4418, rule4419, rule4420, rule4421, rule4422, rule4423, rule4424, rule4425, rule4426, rule4427, rule4428, rule4429, rule4430, rule4431, rule4432, rule4433, rule4434, rule4435, rule4436, rule4437, rule4438, rule4439, rule4440, rule4441, rule4442, rule4443, rule4444, rule4445, rule4446, rule4447, rule4448, rule4449, rule4450, rule4451, rule4452, rule4453, rule4454, rule4455, rule4456, rule4457, rule4458, rule4459, rule4460, rule4461, rule4462, rule4463, rule4464, rule4465, rule4466, rule4467, rule4468, rule4469, rule4470, rule4471, rule4472, rule4473, rule4474, rule4475, rule4476, rule4477, rule4478, rule4479, rule4480, rule4481, rule4482, rule4483, rule4484, rule4485, rule4486, rule4487, rule4488, rule4489, rule4490, rule4491, rule4492, rule4493, rule4494, rule4495, rule4496, rule4497, rule4498, rule4499, rule4500, rule4501, rule4502, rule4503, rule4504, rule4505, rule4506, rule4507, rule4508, rule4509, rule4510, rule4511, rule4512, rule4513, rule4514, rule4515, rule4516, rule4517, rule4518, rule4519, rule4520, rule4521, rule4522, rule4523, rule4524, rule4525, rule4526, rule4527, rule4528, rule4529, rule4530, rule4531, rule4532, rule4533, rule4534, rule4535, rule4536, rule4537, rule4538, rule4539, rule4540, rule4541, rule4542, rule4543, rule4544, rule4545, rule4546, rule4547, rule4548, rule4549, rule4550, rule4551, rule4552, rule4553, rule4554, rule4555, rule4556, rule4557, rule4558, rule4559, rule4560, rule4561, rule4562, rule4563, rule4564, rule4565, rule4566, rule4567, rule4568, rule4569, rule4570, rule4571, rule4572, rule4573, rule4574, rule4575, rule4576, rule4577, rule4578, rule4579, rule4580, rule4581, rule4582, rule4583, rule4584, rule4585, rule4586, rule4587, rule4588, rule4589, rule4590, rule4591, rule4592, rule4593, rule4594, rule4595, rule4596, rule4597, rule4598, rule4599, rule4600, rule4601, rule4602, rule4603, rule4604, rule4605, rule4606, rule4607, rule4608, rule4609, rule4610, rule4611, rule4612, rule4613, rule4614, rule4615, rule4616, rule4617, rule4618, rule4619, rule4620, rule4621, rule4622, rule4623, rule4624, rule4625, rule4626, rule4627, rule4628, rule4629, rule4630, rule4631, rule4632, rule4633, rule4634, rule4635, rule4636, rule4637, rule4638, rule4639, rule4640, rule4641, rule4642, rule4643, rule4644, rule4645, rule4646, rule4647, rule4648, rule4649, rule4650, rule4651, rule4652, rule4653, rule4654, rule4655, rule4656, rule4657, rule4658, rule4659, rule4660, rule4661, rule4662, rule4663, rule4664, rule4665, rule4666, rule4667, rule4668, rule4669, rule4670, rule4671, rule4672, rule4673, rule4674, rule4675, rule4676, rule4677, rule4678, rule4679, rule4680, rule4681, rule4682, rule4683, rule4684, rule4685, rule4686, rule4687, ] def replacement3920(a, b, e, f, m, n, x): return Simp(a*b*(a/sin(e + f*x))**(m + S(-1))*(b/cos(e + f*x))**(n + S(-1))/(f*(n + S(-1))), x) def replacement3921(e, f, m, n, x): return Dist(S(1)/f, Subst(Int(x**(-m)*(x**S(2) + S(1))**(m/S(2) + n/S(2) + S(-1)), x), x, tan(e + f*x)), x) def replacement3922(a, e, f, m, n, x): return -Dist(a**(S(1) - n)/f, Subst(Int((a*x)**(m + n + S(-1))*(x**S(2) + S(-1))**(-n/S(2) + S(-1)/2), x), x, S(1)/sin(e + f*x)), x) def replacement3923(a, e, f, m, n, x): return Dist(a**(S(1) - n)/f, Subst(Int((a*x)**(m + n + S(-1))*(x**S(2) + S(-1))**(-n/S(2) + S(-1)/2), x), x, S(1)/cos(e + f*x)), x) def replacement3924(a, b, e, f, m, n, x): return Dist(a**S(2)*(n + S(1))/(b**S(2)*(m + S(-1))), Int((a/sin(e + f*x))**(m + S(-2))*(b/cos(e + f*x))**(n + S(2)), x), x) - Simp(a*(a/sin(e + f*x))**(m + S(-1))*(b/cos(e + f*x))**(n + S(1))/(b*f*(m + S(-1))), x) def replacement3925(a, b, e, f, m, n, x): return Dist(b**S(2)*(m + S(1))/(a**S(2)*(n + S(-1))), Int((a/sin(e + f*x))**(m + S(2))*(b/cos(e + f*x))**(n + S(-2)), x), x) + Simp(b*(a/sin(e + f*x))**(m + S(1))*(b/cos(e + f*x))**(n + S(-1))/(a*f*(n + S(-1))), x) def replacement3926(a, b, e, f, m, n, x): return Dist(a**S(2)*(m + n + S(-2))/(m + S(-1)), Int((a/sin(e + f*x))**(m + S(-2))*(b/cos(e + f*x))**n, x), x) - Simp(a*b*(a/sin(e + f*x))**(m + S(-1))*(b/cos(e + f*x))**(n + S(-1))/(f*(m + S(-1))), x) def replacement3927(a, b, e, f, m, n, x): return Dist(b**S(2)*(m + n + S(-2))/(n + S(-1)), Int((a/sin(e + f*x))**m*(b/cos(e + f*x))**(n + S(-2)), x), x) + Simp(a*b*(a/sin(e + f*x))**(m + S(-1))*(b/cos(e + f*x))**(n + S(-1))/(f*(n + S(-1))), x) def replacement3928(a, b, e, f, m, n, x): return Dist((m + S(1))/(a**S(2)*(m + n)), Int((a/sin(e + f*x))**(m + S(2))*(b/cos(e + f*x))**n, x), x) + Simp(b*(a/sin(e + f*x))**(m + S(1))*(b/cos(e + f*x))**(n + S(-1))/(a*f*(m + n)), x) def replacement3929(a, b, e, f, m, n, x): return Dist((n + S(1))/(b**S(2)*(m + n)), Int((a/sin(e + f*x))**m*(b/cos(e + f*x))**(n + S(2)), x), x) - Simp(a*(a/sin(e + f*x))**(m + S(-1))*(b/cos(e + f*x))**(n + S(1))/(b*f*(m + n)), x) def replacement3930(a, b, e, f, m, n, x): return Dist((a/sin(e + f*x))**m*(b/cos(e + f*x))**n*tan(e + f*x)**(-n), Int(tan(e + f*x)**n, x), x) def replacement3931(a, b, e, f, m, n, x): return Dist((a/sin(e + f*x))**m*(a*sin(e + f*x))**m*(b/cos(e + f*x))**n*(b*cos(e + f*x))**n, Int((a*sin(e + f*x))**(-m)*(b*cos(e + f*x))**(-n), x), x) def replacement3932(c, d, n, x): return Dist(S(1)/d, Subst(Int(ExpandIntegrand((x**S(2) + S(1))**(n/S(2) + S(-1)), x), x), x, tan(c + d*x)), x) def replacement3933(c, d, n, x): return -Dist(S(1)/d, Subst(Int(ExpandIntegrand((x**S(2) + S(1))**(n/S(2) + S(-1)), x), x), x, S(1)/tan(c + d*x)), x) def replacement3934(b, c, d, n, x): return Dist(b**S(2)*(n + S(-2))/(n + S(-1)), Int((b/cos(c + d*x))**(n + S(-2)), x), x) + Simp(b*(b/cos(c + d*x))**(n + S(-1))*sin(c + d*x)/(d*(n + S(-1))), x) def replacement3935(b, c, d, n, x): return Dist(b**S(2)*(n + S(-2))/(n + S(-1)), Int((b/sin(c + d*x))**(n + S(-2)), x), x) - Simp(b*(b/sin(c + d*x))**(n + S(-1))*cos(c + d*x)/(d*(n + S(-1))), x) def replacement3936(b, c, d, n, x): return Dist((n + S(1))/(b**S(2)*n), Int((b/cos(c + d*x))**(n + S(2)), x), x) - Simp((b/cos(c + d*x))**(n + S(1))*sin(c + d*x)/(b*d*n), x) def replacement3937(b, c, d, n, x): return Dist((n + S(1))/(b**S(2)*n), Int((b/sin(c + d*x))**(n + S(2)), x), x) + Simp((b/sin(c + d*x))**(n + S(1))*cos(c + d*x)/(b*d*n), x) def replacement3938(c, d, x): return Simp(atanh(sin(c + d*x))/d, x) def replacement3939(c, d, x): return -Simp(atanh(cos(c + d*x))/d, x) def replacement3940(b, c, d, n, x): return Dist((b/cos(c + d*x))**n*cos(c + d*x)**n, Int(cos(c + d*x)**(-n), x), x) def replacement3941(b, c, d, n, x): return Dist((b/sin(c + d*x))**n*sin(c + d*x)**n, Int(sin(c + d*x)**(-n), x), x) def replacement3942(b, c, d, n, x): return Simp((cos(c + d*x)/b)**(n + S(-1))*(b/cos(c + d*x))**(n + S(-1))*Int((cos(c + d*x)/b)**(-n), x), x) def replacement3943(b, c, d, n, x): return Simp((sin(c + d*x)/b)**(n + S(-1))*(b/sin(c + d*x))**(n + S(-1))*Int((sin(c + d*x)/b)**(-n), x), x) def replacement3944(a, b, c, d, x): return Dist(b**S(2), Int(cos(c + d*x)**(S(-2)), x), x) + Dist(S(2)*a*b, Int(S(1)/cos(c + d*x), x), x) + Simp(a**S(2)*x, x) def replacement3945(a, b, c, d, x): return Dist(b**S(2), Int(sin(c + d*x)**(S(-2)), x), x) + Dist(S(2)*a*b, Int(S(1)/sin(c + d*x), x), x) + Simp(a**S(2)*x, x) def replacement3946(a, b, c, d, x): return Dist(S(2)*b/d, Subst(Int(S(1)/(a + x**S(2)), x), x, b*tan(c + d*x)/sqrt(a + b/cos(c + d*x))), x) def replacement3947(a, b, c, d, x): return Dist(-S(2)*b/d, Subst(Int(S(1)/(a + x**S(2)), x), x, b/(sqrt(a + b/sin(c + d*x))*tan(c + d*x))), x) def replacement3948(a, b, c, d, n, x): return Dist(a/(n + S(-1)), Int((a + b/cos(c + d*x))**(n + S(-2))*(a*(n + S(-1)) + b*(S(3)*n + S(-4))/cos(c + d*x)), x), x) + Simp(b**S(2)*(a + b/cos(c + d*x))**(n + S(-2))*tan(c + d*x)/(d*(n + S(-1))), x) def replacement3949(a, b, c, d, n, x): return Dist(a/(n + S(-1)), Int((a + b/sin(c + d*x))**(n + S(-2))*(a*(n + S(-1)) + b*(S(3)*n + S(-4))/sin(c + d*x)), x), x) - Simp(b**S(2)*(a + b/sin(c + d*x))**(n + S(-2))/(d*(n + S(-1))*tan(c + d*x)), x) def replacement3950(a, b, c, d, x): return Dist(S(1)/a, Int(sqrt(a + b/cos(c + d*x)), x), x) - Dist(b/a, Int(S(1)/(sqrt(a + b/cos(c + d*x))*cos(c + d*x)), x), x) def replacement3951(a, b, c, d, x): return Dist(S(1)/a, Int(sqrt(a + b/sin(c + d*x)), x), x) - Dist(b/a, Int(S(1)/(sqrt(a + b/sin(c + d*x))*sin(c + d*x)), x), x) def replacement3952(a, b, c, d, n, x): return Dist(S(1)/(a**S(2)*(S(2)*n + S(1))), Int((a + b/cos(c + d*x))**(n + S(1))*(a*(S(2)*n + S(1)) - b*(n + S(1))/cos(c + d*x)), x), x) + Simp((a + b/cos(c + d*x))**n*tan(c + d*x)/(d*(S(2)*n + S(1))), x) def replacement3953(a, b, c, d, n, x): return Dist(S(1)/(a**S(2)*(S(2)*n + S(1))), Int((a + b/sin(c + d*x))**(n + S(1))*(a*(S(2)*n + S(1)) - b*(n + S(1))/sin(c + d*x)), x), x) - Simp((a + b/sin(c + d*x))**n/(d*(S(2)*n + S(1))*tan(c + d*x)), x) def replacement3954(a, b, c, d, n, x): return -Dist(a**n*tan(c + d*x)/(d*sqrt(S(1) - S(1)/cos(c + d*x))*sqrt(S(1) + S(1)/cos(c + d*x))), Subst(Int((S(1) + b*x/a)**(n + S(-1)/2)/(x*sqrt(S(1) - b*x/a)), x), x, S(1)/cos(c + d*x)), x) def replacement3955(a, b, c, d, n, x): return Dist(a**n/(d*sqrt(S(1) - S(1)/sin(c + d*x))*sqrt(S(1) + S(1)/sin(c + d*x))*tan(c + d*x)), Subst(Int((S(1) + b*x/a)**(n + S(-1)/2)/(x*sqrt(S(1) - b*x/a)), x), x, S(1)/sin(c + d*x)), x) def replacement3956(a, b, c, d, n, x): return Dist(a**IntPart(n)*(S(1) + b/(a*cos(c + d*x)))**(-FracPart(n))*(a + b/cos(c + d*x))**FracPart(n), Int((S(1) + b/(a*cos(c + d*x)))**n, x), x) def replacement3957(a, b, c, d, n, x): return Dist(a**IntPart(n)*(S(1) + b/(a*sin(c + d*x)))**(-FracPart(n))*(a + b/sin(c + d*x))**FracPart(n), Int((S(1) + b/(a*sin(c + d*x)))**n, x), x) def replacement3958(a, b, c, d, x): return Simp(-S(2)*sqrt(b*(S(1) + S(1)/cos(c + d*x))/(a + b/cos(c + d*x)))*sqrt(-b*(S(1) - S(1)/cos(c + d*x))/(a + b/cos(c + d*x)))*(a + b/cos(c + d*x))*EllipticPi(a/(a + b), asin(Rt(a + b, S(2))/sqrt(a + b/cos(c + d*x))), (a - b)/(a + b))/(d*Rt(a + b, S(2))*tan(c + d*x)), x) def replacement3959(a, b, c, d, x): return Simp(S(2)*sqrt(b*(S(1) + S(1)/sin(c + d*x))/(a + b/sin(c + d*x)))*sqrt(-b*(S(1) - S(1)/sin(c + d*x))/(a + b/sin(c + d*x)))*(a + b/sin(c + d*x))*EllipticPi(a/(a + b), asin(Rt(a + b, S(2))/sqrt(a + b/sin(c + d*x))), (a - b)/(a + b))*tan(c + d*x)/(d*Rt(a + b, S(2))), x) def replacement3960(a, b, c, d, x): return Dist(b**S(2), Int((S(1) + S(1)/cos(c + d*x))/(sqrt(a + b/cos(c + d*x))*cos(c + d*x)), x), x) + Int((a**S(2) + b*(S(2)*a - b)/cos(c + d*x))/sqrt(a + b/cos(c + d*x)), x) def replacement3961(a, b, c, d, x): return Dist(b**S(2), Int((S(1) + S(1)/sin(c + d*x))/(sqrt(a + b/sin(c + d*x))*sin(c + d*x)), x), x) + Int((a**S(2) + b*(S(2)*a - b)/sin(c + d*x))/sqrt(a + b/sin(c + d*x)), x) def replacement3962(a, b, c, d, n, x): return Dist(S(1)/(n + S(-1)), Int((a + b/cos(c + d*x))**(n + S(-3))*Simp(a**S(3)*(n + S(-1)) + a*b**S(2)*(S(3)*n + S(-4))/cos(c + d*x)**S(2) + b*(S(3)*a**S(2)*(n + S(-1)) + b**S(2)*(n + S(-2)))/cos(c + d*x), x), x), x) + Simp(b**S(2)*(a + b/cos(c + d*x))**(n + S(-2))*tan(c + d*x)/(d*(n + S(-1))), x) def replacement3963(a, b, c, d, n, x): return Dist(S(1)/(n + S(-1)), Int((a + b/sin(c + d*x))**(n + S(-3))*Simp(a**S(3)*(n + S(-1)) + a*b**S(2)*(S(3)*n + S(-4))/sin(c + d*x)**S(2) + b*(S(3)*a**S(2)*(n + S(-1)) + b**S(2)*(n + S(-2)))/sin(c + d*x), x), x), x) - Simp(b**S(2)*(a + b/sin(c + d*x))**(n + S(-2))/(d*(n + S(-1))*tan(c + d*x)), x) def replacement3964(a, b, c, d, x): return -Dist(S(1)/a, Int(S(1)/(a*cos(c + d*x)/b + S(1)), x), x) + Simp(x/a, x) def replacement3965(a, b, c, d, x): return -Dist(S(1)/a, Int(S(1)/(a*sin(c + d*x)/b + S(1)), x), x) + Simp(x/a, x) def replacement3966(a, b, c, d, x): return Simp(-S(2)*sqrt(b*(S(1) - S(1)/cos(c + d*x))/(a + b))*sqrt(-b*(S(1) + S(1)/cos(c + d*x))/(a - b))*EllipticPi((a + b)/a, asin(sqrt(a + b/cos(c + d*x))/Rt(a + b, S(2))), (a + b)/(a - b))*Rt(a + b, S(2))/(a*d*tan(c + d*x)), x) def replacement3967(a, b, c, d, x): return Simp(S(2)*sqrt(b*(S(1) - S(1)/sin(c + d*x))/(a + b))*sqrt(-b*(S(1) + S(1)/sin(c + d*x))/(a - b))*EllipticPi((a + b)/a, asin(sqrt(a + b/sin(c + d*x))/Rt(a + b, S(2))), (a + b)/(a - b))*Rt(a + b, S(2))*tan(c + d*x)/(a*d), x) def replacement3968(a, b, c, d, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(n + S(1))), Int((a + b/cos(c + d*x))**(n + S(1))*Simp(-a*b*(n + S(1))/cos(c + d*x) + b**S(2)*(n + S(2))/cos(c + d*x)**S(2) + (a**S(2) - b**S(2))*(n + S(1)), x), x), x) - Simp(b**S(2)*(a + b/cos(c + d*x))**(n + S(1))*tan(c + d*x)/(a*d*(a**S(2) - b**S(2))*(n + S(1))), x) def replacement3969(a, b, c, d, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(n + S(1))), Int((a + b/sin(c + d*x))**(n + S(1))*Simp(-a*b*(n + S(1))/sin(c + d*x) + b**S(2)*(n + S(2))/sin(c + d*x)**S(2) + (a**S(2) - b**S(2))*(n + S(1)), x), x), x) + Simp(b**S(2)*(a + b/sin(c + d*x))**(n + S(1))/(a*d*(a**S(2) - b**S(2))*(n + S(1))*tan(c + d*x)), x) def replacement3970(a, b, c, d, n, x): return Int((a + b/cos(c + d*x))**n, x) def replacement3971(a, b, c, d, n, x): return Int((a + b/sin(c + d*x))**n, x) def replacement3972(a, b, d, e, f, n, x): return Dist(a, Int((d/cos(e + f*x))**n, x), x) + Dist(b/d, Int((d/cos(e + f*x))**(n + S(1)), x), x) def replacement3973(a, b, d, e, f, n, x): return Dist(a, Int((d/sin(e + f*x))**n, x), x) + Dist(b/d, Int((d/sin(e + f*x))**(n + S(1)), x), x) def replacement3974(a, b, d, e, f, n, x): return Dist(S(2)*a*b/d, Int((d/cos(e + f*x))**(n + S(1)), x), x) + Int((d/cos(e + f*x))**n*(a**S(2) + b**S(2)/cos(e + f*x)**S(2)), x) def replacement3975(a, b, d, e, f, n, x): return Dist(S(2)*a*b/d, Int((d/sin(e + f*x))**(n + S(1)), x), x) + Int((d/sin(e + f*x))**n*(a**S(2) + b**S(2)/sin(e + f*x)**S(2)), x) def replacement3976(a, b, e, f, x): return Dist(S(1)/b, Int(S(1)/cos(e + f*x), x), x) - Dist(a/b, Int(S(1)/((a + b/cos(e + f*x))*cos(e + f*x)), x), x) def replacement3977(a, b, e, f, x): return Dist(S(1)/b, Int(S(1)/sin(e + f*x), x), x) - Dist(a/b, Int(S(1)/((a + b/sin(e + f*x))*sin(e + f*x)), x), x) def replacement3978(a, b, e, f, x): return -Dist(a/b, Int(S(1)/((a + b/cos(e + f*x))*cos(e + f*x)**S(2)), x), x) + Simp(tan(e + f*x)/(b*f), x) def replacement3979(a, b, e, f, x): return -Dist(a/b, Int(S(1)/((a + b/sin(e + f*x))*sin(e + f*x)**S(2)), x), x) - Simp(S(1)/(b*f*tan(e + f*x)), x) def replacement3980(a, b, d, e, f, m, n, x): return Int(ExpandTrig((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m, x), x) def replacement3981(a, b, d, e, f, m, n, x): return Int(ExpandTrig((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m, x), x) def replacement3982(a, b, e, f, x): return Simp(S(2)*b*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))), x) def replacement3983(a, b, e, f, x): return Simp(-S(2)*b/(f*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), x) def replacement3984(a, b, e, f, m, x): return Dist(a*(S(2)*m + S(-1))/m, Int((a + b/cos(e + f*x))**(m + S(-1))/cos(e + f*x), x), x) + Simp(b*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*m), x) def replacement3985(a, b, e, f, m, x): return Dist(a*(S(2)*m + S(-1))/m, Int((a + b/sin(e + f*x))**(m + S(-1))/sin(e + f*x), x), x) - Simp(b*(a + b/sin(e + f*x))**(m + S(-1))/(f*m*tan(e + f*x)), x) def replacement3986(a, b, e, f, x): return Simp(tan(e + f*x)/(f*(a/cos(e + f*x) + b)), x) def replacement3987(a, b, e, f, x): return -Simp(S(1)/(f*(a/sin(e + f*x) + b)*tan(e + f*x)), x) def replacement3988(a, b, e, f, x): return Dist(S(2)/f, Subst(Int(S(1)/(S(2)*a + x**S(2)), x), x, b*tan(e + f*x)/sqrt(a + b/cos(e + f*x))), x) def replacement3989(a, b, e, f, x): return Dist(-S(2)/f, Subst(Int(S(1)/(S(2)*a + x**S(2)), x), x, b/(sqrt(a + b/sin(e + f*x))*tan(e + f*x))), x) def replacement3990(a, b, e, f, m, x): return Dist((m + S(1))/(a*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))/cos(e + f*x), x), x) - Simp(b*(a + b/cos(e + f*x))**m*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement3991(a, b, e, f, m, x): return Dist((m + S(1))/(a*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))/sin(e + f*x), x), x) + Simp(b*(a + b/sin(e + f*x))**m/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement3992(a, b, e, f, m, x): return Dist(m/(b*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(S(2)*m + S(1))), x) def replacement3993(a, b, e, f, m, x): return Dist(m/(b*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**m/(f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement3994(a, b, e, f, m, x): return Dist(a*m/(b*(m + S(1))), Int((a + b/cos(e + f*x))**m/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement3995(a, b, e, f, m, x): return Dist(a*m/(b*(m + S(1))), Int((a + b/sin(e + f*x))**m/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement3996(a, b, e, f, m, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*(a*m - b*(S(2)*m + S(1))/cos(e + f*x))/cos(e + f*x), x), x) - Simp(b*(a + b/cos(e + f*x))**m*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement3997(a, b, e, f, m, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*(a*m - b*(S(2)*m + S(1))/sin(e + f*x))/sin(e + f*x), x), x) + Simp(b*(a + b/sin(e + f*x))**m/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement3998(a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/cos(e + f*x))**m*(-a/cos(e + f*x) + b*(m + S(1)))/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + S(2))), x) def replacement3999(a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/sin(e + f*x))**m*(-a/sin(e + f*x) + b*(m + S(1)))/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + S(2))*tan(e + f*x)), x) def replacement4000(a, b, d, e, f, x): return Dist(S(2)*a*sqrt(a*d/b)/(b*f), Subst(Int(S(1)/sqrt(S(1) + x**S(2)/a), x), x, b*tan(e + f*x)/sqrt(a + b/cos(e + f*x))), x) def replacement4001(a, b, d, e, f, x): return Dist(-S(2)*a*sqrt(a*d/b)/(b*f), Subst(Int(S(1)/sqrt(S(1) + x**S(2)/a), x), x, b/(sqrt(a + b/sin(e + f*x))*tan(e + f*x))), x) def replacement4002(a, b, d, e, f, x): return Dist(S(2)*b*d/f, Subst(Int(S(1)/(b - d*x**S(2)), x), x, b*tan(e + f*x)/(sqrt(d/cos(e + f*x))*sqrt(a + b/cos(e + f*x)))), x) def replacement4003(a, b, d, e, f, x): return Dist(-S(2)*b*d/f, Subst(Int(S(1)/(b - d*x**S(2)), x), x, b/(sqrt(d/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x))), x) def replacement4004(a, b, d, e, f, n, x): return Dist(S(2)*a*d*(n + S(-1))/(b*(S(2)*n + S(-1))), Int((d/cos(e + f*x))**(n + S(-1))*sqrt(a + b/cos(e + f*x)), x), x) + Simp(S(2)*b*d*(d/cos(e + f*x))**(n + S(-1))*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(-1))), x) def replacement4005(a, b, d, e, f, n, x): return Dist(S(2)*a*d*(n + S(-1))/(b*(S(2)*n + S(-1))), Int((d/sin(e + f*x))**(n + S(-1))*sqrt(a + b/sin(e + f*x)), x), x) + Simp(-S(2)*b*d*(d/sin(e + f*x))**(n + S(-1))/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(-1))*tan(e + f*x)), x) def replacement4006(a, b, d, e, f, x): return Simp(S(2)*a*tan(e + f*x)/(f*sqrt(d/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), x) def replacement4007(a, b, d, e, f, x): return Simp(-S(2)*a/(f*sqrt(d/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), x) def replacement4008(a, b, d, e, f, n, x): return Dist(a*(S(2)*n + S(1))/(S(2)*b*d*n), Int((d/cos(e + f*x))**(n + S(1))*sqrt(a + b/cos(e + f*x)), x), x) - Simp(a*(d/cos(e + f*x))**n*tan(e + f*x)/(f*n*sqrt(a + b/cos(e + f*x))), x) def replacement4009(a, b, d, e, f, n, x): return Dist(a*(S(2)*n + S(1))/(S(2)*b*d*n), Int((d/sin(e + f*x))**(n + S(1))*sqrt(a + b/sin(e + f*x)), x), x) + Simp(a*(d/sin(e + f*x))**n/(f*n*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), x) def replacement4010(a, b, d, e, f, n, x): return -Dist(a**S(2)*d*tan(e + f*x)/(f*sqrt(a - b/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), Subst(Int((d*x)**(n + S(-1))/sqrt(a - b*x), x), x, S(1)/cos(e + f*x)), x) def replacement4011(a, b, d, e, f, n, x): return Dist(a**S(2)*d/(f*sqrt(a - b/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), Subst(Int((d*x)**(n + S(-1))/sqrt(a - b*x), x), x, S(1)/sin(e + f*x)), x) def replacement4012(a, b, d, e, f, x): return Dist(sqrt(S(2))*sqrt(a)/(b*f), Subst(Int(S(1)/sqrt(x**S(2) + S(1)), x), x, b*tan(e + f*x)/(a + b/cos(e + f*x))), x) def replacement4013(a, b, d, e, f, x): return -Dist(sqrt(S(2))*sqrt(a)/(b*f), Subst(Int(S(1)/sqrt(x**S(2) + S(1)), x), x, b/((a + b/sin(e + f*x))*tan(e + f*x))), x) def replacement4014(a, b, d, e, f, x): return Dist(S(2)*b*d/(a*f), Subst(Int(S(1)/(S(2)*b - d*x**S(2)), x), x, b*tan(e + f*x)/(sqrt(d/cos(e + f*x))*sqrt(a + b/cos(e + f*x)))), x) def replacement4015(a, b, d, e, f, x): return Dist(-S(2)*b*d/(a*f), Subst(Int(S(1)/(S(2)*b - d*x**S(2)), x), x, b/(sqrt(d/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x))), x) def replacement4016(a, b, d, e, f, m, n, x): return Dist(b*(S(2)*m + S(-1))/(d*m), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-1)), x), x) + Simp(a*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*m), x) def replacement4017(a, b, d, e, f, m, n, x): return Dist(b*(S(2)*m + S(-1))/(d*m), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-1)), x), x) - Simp(a*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1))/(f*m*tan(e + f*x)), x) def replacement4018(a, b, d, e, f, m, n, x): return Dist(d*(m + S(1))/(b*(S(2)*m + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1)), x), x) - Simp(b*d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**m*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4019(a, b, d, e, f, m, n, x): return Dist(d*(m + S(1))/(b*(S(2)*m + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1)), x), x) + Simp(b*d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**m/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4020(a, b, d, e, f, m, n, x): return Dist(m/(a*(S(2)*m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1)), x), x) + Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(S(2)*m + S(1))), x) def replacement4021(a, b, d, e, f, m, n, x): return Dist(m/(a*(S(2)*m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1)), x), x) - Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4022(a, b, d, e, f, m, n, x): return Dist(a*m/(b*d*(m + S(1))), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m, x), x) + Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4023(a, b, d, e, f, m, n, x): return Dist(a*m/(b*d*(m + S(1))), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m, x), x) - Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4024(a, b, d, e, f, m, n, x): return -Dist(a/(d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-2))*(-a*(m + S(2)*n + S(-1))/cos(e + f*x) + b*(m - S(2)*n + S(-2))), x), x) - Simp(b**S(2)*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-2))*tan(e + f*x)/(f*n), x) def replacement4025(a, b, d, e, f, m, n, x): return -Dist(a/(d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-2))*(-a*(m + S(2)*n + S(-1))/sin(e + f*x) + b*(m - S(2)*n + S(-2))), x), x) + Simp(b**S(2)*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-2))/(f*n*tan(e + f*x)), x) def replacement4026(a, b, d, e, f, m, n, x): return Dist(b/(m + n + S(-1)), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-2))*(a*(S(3)*m + S(2)*n + S(-4))/cos(e + f*x) + b*(m + S(2)*n + S(-1))), x), x) + Simp(b**S(2)*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-2))*tan(e + f*x)/(f*(m + n + S(-1))), x) def replacement4027(a, b, d, e, f, m, n, x): return Dist(b/(m + n + S(-1)), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-2))*(a*(S(3)*m + S(2)*n + S(-4))/sin(e + f*x) + b*(m + S(2)*n + S(-1))), x), x) - Simp(b**S(2)*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-2))/(f*(m + n + S(-1))*tan(e + f*x)), x) def replacement4028(a, b, d, e, f, m, n, x): return -Dist(d/(a*b*(S(2)*m + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*(a*(n + S(-1)) - b*(m + n)/cos(e + f*x)), x), x) - Simp(b*d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**m*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4029(a, b, d, e, f, m, n, x): return -Dist(d/(a*b*(S(2)*m + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*(a*(n + S(-1)) - b*(m + n)/sin(e + f*x)), x), x) + Simp(b*d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**m/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4030(a, b, d, e, f, m, n, x): return Dist(d**S(2)/(a*b*(S(2)*m + S(1))), Int((d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**(m + S(1))*(a*(m - n + S(2))/cos(e + f*x) + b*(n + S(-2))), x), x) + Simp(d**S(2)*(d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(S(2)*m + S(1))), x) def replacement4031(a, b, d, e, f, m, n, x): return Dist(d**S(2)/(a*b*(S(2)*m + S(1))), Int((d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**(m + S(1))*(a*(m - n + S(2))/sin(e + f*x) + b*(n + S(-2))), x), x) - Simp(d**S(2)*(d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**m/(f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4032(a, b, d, e, f, m, n, x): return Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*(a*(S(2)*m + n + S(1)) - b*(m + n + S(1))/cos(e + f*x)), x), x) + Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(S(2)*m + S(1))), x) def replacement4033(a, b, d, e, f, m, n, x): return Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*(a*(S(2)*m + n + S(1)) - b*(m + n + S(1))/sin(e + f*x)), x), x) - Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4034(a, b, d, e, f, n, x): return -Dist(d**S(2)/(a*b), Int((d/cos(e + f*x))**(n + S(-2))*(-a*(n + S(-1))/cos(e + f*x) + b*(n + S(-2))), x), x) - Simp(d**S(2)*(d/cos(e + f*x))**(n + S(-2))*tan(e + f*x)/(f*(a + b/cos(e + f*x))), x) def replacement4035(a, b, d, e, f, n, x): return -Dist(d**S(2)/(a*b), Int((d/sin(e + f*x))**(n + S(-2))*(-a*(n + S(-1))/sin(e + f*x) + b*(n + S(-2))), x), x) + Simp(d**S(2)*(d/sin(e + f*x))**(n + S(-2))/(f*(a + b/sin(e + f*x))*tan(e + f*x)), x) def replacement4036(a, b, d, e, f, n, x): return -Dist(a**(S(-2)), Int((d/cos(e + f*x))**n*(a*(n + S(-1)) - b*n/cos(e + f*x)), x), x) - Simp((d/cos(e + f*x))**n*tan(e + f*x)/(f*(a + b/cos(e + f*x))), x) def replacement4037(a, b, d, e, f, n, x): return -Dist(a**(S(-2)), Int((d/sin(e + f*x))**n*(a*(n + S(-1)) - b*n/sin(e + f*x)), x), x) + Simp((d/sin(e + f*x))**n/(f*(a + b/sin(e + f*x))*tan(e + f*x)), x) def replacement4038(a, b, d, e, f, n, x): return Dist(d*(n + S(-1))/(a*b), Int((d/cos(e + f*x))**(n + S(-1))*(a - b/cos(e + f*x)), x), x) + Simp(b*d*(d/cos(e + f*x))**(n + S(-1))*tan(e + f*x)/(a*f*(a + b/cos(e + f*x))), x) def replacement4039(a, b, d, e, f, n, x): return Dist(d*(n + S(-1))/(a*b), Int((d/sin(e + f*x))**(n + S(-1))*(a - b/sin(e + f*x)), x), x) - Simp(b*d*(d/sin(e + f*x))**(n + S(-1))/(a*f*(a + b/sin(e + f*x))*tan(e + f*x)), x) def replacement4040(a, b, d, e, f, x): return Dist(d/b, Int(sqrt(d/cos(e + f*x))*sqrt(a + b/cos(e + f*x)), x), x) - Dist(a*d/b, Int(sqrt(d/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) def replacement4041(a, b, d, e, f, x): return Dist(d/b, Int(sqrt(d/sin(e + f*x))*sqrt(a + b/sin(e + f*x)), x), x) - Dist(a*d/b, Int(sqrt(d/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) def replacement4042(a, b, d, e, f, n, x): return Dist(d**S(2)/(b*(S(2)*n + S(-3))), Int((d/cos(e + f*x))**(n + S(-2))*(-a/cos(e + f*x) + S(2)*b*(n + S(-2)))/sqrt(a + b/cos(e + f*x)), x), x) + Simp(S(2)*d**S(2)*(d/cos(e + f*x))**(n + S(-2))*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(-3))), x) def replacement4043(a, b, d, e, f, n, x): return Dist(d**S(2)/(b*(S(2)*n + S(-3))), Int((d/sin(e + f*x))**(n + S(-2))*(-a/sin(e + f*x) + S(2)*b*(n + S(-2)))/sqrt(a + b/sin(e + f*x)), x), x) + Simp(-S(2)*d**S(2)*(d/sin(e + f*x))**(n + S(-2))/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(-3))*tan(e + f*x)), x) def replacement4044(a, b, d, e, f, n, x): return Dist(S(1)/(S(2)*b*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b*(S(2)*n + S(1))/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) - Simp((d/cos(e + f*x))**n*tan(e + f*x)/(f*n*sqrt(a + b/cos(e + f*x))), x) def replacement4045(a, b, d, e, f, n, x): return Dist(S(1)/(S(2)*b*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b*(S(2)*n + S(1))/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) + Simp((d/sin(e + f*x))**n/(f*n*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), x) def replacement4046(a, b, d, e, f, m, n, x): return Dist(d**S(2)/(b*(m + n + S(-1))), Int((d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**m*(a*m/cos(e + f*x) + b*(n + S(-2))), x), x) + Simp(d**S(2)*(d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + n + S(-1))), x) def replacement4047(a, b, d, e, f, m, n, x): return Dist(d**S(2)/(b*(m + n + S(-1))), Int((d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**m*(a*m/sin(e + f*x) + b*(n + S(-2))), x), x) - Simp(d**S(2)*(d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**m/(f*(m + n + S(-1))*tan(e + f*x)), x) def replacement4048(a, b, d, e, f, m, n, x): return Dist(a**(S(2) - n)*(a*d/b)**n*tan(e + f*x)/(f*sqrt(a - b/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), Subst(Int((a - x)**(n + S(-1))*(S(2)*a - x)**(m + S(-1)/2)/sqrt(x), x), x, a - b/cos(e + f*x)), x) def replacement4049(a, b, d, e, f, m, n, x): return -Dist(a**(S(2) - n)*(a*d/b)**n/(f*sqrt(a - b/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), Subst(Int((a - x)**(n + S(-1))*(S(2)*a - x)**(m + S(-1)/2)/sqrt(x), x), x, a - b/sin(e + f*x)), x) def replacement4050(a, b, d, e, f, m, n, x): return Dist(a**(S(1) - n)*(-a*d/b)**n*tan(e + f*x)/(f*sqrt(a - b/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), Subst(Int(x**(m + S(-1)/2)*(a - x)**(n + S(-1))/sqrt(S(2)*a - x), x), x, a + b/cos(e + f*x)), x) def replacement4051(a, b, d, e, f, m, n, x): return -Dist(a**(S(1) - n)*(-a*d/b)**n/(f*sqrt(a - b/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), Subst(Int(x**(m + S(-1)/2)*(a - x)**(n + S(-1))/sqrt(S(2)*a - x), x), x, a + b/sin(e + f*x)), x) def replacement4052(a, b, d, e, f, m, n, x): return -Dist(a**S(2)*d*tan(e + f*x)/(f*sqrt(a - b/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), Subst(Int((d*x)**(n + S(-1))*(a + b*x)**(m + S(-1)/2)/sqrt(a - b*x), x), x, S(1)/cos(e + f*x)), x) def replacement4053(a, b, d, e, f, m, n, x): return Dist(a**S(2)*d/(f*sqrt(a - b/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), Subst(Int((d*x)**(n + S(-1))*(a + b*x)**(m + S(-1)/2)/sqrt(a - b*x), x), x, S(1)/sin(e + f*x)), x) def replacement4054(a, b, d, e, f, m, n, x): return Dist(a**IntPart(m)*(S(1) + b/(a*cos(e + f*x)))**(-FracPart(m))*(a + b/cos(e + f*x))**FracPart(m), Int((d/cos(e + f*x))**n*(S(1) + b/(a*cos(e + f*x)))**m, x), x) def replacement4055(a, b, d, e, f, m, n, x): return Dist(a**IntPart(m)*(S(1) + b/(a*sin(e + f*x)))**(-FracPart(m))*(a + b/sin(e + f*x))**FracPart(m), Int((d/sin(e + f*x))**n*(S(1) + b/(a*sin(e + f*x)))**m, x), x) def replacement4056(a, b, e, f, x): return Dist(b, Int((S(1) + S(1)/cos(e + f*x))/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) + Dist(a - b, Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4057(a, b, e, f, x): return Dist(b, Int((S(1) + S(1)/sin(e + f*x))/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) + Dist(a - b, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4058(a, b, e, f, m, x): return Dist(S(1)/m, Int((a + b/cos(e + f*x))**(m + S(-2))*(a**S(2)*m + a*b*(S(2)*m + S(-1))/cos(e + f*x) + b**S(2)*(m + S(-1)))/cos(e + f*x), x), x) + Simp(b*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*m), x) def replacement4059(a, b, e, f, m, x): return Dist(S(1)/m, Int((a + b/sin(e + f*x))**(m + S(-2))*(a**S(2)*m + a*b*(S(2)*m + S(-1))/sin(e + f*x) + b**S(2)*(m + S(-1)))/sin(e + f*x), x), x) - Simp(b*(a + b/sin(e + f*x))**(m + S(-1))/(f*m*tan(e + f*x)), x) def replacement4060(a, b, e, f, x): return Dist(S(1)/b, Int(S(1)/(a*cos(e + f*x)/b + S(1)), x), x) def replacement4061(a, b, e, f, x): return Dist(S(1)/b, Int(S(1)/(a*sin(e + f*x)/b + S(1)), x), x) def replacement4062(a, b, e, f, x): return Simp(S(2)*sqrt(b*(S(1) - S(1)/cos(e + f*x))/(a + b))*sqrt(-b*(S(1) + S(1)/cos(e + f*x))/(a - b))*EllipticF(asin(sqrt(a + b/cos(e + f*x))/Rt(a + b, S(2))), (a + b)/(a - b))*Rt(a + b, S(2))/(b*f*tan(e + f*x)), x) def replacement4063(a, b, e, f, x): return Simp(-S(2)*sqrt(b*(S(1) - S(1)/sin(e + f*x))/(a + b))*sqrt(-b*(S(1) + S(1)/sin(e + f*x))/(a - b))*EllipticF(asin(sqrt(a + b/sin(e + f*x))/Rt(a + b, S(2))), (a + b)/(a - b))*Rt(a + b, S(2))*tan(e + f*x)/(b*f), x) def replacement4064(a, b, e, f, m, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*(a*(m + S(1)) - b*(m + S(2))/cos(e + f*x))/cos(e + f*x), x), x) + Simp(b*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4065(a, b, e, f, m, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*(a*(m + S(1)) - b*(m + S(2))/sin(e + f*x))/sin(e + f*x), x), x) - Simp(b*(a + b/sin(e + f*x))**(m + S(1))/(f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4066(a, b, e, f, m, x): return -Dist(tan(e + f*x)/(f*sqrt(S(1) - S(1)/cos(e + f*x))*sqrt(S(1) + S(1)/cos(e + f*x))), Subst(Int((a + b*x)**m/(sqrt(S(1) - x)*sqrt(x + S(1))), x), x, S(1)/cos(e + f*x)), x) def replacement4067(a, b, e, f, m, x): return Dist(S(1)/(f*sqrt(S(1) - S(1)/sin(e + f*x))*sqrt(S(1) + S(1)/sin(e + f*x))*tan(e + f*x)), Subst(Int((a + b*x)**m/(sqrt(S(1) - x)*sqrt(x + S(1))), x), x, S(1)/sin(e + f*x)), x) def replacement4068(a, b, e, f, m, x): return Dist(m/(m + S(1)), Int((a + b/cos(e + f*x))**(m + S(-1))*(a/cos(e + f*x) + b)/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4069(a, b, e, f, m, x): return Dist(m/(m + S(1)), Int((a + b/sin(e + f*x))**(m + S(-1))*(a/sin(e + f*x) + b)/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4070(a, b, e, f, m, x): return -Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*(-a*(m + S(2))/cos(e + f*x) + b*(m + S(1)))/cos(e + f*x), x), x) - Simp(a*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4071(a, b, e, f, m, x): return -Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*(-a*(m + S(2))/sin(e + f*x) + b*(m + S(1)))/sin(e + f*x), x), x) + Simp(a*(a + b/sin(e + f*x))**(m + S(1))/(f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4072(a, b, e, f, x): return -Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x) + Int((S(1) + S(1)/cos(e + f*x))/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x) def replacement4073(a, b, e, f, x): return -Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x) + Int((S(1) + S(1)/sin(e + f*x))/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x) def replacement4074(a, b, e, f, m, x): return Dist(S(1)/b, Int((a + b/cos(e + f*x))**(m + S(1))/cos(e + f*x), x), x) - Dist(a/b, Int((a + b/cos(e + f*x))**m/cos(e + f*x), x), x) def replacement4075(a, b, e, f, m, x): return Dist(S(1)/b, Int((a + b/sin(e + f*x))**(m + S(1))/sin(e + f*x), x), x) - Dist(a/b, Int((a + b/sin(e + f*x))**m/sin(e + f*x), x), x) def replacement4076(a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(a*b*(m + S(1)) - (a**S(2) + b**S(2)*(m + S(1)))/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp(a**S(2)*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4077(a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(a*b*(m + S(1)) - (a**S(2) + b**S(2)*(m + S(1)))/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp(a**S(2)*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4078(a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/cos(e + f*x))**m*(-a/cos(e + f*x) + b*(m + S(1)))/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + S(2))), x) def replacement4079(a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/sin(e + f*x))**m*(-a/sin(e + f*x) + b*(m + S(1)))/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + S(2))*tan(e + f*x)), x) def replacement4080(a, b, d, e, f, m, n, x): return -Dist(S(1)/(d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-3))*Simp(a**S(2)*b*(m - S(2)*n + S(-2)) - a*(a**S(2)*(n + S(1)) + S(3)*b**S(2)*n)/cos(e + f*x) - b*(a**S(2)*(m + n + S(-1)) + b**S(2)*n)/cos(e + f*x)**S(2), x), x), x) - Simp(a**S(2)*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-2))*tan(e + f*x)/(f*n), x) def replacement4081(a, b, d, e, f, m, n, x): return -Dist(S(1)/(d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-3))*Simp(a**S(2)*b*(m - S(2)*n + S(-2)) - a*(a**S(2)*(n + S(1)) + S(3)*b**S(2)*n)/sin(e + f*x) - b*(a**S(2)*(m + n + S(-1)) + b**S(2)*n)/sin(e + f*x)**S(2), x), x), x) + Simp(a**S(2)*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-2))/(f*n*tan(e + f*x)), x) def replacement4082(a, b, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(-1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-3))*Simp(a**S(3)*d*(m + n + S(-1)) + a*b**S(2)*d*n + a*b**S(2)*d*(S(3)*m + S(2)*n + S(-4))/cos(e + f*x)**S(2) + b*(S(3)*a**S(2)*d*(m + n + S(-1)) + b**S(2)*d*(m + n + S(-2)))/cos(e + f*x), x), x), x) + Simp(b**S(2)*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-2))*tan(e + f*x)/(f*(m + n + S(-1))), x) def replacement4083(a, b, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n + S(-1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-3))*Simp(a**S(3)*d*(m + n + S(-1)) + a*b**S(2)*d*n + a*b**S(2)*d*(S(3)*m + S(2)*n + S(-4))/sin(e + f*x)**S(2) + b*(S(3)*a**S(2)*d*(m + n + S(-1)) + b**S(2)*d*(m + n + S(-2)))/sin(e + f*x), x), x), x) - Simp(b**S(2)*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-2))/(f*(m + n + S(-1))*tan(e + f*x)), x) def replacement4084(a, b, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*Simp(a*d*(m + S(1))/cos(e + f*x) + b*d*(n + S(-1)) - b*d*(m + n + S(1))/cos(e + f*x)**S(2), x), x), x) + Simp(b*d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4085(a, b, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*Simp(a*d*(m + S(1))/sin(e + f*x) + b*d*(n + S(-1)) - b*d*(m + n + S(1))/sin(e + f*x)**S(2), x), x), x) - Simp(b*d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))/(f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4086(a, b, d, e, f, m, n, x): return -Dist(d**S(2)/((a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**(m + S(1))*(-a*(m + n)/cos(e + f*x)**S(2) + a*(n + S(-2)) + b*(m + S(1))/cos(e + f*x)), x), x) - Simp(a*d**S(2)*(d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4087(a, b, d, e, f, m, n, x): return -Dist(d**S(2)/((a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**(m + S(1))*(-a*(m + n)/sin(e + f*x)**S(2) + a*(n + S(-2)) + b*(m + S(1))/sin(e + f*x)), x), x) + Simp(a*d**S(2)*(d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**(m + S(1))/(f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4088(a, b, d, e, f, m, n, x): return Dist(d**S(3)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**(n + S(-3))*(a + b/cos(e + f*x))**(m + S(1))*Simp(a**S(2)*(n + S(-3)) + a*b*(m + S(1))/cos(e + f*x) - (a**S(2)*(n + S(-2)) + b**S(2)*(m + S(1)))/cos(e + f*x)**S(2), x), x), x) + Simp(a**S(2)*d**S(3)*(d/cos(e + f*x))**(n + S(-3))*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4089(a, b, d, e, f, m, n, x): return Dist(d**S(3)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**(n + S(-3))*(a + b/sin(e + f*x))**(m + S(1))*Simp(a**S(2)*(n + S(-3)) + a*b*(m + S(1))/sin(e + f*x) - (a**S(2)*(n + S(-2)) + b**S(2)*(m + S(1)))/sin(e + f*x)**S(2), x), x), x) - Simp(a**S(2)*d**S(3)*(d/sin(e + f*x))**(n + S(-3))*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4090(a, b, d, e, f, m, n, x): return -Dist(S(1)/(a*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m*Simp(-a*(n + S(1))/cos(e + f*x) + b*(m + n + S(1)) - b*(m + n + S(2))/cos(e + f*x)**S(2), x), x), x) - Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(a*f*n), x) def replacement4091(a, b, d, e, f, m, n, x): return -Dist(S(1)/(a*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m*Simp(-a*(n + S(1))/sin(e + f*x) + b*(m + n + S(1)) - b*(m + n + S(2))/sin(e + f*x)**S(2), x), x), x) + Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))/(a*f*n*tan(e + f*x)), x) def replacement4092(a, b, d, e, f, m, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*(a**S(2)*(m + S(1)) - a*b*(m + S(1))/cos(e + f*x) - b**S(2)*(m + n + S(1)) + b**S(2)*(m + n + S(2))/cos(e + f*x)**S(2)), x), x) - Simp(b**S(2)*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(a*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4093(a, b, d, e, f, m, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*(a**S(2)*(m + S(1)) - a*b*(m + S(1))/sin(e + f*x) - b**S(2)*(m + n + S(1)) + b**S(2)*(m + n + S(2))/sin(e + f*x)**S(2)), x), x) + Simp(b**S(2)*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))/(a*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4094(a, b, d, e, f, x): return Dist(sqrt(d/cos(e + f*x))*sqrt(d*cos(e + f*x))/d, Int(sqrt(d*cos(e + f*x))/(a*cos(e + f*x) + b), x), x) def replacement4095(a, b, d, e, f, x): return Dist(sqrt(d/sin(e + f*x))*sqrt(d*sin(e + f*x))/d, Int(sqrt(d*sin(e + f*x))/(a*sin(e + f*x) + b), x), x) def replacement4096(a, b, d, e, f, x): return Dist(d*sqrt(d/cos(e + f*x))*sqrt(d*cos(e + f*x)), Int(S(1)/(sqrt(d*cos(e + f*x))*(a*cos(e + f*x) + b)), x), x) def replacement4097(a, b, d, e, f, x): return Dist(d*sqrt(d/sin(e + f*x))*sqrt(d*sin(e + f*x)), Int(S(1)/(sqrt(d*sin(e + f*x))*(a*sin(e + f*x) + b)), x), x) def replacement4098(a, b, d, e, f, x): return Dist(d/b, Int((d/cos(e + f*x))**(S(3)/2), x), x) - Dist(a*d/b, Int((d/cos(e + f*x))**(S(3)/2)/(a + b/cos(e + f*x)), x), x) def replacement4099(a, b, d, e, f, x): return Dist(d/b, Int((d/sin(e + f*x))**(S(3)/2), x), x) - Dist(a*d/b, Int((d/sin(e + f*x))**(S(3)/2)/(a + b/sin(e + f*x)), x), x) def replacement4100(a, b, d, e, f, n, x): return Dist(d**S(3)/(b*(n + S(-2))), Int((d/cos(e + f*x))**(n + S(-3))*Simp(a*(n + S(-3)) - a*(n + S(-2))/cos(e + f*x)**S(2) + b*(n + S(-3))/cos(e + f*x), x)/(a + b/cos(e + f*x)), x), x) + Simp(d**S(3)*(d/cos(e + f*x))**(n + S(-3))*tan(e + f*x)/(b*f*(n + S(-2))), x) def replacement4101(a, b, d, e, f, n, x): return Dist(d**S(3)/(b*(n + S(-2))), Int((d/sin(e + f*x))**(n + S(-3))*Simp(a*(n + S(-3)) - a*(n + S(-2))/sin(e + f*x)**S(2) + b*(n + S(-3))/sin(e + f*x), x)/(a + b/sin(e + f*x)), x), x) - Simp(d**S(3)*(d/sin(e + f*x))**(n + S(-3))/(b*f*(n + S(-2))*tan(e + f*x)), x) def replacement4102(a, b, d, e, f, x): return Dist(a**(S(-2)), Int((a - b/cos(e + f*x))/sqrt(d/cos(e + f*x)), x), x) + Dist(b**S(2)/(a**S(2)*d**S(2)), Int((d/cos(e + f*x))**(S(3)/2)/(a + b/cos(e + f*x)), x), x) def replacement4103(a, b, d, e, f, x): return Dist(a**(S(-2)), Int((a - b/sin(e + f*x))/sqrt(d/sin(e + f*x)), x), x) + Dist(b**S(2)/(a**S(2)*d**S(2)), Int((d/sin(e + f*x))**(S(3)/2)/(a + b/sin(e + f*x)), x), x) def replacement4104(a, b, d, e, f, n, x): return -Dist(S(1)/(a*d*n), Int((d/cos(e + f*x))**(n + S(1))*Simp(-a*(n + S(1))/cos(e + f*x) + b*n - b*(n + S(1))/cos(e + f*x)**S(2), x)/(a + b/cos(e + f*x)), x), x) - Simp((d/cos(e + f*x))**n*tan(e + f*x)/(a*f*n), x) def replacement4105(a, b, d, e, f, n, x): return -Dist(S(1)/(a*d*n), Int((d/sin(e + f*x))**(n + S(1))*Simp(-a*(n + S(1))/sin(e + f*x) + b*n - b*(n + S(1))/sin(e + f*x)**S(2), x)/(a + b/sin(e + f*x)), x), x) + Simp((d/sin(e + f*x))**n/(a*f*n*tan(e + f*x)), x) def replacement4106(a, b, d, e, f, x): return Dist(a, Int(sqrt(d/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) + Dist(b/d, Int((d/cos(e + f*x))**(S(3)/2)/sqrt(a + b/cos(e + f*x)), x), x) def replacement4107(a, b, d, e, f, x): return Dist(a, Int(sqrt(d/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) + Dist(b/d, Int((d/sin(e + f*x))**(S(3)/2)/sqrt(a + b/sin(e + f*x)), x), x) def replacement4108(a, b, d, e, f, n, x): return Dist(d**S(2)/(S(2)*n + S(-1)), Int((d/cos(e + f*x))**(n + S(-2))*Simp(S(2)*a*(n + S(-2)) + a/cos(e + f*x)**S(2) + b*(S(2)*n + S(-3))/cos(e + f*x), x)/sqrt(a + b/cos(e + f*x)), x), x) + Simp(S(2)*d*(d/cos(e + f*x))**(n + S(-1))*sqrt(a + b/cos(e + f*x))*sin(e + f*x)/(f*(S(2)*n + S(-1))), x) def replacement4109(a, b, d, e, f, n, x): return Dist(d**S(2)/(S(2)*n + S(-1)), Int((d/sin(e + f*x))**(n + S(-2))*Simp(S(2)*a*(n + S(-2)) + a/sin(e + f*x)**S(2) + b*(S(2)*n + S(-3))/sin(e + f*x), x)/sqrt(a + b/sin(e + f*x)), x), x) + Simp(-S(2)*d*(d/sin(e + f*x))**(n + S(-1))*sqrt(a + b/sin(e + f*x))*cos(e + f*x)/(f*(S(2)*n + S(-1))), x) def replacement4110(a, b, d, e, f, x): return Dist(sqrt(a + b/cos(e + f*x))/(sqrt(d/cos(e + f*x))*sqrt(a*cos(e + f*x) + b)), Int(sqrt(a*cos(e + f*x) + b), x), x) def replacement4111(a, b, d, e, f, x): return Dist(sqrt(a + b/sin(e + f*x))/(sqrt(d/sin(e + f*x))*sqrt(a*sin(e + f*x) + b)), Int(sqrt(a*sin(e + f*x) + b), x), x) def replacement4112(a, b, d, e, f, n, x): return -Dist(S(1)/(S(2)*d*n), Int((d/cos(e + f*x))**(n + S(1))*Simp(-S(2)*a*(n + S(1))/cos(e + f*x) - b*(S(2)*n + S(3))/cos(e + f*x)**S(2) + b, x)/sqrt(a + b/cos(e + f*x)), x), x) - Simp((d/cos(e + f*x))**n*sqrt(a + b/cos(e + f*x))*tan(e + f*x)/(f*n), x) def replacement4113(a, b, d, e, f, n, x): return -Dist(S(1)/(S(2)*d*n), Int((d/sin(e + f*x))**(n + S(1))*Simp(-S(2)*a*(n + S(1))/sin(e + f*x) - b*(S(2)*n + S(3))/sin(e + f*x)**S(2) + b, x)/sqrt(a + b/sin(e + f*x)), x), x) + Simp((d/sin(e + f*x))**n*sqrt(a + b/sin(e + f*x))/(f*n*tan(e + f*x)), x) def replacement4114(a, b, d, e, f, x): return Dist(sqrt(d/cos(e + f*x))*sqrt(a*cos(e + f*x) + b)/sqrt(a + b/cos(e + f*x)), Int(S(1)/sqrt(a*cos(e + f*x) + b), x), x) def replacement4115(a, b, d, e, f, x): return Dist(sqrt(d/sin(e + f*x))*sqrt(a*sin(e + f*x) + b)/sqrt(a + b/sin(e + f*x)), Int(S(1)/sqrt(a*sin(e + f*x) + b), x), x) def replacement4116(a, b, d, e, f, x): return Dist(d*sqrt(d/cos(e + f*x))*sqrt(a*cos(e + f*x) + b)/sqrt(a + b/cos(e + f*x)), Int(S(1)/(sqrt(a*cos(e + f*x) + b)*cos(e + f*x)), x), x) def replacement4117(a, b, d, e, f, x): return Dist(d*sqrt(d/sin(e + f*x))*sqrt(a*sin(e + f*x) + b)/sqrt(a + b/sin(e + f*x)), Int(S(1)/(sqrt(a*sin(e + f*x) + b)*sin(e + f*x)), x), x) def replacement4118(a, b, d, e, f, n, x): return Dist(d**S(3)/(b*(S(2)*n + S(-3))), Int((d/cos(e + f*x))**(n + S(-3))*Simp(S(2)*a*(n + S(-3)) - S(2)*a*(n + S(-2))/cos(e + f*x)**S(2) + b*(S(2)*n + S(-5))/cos(e + f*x), x)/sqrt(a + b/cos(e + f*x)), x), x) + Simp(S(2)*d**S(2)*(d/cos(e + f*x))**(n + S(-2))*sqrt(a + b/cos(e + f*x))*sin(e + f*x)/(b*f*(S(2)*n + S(-3))), x) def replacement4119(a, b, d, e, f, n, x): return Dist(d**S(3)/(b*(S(2)*n + S(-3))), Int((d/sin(e + f*x))**(n + S(-3))*Simp(S(2)*a*(n + S(-3)) - S(2)*a*(n + S(-2))/sin(e + f*x)**S(2) + b*(S(2)*n + S(-5))/sin(e + f*x), x)/sqrt(a + b/sin(e + f*x)), x), x) + Simp(-S(2)*d**S(2)*(d/sin(e + f*x))**(n + S(-2))*sqrt(a + b/sin(e + f*x))*cos(e + f*x)/(b*f*(S(2)*n + S(-3))), x) def replacement4120(a, b, e, f, x): return -Dist(b/(S(2)*a), Int((S(1) + cos(e + f*x)**(S(-2)))/sqrt(a + b/cos(e + f*x)), x), x) + Simp(sqrt(a + b/cos(e + f*x))*sin(e + f*x)/(a*f), x) def replacement4121(a, b, e, f, x): return -Dist(b/(S(2)*a), Int((S(1) + sin(e + f*x)**(S(-2)))/sqrt(a + b/sin(e + f*x)), x), x) - Simp(sqrt(a + b/sin(e + f*x))*cos(e + f*x)/(a*f), x) def replacement4122(a, b, d, e, f, x): return Dist(S(1)/a, Int(sqrt(a + b/cos(e + f*x))/sqrt(d/cos(e + f*x)), x), x) - Dist(b/(a*d), Int(sqrt(d/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) def replacement4123(a, b, d, e, f, x): return Dist(S(1)/a, Int(sqrt(a + b/sin(e + f*x))/sqrt(d/sin(e + f*x)), x), x) - Dist(b/(a*d), Int(sqrt(d/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) def replacement4124(a, b, d, e, f, n, x): return Dist(S(1)/(S(2)*a*d*n), Int((d/cos(e + f*x))**(n + S(1))*Simp(S(2)*a*(n + S(1))/cos(e + f*x) - b*(S(2)*n + S(1)) + b*(S(2)*n + S(3))/cos(e + f*x)**S(2), x)/sqrt(a + b/cos(e + f*x)), x), x) - Simp((d/cos(e + f*x))**(n + S(1))*sqrt(a + b/cos(e + f*x))*sin(e + f*x)/(a*d*f*n), x) def replacement4125(a, b, d, e, f, n, x): return Dist(S(1)/(S(2)*a*d*n), Int((d/sin(e + f*x))**(n + S(1))*Simp(S(2)*a*(n + S(1))/sin(e + f*x) - b*(S(2)*n + S(1)) + b*(S(2)*n + S(3))/sin(e + f*x)**S(2), x)/sqrt(a + b/sin(e + f*x)), x), x) + Simp((d/sin(e + f*x))**(n + S(1))*sqrt(a + b/sin(e + f*x))*cos(e + f*x)/(a*d*f*n), x) def replacement4126(a, b, d, e, f, n, x): return Dist(S(1)/(S(2)*d*n), Int((d/cos(e + f*x))**(n + S(1))*Simp(a*b*(S(2)*n + S(-1)) + a*b*(S(2)*n + S(3))/cos(e + f*x)**S(2) + S(2)*(a**S(2)*(n + S(1)) + b**S(2)*n)/cos(e + f*x), x)/sqrt(a + b/cos(e + f*x)), x), x) - Simp(a*(d/cos(e + f*x))**n*sqrt(a + b/cos(e + f*x))*tan(e + f*x)/(f*n), x) def replacement4127(a, b, d, e, f, n, x): return Dist(S(1)/(S(2)*d*n), Int((d/sin(e + f*x))**(n + S(1))*Simp(a*b*(S(2)*n + S(-1)) + a*b*(S(2)*n + S(3))/sin(e + f*x)**S(2) + S(2)*(a**S(2)*(n + S(1)) + b**S(2)*n)/sin(e + f*x), x)/sqrt(a + b/sin(e + f*x)), x), x) + Simp(a*(d/sin(e + f*x))**n*sqrt(a + b/sin(e + f*x))/(f*n*tan(e + f*x)), x) def replacement4128(a, b, d, e, f, m, n, x): return Dist(d**S(3)/(b*(m + n + S(-1))), Int((d/cos(e + f*x))**(n + S(-3))*(a + b/cos(e + f*x))**m*Simp(a*(n + S(-3)) - a*(n + S(-2))/cos(e + f*x)**S(2) + b*(m + n + S(-2))/cos(e + f*x), x), x), x) + Simp(d**S(3)*(d/cos(e + f*x))**(n + S(-3))*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + n + S(-1))), x) def replacement4129(a, b, d, e, f, m, n, x): return Dist(d**S(3)/(b*(m + n + S(-1))), Int((d/sin(e + f*x))**(n + S(-3))*(a + b/sin(e + f*x))**m*Simp(a*(n + S(-3)) - a*(n + S(-2))/sin(e + f*x)**S(2) + b*(m + n + S(-2))/sin(e + f*x), x), x), x) - Simp(d**S(3)*(d/sin(e + f*x))**(n + S(-3))*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + n + S(-1))*tan(e + f*x)), x) def replacement4130(a, b, d, e, f, m, n, x): return Dist(d/(m + n + S(-1)), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(-2))*Simp(a*b*(n + S(-1)) + a*b*(S(2)*m + n + S(-2))/cos(e + f*x)**S(2) + (a**S(2)*(m + n + S(-1)) + b**S(2)*(m + n + S(-2)))/cos(e + f*x), x), x), x) + Simp(b*d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*(m + n + S(-1))), x) def replacement4131(a, b, d, e, f, m, n, x): return Dist(d/(m + n + S(-1)), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(-2))*Simp(a*b*(n + S(-1)) + a*b*(S(2)*m + n + S(-2))/sin(e + f*x)**S(2) + (a**S(2)*(m + n + S(-1)) + b**S(2)*(m + n + S(-2)))/sin(e + f*x), x), x), x) - Simp(b*d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(-1))/(f*(m + n + S(-1))*tan(e + f*x)), x) def replacement4132(a, b, d, e, f, m, n, x): return Dist(d**S(2)/(b*(m + n + S(-1))), Int((d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**(m + S(-1))*Simp(a*b*m/cos(e + f*x)**S(2) + a*b*(n + S(-2)) + b**S(2)*(m + n + S(-2))/cos(e + f*x), x), x), x) + Simp(d**S(2)*(d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + n + S(-1))), x) def replacement4133(a, b, d, e, f, m, n, x): return Dist(d**S(2)/(b*(m + n + S(-1))), Int((d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**(m + S(-1))*Simp(a*b*m/sin(e + f*x)**S(2) + a*b*(n + S(-2)) + b**S(2)*(m + n + S(-2))/sin(e + f*x), x), x), x) - Simp(d**S(2)*(d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**m/(f*(m + n + S(-1))*tan(e + f*x)), x) def replacement4134(a, b, d, e, f, x): return Dist(a, Int(sqrt(a + b/cos(e + f*x))/sqrt(d/cos(e + f*x)), x), x) + Dist(b/d, Int(sqrt(d/cos(e + f*x))*sqrt(a + b/cos(e + f*x)), x), x) def replacement4135(a, b, d, e, f, x): return Dist(a, Int(sqrt(a + b/sin(e + f*x))/sqrt(d/sin(e + f*x)), x), x) + Dist(b/d, Int(sqrt(d/sin(e + f*x))*sqrt(a + b/sin(e + f*x)), x), x) def replacement4136(a, b, d, e, f, m, n, x): return Dist(a, Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1)), x), x) + Dist(b/d, Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-1)), x), x) def replacement4137(a, b, d, e, f, m, n, x): return Dist(a, Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1)), x), x) + Dist(b/d, Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-1)), x), x) def replacement4138(a, b, d, e, f, m, n, x): return Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m, x) def replacement4139(a, b, d, e, f, m, n, x): return Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m, x) def replacement4140(a, b, e, f, g, m, p, x): return Int((g*sin(e + f*x))**p*(a*cos(e + f*x) + b)**m*cos(e + f*x)**(-m), x) def replacement4141(a, b, e, f, g, m, p, x): return Int((g*cos(e + f*x))**p*(a*sin(e + f*x) + b)**m*sin(e + f*x)**(-m), x) def replacement4142(a, b, e, f, m, p, x): return Dist(b**(S(1) - p)/f, Subst(Int(x**(-p + S(-1))*(-a + b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2), x), x, S(1)/cos(e + f*x)), x) def replacement4143(a, b, e, f, m, p, x): return -Dist(b**(S(1) - p)/f, Subst(Int(x**(-p + S(-1))*(-a + b*x)**(p/S(2) + S(-1)/2)*(a + b*x)**(m + p/S(2) + S(-1)/2), x), x, S(1)/sin(e + f*x)), x) def replacement4144(a, b, e, f, m, p, x): return Dist(S(1)/f, Subst(Int(x**(-p + S(-1))*(a + b*x)**m*(x + S(-1))**(p/S(2) + S(-1)/2)*(x + S(1))**(p/S(2) + S(-1)/2), x), x, S(1)/cos(e + f*x)), x) def replacement4145(a, b, e, f, m, p, x): return -Dist(S(1)/f, Subst(Int(x**(-p + S(-1))*(a + b*x)**m*(x + S(-1))**(p/S(2) + S(-1)/2)*(x + S(1))**(p/S(2) + S(-1)/2), x), x, S(1)/sin(e + f*x)), x) def replacement4146(a, b, e, f, m, x): return Dist(b*m, Int((a + b/cos(e + f*x))**(m + S(-1))/cos(e + f*x), x), x) - Simp((a + b/cos(e + f*x))**m/(f*tan(e + f*x)), x) def replacement4147(a, b, e, f, m, x): return Dist(b*m, Int((a + b/sin(e + f*x))**(m + S(-1))/sin(e + f*x), x), x) + Simp((a + b/sin(e + f*x))**m*tan(e + f*x)/f, x) def replacement4148(a, b, e, f, g, m, p, x): return Dist((a + b/cos(e + f*x))**FracPart(m)*(a*cos(e + f*x) + b)**(-FracPart(m))*cos(e + f*x)**FracPart(m), Int((g*sin(e + f*x))**p*(a*cos(e + f*x) + b)**m*cos(e + f*x)**(-m), x), x) def replacement4149(a, b, e, f, g, m, p, x): return Dist((a + b/sin(e + f*x))**FracPart(m)*(a*sin(e + f*x) + b)**(-FracPart(m))*sin(e + f*x)**FracPart(m), Int((g*cos(e + f*x))**p*(a*sin(e + f*x) + b)**m*sin(e + f*x)**(-m), x), x) def replacement4150(a, b, e, f, g, m, p, x): return Int((g*sin(e + f*x))**p*(a + b/cos(e + f*x))**m, x) def replacement4151(a, b, e, f, g, m, p, x): return Int((g*cos(e + f*x))**p*(a + b/sin(e + f*x))**m, x) def replacement4152(a, b, e, f, g, m, p, x): return Dist((g/sin(e + f*x))**p*(g*sin(e + f*x))**p, Int((g*sin(e + f*x))**(-p)*(a + b/cos(e + f*x))**m, x), x) def replacement4153(a, b, e, f, g, m, p, x): return Dist((g/cos(e + f*x))**p*(g*cos(e + f*x))**p, Int((g*cos(e + f*x))**(-p)*(a + b/sin(e + f*x))**m, x), x) def replacement4154(a, b, c, d, m, n, x): return -Dist(a**(-m + n + S(1))*b**(-n)/d, Subst(Int(x**(-m - n)*(a - b*x)**(m/S(2) + S(-1)/2)*(a + b*x)**(m/S(2) + n + S(-1)/2), x), x, cos(c + d*x)), x) def replacement4155(a, b, c, d, m, n, x): return Dist(a**(-m + n + S(1))*b**(-n)/d, Subst(Int(x**(-m - n)*(a - b*x)**(m/S(2) + S(-1)/2)*(a + b*x)**(m/S(2) + n + S(-1)/2), x), x, sin(c + d*x)), x) def replacement4156(a, b, c, d, m, n, x): return Dist(b**(S(1) - m)/d, Subst(Int((-a + b*x)**(m/S(2) + S(-1)/2)*(a + b*x)**(m/S(2) + n + S(-1)/2)/x, x), x, S(1)/cos(c + d*x)), x) def replacement4157(a, b, c, d, m, n, x): return -Dist(b**(S(1) - m)/d, Subst(Int((-a + b*x)**(m/S(2) + S(-1)/2)*(a + b*x)**(m/S(2) + n + S(-1)/2)/x, x), x, S(1)/sin(c + d*x)), x) def replacement4158(a, b, c, d, e, m, x): return -Dist(e**S(2)/m, Int((e*tan(c + d*x))**(m + S(-2))*(a*m + b*(m + S(-1))/cos(c + d*x)), x), x) + Simp(e*(e*tan(c + d*x))**(m + S(-1))*(a*m + b*(m + S(-1))/cos(c + d*x))/(d*m*(m + S(-1))), x) def replacement4159(a, b, c, d, e, m, x): return -Dist(e**S(2)/m, Int((e/tan(c + d*x))**(m + S(-2))*(a*m + b*(m + S(-1))/sin(c + d*x)), x), x) - Simp(e*(e/tan(c + d*x))**(m + S(-1))*(a*m + b*(m + S(-1))/sin(c + d*x))/(d*m*(m + S(-1))), x) def replacement4160(a, b, c, d, e, m, x): return -Dist(S(1)/(e**S(2)*(m + S(1))), Int((e*tan(c + d*x))**(m + S(2))*(a*(m + S(1)) + b*(m + S(2))/cos(c + d*x)), x), x) + Simp((e*tan(c + d*x))**(m + S(1))*(a + b/cos(c + d*x))/(d*e*(m + S(1))), x) def replacement4161(a, b, c, d, e, m, x): return -Dist(S(1)/(e**S(2)*(m + S(1))), Int((e/tan(c + d*x))**(m + S(2))*(a*(m + S(1)) + b*(m + S(2))/sin(c + d*x)), x), x) - Simp((e/tan(c + d*x))**(m + S(1))*(a + b/sin(c + d*x))/(d*e*(m + S(1))), x) def replacement4162(a, b, c, d, x): return Int((a*cos(c + d*x) + b)/sin(c + d*x), x) def replacement4163(a, b, c, d, x): return Int((a*sin(c + d*x) + b)/cos(c + d*x), x) def replacement4164(a, b, c, d, e, m, x): return Dist(a, Int((e*tan(c + d*x))**m, x), x) + Dist(b, Int((e*tan(c + d*x))**m/cos(c + d*x), x), x) def replacement4165(a, b, c, d, e, m, x): return Dist(a, Int((e/tan(c + d*x))**m, x), x) + Dist(b, Int((e/tan(c + d*x))**m/sin(c + d*x), x), x) def replacement4166(a, b, c, d, m, n, x): return Dist((S(-1))**(m/S(2) + S(-1)/2)*b**(S(1) - m)/d, Subst(Int((a + x)**n*(b**S(2) - x**S(2))**(m/S(2) + S(-1)/2)/x, x), x, b/cos(c + d*x)), x) def replacement4167(a, b, c, d, m, n, x): return -Dist((S(-1))**(m/S(2) + S(-1)/2)*b**(S(1) - m)/d, Subst(Int((a + x)**n*(b**S(2) - x**S(2))**(m/S(2) + S(-1)/2)/x, x), x, b/sin(c + d*x)), x) def replacement4168(a, b, c, d, e, m, n, x): return Int(ExpandIntegrand((e*tan(c + d*x))**m, (a + b/cos(c + d*x))**n, x), x) def replacement4169(a, b, c, d, e, m, n, x): return Int(ExpandIntegrand((e/tan(c + d*x))**m, (a + b/sin(c + d*x))**n, x), x) def replacement4170(a, b, c, d, m, n, x): return Dist(S(2)*a**(m/S(2) + n + S(1)/2)/d, Subst(Int(x**m*(a*x**S(2) + S(2))**(m/S(2) + n + S(-1)/2)/(a*x**S(2) + S(1)), x), x, tan(c + d*x)/sqrt(a + b/cos(c + d*x))), x) def replacement4171(a, b, c, d, m, n, x): return Dist(-S(2)*a**(m/S(2) + n + S(1)/2)/d, Subst(Int(x**m*(a*x**S(2) + S(2))**(m/S(2) + n + S(-1)/2)/(a*x**S(2) + S(1)), x), x, S(1)/(sqrt(a + b/sin(c + d*x))*tan(c + d*x))), x) def replacement4172(a, b, c, d, e, m, n, x): return Dist(a**(S(2)*n)*e**(-S(2)*n), Int((e*tan(c + d*x))**(m + S(2)*n)*(-a + b/cos(c + d*x))**(-n), x), x) def replacement4173(a, b, c, d, e, m, n, x): return Dist(a**(S(2)*n)*e**(-S(2)*n), Int((e/tan(c + d*x))**(m + S(2)*n)*(-a + b/sin(c + d*x))**(-n), x), x) def replacement4174(a, b, c, d, e, m, n, x): return Simp(S(2)**(m + n + S(1))*(a/(a + b/cos(c + d*x)))**(m + n + S(1))*(e*tan(c + d*x))**(m + S(1))*(a + b/cos(c + d*x))**n*AppellF1(m/S(2) + S(1)/2, m + n, S(1), m/S(2) + S(3)/2, -(a - b/cos(c + d*x))/(a + b/cos(c + d*x)), (a - b/cos(c + d*x))/(a + b/cos(c + d*x)))/(d*e*(m + S(1))), x) def replacement4175(a, b, c, d, e, m, n, x): return -Simp(S(2)**(m + n + S(1))*(a/(a + b/sin(c + d*x)))**(m + n + S(1))*(e/tan(c + d*x))**(m + S(1))*(a + b/sin(c + d*x))**n*AppellF1(m/S(2) + S(1)/2, m + n, S(1), m/S(2) + S(3)/2, -(a - b/sin(c + d*x))/(a + b/sin(c + d*x)), (a - b/sin(c + d*x))/(a + b/sin(c + d*x)))/(d*e*(m + S(1))), x) def replacement4176(a, b, c, d, e, x): return Dist(S(1)/a, Int(sqrt(e*tan(c + d*x)), x), x) - Dist(b/a, Int(sqrt(e*tan(c + d*x))/(a*cos(c + d*x) + b), x), x) def replacement4177(a, b, c, d, e, x): return Dist(S(1)/a, Int(sqrt(e/tan(c + d*x)), x), x) - Dist(b/a, Int(sqrt(e/tan(c + d*x))/(a*sin(c + d*x) + b), x), x) def replacement4178(a, b, c, d, e, m, x): return -Dist(e**S(2)/b**S(2), Int((e*tan(c + d*x))**(m + S(-2))*(a - b/cos(c + d*x)), x), x) + Dist(e**S(2)*(a**S(2) - b**S(2))/b**S(2), Int((e*tan(c + d*x))**(m + S(-2))/(a + b/cos(c + d*x)), x), x) def replacement4179(a, b, c, d, e, m, x): return -Dist(e**S(2)/b**S(2), Int((e/tan(c + d*x))**(m + S(-2))*(a - b/sin(c + d*x)), x), x) + Dist(e**S(2)*(a**S(2) - b**S(2))/b**S(2), Int((e/tan(c + d*x))**(m + S(-2))/(a + b/sin(c + d*x)), x), x) def replacement4180(a, b, c, d, e, x): return Dist(S(1)/a, Int(S(1)/sqrt(e*tan(c + d*x)), x), x) - Dist(b/a, Int(S(1)/(sqrt(e*tan(c + d*x))*(a*cos(c + d*x) + b)), x), x) def replacement4181(a, b, c, d, e, x): return Dist(S(1)/a, Int(S(1)/sqrt(e/tan(c + d*x)), x), x) - Dist(b/a, Int(S(1)/(sqrt(e/tan(c + d*x))*(a*sin(c + d*x) + b)), x), x) def replacement4182(a, b, c, d, e, m, x): return Dist(b**S(2)/(e**S(2)*(a**S(2) - b**S(2))), Int((e*tan(c + d*x))**(m + S(2))/(a + b/cos(c + d*x)), x), x) + Dist(S(1)/(a**S(2) - b**S(2)), Int((e*tan(c + d*x))**m*(a - b/cos(c + d*x)), x), x) def replacement4183(a, b, c, d, e, m, x): return Dist(b**S(2)/(e**S(2)*(a**S(2) - b**S(2))), Int((e/tan(c + d*x))**(m + S(2))/(a + b/sin(c + d*x)), x), x) + Dist(S(1)/(a**S(2) - b**S(2)), Int((e/tan(c + d*x))**m*(a - b/sin(c + d*x)), x), x) def replacement4184(a, b, c, d, n, x): return Int((S(-1) + cos(c + d*x)**(S(-2)))*(a + b/cos(c + d*x))**n, x) def replacement4185(a, b, c, d, n, x): return Int((S(-1) + sin(c + d*x)**(S(-2)))*(a + b/sin(c + d*x))**n, x) def replacement4186(a, b, c, d, e, m, n, x): return Int(ExpandIntegrand((e*tan(c + d*x))**m, (a + b/cos(c + d*x))**n, x), x) def replacement4187(a, b, c, d, e, m, n, x): return Int(ExpandIntegrand((e/tan(c + d*x))**m, (a + b/sin(c + d*x))**n, x), x) def replacement4188(a, b, c, d, m, n, x): return Int((a*cos(c + d*x) + b)**n*sin(c + d*x)**m*cos(c + d*x)**(-m - n), x) def replacement4189(a, b, c, d, m, n, x): return Int((a*sin(c + d*x) + b)**n*sin(c + d*x)**(-m - n)*cos(c + d*x)**m, x) def replacement4190(a, b, c, d, e, m, n, x): return Int((e*tan(c + d*x))**m*(a + b/cos(c + d*x))**n, x) def replacement4191(a, b, c, d, e, m, n, x): return Int((e/tan(c + d*x))**m*(a + b/sin(c + d*x))**n, x) def replacement4192(a, b, c, d, e, m, n, p, x): return Dist((e*tan(c + d*x))**(-m*p)*(e*tan(c + d*x)**p)**m, Int((e*tan(c + d*x))**(m*p)*(a + b/cos(c + d*x))**n, x), x) def replacement4193(a, b, c, d, e, m, n, p, x): return Dist((e*(S(1)/tan(c + d*x))**p)**m*(e/tan(c + d*x))**(-m*p), Int((e/tan(c + d*x))**(m*p)*(a + b/sin(c + d*x))**n, x), x) def replacement4194(a, b, c, d, e, f, m, n, x): return Dist(c**n, Int(ExpandTrig((S(1) + d/(c*cos(e + f*x)))**n, (a + b/cos(e + f*x))**m, x), x), x) def replacement4195(a, b, c, d, e, f, m, n, x): return Dist(c**n, Int(ExpandTrig((S(1) + d/(c*sin(e + f*x)))**n, (a + b/sin(e + f*x))**m, x), x), x) def replacement4196(a, b, c, d, e, f, m, n, x): return Dist((-a*c)**m, Int((c + d/cos(e + f*x))**(-m + n)*tan(e + f*x)**(S(2)*m), x), x) def replacement4197(a, b, c, d, e, f, m, n, x): return Dist((-a*c)**m, Int((c + d/sin(e + f*x))**(-m + n)*(S(1)/tan(e + f*x))**(S(2)*m), x), x) def replacement4198(a, b, c, d, e, f, m, x): return Dist((-a*c)**(m + S(1)/2)*tan(e + f*x)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), Int(tan(e + f*x)**(S(2)*m), x), x) def replacement4199(a, b, c, d, e, f, m, x): return Dist((-a*c)**(m + S(1)/2)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), Int((S(1)/tan(e + f*x))**(S(2)*m), x), x) def replacement4200(a, b, c, d, e, f, n, x): return Dist(c, Int(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))**(n + S(-1)), x), x) + Simp(-S(2)*a*c*(c + d/cos(e + f*x))**(n + S(-1))*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(-1))), x) def replacement4201(a, b, c, d, e, f, n, x): return Dist(c, Int(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))**(n + S(-1)), x), x) + Simp(S(2)*a*c*(c + d/sin(e + f*x))**(n + S(-1))/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(-1))*tan(e + f*x)), x) def replacement4202(a, b, c, d, e, f, n, x): return Dist(S(1)/c, Int(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))**(n + S(1)), x), x) + Simp(S(2)*a*(c + d/cos(e + f*x))**n*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(1))), x) def replacement4203(a, b, c, d, e, f, n, x): return Dist(S(1)/c, Int(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))**(n + S(1)), x), x) + Simp(-S(2)*a*(c + d/sin(e + f*x))**n/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(1))*tan(e + f*x)), x) def replacement4204(a, b, c, d, e, f, n, x): return Dist(a/c, Int(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))**(n + S(1)), x), x) + Simp(S(4)*a**S(2)*(c + d/cos(e + f*x))**n*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(1))), x) def replacement4205(a, b, c, d, e, f, n, x): return Dist(a/c, Int(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))**(n + S(1)), x), x) + Simp(-S(4)*a**S(2)*(c + d/sin(e + f*x))**n/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(1))*tan(e + f*x)), x) def replacement4206(a, b, c, d, e, f, n, x): return Dist(a, Int(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))**n, x), x) + Simp(S(2)*a**S(2)*(c + d/cos(e + f*x))**n*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(1))), x) def replacement4207(a, b, c, d, e, f, n, x): return Dist(a, Int(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))**n, x), x) + Simp(-S(2)*a**S(2)*(c + d/sin(e + f*x))**n/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(1))*tan(e + f*x)), x) def replacement4208(a, b, c, d, e, f, n, x): return Dist(a**S(2)/c**S(2), Int(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))**(n + S(2)), x), x) + Simp(S(8)*a**S(3)*(c + d/cos(e + f*x))**n*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(1))), x) def replacement4209(a, b, c, d, e, f, n, x): return Dist(a**S(2)/c**S(2), Int(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))**(n + S(2)), x), x) + Simp(-S(8)*a**S(3)*(c + d/sin(e + f*x))**n/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(1))*tan(e + f*x)), x) def replacement4210(a, b, c, d, e, f, m, n, x): return Dist(a*c*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), Subst(Int(x**(-m - n)*(a*x + b)**(m + S(-1)/2)*(c*x + d)**(n + S(-1)/2), x), x, cos(e + f*x)), x) def replacement4211(a, b, c, d, e, f, m, n, x): return -Dist(a*c/(f*sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), Subst(Int(x**(-m - n)*(a*x + b)**(m + S(-1)/2)*(c*x + d)**(n + S(-1)/2), x), x, sin(e + f*x)), x) def replacement4212(a, b, c, d, e, f, m, n, x): return -Dist(a*c*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), Subst(Int((a + b*x)**(m + S(-1)/2)*(c + d*x)**(n + S(-1)/2)/x, x), x, S(1)/cos(e + f*x)), x) def replacement4213(a, b, c, d, e, f, m, n, x): return Dist(a*c/(f*sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), Subst(Int((a + b*x)**(m + S(-1)/2)*(c + d*x)**(n + S(-1)/2)/x, x), x, S(1)/sin(e + f*x)), x) def replacement4214(a, b, c, d, e, f, x): return Dist(b*d, Int(cos(e + f*x)**(S(-2)), x), x) + Simp(a*c*x, x) def replacement4215(a, b, c, d, e, f, x): return Dist(b*d, Int(sin(e + f*x)**(S(-2)), x), x) + Simp(a*c*x, x) def replacement4216(a, b, c, d, e, f, x): return Dist(b*d, Int(cos(e + f*x)**(S(-2)), x), x) + Dist(a*d + b*c, Int(S(1)/cos(e + f*x), x), x) + Simp(a*c*x, x) def replacement4217(a, b, c, d, e, f, x): return Dist(b*d, Int(sin(e + f*x)**(S(-2)), x), x) + Dist(a*d + b*c, Int(S(1)/sin(e + f*x), x), x) + Simp(a*c*x, x) def replacement4218(a, b, c, d, e, f, x): return Dist(c, Int(sqrt(a + b/cos(e + f*x)), x), x) + Dist(d, Int(sqrt(a + b/cos(e + f*x))/cos(e + f*x), x), x) def replacement4219(a, b, c, d, e, f, x): return Dist(c, Int(sqrt(a + b/sin(e + f*x)), x), x) + Dist(d, Int(sqrt(a + b/sin(e + f*x))/sin(e + f*x), x), x) def replacement4220(a, b, c, d, e, f, x): return Dist(a*c, Int(S(1)/sqrt(a + b/cos(e + f*x)), x), x) + Int((a*d + b*c + b*d/cos(e + f*x))/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x) def replacement4221(a, b, c, d, e, f, x): return Dist(a*c, Int(S(1)/sqrt(a + b/sin(e + f*x)), x), x) + Int((a*d + b*c + b*d/sin(e + f*x))/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x) def replacement4222(a, b, c, d, e, f, m, x): return Dist(S(1)/m, Int((a + b/cos(e + f*x))**(m + S(-1))*Simp(a*c*m + (a*d*(S(2)*m + S(-1)) + b*c*m)/cos(e + f*x), x), x), x) + Simp(b*d*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*m), x) def replacement4223(a, b, c, d, e, f, m, x): return Dist(S(1)/m, Int((a + b/sin(e + f*x))**(m + S(-1))*Simp(a*c*m + (a*d*(S(2)*m + S(-1)) + b*c*m)/sin(e + f*x), x), x), x) - Simp(b*d*(a + b/sin(e + f*x))**(m + S(-1))/(f*m*tan(e + f*x)), x) def replacement4224(a, b, c, d, e, f, m, x): return Dist(S(1)/m, Int((a + b/cos(e + f*x))**(m + S(-2))*Simp(a**S(2)*c*m + b*(a*d*(S(2)*m + S(-1)) + b*c*m)/cos(e + f*x)**S(2) + (a**S(2)*d*m + S(2)*a*b*c*m + b**S(2)*d*(m + S(-1)))/cos(e + f*x), x), x), x) + Simp(b*d*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*m), x) def replacement4225(a, b, c, d, e, f, m, x): return Dist(S(1)/m, Int((a + b/sin(e + f*x))**(m + S(-2))*Simp(a**S(2)*c*m + b*(a*d*(S(2)*m + S(-1)) + b*c*m)/sin(e + f*x)**S(2) + (a**S(2)*d*m + S(2)*a*b*c*m + b**S(2)*d*(m + S(-1)))/sin(e + f*x), x), x), x) - Simp(b*d*(a + b/sin(e + f*x))**(m + S(-1))/(f*m*tan(e + f*x)), x) def replacement4226(a, b, c, d, e, f, x): return -Dist((-a*d + b*c)/a, Int(S(1)/((a + b/cos(e + f*x))*cos(e + f*x)), x), x) + Simp(c*x/a, x) def replacement4227(a, b, c, d, e, f, x): return -Dist((-a*d + b*c)/a, Int(S(1)/((a + b/sin(e + f*x))*sin(e + f*x)), x), x) + Simp(c*x/a, x) def replacement4228(a, b, c, d, e, f, x): return Dist(c/a, Int(sqrt(a + b/cos(e + f*x)), x), x) - Dist((-a*d + b*c)/a, Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4229(a, b, c, d, e, f, x): return Dist(c/a, Int(sqrt(a + b/sin(e + f*x)), x), x) - Dist((-a*d + b*c)/a, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4230(a, b, c, d, e, f, x): return Dist(c, Int(S(1)/sqrt(a + b/cos(e + f*x)), x), x) + Dist(d, Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4231(a, b, c, d, e, f, x): return Dist(c, Int(S(1)/sqrt(a + b/sin(e + f*x)), x), x) + Dist(d, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4232(a, b, c, d, e, f, m, x): return Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(a*c*(S(2)*m + S(1)) - (m + S(1))*(-a*d + b*c)/cos(e + f*x), x), x), x) + Simp((a + b/cos(e + f*x))**m*(-a*d + b*c)*tan(e + f*x)/(b*f*(S(2)*m + S(1))), x) def replacement4233(a, b, c, d, e, f, m, x): return Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(a*c*(S(2)*m + S(1)) - (m + S(1))*(-a*d + b*c)/sin(e + f*x), x), x), x) - Simp((a + b/sin(e + f*x))**m*(-a*d + b*c)/(b*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4234(a, b, c, d, e, f, m, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(-a*(m + S(1))*(-a*d + b*c)/cos(e + f*x) + b*(m + S(2))*(-a*d + b*c)/cos(e + f*x)**S(2) + c*(a**S(2) - b**S(2))*(m + S(1)), x), x), x) - Simp(b*(a + b/cos(e + f*x))**(m + S(1))*(-a*d + b*c)*tan(e + f*x)/(a*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4235(a, b, c, d, e, f, m, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(-a*(m + S(1))*(-a*d + b*c)/sin(e + f*x) + b*(m + S(2))*(-a*d + b*c)/sin(e + f*x)**S(2) + c*(a**S(2) - b**S(2))*(m + S(1)), x), x), x) + Simp(b*(a + b/sin(e + f*x))**(m + S(1))*(-a*d + b*c)/(a*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4236(a, b, c, d, e, f, m, x): return Dist(c, Int((a + b/cos(e + f*x))**m, x), x) + Dist(d, Int((a + b/cos(e + f*x))**m/cos(e + f*x), x), x) def replacement4237(a, b, c, d, e, f, m, x): return Dist(c, Int((a + b/sin(e + f*x))**m, x), x) + Dist(d, Int((a + b/sin(e + f*x))**m/sin(e + f*x), x), x) def replacement4238(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b/cos(e + f*x)), x), x) - Dist(d/c, Int(sqrt(a + b/cos(e + f*x))/((c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4239(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b/sin(e + f*x)), x), x) - Dist(d/c, Int(sqrt(a + b/sin(e + f*x))/((c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4240(a, b, c, d, e, f, x): return Dist(a/c, Int(S(1)/sqrt(a + b/cos(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(S(1)/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4241(a, b, c, d, e, f, x): return Dist(a/c, Int(S(1)/sqrt(a + b/sin(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(S(1)/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4242(a, b, c, d, e, f, x): return Dist(a/c, Int(sqrt(a + b/cos(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(sqrt(a + b/cos(e + f*x))/((c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4243(a, b, c, d, e, f, x): return Dist(a/c, Int(sqrt(a + b/sin(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(sqrt(a + b/sin(e + f*x))/((c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4244(a, b, c, d, e, f, x): return Dist(S(1)/(c*d), Int((a**S(2)*d + b**S(2)*c/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) - Dist((-a*d + b*c)**S(2)/(c*d), Int(S(1)/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4245(a, b, c, d, e, f, x): return Dist(S(1)/(c*d), Int((a**S(2)*d + b**S(2)*c/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) - Dist((-a*d + b*c)**S(2)/(c*d), Int(S(1)/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4246(a, b, c, d, e, f, x): return Dist(S(1)/(c*(-a*d + b*c)), Int((-a*d + b*c - b*d/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) + Dist(d**S(2)/(c*(-a*d + b*c)), Int(sqrt(a + b/cos(e + f*x))/((c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4247(a, b, c, d, e, f, x): return Dist(S(1)/(c*(-a*d + b*c)), Int((-a*d + b*c - b*d/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) + Dist(d**S(2)/(c*(-a*d + b*c)), Int(sqrt(a + b/sin(e + f*x))/((c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4248(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(S(1)/sqrt(a + b/cos(e + f*x)), x), x) - Dist(d/c, Int(S(1)/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4249(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(S(1)/sqrt(a + b/sin(e + f*x)), x), x) - Dist(d/c, Int(S(1)/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4250(a, b, c, d, e, f, x): return Dist(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))/tan(e + f*x), Int(tan(e + f*x), x), x) def replacement4251(a, b, c, d, e, f, x): return Dist(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x), Int(S(1)/tan(e + f*x), x), x) def replacement4252(a, b, c, d, e, f, x): return Dist(c, Int(sqrt(a + b/cos(e + f*x))/sqrt(c + d/cos(e + f*x)), x), x) + Dist(d, Int(sqrt(a + b/cos(e + f*x))/(sqrt(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4253(a, b, c, d, e, f, x): return Dist(c, Int(sqrt(a + b/sin(e + f*x))/sqrt(c + d/sin(e + f*x)), x), x) + Dist(d, Int(sqrt(a + b/sin(e + f*x))/(sqrt(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4254(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x)), x), x) - Dist(d/c, Int(sqrt(a + b/cos(e + f*x))/(sqrt(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4255(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x)), x), x) - Dist(d/c, Int(sqrt(a + b/sin(e + f*x))/(sqrt(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4256(a, b, c, d, e, f, x): return Dist(S(2)*a/f, Subst(Int(S(1)/(a*c*x**S(2) + S(1)), x), x, tan(e + f*x)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x)))), x) def replacement4257(a, b, c, d, e, f, x): return Dist(-S(2)*a/f, Subst(Int(S(1)/(a*c*x**S(2) + S(1)), x), x, S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x))), x) def replacement4258(a, b, c, d, e, f, x): return Dist(a/c, Int(sqrt(c + d/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(S(1)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4259(a, b, c, d, e, f, x): return Dist(a/c, Int(sqrt(c + d/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) + Dist((-a*d + b*c)/c, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4260(a, b, c, d, e, f, x): return Simp(-S(2)*sqrt((S(1) + S(1)/cos(e + f*x))*(-a*d + b*c)/((a + b/cos(e + f*x))*(c - d)))*sqrt(-(S(1) - S(1)/cos(e + f*x))*(-a*d + b*c)/((a + b/cos(e + f*x))*(c + d)))*(a + b/cos(e + f*x))*EllipticPi(a*(c + d)/(c*(a + b)), asin(sqrt(c + d/cos(e + f*x))*Rt((a + b)/(c + d), S(2))/sqrt(a + b/cos(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))/(c*f*Rt((a + b)/(c + d), S(2))*tan(e + f*x)), x) def replacement4261(a, b, c, d, e, f, x): return Simp(S(2)*sqrt((S(1) + S(1)/sin(e + f*x))*(-a*d + b*c)/((a + b/sin(e + f*x))*(c - d)))*sqrt(-(S(1) - S(1)/sin(e + f*x))*(-a*d + b*c)/((a + b/sin(e + f*x))*(c + d)))*(a + b/sin(e + f*x))*EllipticPi(a*(c + d)/(c*(a + b)), asin(sqrt(c + d/sin(e + f*x))*Rt((a + b)/(c + d), S(2))/sqrt(a + b/sin(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))*tan(e + f*x)/(c*f*Rt((a + b)/(c + d), S(2))), x) def replacement4262(a, b, c, d, e, f, x): return Dist(tan(e + f*x)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), Int(S(1)/tan(e + f*x), x), x) def replacement4263(a, b, c, d, e, f, x): return Dist(S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), Int(tan(e + f*x), x), x) def replacement4264(a, b, c, d, e, f, x): return Dist(S(1)/a, Int(sqrt(a + b/cos(e + f*x))/sqrt(c + d/cos(e + f*x)), x), x) - Dist(b/a, Int(S(1)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4265(a, b, c, d, e, f, x): return Dist(S(1)/a, Int(sqrt(a + b/sin(e + f*x))/sqrt(c + d/sin(e + f*x)), x), x) - Dist(b/a, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4266(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b/cos(e + f*x))/sqrt(c + d/cos(e + f*x)), x), x) - Dist(d/c, Int(sqrt(a + b/cos(e + f*x))/((c + d/cos(e + f*x))**(S(3)/2)*cos(e + f*x)), x), x) def replacement4267(a, b, c, d, e, f, x): return Dist(S(1)/c, Int(sqrt(a + b/sin(e + f*x))/sqrt(c + d/sin(e + f*x)), x), x) - Dist(d/c, Int(sqrt(a + b/sin(e + f*x))/((c + d/sin(e + f*x))**(S(3)/2)*sin(e + f*x)), x), x) def replacement4268(a, b, c, d, e, f, m, n, x): return -Dist(a**S(2)*tan(e + f*x)/(f*sqrt(a - b/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), Subst(Int((a + b*x)**(m + S(-1)/2)*(c + d*x)**n/(x*sqrt(a - b*x)), x), x, S(1)/cos(e + f*x)), x) def replacement4269(a, b, c, d, e, f, m, n, x): return Dist(a**S(2)*cos(e + f*x)/(f*sqrt(a - b/sin(e + f*x))*sqrt(a + b/sin(e + f*x))), Subst(Int((a + b*x)**(m + S(-1)/2)*(c + d*x)**n/(x*sqrt(a - b*x)), x), x, S(1)/sin(e + f*x)), x) def replacement4270(a, b, c, d, e, f, m, n, x): return Int((a*cos(e + f*x) + b)**m*(c*cos(e + f*x) + d)**n*cos(e + f*x)**(-m - n), x) def replacement4271(a, b, c, d, e, f, m, n, x): return Int((a*sin(e + f*x) + b)**m*(c*sin(e + f*x) + d)**n*sin(e + f*x)**(-m - n), x) def replacement4272(a, b, c, d, e, f, m, n, x): return Dist(sqrt(a + b/cos(e + f*x))*sqrt(c*cos(e + f*x) + d)/(sqrt(c + d/cos(e + f*x))*sqrt(a*cos(e + f*x) + b)), Int((a*cos(e + f*x) + b)**m*(c*cos(e + f*x) + d)**n*cos(e + f*x)**(-m - n), x), x) def replacement4273(a, b, c, d, e, f, m, n, x): return Dist(sqrt(a + b/sin(e + f*x))*sqrt(c*sin(e + f*x) + d)/(sqrt(c + d/sin(e + f*x))*sqrt(a*sin(e + f*x) + b)), Int((a*sin(e + f*x) + b)**m*(c*sin(e + f*x) + d)**n*sin(e + f*x)**(-m - n), x), x) def replacement4274(a, b, c, d, e, f, m, n, x): return Dist((a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n*(a*cos(e + f*x) + b)**(-m)*(c*cos(e + f*x) + d)**(-n)*cos(e + f*x)**(m + n), Int((a*cos(e + f*x) + b)**m*(c*cos(e + f*x) + d)**n*cos(e + f*x)**(-m - n), x), x) def replacement4275(a, b, c, d, e, f, m, n, x): return Dist((a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n*(a*sin(e + f*x) + b)**(-m)*(c*sin(e + f*x) + d)**(-n)*sin(e + f*x)**(m + n), Int((a*sin(e + f*x) + b)**m*(c*sin(e + f*x) + d)**n*sin(e + f*x)**(-m - n), x), x) def replacement4276(a, b, c, d, e, f, m, n, x): return Int(ExpandTrig((a + b/cos(e + f*x))**m, (c + d/cos(e + f*x))**n, x), x) def replacement4277(a, b, c, d, e, f, m, n, x): return Int(ExpandTrig((a + b/sin(e + f*x))**m, (c + d/sin(e + f*x))**n, x), x) def replacement4278(a, b, c, d, e, f, m, n, x): return Int((a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n, x) def replacement4279(a, b, c, d, e, f, m, n, x): return Int((a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n, x) def replacement4280(a, b, d, e, f, m, n, x): return Dist(d**m, Int((d*cos(e + f*x))**(-m + n)*(a*cos(e + f*x) + b)**m, x), x) def replacement4281(a, b, d, e, f, m, n, x): return Dist(d**m, Int((d*sin(e + f*x))**(-m + n)*(a*sin(e + f*x) + b)**m, x), x) def replacement4282(a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d/cos(e + f*x))**p)**FracPart(n)*(d/cos(e + f*x))**(-p*FracPart(n)), Int((d/cos(e + f*x))**(n*p)*(a + b/cos(e + f*x))**m, x), x) def replacement4283(a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d/sin(e + f*x))**p)**FracPart(n)*(d/sin(e + f*x))**(-p*FracPart(n)), Int((d*cos(e + f*x))**(n*p)*(a + b*cos(e + f*x))**m, x), x) def replacement4284(a, b, c, d, e, f, m, n, x): return -Simp(b*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4285(a, b, c, d, e, f, m, n, x): return Simp(b*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4286(a, b, c, d, e, f, m, n, x): return Dist((m + n + S(1))/(a*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*(c + d/cos(e + f*x))**n/cos(e + f*x), x), x) - Simp(b*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4287(a, b, c, d, e, f, m, n, x): return Dist((m + n + S(1))/(a*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*(c + d/sin(e + f*x))**n/sin(e + f*x), x), x) + Simp(b*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4288(a, b, c, d, e, f, x): return -Simp(a*c*log(S(1) + b/(a*cos(e + f*x)))*tan(e + f*x)/(b*f*sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), x) def replacement4289(a, b, c, d, e, f, x): return Simp(a*c*log(S(1) + b/(a*sin(e + f*x)))/(b*f*sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), x) def replacement4290(a, b, c, d, e, f, m, x): return Simp(-S(2)*a*c*(a + b/cos(e + f*x))**m*tan(e + f*x)/(b*f*sqrt(c + d/cos(e + f*x))*(S(2)*m + S(1))), x) def replacement4291(a, b, c, d, e, f, m, x): return Simp(S(2)*a*c*(a + b/sin(e + f*x))**m/(b*f*sqrt(c + d/sin(e + f*x))*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4292(a, b, c, d, e, f, m, n, x): return -Dist(d*(S(2)*n + S(-1))/(b*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*(c + d/cos(e + f*x))**(n + S(-1))/cos(e + f*x), x), x) + Simp(-S(2)*a*c*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**(n + S(-1))*tan(e + f*x)/(b*f*(S(2)*m + S(1))), x) def replacement4293(a, b, c, d, e, f, m, n, x): return -Dist(d*(S(2)*n + S(-1))/(b*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*(c + d/sin(e + f*x))**(n + S(-1))/sin(e + f*x), x), x) + Simp(S(2)*a*c*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**(n + S(-1))/(b*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4294(a, b, c, d, e, f, m, n, x): return Dist(c*(S(2)*n + S(-1))/(m + n), Int((a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**(n + S(-1))/cos(e + f*x), x), x) + Simp(d*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**(n + S(-1))*tan(e + f*x)/(f*(m + n)), x) def replacement4295(a, b, c, d, e, f, m, n, x): return Dist(c*(S(2)*n + S(-1))/(m + n), Int((a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**(n + S(-1))/sin(e + f*x), x), x) - Simp(d*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**(n + S(-1))/(f*(m + n)*tan(e + f*x)), x) def replacement4296(a, b, c, d, e, f, n, x): return Dist(S(2)*c, Int((c + d/cos(e + f*x))**(n + S(-1))/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) + Simp(S(2)*d*(c + d/cos(e + f*x))**(n + S(-1))*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(-1))), x) def replacement4297(a, b, c, d, e, f, n, x): return Dist(S(2)*c, Int((c + d/sin(e + f*x))**(n + S(-1))/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) + Simp(-S(2)*d*(c + d/sin(e + f*x))**(n + S(-1))/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(-1))*tan(e + f*x)), x) def replacement4298(a, b, c, d, e, f, m, n, x): return -Dist(d*(S(2)*n + S(-1))/(b*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*(c + d/cos(e + f*x))**(n + S(-1))/cos(e + f*x), x), x) + Simp(-S(2)*a*c*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**(n + S(-1))*tan(e + f*x)/(b*f*(S(2)*m + S(1))), x) def replacement4299(a, b, c, d, e, f, m, n, x): return -Dist(d*(S(2)*n + S(-1))/(b*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*(c + d/sin(e + f*x))**(n + S(-1))/sin(e + f*x), x), x) + Simp(S(2)*a*c*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**(n + S(-1))/(b*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4300(a, b, c, d, e, f, m, n, x): return Dist((-a*c)**m, Int(ExpandTrig(tan(e + f*x)**(S(2)*m)/cos(e + f*x), (c + d/cos(e + f*x))**(-m + n), x), x), x) def replacement4301(a, b, c, d, e, f, m, n, x): return Dist((-a*c)**m, Int(ExpandTrig((S(1)/tan(e + f*x))**(S(2)*m)/sin(e + f*x), (c + d/sin(e + f*x))**(-m + n), x), x), x) def replacement4302(a, b, c, d, e, f, m, x): return Dist((-a*c)**(m + S(1)/2)*tan(e + f*x)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), Int(tan(e + f*x)**(S(2)*m)/cos(e + f*x), x), x) def replacement4303(a, b, c, d, e, f, m, x): return Dist((-a*c)**(m + S(1)/2)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), Int((S(1)/tan(e + f*x))**(S(2)*m)/sin(e + f*x), x), x) def replacement4304(a, b, c, d, e, f, m, n, x): return Dist((m + n + S(1))/(a*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*(c + d/cos(e + f*x))**n/cos(e + f*x), x), x) - Simp(b*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4305(a, b, c, d, e, f, m, n, x): return Dist((m + n + S(1))/(a*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*(c + d/sin(e + f*x))**n/sin(e + f*x), x), x) + Simp(b*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4306(a, b, c, d, e, f, m, n, x): return -Dist(a*c*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), Subst(Int((a + b*x)**(m + S(-1)/2)*(c + d*x)**(n + S(-1)/2), x), x, S(1)/cos(e + f*x)), x) def replacement4307(a, b, c, d, e, f, m, n, x): return Dist(a*c/(f*sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), Subst(Int((a + b*x)**(m + S(-1)/2)*(c + d*x)**(n + S(-1)/2), x), x, S(1)/sin(e + f*x)), x) def replacement4308(a, b, c, d, e, f, g, m, n, p, x): return Dist((-a*c)**m, Int(ExpandTrig((g/cos(e + f*x))**p*tan(e + f*x)**(S(2)*m), (c + d/cos(e + f*x))**(-m + n), x), x), x) def replacement4309(a, b, c, d, e, f, g, m, n, p, x): return Dist((-a*c)**m, Int(ExpandTrig((g/sin(e + f*x))**p*(S(1)/tan(e + f*x))**(S(2)*m), (c + d/sin(e + f*x))**(-m + n), x), x), x) def replacement4310(a, b, c, d, e, f, g, m, p, x): return Dist((-a*c)**(m + S(1)/2)*tan(e + f*x)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), Int((g/cos(e + f*x))**p*tan(e + f*x)**(S(2)*m), x), x) def replacement4311(a, b, c, d, e, f, g, m, p, x): return Dist((-a*c)**(m + S(1)/2)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), Int((g/sin(e + f*x))**p*(S(1)/tan(e + f*x))**(S(2)*m), x), x) def replacement4312(a, b, c, d, e, f, g, m, n, p, x): return -Dist(a*c*g*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))), Subst(Int((g*x)**(p + S(-1))*(a + b*x)**(m + S(-1)/2)*(c + d*x)**(n + S(-1)/2), x), x, S(1)/cos(e + f*x)), x) def replacement4313(a, b, c, d, e, f, g, m, n, p, x): return Dist(a*c*g/(f*sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x)), Subst(Int((g*x)**(p + S(-1))*(a + b*x)**(m + S(-1)/2)*(c + d*x)**(n + S(-1)/2), x), x, S(1)/sin(e + f*x)), x) def replacement4314(a, b, c, d, e, f, g, x): return Dist(S(2)*b*g/f, Subst(Int(S(1)/(a*d + b*c - c*g*x**S(2)), x), x, b*tan(e + f*x)/(sqrt(g/cos(e + f*x))*sqrt(a + b/cos(e + f*x)))), x) def replacement4315(a, b, c, d, e, f, g, x): return Dist(-S(2)*b*g/f, Subst(Int(S(1)/(a*d + b*c - c*g*x**S(2)), x), x, b/(sqrt(g/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x))), x) def replacement4316(a, b, c, d, e, f, g, x): return Dist(a/c, Int(sqrt(g/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) + Dist((-a*d + b*c)/(c*g), Int((g/cos(e + f*x))**(S(3)/2)/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))), x), x) def replacement4317(a, b, c, d, e, f, g, x): return Dist(a/c, Int(sqrt(g/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) + Dist((-a*d + b*c)/(c*g), Int((g/sin(e + f*x))**(S(3)/2)/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))), x), x) def replacement4318(a, b, c, d, e, f, x): return Dist(S(2)*b/f, Subst(Int(S(1)/(a*d + b*c + d*x**S(2)), x), x, b*tan(e + f*x)/sqrt(a + b/cos(e + f*x))), x) def replacement4319(a, b, c, d, e, f, x): return Dist(-S(2)*b/f, Subst(Int(S(1)/(a*d + b*c + d*x**S(2)), x), x, b/(sqrt(a + b/sin(e + f*x))*tan(e + f*x))), x) def replacement4320(a, b, c, d, e, f, x): return Simp(sqrt(c/(c + d/cos(e + f*x)))*sqrt(a + b/cos(e + f*x))*EllipticE(asin(c*tan(e + f*x)/(c + d/cos(e + f*x))), -(-a*d + b*c)/(a*d + b*c))/(d*f*sqrt(c*d*(a + b/cos(e + f*x))/((c + d/cos(e + f*x))*(a*d + b*c)))), x) def replacement4321(a, b, c, d, e, f, x): return -Simp(sqrt(c/(c + d/sin(e + f*x)))*sqrt(a + b/sin(e + f*x))*EllipticE(asin(c/((c + d/sin(e + f*x))*tan(e + f*x))), -(-a*d + b*c)/(a*d + b*c))/(d*f*sqrt(c*d*(a + b/sin(e + f*x))/((c + d/sin(e + f*x))*(a*d + b*c)))), x) def replacement4322(a, b, c, d, e, f, x): return Dist(b/d, Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int(S(1)/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4323(a, b, c, d, e, f, x): return Dist(b/d, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int(S(1)/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4324(a, b, c, d, e, f, g, x): return Dist(g/d, Int(sqrt(g/cos(e + f*x))*sqrt(a + b/cos(e + f*x)), x), x) - Dist(c*g/d, Int(sqrt(g/cos(e + f*x))*sqrt(a + b/cos(e + f*x))/(c + d/cos(e + f*x)), x), x) def replacement4325(a, b, c, d, e, f, g, x): return Dist(g/d, Int(sqrt(g/sin(e + f*x))*sqrt(a + b/sin(e + f*x)), x), x) - Dist(c*g/d, Int(sqrt(g/sin(e + f*x))*sqrt(a + b/sin(e + f*x))/(c + d/sin(e + f*x)), x), x) def replacement4326(a, b, c, d, e, f, g, x): return Dist(b/d, Int((g/cos(e + f*x))**(S(3)/2)/sqrt(a + b/cos(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int((g/cos(e + f*x))**(S(3)/2)/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))), x), x) def replacement4327(a, b, c, d, e, f, g, x): return Dist(b/d, Int((g/sin(e + f*x))**(S(3)/2)/sqrt(a + b/sin(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int((g/sin(e + f*x))**(S(3)/2)/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))), x), x) def replacement4328(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) - Dist(d/(-a*d + b*c), Int(sqrt(a + b/cos(e + f*x))/((c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4329(a, b, c, d, e, f, x): return Dist(b/(-a*d + b*c), Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) - Dist(d/(-a*d + b*c), Int(sqrt(a + b/sin(e + f*x))/((c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4330(a, b, c, d, e, f, x): return Simp(S(2)*sqrt((a + b/cos(e + f*x))/(a + b))*EllipticPi(S(2)*d/(c + d), asin(sqrt(S(2))*sqrt(S(1) - S(1)/cos(e + f*x))/S(2)), S(2)*b/(a + b))*tan(e + f*x)/(f*sqrt(-tan(e + f*x)**S(2))*sqrt(a + b/cos(e + f*x))*(c + d)), x) def replacement4331(a, b, c, d, e, f, x): return Simp(-S(2)*sqrt((a + b/sin(e + f*x))/(a + b))*EllipticPi(S(2)*d/(c + d), asin(sqrt(S(2))*sqrt(S(1) - S(1)/sin(e + f*x))/S(2)), S(2)*b/(a + b))/(f*sqrt(-S(1)/tan(e + f*x)**S(2))*sqrt(a + b/sin(e + f*x))*(c + d)*tan(e + f*x)), x) def replacement4332(a, b, c, d, e, f, g, x): return -Dist(a*g/(-a*d + b*c), Int(sqrt(g/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) + Dist(c*g/(-a*d + b*c), Int(sqrt(g/cos(e + f*x))*sqrt(a + b/cos(e + f*x))/(c + d/cos(e + f*x)), x), x) def replacement4333(a, b, c, d, e, f, g, x): return -Dist(a*g/(-a*d + b*c), Int(sqrt(g/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) + Dist(c*g/(-a*d + b*c), Int(sqrt(g/sin(e + f*x))*sqrt(a + b/sin(e + f*x))/(c + d/sin(e + f*x)), x), x) def replacement4334(a, b, c, d, e, f, g, x): return Dist(g*sqrt(g/cos(e + f*x))*sqrt(a*cos(e + f*x) + b)/sqrt(a + b/cos(e + f*x)), Int(S(1)/(sqrt(a*cos(e + f*x) + b)*(c*cos(e + f*x) + d)), x), x) def replacement4335(a, b, c, d, e, f, g, x): return Dist(g*sqrt(g/sin(e + f*x))*sqrt(a*sin(e + f*x) + b)/sqrt(a + b/sin(e + f*x)), Int(S(1)/(sqrt(a*sin(e + f*x) + b)*(c*sin(e + f*x) + d)), x), x) def replacement4336(a, b, c, d, e, f, x): return -Dist(a/(-a*d + b*c), Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) + Dist(c/(-a*d + b*c), Int(sqrt(a + b/cos(e + f*x))/((c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4337(a, b, c, d, e, f, x): return -Dist(a/(-a*d + b*c), Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) + Dist(c/(-a*d + b*c), Int(sqrt(a + b/sin(e + f*x))/((c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4338(a, b, c, d, e, f, x): return Dist(S(1)/d, Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) - Dist(c/d, Int(S(1)/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4339(a, b, c, d, e, f, x): return Dist(S(1)/d, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) - Dist(c/d, Int(S(1)/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4340(a, b, c, d, e, f, g, x): return Dist(g**S(2)/(d*(-a*d + b*c)), Int(sqrt(g/cos(e + f*x))*(a*c + (-a*d + b*c)/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) - Dist(c**S(2)*g**S(2)/(d*(-a*d + b*c)), Int(sqrt(g/cos(e + f*x))*sqrt(a + b/cos(e + f*x))/(c + d/cos(e + f*x)), x), x) def replacement4341(a, b, c, d, e, f, g, x): return Dist(g**S(2)/(d*(-a*d + b*c)), Int(sqrt(g/sin(e + f*x))*(a*c + (-a*d + b*c)/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) - Dist(c**S(2)*g**S(2)/(d*(-a*d + b*c)), Int(sqrt(g/sin(e + f*x))*sqrt(a + b/sin(e + f*x))/(c + d/sin(e + f*x)), x), x) def replacement4342(a, b, c, d, e, f, g, x): return Dist(g/d, Int((g/cos(e + f*x))**(S(3)/2)/sqrt(a + b/cos(e + f*x)), x), x) - Dist(c*g/d, Int((g/cos(e + f*x))**(S(3)/2)/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))), x), x) def replacement4343(a, b, c, d, e, f, g, x): return Dist(g/d, Int((g/sin(e + f*x))**(S(3)/2)/sqrt(a + b/sin(e + f*x)), x), x) - Dist(c*g/d, Int((g/sin(e + f*x))**(S(3)/2)/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))), x), x) def replacement4344(a, b, c, d, e, f, x): return Dist(S(2)*b/f, Subst(Int(S(1)/(-b*d*x**S(2) + S(1)), x), x, tan(e + f*x)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x)))), x) def replacement4345(a, b, c, d, e, f, x): return Dist(-S(2)*b/f, Subst(Int(S(1)/(-b*d*x**S(2) + S(1)), x), x, S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x))), x) def replacement4346(a, b, c, d, e, f, x): return Dist(b/d, Int(sqrt(c + d/cos(e + f*x))/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int(S(1)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4347(a, b, c, d, e, f, x): return Dist(b/d, Int(sqrt(c + d/sin(e + f*x))/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) - Dist((-a*d + b*c)/d, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4348(a, b, c, d, e, f, x): return Simp(S(2)*sqrt((S(1) + S(1)/cos(e + f*x))*(-a*d + b*c)/((a + b/cos(e + f*x))*(c - d)))*sqrt(-(S(1) - S(1)/cos(e + f*x))*(-a*d + b*c)/((a + b/cos(e + f*x))*(c + d)))*(a + b/cos(e + f*x))*EllipticPi(b*(c + d)/(d*(a + b)), asin(sqrt((a + b)/(c + d))*sqrt(c + d/cos(e + f*x))/sqrt(a + b/cos(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))/(d*f*sqrt((a + b)/(c + d))*tan(e + f*x)), x) def replacement4349(a, b, c, d, e, f, x): return Simp(-S(2)*sqrt((S(1) + S(1)/sin(e + f*x))*(-a*d + b*c)/((a + b/sin(e + f*x))*(c - d)))*sqrt(-(S(1) - S(1)/sin(e + f*x))*(-a*d + b*c)/((a + b/sin(e + f*x))*(c + d)))*(a + b/sin(e + f*x))*EllipticPi(b*(c + d)/(d*(a + b)), asin(sqrt((a + b)/(c + d))*sqrt(c + d/sin(e + f*x))/sqrt(a + b/sin(e + f*x))), (a - b)*(c + d)/((a + b)*(c - d)))*tan(e + f*x)/(d*f*sqrt((a + b)/(c + d))), x) def replacement4350(a, b, c, d, e, f, x): return Dist(S(2)*a/(b*f), Subst(Int(S(1)/(x**S(2)*(a*c - b*d) + S(2)), x), x, tan(e + f*x)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x)))), x) def replacement4351(a, b, c, d, e, f, x): return Dist(-S(2)*a/(b*f), Subst(Int(S(1)/(x**S(2)*(a*c - b*d) + S(2)), x), x, S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*tan(e + f*x))), x) def replacement4352(a, b, c, d, e, f, x): return Simp(S(2)*sqrt((S(1) - S(1)/cos(e + f*x))*(-a*d + b*c)/((a + b)*(c + d/cos(e + f*x))))*sqrt(-(S(1) + S(1)/cos(e + f*x))*(-a*d + b*c)/((a - b)*(c + d/cos(e + f*x))))*(c + d/cos(e + f*x))*EllipticF(asin(sqrt(a + b/cos(e + f*x))*Rt((c + d)/(a + b), S(2))/sqrt(c + d/cos(e + f*x))), (a + b)*(c - d)/((a - b)*(c + d)))/(f*(-a*d + b*c)*Rt((c + d)/(a + b), S(2))*tan(e + f*x)), x) def replacement4353(a, b, c, d, e, f, x): return Simp(-S(2)*sqrt((S(1) - S(1)/sin(e + f*x))*(-a*d + b*c)/((a + b)*(c + d/sin(e + f*x))))*sqrt(-(S(1) + S(1)/sin(e + f*x))*(-a*d + b*c)/((a - b)*(c + d/sin(e + f*x))))*(c + d/sin(e + f*x))*EllipticF(asin(sqrt(a + b/sin(e + f*x))*Rt((c + d)/(a + b), S(2))/sqrt(c + d/sin(e + f*x))), (a + b)*(c - d)/((a - b)*(c + d)))*tan(e + f*x)/(f*(-a*d + b*c)*Rt((c + d)/(a + b), S(2))), x) def replacement4354(a, b, c, d, e, f, x): return Dist(S(1)/b, Int(sqrt(a + b/cos(e + f*x))/(sqrt(c + d/cos(e + f*x))*cos(e + f*x)), x), x) - Dist(a/b, Int(S(1)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4355(a, b, c, d, e, f, x): return Dist(S(1)/b, Int(sqrt(a + b/sin(e + f*x))/(sqrt(c + d/sin(e + f*x))*sin(e + f*x)), x), x) - Dist(a/b, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4356(a, b, c, d, e, f, x): return Dist((a - b)/(c - d), Int(S(1)/(sqrt(a + b/cos(e + f*x))*sqrt(c + d/cos(e + f*x))*cos(e + f*x)), x), x) + Dist((-a*d + b*c)/(c - d), Int((S(1) + S(1)/cos(e + f*x))/(sqrt(a + b/cos(e + f*x))*(c + d/cos(e + f*x))**(S(3)/2)*cos(e + f*x)), x), x) def replacement4357(a, b, c, d, e, f, x): return Dist((a - b)/(c - d), Int(S(1)/(sqrt(a + b/sin(e + f*x))*sqrt(c + d/sin(e + f*x))*sin(e + f*x)), x), x) + Dist((-a*d + b*c)/(c - d), Int((S(1) + S(1)/sin(e + f*x))/(sqrt(a + b/sin(e + f*x))*(c + d/sin(e + f*x))**(S(3)/2)*sin(e + f*x)), x), x) def replacement4358(a, b, c, d, e, f, g, m, n, p, x): return -Dist(a**S(2)*g*tan(e + f*x)/(f*sqrt(a - b/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), Subst(Int((g*x)**(p + S(-1))*(a + b*x)**(m + S(-1)/2)*(c + d*x)**n/sqrt(a - b*x), x), x, S(1)/cos(e + f*x)), x) def replacement4359(a, b, c, d, e, f, g, m, n, p, x): return Dist(a**S(2)*g/(f*sqrt(a - b/sin(e + f*x))*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), Subst(Int((g*x)**(p + S(-1))*(a + b*x)**(m + S(-1)/2)*(c + d*x)**n/sqrt(a - b*x), x), x, S(1)/sin(e + f*x)), x) def replacement4360(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(-m - n), Int((g/cos(e + f*x))**(m + n + p)*(a*cos(e + f*x) + b)**m*(c*cos(e + f*x) + d)**n, x), x) def replacement4361(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(-m - n), Int((g/sin(e + f*x))**(m + n + p)*(a*sin(e + f*x) + b)**m*(c*sin(e + f*x) + d)**n, x), x) def replacement4362(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(-m)*(g/cos(e + f*x))**(m + p)*(c + d/cos(e + f*x))**n*(c*cos(e + f*x) + d)**(-n), Int((a*cos(e + f*x) + b)**m*(c*cos(e + f*x) + d)**n, x), x) def replacement4363(a, b, c, d, e, f, g, m, n, p, x): return Dist(g**(-m)*(g/sin(e + f*x))**(m + p)*(c + d/sin(e + f*x))**n*(c*sin(e + f*x) + d)**(-n), Int((a*sin(e + f*x) + b)**m*(c*sin(e + f*x) + d)**n, x), x) def replacement4364(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/cos(e + f*x))**p*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n*(a*cos(e + f*x) + b)**(-m)*(c*cos(e + f*x) + d)**(-n), Int((a*cos(e + f*x) + b)**m*(c*cos(e + f*x) + d)**n, x), x) def replacement4365(a, b, c, d, e, f, g, m, n, p, x): return Dist((g/sin(e + f*x))**p*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n*(a*sin(e + f*x) + b)**(-m)*(c*sin(e + f*x) + d)**(-n), Int((a*sin(e + f*x) + b)**m*(c*sin(e + f*x) + d)**n, x), x) def replacement4366(a, b, c, d, e, f, m, n, p, x): return Dist(sqrt(a + b/cos(e + f*x))*sqrt(c*cos(e + f*x) + d)/(sqrt(c + d/cos(e + f*x))*sqrt(a*cos(e + f*x) + b)), Int((a*cos(e + f*x) + b)**m*(c*cos(e + f*x) + d)**n*cos(e + f*x)**(-m - n - p), x), x) def replacement4367(a, b, c, d, e, f, m, n, p, x): return Dist(sqrt(a + b/sin(e + f*x))*sqrt(c*sin(e + f*x) + d)/(sqrt(c + d/sin(e + f*x))*sqrt(a*sin(e + f*x) + b)), Int((a*sin(e + f*x) + b)**m*(c*sin(e + f*x) + d)**n*sin(e + f*x)**(-m - n - p), x), x) def replacement4368(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g/cos(e + f*x))**p*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n, x), x) def replacement4369(a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrig((g/sin(e + f*x))**p*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n, x), x) def replacement4370(a, b, c, d, e, f, g, m, n, p, x): return Int((g/cos(e + f*x))**p*(a + b/cos(e + f*x))**m*(c + d/cos(e + f*x))**n, x) def replacement4371(a, b, c, d, e, f, g, m, n, p, x): return Int((g/sin(e + f*x))**p*(a + b/sin(e + f*x))**m*(c + d/sin(e + f*x))**n, x) def replacement4372(A, B, a, b, c, d, e, f, x): return Simp(S(2)*A*sqrt((S(1) - S(1)/cos(e + f*x))*(-a*d + b*c)/((a + b)*(c + d/cos(e + f*x))))*(S(1) + S(1)/cos(e + f*x))*EllipticE(asin(sqrt(a + b/cos(e + f*x))*Rt((c + d)/(a + b), S(2))/sqrt(c + d/cos(e + f*x))), (a + b)*(c - d)/((a - b)*(c + d)))/(f*sqrt(-(S(1) + S(1)/cos(e + f*x))*(-a*d + b*c)/((a - b)*(c + d/cos(e + f*x))))*(-a*d + b*c)*Rt((c + d)/(a + b), S(2))*tan(e + f*x)), x) def replacement4373(A, B, a, b, c, d, e, f, x): return Simp(-S(2)*A*sqrt((S(1) - S(1)/sin(e + f*x))*(-a*d + b*c)/((a + b)*(c + d/sin(e + f*x))))*(S(1) + S(1)/sin(e + f*x))*EllipticE(asin(sqrt(a + b/sin(e + f*x))*Rt((c + d)/(a + b), S(2))/sqrt(c + d/sin(e + f*x))), (a + b)*(c - d)/((a - b)*(c + d)))*tan(e + f*x)/(f*sqrt(-(S(1) + S(1)/sin(e + f*x))*(-a*d + b*c)/((a - b)*(c + d/sin(e + f*x))))*(-a*d + b*c)*Rt((c + d)/(a + b), S(2))), x) def replacement4374(A, B, a, b, d, e, f, n, x): return Dist(S(1)/(d*n), Int((d/cos(e + f*x))**(n + S(1))*Simp(n*(A*b + B*a) + (A*a*(n + S(1)) + B*b*n)/cos(e + f*x), x), x), x) - Simp(A*a*(d/cos(e + f*x))**n*tan(e + f*x)/(f*n), x) def replacement4375(A, B, a, b, d, e, f, n, x): return Dist(S(1)/(d*n), Int((d/sin(e + f*x))**(n + S(1))*Simp(n*(A*b + B*a) + (A*a*(n + S(1)) + B*b*n)/sin(e + f*x), x), x), x) + Simp(A*a*(d/sin(e + f*x))**n/(f*n*tan(e + f*x)), x) def replacement4376(A, B, a, b, d, e, f, n, x): return Dist(S(1)/(n + S(1)), Int((d/cos(e + f*x))**n*Simp(A*a*(n + S(1)) + B*b*n + (n + S(1))*(A*b + B*a)/cos(e + f*x), x), x), x) + Simp(B*b*(d/cos(e + f*x))**n*tan(e + f*x)/(f*(n + S(1))), x) def replacement4377(A, B, a, b, d, e, f, n, x): return Dist(S(1)/(n + S(1)), Int((d/sin(e + f*x))**n*Simp(A*a*(n + S(1)) + B*b*n + (n + S(1))*(A*b + B*a)/sin(e + f*x), x), x), x) - Simp(B*b*(d/sin(e + f*x))**n/(f*(n + S(1))*tan(e + f*x)), x) def replacement4378(A, B, a, b, e, f, x): return Dist(B/b, Int(S(1)/cos(e + f*x), x), x) + Dist((A*b - B*a)/b, Int(S(1)/((a + b/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4379(A, B, a, b, e, f, x): return Dist(B/b, Int(S(1)/sin(e + f*x), x), x) + Dist((A*b - B*a)/b, Int(S(1)/((a + b/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4380(A, B, a, b, e, f, m, x): return Simp(B*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4381(A, B, a, b, e, f, m, x): return -Simp(B*(a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4382(A, B, a, b, e, f, m, x): return Dist((A*b*(m + S(1)) + B*a*m)/(a*b*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))/cos(e + f*x), x), x) - Simp((a + b/cos(e + f*x))**m*(A*b - B*a)*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4383(A, B, a, b, e, f, m, x): return Dist((A*b*(m + S(1)) + B*a*m)/(a*b*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))/sin(e + f*x), x), x) + Simp((a + b/sin(e + f*x))**m*(A*b - B*a)/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4384(A, B, a, b, e, f, m, x): return Dist((A*b*(m + S(1)) + B*a*m)/(b*(m + S(1))), Int((a + b/cos(e + f*x))**m/cos(e + f*x), x), x) + Simp(B*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4385(A, B, a, b, e, f, m, x): return Dist((A*b*(m + S(1)) + B*a*m)/(b*(m + S(1))), Int((a + b/sin(e + f*x))**m/sin(e + f*x), x), x) - Simp(B*(a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4386(A, B, a, b, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((a + b/cos(e + f*x))**(m + S(-1))*Simp(A*a*(m + S(1)) + B*b*m + (A*b*(m + S(1)) + B*a*m)/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp(B*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4387(A, B, a, b, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((a + b/sin(e + f*x))**(m + S(-1))*Simp(A*a*(m + S(1)) + B*b*m + (A*b*(m + S(1)) + B*a*m)/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp(B*(a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4388(A, B, a, b, e, f, m, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp((m + S(1))*(A*a - B*b) - (m + S(2))*(A*b - B*a)/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**(m + S(1))*(A*b - B*a)*tan(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4389(A, B, a, b, e, f, m, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp((m + S(1))*(A*a - B*b) - (m + S(2))*(A*b - B*a)/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**(m + S(1))*(A*b - B*a)/(f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4390(A, B, a, b, e, f, x): return Simp(S(2)*sqrt(b*(S(1) - S(1)/cos(e + f*x))/(a + b))*sqrt(-b*(S(1) + S(1)/cos(e + f*x))/(a - b))*(A*b - B*a)*EllipticE(asin(sqrt(a + b/cos(e + f*x))/Rt(a + B*b/A, S(2))), (A*a + B*b)/(A*a - B*b))*Rt(a + B*b/A, S(2))/(b**S(2)*f*tan(e + f*x)), x) def replacement4391(A, B, a, b, e, f, x): return Simp(-S(2)*sqrt(b*(S(1) - S(1)/sin(e + f*x))/(a + b))*sqrt(-b*(S(1) + S(1)/sin(e + f*x))/(a - b))*(A*b - B*a)*EllipticE(asin(sqrt(a + b/sin(e + f*x))/Rt(a + B*b/A, S(2))), (A*a + B*b)/(A*a - B*b))*Rt(a + B*b/A, S(2))*tan(e + f*x)/(b**S(2)*f), x) def replacement4392(A, B, a, b, e, f, x): return Dist(B, Int((S(1) + S(1)/cos(e + f*x))/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) + Dist(A - B, Int(S(1)/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) def replacement4393(A, B, a, b, e, f, x): return Dist(B, Int((S(1) + S(1)/sin(e + f*x))/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) + Dist(A - B, Int(S(1)/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) def replacement4394(A, B, a, b, e, f, m, x): return Simp(-S(2)*sqrt(S(2))*A*sqrt((A + B/cos(e + f*x))/A)*(A*(a + b/cos(e + f*x))/(A*a + B*b))**(-m)*(A - B/cos(e + f*x))*(a + b/cos(e + f*x))**m*AppellF1(S(1)/2, S(-1)/2, -m, S(3)/2, (A - B/cos(e + f*x))/(S(2)*A), b*(A - B/cos(e + f*x))/(A*b + B*a))/(B*f*tan(e + f*x)), x) def replacement4395(A, B, a, b, e, f, m, x): return Simp(S(2)*sqrt(S(2))*A*sqrt((A + B/sin(e + f*x))/A)*(A*(a + b/sin(e + f*x))/(A*a + B*b))**(-m)*(A - B/sin(e + f*x))*(a + b/sin(e + f*x))**m*AppellF1(S(1)/2, S(-1)/2, -m, S(3)/2, (A - B/sin(e + f*x))/(S(2)*A), b*(A - B/sin(e + f*x))/(A*b + B*a))*tan(e + f*x)/(B*f), x) def replacement4396(A, B, a, b, e, f, m, x): return Dist(B/b, Int((a + b/cos(e + f*x))**(m + S(1))/cos(e + f*x), x), x) + Dist((A*b - B*a)/b, Int((a + b/cos(e + f*x))**m/cos(e + f*x), x), x) def replacement4397(A, B, a, b, e, f, m, x): return Dist(B/b, Int((a + b/sin(e + f*x))**(m + S(1))/sin(e + f*x), x), x) + Dist((A*b - B*a)/b, Int((a + b/sin(e + f*x))**m/sin(e + f*x), x), x) def replacement4398(A, B, a, b, e, f, m, x): return Dist(S(1)/(b**S(2)*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(A*b*m - B*a*m + B*b*(S(2)*m + S(1))/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**m*(A*b - B*a)*tan(e + f*x)/(b*f*(S(2)*m + S(1))), x) def replacement4399(A, B, a, b, e, f, m, x): return Dist(S(1)/(b**S(2)*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(A*b*m - B*a*m + B*b*(S(2)*m + S(1))/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**m*(A*b - B*a)/(b*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4400(A, B, a, b, e, f, m, x): return -Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(b*(m + S(1))*(A*b - B*a) - (A*a*b*(m + S(2)) - B*(a**S(2) + b**S(2)*(m + S(1))))/cos(e + f*x), x)/cos(e + f*x), x), x) - Simp(a*(a + b/cos(e + f*x))**(m + S(1))*(A*b - B*a)*tan(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4401(A, B, a, b, e, f, m, x): return -Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(b*(m + S(1))*(A*b - B*a) - (A*a*b*(m + S(2)) - B*(a**S(2) + b**S(2)*(m + S(1))))/sin(e + f*x), x)/sin(e + f*x), x), x) + Simp(a*(a + b/sin(e + f*x))**(m + S(1))*(A*b - B*a)/(b*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4402(A, B, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/cos(e + f*x))**m*Simp(B*b*(m + S(1)) + (A*b*(m + S(2)) - B*a)/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp(B*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + S(2))), x) def replacement4403(A, B, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/sin(e + f*x))**m*Simp(B*b*(m + S(1)) + (A*b*(m + S(2)) - B*a)/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp(B*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + S(2))*tan(e + f*x)), x) def replacement4404(A, B, a, b, d, e, f, m, n, x): return -Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*n), x) def replacement4405(A, B, a, b, d, e, f, m, n, x): return Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*n*tan(e + f*x)), x) def replacement4406(A, B, a, b, d, e, f, m, n, x): return Dist((A*a*m + B*b*(m + S(1)))/(a**S(2)*(S(2)*m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1)), x), x) + Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*(A*b - B*a)*tan(e + f*x)/(b*f*(S(2)*m + S(1))), x) def replacement4407(A, B, a, b, d, e, f, m, n, x): return Dist((A*a*m + B*b*(m + S(1)))/(a**S(2)*(S(2)*m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1)), x), x) - Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m*(A*b - B*a)/(b*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4408(A, B, a, b, d, e, f, m, n, x): return -Dist((A*a*m - B*b*n)/(b*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m, x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*n), x) def replacement4409(A, B, a, b, d, e, f, m, n, x): return -Dist((A*a*m - B*b*n)/(b*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m, x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*n*tan(e + f*x)), x) def replacement4410(A, B, a, b, d, e, f, n, x): return Simp(S(2)*B*b*(d/cos(e + f*x))**n*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(1))), x) def replacement4411(A, B, a, b, d, e, f, n, x): return Simp(-S(2)*B*b*(d/sin(e + f*x))**n/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(1))*tan(e + f*x)), x) def replacement4412(A, B, a, b, d, e, f, n, x): return Dist((A*b*(S(2)*n + S(1)) + S(2)*B*a*n)/(S(2)*a*d*n), Int((d/cos(e + f*x))**(n + S(1))*sqrt(a + b/cos(e + f*x)), x), x) - Simp(A*b**S(2)*(d/cos(e + f*x))**n*tan(e + f*x)/(a*f*n*sqrt(a + b/cos(e + f*x))), x) def replacement4413(A, B, a, b, d, e, f, n, x): return Dist((A*b*(S(2)*n + S(1)) + S(2)*B*a*n)/(S(2)*a*d*n), Int((d/sin(e + f*x))**(n + S(1))*sqrt(a + b/sin(e + f*x)), x), x) + Simp(A*b**S(2)*(d/sin(e + f*x))**n/(a*f*n*sqrt(a + b/sin(e + f*x))*tan(e + f*x)), x) def replacement4414(A, B, a, b, d, e, f, n, x): return Dist((A*b*(S(2)*n + S(1)) + S(2)*B*a*n)/(b*(S(2)*n + S(1))), Int((d/cos(e + f*x))**n*sqrt(a + b/cos(e + f*x)), x), x) + Simp(S(2)*B*b*(d/cos(e + f*x))**n*tan(e + f*x)/(f*sqrt(a + b/cos(e + f*x))*(S(2)*n + S(1))), x) def replacement4415(A, B, a, b, d, e, f, n, x): return Dist((A*b*(S(2)*n + S(1)) + S(2)*B*a*n)/(b*(S(2)*n + S(1))), Int((d/sin(e + f*x))**n*sqrt(a + b/sin(e + f*x)), x), x) + Simp(-S(2)*B*b*(d/sin(e + f*x))**n/(f*sqrt(a + b/sin(e + f*x))*(S(2)*n + S(1))*tan(e + f*x)), x) def replacement4416(A, B, a, b, d, e, f, m, n, x): return -Dist(b/(a*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-1))*Simp(A*a*(m - n + S(-1)) - B*b*n - (A*b*(m + n) + B*a*n)/cos(e + f*x), x), x), x) - Simp(A*a*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*n), x) def replacement4417(A, B, a, b, d, e, f, m, n, x): return -Dist(b/(a*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-1))*Simp(A*a*(m - n + S(-1)) - B*b*n - (A*b*(m + n) + B*a*n)/sin(e + f*x), x), x), x) + Simp(A*a*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1))/(f*n*tan(e + f*x)), x) def replacement4418(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1))*Simp(A*a*d*(m + n) + B*b*d*n + (A*b*d*(m + n) + B*a*d*(S(2)*m + n + S(-1)))/cos(e + f*x), x), x), x) + Simp(B*b*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*(m + n)), x) def replacement4419(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(d*(m + n)), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1))*Simp(A*a*d*(m + n) + B*b*d*n + (A*b*d*(m + n) + B*a*d*(S(2)*m + n + S(-1)))/sin(e + f*x), x), x), x) - Simp(B*b*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1))/(f*(m + n)*tan(e + f*x)), x) def replacement4420(A, B, a, b, d, e, f, m, n, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*Simp(A*a*d*(n + S(-1)) - B*b*d*(n + S(-1)) - d*(A*b*(m + n) + B*a*(m - n + S(1)))/cos(e + f*x), x), x), x) - Simp(d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**m*(A*b - B*a)*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4421(A, B, a, b, d, e, f, m, n, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*Simp(A*a*d*(n + S(-1)) - B*b*d*(n + S(-1)) - d*(A*b*(m + n) + B*a*(m - n + S(1)))/sin(e + f*x), x), x), x) + Simp(d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**m*(A*b - B*a)/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4422(A, B, a, b, d, e, f, m, n, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*Simp(-A*a*(S(2)*m + n + S(1)) + B*b*n + (A*b - B*a)*(m + n + S(1))/cos(e + f*x), x), x), x) + Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*(A*b - B*a)*tan(e + f*x)/(b*f*(S(2)*m + S(1))), x) def replacement4423(A, B, a, b, d, e, f, m, n, x): return -Dist(S(1)/(a**S(2)*(S(2)*m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*Simp(-A*a*(S(2)*m + n + S(1)) + B*b*n + (A*b - B*a)*(m + n + S(1))/sin(e + f*x), x), x), x) - Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m*(A*b - B*a)/(b*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4424(A, B, a, b, d, e, f, m, n, x): return Dist(d/(b*(m + n)), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**m*Simp(B*b*(n + S(-1)) + (A*b*(m + n) + B*a*m)/cos(e + f*x), x), x), x) + Simp(B*d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + n)), x) def replacement4425(A, B, a, b, d, e, f, m, n, x): return Dist(d/(b*(m + n)), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**m*Simp(B*b*(n + S(-1)) + (A*b*(m + n) + B*a*m)/sin(e + f*x), x), x), x) - Simp(B*d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**m/(f*(m + n)*tan(e + f*x)), x) def replacement4426(A, B, a, b, d, e, f, m, n, x): return -Dist(S(1)/(b*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m*Simp(A*a*m - A*b*(m + n + S(1))/cos(e + f*x) - B*b*n, x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*n), x) def replacement4427(A, B, a, b, d, e, f, m, n, x): return -Dist(S(1)/(b*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m*Simp(A*a*m - A*b*(m + n + S(1))/sin(e + f*x) - B*b*n, x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*n*tan(e + f*x)), x) def replacement4428(A, B, a, b, d, e, f, m, n, x): return Dist(B/b, Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1)), x), x) + Dist((A*b - B*a)/b, Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m, x), x) def replacement4429(A, B, a, b, d, e, f, m, n, x): return Dist(B/b, Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1)), x), x) + Dist((A*b - B*a)/b, Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m, x), x) def replacement4430(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-2))*Simp(a*(-A*b*(m - n + S(-1)) + B*a*n) + b*(A*a*(m + n) + B*b*n)/cos(e + f*x)**S(2) + (A*(a**S(2)*(n + S(1)) + b**S(2)*n) + S(2)*B*a*b*n)/cos(e + f*x), x), x), x) - Simp(A*a*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*n), x) def replacement4431(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-2))*Simp(a*(-A*b*(m - n + S(-1)) + B*a*n) + b*(A*a*(m + n) + B*b*n)/sin(e + f*x)**S(2) + (A*(a**S(2)*(n + S(1)) + b**S(2)*n) + S(2)*B*a*b*n)/sin(e + f*x), x), x), x) + Simp(A*a*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1))/(f*n*tan(e + f*x)), x) def replacement4432(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(m + n), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-2))*Simp(A*a**S(2)*(m + n) + B*a*b*n + b*(A*b*(m + n) + B*a*(S(2)*m + n + S(-1)))/cos(e + f*x)**S(2) + (B*b**S(2)*(m + n + S(-1)) + a*(m + n)*(S(2)*A*b + B*a))/cos(e + f*x), x), x), x) + Simp(B*b*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1))*tan(e + f*x)/(f*(m + n)), x) def replacement4433(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(m + n), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-2))*Simp(A*a**S(2)*(m + n) + B*a*b*n + b*(A*b*(m + n) + B*a*(S(2)*m + n + S(-1)))/sin(e + f*x)**S(2) + (B*b**S(2)*(m + n + S(-1)) + a*(m + n)*(S(2)*A*b + B*a))/sin(e + f*x), x), x), x) - Simp(B*b*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1))/(f*(m + n)*tan(e + f*x)), x) def replacement4434(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*Simp(d*(m + S(1))*(A*a - B*b)/cos(e + f*x) + d*(n + S(-1))*(A*b - B*a) - d*(A*b - B*a)*(m + n + S(1))/cos(e + f*x)**S(2), x), x), x) + Simp(d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*(A*b - B*a)*tan(e + f*x)/(f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4435(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/((a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*Simp(d*(m + S(1))*(A*a - B*b)/sin(e + f*x) + d*(n + S(-1))*(A*b - B*a) - d*(A*b - B*a)*(m + n + S(1))/sin(e + f*x)**S(2), x), x), x) - Simp(d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*(A*b - B*a)/(f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4436(A, B, a, b, d, e, f, m, n, x): return -Dist(d/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**(m + S(1))*Simp(a*d*(n + S(-2))*(A*b - B*a) + b*d*(m + S(1))*(A*b - B*a)/cos(e + f*x) - (A*a*b*d*(m + n) - B*d*(a**S(2)*(n + S(-1)) + b**S(2)*(m + S(1))))/cos(e + f*x)**S(2), x), x), x) - Simp(a*d**S(2)*(d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**(m + S(1))*(A*b - B*a)*tan(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4437(A, B, a, b, d, e, f, m, n, x): return -Dist(d/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**(m + S(1))*Simp(a*d*(n + S(-2))*(A*b - B*a) + b*d*(m + S(1))*(A*b - B*a)/sin(e + f*x) - (A*a*b*d*(m + n) - B*d*(a**S(2)*(n + S(-1)) + b**S(2)*(m + S(1))))/sin(e + f*x)**S(2), x), x), x) + Simp(a*d**S(2)*(d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**(m + S(1))*(A*b - B*a)/(b*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4438(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*Simp(A*(a**S(2)*(m + S(1)) - b**S(2)*(m + n + S(1))) + B*a*b*n - a*(m + S(1))*(A*b - B*a)/cos(e + f*x) + b*(A*b - B*a)*(m + n + S(2))/cos(e + f*x)**S(2), x), x), x) - Simp(b*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*(A*b - B*a)*tan(e + f*x)/(a*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4439(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*Simp(A*(a**S(2)*(m + S(1)) - b**S(2)*(m + n + S(1))) + B*a*b*n - a*(m + S(1))*(A*b - B*a)/sin(e + f*x) + b*(A*b - B*a)*(m + n + S(2))/sin(e + f*x)**S(2), x), x), x) + Simp(b*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*(A*b - B*a)/(a*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4440(A, B, a, b, d, e, f, m, n, x): return Dist(d/(m + n), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(-1))*Simp(B*a*(n + S(-1)) + (A*a*(m + n) + B*b*(m + n + S(-1)))/cos(e + f*x) + (A*b*(m + n) + B*a*m)/cos(e + f*x)**S(2), x), x), x) + Simp(B*d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + n)), x) def replacement4441(A, B, a, b, d, e, f, m, n, x): return Dist(d/(m + n), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(-1))*Simp(B*a*(n + S(-1)) + (A*a*(m + n) + B*b*(m + n + S(-1)))/sin(e + f*x) + (A*b*(m + n) + B*a*m)/sin(e + f*x)**S(2), x), x), x) - Simp(B*d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**m/(f*(m + n)*tan(e + f*x)), x) def replacement4442(A, B, a, b, d, e, f, m, n, x): return -Dist(S(1)/(d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-1))*Simp(A*b*m - A*b*(m + n + S(1))/cos(e + f*x)**S(2) - B*a*n - (A*a*(n + S(1)) + B*b*n)/cos(e + f*x), x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*n), x) def replacement4443(A, B, a, b, d, e, f, m, n, x): return -Dist(S(1)/(d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-1))*Simp(A*b*m - A*b*(m + n + S(1))/sin(e + f*x)**S(2) - B*a*n - (A*a*(n + S(1)) + B*b*n)/sin(e + f*x), x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*n*tan(e + f*x)), x) def replacement4444(A, B, a, b, d, e, f, m, n, x): return Dist(d**S(2)/(b*(m + n)), Int((d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**m*Simp(B*a*(n + S(-2)) + B*b*(m + n + S(-1))/cos(e + f*x) + (A*b*(m + n) - B*a*(n + S(-1)))/cos(e + f*x)**S(2), x), x), x) + Simp(B*d**S(2)*(d/cos(e + f*x))**(n + S(-2))*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + n)), x) def replacement4445(A, B, a, b, d, e, f, m, n, x): return Dist(d**S(2)/(b*(m + n)), Int((d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**m*Simp(B*a*(n + S(-2)) + B*b*(m + n + S(-1))/sin(e + f*x) + (A*b*(m + n) - B*a*(n + S(-1)))/sin(e + f*x)**S(2), x), x), x) - Simp(B*d**S(2)*(d/sin(e + f*x))**(n + S(-2))*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + n)*tan(e + f*x)), x) def replacement4446(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m*Simp(A*a*(n + S(1))/cos(e + f*x) - A*b*(m + n + S(1)) + A*b*(m + n + S(2))/cos(e + f*x)**S(2) + B*a*n, x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(a*f*n), x) def replacement4447(A, B, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m*Simp(A*a*(n + S(1))/sin(e + f*x) - A*b*(m + n + S(1)) + A*b*(m + n + S(2))/sin(e + f*x)**S(2) + B*a*n, x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))/(a*f*n*tan(e + f*x)), x) def replacement4448(A, B, a, b, d, e, f, x): return Dist(A/a, Int(sqrt(a + b/cos(e + f*x))/sqrt(d/cos(e + f*x)), x), x) - Dist((A*b - B*a)/(a*d), Int(sqrt(d/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) def replacement4449(A, B, a, b, d, e, f, x): return Dist(A/a, Int(sqrt(a + b/sin(e + f*x))/sqrt(d/sin(e + f*x)), x), x) - Dist((A*b - B*a)/(a*d), Int(sqrt(d/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) def replacement4450(A, B, a, b, d, e, f, x): return Dist(A, Int(sqrt(d/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x), x) + Dist(B/d, Int((d/cos(e + f*x))**(S(3)/2)/sqrt(a + b/cos(e + f*x)), x), x) def replacement4451(A, B, a, b, d, e, f, x): return Dist(A, Int(sqrt(d/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x), x) + Dist(B/d, Int((d/sin(e + f*x))**(S(3)/2)/sqrt(a + b/sin(e + f*x)), x), x) def replacement4452(A, B, a, b, d, e, f, x): return Dist(A, Int(sqrt(a + b/cos(e + f*x))/sqrt(d/cos(e + f*x)), x), x) + Dist(B/d, Int(sqrt(d/cos(e + f*x))*sqrt(a + b/cos(e + f*x)), x), x) def replacement4453(A, B, a, b, d, e, f, x): return Dist(A, Int(sqrt(a + b/sin(e + f*x))/sqrt(d/sin(e + f*x)), x), x) + Dist(B/d, Int(sqrt(d/sin(e + f*x))*sqrt(a + b/sin(e + f*x)), x), x) def replacement4454(A, B, a, b, d, e, f, n, x): return Dist(A/a, Int((d/cos(e + f*x))**n, x), x) - Dist((A*b - B*a)/(a*d), Int((d/cos(e + f*x))**(n + S(1))/(a + b/cos(e + f*x)), x), x) def replacement4455(A, B, a, b, d, e, f, n, x): return Dist(A/a, Int((d/sin(e + f*x))**n, x), x) - Dist((A*b - B*a)/(a*d), Int((d/sin(e + f*x))**(n + S(1))/(a + b/sin(e + f*x)), x), x) def replacement4456(A, B, a, b, d, e, f, m, n, x): return Int((d/cos(e + f*x))**n*(A + B/cos(e + f*x))*(a + b/cos(e + f*x))**m, x) def replacement4457(A, B, a, b, d, e, f, m, n, x): return Int((d/sin(e + f*x))**n*(A + B/sin(e + f*x))*(a + b/sin(e + f*x))**m, x) def replacement4458(A, B, a, b, c, d, e, f, m, n, p, x): return Dist((-a*c)**m, Int((A*cos(e + f*x) + B)**p*(c*cos(e + f*x) + d)**(-m + n)*sin(e + f*x)**(S(2)*m)*cos(e + f*x)**(-m - n - p), x), x) def replacement4459(A, B, a, b, c, d, e, f, m, n, p, x): return Dist((-a*c)**m, Int((A*sin(e + f*x) + B)**p*(c*sin(e + f*x) + d)**(-m + n)*sin(e + f*x)**(-m - n - p)*cos(e + f*x)**(S(2)*m), x), x) def replacement4460(A, B, C, a, b, e, f, m, x): return Dist(b**(S(-2)), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(B*b - C*a + C*b/cos(e + f*x), x), x), x) def replacement4461(A, B, C, a, b, e, f, m, x): return Dist(b**(S(-2)), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(B*b - C*a + C*b/sin(e + f*x), x), x), x) def replacement4462(A, C, a, b, e, f, m, x): return Dist(C/b**S(2), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(-a + b/cos(e + f*x), x), x), x) def replacement4463(A, C, a, b, e, f, m, x): return Dist(C/b**S(2), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(-a + b/sin(e + f*x), x), x), x) def replacement4464(A, C, b, e, f, m, x): return -Simp(A*(b/cos(e + f*x))**m*tan(e + f*x)/(f*m), x) def replacement4465(A, C, b, e, f, m, x): return Simp(A*(b/sin(e + f*x))**m/(f*m*tan(e + f*x)), x) def replacement4466(A, C, b, e, f, m, x): return Dist((A*(m + S(1)) + C*m)/(b**S(2)*m), Int((b/cos(e + f*x))**(m + S(2)), x), x) - Simp(A*(b/cos(e + f*x))**m*tan(e + f*x)/(f*m), x) def replacement4467(A, C, b, e, f, m, x): return Dist((A*(m + S(1)) + C*m)/(b**S(2)*m), Int((b/sin(e + f*x))**(m + S(2)), x), x) + Simp(A*(b/sin(e + f*x))**m/(f*m*tan(e + f*x)), x) def replacement4468(A, C, b, e, f, m, x): return Dist((A*(m + S(1)) + C*m)/(m + S(1)), Int((b/cos(e + f*x))**m, x), x) + Simp(C*(b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4469(A, C, b, e, f, m, x): return Dist((A*(m + S(1)) + C*m)/(m + S(1)), Int((b/sin(e + f*x))**m, x), x) - Simp(C*(b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4470(B, C, b, e, f, m, x): return Dist(B/b, Int((b/cos(e + f*x))**(m + S(1)), x), x) + Dist(C/b**S(2), Int((b/cos(e + f*x))**(m + S(2)), x), x) def replacement4471(B, C, b, e, f, m, x): return Dist(B/b, Int((b/sin(e + f*x))**(m + S(1)), x), x) + Dist(C/b**S(2), Int((b/sin(e + f*x))**(m + S(2)), x), x) def replacement4472(A, B, C, b, e, f, m, x): return Dist(B/b, Int((b/cos(e + f*x))**(m + S(1)), x), x) + Int((b/cos(e + f*x))**m*(A + C/cos(e + f*x)**S(2)), x) def replacement4473(A, B, C, b, e, f, m, x): return Dist(B/b, Int((b/sin(e + f*x))**(m + S(1)), x), x) + Int((b/sin(e + f*x))**m*(A + C/sin(e + f*x)**S(2)), x) def replacement4474(A, B, C, a, b, e, f, x): return Dist(S(1)/2, Int(Simp(S(2)*A*a + (S(2)*B*a + b*(S(2)*A + C))/cos(e + f*x) + S(2)*(B*b + C*a)/cos(e + f*x)**S(2), x), x), x) + Simp(C*b*tan(e + f*x)/(S(2)*f*cos(e + f*x)), x) def replacement4475(A, B, C, a, b, e, f, x): return Dist(S(1)/2, Int(Simp(S(2)*A*a + (S(2)*B*a + b*(S(2)*A + C))/sin(e + f*x) + S(2)*(B*b + C*a)/sin(e + f*x)**S(2), x), x), x) - Simp(C*b/(S(2)*f*sin(e + f*x)*tan(e + f*x)), x) def replacement4476(A, C, a, b, e, f, x): return Dist(S(1)/2, Int(Simp(S(2)*A*a + S(2)*C*a/cos(e + f*x)**S(2) + b*(S(2)*A + C)/cos(e + f*x), x), x), x) + Simp(C*b*tan(e + f*x)/(S(2)*f*cos(e + f*x)), x) def replacement4477(A, C, a, b, e, f, x): return Dist(S(1)/2, Int(Simp(S(2)*A*a + S(2)*C*a/sin(e + f*x)**S(2) + b*(S(2)*A + C)/sin(e + f*x), x), x), x) - Simp(C*b/(S(2)*f*sin(e + f*x)*tan(e + f*x)), x) def replacement4478(A, B, C, a, b, e, f, x): return Dist(S(1)/b, Int((A*b + (B*b - C*a)/cos(e + f*x))/(a + b/cos(e + f*x)), x), x) + Dist(C/b, Int(S(1)/cos(e + f*x), x), x) def replacement4479(A, B, C, a, b, e, f, x): return Dist(S(1)/b, Int((A*b + (B*b - C*a)/sin(e + f*x))/(a + b/sin(e + f*x)), x), x) + Dist(C/b, Int(S(1)/sin(e + f*x), x), x) def replacement4480(A, C, a, b, e, f, x): return Dist(S(1)/b, Int((A*b - C*a/cos(e + f*x))/(a + b/cos(e + f*x)), x), x) + Dist(C/b, Int(S(1)/cos(e + f*x), x), x) def replacement4481(A, C, a, b, e, f, x): return Dist(S(1)/b, Int((A*b - C*a/sin(e + f*x))/(a + b/sin(e + f*x)), x), x) + Dist(C/b, Int(S(1)/sin(e + f*x), x), x) def replacement4482(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(A*b*(S(2)*m + S(1)) + (B*b*(m + S(1)) - a*(A*(m + S(1)) - C*m))/cos(e + f*x), x), x), x) + Simp((a + b/cos(e + f*x))**m*(A*a - B*b + C*a)*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4483(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(A*b*(S(2)*m + S(1)) + (B*b*(m + S(1)) - a*(A*(m + S(1)) - C*m))/sin(e + f*x), x), x), x) - Simp((a + b/sin(e + f*x))**m*(A*a - B*b + C*a)/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4484(A, C, a, b, e, f, m, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(A*b*(S(2)*m + S(1)) - a*(A*(m + S(1)) - C*m)/cos(e + f*x), x), x), x) + Simp((A + C)*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(S(2)*m + S(1))), x) def replacement4485(A, C, a, b, e, f, m, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(A*b*(S(2)*m + S(1)) - a*(A*(m + S(1)) - C*m)/sin(e + f*x), x), x), x) - Simp((A + C)*(a + b/sin(e + f*x))**m/(f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4486(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(1))), Int((a + b/cos(e + f*x))**m*Simp(A*b*(m + S(1)) + (B*b*(m + S(1)) + C*a*m)/cos(e + f*x), x), x), x) + Simp(C*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4487(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(1))), Int((a + b/sin(e + f*x))**m*Simp(A*b*(m + S(1)) + (B*b*(m + S(1)) + C*a*m)/sin(e + f*x), x), x), x) - Simp(C*(a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4488(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(1))), Int((a + b/cos(e + f*x))**m*Simp(A*b*(m + S(1)) + C*a*m/cos(e + f*x), x), x), x) + Simp(C*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4489(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(1))), Int((a + b/sin(e + f*x))**m*Simp(A*b*(m + S(1)) + C*a*m/sin(e + f*x), x), x), x) - Simp(C*(a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4490(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((a + b/cos(e + f*x))**(m + S(-1))*Simp(A*a*(m + S(1)) + (B*b*(m + S(1)) + C*a*m)/cos(e + f*x)**S(2) + (C*b*m + (m + S(1))*(A*b + B*a))/cos(e + f*x), x), x), x) + Simp(C*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4491(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((a + b/sin(e + f*x))**(m + S(-1))*Simp(A*a*(m + S(1)) + (B*b*(m + S(1)) + C*a*m)/sin(e + f*x)**S(2) + (C*b*m + (m + S(1))*(A*b + B*a))/sin(e + f*x), x), x), x) - Simp(C*(a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4492(A, C, a, b, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((a + b/cos(e + f*x))**(m + S(-1))*Simp(A*a*(m + S(1)) + C*a*m/cos(e + f*x)**S(2) + (A*b*(m + S(1)) + C*b*m)/cos(e + f*x), x), x), x) + Simp(C*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + S(1))), x) def replacement4493(A, C, a, b, e, f, m, x): return Dist(S(1)/(m + S(1)), Int((a + b/sin(e + f*x))**(m + S(-1))*Simp(A*a*(m + S(1)) + C*a*m/sin(e + f*x)**S(2) + (A*b*(m + S(1)) + C*b*m)/sin(e + f*x), x), x), x) - Simp(C*(a + b/sin(e + f*x))**m/(f*(m + S(1))*tan(e + f*x)), x) def replacement4494(A, B, C, a, b, e, f, x): return Dist(C, Int((S(1) + S(1)/cos(e + f*x))/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) + Int((A + (B - C)/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x) def replacement4495(A, B, C, a, b, e, f, x): return Dist(C, Int((S(1) + S(1)/sin(e + f*x))/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) + Int((A + (B - C)/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x) def replacement4496(A, C, a, b, e, f, x): return Dist(C, Int((S(1) + S(1)/cos(e + f*x))/(sqrt(a + b/cos(e + f*x))*cos(e + f*x)), x), x) + Int((A - C/cos(e + f*x))/sqrt(a + b/cos(e + f*x)), x) def replacement4497(A, C, a, b, e, f, x): return Dist(C, Int((S(1) + S(1)/sin(e + f*x))/(sqrt(a + b/sin(e + f*x))*sin(e + f*x)), x), x) + Int((A - C/sin(e + f*x))/sqrt(a + b/sin(e + f*x)), x) def replacement4498(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(A*(a**S(2) - b**S(2))*(m + S(1)) - a*(m + S(1))*(A*b - B*a + C*b)/cos(e + f*x) + (m + S(2))*(A*b**S(2) - B*a*b + C*a**S(2))/cos(e + f*x)**S(2), x), x), x) - Simp((a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*tan(e + f*x)/(a*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4499(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(A*(a**S(2) - b**S(2))*(m + S(1)) - a*(m + S(1))*(A*b - B*a + C*b)/sin(e + f*x) + (m + S(2))*(A*b**S(2) - B*a*b + C*a**S(2))/sin(e + f*x)**S(2), x), x), x) + Simp((a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))/(a*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4500(A, C, a, b, e, f, m, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(A*(a**S(2) - b**S(2))*(m + S(1)) - a*b*(A + C)*(m + S(1))/cos(e + f*x) + (m + S(2))*(A*b**S(2) + C*a**S(2))/cos(e + f*x)**S(2), x), x), x) - Simp((a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*tan(e + f*x)/(a*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4501(A, C, a, b, e, f, m, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(A*(a**S(2) - b**S(2))*(m + S(1)) - a*b*(A + C)*(m + S(1))/sin(e + f*x) + (m + S(2))*(A*b**S(2) + C*a**S(2))/sin(e + f*x)**S(2), x), x), x) + Simp((a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))/(a*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4502(A, B, C, a, b, e, f, m, x): return Dist(S(1)/b, Int((a + b/cos(e + f*x))**m*(A*b + (B*b - C*a)/cos(e + f*x)), x), x) + Dist(C/b, Int((a + b/cos(e + f*x))**(m + S(1))/cos(e + f*x), x), x) def replacement4503(A, B, C, a, b, e, f, m, x): return Dist(S(1)/b, Int((a + b/sin(e + f*x))**m*(A*b + (B*b - C*a)/sin(e + f*x)), x), x) + Dist(C/b, Int((a + b/sin(e + f*x))**(m + S(1))/sin(e + f*x), x), x) def replacement4504(A, C, a, b, e, f, m, x): return Dist(S(1)/b, Int((a + b/cos(e + f*x))**m*(A*b - C*a/cos(e + f*x)), x), x) + Dist(C/b, Int((a + b/cos(e + f*x))**(m + S(1))/cos(e + f*x), x), x) def replacement4505(A, C, a, b, e, f, m, x): return Dist(S(1)/b, Int((a + b/sin(e + f*x))**m*(A*b - C*a/sin(e + f*x)), x), x) + Dist(C/b, Int((a + b/sin(e + f*x))**(m + S(1))/sin(e + f*x), x), x) def replacement4506(A, B, C, b, e, f, m, x): return Dist(b**S(2), Int((b*cos(e + f*x))**(m + S(-2))*(A*cos(e + f*x)**S(2) + B*cos(e + f*x) + C), x), x) def replacement4507(A, B, C, b, e, f, m, x): return Dist(b**S(2), Int((b*sin(e + f*x))**(m + S(-2))*(A*sin(e + f*x)**S(2) + B*sin(e + f*x) + C), x), x) def replacement4508(A, C, b, e, f, m, x): return Dist(b**S(2), Int((b*cos(e + f*x))**(m + S(-2))*(A*cos(e + f*x)**S(2) + C), x), x) def replacement4509(A, C, b, e, f, m, x): return Dist(b**S(2), Int((b*sin(e + f*x))**(m + S(-2))*(A*sin(e + f*x)**S(2) + C), x), x) def replacement4510(A, B, C, a, b, e, f, m, p, x): return Dist(a**IntPart(m)*(a*(b/cos(e + f*x))**p)**FracPart(m)*(b/cos(e + f*x))**(-p*FracPart(m)), Int((b/cos(e + f*x))**(m*p)*(A + B/cos(e + f*x) + C/cos(e + f*x)**S(2)), x), x) def replacement4511(A, B, C, a, b, e, f, m, p, x): return Dist(a**IntPart(m)*(a*(b/sin(e + f*x))**p)**FracPart(m)*(b/sin(e + f*x))**(-p*FracPart(m)), Int((b/sin(e + f*x))**(m*p)*(A + B/sin(e + f*x) + C/sin(e + f*x)**S(2)), x), x) def replacement4512(A, C, a, b, e, f, m, p, x): return Dist(a**IntPart(m)*(a*(b/cos(e + f*x))**p)**FracPart(m)*(b/cos(e + f*x))**(-p*FracPart(m)), Int((b/cos(e + f*x))**(m*p)*(A + C/cos(e + f*x)**S(2)), x), x) def replacement4513(A, C, a, b, e, f, m, p, x): return Dist(a**IntPart(m)*(a*(b/sin(e + f*x))**p)**FracPart(m)*(b/sin(e + f*x))**(-p*FracPart(m)), Int((b/sin(e + f*x))**(m*p)*(A + C/sin(e + f*x)**S(2)), x), x) def replacement4514(A, B, C, a, b, d, e, f, n, x): return Dist(S(1)/(d*n), Int((d/cos(e + f*x))**(n + S(1))*Simp(C*b*n/cos(e + f*x)**S(2) + n*(A*b + B*a) + (A*a*(n + S(1)) + n*(B*b + C*a))/cos(e + f*x), x), x), x) - Simp(A*a*(d/cos(e + f*x))**n*tan(e + f*x)/(f*n), x) def replacement4515(A, B, C, a, b, d, e, f, n, x): return Dist(S(1)/(d*n), Int((d/sin(e + f*x))**(n + S(1))*Simp(C*b*n/sin(e + f*x)**S(2) + n*(A*b + B*a) + (A*a*(n + S(1)) + n*(B*b + C*a))/sin(e + f*x), x), x), x) + Simp(A*a*(d/sin(e + f*x))**n/(f*n*tan(e + f*x)), x) def replacement4516(A, C, a, b, d, e, f, n, x): return Dist(S(1)/(d*n), Int((d/cos(e + f*x))**(n + S(1))*Simp(A*b*n + C*b*n/cos(e + f*x)**S(2) + a*(A*(n + S(1)) + C*n)/cos(e + f*x), x), x), x) - Simp(A*a*(d/cos(e + f*x))**n*tan(e + f*x)/(f*n), x) def replacement4517(A, C, a, b, d, e, f, n, x): return Dist(S(1)/(d*n), Int((d/sin(e + f*x))**(n + S(1))*Simp(A*b*n + C*b*n/sin(e + f*x)**S(2) + a*(A*(n + S(1)) + C*n)/sin(e + f*x), x), x), x) + Simp(A*a*(d/sin(e + f*x))**n/(f*n*tan(e + f*x)), x) def replacement4518(A, B, C, a, b, d, e, f, n, x): return Dist(S(1)/(n + S(2)), Int((d/cos(e + f*x))**n*Simp(A*a*(n + S(2)) + (n + S(2))*(B*b + C*a)/cos(e + f*x)**S(2) + (B*a*(n + S(2)) + b*(A*(n + S(2)) + C*(n + S(1))))/cos(e + f*x), x), x), x) + Simp(C*b*(d/cos(e + f*x))**n*tan(e + f*x)/(f*(n + S(2))*cos(e + f*x)), x) def replacement4519(A, B, C, a, b, d, e, f, n, x): return Dist(S(1)/(n + S(2)), Int((d/sin(e + f*x))**n*Simp(A*a*(n + S(2)) + (n + S(2))*(B*b + C*a)/sin(e + f*x)**S(2) + (B*a*(n + S(2)) + b*(A*(n + S(2)) + C*(n + S(1))))/sin(e + f*x), x), x), x) - Simp(C*b*(d/sin(e + f*x))**n/(f*(n + S(2))*sin(e + f*x)*tan(e + f*x)), x) def replacement4520(A, C, a, b, d, e, f, n, x): return Dist(S(1)/(n + S(2)), Int((d/cos(e + f*x))**n*Simp(A*a*(n + S(2)) + C*a*(n + S(2))/cos(e + f*x)**S(2) + b*(A*(n + S(2)) + C*(n + S(1)))/cos(e + f*x), x), x), x) + Simp(C*b*(d/cos(e + f*x))**n*tan(e + f*x)/(f*(n + S(2))*cos(e + f*x)), x) def replacement4521(A, C, a, b, d, e, f, n, x): return Dist(S(1)/(n + S(2)), Int((d/sin(e + f*x))**n*Simp(A*a*(n + S(2)) + C*a*(n + S(2))/sin(e + f*x)**S(2) + b*(A*(n + S(2)) + C*(n + S(1)))/sin(e + f*x), x), x), x) - Simp(C*b*(d/sin(e + f*x))**n/(f*(n + S(2))*sin(e + f*x)*tan(e + f*x)), x) def replacement4522(A, B, C, a, b, e, f, m, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(-S(2)*A*b*(m + S(1)) + B*a - C*b - (B*b*(m + S(2)) - a*(A*(m + S(2)) - C*(m + S(-1))))/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**m*(A*a - B*b + C*a)*tan(e + f*x)/(a*f*(S(2)*m + S(1))*cos(e + f*x)), x) def replacement4523(A, B, C, a, b, e, f, m, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(-S(2)*A*b*(m + S(1)) + B*a - C*b - (B*b*(m + S(2)) - a*(A*(m + S(2)) - C*(m + S(-1))))/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**m*(A*a - B*b + C*a)/(a*f*(S(2)*m + S(1))*sin(e + f*x)*tan(e + f*x)), x) def replacement4524(A, C, a, b, e, f, m, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(-S(2)*A*b*(m + S(1)) - C*b + a*(A*(m + S(2)) - C*(m + S(-1)))/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp((A + C)*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(S(2)*m + S(1))*cos(e + f*x)), x) def replacement4525(A, C, a, b, e, f, m, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(-S(2)*A*b*(m + S(1)) - C*b + a*(A*(m + S(2)) - C*(m + S(-1)))/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp((A + C)*(a + b/sin(e + f*x))**m/(f*(S(2)*m + S(1))*sin(e + f*x)*tan(e + f*x)), x) def replacement4526(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(b*(m + S(1))*(A*a - B*b + C*a) - (A*b**S(2) - B*a*b + C*a**S(2) + b*(m + S(1))*(A*b - B*a + C*b))/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*tan(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4527(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(b*(m + S(1))*(A*a - B*b + C*a) - (A*b**S(2) - B*a*b + C*a**S(2) + b*(m + S(1))*(A*b - B*a + C*b))/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))/(b*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4528(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(a*b*(A + C)*(m + S(1)) - (A*b**S(2) + C*a**S(2) + b*(m + S(1))*(A*b + C*b))/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp((a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*tan(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4529(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(a*b*(A + C)*(m + S(1)) - (A*b**S(2) + C*a**S(2) + b*(m + S(1))*(A*b + C*b))/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp((a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))/(b*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4530(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/cos(e + f*x))**m*Simp(A*b*(m + S(2)) + C*b*(m + S(1)) + (B*b*(m + S(2)) - C*a)/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp(C*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + S(2))), x) def replacement4531(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/sin(e + f*x))**m*Simp(A*b*(m + S(2)) + C*b*(m + S(1)) + (B*b*(m + S(2)) - C*a)/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp(C*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + S(2))*tan(e + f*x)), x) def replacement4532(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/cos(e + f*x))**m*Simp(A*b*(m + S(2)) - C*a/cos(e + f*x) + C*b*(m + S(1)), x)/cos(e + f*x), x), x) + Simp(C*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + S(2))), x) def replacement4533(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(2))), Int((a + b/sin(e + f*x))**m*Simp(A*b*(m + S(2)) - C*a/sin(e + f*x) + C*b*(m + S(1)), x)/sin(e + f*x), x), x) - Simp(C*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + S(2))*tan(e + f*x)), x) def replacement4534(A, B, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*Simp(-A*b*(S(2)*m + n + S(1)) + B*a*n - C*b*n - (B*b*(m + n + S(1)) - a*(A*(m + n + S(1)) - C*(m - n)))/cos(e + f*x), x), x), x) + Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*(A*a - B*b + C*a)*tan(e + f*x)/(a*f*(S(2)*m + S(1))), x) def replacement4535(A, B, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*Simp(-A*b*(S(2)*m + n + S(1)) + B*a*n - C*b*n - (B*b*(m + n + S(1)) - a*(A*(m + n + S(1)) - C*(m - n)))/sin(e + f*x), x), x), x) - Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m*(A*a - B*b + C*a)/(a*f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4536(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*Simp(A*b*(S(2)*m + n + S(1)) + C*b*n - a*(A*(m + n + S(1)) - C*(m - n))/cos(e + f*x), x), x), x) + Simp((d/cos(e + f*x))**n*(A + C)*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(S(2)*m + S(1))), x) def replacement4537(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*b*(S(2)*m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*Simp(A*b*(S(2)*m + n + S(1)) + C*b*n - a*(A*(m + n + S(1)) - C*(m - n))/sin(e + f*x), x), x), x) - Simp((d/sin(e + f*x))**n*(A + C)*(a + b/sin(e + f*x))**m/(f*(S(2)*m + S(1))*tan(e + f*x)), x) def replacement4538(A, B, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(b*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m*Simp(A*a*m - B*b*n - b*(A*(m + n + S(1)) + C*n)/cos(e + f*x), x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*n), x) def replacement4539(A, B, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(b*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m*Simp(A*a*m - B*b*n - b*(A*(m + n + S(1)) + C*n)/sin(e + f*x), x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*n*tan(e + f*x)), x) def replacement4540(A, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(b*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m*Simp(A*a*m - b*(A*(m + n + S(1)) + C*n)/cos(e + f*x), x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*n), x) def replacement4541(A, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(b*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m*Simp(A*a*m - b*(A*(m + n + S(1)) + C*n)/sin(e + f*x), x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*n*tan(e + f*x)), x) def replacement4542(A, B, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(b*(m + n + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*Simp(A*b*(m + n + S(1)) + C*b*n + (B*b*(m + n + S(1)) + C*a*m)/cos(e + f*x), x), x), x) + Simp(C*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + n + S(1))), x) def replacement4543(A, B, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(b*(m + n + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m*Simp(A*b*(m + n + S(1)) + C*b*n + (B*b*(m + n + S(1)) + C*a*m)/sin(e + f*x), x), x), x) - Simp(C*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*(m + n + S(1))*tan(e + f*x)), x) def replacement4544(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(b*(m + n + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*Simp(A*b*(m + n + S(1)) + C*a*m/cos(e + f*x) + C*b*n, x), x), x) + Simp(C*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + n + S(1))), x) def replacement4545(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(b*(m + n + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m*Simp(A*b*(m + n + S(1)) + C*a*m/sin(e + f*x) + C*b*n, x), x), x) - Simp(C*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*(m + n + S(1))*tan(e + f*x)), x) def replacement4546(A, B, C, a, b, e, f, m, x): return -Dist(S(1)/(b**S(2)*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(-C*b*(a**S(2) - b**S(2))*(m + S(1))/cos(e + f*x)**S(2) + b*(m + S(1))*(A*b**S(2) - a*(B*b - C*a)) + (B*b*(a**S(2) + b**S(2)*(m + S(1))) - a*(A*b**S(2)*(m + S(2)) + C*(a**S(2) + b**S(2)*(m + S(1)))))/cos(e + f*x), x)/cos(e + f*x), x), x) - Simp(a*(a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*tan(e + f*x)/(b**S(2)*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4547(A, B, C, a, b, e, f, m, x): return -Dist(S(1)/(b**S(2)*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(-C*b*(a**S(2) - b**S(2))*(m + S(1))/sin(e + f*x)**S(2) + b*(m + S(1))*(A*b**S(2) - a*(B*b - C*a)) + (B*b*(a**S(2) + b**S(2)*(m + S(1))) - a*(A*b**S(2)*(m + S(2)) + C*(a**S(2) + b**S(2)*(m + S(1)))))/sin(e + f*x), x)/sin(e + f*x), x), x) + Simp(a*(a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))/(b**S(2)*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4548(A, C, a, b, e, f, m, x): return -Dist(S(1)/(b**S(2)*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/cos(e + f*x))**(m + S(1))*Simp(-C*b*(a**S(2) - b**S(2))*(m + S(1))/cos(e + f*x)**S(2) - a*(A*b**S(2)*(m + S(2)) + C*(a**S(2) + b**S(2)*(m + S(1))))/cos(e + f*x) + b*(m + S(1))*(A*b**S(2) + C*a**S(2)), x)/cos(e + f*x), x), x) - Simp(a*(a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*tan(e + f*x)/(b**S(2)*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4549(A, C, a, b, e, f, m, x): return -Dist(S(1)/(b**S(2)*(a**S(2) - b**S(2))*(m + S(1))), Int((a + b/sin(e + f*x))**(m + S(1))*Simp(-C*b*(a**S(2) - b**S(2))*(m + S(1))/sin(e + f*x)**S(2) - a*(A*b**S(2)*(m + S(2)) + C*(a**S(2) + b**S(2)*(m + S(1))))/sin(e + f*x) + b*(m + S(1))*(A*b**S(2) + C*a**S(2)), x)/sin(e + f*x), x), x) + Simp(a*(a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))/(b**S(2)*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4550(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(3))), Int((a + b/cos(e + f*x))**m*Simp(C*a + b*(A*(m + S(3)) + C*(m + S(2)))/cos(e + f*x) - (-B*b*(m + S(3)) + S(2)*C*a)/cos(e + f*x)**S(2), x)/cos(e + f*x), x), x) + Simp(C*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + S(3))*cos(e + f*x)), x) def replacement4551(A, B, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(3))), Int((a + b/sin(e + f*x))**m*Simp(C*a + b*(A*(m + S(3)) + C*(m + S(2)))/sin(e + f*x) - (-B*b*(m + S(3)) + S(2)*C*a)/sin(e + f*x)**S(2), x)/sin(e + f*x), x), x) - Simp(C*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + S(3))*sin(e + f*x)*tan(e + f*x)), x) def replacement4552(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(3))), Int((a + b/cos(e + f*x))**m*Simp(C*a - S(2)*C*a/cos(e + f*x)**S(2) + b*(A*(m + S(3)) + C*(m + S(2)))/cos(e + f*x), x)/cos(e + f*x), x), x) + Simp(C*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + S(3))*cos(e + f*x)), x) def replacement4553(A, C, a, b, e, f, m, x): return Dist(S(1)/(b*(m + S(3))), Int((a + b/sin(e + f*x))**m*Simp(C*a - S(2)*C*a/sin(e + f*x)**S(2) + b*(A*(m + S(3)) + C*(m + S(2)))/sin(e + f*x), x)/sin(e + f*x), x), x) - Simp(C*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + S(3))*sin(e + f*x)*tan(e + f*x)), x) def replacement4554(A, B, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-1))*Simp(A*b*m - B*a*n - b*(A*(m + n + S(1)) + C*n)/cos(e + f*x)**S(2) - (B*b*n + a*(A*(n + S(1)) + C*n))/cos(e + f*x), x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*n), x) def replacement4555(A, B, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-1))*Simp(A*b*m - B*a*n - b*(A*(m + n + S(1)) + C*n)/sin(e + f*x)**S(2) - (B*b*n + a*(A*(n + S(1)) + C*n))/sin(e + f*x), x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*n*tan(e + f*x)), x) def replacement4556(A, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**(m + S(-1))*Simp(A*b*m - a*(A*(n + S(1)) + C*n)/cos(e + f*x) - b*(A*(m + n + S(1)) + C*n)/cos(e + f*x)**S(2), x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*n), x) def replacement4557(A, C, a, b, d, e, f, m, n, x): return -Dist(S(1)/(d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**(m + S(-1))*Simp(A*b*m - a*(A*(n + S(1)) + C*n)/sin(e + f*x) - b*(A*(m + n + S(1)) + C*n)/sin(e + f*x)**S(2), x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*n*tan(e + f*x)), x) def replacement4558(A, B, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(m + n + S(1)), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1))*Simp(A*a*(m + n + S(1)) + C*a*n + (B*b*(m + n + S(1)) + C*a*m)/cos(e + f*x)**S(2) + (C*b*(m + n) + (A*b + B*a)*(m + n + S(1)))/cos(e + f*x), x), x), x) + Simp(C*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + n + S(1))), x) def replacement4559(A, B, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(m + n + S(1)), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1))*Simp(A*a*(m + n + S(1)) + C*a*n + (B*b*(m + n + S(1)) + C*a*m)/sin(e + f*x)**S(2) + (C*b*(m + n) + (A*b + B*a)*(m + n + S(1)))/sin(e + f*x), x), x), x) - Simp(C*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*(m + n + S(1))*tan(e + f*x)), x) def replacement4560(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(m + n + S(1)), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(-1))*Simp(A*a*(m + n + S(1)) + C*a*m/cos(e + f*x)**S(2) + C*a*n + b*(A*(m + n + S(1)) + C*(m + n))/cos(e + f*x), x), x), x) + Simp(C*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*tan(e + f*x)/(f*(m + n + S(1))), x) def replacement4561(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(m + n + S(1)), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(-1))*Simp(A*a*(m + n + S(1)) + C*a*m/sin(e + f*x)**S(2) + C*a*n + b*(A*(m + n + S(1)) + C*(m + n))/sin(e + f*x), x), x), x) - Simp(C*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m/(f*(m + n + S(1))*tan(e + f*x)), x) def replacement4562(A, B, C, a, b, d, e, f, m, n, x): return Dist(d/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*Simp(A*b**S(2)*(n + S(-1)) - a*(n + S(-1))*(B*b - C*a) + b*(m + S(1))*(A*a - B*b + C*a)/cos(e + f*x) - (C*(a**S(2)*n + b**S(2)*(m + S(1))) + b*(A*b - B*a)*(m + n + S(1)))/cos(e + f*x)**S(2), x), x), x) + Simp(d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*tan(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4563(A, B, C, a, b, d, e, f, m, n, x): return Dist(d/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*Simp(A*b**S(2)*(n + S(-1)) - a*(n + S(-1))*(B*b - C*a) + b*(m + S(1))*(A*a - B*b + C*a)/sin(e + f*x) - (C*(a**S(2)*n + b**S(2)*(m + S(1))) + b*(A*b - B*a)*(m + n + S(1)))/sin(e + f*x)**S(2), x), x), x) - Simp(d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))/(b*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4564(A, C, a, b, d, e, f, m, n, x): return Dist(d/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*Simp(A*b**S(2)*(n + S(-1)) + C*a**S(2)*(n + S(-1)) + a*b*(A + C)*(m + S(1))/cos(e + f*x) - (A*b**S(2)*(m + n + S(1)) + C*(a**S(2)*n + b**S(2)*(m + S(1))))/cos(e + f*x)**S(2), x), x), x) + Simp(d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*tan(e + f*x)/(b*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4565(A, C, a, b, d, e, f, m, n, x): return Dist(d/(b*(a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*Simp(A*b**S(2)*(n + S(-1)) + C*a**S(2)*(n + S(-1)) + a*b*(A + C)*(m + S(1))/sin(e + f*x) - (A*b**S(2)*(m + n + S(1)) + C*(a**S(2)*n + b**S(2)*(m + S(1))))/sin(e + f*x)**S(2), x), x), x) - Simp(d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))/(b*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4566(A, B, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*Simp(a*(m + S(1))*(A*a - B*b + C*a) - a*(m + S(1))*(A*b - B*a + C*b)/cos(e + f*x) - (m + n + S(1))*(A*b**S(2) - B*a*b + C*a**S(2)) + (m + n + S(2))*(A*b**S(2) - B*a*b + C*a**S(2))/cos(e + f*x)**S(2), x), x), x) - Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))*tan(e + f*x)/(a*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4567(A, B, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*Simp(a*(m + S(1))*(A*a - B*b + C*a) - a*(m + S(1))*(A*b - B*a + C*b)/sin(e + f*x) - (m + n + S(1))*(A*b**S(2) - B*a*b + C*a**S(2)) + (m + n + S(2))*(A*b**S(2) - B*a*b + C*a**S(2))/sin(e + f*x)**S(2), x), x), x) + Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) - B*a*b + C*a**S(2))/(a*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4568(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*Simp(a**S(2)*(A + C)*(m + S(1)) - a*b*(A + C)*(m + S(1))/cos(e + f*x) - (A*b**S(2) + C*a**S(2))*(m + n + S(1)) + (A*b**S(2) + C*a**S(2))*(m + n + S(2))/cos(e + f*x)**S(2), x), x), x) - Simp((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))*tan(e + f*x)/(a*f*(a**S(2) - b**S(2))*(m + S(1))), x) def replacement4569(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*(a**S(2) - b**S(2))*(m + S(1))), Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*Simp(a**S(2)*(A + C)*(m + S(1)) - a*b*(A + C)*(m + S(1))/sin(e + f*x) - (A*b**S(2) + C*a**S(2))*(m + n + S(1)) + (A*b**S(2) + C*a**S(2))*(m + n + S(2))/sin(e + f*x)**S(2), x), x), x) + Simp((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))*(A*b**S(2) + C*a**S(2))/(a*f*(a**S(2) - b**S(2))*(m + S(1))*tan(e + f*x)), x) def replacement4570(A, B, C, a, b, d, e, f, m, n, x): return Dist(d/(b*(m + n + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**m*Simp(C*a*(n + S(-1)) + (A*b*(m + n + S(1)) + C*b*(m + n))/cos(e + f*x) + (B*b*(m + n + S(1)) - C*a*n)/cos(e + f*x)**S(2), x), x), x) + Simp(C*d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + n + S(1))), x) def replacement4571(A, B, C, a, b, d, e, f, m, n, x): return Dist(d/(b*(m + n + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**m*Simp(C*a*(n + S(-1)) + (A*b*(m + n + S(1)) + C*b*(m + n))/sin(e + f*x) + (B*b*(m + n + S(1)) - C*a*n)/sin(e + f*x)**S(2), x), x), x) - Simp(C*d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + n + S(1))*tan(e + f*x)), x) def replacement4572(A, C, a, b, d, e, f, m, n, x): return Dist(d/(b*(m + n + S(1))), Int((d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**m*Simp(-C*a*n/cos(e + f*x)**S(2) + C*a*(n + S(-1)) + (A*b*(m + n + S(1)) + C*b*(m + n))/cos(e + f*x), x), x), x) + Simp(C*d*(d/cos(e + f*x))**(n + S(-1))*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(b*f*(m + n + S(1))), x) def replacement4573(A, C, a, b, d, e, f, m, n, x): return Dist(d/(b*(m + n + S(1))), Int((d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**m*Simp(-C*a*n/sin(e + f*x)**S(2) + C*a*(n + S(-1)) + (A*b*(m + n + S(1)) + C*b*(m + n))/sin(e + f*x), x), x), x) - Simp(C*d*(d/sin(e + f*x))**(n + S(-1))*(a + b/sin(e + f*x))**(m + S(1))/(b*f*(m + n + S(1))*tan(e + f*x)), x) def replacement4574(A, B, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m*Simp(-A*b*(m + n + S(1)) + A*b*(m + n + S(2))/cos(e + f*x)**S(2) + B*a*n + a*(A*n + A + C*n)/cos(e + f*x), x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(a*f*n), x) def replacement4575(A, B, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m*Simp(-A*b*(m + n + S(1)) + A*b*(m + n + S(2))/sin(e + f*x)**S(2) + B*a*n + a*(A*n + A + C*n)/sin(e + f*x), x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))/(a*f*n*tan(e + f*x)), x) def replacement4576(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*d*n), Int((d/cos(e + f*x))**(n + S(1))*(a + b/cos(e + f*x))**m*Simp(-A*b*(m + n + S(1)) + A*b*(m + n + S(2))/cos(e + f*x)**S(2) + a*(A*n + A + C*n)/cos(e + f*x), x), x), x) - Simp(A*(d/cos(e + f*x))**n*(a + b/cos(e + f*x))**(m + S(1))*tan(e + f*x)/(a*f*n), x) def replacement4577(A, C, a, b, d, e, f, m, n, x): return Dist(S(1)/(a*d*n), Int((d/sin(e + f*x))**(n + S(1))*(a + b/sin(e + f*x))**m*Simp(-A*b*(m + n + S(1)) + A*b*(m + n + S(2))/sin(e + f*x)**S(2) + a*(A*n + A + C*n)/sin(e + f*x), x), x), x) + Simp(A*(d/sin(e + f*x))**n*(a + b/sin(e + f*x))**(m + S(1))/(a*f*n*tan(e + f*x)), x) def replacement4578(A, B, C, a, b, d, e, f, x): return Dist(a**(S(-2)), Int((A*a - (A*b - B*a)/cos(e + f*x))/sqrt(d/cos(e + f*x)), x), x) + Dist((A*b**S(2) - B*a*b + C*a**S(2))/(a**S(2)*d**S(2)), Int((d/cos(e + f*x))**(S(3)/2)/(a + b/cos(e + f*x)), x), x) def replacement4579(A, B, C, a, b, d, e, f, x): return Dist(a**(S(-2)), Int((A*a - (A*b - B*a)/sin(e + f*x))/sqrt(d/sin(e + f*x)), x), x) + Dist((A*b**S(2) - B*a*b + C*a**S(2))/(a**S(2)*d**S(2)), Int((d/sin(e + f*x))**(S(3)/2)/(a + b/sin(e + f*x)), x), x) def replacement4580(A, C, a, b, d, e, f, x): return Dist(a**(S(-2)), Int((A*a - A*b/cos(e + f*x))/sqrt(d/cos(e + f*x)), x), x) + Dist((A*b**S(2) + C*a**S(2))/(a**S(2)*d**S(2)), Int((d/cos(e + f*x))**(S(3)/2)/(a + b/cos(e + f*x)), x), x) def replacement4581(A, C, a, b, d, e, f, x): return Dist(a**(S(-2)), Int((A*a - A*b/sin(e + f*x))/sqrt(d/sin(e + f*x)), x), x) + Dist((A*b**S(2) + C*a**S(2))/(a**S(2)*d**S(2)), Int((d/sin(e + f*x))**(S(3)/2)/(a + b/sin(e + f*x)), x), x) def replacement4582(A, B, C, a, b, d, e, f, x): return Dist(C/d**S(2), Int((d/cos(e + f*x))**(S(3)/2)/sqrt(a + b/cos(e + f*x)), x), x) + Int((A + B/cos(e + f*x))/(sqrt(d/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), x) def replacement4583(A, B, C, a, b, d, e, f, x): return Dist(C/d**S(2), Int((d/sin(e + f*x))**(S(3)/2)/sqrt(a + b/sin(e + f*x)), x), x) + Int((A + B/sin(e + f*x))/(sqrt(d/sin(e + f*x))*sqrt(a + b/sin(e + f*x))), x) def replacement4584(A, C, a, b, d, e, f, x): return Dist(A, Int(S(1)/(sqrt(d/cos(e + f*x))*sqrt(a + b/cos(e + f*x))), x), x) + Dist(C/d**S(2), Int((d/cos(e + f*x))**(S(3)/2)/sqrt(a + b/cos(e + f*x)), x), x) def replacement4585(A, C, a, b, d, e, f, x): return Dist(A, Int(S(1)/(sqrt(d/sin(e + f*x))*sqrt(a + b/sin(e + f*x))), x), x) + Dist(C/d**S(2), Int((d/sin(e + f*x))**(S(3)/2)/sqrt(a + b/sin(e + f*x)), x), x) def replacement4586(A, B, C, a, b, d, e, f, m, n, x): return Int((d/cos(e + f*x))**n*(a + b/cos(e + f*x))**m*(A + B/cos(e + f*x) + C/cos(e + f*x)**S(2)), x) def replacement4587(A, B, C, a, b, d, e, f, m, n, x): return Int((d/sin(e + f*x))**n*(a + b/sin(e + f*x))**m*(A + B/sin(e + f*x) + C/sin(e + f*x)**S(2)), x) def replacement4588(A, C, a, b, d, e, f, m, n, x): return Int((d/cos(e + f*x))**n*(A + C/cos(e + f*x)**S(2))*(a + b/cos(e + f*x))**m, x) def replacement4589(A, C, a, b, d, e, f, m, n, x): return Int((d/sin(e + f*x))**n*(A + C/sin(e + f*x)**S(2))*(a + b/sin(e + f*x))**m, x) def replacement4590(A, B, C, a, b, d, e, f, m, n, x): return Dist(d**(m + S(2)), Int((d*cos(e + f*x))**(-m + n + S(-2))*(a*cos(e + f*x) + b)**m*(A*cos(e + f*x)**S(2) + B*cos(e + f*x) + C), x), x) def replacement4591(A, B, C, a, b, d, e, f, m, n, x): return Dist(d**(m + S(2)), Int((d*sin(e + f*x))**(-m + n + S(-2))*(a*sin(e + f*x) + b)**m*(A*sin(e + f*x)**S(2) + B*sin(e + f*x) + C), x), x) def replacement4592(A, C, a, b, d, e, f, m, n, x): return Dist(d**(m + S(2)), Int((d*cos(e + f*x))**(-m + n + S(-2))*(A*cos(e + f*x)**S(2) + C)*(a*cos(e + f*x) + b)**m, x), x) def replacement4593(A, C, a, b, d, e, f, m, n, x): return Dist(d**(m + S(2)), Int((d*sin(e + f*x))**(-m + n + S(-2))*(A*sin(e + f*x)**S(2) + C)*(a*sin(e + f*x) + b)**m, x), x) def replacement4594(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d/cos(e + f*x))**p)**FracPart(n)*(d/cos(e + f*x))**(-p*FracPart(n)), Int((d/cos(e + f*x))**(n*p)*(a + b/cos(e + f*x))**m*(A + B/cos(e + f*x) + C/cos(e + f*x)**S(2)), x), x) def replacement4595(A, B, C, a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d/sin(e + f*x))**p)**FracPart(n)*(d/sin(e + f*x))**(-p*FracPart(n)), Int((d/sin(e + f*x))**(n*p)*(a + b/sin(e + f*x))**m*(A + B/sin(e + f*x) + C/sin(e + f*x)**S(2)), x), x) def replacement4596(A, C, a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d/cos(e + f*x))**p)**FracPart(n)*(d/cos(e + f*x))**(-p*FracPart(n)), Int((d/cos(e + f*x))**(n*p)*(A + C/cos(e + f*x)**S(2))*(a + b/cos(e + f*x))**m, x), x) def replacement4597(A, C, a, b, c, d, e, f, m, n, p, x): return Dist(c**IntPart(n)*(c*(d/sin(e + f*x))**p)**FracPart(n)*(d/sin(e + f*x))**(-p*FracPart(n)), Int((d/sin(e + f*x))**(n*p)*(A + C/sin(e + f*x)**S(2))*(a + b/sin(e + f*x))**m, x), x) def replacement4598(b, c, d, n, x): return Dist(b/d, Subst(Int((b*x**S(2) + b)**(n + S(-1)), x), x, tan(c + d*x)), x) def replacement4599(b, c, d, n, x): return -Dist(b/d, Subst(Int((b*x**S(2) + b)**(n + S(-1)), x), x, S(1)/tan(c + d*x)), x) def replacement4600(a, b, c, d, p, x): return Int((-a*tan(c + d*x)**S(2))**p, x) def replacement4601(a, b, c, d, p, x): return Int((-a/tan(c + d*x)**S(2))**p, x) def replacement4602(a, b, c, d, x): return -Dist(b/a, Int(S(1)/(a*cos(c + d*x)**S(2) + b), x), x) + Simp(x/a, x) def replacement4603(a, b, c, d, x): return -Dist(b/a, Int(S(1)/(a*sin(c + d*x)**S(2) + b), x), x) + Simp(x/a, x) def replacement4604(a, b, c, d, p, x): return Dist(S(1)/d, Subst(Int((a + b*x**S(2) + b)**p/(x**S(2) + S(1)), x), x, tan(c + d*x)), x) def replacement4605(a, b, c, d, p, x): return -Dist(S(1)/d, Subst(Int((a + b*x**S(2) + b)**p/(x**S(2) + S(1)), x), x, S(1)/tan(c + d*x)), x) def With4606(a, b, c, d, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f**(m + S(1))/d, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1))*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p, x), x, tan(c + d*x)/f), x) def With4607(a, b, c, d, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f**(m + S(1))/d, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1))*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p, x), x, S(1)/(f*tan(c + d*x))), x) def With4608(a, b, c, d, m, n, p, x): f = FreeFactors(cos(c + d*x), x) return -Dist(f/d, Subst(Int((f*x)**(-n*p)*(a*(f*x)**n + b)**p*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2), x), x, cos(c + d*x)/f), x) def With4609(a, b, c, d, m, n, p, x): f = FreeFactors(sin(c + d*x), x) return Dist(f/d, Subst(Int((f*x)**(-n*p)*(a*(f*x)**n + b)**p*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2), x), x, sin(c + d*x)/f), x) def With4610(a, b, c, d, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f/d, Subst(Int((f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1))*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p, x), x, tan(c + d*x)/f), x) def With4611(a, b, c, d, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f/d, Subst(Int((f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1))*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p, x), x, S(1)/(f*tan(c + d*x))), x) def With4612(a, b, c, d, m, n, p, x): f = FreeFactors(sin(c + d*x), x) return Dist(f/d, Subst(Int((-f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1)/2)*ExpandToSum(a*(-f**S(2)*x**S(2) + S(1))**(n/S(2)) + b, x)**p, x), x, sin(c + d*x)/f), x) def With4613(a, b, c, d, m, n, p, x): f = FreeFactors(cos(c + d*x), x) return -Dist(f/d, Subst(Int((-f**S(2)*x**S(2) + S(1))**(-m/S(2) - n*p/S(2) + S(-1)/2)*ExpandToSum(a*(-f**S(2)*x**S(2) + S(1))**(n/S(2)) + b, x)**p, x), x, cos(c + d*x)/f), x) def replacement4614(a, b, c, d, m, n, p, x): return Int(ExpandTrig((a + b*(S(1)/cos(c + d*x))**n)**p*(S(1)/cos(c + d*x))**m, x), x) def replacement4615(a, b, c, d, m, n, p, x): return Int(ExpandTrig((a + b*(S(1)/sin(c + d*x))**n)**p*(S(1)/sin(c + d*x))**m, x), x) def With4616(a, b, c, d, m, n, p, x): f = FreeFactors(cos(c + d*x), x) return -Dist(f**(-m - n*p + S(1))/d, Subst(Int(x**(-m - n*p)*(a*(f*x)**n + b)**p*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2), x), x, cos(c + d*x)/f), x) def With4617(a, b, c, d, m, n, p, x): f = FreeFactors(sin(c + d*x), x) return Dist(f**(-m - n*p + S(1))/d, Subst(Int(x**(-m - n*p)*(a*(f*x)**n + b)**p*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2), x), x, sin(c + d*x)/f), x) def With4618(a, b, c, d, m, n, p, x): f = FreeFactors(tan(c + d*x), x) return Dist(f**(m + S(1))/d, Subst(Int(x**m*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p/(f**S(2)*x**S(2) + S(1)), x), x, tan(c + d*x)/f), x) def With4619(a, b, c, d, m, n, p, x): f = FreeFactors(S(1)/tan(c + d*x), x) return -Dist(f**(m + S(1))/d, Subst(Int(x**m*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)), x)**p/(f**S(2)*x**S(2) + S(1)), x), x, S(1)/(f*tan(c + d*x))), x) def replacement4620(a, b, c, d, e, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*(S(1)/cos(d + e*x))**n)**(S(2)*p), x), x) def replacement4621(a, b, c, d, e, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*(S(1)/sin(d + e*x))**n)**(S(2)*p), x), x) def replacement4622(a, b, c, d, e, n, n2, p, x): return Dist((b + S(2)*c*(S(1)/cos(d + e*x))**n)**(-S(2)*p)*(a + b*(S(1)/cos(d + e*x))**n + c*(S(1)/cos(d + e*x))**(S(2)*n))**p, Int(u*(b + S(2)*c*(S(1)/cos(d + e*x))**n)**(S(2)*p), x), x) def replacement4623(a, b, c, d, e, n, n2, p, x): return Dist((b + S(2)*c*(S(1)/sin(d + e*x))**n)**(-S(2)*p)*(a + b*(S(1)/sin(d + e*x))**n + c*(S(1)/sin(d + e*x))**(S(2)*n))**p, Int(u*(b + S(2)*c*(S(1)/sin(d + e*x))**n)**(S(2)*p), x), x) def With4624(a, b, c, d, e, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*(S(1)/cos(d + e*x))**n - q), x), x) - Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*(S(1)/cos(d + e*x))**n + q), x), x) def With4625(a, b, c, d, e, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*(S(1)/sin(d + e*x))**n - q), x), x) - Dist(S(2)*c/q, Int(S(1)/(b + S(2)*c*(S(1)/sin(d + e*x))**n + q), x), x) def With4626(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(cos(d + e*x), x) return -Dist(f/e, Subst(Int((f*x)**(-n*p)*(a*(f*x)**n + b)**p*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2), x), x, cos(d + e*x)/f), x) def With4627(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(sin(d + e*x), x) return Dist(f/e, Subst(Int((f*x)**(-n*p)*(a*(f*x)**n + b)**p*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2), x), x, sin(d + e*x)/f), x) def With4628(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(tan(d + e*x), x) return Dist(f**(m + S(1))/e, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1))*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + c*(f**S(2)*x**S(2) + S(1))**n, x)**p, x), x, tan(d + e*x)/f), x) def With4629(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(S(1)/tan(d + e*x), x) return -Dist(f**(m + S(1))/e, Subst(Int(x**m*(f**S(2)*x**S(2) + S(1))**(-m/S(2) + S(-1))*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + c*(f**S(2)*x**S(2) + S(1))**n, x)**p, x), x, S(1)/(f*tan(d + e*x))), x) def replacement4630(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*(S(1)/cos(d + e*x))**n)**(S(2)*p)*(S(1)/cos(d + e*x))**m, x), x) def replacement4631(a, b, c, d, e, m, n, n2, p, x): return Dist(S(4)**(-p)*c**(-p), Int((b + S(2)*c*(S(1)/sin(d + e*x))**n)**(S(2)*p)*(S(1)/sin(d + e*x))**m, x), x) def replacement4632(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*(S(1)/cos(d + e*x))**n)**(-S(2)*p)*(a + b*(S(1)/cos(d + e*x))**n + c*(S(1)/cos(d + e*x))**(S(2)*n))**p, Int((b + S(2)*c*(S(1)/cos(d + e*x))**n)**(S(2)*p)*(S(1)/cos(d + e*x))**m, x), x) def replacement4633(a, b, c, d, e, m, n, n2, p, x): return Dist((b + S(2)*c*(S(1)/sin(d + e*x))**n)**(-S(2)*p)*(a + b*(S(1)/sin(d + e*x))**n + c*(S(1)/sin(d + e*x))**(S(2)*n))**p, Int((b + S(2)*c*(S(1)/sin(d + e*x))**n)**(S(2)*p)*(S(1)/sin(d + e*x))**m, x), x) def replacement4634(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((a + b*(S(1)/cos(d + e*x))**n + c*(S(1)/cos(d + e*x))**(S(2)*n))**p*(S(1)/cos(d + e*x))**m, x), x) def replacement4635(a, b, c, d, e, m, n, n2, p, x): return Int(ExpandTrig((a + b*(S(1)/sin(d + e*x))**n + c*(S(1)/sin(d + e*x))**(S(2)*n))**p*(S(1)/sin(d + e*x))**m, x), x) def With4636(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(cos(d + e*x), x) return -Dist(f**(-m - n*p + S(1))/e, Subst(Int(x**(-m - S(2)*n*p)*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*(b*(f*x)**n + c*(f*x)**(S(2)*n) + c)**p, x), x, cos(d + e*x)/f), x) def With4637(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(sin(d + e*x), x) return Dist(f**(-m - n*p + S(1))/e, Subst(Int(x**(-m - S(2)*n*p)*(-f**S(2)*x**S(2) + S(1))**(m/S(2) + S(-1)/2)*(b*(f*x)**n + c*(f*x)**(S(2)*n) + c)**p, x), x, sin(d + e*x)/f), x) def With4638(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(tan(d + e*x), x) return Dist(f**(m + S(1))/e, Subst(Int(x**m*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + c*(f**S(2)*x**S(2) + S(1))**n, x)**p/(f**S(2)*x**S(2) + S(1)), x), x, tan(d + e*x)/f), x) def With4639(a, b, c, d, e, m, n, n2, p, x): f = FreeFactors(S(1)/tan(d + e*x), x) return -Dist(f**(m + S(1))/e, Subst(Int(x**m*ExpandToSum(a + b*(f**S(2)*x**S(2) + S(1))**(n/S(2)) + c*(f**S(2)*x**S(2) + S(1))**n, x)**p/(f**S(2)*x**S(2) + S(1)), x), x, S(1)/(f*tan(d + e*x))), x) def replacement4640(A, B, a, b, c, d, e, n, x): return Dist(S(4)**(-n)*c**(-n), Int((A + B/cos(d + e*x))*(b + S(2)*c/cos(d + e*x))**(S(2)*n), x), x) def replacement4641(A, B, a, b, c, d, e, n, x): return Dist(S(4)**(-n)*c**(-n), Int((A + B/sin(d + e*x))*(b + S(2)*c/sin(d + e*x))**(S(2)*n), x), x) def replacement4642(A, B, a, b, c, d, e, n, x): return Dist((b + S(2)*c/cos(d + e*x))**(-S(2)*n)*(a + b/cos(d + e*x) + c/cos(d + e*x)**S(2))**n, Int((A + B/cos(d + e*x))*(b + S(2)*c/cos(d + e*x))**(S(2)*n), x), x) def replacement4643(A, B, a, b, c, d, e, n, x): return Dist((b + S(2)*c/sin(d + e*x))**(-S(2)*n)*(a + b/sin(d + e*x) + c/sin(d + e*x)**S(2))**n, Int((A + B/sin(d + e*x))*(b + S(2)*c/sin(d + e*x))**(S(2)*n), x), x) def With4644(A, B, a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(B - (-S(2)*A*c + B*b)/q, Int(S(1)/(b + S(2)*c/cos(d + e*x) - q), x), x) + Dist(B + (-S(2)*A*c + B*b)/q, Int(S(1)/(b + S(2)*c/cos(d + e*x) + q), x), x) def With4645(A, B, a, b, c, d, e, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(B - (-S(2)*A*c + B*b)/q, Int(S(1)/(b + S(2)*c/sin(d + e*x) - q), x), x) + Dist(B + (-S(2)*A*c + B*b)/q, Int(S(1)/(b + S(2)*c/sin(d + e*x) + q), x), x) def replacement4646(A, B, a, b, c, d, e, n, x): return Int(ExpandTrig((A + B/cos(d + e*x))*(a + b/cos(d + e*x) + c/cos(d + e*x)**S(2))**n, x), x) def replacement4647(A, B, a, b, c, d, e, n, x): return Int(ExpandTrig((A + B/sin(d + e*x))*(a + b/sin(d + e*x) + c/sin(d + e*x)**S(2))**n, x), x) def replacement4648(c, d, e, f, m, x): return -Dist(d*m/f, Int((c + d*x)**(m + S(-1))*log(-I*exp(I*(e + f*x)) + S(1)), x), x) + Dist(d*m/f, Int((c + d*x)**(m + S(-1))*log(I*exp(I*(e + f*x)) + S(1)), x), x) + Simp(-S(2)*I*(c + d*x)**m*ArcTan(exp(I*e + I*f*x))/f, x) def replacement4649(c, d, e, f, m, x): return -Dist(d*m/f, Int((c + d*x)**(m + S(-1))*log(S(1) - exp(I*(e + f*x))), x), x) + Dist(d*m/f, Int((c + d*x)**(m + S(-1))*log(exp(I*(e + f*x)) + S(1)), x), x) + Simp(-S(2)*(c + d*x)**m*atanh(exp(I*e + I*f*x))/f, x) def replacement4650(c, d, e, f, m, x): return -Dist(d*m/f, Int((c + d*x)**(m + S(-1))*tan(e + f*x), x), x) + Simp((c + d*x)**m*tan(e + f*x)/f, x) def replacement4651(c, d, e, f, m, x): return Dist(d*m/f, Int((c + d*x)**(m + S(-1))/tan(e + f*x), x), x) - Simp((c + d*x)**m/(f*tan(e + f*x)), x) def replacement4652(b, c, d, e, f, n, x): return Dist(b**S(2)*(n + S(-2))/(n + S(-1)), Int((b/cos(e + f*x))**(n + S(-2))*(c + d*x), x), x) - Simp(b**S(2)*d*(b/cos(e + f*x))**(n + S(-2))/(f**S(2)*(n + S(-2))*(n + S(-1))), x) + Simp(b**S(2)*(b/cos(e + f*x))**(n + S(-2))*(c + d*x)*tan(e + f*x)/(f*(n + S(-1))), x) def replacement4653(b, c, d, e, f, n, x): return Dist(b**S(2)*(n + S(-2))/(n + S(-1)), Int((b/sin(e + f*x))**(n + S(-2))*(c + d*x), x), x) - Simp(b**S(2)*d*(b/sin(e + f*x))**(n + S(-2))/(f**S(2)*(n + S(-2))*(n + S(-1))), x) - Simp(b**S(2)*(b/sin(e + f*x))**(n + S(-2))*(c + d*x)/(f*(n + S(-1))*tan(e + f*x)), x) def replacement4654(b, c, d, e, f, m, n, x): return Dist(b**S(2)*(n + S(-2))/(n + S(-1)), Int((b/cos(e + f*x))**(n + S(-2))*(c + d*x)**m, x), x) + Dist(b**S(2)*d**S(2)*m*(m + S(-1))/(f**S(2)*(n + S(-2))*(n + S(-1))), Int((b/cos(e + f*x))**(n + S(-2))*(c + d*x)**(m + S(-2)), x), x) + Simp(b**S(2)*(b/cos(e + f*x))**(n + S(-2))*(c + d*x)**m*tan(e + f*x)/(f*(n + S(-1))), x) - Simp(b**S(2)*d*m*(b/cos(e + f*x))**(n + S(-2))*(c + d*x)**(m + S(-1))/(f**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement4655(b, c, d, e, f, m, n, x): return Dist(b**S(2)*(n + S(-2))/(n + S(-1)), Int((b/sin(e + f*x))**(n + S(-2))*(c + d*x)**m, x), x) + Dist(b**S(2)*d**S(2)*m*(m + S(-1))/(f**S(2)*(n + S(-2))*(n + S(-1))), Int((b/sin(e + f*x))**(n + S(-2))*(c + d*x)**(m + S(-2)), x), x) - Simp(b**S(2)*(b/sin(e + f*x))**(n + S(-2))*(c + d*x)**m/(f*(n + S(-1))*tan(e + f*x)), x) - Simp(b**S(2)*d*m*(b/sin(e + f*x))**(n + S(-2))*(c + d*x)**(m + S(-1))/(f**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement4656(b, c, d, e, f, n, x): return Dist((n + S(1))/(b**S(2)*n), Int((b/cos(e + f*x))**(n + S(2))*(c + d*x), x), x) + Simp(d*(b/cos(e + f*x))**n/(f**S(2)*n**S(2)), x) - Simp((b/cos(e + f*x))**(n + S(1))*(c + d*x)*sin(e + f*x)/(b*f*n), x) def replacement4657(b, c, d, e, f, n, x): return Dist((n + S(1))/(b**S(2)*n), Int((b/sin(e + f*x))**(n + S(2))*(c + d*x), x), x) + Simp(d*(b/sin(e + f*x))**n/(f**S(2)*n**S(2)), x) + Simp((b/sin(e + f*x))**(n + S(1))*(c + d*x)*cos(e + f*x)/(b*f*n), x) def replacement4658(b, c, d, e, f, m, n, x): return Dist((n + S(1))/(b**S(2)*n), Int((b/cos(e + f*x))**(n + S(2))*(c + d*x)**m, x), x) - Dist(d**S(2)*m*(m + S(-1))/(f**S(2)*n**S(2)), Int((b/cos(e + f*x))**n*(c + d*x)**(m + S(-2)), x), x) - Simp((b/cos(e + f*x))**(n + S(1))*(c + d*x)**m*sin(e + f*x)/(b*f*n), x) + Simp(d*m*(b/cos(e + f*x))**n*(c + d*x)**(m + S(-1))/(f**S(2)*n**S(2)), x) def replacement4659(b, c, d, e, f, m, n, x): return Dist((n + S(1))/(b**S(2)*n), Int((b/sin(e + f*x))**(n + S(2))*(c + d*x)**m, x), x) - Dist(d**S(2)*m*(m + S(-1))/(f**S(2)*n**S(2)), Int((b/sin(e + f*x))**n*(c + d*x)**(m + S(-2)), x), x) + Simp((b/sin(e + f*x))**(n + S(1))*(c + d*x)**m*cos(e + f*x)/(b*f*n), x) + Simp(d*m*(b/sin(e + f*x))**n*(c + d*x)**(m + S(-1))/(f**S(2)*n**S(2)), x) def replacement4660(b, c, d, e, f, m, n, x): return Dist((b/cos(e + f*x))**n*(b*cos(e + f*x))**n, Int((b*cos(e + f*x))**(-n)*(c + d*x)**m, x), x) def replacement4661(b, c, d, e, f, m, n, x): return Dist((b/sin(e + f*x))**n*(b*sin(e + f*x))**n, Int((b*sin(e + f*x))**(-n)*(c + d*x)**m, x), x) def replacement4662(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b/cos(e + f*x))**n, x), x) def replacement4663(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a + b/sin(e + f*x))**n, x), x) def replacement4664(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a*cos(e + f*x) + b)**n*cos(e + f*x)**(-n), x), x) def replacement4665(a, b, c, d, e, f, m, n, x): return Int(ExpandIntegrand((c + d*x)**m, (a*sin(e + f*x) + b)**n*sin(e + f*x)**(-n), x), x) def replacement4666(a, b, m, n, u, v, x): return Int((a + b/cos(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement4667(a, b, m, n, u, v, x): return Int((a + b/sin(ExpandToSum(v, x)))**n*ExpandToSum(u, x)**m, x) def replacement4668(a, b, c, d, e, f, m, n, x): return Int((a + b/cos(e + f*x))**n*(c + d*x)**m, x) def replacement4669(a, b, c, d, e, f, m, n, x): return Int((a + b/sin(e + f*x))**n*(c + d*x)**m, x) def replacement4670(a, b, c, d, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + S(1)/n)*(a + b/cos(c + d*x))**p, x), x, x**n), x) def replacement4671(a, b, c, d, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + S(1)/n)*(a + b/sin(c + d*x))**p, x), x, x**n), x) def replacement4672(a, b, c, d, n, p, x): return Int((a + b/cos(c + d*x**n))**p, x) def replacement4673(a, b, c, d, n, p, x): return Int((a + b/sin(c + d*x**n))**p, x) def replacement4674(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b/cos(c + d*x**n))**p, x), x, u), x) def replacement4675(a, b, c, d, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a + b/sin(c + d*x**n))**p, x), x, u), x) def replacement4676(a, b, p, u, x): return Int((a + b/cos(ExpandToSum(u, x)))**p, x) def replacement4677(a, b, p, u, x): return Int((a + b/sin(ExpandToSum(u, x)))**p, x) def replacement4678(a, b, c, d, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b/cos(c + d*x))**p, x), x, x**n), x) def replacement4679(a, b, c, d, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b/sin(c + d*x))**p, x), x, x**n), x) def replacement4680(a, b, c, d, m, n, p, x): return Int(x**m*(a + b/cos(c + d*x**n))**p, x) def replacement4681(a, b, c, d, m, n, p, x): return Int(x**m*(a + b/sin(c + d*x**n))**p, x) def replacement4682(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b/cos(c + d*x**n))**p, x), x) def replacement4683(a, b, c, d, e, m, n, p, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(a + b/sin(c + d*x**n))**p, x), x) def replacement4684(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b/cos(ExpandToSum(u, x)))**p, x) def replacement4685(a, b, e, m, p, u, x): return Int((e*x)**m*(a + b/sin(ExpandToSum(u, x)))**p, x) def replacement4686(a, b, m, n, p, x): return -Dist((m - n + S(1))/(b*n*(p + S(-1))), Int(x**(m - n)*(S(1)/cos(a + b*x**n))**(p + S(-1)), x), x) + Simp(x**(m - n + S(1))*(S(1)/cos(a + b*x**n))**(p + S(-1))/(b*n*(p + S(-1))), x) def replacement4687(a, b, m, n, p, x): return Dist((m - n + S(1))/(b*n*(p + S(-1))), Int(x**(m - n)*(S(1)/sin(a + b*x**n))**(p + S(-1)), x), x) - Simp(x**(m - n + S(1))*(S(1)/sin(a + b*x**n))**(p + S(-1))/(b*n*(p + S(-1))), x)
a01d5802750c4ee8274a5738da325ae3867d2cd6f745b1f9b21516adb2ecda81
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def special_functions(): from sympy.integrals.rubi.constraints import cons69, cons2, cons3, cons68, cons19, cons1266, cons8, cons29, cons20, cons168, cons1959, cons1960, cons96, cons263, cons1961, cons1834, cons64, cons1962, cons1963, cons1964, cons249, cons1965, cons1966, cons1967, cons1833, cons4, cons1257, cons21, cons1361, cons1968, cons1969, cons170, cons1970, cons1971, cons33, cons1972, cons1973, cons1974, cons802, cons89, cons90, cons5, cons52, cons91, cons385, cons50, cons1975, cons1976, cons1977, cons54, cons1978, cons1101, cons127, cons1245, cons13, cons139, cons1381, cons1979, cons1980, cons198, cons1981, cons1982, cons1983, cons152, cons465, cons1767, cons165, cons950, cons951, cons1984, cons1985, cons805, cons1986, cons1987, cons1988, cons1989, cons340, cons1990, cons1991, cons1992, cons1993, cons1994, cons1995, cons40, cons1996, cons349, cons1997, cons1998, cons1999, cons2000, cons2001, cons2002, cons2003 pattern6742 = Pattern(Integral(Erf(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6742 = ReplacementRule(pattern6742, replacement6742) pattern6743 = Pattern(Integral(Erfc(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6743 = ReplacementRule(pattern6743, replacement6743) pattern6744 = Pattern(Integral(Erfi(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6744 = ReplacementRule(pattern6744, replacement6744) pattern6745 = Pattern(Integral(Erf(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6745 = ReplacementRule(pattern6745, replacement6745) pattern6746 = Pattern(Integral(Erfc(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6746 = ReplacementRule(pattern6746, replacement6746) pattern6747 = Pattern(Integral(Erfi(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6747 = ReplacementRule(pattern6747, replacement6747) pattern6748 = Pattern(Integral(x_**WC('m', S(1))*Erf(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6748 = ReplacementRule(pattern6748, replacement6748) pattern6749 = Pattern(Integral(x_**WC('m', S(1))*Erfc(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6749 = ReplacementRule(pattern6749, replacement6749) pattern6750 = Pattern(Integral(x_**WC('m', S(1))*Erfi(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6750 = ReplacementRule(pattern6750, replacement6750) pattern6751 = Pattern(Integral(x_*Erf(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6751 = ReplacementRule(pattern6751, replacement6751) pattern6752 = Pattern(Integral(x_*Erfc(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6752 = ReplacementRule(pattern6752, replacement6752) pattern6753 = Pattern(Integral(x_*Erfi(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6753 = ReplacementRule(pattern6753, replacement6753) pattern6754 = Pattern(Integral(x_**m_*Erf(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons168) rule6754 = ReplacementRule(pattern6754, replacement6754) pattern6755 = Pattern(Integral(x_**m_*Erfc(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons168) rule6755 = ReplacementRule(pattern6755, replacement6755) pattern6756 = Pattern(Integral(x_**m_*Erfi(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons168) rule6756 = ReplacementRule(pattern6756, replacement6756) pattern6757 = Pattern(Integral(Erf(x_*WC('b', S(1)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0)))/x_, x_), cons3, cons1959) rule6757 = ReplacementRule(pattern6757, replacement6757) pattern6758 = Pattern(Integral(Erfc(x_*WC('b', S(1)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0)))/x_, x_), cons3, cons1959) rule6758 = ReplacementRule(pattern6758, replacement6758) pattern6759 = Pattern(Integral(Erfi(x_*WC('b', S(1)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0)))/x_, x_), cons3, cons1960) rule6759 = ReplacementRule(pattern6759, replacement6759) pattern6760 = Pattern(Integral(x_**m_*Erf(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6760 = ReplacementRule(pattern6760, replacement6760) pattern6761 = Pattern(Integral(x_**m_*Erfc(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6761 = ReplacementRule(pattern6761, replacement6761) pattern6762 = Pattern(Integral(x_**m_*Erfi(x_*WC('b', S(1)) + WC('a', S(0)))*exp(x_**S(2)*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6762 = ReplacementRule(pattern6762, replacement6762) pattern6763 = Pattern(Integral(Erf(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6763 = ReplacementRule(pattern6763, replacement6763) pattern6764 = Pattern(Integral(Erfc(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6764 = ReplacementRule(pattern6764, replacement6764) pattern6765 = Pattern(Integral(Erfi(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6765 = ReplacementRule(pattern6765, replacement6765) pattern6766 = Pattern(Integral(x_**WC('m', S(1))*Erf(x_*WC('b', S(1)))**S(2), x_), cons3, cons20, cons263, cons1961) rule6766 = ReplacementRule(pattern6766, replacement6766) pattern6767 = Pattern(Integral(x_**WC('m', S(1))*Erfc(x_*WC('b', S(1)))**S(2), x_), cons3, cons20, cons1834, cons1961) rule6767 = ReplacementRule(pattern6767, replacement6767) pattern6768 = Pattern(Integral(x_**WC('m', S(1))*Erfi(x_*WC('b', S(1)))**S(2), x_), cons3, cons20, cons1834, cons1961) rule6768 = ReplacementRule(pattern6768, replacement6768) pattern6769 = Pattern(Integral(x_**WC('m', S(1))*Erf(a_ + x_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons64) rule6769 = ReplacementRule(pattern6769, replacement6769) pattern6770 = Pattern(Integral(x_**WC('m', S(1))*Erfc(a_ + x_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons64) rule6770 = ReplacementRule(pattern6770, replacement6770) pattern6771 = Pattern(Integral(x_**WC('m', S(1))*Erfi(a_ + x_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons64) rule6771 = ReplacementRule(pattern6771, replacement6771) pattern6772 = Pattern(Integral(FresnelS(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6772 = ReplacementRule(pattern6772, replacement6772) pattern6773 = Pattern(Integral(FresnelC(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6773 = ReplacementRule(pattern6773, replacement6773) pattern6774 = Pattern(Integral(FresnelS(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6774 = ReplacementRule(pattern6774, replacement6774) pattern6775 = Pattern(Integral(FresnelC(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6775 = ReplacementRule(pattern6775, replacement6775) pattern6776 = Pattern(Integral(x_**WC('m', S(1))*FresnelS(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6776 = ReplacementRule(pattern6776, replacement6776) pattern6777 = Pattern(Integral(x_**WC('m', S(1))*FresnelC(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6777 = ReplacementRule(pattern6777, replacement6777) pattern6778 = Pattern(Integral(FresnelS(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6778 = ReplacementRule(pattern6778, replacement6778) pattern6779 = Pattern(Integral(FresnelC(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6779 = ReplacementRule(pattern6779, replacement6779) pattern6780 = Pattern(Integral(x_**m_*FresnelS(x_*WC('b', S(1)))**S(2), x_), cons3, cons20, cons1834, cons1962) rule6780 = ReplacementRule(pattern6780, replacement6780) pattern6781 = Pattern(Integral(x_**m_*FresnelC(x_*WC('b', S(1)))**S(2), x_), cons3, cons20, cons1834, cons1962) rule6781 = ReplacementRule(pattern6781, replacement6781) pattern6782 = Pattern(Integral(x_*FresnelS(x_*WC('b', S(1)))*sin(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963) rule6782 = ReplacementRule(pattern6782, replacement6782) pattern6783 = Pattern(Integral(x_*FresnelC(x_*WC('b', S(1)))*cos(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963) rule6783 = ReplacementRule(pattern6783, replacement6783) pattern6784 = Pattern(Integral(x_**m_*FresnelS(x_*WC('b', S(1)))*sin(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963, cons20, cons168, cons1964) rule6784 = ReplacementRule(pattern6784, replacement6784) pattern6785 = Pattern(Integral(x_**m_*FresnelC(x_*WC('b', S(1)))*cos(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963, cons20, cons168, cons1964) rule6785 = ReplacementRule(pattern6785, replacement6785) pattern6786 = Pattern(Integral(x_**m_*FresnelS(x_*WC('b', S(1)))*sin(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963, cons20, cons249, cons1965) rule6786 = ReplacementRule(pattern6786, replacement6786) pattern6787 = Pattern(Integral(x_**m_*FresnelC(x_*WC('b', S(1)))*cos(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963, cons20, cons249, cons1965) rule6787 = ReplacementRule(pattern6787, replacement6787) pattern6788 = Pattern(Integral(x_*FresnelS(x_*WC('b', S(1)))*cos(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963) rule6788 = ReplacementRule(pattern6788, replacement6788) pattern6789 = Pattern(Integral(x_*FresnelC(x_*WC('b', S(1)))*sin(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963) rule6789 = ReplacementRule(pattern6789, replacement6789) pattern6790 = Pattern(Integral(x_**m_*FresnelS(x_*WC('b', S(1)))*cos(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963, cons20, cons168, cons1966) rule6790 = ReplacementRule(pattern6790, replacement6790) pattern6791 = Pattern(Integral(x_**m_*FresnelC(x_*WC('b', S(1)))*sin(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963, cons20, cons168, cons1966) rule6791 = ReplacementRule(pattern6791, replacement6791) pattern6792 = Pattern(Integral(x_**m_*FresnelS(x_*WC('b', S(1)))*cos(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963, cons20, cons96, cons1967) rule6792 = ReplacementRule(pattern6792, replacement6792) pattern6793 = Pattern(Integral(x_**m_*FresnelC(x_*WC('b', S(1)))*sin(x_**S(2)*WC('c', S(1))), x_), cons3, cons8, cons1963, cons20, cons96, cons1967) rule6793 = ReplacementRule(pattern6793, replacement6793) pattern6794 = Pattern(Integral(ExpIntegralE(n_, x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons4, cons1833) rule6794 = ReplacementRule(pattern6794, replacement6794) pattern6795 = Pattern(Integral(x_**WC('m', S(1))*ExpIntegralE(n_, x_*WC('b', S(1))), x_), cons3, cons1257, cons64) rule6795 = ReplacementRule(pattern6795, replacement6795) pattern6796 = Pattern(Integral(ExpIntegralE(S(1), x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6796 = ReplacementRule(pattern6796, replacement6796) pattern6797 = Pattern(Integral(x_**m_*ExpIntegralE(n_, x_*WC('b', S(1))), x_), cons3, cons1257, cons20, cons96) rule6797 = ReplacementRule(pattern6797, replacement6797) pattern6798 = Pattern(Integral(x_**m_*ExpIntegralE(n_, x_*WC('b', S(1))), x_), cons3, cons19, cons4, cons1257, cons21) rule6798 = ReplacementRule(pattern6798, replacement6798) pattern6799 = Pattern(Integral(x_**WC('m', S(1))*ExpIntegralE(n_, x_*WC('b', S(1))), x_), cons3, cons19, cons4, cons1361) rule6799 = ReplacementRule(pattern6799, replacement6799) pattern6800 = Pattern(Integral(x_**WC('m', S(1))*ExpIntegralE(n_, a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons19, cons4, cons1968) rule6800 = ReplacementRule(pattern6800, replacement6800) pattern6801 = Pattern(Integral(x_**WC('m', S(1))*ExpIntegralE(n_, a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons19, cons1969, cons68) rule6801 = ReplacementRule(pattern6801, replacement6801) pattern6802 = Pattern(Integral(ExpIntegralEi(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6802 = ReplacementRule(pattern6802, replacement6802) pattern6803 = Pattern(Integral(x_**WC('m', S(1))*ExpIntegralEi(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6803 = ReplacementRule(pattern6803, replacement6803) pattern6804 = Pattern(Integral(ExpIntegralEi(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6804 = ReplacementRule(pattern6804, replacement6804) pattern6805 = Pattern(Integral(x_**WC('m', S(1))*ExpIntegralEi(x_*WC('b', S(1)))**S(2), x_), cons3, cons64) rule6805 = ReplacementRule(pattern6805, replacement6805) pattern6806 = Pattern(Integral(x_**WC('m', S(1))*ExpIntegralEi(a_ + x_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons64) rule6806 = ReplacementRule(pattern6806, replacement6806) pattern6807 = Pattern(Integral(ExpIntegralEi(x_*WC('d', S(1)) + WC('c', S(0)))*exp(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6807 = ReplacementRule(pattern6807, replacement6807) pattern6808 = Pattern(Integral(x_**WC('m', S(1))*ExpIntegralEi(x_*WC('d', S(1)) + WC('c', S(0)))*exp(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule6808 = ReplacementRule(pattern6808, replacement6808) pattern6809 = Pattern(Integral(x_**m_*ExpIntegralEi(x_*WC('d', S(1)) + WC('c', S(0)))*exp(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6809 = ReplacementRule(pattern6809, replacement6809) pattern6810 = Pattern(Integral(LogIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6810 = ReplacementRule(pattern6810, replacement6810) pattern6811 = Pattern(Integral(LogIntegral(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6811 = ReplacementRule(pattern6811, replacement6811) pattern6812 = Pattern(Integral(x_**WC('m', S(1))*LogIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6812 = ReplacementRule(pattern6812, replacement6812) pattern6813 = Pattern(Integral(SinIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6813 = ReplacementRule(pattern6813, replacement6813) pattern6814 = Pattern(Integral(CosIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6814 = ReplacementRule(pattern6814, replacement6814) pattern6815 = Pattern(Integral(SinIntegral(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6815 = ReplacementRule(pattern6815, replacement6815) pattern6816 = Pattern(Integral(CosIntegral(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6816 = ReplacementRule(pattern6816, replacement6816) pattern6817 = Pattern(Integral(x_**WC('m', S(1))*SinIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6817 = ReplacementRule(pattern6817, replacement6817) pattern6818 = Pattern(Integral(x_**WC('m', S(1))*CosIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6818 = ReplacementRule(pattern6818, replacement6818) pattern6819 = Pattern(Integral(SinIntegral(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6819 = ReplacementRule(pattern6819, replacement6819) pattern6820 = Pattern(Integral(CosIntegral(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6820 = ReplacementRule(pattern6820, replacement6820) pattern6821 = Pattern(Integral(x_**WC('m', S(1))*SinIntegral(x_*WC('b', S(1)))**S(2), x_), cons3, cons64) rule6821 = ReplacementRule(pattern6821, replacement6821) pattern6822 = Pattern(Integral(x_**WC('m', S(1))*CosIntegral(x_*WC('b', S(1)))**S(2), x_), cons3, cons64) rule6822 = ReplacementRule(pattern6822, replacement6822) pattern6823 = Pattern(Integral(x_**WC('m', S(1))*SinIntegral(a_ + x_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons64) rule6823 = ReplacementRule(pattern6823, replacement6823) pattern6824 = Pattern(Integral(x_**WC('m', S(1))*CosIntegral(a_ + x_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons64) rule6824 = ReplacementRule(pattern6824, replacement6824) pattern6825 = Pattern(Integral(SinIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6825 = ReplacementRule(pattern6825, replacement6825) pattern6826 = Pattern(Integral(CosIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6826 = ReplacementRule(pattern6826, replacement6826) pattern6827 = Pattern(Integral(x_**WC('m', S(1))*SinIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule6827 = ReplacementRule(pattern6827, replacement6827) pattern6828 = Pattern(Integral(x_**WC('m', S(1))*CosIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule6828 = ReplacementRule(pattern6828, replacement6828) pattern6829 = Pattern(Integral(x_**m_*SinIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6829 = ReplacementRule(pattern6829, replacement6829) pattern6830 = Pattern(Integral(x_**WC('m', S(1))*CosIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6830 = ReplacementRule(pattern6830, replacement6830) pattern6831 = Pattern(Integral(SinIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6831 = ReplacementRule(pattern6831, replacement6831) pattern6832 = Pattern(Integral(CosIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6832 = ReplacementRule(pattern6832, replacement6832) pattern6833 = Pattern(Integral(x_**WC('m', S(1))*SinIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule6833 = ReplacementRule(pattern6833, replacement6833) pattern6834 = Pattern(Integral(x_**WC('m', S(1))*CosIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule6834 = ReplacementRule(pattern6834, replacement6834) pattern6835 = Pattern(Integral(x_**WC('m', S(1))*SinIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6835 = ReplacementRule(pattern6835, replacement6835) pattern6836 = Pattern(Integral(x_**m_*CosIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6836 = ReplacementRule(pattern6836, replacement6836) pattern6837 = Pattern(Integral(SinhIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6837 = ReplacementRule(pattern6837, replacement6837) pattern6838 = Pattern(Integral(CoshIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6838 = ReplacementRule(pattern6838, replacement6838) pattern6839 = Pattern(Integral(SinhIntegral(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6839 = ReplacementRule(pattern6839, replacement6839) pattern6840 = Pattern(Integral(CoshIntegral(x_*WC('b', S(1)))/x_, x_), cons3, cons3) rule6840 = ReplacementRule(pattern6840, replacement6840) pattern6841 = Pattern(Integral(x_**WC('m', S(1))*SinhIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6841 = ReplacementRule(pattern6841, replacement6841) pattern6842 = Pattern(Integral(x_**WC('m', S(1))*CoshIntegral(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons19, cons68) rule6842 = ReplacementRule(pattern6842, replacement6842) pattern6843 = Pattern(Integral(SinhIntegral(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6843 = ReplacementRule(pattern6843, replacement6843) pattern6844 = Pattern(Integral(CoshIntegral(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons69) rule6844 = ReplacementRule(pattern6844, replacement6844) pattern6845 = Pattern(Integral(x_**WC('m', S(1))*SinhIntegral(x_*WC('b', S(1)))**S(2), x_), cons3, cons64) rule6845 = ReplacementRule(pattern6845, replacement6845) pattern6846 = Pattern(Integral(x_**WC('m', S(1))*CoshIntegral(x_*WC('b', S(1)))**S(2), x_), cons3, cons64) rule6846 = ReplacementRule(pattern6846, replacement6846) pattern6847 = Pattern(Integral(x_**WC('m', S(1))*SinhIntegral(a_ + x_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons64) rule6847 = ReplacementRule(pattern6847, replacement6847) pattern6848 = Pattern(Integral(x_**WC('m', S(1))*CoshIntegral(a_ + x_*WC('b', S(1)))**S(2), x_), cons2, cons3, cons64) rule6848 = ReplacementRule(pattern6848, replacement6848) pattern6849 = Pattern(Integral(SinhIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sinh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6849 = ReplacementRule(pattern6849, replacement6849) pattern6850 = Pattern(Integral(CoshIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6850 = ReplacementRule(pattern6850, replacement6850) pattern6851 = Pattern(Integral(x_**WC('m', S(1))*SinhIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sinh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons170) rule6851 = ReplacementRule(pattern6851, replacement6851) pattern6852 = Pattern(Integral(x_**WC('m', S(1))*CoshIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons170) rule6852 = ReplacementRule(pattern6852, replacement6852) pattern6853 = Pattern(Integral(x_**m_*SinhIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sinh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6853 = ReplacementRule(pattern6853, replacement6853) pattern6854 = Pattern(Integral(x_**WC('m', S(1))*CoshIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6854 = ReplacementRule(pattern6854, replacement6854) pattern6855 = Pattern(Integral(SinhIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6855 = ReplacementRule(pattern6855, replacement6855) pattern6856 = Pattern(Integral(CoshIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sinh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1266) rule6856 = ReplacementRule(pattern6856, replacement6856) pattern6857 = Pattern(Integral(x_**WC('m', S(1))*SinhIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule6857 = ReplacementRule(pattern6857, replacement6857) pattern6858 = Pattern(Integral(x_**WC('m', S(1))*CoshIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sinh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons64) rule6858 = ReplacementRule(pattern6858, replacement6858) pattern6859 = Pattern(Integral(x_**WC('m', S(1))*SinhIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*cosh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6859 = ReplacementRule(pattern6859, replacement6859) pattern6860 = Pattern(Integral(x_**m_*CoshIntegral(x_*WC('d', S(1)) + WC('c', S(0)))*sinh(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons20, cons96) rule6860 = ReplacementRule(pattern6860, replacement6860) pattern6861 = Pattern(Integral(Gamma(n_, x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6861 = ReplacementRule(pattern6861, replacement6861) pattern6862 = Pattern(Integral(Gamma(n_, b_*x_)/x_, x_), cons3, cons4, cons1970) rule6862 = ReplacementRule(pattern6862, replacement6862) pattern6863 = Pattern(Integral(x_**WC('m', S(1))*Gamma(n_, b_*x_), x_), cons3, cons19, cons4, cons68) rule6863 = ReplacementRule(pattern6863, replacement6863) pattern6864 = Pattern(Integral(x_**WC('m', S(1))*Gamma(n_, a_ + x_*WC('b', S(1))), x_), cons2, cons3, cons19, cons4, cons1971, cons68) rule6864 = ReplacementRule(pattern6864, With6864) pattern6865 = Pattern(Integral(LogGamma(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6865 = ReplacementRule(pattern6865, replacement6865) pattern6866 = Pattern(Integral(x_**WC('m', S(1))*LogGamma(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons33, cons170) rule6866 = ReplacementRule(pattern6866, replacement6866) pattern6867 = Pattern(Integral(PolyGamma(n_, x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons4, cons1833) rule6867 = ReplacementRule(pattern6867, replacement6867) pattern6868 = Pattern(Integral(x_**WC('m', S(1))*PolyGamma(n_, x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons4, cons33, cons170) rule6868 = ReplacementRule(pattern6868, replacement6868) pattern6869 = Pattern(Integral(x_**WC('m', S(1))*PolyGamma(n_, x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons4, cons33, cons96) rule6869 = ReplacementRule(pattern6869, replacement6869) pattern6870 = Pattern(Integral(Gamma(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*PolyGamma(S(0), x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons4, cons1833) rule6870 = ReplacementRule(pattern6870, replacement6870) pattern6871 = Pattern(Integral(Factorial(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*PolyGamma(S(0), x_*WC('b', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons4, cons1972) rule6871 = ReplacementRule(pattern6871, replacement6871) pattern6872 = Pattern(Integral(Zeta(S(2), x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons69) rule6872 = ReplacementRule(pattern6872, replacement6872) pattern6873 = Pattern(Integral(Zeta(s_, x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons802, cons1973, cons1974) rule6873 = ReplacementRule(pattern6873, replacement6873) pattern6874 = Pattern(Integral(x_**WC('m', S(1))*Zeta(S(2), x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons33) rule6874 = ReplacementRule(pattern6874, replacement6874) pattern6875 = Pattern(Integral(x_**WC('m', S(1))*Zeta(s_, x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons802, cons1973, cons1974, cons33, cons170) rule6875 = ReplacementRule(pattern6875, replacement6875) pattern6876 = Pattern(Integral(x_**WC('m', S(1))*Zeta(s_, x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons802, cons1973, cons1974, cons33, cons96) rule6876 = ReplacementRule(pattern6876, replacement6876) pattern6877 = Pattern(Integral(PolyLog(n_, (x_**WC('p', S(1))*WC('b', S(1)))**WC('q', S(1))*WC('a', S(1))), x_), cons2, cons3, cons5, cons52, cons89, cons90) rule6877 = ReplacementRule(pattern6877, replacement6877) pattern6878 = Pattern(Integral(PolyLog(n_, (x_**WC('p', S(1))*WC('b', S(1)))**WC('q', S(1))*WC('a', S(1))), x_), cons2, cons3, cons5, cons52, cons89, cons91) rule6878 = ReplacementRule(pattern6878, replacement6878) pattern6879 = Pattern(Integral(PolyLog(n_, (x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('c', S(1)))/(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons385) rule6879 = ReplacementRule(pattern6879, replacement6879) pattern6880 = Pattern(Integral(PolyLog(n_, (x_**WC('p', S(1))*WC('b', S(1)))**WC('q', S(1))*WC('a', S(1)))/x_, x_), cons2, cons3, cons4, cons5, cons52, cons1975) rule6880 = ReplacementRule(pattern6880, replacement6880) pattern6881 = Pattern(Integral(x_**WC('m', S(1))*PolyLog(n_, (x_**WC('p', S(1))*WC('b', S(1)))**WC('q', S(1))*WC('a', S(1))), x_), cons2, cons3, cons19, cons5, cons52, cons68, cons89, cons90) rule6881 = ReplacementRule(pattern6881, replacement6881) pattern6882 = Pattern(Integral(x_**WC('m', S(1))*PolyLog(n_, (x_**WC('p', S(1))*WC('b', S(1)))**WC('q', S(1))*WC('a', S(1))), x_), cons2, cons3, cons19, cons5, cons52, cons68, cons89, cons91) rule6882 = ReplacementRule(pattern6882, replacement6882) pattern6883 = Pattern(Integral(PolyLog(n_, (x_**WC('p', S(1))*WC('b', S(1)))**WC('q', S(1))*WC('a', S(1)))*log(x_**WC('m', S(1))*WC('c', S(1)))**WC('r', S(1))/x_, x_), cons2, cons3, cons8, cons19, cons4, cons52, cons54, cons1976, cons1977) rule6883 = ReplacementRule(pattern6883, replacement6883) pattern6884 = Pattern(Integral(PolyLog(n_, (x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons5, cons89, cons90) rule6884 = ReplacementRule(pattern6884, replacement6884) pattern6885 = Pattern(Integral(x_**WC('m', S(1))*PolyLog(n_, (x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons19, cons5, cons89, cons90, cons64) rule6885 = ReplacementRule(pattern6885, replacement6885) pattern6886 = Pattern(Integral(PolyLog(n_, (F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1))))**WC('p', S(1))*WC('d', S(1))), x_), cons1101, cons2, cons3, cons8, cons29, cons4, cons5, cons1978) rule6886 = ReplacementRule(pattern6886, replacement6886) pattern6887 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*PolyLog(n_, (F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1))))**WC('p', S(1))*WC('d', S(1))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons33, cons170) rule6887 = ReplacementRule(pattern6887, replacement6887) pattern6888 = Pattern(Integral(u_*PolyLog(n_, v_), x_), cons4, cons4, CustomConstraint(With6888)) rule6888 = ReplacementRule(pattern6888, replacement6888) pattern6889 = Pattern(Integral(u_*PolyLog(n_, v_)*log(w_), x_), cons4, cons1245, CustomConstraint(With6889)) rule6889 = ReplacementRule(pattern6889, replacement6889) pattern6890 = Pattern(Integral((ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons13, cons139) rule6890 = ReplacementRule(pattern6890, replacement6890) pattern6891 = Pattern(Integral((ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons1381) rule6891 = ReplacementRule(pattern6891, replacement6891) pattern6892 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(a_ + x_*WC('b', S(1)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons5, cons64) rule6892 = ReplacementRule(pattern6892, replacement6892) pattern6893 = Pattern(Integral((ProductLog(x_**n_*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons4, cons5, cons1979) rule6893 = ReplacementRule(pattern6893, replacement6893) pattern6894 = Pattern(Integral((ProductLog(x_**n_*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons4, cons1980) rule6894 = ReplacementRule(pattern6894, replacement6894) pattern6895 = Pattern(Integral((ProductLog(x_**n_*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons5, cons198) rule6895 = ReplacementRule(pattern6895, replacement6895) pattern6896 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons19, cons4, cons5, cons68, cons1981) rule6896 = ReplacementRule(pattern6896, replacement6896) pattern6897 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons19, cons4, cons5, cons1982) rule6897 = ReplacementRule(pattern6897, replacement6897) pattern6898 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons19, cons1983) rule6898 = ReplacementRule(pattern6898, replacement6898) pattern6899 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**n_*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons8, cons5, cons152, cons465, cons68) rule6899 = ReplacementRule(pattern6899, replacement6899) pattern6900 = Pattern(Integral(S(1)/(d_ + ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('d', S(1))), x_), cons2, cons3, cons29, cons1767) rule6900 = ReplacementRule(pattern6900, replacement6900) pattern6901 = Pattern(Integral(ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))/(d_ + ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('d', S(1))), x_), cons2, cons3, cons29, cons1767) rule6901 = ReplacementRule(pattern6901, replacement6901) pattern6902 = Pattern(Integral((ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))**p_/(d_ + ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons13, cons165) rule6902 = ReplacementRule(pattern6902, replacement6902) pattern6903 = Pattern(Integral(S(1)/((d_ + ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('d', S(1)))*ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons29, cons1767) rule6903 = ReplacementRule(pattern6903, replacement6903) pattern6904 = Pattern(Integral(S(1)/(sqrt(ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(d_ + ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons950) rule6904 = ReplacementRule(pattern6904, replacement6904) pattern6905 = Pattern(Integral(S(1)/(sqrt(ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(d_ + ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons951) rule6905 = ReplacementRule(pattern6905, replacement6905) pattern6906 = Pattern(Integral((ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))**p_/(d_ + ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons13, cons139) rule6906 = ReplacementRule(pattern6906, replacement6906) pattern6907 = Pattern(Integral((ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_*WC('b', S(1)) + WC('a', S(0)))*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons5, cons1984) rule6907 = ReplacementRule(pattern6907, replacement6907) pattern6908 = Pattern(Integral(x_**WC('m', S(1))/(d_ + ProductLog(a_ + x_*WC('b', S(1)))*WC('d', S(1))), x_), cons2, cons3, cons29, cons64) rule6908 = ReplacementRule(pattern6908, replacement6908) pattern6909 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(a_ + x_*WC('b', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(a_ + x_*WC('b', S(1)))*WC('d', S(1))), x_), cons2, cons3, cons8, cons29, cons5, cons64) rule6909 = ReplacementRule(pattern6909, replacement6909) pattern6910 = Pattern(Integral(S(1)/(d_ + ProductLog(x_**n_*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons29, cons198) rule6910 = ReplacementRule(pattern6910, replacement6910) pattern6911 = Pattern(Integral((ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons4, cons5, cons1985) rule6911 = ReplacementRule(pattern6911, replacement6911) pattern6912 = Pattern(Integral(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons29, cons805, cons1986) rule6912 = ReplacementRule(pattern6912, replacement6912) pattern6913 = Pattern(Integral((ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**p_/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons805, cons1987, cons1988) rule6913 = ReplacementRule(pattern6913, replacement6913) pattern6914 = Pattern(Integral((ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**p_/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons805, cons1987, cons1989) rule6914 = ReplacementRule(pattern6914, replacement6914) pattern6915 = Pattern(Integral((ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons340, cons90, cons1990) rule6915 = ReplacementRule(pattern6915, replacement6915) pattern6916 = Pattern(Integral((ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons340, cons90, cons1991) rule6916 = ReplacementRule(pattern6916, replacement6916) pattern6917 = Pattern(Integral((ProductLog(x_**n_*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**n_*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons5, cons198) rule6917 = ReplacementRule(pattern6917, replacement6917) pattern6918 = Pattern(Integral(x_**WC('m', S(1))/(d_ + ProductLog(x_*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons29, cons33, cons170) rule6918 = ReplacementRule(pattern6918, replacement6918) pattern6919 = Pattern(Integral(S(1)/(x_*(d_ + ProductLog(x_*WC('a', S(1)))*WC('d', S(1)))), x_), cons2, cons29, cons1992) rule6919 = ReplacementRule(pattern6919, replacement6919) pattern6920 = Pattern(Integral(x_**WC('m', S(1))/(d_ + ProductLog(x_*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons29, cons33, cons96) rule6920 = ReplacementRule(pattern6920, replacement6920) pattern6921 = Pattern(Integral(x_**WC('m', S(1))/(d_ + ProductLog(x_*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons29, cons19, cons21) rule6921 = ReplacementRule(pattern6921, replacement6921) pattern6922 = Pattern(Integral(S(1)/(x_*(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1)))), x_), cons2, cons29, cons4, cons1993) rule6922 = ReplacementRule(pattern6922, replacement6922) pattern6923 = Pattern(Integral(x_**WC('m', S(1))/(d_ + ProductLog(x_**n_*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons29, cons152, cons465, cons68) rule6923 = ReplacementRule(pattern6923, replacement6923) pattern6924 = Pattern(Integral((ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(x_*(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1)))), x_), cons2, cons8, cons29, cons4, cons5, cons1994) rule6924 = ReplacementRule(pattern6924, replacement6924) pattern6925 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons68, cons1995) rule6925 = ReplacementRule(pattern6925, replacement6925) pattern6926 = Pattern(Integral(x_**WC('m', S(1))*ProductLog(x_**WC('n', S(1))*WC('a', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons29, cons19, cons4, cons40, cons1996) rule6926 = ReplacementRule(pattern6926, replacement6926) pattern6927 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**p_/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons19, cons4, cons68, cons349, cons1997, cons1998) rule6927 = ReplacementRule(pattern6927, replacement6927) pattern6928 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**p_/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons19, cons4, cons68, cons349, cons1997, cons1999) rule6928 = ReplacementRule(pattern6928, replacement6928) pattern6929 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons68, cons2000, cons2001) rule6929 = ReplacementRule(pattern6929, replacement6929) pattern6930 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons19, cons4, cons5, cons68, cons2000, cons2002) rule6930 = ReplacementRule(pattern6930, replacement6930) pattern6931 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons19, cons5, cons68) rule6931 = ReplacementRule(pattern6931, replacement6931) pattern6932 = Pattern(Integral(x_**WC('m', S(1))*(ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('c', S(1)))**WC('p', S(1))/(d_ + ProductLog(x_**WC('n', S(1))*WC('a', S(1)))*WC('d', S(1))), x_), cons2, cons8, cons29, cons5, cons68, cons152, cons465) rule6932 = ReplacementRule(pattern6932, replacement6932) pattern6933 = Pattern(Integral(u_, x_), cons2003) rule6933 = ReplacementRule(pattern6933, replacement6933) return [rule6742, rule6743, rule6744, rule6745, rule6746, rule6747, rule6748, rule6749, rule6750, rule6751, rule6752, rule6753, rule6754, rule6755, rule6756, rule6757, rule6758, rule6759, rule6760, rule6761, rule6762, rule6763, rule6764, rule6765, rule6766, rule6767, rule6768, rule6769, rule6770, rule6771, rule6772, rule6773, rule6774, rule6775, rule6776, rule6777, rule6778, rule6779, rule6780, rule6781, rule6782, rule6783, rule6784, rule6785, rule6786, rule6787, rule6788, rule6789, rule6790, rule6791, rule6792, rule6793, rule6794, rule6795, rule6796, rule6797, rule6798, rule6799, rule6800, rule6801, rule6802, rule6803, rule6804, rule6805, rule6806, rule6807, rule6808, rule6809, rule6810, rule6811, rule6812, rule6813, rule6814, rule6815, rule6816, rule6817, rule6818, rule6819, rule6820, rule6821, rule6822, rule6823, rule6824, rule6825, rule6826, rule6827, rule6828, rule6829, rule6830, rule6831, rule6832, rule6833, rule6834, rule6835, rule6836, rule6837, rule6838, rule6839, rule6840, rule6841, rule6842, rule6843, rule6844, rule6845, rule6846, rule6847, rule6848, rule6849, rule6850, rule6851, rule6852, rule6853, rule6854, rule6855, rule6856, rule6857, rule6858, rule6859, rule6860, rule6861, rule6862, rule6863, rule6864, rule6865, rule6866, rule6867, rule6868, rule6869, rule6870, rule6871, rule6872, rule6873, rule6874, rule6875, rule6876, rule6877, rule6878, rule6879, rule6880, rule6881, rule6882, rule6883, rule6884, rule6885, rule6886, rule6887, rule6888, rule6889, rule6890, rule6891, rule6892, rule6893, rule6894, rule6895, rule6896, rule6897, rule6898, rule6899, rule6900, rule6901, rule6902, rule6903, rule6904, rule6905, rule6906, rule6907, rule6908, rule6909, rule6910, rule6911, rule6912, rule6913, rule6914, rule6915, rule6916, rule6917, rule6918, rule6919, rule6920, rule6921, rule6922, rule6923, rule6924, rule6925, rule6926, rule6927, rule6928, rule6929, rule6930, rule6931, rule6932, rule6933, ] def replacement6742(a, b, x): return Simp(exp(-(a + b*x)**S(2))/(sqrt(Pi)*b), x) + Simp((a + b*x)*Erf(a + b*x)/b, x) def replacement6743(a, b, x): return -Simp(exp(-(a + b*x)**S(2))/(sqrt(Pi)*b), x) + Simp((a + b*x)*Erfc(a + b*x)/b, x) def replacement6744(a, b, x): return -Simp(exp((a + b*x)**S(2))/(sqrt(Pi)*b), x) + Simp((a + b*x)*Erfi(a + b*x)/b, x) def replacement6745(b, x): return Simp(S(2)*b*x*HypergeometricPFQ(List(S(1)/2, S(1)/2), List(S(3)/2, S(3)/2), -b**S(2)*x**S(2))/sqrt(Pi), x) def replacement6746(b, x): return -Int(Erf(b*x)/x, x) + Simp(log(x), x) def replacement6747(b, x): return Simp(S(2)*b*x*HypergeometricPFQ(List(S(1)/2, S(1)/2), List(S(3)/2, S(3)/2), b**S(2)*x**S(2))/sqrt(Pi), x) def replacement6748(a, b, m, x): return -Dist(S(2)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*exp(-(a + b*x)**S(2)), x), x) + Simp(x**(m + S(1))*Erf(a + b*x)/(m + S(1)), x) def replacement6749(a, b, m, x): return Dist(S(2)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*exp(-(a + b*x)**S(2)), x), x) + Simp(x**(m + S(1))*Erfc(a + b*x)/(m + S(1)), x) def replacement6750(a, b, m, x): return -Dist(S(2)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*exp((a + b*x)**S(2)), x), x) + Simp(x**(m + S(1))*Erfi(a + b*x)/(m + S(1)), x) def replacement6751(a, b, c, d, x): return -Dist(b/(sqrt(Pi)*d), Int(exp(-a**S(2) - S(2)*a*b*x + c - x**S(2)*(b**S(2) - d)), x), x) + Simp(Erf(a + b*x)*exp(c + d*x**S(2))/(S(2)*d), x) def replacement6752(a, b, c, d, x): return Dist(b/(sqrt(Pi)*d), Int(exp(-a**S(2) - S(2)*a*b*x + c - x**S(2)*(b**S(2) - d)), x), x) + Simp(Erfc(a + b*x)*exp(c + d*x**S(2))/(S(2)*d), x) def replacement6753(a, b, c, d, x): return -Dist(b/(sqrt(Pi)*d), Int(exp(a**S(2) + S(2)*a*b*x + c + x**S(2)*(b**S(2) + d)), x), x) + Simp(Erfi(a + b*x)*exp(c + d*x**S(2))/(S(2)*d), x) def replacement6754(a, b, c, d, m, x): return -Dist((m + S(-1))/(S(2)*d), Int(x**(m + S(-2))*Erf(a + b*x)*exp(c + d*x**S(2)), x), x) - Dist(b/(sqrt(Pi)*d), Int(x**(m + S(-1))*exp(-a**S(2) - S(2)*a*b*x + c - x**S(2)*(b**S(2) - d)), x), x) + Simp(x**(m + S(-1))*Erf(a + b*x)*exp(c + d*x**S(2))/(S(2)*d), x) def replacement6755(a, b, c, d, m, x): return -Dist((m + S(-1))/(S(2)*d), Int(x**(m + S(-2))*Erfc(a + b*x)*exp(c + d*x**S(2)), x), x) + Dist(b/(sqrt(Pi)*d), Int(x**(m + S(-1))*exp(-a**S(2) - S(2)*a*b*x + c - x**S(2)*(b**S(2) - d)), x), x) + Simp(x**(m + S(-1))*Erfc(a + b*x)*exp(c + d*x**S(2))/(S(2)*d), x) def replacement6756(a, b, c, d, m, x): return -Dist((m + S(-1))/(S(2)*d), Int(x**(m + S(-2))*Erfi(a + b*x)*exp(c + d*x**S(2)), x), x) - Dist(b/(sqrt(Pi)*d), Int(x**(m + S(-1))*exp(a**S(2) + S(2)*a*b*x + c + x**S(2)*(b**S(2) + d)), x), x) + Simp(x**(m + S(-1))*Erfi(a + b*x)*exp(c + d*x**S(2))/(S(2)*d), x) def replacement6757(b, c, d, x): return Simp(S(2)*b*x*HypergeometricPFQ(List(S(1)/2, S(1)), List(S(3)/2, S(3)/2), d*x**S(2))*exp(c)/sqrt(Pi), x) def replacement6758(b, c, d, x): return Int(exp(c + d*x**S(2))/x, x) - Int(Erf(b*x)*exp(c + d*x**S(2))/x, x) def replacement6759(b, c, d, x): return Simp(S(2)*b*x*HypergeometricPFQ(List(S(1)/2, S(1)), List(S(3)/2, S(3)/2), d*x**S(2))*exp(c)/sqrt(Pi), x) def replacement6760(a, b, c, d, m, x): return -Dist(S(2)*d/(m + S(1)), Int(x**(m + S(2))*Erf(a + b*x)*exp(c + d*x**S(2)), x), x) - Dist(S(2)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*exp(-a**S(2) - S(2)*a*b*x + c - x**S(2)*(b**S(2) - d)), x), x) + Simp(x**(m + S(1))*Erf(a + b*x)*exp(c + d*x**S(2))/(m + S(1)), x) def replacement6761(a, b, c, d, m, x): return -Dist(S(2)*d/(m + S(1)), Int(x**(m + S(2))*Erfc(a + b*x)*exp(c + d*x**S(2)), x), x) + Dist(S(2)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*exp(-a**S(2) - S(2)*a*b*x + c - x**S(2)*(b**S(2) - d)), x), x) + Simp(x**(m + S(1))*Erfc(a + b*x)*exp(c + d*x**S(2))/(m + S(1)), x) def replacement6762(a, b, c, d, m, x): return -Dist(S(2)*d/(m + S(1)), Int(x**(m + S(2))*Erfi(a + b*x)*exp(c + d*x**S(2)), x), x) - Dist(S(2)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*exp(a**S(2) + S(2)*a*b*x + c + x**S(2)*(b**S(2) + d)), x), x) + Simp(x**(m + S(1))*Erfi(a + b*x)*exp(c + d*x**S(2))/(m + S(1)), x) def replacement6763(a, b, x): return -Dist(S(4)/sqrt(Pi), Int((a + b*x)*Erf(a + b*x)*exp(-(a + b*x)**S(2)), x), x) + Simp((a + b*x)*Erf(a + b*x)**S(2)/b, x) def replacement6764(a, b, x): return Dist(S(4)/sqrt(Pi), Int((a + b*x)*Erfc(a + b*x)*exp(-(a + b*x)**S(2)), x), x) + Simp((a + b*x)*Erfc(a + b*x)**S(2)/b, x) def replacement6765(a, b, x): return -Dist(S(4)/sqrt(Pi), Int((a + b*x)*Erfi(a + b*x)*exp((a + b*x)**S(2)), x), x) + Simp((a + b*x)*Erfi(a + b*x)**S(2)/b, x) def replacement6766(b, m, x): return -Dist(S(4)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*Erf(b*x)*exp(-b**S(2)*x**S(2)), x), x) + Simp(x**(m + S(1))*Erf(b*x)**S(2)/(m + S(1)), x) def replacement6767(b, m, x): return Dist(S(4)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*Erfc(b*x)*exp(-b**S(2)*x**S(2)), x), x) + Simp(x**(m + S(1))*Erfc(b*x)**S(2)/(m + S(1)), x) def replacement6768(b, m, x): return -Dist(S(4)*b/(sqrt(Pi)*(m + S(1))), Int(x**(m + S(1))*Erfi(b*x)*exp(b**S(2)*x**S(2)), x), x) + Simp(x**(m + S(1))*Erfi(b*x)**S(2)/(m + S(1)), x) def replacement6769(a, b, m, x): return Dist(S(1)/b, Subst(Int((-a/b + x/b)**m*Erf(x)**S(2), x), x, a + b*x), x) def replacement6770(a, b, m, x): return Dist(S(1)/b, Subst(Int((-a/b + x/b)**m*Erfc(x)**S(2), x), x, a + b*x), x) def replacement6771(a, b, m, x): return Dist(S(1)/b, Subst(Int((-a/b + x/b)**m*Erfi(x)**S(2), x), x, a + b*x), x) def replacement6772(a, b, x): return Simp(cos(Pi*(a + b*x)**S(2)/S(2))/(Pi*b), x) + Simp((a + b*x)*FresnelS(a + b*x)/b, x) def replacement6773(a, b, x): return -Simp(sin(Pi*(a + b*x)**S(2)/S(2))/(Pi*b), x) + Simp((a + b*x)*FresnelC(a + b*x)/b, x) def replacement6774(b, x): return Simp(I*b*x*HypergeometricPFQ(List(S(1)/2, S(1)/2), List(S(3)/2, S(3)/2), -I*Pi*b**S(2)*x**S(2)/S(2))/S(2), x) - Simp(I*b*x*HypergeometricPFQ(List(S(1)/2, S(1)/2), List(S(3)/2, S(3)/2), I*Pi*b**S(2)*x**S(2)/S(2))/S(2), x) def replacement6775(b, x): return Simp(b*x*HypergeometricPFQ(List(S(1)/2, S(1)/2), List(S(3)/2, S(3)/2), -I*Pi*b**S(2)*x**S(2)/S(2))/S(2), x) + Simp(b*x*HypergeometricPFQ(List(S(1)/2, S(1)/2), List(S(3)/2, S(3)/2), I*Pi*b**S(2)*x**S(2)/S(2))/S(2), x) def replacement6776(a, b, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*sin(Pi*(a + b*x)**S(2)/S(2)), x), x) + Simp(x**(m + S(1))*FresnelS(a + b*x)/(m + S(1)), x) def replacement6777(a, b, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*cos(Pi*(a + b*x)**S(2)/S(2)), x), x) + Simp(x**(m + S(1))*FresnelC(a + b*x)/(m + S(1)), x) def replacement6778(a, b, x): return -Dist(S(2), Int((a + b*x)*FresnelS(a + b*x)*sin(Pi*(a + b*x)**S(2)/S(2)), x), x) + Simp((a + b*x)*FresnelS(a + b*x)**S(2)/b, x) def replacement6779(a, b, x): return -Dist(S(2), Int((a + b*x)*FresnelC(a + b*x)*cos(Pi*(a + b*x)**S(2)/S(2)), x), x) + Simp((a + b*x)*FresnelC(a + b*x)**S(2)/b, x) def replacement6780(b, m, x): return -Dist(S(2)*b/(m + S(1)), Int(x**(m + S(1))*FresnelS(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2)), x), x) + Simp(x**(m + S(1))*FresnelS(b*x)**S(2)/(m + S(1)), x) def replacement6781(b, m, x): return -Dist(S(2)*b/(m + S(1)), Int(x**(m + S(1))*FresnelC(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2)), x), x) + Simp(x**(m + S(1))*FresnelC(b*x)**S(2)/(m + S(1)), x) def replacement6782(b, c, x): return Dist(S(1)/(S(2)*Pi*b), Int(sin(Pi*b**S(2)*x**S(2)), x), x) - Simp(FresnelS(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2))/(Pi*b**S(2)), x) def replacement6783(b, c, x): return -Dist(S(1)/(S(2)*Pi*b), Int(sin(Pi*b**S(2)*x**S(2)), x), x) + Simp(FresnelC(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2))/(Pi*b**S(2)), x) def replacement6784(b, c, m, x): return Dist(S(1)/(S(2)*Pi*b), Int(x**(m + S(-1))*sin(Pi*b**S(2)*x**S(2)), x), x) + Dist((m + S(-1))/(Pi*b**S(2)), Int(x**(m + S(-2))*FresnelS(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2)), x), x) - Simp(x**(m + S(-1))*FresnelS(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2))/(Pi*b**S(2)), x) def replacement6785(b, c, m, x): return -Dist(S(1)/(S(2)*Pi*b), Int(x**(m + S(-1))*sin(Pi*b**S(2)*x**S(2)), x), x) - Dist((m + S(-1))/(Pi*b**S(2)), Int(x**(m + S(-2))*FresnelC(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2)), x), x) + Simp(x**(m + S(-1))*FresnelC(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2))/(Pi*b**S(2)), x) def replacement6786(b, c, m, x): return Dist(b/(S(2)*m + S(2)), Int(x**(m + S(1))*cos(Pi*b**S(2)*x**S(2)), x), x) - Dist(Pi*b**S(2)/(m + S(1)), Int(x**(m + S(2))*FresnelS(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2)), x), x) - Simp(b*x**(m + S(2))/(S(2)*(m + S(1))*(m + S(2))), x) + Simp(x**(m + S(1))*FresnelS(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2))/(m + S(1)), x) def replacement6787(b, c, m, x): return -Dist(b/(S(2)*m + S(2)), Int(x**(m + S(1))*cos(Pi*b**S(2)*x**S(2)), x), x) + Dist(Pi*b**S(2)/(m + S(1)), Int(x**(m + S(2))*FresnelC(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2)), x), x) - Simp(b*x**(m + S(2))/(S(2)*(m + S(1))*(m + S(2))), x) + Simp(x**(m + S(1))*FresnelC(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2))/(m + S(1)), x) def replacement6788(b, c, x): return Dist(S(1)/(S(2)*Pi*b), Int(cos(Pi*b**S(2)*x**S(2)), x), x) - Simp(x/(S(2)*Pi*b), x) + Simp(FresnelS(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2))/(Pi*b**S(2)), x) def replacement6789(b, c, x): return Dist(S(1)/(S(2)*Pi*b), Int(cos(Pi*b**S(2)*x**S(2)), x), x) + Simp(x/(S(2)*Pi*b), x) - Simp(FresnelC(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2))/(Pi*b**S(2)), x) def replacement6790(b, c, m, x): return Dist(S(1)/(S(2)*Pi*b), Int(x**(m + S(-1))*cos(Pi*b**S(2)*x**S(2)), x), x) - Dist((m + S(-1))/(Pi*b**S(2)), Int(x**(m + S(-2))*FresnelS(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2)), x), x) - Simp(x**m/(S(2)*Pi*b*m), x) + Simp(x**(m + S(-1))*FresnelS(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2))/(Pi*b**S(2)), x) def replacement6791(b, c, m, x): return Dist(S(1)/(S(2)*Pi*b), Int(x**(m + S(-1))*cos(Pi*b**S(2)*x**S(2)), x), x) + Dist((m + S(-1))/(Pi*b**S(2)), Int(x**(m + S(-2))*FresnelC(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2)), x), x) + Simp(x**m/(S(2)*Pi*b*m), x) - Simp(x**(m + S(-1))*FresnelC(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2))/(Pi*b**S(2)), x) def replacement6792(b, c, m, x): return -Dist(b/(S(2)*m + S(2)), Int(x**(m + S(1))*sin(Pi*b**S(2)*x**S(2)), x), x) + Dist(Pi*b**S(2)/(m + S(1)), Int(x**(m + S(2))*FresnelS(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2)), x), x) + Simp(x**(m + S(1))*FresnelS(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2))/(m + S(1)), x) def replacement6793(b, c, m, x): return -Dist(b/(S(2)*m + S(2)), Int(x**(m + S(1))*sin(Pi*b**S(2)*x**S(2)), x), x) - Dist(Pi*b**S(2)/(m + S(1)), Int(x**(m + S(2))*FresnelC(b*x)*cos(Pi*b**S(2)*x**S(2)/S(2)), x), x) + Simp(x**(m + S(1))*FresnelC(b*x)*sin(Pi*b**S(2)*x**S(2)/S(2))/(m + S(1)), x) def replacement6794(a, b, n, x): return -Simp(ExpIntegralE(n + S(1), a + b*x)/b, x) def replacement6795(b, m, n, x): return Dist(m/b, Int(x**(m + S(-1))*ExpIntegralE(n + S(1), b*x), x), x) - Simp(x**m*ExpIntegralE(n + S(1), b*x)/b, x) def replacement6796(b, x): return -Simp(EulerGamma*log(x), x) + Simp(b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), -b*x), x) - Simp(log(b*x)**S(2)/S(2), x) def replacement6797(b, m, n, x): return Dist(b/(m + S(1)), Int(x**(m + S(1))*ExpIntegralE(n + S(-1), b*x), x), x) + Simp(x**(m + S(1))*ExpIntegralE(n, b*x)/(m + S(1)), x) def replacement6798(b, m, n, x): return -Simp(x**(m + S(1))*HypergeometricPFQ(List(m + S(1), m + S(1)), List(m + S(2), m + S(2)), -b*x)/(m + S(1))**S(2), x) + Simp(x**m*(b*x)**(-m)*Gamma(m + S(1))*log(x)/b, x) def replacement6799(b, m, n, x): return -Simp(x**(m + S(1))*ExpIntegralE(-m, b*x)/(m + n), x) + Simp(x**(m + S(1))*ExpIntegralE(n, b*x)/(m + n), x) def replacement6800(a, b, m, n, x): return Dist(m/b, Int(x**(m + S(-1))*ExpIntegralE(n + S(1), a + b*x), x), x) - Simp(x**m*ExpIntegralE(n + S(1), a + b*x)/b, x) def replacement6801(a, b, m, n, x): return Dist(b/(m + S(1)), Int(x**(m + S(1))*ExpIntegralE(n + S(-1), a + b*x), x), x) + Simp(x**(m + S(1))*ExpIntegralE(n, a + b*x)/(m + S(1)), x) def replacement6802(a, b, x): return -Simp(exp(a + b*x)/b, x) + Simp((a + b*x)*ExpIntegralEi(a + b*x)/b, x) def replacement6803(a, b, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*exp(a + b*x)/(a + b*x), x), x) + Simp(x**(m + S(1))*ExpIntegralEi(a + b*x)/(m + S(1)), x) def replacement6804(a, b, x): return -Dist(S(2), Int(ExpIntegralEi(a + b*x)*exp(a + b*x), x), x) + Simp((a + b*x)*ExpIntegralEi(a + b*x)**S(2)/b, x) def replacement6805(b, m, x): return -Dist(S(2)/(m + S(1)), Int(x**m*ExpIntegralEi(b*x)*exp(b*x), x), x) + Simp(x**(m + S(1))*ExpIntegralEi(b*x)**S(2)/(m + S(1)), x) def replacement6806(a, b, m, x): return -Dist(a*m/(b*(m + S(1))), Int(x**(m + S(-1))*ExpIntegralEi(a + b*x)**S(2), x), x) - Dist(S(2)/(m + S(1)), Int(x**m*ExpIntegralEi(a + b*x)*exp(a + b*x), x), x) + Simp(x**(m + S(1))*ExpIntegralEi(a + b*x)**S(2)/(m + S(1)), x) + Simp(a*x**m*ExpIntegralEi(a + b*x)**S(2)/(b*(m + S(1))), x) def replacement6807(a, b, c, d, x): return -Dist(d/b, Int(exp(a + c + x*(b + d))/(c + d*x), x), x) + Simp(ExpIntegralEi(c + d*x)*exp(a + b*x)/b, x) def replacement6808(a, b, c, d, m, x): return -Dist(d/b, Int(x**m*exp(a + c + x*(b + d))/(c + d*x), x), x) - Dist(m/b, Int(x**(m + S(-1))*ExpIntegralEi(c + d*x)*exp(a + b*x), x), x) + Simp(x**m*ExpIntegralEi(c + d*x)*exp(a + b*x)/b, x) def replacement6809(a, b, c, d, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*ExpIntegralEi(c + d*x)*exp(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*exp(a + c + x*(b + d))/(c + d*x), x), x) + Simp(x**(m + S(1))*ExpIntegralEi(c + d*x)*exp(a + b*x)/(m + S(1)), x) def replacement6810(a, b, x): return -Simp(ExpIntegralEi(S(2)*log(a + b*x))/b, x) + Simp((a + b*x)*LogIntegral(a + b*x)/b, x) def replacement6811(b, x): return -Simp(b*x, x) + Simp(LogIntegral(b*x)*log(b*x), x) def replacement6812(a, b, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))/log(a + b*x), x), x) + Simp(x**(m + S(1))*LogIntegral(a + b*x)/(m + S(1)), x) def replacement6813(a, b, x): return Simp(cos(a + b*x)/b, x) + Simp((a + b*x)*SinIntegral(a + b*x)/b, x) def replacement6814(a, b, x): return -Simp(sin(a + b*x)/b, x) + Simp((a + b*x)*CosIntegral(a + b*x)/b, x) def replacement6815(b, x): return Simp(b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), -I*b*x)/S(2), x) + Simp(b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), I*b*x)/S(2), x) def replacement6816(b, x): return Simp(EulerGamma*log(x), x) - Simp(I*b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), -I*b*x)/S(2), x) + Simp(I*b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), I*b*x)/S(2), x) + Simp(log(b*x)**S(2)/S(2), x) def replacement6817(a, b, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*sin(a + b*x)/(a + b*x), x), x) + Simp(x**(m + S(1))*SinIntegral(a + b*x)/(m + S(1)), x) def replacement6818(a, b, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*cos(a + b*x)/(a + b*x), x), x) + Simp(x**(m + S(1))*CosIntegral(a + b*x)/(m + S(1)), x) def replacement6819(a, b, x): return -Dist(S(2), Int(SinIntegral(a + b*x)*sin(a + b*x), x), x) + Simp((a + b*x)*SinIntegral(a + b*x)**S(2)/b, x) def replacement6820(a, b, x): return -Dist(S(2), Int(CosIntegral(a + b*x)*cos(a + b*x), x), x) + Simp((a + b*x)*CosIntegral(a + b*x)**S(2)/b, x) def replacement6821(b, m, x): return -Dist(S(2)/(m + S(1)), Int(x**m*SinIntegral(b*x)*sin(b*x), x), x) + Simp(x**(m + S(1))*SinIntegral(b*x)**S(2)/(m + S(1)), x) def replacement6822(b, m, x): return -Dist(S(2)/(m + S(1)), Int(x**m*CosIntegral(b*x)*cos(b*x), x), x) + Simp(x**(m + S(1))*CosIntegral(b*x)**S(2)/(m + S(1)), x) def replacement6823(a, b, m, x): return -Dist(a*m/(b*(m + S(1))), Int(x**(m + S(-1))*SinIntegral(a + b*x)**S(2), x), x) - Dist(S(2)/(m + S(1)), Int(x**m*SinIntegral(a + b*x)*sin(a + b*x), x), x) + Simp(x**(m + S(1))*SinIntegral(a + b*x)**S(2)/(m + S(1)), x) + Simp(a*x**m*SinIntegral(a + b*x)**S(2)/(b*(m + S(1))), x) def replacement6824(a, b, m, x): return -Dist(a*m/(b*(m + S(1))), Int(x**(m + S(-1))*CosIntegral(a + b*x)**S(2), x), x) - Dist(S(2)/(m + S(1)), Int(x**m*CosIntegral(a + b*x)*cos(a + b*x), x), x) + Simp(x**(m + S(1))*CosIntegral(a + b*x)**S(2)/(m + S(1)), x) + Simp(a*x**m*CosIntegral(a + b*x)**S(2)/(b*(m + S(1))), x) def replacement6825(a, b, c, d, x): return Dist(d/b, Int(sin(c + d*x)*cos(a + b*x)/(c + d*x), x), x) - Simp(SinIntegral(c + d*x)*cos(a + b*x)/b, x) def replacement6826(a, b, c, d, x): return -Dist(d/b, Int(sin(a + b*x)*cos(c + d*x)/(c + d*x), x), x) + Simp(CosIntegral(c + d*x)*sin(a + b*x)/b, x) def replacement6827(a, b, c, d, m, x): return Dist(d/b, Int(x**m*sin(c + d*x)*cos(a + b*x)/(c + d*x), x), x) + Dist(m/b, Int(x**(m + S(-1))*SinIntegral(c + d*x)*cos(a + b*x), x), x) - Simp(x**m*SinIntegral(c + d*x)*cos(a + b*x)/b, x) def replacement6828(a, b, c, d, m, x): return -Dist(d/b, Int(x**m*sin(a + b*x)*cos(c + d*x)/(c + d*x), x), x) - Dist(m/b, Int(x**(m + S(-1))*CosIntegral(c + d*x)*sin(a + b*x), x), x) + Simp(x**m*CosIntegral(c + d*x)*sin(a + b*x)/b, x) def replacement6829(a, b, c, d, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*SinIntegral(c + d*x)*cos(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*sin(a + b*x)*sin(c + d*x)/(c + d*x), x), x) + Simp(x**(m + S(1))*SinIntegral(c + d*x)*sin(a + b*x)/(m + S(1)), x) def replacement6830(a, b, c, d, m, x): return Dist(b/(m + S(1)), Int(x**(m + S(1))*CosIntegral(c + d*x)*sin(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*cos(a + b*x)*cos(c + d*x)/(c + d*x), x), x) + Simp(x**(m + S(1))*CosIntegral(c + d*x)*cos(a + b*x)/(m + S(1)), x) def replacement6831(a, b, c, d, x): return -Dist(d/b, Int(sin(a + b*x)*sin(c + d*x)/(c + d*x), x), x) + Simp(SinIntegral(c + d*x)*sin(a + b*x)/b, x) def replacement6832(a, b, c, d, x): return Dist(d/b, Int(cos(a + b*x)*cos(c + d*x)/(c + d*x), x), x) - Simp(CosIntegral(c + d*x)*cos(a + b*x)/b, x) def replacement6833(a, b, c, d, m, x): return -Dist(d/b, Int(x**m*sin(a + b*x)*sin(c + d*x)/(c + d*x), x), x) - Dist(m/b, Int(x**(m + S(-1))*SinIntegral(c + d*x)*sin(a + b*x), x), x) + Simp(x**m*SinIntegral(c + d*x)*sin(a + b*x)/b, x) def replacement6834(a, b, c, d, m, x): return Dist(d/b, Int(x**m*cos(a + b*x)*cos(c + d*x)/(c + d*x), x), x) + Dist(m/b, Int(x**(m + S(-1))*CosIntegral(c + d*x)*cos(a + b*x), x), x) - Simp(x**m*CosIntegral(c + d*x)*cos(a + b*x)/b, x) def replacement6835(a, b, c, d, m, x): return Dist(b/(m + S(1)), Int(x**(m + S(1))*SinIntegral(c + d*x)*sin(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*sin(c + d*x)*cos(a + b*x)/(c + d*x), x), x) + Simp(x**(m + S(1))*SinIntegral(c + d*x)*cos(a + b*x)/(m + S(1)), x) def replacement6836(a, b, c, d, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*CosIntegral(c + d*x)*cos(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*sin(a + b*x)*cos(c + d*x)/(c + d*x), x), x) + Simp(x**(m + S(1))*CosIntegral(c + d*x)*sin(a + b*x)/(m + S(1)), x) def replacement6837(a, b, x): return -Simp(cosh(a + b*x)/b, x) + Simp((a + b*x)*SinhIntegral(a + b*x)/b, x) def replacement6838(a, b, x): return -Simp(sinh(a + b*x)/b, x) + Simp((a + b*x)*CoshIntegral(a + b*x)/b, x) def replacement6839(b, x): return Simp(b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), -b*x)/S(2), x) + Simp(b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), b*x)/S(2), x) def replacement6840(b, x): return Simp(EulerGamma*log(x), x) - Simp(b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), -b*x)/S(2), x) + Simp(b*x*HypergeometricPFQ(List(S(1), S(1), S(1)), List(S(2), S(2), S(2)), b*x)/S(2), x) + Simp(log(b*x)**S(2)/S(2), x) def replacement6841(a, b, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*sinh(a + b*x)/(a + b*x), x), x) + Simp(x**(m + S(1))*SinhIntegral(a + b*x)/(m + S(1)), x) def replacement6842(a, b, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*cosh(a + b*x)/(a + b*x), x), x) + Simp(x**(m + S(1))*CoshIntegral(a + b*x)/(m + S(1)), x) def replacement6843(a, b, x): return -Dist(S(2), Int(SinhIntegral(a + b*x)*sinh(a + b*x), x), x) + Simp((a + b*x)*SinhIntegral(a + b*x)**S(2)/b, x) def replacement6844(a, b, x): return -Dist(S(2), Int(CoshIntegral(a + b*x)*cosh(a + b*x), x), x) + Simp((a + b*x)*CoshIntegral(a + b*x)**S(2)/b, x) def replacement6845(b, m, x): return -Dist(S(2)/(m + S(1)), Int(x**m*SinhIntegral(b*x)*sinh(b*x), x), x) + Simp(x**(m + S(1))*SinhIntegral(b*x)**S(2)/(m + S(1)), x) def replacement6846(b, m, x): return -Dist(S(2)/(m + S(1)), Int(x**m*CoshIntegral(b*x)*cosh(b*x), x), x) + Simp(x**(m + S(1))*CoshIntegral(b*x)**S(2)/(m + S(1)), x) def replacement6847(a, b, m, x): return -Dist(a*m/(b*(m + S(1))), Int(x**(m + S(-1))*SinhIntegral(a + b*x)**S(2), x), x) - Dist(S(2)/(m + S(1)), Int(x**m*SinhIntegral(a + b*x)*sinh(a + b*x), x), x) + Simp(x**(m + S(1))*SinhIntegral(a + b*x)**S(2)/(m + S(1)), x) + Simp(a*x**m*SinhIntegral(a + b*x)**S(2)/(b*(m + S(1))), x) def replacement6848(a, b, m, x): return -Dist(a*m/(b*(m + S(1))), Int(x**(m + S(-1))*CoshIntegral(a + b*x)**S(2), x), x) - Dist(S(2)/(m + S(1)), Int(x**m*CoshIntegral(a + b*x)*cosh(a + b*x), x), x) + Simp(x**(m + S(1))*CoshIntegral(a + b*x)**S(2)/(m + S(1)), x) + Simp(a*x**m*CoshIntegral(a + b*x)**S(2)/(b*(m + S(1))), x) def replacement6849(a, b, c, d, x): return -Dist(d/b, Int(sinh(c + d*x)*cosh(a + b*x)/(c + d*x), x), x) + Simp(SinhIntegral(c + d*x)*cosh(a + b*x)/b, x) def replacement6850(a, b, c, d, x): return -Dist(d/b, Int(sinh(a + b*x)*cosh(c + d*x)/(c + d*x), x), x) + Simp(CoshIntegral(c + d*x)*sinh(a + b*x)/b, x) def replacement6851(a, b, c, d, m, x): return -Dist(d/b, Int(x**m*sinh(c + d*x)*cosh(a + b*x)/(c + d*x), x), x) - Dist(m/b, Int(x**(m + S(-1))*SinhIntegral(c + d*x)*cosh(a + b*x), x), x) + Simp(x**m*SinhIntegral(c + d*x)*cosh(a + b*x)/b, x) def replacement6852(a, b, c, d, m, x): return -Dist(d/b, Int(x**m*sinh(a + b*x)*cosh(c + d*x)/(c + d*x), x), x) - Dist(m/b, Int(x**(m + S(-1))*CoshIntegral(c + d*x)*sinh(a + b*x), x), x) + Simp(x**m*CoshIntegral(c + d*x)*sinh(a + b*x)/b, x) def replacement6853(a, b, c, d, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*SinhIntegral(c + d*x)*cosh(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*sinh(a + b*x)*sinh(c + d*x)/(c + d*x), x), x) + Simp(x**(m + S(1))*SinhIntegral(c + d*x)*sinh(a + b*x)/(m + S(1)), x) def replacement6854(a, b, c, d, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*CoshIntegral(c + d*x)*sinh(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*cosh(a + b*x)*cosh(c + d*x)/(c + d*x), x), x) + Simp(x**(m + S(1))*CoshIntegral(c + d*x)*cosh(a + b*x)/(m + S(1)), x) def replacement6855(a, b, c, d, x): return -Dist(d/b, Int(sinh(a + b*x)*sinh(c + d*x)/(c + d*x), x), x) + Simp(SinhIntegral(c + d*x)*sinh(a + b*x)/b, x) def replacement6856(a, b, c, d, x): return -Dist(d/b, Int(cosh(a + b*x)*cosh(c + d*x)/(c + d*x), x), x) + Simp(CoshIntegral(c + d*x)*cosh(a + b*x)/b, x) def replacement6857(a, b, c, d, m, x): return -Dist(d/b, Int(x**m*sinh(a + b*x)*sinh(c + d*x)/(c + d*x), x), x) - Dist(m/b, Int(x**(m + S(-1))*SinhIntegral(c + d*x)*sinh(a + b*x), x), x) + Simp(x**m*SinhIntegral(c + d*x)*sinh(a + b*x)/b, x) def replacement6858(a, b, c, d, m, x): return -Dist(d/b, Int(x**m*cosh(a + b*x)*cosh(c + d*x)/(c + d*x), x), x) - Dist(m/b, Int(x**(m + S(-1))*CoshIntegral(c + d*x)*cosh(a + b*x), x), x) + Simp(x**m*CoshIntegral(c + d*x)*cosh(a + b*x)/b, x) def replacement6859(a, b, c, d, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*SinhIntegral(c + d*x)*sinh(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*sinh(c + d*x)*cosh(a + b*x)/(c + d*x), x), x) + Simp(x**(m + S(1))*SinhIntegral(c + d*x)*cosh(a + b*x)/(m + S(1)), x) def replacement6860(a, b, c, d, m, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*CoshIntegral(c + d*x)*cosh(a + b*x), x), x) - Dist(d/(m + S(1)), Int(x**(m + S(1))*sinh(a + b*x)*cosh(c + d*x)/(c + d*x), x), x) + Simp(x**(m + S(1))*CoshIntegral(c + d*x)*sinh(a + b*x)/(m + S(1)), x) def replacement6861(a, b, n, x): return -Simp(Gamma(n + S(1), a + b*x)/b, x) + Simp((a + b*x)*Gamma(n, a + b*x)/b, x) def replacement6862(b, n, x): return Simp(Gamma(n)*log(x), x) - Simp((b*x)**n*HypergeometricPFQ(List(n, n), List(n + S(1), n + S(1)), -b*x)/n**S(2), x) def replacement6863(b, m, n, x): return Simp(x**(m + S(1))*Gamma(n, b*x)/(m + S(1)), x) - Simp(x**m*(b*x)**(-m)*Gamma(m + n + S(1), b*x)/(b*(m + S(1))), x) def With6864(a, b, m, n, x): _UseGamma = True return Dist(b/(m + S(1)), Int(x**(m + S(1))*(a + b*x)**(n + S(-1))*exp(-a - b*x), x), x) + Simp(x**(m + S(1))*Gamma(n, a + b*x)/(m + S(1)), x) def replacement6865(a, b, x): return Simp(PolyGamma(S(-2), a + b*x)/b, x) def replacement6866(a, b, m, x): return -Dist(m/b, Int(x**(m + S(-1))*PolyGamma(S(-2), a + b*x), x), x) + Simp(x**m*PolyGamma(S(-2), a + b*x)/b, x) def replacement6867(a, b, n, x): return Simp(PolyGamma(n + S(-1), a + b*x)/b, x) def replacement6868(a, b, m, n, x): return -Dist(m/b, Int(x**(m + S(-1))*PolyGamma(n + S(-1), a + b*x), x), x) + Simp(x**m*PolyGamma(n + S(-1), a + b*x)/b, x) def replacement6869(a, b, m, n, x): return -Dist(b/(m + S(1)), Int(x**(m + S(1))*PolyGamma(n + S(1), a + b*x), x), x) + Simp(x**(m + S(1))*PolyGamma(n, a + b*x)/(m + S(1)), x) def replacement6870(a, b, n, x): return Simp(Gamma(a + b*x)**n/(b*n), x) def replacement6871(a, b, c, n, x): return Simp(Factorial(a + b*x)**n/(b*n), x) def replacement6872(a, b, x): return Int(PolyGamma(S(1), a + b*x), x) def replacement6873(a, b, s, x): return -Simp(Zeta(s + S(-1), a + b*x)/(b*(s + S(-1))), x) def replacement6874(a, b, m, x): return Int(x**m*PolyGamma(S(1), a + b*x), x) def replacement6875(a, b, m, s, x): return Dist(m/(b*(s + S(-1))), Int(x**(m + S(-1))*Zeta(s + S(-1), a + b*x), x), x) - Simp(x**m*Zeta(s + S(-1), a + b*x)/(b*(s + S(-1))), x) def replacement6876(a, b, m, s, x): return Dist(b*s/(m + S(1)), Int(x**(m + S(1))*Zeta(s + S(1), a + b*x), x), x) + Simp(x**(m + S(1))*Zeta(s, a + b*x)/(m + S(1)), x) def replacement6877(a, b, n, p, q, x): return -Dist(p*q, Int(PolyLog(n + S(-1), a*(b*x**p)**q), x), x) + Simp(x*PolyLog(n, a*(b*x**p)**q), x) def replacement6878(a, b, n, p, q, x): return -Dist(S(1)/(p*q), Int(PolyLog(n + S(1), a*(b*x**p)**q), x), x) + Simp(x*PolyLog(n + S(1), a*(b*x**p)**q)/(p*q), x) def replacement6879(a, b, c, d, e, n, p, x): return Simp(PolyLog(n + S(1), c*(a + b*x)**p)/(e*p), x) def replacement6880(a, b, n, p, q, x): return Simp(PolyLog(n + S(1), a*(b*x**p)**q)/(p*q), x) def replacement6881(a, b, m, n, p, q, x): return -Dist(p*q/(m + S(1)), Int(x**m*PolyLog(n + S(-1), a*(b*x**p)**q), x), x) + Simp(x**(m + S(1))*PolyLog(n, a*(b*x**p)**q)/(m + S(1)), x) def replacement6882(a, b, m, n, p, q, x): return -Dist((m + S(1))/(p*q), Int(x**m*PolyLog(n + S(1), a*(b*x**p)**q), x), x) + Simp(x**(m + S(1))*PolyLog(n + S(1), a*(b*x**p)**q)/(p*q), x) def replacement6883(a, b, c, m, n, p, q, r, x): return -Dist(m*r/(p*q), Int(PolyLog(n + S(1), a*(b*x**p)**q)*log(c*x**m)**(r + S(-1))/x, x), x) + Simp(PolyLog(n + S(1), a*(b*x**p)**q)*log(c*x**m)**r/(p*q), x) def replacement6884(a, b, c, n, p, x): return -Dist(p, Int(PolyLog(n + S(-1), c*(a + b*x)**p), x), x) + Dist(a*p, Int(PolyLog(n + S(-1), c*(a + b*x)**p)/(a + b*x), x), x) + Simp(x*PolyLog(n, c*(a + b*x)**p), x) def replacement6885(a, b, c, m, n, p, x): return -Dist(b*p/(m + S(1)), Int(x**(m + S(1))*PolyLog(n + S(-1), c*(a + b*x)**p)/(a + b*x), x), x) + Simp(x**(m + S(1))*PolyLog(n, c*(a + b*x)**p)/(m + S(1)), x) def replacement6886(F, a, b, c, d, n, p, x): return Simp(PolyLog(n + S(1), d*(F**(c*(a + b*x)))**p)/(b*c*p*log(F)), x) def replacement6887(F, a, b, c, d, e, f, m, n, p, x): return -Dist(f*m/(b*c*p*log(F)), Int((e + f*x)**(m + S(-1))*PolyLog(n + S(1), d*(F**(c*(a + b*x)))**p), x), x) + Simp((e + f*x)**m*PolyLog(n + S(1), d*(F**(c*(a + b*x)))**p)/(b*c*p*log(F)), x) def With6888(n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: w = DerivativeDivides(v, u*v, x) res = Not(FalseQ(w)) except (TypeError, AttributeError): return False if res: return True return False def replacement6888(n, u, v, x): w = DerivativeDivides(v, u*v, x) return Simp(w*PolyLog(n + S(1), v), x) def With6889(n, u, v, w, x): if isinstance(x, (int, Integer, float, Float)): return False try: z = DerivativeDivides(v, u*v, x) res = Not(FalseQ(z)) except (TypeError, AttributeError): return False if res: return True return False def replacement6889(n, u, v, w, x): z = DerivativeDivides(v, u*v, x) return -Int(SimplifyIntegrand(z*D(w, x)*PolyLog(n + S(1), v)/w, x), x) + Simp(z*PolyLog(n + S(1), v)*log(w), x) def replacement6890(a, b, c, p, x): return Dist(p/(c*(p + S(1))), Int((c*ProductLog(a + b*x))**(p + S(1))/(ProductLog(a + b*x) + S(1)), x), x) + Simp((c*ProductLog(a + b*x))**p*(a + b*x)/(b*(p + S(1))), x) def replacement6891(a, b, c, p, x): return -Dist(p, Int((c*ProductLog(a + b*x))**p/(ProductLog(a + b*x) + S(1)), x), x) + Simp((c*ProductLog(a + b*x))**p*(a + b*x)/b, x) def replacement6892(a, b, c, m, p, x): return Dist(S(1)/b, Subst(Int(ExpandIntegrand((c*ProductLog(x))**p, (-a/b + x/b)**m, x), x), x, a + b*x), x) def replacement6893(a, c, n, p, x): return -Dist(n*p, Int((c*ProductLog(a*x**n))**p/(ProductLog(a*x**n) + S(1)), x), x) + Simp(x*(c*ProductLog(a*x**n))**p, x) def replacement6894(a, c, n, p, x): return Dist(n*p/(c*(n*p + S(1))), Int((c*ProductLog(a*x**n))**(p + S(1))/(ProductLog(a*x**n) + S(1)), x), x) + Simp(x*(c*ProductLog(a*x**n))**p/(n*p + S(1)), x) def replacement6895(a, c, n, p, x): return -Subst(Int((c*ProductLog(a*x**(-n)))**p/x**S(2), x), x, S(1)/x) def replacement6896(a, c, m, n, p, x): return -Dist(n*p/(m + S(1)), Int(x**m*(c*ProductLog(a*x**n))**p/(ProductLog(a*x**n) + S(1)), x), x) + Simp(x**(m + S(1))*(c*ProductLog(a*x**n))**p/(m + S(1)), x) def replacement6897(a, c, m, n, p, x): return Dist(n*p/(c*(m + n*p + S(1))), Int(x**m*(c*ProductLog(a*x**n))**(p + S(1))/(ProductLog(a*x**n) + S(1)), x), x) + Simp(x**(m + S(1))*(c*ProductLog(a*x**n))**p/(m + n*p + S(1)), x) def replacement6898(a, c, m, p, x): return Dist(S(1)/c, Int(x**m*(c*ProductLog(a*x))**(p + S(1))/(ProductLog(a*x) + S(1)), x), x) + Int(x**m*(c*ProductLog(a*x))**p/(ProductLog(a*x) + S(1)), x) def replacement6899(a, c, m, n, p, x): return -Subst(Int(x**(-m + S(-2))*(c*ProductLog(a*x**(-n)))**p, x), x, S(1)/x) def replacement6900(a, b, d, x): return Simp((a + b*x)/(b*d*ProductLog(a + b*x)), x) def replacement6901(a, b, d, x): return -Int(S(1)/(d*ProductLog(a + b*x) + d), x) + Simp(d*x, x) def replacement6902(a, b, c, d, p, x): return -Dist(c*p, Int((c*ProductLog(a + b*x))**(p + S(-1))/(d*ProductLog(a + b*x) + d), x), x) + Simp(c*(c*ProductLog(a + b*x))**(p + S(-1))*(a + b*x)/(b*d), x) def replacement6903(a, b, d, x): return Simp(ExpIntegralEi(ProductLog(a + b*x))/(b*d), x) def replacement6904(a, b, c, d, x): return Simp(Erfi(sqrt(c*ProductLog(a + b*x))/Rt(c, S(2)))*Rt(Pi*c, S(2))/(b*c*d), x) def replacement6905(a, b, c, d, x): return Simp(Erf(sqrt(c*ProductLog(a + b*x))/Rt(-c, S(2)))*Rt(-Pi*c, S(2))/(b*c*d), x) def replacement6906(a, b, c, d, p, x): return -Dist(S(1)/(c*(p + S(1))), Int((c*ProductLog(a + b*x))**(p + S(1))/(d*ProductLog(a + b*x) + d), x), x) + Simp((c*ProductLog(a + b*x))**p*(a + b*x)/(b*d*(p + S(1))), x) def replacement6907(a, b, c, d, p, x): return Simp((-ProductLog(a + b*x))**(-p)*(c*ProductLog(a + b*x))**p*Gamma(p + S(1), -ProductLog(a + b*x))/(b*d), x) def replacement6908(a, b, d, m, x): return Dist(S(1)/b, Subst(Int(ExpandIntegrand(S(1)/(d*ProductLog(x) + d), (-a/b + x/b)**m, x), x), x, a + b*x), x) def replacement6909(a, b, c, d, m, p, x): return Dist(S(1)/b, Subst(Int(ExpandIntegrand((c*ProductLog(x))**p/(d*ProductLog(x) + d), (-a/b + x/b)**m, x), x), x, a + b*x), x) def replacement6910(a, d, n, x): return -Subst(Int(S(1)/(x**S(2)*(d*ProductLog(a*x**(-n)) + d)), x), x, S(1)/x) def replacement6911(a, c, d, n, p, x): return Simp(c*x*(c*ProductLog(a*x**n))**(p + S(-1))/d, x) def replacement6912(a, d, n, p, x): return Simp(a**p*ExpIntegralEi(-p*ProductLog(a*x**n))/(d*n), x) def replacement6913(a, c, d, n, p, x): return Simp(a**(-S(1)/n)*c**(-S(1)/n)*Erfi(sqrt(c*ProductLog(a*x**n))/Rt(c*n, S(2)))*Rt(Pi*c*n, S(2))/(d*n), x) def replacement6914(a, c, d, n, p, x): return Simp(a**(-S(1)/n)*c**(-S(1)/n)*Erf(sqrt(c*ProductLog(a*x**n))/Rt(-c*n, S(2)))*Rt(-Pi*c*n, S(2))/(d*n), x) def replacement6915(a, c, d, n, p, x): return -Dist(c*(n*(p + S(-1)) + S(1)), Int((c*ProductLog(a*x**n))**(p + S(-1))/(d*ProductLog(a*x**n) + d), x), x) + Simp(c*x*(c*ProductLog(a*x**n))**(p + S(-1))/d, x) def replacement6916(a, c, d, n, p, x): return -Dist(S(1)/(c*(n*p + S(1))), Int((c*ProductLog(a*x**n))**(p + S(1))/(d*ProductLog(a*x**n) + d), x), x) + Simp(x*(c*ProductLog(a*x**n))**p/(d*(n*p + S(1))), x) def replacement6917(a, c, d, n, p, x): return -Subst(Int((c*ProductLog(a*x**(-n)))**p/(x**S(2)*(d*ProductLog(a*x**(-n)) + d)), x), x, S(1)/x) def replacement6918(a, d, m, x): return -Dist(m/(m + S(1)), Int(x**m/((d*ProductLog(a*x) + d)*ProductLog(a*x)), x), x) + Simp(x**(m + S(1))/(d*(m + S(1))*ProductLog(a*x)), x) def replacement6919(a, d, x): return Simp(log(ProductLog(a*x))/d, x) def replacement6920(a, d, m, x): return -Int(x**m*ProductLog(a*x)/(d*ProductLog(a*x) + d), x) + Simp(x**(m + S(1))/(d*(m + S(1))), x) def replacement6921(a, d, m, x): return Simp(x**m*(-(m + S(1))*ProductLog(a*x))**(-m)*Gamma(m + S(1), -(m + S(1))*ProductLog(a*x))*exp(-m*ProductLog(a*x))/(a*d*(m + S(1))), x) def replacement6922(a, d, n, x): return Simp(log(ProductLog(a*x**n))/(d*n), x) def replacement6923(a, d, m, n, x): return -Subst(Int(x**(-m + S(-2))/(d*ProductLog(a*x**(-n)) + d), x), x, S(1)/x) def replacement6924(a, c, d, n, p, x): return Simp((c*ProductLog(a*x**n))**p/(d*n*p), x) def replacement6925(a, c, d, m, n, p, x): return Simp(c*x**(m + S(1))*(c*ProductLog(a*x**n))**(p + S(-1))/(d*(m + S(1))), x) def replacement6926(a, d, m, n, p, x): return Simp(a**p*ExpIntegralEi(-p*ProductLog(a*x**n))/(d*n), x) def replacement6927(a, c, d, m, n, p, x): return Simp(a**(p + S(-1)/2)*c**(p + S(-1)/2)*Erf(sqrt(c*ProductLog(a*x**n))/Rt(c/(p + S(-1)/2), S(2)))*Rt(Pi*c/(p + S(-1)/2), S(2))/(d*n), x) def replacement6928(a, c, d, m, n, p, x): return Simp(a**(p + S(-1)/2)*c**(p + S(-1)/2)*Erfi(sqrt(c*ProductLog(a*x**n))/Rt(-c/(p + S(-1)/2), S(2)))*Rt(-Pi*c/(p + S(-1)/2), S(2))/(d*n), x) def replacement6929(a, c, d, m, n, p, x): return -Dist(c*(m + n*(p + S(-1)) + S(1))/(m + S(1)), Int(x**m*(c*ProductLog(a*x**n))**(p + S(-1))/(d*ProductLog(a*x**n) + d), x), x) + Simp(c*x**(m + S(1))*(c*ProductLog(a*x**n))**(p + S(-1))/(d*(m + S(1))), x) def replacement6930(a, c, d, m, n, p, x): return -Dist((m + S(1))/(c*(m + n*p + S(1))), Int(x**m*(c*ProductLog(a*x**n))**(p + S(1))/(d*ProductLog(a*x**n) + d), x), x) + Simp(x**(m + S(1))*(c*ProductLog(a*x**n))**p/(d*(m + n*p + S(1))), x) def replacement6931(a, c, d, m, p, x): return Simp(x**m*(c*ProductLog(a*x))**p*(-(m + S(1))*ProductLog(a*x))**(-m - p)*Gamma(m + p + S(1), -(m + S(1))*ProductLog(a*x))*exp(-m*ProductLog(a*x))/(a*d*(m + S(1))), x) def replacement6932(a, c, d, m, n, p, x): return -Subst(Int(x**(-m + S(-2))*(c*ProductLog(a*x**(-n)))**p/(d*ProductLog(a*x**(-n)) + d), x), x, S(1)/x) def replacement6933(u, x): return Subst(Int(SimplifyIntegrand((x + S(1))*SubstFor(ProductLog(x), u, x)*exp(x), x), x), x, ProductLog(x))
9d314f4189d2a5f59b3fea9a12beebcf70685fdb8cf22a37f09f4d2f967fac05
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def miscellaneous_algebraic(): from sympy.integrals.rubi.constraints import cons800, cons2, cons3, cons8, cons52, cons4, cons5, cons20, cons19, cons801, cons29, cons50, cons127, cons54, cons802, cons27, cons803, cons804, cons151, cons805, cons502, cons806, cons650, cons807, cons808, cons21, cons48, cons809, cons810, cons70, cons811, cons812, cons813, cons814, cons815, cons816, cons817, cons818, cons819, cons820, cons821, cons822, cons823, cons454, cons824, cons825, cons826, cons827, cons828, cons829, cons830, cons831, cons832, cons833, cons834, cons835, cons836, cons837, cons838, cons839, cons840, cons841, cons842, cons843, cons844, cons845, cons846, cons847, cons848, cons849, cons850, cons851, cons852, cons853, cons854, cons210, cons211, cons66, cons855, cons68, cons856, cons857, cons466, cons858, cons859, cons860, cons55, cons13, cons139, cons861, cons862, cons150, cons246, cons165, cons863, cons523, cons864, cons865, cons866, cons86, cons867, cons36, cons37, cons868, cons470, cons471, cons869, cons870, cons38, cons871, cons872, cons873, cons874, cons875, cons876, cons877, cons878, cons879, cons880, cons881, cons882, cons883, cons884, cons885, cons886, cons887, cons888, cons889, cons890, cons891, cons892, cons893, cons894, cons895, cons896, cons897, cons898, cons899, cons900, cons901, cons902, cons903, cons904, cons905, cons906, cons676, cons907, cons483, cons908, cons909, cons484, cons910, cons911, cons912, cons913, cons914, cons915, cons916, cons917, cons918, cons87, cons33, cons96, cons919, cons198, cons369, cons358, cons491, cons543, cons25, cons920, cons556, cons921, cons554, cons57, cons496, cons59, cons60, cons61, cons62, cons922, cons923, cons924, cons925, cons926, cons597, cons73, cons927, cons588, cons89, cons130, cons928, cons929, cons930, cons931, cons932, cons47, cons316, cons228, cons933, cons934, cons935, cons936, cons937, cons938, cons939, cons940, cons941, cons942, cons943, cons944, cons945, cons946, cons947, cons948, cons284, cons949, cons65, cons721, cons950, cons951, cons952, cons75, cons953, cons704, cons149, cons954, cons955, cons798, cons956, cons957, cons958, cons959, cons960, cons961, cons962, cons963, cons964, cons965, cons966, cons967, cons968, cons71, cons969, cons970, cons971, cons972, cons973, cons974, cons975, cons976, cons977, cons514, cons978, cons979, cons980, cons981, cons982, cons669, cons983, cons984, cons799, cons985, cons986, cons987, cons988, cons989, cons990, cons95, cons90, cons991, cons992, cons993, cons994, cons995, cons996, cons997, cons998, cons999, cons1000, cons40, cons1001, cons1002, cons1003, cons1004, cons1005, cons1006, cons1007, cons1008, cons1009, cons1010, cons1011, cons1012, cons385, cons1013, cons1014, cons1015, cons1016, cons1017, cons1018, cons1019, cons1020, cons359, cons1021, cons248, cons1022, cons1023, cons1024, cons1025, cons1026, cons1027, cons1028, cons1029, cons1030, cons1031, cons1032, cons1033, cons1034, cons1035, cons1036, cons1037, cons1038, cons1039, cons1040, cons1041, cons1042, cons1043, cons1044, cons1045, cons299, cons1046, cons1047, cons1048, cons1049, cons1050, cons707, cons384, cons1051, cons1052, cons699, cons711, cons155, cons1053, cons1054, cons1055, cons1056, cons1057, cons1058, cons1059, cons1060, cons1061, cons226, cons1062, cons517, cons1063, cons1064, cons1065, cons1066, cons1067, cons1068, cons1069, cons1070, cons1071, cons1072, cons1073, cons45, cons481, cons482, cons1074, cons1075, cons1076, cons1077, cons1078, cons1079, cons1080, cons1081, cons1082, cons1083, cons1084, cons1085, cons1086, cons1087, cons1088, cons1089, cons1090, cons1091 pattern1476 = Pattern(Integral(((x_**n_*WC('c', S(1)))**q_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons52, cons4, cons5, cons800) rule1476 = ReplacementRule(pattern1476, replacement1476) pattern1477 = Pattern(Integral(x_**WC('m', S(1))*((x_**n_*WC('c', S(1)))**q_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons52, cons800, cons20) rule1477 = ReplacementRule(pattern1477, replacement1477) pattern1478 = Pattern(Integral(x_**WC('m', S(1))*((a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('r', S(1))*WC('e', S(1)))**p_*((c_ + x_**WC('n', S(1))*WC('d', S(1)))**s_*WC('f', S(1)))**q_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons5, cons52, cons54, cons802, cons801) rule1478 = ReplacementRule(pattern1478, replacement1478) pattern1479 = Pattern(Integral(((x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(c_ + x_**WC('n', S(1))*WC('d', S(1))))**p_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons27) rule1479 = ReplacementRule(pattern1479, replacement1479) pattern1480 = Pattern(Integral(((x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(c_ + x_**WC('n', S(1))*WC('d', S(1))))**p_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons803, cons804) rule1480 = ReplacementRule(pattern1480, replacement1480) pattern1481 = Pattern(Integral(((x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(c_ + x_**WC('n', S(1))*WC('d', S(1))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons151, cons805) rule1481 = ReplacementRule(pattern1481, With1481) pattern1482 = Pattern(Integral(x_**WC('m', S(1))*((x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(c_ + x_**WC('n', S(1))*WC('d', S(1))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons151, cons502) rule1482 = ReplacementRule(pattern1482, With1482) pattern1483 = Pattern(Integral(u_**WC('r', S(1))*((x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(c_ + x_**WC('n', S(1))*WC('d', S(1))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons806, cons151, cons805, cons650) rule1483 = ReplacementRule(pattern1483, With1483) pattern1484 = Pattern(Integral(u_**WC('r', S(1))*x_**WC('m', S(1))*((x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(c_ + x_**WC('n', S(1))*WC('d', S(1))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons806, cons151, cons805, cons807) rule1484 = ReplacementRule(pattern1484, With1484) pattern1485 = Pattern(Integral(((WC('c', S(1))/x_)**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons808) rule1485 = ReplacementRule(pattern1485, replacement1485) pattern1486 = Pattern(Integral(x_**WC('m', S(1))*((WC('c', S(1))/x_)**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons20) rule1486 = ReplacementRule(pattern1486, replacement1486) pattern1487 = Pattern(Integral((x_*WC('d', S(1)))**m_*((WC('c', S(1))/x_)**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons21) rule1487 = ReplacementRule(pattern1487, replacement1487) pattern1488 = Pattern(Integral(((WC('d', S(1))/x_)**n_*WC('b', S(1)) + (WC('d', S(1))/x_)**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons48) rule1488 = ReplacementRule(pattern1488, replacement1488) pattern1489 = Pattern(Integral(x_**WC('m', S(1))*(a_ + (WC('d', S(1))/x_)**n_*WC('b', S(1)) + (WC('d', S(1))/x_)**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons48, cons20) rule1489 = ReplacementRule(pattern1489, replacement1489) pattern1490 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + (WC('d', S(1))/x_)**n_*WC('b', S(1)) + (WC('d', S(1))/x_)**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons5, cons48, cons21) rule1490 = ReplacementRule(pattern1490, replacement1490) pattern1491 = Pattern(Integral((x_**WC('n2', S(1))*WC('c', S(1)) + (WC('d', S(1))/x_)**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons809, cons810) rule1491 = ReplacementRule(pattern1491, replacement1491) pattern1492 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**WC('n2', S(1))*WC('c', S(1)) + (WC('d', S(1))/x_)**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons809, cons810, cons20) rule1492 = ReplacementRule(pattern1492, replacement1492) pattern1493 = Pattern(Integral((x_*WC('e', S(1)))**m_*(a_ + x_**WC('n2', S(1))*WC('c', S(1)) + (WC('d', S(1))/x_)**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons5, cons809, cons21, cons810) rule1493 = ReplacementRule(pattern1493, replacement1493) pattern1494 = Pattern(Integral(u_**m_, x_), cons19, cons70, cons811) rule1494 = ReplacementRule(pattern1494, replacement1494) pattern1495 = Pattern(Integral(u_**WC('m', S(1))*v_**WC('n', S(1)), x_), cons19, cons4, cons812, cons813) rule1495 = ReplacementRule(pattern1495, replacement1495) pattern1496 = Pattern(Integral(u_**WC('m', S(1))*v_**WC('n', S(1))*w_**WC('p', S(1)), x_), cons19, cons4, cons5, cons814, cons815) rule1496 = ReplacementRule(pattern1496, replacement1496) pattern1497 = Pattern(Integral(u_**WC('m', S(1))*v_**WC('n', S(1))*w_**WC('p', S(1))*z_**WC('q', S(1)), x_), cons19, cons4, cons5, cons52, cons816, cons817) rule1497 = ReplacementRule(pattern1497, replacement1497) pattern1498 = Pattern(Integral(u_**p_, x_), cons5, cons818, cons819) rule1498 = ReplacementRule(pattern1498, replacement1498) pattern1499 = Pattern(Integral(u_**WC('m', S(1))*v_**WC('p', S(1)), x_), cons19, cons5, cons70, cons820, cons821) rule1499 = ReplacementRule(pattern1499, replacement1499) pattern1500 = Pattern(Integral(u_**WC('m', S(1))*v_**WC('n', S(1))*w_**WC('p', S(1)), x_), cons19, cons4, cons5, cons812, cons822, cons823) rule1500 = ReplacementRule(pattern1500, replacement1500) pattern1501 = Pattern(Integral(u_**WC('p', S(1))*v_**WC('q', S(1)), x_), cons5, cons52, cons454, cons824) rule1501 = ReplacementRule(pattern1501, replacement1501) pattern1502 = Pattern(Integral(u_**p_, x_), cons5, cons825, cons826) rule1502 = ReplacementRule(pattern1502, replacement1502) pattern1503 = Pattern(Integral(u_**WC('p', S(1))*(x_*WC('c', S(1)))**WC('m', S(1)), x_), cons8, cons19, cons5, cons825, cons826) rule1503 = ReplacementRule(pattern1503, replacement1503) pattern1504 = Pattern(Integral(u_**WC('p', S(1))*v_**WC('q', S(1)), x_), cons5, cons52, cons827, cons828, cons829) rule1504 = ReplacementRule(pattern1504, replacement1504) pattern1505 = Pattern(Integral(u_**WC('p', S(1))*v_**WC('q', S(1))*x_**WC('m', S(1)), x_), cons19, cons5, cons52, cons827, cons828, cons829) rule1505 = ReplacementRule(pattern1505, replacement1505) pattern1506 = Pattern(Integral(u_**WC('m', S(1))*v_**WC('p', S(1))*w_**WC('q', S(1)), x_), cons19, cons5, cons52, cons830, cons828, cons831, cons832) rule1506 = ReplacementRule(pattern1506, replacement1506) pattern1507 = Pattern(Integral(u_**WC('p', S(1))*v_**WC('q', S(1))*x_**WC('m', S(1))*z_**WC('r', S(1)), x_), cons19, cons5, cons52, cons54, cons833, cons828, cons834, cons835) rule1507 = ReplacementRule(pattern1507, replacement1507) pattern1508 = Pattern(Integral(u_**p_, x_), cons5, cons836, cons837) rule1508 = ReplacementRule(pattern1508, replacement1508) pattern1509 = Pattern(Integral(u_**WC('p', S(1))*x_**WC('m', S(1)), x_), cons19, cons5, cons836, cons837) rule1509 = ReplacementRule(pattern1509, replacement1509) pattern1510 = Pattern(Integral(u_**p_, x_), cons5, cons838, cons839) rule1510 = ReplacementRule(pattern1510, replacement1510) pattern1511 = Pattern(Integral(u_**WC('p', S(1))*(x_*WC('d', S(1)))**WC('m', S(1)), x_), cons29, cons19, cons5, cons838, cons839) rule1511 = ReplacementRule(pattern1511, replacement1511) pattern1512 = Pattern(Integral(u_**WC('q', S(1))*v_**WC('p', S(1)), x_), cons5, cons52, cons825, cons840, cons841) rule1512 = ReplacementRule(pattern1512, replacement1512) pattern1513 = Pattern(Integral(u_**WC('q', S(1))*v_**WC('p', S(1)), x_), cons5, cons52, cons825, cons842, cons843) rule1513 = ReplacementRule(pattern1513, replacement1513) pattern1514 = Pattern(Integral(u_**WC('p', S(1))*x_**WC('m', S(1))*z_**WC('q', S(1)), x_), cons19, cons5, cons52, cons844, cons838, cons845) rule1514 = ReplacementRule(pattern1514, replacement1514) pattern1515 = Pattern(Integral(u_**WC('p', S(1))*x_**WC('m', S(1))*z_**WC('q', S(1)), x_), cons19, cons5, cons52, cons844, cons825, cons846) rule1515 = ReplacementRule(pattern1515, replacement1515) pattern1516 = Pattern(Integral(u_**p_, x_), cons5, cons847, cons848) rule1516 = ReplacementRule(pattern1516, replacement1516) pattern1517 = Pattern(Integral(u_**WC('p', S(1))*x_**WC('m', S(1)), x_), cons19, cons5, cons847, cons848) rule1517 = ReplacementRule(pattern1517, replacement1517) pattern1518 = Pattern(Integral(u_**WC('p', S(1))*z_, x_), cons5, cons844, cons847, cons849, cons850) rule1518 = ReplacementRule(pattern1518, replacement1518) pattern1519 = Pattern(Integral(u_**WC('p', S(1))*x_**WC('m', S(1))*z_, x_), cons19, cons5, cons844, cons847, cons849, cons850) rule1519 = ReplacementRule(pattern1519, replacement1519) pattern1520 = Pattern(Integral(x_**WC('m', S(1))*(e_ + x_**WC('n', S(1))*WC('h', S(1)) + x_**WC('q', S(1))*WC('f', S(1)) + x_**WC('r', S(1))*WC('g', S(1)))/(a_ + x_**WC('n', S(1))*WC('c', S(1)))**(S(3)/2), x_), cons2, cons8, cons50, cons127, cons210, cons211, cons19, cons4, cons851, cons852, cons853, cons854) rule1520 = ReplacementRule(pattern1520, replacement1520) pattern1521 = Pattern(Integral((d_*x_)**WC('m', S(1))*(e_ + x_**WC('n', S(1))*WC('h', S(1)) + x_**WC('q', S(1))*WC('f', S(1)) + x_**WC('r', S(1))*WC('g', S(1)))/(a_ + x_**WC('n', S(1))*WC('c', S(1)))**(S(3)/2), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons853, cons851, cons852, cons854) rule1521 = ReplacementRule(pattern1521, replacement1521) pattern1522 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**m_*(a_ + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons66, cons151, cons855) rule1522 = ReplacementRule(pattern1522, With1522) pattern1523 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons19, cons4, cons5, cons68, cons856, cons857) rule1523 = ReplacementRule(pattern1523, replacement1523) pattern1524 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons66, cons466, cons858) rule1524 = ReplacementRule(pattern1524, replacement1524) pattern1525 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons66, cons859) rule1525 = ReplacementRule(pattern1525, replacement1525) pattern1526 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons4, cons66, cons859) rule1526 = ReplacementRule(pattern1526, replacement1526) pattern1527 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons19, cons4, cons5, cons860, cons502) rule1527 = ReplacementRule(pattern1527, replacement1527) pattern1528 = Pattern(Integral(Pq_*(c_*x_)**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons860, cons502) rule1528 = ReplacementRule(pattern1528, replacement1528) pattern1529 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons66, cons55, cons13, cons139) rule1529 = ReplacementRule(pattern1529, replacement1529) pattern1530 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons29, cons19, cons4, cons5, cons66, cons861) rule1530 = ReplacementRule(pattern1530, replacement1530) pattern1531 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons4, cons5, cons66, cons861, cons862) rule1531 = ReplacementRule(pattern1531, replacement1531) pattern1532 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons66, cons150, cons246, cons165, cons863) rule1532 = ReplacementRule(pattern1532, With1532) pattern1533 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons66, cons523, cons13, cons165) rule1533 = ReplacementRule(pattern1533, With1533) pattern1534 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons66, cons523, cons13, cons165) rule1534 = ReplacementRule(pattern1534, With1534) pattern1535 = Pattern(Integral(Pq_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons66, cons150, cons13, cons139, CustomConstraint(With1535)) rule1535 = ReplacementRule(pattern1535, replacement1535) pattern1536 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons66, cons150, cons13, cons139, cons864) rule1536 = ReplacementRule(pattern1536, replacement1536) pattern1537 = Pattern(Integral((d_ + x_**S(4)*WC('g', S(1)) + x_**S(3)*WC('f', S(1)) + x_*WC('e', S(1)))/(a_ + x_**S(4)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons865) rule1537 = ReplacementRule(pattern1537, replacement1537) pattern1538 = Pattern(Integral((d_ + x_**S(4)*WC('g', S(1)) + x_**S(3)*WC('f', S(1)))/(a_ + x_**S(4)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons29, cons127, cons210, cons865) rule1538 = ReplacementRule(pattern1538, replacement1538) pattern1539 = Pattern(Integral((d_ + x_**S(4)*WC('g', S(1)) + x_*WC('e', S(1)))/(a_ + x_**S(4)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons210, cons865) rule1539 = ReplacementRule(pattern1539, replacement1539) pattern1540 = Pattern(Integral(x_**S(2)*(x_**S(4)*WC('h', S(1)) + x_*WC('f', S(1)) + WC('e', S(0)))/(a_ + x_**S(4)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons50, cons127, cons211, cons866) rule1540 = ReplacementRule(pattern1540, replacement1540) pattern1541 = Pattern(Integral(x_**S(2)*(x_**S(4)*WC('h', S(1)) + WC('e', S(0)))/(a_ + x_**S(4)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons50, cons211, cons866) rule1541 = ReplacementRule(pattern1541, replacement1541) pattern1542 = Pattern(Integral((d_ + x_**S(6)*WC('h', S(1)) + x_**S(4)*WC('g', S(1)) + x_**S(3)*WC('f', S(1)) + x_**S(2)*WC('e', S(1)))/(a_ + x_**S(4)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons127, cons210, cons211, cons866, cons865) rule1542 = ReplacementRule(pattern1542, replacement1542) pattern1543 = Pattern(Integral((d_ + x_**S(6)*WC('h', S(1)) + x_**S(4)*WC('g', S(1)) + x_**S(2)*WC('e', S(1)))/(a_ + x_**S(4)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons29, cons50, cons210, cons211, cons866, cons865) rule1543 = ReplacementRule(pattern1543, replacement1543) pattern1544 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons66, cons150, cons13, cons139, CustomConstraint(With1544)) rule1544 = ReplacementRule(pattern1544, replacement1544) pattern1545 = Pattern(Integral(Pq_*x_**m_*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons66, cons150, cons13, cons139, cons86) rule1545 = ReplacementRule(pattern1545, With1545) pattern1546 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons860, cons150, cons20, CustomConstraint(With1546)) rule1546 = ReplacementRule(pattern1546, replacement1546) pattern1547 = Pattern(Integral((A_ + x_*WC('B', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons867) rule1547 = ReplacementRule(pattern1547, replacement1547) pattern1548 = Pattern(Integral((A_ + x_*WC('B', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons868, cons470) rule1548 = ReplacementRule(pattern1548, With1548) pattern1549 = Pattern(Integral((A_ + x_*WC('B', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons868, cons471) rule1549 = ReplacementRule(pattern1549, With1549) pattern1550 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons869, cons870) rule1550 = ReplacementRule(pattern1550, replacement1550) pattern1551 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons871) rule1551 = ReplacementRule(pattern1551, With1551) pattern1552 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons872) rule1552 = ReplacementRule(pattern1552, With1552) pattern1553 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons873) rule1553 = ReplacementRule(pattern1553, With1553) pattern1554 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons874) rule1554 = ReplacementRule(pattern1554, With1554) pattern1555 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons875) rule1555 = ReplacementRule(pattern1555, With1555) pattern1556 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons876) rule1556 = ReplacementRule(pattern1556, With1556) pattern1557 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons877) rule1557 = ReplacementRule(pattern1557, With1557) pattern1558 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons878) rule1558 = ReplacementRule(pattern1558, With1558) pattern1559 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons879) rule1559 = ReplacementRule(pattern1559, With1559) pattern1560 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons880) rule1560 = ReplacementRule(pattern1560, With1560) pattern1561 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons881) rule1561 = ReplacementRule(pattern1561, With1561) pattern1562 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons882) rule1562 = ReplacementRule(pattern1562, With1562) pattern1563 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons883) rule1563 = ReplacementRule(pattern1563, With1563) pattern1564 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons884) rule1564 = ReplacementRule(pattern1564, With1564) pattern1565 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons885) rule1565 = ReplacementRule(pattern1565, With1565) pattern1566 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons886) rule1566 = ReplacementRule(pattern1566, With1566) pattern1567 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons887) rule1567 = ReplacementRule(pattern1567, With1567) pattern1568 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons888) rule1568 = ReplacementRule(pattern1568, With1568) pattern1569 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons889) rule1569 = ReplacementRule(pattern1569, With1569) pattern1570 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons890) rule1570 = ReplacementRule(pattern1570, With1570) pattern1571 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons891) rule1571 = ReplacementRule(pattern1571, With1571) pattern1572 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons892) rule1572 = ReplacementRule(pattern1572, With1572) pattern1573 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons893) rule1573 = ReplacementRule(pattern1573, With1573) pattern1574 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons894) rule1574 = ReplacementRule(pattern1574, With1574) pattern1575 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons895) rule1575 = ReplacementRule(pattern1575, replacement1575) pattern1576 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons896) rule1576 = ReplacementRule(pattern1576, replacement1576) pattern1577 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons897) rule1577 = ReplacementRule(pattern1577, replacement1577) pattern1578 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons898) rule1578 = ReplacementRule(pattern1578, With1578) pattern1579 = Pattern(Integral(x_*(x_*WC('C', S(1)) + WC('B', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons899) rule1579 = ReplacementRule(pattern1579, With1579) pattern1580 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons900) rule1580 = ReplacementRule(pattern1580, With1580) pattern1581 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons901) rule1581 = ReplacementRule(pattern1581, With1581) pattern1582 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons902) rule1582 = ReplacementRule(pattern1582, With1582) pattern1583 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons903) rule1583 = ReplacementRule(pattern1583, With1583) pattern1584 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons868, cons904, cons905, CustomConstraint(With1584)) rule1584 = ReplacementRule(pattern1584, replacement1584) pattern1585 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons904, cons905, CustomConstraint(With1585)) rule1585 = ReplacementRule(pattern1585, replacement1585) pattern1586 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons904, cons905, CustomConstraint(With1586)) rule1586 = ReplacementRule(pattern1586, replacement1586) pattern1587 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons868, cons904, cons906, CustomConstraint(With1587)) rule1587 = ReplacementRule(pattern1587, replacement1587) pattern1588 = Pattern(Integral(x_*(B_ + x_*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons37, cons38, cons904, cons906, CustomConstraint(With1588)) rule1588 = ReplacementRule(pattern1588, replacement1588) pattern1589 = Pattern(Integral((A_ + x_**S(2)*WC('C', S(1)))/(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons36, cons38, cons904, cons906, CustomConstraint(With1589)) rule1589 = ReplacementRule(pattern1589, replacement1589) pattern1590 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons19, cons66, cons676, cons907, CustomConstraint(With1590)) rule1590 = ReplacementRule(pattern1590, replacement1590) pattern1591 = Pattern(Integral(Pq_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons66, cons676, cons907, CustomConstraint(With1591)) rule1591 = ReplacementRule(pattern1591, replacement1591) pattern1592 = Pattern(Integral((c_ + x_*WC('d', S(1)))/sqrt(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons483, cons908) rule1592 = ReplacementRule(pattern1592, With1592) pattern1593 = Pattern(Integral((c_ + x_*WC('d', S(1)))/sqrt(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons483, cons909) rule1593 = ReplacementRule(pattern1593, With1593) pattern1594 = Pattern(Integral((c_ + x_*WC('d', S(1)))/sqrt(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons484, cons910) rule1594 = ReplacementRule(pattern1594, With1594) pattern1595 = Pattern(Integral((c_ + x_*WC('d', S(1)))/sqrt(a_ + x_**S(3)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons484, cons911) rule1595 = ReplacementRule(pattern1595, With1595) pattern1596 = Pattern(Integral((c_ + x_**S(4)*WC('d', S(1)))/sqrt(a_ + x_**S(6)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons912) rule1596 = ReplacementRule(pattern1596, With1596) pattern1597 = Pattern(Integral((c_ + x_**S(4)*WC('d', S(1)))/sqrt(a_ + x_**S(6)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons913) rule1597 = ReplacementRule(pattern1597, With1597) pattern1598 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))/sqrt(a_ + x_**S(8)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons914) rule1598 = ReplacementRule(pattern1598, replacement1598) pattern1599 = Pattern(Integral((c_ + x_**S(2)*WC('d', S(1)))/sqrt(a_ + x_**S(8)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons915) rule1599 = ReplacementRule(pattern1599, replacement1599) pattern1600 = Pattern(Integral(Pq_/(x_*sqrt(a_ + x_**n_*WC('b', S(1)))), x_), cons2, cons3, cons66, cons150, cons916) rule1600 = ReplacementRule(pattern1600, replacement1600) pattern1601 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons66, cons676, cons917) rule1601 = ReplacementRule(pattern1601, With1601) pattern1602 = Pattern(Integral(Pq_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons66, cons676, cons917) rule1602 = ReplacementRule(pattern1602, With1602) pattern1603 = Pattern(Integral(Pq_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons66, cons150, cons918) rule1603 = ReplacementRule(pattern1603, replacement1603) pattern1604 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons8, cons19, cons66, cons87) rule1604 = ReplacementRule(pattern1604, replacement1604) pattern1605 = Pattern(Integral(Pq_/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons66, cons87) rule1605 = ReplacementRule(pattern1605, replacement1605) pattern1606 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons66, cons150, cons33, cons96, cons919, CustomConstraint(With1606)) rule1606 = ReplacementRule(pattern1606, replacement1606) pattern1607 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons66, cons150, CustomConstraint(With1607)) rule1607 = ReplacementRule(pattern1607, replacement1607) pattern1608 = Pattern(Integral(Pq_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons66, cons150, CustomConstraint(With1608)) rule1608 = ReplacementRule(pattern1608, replacement1608) pattern1609 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons66, cons198, cons20) rule1609 = ReplacementRule(pattern1609, With1609) pattern1610 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons66, cons198, cons369) rule1610 = ReplacementRule(pattern1610, With1610) pattern1611 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons66, cons198, cons358) rule1611 = ReplacementRule(pattern1611, With1611) pattern1612 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons5, cons66, cons491) rule1612 = ReplacementRule(pattern1612, With1612) pattern1613 = Pattern(Integral(Pq_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons5, cons66, cons491) rule1613 = ReplacementRule(pattern1613, With1613) pattern1614 = Pattern(Integral(Pq_*(c_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons66, cons491) rule1614 = ReplacementRule(pattern1614, replacement1614) pattern1615 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons5, cons860, cons543, cons25) rule1615 = ReplacementRule(pattern1615, replacement1615) pattern1616 = Pattern(Integral(Pq_*(c_*x_)**m_*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons860, cons543, cons25) rule1616 = ReplacementRule(pattern1616, replacement1616) pattern1617 = Pattern(Integral((A_ + x_**WC('m', S(1))*WC('B', S(1)))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons36, cons37, cons19, cons4, cons5, cons55) rule1617 = ReplacementRule(pattern1617, replacement1617) pattern1618 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons920) rule1618 = ReplacementRule(pattern1618, replacement1618) pattern1619 = Pattern(Integral(Pq_*(a_ + x_**n_*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons4, cons5, cons920) rule1619 = ReplacementRule(pattern1619, replacement1619) pattern1620 = Pattern(Integral(Pq_*u_**WC('m', S(1))*(a_ + v_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons5, cons556, cons921) rule1620 = ReplacementRule(pattern1620, replacement1620) pattern1621 = Pattern(Integral(Pq_*(a_ + v_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons4, cons5, cons554, cons921) rule1621 = ReplacementRule(pattern1621, replacement1621) pattern1622 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**WC('n', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('n', S(1))*WC('b2', S(1)))**WC('p', S(1)), x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons5, cons66, cons57, cons496) rule1622 = ReplacementRule(pattern1622, replacement1622) pattern1623 = Pattern(Integral(Pq_*(a1_ + x_**WC('n', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('n', S(1))*WC('b2', S(1)))**WC('p', S(1)), x_), cons59, cons60, cons61, cons62, cons4, cons5, cons66, cons57, cons496) rule1623 = ReplacementRule(pattern1623, replacement1623) pattern1624 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(a1_ + x_**WC('n', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('n', S(1))*WC('b2', S(1)))**WC('p', S(1)), x_), cons59, cons60, cons61, cons62, cons8, cons19, cons4, cons5, cons66, cons57) rule1624 = ReplacementRule(pattern1624, replacement1624) pattern1625 = Pattern(Integral(Pq_*(a1_ + x_**WC('n', S(1))*WC('b1', S(1)))**WC('p', S(1))*(a2_ + x_**WC('n', S(1))*WC('b2', S(1)))**WC('p', S(1)), x_), cons59, cons60, cons61, cons62, cons4, cons5, cons66, cons57) rule1625 = ReplacementRule(pattern1625, replacement1625) pattern1626 = Pattern(Integral((a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('p', S(1))*(e_ + x_**WC('n', S(1))*WC('f', S(1)) + x_**WC('n2', S(1))*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons48, cons922, cons923) rule1626 = ReplacementRule(pattern1626, replacement1626) pattern1627 = Pattern(Integral((a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('p', S(1))*(e_ + x_**WC('n2', S(1))*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons210, cons4, cons5, cons48, cons924, cons923) rule1627 = ReplacementRule(pattern1627, replacement1627) pattern1628 = Pattern(Integral((x_*WC('h', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('p', S(1))*(e_ + x_**WC('n', S(1))*WC('f', S(1)) + x_**WC('n2', S(1))*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons5, cons48, cons925, cons926, cons68) rule1628 = ReplacementRule(pattern1628, replacement1628) pattern1629 = Pattern(Integral((x_*WC('h', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('p', S(1))*(e_ + x_**WC('n2', S(1))*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons210, cons211, cons19, cons4, cons5, cons48, cons597, cons926, cons68) rule1629 = ReplacementRule(pattern1629, replacement1629) pattern1630 = Pattern(Integral((A_ + x_**WC('m', S(1))*WC('B', S(1)))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(x_**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons19, cons4, cons5, cons52, cons73, cons55) rule1630 = ReplacementRule(pattern1630, replacement1630) pattern1631 = Pattern(Integral(Px_**WC('q', S(1))*((c_ + x_*WC('d', S(1)))**n_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons927, cons588, cons89) rule1631 = ReplacementRule(pattern1631, With1631) pattern1632 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons48, cons860, cons55) rule1632 = ReplacementRule(pattern1632, replacement1632) pattern1633 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons48, cons66, cons130) rule1633 = ReplacementRule(pattern1633, replacement1633) pattern1634 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons48, cons66, cons130) rule1634 = ReplacementRule(pattern1634, replacement1634) pattern1635 = Pattern(Integral((a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**WC('n', S(1))*WC('e', S(1)) + x_**WC('n2', S(1))*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons5, cons48, cons928, cons929) rule1635 = ReplacementRule(pattern1635, replacement1635) pattern1636 = Pattern(Integral((d_ + x_**WC('n2', S(1))*WC('f', S(1)))*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons4, cons5, cons48, cons924, cons930) rule1636 = ReplacementRule(pattern1636, replacement1636) pattern1637 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**WC('n', S(1))*WC('e', S(1)) + x_**WC('n2', S(1))*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons48, cons931, cons932, cons68) rule1637 = ReplacementRule(pattern1637, replacement1637) pattern1638 = Pattern(Integral((x_*WC('g', S(1)))**WC('m', S(1))*(d_ + x_**WC('n2', S(1))*WC('f', S(1)))*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons19, cons4, cons5, cons48, cons597, cons930, cons68) rule1638 = ReplacementRule(pattern1638, replacement1638) pattern1639 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons48, cons66, cons47, cons316) rule1639 = ReplacementRule(pattern1639, replacement1639) pattern1640 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons48, cons66, cons47, cons316) rule1640 = ReplacementRule(pattern1640, replacement1640) pattern1641 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons48, cons860, cons228, cons502) rule1641 = ReplacementRule(pattern1641, replacement1641) pattern1642 = Pattern(Integral(Pq_*(d_*x_)**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons48, cons860, cons228, cons502) rule1642 = ReplacementRule(pattern1642, replacement1642) pattern1643 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons48, cons66, cons861) rule1643 = ReplacementRule(pattern1643, replacement1643) pattern1644 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons48, cons66, cons861, cons862) rule1644 = ReplacementRule(pattern1644, replacement1644) pattern1645 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)) + x_**WC('n2', S(1))*WC('f', S(1)) + x_**WC('n3', S(1))*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons48, cons933, cons228, cons934, cons935) rule1645 = ReplacementRule(pattern1645, replacement1645) pattern1646 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**WC('n2', S(1))*WC('f', S(1)) + x_**WC('n3', S(1))*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons4, cons5, cons48, cons933, cons228, cons936, cons937) rule1646 = ReplacementRule(pattern1646, replacement1646) pattern1647 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*(d_ + x_**n_*WC('e', S(1)) + x_**WC('n3', S(1))*WC('g', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons210, cons4, cons5, cons48, cons933, cons228, cons934, cons938) rule1647 = ReplacementRule(pattern1647, replacement1647) pattern1648 = Pattern(Integral((d_ + x_**WC('n3', S(1))*WC('g', S(1)))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons210, cons4, cons5, cons48, cons933, cons228, cons936, cons939) rule1648 = ReplacementRule(pattern1648, replacement1648) pattern1649 = Pattern(Integral(x_**WC('m', S(1))*(e_ + x_**WC('q', S(1))*WC('f', S(1)) + x_**WC('r', S(1))*WC('g', S(1)) + x_**WC('s', S(1))*WC('h', S(1)))/(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons50, cons127, cons210, cons211, cons19, cons4, cons48, cons940, cons941, cons942, cons228, cons943, cons854) rule1649 = ReplacementRule(pattern1649, replacement1649) pattern1650 = Pattern(Integral((d_*x_)**WC('m', S(1))*(e_ + x_**WC('q', S(1))*WC('f', S(1)) + x_**WC('r', S(1))*WC('g', S(1)) + x_**WC('s', S(1))*WC('h', S(1)))/(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons19, cons4, cons48, cons940, cons941, cons942, cons228, cons943, cons854) rule1650 = ReplacementRule(pattern1650, replacement1650) pattern1651 = Pattern(Integral(Pq_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons48, cons66, cons228, cons150, cons13, cons139, CustomConstraint(With1651)) rule1651 = ReplacementRule(pattern1651, replacement1651) pattern1652 = Pattern(Integral((d_ + x_**S(4)*WC('g', S(1)) + x_**S(3)*WC('f', S(1)) + x_*WC('e', S(1)))/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons228, cons944) rule1652 = ReplacementRule(pattern1652, replacement1652) pattern1653 = Pattern(Integral((d_ + x_**S(4)*WC('g', S(1)) + x_**S(3)*WC('f', S(1)))/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons228, cons944) rule1653 = ReplacementRule(pattern1653, replacement1653) pattern1654 = Pattern(Integral((d_ + x_**S(4)*WC('g', S(1)) + x_*WC('e', S(1)))/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons210, cons228, cons944) rule1654 = ReplacementRule(pattern1654, replacement1654) pattern1655 = Pattern(Integral(x_**S(2)*(x_**S(4)*WC('h', S(1)) + x_**S(2)*WC('g', S(1)) + x_*WC('f', S(1)) + WC('e', S(0)))/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons50, cons127, cons210, cons211, cons228, cons945, cons946) rule1655 = ReplacementRule(pattern1655, replacement1655) pattern1656 = Pattern(Integral(x_**S(2)*(x_**S(4)*WC('h', S(1)) + x_**S(2)*WC('g', S(1)) + WC('e', S(0)))/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons50, cons210, cons211, cons228, cons945, cons946) rule1656 = ReplacementRule(pattern1656, replacement1656) pattern1657 = Pattern(Integral((d_ + x_**S(6)*WC('h', S(1)) + x_**S(4)*WC('g', S(1)) + x_**S(3)*WC('f', S(1)) + x_**S(2)*WC('e', S(1)))/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons228, cons945, cons947) rule1657 = ReplacementRule(pattern1657, replacement1657) pattern1658 = Pattern(Integral((d_ + x_**S(6)*WC('h', S(1)) + x_**S(3)*WC('f', S(1)) + x_**S(2)*WC('e', S(1)))/(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))**(S(3)/2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons211, cons228, cons945, cons948) rule1658 = ReplacementRule(pattern1658, replacement1658) pattern1659 = Pattern(Integral(Pq_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons48, cons66, cons228, cons150, cons13, cons139, CustomConstraint(With1659)) rule1659 = ReplacementRule(pattern1659, replacement1659) pattern1660 = Pattern(Integral(Pq_*x_**m_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons48, cons66, cons228, cons150, cons13, cons139, cons86, CustomConstraint(With1660)) rule1660 = ReplacementRule(pattern1660, replacement1660) pattern1661 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons48, cons860, cons228, cons150, cons20, CustomConstraint(With1661)) rule1661 = ReplacementRule(pattern1661, replacement1661) pattern1662 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))/(a_ + x_**n2_*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons48, cons860, cons228, cons150, cons284) rule1662 = ReplacementRule(pattern1662, replacement1662) pattern1663 = Pattern(Integral(Pq_/(a_ + x_**n2_*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1))), x_), cons2, cons3, cons8, cons48, cons860, cons228, cons150, cons949) rule1663 = ReplacementRule(pattern1663, replacement1663) pattern1664 = Pattern(Integral(Pq_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons66, cons228, cons65, CustomConstraint(With1664)) rule1664 = ReplacementRule(pattern1664, replacement1664) pattern1665 = Pattern(Integral(Pq_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons66, cons228, cons721, cons950, CustomConstraint(With1665)) rule1665 = ReplacementRule(pattern1665, replacement1665) pattern1666 = Pattern(Integral(Pq_*(a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons66, cons228, cons721, cons951, CustomConstraint(With1666)) rule1666 = ReplacementRule(pattern1666, replacement1666) pattern1667 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons48, cons860, cons228, cons150, CustomConstraint(With1667)) rule1667 = ReplacementRule(pattern1667, replacement1667) pattern1668 = Pattern(Integral(Pq_*(a_ + x_**n2_*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons48, cons860, cons228, cons150, CustomConstraint(With1668)) rule1668 = ReplacementRule(pattern1668, replacement1668) pattern1669 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons48, cons66, cons228, cons150, cons952) rule1669 = ReplacementRule(pattern1669, With1669) pattern1670 = Pattern(Integral(Pq_*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons48, cons66, cons228, cons150, cons952) rule1670 = ReplacementRule(pattern1670, With1670) pattern1671 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))/(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons48, cons66, cons228, cons150) rule1671 = ReplacementRule(pattern1671, replacement1671) pattern1672 = Pattern(Integral(Pq_/(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons48, cons66, cons228, cons150) rule1672 = ReplacementRule(pattern1672, replacement1672) pattern1673 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons48, cons66, cons228, cons198, cons20) rule1673 = ReplacementRule(pattern1673, With1673) pattern1674 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons48, cons66, cons228, cons198, cons369) rule1674 = ReplacementRule(pattern1674, With1674) pattern1675 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons48, cons66, cons228, cons198, cons358) rule1675 = ReplacementRule(pattern1675, With1675) pattern1676 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons48, cons66, cons228, cons491) rule1676 = ReplacementRule(pattern1676, With1676) pattern1677 = Pattern(Integral(Pq_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons5, cons48, cons66, cons228, cons491) rule1677 = ReplacementRule(pattern1677, With1677) pattern1678 = Pattern(Integral(Pq_*(d_*x_)**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons48, cons66, cons228, cons491, cons75) rule1678 = ReplacementRule(pattern1678, replacement1678) pattern1679 = Pattern(Integral(Pq_*(d_*x_)**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons48, cons66, cons228, cons491, cons953) rule1679 = ReplacementRule(pattern1679, replacement1679) pattern1680 = Pattern(Integral(Pq_*(d_*x_)**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons48, cons66, cons228, cons491) rule1680 = ReplacementRule(pattern1680, replacement1680) pattern1681 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons48, cons860, cons228, cons543, cons25) rule1681 = ReplacementRule(pattern1681, replacement1681) pattern1682 = Pattern(Integral(Pq_*(d_*x_)**m_*(a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons5, cons48, cons860, cons228, cons543, cons25) rule1682 = ReplacementRule(pattern1682, replacement1682) pattern1683 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))/(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons48, cons66, cons228) rule1683 = ReplacementRule(pattern1683, With1683) pattern1684 = Pattern(Integral(Pq_/(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons4, cons48, cons66, cons228) rule1684 = ReplacementRule(pattern1684, With1684) pattern1685 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons48, cons66, cons704) rule1685 = ReplacementRule(pattern1685, replacement1685) pattern1686 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**p_, x_), cons2, cons3, cons8, cons4, cons48, cons66, cons704) rule1686 = ReplacementRule(pattern1686, replacement1686) pattern1687 = Pattern(Integral(Pq_*(x_*WC('d', S(1)))**WC('m', S(1))*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons48, cons920) rule1687 = ReplacementRule(pattern1687, replacement1687) pattern1688 = Pattern(Integral(Pq_*(a_ + x_**WC('n', S(1))*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons48, cons920) rule1688 = ReplacementRule(pattern1688, replacement1688) pattern1689 = Pattern(Integral(Pq_*u_**WC('m', S(1))*(a_ + v_**n_*WC('b', S(1)) + v_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons48, cons556, cons921) rule1689 = ReplacementRule(pattern1689, replacement1689) pattern1690 = Pattern(Integral(Pq_*(a_ + v_**n_*WC('b', S(1)) + v_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons48, cons554, cons921) rule1690 = ReplacementRule(pattern1690, replacement1690) pattern1691 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons5, cons149, cons954, cons955) rule1691 = ReplacementRule(pattern1691, replacement1691) pattern1692 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons149, cons954, cons956, cons13, cons139) rule1692 = ReplacementRule(pattern1692, replacement1692) pattern1693 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons5, cons149, cons954, cons956, cons957) rule1693 = ReplacementRule(pattern1693, replacement1693) pattern1694 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons149, cons958, cons959, cons165, cons960) rule1694 = ReplacementRule(pattern1694, replacement1694) pattern1695 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons149, cons958, cons959, cons165, cons961) rule1695 = ReplacementRule(pattern1695, replacement1695) pattern1696 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons149, cons958, cons959, cons139, cons962) rule1696 = ReplacementRule(pattern1696, replacement1696) pattern1697 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons149, cons958, cons959, cons139) rule1697 = ReplacementRule(pattern1697, replacement1697) pattern1698 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons963, cons954, cons964) rule1698 = ReplacementRule(pattern1698, replacement1698) pattern1699 = Pattern(Integral(S(1)/sqrt(x_**S(2)*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1))), x_), cons2, cons3, cons4, cons965) rule1699 = ReplacementRule(pattern1699, replacement1699) pattern1700 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons721, cons954, cons964) rule1700 = ReplacementRule(pattern1700, replacement1700) pattern1701 = Pattern(Integral(S(1)/sqrt(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1))), x_), cons2, cons3, cons966, cons967) rule1701 = ReplacementRule(pattern1701, replacement1701) pattern1702 = Pattern(Integral((x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons5, cons149, cons954, cons968) rule1702 = ReplacementRule(pattern1702, replacement1702) pattern1703 = Pattern(Integral((u_**WC('j', S(1))*WC('a', S(1)) + u_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons5, cons70, cons71) rule1703 = ReplacementRule(pattern1703, replacement1703) pattern1704 = Pattern(Integral(x_**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons798, cons19, cons4, cons5, cons149, cons954, cons969, cons55) rule1704 = ReplacementRule(pattern1704, replacement1704) pattern1705 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons149, cons954, cons970, cons971) rule1705 = ReplacementRule(pattern1705, replacement1705) pattern1706 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons149, cons954, cons972, cons13, cons139, cons971) rule1706 = ReplacementRule(pattern1706, replacement1706) pattern1707 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons149, cons954, cons972, cons973, cons974) rule1707 = ReplacementRule(pattern1707, replacement1707) pattern1708 = Pattern(Integral((c_*x_)**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons149, cons954, cons972) rule1708 = ReplacementRule(pattern1708, replacement1708) pattern1709 = Pattern(Integral(x_**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons798, cons19, cons4, cons5, cons149, cons954, cons969, cons502, cons975) rule1709 = ReplacementRule(pattern1709, replacement1709) pattern1710 = Pattern(Integral((c_*x_)**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons149, cons954, cons969, cons502, cons975) rule1710 = ReplacementRule(pattern1710, replacement1710) pattern1711 = Pattern(Integral((x_*WC('c', S(1)))**m_*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons149, cons976, cons959, cons974, cons165, cons977) rule1711 = ReplacementRule(pattern1711, replacement1711) pattern1712 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons149, cons958, cons959, cons974, cons165, cons514) rule1712 = ReplacementRule(pattern1712, replacement1712) pattern1713 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons149, cons976, cons959, cons974, cons139, cons978) rule1713 = ReplacementRule(pattern1713, replacement1713) pattern1714 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons149, cons958, cons959, cons974, cons139) rule1714 = ReplacementRule(pattern1714, replacement1714) pattern1715 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons149, cons966, cons959, cons974, cons979, cons514) rule1715 = ReplacementRule(pattern1715, replacement1715) pattern1716 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons149, cons966, cons959, cons974, cons980) rule1716 = ReplacementRule(pattern1716, replacement1716) pattern1717 = Pattern(Integral(x_**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons798, cons19, cons4, cons5, cons149, cons954, cons969, cons68, cons543, cons25) rule1717 = ReplacementRule(pattern1717, replacement1717) pattern1718 = Pattern(Integral((c_*x_)**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons149, cons954, cons969, cons68, cons543, cons25) rule1718 = ReplacementRule(pattern1718, replacement1718) pattern1719 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons963, cons954, cons981, cons971) rule1719 = ReplacementRule(pattern1719, replacement1719) pattern1720 = Pattern(Integral(x_**WC('m', S(1))/sqrt(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1))), x_), cons2, cons3, cons798, cons4, cons982, cons954) rule1720 = ReplacementRule(pattern1720, replacement1720) pattern1721 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons721, cons954, cons981, cons971) rule1721 = ReplacementRule(pattern1721, replacement1721) pattern1722 = Pattern(Integral((c_*x_)**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons669, cons954, cons981) rule1722 = ReplacementRule(pattern1722, replacement1722) pattern1723 = Pattern(Integral((x_*WC('c', S(1)))**WC('m', S(1))*(x_**WC('j', S(1))*WC('a', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons149, cons954, cons968) rule1723 = ReplacementRule(pattern1723, replacement1723) pattern1724 = Pattern(Integral(u_**WC('m', S(1))*(v_**WC('j', S(1))*WC('a', S(1)) + v_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1)), x_), cons2, cons3, cons798, cons19, cons4, cons5, cons556) rule1724 = ReplacementRule(pattern1724, replacement1724) pattern1725 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**n_*WC('d', S(1)))**WC('q', S(1))*(x_**j_*WC('a', S(1)) + x_**WC('k', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons798, cons799, cons19, cons4, cons5, cons52, cons149, cons983, cons969, cons984, cons502, cons975) rule1725 = ReplacementRule(pattern1725, replacement1725) pattern1726 = Pattern(Integral((e_*x_)**WC('m', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('q', S(1))*(x_**j_*WC('a', S(1)) + x_**WC('k', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons798, cons799, cons19, cons4, cons5, cons52, cons149, cons983, cons969, cons984, cons502, cons975) rule1726 = ReplacementRule(pattern1726, replacement1726) pattern1727 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))*(x_**WC('jn', S(1))*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons798, cons19, cons4, cons5, cons985, cons149, cons73, cons986, cons987, cons973) rule1727 = ReplacementRule(pattern1727, replacement1727) pattern1728 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))*(x_**WC('jn', S(1))*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons798, cons19, cons4, cons985, cons149, cons73, cons988, cons139, cons989, cons990) rule1728 = ReplacementRule(pattern1728, replacement1728) pattern1729 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))*(x_**WC('jn', S(1))*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons798, cons5, cons985, cons149, cons73, cons95, cons90, cons991, cons992, cons973, cons993) rule1729 = ReplacementRule(pattern1729, replacement1729) pattern1730 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))*(x_**WC('jn', S(1))*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons798, cons19, cons4, cons5, cons985, cons149, cons73, cons994, cons990) rule1730 = ReplacementRule(pattern1730, replacement1730) pattern1731 = Pattern(Integral(x_**WC('m', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('q', S(1))*(x_**j_*WC('a', S(1)) + x_**WC('k', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons798, cons799, cons19, cons4, cons5, cons52, cons149, cons983, cons969, cons984, cons68, cons543, cons25) rule1731 = ReplacementRule(pattern1731, replacement1731) pattern1732 = Pattern(Integral((e_*x_)**WC('m', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('q', S(1))*(x_**j_*WC('a', S(1)) + x_**WC('k', S(1))*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons798, cons799, cons19, cons4, cons5, cons52, cons149, cons983, cons969, cons984, cons68, cons543, cons25) rule1732 = ReplacementRule(pattern1732, replacement1732) pattern1733 = Pattern(Integral((x_*WC('e', S(1)))**WC('m', S(1))*(c_ + x_**WC('n', S(1))*WC('d', S(1)))**WC('q', S(1))*(x_**WC('jn', S(1))*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons798, cons19, cons4, cons5, cons52, cons985, cons149, cons73, cons995) rule1733 = ReplacementRule(pattern1733, replacement1733) pattern1734 = Pattern(Integral(Pq_*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons5, cons860, cons149, cons954, cons966, cons969, cons996) rule1734 = ReplacementRule(pattern1734, With1734) pattern1735 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons798, cons19, cons4, cons5, cons860, cons149, cons954, cons969, cons502) rule1735 = ReplacementRule(pattern1735, replacement1735) pattern1736 = Pattern(Integral(Pq_*(c_*x_)**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons4, cons5, cons860, cons149, cons954, cons969, cons502, cons33, cons997) rule1736 = ReplacementRule(pattern1736, replacement1736) pattern1737 = Pattern(Integral(Pq_*(c_*x_)**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons860, cons149, cons954, cons969, cons502) rule1737 = ReplacementRule(pattern1737, replacement1737) pattern1738 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons5, cons860, cons149, cons998, cons20, CustomConstraint(With1738)) rule1738 = ReplacementRule(pattern1738, replacement1738) pattern1739 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons19, cons5, cons66, cons149, cons999, cons1000, CustomConstraint(With1739)) rule1739 = ReplacementRule(pattern1739, replacement1739) pattern1740 = Pattern(Integral(Pq_*x_**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons798, cons19, cons4, cons5, cons860, cons149, cons954, cons969, cons543, cons25) rule1740 = ReplacementRule(pattern1740, replacement1740) pattern1741 = Pattern(Integral(Pq_*(c_*x_)**m_*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons4, cons5, cons860, cons149, cons954, cons969, cons543, cons25, cons33, cons997) rule1741 = ReplacementRule(pattern1741, replacement1741) pattern1742 = Pattern(Integral(Pq_*(c_*x_)**m_*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons860, cons149, cons954, cons969, cons543, cons25) rule1742 = ReplacementRule(pattern1742, replacement1742) pattern1743 = Pattern(Integral(Pq_*(x_*WC('c', S(1)))**WC('m', S(1))*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons8, cons798, cons19, cons4, cons5, cons920, cons149, cons954) rule1743 = ReplacementRule(pattern1743, replacement1743) pattern1744 = Pattern(Integral(Pq_*(x_**n_*WC('b', S(1)) + x_**WC('j', S(1))*WC('a', S(1)))**p_, x_), cons2, cons3, cons798, cons4, cons5, cons920, cons149, cons954) rule1744 = ReplacementRule(pattern1744, replacement1744) pattern1745 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons40, cons1001) rule1745 = ReplacementRule(pattern1745, replacement1745) pattern1746 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons130, cons1002) rule1746 = ReplacementRule(pattern1746, replacement1746) pattern1747 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons65, cons1002, CustomConstraint(With1747)) rule1747 = ReplacementRule(pattern1747, replacement1747) pattern1748 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons65, cons1002) rule1748 = ReplacementRule(pattern1748, With1748) pattern1749 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons5, cons149, cons1001) rule1749 = ReplacementRule(pattern1749, replacement1749) pattern1750 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons5, cons149, cons1002, CustomConstraint(With1750)) rule1750 = ReplacementRule(pattern1750, replacement1750) pattern1751 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons5, cons149, cons1002) rule1751 = ReplacementRule(pattern1751, With1751) pattern1752 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons40, cons1001) rule1752 = ReplacementRule(pattern1752, replacement1752) pattern1753 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons130, cons1002) rule1753 = ReplacementRule(pattern1753, replacement1753) pattern1754 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons65, cons1002, CustomConstraint(With1754)) rule1754 = ReplacementRule(pattern1754, replacement1754) pattern1755 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons65, cons1002) rule1755 = ReplacementRule(pattern1755, With1755) pattern1756 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons5, cons149, cons1001) rule1756 = ReplacementRule(pattern1756, replacement1756) pattern1757 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons5, cons149, cons1002, CustomConstraint(With1757)) rule1757 = ReplacementRule(pattern1757, replacement1757) pattern1758 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons29, cons50, cons127, cons19, cons5, cons149, cons1002) rule1758 = ReplacementRule(pattern1758, With1758) pattern1759 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons40, cons1003) rule1759 = ReplacementRule(pattern1759, replacement1759) pattern1760 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons130, cons1004) rule1760 = ReplacementRule(pattern1760, replacement1760) pattern1761 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons65, cons1004, CustomConstraint(With1761)) rule1761 = ReplacementRule(pattern1761, replacement1761) pattern1762 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons65, cons1004) rule1762 = ReplacementRule(pattern1762, With1762) pattern1763 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons5, cons149, cons1003) rule1763 = ReplacementRule(pattern1763, replacement1763) pattern1764 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons5, cons149, cons1004, CustomConstraint(With1764)) rule1764 = ReplacementRule(pattern1764, replacement1764) pattern1765 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons5, cons149, cons1004) rule1765 = ReplacementRule(pattern1765, With1765) pattern1766 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons40, cons1003) rule1766 = ReplacementRule(pattern1766, replacement1766) pattern1767 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons130, cons1004) rule1767 = ReplacementRule(pattern1767, replacement1767) pattern1768 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons65, cons1004, CustomConstraint(With1768)) rule1768 = ReplacementRule(pattern1768, replacement1768) pattern1769 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons65, cons1004) rule1769 = ReplacementRule(pattern1769, With1769) pattern1770 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons5, cons149, cons1003) rule1770 = ReplacementRule(pattern1770, replacement1770) pattern1771 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons5, cons149, cons1004, CustomConstraint(With1771)) rule1771 = ReplacementRule(pattern1771, replacement1771) pattern1772 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons8, cons29, cons50, cons127, cons19, cons5, cons149, cons1004) rule1772 = ReplacementRule(pattern1772, With1772) pattern1773 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons40, cons1005, cons1006) rule1773 = ReplacementRule(pattern1773, replacement1773) pattern1774 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons40, cons1005, cons1007) rule1774 = ReplacementRule(pattern1774, replacement1774) pattern1775 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons40, cons1008, cons1006) rule1775 = ReplacementRule(pattern1775, With1775) pattern1776 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons130, cons1008, cons1007) rule1776 = ReplacementRule(pattern1776, replacement1776) pattern1777 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons65, cons1008, cons1007, CustomConstraint(With1777)) rule1777 = ReplacementRule(pattern1777, replacement1777) pattern1778 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons65, cons1008, cons1007) rule1778 = ReplacementRule(pattern1778, replacement1778) pattern1779 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons149, cons1005, cons1006) rule1779 = ReplacementRule(pattern1779, replacement1779) pattern1780 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons149, cons1005, cons1007) rule1780 = ReplacementRule(pattern1780, With1780) pattern1781 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons149, cons1008, cons1006) rule1781 = ReplacementRule(pattern1781, With1781) pattern1782 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons149, cons1008, cons1007, CustomConstraint(With1782)) rule1782 = ReplacementRule(pattern1782, replacement1782) pattern1783 = Pattern(Integral((x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons5, cons149, cons1008, cons1007) rule1783 = ReplacementRule(pattern1783, With1783) pattern1784 = Pattern(Integral(u_**p_, x_), cons5, cons1009, cons1010) rule1784 = ReplacementRule(pattern1784, replacement1784) pattern1785 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons40, cons1005, cons1006) rule1785 = ReplacementRule(pattern1785, replacement1785) pattern1786 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons40, cons1005, cons1007) rule1786 = ReplacementRule(pattern1786, With1786) pattern1787 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons40, cons1008, cons1006) rule1787 = ReplacementRule(pattern1787, With1787) pattern1788 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons130, cons1008, cons1007) rule1788 = ReplacementRule(pattern1788, replacement1788) pattern1789 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons65, cons1008, cons1007, CustomConstraint(With1789)) rule1789 = ReplacementRule(pattern1789, replacement1789) pattern1790 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons65, cons1008, cons1007) rule1790 = ReplacementRule(pattern1790, replacement1790) pattern1791 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons149, cons1005, cons1006) rule1791 = ReplacementRule(pattern1791, replacement1791) pattern1792 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons149, cons1005, cons1007) rule1792 = ReplacementRule(pattern1792, With1792) pattern1793 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons149, cons1008, cons1006) rule1793 = ReplacementRule(pattern1793, With1793) pattern1794 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons149, cons1008, cons1007, CustomConstraint(With1794)) rule1794 = ReplacementRule(pattern1794, replacement1794) pattern1795 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*(x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons5, cons149, cons1008, cons1007) rule1795 = ReplacementRule(pattern1795, With1795) pattern1796 = Pattern(Integral(u_**WC('m', S(1))*v_**WC('p', S(1)), x_), cons19, cons5, cons70, cons1011, cons1012) rule1796 = ReplacementRule(pattern1796, replacement1796) pattern1797 = Pattern(Integral((f_ + x_**S(2)*WC('g', S(1)))/((d_ + x_**S(2)*WC('d', S(1)) + x_*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('a', S(1)) + x_**S(3)*WC('b', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons385, cons1013, cons1014) rule1797 = ReplacementRule(pattern1797, replacement1797) pattern1798 = Pattern(Integral((f_ + x_**S(2)*WC('g', S(1)))/((d_ + x_**S(2)*WC('d', S(1)) + x_*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('a', S(1)) + x_**S(3)*WC('b', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons385, cons1013, cons1015) rule1798 = ReplacementRule(pattern1798, replacement1798) pattern1799 = Pattern(Integral((x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1016, cons1017, cons1018) rule1799 = ReplacementRule(pattern1799, replacement1799) pattern1800 = Pattern(Integral(v_**p_, x_), cons5, cons1019, cons1020, cons1017, cons1018, CustomConstraint(With1800)) rule1800 = ReplacementRule(pattern1800, replacement1800) pattern1801 = Pattern(Integral(u_*(x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons5, cons806, cons1016, cons359) rule1801 = ReplacementRule(pattern1801, replacement1801) pattern1802 = Pattern(Integral(u_*v_**p_, x_), cons5, cons806, cons1019, cons1020, cons359, CustomConstraint(With1802)) rule1802 = ReplacementRule(pattern1802, replacement1802) pattern1803 = Pattern(Integral((a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons1021, cons248) rule1803 = ReplacementRule(pattern1803, replacement1803) pattern1804 = Pattern(Integral(v_**p_, x_), cons5, cons1019, cons1020, cons248, CustomConstraint(With1804)) rule1804 = ReplacementRule(pattern1804, replacement1804) pattern1805 = Pattern(Integral((x_**S(3)*WC('D', S(1)) + x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons36, cons37, cons38, cons1025, cons1022, cons1023, cons1024) rule1805 = ReplacementRule(pattern1805, With1805) pattern1806 = Pattern(Integral((x_**S(3)*WC('D', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons36, cons37, cons1025, cons1022, cons1023, cons1024) rule1806 = ReplacementRule(pattern1806, With1806) pattern1807 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(3)*WC('D', S(1)) + x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons36, cons37, cons38, cons1025, cons19, cons1022, cons1023, cons1024) rule1807 = ReplacementRule(pattern1807, With1807) pattern1808 = Pattern(Integral(x_**WC('m', S(1))*(x_**S(3)*WC('D', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons36, cons37, cons1025, cons19, cons1022, cons1023, cons1024) rule1808 = ReplacementRule(pattern1808, With1808) pattern1809 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1026, cons1027, cons1028) rule1809 = ReplacementRule(pattern1809, With1809) pattern1810 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons1029, cons1030, cons1031) rule1810 = ReplacementRule(pattern1810, With1810) pattern1811 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1026, cons1027, cons1032) rule1811 = ReplacementRule(pattern1811, With1811) pattern1812 = Pattern(Integral((x_**S(2)*WC('C', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons38, cons1029, cons1030, cons1033) rule1812 = ReplacementRule(pattern1812, With1812) pattern1813 = Pattern(Integral((x_**S(3)*WC('D', S(1)) + x_**S(2)*WC('C', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons38, cons1025, cons1034, cons1035) rule1813 = ReplacementRule(pattern1813, replacement1813) pattern1814 = Pattern(Integral((x_**S(3)*WC('D', S(1)) + x_*WC('B', S(1)) + WC('A', S(0)))/(a_ + x_**S(4)*WC('e', S(1)) + x_**S(3)*WC('d', S(1)) + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons1025, cons1036, cons1037) rule1814 = ReplacementRule(pattern1814, replacement1814) pattern1815 = Pattern(Integral(u_/(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1)) + sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1038) rule1815 = ReplacementRule(pattern1815, replacement1815) pattern1816 = Pattern(Integral(u_/(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1)) + sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons73, cons1039) rule1816 = ReplacementRule(pattern1816, replacement1816) pattern1817 = Pattern(Integral(u_/(sqrt(x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1)) + sqrt(x_*WC('d', S(1)) + WC('c', S(0)))*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1040, cons1041) rule1817 = ReplacementRule(pattern1817, replacement1817) pattern1818 = Pattern(Integral(WC('u', S(1))/(x_**WC('n', S(1))*WC('d', S(1)) + sqrt(x_**WC('p', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons4, cons1042, cons1043) rule1818 = ReplacementRule(pattern1818, replacement1818) pattern1819 = Pattern(Integral(x_**WC('m', S(1))/(x_**WC('n', S(1))*WC('d', S(1)) + sqrt(x_**WC('p', S(1))*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1042, cons1044) rule1819 = ReplacementRule(pattern1819, replacement1819) pattern1820 = Pattern(Integral(S(1)/((a_ + x_**S(3)*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons470) rule1820 = ReplacementRule(pattern1820, With1820) pattern1821 = Pattern(Integral(S(1)/((a_ + x_**S(3)*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons29, cons127, cons470) rule1821 = ReplacementRule(pattern1821, With1821) pattern1822 = Pattern(Integral(S(1)/((a_ + x_**S(3)*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons29, cons50, cons127, cons471) rule1822 = ReplacementRule(pattern1822, With1822) pattern1823 = Pattern(Integral(S(1)/((a_ + x_**S(3)*WC('b', S(1)))*sqrt(x_**S(2)*WC('f', S(1)) + WC('d', S(0)))), x_), cons2, cons3, cons29, cons127, cons471) rule1823 = ReplacementRule(pattern1823, With1823) pattern1824 = Pattern(Integral(S(1)/((d_ + x_*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1045) rule1824 = ReplacementRule(pattern1824, replacement1824) pattern1825 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons299) rule1825 = ReplacementRule(pattern1825, replacement1825) pattern1826 = Pattern(Integral(S(1)/((d_ + x_*WC('e', S(1)))**S(2)*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1046, cons1047) rule1826 = ReplacementRule(pattern1826, replacement1826) pattern1827 = Pattern(Integral(S(1)/((d_ + x_*WC('e', S(1)))**S(2)*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1046, cons1048) rule1827 = ReplacementRule(pattern1827, replacement1827) pattern1828 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_*WC('e', S(1)))**S(2)), x_), cons2, cons8, cons29, cons50, cons1049) rule1828 = ReplacementRule(pattern1828, replacement1828) pattern1829 = Pattern(Integral((A_ + x_**S(2)*WC('B', S(1)))/((d_ + x_**S(2)*WC('e', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons36, cons37, cons1050, cons707) rule1829 = ReplacementRule(pattern1829, replacement1829) pattern1830 = Pattern(Integral((A_ + x_**S(2)*WC('B', S(1)))/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(2)*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons36, cons37, cons1050, cons707) rule1830 = ReplacementRule(pattern1830, replacement1830) pattern1831 = Pattern(Integral((A_ + x_**S(4)*WC('B', S(1)))/(sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))*(d_ + x_**S(4)*WC('f', S(1)) + x_**S(2)*WC('e', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons384, cons1051) rule1831 = ReplacementRule(pattern1831, replacement1831) pattern1832 = Pattern(Integral((A_ + x_**S(4)*WC('B', S(1)))/(sqrt(a_ + x_**S(4)*WC('c', S(1)))*(d_ + x_**S(4)*WC('f', S(1)) + x_**S(2)*WC('e', S(1)))), x_), cons2, cons8, cons29, cons50, cons127, cons36, cons37, cons384, cons1051) rule1832 = ReplacementRule(pattern1832, replacement1832) pattern1833 = Pattern(Integral((A_ + x_**S(4)*WC('B', S(1)))/((d_ + x_**S(4)*WC('f', S(1)))*sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))), x_), cons2, cons3, cons8, cons29, cons127, cons36, cons37, cons384, cons1051) rule1833 = ReplacementRule(pattern1833, replacement1833) pattern1834 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))/(d_ + x_**S(4)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1052, cons699) rule1834 = ReplacementRule(pattern1834, replacement1834) pattern1835 = Pattern(Integral(sqrt(a_ + x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)))/(d_ + x_**S(4)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons1052, cons711) rule1835 = ReplacementRule(pattern1835, With1835) pattern1836 = Pattern(Integral(S(1)/((a_ + x_*WC('b', S(1)))*sqrt(c_ + x_**S(2)*WC('d', S(1)))*sqrt(e_ + x_**S(2)*WC('f', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons155) rule1836 = ReplacementRule(pattern1836, replacement1836) pattern1837 = Pattern(Integral((x_*WC('h', S(1)) + WC('g', S(0)))*sqrt(x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons1053, cons1054) rule1837 = ReplacementRule(pattern1837, replacement1837) pattern1838 = Pattern(Integral((u_ + (sqrt(v_)*WC('k', S(1)) + WC('j', S(0)))*WC('f', S(1)))**WC('n', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1)), x_), cons127, cons210, cons211, cons798, cons799, cons19, cons4, cons70, cons820, cons1055, cons1056) rule1838 = ReplacementRule(pattern1838, replacement1838) pattern1839 = Pattern(Integral(((x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0)))**n_*WC('h', S(1)) + WC('g', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons1057, cons40) rule1839 = ReplacementRule(pattern1839, replacement1839) pattern1840 = Pattern(Integral(((x_*WC('e', S(1)) + sqrt(a_ + x_**S(2)*WC('c', S(1)))*WC('f', S(1)) + WC('d', S(0)))**n_*WC('h', S(1)) + WC('g', S(0)))**WC('p', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons211, cons4, cons1057, cons40) rule1840 = ReplacementRule(pattern1840, replacement1840) pattern1841 = Pattern(Integral(((u_ + sqrt(v_)*WC('f', S(1)))**n_*WC('h', S(1)) + WC('g', S(0)))**WC('p', S(1)), x_), cons127, cons210, cons211, cons4, cons70, cons820, cons821, cons1058, cons40) rule1841 = ReplacementRule(pattern1841, replacement1841) pattern1842 = Pattern(Integral((x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + WC('a', S(0)))*WC('f', S(1)))**WC('n', S(1))*(x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1)), x_), cons2, cons8, cons50, cons127, cons210, cons211, cons4, cons1057, cons20) rule1842 = ReplacementRule(pattern1842, replacement1842) pattern1843 = Pattern(Integral(x_**WC('p', S(1))*(g_ + x_**S(2)*WC('i', S(1)))**WC('m', S(1))*(x_*WC('e', S(1)) + sqrt(a_ + x_**S(2)*WC('c', S(1)))*WC('f', S(1)))**WC('n', S(1)), x_), cons2, cons8, cons50, cons127, cons210, cons226, cons4, cons1057, cons1059, cons1060, cons1061) rule1843 = ReplacementRule(pattern1843, replacement1843) pattern1844 = Pattern(Integral((x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0)))**WC('n', S(1))*(x_**S(2)*WC('i', S(1)) + x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons4, cons1057, cons1059, cons1062, cons517, cons1061) rule1844 = ReplacementRule(pattern1844, replacement1844) pattern1845 = Pattern(Integral((g_ + x_**S(2)*WC('i', S(1)))**WC('m', S(1))*(x_*WC('e', S(1)) + sqrt(a_ + x_**S(2)*WC('c', S(1)))*WC('f', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons226, cons4, cons1057, cons1059, cons517, cons1061) rule1845 = ReplacementRule(pattern1845, replacement1845) pattern1846 = Pattern(Integral((x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0)))**WC('n', S(1))*(x_**S(2)*WC('i', S(1)) + x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons4, cons1057, cons1059, cons1062, cons75, cons1063) rule1846 = ReplacementRule(pattern1846, replacement1846) pattern1847 = Pattern(Integral((g_ + x_**S(2)*WC('i', S(1)))**WC('m', S(1))*(x_*WC('e', S(1)) + sqrt(a_ + x_**S(2)*WC('c', S(1)))*WC('f', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons226, cons4, cons1057, cons1059, cons75, cons1063) rule1847 = ReplacementRule(pattern1847, replacement1847) pattern1848 = Pattern(Integral((x_*WC('e', S(1)) + sqrt(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))*WC('f', S(1)) + WC('d', S(0)))**WC('n', S(1))*(x_**S(2)*WC('i', S(1)) + x_*WC('h', S(1)) + WC('g', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons4, cons1057, cons1059, cons1062, cons953, cons1063) rule1848 = ReplacementRule(pattern1848, replacement1848) pattern1849 = Pattern(Integral((g_ + x_**S(2)*WC('i', S(1)))**WC('m', S(1))*(x_*WC('e', S(1)) + sqrt(a_ + x_**S(2)*WC('c', S(1)))*WC('f', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons226, cons4, cons1057, cons1059, cons953, cons1063) rule1849 = ReplacementRule(pattern1849, replacement1849) pattern1850 = Pattern(Integral(w_**WC('m', S(1))*(u_ + (sqrt(v_)*WC('k', S(1)) + WC('j', S(0)))*WC('f', S(1)))**WC('n', S(1)), x_), cons127, cons798, cons799, cons19, cons4, cons70, cons1064, cons1065, cons1066) rule1850 = ReplacementRule(pattern1850, replacement1850) pattern1851 = Pattern(Integral(S(1)/((a_ + x_**WC('n', S(1))*WC('b', S(1)))*sqrt(x_**S(2)*WC('c', S(1)) + (a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons4, cons1067) rule1851 = ReplacementRule(pattern1851, replacement1851) pattern1852 = Pattern(Integral(sqrt(a_ + sqrt(c_ + x_**S(2)*WC('d', S(1)))*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons1068) rule1852 = ReplacementRule(pattern1852, replacement1852) pattern1853 = Pattern(Integral(sqrt(x_**S(2)*WC('a', S(1)) + x_*sqrt(c_ + x_**S(2)*WC('d', S(1)))*WC('b', S(1)))/(x_*sqrt(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons1069, cons1070) rule1853 = ReplacementRule(pattern1853, replacement1853) pattern1854 = Pattern(Integral(sqrt(x_*(x_*WC('a', S(1)) + sqrt(c_ + x_**S(2)*WC('d', S(1)))*WC('b', S(1)))*WC('e', S(1)))/(x_*sqrt(c_ + x_**S(2)*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons1069, cons1071) rule1854 = ReplacementRule(pattern1854, replacement1854) pattern1855 = Pattern(Integral(sqrt(x_**S(2)*WC('c', S(1)) + sqrt(a_ + x_**S(4)*WC('b', S(1)))*WC('d', S(1)))/sqrt(a_ + x_**S(4)*WC('b', S(1))), x_), cons2, cons3, cons8, cons29, cons1072) rule1855 = ReplacementRule(pattern1855, replacement1855) pattern1856 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sqrt(x_**S(2)*WC('b', S(1)) + sqrt(a_ + x_**S(4)*WC('e', S(1))))/sqrt(a_ + x_**S(4)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons19, cons1073, cons45) rule1856 = ReplacementRule(pattern1856, replacement1856) pattern1857 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons483, cons481) rule1857 = ReplacementRule(pattern1857, With1857) pattern1858 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons483, cons482) rule1858 = ReplacementRule(pattern1858, With1858) pattern1859 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons484, cons481) rule1859 = ReplacementRule(pattern1859, With1859) pattern1860 = Pattern(Integral(S(1)/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons484, cons482) rule1860 = ReplacementRule(pattern1860, With1860) pattern1861 = Pattern(Integral((e_ + x_*WC('f', S(1)))/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons483, cons481, CustomConstraint(With1861)) rule1861 = ReplacementRule(pattern1861, replacement1861) pattern1862 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons483, cons481, CustomConstraint(With1862)) rule1862 = ReplacementRule(pattern1862, replacement1862) pattern1863 = Pattern(Integral((e_ + x_*WC('f', S(1)))/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons483, cons482, CustomConstraint(With1863)) rule1863 = ReplacementRule(pattern1863, replacement1863) pattern1864 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons483, cons482, CustomConstraint(With1864)) rule1864 = ReplacementRule(pattern1864, replacement1864) pattern1865 = Pattern(Integral((e_ + x_*WC('f', S(1)))/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons484, cons481, CustomConstraint(With1865)) rule1865 = ReplacementRule(pattern1865, replacement1865) pattern1866 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons484, cons481, CustomConstraint(With1866)) rule1866 = ReplacementRule(pattern1866, replacement1866) pattern1867 = Pattern(Integral((e_ + x_*WC('f', S(1)))/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons484, cons482, CustomConstraint(With1867)) rule1867 = ReplacementRule(pattern1867, replacement1867) pattern1868 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))/(sqrt(a_ + x_**S(3)*WC('b', S(1)))*(c_ + x_*WC('d', S(1)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons484, cons482, CustomConstraint(With1868)) rule1868 = ReplacementRule(pattern1868, replacement1868) pattern1869 = Pattern(Integral(x_**WC('m', S(1))/(c_ + x_**n_*WC('d', S(1)) + sqrt(a_ + x_**n_*WC('b', S(1)))*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons4, cons1074, cons502) rule1869 = ReplacementRule(pattern1869, replacement1869) pattern1870 = Pattern(Integral(WC('u', S(1))/(c_ + x_**n_*WC('d', S(1)) + sqrt(a_ + x_**n_*WC('b', S(1)))*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons4, cons1074) rule1870 = ReplacementRule(pattern1870, replacement1870) pattern1871 = Pattern(Integral((A_ + x_**n_*WC('B', S(1)))/(a_ + x_**S(2)*WC('b', S(1)) + x_**n2_*WC('d', S(1)) + x_**n_*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons4, cons48, cons965, cons1075, cons1076) rule1871 = ReplacementRule(pattern1871, replacement1871) pattern1872 = Pattern(Integral(x_**WC('m', S(1))*(A_ + x_**WC('n', S(1))*WC('B', S(1)))/(a_ + x_**n2_*WC('d', S(1)) + x_**WC('k', S(1))*WC('b', S(1)) + x_**WC('n', S(1))*WC('c', S(1))), x_), cons2, cons3, cons8, cons29, cons36, cons37, cons19, cons4, cons48, cons1077, cons1078, cons1079) rule1872 = ReplacementRule(pattern1872, replacement1872) pattern1873 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_*(d_ + g_*x_**n3_ + x_**n2_*WC('f', S(1)) + x_**n_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons48, cons933, cons228, cons704) rule1873 = ReplacementRule(pattern1873, replacement1873) pattern1874 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_*(d_ + x_**n2_*WC('f', S(1)) + x_**n_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons48, cons228, cons704) rule1874 = ReplacementRule(pattern1874, replacement1874) pattern1875 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_*(d_ + g_*x_**n3_ + x_**n_*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons210, cons4, cons48, cons933, cons228, cons704) rule1875 = ReplacementRule(pattern1875, replacement1875) pattern1876 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_*(d_ + g_*x_**n3_ + x_**n2_*WC('f', S(1))), x_), cons2, cons3, cons8, cons29, cons127, cons210, cons4, cons48, cons933, cons228, cons704) rule1876 = ReplacementRule(pattern1876, replacement1876) pattern1877 = Pattern(Integral((d_ + x_**n2_*WC('f', S(1)))*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons4, cons48, cons228, cons704) rule1877 = ReplacementRule(pattern1877, replacement1877) pattern1878 = Pattern(Integral((d_ + g_*x_**n3_)*(a_ + x_**n2_*WC('c', S(1)) + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons8, cons29, cons210, cons4, cons48, cons933, cons228, cons704) rule1878 = ReplacementRule(pattern1878, replacement1878) pattern1879 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + g_*x_**n3_ + x_**n2_*WC('f', S(1)) + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons4, cons48, cons933, cons704) rule1879 = ReplacementRule(pattern1879, replacement1879) pattern1880 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + x_**n2_*WC('f', S(1)) + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons4, cons48, cons704) rule1880 = ReplacementRule(pattern1880, replacement1880) pattern1881 = Pattern(Integral((a_ + x_**n2_*WC('c', S(1)))**p_*(d_ + g_*x_**n3_ + x_**n_*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons210, cons4, cons48, cons933, cons704) rule1881 = ReplacementRule(pattern1881, replacement1881) pattern1882 = Pattern(Integral((x_**S(4)*WC('c', S(1)) + x_**S(2)*WC('b', S(1)) + WC('a', S(0)))/(d_ + x_**S(6)*WC('g', S(1)) + x_**S(4)*WC('f', S(1)) + x_**S(2)*WC('e', S(1))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1080, cons1081, cons1082, cons1083, cons1084, cons1085) rule1882 = ReplacementRule(pattern1882, With1882) pattern1883 = Pattern(Integral((x_**S(4)*WC('c', S(1)) + WC('a', S(0)))/(d_ + x_**S(6)*WC('g', S(1)) + x_**S(4)*WC('f', S(1)) + x_**S(2)*WC('e', S(1))), x_), cons2, cons8, cons29, cons50, cons127, cons210, cons1086, cons1087, cons1082, cons1088) rule1883 = ReplacementRule(pattern1883, With1883) pattern1884 = Pattern(Integral(u_*v_**p_, x_), cons13, cons139, cons806, cons1019, cons1089, cons1090, cons1091, CustomConstraint(With1884)) rule1884 = ReplacementRule(pattern1884, replacement1884) return [rule1476, rule1477, rule1478, rule1479, rule1480, rule1481, rule1482, rule1483, rule1484, rule1485, rule1486, rule1487, rule1488, rule1489, rule1490, rule1491, rule1492, rule1493, rule1494, rule1495, rule1496, rule1497, rule1498, rule1499, rule1500, rule1501, rule1502, rule1503, rule1504, rule1505, rule1506, rule1507, rule1508, rule1509, rule1510, rule1511, rule1512, rule1513, rule1514, rule1515, rule1516, rule1517, rule1518, rule1519, rule1520, rule1521, rule1522, rule1523, rule1524, rule1525, rule1526, rule1527, rule1528, rule1529, rule1530, rule1531, rule1532, rule1533, rule1534, rule1535, rule1536, rule1537, rule1538, rule1539, rule1540, rule1541, rule1542, rule1543, rule1544, rule1545, rule1546, rule1547, rule1548, rule1549, rule1550, rule1551, rule1552, rule1553, rule1554, rule1555, rule1556, rule1557, rule1558, rule1559, rule1560, rule1561, rule1562, rule1563, rule1564, rule1565, rule1566, rule1567, rule1568, rule1569, rule1570, rule1571, rule1572, rule1573, rule1574, rule1575, rule1576, rule1577, rule1578, rule1579, rule1580, rule1581, rule1582, rule1583, rule1584, rule1585, rule1586, rule1587, rule1588, rule1589, rule1590, rule1591, rule1592, rule1593, rule1594, rule1595, rule1596, rule1597, rule1598, rule1599, rule1600, rule1601, rule1602, rule1603, rule1604, rule1605, rule1606, rule1607, rule1608, rule1609, rule1610, rule1611, rule1612, rule1613, rule1614, rule1615, rule1616, rule1617, rule1618, rule1619, rule1620, rule1621, rule1622, rule1623, rule1624, rule1625, rule1626, rule1627, rule1628, rule1629, rule1630, rule1631, rule1632, rule1633, rule1634, rule1635, rule1636, rule1637, rule1638, rule1639, rule1640, rule1641, rule1642, rule1643, rule1644, rule1645, rule1646, rule1647, rule1648, rule1649, rule1650, rule1651, rule1652, rule1653, rule1654, rule1655, rule1656, rule1657, rule1658, rule1659, rule1660, rule1661, rule1662, rule1663, rule1664, rule1665, rule1666, rule1667, rule1668, rule1669, rule1670, rule1671, rule1672, rule1673, rule1674, rule1675, rule1676, rule1677, rule1678, rule1679, rule1680, rule1681, rule1682, rule1683, rule1684, rule1685, rule1686, rule1687, rule1688, rule1689, rule1690, rule1691, rule1692, rule1693, rule1694, rule1695, rule1696, rule1697, rule1698, rule1699, rule1700, rule1701, rule1702, rule1703, rule1704, rule1705, rule1706, rule1707, rule1708, rule1709, rule1710, rule1711, rule1712, rule1713, rule1714, rule1715, rule1716, rule1717, rule1718, rule1719, rule1720, rule1721, rule1722, rule1723, rule1724, rule1725, rule1726, rule1727, rule1728, rule1729, rule1730, rule1731, rule1732, rule1733, rule1734, rule1735, rule1736, rule1737, rule1738, rule1739, rule1740, rule1741, rule1742, rule1743, rule1744, rule1745, rule1746, rule1747, rule1748, rule1749, rule1750, rule1751, rule1752, rule1753, rule1754, rule1755, rule1756, rule1757, rule1758, rule1759, rule1760, rule1761, rule1762, rule1763, rule1764, rule1765, rule1766, rule1767, rule1768, rule1769, rule1770, rule1771, rule1772, rule1773, rule1774, rule1775, rule1776, rule1777, rule1778, rule1779, rule1780, rule1781, rule1782, rule1783, rule1784, rule1785, rule1786, rule1787, rule1788, rule1789, rule1790, rule1791, rule1792, rule1793, rule1794, rule1795, rule1796, rule1797, rule1798, rule1799, rule1800, rule1801, rule1802, rule1803, rule1804, rule1805, rule1806, rule1807, rule1808, rule1809, rule1810, rule1811, rule1812, rule1813, rule1814, rule1815, rule1816, rule1817, rule1818, rule1819, rule1820, rule1821, rule1822, rule1823, rule1824, rule1825, rule1826, rule1827, rule1828, rule1829, rule1830, rule1831, rule1832, rule1833, rule1834, rule1835, rule1836, rule1837, rule1838, rule1839, rule1840, rule1841, rule1842, rule1843, rule1844, rule1845, rule1846, rule1847, rule1848, rule1849, rule1850, rule1851, rule1852, rule1853, rule1854, rule1855, rule1856, rule1857, rule1858, rule1859, rule1860, rule1861, rule1862, rule1863, rule1864, rule1865, rule1866, rule1867, rule1868, rule1869, rule1870, rule1871, rule1872, rule1873, rule1874, rule1875, rule1876, rule1877, rule1878, rule1879, rule1880, rule1881, rule1882, rule1883, rule1884, ] def replacement1476(a, b, c, n, p, q, x): return Dist(x*(c*x**n)**(-S(1)/n), Subst(Int((a + b*x**(n*q))**p, x), x, (c*x**n)**(S(1)/n)), x) def replacement1477(a, b, c, m, n, p, q, x): return Dist(x**(m + S(1))*(c*x**n)**(-(m + S(1))/n), Subst(Int(x**m*(a + b*x**(n*q))**p, x), x, (c*x**n)**(S(1)/n)), x) def replacement1478(a, b, c, d, e, f, m, n, p, q, r, s, x): return Dist((e*(a + b*x**n)**r)**p*(f*(c + d*x**n)**s)**q*(a + b*x**n)**(-p*r)*(c + d*x**n)**(-q*s), Int(x**m*(a + b*x**n)**(p*r)*(c + d*x**n)**(q*s), x), x) def replacement1479(a, b, c, d, e, n, p, u, x): return Dist((b*e/d)**p, Int(u, x), x) def replacement1480(a, b, c, d, e, n, p, u, x): return Int(u*(e*(a + b*x**n))**p*(c + d*x**n)**(-p), x) def With1481(a, b, c, d, e, n, p, x): q = Denominator(p) return Dist(e*q*(-a*d + b*c)/n, Subst(Int(x**(q*(p + S(1)) + S(-1))*(-a*e + c*x**q)**(S(-1) + S(1)/n)*(b*e - d*x**q)**(S(-1) - S(1)/n), x), x, (e*(a + b*x**n)/(c + d*x**n))**(S(1)/q)), x) def With1482(a, b, c, d, e, m, n, p, x): q = Denominator(p) return Dist(e*q*(-a*d + b*c)/n, Subst(Int(x**(q*(p + S(1)) + S(-1))*(-a*e + c*x**q)**(S(-1) + (m + S(1))/n)*(b*e - d*x**q)**(S(-1) - (m + S(1))/n), x), x, (e*(a + b*x**n)/(c + d*x**n))**(S(1)/q)), x) def With1483(a, b, c, d, e, n, p, r, u, x): q = Denominator(p) return Dist(e*q*(-a*d + b*c)/n, Subst(Int(SimplifyIntegrand(x**(q*(p + S(1)) + S(-1))*(-a*e + c*x**q)**(S(-1) + S(1)/n)*(b*e - d*x**q)**(S(-1) - S(1)/n)*ReplaceAll(u, Rule(x, (-a*e + c*x**q)**(S(1)/n)*(b*e - d*x**q)**(-S(1)/n)))**r, x), x), x, (e*(a + b*x**n)/(c + d*x**n))**(S(1)/q)), x) def With1484(a, b, c, d, e, m, n, p, r, u, x): q = Denominator(p) return Dist(e*q*(-a*d + b*c)/n, Subst(Int(SimplifyIntegrand(x**(q*(p + S(1)) + S(-1))*(-a*e + c*x**q)**(S(-1) + (m + S(1))/n)*(b*e - d*x**q)**(S(-1) - (m + S(1))/n)*ReplaceAll(u, Rule(x, (-a*e + c*x**q)**(S(1)/n)*(b*e - d*x**q)**(-S(1)/n)))**r, x), x), x, (e*(a + b*x**n)/(c + d*x**n))**(S(1)/q)), x) def replacement1485(a, b, c, n, p, x): return -Dist(c, Subst(Int((a + b*x**n)**p/x**S(2), x), x, c/x), x) def replacement1486(a, b, c, m, n, p, x): return -Dist(c**(m + S(1)), Subst(Int(x**(-m + S(-2))*(a + b*x**n)**p, x), x, c/x), x) def replacement1487(a, b, c, d, m, n, p, x): return -Dist(c*(c/x)**m*(d*x)**m, Subst(Int(x**(-m + S(-2))*(a + b*x**n)**p, x), x, c/x), x) def replacement1488(a, b, c, d, n, n2, p, x): return -Dist(d, Subst(Int((a + b*x**n + c*x**(S(2)*n))**p/x**S(2), x), x, d/x), x) def replacement1489(a, b, c, d, m, n, n2, p, x): return -Dist(d**(m + S(1)), Subst(Int(x**(-m + S(-2))*(a + b*x**n + c*x**(S(2)*n))**p, x), x, d/x), x) def replacement1490(a, b, c, d, e, m, n, n2, p, x): return -Dist(d*(d/x)**m*(e*x)**m, Subst(Int(x**(-m + S(-2))*(a + b*x**n + c*x**(S(2)*n))**p, x), x, d/x), x) def replacement1491(a, b, c, d, n, n2, p, x): return -Dist(d, Subst(Int((a + b*x**n + c*d**(-S(2)*n)*x**(S(2)*n))**p/x**S(2), x), x, d/x), x) def replacement1492(a, b, c, d, m, n, n2, p, x): return -Dist(d**(m + S(1)), Subst(Int(x**(-m + S(-2))*(a + b*x**n + c*d**(-S(2)*n)*x**(S(2)*n))**p, x), x, d/x), x) def replacement1493(a, b, c, d, e, m, n, n2, p, x): return -Dist(d*(d/x)**m*(e*x)**m, Subst(Int(x**(-m + S(-2))*(a + b*x**n + c*d**(-S(2)*n)*x**(S(2)*n))**p, x), x, d/x), x) def replacement1494(m, u, x): return Int(ExpandToSum(u, x)**m, x) def replacement1495(m, n, u, v, x): return Int(ExpandToSum(u, x)**m*ExpandToSum(v, x)**n, x) def replacement1496(m, n, p, u, v, w, x): return Int(ExpandToSum(u, x)**m*ExpandToSum(v, x)**n*ExpandToSum(w, x)**p, x) def replacement1497(m, n, p, q, u, v, w, x, z): return Int(ExpandToSum(u, x)**m*ExpandToSum(v, x)**n*ExpandToSum(w, x)**p*ExpandToSum(z, x)**q, x) def replacement1498(p, u, x): return Int(ExpandToSum(u, x)**p, x) def replacement1499(m, p, u, v, x): return Int(ExpandToSum(u, x)**m*ExpandToSum(v, x)**p, x) def replacement1500(m, n, p, u, v, w, x): return Int(ExpandToSum(u, x)**m*ExpandToSum(v, x)**n*ExpandToSum(w, x)**p, x) def replacement1501(p, q, u, v, x): return Int(ExpandToSum(u, x)**p*ExpandToSum(v, x)**q, x) def replacement1502(p, u, x): return Int(ExpandToSum(u, x)**p, x) def replacement1503(c, m, p, u, x): return Int((c*x)**m*ExpandToSum(u, x)**p, x) def replacement1504(p, q, u, v, x): return Int(ExpandToSum(u, x)**p*ExpandToSum(v, x)**q, x) def replacement1505(m, p, q, u, v, x): return Int(x**m*ExpandToSum(u, x)**p*ExpandToSum(v, x)**q, x) def replacement1506(m, p, q, u, v, w, x): return Int(ExpandToSum(u, x)**m*ExpandToSum(v, x)**p*ExpandToSum(w, x)**q, x) def replacement1507(m, p, q, r, u, v, x, z): return Int(x**m*ExpandToSum(u, x)**p*ExpandToSum(v, x)**q*ExpandToSum(z, x)**r, x) def replacement1508(p, u, x): return Int(ExpandToSum(u, x)**p, x) def replacement1509(m, p, u, x): return Int(x**m*ExpandToSum(u, x)**p, x) def replacement1510(p, u, x): return Int(ExpandToSum(u, x)**p, x) def replacement1511(d, m, p, u, x): return Int((d*x)**m*ExpandToSum(u, x)**p, x) def replacement1512(p, q, u, v, x): return Int(ExpandToSum(u, x)**q*ExpandToSum(v, x)**p, x) def replacement1513(p, q, u, v, x): return Int(ExpandToSum(u, x)**q*ExpandToSum(v, x)**p, x) def replacement1514(m, p, q, u, x, z): return Int(x**m*ExpandToSum(u, x)**p*ExpandToSum(z, x)**q, x) def replacement1515(m, p, q, u, x, z): return Int(x**m*ExpandToSum(u, x)**p*ExpandToSum(z, x)**q, x) def replacement1516(p, u, x): return Int(ExpandToSum(u, x)**p, x) def replacement1517(m, p, u, x): return Int(x**m*ExpandToSum(u, x)**p, x) def replacement1518(p, u, x, z): return Int(ExpandToSum(u, x)**p*ExpandToSum(z, x), x) def replacement1519(m, p, u, x, z): return Int(x**m*ExpandToSum(u, x)**p*ExpandToSum(z, x), x) def replacement1520(a, c, e, f, g, h, m, n, q, r, x): return -Simp((S(2)*a*g + S(4)*a*h*x**(n/S(4)) - S(2)*c*f*x**(n/S(2)))/(a*c*n*sqrt(a + c*x**n)), x) def replacement1521(a, c, d, e, f, g, h, m, n, q, r, x): return Dist(x**(-m)*(d*x)**m, Int(x**m*(e + f*x**(n/S(4)) + g*x**(S(3)*n/S(4)) + h*x**n)/(a + c*x**n)**(S(3)/2), x), x) def With1522(Pq, a, b, c, m, p, x): n = Denominator(p) return Dist(n/b, Subst(Int(x**(n*p + n + S(-1))*(-a*c/b + c*x**n/b)**m*ReplaceAll(Pq, Rule(x, -a/b + x**n/b)), x), x, (a + b*x)**(S(1)/n)), x) def replacement1523(Pq, a, b, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*x**(n/(m + S(1))))**p*SubstFor(x**(m + S(1)), Pq, x), x), x, x**(m + S(1))), x) def replacement1524(Pq, a, b, n, p, x): return Int((a + b*x**n)**p*ExpandToSum(Pq - x**(n + S(-1))*Coeff(Pq, x, n + S(-1)), x), x) + Simp((a + b*x**n)**(p + S(1))*Coeff(Pq, x, n + S(-1))/(b*n*(p + S(1))), x) def replacement1525(Pq, a, b, c, m, n, p, x): return Int(ExpandIntegrand(Pq*(c*x)**m*(a + b*x**n)**p, x), x) def replacement1526(Pq, a, b, n, p, x): return Int(ExpandIntegrand(Pq*(a + b*x**n)**p, x), x) def replacement1527(Pq, a, b, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b*x)**p*SubstFor(x**n, Pq, x), x), x, x**n), x) def replacement1528(Pq, a, b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(Pq*x**m*(a + b*x**n)**p, x), x) def replacement1529(Pq, a, b, m, n, p, x): return -Dist(S(1)/(b*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*D(Pq, x), x), x) + Simp(Pq*(a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement1530(Pq, a, b, d, m, n, p, x): return Dist(S(1)/d, Int((d*x)**(m + S(1))*(a + b*x**n)**p*ExpandToSum(Pq/x, x), x), x) def replacement1531(Pq, a, b, n, p, x): return Int(x*(a + b*x**n)**p*ExpandToSum(Pq/x, x), x) def With1532(Pq, a, b, m, n, p, x): u = IntHide(Pq*x**m, x) return -Dist(b*n*p, Int(x**(m + n)*(a + b*x**n)**(p + S(-1))*ExpandToSum(u*x**(-m + S(-1)), x), x), x) + Simp(u*(a + b*x**n)**p, x) def With1533(Pq, a, b, c, m, n, p, x): q = Expon(Pq, x) i = Symbol('i') return Dist(a*n*p, Int((c*x)**m*(a + b*x**n)**(p + S(-1))*Sum_doit(x**i*Coeff(Pq, x, i)/(i + m + n*p + S(1)), List(i, S(0), q)), x), x) + Simp((c*x)**m*(a + b*x**n)**p*Sum_doit(x**(i + S(1))*Coeff(Pq, x, i)/(i + m + n*p + S(1)), List(i, S(0), q)), x) def With1534(Pq, a, b, n, p, x): q = Expon(Pq, x) i = Symbol('i') return Dist(a*n*p, Int((a + b*x**n)**(p + S(-1))*Sum_doit(x**i*Coeff(Pq, x, i)/(i + n*p + S(1)), List(i, S(0), q)), x), x) + Simp((a + b*x**n)**p*Sum_doit(x**(i + S(1))*Coeff(Pq, x, i)/(i + n*p + S(1)), List(i, S(0), q)), x) def With1535(Pq, a, b, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) i = Symbol('i') if Equal(q, n + S(-1)): return True return False def replacement1535(Pq, a, b, n, p, x): q = Expon(Pq, x) i = Symbol('i') return Dist(S(1)/(a*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*Sum_doit(x**i*(i + n*(p + S(1)) + S(1))*Coeff(Pq, x, i), List(i, S(0), q + S(-1))), x), x) + Simp((a + b*x**n)**(p + S(1))*(a*Coeff(Pq, x, q) - b*x*ExpandToSum(Pq - x**q*Coeff(Pq, x, q), x))/(a*b*n*(p + S(1))), x) def replacement1536(Pq, a, b, n, p, x): return Dist(S(1)/(a*n*(p + S(1))), Int((a + b*x**n)**(p + S(1))*ExpandToSum(Pq*n*(p + S(1)) + D(Pq*x, x), x), x), x) - Simp(Pq*x*(a + b*x**n)**(p + S(1))/(a*n*(p + S(1))), x) def replacement1537(a, b, d, e, f, g, x): return -Simp((S(2)*a*f + S(4)*a*g*x - S(2)*b*e*x**S(2))/(S(4)*a*b*sqrt(a + b*x**S(4))), x) def replacement1538(a, b, d, f, g, x): return -Simp((f + S(2)*g*x)/(S(2)*b*sqrt(a + b*x**S(4))), x) def replacement1539(a, b, d, e, g, x): return -Simp(x*(S(2)*a*g - b*e*x)/(S(2)*a*b*sqrt(a + b*x**S(4))), x) def replacement1540(a, b, e, f, h, x): return -Simp((f - S(2)*h*x**S(3))/(S(2)*b*sqrt(a + b*x**S(4))), x) def replacement1541(a, b, e, h, x): return Simp(h*x**S(3)/(b*sqrt(a + b*x**S(4))), x) def replacement1542(a, b, d, e, f, g, h, x): return -Simp((a*f - S(2)*a*h*x**S(3) - S(2)*b*d*x)/(S(2)*a*b*sqrt(a + b*x**S(4))), x) def replacement1543(a, b, d, e, g, h, x): return Simp(x*(a*h*x**S(2) + b*d)/(a*b*sqrt(a + b*x**S(4))), x) def With1544(Pq, a, b, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Q = PolynomialQuotient(Pq*b**(Floor((q + S(-1))/n) + S(1)), a + b*x**n, x) R = PolynomialRemainder(Pq*b**(Floor((q + S(-1))/n) + S(1)), a + b*x**n, x) if GreaterEqual(q, n): return True return False def replacement1544(Pq, a, b, n, p, x): q = Expon(Pq, x) Q = PolynomialQuotient(Pq*b**(Floor((q + S(-1))/n) + S(1)), a + b*x**n, x) R = PolynomialRemainder(Pq*b**(Floor((q + S(-1))/n) + S(1)), a + b*x**n, x) return Dist(b**(-Floor((q - 1)/n) - 1)/(a*n*(p + 1)), Int((a + b*x**n)**(p + 1)*ExpandToSum(Q*a*n*(p + 1) + R*n*(p + 1) + D(R*x, x), x), x), x) - Simp(R*b**(-Floor((q - 1)/n) - 1)*x*(a + b*x**n)**(p + 1)/(a*n*(p + 1)), x) def With1545(Pq, a, b, m, n, p, x): q = Expon(Pq, x) Q = PolynomialQuotient(Pq*a*b**(Floor((q + S(-1))/n) + S(1))*x**m, a + b*x**n, x) R = PolynomialRemainder(Pq*a*b**(Floor((q + S(-1))/n) + S(1))*x**m, a + b*x**n, x) return Dist(b**(-Floor((q - 1)/n) - 1)/(a*n*(p + 1)), Int(x**m*(a + b*x**n)**(p + 1)*ExpandToSum(Q*n*x**(-m)*(p + 1) + Sum_doit(x**(i - m)*(i + n*(p + 1) + 1)*Coeff(R, x, i)/a, List(i, 0, n - 1)), x), x), x) - Simp(R*b**(-Floor((q - 1)/n) - 1)*x*(a + b*x**n)**(p + 1)/(a**2*n*(p + 1)), x) def With1546(Pq, a, b, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False g = GCD(m + S(1), n) if Unequal(g, S(1)): return True return False def replacement1546(Pq, a, b, m, n, p, x): g = GCD(m + S(1), n) return Dist(S(1)/g, Subst(Int(x**(S(-1) + (m + S(1))/g)*(a + b*x**(n/g))**p*ReplaceAll(Pq, Rule(x, x**(S(1)/g))), x), x, x**g), x) def replacement1547(A, B, a, b, x): return Dist(B**S(3)/b, Int(S(1)/(A**S(2) - A*B*x + B**S(2)*x**S(2)), x), x) def With1548(A, B, a, b, x): r = Numerator(Rt(a/b, S(3))) s = Denominator(Rt(a/b, S(3))) return Dist(r/(S(3)*a*s), Int((r*(S(2)*A*s + B*r) + s*x*(-A*s + B*r))/(r**S(2) - r*s*x + s**S(2)*x**S(2)), x), x) - Dist(r*(-A*s + B*r)/(S(3)*a*s), Int(S(1)/(r + s*x), x), x) def With1549(A, B, a, b, x): r = Numerator(Rt(-a/b, S(3))) s = Denominator(Rt(-a/b, S(3))) return -Dist(r/(S(3)*a*s), Int((r*(-S(2)*A*s + B*r) - s*x*(A*s + B*r))/(r**S(2) + r*s*x + s**S(2)*x**S(2)), x), x) + Dist(r*(A*s + B*r)/(S(3)*a*s), Int(S(1)/(r - s*x), x), x) def replacement1550(A, B, C, a, b, x): return -Dist(C**S(2)/b, Int(S(1)/(B - C*x), x), x) def With1551(A, B, C, a, b, x): q = a**(S(1)/3)/b**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist((B + C*q)/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1552(B, C, a, b, x): q = a**(S(1)/3)/b**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist((B + C*q)/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1553(A, C, a, b, x): q = a**(S(1)/3)/b**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist(C*q/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1554(A, B, C, a, b, x): q = (-a)**(S(1)/3)/(-b)**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist((B + C*q)/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1555(B, C, a, b, x): q = (-a)**(S(1)/3)/(-b)**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist((B + C*q)/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1556(A, C, a, b, x): q = (-a)**(S(1)/3)/(-b)**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist(C*q/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1557(A, B, C, a, b, x): q = (-a)**(S(1)/3)/b**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) + Dist((B - C*q)/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1558(B, C, a, b, x): q = (-a)**(S(1)/3)/b**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) + Dist((B - C*q)/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1559(A, C, a, b, x): q = (-a)**(S(1)/3)/b**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) - Dist(C*q/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1560(A, B, C, a, b, x): q = a**(S(1)/3)/(-b)**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) + Dist((B - C*q)/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1561(B, C, a, b, x): q = a**(S(1)/3)/(-b)**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) + Dist((B - C*q)/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1562(A, C, a, b, x): q = a**(S(1)/3)/(-b)**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) - Dist(C*q/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1563(A, B, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist((B + C*q)/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1564(B, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist((B + C*q)/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1565(A, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist(C*q/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1566(A, B, C, a, b, x): q = Rt(a/b, S(3)) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist((B + C*q)/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1567(B, C, a, b, x): q = Rt(a/b, S(3)) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist((B + C*q)/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1568(A, C, a, b, x): q = Rt(a/b, S(3)) return Dist(C/b, Int(S(1)/(q + x), x), x) + Dist(C*q/b, Int(S(1)/(q**S(2) - q*x + x**S(2)), x), x) def With1569(A, B, C, a, b, x): q = (-a/b)**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) + Dist((B - C*q)/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1570(B, C, a, b, x): q = (-a/b)**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) + Dist((B - C*q)/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1571(A, C, a, b, x): q = (-a/b)**(S(1)/3) return -Dist(C/b, Int(S(1)/(q - x), x), x) - Dist(C*q/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1572(A, B, C, a, b, x): q = Rt(-a/b, S(3)) return -Dist(C/b, Int(S(1)/(q - x), x), x) + Dist((B - C*q)/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1573(B, C, a, b, x): q = Rt(-a/b, S(3)) return -Dist(C/b, Int(S(1)/(q - x), x), x) + Dist((B - C*q)/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def With1574(A, C, a, b, x): q = Rt(-a/b, S(3)) return -Dist(C/b, Int(S(1)/(q - x), x), x) - Dist(C*q/b, Int(S(1)/(q**S(2) + q*x + x**S(2)), x), x) def replacement1575(A, B, C, a, b, x): return Dist(C, Int(x**S(2)/(a + b*x**S(3)), x), x) + Int((A + B*x)/(a + b*x**S(3)), x) def replacement1576(B, C, a, b, x): return Dist(B, Int(x/(a + b*x**S(3)), x), x) + Dist(C, Int(x**S(2)/(a + b*x**S(3)), x), x) def replacement1577(A, C, a, b, x): return Dist(A, Int(S(1)/(a + b*x**S(3)), x), x) + Dist(C, Int(x**S(2)/(a + b*x**S(3)), x), x) def With1578(A, B, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(q**S(2)/a, Int((A + C*q*x)/(q**S(2) - q*x + x**S(2)), x), x) def With1579(B, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(C*q**S(3)/a, Int(x/(q**S(2) - q*x + x**S(2)), x), x) def With1580(A, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(q**S(2)/a, Int((A + C*q*x)/(q**S(2) - q*x + x**S(2)), x), x) def With1581(A, B, C, a, b, x): q = (-a/b)**(S(1)/3) return Dist(q/a, Int((A*q + x*(A + B*q))/(q**S(2) + q*x + x**S(2)), x), x) def With1582(B, C, a, b, x): q = (-a/b)**(S(1)/3) return Dist(B*q**S(2)/a, Int(x/(q**S(2) + q*x + x**S(2)), x), x) def With1583(A, C, a, b, x): q = (-a/b)**(S(1)/3) return Dist(A*q/a, Int((q + x)/(q**S(2) + q*x + x**S(2)), x), x) def With1584(A, B, C, a, b, x): if isinstance(x, (int, Integer, float, Float)): return False q = (a/b)**(S(1)/3) if NonzeroQ(A - B*q + C*q**S(2)): return True return False def replacement1584(A, B, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(q/(S(3)*a), Int((q*(S(2)*A + B*q - C*q**S(2)) - x*(A - B*q - S(2)*C*q**S(2)))/(q**S(2) - q*x + x**S(2)), x), x) + Dist(q*(A - B*q + C*q**S(2))/(S(3)*a), Int(S(1)/(q + x), x), x) def With1585(B, C, a, b, x): if isinstance(x, (int, Integer, float, Float)): return False q = (a/b)**(S(1)/3) if NonzeroQ(B*q - C*q**S(2)): return True return False def replacement1585(B, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(q/(S(3)*a), Int((q*(B*q - C*q**S(2)) + x*(B*q + S(2)*C*q**S(2)))/(q**S(2) - q*x + x**S(2)), x), x) - Dist(q*(B*q - C*q**S(2))/(S(3)*a), Int(S(1)/(q + x), x), x) def With1586(A, C, a, b, x): if isinstance(x, (int, Integer, float, Float)): return False q = (a/b)**(S(1)/3) if NonzeroQ(A + C*q**S(2)): return True return False def replacement1586(A, C, a, b, x): q = (a/b)**(S(1)/3) return Dist(q/(S(3)*a), Int((q*(S(2)*A - C*q**S(2)) - x*(A - S(2)*C*q**S(2)))/(q**S(2) - q*x + x**S(2)), x), x) + Dist(q*(A + C*q**S(2))/(S(3)*a), Int(S(1)/(q + x), x), x) def With1587(A, B, C, a, b, x): if isinstance(x, (int, Integer, float, Float)): return False q = (-a/b)**(S(1)/3) if NonzeroQ(A + B*q + C*q**S(2)): return True return False def replacement1587(A, B, C, a, b, x): q = (-a/b)**(S(1)/3) return Dist(q/(S(3)*a), Int((q*(S(2)*A - B*q - C*q**S(2)) + x*(A + B*q - S(2)*C*q**S(2)))/(q**S(2) + q*x + x**S(2)), x), x) + Dist(q*(A + B*q + C*q**S(2))/(S(3)*a), Int(S(1)/(q - x), x), x) def With1588(B, C, a, b, x): if isinstance(x, (int, Integer, float, Float)): return False q = (-a/b)**(S(1)/3) if NonzeroQ(B*q + C*q**S(2)): return True return False def replacement1588(B, C, a, b, x): q = (-a/b)**(S(1)/3) return Dist(q/(S(3)*a), Int((-q*(B*q + C*q**S(2)) + x*(B*q - S(2)*C*q**S(2)))/(q**S(2) + q*x + x**S(2)), x), x) + Dist(q*(B*q + C*q**S(2))/(S(3)*a), Int(S(1)/(q - x), x), x) def With1589(A, C, a, b, x): if isinstance(x, (int, Integer, float, Float)): return False q = (-a/b)**(S(1)/3) if NonzeroQ(A + C*q**S(2)): return True return False def replacement1589(A, C, a, b, x): q = (-a/b)**(S(1)/3) return Dist(q/(S(3)*a), Int((q*(S(2)*A - C*q**S(2)) + x*(A - S(2)*C*q**S(2)))/(q**S(2) + q*x + x**S(2)), x), x) + Dist(q*(A + C*q**S(2))/(S(3)*a), Int(S(1)/(q - x), x), x) def With1590(Pq, a, b, c, m, n, x): if isinstance(x, (int, Integer, float, Float)): return False v = Sum_doit(c**(-ii)*(c*x)**(ii + m)*(x**(n/S(2))*Coeff(Pq, x, ii + n/S(2)) + Coeff(Pq, x, ii))/(a + b*x**n), List(ii, S(0), n/S(2) + S(-1))) if SumQ(v): return True return False def replacement1590(Pq, a, b, c, m, n, x): v = Sum_doit(c**(-ii)*(c*x)**(ii + m)*(x**(n/S(2))*Coeff(Pq, x, ii + n/S(2)) + Coeff(Pq, x, ii))/(a + b*x**n), List(ii, S(0), n/S(2) + S(-1))) return Int(v, x) def With1591(Pq, a, b, n, x): if isinstance(x, (int, Integer, float, Float)): return False v = Sum_doit(x**ii*(x**(n/S(2))*Coeff(Pq, x, ii + n/S(2)) + Coeff(Pq, x, ii))/(a + b*x**n), List(ii, S(0), n/S(2) + S(-1))) if SumQ(v): return True return False def replacement1591(Pq, a, b, n, x): v = Sum_doit(x**ii*(x**(n/S(2))*Coeff(Pq, x, ii + n/S(2)) + Coeff(Pq, x, ii))/(a + b*x**n), List(ii, S(0), n/S(2) + S(-1))) return Int(v, x) def With1592(a, b, c, d, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Simp(S(2)*d*s**S(3)*sqrt(a + b*x**S(3))/(a*r**S(2)*(r*x + s*(S(1) + sqrt(S(3))))), x) - Simp(S(3)**(S(1)/4)*d*s*sqrt((r**S(2)*x**S(2) - r*s*x + s**S(2))/(r*x + s*(S(1) + sqrt(S(3))))**S(2))*sqrt(S(2) - sqrt(S(3)))*(r*x + s)*EllipticE(asin((r*x + s*(S(1) - sqrt(S(3))))/(r*x + s*(S(1) + sqrt(S(3))))), S(-7) - S(4)*sqrt(S(3)))/(r**S(2)*sqrt(s*(r*x + s)/(r*x + s*(S(1) + sqrt(S(3))))**S(2))*sqrt(a + b*x**S(3))), x) def With1593(a, b, c, d, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Dist(d/r, Int((r*x + s*(S(1) - sqrt(S(3))))/sqrt(a + b*x**S(3)), x), x) + Dist((c*r - d*s*(S(1) - sqrt(S(3))))/r, Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1594(a, b, c, d, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Simp(S(2)*d*s**S(3)*sqrt(a + b*x**S(3))/(a*r**S(2)*(r*x + s*(S(1) - sqrt(S(3))))), x) + Simp(S(3)**(S(1)/4)*d*s*sqrt((r**S(2)*x**S(2) - r*s*x + s**S(2))/(r*x + s*(S(1) - sqrt(S(3))))**S(2))*sqrt(sqrt(S(3)) + S(2))*(r*x + s)*EllipticE(asin((r*x + s*(S(1) + sqrt(S(3))))/(r*x + s*(S(1) - sqrt(S(3))))), S(-7) + S(4)*sqrt(S(3)))/(r**S(2)*sqrt(-s*(r*x + s)/(r*x + s*(S(1) - sqrt(S(3))))**S(2))*sqrt(a + b*x**S(3))), x) def With1595(a, b, c, d, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Dist(d/r, Int((r*x + s*(S(1) + sqrt(S(3))))/sqrt(a + b*x**S(3)), x), x) + Dist((c*r - d*s*(S(1) + sqrt(S(3))))/r, Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1596(a, b, c, d, x): r = Numer(Rt(b/a, S(3))) s = Denom(Rt(b/a, S(3))) return Simp(d*s**S(3)*x*(S(1) + sqrt(S(3)))*sqrt(a + b*x**S(6))/(S(2)*a*r**S(2)*(r*x**S(2)*(S(1) + sqrt(S(3))) + s)), x) - Simp(S(3)**(S(1)/4)*d*s*x*sqrt((r**S(2)*x**S(4) - r*s*x**S(2) + s**S(2))/(r*x**S(2)*(S(1) + sqrt(S(3))) + s)**S(2))*(r*x**S(2) + s)*EllipticE(acos((r*x**S(2)*(S(1) - sqrt(S(3))) + s)/(r*x**S(2)*(S(1) + sqrt(S(3))) + s)), sqrt(S(3))/S(4) + S(1)/2)/(S(2)*r**S(2)*sqrt(r*x**S(2)*(r*x**S(2) + s)/(r*x**S(2)*(S(1) + sqrt(S(3))) + s)**S(2))*sqrt(a + b*x**S(6))), x) def With1597(a, b, c, d, x): q = Rt(b/a, S(3)) return Dist(d/(S(2)*q**S(2)), Int((S(2)*q**S(2)*x**S(4) - sqrt(S(3)) + S(1))/sqrt(a + b*x**S(6)), x), x) + Dist((S(2)*c*q**S(2) - d*(S(1) - sqrt(S(3))))/(S(2)*q**S(2)), Int(S(1)/sqrt(a + b*x**S(6)), x), x) def replacement1598(a, b, c, d, x): return -Simp(c*d*x**S(3)*sqrt(-(c - d*x**S(2))**S(2)/(c*d*x**S(2)))*sqrt(-d**S(2)*(a + b*x**S(8))/(b*c**S(2)*x**S(4)))*EllipticF(asin(sqrt((sqrt(S(2))*c**S(2) + S(2)*c*d*x**S(2) + sqrt(S(2))*d**S(2)*x**S(4))/(c*d*x**S(2)))/S(2)), S(-2) + S(2)*sqrt(S(2)))/(sqrt(sqrt(S(2)) + S(2))*sqrt(a + b*x**S(8))*(c - d*x**S(2))), x) def replacement1599(a, b, c, d, x): return -Dist((-c*Rt(b/a, S(4)) + d)/(S(2)*Rt(b/a, S(4))), Int((-x**S(2)*Rt(b/a, S(4)) + S(1))/sqrt(a + b*x**S(8)), x), x) + Dist((c*Rt(b/a, S(4)) + d)/(S(2)*Rt(b/a, S(4))), Int((x**S(2)*Rt(b/a, S(4)) + S(1))/sqrt(a + b*x**S(8)), x), x) def replacement1600(Pq, a, b, n, x): return Dist(Coeff(Pq, x, S(0)), Int(S(1)/(x*sqrt(a + b*x**n)), x), x) + Int(ExpandToSum((Pq - Coeff(Pq, x, S(0)))/x, x)/sqrt(a + b*x**n), x) def With1601(Pq, a, b, c, m, n, p, x): q = Expon(Pq, x) j = Symbol('j') k = Symbol('k') return Int(Sum_doit(c**(-j)*(c*x)**(j + m)*(a + b*x**n)**p*Sum_doit(x**(k*n/S(2))*Coeff(Pq, x, j + k*n/S(2)), List(k, S(0), S(1) + S(2)*(-j + q)/n)), List(j, S(0), n/S(2) + S(-1))), x) def With1602(Pq, a, b, n, p, x): q = Expon(Pq, x) j = Symbol('j') k = Symbol('k') return Int(Sum_doit(x**j*(a + b*x**n)**p*Sum_doit(x**(k*n/S(2))*Coeff(Pq, x, j + k*n/S(2)), List(k, S(0), S(1) + S(2)*(-j + q)/n)), List(j, S(0), n/S(2) + S(-1))), x) def replacement1603(Pq, a, b, n, p, x): return Dist(Coeff(Pq, x, n + S(-1)), Int(x**(n + S(-1))*(a + b*x**n)**p, x), x) + Int((a + b*x**n)**p*ExpandToSum(Pq - x**(n + S(-1))*Coeff(Pq, x, n + S(-1)), x), x) def replacement1604(Pq, a, b, c, m, n, x): return Int(ExpandIntegrand(Pq*(c*x)**m/(a + b*x**n), x), x) def replacement1605(Pq, a, b, n, x): return Int(ExpandIntegrand(Pq/(a + b*x**n), x), x) def With1606(Pq, a, b, c, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False Pq0 = Coeff(Pq, x, S(0)) if NonzeroQ(Pq0): return True return False def replacement1606(Pq, a, b, c, m, n, p, x): Pq0 = Coeff(Pq, x, S(0)) return Dist(S(1)/(S(2)*a*c*(m + S(1))), Int((c*x)**(m + S(1))*(a + b*x**n)**p*ExpandToSum(-S(2)*Pq0*b*x**(n + S(-1))*(m + n*(p + S(1)) + S(1)) + S(2)*a*(Pq - Pq0)*(m + S(1))/x, x), x), x) + Simp(Pq0*(c*x)**(m + S(1))*(a + b*x**n)**(p + S(1))/(a*c*(m + S(1))), x) def With1607(Pq, a, b, c, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) if And(NonzeroQ(m + n*p + q + S(1)), GreaterEqual(-n + q, S(0)), Or(IntegerQ(S(2)*p), IntegerQ(p + (q + S(1))/(S(2)*n)))): return True return False def replacement1607(Pq, a, b, c, m, n, p, x): q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) return Dist(1/(b*(m + n*p + q + 1)), Int((c*x)**m*(a + b*x**n)**p*ExpandToSum(-Pqq*a*x**(-n + q)*(m - n + q + 1) + b*(Pq - Pqq*x**q)*(m + n*p + q + 1), x), x), x) + Simp(Pqq*c**(n - q - 1)*(c*x)**(m - n + q + 1)*(a + b*x**n)**(p + 1)/(b*(m + n*p + q + 1)), x) def With1608(Pq, a, b, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) if And(NonzeroQ(n*p + q + S(1)), GreaterEqual(-n + q, S(0)), Or(IntegerQ(S(2)*p), IntegerQ(p + (q + S(1))/(S(2)*n)))): return True return False def replacement1608(Pq, a, b, n, p, x): q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) return Dist(1/(b*(n*p + q + 1)), Int((a + b*x**n)**p*ExpandToSum(-Pqq*a*x**(-n + q)*(-n + q + 1) + b*(Pq - Pqq*x**q)*(n*p + q + 1), x), x), x) + Simp(Pqq*x**(-n + q + 1)*(a + b*x**n)**(p + 1)/(b*(n*p + q + 1)), x) def With1609(Pq, a, b, m, n, p, x): q = Expon(Pq, x) return -Subst(Int(x**(-m - q + S(-2))*(a + b*x**(-n))**p*ExpandToSum(x**q*ReplaceAll(Pq, Rule(x, S(1)/x)), x), x), x, S(1)/x) def With1610(Pq, a, b, c, m, n, p, x): g = Denominator(m) q = Expon(Pq, x) return -Dist(g/c, Subst(Int(x**(-g*(m + q + S(1)) + S(-1))*(a + b*c**(-n)*x**(-g*n))**p*ExpandToSum(x**(g*q)*ReplaceAll(Pq, Rule(x, x**(-g)/c)), x), x), x, (c*x)**(-S(1)/g)), x) def With1611(Pq, a, b, c, m, n, p, x): q = Expon(Pq, x) return -Dist((c*x)**m*(S(1)/x)**m, Subst(Int(x**(-m - q + S(-2))*(a + b*x**(-n))**p*ExpandToSum(x**q*ReplaceAll(Pq, Rule(x, S(1)/x)), x), x), x, S(1)/x), x) def With1612(Pq, a, b, m, n, p, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g*(m + S(1)) + S(-1))*(a + b*x**(g*n))**p*ReplaceAll(Pq, Rule(x, x**g)), x), x, x**(S(1)/g)), x) def With1613(Pq, a, b, n, p, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g + S(-1))*(a + b*x**(g*n))**p*ReplaceAll(Pq, Rule(x, x**g)), x), x, x**(S(1)/g)), x) def replacement1614(Pq, a, b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(Pq*x**m*(a + b*x**n)**p, x), x) def replacement1615(Pq, a, b, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*x**(n/(m + S(1))))**p*ReplaceAll(SubstFor(x**n, Pq, x), Rule(x, x**(n/(m + S(1))))), x), x, x**(m + S(1))), x) def replacement1616(Pq, a, b, c, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(Pq*x**m*(a + b*x**n)**p, x), x) def replacement1617(A, B, a, b, m, n, p, x): return Dist(A, Int((a + b*x**n)**p, x), x) + Dist(B, Int(x**m*(a + b*x**n)**p, x), x) def replacement1618(Pq, a, b, c, m, n, p, x): return Int(ExpandIntegrand(Pq*(c*x)**m*(a + b*x**n)**p, x), x) def replacement1619(Pq, a, b, n, p, x): return Int(ExpandIntegrand(Pq*(a + b*x**n)**p, x), x) def replacement1620(Pq, a, b, m, n, p, u, v, x): return Dist(u**m*v**(-m)/Coeff(v, x, S(1)), Subst(Int(x**m*(a + b*x**n)**p*SubstFor(v, Pq, x), x), x, v), x) def replacement1621(Pq, a, b, n, p, v, x): return Dist(S(1)/Coeff(v, x, S(1)), Subst(Int((a + b*x**n)**p*SubstFor(v, Pq, x), x), x, v), x) def replacement1622(Pq, a1, a2, b1, b2, c, m, n, p, x): return Int(Pq*(c*x)**m*(a1*a2 + b1*b2*x**(S(2)*n))**p, x) def replacement1623(Pq, a1, a2, b1, b2, n, p, x): return Int(Pq*(a1*a2 + b1*b2*x**(S(2)*n))**p, x) def replacement1624(Pq, a1, a2, b1, b2, c, m, n, p, x): return Dist((a1 + b1*x**n)**FracPart(p)*(a2 + b2*x**n)**FracPart(p)*(a1*a2 + b1*b2*x**(S(2)*n))**(-FracPart(p)), Int(Pq*(c*x)**m*(a1*a2 + b1*b2*x**(S(2)*n))**p, x), x) def replacement1625(Pq, a1, a2, b1, b2, n, p, x): return Dist((a1 + b1*x**n)**FracPart(p)*(a2 + b2*x**n)**FracPart(p)*(a1*a2 + b1*b2*x**(S(2)*n))**(-FracPart(p)), Int(Pq*(a1*a2 + b1*b2*x**(S(2)*n))**p, x), x) def replacement1626(a, b, c, d, e, f, g, n, n2, p, x): return Simp(e*x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(p + S(1))/(a*c), x) def replacement1627(a, b, c, d, e, g, n, n2, p, x): return Simp(e*x*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(p + S(1))/(a*c), x) def replacement1628(a, b, c, d, e, f, g, h, m, n, n2, p, x): return Simp(e*(h*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(p + S(1))/(a*c*h*(m + S(1))), x) def replacement1629(a, b, c, d, e, g, h, m, n, n2, p, x): return Simp(e*(h*x)**(m + S(1))*(a + b*x**n)**(p + S(1))*(c + d*x**n)**(p + S(1))/(a*c*h*(m + S(1))), x) def replacement1630(A, B, a, b, c, d, m, n, p, q, x): return Dist(A, Int((a + b*x**n)**p*(c + d*x**n)**q, x), x) + Dist(B, Int(x**m*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def With1631(Px, a, b, c, d, n, p, q, x): k = Denominator(n) return Dist(k/d, Subst(Int(SimplifyIntegrand(x**(k + S(-1))*(a + b*x**(k*n))**p*ReplaceAll(Px, Rule(x, -c/d + x**k/d))**q, x), x), x, (c + d*x)**(S(1)/k)), x) def replacement1632(Pq, a, b, c, m, n, n2, p, x): return Dist(S(1)/n, Subst(Int((a + b*x + c*x**S(2))**p*SubstFor(x**n, Pq, x), x), x, x**n), x) def replacement1633(Pq, a, b, c, d, m, n, n2, p, x): return Int(ExpandIntegrand(Pq*(d*x)**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1634(Pq, a, b, c, n, n2, p, x): return Int(ExpandIntegrand(Pq*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1635(a, b, c, d, e, f, n, n2, p, x): return Simp(d*x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/a, x) def replacement1636(a, b, c, d, f, n, n2, p, x): return Simp(d*x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/a, x) def replacement1637(a, b, c, d, e, f, g, m, n, n2, p, x): return Simp(d*(g*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(a*g*(m + S(1))), x) def replacement1638(a, b, c, d, f, g, m, n, n2, p, x): return Simp(d*(g*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(a*g*(m + S(1))), x) def replacement1639(Pq, a, b, c, d, m, n, n2, p, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int(Pq*(d*x)**m*(b + S(2)*c*x**n)**(S(2)*p), x), x) def replacement1640(Pq, a, b, c, n, n2, p, x): return Dist((S(4)*c)**(-IntPart(p))*(b + S(2)*c*x**n)**(-S(2)*FracPart(p))*(a + b*x**n + c*x**(S(2)*n))**FracPart(p), Int(Pq*(b + S(2)*c*x**n)**(S(2)*p), x), x) def replacement1641(Pq, a, b, c, m, n, n2, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a + b*x + c*x**S(2))**p*SubstFor(x**n, Pq, x), x), x, x**n), x) def replacement1642(Pq, a, b, c, d, m, n, n2, p, x): return Dist(x**(-m)*(d*x)**m, Int(Pq*x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1643(Pq, a, b, c, d, m, n, n2, p, x): return Dist(S(1)/d, Int((d*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**p*ExpandToSum(Pq/x, x), x), x) def replacement1644(Pq, a, b, c, n, n2, p, x): return Int(x*(a + b*x**n + c*x**(S(2)*n))**p*ExpandToSum(Pq/x, x), x) def replacement1645(a, b, c, d, e, f, g, n, n2, n3, p, x): return Simp(x*(S(3)*a*d - x**S(2)*(-a*e + S(2)*b*d*p + S(3)*b*d))*(a + b*x**S(2) + c*x**S(4))**(p + S(1))/(S(3)*a**S(2)), x) def replacement1646(a, b, c, d, f, g, n, n2, n3, p, x): return Simp(x*(S(3)*a*d - x**S(2)*(S(2)*b*d*p + S(3)*b*d))*(a + b*x**S(2) + c*x**S(4))**(p + S(1))/(S(3)*a**S(2)), x) def replacement1647(a, b, c, d, e, g, n, n2, n3, p, x): return Simp(x*(S(3)*a*d - x**S(2)*(-a*e + S(2)*b*d*p + S(3)*b*d))*(a + b*x**S(2) + c*x**S(4))**(p + S(1))/(S(3)*a**S(2)), x) def replacement1648(a, b, c, d, g, n, n2, n3, p, x): return Simp(x*(S(3)*a*d - x**S(2)*(S(2)*b*d*p + S(3)*b*d))*(a + b*x**S(2) + c*x**S(4))**(p + S(1))/(S(3)*a**S(2)), x) def replacement1649(a, b, c, e, f, g, h, m, n, n2, q, r, s, x): return -Simp((S(2)*c*x**n*(-b*g + S(2)*c*f) + S(2)*c*(-S(2)*a*g + b*f) + S(2)*h*x**(n/S(2))*(-S(4)*a*c + b**S(2)))/(c*n*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**n + c*x**(S(2)*n))), x) def replacement1650(a, b, c, d, e, f, g, h, m, n, n2, q, r, s, x): return Dist(x**(-m)*(d*x)**m, Int(x**m*(e + f*x**(n/S(2)) + g*x**(S(3)*n/S(2)) + h*x**(S(2)*n))/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x) def With1651(Pq, a, b, c, n, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) i = Symbol('i') if Less(q, S(2)*n): return True return False def replacement1651(Pq, a, b, c, n, n2, p, x): q = Expon(Pq, x) i = Symbol('i') return Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Sum_doit(c*x**(i + n)*(-S(2)*a*Coeff(Pq, x, i + n) + b*Coeff(Pq, x, i))*(i + n*(S(2)*p + S(3)) + S(1)) + x**i*(-a*b*(i + S(1))*Coeff(Pq, x, i + n) + (-S(2)*a*c*(i + S(2)*n*(p + S(1)) + S(1)) + b**S(2)*(i + n*(p + S(1)) + S(1)))*Coeff(Pq, x, i)), List(i, S(0), n + S(-1))), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Sum_doit(c*x**(i + n)*(-S(2)*a*Coeff(Pq, x, i + n) + b*Coeff(Pq, x, i)) + x**i*(-a*b*Coeff(Pq, x, i + n) + (-S(2)*a*c + b**S(2))*Coeff(Pq, x, i)), List(i, S(0), n + S(-1)))/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1652(a, b, c, d, e, f, g, x): return -Simp((c*x**S(2)*(-b*f + S(2)*c*e) + c*(-S(2)*a*f + b*e) + g*x*(-S(4)*a*c + b**S(2)))/(c*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1653(a, b, c, d, f, g, x): return Simp((S(2)*a*c*f + b*c*f*x**S(2) - g*x*(-S(4)*a*c + b**S(2)))/(c*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1654(a, b, c, d, e, g, x): return -Simp((b*c*e + S(2)*c**S(2)*e*x**S(2) + g*x*(-S(4)*a*c + b**S(2)))/(c*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1655(a, b, c, e, f, g, h, x): return Simp((S(2)*a**S(2)*c*f + a*b*c*f*x**S(2) + a*h*x**S(3)*(-S(4)*a*c + b**S(2)))/(a*c*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1656(a, b, c, e, g, h, x): return Simp(h*x**S(3)/(c*sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1657(a, b, c, d, e, f, g, h, x): return Simp((S(2)*a**S(2)*c*f + a*b*c*f*x**S(2) + a*h*x**S(3)*(-S(4)*a*c + b**S(2)) + c*d*x*(-S(4)*a*c + b**S(2)))/(a*c*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1658(a, b, c, d, e, f, h, x): return Simp((S(2)*a**S(2)*c*f + a*b*c*f*x**S(2) + a*h*x**S(3)*(-S(4)*a*c + b**S(2)) + c*d*x*(-S(4)*a*c + b**S(2)))/(a*c*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1659(Pq, a, b, c, n, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Q = PolynomialQuotient(Pq*(b*c)**(Floor((q + S(-1))/n) + S(1)), a + b*x**n + c*x**(S(2)*n), x) R = PolynomialRemainder(Pq*(b*c)**(Floor((q + S(-1))/n) + S(1)), a + b*x**n + c*x**(S(2)*n), x) if GreaterEqual(q, S(2)*n): return True return False def replacement1659(Pq, a, b, c, n, n2, p, x): q = Expon(Pq, x) Q = PolynomialQuotient(Pq*(b*c)**(Floor((q + S(-1))/n) + S(1)), a + b*x**n + c*x**(S(2)*n), x) R = PolynomialRemainder(Pq*(b*c)**(Floor((q + S(-1))/n) + S(1)), a + b*x**n + c*x**(S(2)*n), x) return Dist((b*c)**(-Floor((q - 1)/n) - 1)/(a*n*(p + 1)*(-4*a*c + b**2)), Int((a + b*x**n + c*x**(2*n))**(p + 1)*ExpandToSum(Q*a*n*(p + 1)*(-4*a*c + b**2) + Sum_doit(c*x**(i + n)*(-2*a*Coeff(R, x, i + n) + b*Coeff(R, x, i))*(i + n*(2*p + 3) + 1) + x**i*(-a*b*(i + 1)*Coeff(R, x, i + n) + (-2*a*c*(i + 2*n*(p + 1) + 1) + b**2*(i + n*(p + 1) + 1))*Coeff(R, x, i)), List(i, 0, n - 1)), x), x), x) - Simp(x*(b*c)**(-Floor((q - 1)/n) - 1)*(a + b*x**n + c*x**(2*n))**(p + 1)*Sum_doit(c*x**(i + n)*(-2*a*Coeff(R, x, i + n) + b*Coeff(R, x, i)) + x**i*(-a*b*Coeff(R, x, i + n) + (-2*a*c + b**2)*Coeff(R, x, i)), List(i, 0, n - 1))/(a*n*(p + 1)*(-4*a*c + b**2)), x) def With1660(Pq, a, b, c, m, n, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Q = PolynomialQuotient(Pq*a*x**m*(b*c)**(Floor((q + S(-1))/n) + S(1)), a + b*x**n + c*x**(S(2)*n), x) R = PolynomialRemainder(Pq*a*x**m*(b*c)**(Floor((q + S(-1))/n) + S(1)), a + b*x**n + c*x**(S(2)*n), x) if GreaterEqual(q, S(2)*n): return True return False def replacement1660(Pq, a, b, c, m, n, n2, p, x): q = Expon(Pq, x) Q = PolynomialQuotient(Pq*a*x**m*(b*c)**(Floor((q + S(-1))/n) + S(1)), a + b*x**n + c*x**(S(2)*n), x) R = PolynomialRemainder(Pq*a*x**m*(b*c)**(Floor((q + S(-1))/n) + S(1)), a + b*x**n + c*x**(S(2)*n), x) return Dist((b*c)**(-Floor((q - 1)/n) - 1)/(a*n*(p + 1)*(-4*a*c + b**2)), Int(x**m*(a + b*x**n + c*x**(2*n))**(p + 1)*ExpandToSum(Q*n*x**(-m)*(p + 1)*(-4*a*c + b**2) + Sum_doit(c*x**(i - m + n)*(-2*Coeff(R, x, i + n) + b*Coeff(R, x, i)/a)*(i + n*(2*p + 3) + 1) + x**(i - m)*(-b*(i + 1)*Coeff(R, x, i + n) + (-2*c*(i + 2*n*(p + 1) + 1) + b**2*(i + n*(p + 1) + 1)/a)*Coeff(R, x, i)), List(i, 0, n - 1)), x), x), x) - Simp(x*(b*c)**(-Floor((q - 1)/n) - 1)*(a + b*x**n + c*x**(2*n))**(p + 1)*Sum_doit(c*x**(i + n)*(-2*a*Coeff(R, x, i + n) + b*Coeff(R, x, i)) + x**i*(-a*b*Coeff(R, x, i + n) + (-2*a*c + b**2)*Coeff(R, x, i)), List(i, 0, n - 1))/(a**2*n*(p + 1)*(-4*a*c + b**2)), x) def With1661(Pq, a, b, c, m, n, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False g = GCD(m + S(1), n) if Unequal(g, S(1)): return True return False def replacement1661(Pq, a, b, c, m, n, n2, p, x): g = GCD(m + S(1), n) return Dist(S(1)/g, Subst(Int(x**(S(-1) + (m + S(1))/g)*(a + b*x**(n/g) + c*x**(S(2)*n/g))**p*ReplaceAll(Pq, Rule(x, x**(S(1)/g))), x), x, x**g), x) def replacement1662(Pq, a, b, c, d, m, n, n2, x): return Int(ExpandIntegrand(Pq*(d*x)**m/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1663(Pq, a, b, c, n, n2, x): return Int(ExpandIntegrand(Pq/(a + b*x**n + c*x**(S(2)*n)), x), x) def With1664(Pq, a, b, c, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) if Equal(S(2)*p + q + S(1), S(0)): return True return False def replacement1664(Pq, a, b, c, p, x): q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) return Dist(1/2, Int((a + b*x + c*x**2)**p*ExpandToSum(2*Pq - Pqq*c**p*(b + 2*c*x)*(a + b*x + c*x**2)**(-p - 1), x), x), x) + Simp(Pqq*c**p*log(a + b*x + c*x**2)/2, x) def With1665(Pq, a, b, c, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) if Equal(S(2)*p + q + S(1), S(0)): return True return False def replacement1665(Pq, a, b, c, p, x): q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) return Int((a + b*x + c*x**2)**p*ExpandToSum(Pq - Pqq*c**(p + 1/2)*(a + b*x + c*x**2)**(-p - 1/2), x), x) + Simp(Pqq*c**p*atanh((b + 2*c*x)/(2*sqrt(a + b*x + c*x**2)*Rt(c, 2))), x) def With1666(Pq, a, b, c, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) if Equal(S(2)*p + q + S(1), S(0)): return True return False def replacement1666(Pq, a, b, c, p, x): q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) return Int((a + b*x + c*x**2)**p*ExpandToSum(Pq - Pqq*(-c)**(p + 1/2)*(a + b*x + c*x**2)**(-p - 1/2), x), x) - Simp(Pqq*(-c)**p*ArcTan((b + 2*c*x)/(2*sqrt(a + b*x + c*x**2)*Rt(-c, 2))), x) def With1667(Pq, a, b, c, d, m, n, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) if And(GreaterEqual(q, S(2)*n), Unequal(m + S(2)*n*p + q + S(1), S(0)), Or(IntegerQ(S(2)*p), And(Equal(n, S(1)), IntegerQ(S(4)*p)), IntegerQ(p + (q + S(1))/(S(2)*n)))): return True return False def replacement1667(Pq, a, b, c, d, m, n, n2, p, x): q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) return Int((d*x)**m*(a + b*x**n + c*x**(2*n))**p*ExpandToSum(Pq - Pqq*x**q - Pqq*(a*x**(-2*n + q)*(m - 2*n + q + 1) + b*x**(-n + q)*(m + n*(p - 1) + q + 1))/(c*(m + 2*n*p + q + 1)), x), x) + Simp(Pqq*d**(2*n - q - 1)*(d*x)**(m - 2*n + q + 1)*(a + b*x**n + c*x**(2*n))**(p + 1)/(c*(m + 2*n*p + q + 1)), x) def With1668(Pq, a, b, c, n, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) if And(GreaterEqual(q, S(2)*n), Unequal(S(2)*n*p + q + S(1), S(0)), Or(IntegerQ(S(2)*p), And(Equal(n, S(1)), IntegerQ(S(4)*p)), IntegerQ(p + (q + S(1))/(S(2)*n)))): return True return False def replacement1668(Pq, a, b, c, n, n2, p, x): q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) return Int((a + b*x**n + c*x**(2*n))**p*ExpandToSum(Pq - Pqq*x**q - Pqq*(a*x**(-2*n + q)*(-2*n + q + 1) + b*x**(-n + q)*(n*(p - 1) + q + 1))/(c*(2*n*p + q + 1)), x), x) + Simp(Pqq*x**(-2*n + q + 1)*(a + b*x**n + c*x**(2*n))**(p + 1)/(c*(2*n*p + q + 1)), x) def With1669(Pq, a, b, c, d, m, n, n2, p, x): q = Expon(Pq, x) j = Symbol('j') k = Symbol('k') return Int(Sum_doit(d**(-j)*(d*x)**(j + m)*(a + b*x**n + c*x**(S(2)*n))**p*Sum_doit(x**(k*n)*Coeff(Pq, x, j + k*n), List(k, S(0), S(1) + (-j + q)/n)), List(j, S(0), n + S(-1))), x) def With1670(Pq, a, b, c, n, n2, p, x): q = Expon(Pq, x) j = Symbol('j') k = Symbol('k') return Int(Sum_doit(x**j*(a + b*x**n + c*x**(S(2)*n))**p*Sum_doit(x**(k*n)*Coeff(Pq, x, j + k*n), List(k, S(0), S(1) + (-j + q)/n)), List(j, S(0), n + S(-1))), x) def replacement1671(Pq, a, b, c, d, m, n, n2, x): return Int(RationalFunctionExpand(Pq*(d*x)**m/(a + b*x**n + c*x**(S(2)*n)), x), x) def replacement1672(Pq, a, b, c, n, n2, x): return Int(RationalFunctionExpand(Pq/(a + b*x**n + c*x**(S(2)*n)), x), x) def With1673(Pq, a, b, c, m, n, n2, p, x): q = Expon(Pq, x) return -Subst(Int(x**(-m - q + S(-2))*(a + b*x**(-n) + c*x**(-S(2)*n))**p*ExpandToSum(x**q*ReplaceAll(Pq, Rule(x, S(1)/x)), x), x), x, S(1)/x) def With1674(Pq, a, b, c, d, m, n, n2, p, x): g = Denominator(m) q = Expon(Pq, x) return -Dist(g/d, Subst(Int(x**(-g*(m + q + S(1)) + S(-1))*(a + b*d**(-n)*x**(-g*n) + c*d**(-S(2)*n)*x**(-S(2)*g*n))**p*ExpandToSum(x**(g*q)*ReplaceAll(Pq, Rule(x, x**(-g)/d)), x), x), x, (d*x)**(-S(1)/g)), x) def With1675(Pq, a, b, c, d, m, n, n2, p, x): q = Expon(Pq, x) return -Dist((d*x)**m*(S(1)/x)**m, Subst(Int(x**(-m - q + S(-2))*(a + b*x**(-n) + c*x**(-S(2)*n))**p*ExpandToSum(x**q*ReplaceAll(Pq, Rule(x, S(1)/x)), x), x), x, S(1)/x), x) def With1676(Pq, a, b, c, m, n, n2, p, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g*(m + S(1)) + S(-1))*(a + b*x**(g*n) + c*x**(S(2)*g*n))**p*ReplaceAll(Pq, Rule(x, x**g)), x), x, x**(S(1)/g)), x) def With1677(Pq, a, b, c, n, n2, p, x): g = Denominator(n) return Dist(g, Subst(Int(x**(g + S(-1))*(a + b*x**(g*n) + c*x**(S(2)*g*n))**p*ReplaceAll(Pq, Rule(x, x**g)), x), x, x**(S(1)/g)), x) def replacement1678(Pq, a, b, c, d, m, n, n2, p, x): return Dist(d**(m + S(-1)/2)*sqrt(d*x)/sqrt(x), Int(Pq*x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1679(Pq, a, b, c, d, m, n, n2, p, x): return Dist(d**(m + S(1)/2)*sqrt(x)/sqrt(d*x), Int(Pq*x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1680(Pq, a, b, c, d, m, n, n2, p, x): return Dist(x**(-m)*(d*x)**m, Int(Pq*x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1681(Pq, a, b, c, m, n, n2, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a + b*x**(n/(m + S(1))) + c*x**(S(2)*n/(m + S(1))))**p*ReplaceAll(SubstFor(x**n, Pq, x), Rule(x, x**(n/(m + S(1))))), x), x, x**(m + S(1))), x) def replacement1682(Pq, a, b, c, d, m, n, n2, p, x): return Dist(x**(-m)*(d*x)**m, Int(Pq*x**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def With1683(Pq, a, b, c, d, m, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(Pq*(d*x)**m/(b + S(2)*c*x**n - q), x), x) - Dist(S(2)*c/q, Int(Pq*(d*x)**m/(b + S(2)*c*x**n + q), x), x) def With1684(Pq, a, b, c, n, n2, x): q = Rt(-S(4)*a*c + b**S(2), S(2)) return Dist(S(2)*c/q, Int(Pq/(b + S(2)*c*x**n - q), x), x) - Dist(S(2)*c/q, Int(Pq/(b + S(2)*c*x**n + q), x), x) def replacement1685(Pq, a, b, c, d, m, n, n2, p, x): return Int(ExpandIntegrand(Pq*(d*x)**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1686(Pq, a, b, c, n, n2, p, x): return Int(ExpandIntegrand(Pq*(a + b*x**n + c*x**(S(2)*n))**p, x), x) def replacement1687(Pq, a, b, c, d, m, n, n2, p, x): return Int(Pq*(d*x)**m*(a + b*x**n + c*x**(S(2)*n))**p, x) def replacement1688(Pq, a, b, c, n, n2, p, x): return Int(Pq*(a + b*x**n + c*x**(S(2)*n))**p, x) def replacement1689(Pq, a, b, c, m, n, n2, p, u, v, x): return Dist(u**m*v**(-m)/Coefficient(v, x, S(1)), Subst(Int(x**m*(a + b*x**n + c*x**(S(2)*n))**p*SubstFor(v, Pq, x), x), x, v), x) def replacement1690(Pq, a, b, c, n, n2, p, v, x): return Dist(S(1)/Coefficient(v, x, S(1)), Subst(Int((a + b*x**n + c*x**(S(2)*n))**p*SubstFor(v, Pq, x), x), x, v), x) def replacement1691(a, b, j, n, p, x): return Simp(x**(S(1) - n)*(a*x**j + b*x**n)**(p + S(1))/(b*(-j + n)*(p + S(1))), x) def replacement1692(a, b, j, n, p, x): return Dist((-j + n*p + n + S(1))/(a*(-j + n)*(p + S(1))), Int(x**(-j)*(a*x**j + b*x**n)**(p + S(1)), x), x) - Simp(x**(S(1) - j)*(a*x**j + b*x**n)**(p + S(1))/(a*(-j + n)*(p + S(1))), x) def replacement1693(a, b, j, n, p, x): return -Dist(b*(-j + n*p + n + S(1))/(a*(j*p + S(1))), Int(x**(-j + n)*(a*x**j + b*x**n)**p, x), x) + Simp(x**(S(1) - j)*(a*x**j + b*x**n)**(p + S(1))/(a*(j*p + S(1))), x) def replacement1694(a, b, j, n, p, x): return -Dist(b*p*(-j + n)/(j*p + S(1)), Int(x**n*(a*x**j + b*x**n)**(p + S(-1)), x), x) + Simp(x*(a*x**j + b*x**n)**p/(j*p + S(1)), x) def replacement1695(a, b, j, n, p, x): return Dist(a*p*(-j + n)/(n*p + S(1)), Int(x**j*(a*x**j + b*x**n)**(p + S(-1)), x), x) + Simp(x*(a*x**j + b*x**n)**p/(n*p + S(1)), x) def replacement1696(a, b, j, n, p, x): return -Dist((j*p + j - n + S(1))/(b*(-j + n)*(p + S(1))), Int(x**(-n)*(a*x**j + b*x**n)**(p + S(1)), x), x) + Simp(x**(S(1) - n)*(a*x**j + b*x**n)**(p + S(1))/(b*(-j + n)*(p + S(1))), x) def replacement1697(a, b, j, n, p, x): return Dist((-j + n*p + n + S(1))/(a*(-j + n)*(p + S(1))), Int(x**(-j)*(a*x**j + b*x**n)**(p + S(1)), x), x) - Simp(x**(S(1) - j)*(a*x**j + b*x**n)**(p + S(1))/(a*(-j + n)*(p + S(1))), x) def replacement1698(a, b, j, n, p, x): return Dist(a, Int(x**j*(a*x**j + b*x**n)**(p + S(-1)), x), x) + Simp(x*(a*x**j + b*x**n)**p/(p*(-j + n)), x) def replacement1699(a, b, n, x): return Dist(S(2)/(S(2) - n), Subst(Int(S(1)/(-a*x**S(2) + S(1)), x), x, x/sqrt(a*x**S(2) + b*x**n)), x) def replacement1700(a, b, j, n, p, x): return Dist((-j + n*p + n + S(1))/(a*(-j + n)*(p + S(1))), Int(x**(-j)*(a*x**j + b*x**n)**(p + S(1)), x), x) - Simp(x**(S(1) - j)*(a*x**j + b*x**n)**(p + S(1))/(a*(-j + n)*(p + S(1))), x) def replacement1701(a, b, j, n, x): return -Dist(a*(-j + S(2)*n + S(-2))/(b*(n + S(-2))), Int(x**(j - n)/sqrt(a*x**j + b*x**n), x), x) + Simp(-S(2)*x**(S(1) - n)*sqrt(a*x**j + b*x**n)/(b*(n + S(-2))), x) def replacement1702(a, b, j, n, p, x): return Dist(x**(-j*FracPart(p))*(a + b*x**(-j + n))**(-FracPart(p))*(a*x**j + b*x**n)**FracPart(p), Int(x**(j*p)*(a + b*x**(-j + n))**p, x), x) def replacement1703(a, b, j, n, p, u, x): return Dist(S(1)/Coefficient(u, x, S(1)), Subst(Int((a*x**j + b*x**n)**p, x), x, u), x) def replacement1704(a, b, j, m, n, p, x): return Dist(S(1)/n, Subst(Int((a*x**(j/n) + b*x)**p, x), x, x**n), x) def replacement1705(a, b, c, j, m, n, p, x): return -Simp(c**(j + S(-1))*(c*x)**(-j + m + S(1))*(a*x**j + b*x**n)**(p + S(1))/(a*(-j + n)*(p + S(1))), x) def replacement1706(a, b, c, j, m, n, p, x): return Dist(c**j*(-j + m + n*p + n + S(1))/(a*(-j + n)*(p + S(1))), Int((c*x)**(-j + m)*(a*x**j + b*x**n)**(p + S(1)), x), x) - Simp(c**(j + S(-1))*(c*x)**(-j + m + S(1))*(a*x**j + b*x**n)**(p + S(1))/(a*(-j + n)*(p + S(1))), x) def replacement1707(a, b, c, j, m, n, p, x): return -Dist(b*c**(j - n)*(-j + m + n*p + n + S(1))/(a*(j*p + m + S(1))), Int((c*x)**(-j + m + n)*(a*x**j + b*x**n)**p, x), x) + Simp(c**(j + S(-1))*(c*x)**(-j + m + S(1))*(a*x**j + b*x**n)**(p + S(1))/(a*(j*p + m + S(1))), x) def replacement1708(a, b, c, j, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a*x**j + b*x**n)**p, x), x) def replacement1709(a, b, j, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a*x**(j/n) + b*x)**p, x), x, x**n), x) def replacement1710(a, b, c, j, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a*x**j + b*x**n)**p, x), x) def replacement1711(a, b, c, j, m, n, p, x): return -Dist(b*c**(-n)*p*(-j + n)/(j*p + m + S(1)), Int((c*x)**(m + n)*(a*x**j + b*x**n)**(p + S(-1)), x), x) + Simp((c*x)**(m + S(1))*(a*x**j + b*x**n)**p/(c*(j*p + m + S(1))), x) def replacement1712(a, b, c, j, m, n, p, x): return Dist(a*c**(-j)*p*(-j + n)/(m + n*p + S(1)), Int((c*x)**(j + m)*(a*x**j + b*x**n)**(p + S(-1)), x), x) + Simp((c*x)**(m + S(1))*(a*x**j + b*x**n)**p/(c*(m + n*p + S(1))), x) def replacement1713(a, b, c, j, m, n, p, x): return -Dist(c**n*(j*p + j + m - n + S(1))/(b*(-j + n)*(p + S(1))), Int((c*x)**(m - n)*(a*x**j + b*x**n)**(p + S(1)), x), x) + Simp(c**(n + S(-1))*(c*x)**(m - n + S(1))*(a*x**j + b*x**n)**(p + S(1))/(b*(-j + n)*(p + S(1))), x) def replacement1714(a, b, c, j, m, n, p, x): return Dist(c**j*(-j + m + n*p + n + S(1))/(a*(-j + n)*(p + S(1))), Int((c*x)**(-j + m)*(a*x**j + b*x**n)**(p + S(1)), x), x) - Simp(c**(j + S(-1))*(c*x)**(-j + m + S(1))*(a*x**j + b*x**n)**(p + S(1))/(a*(-j + n)*(p + S(1))), x) def replacement1715(a, b, c, j, m, n, p, x): return -Dist(a*c**(-j + n)*(j*p + j + m - n + S(1))/(b*(m + n*p + S(1))), Int((c*x)**(j + m - n)*(a*x**j + b*x**n)**p, x), x) + Simp(c**(n + S(-1))*(c*x)**(m - n + S(1))*(a*x**j + b*x**n)**(p + S(1))/(b*(m + n*p + S(1))), x) def replacement1716(a, b, c, j, m, n, p, x): return -Dist(b*c**(j - n)*(-j + m + n*p + n + S(1))/(a*(j*p + m + S(1))), Int((c*x)**(-j + m + n)*(a*x**j + b*x**n)**p, x), x) + Simp(c**(j + S(-1))*(c*x)**(-j + m + S(1))*(a*x**j + b*x**n)**(p + S(1))/(a*(j*p + m + S(1))), x) def replacement1717(a, b, j, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a*x**(j/(m + S(1))) + b*x**(n/(m + S(1))))**p, x), x, x**(m + S(1))), x) def replacement1718(a, b, c, j, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a*x**j + b*x**n)**p, x), x) def replacement1719(a, b, c, j, m, n, p, x): return Dist(a*c**(-j), Int((c*x)**(j + m)*(a*x**j + b*x**n)**(p + S(-1)), x), x) + Simp((c*x)**(m + S(1))*(a*x**j + b*x**n)**p/(c*p*(-j + n)), x) def replacement1720(a, b, j, m, n, x): return Dist(-S(2)/(-j + n), Subst(Int(S(1)/(-a*x**S(2) + S(1)), x), x, x**(j/S(2))/sqrt(a*x**j + b*x**n)), x) def replacement1721(a, b, c, j, m, n, p, x): return Dist(c**j*(-j + m + n*p + n + S(1))/(a*(-j + n)*(p + S(1))), Int((c*x)**(-j + m)*(a*x**j + b*x**n)**(p + S(1)), x), x) - Simp(c**(j + S(-1))*(c*x)**(-j + m + S(1))*(a*x**j + b*x**n)**(p + S(1))/(a*(-j + n)*(p + S(1))), x) def replacement1722(a, b, c, j, m, n, p, x): return Dist(c**IntPart(m)*x**(-FracPart(m))*(c*x)**FracPart(m), Int(x**m*(a*x**j + b*x**n)**p, x), x) def replacement1723(a, b, c, j, m, n, p, x): return Dist(c**IntPart(m)*x**(-j*FracPart(p) - FracPart(m))*(c*x)**FracPart(m)*(a + b*x**(-j + n))**(-FracPart(p))*(a*x**j + b*x**n)**FracPart(p), Int(x**(j*p + m)*(a + b*x**(-j + n))**p, x), x) def replacement1724(a, b, j, m, n, p, u, v, x): return Dist(u**m*v**(-m)/Coefficient(v, x, S(1)), Subst(Int(x**m*(a*x**j + b*x**n)**p, x), x, v), x) def replacement1725(a, b, c, d, j, k, m, n, p, q, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(c + d*x)**q*(a*x**(j/n) + b*x**(k/n))**p, x), x, x**n), x) def replacement1726(a, b, c, d, e, j, k, m, n, p, q, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(c + d*x**n)**q*(a*x**j + b*x**k)**p, x), x) def replacement1727(jn, a, b, c, d, e, j, m, n, p, x): return Simp(c*e**(j + S(-1))*(e*x)**(-j + m + S(1))*(a*x**j + b*x**(j + n))**(p + S(1))/(a*(j*p + m + S(1))), x) def replacement1728(jn, a, b, c, d, e, j, m, n, p, x): return -Dist(e**j*(a*d*(j*p + m + S(1)) - b*c*(m + n + p*(j + n) + S(1)))/(a*b*n*(p + S(1))), Int((e*x)**(-j + m)*(a*x**j + b*x**(j + n))**(p + S(1)), x), x) - Simp(e**(j + S(-1))*(e*x)**(-j + m + S(1))*(-a*d + b*c)*(a*x**j + b*x**(j + n))**(p + S(1))/(a*b*n*(p + S(1))), x) def replacement1729(jn, a, b, c, d, e, j, m, n, p, x): return Dist(e**(-n)*(a*d*(j*p + m + S(1)) - b*c*(m + n + p*(j + n) + S(1)))/(a*(j*p + m + S(1))), Int((e*x)**(m + n)*(a*x**j + b*x**(j + n))**p, x), x) + Simp(c*e**(j + S(-1))*(e*x)**(-j + m + S(1))*(a*x**j + b*x**(j + n))**(p + S(1))/(a*(j*p + m + S(1))), x) def replacement1730(jn, a, b, c, d, e, j, m, n, p, x): return -Dist((a*d*(j*p + m + S(1)) - b*c*(m + n + p*(j + n) + S(1)))/(b*(m + n + p*(j + n) + S(1))), Int((e*x)**m*(a*x**j + b*x**(j + n))**p, x), x) + Simp(d*e**(j + S(-1))*(e*x)**(-j + m + S(1))*(a*x**j + b*x**(j + n))**(p + S(1))/(b*(m + n + p*(j + n) + S(1))), x) def replacement1731(a, b, c, d, j, k, m, n, p, q, x): return Dist(S(1)/(m + S(1)), Subst(Int((c + d*x**(n/(m + S(1))))**q*(a*x**(j/(m + S(1))) + b*x**(k/(m + S(1))))**p, x), x, x**(m + S(1))), x) def replacement1732(a, b, c, d, e, j, k, m, n, p, q, x): return Dist(e**IntPart(m)*x**(-FracPart(m))*(e*x)**FracPart(m), Int(x**m*(c + d*x**n)**q*(a*x**j + b*x**k)**p, x), x) def replacement1733(jn, a, b, c, d, e, j, m, n, p, q, x): return Dist(e**IntPart(m)*x**(-j*FracPart(p) - FracPart(m))*(e*x)**FracPart(m)*(a + b*x**n)**(-FracPart(p))*(a*x**j + b*x**(j + n))**FracPart(p), Int(x**(j*p + m)*(a + b*x**n)**p*(c + d*x**n)**q, x), x) def With1734(Pq, a, b, j, n, p, x): d = Denominator(n) return Dist(d, Subst(Int(x**(d + S(-1))*(a*x**(d*j) + b*x**(d*n))**p*ReplaceAll(SubstFor(x**n, Pq, x), Rule(x, x**(d*n))), x), x, x**(S(1)/d)), x) def replacement1735(Pq, a, b, j, m, n, p, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)*(a*x**(j/n) + b*x)**p*SubstFor(x**n, Pq, x), x), x, x**n), x) def replacement1736(Pq, a, b, c, j, m, n, p, x): return Dist(c**(Quotient(m, sign(m))*sign(m))*x**(-Mod(m, sign(m)))*(c*x)**Mod(m, sign(m)), Int(Pq*x**m*(a*x**j + b*x**n)**p, x), x) def replacement1737(Pq, a, b, c, j, m, n, p, x): return Dist(x**(-m)*(c*x)**m, Int(Pq*x**m*(a*x**j + b*x**n)**p, x), x) def With1738(Pq, a, b, j, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False g = GCD(m + S(1), n) if Unequal(g, S(1)): return True return False def replacement1738(Pq, a, b, j, m, n, p, x): g = GCD(m + S(1), n) return Dist(S(1)/g, Subst(Int(x**(S(-1) + (m + S(1))/g)*(a*x**(j/g) + b*x**(n/g))**p*ReplaceAll(Pq, Rule(x, x**(S(1)/g))), x), x, x**g), x) def With1739(Pq, a, b, c, j, m, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) if And(Greater(q, n + S(-1)), Unequal(m + n*p + q + S(1), S(0)), Or(IntegerQ(S(2)*p), IntegerQ(p + (q + S(1))/(S(2)*n)))): return True return False def replacement1739(Pq, a, b, c, j, m, n, p, x): q = Expon(Pq, x) Pqq = Coeff(Pq, x, q) return Int((c*x)**m*(a*x**j + b*x**n)**p*ExpandToSum(Pq - Pqq*a*x**(-n + q)*(m - n + q + 1)/(b*(m + n*p + q + 1)) - Pqq*x**q, x), x) + Simp(Pqq*c**(n - q - 1)*(c*x)**(m - n + q + 1)*(a*x**j + b*x**n)**(p + 1)/(b*(m + n*p + q + 1)), x) def replacement1740(Pq, a, b, j, m, n, p, x): return Dist(S(1)/(m + S(1)), Subst(Int((a*x**(j/(m + S(1))) + b*x**(n/(m + S(1))))**p*ReplaceAll(SubstFor(x**n, Pq, x), Rule(x, x**(n/(m + S(1))))), x), x, x**(m + S(1))), x) def replacement1741(Pq, a, b, c, j, m, n, p, x): return Dist(c**(Quotient(m, sign(m))*sign(m))*x**(-Mod(m, sign(m)))*(c*x)**Mod(m, sign(m)), Int(Pq*x**m*(a*x**j + b*x**n)**p, x), x) def replacement1742(Pq, a, b, c, j, m, n, p, x): return Dist(x**(-m)*(c*x)**m, Int(Pq*x**m*(a*x**j + b*x**n)**p, x), x) def replacement1743(Pq, a, b, c, j, m, n, p, x): return Int(ExpandIntegrand(Pq*(c*x)**m*(a*x**j + b*x**n)**p, x), x) def replacement1744(Pq, a, b, j, n, p, x): return Int(ExpandIntegrand(Pq*(a*x**j + b*x**n)**p, x), x) def replacement1745(a, b, d, p, x): return Dist(S(3)**(-S(3)*p)*a**(-S(2)*p), Int((S(3)*a - b*x)**p*(S(3)*a + S(2)*b*x)**(S(2)*p), x), x) def replacement1746(a, b, d, p, x): return Int(ExpandToSum((a + b*x + d*x**S(3))**p, x), x) def With1747(a, b, d, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = Factor(a + b*x + d*x**S(3)) if ProductQ(NonfreeFactors(u, x)): return True return False def replacement1747(a, b, d, p, x): u = Factor(a + b*x + d*x**S(3)) return Dist(FreeFactors(u, x)**p, Int(DistributeDegree(NonfreeFactors(u, x), p), x), x) def With1748(a, b, d, p, x): r = Rt(-S(27)*a*d**S(2) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) + S(4)*b**S(3)*d), S(3)) return Dist(S(3)**(-S(3)*p)*d**(-S(2)*p), Int((-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) - sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**p*(-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**p*(S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d - S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p, x), x) def replacement1749(a, b, d, p, x): return Dist((S(3)*a - b*x)**(-p)*(S(3)*a + S(2)*b*x)**(-S(2)*p)*(a + b*x + d*x**S(3))**p, Int((S(3)*a - b*x)**p*(S(3)*a + S(2)*b*x)**(S(2)*p), x), x) def With1750(a, b, d, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = NonfreeFactors(Factor(a + b*x + d*x**S(3)), x) if ProductQ(u): return True return False def replacement1750(a, b, d, p, x): u = NonfreeFactors(Factor(a + b*x + d*x**S(3)), x) return Dist((a + b*x + d*x**S(3))**p/DistributeDegree(u, p), Int(DistributeDegree(u, p), x), x) def With1751(a, b, d, p, x): r = Rt(-S(27)*a*d**S(2) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) + S(4)*b**S(3)*d), S(3)) return Dist((-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) - sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**(-p)*(-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**(-p)*(S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d - S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**(-p)*(a + b*x + d*x**S(3))**p, Int((-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) - sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**p*(-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**p*(S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d - S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p, x), x) def replacement1752(a, b, d, e, f, m, p, x): return Dist(S(3)**(-S(3)*p)*a**(-S(2)*p), Int((S(3)*a - b*x)**p*(S(3)*a + S(2)*b*x)**(S(2)*p)*(e + f*x)**m, x), x) def replacement1753(a, b, d, e, f, m, p, x): return Int(ExpandIntegrand((e + f*x)**m*(a + b*x + d*x**S(3))**p, x), x) def With1754(a, b, d, e, f, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = Factor(a + b*x + d*x**S(3)) if ProductQ(NonfreeFactors(u, x)): return True return False def replacement1754(a, b, d, e, f, m, p, x): u = Factor(a + b*x + d*x**S(3)) return Dist(FreeFactors(u, x)**p, Int((e + f*x)**m*DistributeDegree(NonfreeFactors(u, x), p), x), x) def With1755(a, b, d, e, f, m, p, x): r = Rt(-S(27)*a*d**S(2) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) + S(4)*b**S(3)*d), S(3)) return Dist(S(3)**(-S(3)*p)*d**(-S(2)*p), Int((e + f*x)**m*(-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) - sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**p*(-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**p*(S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d - S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p, x), x) def replacement1756(a, b, d, e, f, m, p, x): return Dist((S(3)*a - b*x)**(-p)*(S(3)*a + S(2)*b*x)**(-S(2)*p)*(a + b*x + d*x**S(3))**p, Int((S(3)*a - b*x)**p*(S(3)*a + S(2)*b*x)**(S(2)*p)*(e + f*x)**m, x), x) def With1757(a, b, d, e, f, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = NonfreeFactors(Factor(a + b*x + d*x**S(3)), x) if ProductQ(u): return True return False def replacement1757(a, b, d, e, f, m, p, x): u = NonfreeFactors(Factor(a + b*x + d*x**S(3)), x) return Dist((a + b*x + d*x**S(3))**p/DistributeDegree(u, p), Int((e + f*x)**m*DistributeDegree(u, p), x), x) def With1758(a, b, d, e, f, m, p, x): r = Rt(-S(27)*a*d**S(2) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) + S(4)*b**S(3)*d), S(3)) return Dist((-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) - sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**(-p)*(-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**(-p)*(S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d - S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**(-p)*(a + b*x + d*x**S(3))**p, Int((e + f*x)**m*(-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) - sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**p*(-S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**p*(S(3)*d*x + S(2)**(S(1)/3)*(S(6)*b*d - S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p, x), x) def replacement1759(a, c, d, p, x): return -Dist(S(3)**(-S(3)*p)*d**(-S(2)*p), Int((c - S(3)*d*x)**p*(S(2)*c + S(3)*d*x)**(S(2)*p), x), x) def replacement1760(a, c, d, p, x): return Int(ExpandToSum((a + c*x**S(2) + d*x**S(3))**p, x), x) def With1761(a, c, d, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = Factor(a + c*x**S(2) + d*x**S(3)) if ProductQ(NonfreeFactors(u, x)): return True return False def replacement1761(a, c, d, p, x): u = Factor(a + c*x**S(2) + d*x**S(3)) return Dist(FreeFactors(u, x)**p, Int(DistributeDegree(NonfreeFactors(u, x), p), x), x) def With1762(a, c, d, p, x): r = Rt(-S(27)*a*d**S(2) - S(2)*c**S(3) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) + S(4)*a*c**S(3)), S(3)) return Dist(S(3)**(-S(3)*p)*d**(-S(2)*p), Int((c + S(3)*d*x - S(2)**(S(1)/3)*(S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**p, x), x) def replacement1763(a, c, d, p, x): return Dist((c - S(3)*d*x)**(-p)*(S(2)*c + S(3)*d*x)**(-S(2)*p)*(a + c*x**S(2) + d*x**S(3))**p, Int((c - S(3)*d*x)**p*(S(2)*c + S(3)*d*x)**(S(2)*p), x), x) def With1764(a, c, d, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = NonfreeFactors(Factor(a + c*x**S(2) + d*x**S(3)), x) if ProductQ(u): return True return False def replacement1764(a, c, d, p, x): u = NonfreeFactors(Factor(a + c*x**S(2) + d*x**S(3)), x) return Dist((a + c*x**S(2) + d*x**S(3))**p/DistributeDegree(u, p), Int(DistributeDegree(u, p), x), x) def With1765(a, c, d, p, x): r = Rt(-S(27)*a*d**S(2) - S(2)*c**S(3) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) + S(4)*a*c**S(3)), S(3)) return Dist((a + c*x**S(2) + d*x**S(3))**p*(c + S(3)*d*x - S(2)**(S(1)/3)*(S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**(-p)*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**(-p)*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**(-p), Int((c + S(3)*d*x - S(2)**(S(1)/3)*(S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**p, x), x) def replacement1766(a, c, d, e, f, m, p, x): return -Dist(S(3)**(-S(3)*p)*d**(-S(2)*p), Int((c - S(3)*d*x)**p*(S(2)*c + S(3)*d*x)**(S(2)*p)*(e + f*x)**m, x), x) def replacement1767(a, c, d, e, f, m, p, x): return Int(ExpandIntegrand((e + f*x)**m*(a + c*x**S(2) + d*x**S(3))**p, x), x) def With1768(a, c, d, e, f, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = Factor(a + c*x**S(2) + d*x**S(3)) if ProductQ(NonfreeFactors(u, x)): return True return False def replacement1768(a, c, d, e, f, m, p, x): u = Factor(a + c*x**S(2) + d*x**S(3)) return Dist(FreeFactors(u, x)**p, Int((e + f*x)**m*DistributeDegree(NonfreeFactors(u, x), p), x), x) def With1769(a, c, d, e, f, m, p, x): r = Rt(-S(27)*a*d**S(2) - S(2)*c**S(3) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) + S(4)*a*c**S(3)), S(3)) return Dist(S(3)**(-S(3)*p)*d**(-S(2)*p), Int((e + f*x)**m*(c + S(3)*d*x - S(2)**(S(1)/3)*(S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**p, x), x) def replacement1770(a, c, d, e, f, m, p, x): return Dist((c - S(3)*d*x)**(-p)*(S(2)*c + S(3)*d*x)**(-S(2)*p)*(a + c*x**S(2) + d*x**S(3))**p, Int((c - S(3)*d*x)**p*(S(2)*c + S(3)*d*x)**(S(2)*p)*(e + f*x)**m, x), x) def With1771(a, c, d, e, f, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = NonfreeFactors(Factor(a + c*x**S(2) + d*x**S(3)), x) if ProductQ(u): return True return False def replacement1771(a, c, d, e, f, m, p, x): u = NonfreeFactors(Factor(a + c*x**S(2) + d*x**S(3)), x) return Dist((a + c*x**S(2) + d*x**S(3))**p/DistributeDegree(u, p), Int((e + f*x)**m*DistributeDegree(u, p), x), x) def With1772(a, c, d, e, f, m, p, x): r = Rt(-S(27)*a*d**S(2) - S(2)*c**S(3) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) + S(4)*a*c**S(3)), S(3)) return Dist((a + c*x**S(2) + d*x**S(3))**p*(c + S(3)*d*x - S(2)**(S(1)/3)*(S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**(-p)*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**(-p)*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**(-p), Int((e + f*x)**m*(c + S(3)*d*x - S(2)**(S(1)/3)*(S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) + sqrt(S(3))*I))/(S(4)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) + S(2)**(S(1)/3)*r**S(2)*(S(1) - sqrt(S(3))*I))/(S(4)*r))**p, x), x) def replacement1773(a, b, c, d, p, x): return Dist(S(3)**(-p)*b**(-p)*c**(-p), Int((b + c*x)**(S(3)*p), x), x) def replacement1774(a, b, c, d, p, x): return Dist(S(3)**(-p)*b**(-p)*c**(-p), Subst(Int((S(3)*a*b*c - b**S(3) + c**S(3)*x**S(3))**p, x), x, c/(S(3)*d) + x), x) def With1775(a, b, c, d, p, x): r = Rt(-S(3)*b*c*d + c**S(3), S(3)) return Dist(S(3)**(-p)*b**(-p)*c**(-p), Int((b + x*(c - r))**p*(b + x*(c + r*(S(1) - sqrt(S(3))*I)/S(2)))**p*(b + x*(c + r*(S(1) + sqrt(S(3))*I)/S(2)))**p, x), x) def replacement1776(a, b, c, d, p, x): return Int(ExpandToSum((a + b*x + c*x**S(2) + d*x**S(3))**p, x), x) def With1777(a, b, c, d, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = Factor(a + b*x + c*x**S(2) + d*x**S(3)) if ProductQ(NonfreeFactors(u, x)): return True return False def replacement1777(a, b, c, d, p, x): u = Factor(a + b*x + c*x**S(2) + d*x**S(3)) return Dist(FreeFactors(u, x)**p, Int(DistributeDegree(NonfreeFactors(u, x), p), x), x) def replacement1778(a, b, c, d, p, x): return Dist(S(3)**(-S(3)*p)*d**(-S(2)*p), Subst(Int((S(27)*a*d**S(2) - S(9)*b*c*d + S(2)*c**S(3) + S(27)*d**S(3)*x**S(3) - S(9)*d*x*(-S(3)*b*d + c**S(2)))**p, x), x, c/(S(3)*d) + x), x) def replacement1779(a, b, c, d, p, x): return Dist((b + c*x)**(-S(3)*p)*(a + b*x + c*x**S(2) + d*x**S(3))**p, Int((b + c*x)**(S(3)*p), x), x) def With1780(a, b, c, d, p, x): r = Rt(-S(3)*a*b*c + b**S(3), S(3)) return Dist((b + c*x - r)**(-p)*(b + c*x + r*(S(1) - sqrt(S(3))*I)/S(2))**(-p)*(b + c*x + r*(S(1) + sqrt(S(3))*I)/S(2))**(-p)*(a + b*x + c*x**S(2) + d*x**S(3))**p, Int((b + c*x - r)**p*(b + c*x + r*(S(1) - sqrt(S(3))*I)/S(2))**p*(b + c*x + r*(S(1) + sqrt(S(3))*I)/S(2))**p, x), x) def With1781(a, b, c, d, p, x): r = Rt(-S(3)*b*c*d + c**S(3), S(3)) return Dist((b + x*(c - r))**(-p)*(b + x*(c + r*(S(1) - sqrt(S(3))*I)/S(2)))**(-p)*(b + x*(c + r*(S(1) + sqrt(S(3))*I)/S(2)))**(-p)*(a + b*x + c*x**S(2) + d*x**S(3))**p, Int((b + x*(c - r))**p*(b + x*(c + r*(S(1) - sqrt(S(3))*I)/S(2)))**p*(b + x*(c + r*(S(1) + sqrt(S(3))*I)/S(2)))**p, x), x) def With1782(a, b, c, d, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = NonfreeFactors(Factor(a + b*x + c*x**S(2) + d*x**S(3)), x) if ProductQ(u): return True return False def replacement1782(a, b, c, d, p, x): u = NonfreeFactors(Factor(a + b*x + c*x**S(2) + d*x**S(3)), x) return Dist((a + b*x + c*x**S(2) + d*x**S(3))**p/DistributeDegree(u, p), Int(DistributeDegree(u, p), x), x) def With1783(a, b, c, d, p, x): r = Rt(-S(27)*a*d**S(2) + S(9)*b*c*d - S(2)*c**S(3) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) - S(18)*a*b*c*d + S(4)*a*c**S(3) + S(4)*b**S(3)*d - b**S(2)*c**S(2)), S(3)) return Dist((c + S(3)*d*x - S(2)**(S(1)/3)*(-S(6)*b*d + S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**(-p)*(c + S(3)*d*x + S(2)**(S(1)/3)*(-S(6)*b*d*(S(1) - sqrt(S(3))*I) + S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*I*r**S(2)*(sqrt(S(3)) - I))/(S(4)*r))**(-p)*(c + S(3)*d*x + S(2)**(S(1)/3)*(-S(6)*b*d*(S(1) + sqrt(S(3))*I) + S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*I*r**S(2)*(sqrt(S(3)) + I))/(S(4)*r))**(-p)*(a + b*x + c*x**S(2) + d*x**S(3))**p, Int((c + S(3)*d*x - S(2)**(S(1)/3)*(-S(6)*b*d + S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(-S(6)*b*d*(S(1) - sqrt(S(3))*I) + S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*I*r**S(2)*(sqrt(S(3)) - I))/(S(4)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(-S(6)*b*d*(S(1) + sqrt(S(3))*I) + S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*I*r**S(2)*(sqrt(S(3)) + I))/(S(4)*r))**p, x), x) def replacement1784(p, u, x): return Int(ExpandToSum(u, x)**p, x) def replacement1785(a, b, c, d, e, f, m, p, x): return Dist(S(3)**(-p)*b**(-p)*c**(-p), Int((b + c*x)**(S(3)*p)*(e + f*x)**m, x), x) def With1786(a, b, c, d, e, f, m, p, x): r = Rt(-S(3)*a*b*c + b**S(3), S(3)) return Dist(S(3)**(-p)*b**(-p)*c**(-p), Int((e + f*x)**m*(b + c*x - r)**p*(b + c*x + r*(S(1) - sqrt(S(3))*I)/S(2))**p*(b + c*x + r*(S(1) + sqrt(S(3))*I)/S(2))**p, x), x) def With1787(a, b, c, d, e, f, m, p, x): r = Rt(-S(3)*b*c*d + c**S(3), S(3)) return Dist(S(3)**(-p)*b**(-p)*c**(-p), Int((b + x*(c - r))**p*(b + x*(c + r*(S(1) - sqrt(S(3))*I)/S(2)))**p*(b + x*(c + r*(S(1) + sqrt(S(3))*I)/S(2)))**p*(e + f*x)**m, x), x) def replacement1788(a, b, c, d, e, f, m, p, x): return Int(ExpandIntegrand((e + f*x)**m*(a + b*x + c*x**S(2) + d*x**S(3))**p, x), x) def With1789(a, b, c, d, e, f, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = Factor(a + b*x + c*x**S(2) + d*x**S(3)) if ProductQ(NonfreeFactors(u, x)): return True return False def replacement1789(a, b, c, d, e, f, m, p, x): u = Factor(a + b*x + c*x**S(2) + d*x**S(3)) return Dist(FreeFactors(u, x)**p, Int((e + f*x)**m*DistributeDegree(NonfreeFactors(u, x), p), x), x) def replacement1790(a, b, c, d, e, f, m, p, x): return Dist(S(3)**(-S(3)*p)*d**(-S(2)*p), Subst(Int((S(27)*a*d**S(2) - S(9)*b*c*d + S(2)*c**S(3) + S(27)*d**S(3)*x**S(3) - S(9)*d*x*(-S(3)*b*d + c**S(2)))**p, x), x, c/(S(3)*d) + x), x) def replacement1791(a, b, c, d, e, f, m, p, x): return Dist((b + c*x)**(-S(3)*p)*(a + b*x + c*x**S(2) + d*x**S(3))**p, Int((b + c*x)**(S(3)*p)*(e + f*x)**m, x), x) def With1792(a, b, c, d, e, f, m, p, x): r = Rt(-S(3)*a*b*c + b**S(3), S(3)) return Dist((b + c*x - r)**(-p)*(b + c*x + r*(S(1) - sqrt(S(3))*I)/S(2))**(-p)*(b + c*x + r*(S(1) + sqrt(S(3))*I)/S(2))**(-p)*(a + b*x + c*x**S(2) + d*x**S(3))**p, Int((e + f*x)**m*(b + c*x - r)**p*(b + c*x + r*(S(1) - sqrt(S(3))*I)/S(2))**p*(b + c*x + r*(S(1) + sqrt(S(3))*I)/S(2))**p, x), x) def With1793(a, b, c, d, e, f, m, p, x): r = Rt(-S(3)*b*c*d + c**S(3), S(3)) return Dist((b + x*(c - r))**(-p)*(b + x*(c + r*(S(1) - sqrt(S(3))*I)/S(2)))**(-p)*(b + x*(c + r*(S(1) + sqrt(S(3))*I)/S(2)))**(-p)*(a + b*x + c*x**S(2) + d*x**S(3))**p, Int((b + x*(c - r))**p*(b + x*(c + r*(S(1) - sqrt(S(3))*I)/S(2)))**p*(b + x*(c + r*(S(1) + sqrt(S(3))*I)/S(2)))**p*(e + f*x)**m, x), x) def With1794(a, b, c, d, e, f, m, p, x): if isinstance(x, (int, Integer, float, Float)): return False u = NonfreeFactors(Factor(a + b*x + c*x**S(2) + d*x**S(3)), x) if ProductQ(u): return True return False def replacement1794(a, b, c, d, e, f, m, p, x): u = NonfreeFactors(Factor(a + b*x + c*x**S(2) + d*x**S(3)), x) return Dist((a + b*x + c*x**S(2) + d*x**S(3))**p/DistributeDegree(u, p), Int((e + f*x)**m*DistributeDegree(u, p), x), x) def With1795(a, b, c, d, e, f, m, p, x): r = Rt(-S(27)*a*d**S(2) + S(9)*b*c*d - S(2)*c**S(3) + S(3)*sqrt(S(3))*d*sqrt(S(27)*a**S(2)*d**S(2) - S(18)*a*b*c*d + S(4)*a*c**S(3) + S(4)*b**S(3)*d - b**S(2)*c**S(2)), S(3)) return Dist((c + S(3)*d*x - S(2)**(S(1)/3)*(-S(6)*b*d + S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**(-p)*(c + S(3)*d*x + S(2)**(S(1)/3)*(-S(6)*b*d*(S(1) - sqrt(S(3))*I) + S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*I*r**S(2)*(sqrt(S(3)) - I))/(S(4)*r))**(-p)*(c + S(3)*d*x + S(2)**(S(1)/3)*(-S(6)*b*d*(S(1) + sqrt(S(3))*I) + S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*I*r**S(2)*(sqrt(S(3)) + I))/(S(4)*r))**(-p)*(a + b*x + c*x**S(2) + d*x**S(3))**p, Int((e + f*x)**m*(c + S(3)*d*x - S(2)**(S(1)/3)*(-S(6)*b*d + S(2)*c**S(2) + S(2)**(S(1)/3)*r**S(2))/(S(2)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(-S(6)*b*d*(S(1) - sqrt(S(3))*I) + S(2)*c**S(2)*(S(1) - sqrt(S(3))*I) + S(2)**(S(1)/3)*I*r**S(2)*(sqrt(S(3)) - I))/(S(4)*r))**p*(c + S(3)*d*x + S(2)**(S(1)/3)*(-S(6)*b*d*(S(1) + sqrt(S(3))*I) + S(2)*c**S(2)*(S(1) + sqrt(S(3))*I) - S(2)**(S(1)/3)*I*r**S(2)*(sqrt(S(3)) + I))/(S(4)*r))**p, x), x) def replacement1796(m, p, u, v, x): return Int(ExpandToSum(u, x)**m*ExpandToSum(v, x)**p, x) def replacement1797(a, b, c, d, e, f, g, x): return Simp(a*f*ArcTan((a*b*x**S(2) + a*b + x*(S(4)*a**S(2) - S(2)*a*c + b**S(2)))/(S(2)*sqrt(a*x**S(4) + a + b*x**S(3) + b*x + c*x**S(2))*Rt(a**S(2)*(S(2)*a - c), S(2))))/(d*Rt(a**S(2)*(S(2)*a - c), S(2))), x) def replacement1798(a, b, c, d, e, f, g, x): return -Simp(a*f*atanh((a*b*x**S(2) + a*b + x*(S(4)*a**S(2) - S(2)*a*c + b**S(2)))/(S(2)*sqrt(a*x**S(4) + a + b*x**S(3) + b*x + c*x**S(2))*Rt(-a**S(2)*(S(2)*a - c), S(2))))/(d*Rt(-a**S(2)*(S(2)*a - c), S(2))), x) def replacement1799(a, b, c, d, e, p, x): return Subst(Int(SimplifyIntegrand((a - b*d/(S(8)*e) + d**S(4)/(S(256)*e**S(3)) + e*x**S(4) + x**S(2)*(c - S(3)*d**S(2)/(S(8)*e)))**p, x), x), x, d/(S(4)*e) + x) def With1800(p, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = Coefficient(v, x, S(0)) b = Coefficient(v, x, S(1)) c = Coefficient(v, x, S(2)) d = Coefficient(v, x, S(3)) e = Coefficient(v, x, S(4)) if And(ZeroQ(S(8)*b*e**S(2) - S(4)*c*d*e + d**S(3)), NonzeroQ(d)): return True return False def replacement1800(p, v, x): a = Coefficient(v, x, S(0)) b = Coefficient(v, x, S(1)) c = Coefficient(v, x, S(2)) d = Coefficient(v, x, S(3)) e = Coefficient(v, x, S(4)) return Subst(Int(SimplifyIntegrand((a - b*d/(S(8)*e) + d**S(4)/(S(256)*e**S(3)) + e*x**S(4) + x**S(2)*(c - S(3)*d**S(2)/(S(8)*e)))**p, x), x), x, d/(S(4)*e) + x) def replacement1801(a, b, c, d, e, p, u, x): return Subst(Int(SimplifyIntegrand((a - b*d/(S(8)*e) + d**S(4)/(S(256)*e**S(3)) + e*x**S(4) + x**S(2)*(c - S(3)*d**S(2)/(S(8)*e)))**p*ReplaceAll(u, Rule(x, -d/(S(4)*e) + x)), x), x), x, d/(S(4)*e) + x) def With1802(p, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = Coefficient(v, x, S(0)) b = Coefficient(v, x, S(1)) c = Coefficient(v, x, S(2)) d = Coefficient(v, x, S(3)) e = Coefficient(v, x, S(4)) if And(ZeroQ(S(8)*b*e**S(2) - S(4)*c*d*e + d**S(3)), NonzeroQ(d)): return True return False def replacement1802(p, u, v, x): a = Coefficient(v, x, S(0)) b = Coefficient(v, x, S(1)) c = Coefficient(v, x, S(2)) d = Coefficient(v, x, S(3)) e = Coefficient(v, x, S(4)) return Subst(Int(SimplifyIntegrand((a - b*d/(S(8)*e) + d**S(4)/(S(256)*e**S(3)) + e*x**S(4) + x**S(2)*(c - S(3)*d**S(2)/(S(8)*e)))**p*ReplaceAll(u, Rule(x, -d/(S(4)*e) + x)), x), x), x, d/(S(4)*e) + x) def replacement1803(a, b, c, d, e, p, x): return Dist(-S(16)*a**S(2), Subst(Int((a*(S(256)*a**S(4)*x**S(4) + S(256)*a**S(3)*e - S(64)*a**S(2)*b*d - S(32)*a**S(2)*x**S(2)*(-S(8)*a*c + S(3)*b**S(2)) + S(16)*a*b**S(2)*c - S(3)*b**S(4))/(-S(4)*a*x + b)**S(4))**p/(-S(4)*a*x + b)**S(2), x), x, S(1)/x + b/(S(4)*a)), x) def With1804(p, v, x): if isinstance(x, (int, Integer, float, Float)): return False a = Coefficient(v, x, S(0)) b = Coefficient(v, x, S(1)) c = Coefficient(v, x, S(2)) d = Coefficient(v, x, S(3)) e = Coefficient(v, x, S(4)) if And(NonzeroQ(a), NonzeroQ(b), ZeroQ(S(8)*a**S(2)*d - S(4)*a*b*c + b**S(3))): return True return False def replacement1804(p, v, x): a = Coefficient(v, x, S(0)) b = Coefficient(v, x, S(1)) c = Coefficient(v, x, S(2)) d = Coefficient(v, x, S(3)) e = Coefficient(v, x, S(4)) return Dist(-S(16)*a**S(2), Subst(Int((a*(S(256)*a**S(4)*x**S(4) + S(256)*a**S(3)*e - S(64)*a**S(2)*b*d - S(32)*a**S(2)*x**S(2)*(-S(8)*a*c + S(3)*b**S(2)) + S(16)*a*b**S(2)*c - S(3)*b**S(4))/(-S(4)*a*x + b)**S(4))**p/(-S(4)*a*x + b)**S(2), x), x, S(1)/x + b/(S(4)*a)), x) def With1805(A, B, C, D, a, b, c, d, e, x): q = sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2)) return -Dist(S(1)/q, Int((A*b - A*q - S(2)*B*a + S(2)*D*a + x*(S(2)*A*a - S(2)*C*a + D*b - D*q))/(S(2)*a*x**S(2) + S(2)*a + x*(b - q)), x), x) + Dist(S(1)/q, Int((A*b + A*q - S(2)*B*a + S(2)*D*a + x*(S(2)*A*a - S(2)*C*a + D*b + D*q))/(S(2)*a*x**S(2) + S(2)*a + x*(b + q)), x), x) def With1806(A, B, D, a, b, c, d, e, x): q = sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2)) return -Dist(S(1)/q, Int((A*b - A*q - S(2)*B*a + S(2)*D*a + x*(S(2)*A*a + D*b - D*q))/(S(2)*a*x**S(2) + S(2)*a + x*(b - q)), x), x) + Dist(S(1)/q, Int((A*b + A*q - S(2)*B*a + S(2)*D*a + x*(S(2)*A*a + D*b + D*q))/(S(2)*a*x**S(2) + S(2)*a + x*(b + q)), x), x) def With1807(A, B, C, D, a, b, c, d, e, m, x): q = sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2)) return -Dist(S(1)/q, Int(x**m*(A*b - A*q - S(2)*B*a + S(2)*D*a + x*(S(2)*A*a - S(2)*C*a + D*b - D*q))/(S(2)*a*x**S(2) + S(2)*a + x*(b - q)), x), x) + Dist(S(1)/q, Int(x**m*(A*b + A*q - S(2)*B*a + S(2)*D*a + x*(S(2)*A*a - S(2)*C*a + D*b + D*q))/(S(2)*a*x**S(2) + S(2)*a + x*(b + q)), x), x) def With1808(A, B, D, a, b, c, d, e, m, x): q = sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2)) return -Dist(S(1)/q, Int(x**m*(A*b - A*q - S(2)*B*a + S(2)*D*a + x*(S(2)*A*a + D*b - D*q))/(S(2)*a*x**S(2) + S(2)*a + x*(b - q)), x), x) + Dist(S(1)/q, Int(x**m*(A*b + A*q - S(2)*B*a + S(2)*D*a + x*(S(2)*A*a + D*b + D*q))/(S(2)*a*x**S(2) + S(2)*a + x*(b + q)), x), x) def With1809(A, B, C, a, b, c, d, e, x): q = Rt(C*(C*(-S(4)*c*e + d**S(2)) + S(2)*e*(-S(4)*A*e + B*d)), S(2)) return Simp(-S(2)*C**S(2)*atanh((-B*e + C*d + S(2)*C*e*x)/q)/q, x) + Simp(S(2)*C**S(2)*atanh(C*(S(12)*A*B*e - S(4)*A*C*d - S(3)*B**S(2)*d + S(4)*B*C*c + S(8)*C**S(2)*e*x**S(3) + S(4)*C*x**S(2)*(-B*e + S(2)*C*d) + S(4)*C*x*(S(2)*A*e - B*d + S(2)*C*c))/(q*(-S(4)*A*C + B**S(2))))/q, x) def With1810(A, C, a, b, c, d, e, x): q = Rt(C*(-S(8)*A*e**S(2) + C*(-S(4)*c*e + d**S(2))), S(2)) return Simp(-S(2)*C**S(2)*atanh(C*(d + S(2)*e*x)/q)/q, x) + Simp(S(2)*C**S(2)*atanh(C*(A*d - S(2)*C*d*x**S(2) - S(2)*C*e*x**S(3) - S(2)*x*(A*e + C*c))/(A*q))/q, x) def With1811(A, B, C, a, b, c, d, e, x): q = Rt(-C*(C*(-S(4)*c*e + d**S(2)) + S(2)*e*(-S(4)*A*e + B*d)), S(2)) return Simp(S(2)*C**S(2)*ArcTan((-B*e + C*d + S(2)*C*e*x)/q)/q, x) - Simp(S(2)*C**S(2)*ArcTan(C*(S(12)*A*B*e - S(4)*A*C*d - S(3)*B**S(2)*d + S(4)*B*C*c + S(8)*C**S(2)*e*x**S(3) + S(4)*C*x**S(2)*(-B*e + S(2)*C*d) + S(4)*C*x*(S(2)*A*e - B*d + S(2)*C*c))/(q*(-S(4)*A*C + B**S(2))))/q, x) def With1812(A, C, a, b, c, d, e, x): q = Rt(-C*(-S(8)*A*e**S(2) + C*(-S(4)*c*e + d**S(2))), S(2)) return Simp(S(2)*C**S(2)*ArcTan((C*d + S(2)*C*e*x)/q)/q, x) - Simp(S(2)*C**S(2)*ArcTan(-C*(-A*d + S(2)*C*d*x**S(2) + S(2)*C*e*x**S(3) + S(2)*x*(A*e + C*c))/(A*q))/q, x) def replacement1813(A, B, C, D, a, b, c, d, e, x): return -Dist(S(1)/(S(4)*e), Int((-S(4)*A*e + D*b + x**S(2)*(-S(4)*C*e + S(3)*D*d) + S(2)*x*(-S(2)*B*e + D*c))/(a + b*x + c*x**S(2) + d*x**S(3) + e*x**S(4)), x), x) + Simp(D*log(a + b*x + c*x**S(2) + d*x**S(3) + e*x**S(4))/(S(4)*e), x) def replacement1814(A, B, D, a, b, c, d, e, x): return -Dist(S(1)/(S(4)*e), Int((-S(4)*A*e + D*b + S(3)*D*d*x**S(2) + S(2)*x*(-S(2)*B*e + D*c))/(a + b*x + c*x**S(2) + d*x**S(3) + e*x**S(4)), x), x) + Simp(D*log(a + b*x + c*x**S(2) + d*x**S(3) + e*x**S(4))/(S(4)*e), x) def replacement1815(a, b, c, d, e, f, u, x): return -Dist(a/(f*(-a*d + b*c)), Int(u*sqrt(c + d*x)/x, x), x) + Dist(c/(e*(-a*d + b*c)), Int(u*sqrt(a + b*x)/x, x), x) def replacement1816(a, b, c, d, e, f, u, x): return Dist(b/(f*(-a*d + b*c)), Int(u*sqrt(c + d*x), x), x) - Dist(d/(e*(-a*d + b*c)), Int(u*sqrt(a + b*x), x), x) def replacement1817(a, b, c, d, e, f, u, x): return Dist(e, Int(u*sqrt(a + b*x)/(a*e**S(2) - c*f**S(2) + x*(b*e**S(2) - d*f**S(2))), x), x) - Dist(f, Int(u*sqrt(c + d*x)/(a*e**S(2) - c*f**S(2) + x*(b*e**S(2) - d*f**S(2))), x), x) def replacement1818(a, b, c, d, n, p, u, x): return Dist(S(1)/(a*c), Int(u*sqrt(a + b*x**(S(2)*n)), x), x) - Dist(b/(a*d), Int(u*x**n, x), x) def replacement1819(a, b, c, d, m, n, p, x): return Dist(c, Int(x**m*sqrt(a + b*x**(S(2)*n))/(a*c**S(2) + x**(S(2)*n)*(b*c**S(2) - d**S(2))), x), x) - Dist(d, Int(x**(m + n)/(a*c**S(2) + x**(S(2)*n)*(b*c**S(2) - d**S(2))), x), x) def With1820(a, b, d, e, f, x): r = Numerator(Rt(a/b, S(3))) s = Denominator(Rt(a/b, S(3))) return Dist(r/(S(3)*a), Int(S(1)/((r + s*x)*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(r/(S(3)*a), Int((S(2)*r - s*x)/(sqrt(d + e*x + f*x**S(2))*(r**S(2) - r*s*x + s**S(2)*x**S(2))), x), x) def With1821(a, b, d, f, x): r = Numerator(Rt(a/b, S(3))) s = Denominator(Rt(a/b, S(3))) return Dist(r/(S(3)*a), Int(S(1)/(sqrt(d + f*x**S(2))*(r + s*x)), x), x) + Dist(r/(S(3)*a), Int((S(2)*r - s*x)/(sqrt(d + f*x**S(2))*(r**S(2) - r*s*x + s**S(2)*x**S(2))), x), x) def With1822(a, b, d, e, f, x): r = Numerator(Rt(-a/b, S(3))) s = Denominator(Rt(-a/b, S(3))) return Dist(r/(S(3)*a), Int(S(1)/((r - s*x)*sqrt(d + e*x + f*x**S(2))), x), x) + Dist(r/(S(3)*a), Int((S(2)*r + s*x)/(sqrt(d + e*x + f*x**S(2))*(r**S(2) + r*s*x + s**S(2)*x**S(2))), x), x) def With1823(a, b, d, f, x): r = Numerator(Rt(-a/b, S(3))) s = Denominator(Rt(-a/b, S(3))) return Dist(r/(S(3)*a), Int(S(1)/(sqrt(d + f*x**S(2))*(r - s*x)), x), x) + Dist(r/(S(3)*a), Int((S(2)*r + s*x)/(sqrt(d + f*x**S(2))*(r**S(2) + r*s*x + s**S(2)*x**S(2))), x), x) def replacement1824(a, b, c, d, e, x): return Dist(d, Int(S(1)/((d**S(2) - e**S(2)*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x) - Dist(e, Int(x/((d**S(2) - e**S(2)*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x) def replacement1825(a, c, d, e, x): return Dist(d, Int(S(1)/(sqrt(a + c*x**S(4))*(d**S(2) - e**S(2)*x**S(2))), x), x) - Dist(e, Int(x/(sqrt(a + c*x**S(4))*(d**S(2) - e**S(2)*x**S(2))), x), x) def replacement1826(a, b, c, d, e, x): return -Dist(c/(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4)), Int((d**S(2) - e**S(2)*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) - Simp(e**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))/((d + e*x)*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))), x) def replacement1827(a, b, c, d, e, x): return -Dist(c/(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4)), Int((d**S(2) - e**S(2)*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x) + Dist((b*d*e**S(2) + S(2)*c*d**S(3))/(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4)), Int(S(1)/((d + e*x)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x) - Simp(e**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))/((d + e*x)*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))), x) def replacement1828(a, c, d, e, x): return -Dist(c/(a*e**S(4) + c*d**S(4)), Int((d**S(2) - e**S(2)*x**S(2))/sqrt(a + c*x**S(4)), x), x) + Dist(S(2)*c*d**S(3)/(a*e**S(4) + c*d**S(4)), Int(S(1)/(sqrt(a + c*x**S(4))*(d + e*x)), x), x) - Simp(e**S(3)*sqrt(a + c*x**S(4))/((d + e*x)*(a*e**S(4) + c*d**S(4))), x) def replacement1829(A, B, a, b, c, d, e, x): return Dist(A, Subst(Int(S(1)/(d - x**S(2)*(-S(2)*a*e + b*d)), x), x, x/sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1830(A, B, a, c, d, e, x): return Dist(A, Subst(Int(S(1)/(S(2)*a*e*x**S(2) + d), x), x, x/sqrt(a + c*x**S(4))), x) def replacement1831(A, B, a, b, c, d, e, f, x): return Dist(A, Subst(Int(S(1)/(d - x**S(2)*(-a*e + b*d)), x), x, x/sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1832(A, B, a, c, d, e, f, x): return Dist(A, Subst(Int(S(1)/(a*e*x**S(2) + d), x), x, x/sqrt(a + c*x**S(4))), x) def replacement1833(A, B, a, b, c, d, f, x): return Dist(A, Subst(Int(S(1)/(-b*d*x**S(2) + d), x), x, x/sqrt(a + b*x**S(2) + c*x**S(4))), x) def replacement1834(a, b, c, d, e, x): return Dist(a/d, Subst(Int(S(1)/(-S(2)*b*x**S(2) + x**S(4)*(-S(4)*a*c + b**S(2)) + S(1)), x), x, x/sqrt(a + b*x**S(2) + c*x**S(4))), x) def With1835(a, b, c, d, e, x): q = sqrt(-S(4)*a*c + b**S(2)) return Simp(sqrt(S(2))*a*sqrt(-b + q)*atanh(sqrt(S(2))*x*sqrt(-b + q)*(b + S(2)*c*x**S(2) + q)/(S(4)*sqrt(a + b*x**S(2) + c*x**S(4))*Rt(-a*c, S(2))))/(S(4)*d*Rt(-a*c, S(2))), x) - Simp(sqrt(S(2))*a*sqrt(b + q)*ArcTan(sqrt(S(2))*x*sqrt(b + q)*(b + S(2)*c*x**S(2) - q)/(S(4)*sqrt(a + b*x**S(2) + c*x**S(4))*Rt(-a*c, S(2))))/(S(4)*d*Rt(-a*c, S(2))), x) def replacement1836(a, b, c, d, e, f, x): return Dist(a, Int(S(1)/((a**S(2) - b**S(2)*x**S(2))*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) - Dist(b, Int(x/((a**S(2) - b**S(2)*x**S(2))*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x) def replacement1837(a, b, c, d, e, f, g, h, x): return Simp(S(2)*sqrt(d + e*x + f*sqrt(a + b*x + c*x**S(2)))*(S(9)*c**S(2)*f*g*h*x**S(2) + S(3)*c**S(2)*f*h**S(2)*x**S(3) + c*f*x*(a*h**S(2) - b*g*h + S(10)*c*g**S(2)) + f*(S(2)*a*b*h**S(2) - S(3)*a*c*g*h - S(2)*b**S(2)*g*h + S(5)*b*c*g**S(2)) - (-d*h + e*g)*sqrt(a + b*x + c*x**S(2))*(-S(2)*b*h + S(5)*c*g + c*h*x))/(S(15)*c**S(2)*f*(g + h*x)), x) def replacement1838(f, g, h, j, k, m, n, u, v, x): return Int((g + h*x)**m*(f*k*sqrt(ExpandToSum(v, x)) + ExpandToSum(f*j + u, x))**n, x) def replacement1839(a, b, c, d, e, f, g, h, n, p, x): return Dist(S(2), Subst(Int((g + h*x**n)**p*(d**S(2)*e + e*x**S(2) - f**S(2)*(-a*e + b*d) - x*(-b*f**S(2) + S(2)*d*e))/(b*f**S(2) - S(2)*d*e + S(2)*e*x)**S(2), x), x, d + e*x + f*sqrt(a + b*x + c*x**S(2))), x) def replacement1840(a, c, d, e, f, g, h, n, p, x): return Dist(S(1)/(S(2)*e), Subst(Int((g + h*x**n)**p*(a*f**S(2) + d**S(2) - S(2)*d*x + x**S(2))/(d - x)**S(2), x), x, d + e*x + f*sqrt(a + c*x**S(2))), x) def replacement1841(f, g, h, n, p, u, v, x): return Int((g + h*(f*sqrt(ExpandToSum(v, x)) + ExpandToSum(u, x))**n)**p, x) def replacement1842(a, c, e, f, g, h, m, n, x): return Dist(S(2)**(-m + S(-1))*e**(-m + S(-1)), Subst(Int(x**(-m + n + S(-2))*(a*f**S(2) + x**S(2))*(-a*f**S(2)*h + S(2)*e*g*x + h*x**S(2))**m, x), x, e*x + f*sqrt(a + c*x**S(2))), x) def replacement1843(a, c, e, f, g, i, m, n, p, x): return Dist(S(2)**(-S(2)*m - p + S(-1))*e**(-p + S(-1))*f**(-S(2)*m)*(i/c)**m, Subst(Int(x**(-S(2)*m + n - p + S(-2))*(-a*f**S(2) + x**S(2))**p*(a*f**S(2) + x**S(2))**(S(2)*m + S(1)), x), x, e*x + f*sqrt(a + c*x**S(2))), x) def replacement1844(a, b, c, d, e, f, g, h, i, m, n, x): return Dist(S(2)*f**(-S(2)*m)*(i/c)**m, Subst(Int(x**n*(b*f**S(2) - S(2)*d*e + S(2)*e*x)**(-S(2)*m + S(-2))*(d**S(2)*e + e*x**S(2) - f**S(2)*(-a*e + b*d) - x*(-b*f**S(2) + S(2)*d*e))**(S(2)*m + S(1)), x), x, d + e*x + f*sqrt(a + b*x + c*x**S(2))), x) def replacement1845(a, c, d, e, f, g, i, m, n, x): return Dist(S(2)**(-S(2)*m + S(-1))*f**(-S(2)*m)*(i/c)**m/e, Subst(Int(x**n*(-d + x)**(-S(2)*m + S(-2))*(a*f**S(2) + d**S(2) - S(2)*d*x + x**S(2))**(S(2)*m + S(1)), x), x, d + e*x + f*sqrt(a + c*x**S(2))), x) def replacement1846(a, b, c, d, e, f, g, h, i, m, n, x): return Dist((i/c)**(m + S(-1)/2)*sqrt(g + h*x + i*x**S(2))/sqrt(a + b*x + c*x**S(2)), Int((a + b*x + c*x**S(2))**m*(d + e*x + f*sqrt(a + b*x + c*x**S(2)))**n, x), x) def replacement1847(a, c, d, e, f, g, i, m, n, x): return Dist((i/c)**(m + S(-1)/2)*sqrt(g + i*x**S(2))/sqrt(a + c*x**S(2)), Int((a + c*x**S(2))**m*(d + e*x + f*sqrt(a + c*x**S(2)))**n, x), x) def replacement1848(a, b, c, d, e, f, g, h, i, m, n, x): return Dist((i/c)**(m + S(1)/2)*sqrt(a + b*x + c*x**S(2))/sqrt(g + h*x + i*x**S(2)), Int((a + b*x + c*x**S(2))**m*(d + e*x + f*sqrt(a + b*x + c*x**S(2)))**n, x), x) def replacement1849(a, c, d, e, f, g, i, m, n, x): return Dist((i/c)**(m + S(1)/2)*sqrt(a + c*x**S(2))/sqrt(g + i*x**S(2)), Int((a + c*x**S(2))**m*(d + e*x + f*sqrt(a + c*x**S(2)))**n, x), x) def replacement1850(f, j, k, m, n, u, v, w, x): return Int((f*k*sqrt(ExpandToSum(v, x)) + ExpandToSum(f*j + u, x))**n*ExpandToSum(w, x)**m, x) def replacement1851(a, b, c, d, n, p, x): return Dist(S(1)/a, Subst(Int(S(1)/(-c*x**S(2) + S(1)), x), x, x/sqrt(c*x**S(2) + d*(a + b*x**n)**(S(2)/n))), x) def replacement1852(a, b, c, d, x): return Simp(S(2)*a*x/sqrt(a + b*sqrt(c + d*x**S(2))), x) + Simp(S(2)*b**S(2)*d*x**S(3)/(S(3)*(a + b*sqrt(c + d*x**S(2)))**(S(3)/2)), x) def replacement1853(a, b, c, d, x): return Dist(sqrt(S(2))*b/a, Subst(Int(S(1)/sqrt(S(1) + x**S(2)/a), x), x, a*x + b*sqrt(c + d*x**S(2))), x) def replacement1854(a, b, c, d, e, x): return Int(sqrt(a*e*x**S(2) + b*e*x*sqrt(c + d*x**S(2)))/(x*sqrt(c + d*x**S(2))), x) def replacement1855(a, b, c, d, x): return Dist(d, Subst(Int(S(1)/(-S(2)*c*x**S(2) + S(1)), x), x, x/sqrt(c*x**S(2) + d*sqrt(a + b*x**S(4)))), x) def replacement1856(a, b, c, d, e, m, x): return Dist(S(1)/2 - I/S(2), Int((c + d*x)**m/sqrt(sqrt(a) - I*b*x**S(2)), x), x) + Dist(S(1)/2 + I/S(2), Int((c + d*x)**m/sqrt(sqrt(a) + I*b*x**S(2)), x), x) def With1857(a, b, c, d, x): q = Rt(b/a, S(3)) return Dist(d/(-c*q + d*(S(1) + sqrt(S(3)))), Int((q*x + S(1) + sqrt(S(3)))/(sqrt(a + b*x**S(3))*(c + d*x)), x), x) - Dist(q/(-c*q + d*(S(1) + sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1858(a, b, c, d, x): q = Rt(-b/a, S(3)) return Dist(d/(c*q + d*(S(1) + sqrt(S(3)))), Int((-q*x + S(1) + sqrt(S(3)))/(sqrt(a + b*x**S(3))*(c + d*x)), x), x) + Dist(q/(c*q + d*(S(1) + sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1859(a, b, c, d, x): q = Rt(-b/a, S(3)) return Dist(d/(c*q + d*(S(1) - sqrt(S(3)))), Int((-q*x - sqrt(S(3)) + S(1))/(sqrt(a + b*x**S(3))*(c + d*x)), x), x) + Dist(q/(c*q + d*(S(1) - sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1860(a, b, c, d, x): q = Rt(b/a, S(3)) return Dist(d/(-c*q + d*(S(1) - sqrt(S(3)))), Int((q*x - sqrt(S(3)) + S(1))/(sqrt(a + b*x**S(3))*(c + d*x)), x), x) - Dist(q/(-c*q + d*(S(1) - sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1861(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(b/a, S(3)) if ZeroQ(-e*q + f*(S(1) + sqrt(S(3)))): return True return False def replacement1861(a, b, c, d, e, f, x): q = Rt(b/a, S(3)) return Dist(S(4)*S(3)**(S(1)/4)*f*sqrt((q**S(2)*x**S(2) - q*x + S(1))/(q*x + S(1) + sqrt(S(3)))**S(2))*sqrt(S(2) - sqrt(S(3)))*(q*x + S(1))/(q*sqrt((q*x + S(1))/(q*x + S(1) + sqrt(S(3)))**S(2))*sqrt(a + b*x**S(3))), Subst(Int(S(1)/(sqrt(S(1) - x**S(2))*sqrt(x**S(2) - S(4)*sqrt(S(3)) + S(7))*(-c*q + d*(S(1) - sqrt(S(3))) + x*(-c*q + d*(S(1) + sqrt(S(3)))))), x), x, (-q*x + S(-1) + sqrt(S(3)))/(q*x + S(1) + sqrt(S(3)))), x) def With1862(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(b/a, S(3)) if NonzeroQ(-e*q + f*(S(1) + sqrt(S(3)))): return True return False def replacement1862(a, b, c, d, e, f, x): q = Rt(b/a, S(3)) return Dist((-c*f + d*e)/(-c*q + d*(S(1) + sqrt(S(3)))), Int((q*x + S(1) + sqrt(S(3)))/(sqrt(a + b*x**S(3))*(c + d*x)), x), x) + Dist((-e*q + f*(S(1) + sqrt(S(3))))/(-c*q + d*(S(1) + sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1863(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-b/a, S(3)) if ZeroQ(e*q + f*(S(1) + sqrt(S(3)))): return True return False def replacement1863(a, b, c, d, e, f, x): q = Rt(-b/a, S(3)) return Dist(-S(4)*S(3)**(S(1)/4)*f*sqrt((q**S(2)*x**S(2) + q*x + S(1))/(-q*x + S(1) + sqrt(S(3)))**S(2))*sqrt(S(2) - sqrt(S(3)))*(-q*x + S(1))/(q*sqrt((-q*x + S(1))/(-q*x + S(1) + sqrt(S(3)))**S(2))*sqrt(a + b*x**S(3))), Subst(Int(S(1)/(sqrt(S(1) - x**S(2))*sqrt(x**S(2) - S(4)*sqrt(S(3)) + S(7))*(c*q + d*(S(1) - sqrt(S(3))) + x*(c*q + d*(S(1) + sqrt(S(3)))))), x), x, (q*x + S(-1) + sqrt(S(3)))/(-q*x + S(1) + sqrt(S(3)))), x) def With1864(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-b/a, S(3)) if NonzeroQ(e*q + f*(S(1) + sqrt(S(3)))): return True return False def replacement1864(a, b, c, d, e, f, x): q = Rt(-b/a, S(3)) return Dist((-c*f + d*e)/(c*q + d*(S(1) + sqrt(S(3)))), Int((-q*x + S(1) + sqrt(S(3)))/(sqrt(a + b*x**S(3))*(c + d*x)), x), x) + Dist((e*q + f*(S(1) + sqrt(S(3))))/(c*q + d*(S(1) + sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1865(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-b/a, S(3)) if ZeroQ(e*q + f*(S(1) - sqrt(S(3)))): return True return False def replacement1865(a, b, c, d, e, f, x): q = Rt(-b/a, S(3)) return Dist(S(4)*S(3)**(S(1)/4)*f*sqrt((q**S(2)*x**S(2) + q*x + S(1))/(-q*x - sqrt(S(3)) + S(1))**S(2))*sqrt(sqrt(S(3)) + S(2))*(-q*x + S(1))/(q*sqrt(-(-q*x + S(1))/(-q*x - sqrt(S(3)) + S(1))**S(2))*sqrt(a + b*x**S(3))), Subst(Int(S(1)/(sqrt(S(1) - x**S(2))*sqrt(x**S(2) + S(4)*sqrt(S(3)) + S(7))*(c*q + d*(S(1) + sqrt(S(3))) + x*(c*q + d*(S(1) - sqrt(S(3)))))), x), x, (-q*x + S(1) + sqrt(S(3)))/(q*x + S(-1) + sqrt(S(3)))), x) def With1866(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(-b/a, S(3)) if NonzeroQ(e*q + f*(S(1) - sqrt(S(3)))): return True return False def replacement1866(a, b, c, d, e, f, x): q = Rt(-b/a, S(3)) return Dist((-c*f + d*e)/(c*q + d*(S(1) - sqrt(S(3)))), Int((-q*x - sqrt(S(3)) + S(1))/(sqrt(a + b*x**S(3))*(c + d*x)), x), x) + Dist((e*q + f*(S(1) - sqrt(S(3))))/(c*q + d*(S(1) - sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def With1867(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(b/a, S(3)) if ZeroQ(-e*q + f*(S(1) - sqrt(S(3)))): return True return False def replacement1867(a, b, c, d, e, f, x): q = Rt(b/a, S(3)) return Dist(-S(4)*S(3)**(S(1)/4)*f*sqrt((q**S(2)*x**S(2) - q*x + S(1))/(q*x - sqrt(S(3)) + S(1))**S(2))*sqrt(sqrt(S(3)) + S(2))*(q*x + S(1))/(q*sqrt(-(q*x + S(1))/(q*x - sqrt(S(3)) + S(1))**S(2))*sqrt(a + b*x**S(3))), Subst(Int(S(1)/(sqrt(S(1) - x**S(2))*sqrt(x**S(2) + S(4)*sqrt(S(3)) + S(7))*(-c*q + d*(S(1) + sqrt(S(3))) + x*(-c*q + d*(S(1) - sqrt(S(3)))))), x), x, (q*x + S(1) + sqrt(S(3)))/(-q*x + S(-1) + sqrt(S(3)))), x) def With1868(a, b, c, d, e, f, x): if isinstance(x, (int, Integer, float, Float)): return False q = Rt(b/a, S(3)) if NonzeroQ(-e*q + f*(S(1) - sqrt(S(3)))): return True return False def replacement1868(a, b, c, d, e, f, x): q = Rt(b/a, S(3)) return Dist((-c*f + d*e)/(-c*q + d*(S(1) - sqrt(S(3)))), Int((q*x - sqrt(S(3)) + S(1))/(sqrt(a + b*x**S(3))*(c + d*x)), x), x) + Dist((-e*q + f*(S(1) - sqrt(S(3))))/(-c*q + d*(S(1) - sqrt(S(3)))), Int(S(1)/sqrt(a + b*x**S(3)), x), x) def replacement1869(a, b, c, d, e, m, n, x): return Dist(S(1)/n, Subst(Int(x**(S(-1) + (m + S(1))/n)/(c + d*x + e*sqrt(a + b*x)), x), x, x**n), x) def replacement1870(a, b, c, d, e, n, u, x): return Dist(c, Int(u/(-a*e**S(2) + c**S(2) + c*d*x**n), x), x) - Dist(a*e, Int(u/(sqrt(a + b*x**n)*(-a*e**S(2) + c**S(2) + c*d*x**n)), x), x) def replacement1871(A, B, a, b, c, d, n, n2, x): return Dist(A**S(2)*(n + S(-1)), Subst(Int(S(1)/(A**S(2)*b*x**S(2)*(n + S(-1))**S(2) + a), x), x, x/(A*(n + S(-1)) - B*x**n)), x) def replacement1872(A, B, a, b, c, d, k, m, n, n2, x): return Dist(A**S(2)*(m - n + S(1))/(m + S(1)), Subst(Int(S(1)/(A**S(2)*b*x**S(2)*(m - n + S(1))**S(2) + a), x), x, x**(m + S(1))/(A*(m - n + S(1)) + B*x**n*(m + S(1)))), x) def replacement1873(a, b, c, d, e, f, g, n, n2, n3, p, x): return -Dist(S(1)/(a*c*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(a*b*(a*g + c*e) - S(2)*a*c*(a*f - c*d*(S(2)*n*(p + S(1)) + S(1))) - b**S(2)*c*d*(n*p + n + S(1)) + x**n*(a*b**S(2)*g*(n*(p + S(2)) + S(1)) - S(2)*a*c*(a*g*(n + S(1)) - c*e*(n*(S(2)*p + S(3)) + S(1))) - b*c*(a*f + c*d)*(n*(S(2)*p + S(3)) + S(1))), x), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-a*b*(a*g + c*e) - S(2)*a*c*(-a*f + c*d) + b**S(2)*c*d + x**n*(-a*b**S(2)*g - S(2)*a*c*(-a*g + c*e) + b*c*(a*f + c*d)))/(a*c*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1874(a, b, c, d, e, f, n, n2, p, x): return -Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(a*b*e - S(2)*a*(a*f - c*d*(S(2)*n*(p + S(1)) + S(1))) - b**S(2)*d*(n*p + n + S(1)) - x**n*(-S(2)*a*c*e*(n*(S(2)*p + S(3)) + S(1)) + b*(a*f + c*d)*(n*(S(2)*p + S(3)) + S(1))), x), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-a*b*e - S(2)*a*(-a*f + c*d) + b**S(2)*d + x**n*(-S(2)*a*c*e + b*(a*f + c*d)))/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1875(a, b, c, d, e, g, n, n2, n3, p, x): return -Dist(S(1)/(a*c*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(a*b*(a*g + c*e) + S(2)*a*c**S(2)*d*(S(2)*n*(p + S(1)) + S(1)) - b**S(2)*c*d*(n*p + n + S(1)) + x**n*(a*b**S(2)*g*(n*(p + S(2)) + S(1)) - S(2)*a*c*(a*g*(n + S(1)) - c*e*(n*(S(2)*p + S(3)) + S(1))) - b*c**S(2)*d*(n*(S(2)*p + S(3)) + S(1))), x), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-a*b*(a*g + c*e) - S(2)*a*c**S(2)*d + b**S(2)*c*d + x**n*(-a*b**S(2)*g - S(2)*a*c*(-a*g + c*e) + b*c**S(2)*d))/(a*c*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1876(a, b, c, d, f, g, n, n2, n3, p, x): return -Dist(S(1)/(a*c*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(a**S(2)*b*g - S(2)*a*c*(a*f - c*d*(S(2)*n*(p + S(1)) + S(1))) - b**S(2)*c*d*(n*p + n + S(1)) + x**n*(-S(2)*a**S(2)*c*g*(n + S(1)) + a*b**S(2)*g*(n*(p + S(2)) + S(1)) - b*c*(a*f + c*d)*(n*(S(2)*p + S(3)) + S(1))), x), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-a**S(2)*b*g - S(2)*a*c*(-a*f + c*d) + b**S(2)*c*d + x**n*(S(2)*a**S(2)*c*g - a*b**S(2)*g + b*c*(a*f + c*d)))/(a*c*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1877(a, b, c, d, f, n, n2, p, x): return Dist(S(1)/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(S(2)*a*(a*f - c*d*(S(2)*n*(p + S(1)) + S(1))) + b**S(2)*d*(n*p + n + S(1)) + b*x**n*(a*f + c*d)*(n*(S(2)*p + S(3)) + S(1)), x), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*(-a*f + c*d) + b**S(2)*d + b*x**n*(a*f + c*d))/(a*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1878(a, b, c, d, g, n, n2, n3, p, x): return -Dist(S(1)/(a*c*n*(p + S(1))*(-S(4)*a*c + b**S(2))), Int((a + b*x**n + c*x**(S(2)*n))**(p + S(1))*Simp(a**S(2)*b*g + S(2)*a*c**S(2)*d*(S(2)*n*(p + S(1)) + S(1)) - b**S(2)*c*d*(n*p + n + S(1)) + x**n*(-S(2)*a**S(2)*c*g*(n + S(1)) + a*b**S(2)*g*(n*(p + S(2)) + S(1)) - b*c**S(2)*d*(n*(S(2)*p + S(3)) + S(1))), x), x), x) - Simp(x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))*(-a**S(2)*b*g - S(2)*a*c**S(2)*d + b**S(2)*c*d + x**n*(S(2)*a**S(2)*c*g - a*b**S(2)*g + b*c**S(2)*d))/(a*c*n*(p + S(1))*(-S(4)*a*c + b**S(2))), x) def replacement1879(a, c, d, e, f, g, n, n2, n3, p, x): return -Dist(-S(1)/(S(4)*a**S(2)*c**S(2)*n*(p + S(1))), Int((a + c*x**(S(2)*n))**(p + S(1))*Simp(-S(2)*a*c*x**n*(a*g*(n + S(1)) - c*e*(n*(S(2)*p + S(3)) + S(1))) - S(2)*a*c*(a*f - c*d*(S(2)*n*(p + S(1)) + S(1))), x), x), x) - Simp(-x*(a + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*c*x**n*(-a*g + c*e) - S(2)*a*c*(-a*f + c*d))/(S(4)*a**S(2)*c**S(2)*n*(p + S(1))), x) def replacement1880(a, c, d, e, f, n, n2, p, x): return -Dist(-S(1)/(S(4)*a**S(2)*c*n*(p + S(1))), Int((a + c*x**(S(2)*n))**(p + S(1))*Simp(S(2)*a*c*e*x**n*(n*(S(2)*p + S(3)) + S(1)) - S(2)*a*(a*f - c*d*(S(2)*n*(p + S(1)) + S(1))), x), x), x) - Simp(-x*(a + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*c*e*x**n - S(2)*a*(-a*f + c*d))/(S(4)*a**S(2)*c*n*(p + S(1))), x) def replacement1881(a, c, d, e, g, n, n2, n3, p, x): return -Dist(-S(1)/(S(4)*a**S(2)*c**S(2)*n*(p + S(1))), Int((a + c*x**(S(2)*n))**(p + S(1))*Simp(S(2)*a*c**S(2)*d*(S(2)*n*(p + S(1)) + S(1)) - S(2)*a*c*x**n*(a*g*(n + S(1)) - c*e*(n*(S(2)*p + S(3)) + S(1))), x), x), x) - Simp(-x*(a + c*x**(S(2)*n))**(p + S(1))*(-S(2)*a*c**S(2)*d - S(2)*a*c*x**n*(-a*g + c*e))/(S(4)*a**S(2)*c**S(2)*n*(p + S(1))), x) def With1882(a, b, c, d, e, f, g, x): q = Rt((S(12)*a**S(2)*g**S(2) - a*c*f**S(2) + f*(-S(2)*a*b*g + S(3)*c**S(2)*d))/(c*g*(-a*f + S(3)*c*d)), S(2)) r = Rt((a*c*f**S(2) - f*(S(2)*a*b*g + S(3)*c**S(2)*d) + S(4)*g*(a**S(2)*g + b*c*d))/(c*g*(-a*f + S(3)*c*d)), S(2)) return -Simp(c*ArcTan((r - S(2)*x)/q)/(g*q), x) + Simp(c*ArcTan((r + S(2)*x)/q)/(g*q), x) - Simp(c*ArcTan(x*(-a*f + S(3)*c*d)*(S(6)*a**S(2)*b*g**S(2) - S(2)*a**S(2)*c*f*g - a*b**S(2)*f*g + b*c**S(2)*d*f + c**S(2)*g*x**S(4)*(-a*f + S(3)*c*d) + c*x**S(2)*(S(2)*a**S(2)*g**S(2) - a*c*f**S(2) - b*c*d*g + S(3)*c**S(2)*d*f))/(g*q*(-S(2)*a**S(2)*g + b*c*d)*(S(4)*a**S(2)*g - a*b*f + b*c*d)))/(g*q), x) def With1883(a, c, d, e, f, g, x): q = Rt((S(12)*a**S(2)*g**S(2) - a*c*f**S(2) + S(3)*c**S(2)*d*f)/(c*g*(-a*f + S(3)*c*d)), S(2)) r = Rt((S(4)*a**S(2)*g**S(2) + a*c*f**S(2) - S(3)*c**S(2)*d*f)/(c*g*(-a*f + S(3)*c*d)), S(2)) return -Simp(c*ArcTan((r - S(2)*x)/q)/(g*q), x) + Simp(c*ArcTan((r + S(2)*x)/q)/(g*q), x) - Simp(c*ArcTan(c*x*(-a*f + S(3)*c*d)*(S(2)*a**S(2)*f*g - c*g*x**S(4)*(-a*f + S(3)*c*d) - x**S(2)*(S(2)*a**S(2)*g**S(2) - a*c*f**S(2) + S(3)*c**S(2)*d*f))/(S(8)*a**S(4)*g**S(3)*q))/(g*q), x) def With1884(p, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False try: m = Exponent(u, x) n = Exponent(v, x) c = Coefficient(u, x, m)/((m + n*p + S(1))*Coefficient(v, x, n)) c = Coefficient(u, x, m)/((m + n*p + S(1))*Coefficient(v, x, n)) w = Apart(-c*x**(m - n)*(v*(m - n + S(1)) + x*(p + S(1))*D(v, x)) + u, x) res = And(Inequality(S(1), Less, n, LessEqual, m + S(1)), Less(m + n*p, S(-1)), FalseQ(DerivativeDivides(v, u, x))) except (TypeError, AttributeError): return False if res: return True return False def replacement1884(p, u, v, x): m = Exponent(u, x) n = Exponent(v, x) c = Coefficient(u, x, m)/((m + n*p + S(1))*Coefficient(v, x, n)) c = Coefficient(u, x, m)/((m + n*p + S(1))*Coefficient(v, x, n)) w = Apart(-c*x**(m - n)*(v*(m - n + S(1)) + x*(p + S(1))*D(v, x)) + u, x) return Simp(If(ZeroQ(w), c*v**(p + 1)*x**(m - n + 1), c*v**(p + 1)*x**(m - n + 1) + Int(v**p*w, x)), x)
1d2f7080febc5cc6b162ca5586629aea140569b379ab9c1b83556c337b8afb18
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def integrand_simplification(): from sympy.integrals.rubi.constraints import cons1, cons2, cons3, cons4, cons5, cons6, cons7, cons8, cons9, cons10, cons11, cons12, cons13, cons14, cons15, cons16, cons17, cons18, cons19, cons20, cons21, cons22, cons23, cons24, cons25, cons26, cons27, cons28, cons29, cons30, cons31, cons32, cons33, cons34, cons35, cons36, cons37, cons38, cons39, cons40, cons41, cons42, cons43, cons44, cons45, cons46, cons47, cons48, cons49, cons50, cons51, cons52, cons53, cons54, cons55, cons56, cons57, cons58, cons59, cons60, cons61, cons62, cons63, cons64, cons65, cons66, cons67 pattern1 = Pattern(Integral((a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons4, cons5, cons1) rule1 = ReplacementRule(pattern1, replacement1) pattern2 = Pattern(Integral((x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons4, cons5, cons6) rule2 = ReplacementRule(pattern2, replacement2) pattern3 = Pattern(Integral((a_ + x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons7, cons1) rule3 = ReplacementRule(pattern3, replacement3) pattern4 = Pattern(Integral((x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons7, cons6) rule4 = ReplacementRule(pattern4, replacement4) pattern5 = Pattern(Integral((x_**WC('j', S(1))*WC('c', S(1)) + x_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons7, cons9) rule5 = ReplacementRule(pattern5, replacement5) pattern6 = Pattern(Integral((v_*WC('a', S(1)) + v_*WC('b', S(1)) + WC('w', S(0)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons10) rule6 = ReplacementRule(pattern6, replacement6) pattern7 = Pattern(Integral(Pm_**p_*WC('u', S(1)), x_), cons11, cons12, cons13) rule7 = ReplacementRule(pattern7, replacement7) pattern8 = Pattern(Integral(a_, x_), cons2, cons2) rule8 = ReplacementRule(pattern8, replacement8) pattern9 = Pattern(Integral(a_*(b_ + x_*WC('c', S(1))), x_), cons2, cons3, cons8, cons14) rule9 = ReplacementRule(pattern9, replacement9) pattern10 = Pattern(Integral(-u_, x_)) rule10 = ReplacementRule(pattern10, replacement10) pattern11 = Pattern(Integral(u_*Complex(S(0), a_), x_), cons2, cons15) rule11 = ReplacementRule(pattern11, replacement11) pattern12 = Pattern(Integral(a_*u_, x_), cons2, cons16) rule12 = ReplacementRule(pattern12, replacement12) pattern13 = Pattern(Integral(u_, x_), cons17) rule13 = ReplacementRule(pattern13, replacement13) pattern14 = Pattern(Integral(u_*(x_*WC('c', S(1)))**WC('m', S(1)), x_), cons8, cons19, cons17, cons18) rule14 = ReplacementRule(pattern14, replacement14) pattern15 = Pattern(Integral(v_**WC('m', S(1))*(b_*v_)**n_*WC('u', S(1)), x_), cons3, cons4, cons20) rule15 = ReplacementRule(pattern15, replacement15) pattern16 = Pattern(Integral((v_*WC('a', S(1)))**m_*(v_*WC('b', S(1)))**n_*WC('u', S(1)), x_), cons2, cons3, cons19, cons21, cons22, cons23) rule16 = ReplacementRule(pattern16, replacement16) pattern17 = Pattern(Integral((v_*WC('a', S(1)))**m_*(v_*WC('b', S(1)))**n_*WC('u', S(1)), x_), cons2, cons3, cons19, cons21, cons24, cons23) rule17 = ReplacementRule(pattern17, replacement17) pattern18 = Pattern(Integral((v_*WC('a', S(1)))**m_*(v_*WC('b', S(1)))**n_*WC('u', S(1)), x_), cons2, cons3, cons19, cons4, cons21, cons25, cons23) rule18 = ReplacementRule(pattern18, replacement18) pattern19 = Pattern(Integral((v_*WC('a', S(1)))**m_*(v_*WC('b', S(1)))**n_*WC('u', S(1)), x_), cons2, cons3, cons19, cons4, cons21, cons25, cons26) rule19 = ReplacementRule(pattern19, replacement19) pattern20 = Pattern(Integral((a_ + v_*WC('b', S(1)))**WC('m', S(1))*(c_ + v_*WC('d', S(1)))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons27, cons20, cons28) rule20 = ReplacementRule(pattern20, replacement20) pattern21 = Pattern(Integral((a_ + v_*WC('b', S(1)))**m_*(c_ + v_*WC('d', S(1)))**n_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons27, cons30, cons31) rule21 = ReplacementRule(pattern21, replacement21) pattern22 = Pattern(Integral((a_ + v_*WC('b', S(1)))**m_*(c_ + v_*WC('d', S(1)))**n_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons27, cons32) rule22 = ReplacementRule(pattern22, replacement22) pattern23 = Pattern(Integral((v_*WC('a', S(1)))**m_*(v_**S(2)*WC('c', S(1)) + v_*WC('b', S(1)))*WC('u', S(1)), x_), cons2, cons3, cons8, cons33, cons34) rule23 = ReplacementRule(pattern23, replacement23) pattern24 = Pattern(Integral((a_ + v_*WC('b', S(1)))**m_*(v_**S(2)*WC('C', S(1)) + v_*WC('B', S(1)) + WC('A', S(0)))*WC('u', S(1)), x_), cons2, cons3, cons36, cons37, cons38, cons35, cons33, cons34) rule24 = ReplacementRule(pattern24, replacement24) pattern25 = Pattern(Integral((a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('m', S(1))*(c_ + x_**WC('q', S(1))*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons39, cons40, cons41, cons42) rule25 = ReplacementRule(pattern25, replacement25) pattern26 = Pattern(Integral((a_ + x_**WC('n', S(1))*WC('b', S(1)))**WC('m', S(1))*(c_ + x_**j_*WC('d', S(1)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons5, cons7, cons43, cons44, cons45, cons46) rule26 = ReplacementRule(pattern26, replacement26) pattern27 = Pattern(Integral((a_ + x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons47, cons40) rule27 = ReplacementRule(pattern27, replacement27) pattern28 = Pattern(Integral((a_ + x_**n_*WC('b', S(1)) + x_**WC('n2', S(1))*WC('c', S(1)))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons4, cons48, cons47, cons40) rule28 = ReplacementRule(pattern28, replacement28) pattern29 = Pattern(Integral((d_ + x_*WC('e', S(1)))*(x_**S(2)*WC('c', S(1)) + x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons49) rule29 = ReplacementRule(pattern29, replacement29) pattern30 = Pattern(Integral((x_**WC('p', S(1))*WC('a', S(1)) + x_**WC('q', S(1))*WC('b', S(1)))**WC('m', S(1))*WC('u', S(1)), x_), cons2, cons3, cons5, cons52, cons20, cons51) rule30 = ReplacementRule(pattern30, replacement30) pattern31 = Pattern(Integral((x_**WC('p', S(1))*WC('a', S(1)) + x_**WC('q', S(1))*WC('b', S(1)) + x_**WC('r', S(1))*WC('c', S(1)))**WC('m', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons5, cons52, cons54, cons20, cons51, cons53) rule31 = ReplacementRule(pattern31, replacement31) pattern32 = Pattern(Integral(x_**WC('m', S(1))/(a_ + x_**n_*WC('b', S(1))), x_), cons2, cons3, cons19, cons4, cons55) rule32 = ReplacementRule(pattern32, replacement32) pattern33 = Pattern(Integral(x_**WC('m', S(1))*(a_ + x_**n_*WC('b', S(1)))**p_, x_), cons2, cons3, cons19, cons4, cons5, cons55, cons56) rule33 = ReplacementRule(pattern33, replacement33) pattern34 = Pattern(Integral(x_**WC('m', S(1))*(a1_ + x_**WC('n', S(1))*WC('b1', S(1)))**p_*(a2_ + x_**WC('n', S(1))*WC('b2', S(1)))**p_, x_), cons59, cons60, cons61, cons62, cons19, cons4, cons5, cons57, cons58, cons56) rule34 = ReplacementRule(pattern34, replacement34) pattern35 = Pattern(Integral(Qm_*(Pm_**WC('n', S(1))*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons4, cons5, cons11, cons63, CustomConstraint(With35)) rule35 = ReplacementRule(pattern35, replacement35) pattern36 = Pattern(Integral(Qm_*(Pm_**WC('n', S(1))*WC('b', S(1)) + Pm_**WC('n2', S(1))*WC('c', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons48, cons11, cons63, CustomConstraint(With36)) rule36 = ReplacementRule(pattern36, replacement36) pattern37 = Pattern(Integral(Pq_**m_*Qr_**p_*WC('u', S(1)), x_), cons64, cons65, cons66, cons67, CustomConstraint(With37)) rule37 = ReplacementRule(pattern37, replacement37) pattern38 = Pattern(Integral(Pq_*Qr_**p_*WC('u', S(1)), x_), cons65, cons66, cons67, CustomConstraint(With38)) rule38 = ReplacementRule(pattern38, replacement38) return [rule1, rule2, rule3, rule4, rule5, rule6, rule7, rule8, rule9, rule10, rule11, rule12, rule13, rule14, rule15, rule16, rule17, rule18, rule19, rule20, rule21, rule22, rule23, rule24, rule25, rule26, rule27, rule28, rule29, rule30, rule31, rule32, rule33, rule34, rule35, rule36, rule37, rule38, ] def replacement1(a, b, n, p, u, x): return Int(u*(b*x**n)**p, x) def replacement2(a, b, n, p, u, x): return Int(a**p*u, x) def replacement3(a, b, c, j, n, p, u, x): return Int(u*(b*x**n + c*x**(S(2)*n))**p, x) def replacement4(a, b, c, j, n, p, u, x): return Int(u*(a + c*x**(S(2)*n))**p, x) def replacement5(a, b, c, j, n, p, u, x): return Int(u*(a + b*x**n)**p, x) def replacement6(a, b, p, u, v, w, x): return Int(u*(v*(a + b) + w)**p, x) def replacement7(Pm, p, u, x): return Int(Pm**p*u, x) def replacement8(a, x): return Simp(a*x, x) def replacement9(a, b, c, x): return Simp(a*(b + c*x)**S(2)/(S(2)*c), x) def replacement10(u, x): return Dist(S(-1), Int(u, x), x) def replacement11(a, u, x): return Dist(Complex(S(0), a), Int(u, x), x) def replacement12(a, u, x): return Dist(a, Int(u, x), x) def replacement13(u, x): return Simp(IntSum(u, x), x) def replacement14(c, m, u, x): return Int(ExpandIntegrand(u*(c*x)**m, x), x) def replacement15(b, m, n, u, v, x): return Dist(b**(-m), Int(u*(b*v)**(m + n), x), x) def replacement16(a, b, m, n, u, v, x): return Dist(a**(m + S(1)/2)*b**(n + S(-1)/2)*sqrt(b*v)/sqrt(a*v), Int(u*v**(m + n), x), x) def replacement17(a, b, m, n, u, v, x): return Dist(a**(m + S(-1)/2)*b**(n + S(1)/2)*sqrt(a*v)/sqrt(b*v), Int(u*v**(m + n), x), x) def replacement18(a, b, m, n, u, v, x): return Dist(a**(m + n)*(a*v)**(-n)*(b*v)**n, Int(u*v**(m + n), x), x) def replacement19(a, b, m, n, u, v, x): return Dist(a**(-IntPart(n))*b**IntPart(n)*(a*v)**(-FracPart(n))*(b*v)**FracPart(n), Int(u*(a*v)**(m + n), x), x) def replacement20(a, b, c, d, m, n, u, v, x): return Dist((b/d)**m, Int(u*(c + d*v)**(m + n), x), x) def replacement21(a, b, c, d, m, n, u, v, x): return Dist((b/d)**m, Int(u*(c + d*v)**(m + n), x), x) def replacement22(a, b, c, d, m, n, u, v, x): return Dist((a + b*v)**m*(c + d*v)**(-m), Int(u*(c + d*v)**(m + n), x), x) def replacement23(a, b, c, m, u, v, x): return Dist(S(1)/a, Int(u*(a*v)**(m + S(1))*(b + c*v), x), x) def replacement24(A, B, C, a, b, m, u, v, x): return Dist(b**(S(-2)), Int(u*(a + b*v)**(m + S(1))*Simp(B*b - C*a + C*b*v, x), x), x) def replacement25(a, b, c, d, m, n, p, q, u, x): return Dist((d/a)**p, Int(u*x**(-n*p)*(a + b*x**n)**(m + p), x), x) def replacement26(a, b, c, d, j, m, n, p, u, x): return Dist((-b**S(2)/d)**m, Int(u*(a - b*x**n)**(-m), x), x) def replacement27(a, b, c, p, u, x): return Int(S(2)**(-S(2)*p)*c**(-p)*u*(b + S(2)*c*x)**(S(2)*p), x) def replacement28(a, b, c, n, n2, p, u, x): return Dist(c**(-p), Int(u*(b/S(2) + c*x**n)**(S(2)*p), x), x) def replacement29(a, b, c, d, e, p, x): return Dist(d/b, Subst(Int(x**p, x), x, a + b*x + c*x**S(2)), x) def replacement30(a, b, m, p, q, u, x): return Int(u*x**(m*p)*(a + b*x**(-p + q))**m, x) def replacement31(a, b, c, m, p, q, r, u, x): return Int(u*x**(m*p)*(a + b*x**(-p + q) + c*x**(-p + r))**m, x) def replacement32(a, b, m, n, x): return Simp(log(RemoveContent(a + b*x**n, x))/(b*n), x) def replacement33(a, b, m, n, p, x): return Simp((a + b*x**n)**(p + S(1))/(b*n*(p + S(1))), x) def replacement34(a1, a2, b1, b2, m, n, p, x): return Simp((a1 + b1*x**n)**(p + S(1))*(a2 + b2*x**n)**(p + S(1))/(S(2)*b1*b2*n*(p + S(1))), x) def With35(Pm, Qm, a, b, n, p, x): if isinstance(x, (int, Integer, float, Float)): return False m = Expon(Pm, x) if And(Equal(Expon(Qm, x), m + S(-1)), ZeroQ(-Qm*m*Coeff(Pm, x, m) + Coeff(Qm, x, m + S(-1))*D(Pm, x))): return True return False def replacement35(Pm, Qm, a, b, n, p, x): m = Expon(Pm, x) return Dist(Coeff(Qm, x, m + S(-1))/(m*Coeff(Pm, x, m)), Subst(Int((a + b*x**n)**p, x), x, Pm), x) def With36(Pm, Qm, a, b, c, n, n2, p, x): if isinstance(x, (int, Integer, float, Float)): return False m = Expon(Pm, x) if And(Equal(Expon(Qm, x), m + S(-1)), ZeroQ(-Qm*m*Coeff(Pm, x, m) + Coeff(Qm, x, m + S(-1))*D(Pm, x))): return True return False def replacement36(Pm, Qm, a, b, c, n, n2, p, x): m = Expon(Pm, x) return Dist(Coeff(Qm, x, m + S(-1))/(m*Coeff(Pm, x, m)), Subst(Int((a + b*x**n + c*x**(S(2)*n))**p, x), x, Pm), x) def With37(Pq, Qr, m, p, u, x): if isinstance(x, (int, Integer, float, Float)): return False gcd = PolyGCD(Pq, Qr, x) if NonzeroQ(gcd + S(-1)): return True return False def replacement37(Pq, Qr, m, p, u, x): gcd = PolyGCD(Pq, Qr, x) return Int(gcd**(m + p)*u*PolynomialQuotient(Pq, gcd, x)**m*PolynomialQuotient(Qr, gcd, x)**p, x) def With38(Pq, Qr, p, u, x): if isinstance(x, (int, Integer, float, Float)): return False gcd = PolyGCD(Pq, Qr, x) if NonzeroQ(gcd + S(-1)): return True return False def replacement38(Pq, Qr, p, u, x): gcd = PolyGCD(Pq, Qr, x) return Int(gcd**(p + S(1))*u*PolynomialQuotient(Pq, gcd, x)*PolynomialQuotient(Qr, gcd, x)**p, x)
35d0f95ba402f9b1575750f9df4a8469ca4b8b760cc87ce2c3d2e07417601eb8
""" This code is automatically generated. Never edit it manually. For details of generating the code see `rubi_parsing_guide.md` in `parsetools`. """ from sympy.external import import_module matchpy = import_module("matchpy") if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, rubi_exp as exp, rubi_log as log, Discriminant, Negative, Quotient ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core import EulerGamma from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import (Abs, sign) from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi A_, B_, C_, F_, G_, H_, a_, b_, c_, d_, e_, f_, g_, h_, i_, j_, k_, l_, m_, n_, p_, q_, r_, t_, u_, v_, s_, w_, x_, y_, z_ = [WC(i) for i in 'ABCFGHabcdefghijklmnpqrtuvswxyz'] a1_, a2_, b1_, b2_, c1_, c2_, d1_, d2_, n1_, n2_, e1_, e2_, f1_, f2_, g1_, g2_, n1_, n2_, n3_, Pq_, Pm_, Px_, Qm_, Qr_, Qx_, jn_, mn_, non2_, RFx_, RGx_ = [WC(i) for i in ['a1', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2', 'n1', 'n2', 'e1', 'e2', 'f1', 'f2', 'g1', 'g2', 'n1', 'n2', 'n3', 'Pq', 'Pm', 'Px', 'Qm', 'Qr', 'Qx', 'jn', 'mn', 'non2', 'RFx', 'RGx']] i, ii, Pqq, Q, R, r, C, k, u = symbols('i ii Pqq Q R r C k u') _UseGamma = False ShowSteps = False StepCounter = None def miscellaneous_trig(): from sympy.integrals.rubi.constraints import cons1648, cons21, cons2, cons3, cons8, cons29, cons19, cons4, cons36, cons37, cons38, cons1649, cons1650, cons1651, cons1652, cons1653, cons1654, cons1655, cons27, cons1656, cons1410, cons210, cons40, cons50, cons127, cons149, cons345, cons5, cons242, cons246, cons1335, cons139, cons1657, cons1290, cons168, cons321, cons1658, cons33, cons251, cons96, cons255, cons13, cons165, cons248, cons1280, cons1659, cons1660, cons1661, cons172, cons1662, cons1663, cons95, cons91, cons1664, cons164, cons90, cons1665, cons1666, cons87, cons130, cons1481, cons746, cons1484, cons1667, cons25, cons1668, cons1669, cons1670, cons1671, cons1249, cons1672, cons1673, cons1674, cons1675, cons557, cons1676, cons630, cons10, cons1677, cons1678, cons1679, cons68, cons1232, cons378, cons51, cons52, cons53, cons54, cons1680, cons1441, cons1681, cons1682, cons1683, cons1684, cons64, cons586, cons466, cons1685, cons170, cons1686, cons1687, cons1688, cons1689, cons1690, cons814, cons815, cons20, cons1691, cons1692, cons1693, cons1694, cons1101, cons1695, cons89, cons167, cons1696, cons1697, cons1397, cons1698, cons1444, cons1699, cons1504, cons965, cons1700, cons1646, cons1701, cons198, cons1702, cons1013, cons152, cons1553, cons1703, cons1704, cons211, cons226, cons1705, cons812, cons813, cons150, cons530, cons1706, cons1707, cons1708, cons1709, cons1710, cons56, cons1711, cons1712, cons148, cons1713, cons1507, cons1714, cons1715, cons1716, cons1717, cons1718, cons1719, cons1720, cons1721, cons1647, cons1722, cons1723, cons1724, cons1725, cons1726, cons340, cons55, cons629, cons73, cons1727, cons1728, cons1729, cons1730, cons1362, cons1480, cons465, cons1731, cons1732, cons1733, cons1734, cons1267, cons1269, cons1476, cons1483, cons1735 pattern4688 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1648, cons21) rule4688 = ReplacementRule(pattern4688, replacement4688) pattern4689 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1648, cons21) rule4689 = ReplacementRule(pattern4689, replacement4689) pattern4690 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1648, cons21) rule4690 = ReplacementRule(pattern4690, replacement4690) pattern4691 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1648, cons21) rule4691 = ReplacementRule(pattern4691, replacement4691) pattern4692 = Pattern(Integral(u_*(WC('c', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1648) rule4692 = ReplacementRule(pattern4692, replacement4692) pattern4693 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1648) rule4693 = ReplacementRule(pattern4693, replacement4693) pattern4694 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1648) rule4694 = ReplacementRule(pattern4694, replacement4694) pattern4695 = Pattern(Integral(u_*(WC('c', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1648) rule4695 = ReplacementRule(pattern4695, replacement4695) pattern4696 = Pattern(Integral(u_*(WC('c', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1648) rule4696 = ReplacementRule(pattern4696, replacement4696) pattern4697 = Pattern(Integral(u_*(WC('c', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons1648) rule4697 = ReplacementRule(pattern4697, replacement4697) pattern4698 = Pattern(Integral(u_*(WC('c', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons1648) rule4698 = ReplacementRule(pattern4698, replacement4698) pattern4699 = Pattern(Integral(u_*(A_ + WC('B', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons1648) rule4699 = ReplacementRule(pattern4699, replacement4699) pattern4700 = Pattern(Integral(u_*(A_ + WC('B', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons1648) rule4700 = ReplacementRule(pattern4700, replacement4700) pattern4701 = Pattern(Integral((WC('c', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons38, cons4, cons1648) rule4701 = ReplacementRule(pattern4701, replacement4701) pattern4702 = Pattern(Integral((WC('c', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons38, cons4, cons1648) rule4702 = ReplacementRule(pattern4702, replacement4702) pattern4703 = Pattern(Integral((WC('c', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('C', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons38, cons4, cons1648) rule4703 = ReplacementRule(pattern4703, replacement4703) pattern4704 = Pattern(Integral((WC('c', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('C', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons38, cons4, cons1648) rule4704 = ReplacementRule(pattern4704, replacement4704) pattern4705 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons37, cons38, cons1648) rule4705 = ReplacementRule(pattern4705, replacement4705) pattern4706 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons37, cons38, cons1648) rule4706 = ReplacementRule(pattern4706, replacement4706) pattern4707 = Pattern(Integral(u_*(A_ + WC('C', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons38, cons1648) rule4707 = ReplacementRule(pattern4707, replacement4707) pattern4708 = Pattern(Integral(u_*(A_ + WC('C', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons38, cons1648) rule4708 = ReplacementRule(pattern4708, replacement4708) pattern4709 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons38, cons1649) rule4709 = ReplacementRule(pattern4709, replacement4709) pattern4710 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons38, cons1649) rule4710 = ReplacementRule(pattern4710, replacement4710) pattern4711 = Pattern(Integral(u_*(WC('A', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)) + WC('B', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**n1_ + WC('C', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**n2_), x_), cons2, cons3, cons36, cons37, cons38, cons4, cons1650, cons1651) rule4711 = ReplacementRule(pattern4711, replacement4711) pattern4712 = Pattern(Integral(u_*(WC('A', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)) + WC('B', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**n1_ + WC('C', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**n2_), x_), cons2, cons3, cons36, cons37, cons38, cons4, cons1650, cons1651) rule4712 = ReplacementRule(pattern4712, replacement4712) pattern4713 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1652) rule4713 = ReplacementRule(pattern4713, replacement4713) pattern4714 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1653) rule4714 = ReplacementRule(pattern4714, replacement4714) pattern4715 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1652) rule4715 = ReplacementRule(pattern4715, replacement4715) pattern4716 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1653) rule4716 = ReplacementRule(pattern4716, replacement4716) pattern4717 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons1652) rule4717 = ReplacementRule(pattern4717, replacement4717) pattern4718 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons1653) rule4718 = ReplacementRule(pattern4718, replacement4718) pattern4719 = Pattern(Integral(u_*(A_ + WC('B', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons1652) rule4719 = ReplacementRule(pattern4719, replacement4719) pattern4720 = Pattern(Integral(u_*(A_ + WC('B', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons1653) rule4720 = ReplacementRule(pattern4720, replacement4720) pattern4721 = Pattern(Integral((WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons38, cons4, cons1652) rule4721 = ReplacementRule(pattern4721, replacement4721) pattern4722 = Pattern(Integral((WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons38, cons4, cons1653) rule4722 = ReplacementRule(pattern4722, replacement4722) pattern4723 = Pattern(Integral((WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('C', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons38, cons4, cons1652) rule4723 = ReplacementRule(pattern4723, replacement4723) pattern4724 = Pattern(Integral((WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('C', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons38, cons4, cons1653) rule4724 = ReplacementRule(pattern4724, replacement4724) pattern4725 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons37, cons38, cons1652) rule4725 = ReplacementRule(pattern4725, replacement4725) pattern4726 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons37, cons38, cons1653) rule4726 = ReplacementRule(pattern4726, replacement4726) pattern4727 = Pattern(Integral(u_*(A_ + WC('C', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons38, cons1652) rule4727 = ReplacementRule(pattern4727, replacement4727) pattern4728 = Pattern(Integral(u_*(A_ + WC('C', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons38, cons1653) rule4728 = ReplacementRule(pattern4728, replacement4728) pattern4729 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons38, cons1649) rule4729 = ReplacementRule(pattern4729, replacement4729) pattern4730 = Pattern(Integral(u_*(WC('A', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)) + WC('B', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**n1_ + WC('C', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**n2_), x_), cons2, cons3, cons36, cons37, cons38, cons4, cons1650, cons1651) rule4730 = ReplacementRule(pattern4730, replacement4730) pattern4731 = Pattern(Integral(u_*((S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**n1_*WC('B', S(1)) + (S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**n2_*WC('C', S(1)) + (S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*WC('A', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons4, cons1650, cons1651) rule4731 = ReplacementRule(pattern4731, replacement4731) pattern4732 = Pattern(Integral(u_*(WC('c', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1654) rule4732 = ReplacementRule(pattern4732, replacement4732) pattern4733 = Pattern(Integral(u_*(WC('c', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1654) rule4733 = ReplacementRule(pattern4733, replacement4733) pattern4734 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1654, cons21) rule4734 = ReplacementRule(pattern4734, replacement4734) pattern4735 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1654, cons21) rule4735 = ReplacementRule(pattern4735, replacement4735) pattern4736 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1654, cons21) rule4736 = ReplacementRule(pattern4736, replacement4736) pattern4737 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('d', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1654, cons21) rule4737 = ReplacementRule(pattern4737, replacement4737) pattern4738 = Pattern(Integral(u_*(WC('c', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1654) rule4738 = ReplacementRule(pattern4738, replacement4738) pattern4739 = Pattern(Integral(u_*(WC('c', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1654) rule4739 = ReplacementRule(pattern4739, replacement4739) pattern4740 = Pattern(Integral(u_*(WC('c', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1654) rule4740 = ReplacementRule(pattern4740, replacement4740) pattern4741 = Pattern(Integral(u_*(WC('c', S(1))/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1)), x_), cons2, cons3, cons8, cons19, cons21, cons1654) rule4741 = ReplacementRule(pattern4741, replacement4741) pattern4742 = Pattern(Integral(u_*(WC('c', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons1654) rule4742 = ReplacementRule(pattern4742, replacement4742) pattern4743 = Pattern(Integral(u_*(WC('c', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('B', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons36, cons37, cons4, cons1654) rule4743 = ReplacementRule(pattern4743, replacement4743) pattern4744 = Pattern(Integral(u_*(A_ + WC('B', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons1654) rule4744 = ReplacementRule(pattern4744, replacement4744) pattern4745 = Pattern(Integral(u_*(A_ + WC('B', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons36, cons37, cons1654) rule4745 = ReplacementRule(pattern4745, replacement4745) pattern4746 = Pattern(Integral((WC('c', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons38, cons4, cons1654) rule4746 = ReplacementRule(pattern4746, replacement4746) pattern4747 = Pattern(Integral((WC('c', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons37, cons38, cons4, cons1654) rule4747 = ReplacementRule(pattern4747, replacement4747) pattern4748 = Pattern(Integral((WC('c', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('C', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons38, cons4, cons1654) rule4748 = ReplacementRule(pattern4748, replacement4748) pattern4749 = Pattern(Integral((WC('c', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(A_ + WC('C', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2))*WC('u', S(1)), x_), cons2, cons3, cons8, cons36, cons38, cons4, cons1654) rule4749 = ReplacementRule(pattern4749, replacement4749) pattern4750 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons37, cons38, cons1654) rule4750 = ReplacementRule(pattern4750, replacement4750) pattern4751 = Pattern(Integral(u_*(WC('A', S(0)) + WC('B', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))) + WC('C', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons37, cons38, cons1654) rule4751 = ReplacementRule(pattern4751, replacement4751) pattern4752 = Pattern(Integral(u_*(A_ + WC('C', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons38, cons1654) rule4752 = ReplacementRule(pattern4752, replacement4752) pattern4753 = Pattern(Integral(u_*(A_ + WC('C', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)), x_), cons2, cons3, cons36, cons38, cons1654) rule4753 = ReplacementRule(pattern4753, replacement4753) pattern4754 = Pattern(Integral(u_*((S(1)/cos(x_*WC('b', S(1)) + WC('a', S(0))))**n1_*WC('B', S(1)) + (S(1)/cos(x_*WC('b', S(1)) + WC('a', S(0))))**n2_*WC('C', S(1)) + (S(1)/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*WC('A', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons4, cons1650, cons1651) rule4754 = ReplacementRule(pattern4754, replacement4754) pattern4755 = Pattern(Integral(u_*((S(1)/sin(x_*WC('b', S(1)) + WC('a', S(0))))**n1_*WC('B', S(1)) + (S(1)/sin(x_*WC('b', S(1)) + WC('a', S(0))))**n2_*WC('C', S(1)) + (S(1)/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*WC('A', S(1))), x_), cons2, cons3, cons36, cons37, cons38, cons4, cons1650, cons1651) rule4755 = ReplacementRule(pattern4755, replacement4755) pattern4756 = Pattern(Integral(sin(x_*WC('b', S(1)) + WC('a', S(0)))*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1655) rule4756 = ReplacementRule(pattern4756, replacement4756) pattern4757 = Pattern(Integral(cos(x_*WC('b', S(1)) + WC('a', S(0)))*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1655) rule4757 = ReplacementRule(pattern4757, replacement4757) pattern4758 = Pattern(Integral(sin(x_*WC('b', S(1)) + WC('a', S(0)))*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1655) rule4758 = ReplacementRule(pattern4758, replacement4758) pattern4759 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons210, cons27, cons1656, cons1410) rule4759 = ReplacementRule(pattern4759, replacement4759) pattern4760 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons210, cons27, cons1656, cons1410) rule4760 = ReplacementRule(pattern4760, replacement4760) pattern4761 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons27, cons1656, cons40) rule4761 = ReplacementRule(pattern4761, replacement4761) pattern4762 = Pattern(Integral((WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons127, cons4, cons27, cons1656, cons40) rule4762 = ReplacementRule(pattern4762, replacement4762) pattern4763 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons19, cons5, cons27, cons1656, cons149, cons345) rule4763 = ReplacementRule(pattern4763, replacement4763) pattern4764 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons19, cons5, cons27, cons1656, cons149, cons345) rule4764 = ReplacementRule(pattern4764, replacement4764) pattern4765 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons19, cons5, cons27, cons1656, cons149, cons242) rule4765 = ReplacementRule(pattern4765, replacement4765) pattern4766 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons19, cons5, cons27, cons1656, cons149, cons242) rule4766 = ReplacementRule(pattern4766, replacement4766) pattern4767 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons27, cons1656, cons149, cons246, cons1335, cons139, cons1657, cons1290) rule4767 = ReplacementRule(pattern4767, replacement4767) pattern4768 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons27, cons1656, cons149, cons246, cons1335, cons139, cons1657, cons1290) rule4768 = ReplacementRule(pattern4768, replacement4768) pattern4769 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons27, cons1656, cons149, cons246, cons168, cons139, cons321, cons1658, cons1290) rule4769 = ReplacementRule(pattern4769, replacement4769) pattern4770 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons27, cons1656, cons149, cons246, cons168, cons139, cons321, cons1658, cons1290) rule4770 = ReplacementRule(pattern4770, replacement4770) pattern4771 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons5, cons27, cons1656, cons149, cons33, cons168, cons251, cons1290) rule4771 = ReplacementRule(pattern4771, replacement4771) pattern4772 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons5, cons27, cons1656, cons149, cons33, cons168, cons251, cons1290) rule4772 = ReplacementRule(pattern4772, replacement4772) pattern4773 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons5, cons27, cons1656, cons149, cons33, cons96, cons321, cons255, cons1290) rule4773 = ReplacementRule(pattern4773, replacement4773) pattern4774 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons5, cons27, cons1656, cons149, cons33, cons96, cons321, cons255, cons1290) rule4774 = ReplacementRule(pattern4774, replacement4774) pattern4775 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons210, cons27, cons1656, cons149, cons13, cons165, cons248) rule4775 = ReplacementRule(pattern4775, replacement4775) pattern4776 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons210, cons27, cons1656, cons149, cons13, cons165, cons248) rule4776 = ReplacementRule(pattern4776, replacement4776) pattern4777 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons210, cons27, cons1656, cons149, cons13, cons139, cons248) rule4777 = ReplacementRule(pattern4777, replacement4777) pattern4778 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons210, cons27, cons1656, cons149, cons13, cons139, cons248) rule4778 = ReplacementRule(pattern4778, replacement4778) pattern4779 = Pattern(Integral(cos(x_*WC('b', S(1)) + WC('a', S(0)))/sqrt(sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons27, cons1656) rule4779 = ReplacementRule(pattern4779, replacement4779) pattern4780 = Pattern(Integral(sin(x_*WC('b', S(1)) + WC('a', S(0)))/sqrt(sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons27, cons1656) rule4780 = ReplacementRule(pattern4780, replacement4780) pattern4781 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_/cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons210, cons5, cons27, cons1656, cons149, cons248) rule4781 = ReplacementRule(pattern4781, replacement4781) pattern4782 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_/sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons210, cons5, cons27, cons1656, cons149, cons248) rule4782 = ReplacementRule(pattern4782, replacement4782) pattern4783 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons210, cons19, cons5, cons27, cons1656, cons149) rule4783 = ReplacementRule(pattern4783, replacement4783) pattern4784 = Pattern(Integral((WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons127, cons210, cons4, cons5, cons27, cons1656, cons149) rule4784 = ReplacementRule(pattern4784, replacement4784) pattern4785 = Pattern(Integral((WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_*sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2)*cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons210, cons27, cons1656, cons1410) rule4785 = ReplacementRule(pattern4785, replacement4785) pattern4786 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons27, cons1656, cons40) rule4786 = ReplacementRule(pattern4786, replacement4786) pattern4787 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons27, cons1656, cons149, cons1280) rule4787 = ReplacementRule(pattern4787, replacement4787) pattern4788 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons27, cons1656, cons149, cons1280) rule4788 = ReplacementRule(pattern4788, replacement4788) pattern4789 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons27, cons1656, cons149, cons1659, cons255) rule4789 = ReplacementRule(pattern4789, replacement4789) pattern4790 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons27, cons1656, cons149, cons246, cons1660, cons139, cons1661, cons172) rule4790 = ReplacementRule(pattern4790, replacement4790) pattern4791 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons27, cons1656, cons149, cons246, cons1660, cons139, cons1661, cons172) rule4791 = ReplacementRule(pattern4791, replacement4791) pattern4792 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons27, cons1656, cons149, cons246, cons168, cons139, cons1662, cons1661, cons172, cons1663) rule4792 = ReplacementRule(pattern4792, replacement4792) pattern4793 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons27, cons1656, cons149, cons246, cons168, cons139, cons1662, cons1661, cons172, cons1663) rule4793 = ReplacementRule(pattern4793, replacement4793) pattern4794 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons27, cons1656, cons149, cons95, cons168, cons91, cons1661, cons172) rule4794 = ReplacementRule(pattern4794, replacement4794) pattern4795 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**n_*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons5, cons27, cons1656, cons149, cons95, cons168, cons91, cons1661, cons172) rule4795 = ReplacementRule(pattern4795, replacement4795) pattern4796 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons27, cons1656, cons149, cons33, cons168, cons1664, cons172) rule4796 = ReplacementRule(pattern4796, replacement4796) pattern4797 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons27, cons1656, cons149, cons33, cons168, cons1664, cons172) rule4797 = ReplacementRule(pattern4797, replacement4797) pattern4798 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons27, cons1656, cons149, cons164, cons96, cons90, cons165, cons1664, cons172) rule4798 = ReplacementRule(pattern4798, replacement4798) pattern4799 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons27, cons1656, cons149, cons164, cons96, cons90, cons165, cons1664, cons172) rule4799 = ReplacementRule(pattern4799, replacement4799) pattern4800 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons27, cons1656, cons149, cons164, cons96, cons90, cons139, cons1662, cons255, cons172) rule4800 = ReplacementRule(pattern4800, replacement4800) pattern4801 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons27, cons1656, cons149, cons164, cons96, cons90, cons139, cons1662, cons255, cons172) rule4801 = ReplacementRule(pattern4801, replacement4801) pattern4802 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons27, cons1656, cons149, cons33, cons96, cons1662, cons255, cons172) rule4802 = ReplacementRule(pattern4802, replacement4802) pattern4803 = Pattern(Integral((WC('e', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**m_*(WC('f', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons4, cons5, cons27, cons1656, cons149, cons33, cons96, cons1662, cons255, cons172) rule4803 = ReplacementRule(pattern4803, replacement4803) pattern4804 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*(WC('f', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(WC('g', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons19, cons4, cons5, cons27, cons1656, cons149) rule4804 = ReplacementRule(pattern4804, replacement4804) pattern4805 = Pattern(Integral((WC('e', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('m', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons19, cons27, cons1665) rule4805 = ReplacementRule(pattern4805, replacement4805) pattern4806 = Pattern(Integral((F_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + a_)**p_, x_), cons2, cons3, cons8, cons29, cons1666, cons87, cons130) rule4806 = ReplacementRule(pattern4806, replacement4806) pattern4807 = Pattern(Integral(S(1)/(F_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + a_), x_), cons2, cons3, cons8, cons29, cons1666, cons1481, cons746) rule4807 = ReplacementRule(pattern4807, replacement4807) pattern4808 = Pattern(Integral(S(1)/(F_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + a_), x_), cons2, cons3, cons8, cons29, cons1666, cons1484, cons746) rule4808 = ReplacementRule(pattern4808, replacement4808) pattern4809 = Pattern(Integral(G_**(x_*WC('d', S(1)) + WC('c', S(0)))/(F_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)) + a_), x_), cons2, cons3, cons8, cons29, cons19, cons1667, cons87, cons746) rule4809 = ReplacementRule(pattern4809, replacement4809) pattern4810 = Pattern(Integral((F_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('a', S(1)))**n_, x_), cons2, cons8, cons29, cons4, cons5, cons1666, cons25, cons40) rule4810 = ReplacementRule(pattern4810, With4810) pattern4811 = Pattern(Integral(((F_*(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)))**p_*WC('a', S(1)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1666, cons25, cons149) rule4811 = ReplacementRule(pattern4811, With4811) pattern4812 = Pattern(Integral(F_*u_*(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)), x_), cons2, cons3, cons8, cons1668, CustomConstraint(With4812)) rule4812 = ReplacementRule(pattern4812, replacement4812) pattern4813 = Pattern(Integral(F_*u_*(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)), x_), cons2, cons3, cons8, cons1669, CustomConstraint(With4813)) rule4813 = ReplacementRule(pattern4813, replacement4813) pattern4814 = Pattern(Integral(F_*u_*(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)), x_), cons2, cons3, cons8, cons1670, CustomConstraint(With4814)) rule4814 = ReplacementRule(pattern4814, replacement4814) pattern4815 = Pattern(Integral(F_*u_*(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)), x_), cons2, cons3, cons8, cons1671, CustomConstraint(With4815)) rule4815 = ReplacementRule(pattern4815, replacement4815) pattern4816 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons1249, cons1672, CustomConstraint(With4816)) rule4816 = ReplacementRule(pattern4816, replacement4816) pattern4817 = Pattern(Integral(u_/cos((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))**S(2), x_), cons2, cons3, cons8, cons1249, CustomConstraint(With4817)) rule4817 = ReplacementRule(pattern4817, replacement4817) pattern4818 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons1249, cons1673, CustomConstraint(With4818)) rule4818 = ReplacementRule(pattern4818, replacement4818) pattern4819 = Pattern(Integral(u_/sin((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))**S(2), x_), cons2, cons3, cons8, cons1249, CustomConstraint(With4819)) rule4819 = ReplacementRule(pattern4819, replacement4819) pattern4820 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons87, cons1670, CustomConstraint(With4820)) rule4820 = ReplacementRule(pattern4820, replacement4820) pattern4821 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons87, cons1671, CustomConstraint(With4821)) rule4821 = ReplacementRule(pattern4821, replacement4821) pattern4822 = Pattern(Integral(u_, x_), CustomConstraint(With4822)) rule4822 = ReplacementRule(pattern4822, replacement4822) pattern4823 = Pattern(Integral(u_, x_), CustomConstraint(With4823)) rule4823 = ReplacementRule(pattern4823, replacement4823) pattern4824 = Pattern(Integral(F_**(x_*WC('b', S(1)) + WC('a', S(0)))*G_**(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons1674, cons1675, cons557) rule4824 = ReplacementRule(pattern4824, replacement4824) pattern4825 = Pattern(Integral(F_**(x_*WC('b', S(1)) + WC('a', S(0)))*G_**(x_*WC('d', S(1)) + WC('c', S(0)))*H_**(x_*WC('f', S(1)) + WC('e', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons1674, cons1675, cons1676, cons630) rule4825 = ReplacementRule(pattern4825, replacement4825) pattern4826 = Pattern(Integral(F_*u_*(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)), x_), cons2, cons3, cons8, cons1668, CustomConstraint(With4826)) rule4826 = ReplacementRule(pattern4826, replacement4826) pattern4827 = Pattern(Integral(F_*u_*(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)), x_), cons2, cons3, cons8, cons1669, CustomConstraint(With4827)) rule4827 = ReplacementRule(pattern4827, replacement4827) pattern4828 = Pattern(Integral(F_*u_*(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)), x_), cons2, cons3, cons8, cons1670, CustomConstraint(With4828)) rule4828 = ReplacementRule(pattern4828, replacement4828) pattern4829 = Pattern(Integral(F_*u_*(x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)), x_), cons2, cons3, cons8, cons1671, CustomConstraint(With4829)) rule4829 = ReplacementRule(pattern4829, replacement4829) pattern4830 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons1484, cons1249, cons1668, CustomConstraint(With4830)) rule4830 = ReplacementRule(pattern4830, replacement4830) pattern4831 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons1484, cons1249, cons1672, CustomConstraint(With4831)) rule4831 = ReplacementRule(pattern4831, replacement4831) pattern4832 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons1484, cons1249, cons1669, CustomConstraint(With4832)) rule4832 = ReplacementRule(pattern4832, replacement4832) pattern4833 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons1484, cons1249, cons1673, CustomConstraint(With4833)) rule4833 = ReplacementRule(pattern4833, replacement4833) pattern4834 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons1484, cons1249, cons1670, CustomConstraint(With4834)) rule4834 = ReplacementRule(pattern4834, replacement4834) pattern4835 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*u_, x_), cons2, cons3, cons8, cons1484, cons1249, cons1671, CustomConstraint(With4835)) rule4835 = ReplacementRule(pattern4835, replacement4835) pattern4836 = Pattern(Integral(u_*(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*WC('d', S(1)) + v_), x_), cons2, cons3, cons8, cons29, cons10, cons1484, cons1249, cons1668, CustomConstraint(With4836)) rule4836 = ReplacementRule(pattern4836, replacement4836) pattern4837 = Pattern(Integral(u_*(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*WC('d', S(1)) + v_), x_), cons2, cons3, cons8, cons29, cons10, cons1484, cons1249, cons1669, CustomConstraint(With4837)) rule4837 = ReplacementRule(pattern4837, replacement4837) pattern4838 = Pattern(Integral(u_, x_), CustomConstraint(With4838)) rule4838 = ReplacementRule(pattern4838, replacement4838) pattern4839 = Pattern(Integral(u_, x_), CustomConstraint(With4839)) rule4839 = ReplacementRule(pattern4839, replacement4839) pattern4840 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1677) rule4840 = ReplacementRule(pattern4840, replacement4840) pattern4841 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('c', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1678) rule4841 = ReplacementRule(pattern4841, replacement4841) pattern4842 = Pattern(Integral((WC('a', S(0)) + WC('b', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('c', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))**WC('p', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons1678) rule4842 = ReplacementRule(pattern4842, replacement4842) pattern4843 = Pattern(Integral(u_/y_, x_), cons1679, CustomConstraint(With4843)) rule4843 = ReplacementRule(pattern4843, replacement4843) pattern4844 = Pattern(Integral(u_/(w_*y_), x_), cons1679, CustomConstraint(With4844)) rule4844 = ReplacementRule(pattern4844, replacement4844) pattern4845 = Pattern(Integral(u_*y_**WC('m', S(1)), x_), cons19, cons68, cons1679, CustomConstraint(With4845)) rule4845 = ReplacementRule(pattern4845, replacement4845) pattern4846 = Pattern(Integral(u_*y_**WC('m', S(1))*z_**WC('n', S(1)), x_), cons19, cons4, cons68, cons1679, CustomConstraint(With4846)) rule4846 = ReplacementRule(pattern4846, replacement4846) pattern4847 = Pattern(Integral((F_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('a', S(1)))**n_*WC('u', S(1)), x_), cons2, cons8, cons29, cons4, cons5, cons1666, cons25, cons40) rule4847 = ReplacementRule(pattern4847, With4847) pattern4848 = Pattern(Integral(((F_*(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)))**p_*WC('a', S(1)))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons1666, cons25, cons149) rule4848 = ReplacementRule(pattern4848, With4848) pattern4849 = Pattern(Integral(u_, x_), cons1232, CustomConstraint(With4849)) rule4849 = ReplacementRule(pattern4849, replacement4849) pattern4850 = Pattern(Integral(((S(1)/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*WC('b', S(1)) + WC('a', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)))**p_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons378) rule4850 = ReplacementRule(pattern4850, replacement4850) pattern4851 = Pattern(Integral(((S(1)/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*WC('b', S(1)) + (S(1)/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*WC('a', S(1)))**p_*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons378) rule4851 = ReplacementRule(pattern4851, replacement4851) pattern4852 = Pattern(Integral(u_*(F_**(x_*WC('d', S(1)) + WC('c', S(0)))*a_ + F_**(x_*WC('d', S(1)) + WC('c', S(0)))*WC('b', S(1)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons5, cons52, cons1666, cons87, cons51) rule4852 = ReplacementRule(pattern4852, replacement4852) pattern4853 = Pattern(Integral(u_*(F_**(x_*WC('e', S(1)) + WC('d', S(0)))*a_ + F_**(x_*WC('e', S(1)) + WC('d', S(0)))*WC('b', S(1)) + F_**(x_*WC('e', S(1)) + WC('d', S(0)))*WC('c', S(1)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons54, cons1666, cons87, cons51, cons53) rule4853 = ReplacementRule(pattern4853, replacement4853) pattern4854 = Pattern(Integral(u_*(F_**(x_*WC('e', S(1)) + WC('d', S(0)))*WC('b', S(1)) + F_**(x_*WC('e', S(1)) + WC('d', S(0)))*WC('c', S(1)) + a_)**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons5, cons52, cons1666, cons87, cons1680) rule4854 = ReplacementRule(pattern4854, replacement4854) pattern4855 = Pattern(Integral((WC('a', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))) + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1441) rule4855 = ReplacementRule(pattern4855, replacement4855) pattern4856 = Pattern(Integral(u_, x_), cons1681) rule4856 = ReplacementRule(pattern4856, replacement4856) pattern4857 = Pattern(Integral((a_*v_)**p_*WC('u', S(1)), x_), cons2, cons5, cons149, cons1682) rule4857 = ReplacementRule(pattern4857, With4857) pattern4858 = Pattern(Integral((v_**m_)**p_*WC('u', S(1)), x_), cons19, cons5, cons149, cons1682) rule4858 = ReplacementRule(pattern4858, With4858) pattern4859 = Pattern(Integral((v_**WC('m', S(1))*w_**WC('n', S(1)))**p_*WC('u', S(1)), x_), cons19, cons4, cons5, cons149, cons1683) rule4859 = ReplacementRule(pattern4859, With4859) pattern4860 = Pattern(Integral(u_, x_), cons1679, CustomConstraint(With4860)) rule4860 = ReplacementRule(pattern4860, replacement4860) pattern4861 = Pattern(Integral(u_, x_), cons1232, cons1684, CustomConstraint(With4861)) rule4861 = ReplacementRule(pattern4861, replacement4861) pattern4862 = Pattern(Integral(u_, x_), cons1679) rule4862 = ReplacementRule(pattern4862, With4862) pattern4863 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons4, cons64, cons586) rule4863 = ReplacementRule(pattern4863, replacement4863) pattern4864 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons64, cons586) rule4864 = ReplacementRule(pattern4864, replacement4864) pattern4865 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons466) rule4865 = ReplacementRule(pattern4865, replacement4865) pattern4866 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons466) rule4866 = ReplacementRule(pattern4866, replacement4866) pattern4867 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons19, cons466) rule4867 = ReplacementRule(pattern4867, replacement4867) pattern4868 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1685, cons33, cons170) rule4868 = ReplacementRule(pattern4868, replacement4868) pattern4869 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons1685, cons33, cons170) rule4869 = ReplacementRule(pattern4869, replacement4869) pattern4870 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**WC('n', S(1))/cos(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons4, cons64, cons586) rule4870 = ReplacementRule(pattern4870, replacement4870) pattern4871 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))/sin(x_*WC('b', S(1)) + WC('a', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons4, cons64, cons586) rule4871 = ReplacementRule(pattern4871, replacement4871) pattern4872 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**p_/cos(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons1410) rule4872 = ReplacementRule(pattern4872, replacement4872) pattern4873 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1410) rule4873 = ReplacementRule(pattern4873, replacement4873) pattern4874 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**p_/sin(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons19, cons1410) rule4874 = ReplacementRule(pattern4874, replacement4874) pattern4875 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**p_, x_), cons2, cons3, cons8, cons29, cons19, cons4, cons1410) rule4875 = ReplacementRule(pattern4875, replacement4875) pattern4876 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*tan(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons64, cons1686) rule4876 = ReplacementRule(pattern4876, With4876) pattern4877 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/tan(x_*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons4, cons5, cons64, cons1686) rule4877 = ReplacementRule(pattern4877, With4877) pattern4878 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons33, cons87) rule4878 = ReplacementRule(pattern4878, replacement4878) pattern4879 = Pattern(Integral((x_*WC('d', S(1)) + WC('c', S(0)))**WC('m', S(1))*(S(1)/sin(x_*WC('b', S(1)) + WC('a', S(0))))**WC('n', S(1))*(S(1)/cos(x_*WC('b', S(1)) + WC('a', S(0))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons378, cons33, cons170, cons1687) rule4879 = ReplacementRule(pattern4879, With4879) pattern4880 = Pattern(Integral(F_**v_*G_**w_*u_**WC('m', S(1)), x_), cons19, cons4, cons5, cons1688, cons1689, cons1690, cons814, cons815) rule4880 = ReplacementRule(pattern4880, replacement4880) pattern4881 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule4881 = ReplacementRule(pattern4881, replacement4881) pattern4882 = Pattern(Integral((a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule4882 = ReplacementRule(pattern4882, replacement4882) pattern4883 = Pattern(Integral((a_ + WC('b', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule4883 = ReplacementRule(pattern4883, replacement4883) pattern4884 = Pattern(Integral((a_ + WC('b', S(1))/tan(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule4884 = ReplacementRule(pattern4884, replacement4884) pattern4885 = Pattern(Integral((a_ + WC('b', S(1))/cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*tan(x_*WC('d', S(1)) + WC('c', S(0)))/cos(x_*WC('d', S(1)) + WC('c', S(0))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule4885 = ReplacementRule(pattern4885, replacement4885) pattern4886 = Pattern(Integral((a_ + WC('b', S(1))/sin(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))/(sin(x_*WC('d', S(1)) + WC('c', S(0)))*tan(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons586) rule4886 = ReplacementRule(pattern4886, replacement4886) pattern4887 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons557, cons20) rule4887 = ReplacementRule(pattern4887, replacement4887) pattern4888 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons557, cons20) rule4888 = ReplacementRule(pattern4888, replacement4888) pattern4889 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('q', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons557) rule4889 = ReplacementRule(pattern4889, replacement4889) pattern4890 = Pattern(Integral(F_**(x_*WC('b', S(1)) + WC('a', S(0)))*G_**(x_*WC('d', S(1)) + WC('c', S(0)))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons1691, cons1692, cons557, cons27, cons1693) rule4890 = ReplacementRule(pattern4890, replacement4890) pattern4891 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sin(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1694) rule4891 = ReplacementRule(pattern4891, replacement4891) pattern4892 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cos(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1694) rule4892 = ReplacementRule(pattern4892, replacement4892) pattern4893 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1695, cons89, cons167) rule4893 = ReplacementRule(pattern4893, replacement4893) pattern4894 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**m_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1696, cons33, cons168) rule4894 = ReplacementRule(pattern4894, replacement4894) pattern4895 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons1697, cons586, cons1397) rule4895 = ReplacementRule(pattern4895, replacement4895) pattern4896 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons1697, cons586, cons1397) rule4896 = ReplacementRule(pattern4896, replacement4896) pattern4897 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1698, cons89, cons91, cons1444) rule4897 = ReplacementRule(pattern4897, replacement4897) pattern4898 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1698, cons89, cons91, cons1444) rule4898 = ReplacementRule(pattern4898, replacement4898) pattern4899 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons25) rule4899 = ReplacementRule(pattern4899, replacement4899) pattern4900 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons25) rule4900 = ReplacementRule(pattern4900, replacement4900) pattern4901 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons87) rule4901 = ReplacementRule(pattern4901, replacement4901) pattern4902 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/tan(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons87) rule4902 = ReplacementRule(pattern4902, replacement4902) pattern4903 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1695, cons89, cons91) rule4903 = ReplacementRule(pattern4903, replacement4903) pattern4904 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1695, cons89, cons91) rule4904 = ReplacementRule(pattern4904, replacement4904) pattern4905 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons1699, cons1504, cons965) rule4905 = ReplacementRule(pattern4905, replacement4905) pattern4906 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons4, cons1699, cons1504, cons965) rule4906 = ReplacementRule(pattern4906, replacement4906) pattern4907 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1700, cons89, cons167, cons1646) rule4907 = ReplacementRule(pattern4907, replacement4907) pattern4908 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**n_, x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons1700, cons89, cons167, cons1646) rule4908 = ReplacementRule(pattern4908, replacement4908) pattern4909 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons87) rule4909 = ReplacementRule(pattern4909, replacement4909) pattern4910 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons87) rule4910 = ReplacementRule(pattern4910, replacement4910) pattern4911 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons25) rule4911 = ReplacementRule(pattern4911, replacement4911) pattern4912 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(S(1)/sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons25) rule4912 = ReplacementRule(pattern4912, replacement4912) pattern4913 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1701, cons198) rule4913 = ReplacementRule(pattern4913, replacement4913) pattern4914 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1702, cons198) rule4914 = ReplacementRule(pattern4914, replacement4914) pattern4915 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1013, cons198) rule4915 = ReplacementRule(pattern4915, replacement4915) pattern4916 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1701, cons152, cons1553) rule4916 = ReplacementRule(pattern4916, replacement4916) pattern4917 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1702, cons152, cons1553) rule4917 = ReplacementRule(pattern4917, replacement4917) pattern4918 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(f_ + WC('g', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))**WC('n', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1013, cons152, cons1553) rule4918 = ReplacementRule(pattern4918, replacement4918) pattern4919 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(h_ + WC('i', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0))))/(f_ + WC('g', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons1701, cons1703, cons1704) rule4919 = ReplacementRule(pattern4919, replacement4919) pattern4920 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*(h_ + WC('i', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0))))/(f_ + WC('g', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons211, cons226, cons1701, cons1703, cons1705) rule4920 = ReplacementRule(pattern4920, replacement4920) pattern4921 = Pattern(Integral(F_**(u_*WC('c', S(1)))*G_**v_, x_), cons1101, cons8, cons4, cons1689, cons812, cons813) rule4921 = ReplacementRule(pattern4921, replacement4921) pattern4922 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*x_**WC('m', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons33, cons170, cons150) rule4922 = ReplacementRule(pattern4922, With4922) pattern4923 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*x_**WC('m', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons33, cons170, cons150) rule4923 = ReplacementRule(pattern4923, With4923) pattern4924 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*cos(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons530) rule4924 = ReplacementRule(pattern4924, replacement4924) pattern4925 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*x_**WC('p', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**WC('m', S(1))*cos(x_*WC('g', S(1)) + WC('f', S(0)))**WC('n', S(1)), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons1706) rule4925 = ReplacementRule(pattern4925, replacement4925) pattern4926 = Pattern(Integral(F_**((x_*WC('b', S(1)) + WC('a', S(0)))*WC('c', S(1)))*G_**(x_*WC('e', S(1)) + WC('d', S(0)))*H_**(x_*WC('e', S(1)) + WC('d', S(0))), x_), cons1101, cons2, cons3, cons8, cons29, cons50, cons530, cons1689, cons1707) rule4926 = ReplacementRule(pattern4926, replacement4926) pattern4927 = Pattern(Integral(F_**u_*sin(v_)**WC('n', S(1)), x_), cons1101, cons1708, cons1709, cons150) rule4927 = ReplacementRule(pattern4927, replacement4927) pattern4928 = Pattern(Integral(F_**u_*cos(v_)**WC('n', S(1)), x_), cons1101, cons1708, cons1709, cons150) rule4928 = ReplacementRule(pattern4928, replacement4928) pattern4929 = Pattern(Integral(F_**u_*sin(v_)**WC('m', S(1))*cos(v_)**WC('n', S(1)), x_), cons1101, cons1708, cons1709, cons530) rule4929 = ReplacementRule(pattern4929, replacement4929) pattern4930 = Pattern(Integral(sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1710, cons56) rule4930 = ReplacementRule(pattern4930, replacement4930) pattern4931 = Pattern(Integral(cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1710, cons56) rule4931 = ReplacementRule(pattern4931, replacement4931) pattern4932 = Pattern(Integral(sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons130, cons1711) rule4932 = ReplacementRule(pattern4932, replacement4932) pattern4933 = Pattern(Integral(cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons130, cons1711) rule4933 = ReplacementRule(pattern4933, replacement4933) pattern4934 = Pattern(Integral(sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1712) rule4934 = ReplacementRule(pattern4934, replacement4934) pattern4935 = Pattern(Integral(cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1712) rule4935 = ReplacementRule(pattern4935, replacement4935) pattern4936 = Pattern(Integral(sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons148, cons1713) rule4936 = ReplacementRule(pattern4936, replacement4936) pattern4937 = Pattern(Integral(cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons148, cons1713) rule4937 = ReplacementRule(pattern4937, replacement4937) pattern4938 = Pattern(Integral(sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons139, cons1507, cons1714) rule4938 = ReplacementRule(pattern4938, replacement4938) pattern4939 = Pattern(Integral(cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons139, cons1507, cons1714) rule4939 = ReplacementRule(pattern4939, replacement4939) pattern4940 = Pattern(Integral(sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1713) rule4940 = ReplacementRule(pattern4940, replacement4940) pattern4941 = Pattern(Integral(cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1713) rule4941 = ReplacementRule(pattern4941, replacement4941) pattern4942 = Pattern(Integral(x_**WC('m', S(1))*sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1715, cons56, cons68) rule4942 = ReplacementRule(pattern4942, replacement4942) pattern4943 = Pattern(Integral(x_**WC('m', S(1))*cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1715, cons56, cons68) rule4943 = ReplacementRule(pattern4943, replacement4943) pattern4944 = Pattern(Integral(x_**WC('m', S(1))*sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons130, cons1716) rule4944 = ReplacementRule(pattern4944, replacement4944) pattern4945 = Pattern(Integral(x_**WC('m', S(1))*cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons130, cons1716) rule4945 = ReplacementRule(pattern4945, replacement4945) pattern4946 = Pattern(Integral(x_**WC('m', S(1))*sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons4, cons1717) rule4946 = ReplacementRule(pattern4946, replacement4946) pattern4947 = Pattern(Integral(x_**WC('m', S(1))*cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons4, cons1717) rule4947 = ReplacementRule(pattern4947, replacement4947) pattern4948 = Pattern(Integral(x_**WC('m', S(1))*sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons148, cons1718) rule4948 = ReplacementRule(pattern4948, replacement4948) pattern4949 = Pattern(Integral(x_**WC('m', S(1))*cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons148, cons1718) rule4949 = ReplacementRule(pattern4949, replacement4949) pattern4950 = Pattern(Integral(x_**WC('m', S(1))*sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons139, cons1507, cons1719) rule4950 = ReplacementRule(pattern4950, replacement4950) pattern4951 = Pattern(Integral(x_**WC('m', S(1))*cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons139, cons1507, cons1719) rule4951 = ReplacementRule(pattern4951, replacement4951) pattern4952 = Pattern(Integral(x_**WC('m', S(1))*sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1718) rule4952 = ReplacementRule(pattern4952, replacement4952) pattern4953 = Pattern(Integral(x_**WC('m', S(1))*cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1718) rule4953 = ReplacementRule(pattern4953, replacement4953) pattern4954 = Pattern(Integral(S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1720) rule4954 = ReplacementRule(pattern4954, replacement4954) pattern4955 = Pattern(Integral(S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons4, cons1720) rule4955 = ReplacementRule(pattern4955, replacement4955) pattern4956 = Pattern(Integral((S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1721, cons1647) rule4956 = ReplacementRule(pattern4956, replacement4956) pattern4957 = Pattern(Integral((S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons5, cons1721, cons1647) rule4957 = ReplacementRule(pattern4957, replacement4957) pattern4958 = Pattern(Integral((S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons148, cons1722, cons1723) rule4958 = ReplacementRule(pattern4958, replacement4958) pattern4959 = Pattern(Integral((S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons148, cons1722, cons1723) rule4959 = ReplacementRule(pattern4959, replacement4959) pattern4960 = Pattern(Integral((S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons139, cons1713) rule4960 = ReplacementRule(pattern4960, replacement4960) pattern4961 = Pattern(Integral((S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons4, cons13, cons139, cons1713) rule4961 = ReplacementRule(pattern4961, replacement4961) pattern4962 = Pattern(Integral((S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons1713) rule4962 = ReplacementRule(pattern4962, replacement4962) pattern4963 = Pattern(Integral((S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons4, cons5, cons1713) rule4963 = ReplacementRule(pattern4963, replacement4963) pattern4964 = Pattern(Integral(x_**WC('m', S(1))/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons4, cons1724) rule4964 = ReplacementRule(pattern4964, replacement4964) pattern4965 = Pattern(Integral(x_**WC('m', S(1))/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))), x_), cons2, cons3, cons8, cons19, cons4, cons1724) rule4965 = ReplacementRule(pattern4965, replacement4965) pattern4966 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1725, cons68, cons1647) rule4966 = ReplacementRule(pattern4966, replacement4966) pattern4967 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1725, cons68, cons1647) rule4967 = ReplacementRule(pattern4967, replacement4967) pattern4968 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons148, cons1722, cons1726) rule4968 = ReplacementRule(pattern4968, replacement4968) pattern4969 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons148, cons1722, cons1726) rule4969 = ReplacementRule(pattern4969, replacement4969) pattern4970 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons139, cons1718) rule4970 = ReplacementRule(pattern4970, replacement4970) pattern4971 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**p_, x_), cons2, cons3, cons8, cons19, cons4, cons13, cons139, cons1718) rule4971 = ReplacementRule(pattern4971, replacement4971) pattern4972 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/cos(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1718) rule4972 = ReplacementRule(pattern4972, replacement4972) pattern4973 = Pattern(Integral(x_**WC('m', S(1))*(S(1)/sin(WC('a', S(0)) + WC('b', S(1))*log(x_**WC('n', S(1))*WC('c', S(1)))))**WC('p', S(1)), x_), cons2, cons3, cons8, cons19, cons4, cons5, cons1718) rule4973 = ReplacementRule(pattern4973, replacement4973) pattern4974 = Pattern(Integral(log(x_*WC('b', S(1)))**WC('p', S(1))*sin(x_*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons13, cons165) rule4974 = ReplacementRule(pattern4974, replacement4974) pattern4975 = Pattern(Integral(log(x_*WC('b', S(1)))**WC('p', S(1))*cos(x_*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons13, cons165) rule4975 = ReplacementRule(pattern4975, replacement4975) pattern4976 = Pattern(Integral(log(x_*WC('b', S(1)))**WC('p', S(1))*sin(x_**n_*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons340, cons165) rule4976 = ReplacementRule(pattern4976, replacement4976) pattern4977 = Pattern(Integral(log(x_*WC('b', S(1)))**WC('p', S(1))*cos(x_**n_*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons340, cons165) rule4977 = ReplacementRule(pattern4977, replacement4977) pattern4978 = Pattern(Integral(x_**WC('m', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))*sin(x_**WC('n', S(1))*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons19, cons4, cons55, cons13, cons165) rule4978 = ReplacementRule(pattern4978, replacement4978) pattern4979 = Pattern(Integral(x_**WC('m', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))*cos(x_**WC('n', S(1))*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons19, cons4, cons55, cons13, cons165) rule4979 = ReplacementRule(pattern4979, replacement4979) pattern4980 = Pattern(Integral(x_**WC('m', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))*sin(x_**WC('n', S(1))*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons19, cons4, cons13, cons165, cons629) rule4980 = ReplacementRule(pattern4980, replacement4980) pattern4981 = Pattern(Integral(x_**m_*log(x_*WC('b', S(1)))**WC('p', S(1))*cos(x_**WC('n', S(1))*WC('a', S(1))*log(x_*WC('b', S(1)))**WC('p', S(1))), x_), cons2, cons3, cons19, cons4, cons13, cons165, cons629) rule4981 = ReplacementRule(pattern4981, replacement4981) pattern4982 = Pattern(Integral(sin(WC('a', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons8, cons29, cons150) rule4982 = ReplacementRule(pattern4982, replacement4982) pattern4983 = Pattern(Integral(cos(WC('a', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons8, cons29, cons150) rule4983 = ReplacementRule(pattern4983, replacement4983) pattern4984 = Pattern(Integral(sin((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons150, cons73) rule4984 = ReplacementRule(pattern4984, replacement4984) pattern4985 = Pattern(Integral(cos((x_*WC('b', S(1)) + WC('a', S(0)))*WC('e', S(1))/(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons150, cons73) rule4985 = ReplacementRule(pattern4985, replacement4985) pattern4986 = Pattern(Integral(sin(u_)**WC('n', S(1)), x_), cons150, cons1727) rule4986 = ReplacementRule(pattern4986, With4986) pattern4987 = Pattern(Integral(cos(u_)**WC('n', S(1)), x_), cons150, cons1727) rule4987 = ReplacementRule(pattern4987, With4987) pattern4988 = Pattern(Integral(WC('u', S(1))*sin(v_)**WC('p', S(1))*sin(w_)**WC('q', S(1)), x_), cons1690) rule4988 = ReplacementRule(pattern4988, replacement4988) pattern4989 = Pattern(Integral(WC('u', S(1))*cos(v_)**WC('p', S(1))*cos(w_)**WC('q', S(1)), x_), cons1690) rule4989 = ReplacementRule(pattern4989, replacement4989) pattern4990 = Pattern(Integral(sin(v_)**WC('p', S(1))*sin(w_)**WC('q', S(1)), x_), cons1728, cons557) rule4990 = ReplacementRule(pattern4990, replacement4990) pattern4991 = Pattern(Integral(cos(v_)**WC('p', S(1))*cos(w_)**WC('q', S(1)), x_), cons1728, cons557) rule4991 = ReplacementRule(pattern4991, replacement4991) pattern4992 = Pattern(Integral(x_**WC('m', S(1))*sin(v_)**WC('p', S(1))*sin(w_)**WC('q', S(1)), x_), cons1729, cons1728) rule4992 = ReplacementRule(pattern4992, replacement4992) pattern4993 = Pattern(Integral(x_**WC('m', S(1))*cos(v_)**WC('p', S(1))*cos(w_)**WC('q', S(1)), x_), cons1729, cons1728) rule4993 = ReplacementRule(pattern4993, replacement4993) pattern4994 = Pattern(Integral(WC('u', S(1))*sin(v_)**WC('p', S(1))*cos(w_)**WC('p', S(1)), x_), cons1690, cons40) rule4994 = ReplacementRule(pattern4994, replacement4994) pattern4995 = Pattern(Integral(sin(v_)**WC('p', S(1))*cos(w_)**WC('q', S(1)), x_), cons557, cons1728) rule4995 = ReplacementRule(pattern4995, replacement4995) pattern4996 = Pattern(Integral(x_**WC('m', S(1))*sin(v_)**WC('p', S(1))*cos(w_)**WC('q', S(1)), x_), cons1729, cons1728) rule4996 = ReplacementRule(pattern4996, replacement4996) pattern4997 = Pattern(Integral(sin(v_)*tan(w_)**WC('n', S(1)), x_), cons89, cons90, cons1730) rule4997 = ReplacementRule(pattern4997, replacement4997) pattern4998 = Pattern(Integral((S(1)/tan(w_))**WC('n', S(1))*cos(v_), x_), cons89, cons90, cons1730) rule4998 = ReplacementRule(pattern4998, replacement4998) pattern4999 = Pattern(Integral((S(1)/tan(w_))**WC('n', S(1))*sin(v_), x_), cons89, cons90, cons1730) rule4999 = ReplacementRule(pattern4999, replacement4999) pattern5000 = Pattern(Integral(cos(v_)*tan(w_)**WC('n', S(1)), x_), cons89, cons90, cons1730) rule5000 = ReplacementRule(pattern5000, replacement5000) pattern5001 = Pattern(Integral((S(1)/cos(w_))**WC('n', S(1))*sin(v_), x_), cons89, cons90, cons1730) rule5001 = ReplacementRule(pattern5001, replacement5001) pattern5002 = Pattern(Integral((S(1)/sin(w_))**WC('n', S(1))*cos(v_), x_), cons89, cons90, cons1730) rule5002 = ReplacementRule(pattern5002, replacement5002) pattern5003 = Pattern(Integral((S(1)/sin(w_))**WC('n', S(1))*sin(v_), x_), cons89, cons90, cons1730) rule5003 = ReplacementRule(pattern5003, replacement5003) pattern5004 = Pattern(Integral((S(1)/cos(w_))**WC('n', S(1))*cos(v_), x_), cons89, cons90, cons1730) rule5004 = ReplacementRule(pattern5004, replacement5004) pattern5005 = Pattern(Integral((a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**WC('n', S(1))*(x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons19, cons4, cons1362) rule5005 = ReplacementRule(pattern5005, replacement5005) pattern5006 = Pattern(Integral(x_**WC('m', S(1))*(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons1480, cons152, cons170, cons465, cons1731) rule5006 = ReplacementRule(pattern5006, replacement5006) pattern5007 = Pattern(Integral(x_**WC('m', S(1))*(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**S(2))**n_, x_), cons2, cons3, cons8, cons29, cons1480, cons152, cons170, cons465, cons1731) rule5007 = ReplacementRule(pattern5007, replacement5007) pattern5008 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sin((c_ + x_*WC('d', S(1)))**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons13) rule5008 = ReplacementRule(pattern5008, replacement5008) pattern5009 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cos((c_ + x_*WC('d', S(1)))**n_*WC('b', S(1)) + WC('a', S(0)))**WC('p', S(1)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons4, cons64, cons13) rule5009 = ReplacementRule(pattern5009, replacement5009) pattern5010 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/(WC('a', S(0)) + WC('b', S(1))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('c', S(1))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons64, cons1480, cons1732) rule5010 = ReplacementRule(pattern5010, replacement5010) pattern5011 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/((b_ + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons3, cons8, cons29, cons50, cons127, cons210, cons64) rule5011 = ReplacementRule(pattern5011, replacement5011) pattern5012 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/((WC('a', S(1))/cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('b', S(0)) + WC('c', S(1))*tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))*cos(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons64, cons1480, cons1732) rule5012 = ReplacementRule(pattern5012, replacement5012) pattern5013 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/((c_ + WC('b', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons3, cons8, cons29, cons50, cons127, cons210, cons64) rule5013 = ReplacementRule(pattern5013, replacement5013) pattern5014 = Pattern(Integral((x_*WC('g', S(1)) + WC('f', S(0)))**WC('m', S(1))/((WC('a', S(1))/sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('b', S(1))/tan(x_*WC('e', S(1)) + WC('d', S(0)))**S(2) + WC('c', S(0)))*sin(x_*WC('e', S(1)) + WC('d', S(0)))**S(2)), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons210, cons64, cons1480, cons1732) rule5014 = ReplacementRule(pattern5014, replacement5014) pattern5015 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1733) rule5015 = ReplacementRule(pattern5015, replacement5015) pattern5016 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1733) rule5016 = ReplacementRule(pattern5016, replacement5016) pattern5017 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1734) rule5017 = ReplacementRule(pattern5017, replacement5017) pattern5018 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons1734) rule5018 = ReplacementRule(pattern5018, replacement5018) pattern5019 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons87, cons167, cons1267) rule5019 = ReplacementRule(pattern5019, replacement5019) pattern5020 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons87, cons167, cons1267) rule5020 = ReplacementRule(pattern5020, replacement5020) pattern5021 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons87, cons167, cons1269) rule5021 = ReplacementRule(pattern5021, replacement5021) pattern5022 = Pattern(Integral((x_*WC('f', S(1)) + WC('e', S(0)))**WC('m', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**n_/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons64, cons87, cons167, cons1269) rule5022 = ReplacementRule(pattern5022, replacement5022) pattern5023 = Pattern(Integral((A_ + WC('B', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))*(x_*WC('f', S(1)) + WC('e', S(0)))/(a_ + WC('b', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1476) rule5023 = ReplacementRule(pattern5023, replacement5023) pattern5024 = Pattern(Integral((A_ + WC('B', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))*(x_*WC('f', S(1)) + WC('e', S(0)))/(a_ + WC('b', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0))))**S(2), x_), cons2, cons3, cons8, cons29, cons50, cons127, cons36, cons37, cons1476) rule5024 = ReplacementRule(pattern5024, replacement5024) pattern5025 = Pattern(Integral((a_ + WC('b', S(1))*tan(v_))**WC('n', S(1))*(S(1)/cos(v_))**WC('m', S(1)), x_), cons2, cons3, cons152, cons1553, cons1483) rule5025 = ReplacementRule(pattern5025, replacement5025) pattern5026 = Pattern(Integral((a_ + WC('b', S(1))/tan(v_))**WC('n', S(1))*(S(1)/sin(v_))**WC('m', S(1)), x_), cons2, cons3, cons152, cons1553, cons1483) rule5026 = ReplacementRule(pattern5026, replacement5026) pattern5027 = Pattern(Integral(WC('u', S(1))*sin(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*sin(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons530) rule5027 = ReplacementRule(pattern5027, replacement5027) pattern5028 = Pattern(Integral(WC('u', S(1))*cos(x_*WC('b', S(1)) + WC('a', S(0)))**WC('m', S(1))*cos(x_*WC('d', S(1)) + WC('c', S(0)))**WC('n', S(1)), x_), cons2, cons3, cons8, cons29, cons530) rule5028 = ReplacementRule(pattern5028, replacement5028) pattern5029 = Pattern(Integral(S(1)/(cos(c_ + x_*WC('d', S(1)))*cos(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1735, cons73) rule5029 = ReplacementRule(pattern5029, replacement5029) pattern5030 = Pattern(Integral(S(1)/(sin(c_ + x_*WC('d', S(1)))*sin(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1735, cons73) rule5030 = ReplacementRule(pattern5030, replacement5030) pattern5031 = Pattern(Integral(tan(c_ + x_*WC('d', S(1)))*tan(x_*WC('b', S(1)) + WC('a', S(0))), x_), cons2, cons3, cons8, cons29, cons1735, cons73) rule5031 = ReplacementRule(pattern5031, replacement5031) pattern5032 = Pattern(Integral(S(1)/(tan(c_ + x_*WC('d', S(1)))*tan(x_*WC('b', S(1)) + WC('a', S(0)))), x_), cons2, cons3, cons8, cons29, cons1735, cons73) rule5032 = ReplacementRule(pattern5032, replacement5032) pattern5033 = Pattern(Integral((WC('a', S(1))*cos(v_) + WC('b', S(1))*sin(v_))**WC('n', S(1))*WC('u', S(1)), x_), cons2, cons3, cons4, cons1441) rule5033 = ReplacementRule(pattern5033, replacement5033) return [rule4688, rule4689, rule4690, rule4691, rule4692, rule4693, rule4694, rule4695, rule4696, rule4697, rule4698, rule4699, rule4700, rule4701, rule4702, rule4703, rule4704, rule4705, rule4706, rule4707, rule4708, rule4709, rule4710, rule4711, rule4712, rule4713, rule4714, rule4715, rule4716, rule4717, rule4718, rule4719, rule4720, rule4721, rule4722, rule4723, rule4724, rule4725, rule4726, rule4727, rule4728, rule4729, rule4730, rule4731, rule4732, rule4733, rule4734, rule4735, rule4736, rule4737, rule4738, rule4739, rule4740, rule4741, rule4742, rule4743, rule4744, rule4745, rule4746, rule4747, rule4748, rule4749, rule4750, rule4751, rule4752, rule4753, rule4754, rule4755, rule4756, rule4757, rule4758, rule4759, rule4760, rule4761, rule4762, rule4763, rule4764, rule4765, rule4766, rule4767, rule4768, rule4769, rule4770, rule4771, rule4772, rule4773, rule4774, rule4775, rule4776, rule4777, rule4778, rule4779, rule4780, rule4781, rule4782, rule4783, rule4784, rule4785, rule4786, rule4787, rule4788, rule4789, rule4790, rule4791, rule4792, rule4793, rule4794, rule4795, rule4796, rule4797, rule4798, rule4799, rule4800, rule4801, rule4802, rule4803, rule4804, rule4805, rule4806, rule4807, rule4808, rule4809, rule4810, rule4811, rule4812, rule4813, rule4814, rule4815, rule4816, rule4817, rule4818, rule4819, rule4820, rule4821, rule4822, rule4823, rule4824, rule4825, rule4826, rule4827, rule4828, rule4829, rule4830, rule4831, rule4832, rule4833, rule4834, rule4835, rule4836, rule4837, rule4838, rule4839, rule4840, rule4841, rule4842, rule4843, rule4844, rule4845, rule4846, rule4847, rule4848, rule4849, rule4850, rule4851, rule4852, rule4853, rule4854, rule4855, rule4856, rule4857, rule4858, rule4859, rule4860, rule4861, rule4862, rule4863, rule4864, rule4865, rule4866, rule4867, rule4868, rule4869, rule4870, rule4871, rule4872, rule4873, rule4874, rule4875, rule4876, rule4877, rule4878, rule4879, rule4880, rule4881, rule4882, rule4883, rule4884, rule4885, rule4886, rule4887, rule4888, rule4889, rule4890, rule4891, rule4892, rule4893, rule4894, rule4895, rule4896, rule4897, rule4898, rule4899, rule4900, rule4901, rule4902, rule4903, rule4904, rule4905, rule4906, rule4907, rule4908, rule4909, rule4910, rule4911, rule4912, rule4913, rule4914, rule4915, rule4916, rule4917, rule4918, rule4919, rule4920, rule4921, rule4922, rule4923, rule4924, rule4925, rule4926, rule4927, rule4928, rule4929, rule4930, rule4931, rule4932, rule4933, rule4934, rule4935, rule4936, rule4937, rule4938, rule4939, rule4940, rule4941, rule4942, rule4943, rule4944, rule4945, rule4946, rule4947, rule4948, rule4949, rule4950, rule4951, rule4952, rule4953, rule4954, rule4955, rule4956, rule4957, rule4958, rule4959, rule4960, rule4961, rule4962, rule4963, rule4964, rule4965, rule4966, rule4967, rule4968, rule4969, rule4970, rule4971, rule4972, rule4973, rule4974, rule4975, rule4976, rule4977, rule4978, rule4979, rule4980, rule4981, rule4982, rule4983, rule4984, rule4985, rule4986, rule4987, rule4988, rule4989, rule4990, rule4991, rule4992, rule4993, rule4994, rule4995, rule4996, rule4997, rule4998, rule4999, rule5000, rule5001, rule5002, rule5003, rule5004, rule5005, rule5006, rule5007, rule5008, rule5009, rule5010, rule5011, rule5012, rule5013, rule5014, rule5015, rule5016, rule5017, rule5018, rule5019, rule5020, rule5021, rule5022, rule5023, rule5024, rule5025, rule5026, rule5027, rule5028, rule5029, rule5030, rule5031, rule5032, rule5033, ] def replacement4688(a, b, c, d, m, n, u, x): return Dist((c*tan(a + b*x))**m*(d*sin(a + b*x))**(-m)*(d*cos(a + b*x))**m, Int((d*sin(a + b*x))**(m + n)*(d*cos(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4689(a, b, c, d, m, n, u, x): return Dist((c*tan(a + b*x))**m*(d*sin(a + b*x))**(-m)*(d*cos(a + b*x))**m, Int((d*sin(a + b*x))**m*(d*cos(a + b*x))**(-m + n)*ActivateTrig(u), x), x) def replacement4690(a, b, c, d, m, n, u, x): return Dist((c/tan(a + b*x))**m*(d*sin(a + b*x))**m*(d*cos(a + b*x))**(-m), Int((d*sin(a + b*x))**(-m + n)*(d*cos(a + b*x))**m*ActivateTrig(u), x), x) def replacement4691(a, b, c, d, m, n, u, x): return Dist((c/tan(a + b*x))**m*(d*sin(a + b*x))**m*(d*cos(a + b*x))**(-m), Int((d*sin(a + b*x))**(-m)*(d*cos(a + b*x))**(m + n)*ActivateTrig(u), x), x) def replacement4692(a, b, c, d, m, n, u, x): return Dist((c/sin(a + b*x))**m*(d*sin(a + b*x))**m, Int((d*sin(a + b*x))**(-m + n)*ActivateTrig(u), x), x) def replacement4693(a, b, c, m, u, x): return Dist((c*sin(a + b*x))**(-m)*(c*cos(a + b*x))**m*(c*tan(a + b*x))**m, Int((c*sin(a + b*x))**m*(c*cos(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4694(a, b, c, m, u, x): return Dist((c*sin(a + b*x))**m*(c*cos(a + b*x))**(-m)*(c/tan(a + b*x))**m, Int((c*sin(a + b*x))**(-m)*(c*cos(a + b*x))**m*ActivateTrig(u), x), x) def replacement4695(a, b, c, m, u, x): return Dist((c/cos(a + b*x))**m*(c*cos(a + b*x))**m, Int((c*cos(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4696(a, b, c, m, u, x): return Dist((c/sin(a + b*x))**m*(c*sin(a + b*x))**m, Int((c*sin(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4697(A, B, a, b, c, n, u, x): return Dist(c, Int((c*sin(a + b*x))**(n + S(-1))*(A*sin(a + b*x) + B)*ActivateTrig(u), x), x) def replacement4698(A, B, a, b, c, n, u, x): return Dist(c, Int((c*cos(a + b*x))**(n + S(-1))*(A*cos(a + b*x) + B)*ActivateTrig(u), x), x) def replacement4699(A, B, a, b, u, x): return Int((A*sin(a + b*x) + B)*ActivateTrig(u)/sin(a + b*x), x) def replacement4700(A, B, a, b, u, x): return Int((A*cos(a + b*x) + B)*ActivateTrig(u)/cos(a + b*x), x) def replacement4701(A, B, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c*sin(a + b*x))**(n + S(-2))*(A*sin(a + b*x)**S(2) + B*sin(a + b*x) + C)*ActivateTrig(u), x), x) def replacement4702(A, B, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c*cos(a + b*x))**(n + S(-2))*(A*cos(a + b*x)**S(2) + B*cos(a + b*x) + C)*ActivateTrig(u), x), x) def replacement4703(A, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c*sin(a + b*x))**(n + S(-2))*(A*sin(a + b*x)**S(2) + C)*ActivateTrig(u), x), x) def replacement4704(A, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c*cos(a + b*x))**(n + S(-2))*(A*cos(a + b*x)**S(2) + C)*ActivateTrig(u), x), x) def replacement4705(A, B, C, a, b, u, x): return Int((A*sin(a + b*x)**S(2) + B*sin(a + b*x) + C)*ActivateTrig(u)/sin(a + b*x)**S(2), x) def replacement4706(A, B, C, a, b, u, x): return Int((A*cos(a + b*x)**S(2) + B*cos(a + b*x) + C)*ActivateTrig(u)/cos(a + b*x)**S(2), x) def replacement4707(A, C, a, b, u, x): return Int((A*sin(a + b*x)**S(2) + C)*ActivateTrig(u)/sin(a + b*x)**S(2), x) def replacement4708(A, C, a, b, u, x): return Int((A*cos(a + b*x)**S(2) + C)*ActivateTrig(u)/cos(a + b*x)**S(2), x) def replacement4709(A, B, C, a, b, u, x): return Int((A*sin(a + b*x) + B*sin(a + b*x)**S(2) + C)*ActivateTrig(u)/sin(a + b*x), x) def replacement4710(A, B, C, a, b, u, x): return Int((A*cos(a + b*x) + B*cos(a + b*x)**S(2) + C)*ActivateTrig(u)/cos(a + b*x), x) def replacement4711(A, B, C, a, b, n, n1, n2, u, x): return Int((A + B*sin(a + b*x) + C*sin(a + b*x)**S(2))*ActivateTrig(u)*sin(a + b*x)**n, x) def replacement4712(A, B, C, a, b, n, n1, n2, u, x): return Int((A + B*cos(a + b*x) + C*cos(a + b*x)**S(2))*ActivateTrig(u)*cos(a + b*x)**n, x) def replacement4713(a, b, c, d, m, n, u, x): return Dist((c/tan(a + b*x))**m*(d*tan(a + b*x))**m, Int((d*tan(a + b*x))**(-m + n)*ActivateTrig(u), x), x) def replacement4714(a, b, c, d, m, n, u, x): return Dist((c*tan(a + b*x))**m*(d*sin(a + b*x))**(-m)*(d*cos(a + b*x))**m, Int((d*sin(a + b*x))**m*(d*cos(a + b*x))**(-m + n)*ActivateTrig(u), x), x) def replacement4715(a, b, c, m, u, x): return Dist((c/tan(a + b*x))**m*(c*tan(a + b*x))**m, Int((c*tan(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4716(a, b, c, m, u, x): return Dist((c/tan(a + b*x))**m*(c*tan(a + b*x))**m, Int((c/tan(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4717(A, B, a, b, c, n, u, x): return Dist(c, Int((c*tan(a + b*x))**(n + S(-1))*(A*tan(a + b*x) + B)*ActivateTrig(u), x), x) def replacement4718(A, B, a, b, c, n, u, x): return Dist(c, Int((c/tan(a + b*x))**(n + S(-1))*(A/tan(a + b*x) + B)*ActivateTrig(u), x), x) def replacement4719(A, B, a, b, u, x): return Int((A*tan(a + b*x) + B)*ActivateTrig(u)/tan(a + b*x), x) def replacement4720(A, B, a, b, u, x): return Int((A/tan(a + b*x) + B)*ActivateTrig(u)*tan(a + b*x), x) def replacement4721(A, B, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c*tan(a + b*x))**(n + S(-2))*(A*tan(a + b*x)**S(2) + B*tan(a + b*x) + C)*ActivateTrig(u), x), x) def replacement4722(A, B, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c/tan(a + b*x))**(n + S(-2))*(A/tan(a + b*x)**S(2) + B/tan(a + b*x) + C)*ActivateTrig(u), x), x) def replacement4723(A, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c*tan(a + b*x))**(n + S(-2))*(A*tan(a + b*x)**S(2) + C)*ActivateTrig(u), x), x) def replacement4724(A, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c/tan(a + b*x))**(n + S(-2))*(A/tan(a + b*x)**S(2) + C)*ActivateTrig(u), x), x) def replacement4725(A, B, C, a, b, u, x): return Int((A*tan(a + b*x)**S(2) + B*tan(a + b*x) + C)*ActivateTrig(u)/tan(a + b*x)**S(2), x) def replacement4726(A, B, C, a, b, u, x): return Int((A/tan(a + b*x)**S(2) + B/tan(a + b*x) + C)*ActivateTrig(u)*tan(a + b*x)**S(2), x) def replacement4727(A, C, a, b, u, x): return Int((A*tan(a + b*x)**S(2) + C)*ActivateTrig(u)/tan(a + b*x)**S(2), x) def replacement4728(A, C, a, b, u, x): return Int((A/tan(a + b*x)**S(2) + C)*ActivateTrig(u)*tan(a + b*x)**S(2), x) def replacement4729(A, B, C, a, b, u, x): return Int((A*tan(a + b*x) + B*tan(a + b*x)**S(2) + C)*ActivateTrig(u)/tan(a + b*x), x) def replacement4730(A, B, C, a, b, n, n1, n2, u, x): return Int((A + B*tan(a + b*x) + C*tan(a + b*x)**S(2))*ActivateTrig(u)*tan(a + b*x)**n, x) def replacement4731(A, B, C, a, b, n, n1, n2, u, x): return Int((A + B/tan(a + b*x) + C/tan(a + b*x)**S(2))*(S(1)/tan(a + b*x))**n*ActivateTrig(u), x) def replacement4732(a, b, c, d, m, n, u, x): return Dist((c*sin(a + b*x))**m*(d/sin(a + b*x))**m, Int((d/sin(a + b*x))**(-m + n)*ActivateTrig(u), x), x) def replacement4733(a, b, c, d, m, n, u, x): return Dist((c*cos(a + b*x))**m*(d/cos(a + b*x))**m, Int((d/cos(a + b*x))**(-m + n)*ActivateTrig(u), x), x) def replacement4734(a, b, c, d, m, n, u, x): return Dist((c*tan(a + b*x))**m*(d/sin(a + b*x))**m*(d/cos(a + b*x))**(-m), Int((d/sin(a + b*x))**(-m)*(d/cos(a + b*x))**(m + n)*ActivateTrig(u), x), x) def replacement4735(a, b, c, d, m, n, u, x): return Dist((c*tan(a + b*x))**m*(d/sin(a + b*x))**m*(d/cos(a + b*x))**(-m), Int((d/sin(a + b*x))**(-m + n)*(d/cos(a + b*x))**m*ActivateTrig(u), x), x) def replacement4736(a, b, c, d, m, n, u, x): return Dist((c/tan(a + b*x))**m*(d/sin(a + b*x))**(-m)*(d/cos(a + b*x))**m, Int((d/sin(a + b*x))**m*(d/cos(a + b*x))**(-m + n)*ActivateTrig(u), x), x) def replacement4737(a, b, c, d, m, n, u, x): return Dist((c/tan(a + b*x))**m*(d/sin(a + b*x))**(-m)*(d/cos(a + b*x))**m, Int((d/sin(a + b*x))**(m + n)*(d/cos(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4738(a, b, c, m, u, x): return Dist((c/sin(a + b*x))**m*(c*sin(a + b*x))**m, Int((c/sin(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4739(a, b, c, m, u, x): return Dist((c/cos(a + b*x))**m*(c*cos(a + b*x))**m, Int((c/cos(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4740(a, b, c, m, u, x): return Dist((c/sin(a + b*x))**m*(c/cos(a + b*x))**(-m)*(c*tan(a + b*x))**m, Int((c/sin(a + b*x))**(-m)*(c/cos(a + b*x))**m*ActivateTrig(u), x), x) def replacement4741(a, b, c, m, u, x): return Dist((c/sin(a + b*x))**(-m)*(c/cos(a + b*x))**m*(c/tan(a + b*x))**m, Int((c/sin(a + b*x))**m*(c/cos(a + b*x))**(-m)*ActivateTrig(u), x), x) def replacement4742(A, B, a, b, c, n, u, x): return Dist(c, Int((c/cos(a + b*x))**(n + S(-1))*(A/cos(a + b*x) + B)*ActivateTrig(u), x), x) def replacement4743(A, B, a, b, c, n, u, x): return Dist(c, Int((c/sin(a + b*x))**(n + S(-1))*(A/sin(a + b*x) + B)*ActivateTrig(u), x), x) def replacement4744(A, B, a, b, u, x): return Int((A/cos(a + b*x) + B)*ActivateTrig(u)*cos(a + b*x), x) def replacement4745(A, B, a, b, u, x): return Int((A/sin(a + b*x) + B)*ActivateTrig(u)*sin(a + b*x), x) def replacement4746(A, B, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c/cos(a + b*x))**(n + S(-2))*(A/cos(a + b*x)**S(2) + B/cos(a + b*x) + C)*ActivateTrig(u), x), x) def replacement4747(A, B, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c/sin(a + b*x))**(n + S(-2))*(A/sin(a + b*x)**S(2) + B/sin(a + b*x) + C)*ActivateTrig(u), x), x) def replacement4748(A, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c/cos(a + b*x))**(n + S(-2))*(A/cos(a + b*x)**S(2) + C)*ActivateTrig(u), x), x) def replacement4749(A, C, a, b, c, n, u, x): return Dist(c**S(2), Int((c/sin(a + b*x))**(n + S(-2))*(A/sin(a + b*x)**S(2) + C)*ActivateTrig(u), x), x) def replacement4750(A, B, C, a, b, u, x): return Int((A/cos(a + b*x)**S(2) + B/cos(a + b*x) + C)*ActivateTrig(u)*cos(a + b*x)**S(2), x) def replacement4751(A, B, C, a, b, u, x): return Int((A/sin(a + b*x)**S(2) + B/sin(a + b*x) + C)*ActivateTrig(u)*sin(a + b*x)**S(2), x) def replacement4752(A, C, a, b, u, x): return Int((A/cos(a + b*x)**S(2) + C)*ActivateTrig(u)*cos(a + b*x)**S(2), x) def replacement4753(A, C, a, b, u, x): return Int((A/sin(a + b*x)**S(2) + C)*ActivateTrig(u)*sin(a + b*x)**S(2), x) def replacement4754(A, B, C, a, b, n, n1, n2, u, x): return Int((A + B/cos(a + b*x) + C/cos(a + b*x)**S(2))*(S(1)/cos(a + b*x))**n*ActivateTrig(u), x) def replacement4755(A, B, C, a, b, n, n1, n2, u, x): return Int((A + B/sin(a + b*x) + C/sin(a + b*x)**S(2))*(S(1)/sin(a + b*x))**n*ActivateTrig(u), x) def replacement4756(a, b, c, d, x): return Simp(sin(a - c + x*(b - d))/(S(2)*b - S(2)*d), x) - Simp(sin(a + c + x*(b + d))/(S(2)*b + S(2)*d), x) def replacement4757(a, b, c, d, x): return Simp(sin(a - c + x*(b - d))/(S(2)*b - S(2)*d), x) + Simp(sin(a + c + x*(b + d))/(S(2)*b + S(2)*d), x) def replacement4758(a, b, c, d, x): return -Simp(cos(a - c + x*(b - d))/(S(2)*b - S(2)*d), x) - Simp(cos(a + c + x*(b + d))/(S(2)*b + S(2)*d), x) def replacement4759(a, b, c, d, g, p, x): return Dist(S(1)/2, Int((g*sin(c + d*x))**p, x), x) + Dist(S(1)/2, Int((g*sin(c + d*x))**p*cos(c + d*x), x), x) def replacement4760(a, b, c, d, g, p, x): return Dist(S(1)/2, Int((g*sin(c + d*x))**p, x), x) - Dist(S(1)/2, Int((g*sin(c + d*x))**p*cos(c + d*x), x), x) def replacement4761(a, b, c, d, e, m, p, x): return Dist(S(2)**p*e**(-p), Int((e*cos(a + b*x))**(m + p)*sin(a + b*x)**p, x), x) def replacement4762(a, b, c, d, f, n, p, x): return Dist(S(2)**p*f**(-p), Int((f*sin(a + b*x))**(n + p)*cos(a + b*x)**p, x), x) def replacement4763(a, b, c, d, e, g, m, p, x): return Simp(e**S(2)*(e*cos(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(p + S(1))), x) def replacement4764(a, b, c, d, e, g, m, p, x): return -Simp(e**S(2)*(e*sin(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(p + S(1))), x) def replacement4765(a, b, c, d, e, g, m, p, x): return -Simp((e*cos(a + b*x))**m*(g*sin(c + d*x))**(p + S(1))/(b*g*m), x) def replacement4766(a, b, c, d, e, g, m, p, x): return Simp((e*sin(a + b*x))**m*(g*sin(c + d*x))**(p + S(1))/(b*g*m), x) def replacement4767(a, b, c, d, e, g, m, p, x): return Dist(e**S(4)*(m + p + S(-1))/(S(4)*g**S(2)*(p + S(1))), Int((e*cos(a + b*x))**(m + S(-4))*(g*sin(c + d*x))**(p + S(2)), x), x) + Simp(e**S(2)*(e*cos(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(p + S(1))), x) def replacement4768(a, b, c, d, e, g, m, p, x): return Dist(e**S(4)*(m + p + S(-1))/(S(4)*g**S(2)*(p + S(1))), Int((e*sin(a + b*x))**(m + S(-4))*(g*sin(c + d*x))**(p + S(2)), x), x) - Simp(e**S(2)*(e*sin(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(p + S(1))), x) def replacement4769(a, b, c, d, e, g, m, p, x): return Dist(e**S(2)*(m + S(2)*p + S(2))/(S(4)*g**S(2)*(p + S(1))), Int((e*cos(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**(p + S(2)), x), x) + Simp((e*cos(a + b*x))**m*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(p + S(1))), x) def replacement4770(a, b, c, d, e, g, m, p, x): return Dist(e**S(2)*(m + S(2)*p + S(2))/(S(4)*g**S(2)*(p + S(1))), Int((e*sin(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**(p + S(2)), x), x) - Simp((e*sin(a + b*x))**m*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(p + S(1))), x) def replacement4771(a, b, c, d, e, g, m, p, x): return Dist(e**S(2)*(m + p + S(-1))/(m + S(2)*p), Int((e*cos(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**p, x), x) + Simp(e**S(2)*(e*cos(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(m + S(2)*p)), x) def replacement4772(a, b, c, d, e, g, m, p, x): return Dist(e**S(2)*(m + p + S(-1))/(m + S(2)*p), Int((e*sin(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**p, x), x) - Simp(e**S(2)*(e*sin(a + b*x))**(m + S(-2))*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(m + S(2)*p)), x) def replacement4773(a, b, c, d, e, g, m, p, x): return Dist((m + S(2)*p + S(2))/(e**S(2)*(m + p + S(1))), Int((e*cos(a + b*x))**(m + S(2))*(g*sin(c + d*x))**p, x), x) - Simp((e*cos(a + b*x))**m*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(m + p + S(1))), x) def replacement4774(a, b, c, d, e, g, m, p, x): return Dist((m + S(2)*p + S(2))/(e**S(2)*(m + p + S(1))), Int((e*sin(a + b*x))**(m + S(2))*(g*sin(c + d*x))**p, x), x) + Simp((e*sin(a + b*x))**m*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(m + p + S(1))), x) def replacement4775(a, b, c, d, g, p, x): return Dist(S(2)*g*p/(S(2)*p + S(1)), Int((g*sin(c + d*x))**(p + S(-1))*sin(a + b*x), x), x) + Simp(S(2)*(g*sin(c + d*x))**p*sin(a + b*x)/(d*(S(2)*p + S(1))), x) def replacement4776(a, b, c, d, g, p, x): return Dist(S(2)*g*p/(S(2)*p + S(1)), Int((g*sin(c + d*x))**(p + S(-1))*cos(a + b*x), x), x) + Simp(-S(2)*(g*sin(c + d*x))**p*cos(a + b*x)/(d*(S(2)*p + S(1))), x) def replacement4777(a, b, c, d, g, p, x): return Dist((S(2)*p + S(3))/(S(2)*g*(p + S(1))), Int((g*sin(c + d*x))**(p + S(1))*sin(a + b*x), x), x) + Simp((g*sin(c + d*x))**(p + S(1))*cos(a + b*x)/(S(2)*b*g*(p + S(1))), x) def replacement4778(a, b, c, d, g, p, x): return Dist((S(2)*p + S(3))/(S(2)*g*(p + S(1))), Int((g*sin(c + d*x))**(p + S(1))*cos(a + b*x), x), x) - Simp((g*sin(c + d*x))**(p + S(1))*sin(a + b*x)/(S(2)*b*g*(p + S(1))), x) def replacement4779(a, b, c, d, x): return Simp(log(sin(a + b*x) + sqrt(sin(c + d*x)) + cos(a + b*x))/d, x) - Simp(-asin(sin(a + b*x) - cos(a + b*x))/d, x) def replacement4780(a, b, c, d, x): return -Simp(log(sin(a + b*x) + sqrt(sin(c + d*x)) + cos(a + b*x))/d, x) - Simp(-asin(sin(a + b*x) - cos(a + b*x))/d, x) def replacement4781(a, b, c, d, g, p, x): return Dist(S(2)*g, Int((g*sin(c + d*x))**(p + S(-1))*sin(a + b*x), x), x) def replacement4782(a, b, c, d, g, p, x): return Dist(S(2)*g, Int((g*sin(c + d*x))**(p + S(-1))*cos(a + b*x), x), x) def replacement4783(a, b, c, d, e, g, m, p, x): return Dist((e*cos(a + b*x))**(-p)*(g*sin(c + d*x))**p*sin(a + b*x)**(-p), Int((e*cos(a + b*x))**(m + p)*sin(a + b*x)**p, x), x) def replacement4784(a, b, c, d, f, g, n, p, x): return Dist((f*sin(a + b*x))**(-p)*(g*sin(c + d*x))**p*cos(a + b*x)**(-p), Int((f*sin(a + b*x))**(n + p)*cos(a + b*x)**p, x), x) def replacement4785(a, b, c, d, g, p, x): return Dist(S(1)/4, Int((g*sin(c + d*x))**p, x), x) - Dist(S(1)/4, Int((g*sin(c + d*x))**p*cos(c + d*x)**S(2), x), x) def replacement4786(a, b, c, d, e, f, m, n, p, x): return Dist(S(2)**p*e**(-p)*f**(-p), Int((e*cos(a + b*x))**(m + p)*(f*sin(a + b*x))**(n + p), x), x) def replacement4787(a, b, c, d, e, f, g, m, n, p, x): return Simp(e*(e*cos(a + b*x))**(m + S(-1))*(f*sin(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*f*(n + p + S(1))), x) def replacement4788(a, b, c, d, e, f, g, m, n, p, x): return -Simp(e*(e*sin(a + b*x))**(m + S(-1))*(f*cos(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*f*(n + p + S(1))), x) def replacement4789(a, b, c, d, e, f, g, m, n, p, x): return -Simp((e*cos(a + b*x))**(m + S(1))*(f*sin(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*e*f*(m + p + S(1))), x) def replacement4790(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(4)*(m + p + S(-1))/(S(4)*g**S(2)*(n + p + S(1))), Int((e*cos(a + b*x))**(m + S(-4))*(f*sin(a + b*x))**n*(g*sin(c + d*x))**(p + S(2)), x), x) + Simp(e**S(2)*(e*cos(a + b*x))**(m + S(-2))*(f*sin(a + b*x))**n*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(n + p + S(1))), x) def replacement4791(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(4)*(m + p + S(-1))/(S(4)*g**S(2)*(n + p + S(1))), Int((e*sin(a + b*x))**(m + S(-4))*(f*cos(a + b*x))**n*(g*sin(c + d*x))**(p + S(2)), x), x) - Simp(e**S(2)*(e*sin(a + b*x))**(m + S(-2))*(f*cos(a + b*x))**n*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(n + p + S(1))), x) def replacement4792(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(2)*(m + n + S(2)*p + S(2))/(S(4)*g**S(2)*(n + p + S(1))), Int((e*cos(a + b*x))**(m + S(-2))*(f*sin(a + b*x))**n*(g*sin(c + d*x))**(p + S(2)), x), x) + Simp((e*cos(a + b*x))**m*(f*sin(a + b*x))**n*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(n + p + S(1))), x) def replacement4793(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(2)*(m + n + S(2)*p + S(2))/(S(4)*g**S(2)*(n + p + S(1))), Int((e*sin(a + b*x))**(m + S(-2))*(f*cos(a + b*x))**n*(g*sin(c + d*x))**(p + S(2)), x), x) - Simp((e*sin(a + b*x))**m*(f*cos(a + b*x))**n*(g*sin(c + d*x))**(p + S(1))/(S(2)*b*g*(n + p + S(1))), x) def replacement4794(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(2)*(m + p + S(-1))/(f**S(2)*(n + p + S(1))), Int((e*cos(a + b*x))**(m + S(-2))*(f*sin(a + b*x))**(n + S(2))*(g*sin(c + d*x))**p, x), x) + Simp(e*(e*cos(a + b*x))**(m + S(-1))*(f*sin(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*f*(n + p + S(1))), x) def replacement4795(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(2)*(m + p + S(-1))/(f**S(2)*(n + p + S(1))), Int((e*sin(a + b*x))**(m + S(-2))*(f*cos(a + b*x))**(n + S(2))*(g*sin(c + d*x))**p, x), x) - Simp(e*(e*sin(a + b*x))**(m + S(-1))*(f*cos(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*f*(n + p + S(1))), x) def replacement4796(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(2)*(m + p + S(-1))/(m + n + S(2)*p), Int((e*cos(a + b*x))**(m + S(-2))*(f*sin(a + b*x))**n*(g*sin(c + d*x))**p, x), x) + Simp(e*(e*cos(a + b*x))**(m + S(-1))*(f*sin(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*f*(m + n + S(2)*p)), x) def replacement4797(a, b, c, d, e, f, g, m, n, p, x): return Dist(e**S(2)*(m + p + S(-1))/(m + n + S(2)*p), Int((e*sin(a + b*x))**(m + S(-2))*(f*cos(a + b*x))**n*(g*sin(c + d*x))**p, x), x) - Simp(e*(e*sin(a + b*x))**(m + S(-1))*(f*cos(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*f*(m + n + S(2)*p)), x) def replacement4798(a, b, c, d, e, f, g, m, n, p, x): return Dist(S(2)*f*g*(n + p + S(-1))/(e*(m + n + S(2)*p)), Int((e*cos(a + b*x))**(m + S(1))*(f*sin(a + b*x))**(n + S(-1))*(g*sin(c + d*x))**(p + S(-1)), x), x) - Simp(f*(e*cos(a + b*x))**(m + S(1))*(f*sin(a + b*x))**(n + S(-1))*(g*sin(c + d*x))**p/(b*e*(m + n + S(2)*p)), x) def replacement4799(a, b, c, d, e, f, g, m, n, p, x): return Dist(S(2)*f*g*(n + p + S(-1))/(e*(m + n + S(2)*p)), Int((e*sin(a + b*x))**(m + S(1))*(f*cos(a + b*x))**(n + S(-1))*(g*sin(c + d*x))**(p + S(-1)), x), x) + Simp(f*(e*sin(a + b*x))**(m + S(1))*(f*cos(a + b*x))**(n + S(-1))*(g*sin(c + d*x))**p/(b*e*(m + n + S(2)*p)), x) def replacement4800(a, b, c, d, e, f, g, m, n, p, x): return Dist(f*(m + n + S(2)*p + S(2))/(S(2)*e*g*(m + p + S(1))), Int((e*cos(a + b*x))**(m + S(1))*(f*sin(a + b*x))**(n + S(-1))*(g*sin(c + d*x))**(p + S(1)), x), x) - Simp((e*cos(a + b*x))**(m + S(1))*(f*sin(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*e*f*(m + p + S(1))), x) def replacement4801(a, b, c, d, e, f, g, m, n, p, x): return Dist(f*(m + n + S(2)*p + S(2))/(S(2)*e*g*(m + p + S(1))), Int((e*sin(a + b*x))**(m + S(1))*(f*cos(a + b*x))**(n + S(-1))*(g*sin(c + d*x))**(p + S(1)), x), x) + Simp((e*sin(a + b*x))**(m + S(1))*(f*cos(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*e*f*(m + p + S(1))), x) def replacement4802(a, b, c, d, e, f, g, m, n, p, x): return Dist((m + n + S(2)*p + S(2))/(e**S(2)*(m + p + S(1))), Int((e*cos(a + b*x))**(m + S(2))*(f*sin(a + b*x))**n*(g*sin(c + d*x))**p, x), x) - Simp((e*cos(a + b*x))**(m + S(1))*(f*sin(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*e*f*(m + p + S(1))), x) def replacement4803(a, b, c, d, e, f, g, m, n, p, x): return Dist((m + n + S(2)*p + S(2))/(e**S(2)*(m + p + S(1))), Int((e*sin(a + b*x))**(m + S(2))*(f*cos(a + b*x))**n*(g*sin(c + d*x))**p, x), x) + Simp((e*sin(a + b*x))**(m + S(1))*(f*cos(a + b*x))**(n + S(1))*(g*sin(c + d*x))**p/(b*e*f*(m + p + S(1))), x) def replacement4804(a, b, c, d, e, f, g, m, n, p, x): return Dist((e*cos(a + b*x))**(-p)*(f*sin(a + b*x))**(-p)*(g*sin(c + d*x))**p, Int((e*cos(a + b*x))**(m + p)*(f*sin(a + b*x))**(n + p), x), x) def replacement4805(a, b, c, d, e, m, x): return -Simp((e*cos(a + b*x))**(m + S(1))*(m + S(2))*cos((a + b*x)*(m + S(1)))/(d*e*(m + S(1))), x) def replacement4806(F, a, b, c, d, n, p, x): return Int((a + b*F(c + d*x)**n)**p, x) def replacement4807(F, a, b, c, d, n, x): return Dist(S(2)/(a*n), Sum_doit(Int(S(1)/(S(1) - (S(-1))**(-S(4)*k/n)*F(c + d*x)**S(2)/Rt(-a/b, n/S(2))), x), List(k, S(1), n/S(2))), x) def replacement4808(F, a, b, c, d, n, x): return Int(ExpandTrig(S(1)/(a + b*F(c + d*x)**n), x), x) def replacement4809(F, G, a, b, c, d, m, n, x): return Int(ExpandTrig(G(c + d*x)**m, S(1)/(a + b*F(c + d*x)**n), x), x) def With4810(F, a, c, d, n, p, x): v = ActivateTrig(F(c + d*x)) return Dist(a**IntPart(n)*(a*v**p)**FracPart(n)*(v/NonfreeFactors(v, x))**(p*IntPart(n))*NonfreeFactors(v, x)**(-p*FracPart(n)), Int(NonfreeFactors(v, x)**(n*p), x), x) def With4811(F, a, b, c, d, n, p, x): v = ActivateTrig(F(c + d*x)) return Dist(a**IntPart(n)*(a*(b*v)**p)**FracPart(n)*(b*v)**(-p*FracPart(n)), Int((b*v)**(n*p), x), x) def With4812(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(sin(c*(a + b*x)), x) if FunctionOfQ(sin(c*(a + b*x))/d, u, x, True): return True return False def replacement4812(F, a, b, c, u, x): d = FreeFactors(sin(c*(a + b*x)), x) return Dist(d/(b*c), Subst(Int(SubstFor(S(1), sin(c*(a + b*x))/d, u, x), x), x, sin(c*(a + b*x))/d), x) def With4813(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(cos(c*(a + b*x)), x) if FunctionOfQ(cos(c*(a + b*x))/d, u, x, True): return True return False def replacement4813(F, a, b, c, u, x): d = FreeFactors(cos(c*(a + b*x)), x) return -Dist(d/(b*c), Subst(Int(SubstFor(S(1), cos(c*(a + b*x))/d, u, x), x), x, cos(c*(a + b*x))/d), x) def With4814(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(sin(c*(a + b*x)), x) if FunctionOfQ(sin(c*(a + b*x))/d, u, x, True): return True return False def replacement4814(F, a, b, c, u, x): d = FreeFactors(sin(c*(a + b*x)), x) return Dist(S(1)/(b*c), Subst(Int(SubstFor(S(1)/x, sin(c*(a + b*x))/d, u, x), x), x, sin(c*(a + b*x))/d), x) def With4815(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(cos(c*(a + b*x)), x) if FunctionOfQ(cos(c*(a + b*x))/d, u, x, True): return True return False def replacement4815(F, a, b, c, u, x): d = FreeFactors(cos(c*(a + b*x)), x) return -Dist(S(1)/(b*c), Subst(Int(SubstFor(S(1)/x, cos(c*(a + b*x))/d, u, x), x), x, cos(c*(a + b*x))/d), x) def With4816(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(tan(c*(a + b*x)), x) if FunctionOfQ(tan(c*(a + b*x))/d, u, x, True): return True return False def replacement4816(F, a, b, c, u, x): d = FreeFactors(tan(c*(a + b*x)), x) return Dist(d/(b*c), Subst(Int(SubstFor(S(1), tan(c*(a + b*x))/d, u, x), x), x, tan(c*(a + b*x))/d), x) def With4817(a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(tan(c*(a + b*x)), x) if FunctionOfQ(tan(c*(a + b*x))/d, u, x, True): return True return False def replacement4817(a, b, c, u, x): d = FreeFactors(tan(c*(a + b*x)), x) return Dist(d/(b*c), Subst(Int(SubstFor(S(1), tan(c*(a + b*x))/d, u, x), x), x, tan(c*(a + b*x))/d), x) def With4818(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(S(1)/tan(c*(a + b*x)), x) if FunctionOfQ(S(1)/(d*tan(c*(a + b*x))), u, x, True): return True return False def replacement4818(F, a, b, c, u, x): d = FreeFactors(S(1)/tan(c*(a + b*x)), x) return -Dist(d/(b*c), Subst(Int(SubstFor(S(1), S(1)/(d*tan(c*(a + b*x))), u, x), x), x, S(1)/(d*tan(c*(a + b*x)))), x) def With4819(a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(S(1)/tan(c*(a + b*x)), x) if FunctionOfQ(S(1)/(d*tan(c*(a + b*x))), u, x, True): return True return False def replacement4819(a, b, c, u, x): d = FreeFactors(S(1)/tan(c*(a + b*x)), x) return -Dist(d/(b*c), Subst(Int(SubstFor(S(1), S(1)/(d*tan(c*(a + b*x))), u, x), x), x, S(1)/(d*tan(c*(a + b*x)))), x) def With4820(F, a, b, c, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(tan(c*(a + b*x)), x) if And(FunctionOfQ(tan(c*(a + b*x))/d, u, x, True), TryPureTanSubst((S(1)/tan(c*(a + b*x)))**n*ActivateTrig(u), x)): return True return False def replacement4820(F, a, b, c, n, u, x): d = FreeFactors(tan(c*(a + b*x)), x) return Dist(d**(S(1) - n)/(b*c), Subst(Int(SubstFor(x**(-n)/(d**S(2)*x**S(2) + S(1)), tan(c*(a + b*x))/d, u, x), x), x, tan(c*(a + b*x))/d), x) def With4821(F, a, b, c, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(S(1)/tan(c*(a + b*x)), x) if And(FunctionOfQ(S(1)/(d*tan(c*(a + b*x))), u, x, True), TryPureTanSubst(ActivateTrig(u)*tan(c*(a + b*x))**n, x)): return True return False def replacement4821(F, a, b, c, n, u, x): d = FreeFactors(S(1)/tan(c*(a + b*x)), x) return -Dist(d**(S(1) - n)/(b*c), Subst(Int(SubstFor(x**(-n)/(d**S(2)*x**S(2) + S(1)), S(1)/(d*tan(c*(a + b*x))), u, x), x), x, S(1)/(d*tan(c*(a + b*x)))), x) def With4822(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: v = FunctionOfTrig(u, x) d = FreeFactors(S(1)/tan(v), x) res = And(Not(FalseQ(v)), FunctionOfQ(NonfreeFactors(S(1)/tan(v), x), u, x, True), TryPureTanSubst(ActivateTrig(u), x)) except (TypeError, AttributeError): return False if res: return True return False def replacement4822(u, x): v = FunctionOfTrig(u, x) d = FreeFactors(S(1)/tan(v), x) return Simp(With(List(Set(d, FreeFactors(S(1)/tan(v), x))), Dist(-d/Coefficient(v, x, S(1)), Subst(Int(SubstFor(S(1)/(d**S(2)*x**S(2) + S(1)), S(1)/(d*tan(v)), u, x), x), x, S(1)/(d*tan(v))), x)), x) def With4823(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: v = FunctionOfTrig(u, x) d = FreeFactors(tan(v), x) res = And(Not(FalseQ(v)), FunctionOfQ(NonfreeFactors(tan(v), x), u, x, True), TryPureTanSubst(ActivateTrig(u), x)) except (TypeError, AttributeError): return False if res: return True return False def replacement4823(u, x): v = FunctionOfTrig(u, x) d = FreeFactors(tan(v), x) return Simp(With(List(Set(d, FreeFactors(tan(v), x))), Dist(d/Coefficient(v, x, S(1)), Subst(Int(SubstFor(S(1)/(d**S(2)*x**S(2) + S(1)), tan(v)/d, u, x), x), x, tan(v)/d), x)), x) def replacement4824(F, G, a, b, c, d, p, q, x): return Int(ExpandTrigReduce(ActivateTrig(F(a + b*x)**p*G(c + d*x)**q), x), x) def replacement4825(F, G, H, a, b, c, d, e, f, p, q, r, x): return Int(ExpandTrigReduce(ActivateTrig(F(a + b*x)**p*G(c + d*x)**q*H(e + f*x)**r), x), x) def With4826(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(sin(c*(a + b*x)), x) if FunctionOfQ(sin(c*(a + b*x))/d, u, x): return True return False def replacement4826(F, a, b, c, u, x): d = FreeFactors(sin(c*(a + b*x)), x) return Dist(d/(b*c), Subst(Int(SubstFor(S(1), sin(c*(a + b*x))/d, u, x), x), x, sin(c*(a + b*x))/d), x) def With4827(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(cos(c*(a + b*x)), x) if FunctionOfQ(cos(c*(a + b*x))/d, u, x): return True return False def replacement4827(F, a, b, c, u, x): d = FreeFactors(cos(c*(a + b*x)), x) return -Dist(d/(b*c), Subst(Int(SubstFor(S(1), cos(c*(a + b*x))/d, u, x), x), x, cos(c*(a + b*x))/d), x) def With4828(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(sin(c*(a + b*x)), x) if FunctionOfQ(sin(c*(a + b*x))/d, u, x): return True return False def replacement4828(F, a, b, c, u, x): d = FreeFactors(sin(c*(a + b*x)), x) return Dist(S(1)/(b*c), Subst(Int(SubstFor(S(1)/x, sin(c*(a + b*x))/d, u, x), x), x, sin(c*(a + b*x))/d), x) def With4829(F, a, b, c, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(cos(c*(a + b*x)), x) if FunctionOfQ(cos(c*(a + b*x))/d, u, x): return True return False def replacement4829(F, a, b, c, u, x): d = FreeFactors(cos(c*(a + b*x)), x) return -Dist(S(1)/(b*c), Subst(Int(SubstFor(S(1)/x, cos(c*(a + b*x))/d, u, x), x), x, cos(c*(a + b*x))/d), x) def With4830(F, a, b, c, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(sin(c*(a + b*x)), x) if FunctionOfQ(sin(c*(a + b*x))/d, u, x): return True return False def replacement4830(F, a, b, c, n, u, x): d = FreeFactors(sin(c*(a + b*x)), x) return Dist(d/(b*c), Subst(Int(SubstFor((-d**S(2)*x**S(2) + S(1))**(n/S(2) + S(-1)/2), sin(c*(a + b*x))/d, u, x), x), x, sin(c*(a + b*x))/d), x) def With4831(F, a, b, c, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(sin(c*(a + b*x)), x) if FunctionOfQ(sin(c*(a + b*x))/d, u, x): return True return False def replacement4831(F, a, b, c, n, u, x): d = FreeFactors(sin(c*(a + b*x)), x) return Dist(d/(b*c), Subst(Int(SubstFor((-d**S(2)*x**S(2) + S(1))**(-n/S(2) + S(-1)/2), sin(c*(a + b*x))/d, u, x), x), x, sin(c*(a + b*x))/d), x) def With4832(F, a, b, c, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(cos(c*(a + b*x)), x) if FunctionOfQ(cos(c*(a + b*x))/d, u, x): return True return False def replacement4832(F, a, b, c, n, u, x): d = FreeFactors(cos(c*(a + b*x)), x) return -Dist(d/(b*c), Subst(Int(SubstFor((-d**S(2)*x**S(2) + S(1))**(n/S(2) + S(-1)/2), cos(c*(a + b*x))/d, u, x), x), x, cos(c*(a + b*x))/d), x) def With4833(F, a, b, c, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(cos(c*(a + b*x)), x) if FunctionOfQ(cos(c*(a + b*x))/d, u, x): return True return False def replacement4833(F, a, b, c, n, u, x): d = FreeFactors(cos(c*(a + b*x)), x) return -Dist(d/(b*c), Subst(Int(SubstFor((-d**S(2)*x**S(2) + S(1))**(-n/S(2) + S(-1)/2), cos(c*(a + b*x))/d, u, x), x), x, cos(c*(a + b*x))/d), x) def With4834(F, a, b, c, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(sin(c*(a + b*x)), x) if FunctionOfQ(sin(c*(a + b*x))/d, u, x): return True return False def replacement4834(F, a, b, c, n, u, x): d = FreeFactors(sin(c*(a + b*x)), x) return Dist(d**(S(1) - n)/(b*c), Subst(Int(SubstFor(x**(-n)*(-d**S(2)*x**S(2) + S(1))**(n/S(2) + S(-1)/2), sin(c*(a + b*x))/d, u, x), x), x, sin(c*(a + b*x))/d), x) def With4835(F, a, b, c, n, u, x): if isinstance(x, (int, Integer, float, Float)): return False d = FreeFactors(cos(c*(a + b*x)), x) if FunctionOfQ(cos(c*(a + b*x))/d, u, x): return True return False def replacement4835(F, a, b, c, n, u, x): d = FreeFactors(cos(c*(a + b*x)), x) return -Dist(d**(S(1) - n)/(b*c), Subst(Int(SubstFor(x**(-n)*(-d**S(2)*x**S(2) + S(1))**(n/S(2) + S(-1)/2), cos(c*(a + b*x))/d, u, x), x), x, cos(c*(a + b*x))/d), x) def With4836(F, a, b, c, d, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False e = FreeFactors(sin(c*(a + b*x)), x) if FunctionOfQ(sin(c*(a + b*x))/e, u, x): return True return False def replacement4836(F, a, b, c, d, n, u, v, x): e = FreeFactors(sin(c*(a + b*x)), x) return Dist(d, Int(ActivateTrig(u)*cos(c*(a + b*x))**n, x), x) + Int(ActivateTrig(u*v), x) def With4837(F, a, b, c, d, n, u, v, x): if isinstance(x, (int, Integer, float, Float)): return False e = FreeFactors(cos(c*(a + b*x)), x) if FunctionOfQ(cos(c*(a + b*x))/e, u, x): return True return False def replacement4837(F, a, b, c, d, n, u, v, x): e = FreeFactors(cos(c*(a + b*x)), x) return Dist(d, Int(ActivateTrig(u)*sin(c*(a + b*x))**n, x), x) + Int(ActivateTrig(u*v), x) def With4838(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: v = FunctionOfTrig(u, x) d = FreeFactors(sin(v), x) res = And(Not(FalseQ(v)), FunctionOfQ(NonfreeFactors(sin(v), x), u/cos(v), x)) except (TypeError, AttributeError): return False if res: return True return False def replacement4838(u, x): v = FunctionOfTrig(u, x) d = FreeFactors(sin(v), x) return Simp(With(List(Set(d, FreeFactors(sin(v), x))), Dist(d/Coefficient(v, x, S(1)), Subst(Int(SubstFor(S(1), sin(v)/d, u/cos(v), x), x), x, sin(v)/d), x)), x) def With4839(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: v = FunctionOfTrig(u, x) d = FreeFactors(cos(v), x) res = And(Not(FalseQ(v)), FunctionOfQ(NonfreeFactors(cos(v), x), u/sin(v), x)) except (TypeError, AttributeError): return False if res: return True return False def replacement4839(u, x): v = FunctionOfTrig(u, x) d = FreeFactors(cos(v), x) return Simp(With(List(Set(d, FreeFactors(cos(v), x))), Dist(-d/Coefficient(v, x, S(1)), Subst(Int(SubstFor(S(1), cos(v)/d, u/sin(v), x), x), x, cos(v)/d), x)), x) def replacement4840(a, b, c, d, e, p, u, x): return Dist((a + c)**p, Int(ActivateTrig(u), x), x) def replacement4841(a, b, c, d, e, p, u, x): return Dist((a + c)**p, Int(ActivateTrig(u), x), x) def replacement4842(a, b, c, d, e, p, u, x): return Dist((a + c)**p, Int(ActivateTrig(u), x), x) def With4843(u, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(ActivateTrig(y), ActivateTrig(u), x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement4843(u, x, y): q = DerivativeDivides(ActivateTrig(y), ActivateTrig(u), x) return Simp(q*log(RemoveContent(ActivateTrig(y), x)), x) def With4844(u, w, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(ActivateTrig(w*y), ActivateTrig(u), x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement4844(u, w, x, y): q = DerivativeDivides(ActivateTrig(w*y), ActivateTrig(u), x) return Simp(q*log(RemoveContent(ActivateTrig(w*y), x)), x) def With4845(m, u, x, y): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(ActivateTrig(y), ActivateTrig(u), x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement4845(m, u, x, y): q = DerivativeDivides(ActivateTrig(y), ActivateTrig(u), x) return Simp(q*ActivateTrig(y**(m + S(1)))/(m + S(1)), x) def With4846(m, n, u, x, y, z): if isinstance(x, (int, Integer, float, Float)): return False try: q = DerivativeDivides(ActivateTrig(y*z), ActivateTrig(u*z**(-m + n)), x) res = Not(FalseQ(q)) except (TypeError, AttributeError): return False if res: return True return False def replacement4846(m, n, u, x, y, z): q = DerivativeDivides(ActivateTrig(y*z), ActivateTrig(u*z**(-m + n)), x) return Simp(q*ActivateTrig(y**(m + S(1))*z**(m + S(1)))/(m + S(1)), x) def With4847(F, a, c, d, n, p, u, x): v = ActivateTrig(F(c + d*x)) return Dist(a**IntPart(n)*(a*v**p)**FracPart(n)*(v/NonfreeFactors(v, x))**(p*IntPart(n))*NonfreeFactors(v, x)**(-p*FracPart(n)), Int(ActivateTrig(u)*NonfreeFactors(v, x)**(n*p), x), x) def With4848(F, a, b, c, d, n, p, u, x): v = ActivateTrig(F(c + d*x)) return Dist(a**IntPart(n)*(a*(b*v)**p)**FracPart(n)*(b*v)**(-p*FracPart(n)), Int((b*v)**(n*p)*ActivateTrig(u), x), x) def With4849(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: v = FunctionOfTrig(u, x) d = FreeFactors(tan(v), x) res = And(Not(FalseQ(v)), FunctionOfQ(NonfreeFactors(tan(v), x), u, x)) except (TypeError, AttributeError): return False if res: return True return False def replacement4849(u, x): v = FunctionOfTrig(u, x) d = FreeFactors(tan(v), x) return Dist(d/Coefficient(v, x, 1), Subst(Int(SubstFor(1/(d**2*x**2 + 1), tan(v)/d, u, x), x), x, tan(v)/d), x) def replacement4850(a, b, c, d, n, p, u, x): return Int((a*sin(c + d*x)**n + b)**p*(S(1)/cos(c + d*x))**(n*p)*ActivateTrig(u), x) def replacement4851(a, b, c, d, n, p, u, x): return Int((a*cos(c + d*x)**n + b)**p*(S(1)/sin(c + d*x))**(n*p)*ActivateTrig(u), x) def replacement4852(F, a, b, c, d, n, p, q, u, x): return Int(ActivateTrig(u*(a + b*F(c + d*x)**(-p + q))**n*F(c + d*x)**(n*p)), x) def replacement4853(F, a, b, c, d, e, n, p, q, r, u, x): return Int(ActivateTrig(u*(a + b*F(d + e*x)**(-p + q) + c*F(d + e*x)**(-p + r))**n*F(d + e*x)**(n*p)), x) def replacement4854(F, a, b, c, d, e, n, p, q, u, x): return Int(ActivateTrig(u*(a*F(d + e*x)**(-p) + b + c*F(d + e*x)**(-p + q))**n*F(d + e*x)**(n*p)), x) def replacement4855(a, b, c, d, n, u, x): return Int((a*exp(-a*(c + d*x)/b))**n*ActivateTrig(u), x) def replacement4856(u, x): return Int(TrigSimplify(u), x) def With4857(a, p, u, v, x): uu = ActivateTrig(u) vv = ActivateTrig(v) return Dist(a**IntPart(p)*vv**(-FracPart(p))*(a*vv)**FracPart(p), Int(uu*vv**p, x), x) def With4858(m, p, u, v, x): uu = ActivateTrig(u) vv = ActivateTrig(v) return Dist(vv**(-m*FracPart(p))*(vv**m)**FracPart(p), Int(uu*vv**(m*p), x), x) def With4859(m, n, p, u, v, w, x): uu = ActivateTrig(u) vv = ActivateTrig(v) ww = ActivateTrig(w) return Dist(vv**(-m*FracPart(p))*ww**(-n*FracPart(p))*(vv**m*ww**n)**FracPart(p), Int(uu*vv**(m*p)*ww**(n*p), x), x) def With4860(u, x): if isinstance(x, (int, Integer, float, Float)): return False v = ExpandTrig(u, x) if SumQ(v): return True return False def replacement4860(u, x): v = ExpandTrig(u, x) return Int(v, x) def With4861(u, x): if isinstance(x, (int, Integer, float, Float)): return False try: w = With(List(Set(ShowSteps, False), Set(StepCounter, Null)), Int(SubstFor(S(1)/(x**S(2)*FreeFactors(tan(FunctionOfTrig(u, x)/S(2)), x)**S(2) + S(1)), tan(FunctionOfTrig(u, x)/S(2))/FreeFactors(tan(FunctionOfTrig(u, x)/S(2)), x), u, x), x)) v = FunctionOfTrig(u, x) d = FreeFactors(tan(v/S(2)), x) res = FreeQ(w, Int) except (TypeError, AttributeError): return False if res: return True return False def replacement4861(u, x): w = With(List(Set(ShowSteps, False), Set(StepCounter, Null)), Int(SubstFor(S(1)/(x**S(2)*FreeFactors(tan(FunctionOfTrig(u, x)/S(2)), x)**S(2) + S(1)), tan(FunctionOfTrig(u, x)/S(2))/FreeFactors(tan(FunctionOfTrig(u, x)/S(2)), x), u, x), x)) v = FunctionOfTrig(u, x) d = FreeFactors(tan(v/S(2)), x) return Simp(Dist(2*d/Coefficient(v, x, 1), Subst(Int(SubstFor(1/(d**2*x**2 + 1), tan(v/2)/d, u, x), x), x, tan(v/2)/d), x), x) def With4862(u, x): v = ActivateTrig(u) return Int(v, x) def replacement4863(a, b, c, d, m, n, x): return -Dist(d*m/(b*(n + S(1))), Int((c + d*x)**(m + S(-1))*sin(a + b*x)**(n + S(1)), x), x) + Simp((c + d*x)**m*sin(a + b*x)**(n + S(1))/(b*(n + S(1))), x) def replacement4864(a, b, c, d, m, n, x): return Dist(d*m/(b*(n + S(1))), Int((c + d*x)**(m + S(-1))*cos(a + b*x)**(n + S(1)), x), x) - Simp((c + d*x)**m*cos(a + b*x)**(n + S(1))/(b*(n + S(1))), x) def replacement4865(a, b, c, d, m, n, p, x): return Int(ExpandTrigReduce((c + d*x)**m, sin(a + b*x)**n*cos(a + b*x)**p, x), x) def replacement4866(a, b, c, d, m, n, p, x): return -Int((c + d*x)**m*sin(a + b*x)**n*tan(a + b*x)**(p + S(-2)), x) + Int((c + d*x)**m*sin(a + b*x)**(n + S(-2))*tan(a + b*x)**p, x) def replacement4867(a, b, c, d, m, n, p, x): return Int((c + d*x)**m*(S(1)/tan(a + b*x))**p*cos(a + b*x)**(n + S(-2)), x) - Int((c + d*x)**m*(S(1)/tan(a + b*x))**(p + S(-2))*cos(a + b*x)**n, x) def replacement4868(a, b, c, d, m, n, p, x): return -Dist(d*m/(b*n), Int((c + d*x)**(m + S(-1))*(S(1)/cos(a + b*x))**n, x), x) + Simp((c + d*x)**m*(S(1)/cos(a + b*x))**n/(b*n), x) def replacement4869(a, b, c, d, m, n, p, x): return Dist(d*m/(b*n), Int((c + d*x)**(m + S(-1))*(S(1)/sin(a + b*x))**n, x), x) - Simp((c + d*x)**m*(S(1)/sin(a + b*x))**n/(b*n), x) def replacement4870(a, b, c, d, m, n, x): return -Dist(d*m/(b*(n + S(1))), Int((c + d*x)**(m + S(-1))*tan(a + b*x)**(n + S(1)), x), x) + Simp((c + d*x)**m*tan(a + b*x)**(n + S(1))/(b*(n + S(1))), x) def replacement4871(a, b, c, d, m, n, x): return Dist(d*m/(b*(n + S(1))), Int((c + d*x)**(m + S(-1))*(S(1)/tan(a + b*x))**(n + S(1)), x), x) - Simp((c + d*x)**m*(S(1)/tan(a + b*x))**(n + S(1))/(b*(n + S(1))), x) def replacement4872(a, b, c, d, m, p, x): return Int((c + d*x)**m*tan(a + b*x)**(p + S(-2))/cos(a + b*x)**S(3), x) - Int((c + d*x)**m*tan(a + b*x)**(p + S(-2))/cos(a + b*x), x) def replacement4873(a, b, c, d, m, n, p, x): return -Int((c + d*x)**m*(S(1)/cos(a + b*x))**n*tan(a + b*x)**(p + S(-2)), x) + Int((c + d*x)**m*(S(1)/cos(a + b*x))**(n + S(2))*tan(a + b*x)**(p + S(-2)), x) def replacement4874(a, b, c, d, m, p, x): return Int((c + d*x)**m*(S(1)/tan(a + b*x))**(p + S(-2))/sin(a + b*x)**S(3), x) - Int((c + d*x)**m*(S(1)/tan(a + b*x))**(p + S(-2))/sin(a + b*x), x) def replacement4875(a, b, c, d, m, n, p, x): return -Int((c + d*x)**m*(S(1)/sin(a + b*x))**n*(S(1)/tan(a + b*x))**(p + S(-2)), x) + Int((c + d*x)**m*(S(1)/sin(a + b*x))**(n + S(2))*(S(1)/tan(a + b*x))**(p + S(-2)), x) def With4876(a, b, c, d, m, n, p, x): u = IntHide((S(1)/cos(a + b*x))**n*tan(a + b*x)**p, x) return -Dist(d*m, Int(u*(c + d*x)**(m + S(-1)), x), x) + Dist((c + d*x)**m, u, x) def With4877(a, b, c, d, m, n, p, x): u = IntHide((S(1)/sin(a + b*x))**n*(S(1)/tan(a + b*x))**p, x) return -Dist(d*m, Int(u*(c + d*x)**(m + S(-1)), x), x) + Dist((c + d*x)**m, u, x) def replacement4878(a, b, c, d, m, n, x): return Dist(S(2)**n, Int((c + d*x)**m*(S(1)/sin(S(2)*a + S(2)*b*x))**n, x), x) def With4879(a, b, c, d, m, n, p, x): u = IntHide((S(1)/sin(a + b*x))**n*(S(1)/cos(a + b*x))**p, x) return -Dist(d*m, Int(u*(c + d*x)**(m + S(-1)), x), x) + Dist((c + d*x)**m, u, x) def replacement4880(F, G, m, n, p, u, v, w, x): return Int(ExpandToSum(u, x)**m*F(ExpandToSum(v, x))**n*G(ExpandToSum(v, x))**p, x) def replacement4881(a, b, c, d, e, f, m, n, x): return -Dist(f*m/(b*d*(n + S(1))), Int((a + b*sin(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) + Simp((a + b*sin(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement4882(a, b, c, d, e, f, m, n, x): return Dist(f*m/(b*d*(n + S(1))), Int((a + b*cos(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) - Simp((a + b*cos(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement4883(a, b, c, d, e, f, m, n, x): return -Dist(f*m/(b*d*(n + S(1))), Int((a + b*tan(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) + Simp((a + b*tan(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement4884(a, b, c, d, e, f, m, n, x): return Dist(f*m/(b*d*(n + S(1))), Int((a + b/tan(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) - Simp((a + b/tan(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement4885(a, b, c, d, e, f, m, n, x): return -Dist(f*m/(b*d*(n + S(1))), Int((a + b/cos(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) + Simp((a + b/cos(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement4886(a, b, c, d, e, f, m, n, x): return Dist(f*m/(b*d*(n + S(1))), Int((a + b/sin(c + d*x))**(n + S(1))*(e + f*x)**(m + S(-1)), x), x) - Simp((a + b/sin(c + d*x))**(n + S(1))*(e + f*x)**m/(b*d*(n + S(1))), x) def replacement4887(a, b, c, d, e, f, m, p, q, x): return Int(ExpandTrigReduce((e + f*x)**m, sin(a + b*x)**p*sin(c + d*x)**q, x), x) def replacement4888(a, b, c, d, e, f, m, p, q, x): return Int(ExpandTrigReduce((e + f*x)**m, cos(a + b*x)**p*cos(c + d*x)**q, x), x) def replacement4889(a, b, c, d, e, f, m, p, q, x): return Int(ExpandTrigReduce((e + f*x)**m, sin(a + b*x)**p*cos(c + d*x)**q, x), x) def replacement4890(F, G, a, b, c, d, e, f, m, p, q, x): return Int(ExpandTrigExpand((e + f*x)**m*G(c + d*x)**q, F, c + d*x, p, b/d, x), x) def replacement4891(F, a, b, c, d, e, x): return -Simp(F**(c*(a + b*x))*e*cos(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)), x) + Simp(F**(c*(a + b*x))*b*c*log(F)*sin(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)), x) def replacement4892(F, a, b, c, d, e, x): return Simp(F**(c*(a + b*x))*e*sin(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)), x) + Simp(F**(c*(a + b*x))*b*c*log(F)*cos(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)), x) def replacement4893(F, a, b, c, d, e, n, x): return Dist(e**S(2)*n*(n + S(-1))/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), Int(F**(c*(a + b*x))*sin(d + e*x)**(n + S(-2)), x), x) + Simp(F**(c*(a + b*x))*b*c*log(F)*sin(d + e*x)**n/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) - Simp(F**(c*(a + b*x))*e*n*sin(d + e*x)**(n + S(-1))*cos(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) def replacement4894(F, a, b, c, d, e, m, x): return Dist(e**S(2)*m*(m + S(-1))/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*m**S(2)), Int(F**(c*(a + b*x))*cos(d + e*x)**(m + S(-2)), x), x) + Simp(F**(c*(a + b*x))*b*c*log(F)*cos(d + e*x)**m/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*m**S(2)), x) + Simp(F**(c*(a + b*x))*e*m*sin(d + e*x)*cos(d + e*x)**(m + S(-1))/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*m**S(2)), x) def replacement4895(F, a, b, c, d, e, n, x): return Simp(F**(c*(a + b*x))*sin(d + e*x)**(n + S(1))*cos(d + e*x)/(e*(n + S(1))), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*sin(d + e*x)**(n + S(2))/(e**S(2)*(n + S(1))*(n + S(2))), x) def replacement4896(F, a, b, c, d, e, n, x): return -Simp(F**(c*(a + b*x))*sin(d + e*x)*cos(d + e*x)**(n + S(1))/(e*(n + S(1))), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*cos(d + e*x)**(n + S(2))/(e**S(2)*(n + S(1))*(n + S(2))), x) def replacement4897(F, a, b, c, d, e, n, x): return Dist((b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(2))**S(2))/(e**S(2)*(n + S(1))*(n + S(2))), Int(F**(c*(a + b*x))*sin(d + e*x)**(n + S(2)), x), x) + Simp(F**(c*(a + b*x))*sin(d + e*x)**(n + S(1))*cos(d + e*x)/(e*(n + S(1))), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*sin(d + e*x)**(n + S(2))/(e**S(2)*(n + S(1))*(n + S(2))), x) def replacement4898(F, a, b, c, d, e, n, x): return Dist((b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(2))**S(2))/(e**S(2)*(n + S(1))*(n + S(2))), Int(F**(c*(a + b*x))*cos(d + e*x)**(n + S(2)), x), x) - Simp(F**(c*(a + b*x))*sin(d + e*x)*cos(d + e*x)**(n + S(1))/(e*(n + S(1))), x) - Simp(F**(c*(a + b*x))*b*c*log(F)*cos(d + e*x)**(n + S(2))/(e**S(2)*(n + S(1))*(n + S(2))), x) def replacement4899(F, a, b, c, d, e, n, x): return Dist((exp(S(2)*I*(d + e*x)) + S(-1))**(-n)*exp(I*n*(d + e*x))*sin(d + e*x)**n, Int(F**(c*(a + b*x))*(exp(S(2)*I*(d + e*x)) + S(-1))**n*exp(-I*n*(d + e*x)), x), x) def replacement4900(F, a, b, c, d, e, n, x): return Dist((exp(S(2)*I*(d + e*x)) + S(1))**(-n)*exp(I*n*(d + e*x))*cos(d + e*x)**n, Int(F**(c*(a + b*x))*(exp(S(2)*I*(d + e*x)) + S(1))**n*exp(-I*n*(d + e*x)), x), x) def replacement4901(F, a, b, c, d, e, n, x): return Dist(I**n, Int(ExpandIntegrand(F**(c*(a + b*x))*(S(1) - exp(S(2)*I*(d + e*x)))**n*(exp(S(2)*I*(d + e*x)) + S(1))**(-n), x), x), x) def replacement4902(F, a, b, c, d, e, n, x): return Dist((-I)**n, Int(ExpandIntegrand(F**(c*(a + b*x))*(S(1) - exp(S(2)*I*(d + e*x)))**(-n)*(exp(S(2)*I*(d + e*x)) + S(1))**n, x), x), x) def replacement4903(F, a, b, c, d, e, n, x): return Dist(e**S(2)*n*(n + S(1))/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), Int(F**(c*(a + b*x))*(S(1)/cos(d + e*x))**(n + S(2)), x), x) + Simp(F**(c*(a + b*x))*b*c*(S(1)/cos(d + e*x))**n*log(F)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) - Simp(F**(c*(a + b*x))*e*n*(S(1)/cos(d + e*x))**(n + S(1))*sin(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) def replacement4904(F, a, b, c, d, e, n, x): return Dist(e**S(2)*n*(n + S(1))/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), Int(F**(c*(a + b*x))*(S(1)/sin(d + e*x))**(n + S(2)), x), x) + Simp(F**(c*(a + b*x))*b*c*(S(1)/sin(d + e*x))**n*log(F)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) + Simp(F**(c*(a + b*x))*e*n*(S(1)/sin(d + e*x))**(n + S(1))*cos(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*n**S(2)), x) def replacement4905(F, a, b, c, d, e, n, x): return Simp(F**(c*(a + b*x))*(S(1)/cos(d + e*x))**(n + S(-1))*sin(d + e*x)/(e*(n + S(-1))), x) - Simp(F**(c*(a + b*x))*b*c*(S(1)/cos(d + e*x))**(n + S(-2))*log(F)/(e**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement4906(F, a, b, c, d, e, n, x): return Simp(F**(c*(a + b*x))*(S(1)/sin(d + e*x))**(n + S(-1))*cos(d + e*x)/(e*(n + S(-1))), x) - Simp(F**(c*(a + b*x))*b*c*(S(1)/sin(d + e*x))**(n + S(-2))*log(F)/(e**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement4907(F, a, b, c, d, e, n, x): return Dist((b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(-2))**S(2))/(e**S(2)*(n + S(-2))*(n + S(-1))), Int(F**(c*(a + b*x))*(S(1)/cos(d + e*x))**(n + S(-2)), x), x) + Simp(F**(c*(a + b*x))*(S(1)/cos(d + e*x))**(n + S(-1))*sin(d + e*x)/(e*(n + S(-1))), x) - Simp(F**(c*(a + b*x))*b*c*(S(1)/cos(d + e*x))**(n + S(-2))*log(F)/(e**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement4908(F, a, b, c, d, e, n, x): return Dist((b**S(2)*c**S(2)*log(F)**S(2) + e**S(2)*(n + S(-2))**S(2))/(e**S(2)*(n + S(-2))*(n + S(-1))), Int(F**(c*(a + b*x))*(S(1)/sin(d + e*x))**(n + S(-2)), x), x) - Simp(F**(c*(a + b*x))*(S(1)/sin(d + e*x))**(n + S(-1))*cos(d + e*x)/(e*(n + S(-1))), x) - Simp(F**(c*(a + b*x))*b*c*(S(1)/sin(d + e*x))**(n + S(-2))*log(F)/(e**S(2)*(n + S(-2))*(n + S(-1))), x) def replacement4909(F, a, b, c, d, e, n, x): return Simp(S(2)**n*F**(c*(a + b*x))*Hypergeometric2F1(n, -I*b*c*log(F)/(S(2)*e) + n/S(2), -I*b*c*log(F)/(S(2)*e) + n/S(2) + S(1), -exp(S(2)*I*(d + e*x)))*exp(I*n*(d + e*x))/(b*c*log(F) + I*e*n), x) def replacement4910(F, a, b, c, d, e, n, x): return Simp(F**(c*(a + b*x))*(-S(2)*I)**n*Hypergeometric2F1(n, -I*b*c*log(F)/(S(2)*e) + n/S(2), -I*b*c*log(F)/(S(2)*e) + n/S(2) + S(1), exp(S(2)*I*(d + e*x)))*exp(I*n*(d + e*x))/(b*c*log(F) + I*e*n), x) def replacement4911(F, a, b, c, d, e, n, x): return Dist((exp(S(2)*I*(d + e*x)) + S(1))**n*(S(1)/cos(d + e*x))**n*exp(-I*n*(d + e*x)), Int(SimplifyIntegrand(F**(c*(a + b*x))*(exp(S(2)*I*(d + e*x)) + S(1))**(-n)*exp(I*n*(d + e*x)), x), x), x) def replacement4912(F, a, b, c, d, e, n, x): return Dist((S(1) - exp(-S(2)*I*(d + e*x)))**n*(S(1)/sin(d + e*x))**n*exp(I*n*(d + e*x)), Int(SimplifyIntegrand(F**(c*(a + b*x))*(S(1) - exp(-S(2)*I*(d + e*x)))**(-n)*exp(-I*n*(d + e*x)), x), x), x) def replacement4913(F, a, b, c, d, e, f, g, n, x): return Dist(S(2)**n*f**n, Int(F**(c*(a + b*x))*cos(-Pi*f/(S(4)*g) + d/S(2) + e*x/S(2))**(S(2)*n), x), x) def replacement4914(F, a, b, c, d, e, f, g, n, x): return Dist(S(2)**n*f**n, Int(F**(c*(a + b*x))*cos(d/S(2) + e*x/S(2))**(S(2)*n), x), x) def replacement4915(F, a, b, c, d, e, f, g, n, x): return Dist(S(2)**n*f**n, Int(F**(c*(a + b*x))*sin(d/S(2) + e*x/S(2))**(S(2)*n), x), x) def replacement4916(F, a, b, c, d, e, f, g, m, n, x): return Dist(g**n, Int(F**(c*(a + b*x))*(-tan(-Pi*f/(S(4)*g) + d/S(2) + e*x/S(2)))**m, x), x) def replacement4917(F, a, b, c, d, e, f, g, m, n, x): return Dist(f**n, Int(F**(c*(a + b*x))*tan(d/S(2) + e*x/S(2))**m, x), x) def replacement4918(F, a, b, c, d, e, f, g, m, n, x): return Dist(f**n, Int(F**(c*(a + b*x))*(S(1)/tan(d/S(2) + e*x/S(2)))**m, x), x) def replacement4919(F, a, b, c, d, e, f, g, h, i, x): return Dist(S(2)*i, Int(F**(c*(a + b*x))*cos(d + e*x)/(f + g*sin(d + e*x)), x), x) + Int(F**(c*(a + b*x))*(h - i*cos(d + e*x))/(f + g*sin(d + e*x)), x) def replacement4920(F, a, b, c, d, e, f, g, h, i, x): return Dist(S(2)*i, Int(F**(c*(a + b*x))*sin(d + e*x)/(f + g*cos(d + e*x)), x), x) + Int(F**(c*(a + b*x))*(h - i*sin(d + e*x))/(f + g*cos(d + e*x)), x) def replacement4921(F, G, c, n, u, v, x): return Int(F**(c*ExpandToSum(u, x))*G(ExpandToSum(v, x))**n, x) def With4922(F, a, b, c, d, e, m, n, x): u = IntHide(F**(c*(a + b*x))*sin(d + e*x)**n, x) return -Dist(m, Int(u*x**(m + S(-1)), x), x) + Dist(x**m, u, x) def With4923(F, a, b, c, d, e, m, n, x): u = IntHide(F**(c*(a + b*x))*cos(d + e*x)**n, x) return -Dist(m, Int(u*x**(m + S(-1)), x), x) + Dist(x**m, u, x) def replacement4924(F, a, b, c, d, e, f, g, m, n, x): return Int(ExpandTrigReduce(F**(c*(a + b*x)), sin(d + e*x)**m*cos(f + g*x)**n, x), x) def replacement4925(F, a, b, c, d, e, f, g, m, n, p, x): return Int(ExpandTrigReduce(F**(c*(a + b*x))*x**p, sin(d + e*x)**m*cos(f + g*x)**n, x), x) def replacement4926(F, G, H, a, b, c, d, e, m, n, x): return Int(ExpandTrigToExp(F**(c*(a + b*x)), G(d + e*x)**m*H(d + e*x)**n, x), x) def replacement4927(F, n, u, v, x): return Int(ExpandTrigToExp(F**u, sin(v)**n, x), x) def replacement4928(F, n, u, v, x): return Int(ExpandTrigToExp(F**u, cos(v)**n, x), x) def replacement4929(F, m, n, u, v, x): return Int(ExpandTrigToExp(F**u, sin(v)**m*cos(v)**n, x), x) def replacement4930(a, b, c, n, p, x): return Simp(x*(p + S(2))*sin(a + b*log(c*x**n))**(p + S(2))/(p + S(1)), x) + Simp(x*sin(a + b*log(c*x**n))**(p + S(2))/(b*n*(p + S(1))*tan(a + b*log(c*x**n))), x) def replacement4931(a, b, c, n, p, x): return Simp(x*(p + S(2))*cos(a + b*log(c*x**n))**(p + S(2))/(p + S(1)), x) - Simp(x*cos(a + b*log(c*x**n))**(p + S(2))*tan(a + b*log(c*x**n))/(b*n*(p + S(1))), x) def replacement4932(a, b, c, n, p, x): return Int(ExpandIntegrand((-(c*x**n)**(S(1)/(n*p))*exp(-a*b*n*p)/(S(2)*b*n*p) + (c*x**n)**(-S(1)/(n*p))*exp(a*b*n*p)/(S(2)*b*n*p))**p, x), x) def replacement4933(a, b, c, n, p, x): return Int(ExpandIntegrand((-(c*x**n)**(S(1)/(n*p))*exp(-a*b*n*p)/S(2) + (c*x**n)**(-S(1)/(n*p))*exp(a*b*n*p)/S(2))**p, x), x) def replacement4934(a, b, c, n, x): return Simp(x*sin(a + b*log(c*x**n))/(b**S(2)*n**S(2) + S(1)), x) - Simp(b*n*x*cos(a + b*log(c*x**n))/(b**S(2)*n**S(2) + S(1)), x) def replacement4935(a, b, c, n, x): return Simp(x*cos(a + b*log(c*x**n))/(b**S(2)*n**S(2) + S(1)), x) + Simp(b*n*x*sin(a + b*log(c*x**n))/(b**S(2)*n**S(2) + S(1)), x) def replacement4936(a, b, c, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + S(1)), Int(sin(a + b*log(c*x**n))**(p + S(-2)), x), x) + Simp(x*sin(a + b*log(c*x**n))**p/(b**S(2)*n**S(2)*p**S(2) + S(1)), x) - Simp(b*n*p*x*sin(a + b*log(c*x**n))**(p + S(-1))*cos(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + S(1)), x) def replacement4937(a, b, c, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + S(1)), Int(cos(a + b*log(c*x**n))**(p + S(-2)), x), x) + Simp(x*cos(a + b*log(c*x**n))**p/(b**S(2)*n**S(2)*p**S(2) + S(1)), x) + Simp(b*n*p*x*sin(a + b*log(c*x**n))*cos(a + b*log(c*x**n))**(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + S(1)), x) def replacement4938(a, b, c, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(2))**S(2) + S(1))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(sin(a + b*log(c*x**n))**(p + S(2)), x), x) - Simp(x*sin(a + b*log(c*x**n))**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) + Simp(x*sin(a + b*log(c*x**n))**(p + S(2))/(b*n*(p + S(1))*tan(a + b*log(c*x**n))), x) def replacement4939(a, b, c, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(2))**S(2) + S(1))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(cos(a + b*log(c*x**n))**(p + S(2)), x), x) - Simp(x*cos(a + b*log(c*x**n))**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) - Simp(x*cos(a + b*log(c*x**n))**(p + S(2))*tan(a + b*log(c*x**n))/(b*n*(p + S(1))), x) def replacement4940(a, b, c, n, p, x): return Simp(x*(-S(2)*(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(2))**(-p)*(-I*(c*x**n)**(I*b)*exp(I*a) + I*(c*x**n)**(-I*b)*exp(-I*a))**p*Hypergeometric2F1(-p, -I*(-I*b*n*p + S(1))/(S(2)*b*n), S(1) - I*(-I*b*n*p + S(1))/(S(2)*b*n), (c*x**n)**(S(2)*I*b)*exp(S(2)*I*a))/(-I*b*n*p + S(1)), x) def replacement4941(a, b, c, n, p, x): return Simp(x*((c*x**n)**(I*b)*exp(I*a) + (c*x**n)**(-I*b)*exp(-I*a))**p*(S(2)*(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(2))**(-p)*Hypergeometric2F1(-p, -I*(-I*b*n*p + S(1))/(S(2)*b*n), S(1) - I*(-I*b*n*p + S(1))/(S(2)*b*n), -(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a))/(-I*b*n*p + S(1)), x) def replacement4942(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(p + S(2))*sin(a + b*log(c*x**n))**(p + S(2))/((m + S(1))*(p + S(1))), x) + Simp(x**(m + S(1))*sin(a + b*log(c*x**n))**(p + S(2))/(b*n*(p + S(1))*tan(a + b*log(c*x**n))), x) def replacement4943(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(p + S(2))*cos(a + b*log(c*x**n))**(p + S(2))/((m + S(1))*(p + S(1))), x) - Simp(x**(m + S(1))*cos(a + b*log(c*x**n))**(p + S(2))*tan(a + b*log(c*x**n))/(b*n*(p + S(1))), x) def replacement4944(a, b, c, m, n, p, x): return Dist(S(2)**(-p), Int(ExpandIntegrand(x**m*(-(c*x**n)**((m + S(1))/(n*p))*(m + S(1))*exp(-a*b*n*p/(m + S(1)))/(b*n*p) + (c*x**n)**(-(m + S(1))/(n*p))*(m + S(1))*exp(a*b*n*p/(m + S(1)))/(b*n*p))**p, x), x), x) def replacement4945(a, b, c, m, n, p, x): return Dist(S(2)**(-p), Int(ExpandIntegrand(x**m*(-(c*x**n)**((m + S(1))/(n*p))*exp(-a*b*n*p/(m + S(1))) + (c*x**n)**(-(m + S(1))/(n*p))*exp(a*b*n*p/(m + S(1))))**p, x), x), x) def replacement4946(a, b, c, m, n, x): return Simp(x**(m + S(1))*(m + S(1))*sin(a + b*log(c*x**n))/(b**S(2)*n**S(2) + (m + S(1))**S(2)), x) - Simp(b*n*x**(m + S(1))*cos(a + b*log(c*x**n))/(b**S(2)*n**S(2) + (m + S(1))**S(2)), x) def replacement4947(a, b, c, m, n, x): return Simp(x**(m + S(1))*(m + S(1))*cos(a + b*log(c*x**n))/(b**S(2)*n**S(2) + (m + S(1))**S(2)), x) + Simp(b*n*x**(m + S(1))*sin(a + b*log(c*x**n))/(b**S(2)*n**S(2) + (m + S(1))**S(2)), x) def replacement4948(a, b, c, m, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), Int(x**m*sin(a + b*log(c*x**n))**(p + S(-2)), x), x) + Simp(x**(m + S(1))*(m + S(1))*sin(a + b*log(c*x**n))**p/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), x) - Simp(b*n*p*x**(m + S(1))*sin(a + b*log(c*x**n))**(p + S(-1))*cos(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), x) def replacement4949(a, b, c, m, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), Int(x**m*cos(a + b*log(c*x**n))**(p + S(-2)), x), x) + Simp(x**(m + S(1))*(m + S(1))*cos(a + b*log(c*x**n))**p/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), x) + Simp(b*n*p*x**(m + S(1))*sin(a + b*log(c*x**n))*cos(a + b*log(c*x**n))**(p + S(-1))/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), x) def replacement4950(a, b, c, m, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(2))**S(2) + (m + S(1))**S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(x**m*sin(a + b*log(c*x**n))**(p + S(2)), x), x) + Simp(x**(m + S(1))*sin(a + b*log(c*x**n))**(p + S(2))/(b*n*(p + S(1))*tan(a + b*log(c*x**n))), x) - Simp(x**(m + S(1))*(m + S(1))*sin(a + b*log(c*x**n))**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) def replacement4951(a, b, c, m, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(2))**S(2) + (m + S(1))**S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), Int(x**m*cos(a + b*log(c*x**n))**(p + S(2)), x), x) - Simp(x**(m + S(1))*cos(a + b*log(c*x**n))**(p + S(2))*tan(a + b*log(c*x**n))/(b*n*(p + S(1))), x) - Simp(x**(m + S(1))*(m + S(1))*cos(a + b*log(c*x**n))**(p + S(2))/(b**S(2)*n**S(2)*(p + S(1))*(p + S(2))), x) def replacement4952(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(-S(2)*(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(2))**(-p)*(-I*(c*x**n)**(I*b)*exp(I*a) + I*(c*x**n)**(-I*b)*exp(-I*a))**p*Hypergeometric2F1(-p, -I*(-I*b*n*p + m + S(1))/(S(2)*b*n), S(1) - I*(-I*b*n*p + m + S(1))/(S(2)*b*n), (c*x**n)**(S(2)*I*b)*exp(S(2)*I*a))/(-I*b*n*p + m + S(1)), x) def replacement4953(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*((c*x**n)**(I*b)*exp(I*a) + (c*x**n)**(-I*b)*exp(-I*a))**p*(S(2)*(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(2))**(-p)*Hypergeometric2F1(-p, -I*(-I*b*n*p + m + S(1))/(S(2)*b*n), S(1) - I*(-I*b*n*p + m + S(1))/(S(2)*b*n), -(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a))/(-I*b*n*p + m + S(1)), x) def replacement4954(a, b, c, n, x): return Dist(S(2)*exp(a*b*n), Int((c*x**n)**(S(1)/n)/((c*x**n)**(S(2)/n) + exp(S(2)*a*b*n)), x), x) def replacement4955(a, b, c, n, x): return Dist(S(2)*b*n*exp(a*b*n), Int((c*x**n)**(S(1)/n)/(-(c*x**n)**(S(2)/n) + exp(S(2)*a*b*n)), x), x) def replacement4956(a, b, c, n, p, x): return Simp(x*(p + S(-2))*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2))/(p + S(-1)), x) + Simp(x*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2))*tan(a + b*log(c*x**n))/(b*n*(p + S(-1))), x) def replacement4957(a, b, c, n, p, x): return Simp(x*(p + S(-2))*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2))/(p + S(-1)), x) - Simp(x*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2))/(b*n*(p + S(-1))*tan(a + b*log(c*x**n))), x) def replacement4958(a, b, c, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(-2))**S(2) + S(1))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), Int((S(1)/cos(a + b*log(c*x**n)))**(p + S(-2)), x), x) - Simp(x*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), x) + Simp(x*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2))*tan(a + b*log(c*x**n))/(b*n*(p + S(-1))), x) def replacement4959(a, b, c, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(-2))**S(2) + S(1))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), Int((S(1)/sin(a + b*log(c*x**n)))**(p + S(-2)), x), x) - Simp(x*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), x) - Simp(x*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2))/(b*n*(p + S(-1))*tan(a + b*log(c*x**n))), x) def replacement4960(a, b, c, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(1))/(b**S(2)*n**S(2)*p**S(2) + S(1)), Int((S(1)/cos(a + b*log(c*x**n)))**(p + S(2)), x), x) + Simp(x*(S(1)/cos(a + b*log(c*x**n)))**p/(b**S(2)*n**S(2)*p**S(2) + S(1)), x) - Simp(b*n*p*x*(S(1)/cos(a + b*log(c*x**n)))**(p + S(1))*sin(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + S(1)), x) def replacement4961(a, b, c, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(1))/(b**S(2)*n**S(2)*p**S(2) + S(1)), Int((S(1)/sin(a + b*log(c*x**n)))**(p + S(2)), x), x) + Simp(x*(S(1)/sin(a + b*log(c*x**n)))**p/(b**S(2)*n**S(2)*p**S(2) + S(1)), x) + Simp(b*n*p*x*(S(1)/sin(a + b*log(c*x**n)))**(p + S(1))*cos(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + S(1)), x) def replacement4962(a, b, c, n, p, x): return Simp(x*((c*x**n)**(I*b)*exp(I*a)/((c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(1)))**p*(S(2)*(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(2))**p*Hypergeometric2F1(p, -I*(I*b*n*p + S(1))/(S(2)*b*n), S(1) - I*(I*b*n*p + S(1))/(S(2)*b*n), -(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a))/(I*b*n*p + S(1)), x) def replacement4963(a, b, c, n, p, x): return Simp(x*(-I*(c*x**n)**(I*b)*exp(I*a)/(-(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(1)))**p*(-S(2)*(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(2))**p*Hypergeometric2F1(p, -I*(I*b*n*p + S(1))/(S(2)*b*n), S(1) - I*(I*b*n*p + S(1))/(S(2)*b*n), (c*x**n)**(S(2)*I*b)*exp(S(2)*I*a))/(I*b*n*p + S(1)), x) def replacement4964(a, b, c, m, n, x): return Dist(S(2)*exp(a*b*n/(m + S(1))), Int(x**m*(c*x**n)**((m + S(1))/n)/((c*x**n)**(S(2)*(m + S(1))/n) + exp(S(2)*a*b*n/(m + S(1)))), x), x) def replacement4965(a, b, c, m, n, x): return Dist(S(2)*b*n*exp(a*b*n/(m + S(1)))/(m + S(1)), Int(x**m*(c*x**n)**((m + S(1))/n)/(-(c*x**n)**(S(2)*(m + S(1))/n) + exp(S(2)*a*b*n/(m + S(1)))), x), x) def replacement4966(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(p + S(-2))*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2))/((m + S(1))*(p + S(-1))), x) + Simp(x**(m + S(1))*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2))*tan(a + b*log(c*x**n))/(b*n*(p + S(-1))), x) def replacement4967(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(p + S(-2))*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2))/((m + S(1))*(p + S(-1))), x) - Simp(x**(m + S(1))*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2))/(b*n*(p + S(-1))*tan(a + b*log(c*x**n))), x) def replacement4968(a, b, c, m, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(-2))**S(2) + (m + S(1))**S(2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), Int(x**m*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2)), x), x) + Simp(x**(m + S(1))*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2))*tan(a + b*log(c*x**n))/(b*n*(p + S(-1))), x) - Simp(x**(m + S(1))*(m + S(1))*(S(1)/cos(a + b*log(c*x**n)))**(p + S(-2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), x) def replacement4969(a, b, c, m, n, p, x): return Dist((b**S(2)*n**S(2)*(p + S(-2))**S(2) + (m + S(1))**S(2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), Int(x**m*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2)), x), x) - Simp(x**(m + S(1))*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2))/(b*n*(p + S(-1))*tan(a + b*log(c*x**n))), x) - Simp(x**(m + S(1))*(m + S(1))*(S(1)/sin(a + b*log(c*x**n)))**(p + S(-2))/(b**S(2)*n**S(2)*(p + S(-2))*(p + S(-1))), x) def replacement4970(a, b, c, m, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(1))/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), Int(x**m*(S(1)/cos(a + b*log(c*x**n)))**(p + S(2)), x), x) + Simp(x**(m + S(1))*(m + S(1))*(S(1)/cos(a + b*log(c*x**n)))**p/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), x) - Simp(b*n*p*x**(m + S(1))*(S(1)/cos(a + b*log(c*x**n)))**(p + S(1))*sin(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), x) def replacement4971(a, b, c, m, n, p, x): return Dist(b**S(2)*n**S(2)*p*(p + S(1))/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), Int(x**m*(S(1)/sin(a + b*log(c*x**n)))**(p + S(2)), x), x) + Simp(x**(m + S(1))*(m + S(1))*(S(1)/sin(a + b*log(c*x**n)))**p/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), x) + Simp(b*n*p*x**(m + S(1))*(S(1)/sin(a + b*log(c*x**n)))**(p + S(1))*cos(a + b*log(c*x**n))/(b**S(2)*n**S(2)*p**S(2) + (m + S(1))**S(2)), x) def replacement4972(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*((c*x**n)**(I*b)*exp(I*a)/((c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(1)))**p*(S(2)*(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(2))**p*Hypergeometric2F1(p, -I*(I*b*n*p + m + S(1))/(S(2)*b*n), S(1) - I*(I*b*n*p + m + S(1))/(S(2)*b*n), -(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a))/(I*b*n*p + m + S(1)), x) def replacement4973(a, b, c, m, n, p, x): return Simp(x**(m + S(1))*(-I*(c*x**n)**(I*b)*exp(I*a)/(-(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(1)))**p*(-S(2)*(c*x**n)**(S(2)*I*b)*exp(S(2)*I*a) + S(2))**p*Hypergeometric2F1(p, -I*(I*b*n*p + m + S(1))/(S(2)*b*n), S(1) - I*(I*b*n*p + m + S(1))/(S(2)*b*n), (c*x**n)**(S(2)*I*b)*exp(S(2)*I*a))/(I*b*n*p + m + S(1)), x) def replacement4974(a, b, p, x): return -Dist(p, Int(log(b*x)**(p + S(-1))*sin(a*x*log(b*x)**p), x), x) - Simp(cos(a*x*log(b*x)**p)/a, x) def replacement4975(a, b, p, x): return -Dist(p, Int(log(b*x)**(p + S(-1))*cos(a*x*log(b*x)**p), x), x) + Simp(sin(a*x*log(b*x)**p)/a, x) def replacement4976(a, b, n, p, x): return -Dist(p/n, Int(log(b*x)**(p + S(-1))*sin(a*x**n*log(b*x)**p), x), x) - Dist((n + S(-1))/(a*n), Int(x**(-n)*cos(a*x**n*log(b*x)**p), x), x) - Simp(x**(S(1) - n)*cos(a*x**n*log(b*x)**p)/(a*n), x) def replacement4977(a, b, n, p, x): return -Dist(p/n, Int(log(b*x)**(p + S(-1))*cos(a*x**n*log(b*x)**p), x), x) + Dist((n + S(-1))/(a*n), Int(x**(-n)*sin(a*x**n*log(b*x)**p), x), x) + Simp(x**(S(1) - n)*sin(a*x**n*log(b*x)**p)/(a*n), x) def replacement4978(a, b, m, n, p, x): return -Dist(p/n, Int(x**m*log(b*x)**(p + S(-1))*sin(a*x**n*log(b*x)**p), x), x) - Simp(cos(a*x**n*log(b*x)**p)/(a*n), x) def replacement4979(a, b, m, n, p, x): return -Dist(p/n, Int(x**m*log(b*x)**(p + S(-1))*cos(a*x**n*log(b*x)**p), x), x) + Simp(sin(a*x**n*log(b*x)**p)/(a*n), x) def replacement4980(a, b, m, n, p, x): return -Dist(p/n, Int(x**m*log(b*x)**(p + S(-1))*sin(a*x**n*log(b*x)**p), x), x) + Dist((m - n + S(1))/(a*n), Int(x**(m - n)*cos(a*x**n*log(b*x)**p), x), x) - Simp(x**(m - n + S(1))*cos(a*x**n*log(b*x)**p)/(a*n), x) def replacement4981(a, b, m, n, p, x): return -Dist(p/n, Int(x**m*log(b*x)**(p + S(-1))*cos(a*x**n*log(b*x)**p), x), x) - Dist((m - n + S(1))/(a*n), Int(x**(m - n)*sin(a*x**n*log(b*x)**p), x), x) + Simp(x**(m - n + S(1))*sin(a*x**n*log(b*x)**p)/(a*n), x) def replacement4982(a, c, d, n, x): return -Dist(S(1)/d, Subst(Int(sin(a*x)**n/x**S(2), x), x, S(1)/(c + d*x)), x) def replacement4983(a, c, d, n, x): return -Dist(S(1)/d, Subst(Int(cos(a*x)**n/x**S(2), x), x, S(1)/(c + d*x)), x) def replacement4984(a, b, c, d, e, n, x): return -Dist(S(1)/d, Subst(Int(sin(b*e/d - e*x*(-a*d + b*c)/d)**n/x**S(2), x), x, S(1)/(c + d*x)), x) def replacement4985(a, b, c, d, e, n, x): return -Dist(S(1)/d, Subst(Int(cos(b*e/d - e*x*(-a*d + b*c)/d)**n/x**S(2), x), x, S(1)/(c + d*x)), x) def With4986(n, u, x): lst = QuotientOfLinearsParts(u, x) return Int(sin((x*Part(lst, S(2)) + Part(lst, S(1)))/(x*Part(lst, S(4)) + Part(lst, S(3))))**n, x) def With4987(n, u, x): lst = QuotientOfLinearsParts(u, x) return Int(cos((x*Part(lst, S(2)) + Part(lst, S(1)))/(x*Part(lst, S(4)) + Part(lst, S(3))))**n, x) def replacement4988(p, q, u, v, w, x): return Int(u*sin(v)**(p + q), x) def replacement4989(p, q, u, v, w, x): return Int(u*cos(v)**(p + q), x) def replacement4990(p, q, v, w, x): return Int(ExpandTrigReduce(sin(v)**p*sin(w)**q, x), x) def replacement4991(p, q, v, w, x): return Int(ExpandTrigReduce(cos(v)**p*cos(w)**q, x), x) def replacement4992(m, p, q, v, w, x): return Int(ExpandTrigReduce(x**m, sin(v)**p*sin(w)**q, x), x) def replacement4993(m, p, q, v, w, x): return Int(ExpandTrigReduce(x**m, cos(v)**p*cos(w)**q, x), x) def replacement4994(p, u, v, w, x): return Dist(S(2)**(-p), Int(u*sin(S(2)*v)**p, x), x) def replacement4995(p, q, v, w, x): return Int(ExpandTrigReduce(sin(v)**p*cos(w)**q, x), x) def replacement4996(m, p, q, v, w, x): return Int(ExpandTrigReduce(x**m, sin(v)**p*cos(w)**q, x), x) def replacement4997(n, v, w, x): return Dist(cos(v - w), Int(tan(w)**(n + S(-1))/cos(w), x), x) - Int(cos(v)*tan(w)**(n + S(-1)), x) def replacement4998(n, v, w, x): return Dist(cos(v - w), Int((S(1)/tan(w))**(n + S(-1))/sin(w), x), x) - Int((S(1)/tan(w))**(n + S(-1))*sin(v), x) def replacement4999(n, v, w, x): return Dist(sin(v - w), Int((S(1)/tan(w))**(n + S(-1))/sin(w), x), x) + Int((S(1)/tan(w))**(n + S(-1))*cos(v), x) def replacement5000(n, v, w, x): return -Dist(sin(v - w), Int(tan(w)**(n + S(-1))/cos(w), x), x) + Int(sin(v)*tan(w)**(n + S(-1)), x) def replacement5001(n, v, w, x): return Dist(sin(v - w), Int((S(1)/cos(w))**(n + S(-1)), x), x) + Dist(cos(v - w), Int((S(1)/cos(w))**(n + S(-1))*tan(w), x), x) def replacement5002(n, v, w, x): return -Dist(sin(v - w), Int((S(1)/sin(w))**(n + S(-1)), x), x) + Dist(cos(v - w), Int((S(1)/sin(w))**(n + S(-1))/tan(w), x), x) def replacement5003(n, v, w, x): return Dist(sin(v - w), Int((S(1)/sin(w))**(n + S(-1))/tan(w), x), x) + Dist(cos(v - w), Int((S(1)/sin(w))**(n + S(-1)), x), x) def replacement5004(n, v, w, x): return -Dist(sin(v - w), Int((S(1)/cos(w))**(n + S(-1))*tan(w), x), x) + Dist(cos(v - w), Int((S(1)/cos(w))**(n + S(-1)), x), x) def replacement5005(a, b, c, d, e, f, m, n, x): return Int((a + b*sin(S(2)*c + S(2)*d*x)/S(2))**n*(e + f*x)**m, x) def replacement5006(a, b, c, d, m, n, x): return Dist(S(2)**(-n), Int(x**m*(S(2)*a - b*cos(S(2)*c + S(2)*d*x) + b)**n, x), x) def replacement5007(a, b, c, d, m, n, x): return Dist(S(2)**(-n), Int(x**m*(S(2)*a + b*cos(S(2)*c + S(2)*d*x) + b)**n, x), x) def replacement5008(a, b, c, d, e, f, m, n, p, x): return Dist(d**(-m + S(-1)), Subst(Int((-c*f + d*e + f*x)**m*sin(a + b*x**n)**p, x), x, c + d*x), x) def replacement5009(a, b, c, d, e, f, m, n, p, x): return Dist(d**(-m + S(-1)), Subst(Int((-c*f + d*e + f*x)**m*cos(a + b*x**n)**p, x), x, c + d*x), x) def replacement5010(a, b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(S(2)*a + b + c + (b - c)*cos(S(2)*d + S(2)*e*x)), x), x) def replacement5011(b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(b + c + (b - c)*cos(S(2)*d + S(2)*e*x)), x), x) def replacement5012(a, b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(S(2)*a + b + c + (b - c)*cos(S(2)*d + S(2)*e*x)), x), x) def replacement5013(b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(b + c + (b - c)*cos(S(2)*d + S(2)*e*x)), x), x) def replacement5014(a, b, c, d, e, f, g, m, x): return Dist(S(2), Int((f + g*x)**m/(S(2)*a + b + c + (b - c)*cos(S(2)*d + S(2)*e*x)), x), x) def replacement5015(a, b, c, d, e, f, m, x): return Int((e + f*x)**m*exp(I*(c + d*x))/(a - I*b*exp(I*(c + d*x)) - Rt(a**S(2) - b**S(2), S(2))), x) + Int((e + f*x)**m*exp(I*(c + d*x))/(a - I*b*exp(I*(c + d*x)) + Rt(a**S(2) - b**S(2), S(2))), x) - Simp(I*(e + f*x)**(m + S(1))/(b*f*(m + S(1))), x) def replacement5016(a, b, c, d, e, f, m, x): return -Dist(I, Int((e + f*x)**m*exp(I*(c + d*x))/(a + b*exp(I*(c + d*x)) - Rt(a**S(2) - b**S(2), S(2))), x), x) - Dist(I, Int((e + f*x)**m*exp(I*(c + d*x))/(a + b*exp(I*(c + d*x)) + Rt(a**S(2) - b**S(2), S(2))), x), x) + Simp(I*(e + f*x)**(m + S(1))/(b*f*(m + S(1))), x) def replacement5017(a, b, c, d, e, f, m, x): return Dist(I, Int((e + f*x)**m*exp(I*(c + d*x))/(I*a + b*exp(I*(c + d*x)) - Rt(-a**S(2) + b**S(2), S(2))), x), x) + Dist(I, Int((e + f*x)**m*exp(I*(c + d*x))/(I*a + b*exp(I*(c + d*x)) + Rt(-a**S(2) + b**S(2), S(2))), x), x) - Simp(I*(e + f*x)**(m + S(1))/(b*f*(m + S(1))), x) def replacement5018(a, b, c, d, e, f, m, x): return Int((e + f*x)**m*exp(I*(c + d*x))/(I*a + I*b*exp(I*(c + d*x)) - Rt(-a**S(2) + b**S(2), S(2))), x) + Int((e + f*x)**m*exp(I*(c + d*x))/(I*a + I*b*exp(I*(c + d*x)) + Rt(-a**S(2) + b**S(2), S(2))), x) + Simp(I*(e + f*x)**(m + S(1))/(b*f*(m + S(1))), x) def replacement5019(a, b, c, d, e, f, m, n, x): return Dist(S(1)/a, Int((e + f*x)**m*cos(c + d*x)**(n + S(-2)), x), x) - Dist(S(1)/b, Int((e + f*x)**m*sin(c + d*x)*cos(c + d*x)**(n + S(-2)), x), x) def replacement5020(a, b, c, d, e, f, m, n, x): return Dist(S(1)/a, Int((e + f*x)**m*sin(c + d*x)**(n + S(-2)), x), x) - Dist(S(1)/b, Int((e + f*x)**m*sin(c + d*x)**(n + S(-2))*cos(c + d*x), x), x) def replacement5021(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/b, Int((e + f*x)**m*sin(c + d*x)*cos(c + d*x)**(n + S(-2)), x), x) + Dist(a/b**S(2), Int((e + f*x)**m*cos(c + d*x)**(n + S(-2)), x), x) - Dist((a**S(2) - b**S(2))/b**S(2), Int((e + f*x)**m*cos(c + d*x)**(n + S(-2))/(a + b*sin(c + d*x)), x), x) def replacement5022(a, b, c, d, e, f, m, n, x): return -Dist(S(1)/b, Int((e + f*x)**m*sin(c + d*x)**(n + S(-2))*cos(c + d*x), x), x) + Dist(a/b**S(2), Int((e + f*x)**m*sin(c + d*x)**(n + S(-2)), x), x) - Dist((a**S(2) - b**S(2))/b**S(2), Int((e + f*x)**m*sin(c + d*x)**(n + S(-2))/(a + b*cos(c + d*x)), x), x) def replacement5023(A, B, a, b, c, d, e, f, x): return Dist(B*f/(a*d), Int(cos(c + d*x)/(a + b*sin(c + d*x)), x), x) - Simp(B*(e + f*x)*cos(c + d*x)/(a*d*(a + b*sin(c + d*x))), x) def replacement5024(A, B, a, b, c, d, e, f, x): return -Dist(B*f/(a*d), Int(sin(c + d*x)/(a + b*cos(c + d*x)), x), x) + Simp(B*(e + f*x)*sin(c + d*x)/(a*d*(a + b*cos(c + d*x))), x) def replacement5025(a, b, m, n, v, x): return Int((a*cos(v) + b*sin(v))**n, x) def replacement5026(a, b, m, n, v, x): return Int((a*sin(v) + b*cos(v))**n, x) def replacement5027(a, b, c, d, m, n, u, x): return Int(ExpandTrigReduce(u, sin(a + b*x)**m*sin(c + d*x)**n, x), x) def replacement5028(a, b, c, d, m, n, u, x): return Int(ExpandTrigReduce(u, cos(a + b*x)**m*cos(c + d*x)**n, x), x) def replacement5029(a, b, c, d, x): return Dist(S(1)/sin((-a*d + b*c)/b), Int(tan(c + d*x), x), x) - Dist(S(1)/sin((-a*d + b*c)/d), Int(tan(a + b*x), x), x) def replacement5030(a, b, c, d, x): return Dist(S(1)/sin((-a*d + b*c)/b), Int(S(1)/tan(a + b*x), x), x) - Dist(S(1)/sin((-a*d + b*c)/d), Int(S(1)/tan(c + d*x), x), x) def replacement5031(a, b, c, d, x): return Dist(b*cos((-a*d + b*c)/d)/d, Int(S(1)/(cos(a + b*x)*cos(c + d*x)), x), x) - Simp(b*x/d, x) def replacement5032(a, b, c, d, x): return Dist(cos((-a*d + b*c)/d), Int(S(1)/(sin(a + b*x)*sin(c + d*x)), x), x) - Simp(b*x/d, x) def replacement5033(a, b, n, u, v, x): return Int(u*(a*exp(-a*v/b))**n, x)
02f6370be8b8522c9ec3767d6173e2adc04b20bd963d6a4c5c196d7a62990697
""" Parser for FullForm[Downvalues[]] of Mathematica rules. This parser is customised to parse the output in MatchPy rules format. Multiple `Constraints` are divided into individual `Constraints` because it helps the MatchPy's `ManyToOneReplacer` to backtrack earlier and improve the speed. Parsed output is formatted into readable format by using `sympify` and print the expression using `sstr`. This replaces `And`, `Mul`, 'Pow' by their respective symbols. Mathematica =========== To get the full form from Wolfram Mathematica, type: ``` ShowSteps = False Import["RubiLoader.m"] Export["output.txt", ToString@FullForm@DownValues@Int] ``` The file ``output.txt`` will then contain the rules in parseable format. References ========== [1] http://reference.wolfram.com/language/ref/FullForm.html [2] http://reference.wolfram.com/language/ref/DownValues.html [3] https://gist.github.com/Upabjojr/bc07c49262944f9c1eb0 """ import re import os import inspect from sympy.core.function import Function from sympy.core.symbol import Symbol from sympy.core.sympify import sympify from sympy.sets.sets import Set from sympy.printing import StrPrinter from sympy.utilities.misc import debug class RubiStrPrinter(StrPrinter): def _print_Not(self, expr): return "Not(%s)" % self._print(expr.args[0]) def rubi_printer(expr, **settings): return RubiStrPrinter(settings).doprint(expr) replacements = dict( # Mathematica equivalent functions in SymPy Times="Mul", Plus="Add", Power="Pow", Log='log', Exp='exp', Sqrt='sqrt', Cos='cos', Sin='sin', Tan='tan', Cot='1/tan', cot='1/tan', Sec='1/cos', sec='1/cos', Csc='1/sin', csc='1/sin', ArcSin='asin', ArcCos='acos', # ArcTan='atan', ArcCot='acot', ArcSec='asec', ArcCsc='acsc', Sinh='sinh', Cosh='cosh', Tanh='tanh', Coth='1/tanh', coth='1/tanh', Sech='1/cosh', sech='1/cosh', Csch='1/sinh', csch='1/sinh', ArcSinh='asinh', ArcCosh='acosh', ArcTanh='atanh', ArcCoth='acoth', ArcSech='asech', ArcCsch='acsch', Expand='expand', Im='im', Re='re', Flatten='flatten', Polylog='polylog', Cancel='cancel', #Gamma='gamma', TrigExpand='expand_trig', Sign='sign', Simplify='simplify', Defer='UnevaluatedExpr', Identity = 'S', Sum = 'Sum_doit', Module = 'With', Block = 'With', Null = 'None' ) temporary_variable_replacement = { # Temporarily rename because it can raise errors while sympifying 'gcd' : "_gcd", 'jn' : "_jn", } permanent_variable_replacement = { # Permamenely rename these variables r"\[ImaginaryI]" : 'ImaginaryI', "$UseGamma": '_UseGamma', } # These functions have different return type in different cases. So better to use a try and except in the constraints, when any of these appear f_diff_return_type = ['BinomialParts', 'BinomialDegree', 'TrinomialParts', 'GeneralizedBinomialParts', 'GeneralizedTrinomialParts', 'PseudoBinomialParts', 'PerfectPowerTest', 'SquareFreeFactorTest', 'SubstForFractionalPowerOfQuotientOfLinears', 'FractionalPowerOfQuotientOfLinears', 'InverseFunctionOfQuotientOfLinears', 'FractionalPowerOfSquareQ', 'FunctionOfLinear', 'FunctionOfInverseLinear', 'FunctionOfTrig', 'FindTrigFactor', 'FunctionOfLog', 'PowerVariableExpn', 'FunctionOfSquareRootOfQuadratic', 'SubstForFractionalPowerOfLinear', 'FractionalPowerOfLinear', 'InverseFunctionOfLinear', 'Divides', 'DerivativeDivides', 'TrigSquare', 'SplitProduct', 'SubstForFractionalPowerOfQuotientOfLinears', 'InverseFunctionOfQuotientOfLinears', 'FunctionOfHyperbolic', 'SplitSum'] def contains_diff_return_type(a): """ This function returns whether an expression contains functions which have different return types in diiferent cases. """ if isinstance(a, list): for i in a: if contains_diff_return_type(i): return True elif type(a) == Function('With') or type(a) == Function('Module'): for i in f_diff_return_type: if a.has(Function(i)): return True else: if a in f_diff_return_type: return True return False def parse_full_form(wmexpr): """ Parses FullForm[Downvalues[]] generated by Mathematica """ out = [] stack = [out] generator = re.finditer(r'[\[\],]', wmexpr) last_pos = 0 for match in generator: if match is None: break position = match.start() last_expr = wmexpr[last_pos:position].replace(',', '').replace(']', '').replace('[', '').strip() if match.group() == ',': if last_expr != '': stack[-1].append(last_expr) elif match.group() == ']': if last_expr != '': stack[-1].append(last_expr) stack.pop() elif match.group() == '[': stack[-1].append([last_expr]) stack.append(stack[-1][-1]) last_pos = match.end() return out[0] def get_default_values(parsed, default_values={}): """ Returns Optional variables and their values in the pattern """ if not isinstance(parsed, list): return default_values if parsed[0] == "Times": # find Default arguments for "Times" for i in parsed[1:]: if i[0] == "Optional": default_values[(i[1][1])] = 1 if parsed[0] == "Plus": # find Default arguments for "Plus" for i in parsed[1:]: if i[0] == "Optional": default_values[(i[1][1])] = 0 if parsed[0] == "Power": # find Default arguments for "Power" for i in parsed[1:]: if i[0] == "Optional": default_values[(i[1][1])] = 1 if len(parsed) == 1: return default_values for i in parsed: default_values = get_default_values(i, default_values) return default_values def add_wildcards(string, optional={}): """ Replaces `Pattern(variable)` by `variable` in `string`. Returns the free symbols present in the string. """ symbols = [] # stores symbols present in the expression p = r'(Optional\(Pattern\((\w+), Blank\)\))' matches = re.findall(p, string) for i in matches: string = string.replace(i[0], "WC('{}', S({}))".format(i[1], optional[i[1]])) symbols.append(i[1]) p = r'(Pattern\((\w+), Blank\))' matches = re.findall(p, string) for i in matches: string = string.replace(i[0], i[1] + '_') symbols.append(i[1]) p = r'(Pattern\((\w+), Blank\(Symbol\)\))' matches = re.findall(p, string) for i in matches: string = string.replace(i[0], i[1] + '_') symbols.append(i[1]) return string, symbols def seperate_freeq(s, variables=[], x=None): """ Returns list of symbols in FreeQ. """ if s[0] == 'FreeQ': if len(s[1]) == 1: variables = [s[1]] else: variables = s[1][1:] x = s[2] else: for i in s[1:]: variables, x = seperate_freeq(i, variables, x) return variables, x return variables, x def parse_freeq(l, x, cons_index, cons_dict, cons_import, symbols=None): """ Converts FreeQ constraints into MatchPy constraint """ res = [] cons = '' for i in l: if isinstance(i, str): r = ' return FreeQ({}, {})'.format(i, x) # First it checks if a constraint is already present in `cons_dict`, If yes, use it else create a new one. if r not in cons_dict.values(): cons_index += 1 c = '\n def cons_f{}({}, {}):\n'.format(cons_index, i, x) c += r c += '\n\n cons{} = CustomConstraint({})\n'.format(cons_index, 'cons_f{}'.format(cons_index)) cons_name = 'cons{}'.format(cons_index) cons_dict[cons_name] = r else: c = '' cons_name = next(key for key, value in sorted(cons_dict.items()) if value == r) elif isinstance(i, list): s = sorted(set(get_free_symbols(i, symbols))) s = ', '.join(s) r = ' return FreeQ({}, {})'.format(generate_sympy_from_parsed(i), x) if r not in cons_dict.values(): cons_index += 1 c = '\n def cons_f{}({}):\n'.format(cons_index, s) c += r c += '\n\n cons{} = CustomConstraint({})\n'.format(cons_index, 'cons_f{}'.format(cons_index)) cons_name = 'cons{}'.format(cons_index) cons_dict[cons_name] = r else: c = '' cons_name = next(key for key, value in cons_dict.items() if value == r) if cons_name not in cons_import: cons_import.append(cons_name) res.append(cons_name) cons += c if res != []: return ', ' + ', '.join(res), cons, cons_index return '', cons, cons_index def generate_sympy_from_parsed(parsed, wild=False, symbols=(), replace_Int=False): """ Parses list into Python syntax. Parameters ========== wild : When set to True, the symbols are replaced as wild symbols. symbols : Symbols already present in the pattern. replace_Int: when set to True, `Int` is replaced by `Integral`(used to parse pattern). """ out = "" if not isinstance(parsed, list): try: # return S(number) if parsed is Number float(parsed) return "S({})".format(parsed) except: pass if parsed in symbols: if wild: return parsed + '_' return parsed if parsed[0] == 'Rational': return 'S({})/S({})'.format(generate_sympy_from_parsed(parsed[1], wild=wild, symbols=symbols, replace_Int=replace_Int), generate_sympy_from_parsed(parsed[2], wild=wild, symbols=symbols, replace_Int=replace_Int)) if parsed[0] in replacements: out += replacements[parsed[0]] elif parsed[0] == 'Int' and replace_Int: out += 'Integral' else: out += parsed[0] if len(parsed) == 1: return out result = [generate_sympy_from_parsed(i, wild=wild, symbols=symbols, replace_Int=replace_Int) for i in parsed[1:]] if '' in result: result.remove('') out += "(" out += ", ".join(result) out += ")" return out def get_free_symbols(s, symbols, free_symbols=None): """ Returns free_symbols present in `s`. """ free_symbols = free_symbols or [] if not isinstance(s, list): if s in symbols: free_symbols.append(s) return free_symbols for i in s: free_symbols = get_free_symbols(i, symbols, free_symbols) return free_symbols def set_matchq_in_constraint(a, cons_index): """ Takes care of the case, when a pattern matching has to be done inside a constraint. """ lst = [] res = '' if isinstance(a, list): if a[0] == 'MatchQ': s = a optional = get_default_values(s, {}) r = generate_sympy_from_parsed(s, replace_Int=True) r, free_symbols = add_wildcards(r, optional=optional) free_symbols = sorted(set(free_symbols)) # remove common symbols r = sympify(r, locals={"Or": Function("Or"), "And": Function("And"), "Not":Function("Not")}) pattern = r.args[1].args[0] cons = r.args[1].args[1] pattern = rubi_printer(pattern, sympy_integers=True) pattern = setWC(pattern) res = ' def _cons_f_{}({}):\n return {}\n'.format(cons_index, ', '.join(free_symbols), cons) res += ' _cons_{} = CustomConstraint(_cons_f_{})\n'.format(cons_index, cons_index) res += ' pat = Pattern(UtilityOperator({}, x), _cons_{})\n'.format(pattern, cons_index) res += ' result_matchq = is_match(UtilityOperator({}, x), pat)'.format(r.args[0]) return "result_matchq", res else: for i in a: if isinstance(i, list): r = set_matchq_in_constraint(i, cons_index) lst.append(r[0]) res = r[1] else: lst.append(i) return lst, res def _divide_constriant(s, symbols, cons_index, cons_dict, cons_import): # Creates a CustomConstraint of the form `CustomConstraint(lambda a, x: FreeQ(a, x))` lambda_symbols = sorted(set(get_free_symbols(s, symbols, []))) r = generate_sympy_from_parsed(s) r = sympify(r, locals={"Or": Function("Or"), "And": Function("And"), "Not":Function("Not")}) if r.has(Function('MatchQ')): match_res = set_matchq_in_constraint(s, cons_index) res = match_res[1] res += '\n return {}'.format(rubi_printer(sympify(generate_sympy_from_parsed(match_res[0]), locals={"Or": Function("Or"), "And": Function("And"), "Not":Function("Not")}), sympy_integers = True)) elif contains_diff_return_type(s): res = ' try:\n return {}\n except (TypeError, AttributeError):\n return False'.format(rubi_printer(r, sympy_integers=True)) else: res = ' return {}'.format(rubi_printer(r, sympy_integers=True)) # First it checks if a constraint is already present in `cons_dict`, If yes, use it else create a new one. if not res in cons_dict.values(): cons_index += 1 cons = '\n def cons_f{}({}):\n'.format(cons_index, ', '.join(lambda_symbols)) if 'x' in lambda_symbols: cons += ' if isinstance(x, (int, Integer, float, Float)):\n return False\n' cons += res cons += '\n\n cons{} = CustomConstraint({})\n'.format(cons_index, 'cons_f{}'.format(cons_index)) cons_name = 'cons{}'.format(cons_index) cons_dict[cons_name] = res else: cons = '' cons_name = next(key for key, value in cons_dict.items() if value == res) if cons_name not in cons_import: cons_import.append(cons_name) return cons_name, cons, cons_index def divide_constraint(s, symbols, cons_index, cons_dict, cons_import): """ Divides multiple constraints into smaller constraints. Parameters ========== s : constraint as list symbols : all the symbols present in the expression """ result =[] cons = '' if s[0] == 'And': for i in s[1:]: if i[0]!= 'FreeQ': a = _divide_constriant(i, symbols, cons_index, cons_dict, cons_import) result.append(a[0]) cons += a[1] cons_index = a[2] else: a = _divide_constriant(s, symbols, cons_index, cons_dict, cons_import) result.append(a[0]) cons += a[1] cons_index = a[2] r = [''] for i in result: if i != '': r.append(i) return ', '.join(r),cons, cons_index def setWC(string): """ Replaces `WC(a, b)` by `WC('a', S(b))` """ p = r'(WC\((\w+), S\(([-+]?\d)\)\))' matches = re.findall(p, string) for i in matches: string = string.replace(i[0], "WC('{}', S({}))".format(i[1], i[2])) return string def process_return_type(a1, L): """ Functions like `Set`, `With` and `CompoundExpression` has to be taken special care. """ a = sympify(a1[1]) x = '' processed = False return_value = '' if type(a) == Function('With') or type(a) == Function('Module'): for i in a.args: for s in i.args: if isinstance(s, Set) and not s in L: x += '\n {} = {}'.format(s.args[0], rubi_printer(s.args[1], sympy_integers=True)) if not type(i) in (Function('List'), Function('CompoundExpression')) and not i.has(Function('CompoundExpression')): return_value = i processed = True elif type(i) == Function('CompoundExpression'): return_value = i.args[-1] processed = True elif type(i.args[0]) == Function('CompoundExpression'): C = i.args[0] return_value = '{}({}, {})'.format(i.func, C.args[-1], i.args[1]) processed = True return x, return_value, processed def extract_set(s, L): """ this function extracts all `Set` functions """ lst = [] if isinstance(s, Set) and not s in L: lst.append(s) else: try: for i in s.args: lst += extract_set(i, L) except: # when s has no attribute args (like `bool`) pass return lst def replaceWith(s, symbols, index): """ Replaces `With` and `Module by python functions` """ return_type = None with_value = '' if type(s) == Function('With') or type(s) == Function('Module'): constraints = ' ' result = '\n\n\ndef With{}({}):'.format(index, ', '.join(symbols)) if type(s.args[0]) == Function('List'): # get all local variables of With and Module L = list(s.args[0].args) else: L = [s.args[0]] lst = [] for i in s.args[1:]: lst += extract_set(i, L) L += lst for i in L: # define local variables if isinstance(i, Set): with_value += '\n {} = {}'.format(i.args[0], rubi_printer(i.args[1], sympy_integers=True)) elif isinstance(i, Symbol): with_value += "\n {} = Symbol('{}')".format(i, i) #result += with_value if type(s.args[1]) == Function('CompoundExpression'): # Expand CompoundExpression C = s.args[1] result += with_value if isinstance(C.args[0], Set): result += '\n {} = {}'.format(C.args[0].args[0], C.args[0].args[1]) result += '\n return {}'.format(rubi_printer(C.args[1], sympy_integers=True)) return result, constraints, return_type elif type(s.args[1]) == Function('Condition'): C = s.args[1] if len(C.args) == 2: if all(j in symbols for j in [str(i) for i in C.free_symbols]): result += with_value #constraints += 'CustomConstraint(lambda {}: {})'.format(', '.join([str(i) for i in C.free_symbols]), sstr(C.args[1], sympy_integers=True)) result += '\n return {}'.format(rubi_printer(C.args[0], sympy_integers=True)) else: if 'x' in symbols: result += '\n if isinstance(x, (int, Integer, float, Float)):\n return False' if contains_diff_return_type(s): n_with_value = with_value.replace('\n', '\n ') result += '\n try:{}\n res = {}'.format(n_with_value, rubi_printer(C.args[1], sympy_integers=True)) result += '\n except (TypeError, AttributeError):\n return False' result += '\n if res:' else: result+=with_value result += '\n if {}:'.format(rubi_printer(C.args[1], sympy_integers=True)) return_type = (with_value, rubi_printer(C.args[0], sympy_integers=True)) return_type1 = process_return_type(return_type, L) if return_type1[2]: return_type = (with_value+return_type1[0], rubi_printer(return_type1[1])) result += '\n return True' result += '\n return False' constraints = ', CustomConstraint(With{})'.format(index) return result, constraints, return_type elif type(s.args[1]) == Function('Module') or type(s.args[1]) == Function('With'): C = s.args[1] result += with_value return_type = (with_value, rubi_printer(C, sympy_integers=True)) return_type1 = process_return_type(return_type, L) if return_type1[2]: return_type = (with_value+return_type1[0], rubi_printer(return_type1[1])) result += return_type1[0] result += '\n return {}'.format(rubi_printer(return_type1[1])) return result, constraints, None elif s.args[1].has(Function("CompoundExpression")): C = s.args[1].args[0] result += with_value if isinstance(C.args[0], Set): result += '\n {} = {}'.format(C.args[0].args[0], C.args[0].args[1]) result += '\n return {}({}, {})'.format(s.args[1].func, C.args[-1], s.args[1].args[1]) return result, constraints, None result += with_value result += '\n return {}'.format(rubi_printer(s.args[1], sympy_integers=True)) return result, constraints, return_type else: return rubi_printer(s, sympy_integers=True), '', return_type def downvalues_rules(r, header, cons_dict, cons_index, index): """ Function which generates parsed rules by substituting all possible combinations of default values. """ rules = '[' parsed = '\n\n' repl_funcs = '\n\n' cons = '' cons_import = [] # it contains name of constraints that need to be imported for rules. for i in r: debug('parsing rule {}'.format(r.index(i) + 1)) # Parse Pattern if i[1][1][0] == 'Condition': p = i[1][1][1].copy() else: p = i[1][1].copy() optional = get_default_values(p, {}) pattern = generate_sympy_from_parsed(p.copy(), replace_Int=True) pattern, free_symbols = add_wildcards(pattern, optional=optional) free_symbols = sorted(set(free_symbols)) #remove common symbols # Parse Transformed Expression and Constraints if i[2][0] == 'Condition': # parse rules without constraints separately constriant, constraint_def, cons_index = divide_constraint(i[2][2], free_symbols, cons_index, cons_dict, cons_import) # separate And constraints into individual constraints FreeQ_vars, FreeQ_x = seperate_freeq(i[2][2].copy()) # separate FreeQ into individual constraints transformed = generate_sympy_from_parsed(i[2][1].copy(), symbols=free_symbols) else: constriant = '' constraint_def = '' FreeQ_vars, FreeQ_x = [], [] transformed = generate_sympy_from_parsed(i[2].copy(), symbols=free_symbols) FreeQ_constraint, free_cons_def, cons_index = parse_freeq(FreeQ_vars, FreeQ_x, cons_index, cons_dict, cons_import, free_symbols) pattern = sympify(pattern, locals={"Or": Function("Or"), "And": Function("And"), "Not":Function("Not") }) pattern = rubi_printer(pattern, sympy_integers=True) pattern = setWC(pattern) transformed = sympify(transformed, locals={"Or": Function("Or"), "And": Function("And"), "Not":Function("Not") }) constraint_def = constraint_def + free_cons_def cons += constraint_def index += 1 # below are certain if - else condition depending on various situation that may be encountered if type(transformed) == Function('With') or type(transformed) == Function('Module'): # define separate function when With appears transformed, With_constraints, return_type = replaceWith(transformed, free_symbols, index) if return_type is None: repl_funcs += '{}'.format(transformed) parsed += '\n pattern' + str(index) + ' = Pattern(' + pattern + '' + FreeQ_constraint + '' + constriant + ')' parsed += '\n ' + 'rule' + str(index) + ' = ReplacementRule(' + 'pattern' + rubi_printer(index, sympy_integers=True) + ', With{}'.format(index) + ')\n' else: repl_funcs += '{}'.format(transformed) parsed += '\n pattern' + str(index) + ' = Pattern(' + pattern + '' + FreeQ_constraint + '' + constriant + With_constraints + ')' repl_funcs += '\n\n\ndef replacement{}({}):\n'.format( index, ', '.join(free_symbols) ) + return_type[0] + '\n return '.format(index) + return_type[1] parsed += '\n ' + 'rule' + str(index) + ' = ReplacementRule(' + 'pattern' + rubi_printer(index, sympy_integers=True) + ', replacement{}'.format(index) + ')\n' else: transformed = rubi_printer(transformed, sympy_integers=True) parsed += '\n pattern' + str(index) + ' = Pattern(' + pattern + '' + FreeQ_constraint + '' + constriant + ')' repl_funcs += '\n\n\ndef replacement{}({}):\n return '.format(index, ', '.join(free_symbols), index) + transformed parsed += '\n ' + 'rule' + str(index) + ' = ReplacementRule(' + 'pattern' + rubi_printer(index, sympy_integers=True) + ', replacement{}'.format(index) + ')\n' rules += 'rule{}, '.format(index) rules += ']' parsed += ' return ' + rules +'\n' header += ' from sympy.integrals.rubi.constraints import ' + ', '.join(word for word in cons_import) parsed = header + parsed + repl_funcs return parsed, cons_index, cons, index def rubi_rule_parser(fullform, header=None, module_name='rubi_object'): """ Parses rules in MatchPy format. Parameters ========== fullform : FullForm of the rule as string. header : Header imports for the file. Uses default imports if None. module_name : name of RUBI module References ========== [1] http://reference.wolfram.com/language/ref/FullForm.html [2] http://reference.wolfram.com/language/ref/DownValues.html [3] https://gist.github.com/Upabjojr/bc07c49262944f9c1eb0 """ if header is None: # use default header values path_header = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) header = open(os.path.join(path_header, "header.py.txt")).read() header = header.format(module_name) cons_dict = {} # dict keeps track of constraints that has been encountered, thus avoids repetition of constraints. cons_index = 0 # for index of a constraint index = 0 # indicates the number of a rule. cons = '' # Temporarily rename these variables because it # can raise errors while sympifying for i in temporary_variable_replacement: fullform = fullform.replace(i, temporary_variable_replacement[i]) # Permanently rename these variables for i in permanent_variable_replacement: fullform = fullform.replace(i, permanent_variable_replacement[i]) rules = [] for i in parse_full_form(fullform): # separate all rules if i[0] == 'RuleDelayed': rules.append(i) parsed = downvalues_rules(rules, header, cons_dict, cons_index, index) result = parsed[0].strip() + '\n' cons += parsed[2] # Replace temporary variables by actual values for i in temporary_variable_replacement: cons = cons.replace(temporary_variable_replacement[i], i) result = result.replace(temporary_variable_replacement[i], i) cons = "\n".join(header.split("\n")[:-2]) + '\n' + cons return result, cons
021a698b12e883a55a54800d451282c7e9c464de3694c1849ed28884d3c90d3a
from sympy.integrals.rubi.parsetools.parse import generate_sympy_from_parsed, parse_full_form, rubi_printer from sympy.core.sympify import sympify from sympy.integrals.rubi.utility_function import List, If import os, inspect def rubi_sstr(a): return rubi_printer(a, sympy_integers=True) def generate_test_file(): ''' This function is assuming the name of file containing the fullform is test_1.m. It can be changes as per use. For more details, see `https://github.com/sympy/sympy/wiki/Rubi-parsing-guide#parsing-tests` ''' res =[] file_name = 'test_1.m' with open(file_name) as myfile: fullform =myfile.read().replace('\n', '') fullform = fullform.replace('$VersionNumber', 'version_number') fullform = fullform.replace('Defer[Int][', 'Integrate[') path_header = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) h = open(os.path.join(path_header, "header.py.txt")).read() header = "import sys\nfrom sympy.external import import_module\nmatchpy = import_module({})".format('\"matchpy\"') header += "\nif not matchpy:\n disabled = True\n" header += "if sys.version_info[:2] < (3, 6):\n disabled = True\n" header += "\n".join(h.split("\n")[8:-9]) header += "from sympy.integrals.rubi.rubi import rubi_integrate\n" header += "from sympy import Integral as Integrate, exp, log\n" header += "\na, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z = symbols('a b c d e f g h i j k l m n o p q r s t u v w x y z')" header += "\nA, B, C, F, G, H, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z = symbols('A B C F G H J K L M N O P Q R T U V W X Y Z')" header += "\n\ndef {}():\n".format(file_name[0:-2]) s = parse_full_form(fullform) tests = [] for i in s: res[:] = [] if i[0] == 'HoldComplete': ss = sympify(generate_sympy_from_parsed(i[1]), locals = { 'version_number' : 11, 'If' : If}) ss = List(*ss.args) tests.append(ss) t = '' for a in tests: if len(a) == 5: r = 'rubi_integrate({}, x)'.format(rubi_sstr(a[0])) t += '\n assert rubi_test({}, {}, {}, expand=True, _diff=True, _numerical=True) or rubi_test({}, {}, {}, expand=True, _diff=True, _numerical=True)'.format(r, rubi_sstr(a[1]), rubi_sstr(a[3]), r, rubi_sstr(a[1]),rubi_sstr(a[4])) else: r = 'rubi_integrate({}, x)'.format(rubi_sstr(a[0])) t += '\n assert rubi_test({}, {}, {}, expand=True, _diff=True, _numerical=True)'.format(r, rubi_sstr(a[1]), rubi_sstr(a[3])) t = header+t+'\n' test = open('parsed_tests.py', 'w') test.write(t) test.close()
5cae09b1e3a5607766f519f16f9bd282a9ac4a8ed90eee33e4f5a07fcfed7a3c
import sys from sympy.external import import_module from sympy.integrals.rubi.rubimain import LoadRubiReplacer matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.core.symbol import symbols, Symbol from sympy.functions import log from sympy.concrete.summations import Sum from sympy.core.numbers import (I, pi) from sympy.core.singleton import S from sympy.functions.elementary.exponential import log from sympy.functions.elementary.hyperbolic import atanh from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import (atan, cos, sin) from sympy.functions.special.hyper import hyper from sympy.simplify.simplify import simplify from sympy.integrals.rubi.utility_function import rubi_test from sympy.testing.pytest import SKIP a, b, c, d, e, f, x, m, n, p, k = symbols('a b c d e f x m n p k', real=True, imaginary=False) @SKIP def test_rubi_integrate(): from sympy.integrals.rubi.rubimain import rubi_integrate assert rubi_integrate(x, x) == x**2/2 assert rubi_integrate(x**2, x) == x**3/3 assert rubi_integrate(x**3, x) == x**4/4 assert rubi_integrate(x**a, x) == x**(a + S(1))/(a + S(1)) assert rubi_integrate(S(1)/x, x) == log(x) assert rubi_integrate(a*x, x) == a*(S(1)/S(2))*x**S(2) assert rubi_integrate(1/(x**2*(a + b*x)**2), x) == -b/(a**2*(a + b*x)) - 1/(a**2*x) - 2*b*log(x)/a**3 + 2*b*log(a + b*x)/a**3 assert rubi_integrate(x**6/(a + b*x)**2, x) == (-a**6/(b**7*(a + b*x)) - S(6)*a**5*log(a + b*x)/b**7 + 5*a**4*x/b**6 - S(2)*a**3*x**2/b**5 + a**2*x**3/b**4 - a*x**4/(S(2)*b**3) + x**5/(S(5)*b**2)) assert rubi_integrate(1/(x**2*(a + b*x)**2), x) == -b/(a**2*(a + b*x)) - 1/(a**2*x) - 2*b*log(x)/a**3 + 2*b*log(a + b*x)/a**3 assert rubi_integrate(a + S(1)/x, x) == a*x + log(x) assert rubi_integrate((a + b*x)**2/x**3, x) == -a**2/(2*x**2) - 2*a*b/x + b**2*log(x) assert rubi_integrate(a**3*x, x) == S(1)/S(2)*a**3*x**2 assert rubi_integrate((a + b*x)**3/x**3, x) == -a**3/(2*x**2) - 3*a**2*b/x + 3*a*b**2*log(x) + b**3*x assert rubi_integrate(x**3*(a + b*x), x) == a*x**4/4 + b*x**5/5 assert rubi_integrate((b*x)**m*(d*x + 2)**n, x) == 2**n*(b*x)**(m + 1)*hyper((-n, m + 1), (m + 2,), -d*x/2)/(b*(m + 1)) assert rubi_test(rubi_integrate(1/(1 + x**5), x), x, log(x + S(1))/S(5) + S(2)*Sum(-log((S(2)*x - S(2)*cos(pi*(S(2)*k/S(5) + S(-1)/5)))**S(2) - S(4)*sin(S(2)*pi*k/S(5) + S(3)*pi/S(10))**S(2) + S(4))*cos(pi*(S(2)*k/S(5) + S(-1)/5))/S(2) - (-S(2)*cos(pi*(S(2)*k/S(5) + S(-1)/5))**S(2) + S(2))*atan((-x/cos(pi*(S(2)*k/S(5) + S(-1)/5)) + S(1))/sqrt(-(cos(S(2)*pi*k/S(5) - pi/S(5)) + S(-1))*(cos(S(2)*pi*k/S(5) - pi/S(5)) + S(1))/cos(S(2)*pi*k/S(5) - pi/S(5))**S(2)))/(S(2)*sqrt(-(cos(S(2)*pi*k/S(5) - pi/S(5)) + S(-1))*(cos(S(2)*pi*k/S(5) - pi/S(5)) + S(1))/cos(S(2)*pi*k/S(5) - pi/S(5))**S(2))*cos(pi*(S(2)*k/S(5) + S(-1)/5))), (k, S(1), S(2)))/S(5), _numerical=True)
bfe2a3351fac9f7b6223199ac5eeea2d44b87a49d8065c3cb0fc5299b9063a77
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.utility_function import (Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, First, Rest, SqrtNumberQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, PolynomialQuotient, ArcTan, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcCsch, Sinh, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, DerivativeDivides, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, PureFunctionOfCothQ, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, IntegralFreeQ, Sum_doit, rubi_exp, rubi_log, PolynomialRemainder, CoprimeQ, Distribute, ProductLog, Floor, PolyGamma, process_trig, replace_pow_exp, ExponentList) # TODO - Add tests for: Int, NFreeQ, PureComplexNumberQ, EllipticPi, EllipticE, # EllipticF, ArcCot, ArcCoth, Tanh, Cosh, Sech, ArcSec, ArcSech, Subst, # SqrtNumberSumQ, Sin, Cos, Tan, Cot, Sec, Csc, Csch, TrigHyperbolicFreeQ, # InverseFunctionFreeQ, RealQ, from sympy.core.add import Add from sympy.core.expr import unchanged from sympy.core.numbers import (E, I, oo, pi, zoo) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.core.symbol import (symbols, Symbol, Wild) from sympy.functions.elementary.exponential import exp, log as sym_log from sympy.functions.elementary.hyperbolic import acosh, asinh, atanh, acsch, cosh, sinh, tanh, coth, sech, csch, acoth from sympy.functions.elementary.miscellaneous import Min, sqrt from sympy.functions.elementary.trigonometric import (cos, cot, csc, sec, sin, tan, atan, acsc, asin, acot, acos, asec, atan2) from sympy.functions.special.error_functions import (Chi, Ci, Ei, Shi, Si, expint, li) from sympy.functions.special.gamma_functions import (gamma, loggamma, polygamma) from sympy.functions.special.hyper import hyper from sympy.functions.special.zeta_functions import (polylog, zeta) from sympy.integrals.integrals import Integral from sympy.simplify.simplify import (nsimplify, simplify) A, B, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B a b c d e f g h y z m n p q u v w F', real=True, imaginary=False) x = Symbol('x') def test_ZeroQ(): e = b*(n*p + n + 1) d = a assert ZeroQ(a*e - b*d*(n*(p + S(1)) + S(1))) assert ZeroQ(S(0)) assert not ZeroQ(S(10)) assert not ZeroQ(S(-2)) assert ZeroQ(0, 2-2) assert ZeroQ([S(2), (4), S(0), S(8)]) == [False, False, True, False] assert ZeroQ([S(2), S(4), S(8)]) == [False, False, False] def test_NonzeroQ(): assert NonzeroQ(S(1)) == True def test_FreeQ(): l = [a*b, x, a + b] assert FreeQ(l, x) == False l = [a*b, a + b] assert FreeQ(l, x) == True def test_List(): assert List(a, b, c) == [a, b, c] def test_Log(): assert Log(a) == rubi_log(a) def test_PositiveIntegerQ(): assert PositiveIntegerQ(S(1)) assert not PositiveIntegerQ(S(-3)) assert not PositiveIntegerQ(S(0)) def test_NegativeIntegerQ(): assert not NegativeIntegerQ(S(1)) assert NegativeIntegerQ(S(-3)) assert not NegativeIntegerQ(S(0)) def test_PositiveQ(): assert PositiveQ(S(1)) assert not PositiveQ(S(-3)) assert not PositiveQ(S(0)) assert not PositiveQ(zoo) assert not PositiveQ(I) assert PositiveQ(b/(b*(b*c/(-a*d + b*c)) - a*(b*d/(-a*d + b*c)))) def test_IntegerQ(): assert IntegerQ(S(1)) assert not IntegerQ(S(-1.9)) assert not IntegerQ(S(0.0)) assert IntegerQ(S(-1)) def test_IntegersQ(): assert IntegersQ([S(1), S(0)]) assert not IntegersQ([S(-1.9), S(1)]) assert not IntegersQ([S(0.0), S(0)]) assert IntegersQ([S(-1), S(0), S(2)]) def test_FracPart(): assert FracPart(S(10)) == 0 assert FracPart(S(10)+0.5) == 10.5 def test_IntPart(): assert IntPart(m*n) == 0 assert IntPart(S(10)) == 10 assert IntPart(1 + m) == 1 def test_NegQ(): assert NegQ(-S(3)) assert not NegQ(S(0)) assert not NegQ(S(0)) def test_RationalQ(): assert RationalQ(S(5)/6) assert RationalQ(S(5)/6, S(4)/5) assert not RationalQ(Sqrt(1.6)) assert not RationalQ(Sqrt(1.6), S(5)/6) assert not RationalQ(rubi_log(2)) def test_ArcCosh(): assert ArcCosh(x) == acosh(x) def test_LinearQ(): assert not LinearQ(a, x) assert LinearQ(3*x + y**2, x) assert not LinearQ(3*x + y**2, y) assert not LinearQ(S(3), x) def test_Sqrt(): assert Sqrt(x) == sqrt(x) assert Sqrt(25) == 5 def test_Util_Coefficient(): from sympy.integrals.rubi.utility_function import Util_Coefficient assert unchanged(Util_Coefficient, a + b*x + c*x**3, x, a) assert Util_Coefficient(a + b*x + c*x**3, x, 4).doit() == 0 def test_Coefficient(): assert Coefficient(7 + 2*x + 4*x**3, x, 1) == 2 assert Coefficient(a + b*x + c*x**3, x, 0) == a assert Coefficient(a + b*x + c*x**3, x, 4) == 0 assert Coefficient(b*x + c*x**3, x, 3) == c assert Coefficient(x, x, -1) == 0 def test_Denominator(): assert Denominator(-S(1)/S(2) + I/3) == 6 assert Denominator((-a/b)**3) == (b)**(3) assert Denominator(S(3)/2) == 2 assert Denominator(x/y) == y assert Denominator(S(4)/5) == 5 def test_Hypergeometric2F1(): assert Hypergeometric2F1(1, 2, 3, x) == hyper((1, 2), (3,), x) def test_ArcTan(): assert ArcTan(x) == atan(x) assert ArcTan(x, y) == atan2(x, y) def test_Not(): a = 10 assert Not(a == 2) def test_FractionalPart(): assert FractionalPart(S(3.0)) == 0.0 def test_IntegerPart(): assert IntegerPart(3.6) == 3 assert IntegerPart(-3.6) == -4 def test_AppellF1(): assert AppellF1(1,0,0.5,1,0.5,0.25).evalf() == 1.154700538379251529018298 assert unchanged(AppellF1, a, b, c, d, e, f) def test_Simplify(): assert Simplify(sin(x)**2 + cos(x)**2) == 1 assert Simplify((x**3 + x**2 - x - 1)/(x**2 + 2*x + 1)) == x - 1 def test_ArcTanh(): assert ArcTanh(a) == atanh(a) def test_ArcSin(): assert ArcSin(a) == asin(a) def test_ArcSinh(): assert ArcSinh(a) == asinh(a) def test_ArcCos(): assert ArcCos(a) == acos(a) def test_ArcCsc(): assert ArcCsc(a) == acsc(a) def test_ArcCsch(): assert ArcCsch(a) == acsch(a) def test_Equal(): assert Equal(a, a) assert not Equal(a, b) def test_LessEqual(): assert LessEqual(1, 2, 3) assert LessEqual(1, 1) assert not LessEqual(3, 2, 1) def test_With(): assert With(Set(x, 3), x + y) == 3 + y assert With(List(Set(x, 3), Set(y, c)), x + y) == 3 + c def test_Module(): # Same as With assert Module(Set(x, 3), x + y) == 3 + y assert Module(List(Set(x, 3), Set(y, c)), x + y) == 3 + c def test_Less(): assert Less(1, 2, 3) assert not Less(1, 1, 3) def test_Greater(): assert Greater(3, 2, 1) assert not Greater(3, 2, 2) def test_GreaterEqual(): assert GreaterEqual(3, 2, 1) assert GreaterEqual(3, 2, 2) assert not GreaterEqual(2, 3) def test_Unequal(): assert Unequal(1, 2) assert not Unequal(1, 1) def test_FractionQ(): assert not FractionQ(S('3')) assert FractionQ(S('3')/S('2')) def test_Expand(): assert Expand((1 + x)**10) == x**10 + 10*x**9 + 45*x**8 + 120*x**7 + 210*x**6 + 252*x**5 + 210*x**4 + 120*x**3 + 45*x**2 + 10*x + 1 def test_Scan(): assert list(Scan(sin, [a, b])) == [sin(a), sin(b)] def test_MapAnd(): assert MapAnd(PositiveQ, [S(1), S(2), S(3), S(0)]) == False assert MapAnd(PositiveQ, [S(1), S(2), S(3)]) == True def test_FalseQ(): assert FalseQ(True) == False assert FalseQ(False) == True def test_ComplexNumberQ(): assert ComplexNumberQ(1 + I*2, I) == True assert ComplexNumberQ(a + b, I) == False def test_Re(): assert Re(1 + I) == 1 def test_Im(): assert Im(1 + 2*I) == 2 assert Im(a*I) == a def test_PositiveOrZeroQ(): assert PositiveOrZeroQ(S(0)) == True assert PositiveOrZeroQ(S(1)) == True assert PositiveOrZeroQ(-S(1)) == False def test_RealNumericQ(): assert RealNumericQ(S(1)) == True assert RealNumericQ(-S(1)) == True def test_NegativeOrZeroQ(): assert NegativeOrZeroQ(S(0)) == True assert NegativeOrZeroQ(-S(1)) == True assert NegativeOrZeroQ(S(1)) == False def test_FractionOrNegativeQ(): assert FractionOrNegativeQ(S(1)/2) == True assert FractionOrNegativeQ(-S(1)) == True assert FractionOrNegativeQ(-S(1)/2) == True assert FractionOrNegativeQ(S(1)) == False def test_NegativeQ(): assert NegativeQ(-S(1)) == True assert NegativeQ(S(1)) == False assert NegativeQ(oo) == False def test_ProductQ(): assert ProductQ(a*b) == True assert ProductQ(a + b) == False def test_SumQ(): assert SumQ(a*b) == False assert SumQ(a + b) == True def test_NonsumQ(): assert NonsumQ(a*b) == True assert NonsumQ(a + b) == False def test_SqrtNumberQ(): assert SqrtNumberQ(sqrt(2)) == True def test_IntLinearcQ(): assert IntLinearcQ(1, 2, 3, 4, 5, 6, x) == True assert IntLinearcQ(S(1)/100, S(2)/100, S(3)/100, S(4)/100, S(5)/100, S(6)/100, x) == False def test_IndependentQ(): assert IndependentQ(a + b*x, x) == False assert IndependentQ(a + b, x) == True def test_PowerQ(): assert PowerQ(a**b) == True assert PowerQ(a + b) == False def test_IntegerPowerQ(): assert IntegerPowerQ(a**2) == True assert IntegerPowerQ(a**0.5) == False def test_PositiveIntegerPowerQ(): assert PositiveIntegerPowerQ(a**3) == True assert PositiveIntegerPowerQ(a**(-2)) == False def test_FractionalPowerQ(): assert FractionalPowerQ(a**(S(2)/S(3))) assert FractionalPowerQ(a**sqrt(2)) == False def test_AtomQ(): assert AtomQ(x) assert not AtomQ(x+1) assert not AtomQ([a, b]) def test_ExpQ(): assert ExpQ(E**2) assert not ExpQ(2**E) def test_LogQ(): assert LogQ(rubi_log(x)) assert not LogQ(sin(x) + rubi_log(x)) def test_Head(): assert Head(sin(x)) == sin assert Head(rubi_log(x**3 + 3)) in (sym_log, rubi_log) def test_MemberQ(): assert MemberQ([a, b, c], b) assert MemberQ([sin, cos, log, tan], Head(sin(x))) assert MemberQ([[sin, cos], [tan, cot]], [sin, cos]) assert not MemberQ([[sin, cos], [tan, cot]], [sin, tan]) def test_TrigQ(): assert TrigQ(sin(x)) assert TrigQ(tan(x**2 + 2)) assert not TrigQ(sin(x) + tan(x)) def test_SinQ(): assert SinQ(sin(x)) assert not SinQ(tan(x)) def test_CosQ(): assert CosQ(cos(x)) assert not CosQ(csc(x)) def test_TanQ(): assert TanQ(tan(x)) assert not TanQ(cot(x)) def test_CotQ(): assert not CotQ(tan(x)) assert CotQ(cot(x)) def test_SecQ(): assert SecQ(sec(x)) assert not SecQ(csc(x)) def test_CscQ(): assert not CscQ(sec(x)) assert CscQ(csc(x)) def test_HyperbolicQ(): assert HyperbolicQ(sinh(x)) assert HyperbolicQ(cosh(x)) assert HyperbolicQ(tanh(x)) assert not HyperbolicQ(sinh(x) + cosh(x) + tanh(x)) def test_SinhQ(): assert SinhQ(sinh(x)) assert not SinhQ(cosh(x)) def test_CoshQ(): assert not CoshQ(sinh(x)) assert CoshQ(cosh(x)) def test_TanhQ(): assert TanhQ(tanh(x)) assert not TanhQ(coth(x)) def test_CothQ(): assert not CothQ(tanh(x)) assert CothQ(coth(x)) def test_SechQ(): assert SechQ(sech(x)) assert not SechQ(csch(x)) def test_CschQ(): assert not CschQ(sech(x)) assert CschQ(csch(x)) def test_InverseTrigQ(): assert InverseTrigQ(acot(x)) assert InverseTrigQ(asec(x)) assert not InverseTrigQ(acsc(x) + asec(x)) def test_SinCosQ(): assert SinCosQ(sin(x)) assert SinCosQ(cos(x)) assert SinCosQ(sec(x)) assert not SinCosQ(acsc(x)) def test_SinhCoshQ(): assert not SinhCoshQ(sin(x)) assert SinhCoshQ(cosh(x)) assert SinhCoshQ(sech(x)) assert SinhCoshQ(csch(x)) def test_LeafCount(): assert LeafCount(1 + a + x**2) == 6 def test_Numerator(): assert Numerator(-S(1)/S(2) + I/3) == -3 + 2*I assert Numerator((-a/b)**3) == (-a)**(3) assert Numerator(S(3)/2) == 3 assert Numerator(x/y) == x def test_Length(): assert Length(a + b) == 2 assert Length(sin(a)*cos(a)) == 2 def test_ListQ(): assert ListQ([1, 2]) assert not ListQ(a) def test_InverseHyperbolicQ(): assert InverseHyperbolicQ(acosh(a)) def test_InverseFunctionQ(): assert InverseFunctionQ(rubi_log(a)) assert InverseFunctionQ(acos(a)) assert not InverseFunctionQ(a) assert InverseFunctionQ(acosh(a)) assert InverseFunctionQ(polylog(a, b)) def test_EqQ(): assert EqQ(a, a) assert not EqQ(a, b) def test_FactorSquareFree(): assert FactorSquareFree(x**5 - x**3 - x**2 + 1) == (x**3 + 2*x**2 + 2*x + 1)*(x - 1)**2 def test_FactorSquareFreeList(): assert FactorSquareFreeList(x**5-x**3-x**2 + 1) == [[1, 1], [x**3 + 2*x**2 + 2*x + 1, 1], [x - 1, 2]] assert FactorSquareFreeList(x**4 - 2*x**2 + 1) == [[1, 1], [x**2 - 1, 2]] def test_PerfectPowerTest(): assert not PerfectPowerTest(sqrt(x), x) assert not PerfectPowerTest(x**5-x**3-x**2 + 1, x) assert PerfectPowerTest(x**4 - 2*x**2 + 1, x) == (x**2 - 1)**2 def test_SquareFreeFactorTest(): assert not SquareFreeFactorTest(sqrt(x), x) assert SquareFreeFactorTest(x**5 - x**3 - x**2 + 1, x) == (x**3 + 2*x**2 + 2*x + 1)*(x - 1)**2 def test_Rest(): assert Rest([2, 3, 5, 7]) == [3, 5, 7] assert Rest(a + b + c) == b + c assert Rest(a*b*c) == b*c assert Rest(1/b) == -1 def test_First(): assert First([2, 3, 5, 7]) == 2 assert First(y**S(2)) == y assert First(a + b + c) == a assert First(a*b*c) == a def test_ComplexFreeQ(): assert ComplexFreeQ(a) assert not ComplexFreeQ(a + 2*I) def test_FractionalPowerFreeQ(): assert not FractionalPowerFreeQ(x**(S(2)/3)) assert FractionalPowerFreeQ(x) def test_Exponent(): assert Min(ExponentList(x**2 + x + 1 + 5, x)) == 0 assert ExponentList(x**2 + x + 1 + 5, x) == [0, 1, 2] assert ExponentList(x**2 + x + 1, x) == [0, 1, 2] assert ExponentList(x**2 + 2*x + 1, x) == [0, 1, 2] assert Exponent(x**3 + x + 1, x) == 3 assert Exponent(x**2 + 2*x + 1, x) == 2 assert ExponentList(x**3, x) == [3] assert Exponent(S(1), x) == 0 assert Exponent(x**(-3), x) == 0 def test_Expon(): assert Expon(x**2+2*x+1, x) == 2 def test_QuadraticQ(): assert not QuadraticQ([x**2+x+1, 5*x**2], x) assert QuadraticQ([x**2+x+1, 5*x**2+3*x+6], x) assert not QuadraticQ(x**2+1+x**3, x) assert QuadraticQ(x**2+1+x, x) assert not QuadraticQ(x**2, x) def test_BinomialQ(): assert BinomialQ(x**9, x) assert not BinomialQ((1 + x)**3, x) def test_BinomialParts(): assert BinomialParts(2 + x*(9*x), x) == [2, 9, 2] assert BinomialParts(x**9, x) == [0, 1, 9] assert BinomialParts(2*x**3, x) == [0, 2, 3] assert BinomialParts(2 + x, x) == [2, 1, 1] def test_BinomialDegree(): assert BinomialDegree(b + 2*c*x**n, x) == n assert BinomialDegree(2 + x*(9*x), x) == 2 assert BinomialDegree(x**9, x) == 9 def test_PolynomialQ(): assert not PolynomialQ(x*(-1 + x**2), (1 + x)**(S(1)/2)) assert not PolynomialQ((16*x + 1)/((x + 5)**2*(x**2 + x + 1)), 2*x) C = Symbol('C') assert not PolynomialQ(A + b*x + c*x**2, x**2) assert PolynomialQ(A + B*x + C*x**2) assert PolynomialQ(A + B*x**4 + C*x**2, x**2) assert PolynomialQ(x**3, x) assert not PolynomialQ(sqrt(x), x) def test_PolyQ(): assert PolyQ(-2*a*d**3*e**2 + x**6*(a*e**5 - b*d*e**4 + c*d**2*e**3)\ + x**4*(-2*a*d*e**4 + 2*b*d**2*e**3 - 2*c*d**3*e**2) + x**2*(2*a*d**2*e**3 - 2*b*d**3*e**2), x) assert not PolyQ(1/sqrt(a + b*x**2 - c*x**4), x**2) assert PolyQ(x, x, 1) assert PolyQ(x**2, x, 2) assert not PolyQ(x**3, x, 2) def test_EvenQ(): assert EvenQ(S(2)) assert not EvenQ(S(1)) def test_OddQ(): assert OddQ(S(1)) assert not OddQ(S(2)) def test_PerfectSquareQ(): assert PerfectSquareQ(S(4)) assert PerfectSquareQ(a**S(2)*b**S(4)) assert not PerfectSquareQ(S(1)/3) def test_NiceSqrtQ(): assert NiceSqrtQ(S(1)/3) assert not NiceSqrtQ(-S(1)) assert NiceSqrtQ(pi**2) assert NiceSqrtQ(pi**2*sin(4)**4) assert not NiceSqrtQ(pi**2*sin(4)**3) def test_Together(): assert Together(1/a + b/2) == (a*b + 2)/(2*a) def test_PosQ(): #assert not PosQ((b*e - c*d)/(c*e)) assert not PosQ(S(0)) assert PosQ(S(1)) assert PosQ(pi) assert PosQ(pi**3) assert PosQ((-pi)**4) assert PosQ(sin(1)**2*pi**4) def test_NumericQ(): assert NumericQ(sin(cos(2))) def test_NumberQ(): assert NumberQ(pi) def test_CoefficientList(): assert CoefficientList(1 + a*x, x) == [1, a] assert CoefficientList(1 + a*x**3, x) == [1, 0, 0, a] assert CoefficientList(sqrt(x), x) == [] def test_ReplaceAll(): assert ReplaceAll(x, {x: a}) == a assert ReplaceAll(a*x, {x: a + b}) == a*(a + b) assert ReplaceAll(a*x, {a: b, x: a + b}) == b*(a + b) def test_ExpandLinearProduct(): assert ExpandLinearProduct(rubi_log(x), x**2, a, b, x) == a**2*rubi_log(x)/b**2 - 2*a*(a + b*x)*rubi_log(x)/b**2 + (a + b*x)**2*rubi_log(x)/b**2 assert ExpandLinearProduct((a + b*x)**n, x**3, a, b, x) == -a**3*(a + b*x)**n/b**3 + 3*a**2*(a + b*x)**(n + 1)/b**3 - 3*a*(a + b*x)**(n + 2)/b**3 + (a + b*x)**(n + 3)/b**3 def test_PolynomialDivide(): assert PolynomialDivide((a*c - b*c*x)**2, (a + b*x)**2, x) == -4*a*b*c**2*x/(a + b*x)**2 + c**2 assert PolynomialDivide(x + x**2, x, x) == x + 1 assert PolynomialDivide((1 + x)**3, (1 + x)**2, x) == x + 1 assert PolynomialDivide((a + b*x)**3, x**3, x) == a*(a**2 + 3*a*b*x + 3*b**2*x**2)/x**3 + b**3 assert PolynomialDivide(x**3*(a + b*x), S(1), x) == b*x**4 + a*x**3 assert PolynomialDivide(x**6, (a + b*x)**2, x) == -a**5*(5*a + 6*b*x)/(b**6*(a + b*x)**2) + 5*a**4/b**6 - 4*a**3*x/b**5 + 3*a**2*x**2/b**4 - 2*a*x**3/b**3 + x**4/b**2 def test_MatchQ(): a_ = Wild('a', exclude=[x]) b_ = Wild('b', exclude=[x]) c_ = Wild('c', exclude=[x]) assert MatchQ(a*b + c, a_*b_ + c_, a_, b_, c_) == (a, b, c) def test_PolynomialQuotientRemainder(): assert PolynomialQuotientRemainder(x**2, x+a, x) == [-a + x, a**2] def test_FreeFactors(): assert FreeFactors(a, x) == a assert FreeFactors(x + a, x) == 1 assert FreeFactors(a*b*x, x) == a*b def test_NonfreeFactors(): assert NonfreeFactors(a, x) == 1 assert NonfreeFactors(x + a, x) == x + a assert NonfreeFactors(a*b*x, x) == x def test_FreeTerms(): assert FreeTerms(a, x) == a assert FreeTerms(x*a, x) == 0 assert FreeTerms(a*x + b, x) == b def test_NonfreeTerms(): assert NonfreeTerms(a, x) == 0 assert NonfreeTerms(a*x, x) == a*x assert NonfreeTerms(a*x + b, x) == a*x def test_RemoveContent(): assert RemoveContent(a + b*x, x) == a + b*x def test_ExpandAlgebraicFunction(): assert ExpandAlgebraicFunction((a + b)*x, x) == a*x + b*x assert ExpandAlgebraicFunction((a + b)**2*x, x)== a**2*x + 2*a*b*x + b**2*x assert ExpandAlgebraicFunction((a + b)**2*x**2, x) == a**2*x**2 + 2*a*b*x**2 + b**2*x**2 def test_CollectReciprocals(): assert CollectReciprocals(-1/(1 + 1*x) - 1/(1 - 1*x), x) == -2/(-x**2 + 1) assert CollectReciprocals(1/(1 + 1*x) - 1/(1 - 1*x), x) == -2*x/(-x**2 + 1) def test_ExpandCleanup(): assert ExpandCleanup(a + b, x) == a*(1 + b/a) assert ExpandCleanup(b**2/(a**2*(a + b*x)**2) + 1/(a**2*x**2) + 2*b**2/(a**3*(a + b*x)) - 2*b/(a**3*x), x) == b**2/(a**2*(a + b*x)**2) + 1/(a**2*x**2) + 2*b**2/(a**3*(a + b*x)) - 2*b/(a**3*x) def test_AlgebraicFunctionQ(): assert not AlgebraicFunctionQ(1/(a + c*x**(2*n)), x) assert AlgebraicFunctionQ(a, x) == True assert AlgebraicFunctionQ(a*b, x) == True assert AlgebraicFunctionQ(x**2, x) == True assert AlgebraicFunctionQ(x**2*a, x) == True assert AlgebraicFunctionQ(x**2 + a, x) == True assert AlgebraicFunctionQ(sin(x), x) == False assert AlgebraicFunctionQ([], x) == True assert AlgebraicFunctionQ([a, a*b], x) == True assert AlgebraicFunctionQ([sin(x)], x) == False def test_MonomialQ(): assert not MonomialQ(2*x**7 + 6, x) assert MonomialQ(2*x**7, x) assert not MonomialQ(2*x**7 + 5*x**3, x) assert not MonomialQ([2*x**7 + 6, 2*x**7], x) assert MonomialQ([2*x**7, 5*x**3], x) def test_MonomialSumQ(): assert MonomialSumQ(2*x**7 + 6, x) == True assert MonomialSumQ(x**2 + x**3 + 5*x, x) == True def test_MinimumMonomialExponent(): assert MinimumMonomialExponent(x**2 + 5*x**2 + 3*x**5, x) == 2 assert MinimumMonomialExponent(x**2 + 5*x**2 + 1, x) == 0 def test_MonomialExponent(): assert MonomialExponent(3*x**7, x) == 7 assert not MonomialExponent(3+x**3, x) def test_LinearMatchQ(): assert LinearMatchQ(2 + 3*x, x) assert LinearMatchQ(3*x, x) assert not LinearMatchQ(3*x**2, x) def test_SimplerQ(): a1, b1 = symbols('a1 b1') assert SimplerQ(a1, b1) assert SimplerQ(2*a, a + 2) assert SimplerQ(2, x) assert not SimplerQ(x**2, x) assert SimplerQ(2*x, x + 2 + 6*x**3) def test_GeneralizedTrinomialParts(): assert not GeneralizedTrinomialParts((7 + 2*x**6 + 3*x**12), x) assert GeneralizedTrinomialParts(x**2 + x**3 + x**4, x) == [1, 1, 1, 3, 2] assert not GeneralizedTrinomialParts(2*x + 3*x + 4*x, x) def test_TrinomialQ(): assert TrinomialQ((7 + 2*x**6 + 3*x**12), x) assert not TrinomialQ(x**2, x) def test_GeneralizedTrinomialDegree(): assert not GeneralizedTrinomialDegree((7 + 2*x**6 + 3*x**12), x) assert GeneralizedTrinomialDegree(x**2 + x**3 + x**4, x) == 1 def test_GeneralizedBinomialParts(): assert GeneralizedBinomialParts(3*x*(3 + x**6), x) == [9, 3, 7, 1] assert GeneralizedBinomialParts((3*x + x**7), x) == [3, 1, 7, 1] def test_GeneralizedBinomialDegree(): assert GeneralizedBinomialDegree(3*x*(3 + x**6), x) == 6 assert GeneralizedBinomialDegree((3*x + x**7), x) == 6 def test_PowerOfLinearQ(): assert PowerOfLinearQ((6*x), x) assert not PowerOfLinearQ((3 + 6*x**3), x) assert PowerOfLinearQ((3 + 6*x)**3, x) def test_LinearPairQ(): assert not LinearPairQ(6*x**2 + 4, 3*x**2 + 2, x) assert LinearPairQ(6*x + 4, 3*x + 2, x) assert not LinearPairQ(6*x, 3*x + 2, x) assert LinearPairQ(6*x, 3*x, x) def test_LeadTerm(): assert LeadTerm(a*b*c) == a*b*c assert LeadTerm(a + b + c) == a def test_RemainingTerms(): assert RemainingTerms(a*b*c) == a*b*c assert RemainingTerms(a + b + c) == b + c def test_LeadFactor(): assert LeadFactor(a*b*c) == a assert LeadFactor(a + b + c) == a + b + c assert LeadFactor(b*I) == I assert LeadFactor(c*a**b) == a**b assert LeadFactor(S(2)) == S(2) def test_RemainingFactors(): assert RemainingFactors(a*b*c) == b*c assert RemainingFactors(a + b + c) == 1 assert RemainingFactors(a*I) == a def test_LeadBase(): assert LeadBase(a**b) == a assert LeadBase(a**b*c) == a def test_LeadDegree(): assert LeadDegree(a**b) == b assert LeadDegree(a**b*c) == b def test_Numer(): assert Numer(a/b) == a assert Numer(a**(-2)) == 1 assert Numer(a**(-2)*a/b) == 1 def test_Denom(): assert Denom(a/b) == b assert Denom(a**(-2)) == a**2 assert Denom(a**(-2)*a/b) == a*b def test_Coeff(): assert Coeff(7 + 2*x + 4*x**3, x, 1) == 2 assert Coeff(a + b*x + c*x**3, x, 0) == a assert Coeff(a + b*x + c*x**3, x, 4) == 0 assert Coeff(b*x + c*x**3, x, 3) == c def test_MergeMonomials(): assert MergeMonomials(x**2*(1 + 1*x)**3*(1 + 1*x)**n, x) == x**2*(x + 1)**(n + 3) assert MergeMonomials(x**2*(1 + 1*x)**2*(1*(1 + 1*x)**1)**2, x) == x**2*(x + 1)**4 assert MergeMonomials(b**2/a**3, x) == b**2/a**3 def test_RationalFunctionQ(): assert RationalFunctionQ(a, x) assert RationalFunctionQ(x**2, x) assert RationalFunctionQ(x**3 + x**4, x) assert RationalFunctionQ(x**3*S(2), x) assert not RationalFunctionQ(x**3 + x**(0.5), x) assert not RationalFunctionQ(x**(S(2)/3)*(a + b*x)**2, x) def test_Apart(): assert Apart(1/(x**2*(a + b*x)**2), x) == b**2/(a**2*(a + b*x)**2) + 1/(a**2*x**2) + 2*b**2/(a**3*(a + b*x)) - 2*b/(a**3*x) assert Apart(x**(S(2)/3)*(a + b*x)**2, x) == x**(S(2)/3)*(a + b*x)**2 def test_RationalFunctionFactors(): assert RationalFunctionFactors(a, x) == a assert RationalFunctionFactors(sqrt(x), x) == 1 assert RationalFunctionFactors(x*x**3, x) == x*x**3 assert RationalFunctionFactors(x*sqrt(x), x) == 1 def test_NonrationalFunctionFactors(): assert NonrationalFunctionFactors(x, x) == 1 assert NonrationalFunctionFactors(sqrt(x), x) == sqrt(x) assert NonrationalFunctionFactors(sqrt(x)*rubi_log(x), x) == sqrt(x)*rubi_log(x) def test_Reverse(): assert Reverse([1, 2, 3]) == [3, 2, 1] assert Reverse(a**b) == b**a def test_RationalFunctionExponents(): assert RationalFunctionExponents(sqrt(x), x) == [0, 0] assert RationalFunctionExponents(a, x) == [0, 0] assert RationalFunctionExponents(x, x) == [1, 0] assert RationalFunctionExponents(x**(-1), x)== [0, 1] assert RationalFunctionExponents(x**(-1)*a, x) == [0, 1] assert RationalFunctionExponents(x**(-1) + a, x) == [1, 1] def test_PolynomialGCD(): assert PolynomialGCD(x**2 - 1, x**2 - 3*x + 2) == x - 1 def test_PolyGCD(): assert PolyGCD(x**2 - 1, x**2 - 3*x + 2, x) == x - 1 def test_AlgebraicFunctionFactors(): assert AlgebraicFunctionFactors(sin(x)*x, x) == x assert AlgebraicFunctionFactors(sin(x), x) == 1 assert AlgebraicFunctionFactors(x, x) == x def test_NonalgebraicFunctionFactors(): assert NonalgebraicFunctionFactors(sin(x)*x, x) == sin(x) assert NonalgebraicFunctionFactors(sin(x), x) == sin(x) assert NonalgebraicFunctionFactors(x, x) == 1 def test_QuotientOfLinearsP(): assert QuotientOfLinearsP((a + b*x)/(x), x) assert QuotientOfLinearsP(x*a, x) assert not QuotientOfLinearsP(x**2*a, x) assert not QuotientOfLinearsP(x**2 + a, x) assert QuotientOfLinearsP(x + a, x) assert QuotientOfLinearsP(x, x) assert QuotientOfLinearsP(1 + x, x) def test_QuotientOfLinearsParts(): assert QuotientOfLinearsParts((b*x)/(c), x) == [0, b/c, 1, 0] assert QuotientOfLinearsParts((b*x)/(c + x), x) == [0, b, c, 1] assert QuotientOfLinearsParts((b*x)/(c + d*x), x) == [0, b, c, d] assert QuotientOfLinearsParts((a + b*x)/(c + d*x), x) == [a, b, c, d] assert QuotientOfLinearsParts(x**2 + a, x) == [a + x**2, 0, 1, 0] assert QuotientOfLinearsParts(a/x, x) == [a, 0, 0, 1] assert QuotientOfLinearsParts(1/x, x) == [1, 0, 0, 1] assert QuotientOfLinearsParts(a*x + 1, x) == [1, a, 1, 0] assert QuotientOfLinearsParts(x, x) == [0, 1, 1, 0] assert QuotientOfLinearsParts(a, x) == [a, 0, 1, 0] def test_QuotientOfLinearsQ(): assert not QuotientOfLinearsQ((a + x), x) assert QuotientOfLinearsQ((a + x)/(x), x) assert QuotientOfLinearsQ((a + b*x)/(x), x) def test_Flatten(): assert Flatten([a, b, [c, [d, e]]]) == [a, b, c, d, e] def test_Sort(): assert Sort([b, a, c]) == [a, b, c] assert Sort([b, a, c], True) == [c, b, a] def test_AbsurdNumberQ(): assert AbsurdNumberQ(S(1)) assert not AbsurdNumberQ(a*x) assert not AbsurdNumberQ(a**(S(1)/2)) assert AbsurdNumberQ((S(1)/3)**(S(1)/3)) def test_AbsurdNumberFactors(): assert AbsurdNumberFactors(S(1)) == S(1) assert AbsurdNumberFactors((S(1)/3)**(S(1)/3)) == S(3)**(S(2)/3)/S(3) assert AbsurdNumberFactors(a) == S(1) def test_NonabsurdNumberFactors(): assert NonabsurdNumberFactors(a) == a assert NonabsurdNumberFactors(S(1)) == S(1) assert NonabsurdNumberFactors(a*S(2)) == a def test_NumericFactor(): assert NumericFactor(S(1)) == S(1) assert NumericFactor(1*I) == S(1) assert NumericFactor(S(1) + I) == S(1) assert NumericFactor(a**(S(1)/3)) == S(1) assert NumericFactor(a*S(3)) == S(3) assert NumericFactor(a + b) == S(1) def test_NonnumericFactors(): assert NonnumericFactors(S(3)) == S(1) assert NonnumericFactors(I) == I assert NonnumericFactors(S(3) + I) == S(3) + I assert NonnumericFactors((S(1)/3)**(S(1)/3)) == S(1) assert NonnumericFactors(rubi_log(a)) == rubi_log(a) def test_Prepend(): assert Prepend([1, 2, 3], [4, 5]) == [4, 5, 1, 2, 3] def test_SumSimplerQ(): assert not SumSimplerQ(S(4 + x),S(3 + x**3)) assert SumSimplerQ(S(4 + x), S(3 - x)) def test_SumSimplerAuxQ(): assert SumSimplerAuxQ(S(4 + x), S(3 - x)) assert not SumSimplerAuxQ(S(4), S(3)) def test_SimplerSqrtQ(): assert SimplerSqrtQ(S(2), S(16*x**3)) assert not SimplerSqrtQ(S(x*2), S(16)) assert not SimplerSqrtQ(S(-4), S(16)) assert SimplerSqrtQ(S(4), S(16)) assert not SimplerSqrtQ(S(4), S(0)) def test_TrinomialParts(): assert TrinomialParts((1 + 5*x**3)**2, x) == [1, 10, 25, 3] assert TrinomialParts(1 + 5*x**3 + 2*x**6, x) == [1, 5, 2, 3] assert TrinomialParts(((1 + 5*x**3)**2) + 6, x) == [7, 10, 25, 3] assert not TrinomialParts(1 + 5*x**3 + 2*x**5, x) def test_TrinomialDegree(): assert TrinomialDegree((7 + 2*x**6)**2, x) == 6 assert TrinomialDegree(1 + 5*x**3 + 2*x**6, x) == 3 assert not TrinomialDegree(1 + 5*x**3 + 2*x**5, x) def test_CubicMatchQ(): assert not CubicMatchQ(S(3 + x**6), x) assert CubicMatchQ(S(x**3), x) assert not CubicMatchQ(S(3), x) assert CubicMatchQ(S(3 + x**3), x) assert CubicMatchQ(S(3 + x**3 + 2*x), x) def test_BinomialMatchQ(): assert BinomialMatchQ(x, x) assert BinomialMatchQ(2 + 3*x**5, x) assert BinomialMatchQ(3*x**5, x) assert BinomialMatchQ(3*x, x) assert not BinomialMatchQ(x + x**2 + x**3, x) def test_TrinomialMatchQ(): assert not TrinomialMatchQ((5 + 2*x**6)**2, x) assert not TrinomialMatchQ((7 + 8*x**6), x) assert TrinomialMatchQ((7 + 2*x**6 + 3*x**3), x) assert TrinomialMatchQ(b*x**2 + c*x**4, x) def test_GeneralizedBinomialMatchQ(): assert not GeneralizedBinomialMatchQ((1 + x**4), x) assert GeneralizedBinomialMatchQ((3*x + x**7), x) def test_QuadraticMatchQ(): assert not QuadraticMatchQ((a + b*x)*(c + d*x), x) assert QuadraticMatchQ(x**2 + x, x) assert QuadraticMatchQ(x**2+1+x, x) assert QuadraticMatchQ(x**2, x) def test_PowerOfLinearMatchQ(): assert PowerOfLinearMatchQ(x, x) assert not PowerOfLinearMatchQ(S(6)**3, x) assert not PowerOfLinearMatchQ(S(6 + 3*x**2)**3, x) assert PowerOfLinearMatchQ(S(6 + 3*x)**3, x) def test_GeneralizedTrinomialMatchQ(): assert not GeneralizedTrinomialMatchQ(7 + 2*x**6 + 3*x**12, x) assert not GeneralizedTrinomialMatchQ(7 + 2*x**6 + 3*x**3, x) assert not GeneralizedTrinomialMatchQ(7 + 2*x**6 + 3*x**5, x) assert GeneralizedTrinomialMatchQ(x**2 + x**3 + x**4, x) def test_QuotientOfLinearsMatchQ(): assert QuotientOfLinearsMatchQ((1 + x)*(3 + 4*x**2)/(2 + 4*x), x) assert not QuotientOfLinearsMatchQ(x*(3 + 4*x**2)/(2 + 4*x**3), x) assert QuotientOfLinearsMatchQ(x*(3 + 4*x)/(2 + 4*x), x) assert QuotientOfLinearsMatchQ(2*(3 + 4*x)/(2 + 4*x), x) def test_PolynomialTermQ(): assert not PolynomialTermQ(S(3), x) assert PolynomialTermQ(3*x**6, x) assert not PolynomialTermQ(3*x**6+5*x, x) def test_PolynomialTerms(): assert PolynomialTerms(x + 6*x**3 + rubi_log(x), x) == 6*x**3 + x assert PolynomialTerms(x + 6*x**3 + 6*x, x) == 6*x**3 + 7*x assert PolynomialTerms(x + 6*x**3 + 6, x) == 6*x**3 + x def test_NonpolynomialTerms(): assert NonpolynomialTerms(x + 6*x**3 + rubi_log(x), x) == rubi_log(x) assert NonpolynomialTerms(x + 6*x**3 + 6*x, x) == 0 assert NonpolynomialTerms(x + 6*x**3 + 6, x) == 6 def test_PseudoBinomialQ(): assert PseudoBinomialQ(3 + 5*(x)**6, x) assert PseudoBinomialQ(3 + 5*(2 + 5*x)**6, x) def test_PseudoBinomialParts(): assert PseudoBinomialParts(3 + 7*(1 + x)**6, x) == [3, 1, 7**(S(1)/S(6)), 7**(S(1)/S(6)), 6] assert PseudoBinomialParts(3 + 7*(1 + x)**3, x) == [3, 1, 7**(S(1)/S(3)), 7**(S(1)/S(3)), 3] assert not PseudoBinomialParts(3 + 7*(1 + x)**2, x) assert PseudoBinomialParts(3 + 7*(x)**5, x) == [3, 1, 0, 7**(S(1)/S(5)), 5] def test_PseudoBinomialPairQ(): assert not PseudoBinomialPairQ(3 + 5*(x)**6,3 + (x)**6, x) assert not PseudoBinomialPairQ(3 + 5*(1 + x)**6,3 + (1 + x)**6, x) def test_NormalizePseudoBinomial(): assert NormalizePseudoBinomial(3 + 5*(1 + x)**6, x) == 3+(5**(S(1)/S(6))+5**(S(1)/S(6))*x)**S(6) assert NormalizePseudoBinomial(3 + 5*(x)**6, x) == 3+5*x**6 def test_CancelCommonFactors(): assert CancelCommonFactors(S(x*y*S(6))**S(6), S(x*y*S(6))) == [46656*x**6*y**6, 6*x*y] assert CancelCommonFactors(S(y*6)**S(6), S(x*y*S(6))) == [46656*y**6, 6*x*y] assert CancelCommonFactors(S(6), S(3)) == [6, 3] def test_SimplerIntegrandQ(): assert SimplerIntegrandQ(S(5), 4*x, x) assert not SimplerIntegrandQ(S(x + 5*x**3), S(x**2 + 3*x), x) assert SimplerIntegrandQ(S(x + 8), S(x**2 + 3*x), x) def test_Drop(): assert Drop([1, 2, 3, 4, 5, 6], [2, 4]) == [1, 5, 6] assert Drop([1, 2, 3, 4, 5, 6], -3) == [1, 2, 3] assert Drop([1, 2, 3, 4, 5, 6], 2) == [3, 4, 5, 6] assert Drop(a*b*c, 1) == b*c def test_SubstForInverseFunction(): assert SubstForInverseFunction(x, a, b, x) == b assert SubstForInverseFunction(a, a, b, x) == a assert SubstForInverseFunction(x**a, x**a, b, x) == x assert SubstForInverseFunction(a*x**a, a, b, x) == a*b**a def test_SubstForFractionalPower(): assert SubstForFractionalPower(a, b, n, c, x) == a assert SubstForFractionalPower(x, b, n, c, x) == c assert SubstForFractionalPower(a**(S(1)/2), a, n, b, x) == x**(n/2) def test_CombineExponents(): assert True def test_FractionalPowerOfSquareQ(): assert not FractionalPowerOfSquareQ(x) assert not FractionalPowerOfSquareQ((a + b)**(S(2)/S(3))) assert not FractionalPowerOfSquareQ((a + b)**(S(2)/S(3))*c) assert FractionalPowerOfSquareQ(((a + b*x)**(S(2)))**(S(1)/3)) == (a + b*x)**S(2) def test_FractionalPowerSubexpressionQ(): assert not FractionalPowerSubexpressionQ(x, a, x) assert FractionalPowerSubexpressionQ(x**(S(2)/S(3)), a, x) assert not FractionalPowerSubexpressionQ(b*a, a, x) def test_FactorNumericGcd(): assert FactorNumericGcd(5*a**2*e**4 + 2*a*b*d*e**3 + 2*a*c*d**2*e**2 + b**2*d**2*e**2 - 6*b*c*d**3*e + 21*c**2*d**4) ==\ 5*a**2*e**4 + 2*a*b*d*e**3 + 2*a*c*d**2*e**2 + b**2*d**2*e**2 - 6*b*c*d**3*e + 21*c**2*d**4 assert FactorNumericGcd(x**(S(2))) == x**S(2) assert FactorNumericGcd(rubi_log(x)) == rubi_log(x) assert FactorNumericGcd(rubi_log(x)*x) == x*rubi_log(x) assert FactorNumericGcd(rubi_log(x) + x**S(2)) == rubi_log(x) + x**S(2) def test_Apply(): assert Apply(List, [a, b, c]) == [a, b, c] def test_TrigSimplify(): assert TrigSimplify(a*sin(x)**2 + a*cos(x)**2 + v) == a + v assert TrigSimplify(a*sec(x)**2 - a*tan(x)**2 + v) == a + v assert TrigSimplify(a*csc(x)**2 - a*cot(x)**2 + v) == a + v assert TrigSimplify(S(1) - sin(x)**2) == cos(x)**2 assert TrigSimplify(1 + tan(x)**2) == sec(x)**2 assert TrigSimplify(1 + cot(x)**2) == csc(x)**2 assert TrigSimplify(-S(1) + sec(x)**2) == tan(x)**2 assert TrigSimplify(-1 + csc(x)**2) == cot(x)**2 def test_MergeFactors(): assert simplify(MergeFactors(b/(a - c)**3 , 8*c**3*(b*x + c)**(3/2)/(3*b**4) - 24*c**2*(b*x + c)**(5/2)/(5*b**4) + \ 24*c*(b*x + c)**(7/2)/(7*b**4) - 8*(b*x + c)**(9/2)/(9*b**4)) - (8*c**3*(b*x + c)**1.5/(3*b**3) - 24*c**2*(b*x + c)**2.5/(5*b**3) + \ 24*c*(b*x + c)**3.5/(7*b**3) - 8*(b*x + c)**4.5/(9*b**3))/(a - c)**3) == 0 assert MergeFactors(x, x) == x**2 assert MergeFactors(x*y, x) == x**2*y def test_FactorInteger(): assert FactorInteger(2434500) == [(2, 2), (3, 2), (5, 3), (541, 1)] def test_ContentFactor(): assert ContentFactor(a*b + a*c) == a*(b + c) def test_Order(): assert Order(a, b) == 1 assert Order(b, a) == -1 assert Order(a, a) == 0 def test_FactorOrder(): assert FactorOrder(1, 1) == 0 assert FactorOrder(1, 2) == -1 assert FactorOrder(2, 1) == 1 assert FactorOrder(a, b) == 1 def test_Smallest(): assert Smallest([2, 1, 3, 4]) == 1 assert Smallest(1, 2) == 1 assert Smallest(-1, -2) == -2 def test_MostMainFactorPosition(): assert MostMainFactorPosition([S(1), S(2), S(3)]) == 1 assert MostMainFactorPosition([S(1), S(7), S(3), S(4), S(5)]) == 2 def test_OrderedQ(): assert OrderedQ([a, b]) assert not OrderedQ([b, a]) def test_MinimumDegree(): assert MinimumDegree(S(1), S(2)) == 1 assert MinimumDegree(S(1), sqrt(2)) == 1 assert MinimumDegree(sqrt(2), S(1)) == 1 assert MinimumDegree(sqrt(3), sqrt(2)) == sqrt(2) assert MinimumDegree(sqrt(2), sqrt(2)) == sqrt(2) def test_PositiveFactors(): assert PositiveFactors(S(0)) == 1 assert PositiveFactors(-S(1)) == S(1) assert PositiveFactors(sqrt(2)) == sqrt(2) assert PositiveFactors(-rubi_log(2)) == rubi_log(2) assert PositiveFactors(sqrt(2)*S(-1)) == sqrt(2) def test_NonpositiveFactors(): assert NonpositiveFactors(S(0)) == 0 assert NonpositiveFactors(-S(1)) == -1 assert NonpositiveFactors(sqrt(2)) == 1 assert NonpositiveFactors(-rubi_log(2)) == -1 def test_Sign(): assert Sign(S(0)) == 0 assert Sign(S(1)) == 1 assert Sign(-S(1)) == -1 def test_PolynomialInQ(): v = rubi_log(x) assert PolynomialInQ(S(1), v, x) assert PolynomialInQ(v, v, x) assert PolynomialInQ(1 + v**2, v, x) assert PolynomialInQ(1 + a*v**2, v, x) assert not PolynomialInQ(sqrt(v), v, x) def test_ExponentIn(): v = rubi_log(x) assert ExponentIn(S(1), rubi_log(x), x) == 0 assert ExponentIn(S(1) + v, rubi_log(x), x) == 1 assert ExponentIn(S(1) + v + v**3, rubi_log(x), x) == 3 assert ExponentIn(S(2)*sqrt(v)*v**3, rubi_log(x), x) == 3.5 def test_PolynomialInSubst(): v = rubi_log(x) assert PolynomialInSubst(S(1) + rubi_log(x)**3, rubi_log(x), x) == 1 + x**3 assert PolynomialInSubst(S(1) + rubi_log(x), rubi_log(x), x) == x + 1 def test_Distrib(): assert Distrib(x, a) == x*a assert Distrib(x, a + b) == a*x + b*x def test_DistributeDegree(): assert DistributeDegree(x, m) == x**m assert DistributeDegree(x**a, m) == x**(a*m) assert DistributeDegree(a*b, m) == a**m * b**m def test_FunctionOfPower(): assert FunctionOfPower(a, x) == None assert FunctionOfPower(x, x) == 1 assert FunctionOfPower(x**3, x) == 3 assert FunctionOfPower(x**3*cos(x**6), x) == 3 def test_DivideDegreesOfFactors(): assert DivideDegreesOfFactors(a**b, S(3)) == a**(b/3) assert DivideDegreesOfFactors(a**b*c, S(3)) == a**(b/3)*c**(c/3) def test_MonomialFactor(): assert MonomialFactor(a, x) == [0, a] assert MonomialFactor(x, x) == [1, 1] assert MonomialFactor(x + y, x) == [0, x + y] assert MonomialFactor(rubi_log(x), x) == [0, rubi_log(x)] assert MonomialFactor(rubi_log(x)*x, x) == [1, rubi_log(x)] def test_NormalizeIntegrand(): assert NormalizeIntegrand((x**2 + 8), x) == x**2 + 8 assert NormalizeIntegrand((x**2 + 3*x)**2, x) == x**2*(x + 3)**2 assert NormalizeIntegrand(a**2*(a + b*x)**2, x) == a**2*(a + b*x)**2 assert NormalizeIntegrand(b**2/(a**2*(a + b*x)**2), x) == b**2/(a**2*(a + b*x)**2) def test_NormalizeIntegrandAux(): v = (6*A*a*c - 2*A*b**2 + B*a*b)/(a*x**2) - (6*A*a**2*c**2 - 10*A*a*b**2*c - 8*A*a*b*c**2*x + 2*A*b**4 + 2*A*b**3*c*x + 5*B*a**2*b*c + 4*B*a**2*c**2*x - B*a*b**3 - B*a*b**2*c*x)/(a**2*(a + b*x + c*x**2)) + (-2*A*b + B*a)*(4*a*c - b**2)/(a**2*x) assert NormalizeIntegrandAux(v, x) == (6*A*a*c - 2*A*b**2 + B*a*b)/(a*x**2) - (6*A*a**2*c**2 - 10*A*a*b**2*c + 2*A*b**4 + 5*B*a**2*b*c - B*a*b**3 + x*(-8*A*a*b*c**2 + 2*A*b**3*c + 4*B*a**2*c**2 - B*a*b**2*c))/(a**2*(a + b*x + c*x**2)) + (-2*A*b + B*a)*(4*a*c - b**2)/(a**2*x) assert NormalizeIntegrandAux((x**2 + 3*x)**2, x) == x**2*(x + 3)**2 assert NormalizeIntegrandAux((x**2 + 8), x) == x**2 + 8 def test_NormalizeIntegrandFactor(): assert NormalizeIntegrandFactor((3*x + x**3)**2, x) == x**2*(x**2 + 3)**2 assert NormalizeIntegrandFactor((x**2 + 8), x) == x**2 + 8 def test_NormalizeIntegrandFactorBase(): assert NormalizeIntegrandFactorBase((x**2 + 8)**3, x) == (x**2 + 8)**3 assert NormalizeIntegrandFactorBase((x**2 + 8), x) == x**2 + 8 assert NormalizeIntegrandFactorBase(a**2*(a + b*x)**2, x) == a**2*(a + b*x)**2 def test_AbsorbMinusSign(): assert AbsorbMinusSign((x + 2)**5*(x + 3)**5) == (-x - 3)**5*(x + 2)**5 assert AbsorbMinusSign((x + 2)**5*(x + 3)**2) == -(x + 2)**5*(x + 3)**2 def test_NormalizeLeadTermSigns(): assert NormalizeLeadTermSigns((-x + 3)*(x**2 + 3)) == (-x + 3)*(x**2 + 3) assert NormalizeLeadTermSigns(x + 3) == x + 3 def test_SignOfFactor(): assert SignOfFactor(S(-x + 3)) == [1, -x + 3] assert SignOfFactor(S(-x)) == [-1, x] def test_NormalizePowerOfLinear(): assert NormalizePowerOfLinear((x + 3)**5, x) == (x + 3)**5 assert NormalizePowerOfLinear(((x + 3)**2) + 3, x) == x**2 + 6*x + 12 def test_SimplifyIntegrand(): assert SimplifyIntegrand((x**2 + 3)**2, x) == (x**2 + 3)**2 assert SimplifyIntegrand(x**2 + 3 + (x**6) + 6, x) == x**6 + x**2 + 9 def test_SimplifyTerm(): assert SimplifyTerm(a**2/b**2, x) == a**2/b**2 assert SimplifyTerm(-6*x/5 + (5*x + 3)**2/25 - 9/25, x) == x**2 def test_togetherSimplify(): assert TogetherSimplify(-6*x/5 + (5*x + 3)**2/25 - 9/25) == x**2 def test_ExpandToSum(): qq = 6 Pqq = e**3 Pq = (d+e*x**2)**3 aa = 2 nn = 2 cc = 1 pp = -1/2 bb = 3 assert nsimplify(ExpandToSum(Pq - Pqq*x**qq - Pqq*(aa*x**(-2*nn + qq)*(-2*nn + qq + 1) + bb*x**(-nn + qq)*(nn*(pp - 1) + qq + 1))/(cc*(2*nn*pp + qq + 1)), x) - \ (d**3 + x**4*(3*d*e**2 - 2.4*e**3) + x**2*(3*d**2*e - 1.2*e**3))) == 0 assert ExpandToSum(x**2 + 3*x + 3, x**3 + 3, x) == x**3*(x**2 + 3*x + 3) + 3*x**2 + 9*x + 9 assert ExpandToSum(x**3 + 6, x) == x**3 + 6 assert ExpandToSum(S(x**2 + 3*x + 3)*3, x) == 3*x**2 + 9*x + 9 assert ExpandToSum((a + b*x), x) == a + b*x def test_UnifySum(): assert UnifySum((3 + x + 6*x**3 + sin(x)), x) == 6*x**3 + x + sin(x) + 3 assert UnifySum((3 + x + 6*x**3)*3, x) == 18*x**3 + 3*x + 9 def test_FunctionOfInverseLinear(): assert FunctionOfInverseLinear((x)/(a + b*x), x) == [a, b] assert FunctionOfInverseLinear((c + d*x)/(a + b*x), x) == [a, b] assert not FunctionOfInverseLinear(1/(a + b*x), x) def test_PureFunctionOfSinhQ(): v = rubi_log(x) f = sinh(v) assert PureFunctionOfSinhQ(f, v, x) assert not PureFunctionOfSinhQ(cosh(v), v, x) assert PureFunctionOfSinhQ(f**2, v, x) def test_PureFunctionOfTanhQ(): v = rubi_log(x) f = tanh(v) assert PureFunctionOfTanhQ(f, v, x) assert not PureFunctionOfTanhQ(cosh(v), v, x) assert PureFunctionOfTanhQ(f**2, v, x) def test_PureFunctionOfCoshQ(): v = rubi_log(x) f = cosh(v) assert PureFunctionOfCoshQ(f, v, x) assert not PureFunctionOfCoshQ(sinh(v), v, x) assert PureFunctionOfCoshQ(f**2, v, x) def test_IntegerQuotientQ(): u = S(2)*sin(x) v = sin(x) assert IntegerQuotientQ(u, v) assert IntegerQuotientQ(u, u) assert not IntegerQuotientQ(S(1), S(2)) def test_OddQuotientQ(): u = S(3)*sin(x) v = sin(x) assert OddQuotientQ(u, v) assert OddQuotientQ(u, u) assert not OddQuotientQ(S(1), S(2)) def test_EvenQuotientQ(): u = S(2)*sin(x) v = sin(x) assert EvenQuotientQ(u, v) assert not EvenQuotientQ(u, u) assert not EvenQuotientQ(S(1), S(2)) def test_FunctionOfSinhQ(): v = rubi_log(x) assert FunctionOfSinhQ(cos(sinh(v)), v, x) assert FunctionOfSinhQ(sinh(v), v, x) assert FunctionOfSinhQ(sinh(v)*cos(sinh(v)), v, x) def test_FunctionOfCoshQ(): v = rubi_log(x) assert FunctionOfCoshQ(cos(cosh(v)), v, x) assert FunctionOfCoshQ(cosh(v), v, x) assert FunctionOfCoshQ(cosh(v)*cos(cosh(v)), v, x) def test_FunctionOfTanhQ(): v = rubi_log(x) t = Tanh(v) c = Coth(v) assert FunctionOfTanhQ(t, v, x) assert FunctionOfTanhQ(c, v, x) assert FunctionOfTanhQ(t + c, v, x) assert FunctionOfTanhQ(t*c, v, x) assert not FunctionOfTanhQ(sin(x), v, x) def test_FunctionOfTanhWeight(): v = rubi_log(x) t = Tanh(v) c = Coth(v) assert FunctionOfTanhWeight(x, v, x) == 0 assert FunctionOfTanhWeight(sinh(v), v, x) == 0 assert FunctionOfTanhWeight(tanh(v), v, x) == 1 assert FunctionOfTanhWeight(coth(v), v, x) == -1 assert FunctionOfTanhWeight(t**2, v, x) == 1 assert FunctionOfTanhWeight(sinh(v)**2, v, x) == -1 assert FunctionOfTanhWeight(coth(v)*sinh(v)**2, v, x) == -2 def test_FunctionOfHyperbolicQ(): v = rubi_log(x) s = Sinh(v) t = Tanh(v) assert not FunctionOfHyperbolicQ(x, v, x) assert FunctionOfHyperbolicQ(s + t, v, x) assert FunctionOfHyperbolicQ(sinh(t), v, x) def test_SmartNumerator(): assert SmartNumerator(x**(-2)) == 1 assert SmartNumerator(x**(2)*a) == x**2*a def test_SmartDenominator(): assert SmartDenominator(x**(-2)) == x**2 assert SmartDenominator(x**(-2)*1/S(3)) == x**2*3 def test_SubstForAux(): v = rubi_log(x) assert SubstForAux(v, v, x) == x assert SubstForAux(v**2, v, x) == x**2 assert SubstForAux(x, v, x) == x assert SubstForAux(v**2, v**4, x) == sqrt(x) assert SubstForAux(v**2*v, v, x) == x**3 def test_SubstForTrig(): v = rubi_log(x) s, c, t = sin(v), cos(v), tan(v) assert SubstForTrig(cos(a/2 + b*x/2), x/sqrt(x**2 + 1), 1/sqrt(x**2 + 1), a/2 + b*x/2, x) == 1/sqrt(x**2 + 1) assert SubstForTrig(s, sin, cos, v, x) == sin assert SubstForTrig(t, sin(v), cos(v), v, x) == sin(rubi_log(x))/cos(rubi_log(x)) assert SubstForTrig(sin(2*v), sin(x), cos(x), v, x) == 2*sin(x)*cos(x) assert SubstForTrig(s*t, sin(x), cos(x), v, x) == sin(x)**2/cos(x) def test_SubstForHyperbolic(): v = rubi_log(x) s, c, t = sinh(v), cosh(v), tanh(v) assert SubstForHyperbolic(s, sinh(x), cosh(x), v, x) == sinh(x) assert SubstForHyperbolic(t, sinh(x), cosh(x), v, x) == sinh(x)/cosh(x) assert SubstForHyperbolic(sinh(2*v), sinh(x), cosh(x), v, x) == 2*sinh(x)*cosh(x) assert SubstForHyperbolic(s*t, sinh(x), cosh(x), v, x) == sinh(x)**2/cosh(x) def test_SubstForFractionalPowerOfLinear(): u = a + b*x assert not SubstForFractionalPowerOfLinear(u, x) assert not SubstForFractionalPowerOfLinear(u**(S(2)), x) assert SubstForFractionalPowerOfLinear(u**(S(1)/2), x) == [x**2, 2, a + b*x, 1/b] def test_InverseFunctionOfLinear(): u = a + b*x assert InverseFunctionOfLinear(rubi_log(u)*sin(x), x) == rubi_log(u) assert InverseFunctionOfLinear(rubi_log(u), x) == rubi_log(u) def test_InertTrigQ(): s = sin(x) c = cos(x) assert not InertTrigQ(sin(x), csc(x), cos(h)) assert InertTrigQ(sin(x), csc(x)) assert not InertTrigQ(s, c) assert InertTrigQ(c) def test_PowerOfInertTrigSumQ(): func = sin assert PowerOfInertTrigSumQ((1 + S(2)*(S(3)*func(x**2))**S(5))**3, func, x) assert PowerOfInertTrigSumQ((1 + 2*(S(3)*func(x**2))**3 + 4*(S(5)*func(x**2))**S(3))**2, func, x) def test_PiecewiseLinearQ(): assert PiecewiseLinearQ(a + b*x, x) assert not PiecewiseLinearQ(Log(c*sin(a)**S(3)), x) assert not PiecewiseLinearQ(x**3, x) assert PiecewiseLinearQ(atanh(tanh(a + b*x)), x) assert PiecewiseLinearQ(tanh(atanh(a + b*x)), x) assert not PiecewiseLinearQ(coth(atanh(a + b*x)), x) def test_KnownTrigIntegrandQ(): func = sin(a + b*x) assert KnownTrigIntegrandQ([sin], S(1), x) assert KnownTrigIntegrandQ([sin], (a + b*func)**m, x) assert KnownTrigIntegrandQ([sin], (a + b*func)**m*(1 + 2*func), x) assert KnownTrigIntegrandQ([sin], a + c*func**2, x) assert KnownTrigIntegrandQ([sin], a + b*func + c*func**2, x) assert KnownTrigIntegrandQ([sin], (a + b*func)**m*(c + d*func**2), x) assert KnownTrigIntegrandQ([sin], (a + b*func)**m*(c + d*func + e*func**2), x) assert not KnownTrigIntegrandQ([cos], (a + b*func)**m, x) def test_KnownSineIntegrandQ(): assert KnownSineIntegrandQ((a + b*sin(a + b*x))**m, x) def test_KnownTangentIntegrandQ(): assert KnownTangentIntegrandQ((a + b*tan(a + b*x))**m, x) def test_KnownCotangentIntegrandQ(): assert KnownCotangentIntegrandQ((a + b*cot(a + b*x))**m, x) def test_KnownSecantIntegrandQ(): assert KnownSecantIntegrandQ((a + b*sec(a + b*x))**m, x) def test_TryPureTanSubst(): assert TryPureTanSubst(atan(c*(a + b*tan(a + b*x))), x) assert TryPureTanSubst(atanh(c*(a + b*cot(a + b*x))), x) assert not TryPureTanSubst(tan(c*(a + b*cot(a + b*x))), x) def test_TryPureTanhSubst(): assert not TryPureTanhSubst(rubi_log(x), x) assert TryPureTanhSubst(sin(x), x) assert not TryPureTanhSubst(atanh(a*tanh(x)), x) assert not TryPureTanhSubst((a + b*x)**S(2), x) def test_TryTanhSubst(): assert not TryTanhSubst(rubi_log(x), x) assert not TryTanhSubst(a*(b + c)**3, x) assert not TryTanhSubst(1/(a + b*sinh(x)**S(3)), x) assert not TryTanhSubst(sinh(S(3)*x)*cosh(S(4)*x), x) assert not TryTanhSubst(a*(b*sech(x)**3)**c, x) def test_GeneralizedBinomialQ(): assert GeneralizedBinomialQ(a*x**q + b*x**n, x) assert not GeneralizedBinomialQ(a*x**q, x) def test_GeneralizedTrinomialQ(): assert not GeneralizedTrinomialQ(7 + 2*x**6 + 3*x**12, x) assert not GeneralizedTrinomialQ(a*x**q + c*x**(2*n-q), x) def test_SubstForFractionalPowerOfQuotientOfLinears(): assert SubstForFractionalPowerOfQuotientOfLinears(((a + b*x)/(c + d*x))**(S(3)/2), x) == [x**4/(b - d*x**2)**2, 2, (a + b*x)/(c + d*x), -a*d + b*c] def test_SubstForFractionalPowerQ(): assert SubstForFractionalPowerQ(x, sin(x), x) assert SubstForFractionalPowerQ(x**2, sin(x), x) assert not SubstForFractionalPowerQ(x**(S(3)/2), sin(x), x) assert SubstForFractionalPowerQ(sin(x)**(S(3)/2), sin(x), x) def test_AbsurdNumberGCD(): assert AbsurdNumberGCD(S(4)) == 4 assert AbsurdNumberGCD(S(4), S(8), S(12)) == 4 assert AbsurdNumberGCD(S(2), S(3), S(12)) == 1 def test_TrigReduce(): assert TrigReduce(cos(x)**2) == cos(2*x)/2 + 1/2 assert TrigReduce(cos(x)**2*sin(x)) == sin(x)/4 + sin(3*x)/4 assert TrigReduce(cos(x)**2+sin(x)) == sin(x) + cos(2*x)/2 + 1/2 assert TrigReduce(cos(x)**2*sin(x)**5) == 5*sin(x)/64 + sin(3*x)/64 - 3*sin(5*x)/64 + sin(7*x)/64 assert TrigReduce(2*sin(x)*cos(x) + 2*cos(x)**2) == sin(2*x) + cos(2*x) + 1 assert TrigReduce(sinh(a + b*x)**2) == cosh(2*a + 2*b*x)/2 - 1/2 assert TrigReduce(sinh(a + b*x)*cosh(a + b*x)) == sinh(2*a + 2*b*x)/2 def test_FunctionOfDensePolynomialsQ(): assert FunctionOfDensePolynomialsQ(x**2 + 3, x) assert not FunctionOfDensePolynomialsQ(x**2, x) assert not FunctionOfDensePolynomialsQ(x, x) assert FunctionOfDensePolynomialsQ(S(2), x) def test_PureFunctionOfSinQ(): v = rubi_log(x) f = sin(v) assert PureFunctionOfSinQ(f, v, x) assert not PureFunctionOfSinQ(cos(v), v, x) assert PureFunctionOfSinQ(f**2, v, x) def test_PureFunctionOfTanQ(): v = rubi_log(x) f = tan(v) assert PureFunctionOfTanQ(f, v, x) assert not PureFunctionOfTanQ(cos(v), v, x) assert PureFunctionOfTanQ(f**2, v, x) def test_PowerVariableSubst(): assert PowerVariableSubst((2*x)**3, 2, x) == 8*x**(3/2) assert PowerVariableSubst((2*x)**3, 2, x) == 8*x**(3/2) assert PowerVariableSubst((2*x), 2, x) == 2*x assert PowerVariableSubst((2*x)**3, 2, x) == 8*x**(3/2) assert PowerVariableSubst((2*x)**7, 2, x) == 128*x**(7/2) assert PowerVariableSubst((6+2*x)**7, 2, x) == (2*x + 6)**7 assert PowerVariableSubst((2*x)**7+3, 2, x) == 128*x**(7/2) + 3 def test_PowerVariableDegree(): assert PowerVariableDegree(S(2), 0, 2*x, x) == [0, 2*x] assert PowerVariableDegree((2*x)**2, 0, 2*x, x) == [2, 1] assert PowerVariableDegree(x**2, 0, 2*x, x) == [2, 1] assert PowerVariableDegree(S(4), 0, 2*x, x) == [0, 2*x] def test_PowerVariableExpn(): assert not PowerVariableExpn((x)**3, 2, x) assert not PowerVariableExpn((2*x)**3, 2, x) assert PowerVariableExpn((2*x)**2, 4, x) == [4*x**3, 2, 1] def test_FunctionOfQ(): assert FunctionOfQ(x**2, sqrt(-exp(2*x**2) + 1)*exp(x**2),x) assert not FunctionOfQ(S(x**3), x*2, x) assert FunctionOfQ(S(a), x*2, x) assert FunctionOfQ(S(3*x), x*2, x) def test_ExpandTrigExpand(): assert ExpandTrigExpand(1, cos(x), x**2, 2, 2, x) == 4*cos(x**2)**4 - 4*cos(x**2)**2 + 1 assert ExpandTrigExpand(1, cos(x) + sin(x), x**2, 2, 2, x) == 4*sin(x**2)**2*cos(x**2)**2 + 8*sin(x**2)*cos(x**2)**3 - 4*sin(x**2)*cos(x**2) + 4*cos(x**2)**4 - 4*cos(x**2)**2 + 1 def test_TrigToExp(): from sympy.integrals.rubi.utility_function import rubi_exp as exp assert TrigToExp(sin(x)) == -I*(exp(I*x) - exp(-I*x))/2 assert TrigToExp(cos(x)) == exp(I*x)/2 + exp(-I*x)/2 assert TrigToExp(cos(x)*tan(x**2)) == I*(exp(I*x)/2 + exp(-I*x)/2)*(-exp(I*x**2) + exp(-I*x**2))/(exp(I*x**2) + exp(-I*x**2)) assert TrigToExp(cos(x) + sin(x)**2) == -(exp(I*x) - exp(-I*x))**2/4 + exp(I*x)/2 + exp(-I*x)/2 assert Simplify(TrigToExp(cos(x)*tan(x**S(2))*sin(x)**S(2))-(-I*(exp(I*x)/S(2) + exp(-I*x)/S(2))*(exp(I*x) - exp(-I*x))**S(2)*(-exp(I*x**S(2)) + exp(-I*x**S(2)))/(S(4)*(exp(I*x**S(2)) + exp(-I*x**S(2)))))) == 0 def test_ExpandTrigReduce(): assert ExpandTrigReduce(2*cos(3 + x)**3, x) == 3*cos(x + 3)/2 + cos(3*x + 9)/2 assert ExpandTrigReduce(2*sin(x)**3+cos(2 + x), x) == 3*sin(x)/2 - sin(3*x)/2 + cos(x + 2) assert ExpandTrigReduce(cos(x + 3)**2, x) == cos(2*x + 6)/2 + 1/2 def test_NormalizeTrig(): assert NormalizeTrig(S(2*sin(2 + x)), x) == 2*sin(x + 2) assert NormalizeTrig(S(2*sin(2 + x)**3), x) == 2*sin(x + 2)**3 assert NormalizeTrig(S(2*sin((2 + x)**2)**3), x) == 2*sin(x**2 + 4*x + 4)**3 def test_FunctionOfTrigQ(): v = rubi_log(x) s = sin(v) t = tan(v) assert not FunctionOfTrigQ(x, v, x) assert FunctionOfTrigQ(s + t, v, x) assert FunctionOfTrigQ(sin(t), v, x) def test_RationalFunctionExpand(): assert RationalFunctionExpand(x**S(5)*(e + f*x)**n/(a + b*x**S(3)), x) == -a*x**2*(e + f*x)**n/(b*(a + b*x**3)) +\ e**2*(e + f*x)**n/(b*f**2) - 2*e*(e + f*x)**(n + 1)/(b*f**2) + (e + f*x)**(n + 2)/(b*f**2) assert RationalFunctionExpand(x**S(3)*(S(2)*x + 2)**S(2)/(2*x**2 + 1), x) == 2*x**3 + 4*x**2 + x + (- x + 2)/(2*x**2 + 1) - 2 assert RationalFunctionExpand((a + b*x + c*x**4)*rubi_log(x)**3, x) == a*rubi_log(x)**3 + b*x*rubi_log(x)**3 + c*x**4*rubi_log(x)**3 assert RationalFunctionExpand(a + b*x + c*x**4, x) == a + b*x + c*x**4 def test_SameQ(): assert SameQ(1, 1, 1) assert not SameQ(1, 1, 2) def test_Map2(): assert Map2(Add, [a, b, c], [x, y, z]) == [a + x, b + y, c + z] def test_ConstantFactor(): assert ConstantFactor(a + a*x**3, x) == [a, x**3 + 1] assert ConstantFactor(a, x) == [a, 1] assert ConstantFactor(x, x) == [1, x] assert ConstantFactor(x**S(3), x) == [1, x**3] assert ConstantFactor(x**(S(3)/2), x) == [1, x**(3/2)] assert ConstantFactor(a*x**3, x) == [a, x**3] assert ConstantFactor(a + x**3, x) == [1, a + x**3] def test_CommonFactors(): assert CommonFactors([a, a, a]) == [a, 1, 1, 1] assert CommonFactors([x*S(2), x**S(3)*S(2), sin(x)*x*S(2)]) == [2, x, x**3, x*sin(x)] assert CommonFactors([x, x**S(3), sin(x)*x]) == [1, x, x**3, x*sin(x)] assert CommonFactors([S(2), S(4), S(6)]) == [2, 1, 2, 3] def test_FunctionOfLinear(): f = sin(a + b*x) assert FunctionOfLinear(f, x) == [sin(x), a, b] assert FunctionOfLinear(a + b*x, x) == [x, a, b] assert not FunctionOfLinear(a, x) def test_FunctionOfExponentialQ(): assert FunctionOfExponentialQ(exp(x + exp(x) + exp(exp(x))), x) assert FunctionOfExponentialQ(a**(a + b*x), x) assert FunctionOfExponentialQ(a**(b*x), x) assert not FunctionOfExponentialQ(a**sin(a + b*x), x) def test_FunctionOfExponential(): assert FunctionOfExponential(a**(a + b*x), x) def test_FunctionOfExponentialFunction(): assert FunctionOfExponentialFunction(a**(a + b*x), x) == x assert FunctionOfExponentialFunction(S(2)*a**(a + b*x), x) == 2*x def test_FunctionOfTrig(): assert FunctionOfTrig(sin(x + 1), x + 1, x) == x + 1 assert FunctionOfTrig(sin(x), x) == x assert not FunctionOfTrig(cos(x**2 + 1), x) assert FunctionOfTrig(sin(a+b*x)**3, x) == a+b*x def test_AlgebraicTrigFunctionQ(): assert AlgebraicTrigFunctionQ(sin(x + 3), x) assert AlgebraicTrigFunctionQ(x, x) assert AlgebraicTrigFunctionQ(x + 1, x) assert AlgebraicTrigFunctionQ(sinh(x + 1), x) assert AlgebraicTrigFunctionQ(sinh(x + 1)**2, x) assert not AlgebraicTrigFunctionQ(sinh(x**2 + 1)**2, x) def test_FunctionOfHyperbolic(): assert FunctionOfTrig(sin(x + 1), x + 1, x) == x + 1 assert FunctionOfTrig(sin(x), x) == x assert not FunctionOfTrig(cos(x**2 + 1), x) def test_FunctionOfExpnQ(): assert FunctionOfExpnQ(x, x, x) == 1 assert FunctionOfExpnQ(x**2, x, x) == 2 assert FunctionOfExpnQ(x**2.1, x, x) == 1 assert not FunctionOfExpnQ(x, x**2, x) assert not FunctionOfExpnQ(x + 1, (x + 5)**2, x) assert not FunctionOfExpnQ(x + 1, (x + 1)**2, x) def test_PureFunctionOfCosQ(): v = rubi_log(x) f = cos(v) assert PureFunctionOfCosQ(f, v, x) assert not PureFunctionOfCosQ(sin(v), v, x) assert PureFunctionOfCosQ(f**2, v, x) def test_PureFunctionOfCotQ(): v = rubi_log(x) f = cot(v) assert PureFunctionOfCotQ(f, v, x) assert not PureFunctionOfCotQ(sin(v), v, x) assert PureFunctionOfCotQ(f**2, v, x) def test_FunctionOfSinQ(): v = rubi_log(x) assert FunctionOfSinQ(cos(sin(v)), v, x) assert FunctionOfSinQ(sin(v), v, x) assert FunctionOfSinQ(sin(v)*cos(sin(v)), v, x) def test_FunctionOfCosQ(): v = rubi_log(x) assert FunctionOfCosQ(cos(cos(v)), v, x) assert FunctionOfCosQ(cos(v), v, x) assert FunctionOfCosQ(cos(v)*cos(cos(v)), v, x) def test_FunctionOfTanQ(): v = rubi_log(x) t = tan(v) c = cot(v) assert FunctionOfTanQ(t, v, x) assert FunctionOfTanQ(c, v, x) assert FunctionOfTanQ(t + c, v, x) assert FunctionOfTanQ(t*c, v, x) assert not FunctionOfTanQ(sin(x), v, x) def test_FunctionOfTanWeight(): v = rubi_log(x) t = tan(v) c = cot(v) assert FunctionOfTanWeight(x, v, x) == 0 assert FunctionOfTanWeight(sin(v), v, x) == 0 assert FunctionOfTanWeight(tan(v), v, x) == 1 assert FunctionOfTanWeight(cot(v), v, x) == -1 assert FunctionOfTanWeight(t**2, v, x) == 1 assert FunctionOfTanWeight(sin(v)**2, v, x) == -1 assert FunctionOfTanWeight(cot(v)*sin(v)**2, v, x) == -2 def test_OddTrigPowerQ(): assert not OddTrigPowerQ(sin(x)**3, 1, x) assert OddTrigPowerQ(sin(3),1,x) assert OddTrigPowerQ(sin(3*x),x,x) assert OddTrigPowerQ(sin(3*x)**3,x,x) def test_FunctionOfLog(): assert not FunctionOfLog(x**2*(a + b*x)**3*exp(-a - b*x) ,False, False, x) assert FunctionOfLog(rubi_log(2*x**8)*2 + rubi_log(2*x**8) + 1, x) == [3*x + 1, 2*x**8, 8] assert FunctionOfLog(rubi_log(2*x)**2,x) == [x**2, 2*x, 1] assert FunctionOfLog(rubi_log(3*x**3)**2 + 1,x) == [x**2 + 1, 3*x**3, 3] assert FunctionOfLog(rubi_log(2*x**8)*2,x) == [2*x, 2*x**8, 8] assert not FunctionOfLog(2*sin(x)*2,x) def test_EulerIntegrandQ(): assert EulerIntegrandQ((2*x + 3*((x + 1)**3)**1.5)**(-3), x) assert not EulerIntegrandQ((2*x + (2*x**2)**2)**3, x) assert not EulerIntegrandQ(3*x**2 + 5*x + 1, x) def test_Divides(): assert not Divides(x, a*x**2, x) assert Divides(x, a*x, x) == a def test_EasyDQ(): assert EasyDQ(3*x**2, x) assert EasyDQ(3*x**3 - 6, x) assert EasyDQ(x**3, x) assert EasyDQ(sin(x**rubi_log(3)), x) def test_ProductOfLinearPowersQ(): assert ProductOfLinearPowersQ(S(1), x) assert ProductOfLinearPowersQ((x + 1)**3, x) assert not ProductOfLinearPowersQ((x**2 + 1)**3, x) assert ProductOfLinearPowersQ(x + 1, x) def test_Rt(): b = symbols('b') assert Rt(-b**2, 4) == (-b**2)**(S(1)/S(4)) assert Rt(x**2, 2) == x assert Rt(S(2 + 3*I), S(8)) == (2 + 3*I)**(1/8) assert Rt(x**2 + 4 + 4*x, 2) == x + 2 assert Rt(S(8), S(3)) == 2 assert Rt(S(16807), S(5)) == 7 def test_NthRoot(): assert NthRoot(S(14580), S(3)) == 9*2**(S(2)/S(3))*5**(S(1)/S(3)) assert NthRoot(9, 2) == 3.0 assert NthRoot(81, 2) == 9.0 assert NthRoot(81, 4) == 3.0 def test_AtomBaseQ(): assert not AtomBaseQ(x**2) assert AtomBaseQ(x**3) assert AtomBaseQ(x) assert AtomBaseQ(S(2)**3) assert not AtomBaseQ(sin(x)) def test_SumBaseQ(): assert not SumBaseQ((x + 1)**2) assert SumBaseQ((x + 1)**3) assert SumBaseQ(3*x+3) assert not SumBaseQ(x) def test_NegSumBaseQ(): assert not NegSumBaseQ(-x + 1) assert NegSumBaseQ(x - 1) assert not NegSumBaseQ((x - 1)**2) assert NegSumBaseQ((x - 1)**3) def test_AllNegTermQ(): x = Symbol('x', negative=True) assert AllNegTermQ(x) assert not AllNegTermQ(x + 2) assert AllNegTermQ(x - 2) assert AllNegTermQ((x - 2)**3) assert not AllNegTermQ((x - 2)**2) def test_TrigSquareQ(): assert TrigSquareQ(sin(x)**2) assert TrigSquareQ(cos(x)**2) assert not TrigSquareQ(tan(x)**2) def test_Inequality(): assert not Inequality(S('0'), Less, m, LessEqual, S('1')) assert Inequality(S('0'), Less, S('1')) assert Inequality(S('0'), Less, S('1'), LessEqual, S('5')) def test_SplitProduct(): assert SplitProduct(OddQ, S(3)*x) == [3, x] assert not SplitProduct(OddQ, S(2)*x) def test_SplitSum(): assert SplitSum(FracPart, sin(x)) == [sin(x), 0] assert SplitSum(FracPart, sin(x) + S(2)) == [sin(x), S(2)] def test_Complex(): assert Complex(a, b) == a + I*b def test_SimpFixFactor(): assert SimpFixFactor((a*c + b*c)**S(4), x) == (a*c + b*c)**4 assert SimpFixFactor((a*Complex(0, c) + b*Complex(0, d))**S(3), x) == -I*(a*c + b*d)**3 assert SimpFixFactor((a*Complex(0, d) + b*Complex(0, e) + c*Complex(0, f))**S(2), x) == -(a*d + b*e + c*f)**2 assert SimpFixFactor((a + b*x**(-1/S(2))*x**S(3))**S(3), x) == (a + b*x**(5/2))**3 assert SimpFixFactor((a*c + b*c**S(2)*x**S(2))**S(3), x) == c**3*(a + b*c*x**2)**3 assert SimpFixFactor((a*c**S(2) + b*c**S(1)*x**S(2))**S(3), x) == c**3*(a*c + b*x**2)**3 assert SimpFixFactor(a*cos(x)**2 + a*sin(x)**2 + v, x) == a*cos(x)**2 + a*sin(x)**2 + v def test_SimplifyAntiderivative(): assert SimplifyAntiderivative(acoth(coth(x)), x) == x assert SimplifyAntiderivative(a*x, x) == a*x assert SimplifyAntiderivative(atanh(cot(x)), x) == atanh(2*sin(x)*cos(x))/2 assert SimplifyAntiderivative(a*cos(x)**2 + a*sin(x)**2 + v, x) == a*cos(x)**2 + a*sin(x)**2 def test_FixSimplify(): assert FixSimplify(x*Complex(0, a)*(v*Complex(0, b) + w)**S(3)) == a*x*(b*v - I*w)**3 def test_TrigSimplifyAux(): assert TrigSimplifyAux(a*cos(x)**2 + a*sin(x)**2 + v) == a + v assert TrigSimplifyAux(x**2) == x**2 def test_SubstFor(): assert SubstFor(x**2 + 1, tanh(x), x) == tanh(x) assert SubstFor(x**2, sinh(x), x) == sinh(sqrt(x)) def test_FresnelS(): assert FresnelS(oo) == 1/2 assert FresnelS(0) == 0 def test_FresnelC(): assert FresnelC(0) == 0 assert FresnelC(oo) == 1/2 def test_Erfc(): assert Erfc(0) == 1 assert Erfc(oo) == 0 def test_Erfi(): assert Erfi(oo) is oo assert Erfi(0) == 0 def test_Gamma(): assert Gamma(u) == gamma(u) def test_ElementaryFunctionQ(): assert ElementaryFunctionQ(x + y) assert ElementaryFunctionQ(sin(x + y)) assert ElementaryFunctionQ(E**(x*a)) def test_Util_Part(): from sympy.integrals.rubi.utility_function import Util_Part assert Util_Part(1, a + b).doit() == a assert Util_Part(c, a + b).doit() == Util_Part(c, a + b) def test_Part(): assert Part([1, 2, 3], 1) == 1 assert Part(a*b, 1) == a def test_PolyLog(): assert PolyLog(a, b) == polylog(a, b) def test_PureFunctionOfCothQ(): v = rubi_log(x) assert PureFunctionOfCothQ(coth(v), v, x) assert PureFunctionOfCothQ(a + coth(v), v, x) assert not PureFunctionOfCothQ(sin(v), v, x) def test_ExpandIntegrand(): assert ExpandIntegrand(sqrt(a + b*x**S(2) + c*x**S(4)), (f*x)**(S(3)/2)*(d + e*x**S(2)), x) == \ d*(f*x)**(3/2)*sqrt(a + b*x**2 + c*x**4) + e*(f*x)**(7/2)*sqrt(a + b*x**2 + c*x**4)/f**2 assert ExpandIntegrand((6*A*a*c - 2*A*b**2 + B*a*b - 2*c*x*(A*b - 2*B*a))/(x**2*(a + b*x + c*x**2)), x) == \ (6*A*a*c - 2*A*b**2 + B*a*b)/(a*x**2) + (-6*A*a**2*c**2 + 10*A*a*b**2*c - 2*A*b**4 - 5*B*a**2*b*c + B*a*b**3 + x*(8*A*a*b*c**2 - 2*A*b**3*c - 4*B*a**2*c**2 + B*a*b**2*c))/(a**2*(a + b*x + c*x**2)) + (-2*A*b + B*a)*(4*a*c - b**2)/(a**2*x) assert ExpandIntegrand(x**2*(e + f*x)**3*F**(a + b*(c + d*x)**1), x) == F**(a + b*(c + d*x))*e**2*(e + f*x)**3/f**2 - 2*F**(a + b*(c + d*x))*e*(e + f*x)**4/f**2 + F**(a + b*(c + d*x))*(e + f*x)**5/f**2 assert ExpandIntegrand((x)*(a + b*x)**2*f**(e*(c + d*x)**n), x) == a**2*f**(e*(c + d*x)**n)*x + 2*a*b*f**(e*(c + d*x)**n)*x**2 + b**2*f**(e*(c + d*x)**n)*x**3 assert ExpandIntegrand(sin(x)**3*(a + b*(1/sin(x)))**2, x) == a**2*sin(x)**3 + 2*a*b*sin(x)**2 + b**2*sin(x) assert ExpandIntegrand(x*(a + b*ArcSin(c + d*x))**n, x) == -c*(a + b*asin(c + d*x))**n/d + (a + b*asin(c + d*x))**n*(c + d*x)/d assert ExpandIntegrand((a + b*x)**S(3)*(A + B*x)/(c + d*x), x) == B*(a + b*x)**3/d + b*(a + b*x)**2*(A*d - B*c)/d**2 + b*(a + b*x)*(A*d - B*c)*(a*d - b*c)/d**3 + b*(A*d - B*c)*(a*d - b*c)**2/d**4 + (A*d - B*c)*(a*d - b*c)**3/(d**4*(c + d*x)) assert ExpandIntegrand((x**2)*(S(3)*x)**(S(1)/2), x) ==sqrt(3)*x**(5/2) assert ExpandIntegrand((x)*(sin(x))**(S(1)/2), x) == x*sqrt(sin(x)) assert ExpandIntegrand(x*(e + f*x)**2*F**(b*(c + d*x)), x) == -F**(b*(c + d*x))*e*(e + f*x)**2/f + F**(b*(c + d*x))*(e + f*x)**3/f assert ExpandIntegrand(x**m*(e + f*x)**2*F**(b*(c + d*x)**n), x) == F**(b*(c + d*x)**n)*e**2*x**m + 2*F**(b*(c + d*x)**n)*e*f*x*x**m + F**(b*(c + d*x)**n)*f**2*x**2*x**m assert simplify(ExpandIntegrand((S(1) - S(1)*x**S(2))**(-S(3)), x) - (-S(3)/(8*(x**2 - 1)) + S(3)/(16*(x + 1)**2) + S(1)/(S(8)*(x + 1)**3) + S(3)/(S(16)*(x - 1)**2) - S(1)/(S(8)*(x - 1)**3))) == 0 assert ExpandIntegrand(-S(1), 1/((-q - x)**3*(q - x)**3), x) == 1/(8*q**3*(q + x)**3) - 1/(8*q**3*(-q + x)**3) - 3/(8*q**4*(-q**2 + x**2)) + 3/(16*q**4*(q + x)**2) + 3/(16*q**4*(-q + x)**2) assert ExpandIntegrand((1 + 1*x)**(3)/(2 + 1*x), x) == x**2 + x + 1 - 1/(x + 2) assert ExpandIntegrand((c + d*x**1 + e*x**2)/(1 - x**3), x) == (c - (-1)**(S(1)/3)*d + (-1)**(S(2)/3)*e)/(-3*(-1)**(S(2)/3)*x + 3) + (c + (-1)**(S(2)/3)*d - (-1)**(S(1)/3)*e)/(3*(-1)**(S(1)/3)*x + 3) + (c + d + e)/(-3*x + 3) assert ExpandIntegrand((c + d*x**1 + e*x**2 + f*x**3)/(1 - x**4), x) == (c + I*d - e - I*f)/(4*I*x + 4) + (c - I*d - e + I*f)/(-4*I*x + 4) + (c - d + e - f)/(4*x + 4) + (c + d + e + f)/(-4*x + 4) assert ExpandIntegrand((d + e*(f + g*x))/(2 + 3*x + 1*x**2), x) == (-2*d - 2*e*f + 4*e*g)/(2*x + 4) + (2*d + 2*e*f - 2*e*g)/(2*x + 2) assert ExpandIntegrand(x/(a*x**3 + b*Sqrt(c + d*x**6)), x) == a*x**4/(-b**2*c + x**6*(a**2 - b**2*d)) + b*x*sqrt(c + d*x**6)/(b**2*c + x**6*(-a**2 + b**2*d)) assert simplify(ExpandIntegrand(x**1*(1 - x**4)**(-2), x) - (x/(S(4)*(x**2 + 1)) + x/(S(4)*(x**2 + 1)**2) - x/(S(4)*(x**2 - 1)) + x/(S(4)*(x**2 - 1)**2))) == 0 assert simplify(ExpandIntegrand((-1 + x**S(6))**(-3), x) - (S(3)/(S(8)*(x**6 - 1)) - S(3)/(S(16)*(x**S(3) + S(1))**S(2)) - S(1)/(S(8)*(x**S(3) + S(1))**S(3)) - S(3)/(S(16)*(x**S(3) - S(1))**S(2)) + S(1)/(S(8)*(x**S(3) - S(1))**S(3)))) == 0 assert simplify(ExpandIntegrand(u**1*(a + b*u**2 + c*u**4)**(-1), x)) == simplify(1/(2*b*(u + sqrt(-(a + c*u**4)/b))) - 1/(2*b*(-u + sqrt(-(a + c*u**4)/b)))) assert simplify(ExpandIntegrand((1 + 1*u + 1*u**2)**(-2), x) - (S(1)/(S(2)*(-u - 1)*(-u**2 - u - 1)) + S(1)/(S(4)*(-u - 1)*(u + sqrt(-u - 1))**2) + S(1)/(S(4)*(-u - 1)*(u - sqrt(-u - 1))**2))) == 0 assert ExpandIntegrand(x*(a + b*Log(c*(d*(e + f*x)**p)**q))**n, x) == -e*(a + b*rubi_log(c*(d*(e + f*x)**p)**q))**n/f + (a + b*rubi_log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)/f assert ExpandIntegrand(x*f**(e*(c + d*x)*S(1)), x) == f**(e*(c + d*x))*x assert simplify(ExpandIntegrand((x)*(a + b*x)**m*Log(c*(d + e*x**n)**p), x) - (-a*(a + b*x)**m*rubi_log(c*(d + e*x**n)**p)/b + (a + b*x)**(m + S(1))*rubi_log(c*(d + e*x**n)**p)/b)) == 0 assert simplify(ExpandIntegrand(u*(a + b*F**v)**S(2)*(c + d*F**v)**S(-3), x) - (b**2*u/(d**2*(F**v*d + c)) + 2*b*u*(a*d - b*c)/(d**2*(F**v*d + c)**2) + u*(a*d - b*c)**2/(d**2*(F**v*d + c)**3))) == 0 assert ExpandIntegrand((S(1) + 1*x)**S(2)*f**(e*(1 + S(1)*x)**n)/(g + h*x), x) == f**(e*(x + 1)**n)*(x + 1)/h + f**(e*(x + 1)**n)*(-g + h)/h**2 + f**(e*(x + 1)**n)*(g - h)**2/(h**2*(g + h*x)) assert ExpandIntegrand((a*c - b*c*x)**2/(a + b*x)**2, x) == 4*a**2*c**2/(a + b*x)**2 - 4*a*c**2/(a + b*x) + c**2 assert simplify(ExpandIntegrand(x**2*(1 - 1*x**2)**(-2), x) - (1/(S(2)*(x**2 - 1)) + 1/(S(4)*(x + 1)**2) + 1/(S(4)*(x - 1)**2))) == 0 assert ExpandIntegrand((a + x)**2, x) == a**2 + 2*a*x + x**2 assert ExpandIntegrand((a + b*x)**S(2)/x**3, x) == a**2/x**3 + 2*a*b/x**2 + b**2/x assert ExpandIntegrand(1/(x**2*(a + b*x)**2), x) == b**2/(a**2*(a + b*x)**2) + 1/(a**2*x**2) + 2*b**2/(a**3*(a + b*x)) - 2*b/(a**3*x) assert ExpandIntegrand((1 + x)**3/x, x) == x**2 + 3*x + 3 + 1/x assert ExpandIntegrand((1 + 2*(3 + 4*x**2))/(2 + 3*x**2 + 1*x**4), x) == 18/(2*x**2 + 4) - 2/(2*x**2 + 2) assert ExpandIntegrand((c + d*x**2 + e*x**3)/(1 - 1*x**4), x) == (c - d - I*e)/(4*I*x + 4) + (c - d + I*e)/(-4*I*x + 4) + (c + d - e)/(4*x + 4) + (c + d + e)/(-4*x + 4) assert ExpandIntegrand((a + b*x)**2/(c + d*x), x) == b*(a + b*x)/d + b*(a*d - b*c)/d**2 + (a*d - b*c)**2/(d**2*(c + d*x)) assert ExpandIntegrand(x**2*(a + b*Log(c*(d*(e + f*x)**p)**q))**n, x) == e**2*(a + b*rubi_log(c*(d*(e + f*x)**p)**q))**n/f**2 - 2*e*(a + b*rubi_log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)/f**2 + (a + b*rubi_log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)**2/f**2 assert ExpandIntegrand(x*(1 + 2*x)**3*rubi_log(2*(1 + 1*x**2)**1), x) == 8*x**4*rubi_log(2*x**2 + 2) + 12*x**3*rubi_log(2*x**2 + 2) + 6*x**2*rubi_log(2*x**2 + 2) + x*rubi_log(2*x**2 + 2) assert ExpandIntegrand((1 + 1*x)**S(3)*f**(e*(1 + 1*x)**n)/(g + h*x), x) == f**(e*(x + 1)**n)*(x + 1)**2/h + f**(e*(x + 1)**n)*(-g + h)*(x + 1)/h**2 + f**(e*(x + 1)**n)*(-g + h)**2/h**3 - f**(e*(x + 1)**n)*(g - h)**3/(h**3*(g + h*x)) def test_Dist(): assert Dist(x, a + b, x) == a*x + b*x assert Dist(x, Integral(a + b , x), x) == x*Integral(a + b, x) assert Dist(3*x,(a+b), x) - Dist(2*x, (a+b), x) == a*x + b*x assert Dist(3*x,(a+b), x) + Dist(2*x, (a+b), x) == 5*a*x + 5*b*x assert Dist(x, c*Integral((a + b), x), x) == c*x*Integral(a + b, x) def test_IntegralFreeQ(): assert not IntegralFreeQ(Integral(a, x)) assert IntegralFreeQ(a + b) def test_OneQ(): from sympy.integrals.rubi.utility_function import OneQ assert OneQ(S(1)) assert not OneQ(S(2)) def test_DerivativeDivides(): assert not DerivativeDivides(x, x, x) assert not DerivativeDivides(a, x + y, b) assert DerivativeDivides(a + x, a, x) == a assert DerivativeDivides(a + b, x + y, b) == x + y def test_LogIntegral(): from sympy.integrals.rubi.utility_function import LogIntegral assert LogIntegral(a) == li(a) def test_SinIntegral(): from sympy.integrals.rubi.utility_function import SinIntegral assert SinIntegral(a) == Si(a) def test_CosIntegral(): from sympy.integrals.rubi.utility_function import CosIntegral assert CosIntegral(a) == Ci(a) def test_SinhIntegral(): from sympy.integrals.rubi.utility_function import SinhIntegral assert SinhIntegral(a) == Shi(a) def test_CoshIntegral(): from sympy.integrals.rubi.utility_function import CoshIntegral assert CoshIntegral(a) == Chi(a) def test_ExpIntegralEi(): from sympy.integrals.rubi.utility_function import ExpIntegralEi assert ExpIntegralEi(a) == Ei(a) def test_ExpIntegralE(): from sympy.integrals.rubi.utility_function import ExpIntegralE assert ExpIntegralE(a, z) == expint(a, z) def test_LogGamma(): from sympy.integrals.rubi.utility_function import LogGamma assert LogGamma(a) == loggamma(a) def test_Factorial(): from sympy.integrals.rubi.utility_function import Factorial assert Factorial(S(5)) == 120 def test_Zeta(): from sympy.integrals.rubi.utility_function import Zeta assert Zeta(a, z) == zeta(a, z) def test_HypergeometricPFQ(): from sympy.integrals.rubi.utility_function import HypergeometricPFQ assert HypergeometricPFQ([a, b], [c], z) == hyper([a, b], [c], z) def test_PolyGamma(): assert PolyGamma(S(2), S(3)) == polygamma(2, 3) def test_ProductLog(): from sympy.core.evalf import N assert N(ProductLog(S(5.0)), 5) == N(1.32672466524220, 5) assert N(ProductLog(S(2), S(3.5)), 5) == N(-1.14064876353898 + 10.8912237027092*I, 5) def test_PolynomialQuotient(): assert PolynomialQuotient(rubi_log((-a*d + b*c)/(b*(c + d*x)))/(c + d*x), a + b*x, e) == rubi_log((-a*d + b*c)/(b*(c + d*x)))/((a + b*x)*(c + d*x)) assert PolynomialQuotient(x**2, x + a, x) == -a + x def test_PolynomialRemainder(): assert PolynomialRemainder(rubi_log((-a*d + b*c)/(b*(c + d*x)))/(c + d*x), a + b*x, e) == 0 assert PolynomialRemainder(x**2, x + a, x) == a**2 def test_Floor(): assert Floor(S(7.5)) == 7 assert Floor(S(15.5), S(6)) == 12 def test_Factor(): from sympy.integrals.rubi.utility_function import Factor assert Factor(a*b + a*c) == a*(b + c) def test_Rule(): from sympy.integrals.rubi.utility_function import Rule assert Rule(x, S(5)) == {x: 5} def test_Distribute(): assert Distribute((a + b)*c + (a + b)*d, Add) == c*(a + b) + d*(a + b) assert Distribute((a + b)*(c + e), Add) == a*c + a*e + b*c + b*e def test_CoprimeQ(): assert CoprimeQ(S(7), S(5)) assert not CoprimeQ(S(6), S(3)) def test_Discriminant(): from sympy.integrals.rubi.utility_function import Discriminant assert Discriminant(a*x**2 + b*x + c, x) == b**2 - 4*a*c assert unchanged(Discriminant, 1/x, x) def test_Sum_doit(): assert Sum_doit(2*x + 2, [x, 0, 1.7]) == 6 def test_DeactivateTrig(): assert DeactivateTrig(sec(a + b*x), x) == sec(a + b*x) def test_Negative(): from sympy.integrals.rubi.utility_function import Negative assert Negative(S(-2)) assert not Negative(S(0)) def test_Quotient(): from sympy.integrals.rubi.utility_function import Quotient assert Quotient(17, 5) == 3 def test_process_trig(): assert process_trig(x*cot(x)) == x/tan(x) assert process_trig(coth(x)*csc(x)) == S(1)/(tanh(x)*sin(x)) def test_replace_pow_exp(): assert replace_pow_exp(rubi_exp(S(5))) == exp(S(5)) def test_rubi_unevaluated_expr(): from sympy.integrals.rubi.utility_function import rubi_unevaluated_expr assert rubi_unevaluated_expr(a)*rubi_unevaluated_expr(b) == rubi_unevaluated_expr(b)*rubi_unevaluated_expr(a) def test_rubi_exp(): # class name in utility_function is `exp`. To avoid confusion `rubi_exp` has been used here assert isinstance(rubi_exp(a), Pow) def test_rubi_log(): # class name in utility_function is `log`. To avoid confusion `rubi_log` has been used here assert rubi_log(rubi_exp(S(a))) == a
0eddcdb11397e403f82f0ea04cc352e7a6f42a923433fe85b7e03f63052b98c7
''' Tests for Rubi Algebraic 1.2 rules. Parsed from Maple syntax All tests: http://www.apmaths.uwo.ca/~arich/IntegrationProblems/MapleSyntaxFiles/MapleSyntaxFiles.html Note: Some tests are commented since they depend rules other than Algebraic1.2. ''' import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.rubi import rubi_integrate from sympy.functions import log, sqrt, exp, cos, sin, tan, sec, csc, cot from sympy.functions.elementary.hyperbolic import atanh as arctanh from sympy.functions.elementary.hyperbolic import asinh as arcsinh from sympy.functions.elementary.hyperbolic import acosh as arccosh from sympy.functions.elementary.trigonometric import atan as arctan from sympy.functions.elementary.trigonometric import asin as arcsin from sympy.functions.elementary.trigonometric import acos as arccos from sympy.integrals.rubi.utility_function import EllipticE, EllipticF, hypergeom, rubi_test from sympy.core.numbers import (I, pi as Pi) from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import exp_polar from sympy.functions.special.hyper import hyper from sympy.simplify.simplify import simplify a, b, c, d, e, f, m, n, x, u = symbols('a b c d e f m n x u') def test_1(): test = [ [ - S(3)/S(2), x, S(1), - S(3)/S(2)*x], [Pi, x, S(1), Pi*x], [a, x, S(1), a*x], [x**m, x, S(1), x**(S(1) + m)/(S(1) + m)], [x**S(100), x, S(1), S(1)/S(101)*x**S(101)], [x**(S(5)/S(2)), x, S(1), S(2)/S(7)*x**(S(7)/S(2))], [x**(S(5)/S(3)), x, S(1), S(3)/S(8)*x**(S(8)/S(3))], [S(1)/x**(S(1)/S(3)), x, S(1), S(3)/S(2)*x**(S(2)/S(3))], [x**S(3)*(a + b*x), x, S(2), S(1)/S(4)*a*x**S(4) + S(1)/S(5)*b*x**S(5)], [(a + b*x)**S(2)/x**S(2), x, S(2), - a**S(2)/x + b**S(2)*x + S(2)*a*b*log(x)], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) def test_2(): test = [ [(a + b*x)/x, x, S(2), b*x + a*log(x)], [x**S(5)/(a + b*x), x, S(2), a**S(4)*x/b**S(5) - S(1)/S(2)*a**S(3)*x**S(2)/b**S(4) + S(1)/S(3)*a**S(2)*x**S(3)/b**S(3) - S(1)/S(4)*a*x**S(4)/b**S(2) + S(1)/S(5)*x**S(5)/b - a**S(5)*log(a + b*x)/b**S(6)], [S(1)/(a + b*x)**S(2), x, S(1), ( - S(1))/(b*(a + b*x))], [S(1)/(x*(a + b*x)**S(3)), x, S(2), S(1)/S(2)/(a*(a + b*x)**S(2)) + S(1)/(a**S(2)*(a + b*x)) + log(x)/a**S(3) - log(a + b*x)/a**S(3)], [S(1)/(S(2) + S(2)*x), x, S(1), S(1)/S(2)*log(S(1) + x)], [S(1)/(x*(S(1) + b*x)), x, S(3), log(x) - log(S(1) + b*x)], [x**S(3)*sqrt(a + b*x), x, S(2), - S(2)/S(3)*a**S(3)*(a + b*x)**(S(3)/S(2))/b**S(4) + S(6)/S(5)*a**S(2)*(a + b*x)**(S(5)/S(2))/b**S(4) - S(6)/S(7)*a*(a + b*x)**(S(7)/S(2))/b**S(4) + S(2)/S(9)*(a + b*x)**(S(9)/S(2))/b**S(4)], [(a + b*x)**(S(3)/S(2)), x, S(1), S(2)/S(5)*(a + b*x)**(S(5)/S(2))/b], [x**S(4)/sqrt(a + b*x), x, S(2), - S(8)/S(3)*a**S(3)*(a + b*x)**(S(3)/S(2))/b**S(5) + S(12)/S(5)*a**S(2)*(a + b*x)**(S(5)/S(2))/b**S(5) - S(8)/S(7)*a*(a + b*x)**(S(7)/S(2))/b**S(5) + S(2)/S(9)*(a + b*x)**(S(9)/S(2))/b**S(5) + S(2)*a**S(4)*sqrt(a + b*x)/b**S(5)], [S(1)/sqrt(a + b*x), x, S(1), S(2)*sqrt(a + b*x)/b], [S(1)/(x*(a + b*x)**(S(3)/S(2))), x, S(3), - S(2)*arctanh(sqrt(a + b*x)/sqrt(a))/a**(S(3)/S(2)) + S(2)/(a*sqrt(a + b*x))], [S(1)/(x**S(2)*( - a + b*x)**(S(3)/S(2))), x, S(4), - S(3)*b*arctan(sqrt( - a + b*x)/sqrt(a))/a**(S(5)/S(2)) + ( - S(2))/(a*x*sqrt( - a + b*x)) - S(3)*sqrt( - a + b*x)/(a**S(2)*x)], [x**S(3)*(a + b*x)**(S(1)/S(3)), x, S(2), - S(3)/S(4)*a**S(3)*(a + b*x)**(S(4)/S(3))/b**S(4) + S(9)/S(7)*a**S(2)*(a + b*x)**(S(7)/S(3))/b**S(4) - S(9)/S(10)*a*(a + b*x)**(S(10)/S(3))/b**S(4) + S(3)/S(13)*(a + b*x)**(S(13)/S(3))/b**S(4)], [x**S(2)*(a + b*x)**(S(2)/S(3)), x, S(2), S(3)/S(5)*a**S(2)*(a + b*x)**(S(5)/S(3))/b**S(3) - S(3)/S(4)*a*(a + b*x)**(S(8)/S(3))/b**S(3) + S(3)/S(11)*(a + b*x)**(S(11)/S(3))/b**S(3)], [x**S(2)/(a + b*x)**(S(1)/S(3)), x, S(2), S(3)/S(2)*a**S(2)*(a + b*x)**(S(2)/S(3))/b**S(3) - S(6)/S(5)*a*(a + b*x)**(S(5)/S(3))/b**S(3) + S(3)/S(8)*(a + b*x)**(S(8)/S(3))/b**S(3)], [x**S(3)/( - a + b*x)**(S(1)/S(3)), x, S(2), S(3)/S(2)*a**S(3)*( - a + b*x)**(S(2)/S(3))/b**S(4) + S(9)/S(5)*a**S(2)*( - a + b*x)**(S(5)/S(3))/b**S(4) + S(9)/S(8)*a*( - a + b*x)**(S(8)/S(3))/b**S(4) + S(3)/S(11)*( - a + b*x)**(S(11)/S(3))/b**S(4)], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) def test_3(): test = [ [x**m*(a + b*x), x, S(2), a*x**(S(1) + m)/(S(1) + m) + b*x**(S(2) + m)/(S(2) + m)], [x**(S(5)/S(2))*(a + b*x), x, S(2), S(2)/S(7)*a*x**(S(7)/S(2)) + S(2)/S(9)*b*x**(S(9)/S(2))], [x**(S(5)/S(2))/(a + b*x), x, S(5), - S(2)/S(3)*a*x**(S(3)/S(2))/b**S(2) + S(2)/S(5)*x**(S(5)/S(2))/b - S(2)*a**(S(5)/S(2))*arctan(sqrt(b)*sqrt(x)/sqrt(a))/b**(S(7)/S(2)) + S(2)*a**S(2)*sqrt(x)/b**S(3)], [x**(S(3)/S(2))/(a + b*x), x, S(4), S(2)/S(3)*x**(S(3)/S(2))/b + S(2)*a**(S(3)/S(2))*arctan(sqrt(b)*sqrt(x)/sqrt(a))/b**(S(5)/S(2)) - S(2)*a*sqrt(x)/b**S(2)], [x**(S(5)/S(2))/( - a + b*x), x, S(5), S(2)/S(3)*a*x**(S(3)/S(2))/b**S(2) + S(2)/S(5)*x**(S(5)/S(2))/b - S(2)*a**(S(5)/S(2))*arctanh(sqrt(b)*sqrt(x)/sqrt(a))/b**(S(7)/S(2)) + S(2)*a**S(2)*sqrt(x)/b**S(3)], [x**(S(5)/S(2))*sqrt(a + b*x), x, S(6), - S(5)/S(64)*a**S(4)*arctanh(sqrt(b)*sqrt(x)/sqrt(a + b*x))/b**(S(7)/S(2)) - S(5)/S(96)*a**S(2)*x**(S(3)/S(2))*sqrt(a + b*x)/b**S(2) + S(1)/S(24)*a*x**(S(5)/S(2))*sqrt(a + b*x)/b + S(1)/S(4)*x**(S(7)/S(2))*sqrt(a + b*x) + S(5)/S(64)*a**S(3)*sqrt(x)*sqrt(a + b*x)/b**S(3)], [x**(S(3)/S(2))*sqrt(a + b*x), x, S(5), S(1)/S(8)*a**S(3)*arctanh(sqrt(b)*sqrt(x)/sqrt(a + b*x))/b**(S(5)/S(2)) + S(1)/S(12)*a*x**(S(3)/S(2))*sqrt(a + b*x)/b + S(1)/S(3)*x**(S(5)/S(2))*sqrt(a + b*x) - S(1)/S(8)*a**S(2)*sqrt(x)*sqrt(a + b*x)/b**S(2)], [x**(S(5)/S(2))/sqrt(a + b*x), x, S(5), - S(5)/S(8)*a**S(3)*arctanh(sqrt(b)*sqrt(x)/sqrt(a + b*x))/b**(S(7)/S(2)) - S(5)/S(12)*a*x**(S(3)/S(2))*sqrt(a + b*x)/b**S(2) + S(1)/S(3)*x**(S(5)/S(2))*sqrt(a + b*x)/b + S(5)/S(8)*a**S(2)*sqrt(x)*sqrt(a + b*x)/b**S(3)], [sqrt(x)/sqrt(a + b*x), x, S(3), - a*arctanh(sqrt(b)*sqrt(x)/sqrt(a + b*x))/b**(S(3)/S(2)) + sqrt(x)*sqrt(a + b*x)/b], [x**(S(2)/S(3))*(a + b*x), x, S(2), S(3)/S(5)*a*x**(S(5)/S(3)) + S(3)/S(8)*b*x**(S(8)/S(3))], [x**(S(1)/S(3))*(a + b*x), x, S(2), S(3)/S(4)*a*x**(S(4)/S(3)) + S(3)/S(7)*b*x**(S(7)/S(3))], [x**(S(5)/S(3))/(a + b*x), x, S(6), - S(3)/S(2)*a*x**(S(2)/S(3))/b**S(2) + S(3)/S(5)*x**(S(5)/S(3))/b - S(3)/S(2)*a**(S(5)/S(3))*log(a**(S(1)/S(3)) + b**(S(1)/S(3))*x**(S(1)/S(3)))/b**(S(8)/S(3)) + S(1)/S(2)*a**(S(5)/S(3))*log(a + b*x)/b**(S(8)/S(3)) - a**(S(5)/S(3))*arctan((a**(S(1)/S(3)) - S(2)*b**(S(1)/S(3))*x**(S(1)/S(3)))/(a**(S(1)/S(3))*sqrt(S(3))))*sqrt(S(3))/b**(S(8)/S(3))], [x**(S(4)/S(3))/(a + b*x), x, S(6), - S(3)*a*x**(S(1)/S(3))/b**S(2) + S(3)/S(4)*x**(S(4)/S(3))/b + S(3)/S(2)*a**(S(4)/S(3))*log(a**(S(1)/S(3)) + b**(S(1)/S(3))*x**(S(1)/S(3)))/b**(S(7)/S(3)) - S(1)/S(2)*a**(S(4)/S(3))*log(a + b*x)/b**(S(7)/S(3)) - a**(S(4)/S(3))*arctan((a**(S(1)/S(3)) - S(2)*b**(S(1)/S(3))*x**(S(1)/S(3)))/(a**(S(1)/S(3))*sqrt(S(3))))*sqrt(S(3))/b**(S(7)/S(3))], [(S(1) - x)**(S(1)/S(4))/(S(1) + x), x, S(5), S(4)*(S(1) - x)**(S(1)/S(4)) - S(2)*S(2)**(S(1)/S(4))*arctan((S(1) - x)**(S(1)/S(4))/S(2)**(S(1)/S(4))) - S(2)*S(2)**(S(1)/S(4))*arctanh((S(1) - x)**(S(1)/S(4))/S(2)**(S(1)/S(4)))], [x**m*(a + b*x)**S(2), x, S(2), a**S(2)*x**(S(1) + m)/(S(1) + m) + S(2)*a*b*x**(S(2) + m)/(S(2) + m) + b**S(2)*x**(S(3) + m)/(S(3) + m)], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) def test_4(): test = [ [x**m/(a + b*x)**S(2), x, S(1), x**(S(1) + m)*hypergeom([S(2), S(1) + m], [S(2) + m], - b*x/a)/(a**S(2)*(S(1) + m))], [x**m/sqrt(S(2) + S(3)*x), x, S(1), x**(S(1) + m)*hypergeom([S(1)/S(2), S(1) + m], [S(2) + m], - S(3)/S(2)*x)/((S(1) + m)*sqrt(S(2)))], [x**m*(a + b*x)**n, x, S(2), x**(S(1) + m)*(a + b*x)**n*hypergeom([S(1) + m, - n], [S(2) + m], - b*x/a)/((S(1) + m)*(S(1) + b*x/a)**n)], [x**( - S(1) + n)/(a + b*x)**n, x, S(2), x**n*(S(1) + b*x/a)**n*hypergeom([n, n], [S(1) + n], - b*x/a)/(n*(a + b*x)**n)], [(c + d*(a + b*x))**(S(5)/S(2)), x, S(2), S(2)/S(7)*(c + d*(a + b*x))**(S(7)/S(2))/(b*d)], [(c + d*(a + b*x))**(S(3)/S(2)), x, S(2), S(2)/S(5)*(c + d*(a + b*x))**(S(5)/S(2))/(b*d)], [(a + b*x)**S(3)/(a*d/b + d*x)**S(3), x, S(2), b**S(3)*x/d**S(3)], [(a + b*x)*(a*c - b*c*x)**S(3), x, S(2), - S(1)/S(2)*a*c**S(3)*(a - b*x)**S(4)/b + S(1)/S(5)*c**S(3)*(a - b*x)**S(5)/b], [(a*c - b*c*x)**S(3)/(a + b*x), x, S(2), - S(4)*a**S(2)*c**S(3)*x + a*c**S(3)*(a - b*x)**S(2)/b + S(1)/S(3)*c**S(3)*(a - b*x)**S(3)/b + S(8)*a**S(3)*c**S(3)*log(a + b*x)/b], [S(1)/((a + b*x)**S(2)*(a*c - b*c*x)), x, S(3), ( - S(1)/S(2))/(a*b*c*(a + b*x)) + S(1)/S(2)*arctanh(b*x/a)/(a**S(2)*b*c)], [(S(1) + x)**(S(1)/S(2))/(S(1) - x)**(S(9)/S(2)), x, S(3), S(1)/S(7)*(S(1) + x)**(S(3)/S(2))/(S(1) - x)**(S(7)/S(2)) + S(2)/S(35)*(S(1) + x)**(S(3)/S(2))/(S(1) - x)**(S(5)/S(2)) + S(2)/S(105)*(S(1) + x)**(S(3)/S(2))/(S(1) - x)**(S(3)/S(2))], [(S(1) + x)**(S(5)/S(2))/(S(1) - x)**(S(1)/S(2)), x, S(5), S(5)/S(2)*arcsin(x) - S(5)/S(6)*(S(1) + x)**(S(3)/S(2))*sqrt(S(1) - x) - S(1)/S(3)*(S(1) + x)**(S(5)/S(2))*sqrt(S(1) - x) - S(5)/S(2)*sqrt(S(1) - x)*sqrt(S(1) + x)], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) def test_5(): test = [ [(S(1) + a*x)**(S(3)/S(2))/sqrt(S(1) - a*x), x, S(4), S(3)/S(2)*arcsin(a*x)/a - S(1)/S(2)*(S(1) + a*x)**(S(3)/S(2))*sqrt(S(1) - a*x)/a - S(3)/S(2)*sqrt(S(1) - a*x)*sqrt(S(1) + a*x)/a], [(S(1) - x)**(S(1)/S(2))/(S(1) + x)**(S(1)/S(2)), x, S(3), arcsin(x) + sqrt(S(1) - x)*sqrt(S(1) + x)], [S(1)/((S(1) - x)**(S(1)/S(2))*(S(1) + x)**(S(3)/S(2))), x, S(1), - sqrt(S(1) - x)/sqrt(S(1) + x)], [(a + a*x)**(S(5)/S(2))*(c - c*x)**(S(5)/S(2)), x, S(5), S(5)/S(24)*a*c*x*(a + a*x)**(S(3)/S(2))*(c - c*x)**(S(3)/S(2)) + S(1)/S(6)*x*(a + a*x)**(S(5)/S(2))*(c - c*x)**(S(5)/S(2)) + S(5)/S(8)*a**(S(5)/S(2))*c**(S(5)/S(2))*arctan(sqrt(c)*sqrt(a + a*x)/(sqrt(a)*sqrt(c - c*x))) + S(5)/S(16)*a**S(2)*c**S(2)*x*sqrt(a + a*x)*sqrt(c - c*x)], [S(1)/((a + a*x)**(S(5)/S(2))*(c - c*x)**(S(5)/S(2))), x, S(2), S(1)/S(3)*x/(a*c*(a + a*x)**(S(3)/S(2))*(c - c*x)**(S(3)/S(2))) + S(2)/S(3)*x/(a**S(2)*c**S(2)*sqrt(a + a*x)*sqrt(c - c*x))], [(S(3) - x)**(S(1)/S(2))*( - S(2) + x)**(S(1)/S(2)), x, S(5), - S(1)/S(8)*arcsin(S(5) - S(2)*x) - S(1)/S(2)*(S(3) - x)**(S(3)/S(2))*sqrt( - S(2) + x) + S(1)/S(4)*sqrt(S(3) - x)*sqrt( - S(2) + x)], [S(1)/(sqrt(a + b*x)*sqrt( - a*d + b*d*x)), x, S(2), S(2)*arctanh(sqrt(d)*sqrt(a + b*x)/sqrt( - a*d + b*d*x))/(b*sqrt(d))], [S(1)/((a - I*a*x)**(S(7)/S(4))*(a + I*a*x)**(S(1)/S(4))), x, S(1), - S(2)/S(3)*I*(a + I*a*x)**(S(3)/S(4))/(a**S(2)*(a - I*a*x)**(S(3)/S(4)))], [(a + b*x)**S(2)*(a*c - b*c*x)**n, x, S(2), - S(4)*a**S(2)*(a*c - b*c*x)**(S(1) + n)/(b*c*(S(1) + n)) + S(4)*a*(a*c - b*c*x)**(S(2) + n)/(b*c**S(2)*(S(2) + n)) - (a*c - b*c*x)**(S(3) + n)/(b*c**S(3)*(S(3) + n))], [(a + b*x)**S(4)*(c + d*x), x, S(2), S(1)/S(5)*(b*c - a*d)*(a + b*x)**S(5)/b**S(2) + S(1)/S(6)*d*(a + b*x)**S(6)/b**S(2)], [(a + b*x)*(c + d*x), x, S(2), a*c*x + S(1)/S(2)*(b*c + a*d)*x**S(2) + S(1)/S(3)*b*d*x**S(3)], [(a + b*x)**S(5)/(c + d*x), x, S(2), b*(b*c - a*d)**S(4)*x/d**S(5) - S(1)/S(2)*(b*c - a*d)**S(3)*(a + b*x)**S(2)/d**S(4) + S(1)/S(3)*(b*c - a*d)**S(2)*(a + b*x)**S(3)/d**S(3) - S(1)/S(4)*(b*c - a*d)*(a + b*x)**S(4)/d**S(2) + S(1)/S(5)*(a + b*x)**S(5)/d - (b*c - a*d)**S(5)*log(c + d*x)/d**S(6)], [(a + b*x)/(c + d*x)**S(3), x, S(1), S(1)/S(2)*(a + b*x)**S(2)/((b*c - a*d)*(c + d*x)**S(2))], [(a + b*x)**S(5)*(c + d*x)**(S(1)/S(2)), x, S(2), - S(2)/S(3)*(b*c - a*d)**S(5)*(c + d*x)**(S(3)/S(2))/d**S(6) + S(2)*b*(b*c - a*d)**S(4)*(c + d*x)**(S(5)/S(2))/d**S(6) - S(20)/S(7)*b**S(2)*(b*c - a*d)**S(3)*(c + d*x)**(S(7)/S(2))/d**S(6) + S(20)/S(9)*b**S(3)*(b*c - a*d)**S(2)*(c + d*x)**(S(9)/S(2))/d**S(6) - S(10)/S(11)*b**S(4)*(b*c - a*d)*(c + d*x)**(S(11)/S(2))/d**S(6) + S(2)/S(13)*b**S(5)*(c + d*x)**(S(13)/S(2))/d**S(6)], [(c + d*x)**(S(1)/S(2))/(a + b*x)**S(2), x, S(3), - d*arctanh(sqrt(b)*sqrt(c + d*x)/sqrt(b*c - a*d))/(b**(S(3)/S(2))*sqrt(b*c - a*d)) - sqrt(c + d*x)/(b*(a + b*x))], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) def test_6(): test = [ [(S(1) + a*x)**(S(3)/S(2))/sqrt(S(1) - a*x), x, S(4), S(3)/S(2)*arcsin(a*x)/a - S(1)/S(2)*(S(1) + a*x)**(S(3)/S(2))*sqrt(S(1) - a*x)/a - S(3)/S(2)*sqrt(S(1) - a*x)*sqrt(S(1) + a*x)/a], [(S(1) - x)**(S(1)/S(2))/(S(1) + x)**(S(1)/S(2)), x, S(3), arcsin(x) + sqrt(S(1) - x)*sqrt(S(1) + x)], [S(1)/((S(1) - x)**(S(1)/S(2))*(S(1) + x)**(S(3)/S(2))), x, S(1), - sqrt(S(1) - x)/sqrt(S(1) + x)], [(a + a*x)**(S(5)/S(2))*(c - c*x)**(S(5)/S(2)), x, S(5), S(5)/S(24)*a*c*x*(a + a*x)**(S(3)/S(2))*(c - c*x)**(S(3)/S(2)) + S(1)/S(6)*x*(a + a*x)**(S(5)/S(2))*(c - c*x)**(S(5)/S(2)) + S(5)/S(8)*a**(S(5)/S(2))*c**(S(5)/S(2))*arctan(sqrt(c)*sqrt(a + a*x)/(sqrt(a)*sqrt(c - c*x))) + S(5)/S(16)*a**S(2)*c**S(2)*x*sqrt(a + a*x)*sqrt(c - c*x)], [S(1)/((a + a*x)**(S(5)/S(2))*(c - c*x)**(S(5)/S(2))), x, S(2), S(1)/S(3)*x/(a*c*(a + a*x)**(S(3)/S(2))*(c - c*x)**(S(3)/S(2))) + S(2)/S(3)*x/(a**S(2)*c**S(2)*sqrt(a + a*x)*sqrt(c - c*x))], [(S(3) - x)**(S(1)/S(2))*( - S(2) + x)**(S(1)/S(2)), x, S(5), - S(1)/S(8)*arcsin(S(5) - S(2)*x) - S(1)/S(2)*(S(3) - x)**(S(3)/S(2))*sqrt( - S(2) + x) + S(1)/S(4)*sqrt(S(3) - x)*sqrt( - S(2) + x)], [S(1)/(sqrt(a + b*x)*sqrt( - a*d + b*d*x)), x, S(2), S(2)*arctanh(sqrt(d)*sqrt(a + b*x)/sqrt( - a*d + b*d*x))/(b*sqrt(d))], [S(1)/((a - I*a*x)**(S(7)/S(4))*(a + I*a*x)**(S(1)/S(4))), x, S(1), - S(2)/S(3)*I*(a + I*a*x)**(S(3)/S(4))/(a**S(2)*(a - I*a*x)**(S(3)/S(4)))], [(a + b*x)**S(2)*(a*c - b*c*x)**n, x, S(2), - S(4)*a**S(2)*(a*c - b*c*x)**(S(1) + n)/(b*c*(S(1) + n)) + S(4)*a*(a*c - b*c*x)**(S(2) + n)/(b*c**S(2)*(S(2) + n)) - (a*c - b*c*x)**(S(3) + n)/(b*c**S(3)*(S(3) + n))], [(a + b*x)**S(4)*(c + d*x), x, S(2), S(1)/S(5)*(b*c - a*d)*(a + b*x)**S(5)/b**S(2) + S(1)/S(6)*d*(a + b*x)**S(6)/b**S(2)], [(a + b*x)*(c + d*x), x, S(2), a*c*x + S(1)/S(2)*(b*c + a*d)*x**S(2) + S(1)/S(3)*b*d*x**S(3)], [(a + b*x)**S(5)/(c + d*x), x, S(2), b*(b*c - a*d)**S(4)*x/d**S(5) - S(1)/S(2)*(b*c - a*d)**S(3)*(a + b*x)**S(2)/d**S(4) + S(1)/S(3)*(b*c - a*d)**S(2)*(a + b*x)**S(3)/d**S(3) - S(1)/S(4)*(b*c - a*d)*(a + b*x)**S(4)/d**S(2) + S(1)/S(5)*(a + b*x)**S(5)/d - (b*c - a*d)**S(5)*log(c + d*x)/d**S(6)], [(a + b*x)/(c + d*x)**S(3), x, S(1), S(1)/S(2)*(a + b*x)**S(2)/((b*c - a*d)*(c + d*x)**S(2))], [(a + b*x)**S(5)*(c + d*x)**(S(1)/S(2)), x, S(2), - S(2)/S(3)*(b*c - a*d)**S(5)*(c + d*x)**(S(3)/S(2))/d**S(6) + S(2)*b*(b*c - a*d)**S(4)*(c + d*x)**(S(5)/S(2))/d**S(6) - S(20)/S(7)*b**S(2)*(b*c - a*d)**S(3)*(c + d*x)**(S(7)/S(2))/d**S(6) + S(20)/S(9)*b**S(3)*(b*c - a*d)**S(2)*(c + d*x)**(S(9)/S(2))/d**S(6) - S(10)/S(11)*b**S(4)*(b*c - a*d)*(c + d*x)**(S(11)/S(2))/d**S(6) + S(2)/S(13)*b**S(5)*(c + d*x)**(S(13)/S(2))/d**S(6)], [(c + d*x)**(S(1)/S(2))/(a + b*x)**S(2), x, S(3), - d*arctanh(sqrt(b)*sqrt(c + d*x)/sqrt(b*c - a*d))/(b**(S(3)/S(2))*sqrt(b*c - a*d)) - sqrt(c + d*x)/(b*(a + b*x))], [(a + b*x)**S(4)/(c + d*x)**(S(1)/S(2)), x, S(2), - S(8)/S(3)*b*(b*c - a*d)**S(3)*(c + d*x)**(S(3)/S(2))/d**S(5) + S(12)/S(5)*b**S(2)*(b*c - a*d)**S(2)*(c + d*x)**(S(5)/S(2))/d**S(5) - S(8)/S(7)*b**S(3)*(b*c - a*d)*(c + d*x)**(S(7)/S(2))/d**S(5) + S(2)/S(9)*b**S(4)*(c + d*x)**(S(9)/S(2))/d**S(5) + S(2)*(b*c - a*d)**S(4)*sqrt(c + d*x)/d**S(5)], [(a + b*x)**S(2)/(c + d*x)**(S(1)/S(2)), x, S(2), - S(4)/S(3)*b*(b*c - a*d)*(c + d*x)**(S(3)/S(2))/d**S(3) + S(2)/S(5)*b**S(2)*(c + d*x)**(S(5)/S(2))/d**S(3) + S(2)*(b*c - a*d)**S(2)*sqrt(c + d*x)/d**S(3)], [(S(1) - x)**(S(1)/S(3))/(S(1) + x), x, S(5), S(3)*(S(1) - x)**(S(1)/S(3)) + S(3)*log(S(2)**(S(1)/S(3)) - (S(1) - x)**(S(1)/S(3)))/S(2)**(S(2)/S(3)) - log(S(1) + x)/S(2)**(S(2)/S(3)) - S(2)**(S(1)/S(3))*arctan((S(1) + S(2)**(S(2)/S(3))*(S(1) - x)**(S(1)/S(3)))/sqrt(S(3)))*sqrt(S(3))], [(c + d*x)**(S(1)/S(2))/(a + b*x)**(S(1)/S(2)), x, S(3), (b*c - a*d)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(3)/S(2))*sqrt(d)) + sqrt(a + b*x)*sqrt(c + d*x)/b], [(a + b*x)**(S(1)/S(2))*(c + d*x)**(S(3)/S(2)), x, S(5), S(1)/S(3)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(3)/S(2))/b - S(1)/S(8)*(b*c - a*d)**S(3)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*d**(S(3)/S(2))) + S(1)/S(4)*(b*c - a*d)*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/b**S(2) + S(1)/S(8)*(b*c - a*d)**S(2)*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(2)*d)], [(a + b*x)**(S(1)/S(2))/(c + d*x)**(S(1)/S(2)), x, S(3), - (b*c - a*d)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(d**(S(3)/S(2))*sqrt(b)) + sqrt(a + b*x)*sqrt(c + d*x)/d], [S(1)/((a + b*x)**(S(1)/S(2))*(c + d*x)**(S(5)/S(2))), x, S(2), S(2)/S(3)*sqrt(a + b*x)/((b*c - a*d)*(c + d*x)**(S(3)/S(2))) + S(4)/S(3)*b*sqrt(a + b*x)/((b*c - a*d)**S(2)*sqrt(c + d*x))], [(a + b*x)**m*(c + d*x)**(S(1) + S(2)*n - S(2)*(S(1) + n)), x, S(2), (a + b*x)**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], - d*(a + b*x)/(b*c - a*d))/((b*c - a*d)*(S(1) + m))], [a + b*x + c*x**S(2) + d*x**S(3), x, S(1), a*x + S(1)/S(2)*b*x**S(2) + S(1)/S(3)*c*x**S(3) + S(1)/S(4)*d*x**S(4)], [a + d/x**S(3) + c/x**S(2) + b/x, x, S(1), - S(1)/S(2)*d/x**S(2) - c/x + a*x + b*log(x)], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) def test_7(): test = [ #[(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(1)/S(3)), x, S(5), S(12)/S(187)*(b*c - a*d)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(1)/S(3))/(b*d) + S(6)/S(17)*(a + b*x)**(S(5)/S(2))*(c + d*x)**(S(1)/S(3))/b - S(108)/S(935)*(b*c - a*d)**S(2)*(c + d*x)**(S(1)/S(3))*sqrt(a + b*x)/(b*d**S(2)) - S(108)/S(935)*S(3)**(S(3)/S(4))*(b*c - a*d)**S(3)*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))*EllipticF(( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) + sqrt(S(3))))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3)))), sqrt( - S(7) + S(4)*sqrt(S(3))))*sqrt(((b*c - a*d)**(S(2)/S(3)) + b**(S(1)/S(3))*(b*c - a*d)**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + b**(S(2)/S(3))*(c + d*x)**(S(2)/S(3)))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3))))**S(2))*sqrt(S(2) - sqrt(S(3)))/(b**(S(4)/S(3))*d**S(3)*sqrt(a - b*c/d + b*(c + d*x)/d)*sqrt( - (b*c - a*d)**(S(1)/S(3))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3))))**S(2)))], #[(a + b*x)**(S(3)/S(2))/(c + d*x)**(S(1)/S(3)), x, S(6), S(6)/S(13)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(2)/S(3))/d - S(54)/S(91)*(b*c - a*d)*(c + d*x)**(S(2)/S(3))*sqrt(a + b*x)/d**S(2) - S(162)/S(91)*(b*c - a*d)**S(2)*sqrt(a - b*c/d + b*(c + d*x)/d)/(b**(S(2)/S(3))*d**S(2)*( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3))))) - S(54)/S(91)*S(3)**(S(3)/S(4))*(b*c - a*d)**(S(7)/S(3))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))*EllipticF(( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) + sqrt(S(3))))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3)))), sqrt( - S(7) + S(4)*sqrt(S(3))))*sqrt(S(2))*sqrt(((b*c - a*d)**(S(2)/S(3)) + b**(S(1)/S(3))*(b*c - a*d)**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + b**(S(2)/S(3))*(c + d*x)**(S(2)/S(3)))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3))))**S(2))/(b**(S(2)/S(3))*d**S(3)*sqrt(a - b*c/d + b*(c + d*x)/d)*sqrt( - (b*c - a*d)**(S(1)/S(3))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3))))**S(2))) + S(81)/S(91)*S(3)**(S(1)/S(4))*(b*c - a*d)**(S(7)/S(3))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))*EllipticE(( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) + sqrt(S(3))))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3)))), sqrt( - S(7) + S(4)*sqrt(S(3))))*sqrt(((b*c - a*d)**(S(2)/S(3)) + b**(S(1)/S(3))*(b*c - a*d)**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + b**(S(2)/S(3))*(c + d*x)**(S(2)/S(3)))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3))))**S(2))*sqrt(S(2) + sqrt(S(3)))/(b**(S(2)/S(3))*d**S(3)*sqrt(a - b*c/d + b*(c + d*x)/d)*sqrt( - (b*c - a*d)**(S(1)/S(3))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))/( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + (b*c - a*d)**(S(1)/S(3))*(S(1) - sqrt(S(3))))**S(2)))], [(a + b*x)**(S(2)/S(3))*(c + d*x)**(S(1)/S(3)), x, S(3), S(1)/S(6)*(b*c - a*d)*(a + b*x)**(S(2)/S(3))*(c + d*x)**(S(1)/S(3))/(b*d) + S(1)/S(2)*(a + b*x)**(S(5)/S(3))*(c + d*x)**(S(1)/S(3))/b + S(1)/S(18)*(b*c - a*d)**S(2)*log(c + d*x)/(b**(S(4)/S(3))*d**(S(5)/S(3))) + S(1)/S(6)*(b*c - a*d)**S(2)*log( - S(1) + d**(S(1)/S(3))*(a + b*x)**(S(1)/S(3))/(b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))))/(b**(S(4)/S(3))*d**(S(5)/S(3))) + S(1)/S(3)*(b*c - a*d)**S(2)*arctan(S(1)/sqrt(S(3)) + S(2)*d**(S(1)/S(3))*(a + b*x)**(S(1)/S(3))/(b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*sqrt(S(3))))/(b**(S(4)/S(3))*d**(S(5)/S(3))*sqrt(S(3)))], [(a + b*x)**(S(4)/S(3))/(c + d*x)**(S(1)/S(3)), x, S(3), - S(2)/S(3)*(b*c - a*d)*(a + b*x)**(S(1)/S(3))*(c + d*x)**(S(2)/S(3))/d**S(2) + S(1)/S(2)*(a + b*x)**(S(4)/S(3))*(c + d*x)**(S(2)/S(3))/d - S(1)/S(9)*(b*c - a*d)**S(2)*log(a + b*x)/(b**(S(2)/S(3))*d**(S(7)/S(3))) - S(1)/S(3)*(b*c - a*d)**S(2)*log( - S(1) + b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))/(d**(S(1)/S(3))*(a + b*x)**(S(1)/S(3))))/(b**(S(2)/S(3))*d**(S(7)/S(3))) - S(2)/S(3)*(b*c - a*d)**S(2)*arctan(S(1)/sqrt(S(3)) + S(2)*b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))/(d**(S(1)/S(3))*(a + b*x)**(S(1)/S(3))*sqrt(S(3))))/(b**(S(2)/S(3))*d**(S(7)/S(3))*sqrt(S(3)))], #[(a + b*x)**(S(5)/S(2))/(c + d*x)**(S(1)/S(4)), x, S(10), - S(40)/S(117)*(b*c - a*d)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(3)/S(4))/d**S(2) + S(4)/S(13)*(a + b*x)**(S(5)/S(2))*(c + d*x)**(S(3)/S(4))/d + S(16)/S(39)*(b*c - a*d)**S(2)*(c + d*x)**(S(3)/S(4))*sqrt(a + b*x)/d**S(3) - S(32)/S(39)*(b*c - a*d)**(S(15)/S(4))*EllipticE(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))/(b*c - a*d)**(S(1)/S(4)), I)*sqrt(S(1) - b*(c + d*x)/(b*c - a*d))/(b**(S(3)/S(4))*d**S(4)*sqrt(a - b*c/d + b*(c + d*x)/d)) + S(32)/S(39)*(b*c - a*d)**(S(15)/S(4))*EllipticF(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))/(b*c - a*d)**(S(1)/S(4)), I)*sqrt(S(1) - b*(c + d*x)/(b*c - a*d))/(b**(S(3)/S(4))*d**S(4)*sqrt(a - b*c/d + b*(c + d*x)/d))], [(c + d*x)**(S(5)/S(4))/(a + b*x)**(S(25)/S(4)), x, S(4), - S(4)/S(21)*(c + d*x)**(S(9)/S(4))/((b*c - a*d)*(a + b*x)**(S(21)/S(4))) + S(16)/S(119)*d*(c + d*x)**(S(9)/S(4))/((b*c - a*d)**S(2)*(a + b*x)**(S(17)/S(4))) - S(128)/S(1547)*d**S(2)*(c + d*x)**(S(9)/S(4))/((b*c - a*d)**S(3)*(a + b*x)**(S(13)/S(4))) + S(512)/S(13923)*d**S(3)*(c + d*x)**(S(9)/S(4))/((b*c - a*d)**S(4)*(a + b*x)**(S(9)/S(4)))], [(a + b*x)**(S(5)/S(4))/(c + d*x)**(S(1)/S(4)), x, S(6), - S(5)/S(8)*(b*c - a*d)*(a + b*x)**(S(1)/S(4))*(c + d*x)**(S(3)/S(4))/d**S(2) + S(1)/S(2)*(a + b*x)**(S(5)/S(4))*(c + d*x)**(S(3)/S(4))/d + S(5)/S(16)*(b*c - a*d)**S(2)*arctan(d**(S(1)/S(4))*(a + b*x)**(S(1)/S(4))/(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))))/(b**(S(3)/S(4))*d**(S(9)/S(4))) + S(5)/S(16)*(b*c - a*d)**S(2)*arctanh(d**(S(1)/S(4))*(a + b*x)**(S(1)/S(4))/(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))))/(b**(S(3)/S(4))*d**(S(9)/S(4)))], [S(1)/((a + b*x)**(S(3)/S(4))*(c + d*x)**(S(1)/S(4))), x, S(4), S(2)*arctan(d**(S(1)/S(4))*(a + b*x)**(S(1)/S(4))/(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))))/(b**(S(3)/S(4))*d**(S(1)/S(4))) + S(2)*arctanh(d**(S(1)/S(4))*(a + b*x)**(S(1)/S(4))/(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))))/(b**(S(3)/S(4))*d**(S(1)/S(4)))], #[(a + b*x)**(S(3)/S(2))/(c + d*x)**(S(1)/S(5)), x, S(2), S(2)/S(5)*(a + b*x)**(S(5)/S(2))*(b*(c + d*x)/(b*c - a*d))**(S(1)/S(5))*hypergeom([S(1)/S(5), S(5)/S(2)], [S(7)/S(2)], - d*(a + b*x)/(b*c - a*d))/(b*(c + d*x)**(S(1)/S(5)))], #[(a + b*x)**(S(5)/S(2))/(c + d*x)**(S(1)/S(6)), x, S(7), - S(9)/S(28)*(b*c - a*d)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(5)/S(6))/d**S(2) + S(3)/S(10)*(a + b*x)**(S(5)/S(2))*(c + d*x)**(S(5)/S(6))/d + S(81)/S(224)*(b*c - a*d)**S(2)*(c + d*x)**(S(5)/S(6))*sqrt(a + b*x)/d**S(3) + S(243)/S(448)*(b*c - a*d)**S(3)*(c + d*x)**(S(1)/S(6))*(S(1) + sqrt(S(3)))*sqrt(a - b*c/d + b*(c + d*x)/d)/(b**(S(2)/S(3))*d**S(3)*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))) + S(243)/S(448)*S(3)**(S(1)/S(4))*(b*c - a*d)**(S(10)/S(3))*(c + d*x)**(S(1)/S(6))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))*sqrt(cos(arccos(((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) - sqrt(S(3))))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))))**S(2))/cos(arccos(((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) - sqrt(S(3))))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))))*EllipticE(sin(arccos(((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) - sqrt(S(3))))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3)))))), sqrt(S(1)/S(4)*(S(2) + sqrt(S(3)))))*sqrt(((b*c - a*d)**(S(2)/S(3)) + b**(S(1)/S(3))*(b*c - a*d)**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + b**(S(2)/S(3))*(c + d*x)**(S(2)/S(3)))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))**S(2))/(b**(S(2)/S(3))*d**S(4)*sqrt(a - b*c/d + b*(c + d*x)/d)*sqrt( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))**S(2))) + S(81)/S(896)*S(3)**(S(3)/S(4))*(b*c - a*d)**(S(10)/S(3))*(c + d*x)**(S(1)/S(6))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))*sqrt(cos(arccos(((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) - sqrt(S(3))))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))))**S(2))/cos(arccos(((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) - sqrt(S(3))))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))))*EllipticF(sin(arccos(((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) - sqrt(S(3))))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3)))))), sqrt(S(1)/S(4)*(S(2) + sqrt(S(3)))))*(S(1) - sqrt(S(3)))*sqrt(((b*c - a*d)**(S(2)/S(3)) + b**(S(1)/S(3))*(b*c - a*d)**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)) + b**(S(2)/S(3))*(c + d*x)**(S(2)/S(3)))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))**S(2))/(b**(S(2)/S(3))*d**S(4)*sqrt(a - b*c/d + b*(c + d*x)/d)*sqrt( - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3)))/((b*c - a*d)**(S(1)/S(3)) - b**(S(1)/S(3))*(c + d*x)**(S(1)/S(3))*(S(1) + sqrt(S(3))))**S(2)))], #[(a + b*x)**m*(c + d*x)**n, x, S(2), - (a + b*x)**(S(1) + m)*(c + d*x)**(S(1) + n)*hypergeom([S(1), S(2) + m + n], [S(2) + n], b*(c + d*x)/(b*c - a*d))/((b*c - a*d)*(S(1) + n)), (a + b*x)**(S(1) + m)*(c + d*x)**n*hypergeom([S(1) + m, - n], [S(2) + m], - d*(a + b*x)/(b*c - a*d))/(b*(S(1) + m)*(b*(c + d*x)/(b*c - a*d))**n)], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) def test_numerical(): test = [ [(a + b*x)**(S(1)/S(2))*(c + d*x)**(S(1)/S(4)), x, S(5), S(4)/S(7)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(1)/S(4))/b + S(4)/S(21)*(b*c - a*d)*(c + d*x)**(S(1)/S(4))*sqrt(a + b*x)/(b*d) - S(8)/S(21)*(b*c - a*d)**(S(9)/S(4))*EllipticF(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))/(b*c - a*d)**(S(1)/S(4)), I)*sqrt(S(1) - b*(c + d*x)/(b*c - a*d))/(b**(S(5)/S(4))*d**S(2)*sqrt(a - b*c/d + b*(c + d*x)/d))], [S(1)/((a + b*x)*(a*d/b + d*x)**S(3)), x, S(2), - S(1)/S(3)*b**S(2)/(d**S(3)*(a + b*x)**S(3))], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True, _numerical=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True, _numerical=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True, _numerical=True)
83c38bb04d234d043438dae7e8f58c758250be3b6d23798aea8e581a608043c4
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.rubi import rubi_integrate from sympy.functions import log, sqrt, exp, cos, sin, tan, sec, csc, cot, sinh, sech, atan, asin, acos, atanh, asinh, acosh from sympy.functions.elementary.hyperbolic import acsch as arccsch from sympy.functions.elementary.trigonometric import acsc as arccsc from sympy.integrals.rubi.utility_function import (EllipticE, EllipticF, Int, ArcCsch, ArcCsc, Gamma, hypergeom, rubi_test, AppellF1, EllipticPi, Log, Sqrt, ArcTan, ArcTanh, ArcSin, ArcSinh, ArcCosh, ArcTanh, ArcCos, Hypergeometric2F1) from sympy.core.numbers import (I, pi) from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import (exp, exp_polar) from sympy.functions.special.error_functions import (Ei, erf, erfi) from sympy.functions.special.gamma_functions import (gamma, uppergamma) from sympy.functions.special.hyper import hyper from sympy.functions.special.zeta_functions import polylog from sympy.integrals.integrals import Integral from sympy.simplify.simplify import simplify from sympy.testing.pytest import SKIP a, b, c, d, e, f, m, n, x, u , k, p, r, s, t= symbols('a b c d e f m n x u k p r s t') A, B, C, D, a, b, c, d, e, f, g, h, i, y, z, m, n, p, q, u, v, w, E, F, G, H = symbols('A B C D a b c d e f g h i y z m n p q u v w E F G H') def test_1(): assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**m, x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**(-m)*(d + e*x)**m*Gamma(m + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**S(4), x), x, F**(c*(a + b*x))*(d + e*x)**S(4)/(b*c*log(F)) - S(4)*F**(c*(a + b*x))*e*(d + e*x)**S(3)/(b**S(2)*c**S(2)*log(F)**S(2)) + S(12)*F**(c*(a + b*x))*e**S(2)*(d + e*x)**S(2)/(b**S(3)*c**S(3)*log(F)**S(3)) - S(24)*F**(c*(a + b*x))*e**S(3)*(d + e*x)/(b**S(4)*c**S(4)*log(F)**S(4)) + S(24)*F**(c*(a + b*x))*e**S(4)/(b**S(5)*c**S(5)*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**S(3), x), x, F**(c*(a + b*x))*(d + e*x)**S(3)/(b*c*log(F)) - S(3)*F**(c*(a + b*x))*e*(d + e*x)**S(2)/(b**S(2)*c**S(2)*log(F)**S(2)) + S(6)*F**(c*(a + b*x))*e**S(2)*(d + e*x)/(b**S(3)*c**S(3)*log(F)**S(3)) - S(6)*F**(c*(a + b*x))*e**S(3)/(b**S(4)*c**S(4)*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**S(2), x), x, F**(c*(a + b*x))*(d + e*x)**S(2)/(b*c*log(F)) - S(2)*F**(c*(a + b*x))*e*(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2)) + S(2)*F**(c*(a + b*x))*e**S(2)/(b**S(3)*c**S(3)*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x), x), x, F**(c*(a + b*x))*(d + e*x)/(b*c*log(F)) - F**(c*(a + b*x))*e/(b**S(2)*c**S(2)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x)), x), x, F**(c*(a + b*x))/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x), x), x, F**(c*(a - b*d/e))*Ei(b*c*(d + e*x)*log(F)/e)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x)**S(2), x), x, -F**(c*(a + b*x))/(e*(d + e*x)) + F**(c*(a - b*d/e))*b*c*log(F)*Ei(b*c*(d + e*x)*log(F)/e)/e**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x)**S(3), x), x, -F**(c*(a + b*x))*b*c*log(F)/(S(2)*e**S(2)*(d + e*x)) - F**(c*(a + b*x))/(S(2)*e*(d + e*x)**S(2)) + F**(c*(a - b*d/e))*b**S(2)*c**S(2)*log(F)**S(2)*Ei(b*c*(d + e*x)*log(F)/e)/(S(2)*e**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x)**S(4), x), x, -F**(c*(a + b*x))*b**S(2)*c**S(2)*log(F)**S(2)/(S(6)*e**S(3)*(d + e*x)) - F**(c*(a + b*x))*b*c*log(F)/(S(6)*e**S(2)*(d + e*x)**S(2)) - F**(c*(a + b*x))/(S(3)*e*(d + e*x)**S(3)) + F**(c*(a - b*d/e))*b**S(3)*c**S(3)*log(F)**S(3)*Ei(b*c*(d + e*x)*log(F)/e)/(S(6)*e**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x)**S(5), x), x, -F**(c*(a + b*x))*b**S(3)*c**S(3)*log(F)**S(3)/(S(24)*e**S(4)*(d + e*x)) - F**(c*(a + b*x))*b**S(2)*c**S(2)*log(F)**S(2)/(S(24)*e**S(3)*(d + e*x)**S(2)) - F**(c*(a + b*x))*b*c*log(F)/(S(12)*e**S(2)*(d + e*x)**S(3)) - F**(c*(a + b*x))/(S(4)*e*(d + e*x)**S(4)) + F**(c*(a - b*d/e))*b**S(4)*c**S(4)*log(F)**S(4)*Ei(b*c*(d + e*x)*log(F)/e)/(S(24)*e**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d**S(4) + S(4)*d**S(3)*e*x + S(6)*d**S(2)*e**S(2)*x**S(2) + S(4)*d*e**S(3)*x**S(3) + e**S(4)*x**S(4)), x), x, F**(c*(a + b*x))*(d + e*x)**S(4)/(b*c*log(F)) - S(4)*F**(c*(a + b*x))*e*(d + e*x)**S(3)/(b**S(2)*c**S(2)*log(F)**S(2)) + S(12)*F**(c*(a + b*x))*e**S(2)*(d + e*x)**S(2)/(b**S(3)*c**S(3)*log(F)**S(3)) - S(24)*F**(c*(a + b*x))*e**S(3)*(d + e*x)/(b**S(4)*c**S(4)*log(F)**S(4)) + S(24)*F**(c*(a + b*x))*e**S(4)/(b**S(5)*c**S(5)*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d**S(3) + S(3)*d**S(2)*e*x + S(3)*d*e**S(2)*x**S(2) + e**S(3)*x**S(3)), x), x, F**(c*(a + b*x))*(d + e*x)**S(3)/(b*c*log(F)) - S(3)*F**(c*(a + b*x))*e*(d + e*x)**S(2)/(b**S(2)*c**S(2)*log(F)**S(2)) + S(6)*F**(c*(a + b*x))*e**S(2)*(d + e*x)/(b**S(3)*c**S(3)*log(F)**S(3)) - S(6)*F**(c*(a + b*x))*e**S(3)/(b**S(4)*c**S(4)*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d**S(2) + S(2)*d*e*x + e**S(2)*x**S(2)), x), x, F**(c*(a + b*x))*(d + e*x)**S(2)/(b*c*log(F)) - S(2)*F**(c*(a + b*x))*e*(d + e*x)/(b**S(2)*c**S(2)*log(F)**S(2)) + S(2)*F**(c*(a + b*x))*e**S(2)/(b**S(3)*c**S(3)*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d**S(2) + S(2)*d*e*x + e**S(2)*x**S(2)), x), x, -F**(c*(a + b*x))/(e*(d + e*x)) + F**(c*(a - b*d/e))*b*c*log(F)*Ei(b*c*(d + e*x)*log(F)/e)/e**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d**S(3) + S(3)*d**S(2)*e*x + S(3)*d*e**S(2)*x**S(2) + e**S(3)*x**S(3)), x), x, -F**(c*(a + b*x))*b*c*log(F)/(S(2)*e**S(2)*(d + e*x)) - F**(c*(a + b*x))/(S(2)*e*(d + e*x)**S(2)) + F**(c*(a - b*d/e))*b**S(2)*c**S(2)*log(F)**S(2)*Ei(b*c*(d + e*x)*log(F)/e)/(S(2)*e**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d**S(4) + S(4)*d**S(3)*e*x + S(6)*d**S(2)*e**S(2)*x**S(2) + S(4)*d*e**S(3)*x**S(3) + e**S(4)*x**S(4)), x), x, -F**(c*(a + b*x))*b**S(2)*c**S(2)*log(F)**S(2)/(S(6)*e**S(3)*(d + e*x)) - F**(c*(a + b*x))*b*c*log(F)/(S(6)*e**S(2)*(d + e*x)**S(2)) - F**(c*(a + b*x))/(S(3)*e*(d + e*x)**S(3)) + F**(c*(a - b*d/e))*b**S(3)*c**S(3)*log(F)**S(3)*Ei(b*c*(d + e*x)*log(F)/e)/(S(6)*e**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d**S(5) + S(5)*d**S(4)*e*x + S(10)*d**S(3)*e**S(2)*x**S(2) + S(10)*d**S(2)*e**S(3)*x**S(3) + S(5)*d*e**S(4)*x**S(4) + e**S(5)*x**S(5)), x), x, -F**(c*(a + b*x))*b**S(3)*c**S(3)*log(F)**S(3)/(S(24)*e**S(4)*(d + e*x)) - F**(c*(a + b*x))*b**S(2)*c**S(2)*log(F)**S(2)/(S(24)*e**S(3)*(d + e*x)**S(2)) - F**(c*(a + b*x))*b*c*log(F)/(S(12)*e**S(2)*(d + e*x)**S(3)) - F**(c*(a + b*x))/(S(4)*e*(d + e*x)**S(4)) + F**(c*(a - b*d/e))*b**S(4)*c**S(4)*log(F)**S(4)*Ei(b*c*(d + e*x)*log(F)/e)/(S(24)*e**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*((d + e*x)**n)**m, x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**(-m*n)*((d + e*x)**n)**m*Gamma(m*n + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d**S(4) + S(4)*d**S(3)*e*x + S(6)*d**S(2)*e**S(2)*x**S(2) + S(4)*d*e**S(3)*x**S(3) + e**S(4)*x**S(4))**m, x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**(-S(4)*m)*((d + e*x)**S(4))**m*Gamma(S(4)*m + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d**S(3) + S(3)*d**S(2)*e*x + S(3)*d*e**S(2)*x**S(2) + e**S(3)*x**S(3))**m, x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**(-S(3)*m)*((d + e*x)**S(3))**m*Gamma(S(3)*m + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d**S(2) + S(2)*d*e*x + e**S(2)*x**S(2))**m, x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**(-S(2)*m)*((d + e*x)**S(2))**m*Gamma(S(2)*m + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**m, x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**(-m)*(d + e*x)**m*Gamma(m + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**(-m), x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**m*(d + e*x)**(-m)*Gamma(-m + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d**S(2) + S(2)*d*e*x + e**S(2)*x**S(2))**(-m), x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**(S(2)*m)*((d + e*x)**S(2))**(-m)*Gamma(-S(2)*m + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d**S(3) + S(3)*d**S(2)*e*x + S(3)*d*e**S(2)*x**S(2) + e**S(3)*x**S(3))**(-m), x), x, F**(c*(a - b*d/e))*(-b*c*(d + e*x)*log(F)/e)**(S(3)*m)*((d + e*x)**S(3))**(-m)*Gamma(-S(3)*m + S(1), -b*c*(d + e*x)*log(F)/e)/(b*c*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(S(5)*x + S(2)), x), x, F**(S(5)*x + S(2))/(S(5)*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x), x), x, F**(a + b*x)/(b*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(10)**(S(5)*x + S(2)), x), x, S(2)**(S(5)*x + S(2))*S(5)**(S(5)*x + S(1))/log(S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)*x**(S(7)/2), x), x, S(105)*sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(x)*sqrt(log(F)))/(S(16)*b**(S(9)/2)*log(F)**(S(9)/2)) + F**(a + b*x)*x**(S(7)/2)/(b*log(F)) - S(7)*F**(a + b*x)*x**(S(5)/2)/(S(2)*b**S(2)*log(F)**S(2)) + S(35)*F**(a + b*x)*x**(S(3)/2)/(S(4)*b**S(3)*log(F)**S(3)) - S(105)*F**(a + b*x)*sqrt(x)/(S(8)*b**S(4)*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)*x**(S(5)/2), x), x, -S(15)*sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(x)*sqrt(log(F)))/(S(8)*b**(S(7)/2)*log(F)**(S(7)/2)) + F**(a + b*x)*x**(S(5)/2)/(b*log(F)) - S(5)*F**(a + b*x)*x**(S(3)/2)/(S(2)*b**S(2)*log(F)**S(2)) + S(15)*F**(a + b*x)*sqrt(x)/(S(4)*b**S(3)*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)*x**(S(3)/2), x), x, S(3)*sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(x)*sqrt(log(F)))/(S(4)*b**(S(5)/2)*log(F)**(S(5)/2)) + F**(a + b*x)*x**(S(3)/2)/(b*log(F)) - S(3)*F**(a + b*x)*sqrt(x)/(S(2)*b**S(2)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)*sqrt(x), x), x, -sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(x)*sqrt(log(F)))/(S(2)*b**(S(3)/2)*log(F)**(S(3)/2)) + F**(a + b*x)*sqrt(x)/(b*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)/sqrt(x), x), x, sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(x)*sqrt(log(F)))/(sqrt(b)*sqrt(log(F))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)/x**(S(3)/2), x), x, S(2)*sqrt(pi)*F**a*sqrt(b)*sqrt(log(F))*erfi(sqrt(b)*sqrt(x)*sqrt(log(F))) - S(2)*F**(a + b*x)/sqrt(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)/x**(S(5)/2), x), x, S(4)*sqrt(pi)*F**a*b**(S(3)/2)*log(F)**(S(3)/2)*erfi(sqrt(b)*sqrt(x)*sqrt(log(F)))/S(3) - S(4)*F**(a + b*x)*b*log(F)/(S(3)*sqrt(x)) - S(2)*F**(a + b*x)/(S(3)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)/x**(S(7)/2), x), x, S(8)*sqrt(pi)*F**a*b**(S(5)/2)*log(F)**(S(5)/2)*erfi(sqrt(b)*sqrt(x)*sqrt(log(F)))/S(15) - S(8)*F**(a + b*x)*b**S(2)*log(F)**S(2)/(S(15)*sqrt(x)) - S(4)*F**(a + b*x)*b*log(F)/(S(15)*x**(S(3)/2)) - S(2)*F**(a + b*x)/(S(5)*x**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x)/x**(S(9)/2), x), x, S(16)*sqrt(pi)*F**a*b**(S(7)/2)*log(F)**(S(7)/2)*erfi(sqrt(b)*sqrt(x)*sqrt(log(F)))/S(105) - S(16)*F**(a + b*x)*b**S(3)*log(F)**S(3)/(S(105)*sqrt(x)) - S(8)*F**(a + b*x)*b**S(2)*log(F)**S(2)/(S(105)*x**(S(3)/2)) - S(4)*F**(a + b*x)*b*log(F)/(S(35)*x**(S(5)/2)) - S(2)*F**(a + b*x)/(S(7)*x**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**(S(7)/2), x), x, F**(c*(a + b*x))*(d + e*x)**(S(7)/2)/(b*c*log(F)) - S(7)*F**(c*(a + b*x))*e*(d + e*x)**(S(5)/2)/(S(2)*b**S(2)*c**S(2)*log(F)**S(2)) + S(35)*F**(c*(a + b*x))*e**S(2)*(d + e*x)**(S(3)/2)/(S(4)*b**S(3)*c**S(3)*log(F)**S(3)) - S(105)*F**(c*(a + b*x))*e**S(3)*sqrt(d + e*x)/(S(8)*b**S(4)*c**S(4)*log(F)**S(4)) + S(105)*sqrt(pi)*F**(c*(a - b*d/e))*e**(S(7)/2)*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/(S(16)*b**(S(9)/2)*c**(S(9)/2)*log(F)**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**(S(5)/2), x), x, F**(c*(a + b*x))*(d + e*x)**(S(5)/2)/(b*c*log(F)) - S(5)*F**(c*(a + b*x))*e*(d + e*x)**(S(3)/2)/(S(2)*b**S(2)*c**S(2)*log(F)**S(2)) + S(15)*F**(c*(a + b*x))*e**S(2)*sqrt(d + e*x)/(S(4)*b**S(3)*c**S(3)*log(F)**S(3)) - S(15)*sqrt(pi)*F**(c*(a - b*d/e))*e**(S(5)/2)*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/(S(8)*b**(S(7)/2)*c**(S(7)/2)*log(F)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**(S(3)/2), x), x, F**(c*(a + b*x))*(d + e*x)**(S(3)/2)/(b*c*log(F)) - S(3)*F**(c*(a + b*x))*e*sqrt(d + e*x)/(S(2)*b**S(2)*c**S(2)*log(F)**S(2)) + S(3)*sqrt(pi)*F**(c*(a - b*d/e))*e**(S(3)/2)*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/(S(4)*b**(S(5)/2)*c**(S(5)/2)*log(F)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*sqrt(d + e*x), x), x, F**(c*(a + b*x))*sqrt(d + e*x)/(b*c*log(F)) - sqrt(pi)*F**(c*(a - b*d/e))*sqrt(e)*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/(S(2)*b**(S(3)/2)*c**(S(3)/2)*log(F)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/sqrt(d + e*x), x), x, sqrt(pi)*F**(c*(a - b*d/e))*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/(sqrt(b)*sqrt(c)*sqrt(e)*sqrt(log(F))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x)**(S(3)/2), x), x, -S(2)*F**(c*(a + b*x))/(e*sqrt(d + e*x)) + S(2)*sqrt(pi)*F**(c*(a - b*d/e))*sqrt(b)*sqrt(c)*sqrt(log(F))*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/e**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x)**(S(5)/2), x), x, -S(4)*F**(c*(a + b*x))*b*c*log(F)/(S(3)*e**S(2)*sqrt(d + e*x)) - S(2)*F**(c*(a + b*x))/(S(3)*e*(d + e*x)**(S(3)/2)) + S(4)*sqrt(pi)*F**(c*(a - b*d/e))*b**(S(3)/2)*c**(S(3)/2)*log(F)**(S(3)/2)*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/(S(3)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x)**(S(7)/2), x), x, -S(8)*F**(c*(a + b*x))*b**S(2)*c**S(2)*log(F)**S(2)/(S(15)*e**S(3)*sqrt(d + e*x)) - S(4)*F**(c*(a + b*x))*b*c*log(F)/(S(15)*e**S(2)*(d + e*x)**(S(3)/2)) - S(2)*F**(c*(a + b*x))/(S(5)*e*(d + e*x)**(S(5)/2)) + S(8)*sqrt(pi)*F**(c*(a - b*d/e))*b**(S(5)/2)*c**(S(5)/2)*log(F)**(S(5)/2)*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/(S(15)*e**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))/(d + e*x)**(S(9)/2), x), x, -S(16)*F**(c*(a + b*x))*b**S(3)*c**S(3)*log(F)**S(3)/(S(105)*e**S(4)*sqrt(d + e*x)) - S(8)*F**(c*(a + b*x))*b**S(2)*c**S(2)*log(F)**S(2)/(S(105)*e**S(3)*(d + e*x)**(S(3)/2)) - S(4)*F**(c*(a + b*x))*b*c*log(F)/(S(35)*e**S(2)*(d + e*x)**(S(5)/2)) - S(2)*F**(c*(a + b*x))/(S(7)*e*(d + e*x)**(S(7)/2)) + S(16)*sqrt(pi)*F**(c*(a - b*d/e))*b**(S(7)/2)*c**(S(7)/2)*log(F)**(S(7)/2)*erfi(sqrt(b)*sqrt(c)*sqrt(d + e*x)*sqrt(log(F))/sqrt(e))/(S(105)*e**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(13)/2)*exp(-b*x), x), x, -x**(S(13)/2)*exp(-b*x)/b - S(13)*x**(S(11)/2)*exp(-b*x)/(S(2)*b**S(2)) - S(143)*x**(S(9)/2)*exp(-b*x)/(S(4)*b**S(3)) - S(1287)*x**(S(7)/2)*exp(-b*x)/(S(8)*b**S(4)) - S(9009)*x**(S(5)/2)*exp(-b*x)/(S(16)*b**S(5)) - S(45045)*x**(S(3)/2)*exp(-b*x)/(S(32)*b**S(6)) - S(135135)*sqrt(x)*exp(-b*x)/(S(64)*b**S(7)) + S(135135)*sqrt(pi)*erf(sqrt(b)*sqrt(x))/(S(128)*b**(S(15)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x)**(S(4)/3), x), x, -F**(c*(a - b*d/e))*e*(d + e*x)**(S(1)/3)*Gamma(S(7)/3, -b*c*(d + e*x)*log(F)/e)/(b**S(2)*c**S(2)*(-b*c*(d + e*x)*log(F)/e)**(S(1)/3)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**(S(4)/3)*(F**(c*(a + b*x)))**n, x), x, -F**(-c*n*(a + b*x) + c*n*(a - b*d/e))*e*(d + e*x)**(S(1)/3)*(F**(c*(a + b*x)))**n*Gamma(S(7)/3, -b*c*n*(d + e*x)*log(F)/e)/(b**S(2)*c**S(2)*n**S(2)*(-b*c*n*(d + e*x)*log(F)/e)**(S(1)/3)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x), x), x, F**(c*(a + b*x))*(d + e*x)/(b*c*log(F)) - F**(c*(a + b*x))*e/(b**S(2)*c**S(2)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x + f*x**S(2)), x), x, F**(c*(a + b*x))*d/(b*c*log(F)) + F**(c*(a + b*x))*e*x/(b*c*log(F)) + F**(c*(a + b*x))*f*x**S(2)/(b*c*log(F)) - F**(c*(a + b*x))*e/(b**S(2)*c**S(2)*log(F)**S(2)) - S(2)*F**(c*(a + b*x))*f*x/(b**S(2)*c**S(2)*log(F)**S(2)) + S(2)*F**(c*(a + b*x))*f/(b**S(3)*c**S(3)*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x + f*x**S(2) + g*x**S(3)), x), x, F**(c*(a + b*x))*d/(b*c*log(F)) + F**(c*(a + b*x))*e*x/(b*c*log(F)) + F**(c*(a + b*x))*f*x**S(2)/(b*c*log(F)) + F**(c*(a + b*x))*g*x**S(3)/(b*c*log(F)) - F**(c*(a + b*x))*e/(b**S(2)*c**S(2)*log(F)**S(2)) - S(2)*F**(c*(a + b*x))*f*x/(b**S(2)*c**S(2)*log(F)**S(2)) - S(3)*F**(c*(a + b*x))*g*x**S(2)/(b**S(2)*c**S(2)*log(F)**S(2)) + S(2)*F**(c*(a + b*x))*f/(b**S(3)*c**S(3)*log(F)**S(3)) + S(6)*F**(c*(a + b*x))*g*x/(b**S(3)*c**S(3)*log(F)**S(3)) - S(6)*F**(c*(a + b*x))*g/(b**S(4)*c**S(4)*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4)), x), x, F**(c*(a + b*x))*d/(b*c*log(F)) + F**(c*(a + b*x))*e*x/(b*c*log(F)) + F**(c*(a + b*x))*f*x**S(2)/(b*c*log(F)) + F**(c*(a + b*x))*g*x**S(3)/(b*c*log(F)) + F**(c*(a + b*x))*h*x**S(4)/(b*c*log(F)) - F**(c*(a + b*x))*e/(b**S(2)*c**S(2)*log(F)**S(2)) - S(2)*F**(c*(a + b*x))*f*x/(b**S(2)*c**S(2)*log(F)**S(2)) - S(3)*F**(c*(a + b*x))*g*x**S(2)/(b**S(2)*c**S(2)*log(F)**S(2)) - S(4)*F**(c*(a + b*x))*h*x**S(3)/(b**S(2)*c**S(2)*log(F)**S(2)) + S(2)*F**(c*(a + b*x))*f/(b**S(3)*c**S(3)*log(F)**S(3)) + S(6)*F**(c*(a + b*x))*g*x/(b**S(3)*c**S(3)*log(F)**S(3)) + S(12)*F**(c*(a + b*x))*h*x**S(2)/(b**S(3)*c**S(3)*log(F)**S(3)) - S(6)*F**(c*(a + b*x))*g/(b**S(4)*c**S(4)*log(F)**S(4)) - S(24)*F**(c*(a + b*x))*h*x/(b**S(4)*c**S(4)*log(F)**S(4)) + S(24)*F**(c*(a + b*x))*h/(b**S(5)*c**S(5)*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a + b*x)**S(3)*exp(-a - b*x), x), x, -a**S(3)*x**m*(b*x)**(-m)*Gamma(m + S(1), b*x)*exp(-a)/b - S(3)*a**S(2)*x**m*(b*x)**(-m)*Gamma(m + S(2), b*x)*exp(-a)/b - S(3)*a*x**m*(b*x)**(-m)*Gamma(m + S(3), b*x)*exp(-a)/b - x**m*(b*x)**(-m)*Gamma(m + S(4), b*x)*exp(-a)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)**S(3)*exp(-a - b*x), x), x, -a**S(3)*x**S(3)*exp(-a - b*x)/b - S(3)*a**S(3)*x**S(2)*exp(-a - b*x)/b**S(2) - S(6)*a**S(3)*x*exp(-a - b*x)/b**S(3) - S(6)*a**S(3)*exp(-a - b*x)/b**S(4) - S(3)*a**S(2)*x**S(4)*exp(-a - b*x) - S(12)*a**S(2)*x**S(3)*exp(-a - b*x)/b - S(36)*a**S(2)*x**S(2)*exp(-a - b*x)/b**S(2) - S(72)*a**S(2)*x*exp(-a - b*x)/b**S(3) - S(72)*a**S(2)*exp(-a - b*x)/b**S(4) - S(3)*a*b*x**S(5)*exp(-a - b*x) - S(15)*a*x**S(4)*exp(-a - b*x) - S(60)*a*x**S(3)*exp(-a - b*x)/b - S(180)*a*x**S(2)*exp(-a - b*x)/b**S(2) - S(360)*a*x*exp(-a - b*x)/b**S(3) - S(360)*a*exp(-a - b*x)/b**S(4) - b**S(2)*x**S(6)*exp(-a - b*x) - S(6)*b*x**S(5)*exp(-a - b*x) - S(30)*x**S(4)*exp(-a - b*x) - S(120)*x**S(3)*exp(-a - b*x)/b - S(360)*x**S(2)*exp(-a - b*x)/b**S(2) - S(720)*x*exp(-a - b*x)/b**S(3) - S(720)*exp(-a - b*x)/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**S(3)*exp(-a - b*x), x), x, -a**S(3)*x**S(2)*exp(-a - b*x)/b - S(2)*a**S(3)*x*exp(-a - b*x)/b**S(2) - S(2)*a**S(3)*exp(-a - b*x)/b**S(3) - S(3)*a**S(2)*x**S(3)*exp(-a - b*x) - S(9)*a**S(2)*x**S(2)*exp(-a - b*x)/b - S(18)*a**S(2)*x*exp(-a - b*x)/b**S(2) - S(18)*a**S(2)*exp(-a - b*x)/b**S(3) - S(3)*a*b*x**S(4)*exp(-a - b*x) - S(12)*a*x**S(3)*exp(-a - b*x) - S(36)*a*x**S(2)*exp(-a - b*x)/b - S(72)*a*x*exp(-a - b*x)/b**S(2) - S(72)*a*exp(-a - b*x)/b**S(3) - b**S(2)*x**S(5)*exp(-a - b*x) - S(5)*b*x**S(4)*exp(-a - b*x) - S(20)*x**S(3)*exp(-a - b*x) - S(60)*x**S(2)*exp(-a - b*x)/b - S(120)*x*exp(-a - b*x)/b**S(2) - S(120)*exp(-a - b*x)/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**S(3)*exp(-a - b*x), x), x, a*(a + b*x)**S(3)*exp(-a - b*x)/b**S(2) + S(3)*a*(a + b*x)**S(2)*exp(-a - b*x)/b**S(2) + S(6)*a*(a + b*x)*exp(-a - b*x)/b**S(2) + S(6)*a*exp(-a - b*x)/b**S(2) - (a + b*x)**S(4)*exp(-a - b*x)/b**S(2) - S(4)*(a + b*x)**S(3)*exp(-a - b*x)/b**S(2) - S(12)*(a + b*x)**S(2)*exp(-a - b*x)/b**S(2) - S(24)*(a + b*x)*exp(-a - b*x)/b**S(2) - S(24)*exp(-a - b*x)/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(-a - b*x), x), x, -(a + b*x)**S(3)*exp(-a - b*x)/b - S(3)*(a + b*x)**S(2)*exp(-a - b*x)/b - S(6)*(a + b*x)*exp(-a - b*x)/b - S(6)*exp(-a - b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(-a - b*x)/x, x), x, a**S(3)*exp(-a)*Ei(-b*x) - S(3)*a**S(2)*exp(-a - b*x) - S(3)*a*b*x*exp(-a - b*x) - S(3)*a*exp(-a - b*x) - b**S(2)*x**S(2)*exp(-a - b*x) - S(2)*b*x*exp(-a - b*x) - S(2)*exp(-a - b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(-a - b*x)/x**S(2), x), x, -a**S(3)*b*exp(-a)*Ei(-b*x) - a**S(3)*exp(-a - b*x)/x + S(3)*a**S(2)*b*exp(-a)*Ei(-b*x) - S(3)*a*b*exp(-a - b*x) - b**S(2)*x*exp(-a - b*x) - b*exp(-a - b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(-a - b*x)/x**S(3), x), x, a**S(3)*b**S(2)*exp(-a)*Ei(-b*x)/S(2) + a**S(3)*b*exp(-a - b*x)/(S(2)*x) - a**S(3)*exp(-a - b*x)/(S(2)*x**S(2)) - S(3)*a**S(2)*b**S(2)*exp(-a)*Ei(-b*x) - S(3)*a**S(2)*b*exp(-a - b*x)/x + S(3)*a*b**S(2)*exp(-a)*Ei(-b*x) - b**S(2)*exp(-a - b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(-a - b*x)/x**S(4), x), x, -a**S(3)*b**S(3)*exp(-a)*Ei(-b*x)/S(6) - a**S(3)*b**S(2)*exp(-a - b*x)/(S(6)*x) + a**S(3)*b*exp(-a - b*x)/(S(6)*x**S(2)) - a**S(3)*exp(-a - b*x)/(S(3)*x**S(3)) + S(3)*a**S(2)*b**S(3)*exp(-a)*Ei(-b*x)/S(2) + S(3)*a**S(2)*b**S(2)*exp(-a - b*x)/(S(2)*x) - S(3)*a**S(2)*b*exp(-a - b*x)/(S(2)*x**S(2)) - S(3)*a*b**S(3)*exp(-a)*Ei(-b*x) - S(3)*a*b**S(2)*exp(-a - b*x)/x + b**S(3)*exp(-a)*Ei(-b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*x**m*(e + f*x)**S(2), x), x, F**(a + b*c)*e**S(2)*x**m*(-b*d*x*log(F))**(-m)*Gamma(m + S(1), -b*d*x*log(F))/(b*d*log(F)) - S(2)*F**(a + b*c)*e*f*x**m*(-b*d*x*log(F))**(-m)*Gamma(m + S(2), -b*d*x*log(F))/(b**S(2)*d**S(2)*log(F)**S(2)) + F**(a + b*c)*f**S(2)*x**m*(-b*d*x*log(F))**(-m)*Gamma(m + S(3), -b*d*x*log(F))/(b**S(3)*d**S(3)*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*x**S(3)*(e + f*x)**S(2), x), x, F**(a + b*c + b*d*x)*e**S(2)*x**S(3)/(b*d*log(F)) + S(2)*F**(a + b*c + b*d*x)*e*f*x**S(4)/(b*d*log(F)) + F**(a + b*c + b*d*x)*f**S(2)*x**S(5)/(b*d*log(F)) - S(3)*F**(a + b*c + b*d*x)*e**S(2)*x**S(2)/(b**S(2)*d**S(2)*log(F)**S(2)) - S(8)*F**(a + b*c + b*d*x)*e*f*x**S(3)/(b**S(2)*d**S(2)*log(F)**S(2)) - S(5)*F**(a + b*c + b*d*x)*f**S(2)*x**S(4)/(b**S(2)*d**S(2)*log(F)**S(2)) + S(6)*F**(a + b*c + b*d*x)*e**S(2)*x/(b**S(3)*d**S(3)*log(F)**S(3)) + S(24)*F**(a + b*c + b*d*x)*e*f*x**S(2)/(b**S(3)*d**S(3)*log(F)**S(3)) + S(20)*F**(a + b*c + b*d*x)*f**S(2)*x**S(3)/(b**S(3)*d**S(3)*log(F)**S(3)) - S(6)*F**(a + b*c + b*d*x)*e**S(2)/(b**S(4)*d**S(4)*log(F)**S(4)) - S(48)*F**(a + b*c + b*d*x)*e*f*x/(b**S(4)*d**S(4)*log(F)**S(4)) - S(60)*F**(a + b*c + b*d*x)*f**S(2)*x**S(2)/(b**S(4)*d**S(4)*log(F)**S(4)) + S(48)*F**(a + b*c + b*d*x)*e*f/(b**S(5)*d**S(5)*log(F)**S(5)) + S(120)*F**(a + b*c + b*d*x)*f**S(2)*x/(b**S(5)*d**S(5)*log(F)**S(5)) - S(120)*F**(a + b*c + b*d*x)*f**S(2)/(b**S(6)*d**S(6)*log(F)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*x**S(2)*(e + f*x)**S(2), x), x, F**(a + b*c + b*d*x)*e**S(2)*x**S(2)/(b*d*log(F)) + S(2)*F**(a + b*c + b*d*x)*e*f*x**S(3)/(b*d*log(F)) + F**(a + b*c + b*d*x)*f**S(2)*x**S(4)/(b*d*log(F)) - S(2)*F**(a + b*c + b*d*x)*e**S(2)*x/(b**S(2)*d**S(2)*log(F)**S(2)) - S(6)*F**(a + b*c + b*d*x)*e*f*x**S(2)/(b**S(2)*d**S(2)*log(F)**S(2)) - S(4)*F**(a + b*c + b*d*x)*f**S(2)*x**S(3)/(b**S(2)*d**S(2)*log(F)**S(2)) + S(2)*F**(a + b*c + b*d*x)*e**S(2)/(b**S(3)*d**S(3)*log(F)**S(3)) + S(12)*F**(a + b*c + b*d*x)*e*f*x/(b**S(3)*d**S(3)*log(F)**S(3)) + S(12)*F**(a + b*c + b*d*x)*f**S(2)*x**S(2)/(b**S(3)*d**S(3)*log(F)**S(3)) - S(12)*F**(a + b*c + b*d*x)*e*f/(b**S(4)*d**S(4)*log(F)**S(4)) - S(24)*F**(a + b*c + b*d*x)*f**S(2)*x/(b**S(4)*d**S(4)*log(F)**S(4)) + S(24)*F**(a + b*c + b*d*x)*f**S(2)/(b**S(5)*d**S(5)*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*x*(e + f*x)**S(2), x), x, F**(a + b*c + b*d*x)*e**S(2)*x/(b*d*log(F)) + S(2)*F**(a + b*c + b*d*x)*e*f*x**S(2)/(b*d*log(F)) + F**(a + b*c + b*d*x)*f**S(2)*x**S(3)/(b*d*log(F)) - F**(a + b*c + b*d*x)*e**S(2)/(b**S(2)*d**S(2)*log(F)**S(2)) - S(4)*F**(a + b*c + b*d*x)*e*f*x/(b**S(2)*d**S(2)*log(F)**S(2)) - S(3)*F**(a + b*c + b*d*x)*f**S(2)*x**S(2)/(b**S(2)*d**S(2)*log(F)**S(2)) + S(4)*F**(a + b*c + b*d*x)*e*f/(b**S(3)*d**S(3)*log(F)**S(3)) + S(6)*F**(a + b*c + b*d*x)*f**S(2)*x/(b**S(3)*d**S(3)*log(F)**S(3)) - S(6)*F**(a + b*c + b*d*x)*f**S(2)/(b**S(4)*d**S(4)*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*(e + f*x)**S(2), x), x, F**(a + b*c + b*d*x)*(e + f*x)**S(2)/(b*d*log(F)) - S(2)*F**(a + b*c + b*d*x)*f*(e + f*x)/(b**S(2)*d**S(2)*log(F)**S(2)) + S(2)*F**(a + b*c + b*d*x)*f**S(2)/(b**S(3)*d**S(3)*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*(e + f*x)**S(2)/x, x), x, F**(a + b*c)*e**S(2)*Ei(b*d*x*log(F)) + S(2)*F**(a + b*c + b*d*x)*e*f/(b*d*log(F)) + F**(a + b*c + b*d*x)*f**S(2)*x/(b*d*log(F)) - F**(a + b*c + b*d*x)*f**S(2)/(b**S(2)*d**S(2)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*(e + f*x)**S(2)/x**S(2), x), x, F**(a + b*c)*b*d*e**S(2)*log(F)*Ei(b*d*x*log(F)) + S(2)*F**(a + b*c)*e*f*Ei(b*d*x*log(F)) - F**(a + b*c + b*d*x)*e**S(2)/x + F**(a + b*c + b*d*x)*f**S(2)/(b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*(e + f*x)**S(2)/x**S(3), x), x, F**(a + b*c)*b**S(2)*d**S(2)*e**S(2)*log(F)**S(2)*Ei(b*d*x*log(F))/S(2) + S(2)*F**(a + b*c)*b*d*e*f*log(F)*Ei(b*d*x*log(F)) + F**(a + b*c)*f**S(2)*Ei(b*d*x*log(F)) - F**(a + b*c + b*d*x)*b*d*e**S(2)*log(F)/(S(2)*x) - F**(a + b*c + b*d*x)*e**S(2)/(S(2)*x**S(2)) - S(2)*F**(a + b*c + b*d*x)*e*f/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*(e + f*x)**S(2)/x**S(4), x), x, F**(a + b*c)*b**S(3)*d**S(3)*e**S(2)*log(F)**S(3)*Ei(b*d*x*log(F))/S(6) + F**(a + b*c)*b**S(2)*d**S(2)*e*f*log(F)**S(2)*Ei(b*d*x*log(F)) + F**(a + b*c)*b*d*f**S(2)*log(F)*Ei(b*d*x*log(F)) - F**(a + b*c + b*d*x)*b**S(2)*d**S(2)*e**S(2)*log(F)**S(2)/(S(6)*x) - F**(a + b*c + b*d*x)*b*d*e**S(2)*log(F)/(S(6)*x**S(2)) - F**(a + b*c + b*d*x)*b*d*e*f*log(F)/x - F**(a + b*c + b*d*x)*e**S(2)/(S(3)*x**S(3)) - F**(a + b*c + b*d*x)*e*f/x**S(2) - F**(a + b*c + b*d*x)*f**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x))*(e + f*x)**S(2)/x**S(5), x), x, F**(a + b*c)*b**S(4)*d**S(4)*e**S(2)*log(F)**S(4)*Ei(b*d*x*log(F))/S(24) + F**(a + b*c)*b**S(3)*d**S(3)*e*f*log(F)**S(3)*Ei(b*d*x*log(F))/S(3) + F**(a + b*c)*b**S(2)*d**S(2)*f**S(2)*log(F)**S(2)*Ei(b*d*x*log(F))/S(2) - F**(a + b*c + b*d*x)*b**S(3)*d**S(3)*e**S(2)*log(F)**S(3)/(S(24)*x) - F**(a + b*c + b*d*x)*b**S(2)*d**S(2)*e**S(2)*log(F)**S(2)/(S(24)*x**S(2)) - F**(a + b*c + b*d*x)*b**S(2)*d**S(2)*e*f*log(F)**S(2)/(S(3)*x) - F**(a + b*c + b*d*x)*b*d*e**S(2)*log(F)/(S(12)*x**S(3)) - F**(a + b*c + b*d*x)*b*d*e*f*log(F)/(S(3)*x**S(2)) - F**(a + b*c + b*d*x)*b*d*f**S(2)*log(F)/(S(2)*x) - F**(a + b*c + b*d*x)*e**S(2)/(S(4)*x**S(4)) - S(2)*F**(a + b*c + b*d*x)*e*f/(S(3)*x**S(3)) - F**(a + b*c + b*d*x)*f**S(2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*(c + d*x)**S(3)*exp(-a - b*x), x), x, -d**S(3)*(a + b*x)**S(7)*exp(-a - b*x)/b**S(4) - S(7)*d**S(3)*(a + b*x)**S(6)*exp(-a - b*x)/b**S(4) - S(42)*d**S(3)*(a + b*x)**S(5)*exp(-a - b*x)/b**S(4) - S(210)*d**S(3)*(a + b*x)**S(4)*exp(-a - b*x)/b**S(4) - S(840)*d**S(3)*(a + b*x)**S(3)*exp(-a - b*x)/b**S(4) - S(2520)*d**S(3)*(a + b*x)**S(2)*exp(-a - b*x)/b**S(4) - S(5040)*d**S(3)*(a + b*x)*exp(-a - b*x)/b**S(4) - S(5040)*d**S(3)*exp(-a - b*x)/b**S(4) - S(3)*d**S(2)*(a + b*x)**S(6)*(-a*d + b*c)*exp(-a - b*x)/b**S(4) - S(18)*d**S(2)*(a + b*x)**S(5)*(-a*d + b*c)*exp(-a - b*x)/b**S(4) - S(90)*d**S(2)*(a + b*x)**S(4)*(-a*d + b*c)*exp(-a - b*x)/b**S(4) - S(360)*d**S(2)*(a + b*x)**S(3)*(-a*d + b*c)*exp(-a - b*x)/b**S(4) - S(1080)*d**S(2)*(a + b*x)**S(2)*(-a*d + b*c)*exp(-a - b*x)/b**S(4) - S(2160)*d**S(2)*(a + b*x)*(-a*d + b*c)*exp(-a - b*x)/b**S(4) - S(2160)*d**S(2)*(-a*d + b*c)*exp(-a - b*x)/b**S(4) - S(3)*d*(a + b*x)**S(5)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(4) - S(15)*d*(a + b*x)**S(4)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(4) - S(60)*d*(a + b*x)**S(3)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(4) - S(180)*d*(a + b*x)**S(2)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(4) - S(360)*d*(a + b*x)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(4) - S(360)*d*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(4) - (a + b*x)**S(4)*(-a*d + b*c)**S(3)*exp(-a - b*x)/b**S(4) - S(4)*(a + b*x)**S(3)*(-a*d + b*c)**S(3)*exp(-a - b*x)/b**S(4) - S(12)*(a + b*x)**S(2)*(-a*d + b*c)**S(3)*exp(-a - b*x)/b**S(4) - S(24)*(a + b*x)*(-a*d + b*c)**S(3)*exp(-a - b*x)/b**S(4) - S(24)*(-a*d + b*c)**S(3)*exp(-a - b*x)/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*(c + d*x)**S(2)*exp(-a - b*x), x), x, -d**S(2)*(a + b*x)**S(6)*exp(-a - b*x)/b**S(3) - S(6)*d**S(2)*(a + b*x)**S(5)*exp(-a - b*x)/b**S(3) - S(30)*d**S(2)*(a + b*x)**S(4)*exp(-a - b*x)/b**S(3) - S(120)*d**S(2)*(a + b*x)**S(3)*exp(-a - b*x)/b**S(3) - S(360)*d**S(2)*(a + b*x)**S(2)*exp(-a - b*x)/b**S(3) - S(720)*d**S(2)*(a + b*x)*exp(-a - b*x)/b**S(3) - S(720)*d**S(2)*exp(-a - b*x)/b**S(3) - S(2)*d*(a + b*x)**S(5)*(-a*d + b*c)*exp(-a - b*x)/b**S(3) - S(10)*d*(a + b*x)**S(4)*(-a*d + b*c)*exp(-a - b*x)/b**S(3) - S(40)*d*(a + b*x)**S(3)*(-a*d + b*c)*exp(-a - b*x)/b**S(3) - S(120)*d*(a + b*x)**S(2)*(-a*d + b*c)*exp(-a - b*x)/b**S(3) - S(240)*d*(a + b*x)*(-a*d + b*c)*exp(-a - b*x)/b**S(3) - S(240)*d*(-a*d + b*c)*exp(-a - b*x)/b**S(3) - (a + b*x)**S(4)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(3) - S(4)*(a + b*x)**S(3)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(3) - S(12)*(a + b*x)**S(2)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(3) - S(24)*(a + b*x)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(3) - S(24)*(-a*d + b*c)**S(2)*exp(-a - b*x)/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*(c + d*x)*exp(-a - b*x), x), x, -d*(a + b*x)**S(5)*exp(-a - b*x)/b**S(2) - S(5)*d*(a + b*x)**S(4)*exp(-a - b*x)/b**S(2) - S(20)*d*(a + b*x)**S(3)*exp(-a - b*x)/b**S(2) - S(60)*d*(a + b*x)**S(2)*exp(-a - b*x)/b**S(2) - S(120)*d*(a + b*x)*exp(-a - b*x)/b**S(2) - S(120)*d*exp(-a - b*x)/b**S(2) - (a + b*x)**S(4)*(-a*d + b*c)*exp(-a - b*x)/b**S(2) - (a + b*x)**S(3)*(-S(4)*a*d + S(4)*b*c)*exp(-a - b*x)/b**S(2) - (a + b*x)**S(2)*(-S(12)*a*d + S(12)*b*c)*exp(-a - b*x)/b**S(2) - (a + b*x)*(-S(24)*a*d + S(24)*b*c)*exp(-a - b*x)/b**S(2) - (-S(24)*a*d + S(24)*b*c)*exp(-a - b*x)/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*exp(-a - b*x), x), x, -(a + b*x)**S(4)*exp(-a - b*x)/b - S(4)*(a + b*x)**S(3)*exp(-a - b*x)/b - S(12)*(a + b*x)**S(2)*exp(-a - b*x)/b - S(24)*(a + b*x)*exp(-a - b*x)/b - S(24)*exp(-a - b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*exp(-a - b*x)/(c + d*x), x), x, -(a + b*x)**S(3)*exp(-a - b*x)/d - S(3)*(a + b*x)**S(2)*exp(-a - b*x)/d - S(6)*(a + b*x)*exp(-a - b*x)/d - S(6)*exp(-a - b*x)/d + (a + b*x)**S(2)*(-a*d + b*c)*exp(-a - b*x)/d**S(2) + (a + b*x)*(-S(2)*a*d + S(2)*b*c)*exp(-a - b*x)/d**S(2) + (-S(2)*a*d + S(2)*b*c)*exp(-a - b*x)/d**S(2) - (a + b*x)*(-a*d + b*c)**S(2)*exp(-a - b*x)/d**S(3) - (-a*d + b*c)**S(2)*exp(-a - b*x)/d**S(3) + (-a*d + b*c)**S(3)*exp(-a - b*x)/d**S(4) + (-a*d + b*c)**S(4)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*exp(-a - b*x)/(c + d*x)**S(2), x), x, -b**S(3)*(c + d*x)**S(2)*exp(-a - b*x)/d**S(4) - S(2)*b**S(2)*(c + d*x)*exp(-a - b*x)/d**S(3) + S(4)*b**S(2)*(c + d*x)*(-a*d + b*c)*exp(-a - b*x)/d**S(4) - S(2)*b*exp(-a - b*x)/d**S(2) + S(4)*b*(-a*d + b*c)*exp(-a - b*x)/d**S(3) - S(6)*b*(-a*d + b*c)**S(2)*exp(-a - b*x)/d**S(4) - S(4)*b*(-a*d + b*c)**S(3)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(5) - b*(-a*d + b*c)**S(4)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(6) - (-a*d + b*c)**S(4)*exp(-a - b*x)/(d**S(5)*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*exp(-a - b*x)/(c + d*x)**S(3), x), x, -b**S(3)*x*exp(-a - b*x)/d**S(3) - b**S(2)*exp(-a - b*x)/d**S(3) + b**S(2)*(-S(4)*a*d + S(3)*b*c)*exp(-a - b*x)/d**S(4) + S(6)*b**S(2)*(-a*d + b*c)**S(2)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(5) + S(4)*b**S(2)*(-a*d + b*c)**S(3)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(6) + b**S(2)*(-a*d + b*c)**S(4)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/(S(2)*d**S(7)) + S(4)*b*(-a*d + b*c)**S(3)*exp(-a - b*x)/(d**S(5)*(c + d*x)) + b*(-a*d + b*c)**S(4)*exp(-a - b*x)/(S(2)*d**S(6)*(c + d*x)) - (-a*d + b*c)**S(4)*exp(-a - b*x)/(S(2)*d**S(5)*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*exp(-a - b*x)/(c + d*x)**S(4), x), x, -b**S(3)*exp(-a - b*x)/d**S(4) - S(4)*b**S(3)*(-a*d + b*c)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(5) - S(6)*b**S(3)*(-a*d + b*c)**S(2)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(6) - S(2)*b**S(3)*(-a*d + b*c)**S(3)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(7) - b**S(3)*(-a*d + b*c)**S(4)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/(S(6)*d**S(8)) - S(6)*b**S(2)*(-a*d + b*c)**S(2)*exp(-a - b*x)/(d**S(5)*(c + d*x)) - S(2)*b**S(2)*(-a*d + b*c)**S(3)*exp(-a - b*x)/(d**S(6)*(c + d*x)) - b**S(2)*(-a*d + b*c)**S(4)*exp(-a - b*x)/(S(6)*d**S(7)*(c + d*x)) + S(2)*b*(-a*d + b*c)**S(3)*exp(-a - b*x)/(d**S(5)*(c + d*x)**S(2)) + b*(-a*d + b*c)**S(4)*exp(-a - b*x)/(S(6)*d**S(6)*(c + d*x)**S(2)) - (-a*d + b*c)**S(4)*exp(-a - b*x)/(S(3)*d**S(5)*(c + d*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*exp(-a - b*x)/(c + d*x)**S(5), x), x, b**S(4)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(5) + S(4)*b**S(4)*(-a*d + b*c)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(6) + S(3)*b**S(4)*(-a*d + b*c)**S(2)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/d**S(7) + S(2)*b**S(4)*(-a*d + b*c)**S(3)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/(S(3)*d**S(8)) + b**S(4)*(-a*d + b*c)**S(4)*exp(-a + b*c/d)*Ei(-b*(c + d*x)/d)/(S(24)*d**S(9)) + S(4)*b**S(3)*(-a*d + b*c)*exp(-a - b*x)/(d**S(5)*(c + d*x)) + S(3)*b**S(3)*(-a*d + b*c)**S(2)*exp(-a - b*x)/(d**S(6)*(c + d*x)) + S(2)*b**S(3)*(-a*d + b*c)**S(3)*exp(-a - b*x)/(S(3)*d**S(7)*(c + d*x)) + b**S(3)*(-a*d + b*c)**S(4)*exp(-a - b*x)/(S(24)*d**S(8)*(c + d*x)) - S(3)*b**S(2)*(-a*d + b*c)**S(2)*exp(-a - b*x)/(d**S(5)*(c + d*x)**S(2)) - S(2)*b**S(2)*(-a*d + b*c)**S(3)*exp(-a - b*x)/(S(3)*d**S(6)*(c + d*x)**S(2)) - b**S(2)*(-a*d + b*c)**S(4)*exp(-a - b*x)/(S(24)*d**S(7)*(c + d*x)**S(2)) + S(4)*b*(-a*d + b*c)**S(3)*exp(-a - b*x)/(S(3)*d**S(5)*(c + d*x)**S(3)) + b*(-a*d + b*c)**S(4)*exp(-a - b*x)/(S(12)*d**S(6)*(c + d*x)**S(3)) - (-a*d + b*c)**S(4)*exp(-a - b*x)/(S(4)*d**S(5)*(c + d*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*x**m*(e*n + e*(b*c*x*log(F) + m + S(1))*log(d*x) + e)*log(d*x)**n, x), x, F**(c*(a + b*x))*e*x**(m + S(1))*log(d*x)**(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*x**S(2)*(e*n + e*(b*c*x*log(F) + S(3))*log(d*x) + e)*log(d*x)**n, x), x, F**(c*(a + b*x))*e*x**S(3)*log(d*x)**(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*x*(e*n + e*(b*c*x*log(F) + S(2))*log(d*x) + e)*log(d*x)**n, x), x, F**(c*(a + b*x))*e*x**S(2)*log(d*x)**(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(e*n + e*(b*c*x*log(F) + S(1))*log(d*x) + e)*log(d*x)**n, x), x, F**(c*(a + b*x))*e*x*log(d*x)**(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(b*c*e*x*log(F)*log(d*x) + e*n + e)*log(d*x)**n/x, x), x, F**(c*(a + b*x))*e*log(d*x)**(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(e*n + e*(b*c*x*log(F) + S(-1))*log(d*x) + e)*log(d*x)**n/x**S(2), x), x, F**(c*(a + b*x))*e*log(d*x)**(n + S(1))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x))*(e*n + e*(b*c*x*log(F) + S(-2))*log(d*x) + e)*log(d*x)**n/x**S(3), x), x, F**(c*(a + b*x))*e*log(d*x)**(n + S(1))/x**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(exp(a + b*x)), x), x, S(2)*x**S(4)*sqrt(exp(a + b*x))/b - S(16)*x**S(3)*sqrt(exp(a + b*x))/b**S(2) + S(96)*x**S(2)*sqrt(exp(a + b*x))/b**S(3) - S(384)*x*sqrt(exp(a + b*x))/b**S(4) + S(768)*sqrt(exp(a + b*x))/b**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(exp(a + b*x)), x), x, S(2)*x**S(3)*sqrt(exp(a + b*x))/b - S(12)*x**S(2)*sqrt(exp(a + b*x))/b**S(2) + S(48)*x*sqrt(exp(a + b*x))/b**S(3) - S(96)*sqrt(exp(a + b*x))/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(exp(a + b*x)), x), x, S(2)*x**S(2)*sqrt(exp(a + b*x))/b - S(8)*x*sqrt(exp(a + b*x))/b**S(2) + S(16)*sqrt(exp(a + b*x))/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(exp(a + b*x)), x), x, S(2)*x*sqrt(exp(a + b*x))/b - S(4)*sqrt(exp(a + b*x))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(exp(a + b*x)), x), x, S(2)*sqrt(exp(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(exp(a + b*x))/x, x), x, exp(-b*x/S(2))*sqrt(exp(a + b*x))*Ei(b*x/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(exp(a + b*x))/x**S(2), x), x, b*exp(-b*x/S(2))*sqrt(exp(a + b*x))*Ei(b*x/S(2))/S(2) - sqrt(exp(a + b*x))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(exp(a + b*x))/x**S(3), x), x, b**S(2)*exp(-b*x/S(2))*sqrt(exp(a + b*x))*Ei(b*x/S(2))/S(8) - b*sqrt(exp(a + b*x))/(S(4)*x) - sqrt(exp(a + b*x))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(exp(a + b*x))/x**S(4), x), x, b**S(3)*exp(-b*x/S(2))*sqrt(exp(a + b*x))*Ei(b*x/S(2))/S(48) - b**S(2)*sqrt(exp(a + b*x))/(S(24)*x) - b*sqrt(exp(a + b*x))/(S(12)*x**S(2)) - sqrt(exp(a + b*x))/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) def test_2(): assert rubi_test(rubi_integrate(f**(c + d*x)*x**S(3)/(a + b*f**(c + d*x)), x), x, x**S(3)*log(S(1) + b*f**(c + d*x)/a)/(b*d*log(f)) + S(3)*x**S(2)*polylog(S(2), -b*f**(c + d*x)/a)/(b*d**S(2)*log(f)**S(2)) - S(6)*x*polylog(S(3), -b*f**(c + d*x)/a)/(b*d**S(3)*log(f)**S(3)) + S(6)*polylog(S(4), -b*f**(c + d*x)/a)/(b*d**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)*x**S(2)/(a + b*f**(c + d*x)), x), x, x**S(2)*log(S(1) + b*f**(c + d*x)/a)/(b*d*log(f)) + S(2)*x*polylog(S(2), -b*f**(c + d*x)/a)/(b*d**S(2)*log(f)**S(2)) - S(2)*polylog(S(3), -b*f**(c + d*x)/a)/(b*d**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)*x/(a + b*f**(c + d*x)), x), x, x*log(S(1) + b*f**(c + d*x)/a)/(b*d*log(f)) + polylog(S(2), -b*f**(c + d*x)/a)/(b*d**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(a + b*f**(c + d*x)), x), x, log(a + b*f**(c + d*x))/(b*d*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(x*(a + b*f**(c + d*x))), x), x, Integral(f**(c + d*x)/(x*(a + b*f**(c + d*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(x**S(2)*(a + b*f**(c + d*x))), x), x, Integral(f**(c + d*x)/(x**S(2)*(a + b*f**(c + d*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)*x**S(3)/(a + b*f**(c + d*x))**S(2), x), x, -x**S(3)/(b*d*(a + b*f**(c + d*x))*log(f)) - S(3)*x**S(2)*log(a*f**(-c - d*x)/b + S(1))/(a*b*d**S(2)*log(f)**S(2)) + S(6)*x*polylog(S(2), -a*f**(-c - d*x)/b)/(a*b*d**S(3)*log(f)**S(3)) + S(6)*polylog(S(3), -a*f**(-c - d*x)/b)/(a*b*d**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)*x**S(2)/(a + b*f**(c + d*x))**S(2), x), x, -x**S(2)/(b*d*(a + b*f**(c + d*x))*log(f)) - S(2)*x*log(a*f**(-c - d*x)/b + S(1))/(a*b*d**S(2)*log(f)**S(2)) + S(2)*polylog(S(2), -a*f**(-c - d*x)/b)/(a*b*d**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)*x/(a + b*f**(c + d*x))**S(2), x), x, -x/(b*d*(a + b*f**(c + d*x))*log(f)) + x/(a*b*d*log(f)) - log(a + b*f**(c + d*x))/(a*b*d**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(a + b*f**(c + d*x))**S(2), x), x, -S(1)/(b*d*(a + b*f**(c + d*x))*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(x*(a + b*f**(c + d*x))**S(2)), x), x, -Integral(S(1)/(x**S(2)*(a + b*f**(c + d*x))), x)/(b*d*log(f)) - S(1)/(b*d*x*(a + b*f**(c + d*x))*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(x**S(2)*(a + b*f**(c + d*x))**S(2)), x), x, -S(2)*Integral(S(1)/(x**S(3)*(a + b*f**(c + d*x))), x)/(b*d*log(f)) - S(1)/(b*d*x**S(2)*(a + b*f**(c + d*x))*log(f)), expand=True, _diff=True, _numerical=True) # recursion assert rubi_test(rubi_integrate(f**(c + d*x)*x**S(3)/(a + b*f**(c + d*x))**S(3), x), x, -x**S(3)/(S(2)*b*d*(a + b*f**(c + d*x))**S(2)*log(f)) + S(3)*x**S(2)/(S(2)*a*b*d**S(2)*(a + b*f**(c + d*x))*log(f)**S(2)) + x**S(3)/(S(2)*a**S(2)*b*d*log(f)) - S(3)*x**S(2)*log(S(1) + b*f**(c + d*x)/a)/(S(2)*a**S(2)*b*d**S(2)*log(f)**S(2)) + S(3)*x*log(a*f**(-c - d*x)/b + S(1))/(a**S(2)*b*d**S(3)*log(f)**S(3)) - S(3)*x*polylog(S(2), -b*f**(c + d*x)/a)/(a**S(2)*b*d**S(3)*log(f)**S(3)) - S(3)*polylog(S(2), -a*f**(-c - d*x)/b)/(a**S(2)*b*d**S(4)*log(f)**S(4)) + S(3)*polylog(S(3), -b*f**(c + d*x)/a)/(a**S(2)*b*d**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)*x**S(2)/(a + b*f**(c + d*x))**S(3), x), x, -x**S(2)/(S(2)*b*d*(a + b*f**(c + d*x))**S(2)*log(f)) + x/(a*b*d**S(2)*(a + b*f**(c + d*x))*log(f)**S(2)) + x**S(2)/(S(2)*a**S(2)*b*d*log(f)) - x*log(S(1) + b*f**(c + d*x)/a)/(a**S(2)*b*d**S(2)*log(f)**S(2)) - x/(a**S(2)*b*d**S(2)*log(f)**S(2)) + log(a + b*f**(c + d*x))/(a**S(2)*b*d**S(3)*log(f)**S(3)) - polylog(S(2), -b*f**(c + d*x)/a)/(a**S(2)*b*d**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)*x/(a + b*f**(c + d*x))**S(3), x), x, -x/(S(2)*b*d*(a + b*f**(c + d*x))**S(2)*log(f)) + S(1)/(S(2)*a*b*d**S(2)*(a + b*f**(c + d*x))*log(f)**S(2)) + x/(S(2)*a**S(2)*b*d*log(f)) - log(a + b*f**(c + d*x))/(S(2)*a**S(2)*b*d**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(a + b*f**(c + d*x))**S(3), x), x, -S(1)/(S(2)*b*d*(a + b*f**(c + d*x))**S(2)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(x*(a + b*f**(c + d*x))**S(3)), x), x, -Integral(S(1)/(x**S(2)*(a + b*f**(c + d*x))**S(2)), x)/(S(2)*b*d*log(f)) - S(1)/(S(2)*b*d*x*(a + b*f**(c + d*x))**S(2)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c + d*x)/(x**S(2)*(a + b*f**(c + d*x))**S(3)), x), x, -Integral(S(1)/(x**S(3)*(a + b*f**(c + d*x))**S(2)), x)/(b*d*log(f)) - S(1)/(S(2)*b*d*x**S(2)*(a + b*f**(c + d*x))**S(2)*log(f)), expand=True, _diff=True, _numerical=True) def test_3(): assert rubi_test(rubi_integrate(exp(x)/(S(6)*exp(x) + S(4)), x), x, log(S(3)*exp(x) + S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(a + b*exp(x)), x), x, log(a + b*exp(x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(d*x)/(a + b*exp(c + d*x)), x), x, exp(-c)*log(a + b*exp(c + d*x))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(c + d*x)/(a + b*exp(c + d*x)), x), x, log(a + b*exp(c + d*x))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(x))**n*exp(x), x), x, (a + b*exp(x))**(n + S(1))/(b*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(c + d*x))**n*exp(d*x), x), x, (a + b*exp(c + d*x))**(n + S(1))*exp(-c)/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(c + d*x))**n*exp(c + d*x), x), x, (a + b*exp(c + d*x))**(n + S(1))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**x/(F**x*b + a), x), x, log(F**x*b + a)/(b*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(d*x)/(F**(c + d*x)*b + a), x), x, F**(-c)*log(F**(c + d*x)*b + a)/(b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c + d*x)/(F**(c + d*x)*b + a), x), x, log(F**(c + d*x)*b + a)/(b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**x*(F**x*b + a)**n, x), x, (F**x*b + a)**(n + S(1))/(b*(n + S(1))*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(d*x)*(F**(c + d*x)*b + a)**n, x), x, F**(-c)*(F**(c + d*x)*b + a)**(n + S(1))/(b*d*(n + S(1))*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c + d*x)*(F**(c + d*x)*b + a)**n, x), x, (F**(c + d*x)*b + a)**(n + S(1))/(b*d*(n + S(1))*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**m, x), x, -f**a*x**(m + S(1))*(-b*x**S(2)*log(f))**(-m/S(2) + S(-1)/2)*Gamma(m/S(2) + S(1)/2, -b*x**S(2)*log(f))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(11), x), x, -f**a*Gamma(S(6), -b*x**S(2)*log(f))/(S(2)*b**S(6)*log(f)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(9), x), x, f**a*Gamma(S(5), -b*x**S(2)*log(f))/(S(2)*b**S(5)*log(f)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(7), x), x, f**(a + b*x**S(2))*x**S(6)/(S(2)*b*log(f)) - S(3)*f**(a + b*x**S(2))*x**S(4)/(S(2)*b**S(2)*log(f)**S(2)) + S(3)*f**(a + b*x**S(2))*x**S(2)/(b**S(3)*log(f)**S(3)) - S(3)*f**(a + b*x**S(2))/(b**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(5), x), x, f**(a + b*x**S(2))*x**S(4)/(S(2)*b*log(f)) - f**(a + b*x**S(2))*x**S(2)/(b**S(2)*log(f)**S(2)) + f**(a + b*x**S(2))/(b**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(3), x), x, f**(a + b*x**S(2))*x**S(2)/(S(2)*b*log(f)) - f**(a + b*x**S(2))/(S(2)*b**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x, x), x, f**(a + b*x**S(2))/(S(2)*b*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x, x), x, f**a*Ei(b*x**S(2)*log(f))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(3), x), x, b*f**a*log(f)*Ei(b*x**S(2)*log(f))/S(2) - f**(a + b*x**S(2))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(5), x), x, b**S(2)*f**a*log(f)**S(2)*Ei(b*x**S(2)*log(f))/S(4) - b*f**(a + b*x**S(2))*log(f)/(S(4)*x**S(2)) - f**(a + b*x**S(2))/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(7), x), x, b**S(3)*f**a*log(f)**S(3)*Ei(b*x**S(2)*log(f))/S(12) - b**S(2)*f**(a + b*x**S(2))*log(f)**S(2)/(S(12)*x**S(2)) - b*f**(a + b*x**S(2))*log(f)/(S(12)*x**S(4)) - f**(a + b*x**S(2))/(S(6)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(9), x), x, -b**S(4)*f**a*Gamma(S(-4), -b*x**S(2)*log(f))*log(f)**S(4)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(11), x), x, b**S(5)*f**a*Gamma(S(-5), -b*x**S(2)*log(f))*log(f)**S(5)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(12), x), x, -f**a*x**S(13)*Gamma(S(13)/2, -b*x**S(2)*log(f))/(S(2)*(-b*x**S(2)*log(f))**(S(13)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(10), x), x, -f**a*x**S(11)*Gamma(S(11)/2, -b*x**S(2)*log(f))/(S(2)*(-b*x**S(2)*log(f))**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(8), x), x, f**(a + b*x**S(2))*x**S(7)/(S(2)*b*log(f)) - S(7)*f**(a + b*x**S(2))*x**S(5)/(S(4)*b**S(2)*log(f)**S(2)) + S(35)*f**(a + b*x**S(2))*x**S(3)/(S(8)*b**S(3)*log(f)**S(3)) - S(105)*f**(a + b*x**S(2))*x/(S(16)*b**S(4)*log(f)**S(4)) + S(105)*sqrt(pi)*f**a*erfi(sqrt(b)*x*sqrt(log(f)))/(S(32)*b**(S(9)/2)*log(f)**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(6), x), x, f**(a + b*x**S(2))*x**S(5)/(S(2)*b*log(f)) - S(5)*f**(a + b*x**S(2))*x**S(3)/(S(4)*b**S(2)*log(f)**S(2)) + S(15)*f**(a + b*x**S(2))*x/(S(8)*b**S(3)*log(f)**S(3)) - S(15)*sqrt(pi)*f**a*erfi(sqrt(b)*x*sqrt(log(f)))/(S(16)*b**(S(7)/2)*log(f)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(4), x), x, f**(a + b*x**S(2))*x**S(3)/(S(2)*b*log(f)) - S(3)*f**(a + b*x**S(2))*x/(S(4)*b**S(2)*log(f)**S(2)) + S(3)*sqrt(pi)*f**a*erfi(sqrt(b)*x*sqrt(log(f)))/(S(8)*b**(S(5)/2)*log(f)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))*x**S(2), x), x, f**(a + b*x**S(2))*x/(S(2)*b*log(f)) - sqrt(pi)*f**a*erfi(sqrt(b)*x*sqrt(log(f)))/(S(4)*b**(S(3)/2)*log(f)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2)), x), x, sqrt(pi)*f**a*erfi(sqrt(b)*x*sqrt(log(f)))/(S(2)*sqrt(b)*sqrt(log(f))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(2), x), x, sqrt(pi)*sqrt(b)*f**a*sqrt(log(f))*erfi(sqrt(b)*x*sqrt(log(f))) - f**(a + b*x**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(4), x), x, S(2)*sqrt(pi)*b**(S(3)/2)*f**a*log(f)**(S(3)/2)*erfi(sqrt(b)*x*sqrt(log(f)))/S(3) - S(2)*b*f**(a + b*x**S(2))*log(f)/(S(3)*x) - f**(a + b*x**S(2))/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(6), x), x, S(4)*sqrt(pi)*b**(S(5)/2)*f**a*log(f)**(S(5)/2)*erfi(sqrt(b)*x*sqrt(log(f)))/S(15) - S(4)*b**S(2)*f**(a + b*x**S(2))*log(f)**S(2)/(S(15)*x) - S(2)*b*f**(a + b*x**S(2))*log(f)/(S(15)*x**S(3)) - f**(a + b*x**S(2))/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(8), x), x, S(8)*sqrt(pi)*b**(S(7)/2)*f**a*log(f)**(S(7)/2)*erfi(sqrt(b)*x*sqrt(log(f)))/S(105) - S(8)*b**S(3)*f**(a + b*x**S(2))*log(f)**S(3)/(S(105)*x) - S(4)*b**S(2)*f**(a + b*x**S(2))*log(f)**S(2)/(S(105)*x**S(3)) - S(2)*b*f**(a + b*x**S(2))*log(f)/(S(35)*x**S(5)) - f**(a + b*x**S(2))/(S(7)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(10), x), x, -f**a*(-b*x**S(2)*log(f))**(S(9)/2)*Gamma(S(-9)/2, -b*x**S(2)*log(f))/(S(2)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(2))/x**S(12), x), x, -f**a*(-b*x**S(2)*log(f))**(S(11)/2)*Gamma(S(-11)/2, -b*x**S(2)*log(f))/(S(2)*x**S(11)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**m, x), x, -f**a*x**(m + S(1))*(-b*x**S(3)*log(f))**(-m/S(3) + S(-1)/3)*Gamma(m/S(3) + S(1)/3, -b*x**S(3)*log(f))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**S(17), x), x, -f**a*Gamma(S(6), -b*x**S(3)*log(f))/(S(3)*b**S(6)*log(f)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**S(14), x), x, f**a*Gamma(S(5), -b*x**S(3)*log(f))/(S(3)*b**S(5)*log(f)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**S(11), x), x, f**(a + b*x**S(3))*x**S(9)/(S(3)*b*log(f)) - f**(a + b*x**S(3))*x**S(6)/(b**S(2)*log(f)**S(2)) + S(2)*f**(a + b*x**S(3))*x**S(3)/(b**S(3)*log(f)**S(3)) - S(2)*f**(a + b*x**S(3))/(b**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**S(8), x), x, f**(a + b*x**S(3))*x**S(6)/(S(3)*b*log(f)) - S(2)*f**(a + b*x**S(3))*x**S(3)/(S(3)*b**S(2)*log(f)**S(2)) + S(2)*f**(a + b*x**S(3))/(S(3)*b**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**S(5), x), x, f**(a + b*x**S(3))*x**S(3)/(S(3)*b*log(f)) - f**(a + b*x**S(3))/(S(3)*b**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**S(2), x), x, f**(a + b*x**S(3))/(S(3)*b*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))/x, x), x, f**a*Ei(b*x**S(3)*log(f))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))/x**S(4), x), x, b*f**a*log(f)*Ei(b*x**S(3)*log(f))/S(3) - f**(a + b*x**S(3))/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))/x**S(7), x), x, b**S(2)*f**a*log(f)**S(2)*Ei(b*x**S(3)*log(f))/S(6) - b*f**(a + b*x**S(3))*log(f)/(S(6)*x**S(3)) - f**(a + b*x**S(3))/(S(6)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))/x**S(10), x), x, b**S(3)*f**a*log(f)**S(3)*Ei(b*x**S(3)*log(f))/S(18) - b**S(2)*f**(a + b*x**S(3))*log(f)**S(2)/(S(18)*x**S(3)) - b*f**(a + b*x**S(3))*log(f)/(S(18)*x**S(6)) - f**(a + b*x**S(3))/(S(9)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))/x**S(13), x), x, -b**S(4)*f**a*Gamma(S(-4), -b*x**S(3)*log(f))*log(f)**S(4)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))/x**S(16), x), x, b**S(5)*f**a*Gamma(S(-5), -b*x**S(3)*log(f))*log(f)**S(5)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**S(4), x), x, -f**a*x**S(5)*Gamma(S(5)/3, -b*x**S(3)*log(f))/(S(3)*(-b*x**S(3)*log(f))**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x**S(3), x), x, -f**a*x**S(4)*Gamma(S(4)/3, -b*x**S(3)*log(f))/(S(3)*(-b*x**S(3)*log(f))**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))*x, x), x, -f**a*x**S(2)*Gamma(S(2)/3, -b*x**S(3)*log(f))/(S(3)*(-b*x**S(3)*log(f))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3)), x), x, -f**a*x*Gamma(S(1)/3, -b*x**S(3)*log(f))/(S(3)*(-b*x**S(3)*log(f))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))/x**S(2), x), x, -f**a*(-b*x**S(3)*log(f))**(S(1)/3)*Gamma(S(-1)/3, -b*x**S(3)*log(f))/(S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**S(3))/x**S(3), x), x, -f**a*(-b*x**S(3)*log(f))**(S(2)/3)*Gamma(S(-2)/3, -b*x**S(3)*log(f))/(S(3)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(S(4)*x**S(3)), x), x, exp(S(4)*x**S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)*x**m, x), x, f**a*x**(m + S(1))*(-b*log(f)/x)**(m + S(1))*Gamma(-m + S(-1), -b*log(f)/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)*x**S(4), x), x, -b**S(5)*f**a*Gamma(S(-5), -b*log(f)/x)*log(f)**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)*x**S(3), x), x, b**S(4)*f**a*Gamma(S(-4), -b*log(f)/x)*log(f)**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)*x**S(2), x), x, -b**S(3)*f**a*log(f)**S(3)*Ei(b*log(f)/x)/S(6) + b**S(2)*f**(a + b/x)*x*log(f)**S(2)/S(6) + b*f**(a + b/x)*x**S(2)*log(f)/S(6) + f**(a + b/x)*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)*x, x), x, -b**S(2)*f**a*log(f)**S(2)*Ei(b*log(f)/x)/S(2) + b*f**(a + b/x)*x*log(f)/S(2) + f**(a + b/x)*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x), x), x, -b*f**a*log(f)*Ei(b*log(f)/x) + f**(a + b/x)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)/x, x), x, -f**a*Ei(b*log(f)/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)/x**S(2), x), x, -f**(a + b/x)/(b*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)/x**S(3), x), x, -f**(a + b/x)/(b*x*log(f)) + f**(a + b/x)/(b**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)/x**S(4), x), x, -f**(a + b/x)/(b*x**S(2)*log(f)) + S(2)*f**(a + b/x)/(b**S(2)*x*log(f)**S(2)) - S(2)*f**(a + b/x)/(b**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)/x**S(5), x), x, -f**(a + b/x)/(b*x**S(3)*log(f)) + S(3)*f**(a + b/x)/(b**S(2)*x**S(2)*log(f)**S(2)) - S(6)*f**(a + b/x)/(b**S(3)*x*log(f)**S(3)) + S(6)*f**(a + b/x)/(b**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)/x**S(6), x), x, -f**a*Gamma(S(5), -b*log(f)/x)/(b**S(5)*log(f)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x)/x**S(7), x), x, f**a*Gamma(S(6), -b*log(f)/x)/(b**S(6)*log(f)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**m, x), x, f**a*x**(m + S(1))*(-b*log(f)/x**S(2))**(m/S(2) + S(1)/2)*Gamma(-m/S(2) + S(-1)/2, -b*log(f)/x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(9), x), x, -b**S(5)*f**a*Gamma(S(-5), -b*log(f)/x**S(2))*log(f)**S(5)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(7), x), x, b**S(4)*f**a*Gamma(S(-4), -b*log(f)/x**S(2))*log(f)**S(4)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(5), x), x, -b**S(3)*f**a*log(f)**S(3)*Ei(b*log(f)/x**S(2))/S(12) + b**S(2)*f**(a + b/x**S(2))*x**S(2)*log(f)**S(2)/S(12) + b*f**(a + b/x**S(2))*x**S(4)*log(f)/S(12) + f**(a + b/x**S(2))*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(3), x), x, -b**S(2)*f**a*log(f)**S(2)*Ei(b*log(f)/x**S(2))/S(4) + b*f**(a + b/x**S(2))*x**S(2)*log(f)/S(4) + f**(a + b/x**S(2))*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x, x), x, -b*f**a*log(f)*Ei(b*log(f)/x**S(2))/S(2) + f**(a + b/x**S(2))*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x, x), x, -f**a*Ei(b*log(f)/x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(3), x), x, -f**(a + b/x**S(2))/(S(2)*b*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(5), x), x, -f**(a + b/x**S(2))/(S(2)*b*x**S(2)*log(f)) + f**(a + b/x**S(2))/(S(2)*b**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(7), x), x, -f**(a + b/x**S(2))/(S(2)*b*x**S(4)*log(f)) + f**(a + b/x**S(2))/(b**S(2)*x**S(2)*log(f)**S(2)) - f**(a + b/x**S(2))/(b**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(9), x), x, -f**(a + b/x**S(2))/(S(2)*b*x**S(6)*log(f)) + S(3)*f**(a + b/x**S(2))/(S(2)*b**S(2)*x**S(4)*log(f)**S(2)) - S(3)*f**(a + b/x**S(2))/(b**S(3)*x**S(2)*log(f)**S(3)) + S(3)*f**(a + b/x**S(2))/(b**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(11), x), x, -f**a*Gamma(S(5), -b*log(f)/x**S(2))/(S(2)*b**S(5)*log(f)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(13), x), x, f**a*Gamma(S(6), -b*log(f)/x**S(2))/(S(2)*b**S(6)*log(f)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(10), x), x, f**a*x**S(11)*(-b*log(f)/x**S(2))**(S(11)/2)*Gamma(S(-11)/2, -b*log(f)/x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(8), x), x, f**a*x**S(9)*(-b*log(f)/x**S(2))**(S(9)/2)*Gamma(S(-9)/2, -b*log(f)/x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(6), x), x, -S(8)*sqrt(pi)*b**(S(7)/2)*f**a*log(f)**(S(7)/2)*erfi(sqrt(b)*sqrt(log(f))/x)/S(105) + S(8)*b**S(3)*f**(a + b/x**S(2))*x*log(f)**S(3)/S(105) + S(4)*b**S(2)*f**(a + b/x**S(2))*x**S(3)*log(f)**S(2)/S(105) + S(2)*b*f**(a + b/x**S(2))*x**S(5)*log(f)/S(35) + f**(a + b/x**S(2))*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(4), x), x, -S(4)*sqrt(pi)*b**(S(5)/2)*f**a*log(f)**(S(5)/2)*erfi(sqrt(b)*sqrt(log(f))/x)/S(15) + S(4)*b**S(2)*f**(a + b/x**S(2))*x*log(f)**S(2)/S(15) + S(2)*b*f**(a + b/x**S(2))*x**S(3)*log(f)/S(15) + f**(a + b/x**S(2))*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))*x**S(2), x), x, -S(2)*sqrt(pi)*b**(S(3)/2)*f**a*log(f)**(S(3)/2)*erfi(sqrt(b)*sqrt(log(f))/x)/S(3) + S(2)*b*f**(a + b/x**S(2))*x*log(f)/S(3) + f**(a + b/x**S(2))*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2)), x), x, -sqrt(pi)*sqrt(b)*f**a*sqrt(log(f))*erfi(sqrt(b)*sqrt(log(f))/x) + f**(a + b/x**S(2))*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(2), x), x, -sqrt(pi)*f**a*erfi(sqrt(b)*sqrt(log(f))/x)/(S(2)*sqrt(b)*sqrt(log(f))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(4), x), x, -f**(a + b/x**S(2))/(S(2)*b*x*log(f)) + sqrt(pi)*f**a*erfi(sqrt(b)*sqrt(log(f))/x)/(S(4)*b**(S(3)/2)*log(f)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(6), x), x, -f**(a + b/x**S(2))/(S(2)*b*x**S(3)*log(f)) + S(3)*f**(a + b/x**S(2))/(S(4)*b**S(2)*x*log(f)**S(2)) - S(3)*sqrt(pi)*f**a*erfi(sqrt(b)*sqrt(log(f))/x)/(S(8)*b**(S(5)/2)*log(f)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(8), x), x, -f**(a + b/x**S(2))/(S(2)*b*x**S(5)*log(f)) + S(5)*f**(a + b/x**S(2))/(S(4)*b**S(2)*x**S(3)*log(f)**S(2)) - S(15)*f**(a + b/x**S(2))/(S(8)*b**S(3)*x*log(f)**S(3)) + S(15)*sqrt(pi)*f**a*erfi(sqrt(b)*sqrt(log(f))/x)/(S(16)*b**(S(7)/2)*log(f)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(10), x), x, -f**(a + b/x**S(2))/(S(2)*b*x**S(7)*log(f)) + S(7)*f**(a + b/x**S(2))/(S(4)*b**S(2)*x**S(5)*log(f)**S(2)) - S(35)*f**(a + b/x**S(2))/(S(8)*b**S(3)*x**S(3)*log(f)**S(3)) + S(105)*f**(a + b/x**S(2))/(S(16)*b**S(4)*x*log(f)**S(4)) - S(105)*sqrt(pi)*f**a*erfi(sqrt(b)*sqrt(log(f))/x)/(S(32)*b**(S(9)/2)*log(f)**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(12), x), x, f**a*Gamma(S(11)/2, -b*log(f)/x**S(2))/(S(2)*x**S(11)*(-b*log(f)/x**S(2))**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(2))/x**S(14), x), x, f**a*Gamma(S(13)/2, -b*log(f)/x**S(2))/(S(2)*x**S(13)*(-b*log(f)/x**S(2))**(S(13)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x**m, x), x, f**a*x**(m + S(1))*(-b*log(f)/x**S(3))**(m/S(3) + S(1)/3)*Gamma(-m/S(3) + S(-1)/3, -b*log(f)/x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x**S(14), x), x, -b**S(5)*f**a*Gamma(S(-5), -b*log(f)/x**S(3))*log(f)**S(5)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x**S(11), x), x, b**S(4)*f**a*Gamma(S(-4), -b*log(f)/x**S(3))*log(f)**S(4)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x**S(8), x), x, -b**S(3)*f**a*log(f)**S(3)*Ei(b*log(f)/x**S(3))/S(18) + b**S(2)*f**(a + b/x**S(3))*x**S(3)*log(f)**S(2)/S(18) + b*f**(a + b/x**S(3))*x**S(6)*log(f)/S(18) + f**(a + b/x**S(3))*x**S(9)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x**S(5), x), x, -b**S(2)*f**a*log(f)**S(2)*Ei(b*log(f)/x**S(3))/S(6) + b*f**(a + b/x**S(3))*x**S(3)*log(f)/S(6) + f**(a + b/x**S(3))*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x**S(2), x), x, -b*f**a*log(f)*Ei(b*log(f)/x**S(3))/S(3) + f**(a + b/x**S(3))*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x, x), x, -f**a*Ei(b*log(f)/x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(4), x), x, -f**(a + b/x**S(3))/(S(3)*b*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(7), x), x, -f**(a + b/x**S(3))/(S(3)*b*x**S(3)*log(f)) + f**(a + b/x**S(3))/(S(3)*b**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(10), x), x, -f**(a + b/x**S(3))/(S(3)*b*x**S(6)*log(f)) + S(2)*f**(a + b/x**S(3))/(S(3)*b**S(2)*x**S(3)*log(f)**S(2)) - S(2)*f**(a + b/x**S(3))/(S(3)*b**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(13), x), x, -f**(a + b/x**S(3))/(S(3)*b*x**S(9)*log(f)) + f**(a + b/x**S(3))/(b**S(2)*x**S(6)*log(f)**S(2)) - S(2)*f**(a + b/x**S(3))/(b**S(3)*x**S(3)*log(f)**S(3)) + S(2)*f**(a + b/x**S(3))/(b**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(16), x), x, -f**a*Gamma(S(5), -b*log(f)/x**S(3))/(S(3)*b**S(5)*log(f)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(19), x), x, f**a*Gamma(S(6), -b*log(f)/x**S(3))/(S(3)*b**S(6)*log(f)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x**S(4), x), x, f**a*x**S(5)*(-b*log(f)/x**S(3))**(S(5)/3)*Gamma(S(-5)/3, -b*log(f)/x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x**S(3), x), x, f**a*x**S(4)*(-b*log(f)/x**S(3))**(S(4)/3)*Gamma(S(-4)/3, -b*log(f)/x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))*x, x), x, f**a*x**S(2)*(-b*log(f)/x**S(3))**(S(2)/3)*Gamma(S(-2)/3, -b*log(f)/x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3)), x), x, f**a*x*(-b*log(f)/x**S(3))**(S(1)/3)*Gamma(S(-1)/3, -b*log(f)/x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(2), x), x, f**a*Gamma(S(1)/3, -b*log(f)/x**S(3))/(S(3)*x*(-b*log(f)/x**S(3))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(3), x), x, f**a*Gamma(S(2)/3, -b*log(f)/x**S(3))/(S(3)*x**S(2)*(-b*log(f)/x**S(3))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b/x**S(3))/x**S(5), x), x, f**a*Gamma(S(4)/3, -b*log(f)/x**S(3))/(S(3)*x**S(4)*(-b*log(f)/x**S(3))**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**m, x), x, -f**a*x**(m + S(1))*(-b*x**n*log(f))**(-(m + S(1))/n)*Gamma((m + S(1))/n, -b*x**n*log(f))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**S(3), x), x, -f**a*x**S(4)*(-b*x**n*log(f))**(-S(4)/n)*Gamma(S(4)/n, -b*x**n*log(f))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**S(2), x), x, -f**a*x**S(3)*(-b*x**n*log(f))**(-S(3)/n)*Gamma(S(3)/n, -b*x**n*log(f))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x, x), x, -f**a*x**S(2)*(-b*x**n*log(f))**(-S(2)/n)*Gamma(S(2)/n, -b*x**n*log(f))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n), x), x, -f**a*x*(-b*x**n*log(f))**(-S(1)/n)*Gamma(S(1)/n, -b*x**n*log(f))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)/x, x), x, f**a*Ei(b*x**n*log(f))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)/x**S(2), x), x, -f**a*(-b*x**n*log(f))**(S(1)/n)*Gamma(-S(1)/n, -b*x**n*log(f))/(n*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)/x**S(3), x), x, -f**a*(-b*x**n*log(f))**(S(2)/n)*Gamma(-S(2)/n, -b*x**n*log(f))/(n*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)/x**S(4), x), x, -f**a*(-b*x**n*log(f))**(S(3)/n)*Gamma(-S(3)/n, -b*x**n*log(f))/(n*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(S(3)*n + S(-1)), x), x, f**(a + b*x**n)*x**(S(2)*n)/(b*n*log(f)) - S(2)*f**(a + b*x**n)*x**n/(b**S(2)*n*log(f)**S(2)) + S(2)*f**(a + b*x**n)/(b**S(3)*n*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(S(2)*n + S(-1)), x), x, f**(a + b*x**n)*x**n/(b*n*log(f)) - f**(a + b*x**n)/(b**S(2)*n*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(n + S(-1)), x), x, f**(a + b*x**n)/(b*n*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)/x, x), x, f**a*Ei(b*x**n*log(f))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(-n + S(-1)), x), x, b*f**a*log(f)*Ei(b*x**n*log(f))/n - f**(a + b*x**n)*x**(-n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(-S(2)*n + S(-1)), x), x, b**S(2)*f**a*log(f)**S(2)*Ei(b*x**n*log(f))/(S(2)*n) - b*f**(a + b*x**n)*x**(-n)*log(f)/(S(2)*n) - f**(a + b*x**n)*x**(-S(2)*n)/(S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(S(5)*n/S(2) + S(-1)), x), x, f**(a + b*x**n)*x**(S(3)*n/S(2))/(b*n*log(f)) - S(3)*f**(a + b*x**n)*x**(n/S(2))/(S(2)*b**S(2)*n*log(f)**S(2)) + S(3)*sqrt(pi)*f**a*erfi(sqrt(b)*x**(n/S(2))*sqrt(log(f)))/(S(4)*b**(S(5)/2)*n*log(f)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(S(3)*n/S(2) + S(-1)), x), x, f**(a + b*x**n)*x**(n/S(2))/(b*n*log(f)) - sqrt(pi)*f**a*erfi(sqrt(b)*x**(n/S(2))*sqrt(log(f)))/(S(2)*b**(S(3)/2)*n*log(f)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(n/S(2) + S(-1)), x), x, sqrt(pi)*f**a*erfi(sqrt(b)*x**(n/S(2))*sqrt(log(f)))/(sqrt(b)*n*sqrt(log(f))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(-n/S(2) + S(-1)), x), x, S(2)*sqrt(pi)*sqrt(b)*f**a*sqrt(log(f))*erfi(sqrt(b)*x**(n/S(2))*sqrt(log(f)))/n - S(2)*f**(a + b*x**n)*x**(-n/S(2))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x**n)*x**(-S(3)*n/S(2) + S(-1)), x), x, S(4)*sqrt(pi)*b**(S(3)/2)*f**a*log(f)**(S(3)/2)*erfi(sqrt(b)*x**(n/S(2))*sqrt(log(f)))/(S(3)*n) - S(4)*b*f**(a + b*x**n)*x**(-n/S(2))*log(f)/(S(3)*n) - S(2)*f**(a + b*x**n)*x**(-S(3)*n/S(2))/(S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(-0.1*x), x), x, -10.0*x*exp(-0.1*x) - 100.0*exp(-0.1*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(2))*x**m, x), x, Integral(f**(a**S(2)*c + S(2)*a*b*c*x + b**S(2)*c*x**S(2))*x**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(2))*x**S(3), x), x, -sqrt(pi)*a**S(3)*erfi(sqrt(c)*(a + b*x)*sqrt(log(f)))/(S(2)*b**S(4)*sqrt(c)*sqrt(log(f))) + S(3)*a**S(2)*f**(c*(a + b*x)**S(2))/(S(2)*b**S(4)*c*log(f)) - S(3)*a*f**(c*(a + b*x)**S(2))*(a + b*x)/(S(2)*b**S(4)*c*log(f)) + S(3)*sqrt(pi)*a*erfi(sqrt(c)*(a + b*x)*sqrt(log(f)))/(S(4)*b**S(4)*c**(S(3)/2)*log(f)**(S(3)/2)) + f**(c*(a + b*x)**S(2))*(a + b*x)**S(2)/(S(2)*b**S(4)*c*log(f)) - f**(c*(a + b*x)**S(2))/(S(2)*b**S(4)*c**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(2))*x**S(2), x), x, sqrt(pi)*a**S(2)*erfi(sqrt(c)*(a + b*x)*sqrt(log(f)))/(S(2)*b**S(3)*sqrt(c)*sqrt(log(f))) - a*f**(c*(a + b*x)**S(2))/(b**S(3)*c*log(f)) + f**(c*(a + b*x)**S(2))*(a + b*x)/(S(2)*b**S(3)*c*log(f)) - sqrt(pi)*erfi(sqrt(c)*(a + b*x)*sqrt(log(f)))/(S(4)*b**S(3)*c**(S(3)/2)*log(f)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(2))*x, x), x, -sqrt(pi)*a*erfi(sqrt(c)*(a + b*x)*sqrt(log(f)))/(S(2)*b**S(2)*sqrt(c)*sqrt(log(f))) + f**(c*(a + b*x)**S(2))/(S(2)*b**S(2)*c*log(f)), expand=True, _diff=True, _numerical=True) # long time in rubi_test(1940 is matched before 1909) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(2)), x), x, sqrt(pi)*erfi(sqrt(c)*(a + b*x)*sqrt(log(f)))/(S(2)*b*sqrt(c)*sqrt(log(f))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(2))/x, x), x, Integral(f**(c*(a + b*x)**S(2))/x, x), expand=True, _diff=True, _numerical=True) # long time in rubi_test(1940 is matched before 1909) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(2))/x**S(2), x), x, S(2)*a*b*c*log(f)*Integral(f**(c*(a + b*x)**S(2))/x, x) + sqrt(pi)*b*sqrt(c)*sqrt(log(f))*erfi(sqrt(c)*(a + b*x)*sqrt(log(f))) - f**(c*(a + b*x)**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(2))/x**S(3), x), x, S(2)*a**S(2)*b**S(2)*c**S(2)*log(f)**S(2)*Integral(f**(c*(a + b*x)**S(2))/x, x) + sqrt(pi)*a*b**S(2)*c**(S(3)/2)*log(f)**(S(3)/2)*erfi(sqrt(c)*(a + b*x)*sqrt(log(f))) - a*b*c*f**(c*(a + b*x)**S(2))*log(f)/x + b**S(2)*c*log(f)*Integral(f**(c*(a + b*x)**S(2))/x, x) - f**(c*(a + b*x)**S(2))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(3))*x**m, x), x, Integral(f**(c*(a + b*x)**S(3))*x**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(3))*x**S(2), x), x, -a**S(2)*(a + b*x)*Gamma(S(1)/3, -c*(a + b*x)**S(3)*log(f))/(S(3)*b**S(3)*(-c*(a + b*x)**S(3)*log(f))**(S(1)/3)) + S(2)*a*(a + b*x)**S(2)*Gamma(S(2)/3, -c*(a + b*x)**S(3)*log(f))/(S(3)*b**S(3)*(-c*(a + b*x)**S(3)*log(f))**(S(2)/3)) + f**(c*(a + b*x)**S(3))/(S(3)*b**S(3)*c*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(3))*x, x), x, a*(a + b*x)*Gamma(S(1)/3, -c*(a + b*x)**S(3)*log(f))/(S(3)*b**S(2)*(-c*(a + b*x)**S(3)*log(f))**(S(1)/3)) - (a + b*x)**S(2)*Gamma(S(2)/3, -c*(a + b*x)**S(3)*log(f))/(S(3)*b**S(2)*(-c*(a + b*x)**S(3)*log(f))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(3)), x), x, (-a/S(3) - b*x/S(3))*Gamma(S(1)/3, -c*(a + b*x)**S(3)*log(f))/(b*(-c*(a + b*x)**S(3)*log(f))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(3))/x, x), x, Integral(f**(c*(a + b*x)**S(3))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(3))/x**S(2), x), x, S(3)*a**S(2)*b*c*log(f)*Integral(f**(c*(a + b*x)**S(3))/x, x) - a*b*c*(a + b*x)*Gamma(S(1)/3, -c*(a + b*x)**S(3)*log(f))*log(f)/(-c*(a + b*x)**S(3)*log(f))**(S(1)/3) - b*c*(a + b*x)**S(2)*Gamma(S(2)/3, -c*(a + b*x)**S(3)*log(f))*log(f)/(-c*(a + b*x)**S(3)*log(f))**(S(2)/3) - f**(c*(a + b*x)**S(3))/x, expand=True, _diff=True, _numerical=True) # difference in simplify of sympy and mathematica assert rubi_test(rubi_integrate(f**(c*(a + b*x)**S(3))/x**S(3), x), x, S(9)*a**S(4)*b**S(2)*c**S(2)*log(f)**S(2)*Integral(f**(c*(a + b*x)**S(3))/x, x)/S(2) - S(3)*a**S(3)*b**S(2)*c**S(2)*(a + b*x)*Gamma(S(1)/3, -c*(a + b*x)**S(3)*log(f))*log(f)**S(2)/(S(2)*(-c*(a + b*x)**S(3)*log(f))**(S(1)/3)) - S(3)*a**S(2)*b**S(2)*c**S(2)*(a + b*x)**S(2)*Gamma(S(2)/3, -c*(a + b*x)**S(3)*log(f))*log(f)**S(2)/(S(2)*(-c*(a + b*x)**S(3)*log(f))**(S(2)/3)) - S(3)*a**S(2)*b*c*f**(c*(a + b*x)**S(3))*log(f)/(S(2)*x) + S(3)*a*b**S(2)*c*log(f)*Integral(f**(c*(a + b*x)**S(3))/x, x) - b**S(2)*c*(a + b*x)*Gamma(S(1)/3, -c*(a + b*x)**S(3)*log(f))*log(f)/(S(2)*(-c*(a + b*x)**S(3)*log(f))**(S(1)/3)) - f**(c*(a + b*x)**S(3))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3)), x), x, Integral(x**m*exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3)), x), x, -a**S(4)*(a + b*x)*Gamma(S(1)/3, -(a + b*x)**S(3))/(S(3)*b**S(5)*(-(a + b*x)**S(3))**(S(1)/3)) + S(4)*a**S(3)*(a + b*x)**S(2)*Gamma(S(2)/3, -(a + b*x)**S(3))/(S(3)*b**S(5)*(-(a + b*x)**S(3))**(S(2)/3)) + S(2)*a**S(2)*exp((a + b*x)**S(3))/b**S(5) + S(4)*a*(a + b*x)**S(4)*Gamma(S(4)/3, -(a + b*x)**S(3))/(S(3)*b**S(5)*(-(a + b*x)**S(3))**(S(4)/3)) - (a + b*x)**S(5)*Gamma(S(5)/3, -(a + b*x)**S(3))/(S(3)*b**S(5)*(-(a + b*x)**S(3))**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3)), x), x, a**S(3)*(a + b*x)*Gamma(S(1)/3, -(a + b*x)**S(3))/(S(3)*b**S(4)*(-(a + b*x)**S(3))**(S(1)/3)) - a**S(2)*(a + b*x)**S(2)*Gamma(S(2)/3, -(a + b*x)**S(3))/(b**S(4)*(-(a + b*x)**S(3))**(S(2)/3)) - a*exp((a + b*x)**S(3))/b**S(4) - (a + b*x)**S(4)*Gamma(S(4)/3, -(a + b*x)**S(3))/(S(3)*b**S(4)*(-(a + b*x)**S(3))**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3)), x), x, -a**S(2)*(a + b*x)*Gamma(S(1)/3, -(a + b*x)**S(3))/(S(3)*b**S(3)*(-(a + b*x)**S(3))**(S(1)/3)) + S(2)*a*(a + b*x)**S(2)*Gamma(S(2)/3, -(a + b*x)**S(3))/(S(3)*b**S(3)*(-(a + b*x)**S(3))**(S(2)/3)) + exp((a + b*x)**S(3))/(S(3)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3)), x), x, a*(a + b*x)*Gamma(S(1)/3, -(a + b*x)**S(3))/(S(3)*b**S(2)*(-(a + b*x)**S(3))**(S(1)/3)) - (a + b*x)**S(2)*Gamma(S(2)/3, -(a + b*x)**S(3))/(S(3)*b**S(2)*(-(a + b*x)**S(3))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3)), x), x, (-a/S(3) - b*x/S(3))*Gamma(S(1)/3, -(a + b*x)**S(3))/(b*(-(a + b*x)**S(3))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3))/x, x), x, Integral(exp(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(sqrt(S(3)*x + S(5))), x), x, S(2)*sqrt(S(3)*x + S(5))*exp(sqrt(S(3)*x + S(5)))/S(3) - S(2)*exp(sqrt(S(3)*x + S(5)))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x))*x**m, x), x, Integral(f**(c/(a + b*x))*x**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x))*x**S(4), x), x, -a**S(4)*c*log(f)*Ei(c*log(f)/(a + b*x))/b**S(5) + a**S(4)*f**(c/(a + b*x))*(a + b*x)/b**S(5) + S(2)*a**S(3)*c**S(2)*log(f)**S(2)*Ei(c*log(f)/(a + b*x))/b**S(5) - S(2)*a**S(3)*c*f**(c/(a + b*x))*(a + b*x)*log(f)/b**S(5) - S(2)*a**S(3)*f**(c/(a + b*x))*(a + b*x)**S(2)/b**S(5) - a**S(2)*c**S(3)*log(f)**S(3)*Ei(c*log(f)/(a + b*x))/b**S(5) + a**S(2)*c**S(2)*f**(c/(a + b*x))*(a + b*x)*log(f)**S(2)/b**S(5) + a**S(2)*c*f**(c/(a + b*x))*(a + b*x)**S(2)*log(f)/b**S(5) + S(2)*a**S(2)*f**(c/(a + b*x))*(a + b*x)**S(3)/b**S(5) - S(4)*a*c**S(4)*Gamma(S(-4), -c*log(f)/(a + b*x))*log(f)**S(4)/b**S(5) - c**S(5)*Gamma(S(-5), -c*log(f)/(a + b*x))*log(f)**S(5)/b**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x))*x**S(3), x), x, a**S(3)*c*log(f)*Ei(c*log(f)/(a + b*x))/b**S(4) - a**S(3)*f**(c/(a + b*x))*(a + b*x)/b**S(4) - S(3)*a**S(2)*c**S(2)*log(f)**S(2)*Ei(c*log(f)/(a + b*x))/(S(2)*b**S(4)) + S(3)*a**S(2)*c*f**(c/(a + b*x))*(a + b*x)*log(f)/(S(2)*b**S(4)) + S(3)*a**S(2)*f**(c/(a + b*x))*(a + b*x)**S(2)/(S(2)*b**S(4)) + a*c**S(3)*log(f)**S(3)*Ei(c*log(f)/(a + b*x))/(S(2)*b**S(4)) - a*c**S(2)*f**(c/(a + b*x))*(a + b*x)*log(f)**S(2)/(S(2)*b**S(4)) - a*c*f**(c/(a + b*x))*(a + b*x)**S(2)*log(f)/(S(2)*b**S(4)) - a*f**(c/(a + b*x))*(a + b*x)**S(3)/b**S(4) + c**S(4)*Gamma(S(-4), -c*log(f)/(a + b*x))*log(f)**S(4)/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x))*x**S(2), x), x, -a**S(2)*c*log(f)*Ei(c*log(f)/(a + b*x))/b**S(3) + a**S(2)*f**(c/(a + b*x))*(a + b*x)/b**S(3) + a*c**S(2)*log(f)**S(2)*Ei(c*log(f)/(a + b*x))/b**S(3) - a*c*f**(c/(a + b*x))*(a + b*x)*log(f)/b**S(3) - a*f**(c/(a + b*x))*(a + b*x)**S(2)/b**S(3) - c**S(3)*log(f)**S(3)*Ei(c*log(f)/(a + b*x))/(S(6)*b**S(3)) + c**S(2)*f**(c/(a + b*x))*(a + b*x)*log(f)**S(2)/(S(6)*b**S(3)) + c*f**(c/(a + b*x))*(a + b*x)**S(2)*log(f)/(S(6)*b**S(3)) + f**(c/(a + b*x))*(a + b*x)**S(3)/(S(3)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x))*x, x), x, a*c*log(f)*Ei(c*log(f)/(a + b*x))/b**S(2) - a*f**(c/(a + b*x))*(a + b*x)/b**S(2) - c**S(2)*log(f)**S(2)*Ei(c*log(f)/(a + b*x))/(S(2)*b**S(2)) + c*f**(c/(a + b*x))*(a + b*x)*log(f)/(S(2)*b**S(2)) + f**(c/(a + b*x))*(a + b*x)**S(2)/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)), x), x, -c*log(f)*Ei(c*log(f)/(a + b*x))/b + f**(c/(a + b*x))*(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x))/x, x), x, f**(c/a)*Ei(-b*c*x*log(f)/(a*(a + b*x))) - Ei(c*log(f)/(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x))/x**S(2), x), x, -f**(c/(a + b*x))/x - b*f**(c/(a + b*x))/a - b*c*f**(c/a)*log(f)*Ei(-b*c*x*log(f)/(a*(a + b*x)))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x))/x**S(3), x), x, -f**(c/(a + b*x))/(S(2)*x**S(2)) + b**S(2)*f**(c/(a + b*x))/(S(2)*a**S(2)) + b*c*f**(c/(a + b*x))*log(f)/(S(2)*a**S(2)*x) + b**S(2)*c*f**(c/a)*log(f)*Ei(-b*c*x*log(f)/(a*(a + b*x)))/a**S(3) + b**S(2)*c*f**(c/(a + b*x))*log(f)/(S(2)*a**S(3)) + b**S(2)*c**S(2)*f**(c/a)*log(f)**S(2)*Ei(-b*c*x*log(f)/(a*(a + b*x)))/(S(2)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2))*x**m, x), x, Integral(f**(c/(a + b*x)**S(2))*x**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2))*x**S(4), x), x, -sqrt(pi)*a**S(4)*sqrt(c)*sqrt(log(f))*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/b**S(5) + a**S(4)*f**(c/(a + b*x)**S(2))*(a + b*x)/b**S(5) + S(2)*a**S(3)*c*log(f)*Ei(c*log(f)/(a + b*x)**S(2))/b**S(5) - S(2)*a**S(3)*f**(c/(a + b*x)**S(2))*(a + b*x)**S(2)/b**S(5) - S(4)*sqrt(pi)*a**S(2)*c**(S(3)/2)*log(f)**(S(3)/2)*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/b**S(5) + S(4)*a**S(2)*c*f**(c/(a + b*x)**S(2))*(a + b*x)*log(f)/b**S(5) + S(2)*a**S(2)*f**(c/(a + b*x)**S(2))*(a + b*x)**S(3)/b**S(5) + a*c**S(2)*log(f)**S(2)*Ei(c*log(f)/(a + b*x)**S(2))/b**S(5) - a*c*f**(c/(a + b*x)**S(2))*(a + b*x)**S(2)*log(f)/b**S(5) - a*f**(c/(a + b*x)**S(2))*(a + b*x)**S(4)/b**S(5) - S(4)*sqrt(pi)*c**(S(5)/2)*log(f)**(S(5)/2)*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/(S(15)*b**S(5)) + S(4)*c**S(2)*f**(c/(a + b*x)**S(2))*(a + b*x)*log(f)**S(2)/(S(15)*b**S(5)) + S(2)*c*f**(c/(a + b*x)**S(2))*(a + b*x)**S(3)*log(f)/(S(15)*b**S(5)) + f**(c/(a + b*x)**S(2))*(a + b*x)**S(5)/(S(5)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2))*x**S(3), x), x, sqrt(pi)*a**S(3)*sqrt(c)*sqrt(log(f))*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/b**S(4) - a**S(3)*f**(c/(a + b*x)**S(2))*(a + b*x)/b**S(4) - S(3)*a**S(2)*c*log(f)*Ei(c*log(f)/(a + b*x)**S(2))/(S(2)*b**S(4)) + S(3)*a**S(2)*f**(c/(a + b*x)**S(2))*(a + b*x)**S(2)/(S(2)*b**S(4)) + S(2)*sqrt(pi)*a*c**(S(3)/2)*log(f)**(S(3)/2)*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/b**S(4) - S(2)*a*c*f**(c/(a + b*x)**S(2))*(a + b*x)*log(f)/b**S(4) - a*f**(c/(a + b*x)**S(2))*(a + b*x)**S(3)/b**S(4) - c**S(2)*log(f)**S(2)*Ei(c*log(f)/(a + b*x)**S(2))/(S(4)*b**S(4)) + c*f**(c/(a + b*x)**S(2))*(a + b*x)**S(2)*log(f)/(S(4)*b**S(4)) + f**(c/(a + b*x)**S(2))*(a + b*x)**S(4)/(S(4)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2))*x**S(2), x), x, -sqrt(pi)*a**S(2)*sqrt(c)*sqrt(log(f))*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/b**S(3) + a**S(2)*f**(c/(a + b*x)**S(2))*(a + b*x)/b**S(3) + a*c*log(f)*Ei(c*log(f)/(a + b*x)**S(2))/b**S(3) - a*f**(c/(a + b*x)**S(2))*(a + b*x)**S(2)/b**S(3) - S(2)*sqrt(pi)*c**(S(3)/2)*log(f)**(S(3)/2)*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/(S(3)*b**S(3)) + S(2)*c*f**(c/(a + b*x)**S(2))*(a + b*x)*log(f)/(S(3)*b**S(3)) + f**(c/(a + b*x)**S(2))*(a + b*x)**S(3)/(S(3)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2))*x, x), x, sqrt(pi)*a*sqrt(c)*sqrt(log(f))*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/b**S(2) - a*f**(c/(a + b*x)**S(2))*(a + b*x)/b**S(2) - c*log(f)*Ei(c*log(f)/(a + b*x)**S(2))/(S(2)*b**S(2)) + f**(c/(a + b*x)**S(2))*(a + b*x)**S(2)/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2)), x), x, -sqrt(pi)*sqrt(c)*sqrt(log(f))*erfi(sqrt(c)*sqrt(log(f))/(a + b*x))/b + f**(c/(a + b*x)**S(2))*(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2))/x, x), x, Integral(f**(c/(a + b*x)**S(2))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2))/x**S(2), x), x, Integral(f**(c/(a + b*x)**S(2))/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(2))/x**S(3), x), x, Integral(f**(c/(a + b*x)**S(2))/x**S(3), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3))*x**m, x), x, Integral(f**(c/(a + b*x)**S(3))*x**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3))*x**S(4), x), x, a**S(4)*(-c*log(f)/(a + b*x)**S(3))**(S(1)/3)*(a + b*x)*Gamma(S(-1)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(5)) - S(4)*a**S(3)*(-c*log(f)/(a + b*x)**S(3))**(S(2)/3)*(a + b*x)**S(2)*Gamma(S(-2)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(5)) - S(2)*a**S(2)*c*log(f)*Ei(c*log(f)/(a + b*x)**S(3))/b**S(5) + S(2)*a**S(2)*f**(c/(a + b*x)**S(3))*(a + b*x)**S(3)/b**S(5) - S(4)*a*(-c*log(f)/(a + b*x)**S(3))**(S(4)/3)*(a + b*x)**S(4)*Gamma(S(-4)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(5)) + (-c*log(f)/(a + b*x)**S(3))**(S(5)/3)*(a + b*x)**S(5)*Gamma(S(-5)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3))*x**S(3), x), x, -a**S(3)*(-c*log(f)/(a + b*x)**S(3))**(S(1)/3)*(a + b*x)*Gamma(S(-1)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(4)) + a**S(2)*(-c*log(f)/(a + b*x)**S(3))**(S(2)/3)*(a + b*x)**S(2)*Gamma(S(-2)/3, -c*log(f)/(a + b*x)**S(3))/b**S(4) + a*c*log(f)*Ei(c*log(f)/(a + b*x)**S(3))/b**S(4) - a*f**(c/(a + b*x)**S(3))*(a + b*x)**S(3)/b**S(4) + (-c*log(f)/(a + b*x)**S(3))**(S(4)/3)*(a + b*x)**S(4)*Gamma(S(-4)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3))*x**S(2), x), x, a**S(2)*(-c*log(f)/(a + b*x)**S(3))**(S(1)/3)*(a + b*x)*Gamma(S(-1)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(3)) - S(2)*a*(-c*log(f)/(a + b*x)**S(3))**(S(2)/3)*(a + b*x)**S(2)*Gamma(S(-2)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(3)) - c*log(f)*Ei(c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(3)) + f**(c/(a + b*x)**S(3))*(a + b*x)**S(3)/(S(3)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3))*x, x), x, -a*(-c*log(f)/(a + b*x)**S(3))**(S(1)/3)*(a + b*x)*Gamma(S(-1)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(2)) + (-c*log(f)/(a + b*x)**S(3))**(S(2)/3)*(a + b*x)**S(2)*Gamma(S(-2)/3, -c*log(f)/(a + b*x)**S(3))/(S(3)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3)), x), x, (-c*log(f)/(a + b*x)**S(3))**(S(1)/3)*(a/S(3) + b*x/S(3))*Gamma(S(-1)/3, -c*log(f)/(a + b*x)**S(3))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3))/x, x), x, Integral(f**(c/(a + b*x)**S(3))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3))/x**S(2), x), x, Integral(f**(c/(a + b*x)**S(3))/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c/(a + b*x)**S(3))/x**S(3), x), x, Integral(f**(c/(a + b*x)**S(3))/x**S(3), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**n)*x**m, x), x, Integral(f**(c*(a + b*x)**n)*x**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**n)*x**S(3), x), x, a**S(3)*(-c*(a + b*x)**n*log(f))**(-S(1)/n)*(a + b*x)*Gamma(S(1)/n, -c*(a + b*x)**n*log(f))/(b**S(4)*n) - S(3)*a**S(2)*(-c*(a + b*x)**n*log(f))**(-S(2)/n)*(a + b*x)**S(2)*Gamma(S(2)/n, -c*(a + b*x)**n*log(f))/(b**S(4)*n) + S(3)*a*(-c*(a + b*x)**n*log(f))**(-S(3)/n)*(a + b*x)**S(3)*Gamma(S(3)/n, -c*(a + b*x)**n*log(f))/(b**S(4)*n) - (-c*(a + b*x)**n*log(f))**(-S(4)/n)*(a + b*x)**S(4)*Gamma(S(4)/n, -c*(a + b*x)**n*log(f))/(b**S(4)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**n)*x**S(2), x), x, -a**S(2)*(-c*(a + b*x)**n*log(f))**(-S(1)/n)*(a + b*x)*Gamma(S(1)/n, -c*(a + b*x)**n*log(f))/(b**S(3)*n) + S(2)*a*(-c*(a + b*x)**n*log(f))**(-S(2)/n)*(a + b*x)**S(2)*Gamma(S(2)/n, -c*(a + b*x)**n*log(f))/(b**S(3)*n) - (-c*(a + b*x)**n*log(f))**(-S(3)/n)*(a + b*x)**S(3)*Gamma(S(3)/n, -c*(a + b*x)**n*log(f))/(b**S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**n)*x, x), x, a*(-c*(a + b*x)**n*log(f))**(-S(1)/n)*(a + b*x)*Gamma(S(1)/n, -c*(a + b*x)**n*log(f))/(b**S(2)*n) - (-c*(a + b*x)**n*log(f))**(-S(2)/n)*(a + b*x)**S(2)*Gamma(S(2)/n, -c*(a + b*x)**n*log(f))/(b**S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**n), x), x, (-c*(a + b*x)**n*log(f))**(-S(1)/n)*(-a - b*x)*Gamma(S(1)/n, -c*(a + b*x)**n*log(f))/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**n)/x, x), x, Integral(f**(c*(a + b*x)**n)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**n)/x**S(2), x), x, Integral(f**(c*(a + b*x)**n)/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(c*(a + b*x)**n)/x**S(3), x), x, Integral(f**(c*(a + b*x)**n)/x**S(3), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**m, x), x, -F**a*(-b*(c + d*x)**S(2)*log(F))**(-m/S(2) + S(-1)/2)*(c + d*x)**(m + S(1))*Gamma(m/S(2) + S(1)/2, -b*(c + d*x)**S(2)*log(F))/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(11), x), x, -F**a*Gamma(S(6), -b*(c + d*x)**S(2)*log(F))/(S(2)*b**S(6)*d*log(F)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(9), x), x, F**a*Gamma(S(5), -b*(c + d*x)**S(2)*log(F))/(S(2)*b**S(5)*d*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(7), x), x, F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(6)/(S(2)*b*d*log(F)) - S(3)*F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(4)/(S(2)*b**S(2)*d*log(F)**S(2)) + S(3)*F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(2)/(b**S(3)*d*log(F)**S(3)) - S(3)*F**(a + b*(c + d*x)**S(2))/(b**S(4)*d*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(5), x), x, F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(4)/(S(2)*b*d*log(F)) - F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(2)/(b**S(2)*d*log(F)**S(2)) + F**(a + b*(c + d*x)**S(2))/(b**S(3)*d*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(3), x), x, F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(2)/(S(2)*b*d*log(F)) - F**(a + b*(c + d*x)**S(2))/(S(2)*b**S(2)*d*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x), x), x, F**(a + b*(c + d*x)**S(2))/(S(2)*b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x), x), x, F**a*Ei(b*(c + d*x)**S(2)*log(F))/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(3), x), x, F**a*b*log(F)*Ei(b*(c + d*x)**S(2)*log(F))/(S(2)*d) - F**(a + b*(c + d*x)**S(2))/(S(2)*d*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(5), x), x, F**a*b**S(2)*log(F)**S(2)*Ei(b*(c + d*x)**S(2)*log(F))/(S(4)*d) - F**(a + b*(c + d*x)**S(2))*b*log(F)/(S(4)*d*(c + d*x)**S(2)) - F**(a + b*(c + d*x)**S(2))/(S(4)*d*(c + d*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(7), x), x, F**a*b**S(3)*log(F)**S(3)*Ei(b*(c + d*x)**S(2)*log(F))/(S(12)*d) - F**(a + b*(c + d*x)**S(2))*b**S(2)*log(F)**S(2)/(S(12)*d*(c + d*x)**S(2)) - F**(a + b*(c + d*x)**S(2))*b*log(F)/(S(12)*d*(c + d*x)**S(4)) - F**(a + b*(c + d*x)**S(2))/(S(6)*d*(c + d*x)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(9), x), x, -F**a*b**S(4)*Gamma(S(-4), -b*(c + d*x)**S(2)*log(F))*log(F)**S(4)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(11), x), x, F**a*b**S(5)*Gamma(S(-5), -b*(c + d*x)**S(2)*log(F))*log(F)**S(5)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(12), x), x, -F**a*(c + d*x)**S(13)*Gamma(S(13)/2, -b*(c + d*x)**S(2)*log(F))/(S(2)*d*(-b*(c + d*x)**S(2)*log(F))**(S(13)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(10), x), x, -F**a*(c + d*x)**S(11)*Gamma(S(11)/2, -b*(c + d*x)**S(2)*log(F))/(S(2)*d*(-b*(c + d*x)**S(2)*log(F))**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(8), x), x, S(105)*sqrt(pi)*F**a*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(32)*b**(S(9)/2)*d*log(F)**(S(9)/2)) + F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(7)/(S(2)*b*d*log(F)) - S(7)*F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(5)/(S(4)*b**S(2)*d*log(F)**S(2)) + S(35)*F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(3)/(S(8)*b**S(3)*d*log(F)**S(3)) - S(105)*F**(a + b*(c + d*x)**S(2))*(c + d*x)/(S(16)*b**S(4)*d*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(6), x), x, -S(15)*sqrt(pi)*F**a*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(16)*b**(S(7)/2)*d*log(F)**(S(7)/2)) + F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(5)/(S(2)*b*d*log(F)) - S(5)*F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(3)/(S(4)*b**S(2)*d*log(F)**S(2)) + S(15)*F**(a + b*(c + d*x)**S(2))*(c + d*x)/(S(8)*b**S(3)*d*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(4), x), x, S(3)*sqrt(pi)*F**a*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(8)*b**(S(5)/2)*d*log(F)**(S(5)/2)) + F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(3)/(S(2)*b*d*log(F)) - S(3)*F**(a + b*(c + d*x)**S(2))*(c + d*x)/(S(4)*b**S(2)*d*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(c + d*x)**S(2), x), x, -sqrt(pi)*F**a*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(4)*b**(S(3)/2)*d*log(F)**(S(3)/2)) + F**(a + b*(c + d*x)**S(2))*(c + d*x)/(S(2)*b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2)), x), x, sqrt(pi)*F**a*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(2)*sqrt(b)*d*sqrt(log(F))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(2), x), x, sqrt(pi)*F**a*sqrt(b)*sqrt(log(F))*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/d - F**(a + b*(c + d*x)**S(2))/(d*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(4), x), x, S(2)*sqrt(pi)*F**a*b**(S(3)/2)*log(F)**(S(3)/2)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(3)*d) - S(2)*F**(a + b*(c + d*x)**S(2))*b*log(F)/(S(3)*d*(c + d*x)) - F**(a + b*(c + d*x)**S(2))/(S(3)*d*(c + d*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(6), x), x, S(4)*sqrt(pi)*F**a*b**(S(5)/2)*log(F)**(S(5)/2)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(15)*d) - S(4)*F**(a + b*(c + d*x)**S(2))*b**S(2)*log(F)**S(2)/(S(15)*d*(c + d*x)) - S(2)*F**(a + b*(c + d*x)**S(2))*b*log(F)/(S(15)*d*(c + d*x)**S(3)) - F**(a + b*(c + d*x)**S(2))/(S(5)*d*(c + d*x)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(8), x), x, S(8)*sqrt(pi)*F**a*b**(S(7)/2)*log(F)**(S(7)/2)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(105)*d) - S(8)*F**(a + b*(c + d*x)**S(2))*b**S(3)*log(F)**S(3)/(S(105)*d*(c + d*x)) - S(4)*F**(a + b*(c + d*x)**S(2))*b**S(2)*log(F)**S(2)/(S(105)*d*(c + d*x)**S(3)) - S(2)*F**(a + b*(c + d*x)**S(2))*b*log(F)/(S(35)*d*(c + d*x)**S(5)) - F**(a + b*(c + d*x)**S(2))/(S(7)*d*(c + d*x)**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(10), x), x, -F**a*(-b*(c + d*x)**S(2)*log(F))**(S(9)/2)*Gamma(S(-9)/2, -b*(c + d*x)**S(2)*log(F))/(S(2)*d*(c + d*x)**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(c + d*x)**S(12), x), x, -F**a*(-b*(c + d*x)**S(2)*log(F))**(S(11)/2)*Gamma(S(-11)/2, -b*(c + d*x)**S(2)*log(F))/(S(2)*d*(c + d*x)**S(11)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x)**m, x), x, -F**a*(-b*(c + d*x)**S(3)*log(F))**(-m/S(3) + S(-1)/3)*(c + d*x)**(m + S(1))*Gamma(m/S(3) + S(1)/3, -b*(c + d*x)**S(3)*log(F))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(17), x), x, -F**a*Gamma(S(6), -b*(c + d*x)**S(3)*log(F))/(S(3)*b**S(6)*d*log(F)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(14), x), x, F**a*Gamma(S(5), -b*(c + d*x)**S(3)*log(F))/(S(3)*b**S(5)*d*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(11), x), x, F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(9)/(S(3)*b*d*log(F)) - F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(6)/(b**S(2)*d*log(F)**S(2)) + S(2)*F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(3)/(b**S(3)*d*log(F)**S(3)) - S(2)*F**(a + b*(c + d*x)**S(3))/(b**S(4)*d*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(8), x), x, F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(6)/(S(3)*b*d*log(F)) - S(2)*F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(3)/(S(3)*b**S(2)*d*log(F)**S(2)) + S(2)*F**(a + b*(c + d*x)**S(3))/(S(3)*b**S(3)*d*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(5), x), x, F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(3)/(S(3)*b*d*log(F)) - F**(a + b*(c + d*x)**S(3))/(S(3)*b**S(2)*d*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(2), x), x, F**(a + b*(c + d*x)**S(3))/(S(3)*b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x), x), x, F**a*Ei(b*(c + d*x)**S(3)*log(F))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x)**S(4), x), x, F**a*b*log(F)*Ei(b*(c + d*x)**S(3)*log(F))/(S(3)*d) - F**(a + b*(c + d*x)**S(3))/(S(3)*d*(c + d*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x)**S(7), x), x, F**a*b**S(2)*log(F)**S(2)*Ei(b*(c + d*x)**S(3)*log(F))/(S(6)*d) - F**(a + b*(c + d*x)**S(3))*b*log(F)/(S(6)*d*(c + d*x)**S(3)) - F**(a + b*(c + d*x)**S(3))/(S(6)*d*(c + d*x)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x)**S(10), x), x, F**a*b**S(3)*log(F)**S(3)*Ei(b*(c + d*x)**S(3)*log(F))/(S(18)*d) - F**(a + b*(c + d*x)**S(3))*b**S(2)*log(F)**S(2)/(S(18)*d*(c + d*x)**S(3)) - F**(a + b*(c + d*x)**S(3))*b*log(F)/(S(18)*d*(c + d*x)**S(6)) - F**(a + b*(c + d*x)**S(3))/(S(9)*d*(c + d*x)**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x)**S(13), x), x, -F**a*b**S(4)*Gamma(S(-4), -b*(c + d*x)**S(3)*log(F))*log(F)**S(4)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x)**S(16), x), x, F**a*b**S(5)*Gamma(S(-5), -b*(c + d*x)**S(3)*log(F))*log(F)**S(5)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x)**S(3), x), x, -F**a*(c + d*x)**S(4)*Gamma(S(4)/3, -b*(c + d*x)**S(3)*log(F))/(S(3)*d*(-b*(c + d*x)**S(3)*log(F))**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))*(c + d*x), x), x, -F**a*(c + d*x)**S(2)*Gamma(S(2)/3, -b*(c + d*x)**S(3)*log(F))/(S(3)*d*(-b*(c + d*x)**S(3)*log(F))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3)), x), x, -F**a*(c + d*x)*Gamma(S(1)/3, -b*(c + d*x)**S(3)*log(F))/(S(3)*d*(-b*(c + d*x)**S(3)*log(F))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x)**S(2), x), x, -F**a*(-b*(c + d*x)**S(3)*log(F))**(S(1)/3)*Gamma(S(-1)/3, -b*(c + d*x)**S(3)*log(F))/(S(3)*d*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x)**S(3), x), x, -F**a*(-b*(c + d*x)**S(3)*log(F))**(S(2)/3)*Gamma(S(-2)/3, -b*(c + d*x)**S(3)*log(F))/(S(3)*d*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(3))/(c + d*x)**S(5), x), x, -F**a*(-b*(c + d*x)**S(3)*log(F))**(S(4)/3)*Gamma(S(-4)/3, -b*(c + d*x)**S(3)*log(F))/(S(3)*d*(c + d*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*sqrt(c + d*x)), x), x, S(2)*f**(a + b*sqrt(c + d*x))*sqrt(c + d*x)/(b*d*log(f)) - S(2)*f**(a + b*sqrt(c + d*x))/(b**S(2)*d*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*(c + d*x)**(S(1)/3)), x), x, S(3)*f**(a + b*(c + d*x)**(S(1)/3))*(c + d*x)**(S(2)/3)/(b*d*log(f)) - S(6)*f**(a + b*(c + d*x)**(S(1)/3))*(c + d*x)**(S(1)/3)/(b**S(2)*d*log(f)**S(2)) + S(6)*f**(a + b*(c + d*x)**(S(1)/3))/(b**S(3)*d*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))*(c + d*x)**m, x), x, F**a*(-b*log(F)/(c + d*x))**(m + S(1))*(c + d*x)**(m + S(1))*Gamma(-m + S(-1), -b*log(F)/(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))*(c + d*x)**S(4), x), x, -F**a*b**S(5)*Gamma(S(-5), -b*log(F)/(c + d*x))*log(F)**S(5)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))*(c + d*x)**S(3), x), x, F**a*b**S(4)*Gamma(S(-4), -b*log(F)/(c + d*x))*log(F)**S(4)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))*(c + d*x)**S(2), x), x, -F**a*b**S(3)*log(F)**S(3)*Ei(b*log(F)/(c + d*x))/(S(6)*d) + F**(a + b/(c + d*x))*b**S(2)*(c + d*x)*log(F)**S(2)/(S(6)*d) + F**(a + b/(c + d*x))*b*(c + d*x)**S(2)*log(F)/(S(6)*d) + F**(a + b/(c + d*x))*(c + d*x)**S(3)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))*(c + d*x), x), x, -F**a*b**S(2)*log(F)**S(2)*Ei(b*log(F)/(c + d*x))/(S(2)*d) + F**(a + b/(c + d*x))*b*(c + d*x)*log(F)/(S(2)*d) + F**(a + b/(c + d*x))*(c + d*x)**S(2)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)), x), x, -F**a*b*log(F)*Ei(b*log(F)/(c + d*x))/d + F**(a + b/(c + d*x))*(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(c + d*x), x), x, -F**a*Ei(b*log(F)/(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(c + d*x)**S(2), x), x, -F**(a + b/(c + d*x))/(b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(c + d*x)**S(3), x), x, -F**(a + b/(c + d*x))/(b*d*(c + d*x)*log(F)) + F**(a + b/(c + d*x))/(b**S(2)*d*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(c + d*x)**S(4), x), x, -F**(a + b/(c + d*x))/(b*d*(c + d*x)**S(2)*log(F)) + S(2)*F**(a + b/(c + d*x))/(b**S(2)*d*(c + d*x)*log(F)**S(2)) - S(2)*F**(a + b/(c + d*x))/(b**S(3)*d*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(c + d*x)**S(5), x), x, -F**(a + b/(c + d*x))/(b*d*(c + d*x)**S(3)*log(F)) + S(3)*F**(a + b/(c + d*x))/(b**S(2)*d*(c + d*x)**S(2)*log(F)**S(2)) - S(6)*F**(a + b/(c + d*x))/(b**S(3)*d*(c + d*x)*log(F)**S(3)) + S(6)*F**(a + b/(c + d*x))/(b**S(4)*d*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(c + d*x)**S(6), x), x, -F**a*Gamma(S(5), -b*log(F)/(c + d*x))/(b**S(5)*d*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(c + d*x)**S(7), x), x, F**a*Gamma(S(6), -b*log(F)/(c + d*x))/(b**S(6)*d*log(F)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**m, x), x, F**a*(-b*log(F)/(c + d*x)**S(2))**(m/S(2) + S(1)/2)*(c + d*x)**(m + S(1))*Gamma(-m/S(2) + S(-1)/2, -b*log(F)/(c + d*x)**S(2))/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(9), x), x, -F**a*b**S(5)*Gamma(S(-5), -b*log(F)/(c + d*x)**S(2))*log(F)**S(5)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(7), x), x, F**a*b**S(4)*Gamma(S(-4), -b*log(F)/(c + d*x)**S(2))*log(F)**S(4)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(5), x), x, -F**a*b**S(3)*log(F)**S(3)*Ei(b*log(F)/(c + d*x)**S(2))/(S(12)*d) + F**(a + b/(c + d*x)**S(2))*b**S(2)*(c + d*x)**S(2)*log(F)**S(2)/(S(12)*d) + F**(a + b/(c + d*x)**S(2))*b*(c + d*x)**S(4)*log(F)/(S(12)*d) + F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(6)/(S(6)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(3), x), x, -F**a*b**S(2)*log(F)**S(2)*Ei(b*log(F)/(c + d*x)**S(2))/(S(4)*d) + F**(a + b/(c + d*x)**S(2))*b*(c + d*x)**S(2)*log(F)/(S(4)*d) + F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(4)/(S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x), x), x, -F**a*b*log(F)*Ei(b*log(F)/(c + d*x)**S(2))/(S(2)*d) + F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(2)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x), x), x, -F**a*Ei(b*log(F)/(c + d*x)**S(2))/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(3), x), x, -F**(a + b/(c + d*x)**S(2))/(S(2)*b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(5), x), x, -F**(a + b/(c + d*x)**S(2))/(S(2)*b*d*(c + d*x)**S(2)*log(F)) + F**(a + b/(c + d*x)**S(2))/(S(2)*b**S(2)*d*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(7), x), x, -F**(a + b/(c + d*x)**S(2))/(S(2)*b*d*(c + d*x)**S(4)*log(F)) + F**(a + b/(c + d*x)**S(2))/(b**S(2)*d*(c + d*x)**S(2)*log(F)**S(2)) - F**(a + b/(c + d*x)**S(2))/(b**S(3)*d*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(9), x), x, -F**(a + b/(c + d*x)**S(2))/(S(2)*b*d*(c + d*x)**S(6)*log(F)) + S(3)*F**(a + b/(c + d*x)**S(2))/(S(2)*b**S(2)*d*(c + d*x)**S(4)*log(F)**S(2)) - S(3)*F**(a + b/(c + d*x)**S(2))/(b**S(3)*d*(c + d*x)**S(2)*log(F)**S(3)) + S(3)*F**(a + b/(c + d*x)**S(2))/(b**S(4)*d*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(11), x), x, -F**a*Gamma(S(5), -b*log(F)/(c + d*x)**S(2))/(S(2)*b**S(5)*d*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(13), x), x, F**a*Gamma(S(6), -b*log(F)/(c + d*x)**S(2))/(S(2)*b**S(6)*d*log(F)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(10), x), x, F**a*(-b*log(F)/(c + d*x)**S(2))**(S(11)/2)*(c + d*x)**S(11)*Gamma(S(-11)/2, -b*log(F)/(c + d*x)**S(2))/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(8), x), x, F**a*(-b*log(F)/(c + d*x)**S(2))**(S(9)/2)*(c + d*x)**S(9)*Gamma(S(-9)/2, -b*log(F)/(c + d*x)**S(2))/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(6), x), x, -S(8)*sqrt(pi)*F**a*b**(S(7)/2)*log(F)**(S(7)/2)*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/(S(105)*d) + S(8)*F**(a + b/(c + d*x)**S(2))*b**S(3)*(c + d*x)*log(F)**S(3)/(S(105)*d) + S(4)*F**(a + b/(c + d*x)**S(2))*b**S(2)*(c + d*x)**S(3)*log(F)**S(2)/(S(105)*d) + S(2)*F**(a + b/(c + d*x)**S(2))*b*(c + d*x)**S(5)*log(F)/(S(35)*d) + F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(7)/(S(7)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(4), x), x, -S(4)*sqrt(pi)*F**a*b**(S(5)/2)*log(F)**(S(5)/2)*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/(S(15)*d) + S(4)*F**(a + b/(c + d*x)**S(2))*b**S(2)*(c + d*x)*log(F)**S(2)/(S(15)*d) + S(2)*F**(a + b/(c + d*x)**S(2))*b*(c + d*x)**S(3)*log(F)/(S(15)*d) + F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(5)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(2), x), x, -S(2)*sqrt(pi)*F**a*b**(S(3)/2)*log(F)**(S(3)/2)*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/(S(3)*d) + S(2)*F**(a + b/(c + d*x)**S(2))*b*(c + d*x)*log(F)/(S(3)*d) + F**(a + b/(c + d*x)**S(2))*(c + d*x)**S(3)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2)), x), x, -sqrt(pi)*F**a*sqrt(b)*sqrt(log(F))*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/d + F**(a + b/(c + d*x)**S(2))*(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(2), x), x, -sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/(S(2)*sqrt(b)*d*sqrt(log(F))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(4), x), x, sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/(S(4)*b**(S(3)/2)*d*log(F)**(S(3)/2)) - F**(a + b/(c + d*x)**S(2))/(S(2)*b*d*(c + d*x)*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(6), x), x, -S(3)*sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/(S(8)*b**(S(5)/2)*d*log(F)**(S(5)/2)) - F**(a + b/(c + d*x)**S(2))/(S(2)*b*d*(c + d*x)**S(3)*log(F)) + S(3)*F**(a + b/(c + d*x)**S(2))/(S(4)*b**S(2)*d*(c + d*x)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(8), x), x, S(15)*sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/(S(16)*b**(S(7)/2)*d*log(F)**(S(7)/2)) - F**(a + b/(c + d*x)**S(2))/(S(2)*b*d*(c + d*x)**S(5)*log(F)) + S(5)*F**(a + b/(c + d*x)**S(2))/(S(4)*b**S(2)*d*(c + d*x)**S(3)*log(F)**S(2)) - S(15)*F**(a + b/(c + d*x)**S(2))/(S(8)*b**S(3)*d*(c + d*x)*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(10), x), x, -S(105)*sqrt(pi)*F**a*erfi(sqrt(b)*sqrt(log(F))/(c + d*x))/(S(32)*b**(S(9)/2)*d*log(F)**(S(9)/2)) - F**(a + b/(c + d*x)**S(2))/(S(2)*b*d*(c + d*x)**S(7)*log(F)) + S(7)*F**(a + b/(c + d*x)**S(2))/(S(4)*b**S(2)*d*(c + d*x)**S(5)*log(F)**S(2)) - S(35)*F**(a + b/(c + d*x)**S(2))/(S(8)*b**S(3)*d*(c + d*x)**S(3)*log(F)**S(3)) + S(105)*F**(a + b/(c + d*x)**S(2))/(S(16)*b**S(4)*d*(c + d*x)*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(12), x), x, F**a*Gamma(S(11)/2, -b*log(F)/(c + d*x)**S(2))/(S(2)*d*(-b*log(F)/(c + d*x)**S(2))**(S(11)/2)*(c + d*x)**S(11)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(2))/(c + d*x)**S(14), x), x, F**a*Gamma(S(13)/2, -b*log(F)/(c + d*x)**S(2))/(S(2)*d*(-b*log(F)/(c + d*x)**S(2))**(S(13)/2)*(c + d*x)**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))*(c + d*x)**m, x), x, F**a*(-b*log(F)/(c + d*x)**S(3))**(m/S(3) + S(1)/3)*(c + d*x)**(m + S(1))*Gamma(-m/S(3) + S(-1)/3, -b*log(F)/(c + d*x)**S(3))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(14), x), x, -F**a*b**S(5)*Gamma(S(-5), -b*log(F)/(c + d*x)**S(3))*log(F)**S(5)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(11), x), x, F**a*b**S(4)*Gamma(S(-4), -b*log(F)/(c + d*x)**S(3))*log(F)**S(4)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(8), x), x, -F**a*b**S(3)*log(F)**S(3)*Ei(b*log(F)/(c + d*x)**S(3))/(S(18)*d) + F**(a + b/(c + d*x)**S(3))*b**S(2)*(c + d*x)**S(3)*log(F)**S(2)/(S(18)*d) + F**(a + b/(c + d*x)**S(3))*b*(c + d*x)**S(6)*log(F)/(S(18)*d) + F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(9)/(S(9)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(5), x), x, -F**a*b**S(2)*log(F)**S(2)*Ei(b*log(F)/(c + d*x)**S(3))/(S(6)*d) + F**(a + b/(c + d*x)**S(3))*b*(c + d*x)**S(3)*log(F)/(S(6)*d) + F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(6)/(S(6)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(2), x), x, -F**a*b*log(F)*Ei(b*log(F)/(c + d*x)**S(3))/(S(3)*d) + F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(3)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x), x), x, -F**a*Ei(b*log(F)/(c + d*x)**S(3))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(4), x), x, -F**(a + b/(c + d*x)**S(3))/(S(3)*b*d*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(7), x), x, -F**(a + b/(c + d*x)**S(3))/(S(3)*b*d*(c + d*x)**S(3)*log(F)) + F**(a + b/(c + d*x)**S(3))/(S(3)*b**S(2)*d*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(10), x), x, -F**(a + b/(c + d*x)**S(3))/(S(3)*b*d*(c + d*x)**S(6)*log(F)) + S(2)*F**(a + b/(c + d*x)**S(3))/(S(3)*b**S(2)*d*(c + d*x)**S(3)*log(F)**S(2)) - S(2)*F**(a + b/(c + d*x)**S(3))/(S(3)*b**S(3)*d*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(13), x), x, -F**(a + b/(c + d*x)**S(3))/(S(3)*b*d*(c + d*x)**S(9)*log(F)) + F**(a + b/(c + d*x)**S(3))/(b**S(2)*d*(c + d*x)**S(6)*log(F)**S(2)) - S(2)*F**(a + b/(c + d*x)**S(3))/(b**S(3)*d*(c + d*x)**S(3)*log(F)**S(3)) + S(2)*F**(a + b/(c + d*x)**S(3))/(b**S(4)*d*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(16), x), x, -F**a*Gamma(S(5), -b*log(F)/(c + d*x)**S(3))/(S(3)*b**S(5)*d*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(19), x), x, F**a*Gamma(S(6), -b*log(F)/(c + d*x)**S(3))/(S(3)*b**S(6)*d*log(F)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))*(c + d*x)**S(3), x), x, F**a*(-b*log(F)/(c + d*x)**S(3))**(S(4)/3)*(c + d*x)**S(4)*Gamma(S(-4)/3, -b*log(F)/(c + d*x)**S(3))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))*(c + d*x), x), x, F**a*(-b*log(F)/(c + d*x)**S(3))**(S(2)/3)*(c + d*x)**S(2)*Gamma(S(-2)/3, -b*log(F)/(c + d*x)**S(3))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3)), x), x, F**a*(-b*log(F)/(c + d*x)**S(3))**(S(1)/3)*(c + d*x)*Gamma(S(-1)/3, -b*log(F)/(c + d*x)**S(3))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(2), x), x, F**a*Gamma(S(1)/3, -b*log(F)/(c + d*x)**S(3))/(S(3)*d*(-b*log(F)/(c + d*x)**S(3))**(S(1)/3)*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(3), x), x, F**a*Gamma(S(2)/3, -b*log(F)/(c + d*x)**S(3))/(S(3)*d*(-b*log(F)/(c + d*x)**S(3))**(S(2)/3)*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x)**S(3))/(c + d*x)**S(5), x), x, F**a*Gamma(S(4)/3, -b*log(F)/(c + d*x)**S(3))/(S(3)*d*(-b*log(F)/(c + d*x)**S(3))**(S(4)/3)*(c + d*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**m, x), x, -F**a*(-b*(c + d*x)**n*log(F))**(-(m + S(1))/n)*(c + d*x)**(m + S(1))*Gamma((m + S(1))/n, -b*(c + d*x)**n*log(F))/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**S(3), x), x, -F**a*(-b*(c + d*x)**n*log(F))**(-S(4)/n)*(c + d*x)**S(4)*Gamma(S(4)/n, -b*(c + d*x)**n*log(F))/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**S(2), x), x, -F**a*(-b*(c + d*x)**n*log(F))**(-S(3)/n)*(c + d*x)**S(3)*Gamma(S(3)/n, -b*(c + d*x)**n*log(F))/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x), x), x, -F**a*(-b*(c + d*x)**n*log(F))**(-S(2)/n)*(c + d*x)**S(2)*Gamma(S(2)/n, -b*(c + d*x)**n*log(F))/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n), x), x, -F**a*(-b*(c + d*x)**n*log(F))**(-S(1)/n)*(c + d*x)*Gamma(S(1)/n, -b*(c + d*x)**n*log(F))/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)/(c + d*x), x), x, F**a*Ei(b*(c + d*x)**n*log(F))/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)/(c + d*x)**S(2), x), x, -F**a*(-b*(c + d*x)**n*log(F))**(S(1)/n)*Gamma(-S(1)/n, -b*(c + d*x)**n*log(F))/(d*n*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)/(c + d*x)**S(3), x), x, -F**a*(-b*(c + d*x)**n*log(F))**(S(2)/n)*Gamma(-S(2)/n, -b*(c + d*x)**n*log(F))/(d*n*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)/(c + d*x)**S(4), x), x, -F**a*(-b*(c + d*x)**n*log(F))**(S(3)/n)*Gamma(-S(3)/n, -b*(c + d*x)**n*log(F))/(d*n*(c + d*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(S(6)*n + S(-1)), x), x, -F**a*Gamma(S(6), -b*(c + d*x)**n*log(F))/(b**S(6)*d*n*log(F)**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(S(5)*n + S(-1)), x), x, F**a*Gamma(S(5), -b*(c + d*x)**n*log(F))/(b**S(5)*d*n*log(F)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(S(4)*n + S(-1)), x), x, F**(a + b*(c + d*x)**n)*(c + d*x)**(S(3)*n)/(b*d*n*log(F)) - S(3)*F**(a + b*(c + d*x)**n)*(c + d*x)**(S(2)*n)/(b**S(2)*d*n*log(F)**S(2)) + S(6)*F**(a + b*(c + d*x)**n)*(c + d*x)**n/(b**S(3)*d*n*log(F)**S(3)) - S(6)*F**(a + b*(c + d*x)**n)/(b**S(4)*d*n*log(F)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(S(3)*n + S(-1)), x), x, F**(a + b*(c + d*x)**n)*(c + d*x)**(S(2)*n)/(b*d*n*log(F)) - S(2)*F**(a + b*(c + d*x)**n)*(c + d*x)**n/(b**S(2)*d*n*log(F)**S(2)) + S(2)*F**(a + b*(c + d*x)**n)/(b**S(3)*d*n*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(S(2)*n + S(-1)), x), x, F**(a + b*(c + d*x)**n)*(c + d*x)**n/(b*d*n*log(F)) - F**(a + b*(c + d*x)**n)/(b**S(2)*d*n*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(n + S(-1)), x), x, F**(a + b*(c + d*x)**n)/(b*d*n*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)/(c + d*x), x), x, F**a*Ei(b*(c + d*x)**n*log(F))/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(-n + S(-1)), x), x, F**a*b*log(F)*Ei(b*(c + d*x)**n*log(F))/(d*n) - F**(a + b*(c + d*x)**n)*(c + d*x)**(-n)/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(-S(2)*n + S(-1)), x), x, F**a*b**S(2)*log(F)**S(2)*Ei(b*(c + d*x)**n*log(F))/(S(2)*d*n) - F**(a + b*(c + d*x)**n)*b*(c + d*x)**(-n)*log(F)/(S(2)*d*n) - F**(a + b*(c + d*x)**n)*(c + d*x)**(-S(2)*n)/(S(2)*d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(-S(3)*n + S(-1)), x), x, F**a*b**S(3)*log(F)**S(3)*Ei(b*(c + d*x)**n*log(F))/(S(6)*d*n) - F**(a + b*(c + d*x)**n)*b**S(2)*(c + d*x)**(-n)*log(F)**S(2)/(S(6)*d*n) - F**(a + b*(c + d*x)**n)*b*(c + d*x)**(-S(2)*n)*log(F)/(S(6)*d*n) - F**(a + b*(c + d*x)**n)*(c + d*x)**(-S(3)*n)/(S(3)*d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(-S(4)*n + S(-1)), x), x, -F**a*b**S(4)*Gamma(S(-4), -b*(c + d*x)**n*log(F))*log(F)**S(4)/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**n)*(c + d*x)**(-S(5)*n + S(-1)), x), x, F**a*b**S(5)*Gamma(S(-5), -b*(c + d*x)**n*log(F))*log(F)**S(5)/(d*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(c*(a + b*x)**n)*(a + b*x)**(n/S(2) + S(-1)), x), x, sqrt(pi)*erfi(sqrt(c)*(a + b*x)**(n/S(2))*sqrt(log(F)))/(b*sqrt(c)*n*sqrt(log(F))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(-c*(a + b*x)**n)*(a + b*x)**(n/S(2) + S(-1)), x), x, sqrt(pi)*erf(sqrt(c)*(a + b*x)**(n/S(2))*sqrt(log(F)))/(b*sqrt(c)*n*sqrt(log(F))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(e + f*x)**S(5), x), x, sqrt(pi)*F**a*(-c*f + d*e)**S(5)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(2)*sqrt(b)*d**S(6)*sqrt(log(F))) - S(5)*sqrt(pi)*F**a*f**S(2)*(-c*f + d*e)**S(3)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(2)*b**(S(3)/2)*d**S(6)*log(F)**(S(3)/2)) + S(15)*sqrt(pi)*F**a*f**S(4)*(-c*f + d*e)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(8)*b**(S(5)/2)*d**S(6)*log(F)**(S(5)/2)) + F**(a + b*(c + d*x)**S(2))*f**S(5)*(c + d*x)**S(4)/(S(2)*b*d**S(6)*log(F)) + S(5)*F**(a + b*(c + d*x)**S(2))*f**S(4)*(c + d*x)**S(3)*(-c*f + d*e)/(S(2)*b*d**S(6)*log(F)) + S(5)*F**(a + b*(c + d*x)**S(2))*f**S(3)*(c + d*x)**S(2)*(-c*f + d*e)**S(2)/(b*d**S(6)*log(F)) + S(5)*F**(a + b*(c + d*x)**S(2))*f**S(2)*(c + d*x)*(-c*f + d*e)**S(3)/(b*d**S(6)*log(F)) + S(5)*F**(a + b*(c + d*x)**S(2))*f*(-c*f + d*e)**S(4)/(S(2)*b*d**S(6)*log(F)) - F**(a + b*(c + d*x)**S(2))*f**S(5)*(c + d*x)**S(2)/(b**S(2)*d**S(6)*log(F)**S(2)) - S(15)*F**(a + b*(c + d*x)**S(2))*f**S(4)*(c + d*x)*(-c*f + d*e)/(S(4)*b**S(2)*d**S(6)*log(F)**S(2)) - S(5)*F**(a + b*(c + d*x)**S(2))*f**S(3)*(-c*f + d*e)**S(2)/(b**S(2)*d**S(6)*log(F)**S(2)) + F**(a + b*(c + d*x)**S(2))*f**S(5)/(b**S(3)*d**S(6)*log(F)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(e + f*x)**S(4), x), x, sqrt(pi)*F**a*(-c*f + d*e)**S(4)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(2)*sqrt(b)*d**S(5)*sqrt(log(F))) - S(3)*sqrt(pi)*F**a*f**S(2)*(-c*f + d*e)**S(2)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(2)*b**(S(3)/2)*d**S(5)*log(F)**(S(3)/2)) + S(3)*sqrt(pi)*F**a*f**S(4)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(8)*b**(S(5)/2)*d**S(5)*log(F)**(S(5)/2)) + F**(a + b*(c + d*x)**S(2))*f**S(4)*(c + d*x)**S(3)/(S(2)*b*d**S(5)*log(F)) + S(2)*F**(a + b*(c + d*x)**S(2))*f**S(3)*(c + d*x)**S(2)*(-c*f + d*e)/(b*d**S(5)*log(F)) + S(3)*F**(a + b*(c + d*x)**S(2))*f**S(2)*(c + d*x)*(-c*f + d*e)**S(2)/(b*d**S(5)*log(F)) + S(2)*F**(a + b*(c + d*x)**S(2))*f*(-c*f + d*e)**S(3)/(b*d**S(5)*log(F)) - S(3)*F**(a + b*(c + d*x)**S(2))*f**S(4)*(c + d*x)/(S(4)*b**S(2)*d**S(5)*log(F)**S(2)) - S(2)*F**(a + b*(c + d*x)**S(2))*f**S(3)*(-c*f + d*e)/(b**S(2)*d**S(5)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(e + f*x)**S(3), x), x, sqrt(pi)*F**a*(-c*f + d*e)**S(3)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(2)*sqrt(b)*d**S(4)*sqrt(log(F))) - S(3)*sqrt(pi)*F**a*f**S(2)*(-c*f + d*e)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(4)*b**(S(3)/2)*d**S(4)*log(F)**(S(3)/2)) + F**(a + b*(c + d*x)**S(2))*f**S(3)*(c + d*x)**S(2)/(S(2)*b*d**S(4)*log(F)) + S(3)*F**(a + b*(c + d*x)**S(2))*f**S(2)*(c + d*x)*(-c*f + d*e)/(S(2)*b*d**S(4)*log(F)) + S(3)*F**(a + b*(c + d*x)**S(2))*f*(-c*f + d*e)**S(2)/(S(2)*b*d**S(4)*log(F)) - F**(a + b*(c + d*x)**S(2))*f**S(3)/(S(2)*b**S(2)*d**S(4)*log(F)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(e + f*x)**S(2), x), x, sqrt(pi)*F**a*(-c*f + d*e)**S(2)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(2)*sqrt(b)*d**S(3)*sqrt(log(F))) - sqrt(pi)*F**a*f**S(2)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(4)*b**(S(3)/2)*d**S(3)*log(F)**(S(3)/2)) + F**(a + b*(c + d*x)**S(2))*f**S(2)*(c + d*x)/(S(2)*b*d**S(3)*log(F)) + F**(a + b*(c + d*x)**S(2))*f*(-c*f + d*e)/(b*d**S(3)*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))*(e + f*x), x), x, sqrt(pi)*F**a*(-c*f/S(2) + d*e/S(2))*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(sqrt(b)*d**S(2)*sqrt(log(F))) + F**(a + b*(c + d*x)**S(2))*f/(S(2)*b*d**S(2)*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2)), x), x, sqrt(pi)*F**a*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/(S(2)*sqrt(b)*d*sqrt(log(F))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(e + f*x), x), x, Integral(F**(a + b*(c + d*x)**S(2))/(e + f*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(e + f*x)**S(2), x), x, sqrt(pi)*F**a*sqrt(b)*d*sqrt(log(F))*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/f**S(2) - F**(a + b*(c + d*x)**S(2))/(f*(e + f*x)) - S(2)*b*d*(-c*f + d*e)*log(F)*Integral(F**(a + b*(c + d*x)**S(2))/(e + f*x), x)/f**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*(c + d*x)**S(2))/(e + f*x)**S(3), x), x, -sqrt(pi)*F**a*b**(S(3)/2)*d**S(2)*(-c*f + d*e)*log(F)**(S(3)/2)*erfi(sqrt(b)*(c + d*x)*sqrt(log(F)))/f**S(4) + F**(a + b*(c + d*x)**S(2))*b*d*(-c*f + d*e)*log(F)/(f**S(3)*(e + f*x)) - F**(a + b*(c + d*x)**S(2))/(S(2)*f*(e + f*x)**S(2)) + S(2)*b**S(2)*d**S(2)*(-c*f + d*e)**S(2)*log(F)**S(2)*Integral(F**(a + b*(c + d*x)**S(2))/(e + f*x), x)/f**S(4) + b*d**S(2)*log(F)*Integral(F**(a + b*(c + d*x)**S(2))/(e + f*x), x)/f**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(e*(c + d*x)**S(3)), x), x, -b**S(3)*(c + d*x)**S(4)*Gamma(S(4)/3, -e*(c + d*x)**S(3))/(S(3)*d**S(4)*(-e*(c + d*x)**S(3))**(S(4)/3)) - b**S(2)*(-a*d + b*c)*exp(e*(c + d*x)**S(3))/(d**S(4)*e) - b*(c + d*x)**S(2)*(-a*d + b*c)**S(2)*Gamma(S(2)/3, -e*(c + d*x)**S(3))/(d**S(4)*(-e*(c + d*x)**S(3))**(S(2)/3)) + (c + d*x)*(-a*d + b*c)**S(3)*Gamma(S(1)/3, -e*(c + d*x)**S(3))/(S(3)*d**S(4)*(-e*(c + d*x)**S(3))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*exp(e*(c + d*x)**S(3)), x), x, b**S(2)*exp(e*(c + d*x)**S(3))/(S(3)*d**S(3)*e) + S(2)*b*(c + d*x)**S(2)*(-a*d + b*c)*Gamma(S(2)/3, -e*(c + d*x)**S(3))/(S(3)*d**S(3)*(-e*(c + d*x)**S(3))**(S(2)/3)) - (c + d*x)*(-a*d + b*c)**S(2)*Gamma(S(1)/3, -e*(c + d*x)**S(3))/(S(3)*d**S(3)*(-e*(c + d*x)**S(3))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*exp(e*(c + d*x)**S(3)), x), x, -b*(c + d*x)**S(2)*Gamma(S(2)/3, -e*(c + d*x)**S(3))/(S(3)*d**S(2)*(-e*(c + d*x)**S(3))**(S(2)/3)) + (c + d*x)*(-a*d/S(3) + b*c/S(3))*Gamma(S(1)/3, -e*(c + d*x)**S(3))/(d**S(2)*(-e*(c + d*x)**S(3))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e*(c + d*x)**S(3)), x), x, (-c/S(3) - d*x/S(3))*Gamma(S(1)/3, -e*(c + d*x)**S(3))/(d*(-e*(c + d*x)**S(3))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e*(c + d*x)**S(3))/(a + b*x), x), x, Integral(exp(e*(c + d*x)**S(3))/(a + b*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e*(c + d*x)**S(3))/(a + b*x)**S(2), x), x, -exp(e*(c + d*x)**S(3))/(b*(a + b*x)) - d*e*(c + d*x)**S(2)*Gamma(S(2)/3, -e*(c + d*x)**S(3))/(b**S(2)*(-e*(c + d*x)**S(3))**(S(2)/3)) + S(3)*d*e*(-a*d + b*c)**S(2)*Integral(exp(e*(c + d*x)**S(3))/(a + b*x), x)/b**S(3) - d*e*(c + d*x)*(-a*d + b*c)*Gamma(S(1)/3, -e*(c + d*x)**S(3))/(b**S(3)*(-e*(c + d*x)**S(3))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(e + f*x), x), x, -F**a*Ei(b*log(F)/(c + d*x))/f + F**(a - b*f/(-c*f + d*e))*Ei(b*d*(e + f*x)*log(F)/((c + d*x)*(-c*f + d*e)))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(e + f*x)**S(2), x), x, F**(a + b/(c + d*x))*d/(f*(-c*f + d*e)) - F**(a + b/(c + d*x))/(f*(e + f*x)) - F**(a - b*f/(-c*f + d*e))*b*d*log(F)*Ei(b*d*(e + f*x)*log(F)/((c + d*x)*(-c*f + d*e)))/(-c*f + d*e)**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(e + f*x)**S(3), x), x, -F**(a + b/(c + d*x))*b*d**S(2)*log(F)/(S(2)*(-c*f + d*e)**S(3)) + F**(a + b/(c + d*x))*b*d*log(F)/(S(2)*(e + f*x)*(-c*f + d*e)**S(2)) + F**(a + b/(c + d*x))*d**S(2)/(S(2)*f*(-c*f + d*e)**S(2)) - F**(a + b/(c + d*x))/(S(2)*f*(e + f*x)**S(2)) + F**(a - b*f/(-c*f + d*e))*b**S(2)*d**S(2)*f*log(F)**S(2)*Ei(b*d*(e + f*x)*log(F)/((c + d*x)*(-c*f + d*e)))/(S(2)*(-c*f + d*e)**S(4)) - F**(a - b*f/(-c*f + d*e))*b*d**S(2)*log(F)*Ei(b*d*(e + f*x)*log(F)/((c + d*x)*(-c*f + d*e)))/(-c*f + d*e)**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b/(c + d*x))/(e + f*x)**S(4), x), x, F**(a + b/(c + d*x))*b**S(2)*d**S(3)*f*log(F)**S(2)/(S(6)*(-c*f + d*e)**S(5)) - F**(a + b/(c + d*x))*b**S(2)*d**S(2)*f*log(F)**S(2)/(S(6)*(e + f*x)*(-c*f + d*e)**S(4)) - S(5)*F**(a + b/(c + d*x))*b*d**S(3)*log(F)/(S(6)*(-c*f + d*e)**S(4)) + S(2)*F**(a + b/(c + d*x))*b*d**S(2)*log(F)/(S(3)*(e + f*x)*(-c*f + d*e)**S(3)) + F**(a + b/(c + d*x))*b*d*log(F)/(S(6)*(e + f*x)**S(2)*(-c*f + d*e)**S(2)) + F**(a + b/(c + d*x))*d**S(3)/(S(3)*f*(-c*f + d*e)**S(3)) - F**(a + b/(c + d*x))/(S(3)*f*(e + f*x)**S(3)) - F**(a - b*f/(-c*f + d*e))*b**S(3)*d**S(3)*f**S(2)*log(F)**S(3)*Ei(b*d*(e + f*x)*log(F)/((c + d*x)*(-c*f + d*e)))/(S(6)*(-c*f + d*e)**S(6)) + F**(a - b*f/(-c*f + d*e))*b**S(2)*d**S(3)*f*log(F)**S(2)*Ei(b*d*(e + f*x)*log(F)/((c + d*x)*(-c*f + d*e)))/(-c*f + d*e)**S(5) - F**(a - b*f/(-c*f + d*e))*b*d**S(3)*log(F)*Ei(b*d*(e + f*x)*log(F)/((c + d*x)*(-c*f + d*e)))/(-c*f + d*e)**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(4)*exp(e/(c + d*x)), x), x, -b**S(4)*e**S(5)*Gamma(S(-5), -e/(c + d*x))/d**S(5) - S(4)*b**S(3)*e**S(4)*(-a*d + b*c)*Gamma(S(-4), -e/(c + d*x))/d**S(5) - b**S(2)*e**S(3)*(-a*d + b*c)**S(2)*Ei(e/(c + d*x))/d**S(5) + b**S(2)*e**S(2)*(c + d*x)*(-a*d + b*c)**S(2)*exp(e/(c + d*x))/d**S(5) + b**S(2)*e*(c + d*x)**S(2)*(-a*d + b*c)**S(2)*exp(e/(c + d*x))/d**S(5) + S(2)*b**S(2)*(c + d*x)**S(3)*(-a*d + b*c)**S(2)*exp(e/(c + d*x))/d**S(5) + S(2)*b*e**S(2)*(-a*d + b*c)**S(3)*Ei(e/(c + d*x))/d**S(5) - S(2)*b*e*(c + d*x)*(-a*d + b*c)**S(3)*exp(e/(c + d*x))/d**S(5) - S(2)*b*(c + d*x)**S(2)*(-a*d + b*c)**S(3)*exp(e/(c + d*x))/d**S(5) - e*(-a*d + b*c)**S(4)*Ei(e/(c + d*x))/d**S(5) + (c + d*x)*(-a*d + b*c)**S(4)*exp(e/(c + d*x))/d**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(e/(c + d*x)), x), x, b**S(3)*e**S(4)*Gamma(S(-4), -e/(c + d*x))/d**S(4) + b**S(2)*e**S(3)*(-a*d + b*c)*Ei(e/(c + d*x))/(S(2)*d**S(4)) - b**S(2)*e**S(2)*(c + d*x)*(-a*d + b*c)*exp(e/(c + d*x))/(S(2)*d**S(4)) - b**S(2)*e*(c + d*x)**S(2)*(-a*d + b*c)*exp(e/(c + d*x))/(S(2)*d**S(4)) - b**S(2)*(c + d*x)**S(3)*(-a*d + b*c)*exp(e/(c + d*x))/d**S(4) - S(3)*b*e**S(2)*(-a*d + b*c)**S(2)*Ei(e/(c + d*x))/(S(2)*d**S(4)) + S(3)*b*e*(c + d*x)*(-a*d + b*c)**S(2)*exp(e/(c + d*x))/(S(2)*d**S(4)) + S(3)*b*(c + d*x)**S(2)*(-a*d + b*c)**S(2)*exp(e/(c + d*x))/(S(2)*d**S(4)) + e*(-a*d + b*c)**S(3)*Ei(e/(c + d*x))/d**S(4) - (c + d*x)*(-a*d + b*c)**S(3)*exp(e/(c + d*x))/d**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*exp(e/(c + d*x)), x), x, -b**S(2)*e**S(3)*Ei(e/(c + d*x))/(S(6)*d**S(3)) + b**S(2)*e**S(2)*(c + d*x)*exp(e/(c + d*x))/(S(6)*d**S(3)) + b**S(2)*e*(c + d*x)**S(2)*exp(e/(c + d*x))/(S(6)*d**S(3)) + b**S(2)*(c + d*x)**S(3)*exp(e/(c + d*x))/(S(3)*d**S(3)) + b*e**S(2)*(-a*d + b*c)*Ei(e/(c + d*x))/d**S(3) - b*e*(c + d*x)*(-a*d + b*c)*exp(e/(c + d*x))/d**S(3) - b*(c + d*x)**S(2)*(-a*d + b*c)*exp(e/(c + d*x))/d**S(3) - e*(-a*d + b*c)**S(2)*Ei(e/(c + d*x))/d**S(3) + (c + d*x)*(-a*d + b*c)**S(2)*exp(e/(c + d*x))/d**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*exp(e/(c + d*x)), x), x, -b*e**S(2)*Ei(e/(c + d*x))/(S(2)*d**S(2)) + b*e*(c + d*x)*exp(e/(c + d*x))/(S(2)*d**S(2)) + b*(c + d*x)**S(2)*exp(e/(c + d*x))/(S(2)*d**S(2)) + e*(-a*d + b*c)*Ei(e/(c + d*x))/d**S(2) + (c + d*x)*(a*d - b*c)*exp(e/(c + d*x))/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x)), x), x, -e*Ei(e/(c + d*x))/d + (c + d*x)*exp(e/(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x))/(a + b*x), x), x, exp(b*e/(-a*d + b*c))*Ei(-d*e*(a + b*x)/((c + d*x)*(-a*d + b*c)))/b - Ei(e/(c + d*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x))/(a + b*x)**S(2), x), x, -d*e*exp(b*e/(-a*d + b*c))*Ei(-d*e*(a + b*x)/((c + d*x)*(-a*d + b*c)))/(-a*d + b*c)**S(2) - d*exp(e/(c + d*x))/(b*(-a*d + b*c)) - exp(e/(c + d*x))/(b*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x))/(a + b*x)**S(3), x), x, b*d**S(2)*e**S(2)*exp(b*e/(-a*d + b*c))*Ei(-d*e*(a + b*x)/((c + d*x)*(-a*d + b*c)))/(S(2)*(-a*d + b*c)**S(4)) + d**S(2)*e*exp(e/(c + d*x))/(S(2)*(-a*d + b*c)**S(3)) + d**S(2)*e*exp(b*e/(-a*d + b*c))*Ei(-d*e*(a + b*x)/((c + d*x)*(-a*d + b*c)))/(-a*d + b*c)**S(3) + d*e*exp(e/(c + d*x))/(S(2)*(a + b*x)*(-a*d + b*c)**S(2)) + d**S(2)*exp(e/(c + d*x))/(S(2)*b*(-a*d + b*c)**S(2)) - exp(e/(c + d*x))/(S(2)*b*(a + b*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(e/(c + d*x)**S(2)), x), x, -b**S(3)*e**S(2)*Ei(e/(c + d*x)**S(2))/(S(4)*d**S(4)) + b**S(3)*e*(c + d*x)**S(2)*exp(e/(c + d*x)**S(2))/(S(4)*d**S(4)) + b**S(3)*(c + d*x)**S(4)*exp(e/(c + d*x)**S(2))/(S(4)*d**S(4)) + S(2)*sqrt(pi)*b**S(2)*e**(S(3)/2)*(-a*d + b*c)*erfi(sqrt(e)/(c + d*x))/d**S(4) - S(2)*b**S(2)*e*(c + d*x)*(-a*d + b*c)*exp(e/(c + d*x)**S(2))/d**S(4) - b**S(2)*(c + d*x)**S(3)*(-a*d + b*c)*exp(e/(c + d*x)**S(2))/d**S(4) - S(3)*b*e*(-a*d + b*c)**S(2)*Ei(e/(c + d*x)**S(2))/(S(2)*d**S(4)) + S(3)*b*(c + d*x)**S(2)*(-a*d + b*c)**S(2)*exp(e/(c + d*x)**S(2))/(S(2)*d**S(4)) + sqrt(pi)*sqrt(e)*(-a*d + b*c)**S(3)*erfi(sqrt(e)/(c + d*x))/d**S(4) - (c + d*x)*(-a*d + b*c)**S(3)*exp(e/(c + d*x)**S(2))/d**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*exp(e/(c + d*x)**S(2)), x), x, -S(2)*sqrt(pi)*b**S(2)*e**(S(3)/2)*erfi(sqrt(e)/(c + d*x))/(S(3)*d**S(3)) + S(2)*b**S(2)*e*(c + d*x)*exp(e/(c + d*x)**S(2))/(S(3)*d**S(3)) + b**S(2)*(c + d*x)**S(3)*exp(e/(c + d*x)**S(2))/(S(3)*d**S(3)) + b*e*(-a*d + b*c)*Ei(e/(c + d*x)**S(2))/d**S(3) - b*(c + d*x)**S(2)*(-a*d + b*c)*exp(e/(c + d*x)**S(2))/d**S(3) - sqrt(pi)*sqrt(e)*(-a*d + b*c)**S(2)*erfi(sqrt(e)/(c + d*x))/d**S(3) + (c + d*x)*(-a*d + b*c)**S(2)*exp(e/(c + d*x)**S(2))/d**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*exp(e/(c + d*x)**S(2)), x), x, -b*e*Ei(e/(c + d*x)**S(2))/(S(2)*d**S(2)) + b*(c + d*x)**S(2)*exp(e/(c + d*x)**S(2))/(S(2)*d**S(2)) + sqrt(pi)*sqrt(e)*(-a*d + b*c)*erfi(sqrt(e)/(c + d*x))/d**S(2) + (c + d*x)*(a*d - b*c)*exp(e/(c + d*x)**S(2))/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x)**S(2)), x), x, -sqrt(pi)*sqrt(e)*erfi(sqrt(e)/(c + d*x))/d + (c + d*x)*exp(e/(c + d*x)**S(2))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x)**S(2))/(a + b*x), x), x, Integral(exp(e/(c + d*x)**S(2))/(a + b*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x)**S(2))/(a + b*x)**S(2), x), x, Integral(exp(e/(c + d*x)**S(2))/(a + b*x)**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x)**S(2))/(a + b*x)**S(3), x), x, Integral(exp(e/(c + d*x)**S(2))/(a + b*x)**S(3), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*exp(e/(c + d*x)**S(3)), x), x, b**S(3)*(-e/(c + d*x)**S(3))**(S(4)/3)*(c + d*x)**S(4)*Gamma(S(-4)/3, -e/(c + d*x)**S(3))/(S(3)*d**S(4)) + b**S(2)*e*(-a*d + b*c)*Ei(e/(c + d*x)**S(3))/d**S(4) - b**S(2)*(c + d*x)**S(3)*(-a*d + b*c)*exp(e/(c + d*x)**S(3))/d**S(4) + b*(-e/(c + d*x)**S(3))**(S(2)/3)*(c + d*x)**S(2)*(-a*d + b*c)**S(2)*Gamma(S(-2)/3, -e/(c + d*x)**S(3))/d**S(4) - (-e/(c + d*x)**S(3))**(S(1)/3)*(c + d*x)*(-a*d + b*c)**S(3)*Gamma(S(-1)/3, -e/(c + d*x)**S(3))/(S(3)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*exp(e/(c + d*x)**S(3)), x), x, -b**S(2)*e*Ei(e/(c + d*x)**S(3))/(S(3)*d**S(3)) + b**S(2)*(c + d*x)**S(3)*exp(e/(c + d*x)**S(3))/(S(3)*d**S(3)) - S(2)*b*(-e/(c + d*x)**S(3))**(S(2)/3)*(c + d*x)**S(2)*(-a*d + b*c)*Gamma(S(-2)/3, -e/(c + d*x)**S(3))/(S(3)*d**S(3)) + (-e/(c + d*x)**S(3))**(S(1)/3)*(c + d*x)*(-a*d + b*c)**S(2)*Gamma(S(-1)/3, -e/(c + d*x)**S(3))/(S(3)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*exp(e/(c + d*x)**S(3)), x), x, b*(-e/(c + d*x)**S(3))**(S(2)/3)*(c + d*x)**S(2)*Gamma(S(-2)/3, -e/(c + d*x)**S(3))/(S(3)*d**S(2)) - (-e/(c + d*x)**S(3))**(S(1)/3)*(c + d*x)*(-a*d/S(3) + b*c/S(3))*Gamma(S(-1)/3, -e/(c + d*x)**S(3))/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x)**S(3)), x), x, (-e/(c + d*x)**S(3))**(S(1)/3)*(c + d*x)*Gamma(S(-1)/3, -e/(c + d*x)**S(3))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x)**S(3))/(a + b*x), x), x, Integral(exp(e/(c + d*x)**S(3))/(a + b*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(e/(c + d*x)**S(3))/(a + b*x)**S(2), x), x, Integral(exp(e/(c + d*x)**S(3))/(a + b*x)**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(e + f*(a + b*x)/(c + d*x))/(g + h*x), x), x, F**(e + f*(-a*h + b*g)/(-c*h + d*g))*Ei(f*(g + h*x)*(a*d - b*c)*log(F)/((c + d*x)*(-c*h + d*g)))/h - F**(b*f/d + e)*Ei(f*(a*d - b*c)*log(F)/(d*(c + d*x)))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(e + f*(a + b*x)/(c + d*x))/(g + h*x)**S(2), x), x, -F**(e + f*(a + b*x)/(c + d*x))/(h*(g + h*x)) + F**(e + f*(-a*h + b*g)/(-c*h + d*g))*f*(-a*d + b*c)*log(F)*Ei(f*(g + h*x)*(a*d - b*c)*log(F)/((c + d*x)*(-c*h + d*g)))/(-c*h + d*g)**S(2) + F**(b*f/d + e - f*(-a*d + b*c)/(d*(c + d*x)))*d/(h*(-c*h + d*g)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(e + f*(a + b*x)/(c + d*x))/(g + h*x)**S(3), x), x, -F**(e + f*(a + b*x)/(c + d*x))*f*(-a*d/S(2) + b*c/S(2))*log(F)/((g + h*x)*(-c*h + d*g)**S(2)) - F**(e + f*(a + b*x)/(c + d*x))/(S(2)*h*(g + h*x)**S(2)) + F**(e + f*(-a*h + b*g)/(-c*h + d*g))*d*f*(-a*d + b*c)*log(F)*Ei(f*(g + h*x)*(a*d - b*c)*log(F)/((c + d*x)*(-c*h + d*g)))/(-c*h + d*g)**S(3) + F**(e + f*(-a*h + b*g)/(-c*h + d*g))*f**S(2)*h*(-a*d + b*c)**S(2)*log(F)**S(2)*Ei(f*(g + h*x)*(a*d - b*c)*log(F)/((c + d*x)*(-c*h + d*g)))/(S(2)*(-c*h + d*g)**S(4)) + F**(b*f/d + e - f*(-a*d + b*c)/(d*(c + d*x)))*d**S(2)/(S(2)*h*(-c*h + d*g)**S(2)) + F**(b*f/d + e - f*(-a*d + b*c)/(d*(c + d*x)))*d*f*(-a*d + b*c)*log(F)/(S(2)*(-c*h + d*g)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(e + f*(a + b*x)/(c + d*x))/(g + h*x)**S(4), x), x, -S(2)*F**(e + f*(a + b*x)/(c + d*x))*d*f*(-a*d + b*c)*log(F)/(S(3)*(g + h*x)*(-c*h + d*g)**S(3)) - F**(e + f*(a + b*x)/(c + d*x))*f**S(2)*h*(-a*d + b*c)**S(2)*log(F)**S(2)/(S(6)*(g + h*x)*(-c*h + d*g)**S(4)) - F**(e + f*(a + b*x)/(c + d*x))*f*(-a*d/S(6) + b*c/S(6))*log(F)/((g + h*x)**S(2)*(-c*h + d*g)**S(2)) - F**(e + f*(a + b*x)/(c + d*x))/(S(3)*h*(g + h*x)**S(3)) + F**(e + f*(-a*h + b*g)/(-c*h + d*g))*d**S(2)*f*(-a*d + b*c)*log(F)*Ei(f*(g + h*x)*(a*d - b*c)*log(F)/((c + d*x)*(-c*h + d*g)))/(-c*h + d*g)**S(4) + F**(e + f*(-a*h + b*g)/(-c*h + d*g))*d*f**S(2)*h*(-a*d + b*c)**S(2)*log(F)**S(2)*Ei(f*(g + h*x)*(a*d - b*c)*log(F)/((c + d*x)*(-c*h + d*g)))/(-c*h + d*g)**S(5) + F**(e + f*(-a*h + b*g)/(-c*h + d*g))*f**S(3)*h**S(2)*(-a*d + b*c)**S(3)*log(F)**S(3)*Ei(f*(g + h*x)*(a*d - b*c)*log(F)/((c + d*x)*(-c*h + d*g)))/(S(6)*(-c*h + d*g)**S(6)) + F**(b*f/d + e - f*(-a*d + b*c)/(d*(c + d*x)))*d**S(3)/(S(3)*h*(-c*h + d*g)**S(3)) + S(5)*F**(b*f/d + e - f*(-a*d + b*c)/(d*(c + d*x)))*d**S(2)*f*(-a*d + b*c)*log(F)/(S(6)*(-c*h + d*g)**S(4)) + F**(b*f/d + e - f*(-a*d + b*c)/(d*(c + d*x)))*d*f**S(2)*h*(-a*d + b*c)**S(2)*log(F)**S(2)/(S(6)*(-c*h + d*g)**S(5)), expand=True, _diff=True, _numerical=True) # fails 1940 and 1939 recursion assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*x**S(3), x), x, -sqrt(pi)*b**S(3)*f**(a - b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(16)*c**(S(7)/2)*sqrt(log(f))) + b**S(2)*f**(a + b*x + c*x**S(2))/(S(8)*c**S(3)*log(f)) - b*f**(a + b*x + c*x**S(2))*x/(S(4)*c**S(2)*log(f)) + S(3)*sqrt(pi)*b*f**(a - b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(8)*c**(S(5)/2)*log(f)**(S(3)/2)) + f**(a + b*x + c*x**S(2))*x**S(2)/(S(2)*c*log(f)) - f**(a + b*x + c*x**S(2))/(S(2)*c**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*x**S(2), x), x, sqrt(pi)*b**S(2)*f**(a - b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(8)*c**(S(5)/2)*sqrt(log(f))) - b*f**(a + b*x + c*x**S(2))/(S(4)*c**S(2)*log(f)) + f**(a + b*x + c*x**S(2))*x/(S(2)*c*log(f)) - sqrt(pi)*f**(a - b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(4)*c**(S(3)/2)*log(f)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*x, x), x, -sqrt(pi)*b*f**(a - b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(4)*c**(S(3)/2)*sqrt(log(f))) + f**(a + b*x + c*x**S(2))/(S(2)*c*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2)), x), x, sqrt(pi)*f**(a - b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(2)*sqrt(c)*sqrt(log(f))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))/x, x), x, Integral(f**(a + b*x + c*x**S(2))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))/x**S(2), x), x, b*log(f)*Integral(f**(a + b*x + c*x**S(2))/x, x) + sqrt(pi)*sqrt(c)*f**(a - b**S(2)/(S(4)*c))*sqrt(log(f))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c)) - f**(a + b*x + c*x**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp(a + b*x - c*x**S(2)), x), x, -sqrt(pi)*b**S(3)*exp(a + b**S(2)/(S(4)*c))*erf((b/S(2) - c*x)/sqrt(c))/(S(16)*c**(S(7)/2)) - b**S(2)*exp(a + b*x - c*x**S(2))/(S(8)*c**S(3)) - b*x*exp(a + b*x - c*x**S(2))/(S(4)*c**S(2)) - S(3)*sqrt(pi)*b*exp(a + b**S(2)/(S(4)*c))*erf((b/S(2) - c*x)/sqrt(c))/(S(8)*c**(S(5)/2)) - x**S(2)*exp(a + b*x - c*x**S(2))/(S(2)*c) - exp(a + b*x - c*x**S(2))/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(a + b*x - c*x**S(2)), x), x, -sqrt(pi)*b**S(2)*exp(a + b**S(2)/(S(4)*c))*erf((b/S(2) - c*x)/sqrt(c))/(S(8)*c**(S(5)/2)) - b*exp(a + b*x - c*x**S(2))/(S(4)*c**S(2)) - x*exp(a + b*x - c*x**S(2))/(S(2)*c) - sqrt(pi)*exp(a + b**S(2)/(S(4)*c))*erf((b/S(2) - c*x)/sqrt(c))/(S(4)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(a + b*x - c*x**S(2)), x), x, -sqrt(pi)*b*exp(a + b**S(2)/(S(4)*c))*erf((b/S(2) - c*x)/sqrt(c))/(S(4)*c**(S(3)/2)) - exp(a + b*x - c*x**S(2))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a + b*x - c*x**S(2)), x), x, -sqrt(pi)*exp(a + b**S(2)/(S(4)*c))*erf((b/S(2) - c*x)/sqrt(c))/(S(2)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a + b*x - c*x**S(2))/x, x), x, Integral(exp(a + b*x - c*x**S(2))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a + b*x - c*x**S(2))/x**S(2), x), x, b*Integral(exp(a + b*x - c*x**S(2))/x, x) + sqrt(pi)*sqrt(c)*exp(a + b**S(2)/(S(4)*c))*erf((b/S(2) - c*x)/sqrt(c)) - exp(a + b*x - c*x**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp((a + b*x)*(c + d*x)), x), x, x**S(2)*exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/(S(2)*b*d) - x*(a*d/S(4) + b*c/S(4))*exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/(b**S(2)*d**S(2)) - exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/(S(2)*b**S(2)*d**S(2)) + (a*d + b*c)**S(2)*exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/(S(8)*b**S(3)*d**S(3)) + sqrt(pi)*(S(3)*a*d/S(8) + S(3)*b*c/S(8))*exp(-(-a*d + b*c)**S(2)/(S(4)*b*d))*erfi((a*d/S(2) + b*c/S(2) + b*d*x)/(sqrt(b)*sqrt(d)))/(b**(S(5)/2)*d**(S(5)/2)) - sqrt(pi)*(a*d + b*c)**S(3)*exp(-(-a*d + b*c)**S(2)/(S(4)*b*d))*erfi((a*d/S(2) + b*c/S(2) + b*d*x)/(sqrt(b)*sqrt(d)))/(S(16)*b**(S(7)/2)*d**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp((a + b*x)*(c + d*x)), x), x, x*exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/(S(2)*b*d) + (-a*d/S(4) - b*c/S(4))*exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/(b**S(2)*d**S(2)) - sqrt(pi)*exp(-(-a*d + b*c)**S(2)/(S(4)*b*d))*erfi((a*d/S(2) + b*c/S(2) + b*d*x)/(sqrt(b)*sqrt(d)))/(S(4)*b**(S(3)/2)*d**(S(3)/2)) + sqrt(pi)*(a*d + b*c)**S(2)*exp(-(-a*d + b*c)**S(2)/(S(4)*b*d))*erfi((a*d/S(2) + b*c/S(2) + b*d*x)/(sqrt(b)*sqrt(d)))/(S(8)*b**(S(5)/2)*d**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp((a + b*x)*(c + d*x)), x), x, exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/(S(2)*b*d) - sqrt(pi)*(a*d/S(4) + b*c/S(4))*exp(-(-a*d + b*c)**S(2)/(S(4)*b*d))*erfi((a*d/S(2) + b*c/S(2) + b*d*x)/(sqrt(b)*sqrt(d)))/(b**(S(3)/2)*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp((a + b*x)*(c + d*x)), x), x, sqrt(pi)*exp(-(-a*d + b*c)**S(2)/(S(4)*b*d))*erfi((a*d/S(2) + b*c/S(2) + b*d*x)/(sqrt(b)*sqrt(d)))/(S(2)*sqrt(b)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp((a + b*x)*(c + d*x))/x, x), x, Integral(exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp((a + b*x)*(c + d*x))/x**S(2), x), x, sqrt(pi)*sqrt(b)*sqrt(d)*exp(-(-a*d + b*c)**S(2)/(S(4)*b*d))*erfi((a*d/S(2) + b*c/S(2) + b*d*x)/(sqrt(b)*sqrt(d))) + (a*d + b*c)*Integral(exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/x, x) - exp(a*c + b*d*x**S(2) + x*(a*d + b*c))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*(d + e*x)**S(3), x), x, e*f**(a + b*x + c*x**S(2))*(d + e*x)**S(2)/(S(2)*c*log(f)) - e**S(3)*f**(a + b*x + c*x**S(2))/(S(2)*c**S(2)*log(f)**S(2)) + e*f**(a + b*x + c*x**S(2))*(d + e*x)*(-b*e + S(2)*c*d)/(S(4)*c**S(2)*log(f)) + e*f**(a + b*x + c*x**S(2))*(-b*e + S(2)*c*d)**S(2)/(S(8)*c**S(3)*log(f)) - S(3)*sqrt(pi)*e**S(2)*f**(a - b**S(2)/(S(4)*c))*(-b*e + S(2)*c*d)*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(8)*c**(S(5)/2)*log(f)**(S(3)/2)) + sqrt(pi)*f**(a - b**S(2)/(S(4)*c))*(-b*e + S(2)*c*d)**S(3)*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(16)*c**(S(7)/2)*sqrt(log(f))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*(d + e*x)**S(2), x), x, e*f**(a + b*x + c*x**S(2))*(d + e*x)/(S(2)*c*log(f)) + e*f**(a + b*x + c*x**S(2))*(-b*e + S(2)*c*d)/(S(4)*c**S(2)*log(f)) - sqrt(pi)*e**S(2)*f**(a - b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(4)*c**(S(3)/2)*log(f)**(S(3)/2)) + sqrt(pi)*f**(a - b**S(2)/(S(4)*c))*(-b*e + S(2)*c*d)**S(2)*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(8)*c**(S(5)/2)*sqrt(log(f))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*(d + e*x), x), x, e*f**(a + b*x + c*x**S(2))/(S(2)*c*log(f)) + sqrt(pi)*f**(a - b**S(2)/(S(4)*c))*(-b*e/S(4) + c*d/S(2))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(c**(S(3)/2)*sqrt(log(f))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))/(d + e*x), x), x, Integral(f**(a + b*x + c*x**S(2))/(d + e*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))/(d + e*x)**S(2), x), x, sqrt(pi)*sqrt(c)*f**(a - b**S(2)/(S(4)*c))*sqrt(log(f))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/e**S(2) - f**(a + b*x + c*x**S(2))/(e*(d + e*x)) - (-b*e + S(2)*c*d)*log(f)*Integral(f**(a + b*x + c*x**S(2))/(d + e*x), x)/e**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))/(d + e*x)**S(3), x), x, -sqrt(pi)*sqrt(c)*f**(a - b**S(2)/(S(4)*c))*(-b*e/S(2) + c*d)*log(f)**(S(3)/2)*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/e**S(4) + c*log(f)*Integral(f**(a + b*x + c*x**S(2))/(d + e*x), x)/e**S(2) - f**(a + b*x + c*x**S(2))/(S(2)*e*(d + e*x)**S(2)) + f**(a + b*x + c*x**S(2))*(-b*e/S(2) + c*d)*log(f)/(e**S(3)*(d + e*x)) + (-b*e + S(2)*c*d)**S(2)*log(f)**S(2)*Integral(f**(a + b*x + c*x**S(2))/(d + e*x), x)/(S(2)*e**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*(b + S(2)*c*x)**S(3), x), x, -S(4)*c*f**(a + b*x + c*x**S(2))/log(f)**S(2) + f**(a + b*x + c*x**S(2))*(b + S(2)*c*x)**S(2)/log(f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*(b + S(2)*c*x)**S(2), x), x, -sqrt(pi)*sqrt(c)*f**(a - b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/log(f)**(S(3)/2) + f**(a + b*x + c*x**S(2))*(b + S(2)*c*x)/log(f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*(b + S(2)*c*x), x), x, f**(a + b*x + c*x**S(2))/log(f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))/(b + S(2)*c*x), x), x, f**(a - b**S(2)/(S(4)*c))*Ei((b + S(2)*c*x)**S(2)*log(f)/(S(4)*c))/(S(4)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))/(b + S(2)*c*x)**S(2), x), x, -f**(a + b*x + c*x**S(2))/(S(2)*c*(b + S(2)*c*x)) + sqrt(pi)*f**(a - b**S(2)/(S(4)*c))*sqrt(log(f))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(4)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))/(b + S(2)*c*x)**S(3), x), x, -f**(a + b*x + c*x**S(2))/(S(4)*c*(b + S(2)*c*x)**S(2)) + f**(a - b**S(2)/(S(4)*c))*log(f)*Ei((b + S(2)*c*x)**S(2)*log(f)/(S(4)*c))/(S(16)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(b*x + c*x**S(2))*(b + S(2)*c*x)**S(3), x), x, -S(4)*c*f**(b*x + c*x**S(2))/log(f)**S(2) + f**(b*x + c*x**S(2))*(b + S(2)*c*x)**S(2)/log(f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(b*x + c*x**S(2))*(b + S(2)*c*x)**S(2), x), x, -sqrt(pi)*sqrt(c)*f**(-b**S(2)/(S(4)*c))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/log(f)**(S(3)/2) + f**(b*x + c*x**S(2))*(b + S(2)*c*x)/log(f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(b*x + c*x**S(2))*(b + S(2)*c*x), x), x, f**(b*x + c*x**S(2))/log(f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(b*x + c*x**S(2))/(b + S(2)*c*x), x), x, f**(-b**S(2)/(S(4)*c))*Ei((b + S(2)*c*x)**S(2)*log(f)/(S(4)*c))/(S(4)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(b*x + c*x**S(2))/(b + S(2)*c*x)**S(2), x), x, -f**(b*x + c*x**S(2))/(S(2)*c*(b + S(2)*c*x)) + sqrt(pi)*f**(-b**S(2)/(S(4)*c))*sqrt(log(f))*erfi((b/S(2) + c*x)*sqrt(log(f))/sqrt(c))/(S(4)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(b*x + c*x**S(2))/(b + S(2)*c*x)**S(3), x), x, -f**(b*x + c*x**S(2))/(S(4)*c*(b + S(2)*c*x)**S(2)) + f**(-b**S(2)/(S(4)*c))*log(f)*Ei((b + S(2)*c*x)**S(2)*log(f)/(S(4)*c))/(S(16)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*exp(c + d*x))), x), x, Integral(S(1)/(x*(a + b*exp(c + d*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*exp(c + d*x)), x), x, x/a - log(a + b*exp(c + d*x))/(a*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*exp(c + d*x)), x), x, -x*log(a*exp(-c - d*x)/b + S(1))/(a*d) + polylog(S(2), -a*exp(-c - d*x)/b)/(a*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*exp(c + d*x)), x), x, -x**S(2)*log(a*exp(-c - d*x)/b + S(1))/(a*d) + S(2)*x*polylog(S(2), -a*exp(-c - d*x)/b)/(a*d**S(2)) + S(2)*polylog(S(3), -a*exp(-c - d*x)/b)/(a*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*exp(c + d*x)), x), x, -x**S(3)*log(a*exp(-c - d*x)/b + S(1))/(a*d) + S(3)*x**S(2)*polylog(S(2), -a*exp(-c - d*x)/b)/(a*d**S(2)) + S(6)*x*polylog(S(3), -a*exp(-c - d*x)/b)/(a*d**S(3)) + S(6)*polylog(S(4), -a*exp(-c - d*x)/b)/(a*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*exp(c - d*x)), x), x, x/a + log(a + b*exp(c - d*x))/(a*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*exp(-c - d*x)), x), x, x/a + log(a + b*exp(-c - d*x))/(a*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*exp(c + d*x))**S(2)), x), x, Integral(S(1)/(x*(a + b*exp(c + d*x))**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(c + d*x))**(S(-2)), x), x, S(1)/(a*d*(a + b*exp(c + d*x))) + x/a**S(2) - log(a + b*exp(c + d*x))/(a**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*exp(c + d*x))**S(2), x), x, x/(a*d*(a + b*exp(c + d*x))) + x**S(2)/(S(2)*a**S(2)) - x*log(S(1) + b*exp(c + d*x)/a)/(a**S(2)*d) - x/(a**S(2)*d) + log(a + b*exp(c + d*x))/(a**S(2)*d**S(2)) - polylog(S(2), -b*exp(c + d*x)/a)/(a**S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*exp(c + d*x))**S(2), x), x, x**S(2)/(a*d*(a + b*exp(c + d*x))) + x**S(3)/(S(3)*a**S(2)) - x**S(2)*log(S(1) + b*exp(c + d*x)/a)/(a**S(2)*d) + S(2)*x*log(a*exp(-c - d*x)/b + S(1))/(a**S(2)*d**S(2)) - S(2)*x*polylog(S(2), -b*exp(c + d*x)/a)/(a**S(2)*d**S(2)) - S(2)*polylog(S(2), -a*exp(-c - d*x)/b)/(a**S(2)*d**S(3)) + S(2)*polylog(S(3), -b*exp(c + d*x)/a)/(a**S(2)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*exp(c + d*x))**S(2), x), x, x**S(3)/(a*d*(a + b*exp(c + d*x))) + x**S(4)/(S(4)*a**S(2)) - x**S(3)*log(S(1) + b*exp(c + d*x)/a)/(a**S(2)*d) + S(3)*x**S(2)*log(a*exp(-c - d*x)/b + S(1))/(a**S(2)*d**S(2)) - S(3)*x**S(2)*polylog(S(2), -b*exp(c + d*x)/a)/(a**S(2)*d**S(2)) - S(6)*x*polylog(S(2), -a*exp(-c - d*x)/b)/(a**S(2)*d**S(3)) + S(6)*x*polylog(S(3), -b*exp(c + d*x)/a)/(a**S(2)*d**S(3)) - S(6)*polylog(S(3), -a*exp(-c - d*x)/b)/(a**S(2)*d**S(4)) - S(6)*polylog(S(4), -b*exp(c + d*x)/a)/(a**S(2)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(c - d*x))**(S(-2)), x), x, -S(1)/(a*d*(a + b*exp(c - d*x))) + x/a**S(2) + log(a + b*exp(c - d*x))/(a**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(-c - d*x))**(S(-2)), x), x, -S(1)/(a*d*(a + b*exp(-c - d*x))) + x/a**S(2) + log(a + b*exp(-c - d*x))/(a**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*exp(c + d*x))**S(3)), x), x, Integral(S(1)/(x*(a + b*exp(c + d*x))**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(c + d*x))**(S(-3)), x), x, S(1)/(S(2)*a*d*(a + b*exp(c + d*x))**S(2)) + S(1)/(a**S(2)*d*(a + b*exp(c + d*x))) + x/a**S(3) - log(a + b*exp(c + d*x))/(a**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*exp(c + d*x))**S(3), x), x, x/(S(2)*a*d*(a + b*exp(c + d*x))**S(2)) + x/(a**S(2)*d*(a + b*exp(c + d*x))) - S(1)/(S(2)*a**S(2)*d**S(2)*(a + b*exp(c + d*x))) + x**S(2)/(S(2)*a**S(3)) - x*log(S(1) + b*exp(c + d*x)/a)/(a**S(3)*d) - S(3)*x/(S(2)*a**S(3)*d) + S(3)*log(a + b*exp(c + d*x))/(S(2)*a**S(3)*d**S(2)) - polylog(S(2), -b*exp(c + d*x)/a)/(a**S(3)*d**S(2)), expand=True, _diff=True, _numerical=True) # recursion assert rubi_test(rubi_integrate(x**S(2)/(a + b*exp(c + d*x))**S(3), x), x, x**S(2)/(S(2)*a*d*(a + b*exp(c + d*x))**S(2)) + x**S(2)/(a**S(2)*d*(a + b*exp(c + d*x))) - x/(a**S(2)*d**S(2)*(a + b*exp(c + d*x))) + x**S(3)/(S(3)*a**S(3)) - x**S(2)*log(S(1) + b*exp(c + d*x)/a)/(a**S(3)*d) - S(3)*x**S(2)/(S(2)*a**S(3)*d) + S(3)*x*log(S(1) + b*exp(c + d*x)/a)/(a**S(3)*d**S(2)) - S(2)*x*polylog(S(2), -b*exp(c + d*x)/a)/(a**S(3)*d**S(2)) + x/(a**S(3)*d**S(2)) - log(a + b*exp(c + d*x))/(a**S(3)*d**S(3)) + S(3)*polylog(S(2), -b*exp(c + d*x)/a)/(a**S(3)*d**S(3)) + S(2)*polylog(S(3), -b*exp(c + d*x)/a)/(a**S(3)*d**S(3)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(2)/(a + b*exp(c + d*x))**S(3), x), x, x**S(2)/(S(2)*a*d*(a + b*exp(c + d*x))**S(2)) + x**S(2)/(a**S(2)*d*(a + b*exp(c + d*x))) - x/(a**S(2)*d**S(2)*(a + b*exp(c + d*x))) + x**S(3)/(S(3)*a**S(3)) - x**S(2)*log(S(1) + b*exp(c + d*x)/a)/(a**S(3)*d) - x**S(2)/(S(2)*a**S(3)*d) + x*log(S(1) + b*exp(c + d*x)/a)/(a**S(3)*d**S(2)) + S(2)*x*log(a*exp(-c - d*x)/b + S(1))/(a**S(3)*d**S(2)) - S(2)*x*polylog(S(2), -b*exp(c + d*x)/a)/(a**S(3)*d**S(2)) + x/(a**S(3)*d**S(2)) - log(a + b*exp(c + d*x))/(a**S(3)*d**S(3)) + polylog(S(2), -b*exp(c + d*x)/a)/(a**S(3)*d**S(3)) - S(2)*polylog(S(2), -a*exp(-c - d*x)/b)/(a**S(3)*d**S(3)) + S(2)*polylog(S(3), -b*exp(c + d*x)/a)/(a**S(3)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(c - d*x))**(S(-3)), x), x, -S(1)/(S(2)*a*d*(a + b*exp(c - d*x))**S(2)) - S(1)/(a**S(2)*d*(a + b*exp(c - d*x))) + x/a**S(3) + log(a + b*exp(c - d*x))/(a**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(-c - d*x))**(S(-3)), x), x, -S(1)/(S(2)*a*d*(a + b*exp(-c - d*x))**S(2)) - S(1)/(a**S(2)*d*(a + b*exp(-c - d*x))) + x/a**S(3) + log(a + b*exp(-c - d*x))/(a**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a + b*x)/(x**S(2)*(c + d*x**S(2))), x), x, b*exp(a)*Ei(b*x)/c - sqrt(d)*exp(a - b*sqrt(-c)/sqrt(d))*Ei(b*(sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*(-c)**(S(3)/2)) + sqrt(d)*exp(a + b*sqrt(-c)/sqrt(d))*Ei(-b*(-sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*(-c)**(S(3)/2)) - exp(a + b*x)/(c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a + b*x)/(x*(c + d*x**S(2))), x), x, exp(a)*Ei(b*x)/c - exp(a - b*sqrt(-c)/sqrt(d))*Ei(b*(sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*c) - exp(a + b*sqrt(-c)/sqrt(d))*Ei(-b*(-sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a + b*x)/(c + d*x**S(2)), x), x, -exp(a - b*sqrt(-c)/sqrt(d))*Ei(b*(sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*sqrt(d)*sqrt(-c)) + exp(a + b*sqrt(-c)/sqrt(d))*Ei(-b*(-sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*sqrt(d)*sqrt(-c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(a + b*x)/(c + d*x**S(2)), x), x, exp(a - b*sqrt(-c)/sqrt(d))*Ei(b*(sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*d) + exp(a + b*sqrt(-c)/sqrt(d))*Ei(-b*(-sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(a + b*x)/(c + d*x**S(2)), x), x, -sqrt(-c)*exp(a - b*sqrt(-c)/sqrt(d))*Ei(b*(sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*d**(S(3)/2)) + sqrt(-c)*exp(a + b*sqrt(-c)/sqrt(d))*Ei(-b*(-sqrt(d)*x + sqrt(-c))/sqrt(d))/(S(2)*d**(S(3)/2)) + exp(a + b*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(d + e*x)/(x**S(2)*(a + b*x + c*x**S(2))), x), x, e*exp(d)*Ei(e*x)/a - exp(d + e*x)/(a*x) - b*exp(d)*Ei(e*x)/a**S(2) + (b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*exp(d - e*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*a**S(2)) + (b + (S(2)*a*c - b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*exp(d - e*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(d + e*x)/(x*(a + b*x + c*x**S(2))), x), x, -(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*exp(d - e*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*a) - (b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*exp(d - e*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*a) + exp(d)*Ei(e*x)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(d + e*x)/(a + b*x + c*x**S(2)), x), x, exp(d - e*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/sqrt(-S(4)*a*c + b**S(2)) - exp(d - e*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(d + e*x)/(a + b*x + c*x**S(2)), x), x, (-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*exp(d - e*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*c) + (b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*exp(d - e*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(d + e*x)/(a + b*x + c*x**S(2)), x), x, exp(d + e*x)/(c*e) - (b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*exp(d - e*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*c**S(2)) - (b + (S(2)*a*c - b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*exp(d - e*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp(d + e*x)/(a + b*x + c*x**S(2)), x), x, -b*exp(d + e*x)/(c**S(2)*e) + x*exp(d + e*x)/(c*e) - exp(d + e*x)/(c*e**S(2)) + (-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*exp(d - e*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*c**S(3)) + (-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*exp(d - e*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))*Ei(e*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)**x/(S(2)**x*b + a), x), x, S(2)**x/(b*log(S(2))) - a*log(S(2)**x*b + a)/(b**S(2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(2)*x)/(S(2)**x*b + a), x), x, S(2)**x/(b*log(S(2))) - a*log(S(2)**x*b + a)/(b**S(2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)**x/(-S(2)**x*b + a), x), x, -S(2)**x/(b*log(S(2))) - a*log(-S(2)**x*b + a)/(b**S(2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(2)*x)/(-S(2)**x*b + a), x), x, -S(2)**x/(b*log(S(2))) - a*log(-S(2)**x*b + a)/(b**S(2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)**x/(a + S(2)**(-x)*b), x), x, -S(2)**x*b/(a**S(2)*log(S(2))) + S(2)**(S(2)*x + S(-1))/(a*log(S(2))) + b**S(2)*x/a**S(3) + b**S(2)*log(a + S(2)**(-x)*b)/(a**S(3)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(2)*x)/(a + S(2)**(-x)*b), x), x, -S(2)**x*b/(a**S(2)*log(S(2))) + S(2)**(S(2)*x + S(-1))/(a*log(S(2))) + b**S(2)*x/a**S(3) + b**S(2)*log(a + S(2)**(-x)*b)/(a**S(3)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)**x/(a - S(2)**(-x)*b), x), x, S(2)**x*b/(a**S(2)*log(S(2))) + S(2)**(S(2)*x + S(-1))/(a*log(S(2))) + b**S(2)*x/a**S(3) + b**S(2)*log(a - S(2)**(-x)*b)/(a**S(3)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(2)*x)/(a - S(2)**(-x)*b), x), x, S(2)**x*b/(a**S(2)*log(S(2))) + S(2)**(S(2)*x + S(-1))/(a*log(S(2))) + b**S(2)*x/a**S(3) + b**S(2)*log(a - S(2)**(-x)*b)/(a**S(3)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/(S(4)**x*b + a), x), x, atan(S(2)**x*sqrt(b)/sqrt(a))/(sqrt(a)*sqrt(b)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/(S(2)**(S(2)*x)*b + a), x), x, atan(S(2)**x*sqrt(b)/sqrt(a))/(sqrt(a)*sqrt(b)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/(-S(4)**x*b + a), x), x, atanh(S(2)**x*sqrt(b)/sqrt(a))/(sqrt(a)*sqrt(b)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/(-S(2)**(S(2)*x)*b + a), x), x, atanh(S(2)**x*sqrt(b)/sqrt(a))/(sqrt(a)*sqrt(b)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/(a + S(4)**(-x)*b), x), x, S(2)**x/(a*log(S(2))) - sqrt(b)*atan(S(2)**x*sqrt(a)/sqrt(b))/(a**(S(3)/2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/(a + S(2)**(-S(2)*x)*b), x), x, S(2)**x/(a*log(S(2))) - sqrt(b)*atan(S(2)**x*sqrt(a)/sqrt(b))/(a**(S(3)/2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/(a - S(4)**(-x)*b), x), x, S(2)**x/(a*log(S(2))) - sqrt(b)*atanh(S(2)**x*sqrt(a)/sqrt(b))/(a**(S(3)/2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/(a - S(2)**(-S(2)*x)*b), x), x, S(2)**x/(a*log(S(2))) - sqrt(b)*atanh(S(2)**x*sqrt(a)/sqrt(b))/(a**(S(3)/2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/sqrt(S(4)**x*b + a), x), x, atanh(S(2)**x*sqrt(b)/sqrt(S(2)**(S(2)*x)*b + a))/(sqrt(b)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/sqrt(S(2)**(S(2)*x)*b + a), x), x, atanh(S(2)**x*sqrt(b)/sqrt(S(2)**(S(2)*x)*b + a))/(sqrt(b)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/sqrt(-S(4)**x*b + a), x), x, atan(S(2)**x*sqrt(b)/sqrt(-S(2)**(S(2)*x)*b + a))/(sqrt(b)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/sqrt(-S(2)**(S(2)*x)*b + a), x), x, atan(S(2)**x*sqrt(b)/sqrt(-S(2)**(S(2)*x)*b + a))/(sqrt(b)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/sqrt(a + S(4)**(-x)*b), x), x, S(2)**x*sqrt(a + S(2)**(-S(2)*x)*b)/(a*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/sqrt(a + S(2)**(-S(2)*x)*b), x), x, S(2)**x*sqrt(a + S(2)**(-S(2)*x)*b)/(a*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/sqrt(a - S(4)**(-x)*b), x), x, S(2)**x*sqrt(a - S(2)**(-S(2)*x)*b)/(a*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x/sqrt(a - S(2)**(-S(2)*x)*b), x), x, S(2)**x*sqrt(a - S(2)**(-S(2)*x)*b)/(a*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)**x/sqrt(S(2)**x*b + a), x), x, -S(2)*a*sqrt(S(2)**x*b + a)/(b**S(2)*log(S(2))) + S(2)*(S(2)**x*b + a)**(S(3)/2)/(S(3)*b**S(2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(2)*x)/sqrt(S(2)**x*b + a), x), x, -S(2)*a*sqrt(S(2)**x*b + a)/(b**S(2)*log(S(2))) + S(2)*(S(2)**x*b + a)**(S(3)/2)/(S(3)*b**S(2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)**x/sqrt(-S(2)**x*b + a), x), x, -S(2)*a*sqrt(-S(2)**x*b + a)/(b**S(2)*log(S(2))) + S(2)*(-S(2)**x*b + a)**(S(3)/2)/(S(3)*b**S(2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(2)*x)/sqrt(-S(2)**x*b + a), x), x, -S(2)*a*sqrt(-S(2)**x*b + a)/(b**S(2)*log(S(2))) + S(2)*(-S(2)**x*b + a)**(S(3)/2)/(S(3)*b**S(2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)**x/sqrt(a + S(2)**(-x)*b), x), x, -S(3)*S(2)**(x + S(-2))*b*sqrt(a + S(2)**(-x)*b)/(a**S(2)*log(S(2))) + S(2)**(S(2)*x + S(-1))*sqrt(a + S(2)**(-x)*b)/(a*log(S(2))) + S(3)*b**S(2)*atanh(sqrt(a + S(2)**(-x)*b)/sqrt(a))/(S(4)*a**(S(5)/2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(2)*x)/sqrt(a + S(2)**(-x)*b), x), x, -S(3)*S(2)**(x + S(-2))*b*sqrt(a + S(2)**(-x)*b)/(a**S(2)*log(S(2))) + S(2)**(S(2)*x + S(-1))*sqrt(a + S(2)**(-x)*b)/(a*log(S(2))) + S(3)*b**S(2)*atanh(sqrt(a + S(2)**(-x)*b)/sqrt(a))/(S(4)*a**(S(5)/2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)**x/sqrt(a - S(2)**(-x)*b), x), x, S(3)*S(2)**(x + S(-2))*b*sqrt(a - S(2)**(-x)*b)/(a**S(2)*log(S(2))) + S(2)**(S(2)*x + S(-1))*sqrt(a - S(2)**(-x)*b)/(a*log(S(2))) + S(3)*b**S(2)*atanh(sqrt(a - S(2)**(-x)*b)/sqrt(a))/(S(4)*a**(S(5)/2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(2)*x)/sqrt(a - S(2)**(-x)*b), x), x, S(3)*S(2)**(x + S(-2))*b*sqrt(a - S(2)**(-x)*b)/(a**S(2)*log(S(2))) + S(2)**(S(2)*x + S(-1))*sqrt(a - S(2)**(-x)*b)/(a*log(S(2))) + S(3)*b**S(2)*atanh(sqrt(a - S(2)**(-x)*b)/sqrt(a))/(S(4)*a**(S(5)/2)*log(S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(S(2)*x) + S(2)*exp(x) + S(1)), x), x, x - log(exp(x) + S(1)) + S(1)/(exp(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(S(2)*x) + S(3)*exp(x) + S(2)), x), x, x/S(2) - log(exp(x) + S(1)) + log(exp(x) + S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(S(2)*x) + exp(x) + S(-1)), x), x, -x + (-sqrt(S(5)) + S(5))*log(S(2)*exp(x) + S(1) + sqrt(S(5)))/S(10) + (sqrt(S(5)) + S(5))*log(S(2)*exp(x) - sqrt(S(5)) + S(1))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(S(2)*x) + S(3)*exp(x) + S(3)), x), x, x/S(3) - log(exp(S(2)*x) + S(3)*exp(x) + S(3))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*exp(x) + S(3))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*exp(x) + c*exp(S(2)*x)), x), x, b*atanh((b + S(2)*c*exp(x))/sqrt(-S(4)*a*c + b**S(2)))/(a*sqrt(-S(4)*a*c + b**S(2))) + x/a - log(a + b*exp(x) + c*exp(S(2)*x))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(exp(S(2)*x) + S(2)*exp(x) + S(1)), x), x, x**S(2)/S(2) - x*log(exp(x) + S(1)) - x + x/(exp(x) + S(1)) + log(exp(x) + S(1)) - polylog(S(2), -exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(exp(S(2)*x) + S(3)*exp(x) + S(2)), x), x, -x*log(S(1) + exp(-x)) + x*log(S(1) + S(2)*exp(-x))/S(2) - polylog(S(2), -S(2)*exp(-x))/S(2) + polylog(S(2), -exp(-x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(exp(S(2)*x) + exp(x) + S(-1)), x), x, S(2)*sqrt(S(5))*x*log(S(1) + (S(1)/2 + sqrt(S(5))/S(2))*exp(-x))/(S(5)*(S(1) + sqrt(S(5)))) - S(2)*sqrt(S(5))*x*log(S(1) + (-sqrt(S(5))/S(2) + S(1)/2)*exp(-x))/(S(5)*(-sqrt(S(5)) + S(1))) + S(2)*sqrt(S(5))*polylog(S(2), (S(-1)/2 + sqrt(S(5))/S(2))*exp(-x))/(S(5)*(-sqrt(S(5)) + S(1))) - S(2)*sqrt(S(5))*polylog(S(2), (-sqrt(S(5))/S(2) + S(-1)/2)*exp(-x))/(S(5)*(S(1) + sqrt(S(5)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(exp(S(2)*x) + S(3)*exp(x) + S(3)), x), x, -S(2)*sqrt(S(3))*x*log(S(1) + (S(3)/2 - sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(sqrt(S(3)) + S(3)*I)) + S(2)*sqrt(S(3))*x*log(S(1) + (S(3)/2 + sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(-sqrt(S(3)) + S(3)*I)) - S(2)*sqrt(S(3))*polylog(S(2), (S(-3)/2 - sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(-sqrt(S(3)) + S(3)*I)) + S(2)*sqrt(S(3))*polylog(S(2), (S(-3)/2 + sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(sqrt(S(3)) + S(3)*I)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*exp(x) + c*exp(S(2)*x)), x), x, S(2)*c*x*log(S(1) + (b/S(2) + sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) + S(2)*c*x*log(S(1) + (b/S(2) - sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*polylog(S(2), (-b/S(2) - sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*polylog(S(2), (-b/S(2) + sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(exp(S(2)*x) + S(2)*exp(x) + S(1)), x), x, x**S(3)/S(3) - x**S(2)*log(exp(x) + S(1)) + x**S(2)/(exp(x) + S(1)) + S(2)*x*log(S(1) + exp(-x)) - S(2)*x*polylog(S(2), -exp(x)) - S(2)*polylog(S(2), -exp(-x)) + S(2)*polylog(S(3), -exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(exp(S(2)*x) + S(3)*exp(x) + S(2)), x), x, -x**S(2)*log(S(1) + exp(-x)) + x**S(2)*log(S(1) + S(2)*exp(-x))/S(2) - x*polylog(S(2), -S(2)*exp(-x)) + S(2)*x*polylog(S(2), -exp(-x)) - polylog(S(3), -S(2)*exp(-x)) + S(2)*polylog(S(3), -exp(-x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(exp(S(2)*x) + exp(x) + S(-1)), x), x, S(2)*sqrt(S(5))*x**S(2)*log(S(1) + (S(1)/2 + sqrt(S(5))/S(2))*exp(-x))/(S(5)*(S(1) + sqrt(S(5)))) - S(2)*sqrt(S(5))*x**S(2)*log(S(1) + (-sqrt(S(5))/S(2) + S(1)/2)*exp(-x))/(S(5)*(-sqrt(S(5)) + S(1))) + S(4)*sqrt(S(5))*x*polylog(S(2), (S(-1)/2 + sqrt(S(5))/S(2))*exp(-x))/(S(5)*(-sqrt(S(5)) + S(1))) - S(4)*sqrt(S(5))*x*polylog(S(2), (-sqrt(S(5))/S(2) + S(-1)/2)*exp(-x))/(S(5)*(S(1) + sqrt(S(5)))) + S(4)*sqrt(S(5))*polylog(S(3), (S(-1)/2 + sqrt(S(5))/S(2))*exp(-x))/(S(5)*(-sqrt(S(5)) + S(1))) - S(4)*sqrt(S(5))*polylog(S(3), (-sqrt(S(5))/S(2) + S(-1)/2)*exp(-x))/(S(5)*(S(1) + sqrt(S(5)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(exp(S(2)*x) + S(3)*exp(x) + S(3)), x), x, -S(2)*sqrt(S(3))*x**S(2)*log(S(1) + (S(3)/2 - sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(sqrt(S(3)) + S(3)*I)) + S(2)*sqrt(S(3))*x**S(2)*log(S(1) + (S(3)/2 + sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(-sqrt(S(3)) + S(3)*I)) - S(4)*sqrt(S(3))*x*polylog(S(2), (S(-3)/2 - sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(-sqrt(S(3)) + S(3)*I)) + S(4)*sqrt(S(3))*x*polylog(S(2), (S(-3)/2 + sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(sqrt(S(3)) + S(3)*I)) - S(4)*sqrt(S(3))*polylog(S(3), (S(-3)/2 - sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(-sqrt(S(3)) + S(3)*I)) + S(4)*sqrt(S(3))*polylog(S(3), (S(-3)/2 + sqrt(S(3))*I/S(2))*exp(-x))/(S(3)*(sqrt(S(3)) + S(3)*I)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*exp(x) + c*exp(S(2)*x)), x), x, S(2)*c*x**S(2)*log(S(1) + (b/S(2) + sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) + S(2)*c*x**S(2)*log(S(1) + (b/S(2) - sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) - S(4)*c*x*polylog(S(2), (-b/S(2) - sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(4)*c*x*polylog(S(2), (-b/S(2) + sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) - S(4)*c*polylog(S(3), (-b/S(2) - sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(4)*c*polylog(S(3), (-b/S(2) + sqrt(-S(4)*a*c + b**S(2))/S(2))*exp(-x)/c)/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(2)*f**(c + d*x) + f**(S(2)*c + S(2)*d*x) + S(1)), x), x, x - log(f**(c + d*x) + S(1))/(d*log(f)) + S(1)/(d*(f**(c + d*x) + S(1))*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*f**(c + d*x) + c*f**(S(2)*c + S(2)*d*x)), x), x, b*atanh((b + S(2)*c*f**(c + d*x))/sqrt(-S(4)*a*c + b**S(2)))/(a*d*sqrt(-S(4)*a*c + b**S(2))*log(f)) + x/a - log(a + b*f**(c + d*x) + c*f**(S(2)*c + S(2)*d*x))/(S(2)*a*d*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*f**(g + h*x) + c*f**(S(2)*g + S(2)*h*x)), x), x, b*atanh((b + S(2)*c*f**(g + h*x))/sqrt(-S(4)*a*c + b**S(2)))/(a*h*sqrt(-S(4)*a*c + b**S(2))*log(f)) + x/a - log(a + b*f**(g + h*x) + c*f**(S(2)*g + S(2)*h*x))/(S(2)*a*h*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(S(2)*f**(c + d*x) + f**(S(2)*c + S(2)*d*x) + S(1)), x), x, x**S(2)/S(2) - x*log(f**(c + d*x) + S(1))/(d*log(f)) - x/(d*log(f)) + x/(d*(f**(c + d*x) + S(1))*log(f)) + log(f**(c + d*x) + S(1))/(d**S(2)*log(f)**S(2)) - polylog(S(2), -f**(c + d*x))/(d**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*f**(c + d*x) + c*f**(S(2)*c + S(2)*d*x)), x), x, S(2)*c*x*log(S(1) + f**(-c - d*x)*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d*(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)) - S(2)*c*x*log(S(1) + f**(-c - d*x)*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d*(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)) - S(2)*c*polylog(S(2), -f**(-c - d*x)*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)**S(2)) + S(2)*c*polylog(S(2), -f**(-c - d*x)*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(S(2)*f**(c + d*x) + f**(S(2)*c + S(2)*d*x) + S(1)), x), x, x**S(3)/S(3) - x**S(2)*log(f**(c + d*x) + S(1))/(d*log(f)) + x**S(2)/(d*(f**(c + d*x) + S(1))*log(f)) + S(2)*x*log(f**(-c - d*x) + S(1))/(d**S(2)*log(f)**S(2)) - S(2)*x*polylog(S(2), -f**(c + d*x))/(d**S(2)*log(f)**S(2)) - S(2)*polylog(S(2), -f**(-c - d*x))/(d**S(3)*log(f)**S(3)) + S(2)*polylog(S(3), -f**(c + d*x))/(d**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*f**(c + d*x) + c*f**(S(2)*c + S(2)*d*x)), x), x, S(2)*c*x**S(2)*log(S(1) + f**(-c - d*x)*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d*(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)) - S(2)*c*x**S(2)*log(S(1) + f**(-c - d*x)*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d*(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)) - S(4)*c*x*polylog(S(2), -f**(-c - d*x)*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)**S(2)) + S(4)*c*x*polylog(S(2), -f**(-c - d*x)*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)**S(2)) - S(4)*c*polylog(S(3), -f**(-c - d*x)*(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d**S(3)*(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)**S(3)) + S(4)*c*polylog(S(3), -f**(-c - d*x)*(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c))/(d**S(3)*(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*f**(g + h*x))/(a + b*f**(g + h*x) + c*f**(S(2)*g + S(2)*h*x)), x), x, d*x/a - d*log(a + b*f**(g + h*x) + c*f**(S(2)*g + S(2)*h*x))/(S(2)*a*h*log(f)) + (-S(2)*a*e + b*d)*atanh((b + S(2)*c*f**(g + h*x))/sqrt(-S(4)*a*c + b**S(2)))/(a*h*sqrt(-S(4)*a*c + b**S(2))*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*f**(g + h*x))/(a + b*f**(g + h*x) + c*f**(S(2)*g + S(2)*h*x)), x), x, d*x/a - d*log(a + b*f**(g + h*x) + c*f**(S(2)*g + S(2)*h*x))/(S(2)*a*h*log(f)) + (-S(2)*a*e + b*d)*atanh((b + S(2)*c*f**(g + h*x))/sqrt(-S(4)*a*c + b**S(2)))/(a*h*sqrt(-S(4)*a*c + b**S(2))*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(x) + S(2) + exp(-x)), x), x, -S(1)/(exp(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(exp(x) + S(2) + exp(-x)), x), x, x - x/(exp(x) + S(1)) - log(exp(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(exp(x) + S(2) + exp(-x)), x), x, -x**S(2)/(exp(x) + S(1)) - S(2)*x*log(S(1) + exp(-x)) + S(2)*polylog(S(2), -exp(-x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(f**(-c - d*x) + f**(c + d*x) + S(2)), x), x, -S(1)/(d*(f**(c + d*x) + S(1))*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(f**(-c - d*x) + f**(c + d*x) + S(2)), x), x, x/(d*log(f)) - x/(d*(f**(c + d*x) + S(1))*log(f)) - log(f**(c + d*x) + S(1))/(d**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(f**(-c - d*x) + f**(c + d*x) + S(2)), x), x, -x**S(2)/(d*(f**(c + d*x) + S(1))*log(f)) - S(2)*x*log(f**(-c - d*x) + S(1))/(d**S(2)*log(f)**S(2)) + S(2)*polylog(S(2), -f**(-c - d*x))/(d**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(3)**x + S(2) + S(3)**(-x)), x), x, -S(1)/((S(3)**x + S(1))*log(S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(2)*exp(x) + S(1) - exp(-x)), x), x, log(-S(2)*exp(x) + S(1))/S(3) - log(exp(x) + S(1))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*exp(-x) + c*exp(x)), x), x, -S(2)*atanh((a + S(2)*c*exp(x))/sqrt(a**S(2) - S(4)*b*c))/sqrt(a**S(2) - S(4)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*exp(-x) + c*exp(x)), x), x, x*log(S(2)*c*exp(x)/(a - sqrt(a**S(2) - S(4)*b*c)) + S(1))/sqrt(a**S(2) - S(4)*b*c) - x*log(S(2)*c*exp(x)/(a + sqrt(a**S(2) - S(4)*b*c)) + S(1))/sqrt(a**S(2) - S(4)*b*c) + polylog(S(2), -S(2)*c*exp(x)/(a - sqrt(a**S(2) - S(4)*b*c)))/sqrt(a**S(2) - S(4)*b*c) - polylog(S(2), -S(2)*c*exp(x)/(a + sqrt(a**S(2) - S(4)*b*c)))/sqrt(a**S(2) - S(4)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*exp(-x) + c*exp(x)), x), x, x**S(2)*log(S(2)*c*exp(x)/(a - sqrt(a**S(2) - S(4)*b*c)) + S(1))/sqrt(a**S(2) - S(4)*b*c) - x**S(2)*log(S(2)*c*exp(x)/(a + sqrt(a**S(2) - S(4)*b*c)) + S(1))/sqrt(a**S(2) - S(4)*b*c) + S(2)*x*polylog(S(2), -S(2)*c*exp(x)/(a - sqrt(a**S(2) - S(4)*b*c)))/sqrt(a**S(2) - S(4)*b*c) - S(2)*x*polylog(S(2), -S(2)*c*exp(x)/(a + sqrt(a**S(2) - S(4)*b*c)))/sqrt(a**S(2) - S(4)*b*c) - S(2)*polylog(S(3), -S(2)*c*exp(x)/(a - sqrt(a**S(2) - S(4)*b*c)))/sqrt(a**S(2) - S(4)*b*c) + S(2)*polylog(S(3), -S(2)*c*exp(x)/(a + sqrt(a**S(2) - S(4)*b*c)))/sqrt(a**S(2) - S(4)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*f**(-c - d*x) + c*f**(c + d*x)), x), x, -S(2)*atanh((a + S(2)*c*f**(c + d*x))/sqrt(a**S(2) - S(4)*b*c))/(d*sqrt(a**S(2) - S(4)*b*c)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*f**(-c - d*x) + c*f**(c + d*x)), x), x, x*log(S(2)*c*f**(c + d*x)/(a - sqrt(a**S(2) - S(4)*b*c)) + S(1))/(d*sqrt(a**S(2) - S(4)*b*c)*log(f)) - x*log(S(2)*c*f**(c + d*x)/(a + sqrt(a**S(2) - S(4)*b*c)) + S(1))/(d*sqrt(a**S(2) - S(4)*b*c)*log(f)) + polylog(S(2), -S(2)*c*f**(c + d*x)/(a - sqrt(a**S(2) - S(4)*b*c)))/(d**S(2)*sqrt(a**S(2) - S(4)*b*c)*log(f)**S(2)) - polylog(S(2), -S(2)*c*f**(c + d*x)/(a + sqrt(a**S(2) - S(4)*b*c)))/(d**S(2)*sqrt(a**S(2) - S(4)*b*c)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*f**(-c - d*x) + c*f**(c + d*x)), x), x, x**S(2)*log(S(2)*c*f**(c + d*x)/(a - sqrt(a**S(2) - S(4)*b*c)) + S(1))/(d*sqrt(a**S(2) - S(4)*b*c)*log(f)) - x**S(2)*log(S(2)*c*f**(c + d*x)/(a + sqrt(a**S(2) - S(4)*b*c)) + S(1))/(d*sqrt(a**S(2) - S(4)*b*c)*log(f)) + S(2)*x*polylog(S(2), -S(2)*c*f**(c + d*x)/(a - sqrt(a**S(2) - S(4)*b*c)))/(d**S(2)*sqrt(a**S(2) - S(4)*b*c)*log(f)**S(2)) - S(2)*x*polylog(S(2), -S(2)*c*f**(c + d*x)/(a + sqrt(a**S(2) - S(4)*b*c)))/(d**S(2)*sqrt(a**S(2) - S(4)*b*c)*log(f)**S(2)) - S(2)*polylog(S(3), -S(2)*c*f**(c + d*x)/(a - sqrt(a**S(2) - S(4)*b*c)))/(d**S(3)*sqrt(a**S(2) - S(4)*b*c)*log(f)**S(3)) + S(2)*polylog(S(3), -S(2)*c*f**(c + d*x)/(a + sqrt(a**S(2) - S(4)*b*c)))/(d**S(3)*sqrt(a**S(2) - S(4)*b*c)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((F**(sqrt(-a*x + S(1))/sqrt(a*x + S(1))))**n/(-a**S(2)*x**S(2) + S(1)), x), x, -F**(-n*sqrt(-a*x + S(1))/sqrt(a*x + S(1)))*(F**(sqrt(-a*x + S(1))/sqrt(a*x + S(1))))**n*Ei(n*sqrt(-a*x + S(1))*log(F)/sqrt(a*x + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(S(3)*sqrt(-a*x + S(1))/sqrt(a*x + S(1)))/(-a**S(2)*x**S(2) + S(1)), x), x, -Ei(S(3)*sqrt(-a*x + S(1))*log(F)/sqrt(a*x + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(S(2)*sqrt(-a*x + S(1))/sqrt(a*x + S(1)))/(-a**S(2)*x**S(2) + S(1)), x), x, -Ei(S(2)*sqrt(-a*x + S(1))*log(F)/sqrt(a*x + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(sqrt(-a*x + S(1))/sqrt(a*x + S(1)))/(-a**S(2)*x**S(2) + S(1)), x), x, -Ei(sqrt(-a*x + S(1))*log(F)/sqrt(a*x + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(-sqrt(-a*x + S(1))/sqrt(a*x + S(1)))/(-a**S(2)*x**S(2) + S(1)), x), x, -Ei(-sqrt(-a*x + S(1))*log(F)/sqrt(a*x + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(-S(2)*sqrt(-a*x + S(1))/sqrt(a*x + S(1)))/(-a**S(2)*x**S(2) + S(1)), x), x, -Ei(-S(2)*sqrt(-a*x + S(1))*log(F)/sqrt(a*x + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((F**(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))*b + a)**n/(-c**S(2)*x**S(2) + S(1)), x), x, -Integral((F**x*b + a)**n/x, (x, sqrt(-c*x + S(1))/sqrt(c*x + S(1))))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((F**(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))*b + a)**S(3)/(-c**S(2)*x**S(2) + S(1)), x), x, -a**S(3)*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/c - S(3)*a**S(2)*b*Ei(sqrt(-c*x + S(1))*log(F)/sqrt(c*x + S(1)))/c - S(3)*a*b**S(2)*Ei(S(2)*sqrt(-c*x + S(1))*log(F)/sqrt(c*x + S(1)))/c - b**S(3)*Ei(S(3)*sqrt(-c*x + S(1))*log(F)/sqrt(c*x + S(1)))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((F**(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))*b + a)**S(2)/(-c**S(2)*x**S(2) + S(1)), x), x, -a**S(2)*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/c - S(2)*a*b*Ei(sqrt(-c*x + S(1))*log(F)/sqrt(c*x + S(1)))/c - b**S(2)*Ei(S(2)*sqrt(-c*x + S(1))*log(F)/sqrt(c*x + S(1)))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((F**(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))*b + a)/(-c**S(2)*x**S(2) + S(1)), x), x, -a*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))/c - b*Ei(sqrt(-c*x + S(1))*log(F)/sqrt(c*x + S(1)))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((F**(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))*b + a)*(-c**S(2)*x**S(2) + S(1))), x), x, -Integral(S(1)/(x*(F**x*b + a)), (x, sqrt(-c*x + S(1))/sqrt(c*x + S(1))))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((F**(sqrt(-c*x + S(1))/sqrt(c*x + S(1)))*b + a)**S(2)*(-c**S(2)*x**S(2) + S(1))), x), x, -Integral(S(1)/(x*(F**x*b + a)**S(2)), (x, sqrt(-c*x + S(1))/sqrt(c*x + S(1))))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**x*x**S(2), x), x, a**x*b**x*x**S(2)/(log(a) + log(b)) - S(2)*a**x*b**x*x/(log(a) + log(b))**S(2) + S(2)*a**x*b**x/(log(a) + log(b))**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**x*x, x), x, a**x*b**x*x/(log(a) + log(b)) - a**x*b**x/(log(a) + log(b))**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**x, x), x, a**x*b**x/(log(a) + log(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**x/x, x), x, Ei(x*(log(a) + log(b))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**x/x**S(2), x), x, -a**x*b**x/x + (log(a) + log(b))*Ei(x*(log(a) + log(b))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**x/x**S(3), x), x, -a**x*b**x*(log(a) + log(b))/(S(2)*x) - a**x*b**x/(S(2)*x**S(2)) + (log(a) + log(b))**S(2)*Ei(x*(log(a) + log(b)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**x*c**x, x), x, a**x*b**x*c**x/(log(a) + log(b) + log(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**(-x), x), x, a**x*b**(-x)/(log(a) - log(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**x*b**(-x)*x**S(2), x), x, a**x*b**(-x)*x**S(2)/(log(a) - log(b)) - S(2)*a**x*b**(-x)*x/(log(a) - log(b))**S(2) + S(2)*a**x*b**(-x)/(log(a) - log(b))**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(a + b*exp(x)), x), x, -a*log(a + b*exp(x))/b**S(2) + exp(x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(a + b*exp(x))**S(2), x), x, a/(b**S(2)*(a + b*exp(x))) + log(a + b*exp(x))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(a + b*exp(x))**S(3), x), x, exp(S(2)*x)/(S(2)*a*(a + b*exp(x))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(a + b*exp(x))**S(4), x), x, a/(S(3)*b**S(2)*(a + b*exp(x))**S(3)) - S(1)/(S(2)*b**S(2)*(a + b*exp(x))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(4)*x)/(a + b*exp(S(2)*x)), x), x, -a*log(a + b*exp(S(2)*x))/(S(2)*b**S(2)) + exp(S(2)*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(4)*x)/(a + b*exp(S(2)*x))**S(2), x), x, a/(S(2)*b**S(2)*(a + b*exp(S(2)*x))) + log(a + b*exp(S(2)*x))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(4)*x)/(a + b*exp(S(2)*x))**S(3), x), x, exp(S(4)*x)/(S(4)*a*(a + b*exp(S(2)*x))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(4)*x)/(a + b*exp(S(2)*x))**S(4), x), x, a/(S(6)*b**S(2)*(a + b*exp(S(2)*x))**S(3)) - S(1)/(S(4)*b**S(2)*(a + b*exp(S(2)*x))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(4)*x)/(a + b*exp(S(2)*x))**(S(2)/3), x), x, -S(3)*a*(a + b*exp(S(2)*x))**(S(1)/3)/(S(2)*b**S(2)) + S(3)*(a + b*exp(S(2)*x))**(S(4)/3)/(S(8)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(n*x))*exp(-n*x), x), x, -a*exp(-n*x)/n + b*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(n*x))**S(2)*exp(-n*x), x), x, -a**S(2)*exp(-n*x)/n + S(2)*a*b*x + b**S(2)*exp(n*x)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(n*x))**S(3)*exp(-n*x), x), x, -a**S(3)*exp(-n*x)/n + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*exp(n*x)/n + b**S(3)*exp(S(2)*n*x)/(S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(-n*x)/(a + b*exp(n*x)), x), x, -exp(-n*x)/(a*n) - b*x/a**S(2) + b*log(a + b*exp(n*x))/(a**S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(-n*x)/(a + b*exp(n*x))**S(2), x), x, -b/(a**S(2)*n*(a + b*exp(n*x))) - exp(-n*x)/(a**S(2)*n) - S(2)*b*x/a**S(3) + S(2)*b*log(a + b*exp(n*x))/(a**S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(-n*x)/(a + b*exp(n*x))**S(3), x), x, -b/(S(2)*a**S(2)*n*(a + b*exp(n*x))**S(2)) - S(2)*b/(a**S(3)*n*(a + b*exp(n*x))) - exp(-n*x)/(a**S(3)*n) - S(3)*b*x/a**S(4) + S(3)*b*log(a + b*exp(n*x))/(a**S(4)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x)/(c + d*f**(S(2)*b*x + e)), x), x, f**(a - e/S(2))*atan(sqrt(d)*f**(b*x + e/S(2))/sqrt(c))/(b*sqrt(c)*sqrt(d)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + S(2)*b*x)/(c + d*f**(S(2)*b*x + e)), x), x, f**(a - e)*log(c + d*f**(S(2)*b*x + e))/(S(2)*b*d*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + S(3)*b*x)/(c + d*f**(S(2)*b*x + e)), x), x, -sqrt(c)*f**(a - S(3)*e/S(2))*atan(sqrt(d)*f**(b*x + e/S(2))/sqrt(c))/(b*d**(S(3)/2)*log(f)) + f**(a + b*x - e)/(b*d*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + S(4)*b*x)/(c + d*f**(S(2)*b*x + e)), x), x, -c*f**(a - S(2)*e)*log(c + d*f**(S(2)*b*x + e))/(S(2)*b*d**S(2)*log(f)) + f**(a + S(2)*b*x - e)/(S(2)*b*d*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + S(5)*b*x)/(c + d*f**(S(2)*b*x + e)), x), x, c**(S(3)/2)*f**(a - S(5)*e/S(2))*atan(sqrt(d)*f**(b*x + e/S(2))/sqrt(c))/(b*d**(S(5)/2)*log(f)) - c*f**(a + b*x - S(2)*e)/(b*d**S(2)*log(f)) + f**(a + S(3)*b*x - e)/(S(3)*b*d*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(exp(S(2)*x) + S(1)), x), x, atan(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(-exp(S(2)*x) + S(1)), x), x, atanh(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(x)/(-exp(S(2)*x) + S(1)), x), x, x*atanh(exp(x)) + polylog(S(2), -exp(x))/S(2) - polylog(S(2), exp(x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(x)/(-exp(S(2)*x) + S(1)), x), x, x**S(2)*atanh(exp(x)) + x*polylog(S(2), -exp(x)) - x*polylog(S(2), exp(x)) - polylog(S(3), -exp(x)) + polylog(S(3), exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp(x)/(-exp(S(2)*x) + S(1)), x), x, x**S(3)*atanh(exp(x)) + S(3)*x**S(2)*polylog(S(2), -exp(x))/S(2) - S(3)*x**S(2)*polylog(S(2), exp(x))/S(2) - S(3)*x*polylog(S(3), -exp(x)) + S(3)*x*polylog(S(3), exp(x)) + S(3)*polylog(S(4), -exp(x)) - S(3)*polylog(S(4), exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x/(a + b*f**(S(2)*x)), x), x, atan(sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x*x/(a + b*f**(S(2)*x)), x), x, x*atan(sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)) - I*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)*log(f)**S(2)) + I*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x*x**S(2)/(a + b*f**(S(2)*x)), x), x, x**S(2)*atan(sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)) - I*x*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)**S(2)) + I*x*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)**S(2)) + I*polylog(S(3), -I*sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)**S(3)) - I*polylog(S(3), I*sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x*x**S(3)/(a + b*f**(S(2)*x)), x), x, x**S(3)*atan(sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)) - S(3)*I*x**S(2)*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)*log(f)**S(2)) + S(3)*I*x**S(2)*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)*log(f)**S(2)) + S(3)*I*x*polylog(S(3), -I*sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)**S(3)) - S(3)*I*x*polylog(S(3), I*sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)**S(3)) - S(3)*I*polylog(S(4), -I*sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)**S(4)) + S(3)*I*polylog(S(4), I*sqrt(b)*f**x/sqrt(a))/(sqrt(a)*sqrt(b)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x/(a + b*f**(S(2)*x))**S(2), x), x, f**x/(S(2)*a*(a + b*f**(S(2)*x))*log(f)) + atan(sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x*x/(a + b*f**(S(2)*x))**S(2), x), x, f**x*x/(S(2)*a*(a + b*f**(S(2)*x))*log(f)) + x*atan(sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)) - atan(sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(2)) - I*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(4)*a**(S(3)/2)*sqrt(b)*log(f)**S(2)) + I*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(4)*a**(S(3)/2)*sqrt(b)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x*x**S(2)/(a + b*f**(S(2)*x))**S(2), x), x, f**x*x**S(2)/(S(2)*a*(a + b*f**(S(2)*x))*log(f)) + x**S(2)*atan(sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)) - x*atan(sqrt(b)*f**x/sqrt(a))/(a**(S(3)/2)*sqrt(b)*log(f)**S(2)) - I*x*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(2)) + I*x*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(2)) + I*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(3)) - I*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(3)) + I*polylog(S(3), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(3)) - I*polylog(S(3), I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x*x**S(3)/(a + b*f**(S(2)*x))**S(2), x), x, f**x*x**S(3)/(S(2)*a*(a + b*f**(S(2)*x))*log(f)) + x**S(3)*atan(sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)) - S(3)*x**S(2)*atan(sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(2)) - S(3)*I*x**S(2)*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(4)*a**(S(3)/2)*sqrt(b)*log(f)**S(2)) + S(3)*I*x**S(2)*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(4)*a**(S(3)/2)*sqrt(b)*log(f)**S(2)) + S(3)*I*x*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(3)) - S(3)*I*x*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(3)) + S(3)*I*x*polylog(S(3), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(3)) - S(3)*I*x*polylog(S(3), I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(3)) - S(3)*I*polylog(S(3), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(4)) + S(3)*I*polylog(S(3), I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(4)) - S(3)*I*polylog(S(4), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(4)) + S(3)*I*polylog(S(4), I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x*x/(a + b*f**(S(2)*x))**S(3), x), x, f**x*x/(S(4)*a*(a + b*f**(S(2)*x))**S(2)*log(f)) + S(3)*f**x*x/(S(8)*a**S(2)*(a + b*f**(S(2)*x))*log(f)) - f**x/(S(8)*a**S(2)*(a + b*f**(S(2)*x))*log(f)**S(2)) + S(3)*x*atan(sqrt(b)*f**x/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*log(f)) - atan(sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(5)/2)*sqrt(b)*log(f)**S(2)) - S(3)*I*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(16)*a**(S(5)/2)*sqrt(b)*log(f)**S(2)) + S(3)*I*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(16)*a**(S(5)/2)*sqrt(b)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x*x**S(2)/(a + b*f**(S(2)*x))**S(3), x), x, f**x*x**S(2)/(S(4)*a*(a + b*f**(S(2)*x))**S(2)*log(f)) + S(3)*f**x*x**S(2)/(S(8)*a**S(2)*(a + b*f**(S(2)*x))*log(f)) - f**x*x/(S(4)*a**S(2)*(a + b*f**(S(2)*x))*log(f)**S(2)) + S(3)*x**S(2)*atan(sqrt(b)*f**x/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*log(f)) - x*atan(sqrt(b)*f**x/sqrt(a))/(a**(S(5)/2)*sqrt(b)*log(f)**S(2)) - S(3)*I*x*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*log(f)**S(2)) + S(3)*I*x*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*log(f)**S(2)) + atan(sqrt(b)*f**x/sqrt(a))/(S(4)*a**(S(5)/2)*sqrt(b)*log(f)**S(3)) + I*polylog(S(2), -I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(5)/2)*sqrt(b)*log(f)**S(3)) - I*polylog(S(2), I*sqrt(b)*f**x/sqrt(a))/(S(2)*a**(S(5)/2)*sqrt(b)*log(f)**S(3)) + S(3)*I*polylog(S(3), -I*sqrt(b)*f**x/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*log(f)**S(3)) - S(3)*I*polylog(S(3), I*sqrt(b)*f**x/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*f**x + b*f**(-x)), x), x, x*atan(sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)) - I*polylog(S(2), -I*sqrt(a)*f**x/sqrt(b))/(S(2)*sqrt(a)*sqrt(b)*log(f)**S(2)) + I*polylog(S(2), I*sqrt(a)*f**x/sqrt(b))/(S(2)*sqrt(a)*sqrt(b)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*f**x + b*f**(-x)), x), x, x**S(2)*atan(sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)) - I*x*polylog(S(2), -I*sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)**S(2)) + I*x*polylog(S(2), I*sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)**S(2)) + I*polylog(S(3), -I*sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)**S(3)) - I*polylog(S(3), I*sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*f**x + b*f**(-x)), x), x, x**S(3)*atan(sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)) - S(3)*I*x**S(2)*polylog(S(2), -I*sqrt(a)*f**x/sqrt(b))/(S(2)*sqrt(a)*sqrt(b)*log(f)**S(2)) + S(3)*I*x**S(2)*polylog(S(2), I*sqrt(a)*f**x/sqrt(b))/(S(2)*sqrt(a)*sqrt(b)*log(f)**S(2)) + S(3)*I*x*polylog(S(3), -I*sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)**S(3)) - S(3)*I*x*polylog(S(3), I*sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)**S(3)) - S(3)*I*polylog(S(4), -I*sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)**S(4)) + S(3)*I*polylog(S(4), I*sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**x/(a + b*f**(S(2)*x))**S(3), x), x, f**x/(S(4)*a*(a + b*f**(S(2)*x))**S(2)*log(f)) + S(3)*f**x/(S(8)*a**S(2)*(a + b*f**(S(2)*x))*log(f)) + S(3)*atan(sqrt(b)*f**x/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*f**x + b*f**(-x)), x), x, atan(sqrt(a)*f**x/sqrt(b))/(sqrt(a)*sqrt(b)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*f**x + b*f**(-x))**(S(-2)), x), x, -S(1)/(S(2)*a*(a*f**(S(2)*x) + b)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*f**x + b*f**(-x))**S(2), x), x, -x/(S(2)*a*(a*f**(S(2)*x) + b)*log(f)) + x/(S(2)*a*b*log(f)) - log(a*f**(S(2)*x) + b)/(S(4)*a*b*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*f**x + b*f**(-x))**S(2), x), x, -x**S(2)/(S(2)*a*(a*f**(S(2)*x) + b)*log(f)) - x*log(S(1) + b*f**(-S(2)*x)/a)/(S(2)*a*b*log(f)**S(2)) + polylog(S(2), -b*f**(-S(2)*x)/a)/(S(4)*a*b*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*f**x + b*f**(-x))**S(2), x), x, -x**S(3)/(S(2)*a*(a*f**(S(2)*x) + b)*log(f)) - S(3)*x**S(2)*log(S(1) + b*f**(-S(2)*x)/a)/(S(4)*a*b*log(f)**S(2)) + S(3)*x*polylog(S(2), -b*f**(-S(2)*x)/a)/(S(4)*a*b*log(f)**S(3)) + S(3)*polylog(S(3), -b*f**(-S(2)*x)/a)/(S(8)*a*b*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*f**x + b*f**(-x))**(S(-3)), x), x, -f**x/(S(4)*a*(a*f**(S(2)*x) + b)**S(2)*log(f)) + f**x/(S(8)*a*b*(a*f**(S(2)*x) + b)*log(f)) + atan(sqrt(a)*f**x/sqrt(b))/(S(8)*a**(S(3)/2)*b**(S(3)/2)*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*f**x + b*f**(-x))**S(3), x), x, -f**x*x/(S(4)*a*(a*f**(S(2)*x) + b)**S(2)*log(f)) + f**x*x/(S(8)*a*b*(a*f**(S(2)*x) + b)*log(f)) + f**x/(S(8)*a*b*(a*f**(S(2)*x) + b)*log(f)**S(2)) + x*atan(sqrt(a)*f**x/sqrt(b))/(S(8)*a**(S(3)/2)*b**(S(3)/2)*log(f)) - I*polylog(S(2), -I*sqrt(a)*f**x/sqrt(b))/(S(16)*a**(S(3)/2)*b**(S(3)/2)*log(f)**S(2)) + I*polylog(S(2), I*sqrt(a)*f**x/sqrt(b))/(S(16)*a**(S(3)/2)*b**(S(3)/2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*f**x + b*f**(-x))**S(3), x), x, -f**x*x**S(2)/(S(4)*a*(a*f**(S(2)*x) + b)**S(2)*log(f)) + f**x*x**S(2)/(S(8)*a*b*(a*f**(S(2)*x) + b)*log(f)) + f**x*x/(S(4)*a*b*(a*f**(S(2)*x) + b)*log(f)**S(2)) + x**S(2)*atan(sqrt(a)*f**x/sqrt(b))/(S(8)*a**(S(3)/2)*b**(S(3)/2)*log(f)) - I*x*polylog(S(2), -I*sqrt(a)*f**x/sqrt(b))/(S(8)*a**(S(3)/2)*b**(S(3)/2)*log(f)**S(2)) + I*x*polylog(S(2), I*sqrt(a)*f**x/sqrt(b))/(S(8)*a**(S(3)/2)*b**(S(3)/2)*log(f)**S(2)) - atan(sqrt(a)*f**x/sqrt(b))/(S(4)*a**(S(3)/2)*b**(S(3)/2)*log(f)**S(3)) + I*polylog(S(3), -I*sqrt(a)*f**x/sqrt(b))/(S(8)*a**(S(3)/2)*b**(S(3)/2)*log(f)**S(3)) - I*polylog(S(3), I*sqrt(a)*f**x/sqrt(b))/(S(8)*a**(S(3)/2)*b**(S(3)/2)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(a + b*x + c*x**S(2))*g**(d + e*x + f*x**S(2)), x), x, sqrt(pi)*f**a*g**d*exp(-(b*log(f) + e*log(g))**S(2)/(S(4)*(c*log(f) + f*log(g))))*erfi((b*log(f)/S(2) + e*log(g)/S(2) + x*(c*log(f) + f*log(g)))/sqrt(c*log(f) + f*log(g)))/(S(2)*sqrt(c*log(f) + f*log(g))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(e*(c + d*x))*(G**(h*(f + g*x))*b + a)**n, x), x, F**(e*(c + d*x))*(G**(h*(f + g*x))*b + a)**(n + S(1))*hyper((S(1), d*e*log(F)/(g*h*log(G)) + n + S(1)), (d*e*log(F)/(g*h*log(G)) + S(1),), -G**(h*(f + g*x))*b/a)/(a*d*e*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(e*(c + d*x))*H**(t*(r + s*x))/(F**(e*(c + d*x))*b + a), x), x, H**(t*(r + s*x))*hyper((S(1), -s*t*log(H)/(d*e*log(F))), (S(1) - s*t*log(H)/(d*e*log(F)),), -F**(-e*(c + d*x))*a/b)/(b*s*t*log(H)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(e*(d*x + f))*H**(t*(r + s*x))/(F**(e*(c + d*x))*b + a), x), x, F**(-e*(c - f))*H**(t*(r + s*x))*hyper((S(1), -s*t*log(H)/(d*e*log(F))), (S(1) - s*t*log(H)/(d*e*log(F)),), -F**(-e*(c + d*x))*a/b)/(b*s*t*log(H)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*exp(h + i*x))*(f + g*x)**S(3)/(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x)), x), x, S(6)*g**S(3)*(e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(4), -(b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(4)*(b + sqrt(-S(4)*a*c + b**S(2)))) + S(6)*g**S(3)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(4), -(b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(4)*(b - sqrt(-S(4)*a*c + b**S(2)))) + S(6)*g**S(2)*(e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)*polylog(S(3), -(b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(3)*(b + sqrt(-S(4)*a*c + b**S(2)))) + S(6)*g**S(2)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)*polylog(S(3), -(b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(3)*(b - sqrt(-S(4)*a*c + b**S(2)))) + S(3)*g*(e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)**S(2)*polylog(S(2), -(b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))) + S(3)*g*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)**S(2)*polylog(S(2), -(b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))) - (e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)**S(3)*log(S(1) + (b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i*(b + sqrt(-S(4)*a*c + b**S(2)))) - (e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)**S(3)*log(S(1) + (b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i*(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*exp(h + i*x))*(f + g*x)**S(2)/(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x)), x), x, S(2)*g**S(2)*(e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(3), -(b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(3)*(b + sqrt(-S(4)*a*c + b**S(2)))) + S(2)*g**S(2)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(3), -(b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(3)*(b - sqrt(-S(4)*a*c + b**S(2)))) + S(2)*g*(e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)*polylog(S(2), -(b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))) + S(2)*g*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)*polylog(S(2), -(b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))) - (e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)**S(2)*log(S(1) + (b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i*(b + sqrt(-S(4)*a*c + b**S(2)))) - (e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)**S(2)*log(S(1) + (b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i*(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*exp(h + i*x))*(f + g*x)/(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x)), x), x, g*(e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -(b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))) + g*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -(b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))) - (e + (b*e - S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(f + g*x)*log(S(1) + (b + sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i*(b + sqrt(-S(4)*a*c + b**S(2)))) + (e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*(-f - g*x)*log(S(1) + (b - sqrt(-S(4)*a*c + b**S(2)))*exp(-h - i*x)/(S(2)*c))/(i*(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*exp(h + i*x))/(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x)), x), x, d*x/a - d*log(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x))/(S(2)*a*i) + (-S(2)*a*e + b*d)*atanh((b + S(2)*c*exp(h + i*x))/sqrt(-S(4)*a*c + b**S(2)))/(a*i*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((d + e*exp(h + i*x))/((f + g*x)*(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x))), x), x, d*Integral(S(1)/((f + g*x)*(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x))), x) + e*Integral(exp(h + i*x)/((f + g*x)*(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x))), x), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((d + e*exp(h + i*x))/((f + g*x)**S(2)*(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x))), x), x, d*Integral(S(1)/((f + g*x)**S(2)*(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x))), x) + e*Integral(exp(h + i*x)/((f + g*x)**S(2)*(a + b*exp(h + i*x) + c*exp(S(2)*h + S(2)*i*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(-a*e*exp(c + d*x) + b*e)/(-S(2)*a*e*exp(c + d*x) - b*e*exp(S(2)*c + S(2)*d*x) + b*e), x), x, -x*log(S(1) + (a - sqrt(a**S(2) + b**S(2)))*exp(-c - d*x)/b)/(S(2)*d) - x*log(S(1) + (a + sqrt(a**S(2) + b**S(2)))*exp(-c - d*x)/b)/(S(2)*d) + polylog(S(2), -(a - sqrt(a**S(2) + b**S(2)))*exp(-c - d*x)/b)/(S(2)*d**S(2)) + polylog(S(2), -(a + sqrt(a**S(2) + b**S(2)))*exp(-c - d*x)/b)/(S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(a + b*x + c*x**S(3))*(b + S(3)*c*x**S(2)), x), x, F**(a + b*x + c*x**S(3))/log(F), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(F**(S(1)/(a + b*x + c*x**S(2)))*(b + S(2)*c*x)/(a + b*x + c*x**S(2))**S(2), x), x, -F**(S(1)/(a + b*x + c*x**S(2)))/log(F), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))**m*exp(a + b*x + c*x**S(2)), x), x, (-a - b*x - c*x**S(2))**(-m)*(a + b*x + c*x**S(2))**m*Gamma(m + S(1), -a - b*x - c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))**S(3)*exp(a + b*x + c*x**S(2)), x), x, (a + b*x + c*x**S(2))**S(3)*exp(a + b*x + c*x**S(2)) - S(3)*(a + b*x + c*x**S(2))**S(2)*exp(a + b*x + c*x**S(2)) + S(6)*(a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2)) - S(6)*exp(a + b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))**S(2)*exp(a + b*x + c*x**S(2)), x), x, (a + b*x + c*x**S(2))**S(2)*exp(a + b*x + c*x**S(2)) - S(2)*(a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2)) + S(2)*exp(a + b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2)), x), x, (a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2)) - exp(a + b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2)), x), x, exp(a + b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2))/(a + b*x + c*x**S(2)), x), x, Ei(a + b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2))/(a + b*x + c*x**S(2))**S(2), x), x, Ei(a + b*x + c*x**S(2)) - exp(a + b*x + c*x**S(2))/(a + b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2))/(a + b*x + c*x**S(2))**S(3), x), x, Ei(a + b*x + c*x**S(2))/S(2) - exp(a + b*x + c*x**S(2))/(S(2)*(a + b*x + c*x**S(2))) - exp(a + b*x + c*x**S(2))/(S(2)*(a + b*x + c*x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))**(S(7)/2)*exp(a + b*x + c*x**S(2)), x), x, (a + b*x + c*x**S(2))**(S(7)/2)*exp(a + b*x + c*x**S(2)) - S(7)*(a + b*x + c*x**S(2))**(S(5)/2)*exp(a + b*x + c*x**S(2))/S(2) + S(35)*(a + b*x + c*x**S(2))**(S(3)/2)*exp(a + b*x + c*x**S(2))/S(4) - S(105)*sqrt(a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2))/S(8) + S(105)*sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2)))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))**(S(5)/2)*exp(a + b*x + c*x**S(2)), x), x, (a + b*x + c*x**S(2))**(S(5)/2)*exp(a + b*x + c*x**S(2)) - S(5)*(a + b*x + c*x**S(2))**(S(3)/2)*exp(a + b*x + c*x**S(2))/S(2) + S(15)*sqrt(a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2))/S(4) - S(15)*sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2)))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))**(S(3)/2)*exp(a + b*x + c*x**S(2)), x), x, (a + b*x + c*x**S(2))**(S(3)/2)*exp(a + b*x + c*x**S(2)) - S(3)*sqrt(a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2))/S(2) + S(3)*sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*sqrt(a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2)), x), x, sqrt(a + b*x + c*x**S(2))*exp(a + b*x + c*x**S(2)) - sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2))/sqrt(a + b*x + c*x**S(2)), x), x, sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2))/(a + b*x + c*x**S(2))**(S(3)/2), x), x, S(2)*sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2))) - S(2)*exp(a + b*x + c*x**S(2))/sqrt(a + b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2))/(a + b*x + c*x**S(2))**(S(5)/2), x), x, S(4)*sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2)))/S(3) - S(4)*exp(a + b*x + c*x**S(2))/(S(3)*sqrt(a + b*x + c*x**S(2))) - S(2)*exp(a + b*x + c*x**S(2))/(S(3)*(a + b*x + c*x**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2))/(a + b*x + c*x**S(2))**(S(7)/2), x), x, S(8)*sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2)))/S(15) - S(8)*exp(a + b*x + c*x**S(2))/(S(15)*sqrt(a + b*x + c*x**S(2))) - S(4)*exp(a + b*x + c*x**S(2))/(S(15)*(a + b*x + c*x**S(2))**(S(3)/2)) - S(2)*exp(a + b*x + c*x**S(2))/(S(5)*(a + b*x + c*x**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*exp(a + b*x + c*x**S(2))/(a + b*x + c*x**S(2))**(S(9)/2), x), x, S(16)*sqrt(pi)*erfi(sqrt(a + b*x + c*x**S(2)))/S(105) - S(16)*exp(a + b*x + c*x**S(2))/(S(105)*sqrt(a + b*x + c*x**S(2))) - S(8)*exp(a + b*x + c*x**S(2))/(S(105)*(a + b*x + c*x**S(2))**(S(3)/2)) - S(4)*exp(a + b*x + c*x**S(2))/(S(35)*(a + b*x + c*x**S(2))**(S(5)/2)) - S(2)*exp(a + b*x + c*x**S(2))/(S(7)*(a + b*x + c*x**S(2))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(-x)/sqrt(S(1) - exp(-S(2)*x)), x), x, -asin(exp(-x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(exp(S(2)*x) + S(4)), x), x, atan(exp(x)/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(-exp(S(2)*x) + S(1)), x), x, atanh(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(-S(4)*exp(S(2)*x) + S(3)), x), x, sqrt(S(3))*atanh(S(2)*sqrt(S(3))*exp(x)/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-S(4)*exp(S(2)*x) + S(3))*exp(x), x), x, sqrt(-S(4)*exp(S(2)*x) + S(3))*exp(x)/S(2) + S(3)*asin(S(2)*sqrt(S(3))*exp(x)/S(3))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp(x**S(2)), x), x, x**S(2)*exp(x**S(2))/S(2) - exp(x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-exp(S(2)*x) + S(1))*exp(x), x), x, sqrt(-exp(S(2)*x) + S(1))*exp(x)/S(2) + asin(exp(x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/sqrt(exp(S(2)*x) + exp(x) + S(1)), x), x, asinh(sqrt(S(3))*(S(2)*exp(x) + S(1))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(exp(S(2)*x) + S(-4)), x), x, -atanh(exp(x)/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(-x**S(2) + S(2)), x), x, -exp(-x**S(2) + S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-x**E + exp(x), x), x, -x**(E + S(1))/(E + S(1)) + exp(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(S(2)*x) + S(-1))/(exp(S(2)*x) + S(3)), x), x, -x/S(3) + S(2)*log(exp(S(2)*x) + S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/sqrt(-exp(S(2)*x) + S(1)), x), x, asin(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(exp(S(4)*x) + S(1)), x), x, atan(exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(S(2)*x) - S(3)*exp(x)), x), x, -x/S(9) + log(-exp(x) + S(3))/S(9) + exp(-x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) + S(-2))*exp(x)/(exp(x) + S(1)), x), x, exp(x) - S(3)*log(exp(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(exp(S(2)*x) + S(-1)), x), x, -atanh(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(exp(S(2)*x) + S(1)), x), x, atan(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) + exp(-x))/(exp(x) - exp(-x)), x), x, log(-exp(x) + exp(-x)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((exp(x) + exp(-x))/(exp(x) - exp(-x)), x), x, -x + log(-exp(S(2)*x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) - exp(-x))/(exp(x) + exp(-x)), x), x, log(exp(x) + exp(-x)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((exp(x) - exp(-x))/(exp(x) + exp(-x)), x), x, -x + log(exp(S(2)*x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(S(2)*x) + exp(-S(2)*x))/(exp(S(2)*x) - exp(-S(2)*x)), x), x, -x + log(-exp(S(4)*x) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/sqrt(exp(S(2)*x) + S(1)), x), x, asinh(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(sqrt(x + S(4)))/sqrt(x + S(4)), x), x, S(2)*exp(sqrt(x + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(exp(S(2)*x**S(2)) + S(-1)), x), x, atan(sqrt(exp(S(2)*x**S(2)) + S(-1)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(exp(S(2)*x) + S(9))*exp(x), x), x, sqrt(exp(S(2)*x) + S(9))*exp(x)/S(2) + S(9)*asinh(exp(x)/S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(exp(S(2)*x) + S(1))*exp(x), x), x, sqrt(exp(S(2)*x) + S(1))*exp(x)/S(2) + asinh(exp(x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(x**S(2))/(exp(S(2)*x**S(2)) + S(1)), x), x, atan(exp(x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(x**(S(3)/2)), x), x, S(2)*x**(S(3)/2)*exp(x**(S(3)/2))/S(3) - S(2)*exp(x**(S(3)/2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/sqrt(exp(S(2)*x) + S(-3)), x), x, atanh(exp(x)/sqrt(exp(S(2)*x) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(-exp(S(2)*x) + S(16)), x), x, atanh(exp(x)/S(4))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(5)*x)/(exp(S(10)*x) + S(1)), x), x, atan(exp(S(5)*x))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(4)*x)/sqrt(exp(S(8)*x) + S(16)), x), x, asinh(exp(S(4)*x)/S(4))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(S(4)*x**S(3))*cos(S(7)*x**S(3)), x), x, S(7)*exp(S(4)*x**S(3))*sin(S(7)*x**S(3))/S(195) + S(4)*exp(S(4)*x**S(3))*cos(S(7)*x**S(3))/S(195), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(x**S(2) + S(1)), x), x, exp(x**S(2) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(x**S(3) + S(1)), x), x, exp(x**S(3) + S(1))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(sqrt(x))/sqrt(x), x), x, S(2)*exp(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x**(S(1)/3))/x**(S(2)/3), x), x, S(3)*exp(x**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(5) + S(2)*x**S(3) + S(-8))*exp(S(3)*x), x), x, x**S(5)*exp(S(3)*x)/S(3) - S(5)*x**S(4)*exp(S(3)*x)/S(9) + S(38)*x**S(3)*exp(S(3)*x)/S(27) - S(38)*x**S(2)*exp(S(3)*x)/S(27) + S(76)*x*exp(S(3)*x)/S(81) - S(724)*exp(S(3)*x)/S(243), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + exp(x))**S(2), x), x, x**S(3)/S(3) + S(2)*x*exp(x) + exp(S(2)*x)/S(2) - S(2)*exp(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(S(3)*x) + exp(S(2)*x) + exp(x))*exp(-S(4)*x), x), x, -exp(-x) - exp(-S(2)*x)/S(2) - exp(-S(3)*x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(exp(S(2)*x) + S(2)*exp(x) + S(1)), x), x, -S(1)/(exp(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(-x)*cos(S(3)*x), x), x, S(3)*exp(-x)*sin(S(3)*x)/S(10) - exp(-x)*cos(S(3)*x)/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(exp(S(2)*x) + S(3)*exp(x) + S(2)), x), x, -log(exp(x) + S(1)) + S(2)*log(exp(x) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(exp(x) + S(1)), x), x, exp(x) - log(exp(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(3)*x)*cos(S(5)*x), x), x, S(5)*exp(S(3)*x)*sin(S(5)*x)/S(34) + S(3)*exp(S(3)*x)*cos(S(5)*x)/S(34), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)*sech(exp(x)), x), x, atan(sinh(exp(x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(-x)/(S(2)*exp(x) + S(1)), x), x, -S(2)*x + S(2)*log(S(2)*exp(x) + S(1)) - exp(-x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)*cos(S(3)*x + S(4)), x), x, S(3)*exp(x)*sin(S(3)*x + S(4))/S(10) + exp(x)*cos(S(3)*x + S(4))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(exp(x) + exp(-x)), x), x, x*exp(x) - x*exp(-x) - exp(x) - exp(-x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(exp(S(2)*x) + S(3)*exp(x) + S(2)), x), x, -S(2)*atanh(S(2)*exp(x) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(exp(x) + S(1))**(S(1)/3), x), x, S(3)*(exp(x) + S(1))**(S(5)/3)/S(5) - S(3)*(exp(x) + S(1))**(S(2)/3)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(2)*x)/(exp(x) + S(1))**(S(1)/4), x), x, S(4)*(exp(x) + S(1))**(S(7)/4)/S(7) - S(4)*(exp(x) + S(1))**(S(3)/4)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*exp(S(2)*x) - exp(x))/sqrt(S(3)*exp(S(2)*x) - S(6)*exp(x) + S(-1)), x), x, S(2)*sqrt(S(3)*exp(S(2)*x) - S(6)*exp(x) + S(-1))/S(3) - sqrt(S(3))*atanh(sqrt(S(3))*(-exp(x) + S(1))/sqrt(S(3)*exp(S(2)*x) - S(6)*exp(x) + S(-1)))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(5)*x)*exp(x), x), x, x**S(2)*exp(x) - S(7)*x*exp(x) + S(7)*exp(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - x)*exp(S(3)*x), x), x, x**S(2)*exp(S(3)*x)/S(3) - S(5)*x*exp(S(3)*x)/S(9) + S(5)*exp(S(3)*x)/S(27), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*x)*(log(x) + S(1))*exp(x**x), x), x, (x**x + S(-1))*exp(x**x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(S(7)*x) + exp(S(5)*x))/(exp(x) + exp(-x)), x), x, exp(S(6)*x)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(-2) - S(1)/x)*(-log(x) + S(1)), x), x, -x**(-S(1)/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(x))**S(2), x), x, a**S(2)*x + S(2)*a*b*exp(x) + b**S(2)*exp(S(2)*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(x))**S(3), x), x, a**S(3)*x + S(3)*a**S(2)*b*exp(x) + S(3)*a*b**S(2)*exp(S(2)*x)/S(2) + b**S(3)*exp(S(3)*x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*exp(x))**S(4), x), x, a**S(4)*x + S(4)*a**S(3)*b*exp(x) + S(3)*a**S(2)*b**S(2)*exp(S(2)*x) + S(4)*a*b**S(3)*exp(S(3)*x)/S(3) + b**S(4)*exp(S(4)*x)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*exp(c + d*x)), x), x, -S(2)*atanh(sqrt(a + b*exp(c + d*x))/sqrt(a))/(sqrt(a)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-a + b*exp(c + d*x)), x), x, S(2)*atan(sqrt(-a + b*exp(c + d*x))/sqrt(a))/(sqrt(a)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*exp(c + d*x)), x), x, -S(2)*sqrt(a)*atanh(sqrt(a + b*exp(c + d*x))/sqrt(a))/d + S(2)*sqrt(a + b*exp(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a + b*exp(c + d*x)), x), x, -S(2)*sqrt(a)*atan(sqrt(-a + b*exp(c + d*x))/sqrt(a))/d + S(2)*sqrt(-a + b*exp(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(6)*x)*sin(S(3)*x), x), x, S(2)*exp(S(6)*x)*sin(S(3)*x)/S(15) - exp(S(6)*x)*cos(S(3)*x)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(3)*x)/(exp(S(2)*x) + S(1)), x), x, exp(x) - atan(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(3)*x)/(exp(S(2)*x) + S(-1)), x), x, exp(x) - atanh(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(-x)/sqrt(exp(S(2)*x) + S(1)), x), x, -sqrt(exp(S(2)*x) + S(1))*exp(-x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(exp(S(2)*x) - S(8)*exp(x) + S(-1)), x), x, sqrt(S(17))*atanh(sqrt(S(17))*(-exp(x) + S(4))/S(17))/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp(S(7)*x), x), x, x**S(3)*exp(S(7)*x)/S(7) - S(3)*x**S(2)*exp(S(7)*x)/S(49) + S(6)*x*exp(S(7)*x)/S(343) - S(6)*exp(S(7)*x)/S(2401), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp(-S(2)*x + S(8)), x), x, -x**S(3)*exp(-S(2)*x + S(8))/S(2) - S(3)*x**S(2)*exp(-S(2)*x + S(8))/S(4) - S(3)*x*exp(-S(2)*x + S(8))/S(4) - S(3)*exp(-S(2)*x + S(8))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-exp(S(2)*x) + S(9))*exp(x), x), x, sqrt(-exp(S(2)*x) + S(9))*exp(x)/S(2) + S(9)*asin(exp(x)/S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-exp(S(2)*x) + S(9))*exp(S(6)*x), x), x, -(-exp(S(2)*x) + S(9))**(S(7)/2)/S(7) + S(18)*(-exp(S(2)*x) + S(9))**(S(5)/2)/S(5) - S(27)*(-exp(S(2)*x) + S(9))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(6)*x)/(-exp(x) + S(9))**(S(5)/2), x), x, S(2)*(-exp(x) + S(9))**(S(7)/2)/S(7) - S(18)*(-exp(x) + S(9))**(S(5)/2) + S(540)*(-exp(x) + S(9))**(S(3)/2) - S(14580)*sqrt(-exp(x) + S(9)) - S(65610)/sqrt(-exp(x) + S(9)) + S(39366)/(-exp(x) + S(9))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(-S(7)*exp(x**S(4)) + S(2))**S(5), x), x, S(8)*x**S(4) - S(16807)*exp(S(5)*x**S(4))/S(20) + S(12005)*exp(S(4)*x**S(4))/S(8) - S(3430)*exp(S(3)*x**S(4))/S(3) + S(490)*exp(S(2)*x**S(4)) - S(140)*exp(x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(-exp(S(2)*x**S(2)) + S(1))*exp(x**S(2)), x), x, sqrt(-exp(S(2)*x**S(2)) + S(1))*exp(x**S(2))/S(4) + asin(exp(x**S(2)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(-exp(S(4)*x**S(3)) + S(1))**S(2)*exp(x**S(3)), x), x, exp(S(9)*x**S(3))/S(27) - S(2)*exp(S(5)*x**S(3))/S(15) + exp(x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x + exp(x)), x), x, exp(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x + exp(x) + exp(exp(x))), x), x, exp(exp(exp(x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) + exp(-x))**S(2), x), x, S(2)*x + exp(S(2)*x)/S(2) - exp(-S(2)*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(x) + exp(-x)), x), x, atan(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) + exp(-x))**(S(-2)), x), x, -S(1)/(S(2)*(exp(S(2)*x) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(x) - exp(-x)), x), x, -atanh(exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) - exp(-x))**(S(-2)), x), x, S(1)/(S(2)*(-exp(S(2)*x) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) - exp(-x))**S(2)*exp(x), x), x, exp(S(3)*x)/S(3) - S(2)*exp(x) - exp(-x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) - exp(-x))**S(3)*exp(x), x), x, S(3)*x + exp(S(4)*x)/S(4) - S(3)*exp(S(2)*x)/S(2) + exp(-S(2)*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)**x + S(1))/(S(2)**x + S(1)), x), x, S(2)**x/log(S(2)) + x - S(2)*log(S(2)**x + S(1))/log(S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)**x + S(1))/(S(1) + S(2)**(-x)), x), x, -S(2)**x/log(S(2)) + S(2)**(S(2)*x + S(-1))/log(S(2)) + S(2)*log(S(2)**x + S(1))/log(S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-S(2)*a*exp((a + x)**S(2))/x + exp((a + x)**S(2))/x**S(2), x), x, sqrt(pi)*erfi(a + x) - exp((a + x)**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(8) + x**S(6) + x**S(4))*exp(-x**S(2)), x), x, -x**S(7)*exp(-x**S(2))/S(2) - S(9)*x**S(5)*exp(-x**S(2))/S(4) - S(49)*x**S(3)*exp(-x**S(2))/S(8) - S(147)*x*exp(-x**S(2))/S(16) + S(147)*sqrt(pi)*erf(x)/S(32), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(exp(S(3)*x) - exp(x)), x), x, -atanh(exp(x)) + exp(-x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + x + S(-5))*exp(x)/(x + S(-1))**S(2), x), x, exp(x) - S(3)*exp(x)/(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*exp(x**S(2))/(x**S(2) + S(1))**S(2), x), x, exp(x**S(2))/(S(2)*(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(S(3)*x)/sqrt(S(16)*exp(S(2)*x) + S(25)), x), x, sqrt(S(16)*exp(S(2)*x) + S(25))*exp(x)/S(32) - S(25)*asinh(S(4)*exp(x)/S(5))/S(128), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) + S(1))/sqrt(x + exp(x)), x), x, S(2)*sqrt(x + exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) + S(1))/(x + exp(x)), x), x, log(x + exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x**S(2))/x**S(2), x), x, sqrt(pi)*erfi(x) - exp(x**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(4) + S(1))*exp(x**S(2))/x**S(2), x), x, S(2)*x*exp(x**S(2)) - exp(x**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*sqrt(f**x), x), x, S(16)*b**S(2)*sqrt(f**x)/log(f)**S(3) - S(8)*b*(a + b*x)*sqrt(f**x)/log(f)**S(2) + S(2)*(a + b*x)**S(2)*sqrt(f**x)/log(f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(3)**(x**S(2) + S(1))*x, x), x, S(3)**(x**S(2) + S(1))/(S(2)*log(S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(sqrt(x))/sqrt(x), x), x, S(2)**(sqrt(x) + S(1))/log(S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**(S(1)/x)/x**S(2), x), x, -S(2)**(S(1)/x)/log(S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**x + S(2)**(-x), x), x, S(2)**x/log(S(2)) - S(2)**(-x)/log(S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))*exp(-S(4)*x), x), x, -x**S(2)*exp(-S(4)*x)/S(4) + S(5)*x*exp(-S(4)*x)/S(8) - S(11)*exp(-S(4)*x)/S(32), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(k**(x/S(2)) + x**(sqrt(k)), x), x, S(2)*k**(x/S(2))/log(k) + x**(sqrt(k) + S(1))/(sqrt(k) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(10)**(sqrt(x))/sqrt(x), x), x, S(2)**(sqrt(x) + S(1))*S(5)**(sqrt(x))/log(S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/sqrt(x + exp(x)) + S(1)/sqrt(x + exp(x)), x), x, S(2)*sqrt(x + exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(exp(x) + S(1))/sqrt(x + exp(x)) + S(2)*sqrt(x + exp(x)), x), x, S(2)*x*sqrt(x + exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(x)/sqrt(x + exp(x)) + x/sqrt(x + exp(x)) + S(2)*sqrt(x + exp(x)), x), x, S(2)*x*sqrt(x + exp(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(exp(x) + S(1))/sqrt(x + exp(x)), x), x, S(2)*x*sqrt(x + exp(x)) - S(2)*Integral(sqrt(x + exp(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(x)/sqrt(x + exp(x)) + x/sqrt(x + exp(x)), x), x, S(2)*x*sqrt(x + exp(x)) - S(2)*Integral(sqrt(x + exp(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp(x)/sqrt(x + exp(x)), x), x, S(2)*x*sqrt(x + exp(x)) + S(2)*sqrt(x + exp(x)) - Integral(S(1)/sqrt(x + exp(x)), x) - S(3)*Integral(sqrt(x + exp(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(S(3)*x**S(2) + S(5)*exp(x))/(S(5)*sqrt(x**S(3) + S(5)*exp(x))) + S(4)*x*sqrt(x**S(3) + S(5)*exp(x))/S(5), x), x, S(2)*x**S(2)*sqrt(x**S(3) + S(5)*exp(x))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*exp(x)/sqrt(x**S(3) + S(5)*exp(x)), x), x, S(2)*x**S(2)*sqrt(x**S(3) + S(5)*exp(x))/S(5) - S(4)*Integral(x*sqrt(x**S(3) + S(5)*exp(x)), x)/S(5) - S(3)*Integral(x**S(4)/sqrt(x**S(3) + S(5)*exp(x)), x)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-exp(x) + S(-1))/(x + exp(x))**(S(1)/3), x), x, -S(3)*(x + exp(x))**(S(2)/3)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x + exp(x))**(S(1)/3) - (x + exp(x))**(S(2)/3) - S(1)/(x + exp(x))**(S(1)/3), x), x, -S(3)*(x + exp(x))**(S(2)/3)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x + exp(x))**(S(1)/3), x), x, -S(3)*(x + exp(x))**(S(2)/3)/S(2) + Integral((x + exp(x))**(S(-1)/3), x) + Integral((x + exp(x))**(S(2)/3), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x + (S(2)*x + S(3))*exp(x))/(x + exp(x))**(S(1)/3), x), x, S(3)*x*(x + exp(x))**(S(2)/3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)*x*exp(x)/(x + exp(x))**(S(1)/3) + S(2)*x/(x + exp(x))**(S(1)/3) + S(3)*(x + exp(x))**(S(2)/3), x), x, S(3)*x*(x + exp(x))**(S(2)/3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((exp(x) - exp(-x))*(exp(x) + exp(-x))**S(2)*exp(x), x), x, -x + exp(S(4)*x)/S(4) + exp(S(2)*x)/S(2) + exp(-S(2)*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x + exp(x)), x), x, Integral(x/(x + exp(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(x + exp(x)), x), x, Integral(x**S(2)/sqrt(x + exp(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(x + exp(x)), x), x, Integral(exp(x)/(x + exp(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)/(x**S(2) + exp(x)), x), x, Integral(exp(x)/(x**S(2) + exp(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f(x)/(x + f(x)), x), x, x - Integral(x/(x + f(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f(x)/(x**S(2) + f(x)), x), x, x - Integral(x**S(2)/(x**S(2) + f(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f(x)/(x + f(x))**S(2), x), x, -Integral(x/(x + f(x))**S(2), x) + Integral(S(1)/(x + f(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f(x)/(x**S(2) + f(x))**S(2), x), x, -Integral(x**S(2)/(x**S(2) + f(x))**S(2), x) + Integral(S(1)/(x**S(2) + f(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((F**(c + d*x)*a)**m*(F**(e + f*x)*b)**n, x), x, (F**(c + d*x)*a)**m*(F**(e + f*x)*b)**n/((d*m + f*n)*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a + b*x**n + c + d*x**n), x), x, -x*(x**n*(-b - d))**(-S(1)/n)*Gamma(S(1)/n, x**n*(-b - d))*exp(a + c)/n, expand=True, _diff=True, _numerical=True) # (difference in simplify `exp(a*log(f) + c*log(g))` converts to `f**a*g**c` in mathematica) # failing assert rubi_test(rubi_integrate(f**(a + b*x**n)*g**(c + d*x**n), x), x, -f**a*g**c*x*(-x**n*(b*log(f) + d*log(g)))**(-S(1)/n)*Gamma(S(1)/n, -x**n*(b*log(f) + d*log(g)))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*exp(x**n), x), x, -x**(m + S(1))*(-x**n)**(-(m + S(1))/n)*Gamma((m + S(1))/n, -x**n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**(x**n)*x**m, x), x, -x**(m + S(1))*(-x**n*log(f))**(-(m + S(1))/n)*Gamma((m + S(1))/n, -x**n*log(f))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**m*exp((a + b*x)**n), x), x, -(-(a + b*x)**n)**(-(m + S(1))/n)*(a + b*x)**(m + S(1))*Gamma((m + S(1))/n, -(a + b*x)**n)/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(f**((a + b*x)**n)*(a + b*x)**m, x), x, -(-(a + b*x)**n*log(f))**(-(m + S(1))/n)*(a + b*x)**(m + S(1))*Gamma((m + S(1))/n, -(a + b*x)**n*log(f))/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*exp((a + b*x)**S(3)), x), x, a*(a + b*x)*Gamma(S(1)/3, -(a + b*x)**S(3))/(S(3)*b**S(2)*(-(a + b*x)**S(3))**(S(1)/3)) - (a + b*x)**S(2)*Gamma(S(2)/3, -(a + b*x)**S(3))/(S(3)*b**S(2)*(-(a + b*x)**S(3))**(S(2)/3)), expand=True, _diff=True, _numerical=True)
b4e22460680cbe2db4974f2175855ec7e9c2f53dd826f7b5b00240d8503b02cc
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.rubi import rubi_integrate from sympy.functions import log, sqrt, exp, cos, sin, tan, sec, csc, cot,cosh, sinh, tanh, coth, csch, csch, sech from sympy.functions.elementary.hyperbolic import (acosh, acsch, asinh, atanh) from sympy.functions.elementary.trigonometric import (acos, acsc, asin, atan) from sympy.integrals.rubi.utility_function import (EllipticE, EllipticF, Int, ArcCsch, ArcCsc, Gamma, Factorial, PolyGamma , LogGamma , Subst , hypergeom, rubi_test, AppellF1, EllipticPi, Log, Sqrt, ArcTan, ArcTanh, ArcSin, ArcSinh, ArcCosh, ArcTanh, ArcCos, Hypergeometric2F1,) from sympy.core.singleton import S from sympy.core import EulerGamma from sympy.core.numbers import (E, I, pi) from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import (exp, exp_polar) from sympy.functions.special.error_functions import (Chi, Ci, Ei, erf, erfi, expint, li, Shi, Si) from sympy.functions.special.hyper import HypergeometricPFQ as hyper from sympy.functions.special.zeta_functions import polylog from sympy.integrals.integrals import Integral from sympy.simplify.simplify import simplify from sympy.testing.pytest import SKIP a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j = symbols('a b c d e f m n x u k p r s t i j') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', ) def test_1(): assert rubi_test(rubi_integrate((e + f*x)**(p + S(-1))/log(d*(e + f*x)**p), x), x, li(d*(e + f*x)**p)/(d*f*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e*g + f*g*x)**(p + S(-1))/log(d*(e + f*x)**p), x), x, (e + f*x)**(-p + S(1))*(e*g + f*g*x)**(p + S(-1))*li(d*(e + f*x)**p)/(d*f*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**m, x), x, b*f*p*q*(g + h*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), f*(g + h*x)/(-e*h + f*g))/(h*(m + S(1))*(m + S(2))*(-e*h + f*g)) + (a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(m + S(1))/(h*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(4), x), x, -b*p*q*(g + h*x)**S(5)/(S(25)*h) - b*p*q*(g + h*x)**S(4)*(-e*h + f*g)/(S(20)*f*h) - b*p*q*(g + h*x)**S(3)*(-e*h + f*g)**S(2)/(S(15)*f**S(2)*h) - b*p*q*(g + h*x)**S(2)*(-e*h + f*g)**S(3)/(S(10)*f**S(3)*h) - b*p*q*x*(-e*h + f*g)**S(4)/(S(5)*f**S(4)) - b*p*q*(-e*h + f*g)**S(5)*log(e + f*x)/(S(5)*f**S(5)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(5)/(S(5)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(3), x), x, -b*p*q*(g + h*x)**S(4)/(S(16)*h) - b*p*q*(g + h*x)**S(3)*(-e*h + f*g)/(S(12)*f*h) - b*p*q*(g + h*x)**S(2)*(-e*h + f*g)**S(2)/(S(8)*f**S(2)*h) - b*p*q*x*(-e*h + f*g)**S(3)/(S(4)*f**S(3)) - b*p*q*(-e*h + f*g)**S(4)*log(e + f*x)/(S(4)*f**S(4)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(4)/(S(4)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(2), x), x, -b*p*q*(g + h*x)**S(3)/(S(9)*h) - b*p*q*(g + h*x)**S(2)*(-e*h + f*g)/(S(6)*f*h) - b*p*q*x*(-e*h + f*g)**S(2)/(S(3)*f**S(2)) - b*p*q*(-e*h + f*g)**S(3)*log(e + f*x)/(S(3)*f**S(3)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(3)/(S(3)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x), x), x, -b*p*q*(g + h*x)**S(2)/(S(4)*h) - b*p*q*x*(-e*h + f*g)/(S(2)*f) - b*p*q*(-e*h + f*g)**S(2)*log(e + f*x)/(S(2)*f**S(2)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(2)/(S(2)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a + b*log(c*(d*(e + f*x)**p)**q), x), x, a*x - b*p*q*x + b*(e + f*x)*log(c*(d*(e + f*x)**p)**q)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x), x), x, b*p*q*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h + (a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**S(2), x), x, b*f*p*q*log(e + f*x)/(h*(-e*h + f*g)) - b*f*p*q*log(g + h*x)/(h*(-e*h + f*g)) + (-a - b*log(c*(d*(e + f*x)**p)**q))/(h*(g + h*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**S(3), x), x, b*f**S(2)*p*q*log(e + f*x)/(S(2)*h*(-e*h + f*g)**S(2)) - b*f**S(2)*p*q*log(g + h*x)/(S(2)*h*(-e*h + f*g)**S(2)) + b*f*p*q/(S(2)*h*(g + h*x)*(-e*h + f*g)) + (-a/S(2) - b*log(c*(d*(e + f*x)**p)**q)/S(2))/(h*(g + h*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**S(4), x), x, b*f**S(3)*p*q*log(e + f*x)/(S(3)*h*(-e*h + f*g)**S(3)) - b*f**S(3)*p*q*log(g + h*x)/(S(3)*h*(-e*h + f*g)**S(3)) + b*f**S(2)*p*q/(S(3)*h*(g + h*x)*(-e*h + f*g)**S(2)) + b*f*p*q/(S(6)*h*(g + h*x)**S(2)*(-e*h + f*g)) + (-a/S(3) - b*log(c*(d*(e + f*x)**p)**q)/S(3))/(h*(g + h*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**S(5), x), x, b*f**S(4)*p*q*log(e + f*x)/(S(4)*h*(-e*h + f*g)**S(4)) - b*f**S(4)*p*q*log(g + h*x)/(S(4)*h*(-e*h + f*g)**S(4)) + b*f**S(3)*p*q/(S(4)*h*(g + h*x)*(-e*h + f*g)**S(3)) + b*f**S(2)*p*q/(S(8)*h*(g + h*x)**S(2)*(-e*h + f*g)**S(2)) + b*f*p*q/(S(12)*h*(g + h*x)**S(3)*(-e*h + f*g)) + (-a/S(4) - b*log(c*(d*(e + f*x)**p)**q)/S(4))/(h*(g + h*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**m, x), x, Integral((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**S(3), x), x, -a*b*p*q*x*(-e*h + f*g)**S(3)/(S(2)*f**S(3)) + b**S(2)*p**S(2)*q**S(2)*(g + h*x)**S(4)/(S(32)*h) + S(7)*b**S(2)*p**S(2)*q**S(2)*(g + h*x)**S(3)*(-e*h + f*g)/(S(72)*f*h) + S(13)*b**S(2)*p**S(2)*q**S(2)*(g + h*x)**S(2)*(-e*h + f*g)**S(2)/(S(48)*f**S(2)*h) + S(25)*b**S(2)*p**S(2)*q**S(2)*x*(-e*h + f*g)**S(3)/(S(24)*f**S(3)) - b**S(2)*p*q*(e + f*x)*(-e*h + f*g)**S(3)*log(c*(d*(e + f*x)**p)**q)/(S(2)*f**S(4)) + S(13)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**S(4)*log(e + f*x)/(S(24)*f**S(4)*h) - b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(4)/(S(8)*h) - b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(3)*(-e*h + f*g)/(S(6)*f*h) - b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(2)*(-e*h + f*g)**S(2)/(S(4)*f**S(2)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**S(4)/(S(4)*h) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-e*h + f*g)**S(4)/(S(4)*f**S(4)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**S(2), x), x, -S(2)*a*b*p*q*x*(-e*h + f*g)**S(2)/(S(3)*f**S(2)) + S(2)*b**S(2)*p**S(2)*q**S(2)*(g + h*x)**S(3)/(S(27)*h) + S(5)*b**S(2)*p**S(2)*q**S(2)*(g + h*x)**S(2)*(-e*h + f*g)/(S(18)*f*h) + S(11)*b**S(2)*p**S(2)*q**S(2)*x*(-e*h + f*g)**S(2)/(S(9)*f**S(2)) - S(2)*b**S(2)*p*q*(e + f*x)*(-e*h + f*g)**S(2)*log(c*(d*(e + f*x)**p)**q)/(S(3)*f**S(3)) + S(5)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**S(3)*log(e + f*x)/(S(9)*f**S(3)*h) - S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(3)/(S(9)*h) - b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(2)*(-e*h + f*g)/(S(3)*f*h) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**S(3)/(S(3)*h) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-e*h + f*g)**S(3)/(S(3)*f**S(3)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x), x), x, -S(2)*a*b*p*q*x*(-e*h + f*g)/f + b**S(2)*e*h*p**S(2)*q**S(2)*x/(S(2)*f) + b**S(2)*h*p**S(2)*q**S(2)*x**S(2)/S(4) + S(2)*b**S(2)*p**S(2)*q**S(2)*x*(-e*h + f*g)/f - S(2)*b**S(2)*p*q*(e + f*x)*(-e*h + f*g)*log(c*(d*(e + f*x)**p)**q)/f**S(2) - b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)/(S(2)*f**S(2)) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)/(S(2)*f**S(2)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*h + f*g)/f**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2), x), x, -S(2)*a*b*p*q*x + S(2)*b**S(2)*p**S(2)*q**S(2)*x - S(2)*b**S(2)*p*q*(e + f*x)*log(c*(d*(e + f*x)**p)**q)/f + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(g + h*x), x), x, -S(2)*b**S(2)*p**S(2)*q**S(2)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h + S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(g + h*x)**S(2), x), x, -S(2)*b**S(2)*f*p**S(2)*q**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)) - S(2)*b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(h*(-e*h + f*g)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/((g + h*x)*(-e*h + f*g)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(g + h*x)**S(3), x), x, -b**S(2)*f**S(2)*p**S(2)*q**S(2)*log(e + f*x)/(h*(-e*h + f*g)**S(2)) + b**S(2)*f**S(2)*p**S(2)*q**S(2)*log(g + h*x)/(h*(-e*h + f*g)**S(2)) - b**S(2)*f**S(2)*p**S(2)*q**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(2)) - b*f**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(2)) + b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))/(h*(g + h*x)*(-e*h + f*g)) + f**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(2)*h*(-e*h + f*g)**S(2)) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(2)*h*(g + h*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(g + h*x)**S(4), x), x, -b**S(2)*f**S(3)*p**S(2)*q**S(2)*log(e + f*x)/(h*(-e*h + f*g)**S(3)) + b**S(2)*f**S(3)*p**S(2)*q**S(2)*log(g + h*x)/(h*(-e*h + f*g)**S(3)) - S(2)*b**S(2)*f**S(3)*p**S(2)*q**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(S(3)*h*(-e*h + f*g)**S(3)) - b**S(2)*f**S(2)*p**S(2)*q**S(2)/(S(3)*h*(g + h*x)*(-e*h + f*g)**S(2)) - S(2)*b*f**S(3)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(S(3)*h*(-e*h + f*g)**S(3)) + S(2)*b*f**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))/(S(3)*h*(g + h*x)*(-e*h + f*g)**S(2)) + b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))/(S(3)*h*(g + h*x)**S(2)*(-e*h + f*g)) + f**S(3)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(3)*h*(-e*h + f*g)**S(3)) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(3)*h*(g + h*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x)**m, x), x, Integral((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x)**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x)**S(3), x), x, S(6)*a*b**S(2)*p**S(2)*q**S(2)*x*(-e*h + f*g)**S(3)/f**S(3) - S(9)*b**S(3)*e*h*p**S(3)*q**S(3)*x*(-e*h + f*g)**S(2)/(S(4)*f**S(3)) - S(9)*b**S(3)*h*p**S(3)*q**S(3)*x**S(2)*(-e*h + f*g)**S(2)/(S(8)*f**S(2)) - S(6)*b**S(3)*p**S(3)*q**S(3)*x*(-e*h + f*g)**S(3)/f**S(3) - S(3)*b**S(3)*h**S(3)*p**S(3)*q**S(3)*(e + f*x)**S(4)/(S(128)*f**S(4)) - S(2)*b**S(3)*h**S(2)*p**S(3)*q**S(3)*(e + f*x)**S(3)*(-e*h + f*g)/(S(9)*f**S(4)) + S(6)*b**S(3)*p**S(2)*q**S(2)*(e + f*x)*(-e*h + f*g)**S(3)*log(c*(d*(e + f*x)**p)**q)/f**S(4) + S(3)*b**S(2)*h**S(3)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(4)/(S(32)*f**S(4)) + S(2)*b**S(2)*h**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)*(-e*h + f*g)/(S(3)*f**S(4)) + S(9)*b**S(2)*h*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(4)*f**S(4)) - S(3)*b*h**S(3)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(4)/(S(16)*f**S(4)) - b*h**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(3)*(-e*h + f*g)/f**S(4) - S(9)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(4)*f**S(4)) - S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*h + f*g)**S(3)/f**S(4) + h**S(3)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(4)/(S(4)*f**S(4)) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(3)*(-e*h + f*g)/f**S(4) + S(3)*h*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(2)*f**S(4)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)*(-e*h + f*g)**S(3)/f**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x)**S(2), x), x, S(6)*a*b**S(2)*p**S(2)*q**S(2)*x*(-e*h + f*g)**S(2)/f**S(2) - S(3)*b**S(3)*e*h*p**S(3)*q**S(3)*x*(-e*h + f*g)/(S(2)*f**S(2)) - S(3)*b**S(3)*h*p**S(3)*q**S(3)*x**S(2)*(-e*h + f*g)/(S(4)*f) - S(6)*b**S(3)*p**S(3)*q**S(3)*x*(-e*h + f*g)**S(2)/f**S(2) - S(2)*b**S(3)*h**S(2)*p**S(3)*q**S(3)*(e + f*x)**S(3)/(S(27)*f**S(3)) + S(6)*b**S(3)*p**S(2)*q**S(2)*(e + f*x)*(-e*h + f*g)**S(2)*log(c*(d*(e + f*x)**p)**q)/f**S(3) + S(2)*b**S(2)*h**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)/(S(9)*f**S(3)) + S(3)*b**S(2)*h*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)/(S(2)*f**S(3)) - b*h**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(3)/(S(3)*f**S(3)) - S(3)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)*(-e*h + f*g)/(S(2)*f**S(3)) - S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*h + f*g)**S(2)/f**S(3) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(3)/(S(3)*f**S(3)) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(2)*(-e*h + f*g)/f**S(3) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)*(-e*h + f*g)**S(2)/f**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x), x), x, S(6)*a*b**S(2)*p**S(2)*q**S(2)*x*(-e*h + f*g)/f - S(3)*b**S(3)*e*h*p**S(3)*q**S(3)*x/(S(4)*f) - S(3)*b**S(3)*h*p**S(3)*q**S(3)*x**S(2)/S(8) - S(6)*b**S(3)*p**S(3)*q**S(3)*x*(-e*h + f*g)/f + S(6)*b**S(3)*p**S(2)*q**S(2)*(e + f*x)*(-e*h + f*g)*log(c*(d*(e + f*x)**p)**q)/f**S(2) + S(3)*b**S(2)*h*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)/(S(4)*f**S(2)) - S(3)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)/(S(4)*f**S(2)) - S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*h + f*g)/f**S(2) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(2)/(S(2)*f**S(2)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)*(-e*h + f*g)/f**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3), x), x, S(6)*a*b**S(2)*p**S(2)*q**S(2)*x - S(6)*b**S(3)*p**S(3)*q**S(3)*x + S(6)*b**S(3)*p**S(2)*q**S(2)*(e + f*x)*log(c*(d*(e + f*x)**p)**q)/f - S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/f + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(g + h*x), x), x, S(6)*b**S(3)*p**S(3)*q**S(3)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/h - S(6)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h + S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(g + h*x)/(-e*h + f*g))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(g + h*x)**S(2), x), x, S(6)*b**S(3)*f*p**S(3)*q**S(3)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)) - S(6)*b**S(2)*f*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)) - S(3)*b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/(h*(-e*h + f*g)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)/((g + h*x)*(-e*h + f*g)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(g + h*x)**S(3), x), x, S(3)*b**S(3)*f**S(2)*p**S(3)*q**S(3)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(2)) + S(3)*b**S(3)*f**S(2)*p**S(3)*q**S(3)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(2)) + S(3)*b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(2)) - S(3)*b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(2)) - S(3)*b*f**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/(S(2)*h*(-e*h + f*g)**S(2)) - S(3)*b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/(S(2)*(g + h*x)*(-e*h + f*g)**S(2)) + f**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(S(2)*h*(-e*h + f*g)**S(2)) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(S(2)*h*(g + h*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(g + h*x)**S(4), x), x, b**S(3)*f**S(3)*p**S(3)*q**S(3)*log(e + f*x)/(h*(-e*h + f*g)**S(3)) - b**S(3)*f**S(3)*p**S(3)*q**S(3)*log(g + h*x)/(h*(-e*h + f*g)**S(3)) + S(3)*b**S(3)*f**S(3)*p**S(3)*q**S(3)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(3)) + S(2)*b**S(3)*f**S(3)*p**S(3)*q**S(3)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(3)) + S(3)*b**S(2)*f**S(3)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(3)) - S(2)*b**S(2)*f**S(3)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(3)) - b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))/(h*(g + h*x)*(-e*h + f*g)**S(2)) - b*f**S(3)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/(h*(-e*h + f*g)**S(3)) - b*f**S(3)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(2)*h*(-e*h + f*g)**S(3)) - b*f**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/((g + h*x)*(-e*h + f*g)**S(3)) + b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(2)*h*(g + h*x)**S(2)*(-e*h + f*g)) + f**S(3)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(S(3)*h*(-e*h + f*g)**S(3)) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(S(3)*h*(g + h*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(g + h*x)**S(5), x), x, S(3)*b**S(3)*f**S(4)*p**S(3)*q**S(3)*log(e + f*x)/(S(2)*h*(-e*h + f*g)**S(4)) - S(3)*b**S(3)*f**S(4)*p**S(3)*q**S(3)*log(g + h*x)/(S(2)*h*(-e*h + f*g)**S(4)) + S(11)*b**S(3)*f**S(4)*p**S(3)*q**S(3)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(S(4)*h*(-e*h + f*g)**S(4)) + S(3)*b**S(3)*f**S(4)*p**S(3)*q**S(3)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(S(2)*h*(-e*h + f*g)**S(4)) + b**S(3)*f**S(3)*p**S(3)*q**S(3)/(S(4)*h*(g + h*x)*(-e*h + f*g)**S(3)) + S(11)*b**S(2)*f**S(4)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(S(4)*h*(-e*h + f*g)**S(4)) - S(3)*b**S(2)*f**S(4)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(S(2)*h*(-e*h + f*g)**S(4)) - S(5)*b**S(2)*f**S(3)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))/(S(4)*h*(g + h*x)*(-e*h + f*g)**S(3)) - b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))/(S(4)*h*(g + h*x)**S(2)*(-e*h + f*g)**S(2)) - S(3)*b*f**S(4)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/(S(4)*h*(-e*h + f*g)**S(4)) - S(5)*b*f**S(4)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(8)*h*(-e*h + f*g)**S(4)) - S(3)*b*f**S(3)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/(S(4)*(g + h*x)*(-e*h + f*g)**S(4)) + S(3)*b*f**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(8)*h*(g + h*x)**S(2)*(-e*h + f*g)**S(2)) + b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(4)*h*(g + h*x)**S(3)*(-e*h + f*g)) + f**S(4)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(S(4)*h*(-e*h + f*g)**S(4)) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(S(4)*h*(g + h*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(4), x), x, -S(24)*a*b**S(3)*p**S(3)*q**S(3)*x + S(24)*b**S(4)*p**S(4)*q**S(4)*x - S(24)*b**S(4)*p**S(3)*q**S(3)*(e + f*x)*log(c*(d*(e + f*x)**p)**q)/f + S(12)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/f - S(4)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)/f + (a + b*log(c*(d*(e + f*x)**p)**q))**S(4)*(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(4)/(g + h*x), x), x, -S(24)*b**S(4)*p**S(4)*q**S(4)*polylog(S(5), -h*(e + f*x)/(-e*h + f*g))/h + S(24)*b**S(3)*p**S(3)*q**S(3)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/h - S(12)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h + S(4)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h + (a + b*log(c*(d*(e + f*x)**p)**q))**S(4)*log(f*(g + h*x)/(-e*h + f*g))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(4)/(g + h*x)**S(2), x), x, -S(24)*b**S(4)*f*p**S(4)*q**S(4)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)) + S(24)*b**S(3)*f*p**S(3)*q**S(3)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)) - S(12)*b**S(2)*f*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(h*(-e*h + f*g)) - S(4)*b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(g + h*x)/(-e*h + f*g))/(h*(-e*h + f*g)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(4)*(e + f*x)/((g + h*x)*(-e*h + f*g)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x), x), x, -x + (a + b*x)*log(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x)**S(2), x), x, S(2)*x + (a + b*x)*log(a + b*x)**S(2)/b - (S(2)*a + S(2)*b*x)*log(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x)**S(3), x), x, -S(6)*x + (a + b*x)*log(a + b*x)**S(3)/b - (S(3)*a + S(3)*b*x)*log(a + b*x)**S(2)/b + (S(6)*a + S(6)*b*x)*log(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x + c*x), x), x, -x + (a + x*(b + c))*log(a + x*(b + c))/(b + c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x + c*x)**S(2), x), x, S(2)*x + (a + x*(b + c))*log(a + x*(b + c))**S(2)/(b + c) - (S(2)*a + S(2)*x*(b + c))*log(a + x*(b + c))/(b + c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x + c*x)**S(3), x), x, -S(6)*x + (a + x*(b + c))*log(a + x*(b + c))**S(3)/(b + c) - (S(3)*a + S(3)*x*(b + c))*log(a + x*(b + c))**S(2)/(b + c) + (S(6)*a + S(6)*x*(b + c))*log(a + x*(b + c))/(b + c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(-g*(d + e*x)/(-d*g + e*f))/(f + g*x), x), x, -polylog(S(2), e*(f + g*x)/(-d*g + e*f))/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(b*x + S(1))/x, x), x, -polylog(S(2), -b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x)**n)**S(2), x), x, -S(5)*a**S(3)*n**S(2)*log(a + b*x)/(S(9)*b**S(3)) + a**S(3)*log(c*(a + b*x)**n)**S(2)/(S(3)*b**S(3)) + S(11)*a**S(2)*n**S(2)*x/(S(9)*b**S(2)) - S(2)*a**S(2)*n*(a + b*x)*log(c*(a + b*x)**n)/(S(3)*b**S(3)) - S(5)*a*n**S(2)*x**S(2)/(S(18)*b) + a*n*x**S(2)*log(c*(a + b*x)**n)/(S(3)*b) + S(2)*n**S(2)*x**S(3)/S(27) - S(2)*n*x**S(3)*log(c*(a + b*x)**n)/S(9) + x**S(3)*log(c*(a + b*x)**n)**S(2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)**S(2)/x**S(4), x), x, -log(c*(a + b*x)**n)**S(2)/(S(3)*x**S(3)) - b*n*log(c*(a + b*x)**n)/(S(3)*a*x**S(2)) - b**S(2)*n**S(2)/(S(3)*a**S(2)*x) + S(2)*b**S(2)*n*log(c*(a + b*x)**n)/(S(3)*a**S(2)*x) - b**S(3)*n**S(2)*log(x)/a**S(3) + b**S(3)*n**S(2)*log(a + b*x)/a**S(3) + S(2)*b**S(3)*n**S(2)*polylog(S(2), (a + b*x)/a)/(S(3)*a**S(3)) + S(2)*b**S(3)*n*log(c*(a + b*x)**n)*log(-b*x/a)/(S(3)*a**S(3)) - b**S(3)*log(c*(a + b*x)**n)**S(2)/(S(3)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x)**n)**S(3), x), x, S(19)*a**S(3)*n**S(3)*log(a + b*x)/(S(18)*b**S(3)) - S(5)*a**S(3)*n*log(c*(a + b*x)**n)**S(2)/(S(6)*b**S(3)) + a**S(3)*log(c*(a + b*x)**n)**S(3)/(S(3)*b**S(3)) - S(85)*a**S(2)*n**S(3)*x/(S(18)*b**S(2)) + S(11)*a**S(2)*n**S(2)*(a + b*x)*log(c*(a + b*x)**n)/(S(3)*b**S(3)) - a**S(2)*n*(a + b*x)*log(c*(a + b*x)**n)**S(2)/b**S(3) + S(19)*a*n**S(3)*x**S(2)/(S(36)*b) - S(5)*a*n**S(2)*x**S(2)*log(c*(a + b*x)**n)/(S(6)*b) + a*n*x**S(2)*log(c*(a + b*x)**n)**S(2)/(S(2)*b) - S(2)*n**S(3)*x**S(3)/S(27) + S(2)*n**S(2)*x**S(3)*log(c*(a + b*x)**n)/S(9) - n*x**S(3)*log(c*(a + b*x)**n)**S(2)/S(3) + x**S(3)*log(c*(a + b*x)**n)**S(3)/S(3), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x)**n)**S(3), x), x, -S(9)*a**S(2)*n**S(3)*x/(S(2)*b**S(2)) + S(6)*a**S(2)*n**S(2)*(a + b*x)*log(c*(a + b*x)**n)/b**S(3) - S(3)*a**S(2)*n*(a + b*x)*log(c*(a + b*x)**n)**S(2)/b**S(3) + a**S(2)*(a + b*x)*log(c*(a + b*x)**n)**S(3)/b**S(3) + S(3)*a*n**S(3)*x**S(2)/(S(4)*b) - S(3)*a*n**S(2)*(a + b*x)**S(2)*log(c*(a + b*x)**n)/(S(2)*b**S(3)) + S(3)*a*n*(a + b*x)**S(2)*log(c*(a + b*x)**n)**S(2)/(S(2)*b**S(3)) - a*(a + b*x)**S(2)*log(c*(a + b*x)**n)**S(3)/b**S(3) - S(2)*n**S(3)*(a + b*x)**S(3)/(S(27)*b**S(3)) + S(2)*n**S(2)*(a + b*x)**S(3)*log(c*(a + b*x)**n)/(S(9)*b**S(3)) - n*(a + b*x)**S(3)*log(c*(a + b*x)**n)**S(2)/(S(3)*b**S(3)) + (a + b*x)**S(3)*log(c*(a + b*x)**n)**S(3)/(S(3)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, Integral((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(3)/(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, h**S(3)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*Ei((S(4)*a + S(4)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(4)*p*q) + S(3)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*Ei((S(3)*a + S(3)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(4)*p*q) + S(3)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(4)*p*q) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(4)*p*q), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(2)/(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*Ei((S(3)*a + S(3)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(3)*p*q) + S(2)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(3)*p*q) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(3)*p*q), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)/(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(2)*p*q) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f**S(2)*p*q), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b*f*p*q), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(2)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q))**S(2), x), x, Integral((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q))**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(3)/(a + b*log(c*(d*(e + f*x)**p)**q))**S(2), x), x, -(e + f*x)*(g + h*x)**S(3)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))) + S(4)*h**S(3)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*Ei((S(4)*a + S(4)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(4)*p**S(2)*q**S(2)) + S(9)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*Ei((S(3)*a + S(3)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(4)*p**S(2)*q**S(2)) + S(6)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(4)*p**S(2)*q**S(2)) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(4)*p**S(2)*q**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(2)/(a + b*log(c*(d*(e + f*x)**p)**q))**S(2), x), x, -(e + f*x)*(g + h*x)**S(2)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))) + S(3)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*Ei((S(3)*a + S(3)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(3)*p**S(2)*q**S(2)) + S(4)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(3)*p**S(2)*q**S(2)) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(3)*p**S(2)*q**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)/(a + b*log(c*(d*(e + f*x)**p)**q))**S(2), x), x, -(e + f*x)*(g + h*x)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))) + S(2)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(2)*p**S(2)*q**S(2)) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f**S(2)*p**S(2)*q**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(-2)), x), x, (-e - f*x)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(2)*f*p**S(2)*q**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**S(2)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q))**S(3), x), x, Integral((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q))**S(3), x), expand=True, _diff=True, _numerical=True) # long time in rubi_test assert rubi_test(rubi_integrate((g + h*x)**S(3)/(a + b*log(c*(d*(e + f*x)**p)**q))**S(3), x), x, -(e/S(2) + f*x/S(2))*(g + h*x)**S(3)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)) - (S(2)*e + S(2)*f*x)*(g + h*x)**S(3)/(b**S(2)*f*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))) + (e + f*x)*(g + h*x)**S(2)*(-S(3)*e*h/S(2) + S(3)*f*g/S(2))/(b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))) + S(8)*h**S(3)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*Ei((S(4)*a + S(4)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(3)*f**S(4)*p**S(3)*q**S(3)) + S(27)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*Ei((S(3)*a + S(3)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(S(2)*b**S(3)*f**S(4)*p**S(3)*q**S(3)) + S(6)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(3)*f**S(4)*p**S(3)*q**S(3)) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(S(2)*b**S(3)*f**S(4)*p**S(3)*q**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(2)/(a + b*log(c*(d*(e + f*x)**p)**q))**S(3), x), x, -(e/S(2) + f*x/S(2))*(g + h*x)**S(2)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)) - (S(3)*e/S(2) + S(3)*f*x/S(2))*(g + h*x)**S(2)/(b**S(2)*f*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))) + (e + f*x)*(g + h*x)*(-e*h + f*g)/(b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))) + S(9)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*Ei((S(3)*a + S(3)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(S(2)*b**S(3)*f**S(3)*p**S(3)*q**S(3)) + S(4)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(3)*f**S(3)*p**S(3)*q**S(3)) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(S(2)*b**S(3)*f**S(3)*p**S(3)*q**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)/(a + b*log(c*(d*(e + f*x)**p)**q))**S(3), x), x, -(e/S(2) + f*x/S(2))*(g + h*x)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)) - (e + f*x)*(g + h*x)/(b**S(2)*f*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))) + (e + f*x)*(-e*h/S(2) + f*g/S(2))/(b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))) + S(2)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*Ei((S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(3)*f**S(2)*p**S(3)*q**S(3)) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h/S(2) + f*g/S(2))*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(3)*f**S(2)*p**S(3)*q**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(-3)), x), x, (-e/S(2) - f*x/S(2))/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)) + (-e/S(2) - f*x/S(2))/(b**S(2)*f*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e/S(2) + f*x/S(2))*exp(-a/(b*p*q))*Ei((a + b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))/(b**S(3)*f*p**S(3)*q**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x)**S(2)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(g + h*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**m, x), x, Integral(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(4), x), x, -sqrt(S(5))*sqrt(pi)*sqrt(b)*h**S(4)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(5)/(p*q))*(e + f*x)**S(5)*exp(-S(5)*a/(b*p*q))*erfi(sqrt(S(5))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(50)*f**S(5)) - sqrt(pi)*sqrt(b)*h**S(3)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*(-e*h + f*g)*exp(-S(4)*a/(b*p*q))*erfi(S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(4)*f**S(5)) - sqrt(S(3))*sqrt(pi)*sqrt(b)*h**S(2)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)**S(2)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(3)*f**S(5)) - sqrt(S(2))*sqrt(pi)*sqrt(b)*h*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(3)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(2)*f**S(5)) - sqrt(pi)*sqrt(b)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(4)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(2)*f**S(5)) + h**S(4)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(5)/(S(5)*f**S(5)) + h**S(3)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(4)*(-e*h + f*g)/f**S(5) + S(2)*h**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)*(-e*h + f*g)**S(2)/f**S(5) + S(2)*h*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)**S(3)/f**S(5) + sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)**S(4)/f**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(3), x), x, -sqrt(pi)*sqrt(b)*h**S(3)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*erfi(S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(16)*f**S(4)) - sqrt(S(3))*sqrt(pi)*sqrt(b)*h**S(2)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(6)*f**S(4)) - S(3)*sqrt(S(2))*sqrt(pi)*sqrt(b)*h*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(8)*f**S(4)) - sqrt(pi)*sqrt(b)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(2)*f**S(4)) + h**S(3)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(4)/(S(4)*f**S(4)) + h**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)*(-e*h + f*g)/f**S(4) + S(3)*h*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(2)*f**S(4)) + sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)**S(3)/f**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**S(2), x), x, -sqrt(S(3))*sqrt(pi)*sqrt(b)*h**S(2)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(18)*f**S(3)) - sqrt(S(2))*sqrt(pi)*sqrt(b)*h*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(4)*f**S(3)) - sqrt(pi)*sqrt(b)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(2)*f**S(3)) + h**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)/(S(3)*f**S(3)) + h*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)/f**S(3) + sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)**S(2)/f**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x), x), x, -sqrt(S(2))*sqrt(pi)*sqrt(b)*h*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(8)*f**S(2)) - sqrt(pi)*sqrt(b)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h/S(2) + f*g/S(2))*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/f**S(2) + h*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)/(S(2)*f**S(2)) + sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)/f**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, sqrt(pi)*sqrt(b)*sqrt(p)*sqrt(q)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(-e/S(2) - f*x/S(2))*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/f + sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x), x), x, Integral(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**S(2), x), x, -b*f*p*q*Integral(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x)/(S(2)*(-e*h + f*g)) + sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)/((g + h*x)*(-e*h + f*g)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**S(3), x), x, b*f*p*q*Integral(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(g + h*x)**S(2)), x)/(S(4)*h) - sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(S(2)*h*(g + h*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**S(4), x), x, b*f*p*q*Integral(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(g + h*x)**S(3)), x)/(S(6)*h) - sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(S(3)*h*(g + h*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**S(5), x), x, b*f*p*q*Integral(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(g + h*x)**S(4)), x)/(S(8)*h) - sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(S(4)*h*(g + h*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(g + h*x)**m, x), x, Integral((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(g + h*x)**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(g + h*x)**S(3), x), x, S(3)*sqrt(pi)*b**(S(3)/2)*h**S(3)*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*erfi(S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(128)*f**S(4)) + sqrt(S(3))*sqrt(pi)*b**(S(3)/2)*h**S(2)*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(12)*f**S(4)) + S(9)*sqrt(S(2))*sqrt(pi)*b**(S(3)/2)*h*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(32)*f**S(4)) + S(3)*sqrt(pi)*b**(S(3)/2)*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(4)*f**S(4)) - S(3)*b*h**S(3)*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(4)/(S(32)*f**S(4)) - b*h**S(2)*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)*(-e*h + f*g)/(S(2)*f**S(4)) - S(9)*b*h*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(8)*f**S(4)) - S(3)*b*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)**S(3)/(S(2)*f**S(4)) + h**S(3)*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(4)/(S(4)*f**S(4)) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(3)*(-e*h + f*g)/f**S(4) + S(3)*h*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(2)*f**S(4)) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)*(-e*h + f*g)**S(3)/f**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(g + h*x)**S(2), x), x, sqrt(S(3))*sqrt(pi)*b**(S(3)/2)*h**S(2)*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(36)*f**S(3)) + S(3)*sqrt(S(2))*sqrt(pi)*b**(S(3)/2)*h*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(16)*f**S(3)) + S(3)*sqrt(pi)*b**(S(3)/2)*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(4)*f**S(3)) - b*h**S(2)*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)/(S(6)*f**S(3)) - S(3)*b*h*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)/(S(4)*f**S(3)) - S(3)*b*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)**S(2)/(S(2)*f**S(3)) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(3)/(S(3)*f**S(3)) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(2)*(-e*h + f*g)/f**S(3) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)*(-e*h + f*g)**S(2)/f**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(g + h*x), x), x, S(3)*sqrt(S(2))*sqrt(pi)*b**(S(3)/2)*h*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(32)*f**S(2)) + S(3)*sqrt(pi)*b**(S(3)/2)*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(4)*f**S(2)) - S(3)*b*h*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)/(S(8)*f**S(2)) - S(3)*b*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)/(S(2)*f**S(2)) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(2)/(S(2)*f**S(2)) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)*(-e*h + f*g)/f**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2), x), x, S(3)*sqrt(pi)*b**(S(3)/2)*p**(S(3)/2)*q**(S(3)/2)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(4)*f) - S(3)*b*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)/(S(2)*f) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/(g + h*x), x), x, Integral((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/(g + h*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/(g + h*x)**S(2), x), x, -S(3)*b*f*p*q*Integral(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x), x)/(S(2)*(-e*h + f*g)) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)/((g + h*x)*(-e*h + f*g)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/(g + h*x)**S(3), x), x, S(3)*b*f*p*q*Integral(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/((e + f*x)*(g + h*x)**S(2)), x)/(S(4)*h) - (a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/(S(2)*h*(g + h*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/(g + h*x)**S(4), x), x, b*f*p*q*Integral(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/((e + f*x)*(g + h*x)**S(3)), x)/(S(2)*h) - (a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/(S(3)*h*(g + h*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(g + h*x)**m, x), x, Integral((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(g + h*x)**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(g + h*x)**S(3), x), x, -S(15)*sqrt(pi)*b**(S(5)/2)*h**S(3)*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*erfi(S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(1024)*f**S(4)) - S(5)*sqrt(S(3))*sqrt(pi)*b**(S(5)/2)*h**S(2)*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(72)*f**S(4)) - S(45)*sqrt(S(2))*sqrt(pi)*b**(S(5)/2)*h*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(128)*f**S(4)) - S(15)*sqrt(pi)*b**(S(5)/2)*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(8)*f**S(4)) + S(15)*b**S(2)*h**S(3)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(4)/(S(256)*f**S(4)) + S(5)*b**S(2)*h**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)*(-e*h + f*g)/(S(12)*f**S(4)) + S(45)*b**S(2)*h*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(32)*f**S(4)) + S(15)*b**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)**S(3)/(S(4)*f**S(4)) - S(5)*b*h**S(3)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(4)/(S(32)*f**S(4)) - S(5)*b*h**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(3)*(-e*h + f*g)/(S(6)*f**S(4)) - S(15)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(8)*f**S(4)) - S(5)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)*(-e*h + f*g)**S(3)/(S(2)*f**S(4)) + h**S(3)*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)**S(4)/(S(4)*f**S(4)) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)**S(3)*(-e*h + f*g)/f**S(4) + S(3)*h*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)**S(2)*(-e*h + f*g)**S(2)/(S(2)*f**S(4)) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)*(-e*h + f*g)**S(3)/f**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(g + h*x)**S(2), x), x, -S(5)*sqrt(S(3))*sqrt(pi)*b**(S(5)/2)*h**S(2)*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(216)*f**S(3)) - S(15)*sqrt(S(2))*sqrt(pi)*b**(S(5)/2)*h*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(64)*f**S(3)) - S(15)*sqrt(pi)*b**(S(5)/2)*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(8)*f**S(3)) + S(5)*b**S(2)*h**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)/(S(36)*f**S(3)) + S(15)*b**S(2)*h*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*h + f*g)/(S(16)*f**S(3)) + S(15)*b**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)**S(2)/(S(4)*f**S(3)) - S(5)*b*h**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(3)/(S(18)*f**S(3)) - S(5)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(2)*(-e*h + f*g)/(S(4)*f**S(3)) - S(5)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)*(-e*h + f*g)**S(2)/(S(2)*f**S(3)) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)**S(3)/(S(3)*f**S(3)) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)**S(2)*(-e*h + f*g)/f**S(3) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)*(-e*h + f*g)**S(2)/f**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(g + h*x), x), x, -S(15)*sqrt(S(2))*sqrt(pi)*b**(S(5)/2)*h*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(128)*f**S(2)) - S(15)*sqrt(pi)*b**(S(5)/2)*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(8)*f**S(2)) + S(15)*b**S(2)*h*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)/(S(32)*f**S(2)) + S(15)*b**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*(-e*h + f*g)/(S(4)*f**S(2)) - S(5)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)**S(2)/(S(8)*f**S(2)) - S(5)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)*(-e*h + f*g)/(S(2)*f**S(2)) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)**S(2)/(S(2)*f**S(2)) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)*(-e*h + f*g)/f**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2), x), x, -S(15)*sqrt(pi)*b**(S(5)/2)*p**(S(5)/2)*q**(S(5)/2)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(8)*f) + S(15)*b**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)/(S(4)*f) - S(5)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(e + f*x)/(S(2)*f) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(g + h*x), x), x, Integral((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(g + h*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(g + h*x)**S(2), x), x, -S(5)*b*f*p*q*Integral((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/(g + h*x), x)/(S(2)*(-e*h + f*g)) + (a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(e + f*x)/((g + h*x)*(-e*h + f*g)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(g + h*x)**S(3), x), x, S(5)*b*f*p*q*Integral((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/((e + f*x)*(g + h*x)**S(2)), x)/(S(4)*h) - (a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(S(2)*h*(g + h*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(g + h*x)**S(4), x), x, S(5)*b*f*p*q*Integral((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/((e + f*x)*(g + h*x)**S(3)), x)/(S(6)*h) - (a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(S(3)*h*(g + h*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(g + h*x)**S(5), x), x, S(5)*b*f*p*q*Integral((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)/((e + f*x)*(g + h*x)**S(4)), x)/(S(8)*h) - (a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)/(S(4)*h*(g + h*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**m/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, Integral((g + h*x)**m/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(3)/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, sqrt(pi)*h**S(3)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*erfi(S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(2)*sqrt(b)*f**S(4)*sqrt(p)*sqrt(q)) + sqrt(S(3))*sqrt(pi)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(sqrt(b)*f**S(4)*sqrt(p)*sqrt(q)) + S(3)*sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(2)*sqrt(b)*f**S(4)*sqrt(p)*sqrt(q)) + sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(sqrt(b)*f**S(4)*sqrt(p)*sqrt(q)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(2)/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, sqrt(S(3))*sqrt(pi)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(3)*sqrt(b)*f**S(3)*sqrt(p)*sqrt(q)) + sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(sqrt(b)*f**S(3)*sqrt(p)*sqrt(q)) + sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(sqrt(b)*f**S(3)*sqrt(p)*sqrt(q)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(2)*sqrt(b)*f**S(2)*sqrt(p)*sqrt(q)) + sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(sqrt(b)*f**S(2)*sqrt(p)*sqrt(q)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(sqrt(b)*f*sqrt(p)*sqrt(q)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x), x, Integral(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2), x), x, Integral((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(3)/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2), x), x, -(S(2)*e + S(2)*f*x)*(g + h*x)**S(3)/(b*f*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + S(4)*sqrt(pi)*h**S(3)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*erfi(S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(4)*p**(S(3)/2)*q**(S(3)/2)) + S(6)*sqrt(S(3))*sqrt(pi)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(4)*p**(S(3)/2)*q**(S(3)/2)) + S(6)*sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(4)*p**(S(3)/2)*q**(S(3)/2)) + S(2)*sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(4)*p**(S(3)/2)*q**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(2)/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2), x), x, -(S(2)*e + S(2)*f*x)*(g + h*x)**S(2)/(b*f*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + S(2)*sqrt(S(3))*sqrt(pi)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(3)*p**(S(3)/2)*q**(S(3)/2)) + S(4)*sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(3)*p**(S(3)/2)*q**(S(3)/2)) + S(2)*sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(3)*p**(S(3)/2)*q**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2), x), x, -(S(2)*e + S(2)*f*x)*(g + h*x)/(b*f*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + S(2)*sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(2)*p**(S(3)/2)*q**(S(3)/2)) + sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-S(2)*e*h + S(2)*f*g)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f**S(2)*p**(S(3)/2)*q**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(-3)/2), x), x, -(S(2)*e + S(2)*f*x)/(b*f*p*q*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(S(2)*e + S(2)*f*x)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(3)/2)*f*p**(S(3)/2)*q**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(g + h*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2), x), x, Integral((g + h*x)**m/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2), x), expand=True, _diff=True, _numerical=True) ''' long time in rubi test assert rubi_test(rubi_integrate((g + h*x)**S(3)/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2), x), x, (-S(2)*e/S(3) - S(2)*f*x/S(3))*(g + h*x)**S(3)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)) - (S(16)*e/S(3) + S(16)*f*x/S(3))*(g + h*x)**S(3)/(b**S(2)*f*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + (e + f*x)*(g + h*x)**S(2)*(-S(4)*e*h + S(4)*f*g)/(b**S(2)*f**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + S(32)*sqrt(pi)*h**S(3)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*(e + f*x)**S(4)*exp(-S(4)*a/(b*p*q))*erfi(S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(3)*b**(S(5)/2)*f**S(4)*p**(S(5)/2)*q**(S(5)/2)) + S(12)*sqrt(S(3))*sqrt(pi)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*(-e*h + f*g)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(5)/2)*f**S(4)*p**(S(5)/2)*q**(S(5)/2)) + S(8)*sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(5)/2)*f**S(4)*p**(S(5)/2)*q**(S(5)/2)) + S(4)*sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(3)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(3)*b**(S(5)/2)*f**S(4)*p**(S(5)/2)*q**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)**S(2)/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2), x), x, (-S(2)*e/S(3) - S(2)*f*x/S(3))*(g + h*x)**S(2)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)) - (S(4)*e + S(4)*f*x)*(g + h*x)**S(2)/(b**S(2)*f*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + (e + f*x)*(g + h*x)*(-S(8)*e*h/S(3) + S(8)*f*g/S(3))/(b**S(2)*f**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + S(4)*sqrt(S(3))*sqrt(pi)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*(e + f*x)**S(3)*exp(-S(3)*a/(b*p*q))*erfi(sqrt(S(3))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(5)/2)*f**S(3)*p**(S(5)/2)*q**(S(5)/2)) + S(16)*sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*(-e*h + f*g)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(3)*b**(S(5)/2)*f**S(3)*p**(S(5)/2)*q**(S(5)/2)) + S(4)*sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-e*h + f*g)**S(2)*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(3)*b**(S(5)/2)*f**S(3)*p**(S(5)/2)*q**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g + h*x)/(a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2), x), x, (-S(2)*e/S(3) - S(2)*f*x/S(3))*(g + h*x)/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)) - (S(8)*e/S(3) + S(8)*f*x/S(3))*(g + h*x)/(b**S(2)*f*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + (e + f*x)*(-S(4)*e*h/S(3) + S(4)*f*g/S(3))/(b**S(2)*f**S(2)*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + S(8)*sqrt(S(2))*sqrt(pi)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*(e + f*x)**S(2)*exp(-S(2)*a/(b*p*q))*erfi(sqrt(S(2))*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(S(3)*b**(S(5)/2)*f**S(2)*p**(S(5)/2)*q**(S(5)/2)) + sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(e + f*x)*(-S(4)*e*h/S(3) + S(4)*f*g/S(3))*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(5)/2)*f**S(2)*p**(S(5)/2)*q**(S(5)/2)), expand=True, _diff=True, _numerical=True) ''' assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**(S(-5)/2), x), x, (-S(2)*e/S(3) - S(2)*f*x/S(3))/(b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**(S(3)/2)) - (S(4)*e/S(3) + S(4)*f*x/S(3))/(b**S(2)*f*p**S(2)*q**S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))) + sqrt(pi)*(c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*(S(4)*e/S(3) + S(4)*f*x/S(3))*exp(-a/(b*p*q))*erfi(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(b)*sqrt(p)*sqrt(q)))/(b**(S(5)/2)*f*p**(S(5)/2)*q**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(g + h*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**(S(5)/2)*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(3)/2), x), x, -S(4)*b*p*q*(g + h*x)**(S(5)/2)/(S(25)*h) - S(4)*b*p*q*(g + h*x)**(S(3)/2)*(-e*h + f*g)/(S(15)*f*h) - S(4)*b*p*q*sqrt(g + h*x)*(-e*h + f*g)**S(2)/(S(5)*f**S(2)*h) + S(4)*b*p*q*(-e*h + f*g)**(S(5)/2)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(5)*f**(S(5)/2)*h) + S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(5)/2)/(S(5)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*sqrt(g + h*x), x), x, -S(4)*b*p*q*(g + h*x)**(S(3)/2)/(S(9)*h) - S(4)*b*p*q*sqrt(g + h*x)*(-e*h + f*g)/(S(3)*f*h) + S(4)*b*p*q*(-e*h + f*g)**(S(3)/2)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(3)*f**(S(3)/2)*h) + S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(3)/2)/(S(3)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/sqrt(g + h*x), x), x, -S(4)*b*p*q*sqrt(g + h*x)/h + S(4)*b*p*q*sqrt(-e*h + f*g)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(sqrt(f)*h) + (S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))*sqrt(g + h*x)/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**(S(3)/2), x), x, -S(4)*b*sqrt(f)*p*q*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(h*sqrt(-e*h + f*g)) - (S(2)*a + S(2)*b*log(c*(d*(e + f*x)**p)**q))/(h*sqrt(g + h*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**(S(5)/2), x), x, -S(4)*b*f**(S(3)/2)*p*q*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(3)*h*(-e*h + f*g)**(S(3)/2)) + S(4)*b*f*p*q/(S(3)*h*sqrt(g + h*x)*(-e*h + f*g)) - (S(2)*a/S(3) + S(2)*b*log(c*(d*(e + f*x)**p)**q)/S(3))/(h*(g + h*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**(S(7)/2), x), x, -S(4)*b*f**(S(5)/2)*p*q*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(5)*h*(-e*h + f*g)**(S(5)/2)) + S(4)*b*f**S(2)*p*q/(S(5)*h*sqrt(g + h*x)*(-e*h + f*g)**S(2)) + S(4)*b*f*p*q/(S(15)*h*(g + h*x)**(S(3)/2)*(-e*h + f*g)) - (S(2)*a/S(5) + S(2)*b*log(c*(d*(e + f*x)**p)**q)/S(5))/(h*(g + h*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**(S(9)/2), x), x, -S(4)*b*f**(S(7)/2)*p*q*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(7)*h*(-e*h + f*g)**(S(7)/2)) + S(4)*b*f**S(3)*p*q/(S(7)*h*sqrt(g + h*x)*(-e*h + f*g)**S(3)) + S(4)*b*f**S(2)*p*q/(S(21)*h*(g + h*x)**(S(3)/2)*(-e*h + f*g)**S(2)) + S(4)*b*f*p*q/(S(35)*h*(g + h*x)**(S(5)/2)*(-e*h + f*g)) - (S(2)*a/S(7) + S(2)*b*log(c*(d*(e + f*x)**p)**q)/S(7))/(h*(g + h*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**(S(3)/2), x), x, S(16)*b**S(2)*p**S(2)*q**S(2)*(g + h*x)**(S(5)/2)/(S(125)*h) + S(128)*b**S(2)*p**S(2)*q**S(2)*(g + h*x)**(S(3)/2)*(-e*h + f*g)/(S(225)*f*h) + S(368)*b**S(2)*p**S(2)*q**S(2)*sqrt(g + h*x)*(-e*h + f*g)**S(2)/(S(75)*f**S(2)*h) + S(16)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**(S(5)/2)*log(S(2)/(-sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g) + S(1)))*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(5)*f**(S(5)/2)*h) - S(8)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**(S(5)/2)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))**S(2)/(S(5)*f**(S(5)/2)*h) - S(368)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**(S(5)/2)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(75)*f**(S(5)/2)*h) + S(8)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**(S(5)/2)*polylog(S(2), (-sqrt(f)*sqrt(g + h*x) - sqrt(-e*h + f*g))/(-sqrt(f)*sqrt(g + h*x) + sqrt(-e*h + f*g)))/(S(5)*f**(S(5)/2)*h) - S(8)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(5)/2)/(S(25)*h) - S(8)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(3)/2)*(-e*h + f*g)/(S(15)*f*h) - S(8)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*sqrt(g + h*x)*(-e*h + f*g)**S(2)/(S(5)*f**S(2)*h) + S(8)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(-e*h + f*g)**(S(5)/2)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(5)*f**(S(5)/2)*h) + S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**(S(5)/2)/(S(5)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*sqrt(g + h*x), x), x, S(16)*b**S(2)*p**S(2)*q**S(2)*(g + h*x)**(S(3)/2)/(S(27)*h) + S(64)*b**S(2)*p**S(2)*q**S(2)*sqrt(g + h*x)*(-e*h + f*g)/(S(9)*f*h) + S(16)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**(S(3)/2)*log(S(2)/(-sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g) + S(1)))*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(3)*f**(S(3)/2)*h) - S(8)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**(S(3)/2)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))**S(2)/(S(3)*f**(S(3)/2)*h) - S(64)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**(S(3)/2)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(9)*f**(S(3)/2)*h) + S(8)*b**S(2)*p**S(2)*q**S(2)*(-e*h + f*g)**(S(3)/2)*polylog(S(2), (-sqrt(f)*sqrt(g + h*x) - sqrt(-e*h + f*g))/(-sqrt(f)*sqrt(g + h*x) + sqrt(-e*h + f*g)))/(S(3)*f**(S(3)/2)*h) - S(8)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(3)/2)/(S(9)*h) - S(8)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*sqrt(g + h*x)*(-e*h + f*g)/(S(3)*f*h) + S(8)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(-e*h + f*g)**(S(3)/2)*atanh(sqrt(f)*sqrt(g + h*x)/sqrt(-e*h + f*g))/(S(3)*f**(S(3)/2)*h) + S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)**(S(3)/2)/(S(3)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*sqrt(g + h*x), x), x, -b*f*p*q*Integral((g + h*x)**(S(3)/2)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)), x)/(S(3)*h) + S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(3)/2)/(S(3)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/sqrt(g + h*x), x), x, -b*f*p*q*Integral(sqrt(g + h*x)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)), x)/h + S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*sqrt(g + h*x)/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x)**(S(3)/2), x), x, b*f*p*q*Integral(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)*sqrt(g + h*x)), x)/h - S(2)*sqrt(a + b*log(c*(d*(e + f*x)**p)**q))/(h*sqrt(g + h*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(g + h*x)/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), x, Integral(sqrt(g + h*x)/sqrt(a + b*log(c*(d*(e + f*x)**p)**q)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*sqrt(g + h*x)), x), x, Integral(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*sqrt(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(3)/2)), x), x, Integral(S(1)/(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**(S(3)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**m, x), x, Integral((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**m, x), expand=True, _diff=True, _numerical=True) '''long time assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**S(3), x), x, S(3)*S(2)**(-n + S(-1))*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)**S(2)*(-e*h + f*g)**S(2)*Gamma(n + S(1), (-S(2)*a - S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-S(2)*a/(b*p*q))/f**S(4) + S(4)**(-n + S(-1))*h**S(3)*(c*(d*(e + f*x)**p)**q)**(-S(4)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)**S(4)*Gamma(n + S(1), (-S(4)*a - S(4)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-S(4)*a/(b*p*q))/f**S(4) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)*(-e*h + f*g)**S(3)*Gamma(n + S(1), (-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-a/(b*p*q))/f**S(4) + S(3)**(-n)*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)**S(3)*(-e*h + f*g)*Gamma(n + S(1), (-S(3)*a - S(3)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-S(3)*a/(b*p*q))/f**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x)**S(2), x), x, S(3)**(-n + S(-1))*h**S(2)*(c*(d*(e + f*x)**p)**q)**(-S(3)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)**S(3)*Gamma(n + S(1), (-S(3)*a - S(3)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-S(3)*a/(b*p*q))/f**S(3) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)*(-e*h + f*g)**S(2)*Gamma(n + S(1), (-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-a/(b*p*q))/f**S(3) + S(2)**(-n)*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)**S(2)*(-e*h + f*g)*Gamma(n + S(1), (-S(2)*a - S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-S(2)*a/(b*p*q))/f**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**n*(g + h*x), x), x, S(2)**(-n + S(-1))*h*(c*(d*(e + f*x)**p)**q)**(-S(2)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)**S(2)*Gamma(n + S(1), (-S(2)*a - S(2)*b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-S(2)*a/(b*p*q))/f**S(2) + (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)*(-e*h + f*g)*Gamma(n + S(1), (-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-a/(b*p*q))/f**S(2), expand=True, _diff=True, _numerical=True) ''' assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**n, x), x, (c*(d*(e + f*x)**p)**q)**(-S(1)/(p*q))*((-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))**(-n)*(a + b*log(c*(d*(e + f*x)**p)**q))**n*(e + f*x)*Gamma(n + S(1), (-a - b*log(c*(d*(e + f*x)**p)**q))/(b*p*q))*exp(-a/(b*p*q))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**n/(g + h*x), x), x, Integral((a + b*log(c*(d*(e + f*x)**p)**q))**n/(g + h*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))*(i + j*x)**S(4)/(d*e + d*f*x), x), x, -S(4)*b*j*x*(-e*j + f*i)**S(3)/(d*f**S(4)) - b*j**S(4)*(e + f*x)**S(4)/(S(16)*d*f**S(5)) - S(4)*b*j**S(3)*(e + f*x)**S(3)*(-e*j + f*i)/(S(9)*d*f**S(5)) - S(3)*b*j**S(2)*(e + f*x)**S(2)*(-e*j + f*i)**S(2)/(S(2)*d*f**S(5)) + j**S(4)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(4)/(S(4)*d*f**S(5)) + S(4)*j**S(3)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(3)*(-e*j + f*i)/(S(3)*d*f**S(5)) + S(3)*j**S(2)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(2)*(-e*j + f*i)**S(2)/(d*f**S(5)) + S(4)*j*(a + b*log(c*(e + f*x)))*(e + f*x)*(-e*j + f*i)**S(3)/(d*f**S(5)) + (a + b*log(c*(e + f*x)))**S(2)*(-e*j + f*i)**S(4)/(S(2)*b*d*f**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))*(i + j*x)**S(3)/(d*e + d*f*x), x), x, -S(3)*b*j*x*(-e*j + f*i)**S(2)/(d*f**S(3)) - b*j**S(3)*(e + f*x)**S(3)/(S(9)*d*f**S(4)) - S(3)*b*j**S(2)*(e + f*x)**S(2)*(-e*j + f*i)/(S(4)*d*f**S(4)) + j**S(3)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(3)/(S(3)*d*f**S(4)) + S(3)*j**S(2)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(2)*(-e*j + f*i)/(S(2)*d*f**S(4)) + S(3)*j*(a + b*log(c*(e + f*x)))*(e + f*x)*(-e*j + f*i)**S(2)/(d*f**S(4)) + (a + b*log(c*(e + f*x)))**S(2)*(-e*j + f*i)**S(3)/(S(2)*b*d*f**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))*(i + j*x)**S(2)/(d*e + d*f*x), x), x, -S(2)*b*j*x*(-e*j + f*i)/(d*f**S(2)) - b*j**S(2)*(e + f*x)**S(2)/(S(4)*d*f**S(3)) + j**S(2)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(2)/(S(2)*d*f**S(3)) + S(2)*j*(a + b*log(c*(e + f*x)))*(e + f*x)*(-e*j + f*i)/(d*f**S(3)) + (a + b*log(c*(e + f*x)))**S(2)*(-e*j + f*i)**S(2)/(S(2)*b*d*f**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))*(i + j*x)/(d*e + d*f*x), x), x, -b*j*x/(d*f) + j*(a + b*log(c*(e + f*x)))*(e + f*x)/(d*f**S(2)) + (a + b*log(c*(e + f*x)))**S(2)*(-e*j/S(2) + f*i/S(2))/(b*d*f**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))/(d*e + d*f*x), x), x, (a + b*log(c*(e + f*x)))**S(2)/(S(2)*b*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))/((i + j*x)*(d*e + d*f*x)), x), x, -b*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)) - (a + b*log(c*(e + f*x)))*log(f*(i + j*x)/(-e*j + f*i))/(d*(-e*j + f*i)) + (a + b*log(c*(e + f*x)))**S(2)/(S(2)*b*d*(-e*j + f*i)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))/((i + j*x)**S(2)*(d*e + d*f*x)), x), x, -b*f*log(e + f*x)/(d*(-e*j + f*i)**S(2)) + b*f*log(i + j*x)/(d*(-e*j + f*i)**S(2)) - b*f*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(2)) - f*(a + b*log(c*(e + f*x)))*log(f*(i + j*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(2)) + (a + b*log(c*(e + f*x)))/(d*(i + j*x)*(-e*j + f*i)) + f*(a + b*log(c*(e + f*x)))**S(2)/(S(2)*b*d*(-e*j + f*i)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))/((i + j*x)**S(3)*(d*e + d*f*x)), x), x, -S(3)*b*f**S(2)*log(e + f*x)/(S(2)*d*(-e*j + f*i)**S(3)) + S(3)*b*f**S(2)*log(i + j*x)/(S(2)*d*(-e*j + f*i)**S(3)) - b*f**S(2)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(3)) - b*f/(S(2)*d*(i + j*x)*(-e*j + f*i)**S(2)) - f**S(2)*(a + b*log(c*(e + f*x)))*log(f*(i + j*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(3)) + f*(a + b*log(c*(e + f*x)))/(d*(i + j*x)*(-e*j + f*i)**S(2)) + (a/S(2) + b*log(c*(e + f*x))/S(2))/(d*(i + j*x)**S(2)*(-e*j + f*i)) + f**S(2)*(a + b*log(c*(e + f*x)))**S(2)/(S(2)*b*d*(-e*j + f*i)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)*(i + j*x)**S(4)/(d*e + d*f*x), x), x, S(8)*b**S(2)*j*x*(-e*j + f*i)**S(3)/(d*f**S(4)) + b**S(2)*j**S(4)*(e + f*x)**S(4)/(S(32)*d*f**S(5)) + S(8)*b**S(2)*j**S(3)*(e + f*x)**S(3)*(-e*j + f*i)/(S(27)*d*f**S(5)) + S(3)*b**S(2)*j**S(2)*(e + f*x)**S(2)*(-e*j + f*i)**S(2)/(S(2)*d*f**S(5)) - b*j**S(4)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(4)/(S(8)*d*f**S(5)) - S(8)*b*j**S(3)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(3)*(-e*j + f*i)/(S(9)*d*f**S(5)) - S(3)*b*j**S(2)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(2)*(-e*j + f*i)**S(2)/(d*f**S(5)) - S(8)*b*j*(a + b*log(c*(e + f*x)))*(e + f*x)*(-e*j + f*i)**S(3)/(d*f**S(5)) + j**S(4)*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)**S(4)/(S(4)*d*f**S(5)) + S(4)*j**S(3)*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)**S(3)*(-e*j + f*i)/(S(3)*d*f**S(5)) + S(3)*j**S(2)*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)**S(2)*(-e*j + f*i)**S(2)/(d*f**S(5)) + S(4)*j*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)*(-e*j + f*i)**S(3)/(d*f**S(5)) + (a + b*log(c*(e + f*x)))**S(3)*(-e*j + f*i)**S(4)/(S(3)*b*d*f**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)*(i + j*x)**S(3)/(d*e + d*f*x), x), x, S(6)*b**S(2)*j*x*(-e*j + f*i)**S(2)/(d*f**S(3)) + S(2)*b**S(2)*j**S(3)*(e + f*x)**S(3)/(S(27)*d*f**S(4)) + S(3)*b**S(2)*j**S(2)*(e + f*x)**S(2)*(-e*j + f*i)/(S(4)*d*f**S(4)) - S(2)*b*j**S(3)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(3)/(S(9)*d*f**S(4)) - S(3)*b*j**S(2)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(2)*(-e*j + f*i)/(S(2)*d*f**S(4)) - S(6)*b*j*(a + b*log(c*(e + f*x)))*(e + f*x)*(-e*j + f*i)**S(2)/(d*f**S(4)) + j**S(3)*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)**S(3)/(S(3)*d*f**S(4)) + S(3)*j**S(2)*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)**S(2)*(-e*j + f*i)/(S(2)*d*f**S(4)) + S(3)*j*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)*(-e*j + f*i)**S(2)/(d*f**S(4)) + (a + b*log(c*(e + f*x)))**S(3)*(-e*j + f*i)**S(3)/(S(3)*b*d*f**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)*(i + j*x)**S(2)/(d*e + d*f*x), x), x, S(4)*b**S(2)*j*x*(-e*j + f*i)/(d*f**S(2)) + b**S(2)*j**S(2)*(e + f*x)**S(2)/(S(4)*d*f**S(3)) - b*j**S(2)*(a + b*log(c*(e + f*x)))*(e + f*x)**S(2)/(S(2)*d*f**S(3)) - S(4)*b*j*(a + b*log(c*(e + f*x)))*(e + f*x)*(-e*j + f*i)/(d*f**S(3)) + j**S(2)*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)**S(2)/(S(2)*d*f**S(3)) + S(2)*j*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)*(-e*j + f*i)/(d*f**S(3)) + (a + b*log(c*(e + f*x)))**S(3)*(-e*j + f*i)**S(2)/(S(3)*b*d*f**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)*(i + j*x)/(d*e + d*f*x), x), x, S(2)*b**S(2)*j*x/(d*f) - S(2)*b*j*(a + b*log(c*(e + f*x)))*(e + f*x)/(d*f**S(2)) + j*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)/(d*f**S(2)) + (a + b*log(c*(e + f*x)))**S(3)*(-e*j/S(3) + f*i/S(3))/(b*d*f**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)/(d*e + d*f*x), x), x, (a + b*log(c*(e + f*x)))**S(3)/(S(3)*b*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)/((i + j*x)*(d*e + d*f*x)), x), x, S(2)*b**S(2)*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)) - S(2)*b*(a + b*log(c*(e + f*x)))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)) - (a + b*log(c*(e + f*x)))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/(d*(-e*j + f*i)) + (a + b*log(c*(e + f*x)))**S(3)/(S(3)*b*d*(-e*j + f*i)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)/((i + j*x)**S(2)*(d*e + d*f*x)), x), x, S(2)*b**S(2)*f*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(2)) + S(2)*b**S(2)*f*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(2)) + S(2)*b*f*(a + b*log(c*(e + f*x)))*log(f*(i + j*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(2)) - S(2)*b*f*(a + b*log(c*(e + f*x)))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(2)) - f*(a + b*log(c*(e + f*x)))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(2)) - j*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)/(d*(i + j*x)*(-e*j + f*i)**S(2)) + f*(a + b*log(c*(e + f*x)))**S(3)/(S(3)*b*d*(-e*j + f*i)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)/((i + j*x)**S(3)*(d*e + d*f*x)), x), x, b**S(2)*f**S(2)*log(e + f*x)/(d*(-e*j + f*i)**S(3)) - b**S(2)*f**S(2)*log(i + j*x)/(d*(-e*j + f*i)**S(3)) + S(3)*b**S(2)*f**S(2)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(3)) + S(2)*b**S(2)*f**S(2)*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(3)) + S(3)*b*f**S(2)*(a + b*log(c*(e + f*x)))*log(f*(i + j*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(3)) - S(2)*b*f**S(2)*(a + b*log(c*(e + f*x)))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(3)) - b*f*(a + b*log(c*(e + f*x)))/(d*(i + j*x)*(-e*j + f*i)**S(2)) - f**S(2)*(a + b*log(c*(e + f*x)))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/(d*(-e*j + f*i)**S(3)) - f**S(2)*(a + b*log(c*(e + f*x)))**S(2)/(S(2)*d*(-e*j + f*i)**S(3)) - f*j*(a + b*log(c*(e + f*x)))**S(2)*(e + f*x)/(d*(i + j*x)*(-e*j + f*i)**S(3)) + (a + b*log(c*(e + f*x)))**S(2)/(S(2)*d*(i + j*x)**S(2)*(-e*j + f*i)) + f**S(2)*(a + b*log(c*(e + f*x)))**S(3)/(S(3)*b*d*(-e*j + f*i)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((i + j*x)**S(4)/((a + b*log(c*(e + f*x)))*(d*e + d*f*x)), x), x, (-e*j + f*i)**S(4)*log(a + b*log(c*(e + f*x)))/(b*d*f**S(5)) + S(4)*j*(-e*j + f*i)**S(3)*exp(-a/b)*Ei((a + b*log(c*(e + f*x)))/b)/(b*c*d*f**S(5)) + S(6)*j**S(2)*(-e*j + f*i)**S(2)*exp(-S(2)*a/b)*Ei((S(2)*a + S(2)*b*log(c*(e + f*x)))/b)/(b*c**S(2)*d*f**S(5)) + S(4)*j**S(3)*(-e*j + f*i)*exp(-S(3)*a/b)*Ei((S(3)*a + S(3)*b*log(c*(e + f*x)))/b)/(b*c**S(3)*d*f**S(5)) + j**S(4)*exp(-S(4)*a/b)*Ei((S(4)*a + S(4)*b*log(c*(e + f*x)))/b)/(b*c**S(4)*d*f**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((i + j*x)**S(3)/((a + b*log(c*(e + f*x)))*(d*e + d*f*x)), x), x, (-e*j + f*i)**S(3)*log(a + b*log(c*(e + f*x)))/(b*d*f**S(4)) + S(3)*j*(-e*j + f*i)**S(2)*exp(-a/b)*Ei((a + b*log(c*(e + f*x)))/b)/(b*c*d*f**S(4)) + S(3)*j**S(2)*(-e*j + f*i)*exp(-S(2)*a/b)*Ei((S(2)*a + S(2)*b*log(c*(e + f*x)))/b)/(b*c**S(2)*d*f**S(4)) + j**S(3)*exp(-S(3)*a/b)*Ei((S(3)*a + S(3)*b*log(c*(e + f*x)))/b)/(b*c**S(3)*d*f**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((i + j*x)**S(2)/((a + b*log(c*(e + f*x)))*(d*e + d*f*x)), x), x, (-e*j + f*i)**S(2)*log(a + b*log(c*(e + f*x)))/(b*d*f**S(3)) + S(2)*j*(-e*j + f*i)*exp(-a/b)*Ei((a + b*log(c*(e + f*x)))/b)/(b*c*d*f**S(3)) + j**S(2)*exp(-S(2)*a/b)*Ei((S(2)*a + S(2)*b*log(c*(e + f*x)))/b)/(b*c**S(2)*d*f**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((i + j*x)/((a + b*log(c*(e + f*x)))*(d*e + d*f*x)), x), x, (-e*j + f*i)*log(a + b*log(c*(e + f*x)))/(b*d*f**S(2)) + j*exp(-a/b)*Ei((a + b*log(c*(e + f*x)))/b)/(b*c*d*f**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(e + f*x)))*(d*e + d*f*x)), x), x, log(a + b*log(c*(e + f*x)))/(b*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(e + f*x)))*(i + j*x)*(d*e + d*f*x)), x), x, Integral(S(1)/((a + b*log(c*(e + f*x)))*(i + j*x)*(d*e + d*f*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(e + f*x)))*(i + j*x)**S(2)*(d*e + d*f*x)), x), x, Integral(S(1)/((a + b*log(c*(e + f*x)))*(i + j*x)**S(2)*(d*e + d*f*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d + e*x)**n))*(f + g*x)**(S(5)/2)/(d + e*x), x), x, -S(4)*b*n*(f + g*x)**(S(5)/2)/(S(25)*e) - S(32)*b*n*(f + g*x)**(S(3)/2)*(-d*g + e*f)/(S(45)*e**S(2)) - S(92)*b*n*sqrt(f + g*x)*(-d*g + e*f)**S(2)/(S(15)*e**S(3)) - S(4)*b*n*(-d*g + e*f)**(S(5)/2)*log(S(2)/(-sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f) + S(1)))*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/e**(S(7)/2) + S(2)*b*n*(-d*g + e*f)**(S(5)/2)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))**S(2)/e**(S(7)/2) + S(92)*b*n*(-d*g + e*f)**(S(5)/2)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/(S(15)*e**(S(7)/2)) - S(2)*b*n*(-d*g + e*f)**(S(5)/2)*polylog(S(2), (-sqrt(e)*sqrt(f + g*x) - sqrt(-d*g + e*f))/(-sqrt(e)*sqrt(f + g*x) + sqrt(-d*g + e*f)))/e**(S(7)/2) + S(2)*(a + b*log(c*(d + e*x)**n))*(f + g*x)**(S(5)/2)/(S(5)*e) + (a + b*log(c*(d + e*x)**n))*(f + g*x)**(S(3)/2)*(-S(2)*d*g/S(3) + S(2)*e*f/S(3))/e**S(2) + S(2)*(a + b*log(c*(d + e*x)**n))*sqrt(f + g*x)*(-d*g + e*f)**S(2)/e**S(3) - S(2)*(a + b*log(c*(d + e*x)**n))*(-d*g + e*f)**(S(5)/2)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/e**(S(7)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d + e*x)**n))*(f + g*x)**(S(3)/2)/(d + e*x), x), x, -S(4)*b*n*(f + g*x)**(S(3)/2)/(S(9)*e) - S(16)*b*n*sqrt(f + g*x)*(-d*g + e*f)/(S(3)*e**S(2)) - S(4)*b*n*(-d*g + e*f)**(S(3)/2)*log(S(2)/(-sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f) + S(1)))*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/e**(S(5)/2) + S(2)*b*n*(-d*g + e*f)**(S(3)/2)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))**S(2)/e**(S(5)/2) + S(16)*b*n*(-d*g + e*f)**(S(3)/2)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/(S(3)*e**(S(5)/2)) - S(2)*b*n*(-d*g + e*f)**(S(3)/2)*polylog(S(2), (-sqrt(e)*sqrt(f + g*x) - sqrt(-d*g + e*f))/(-sqrt(e)*sqrt(f + g*x) + sqrt(-d*g + e*f)))/e**(S(5)/2) + S(2)*(a + b*log(c*(d + e*x)**n))*(f + g*x)**(S(3)/2)/(S(3)*e) + (a + b*log(c*(d + e*x)**n))*sqrt(f + g*x)*(-S(2)*d*g + S(2)*e*f)/e**S(2) - S(2)*(a + b*log(c*(d + e*x)**n))*(-d*g + e*f)**(S(3)/2)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/e**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d + e*x)**n))*sqrt(f + g*x)/(d + e*x), x), x, -S(4)*b*n*sqrt(f + g*x)/e - S(4)*b*n*sqrt(-d*g + e*f)*log(S(2)/(-sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f) + S(1)))*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/e**(S(3)/2) + S(2)*b*n*sqrt(-d*g + e*f)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))**S(2)/e**(S(3)/2) + S(4)*b*n*sqrt(-d*g + e*f)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/e**(S(3)/2) - S(2)*b*n*sqrt(-d*g + e*f)*polylog(S(2), (-sqrt(e)*sqrt(f + g*x) - sqrt(-d*g + e*f))/(-sqrt(e)*sqrt(f + g*x) + sqrt(-d*g + e*f)))/e**(S(3)/2) + (S(2)*a + S(2)*b*log(c*(d + e*x)**n))*sqrt(f + g*x)/e - S(2)*(a + b*log(c*(d + e*x)**n))*sqrt(-d*g + e*f)*atanh(sqrt(e)*sqrt(f + g*x)/sqrt(-d*g + e*f))/e**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x)*log(a + b*x)/(a + b*x), x), x, S(2)*sqrt(d + e*x)*log(a + b*x)/b - S(4)*sqrt(d + e*x)/b - S(2)*sqrt(-a*e + b*d)*log(a + b*x)*atanh(sqrt(b)*sqrt(d + e*x)/sqrt(-a*e + b*d))/b**(S(3)/2) - S(4)*sqrt(-a*e + b*d)*log(S(2)/(-sqrt(b)*sqrt(d + e*x)/sqrt(-a*e + b*d) + S(1)))*atanh(sqrt(b)*sqrt(d + e*x)/sqrt(-a*e + b*d))/b**(S(3)/2) + S(2)*sqrt(-a*e + b*d)*atanh(sqrt(b)*sqrt(d + e*x)/sqrt(-a*e + b*d))**S(2)/b**(S(3)/2) + S(4)*sqrt(-a*e + b*d)*atanh(sqrt(b)*sqrt(d + e*x)/sqrt(-a*e + b*d))/b**(S(3)/2) - S(2)*sqrt(-a*e + b*d)*polylog(S(2), (-sqrt(b)*sqrt(d + e*x) - sqrt(-a*e + b*d))/(-sqrt(b)*sqrt(d + e*x) + sqrt(-a*e + b*d)))/b**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**S(2)*(i + j*x)**m/(d*e + d*f*x), x), x, Integral((a + b*log(c*(e + f*x)))**S(2)*(i + j*x)**m/(d*e + d*f*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))*(i + j*x)**m/(d*e + d*f*x), x), x, Integral((a + b*log(c*(e + f*x)))*(i + j*x)**m/(d*e + d*f*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n*(i + j*x)**m/(d*e + d*f*x), x), x, Integral((a + b*log(c*(e + f*x)))**n*(i + j*x)**m/(d*e + d*f*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n*(i + j*x)**S(4)/(d*e + d*f*x), x), x, S(4)*S(3)**(-n + S(-1))*j**S(3)*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*(-e*j + f*i)*Gamma(n + S(1), (-S(3)*a - S(3)*b*log(c*(e + f*x)))/b)*exp(-S(3)*a/b)/(c**S(3)*d*f**S(5)) + S(4)**(-n + S(-1))*j**S(4)*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*Gamma(n + S(1), (-S(4)*a - S(4)*b*log(c*(e + f*x)))/b)*exp(-S(4)*a/b)/(c**S(4)*d*f**S(5)) + S(4)*j*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*(-e*j + f*i)**S(3)*Gamma(n + S(1), (-a - b*log(c*(e + f*x)))/b)*exp(-a/b)/(c*d*f**S(5)) + (a + b*log(c*(e + f*x)))**(n + S(1))*(-e*j + f*i)**S(4)/(b*d*f**S(5)*(n + S(1))) + S(3)*S(2)**(-n)*j**S(2)*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*(-e*j + f*i)**S(2)*Gamma(n + S(1), (-S(2)*a - S(2)*b*log(c*(e + f*x)))/b)*exp(-S(2)*a/b)/(c**S(2)*d*f**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n*(i + j*x)**S(3)/(d*e + d*f*x), x), x, S(3)*S(2)**(-n + S(-1))*j**S(2)*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*(-e*j + f*i)*Gamma(n + S(1), (-S(2)*a - S(2)*b*log(c*(e + f*x)))/b)*exp(-S(2)*a/b)/(c**S(2)*d*f**S(4)) + S(3)**(-n + S(-1))*j**S(3)*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*Gamma(n + S(1), (-S(3)*a - S(3)*b*log(c*(e + f*x)))/b)*exp(-S(3)*a/b)/(c**S(3)*d*f**S(4)) + S(3)*j*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*(-e*j + f*i)**S(2)*Gamma(n + S(1), (-a - b*log(c*(e + f*x)))/b)*exp(-a/b)/(c*d*f**S(4)) + (a + b*log(c*(e + f*x)))**(n + S(1))*(-e*j + f*i)**S(3)/(b*d*f**S(4)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n*(i + j*x)**S(2)/(d*e + d*f*x), x), x, S(2)**(-n + S(-1))*j**S(2)*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*Gamma(n + S(1), (-S(2)*a - S(2)*b*log(c*(e + f*x)))/b)*exp(-S(2)*a/b)/(c**S(2)*d*f**S(3)) + S(2)*j*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*(-e*j + f*i)*Gamma(n + S(1), (-a - b*log(c*(e + f*x)))/b)*exp(-a/b)/(c*d*f**S(3)) + (a + b*log(c*(e + f*x)))**(n + S(1))*(-e*j + f*i)**S(2)/(b*d*f**S(3)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n*(i + j*x)/(d*e + d*f*x), x), x, j*((-a - b*log(c*(e + f*x)))/b)**(-n)*(a + b*log(c*(e + f*x)))**n*Gamma(n + S(1), (-a - b*log(c*(e + f*x)))/b)*exp(-a/b)/(c*d*f**S(2)) + (a + b*log(c*(e + f*x)))**(n + S(1))*(-e*j + f*i)/(b*d*f**S(2)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n/(d*e + d*f*x), x), x, (a + b*log(c*(e + f*x)))**(n + S(1))/(b*d*f*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n/((i + j*x)*(d*e + d*f*x)), x), x, Integral((a + b*log(c*(e + f*x)))**n/((i + j*x)*(d*e + d*f*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n/((i + j*x)**S(2)*(d*e + d*f*x)), x), x, Integral((a + b*log(c*(e + f*x)))**n/((i + j*x)**S(2)*(d*e + d*f*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(e + f*x)))**n/((i + j*x)**S(3)*(d*e + d*f*x)), x), x, Integral((a + b*log(c*(e + f*x)))**n/((i + j*x)**S(3)*(d*e + d*f*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(i + j*x)**S(3)/(g + h*x), x), x, a*j*x*(-g*j + h*i)**S(2)/h**S(3) - b*p*q*(i + j*x)**S(3)/(S(9)*h) - b*p*q*(i + j*x)**S(2)*(-g*j + h*i)/(S(4)*h**S(2)) - b*j*p*q*x*(-g*j + h*i)**S(2)/h**S(3) + b*p*q*(-g*j + h*i)**S(3)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(4) - b*p*q*(i + j*x)**S(2)*(-e*j + f*i)/(S(6)*f*h) - b*j*p*q*x*(-e*j + f*i)*(-g*j + h*i)/(S(2)*f*h**S(2)) + b*j*(e + f*x)*(-g*j + h*i)**S(2)*log(c*(d*(e + f*x)**p)**q)/(f*h**S(3)) - b*j*p*q*x*(-e*j + f*i)**S(2)/(S(3)*f**S(2)*h) - b*p*q*(-e*j + f*i)**S(2)*(-g*j + h*i)*log(e + f*x)/(S(2)*f**S(2)*h**S(2)) - b*p*q*(-e*j + f*i)**S(3)*log(e + f*x)/(S(3)*f**S(3)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(i + j*x)**S(3)/(S(3)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(i + j*x)**S(2)*(-g*j/S(2) + h*i/S(2))/h**S(2) + (a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)**S(3)*log(f*(g + h*x)/(-e*h + f*g))/h**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(i + j*x)**S(2)/(g + h*x), x), x, a*j*x*(-g*j + h*i)/h**S(2) - b*p*q*(i + j*x)**S(2)/(S(4)*h) - b*j*p*q*x*(-g*j + h*i)/h**S(2) + b*p*q*(-g*j + h*i)**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(3) - b*j*p*q*x*(-e*j + f*i)/(S(2)*f*h) + b*j*(e + f*x)*(-g*j + h*i)*log(c*(d*(e + f*x)**p)**q)/(f*h**S(2)) - b*p*q*(-e*j + f*i)**S(2)*log(e + f*x)/(S(2)*f**S(2)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(i + j*x)**S(2)/(S(2)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)**S(2)*log(f*(g + h*x)/(-e*h + f*g))/h**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))*(i + j*x)/(g + h*x), x), x, a*j*x/h - b*j*p*q*x/h + b*p*q*(-g*j + h*i)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(2) + b*j*(e + f*x)*log(c*(d*(e + f*x)**p)**q)/(f*h) + (a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)*log(f*(g + h*x)/(-e*h + f*g))/h**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x), x), x, b*p*q*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h + (a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/((g + h*x)*(i + j*x)), x), x, b*p*q*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i) - b*p*q*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i) + (a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i) - (a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/((g + h*x)*(i + j*x)**S(2)), x), x, -b*f*p*q*log(e + f*x)/((-e*j + f*i)*(-g*j + h*i)) + b*f*p*q*log(i + j*x)/((-e*j + f*i)*(-g*j + h*i)) + b*h*p*q*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) - b*h*p*q*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) + h*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) - h*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) + (a + b*log(c*(d*(e + f*x)**p)**q))/((i + j*x)*(-g*j + h*i)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/((g + h*x)*(i + j*x)**S(3)), x), x, -b*f**S(2)*p*q*log(e + f*x)/(S(2)*(-e*j + f*i)**S(2)*(-g*j + h*i)) + b*f**S(2)*p*q*log(i + j*x)/(S(2)*(-e*j + f*i)**S(2)*(-g*j + h*i)) - b*f*h*p*q*log(e + f*x)/((-e*j + f*i)*(-g*j + h*i)**S(2)) + b*f*h*p*q*log(i + j*x)/((-e*j + f*i)*(-g*j + h*i)**S(2)) - b*f*p*q/(S(2)*(i + j*x)*(-e*j + f*i)*(-g*j + h*i)) + b*h**S(2)*p*q*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) - b*h**S(2)*p*q*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) - h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) + h*(a + b*log(c*(d*(e + f*x)**p)**q))/((i + j*x)*(-g*j + h*i)**S(2)) + (a/S(2) + b*log(c*(d*(e + f*x)**p)**q)/S(2))/((i + j*x)**S(2)*(-g*j + h*i)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(i + j*x)**S(3)/(g + h*x), x), x, -S(2)*a*b*j*p*q*x*(-g*j + h*i)**S(2)/h**S(3) - S(2)*a*b*j*p*q*x*(-e*j + f*i)*(-g*j + h*i)/(f*h**S(2)) - S(2)*a*b*j*p*q*x*(-e*j + f*i)**S(2)/(S(3)*f**S(2)*h) + b**S(2)*e*j**S(2)*p**S(2)*q**S(2)*x*(-g*j + h*i)/(S(2)*f*h**S(2)) + S(2)*b**S(2)*p**S(2)*q**S(2)*(i + j*x)**S(3)/(S(27)*h) + b**S(2)*j**S(2)*p**S(2)*q**S(2)*x**S(2)*(-g*j + h*i)/(S(4)*h**S(2)) + S(2)*b**S(2)*j*p**S(2)*q**S(2)*x*(-g*j + h*i)**S(2)/h**S(3) - S(2)*b**S(2)*p**S(2)*q**S(2)*(-g*j + h*i)**S(3)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h**S(4) + S(5)*b**S(2)*p**S(2)*q**S(2)*(i + j*x)**S(2)*(-e*j + f*i)/(S(18)*f*h) + S(2)*b**S(2)*j*p**S(2)*q**S(2)*x*(-e*j + f*i)*(-g*j + h*i)/(f*h**S(2)) - S(2)*b**S(2)*j*p*q*(e + f*x)*(-g*j + h*i)**S(2)*log(c*(d*(e + f*x)**p)**q)/(f*h**S(3)) + S(11)*b**S(2)*j*p**S(2)*q**S(2)*x*(-e*j + f*i)**S(2)/(S(9)*f**S(2)*h) - S(2)*b**S(2)*j*p*q*(e + f*x)*(-e*j + f*i)*(-g*j + h*i)*log(c*(d*(e + f*x)**p)**q)/(f**S(2)*h**S(2)) - S(2)*b**S(2)*j*p*q*(e + f*x)*(-e*j + f*i)**S(2)*log(c*(d*(e + f*x)**p)**q)/(S(3)*f**S(3)*h) + S(5)*b**S(2)*p**S(2)*q**S(2)*(-e*j + f*i)**S(3)*log(e + f*x)/(S(9)*f**S(3)*h) - S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(i + j*x)**S(3)/(S(9)*h) + S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)**S(3)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(4) - b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(i + j*x)**S(2)*(-e*j + f*i)/(S(3)*f*h) - b*j**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-g*j + h*i)/(S(2)*f**S(2)*h**S(2)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(i + j*x)**S(3)/(S(3)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-g*j + h*i)**S(3)*log(f*(g + h*x)/(-e*h + f*g))/h**S(4) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-g*j + h*i)**S(2)/(f*h**S(3)) + j**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)*(-g*j + h*i)/(S(2)*f**S(2)*h**S(2)) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*j + f*i)*(-g*j + h*i)/(f**S(2)*h**S(2)) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-e*j + f*i)**S(3)/(S(3)*f**S(3)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(i + j*x)**S(2)/(g + h*x), x), x, -S(2)*a*b*j*p*q*x*(-g*j + h*i)/h**S(2) - S(2)*a*b*j*p*q*x*(-e*j + f*i)/(f*h) + b**S(2)*e*j**S(2)*p**S(2)*q**S(2)*x/(S(2)*f*h) + b**S(2)*j**S(2)*p**S(2)*q**S(2)*x**S(2)/(S(4)*h) + S(2)*b**S(2)*j*p**S(2)*q**S(2)*x*(-g*j + h*i)/h**S(2) - S(2)*b**S(2)*p**S(2)*q**S(2)*(-g*j + h*i)**S(2)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h**S(3) + S(2)*b**S(2)*j*p**S(2)*q**S(2)*x*(-e*j + f*i)/(f*h) - S(2)*b**S(2)*j*p*q*(e + f*x)*(-g*j + h*i)*log(c*(d*(e + f*x)**p)**q)/(f*h**S(2)) - S(2)*b**S(2)*j*p*q*(e + f*x)*(-e*j + f*i)*log(c*(d*(e + f*x)**p)**q)/(f**S(2)*h) + S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(3) - b*j**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)/(S(2)*f**S(2)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-g*j + h*i)**S(2)*log(f*(g + h*x)/(-e*h + f*g))/h**S(3) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-g*j + h*i)/(f*h**S(2)) + j**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)/(S(2)*f**S(2)*h) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*j + f*i)/(f**S(2)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(i + j*x)/(g + h*x), x), x, -S(2)*a*b*j*p*q*x/h + S(2)*b**S(2)*j*p**S(2)*q**S(2)*x/h - S(2)*b**S(2)*p**S(2)*q**S(2)*(-g*j + h*i)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h**S(2) - S(2)*b**S(2)*j*p*q*(e + f*x)*log(c*(d*(e + f*x)**p)**q)/(f*h) + S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(2) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-g*j + h*i)*log(f*(g + h*x)/(-e*h + f*g))/h**S(2) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/(f*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(g + h*x), x), x, -S(2)*b**S(2)*p**S(2)*q**S(2)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h + S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/((g + h*x)*(i + j*x)), x), x, -S(2)*b**S(2)*p**S(2)*q**S(2)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i) + S(2)*b**S(2)*p**S(2)*q**S(2)*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i) + S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i) - S(2)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/((g + h*x)*(i + j*x)**S(2)), x), x, S(2)*b**S(2)*f*p**S(2)*q**S(2)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)) - S(2)*b**S(2)*h*p**S(2)*q**S(2)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) + S(2)*b**S(2)*h*p**S(2)*q**S(2)*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) + S(2)*b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(i + j*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)) + S(2)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) - S(2)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) - h*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) - j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/((i + j*x)*(-e*j + f*i)*(-g*j + h*i)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/((g + h*x)*(i + j*x)**S(3)), x), x, b**S(2)*f**S(2)*p**S(2)*q**S(2)*log(e + f*x)/((-e*j + f*i)**S(2)*(-g*j + h*i)) - b**S(2)*f**S(2)*p**S(2)*q**S(2)*log(i + j*x)/((-e*j + f*i)**S(2)*(-g*j + h*i)) + b**S(2)*f**S(2)*p**S(2)*q**S(2)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)**S(2)*(-g*j + h*i)) + S(2)*b**S(2)*f*h*p**S(2)*q**S(2)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)**S(2)) - S(2)*b**S(2)*h**S(2)*p**S(2)*q**S(2)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) + S(2)*b**S(2)*h**S(2)*p**S(2)*q**S(2)*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) + b*f**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(i + j*x)/(-e*j + f*i))/((-e*j + f*i)**S(2)*(-g*j + h*i)) + S(2)*b*f*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(i + j*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)**S(2)) - b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))/((i + j*x)*(-e*j + f*i)*(-g*j + h*i)) + S(2)*b*h**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) - S(2)*b*h**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) - f**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(2)*(-e*j + f*i)**S(2)*(-g*j + h*i)) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) - h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) - h*j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/((i + j*x)*(-e*j + f*i)*(-g*j + h*i)**S(2)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(2)/(S(2)*(i + j*x)**S(2)*(-g*j + h*i)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(i + j*x)**S(3)/(g + h*x), x), x, S(6)*a*b**S(2)*j*p**S(2)*q**S(2)*x*(-g*j + h*i)**S(2)/h**S(3) + S(6)*a*b**S(2)*j*p**S(2)*q**S(2)*x*(-e*j + f*i)*(-g*j + h*i)/(f*h**S(2)) + S(6)*a*b**S(2)*j*p**S(2)*q**S(2)*x*(-e*j + f*i)**S(2)/(f**S(2)*h) - S(3)*b**S(3)*e*j**S(2)*p**S(3)*q**S(3)*x*(-g*j + h*i)/(S(4)*f*h**S(2)) - S(3)*b**S(3)*e*j**S(2)*p**S(3)*q**S(3)*x*(-e*j + f*i)/(S(2)*f**S(2)*h) - S(3)*b**S(3)*j**S(2)*p**S(3)*q**S(3)*x**S(2)*(-g*j + h*i)/(S(8)*h**S(2)) - S(6)*b**S(3)*j*p**S(3)*q**S(3)*x*(-g*j + h*i)**S(2)/h**S(3) + S(6)*b**S(3)*p**S(3)*q**S(3)*(-g*j + h*i)**S(3)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/h**S(4) - S(3)*b**S(3)*j**S(2)*p**S(3)*q**S(3)*x**S(2)*(-e*j + f*i)/(S(4)*f*h) - S(6)*b**S(3)*j*p**S(3)*q**S(3)*x*(-e*j + f*i)*(-g*j + h*i)/(f*h**S(2)) + S(6)*b**S(3)*j*p**S(2)*q**S(2)*(e + f*x)*(-g*j + h*i)**S(2)*log(c*(d*(e + f*x)**p)**q)/(f*h**S(3)) - S(6)*b**S(3)*j*p**S(3)*q**S(3)*x*(-e*j + f*i)**S(2)/(f**S(2)*h) + S(6)*b**S(3)*j*p**S(2)*q**S(2)*(e + f*x)*(-e*j + f*i)*(-g*j + h*i)*log(c*(d*(e + f*x)**p)**q)/(f**S(2)*h**S(2)) - S(2)*b**S(3)*j**S(3)*p**S(3)*q**S(3)*(e + f*x)**S(3)/(S(27)*f**S(3)*h) + S(6)*b**S(3)*j*p**S(2)*q**S(2)*(e + f*x)*(-e*j + f*i)**S(2)*log(c*(d*(e + f*x)**p)**q)/(f**S(3)*h) - S(6)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)**S(3)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h**S(4) + S(3)*b**S(2)*j**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-g*j + h*i)/(S(4)*f**S(2)*h**S(2)) + S(2)*b**S(2)*j**S(3)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(3)/(S(9)*f**S(3)*h) + S(3)*b**S(2)*j**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)*(-e*j + f*i)/(S(2)*f**S(3)*h) + S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-g*j + h*i)**S(3)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(4) - S(3)*b*j*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-g*j + h*i)**S(2)/(f*h**S(3)) - S(3)*b*j**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)*(-g*j + h*i)/(S(4)*f**S(2)*h**S(2)) - S(3)*b*j*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*j + f*i)*(-g*j + h*i)/(f**S(2)*h**S(2)) - b*j**S(3)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(3)/(S(3)*f**S(3)*h) - S(3)*b*j**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)*(-e*j + f*i)/(S(2)*f**S(3)*h) - S(3)*b*j*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*j + f*i)**S(2)/(f**S(3)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(-g*j + h*i)**S(3)*log(f*(g + h*x)/(-e*h + f*g))/h**S(4) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)*(-g*j + h*i)**S(2)/(f*h**S(3)) + j**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(2)*(-g*j + h*i)/(S(2)*f**S(2)*h**S(2)) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)*(-e*j + f*i)*(-g*j + h*i)/(f**S(2)*h**S(2)) + j**S(3)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(3)/(S(3)*f**S(3)*h) + j**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(2)*(-e*j + f*i)/(f**S(3)*h) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)*(-e*j + f*i)**S(2)/(f**S(3)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(i + j*x)**S(2)/(g + h*x), x), x, S(6)*a*b**S(2)*j*p**S(2)*q**S(2)*x*(-g*j + h*i)/h**S(2) + S(6)*a*b**S(2)*j*p**S(2)*q**S(2)*x*(-e*j + f*i)/(f*h) - S(3)*b**S(3)*e*j**S(2)*p**S(3)*q**S(3)*x/(S(4)*f*h) - S(3)*b**S(3)*j**S(2)*p**S(3)*q**S(3)*x**S(2)/(S(8)*h) - S(6)*b**S(3)*j*p**S(3)*q**S(3)*x*(-g*j + h*i)/h**S(2) + S(6)*b**S(3)*p**S(3)*q**S(3)*(-g*j + h*i)**S(2)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/h**S(3) - S(6)*b**S(3)*j*p**S(3)*q**S(3)*x*(-e*j + f*i)/(f*h) + S(6)*b**S(3)*j*p**S(2)*q**S(2)*(e + f*x)*(-g*j + h*i)*log(c*(d*(e + f*x)**p)**q)/(f*h**S(2)) + S(6)*b**S(3)*j*p**S(2)*q**S(2)*(e + f*x)*(-e*j + f*i)*log(c*(d*(e + f*x)**p)**q)/(f**S(2)*h) - S(6)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)**S(2)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h**S(3) + S(3)*b**S(2)*j**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(e + f*x)**S(2)/(S(4)*f**S(2)*h) + S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-g*j + h*i)**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(3) - S(3)*b*j*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-g*j + h*i)/(f*h**S(2)) - S(3)*b*j**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)**S(2)/(S(4)*f**S(2)*h) - S(3)*b*j*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)*(-e*j + f*i)/(f**S(2)*h) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(-g*j + h*i)**S(2)*log(f*(g + h*x)/(-e*h + f*g))/h**S(3) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)*(-g*j + h*i)/(f*h**S(2)) + j**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)**S(2)/(S(2)*f**S(2)*h) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)*(-e*j + f*i)/(f**S(2)*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(i + j*x)/(g + h*x), x), x, S(6)*a*b**S(2)*j*p**S(2)*q**S(2)*x/h - S(6)*b**S(3)*j*p**S(3)*q**S(3)*x/h + S(6)*b**S(3)*p**S(3)*q**S(3)*(-g*j + h*i)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/h**S(2) + S(6)*b**S(3)*j*p**S(2)*q**S(2)*(e + f*x)*log(c*(d*(e + f*x)**p)**q)/(f*h) - S(6)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*(-g*j + h*i)*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h**S(2) + S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(-g*j + h*i)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h**S(2) - S(3)*b*j*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/(f*h) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(-g*j + h*i)*log(f*(g + h*x)/(-e*h + f*g))/h**S(2) + j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)/(f*h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(g + h*x), x), x, S(6)*b**S(3)*p**S(3)*q**S(3)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/h - S(6)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/h + S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/h + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(g + h*x)/(-e*h + f*g))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/((g + h*x)*(i + j*x)), x), x, S(6)*b**S(3)*p**S(3)*q**S(3)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i) - S(6)*b**S(3)*p**S(3)*q**S(3)*polylog(S(4), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i) - S(6)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i) + S(6)*b**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i) + S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i) - S(3)*b*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i) - (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/((g + h*x)*(i + j*x)**S(2)), x), x, -S(6)*b**S(3)*f*p**S(3)*q**S(3)*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)) + S(6)*b**S(3)*h*p**S(3)*q**S(3)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) - S(6)*b**S(3)*h*p**S(3)*q**S(3)*polylog(S(4), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) + S(6)*b**S(2)*f*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)) - S(6)*b**S(2)*h*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) + S(6)*b**S(2)*h*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) + S(3)*b*f*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)) + S(3)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) - S(3)*b*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) + h*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i)**S(2) - h*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i)**S(2) - j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)/((i + j*x)*(-e*j + f*i)*(-g*j + h*i)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/((g + h*x)*(i + j*x)**S(3)), x), x, -S(3)*b**S(3)*f**S(2)*p**S(3)*q**S(3)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)**S(2)*(-g*j + h*i)) - S(3)*b**S(3)*f**S(2)*p**S(3)*q**S(3)*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)**S(2)*(-g*j + h*i)) - S(6)*b**S(3)*f*h*p**S(3)*q**S(3)*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)**S(2)) + S(6)*b**S(3)*h**S(2)*p**S(3)*q**S(3)*polylog(S(4), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) - S(6)*b**S(3)*h**S(2)*p**S(3)*q**S(3)*polylog(S(4), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) - S(3)*b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*log(f*(i + j*x)/(-e*j + f*i))/((-e*j + f*i)**S(2)*(-g*j + h*i)) + S(3)*b**S(2)*f**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)**S(2)*(-g*j + h*i)) + S(6)*b**S(2)*f*h*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)**S(2)) - S(6)*b**S(2)*h**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) + S(6)*b**S(2)*h**S(2)*p**S(2)*q**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))*polylog(S(3), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) + S(3)*b*f**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/(S(2)*(-e*j + f*i)**S(2)*(-g*j + h*i)) + S(3)*b*f*h*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*log(f*(i + j*x)/(-e*j + f*i))/((-e*j + f*i)*(-g*j + h*i)**S(2)) + S(3)*b*f*j*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(e + f*x)/(S(2)*(i + j*x)*(-e*j + f*i)**S(2)*(-g*j + h*i)) + S(3)*b*h**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -h*(e + f*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) - S(3)*b*h**S(2)*p*q*(a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*polylog(S(2), -j*(e + f*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) - f**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(S(2)*(-e*j + f*i)**S(2)*(-g*j + h*i)) + h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(g + h*x)/(-e*h + f*g))/(-g*j + h*i)**S(3) - h**S(2)*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*log(f*(i + j*x)/(-e*j + f*i))/(-g*j + h*i)**S(3) - h*j*(a + b*log(c*(d*(e + f*x)**p)**q))**S(3)*(e + f*x)/((i + j*x)*(-e*j + f*i)*(-g*j + h*i)**S(2)) + (a + b*log(c*(d*(e + f*x)**p)**q))**S(3)/(S(2)*(i + j*x)**S(2)*(-g*j + h*i)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((i + j*x)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x), x, Integral((i + j*x)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)*(i + j*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)*(i + j*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)*(i + j*x)**S(2)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)*(i + j*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((i + j*x)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)), x), x, Integral((i + j*x)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)*(i + j*x)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)*(i + j*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)*(i + j*x)**S(2)), x), x, Integral(S(1)/((a + b*log(c*(d*(e + f*x)**p)**q))**S(2)*(g + h*x)*(i + j*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(g + h*x**S(2)), x), x, -b*p*q*polylog(S(2), sqrt(h)*(-e - f*x)/(-e*sqrt(h) + f*sqrt(-g)))/(S(2)*sqrt(h)*sqrt(-g)) + b*p*q*polylog(S(2), sqrt(h)*(e + f*x)/(e*sqrt(h) + f*sqrt(-g)))/(S(2)*sqrt(h)*sqrt(-g)) - (a/S(2) + b*log(c*(d*(e + f*x)**p)**q)/S(2))*log(f*(sqrt(h)*x + sqrt(-g))/(-e*sqrt(h) + f*sqrt(-g)))/(sqrt(h)*sqrt(-g)) + (a/S(2) + b*log(c*(d*(e + f*x)**p)**q)/S(2))*log(f*(-sqrt(h)*x + sqrt(-g))/(e*sqrt(h) + f*sqrt(-g)))/(sqrt(h)*sqrt(-g)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/sqrt(h*x**S(2) + S(2)), x), x, -b*p*q*log(sqrt(S(2))*f*exp(asinh(sqrt(S(2))*sqrt(h)*x/S(2)))/(e*sqrt(h) - sqrt(e**S(2)*h + S(2)*f**S(2))) + S(1))*asinh(sqrt(S(2))*sqrt(h)*x/S(2))/sqrt(h) - b*p*q*log(sqrt(S(2))*f*exp(asinh(sqrt(S(2))*sqrt(h)*x/S(2)))/(e*sqrt(h) + sqrt(e**S(2)*h + S(2)*f**S(2))) + S(1))*asinh(sqrt(S(2))*sqrt(h)*x/S(2))/sqrt(h) + b*p*q*asinh(sqrt(S(2))*sqrt(h)*x/S(2))**S(2)/(S(2)*sqrt(h)) - b*p*q*polylog(S(2), -sqrt(S(2))*f*exp(asinh(sqrt(S(2))*sqrt(h)*x/S(2)))/(e*sqrt(h) - sqrt(e**S(2)*h + S(2)*f**S(2))))/sqrt(h) - b*p*q*polylog(S(2), -sqrt(S(2))*f*exp(asinh(sqrt(S(2))*sqrt(h)*x/S(2)))/(e*sqrt(h) + sqrt(e**S(2)*h + S(2)*f**S(2))))/sqrt(h) + (a + b*log(c*(d*(e + f*x)**p)**q))*asinh(sqrt(S(2))*sqrt(h)*x/S(2))/sqrt(h), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/sqrt(g + h*x**S(2)), x), x, -b*sqrt(g)*p*q*sqrt(S(1) + h*x**S(2)/g)*log(f*sqrt(g)*exp(asinh(sqrt(h)*x/sqrt(g)))/(e*sqrt(h) - sqrt(e**S(2)*h + f**S(2)*g)) + S(1))*asinh(sqrt(h)*x/sqrt(g))/(sqrt(h)*sqrt(g + h*x**S(2))) - b*sqrt(g)*p*q*sqrt(S(1) + h*x**S(2)/g)*log(f*sqrt(g)*exp(asinh(sqrt(h)*x/sqrt(g)))/(e*sqrt(h) + sqrt(e**S(2)*h + f**S(2)*g)) + S(1))*asinh(sqrt(h)*x/sqrt(g))/(sqrt(h)*sqrt(g + h*x**S(2))) + b*sqrt(g)*p*q*sqrt(S(1) + h*x**S(2)/g)*asinh(sqrt(h)*x/sqrt(g))**S(2)/(S(2)*sqrt(h)*sqrt(g + h*x**S(2))) - b*sqrt(g)*p*q*sqrt(S(1) + h*x**S(2)/g)*polylog(S(2), -f*sqrt(g)*exp(asinh(sqrt(h)*x/sqrt(g)))/(e*sqrt(h) - sqrt(e**S(2)*h + f**S(2)*g)))/(sqrt(h)*sqrt(g + h*x**S(2))) - b*sqrt(g)*p*q*sqrt(S(1) + h*x**S(2)/g)*polylog(S(2), -f*sqrt(g)*exp(asinh(sqrt(h)*x/sqrt(g)))/(e*sqrt(h) + sqrt(e**S(2)*h + f**S(2)*g)))/(sqrt(h)*sqrt(g + h*x**S(2))) + sqrt(g)*sqrt(S(1) + h*x**S(2)/g)*(a + b*log(c*(d*(e + f*x)**p)**q))*asinh(sqrt(h)*x/sqrt(g))/(sqrt(h)*sqrt(g + h*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(-h*x + S(2))*sqrt(h*x + S(2))), x), x, -b*p*q*log(S(2)*f*exp(I*asin(h*x/S(2)))/(I*e*h - sqrt(-e**S(2)*h**S(2) + S(4)*f**S(2))) + S(1))*asin(h*x/S(2))/h - b*p*q*log(S(2)*f*exp(I*asin(h*x/S(2)))/(I*e*h + sqrt(-e**S(2)*h**S(2) + S(4)*f**S(2))) + S(1))*asin(h*x/S(2))/h + I*b*p*q*asin(h*x/S(2))**S(2)/(S(2)*h) + I*b*p*q*polylog(S(2), -S(2)*f*exp(I*asin(h*x/S(2)))/(I*e*h - sqrt(-e**S(2)*h**S(2) + S(4)*f**S(2))))/h + I*b*p*q*polylog(S(2), -S(2)*f*exp(I*asin(h*x/S(2)))/(I*e*h + sqrt(-e**S(2)*h**S(2) + S(4)*f**S(2))))/h + (a + b*log(c*(d*(e + f*x)**p)**q))*asin(h*x/S(2))/h, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d*(e + f*x)**p)**q))/(sqrt(g - h*x)*sqrt(g + h*x)), x), x, -b*g*p*q*sqrt(S(1) - h**S(2)*x**S(2)/g**S(2))*log(f*g*exp(I*asin(h*x/g))/(I*e*h - sqrt(-e**S(2)*h**S(2) + f**S(2)*g**S(2))) + S(1))*asin(h*x/g)/(h*sqrt(g - h*x)*sqrt(g + h*x)) - b*g*p*q*sqrt(S(1) - h**S(2)*x**S(2)/g**S(2))*log(f*g*exp(I*asin(h*x/g))/(I*e*h + sqrt(-e**S(2)*h**S(2) + f**S(2)*g**S(2))) + S(1))*asin(h*x/g)/(h*sqrt(g - h*x)*sqrt(g + h*x)) + I*b*g*p*q*sqrt(S(1) - h**S(2)*x**S(2)/g**S(2))*asin(h*x/g)**S(2)/(S(2)*h*sqrt(g - h*x)*sqrt(g + h*x)) + I*b*g*p*q*sqrt(S(1) - h**S(2)*x**S(2)/g**S(2))*polylog(S(2), -f*g*exp(I*asin(h*x/g))/(I*e*h - sqrt(-e**S(2)*h**S(2) + f**S(2)*g**S(2))))/(h*sqrt(g - h*x)*sqrt(g + h*x)) + I*b*g*p*q*sqrt(S(1) - h**S(2)*x**S(2)/g**S(2))*polylog(S(2), -f*g*exp(I*asin(h*x/g))/(I*e*h + sqrt(-e**S(2)*h**S(2) + f**S(2)*g**S(2))))/(h*sqrt(g - h*x)*sqrt(g + h*x)) + g*sqrt(S(1) - h**S(2)*x**S(2)/g**S(2))*(a + b*log(c*(d*(e + f*x)**p)**q))*asin(h*x/g)/(h*sqrt(g - h*x)*sqrt(g + h*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(2)*e/(e + f*x))/(e**S(2) - f**S(2)*x**S(2)), x), x, polylog(S(2), (-e + f*x)/(e + f*x))/(S(2)*e*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(S(2)*e/(e + f*x)))/(e**S(2) - f**S(2)*x**S(2)), x), x, a*atanh(f*x/e)/(e*f) + b*polylog(S(2), (-e + f*x)/(e + f*x))/(S(2)*e*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e/(e + f*x))/(e**S(2) - f**S(2)*x**S(2)), x), x, -log(S(2))*atanh(f*x/e)/(e*f) + polylog(S(2), (-e + f*x)/(e + f*x))/(S(2)*e*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(e/(e + f*x)))/(e**S(2) - f**S(2)*x**S(2)), x), x, b*polylog(S(2), (-e + f*x)/(e + f*x))/(S(2)*e*f) + (a - b*log(S(2)))*atanh(f*x/e)/(e*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x)/(c + d/x**S(2)), x), x, -sqrt(d)*log(b*(sqrt(d) - x*sqrt(-c))/(a*sqrt(-c) + b*sqrt(d)))*log(a + b*x)/(S(2)*(-c)**(S(3)/2)) + sqrt(d)*log(-b*(sqrt(d) + x*sqrt(-c))/(a*sqrt(-c) - b*sqrt(d)))*log(a + b*x)/(S(2)*(-c)**(S(3)/2)) + sqrt(d)*polylog(S(2), sqrt(-c)*(a + b*x)/(a*sqrt(-c) - b*sqrt(d)))/(S(2)*(-c)**(S(3)/2)) - sqrt(d)*polylog(S(2), sqrt(-c)*(a + b*x)/(a*sqrt(-c) + b*sqrt(d)))/(S(2)*(-c)**(S(3)/2)) - x/c + (a + b*x)*log(a + b*x)/(b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)**S(3)/(d + e*x**S(2)), x), x, -S(3)*n**S(3)*polylog(S(4), sqrt(e)*(-a - b*x)/(-a*sqrt(e) + b*sqrt(-d)))/(sqrt(e)*sqrt(-d)) + S(3)*n**S(3)*polylog(S(4), sqrt(e)*(a + b*x)/(a*sqrt(e) + b*sqrt(-d)))/(sqrt(e)*sqrt(-d)) + S(3)*n**S(2)*log(c*(a + b*x)**n)*polylog(S(3), sqrt(e)*(-a - b*x)/(-a*sqrt(e) + b*sqrt(-d)))/(sqrt(e)*sqrt(-d)) - S(3)*n**S(2)*log(c*(a + b*x)**n)*polylog(S(3), sqrt(e)*(a + b*x)/(a*sqrt(e) + b*sqrt(-d)))/(sqrt(e)*sqrt(-d)) - S(3)*n*log(c*(a + b*x)**n)**S(2)*polylog(S(2), sqrt(e)*(-a - b*x)/(-a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)) + S(3)*n*log(c*(a + b*x)**n)**S(2)*polylog(S(2), sqrt(e)*(a + b*x)/(a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)) - log(c*(a + b*x)**n)**S(3)*log(b*(sqrt(e)*x + sqrt(-d))/(-a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)) + log(c*(a + b*x)**n)**S(3)*log(b*(-sqrt(e)*x + sqrt(-d))/(a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)**S(2)/(d + e*x**S(2)), x), x, n**S(2)*polylog(S(3), sqrt(e)*(-a - b*x)/(-a*sqrt(e) + b*sqrt(-d)))/(sqrt(e)*sqrt(-d)) - n**S(2)*polylog(S(3), sqrt(e)*(a + b*x)/(a*sqrt(e) + b*sqrt(-d)))/(sqrt(e)*sqrt(-d)) - n*log(c*(a + b*x)**n)*polylog(S(2), sqrt(e)*(-a - b*x)/(-a*sqrt(e) + b*sqrt(-d)))/(sqrt(e)*sqrt(-d)) + n*log(c*(a + b*x)**n)*polylog(S(2), sqrt(e)*(a + b*x)/(a*sqrt(e) + b*sqrt(-d)))/(sqrt(e)*sqrt(-d)) - log(c*(a + b*x)**n)**S(2)*log(b*(sqrt(e)*x + sqrt(-d))/(-a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)) + log(c*(a + b*x)**n)**S(2)*log(b*(-sqrt(e)*x + sqrt(-d))/(a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)/(d + e*x**S(2)), x), x, -n*polylog(S(2), sqrt(e)*(-a - b*x)/(-a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)) + n*polylog(S(2), sqrt(e)*(a + b*x)/(a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)) - log(c*(a + b*x)**n)*log(b*(sqrt(e)*x + sqrt(-d))/(-a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)) + log(c*(a + b*x)**n)*log(b*(-sqrt(e)*x + sqrt(-d))/(a*sqrt(e) + b*sqrt(-d)))/(S(2)*sqrt(e)*sqrt(-d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*log(c*(a + b*x)**n)), x), x, Integral(S(1)/((d + e*x**S(2))*log(c*(a + b*x)**n)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*log(c + d*x)/(a + b*x**S(2)), x), x, a**S(2)*log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*b**S(3)) + a**S(2)*log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*b**S(3)) + a**S(2)*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*b**S(3)) + a**S(2)*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*b**S(3)) + a*c**S(2)*log(c + d*x)/(S(2)*b**S(2)*d**S(2)) - a*c*x/(S(2)*b**S(2)*d) - a*x**S(2)*log(c + d*x)/(S(2)*b**S(2)) + a*x**S(2)/(S(4)*b**S(2)) - c**S(4)*log(c + d*x)/(S(4)*b*d**S(4)) + c**S(3)*x/(S(4)*b*d**S(3)) - c**S(2)*x**S(2)/(S(8)*b*d**S(2)) + c*x**S(3)/(S(12)*b*d) + x**S(4)*log(c + d*x)/(S(4)*b) - x**S(4)/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(c + d*x)/(a + b*x**S(2)), x), x, a*x/b**S(2) - a*(c + d*x)*log(c + d*x)/(b**S(2)*d) + c**S(3)*log(c + d*x)/(S(3)*b*d**S(3)) - c**S(2)*x/(S(3)*b*d**S(2)) + c*x**S(2)/(S(6)*b*d) + x**S(3)*log(c + d*x)/(S(3)*b) - x**S(3)/(S(9)*b) - (-a)**(S(3)/2)*log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*b**(S(5)/2)) + (-a)**(S(3)/2)*log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*b**(S(5)/2)) - (-a)**(S(3)/2)*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*b**(S(5)/2)) + (-a)**(S(3)/2)*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c + d*x)/(a + b*x**S(2)), x), x, -a*log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*b**S(2)) - a*log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*b**S(2)) - a*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*b**S(2)) - a*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*b**S(2)) - c**S(2)*log(c + d*x)/(S(2)*b*d**S(2)) + c*x/(S(2)*b*d) + x**S(2)*log(c + d*x)/(S(2)*b) - x**S(2)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c + d*x)/(a + b*x**S(2)), x), x, -x/b + (c + d*x)*log(c + d*x)/(b*d) - sqrt(-a)*log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*b**(S(3)/2)) + sqrt(-a)*log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*b**(S(3)/2)) - sqrt(-a)*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*b**(S(3)/2)) + sqrt(-a)*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*b**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c + d*x)/(a + b*x**S(2)), x), x, log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*b) + log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*b) + polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*b) + polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(a + b*x**S(2)), x), x, -log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*sqrt(b)*sqrt(-a)) + log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*sqrt(b)*sqrt(-a)) - polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*sqrt(b)*sqrt(-a)) + polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*sqrt(b)*sqrt(-a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x*(a + b*x**S(2))), x), x, log(-d*x/c)*log(c + d*x)/a - log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*a) - log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*a) + polylog(S(2), (c + d*x)/c)/a - polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*a) - polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x**S(2)*(a + b*x**S(2))), x), x, -sqrt(b)*log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*(-a)**(S(3)/2)) + sqrt(b)*log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*(-a)**(S(3)/2)) - sqrt(b)*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*(-a)**(S(3)/2)) + sqrt(b)*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*(-a)**(S(3)/2)) - log(c + d*x)/(a*x) + d*log(x)/(a*c) - d*log(c + d*x)/(a*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x**S(3)*(a + b*x**S(2))), x), x, -log(c + d*x)/(S(2)*a*x**S(2)) - d/(S(2)*a*c*x) - d**S(2)*log(x)/(S(2)*a*c**S(2)) + d**S(2)*log(c + d*x)/(S(2)*a*c**S(2)) - b*log(-d*x/c)*log(c + d*x)/a**S(2) + b*log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/(S(2)*a**S(2)) + b*log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/(S(2)*a**S(2)) - b*polylog(S(2), (c + d*x)/c)/a**S(2) + b*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/(S(2)*a**S(2)) + b*polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*log(c + d*x)/(a + b*x**S(3)), x), x, -a*log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**S(2)) - a*log(-d*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**S(2)) - a*log((S(-1))**(S(1)/3)*d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**S(2)) - a*polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b**S(2)) - a*polylog(S(2), b**(S(1)/3)*(c + d*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b**S(2)) - a*polylog(S(2), b**(S(1)/3)*(c + d*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b**S(2)) + c**S(3)*log(c + d*x)/(S(3)*b*d**S(3)) - c**S(2)*x/(S(3)*b*d**S(2)) + c*x**S(2)/(S(6)*b*d) + x**S(3)*log(c + d*x)/(S(3)*b) - x**S(3)/(S(9)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(c + d*x)/(a + b*x**S(3)), x), x, a**(S(2)/3)*log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**(S(5)/3)) - (S(-1))**(S(1)/3)*a**(S(2)/3)*log(d*(a**(S(1)/3) - (S(-1))**(S(1)/3)*b**(S(1)/3)*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**(S(5)/3)) + (S(-1))**(S(2)/3)*a**(S(2)/3)*log(-d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**(S(5)/3)) + a**(S(2)/3)*polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b**(S(5)/3)) - (S(-1))**(S(1)/3)*a**(S(2)/3)*polylog(S(2), (S(-1))**(S(1)/3)*b**(S(1)/3)*(c + d*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))/(S(3)*b**(S(5)/3)) + (S(-1))**(S(2)/3)*a**(S(2)/3)*polylog(S(2), (S(-1))**(S(2)/3)*b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))/(S(3)*b**(S(5)/3)) - c**S(2)*log(c + d*x)/(S(2)*b*d**S(2)) + c*x/(S(2)*b*d) + x**S(2)*log(c + d*x)/(S(2)*b) - x**S(2)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c + d*x)/(a + b*x**S(3)), x), x, -a**(S(1)/3)*log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**(S(4)/3)) - (S(-1))**(S(2)/3)*a**(S(1)/3)*log(d*(a**(S(1)/3) - (S(-1))**(S(1)/3)*b**(S(1)/3)*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**(S(4)/3)) + (S(-1))**(S(1)/3)*a**(S(1)/3)*log(-d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b**(S(4)/3)) - a**(S(1)/3)*polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b**(S(4)/3)) - (S(-1))**(S(2)/3)*a**(S(1)/3)*polylog(S(2), (S(-1))**(S(1)/3)*b**(S(1)/3)*(c + d*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))/(S(3)*b**(S(4)/3)) + (S(-1))**(S(1)/3)*a**(S(1)/3)*polylog(S(2), (S(-1))**(S(2)/3)*b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))/(S(3)*b**(S(4)/3)) - x/b + (c + d*x)*log(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c + d*x)/(a + b*x**S(3)), x), x, log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b) + log(-d*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b) + log((S(-1))**(S(1)/3)*d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*b) + polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b) + polylog(S(2), b**(S(1)/3)*(c + d*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b) + polylog(S(2), b**(S(1)/3)*(c + d*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c + d*x)/(a + b*x**S(3)), x), x, -log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(1)/3)*b**(S(2)/3)) + (S(-1))**(S(1)/3)*log(d*(a**(S(1)/3) - (S(-1))**(S(1)/3)*b**(S(1)/3)*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(1)/3)*b**(S(2)/3)) - (S(-1))**(S(2)/3)*log(-d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(1)/3)*b**(S(2)/3)) - polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*a**(S(1)/3)*b**(S(2)/3)) + (S(-1))**(S(1)/3)*polylog(S(2), (S(-1))**(S(1)/3)*b**(S(1)/3)*(c + d*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))/(S(3)*a**(S(1)/3)*b**(S(2)/3)) - (S(-1))**(S(2)/3)*polylog(S(2), (S(-1))**(S(2)/3)*b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))/(S(3)*a**(S(1)/3)*b**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(a + b*x**S(3)), x), x, log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(2)/3)*b**(S(1)/3)) + (S(-1))**(S(2)/3)*log(d*(a**(S(1)/3) - (S(-1))**(S(1)/3)*b**(S(1)/3)*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(2)/3)*b**(S(1)/3)) - (S(-1))**(S(1)/3)*log(-d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(2)/3)*b**(S(1)/3)) + polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*a**(S(2)/3)*b**(S(1)/3)) + (S(-1))**(S(2)/3)*polylog(S(2), (S(-1))**(S(1)/3)*b**(S(1)/3)*(c + d*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))/(S(3)*a**(S(2)/3)*b**(S(1)/3)) - (S(-1))**(S(1)/3)*polylog(S(2), (S(-1))**(S(2)/3)*b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))/(S(3)*a**(S(2)/3)*b**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x*(a + b*x**S(3))), x), x, log(-d*x/c)*log(c + d*x)/a - log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a) - log(-d*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a) - log((S(-1))**(S(1)/3)*d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a) + polylog(S(2), (c + d*x)/c)/a - polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*a) - polylog(S(2), b**(S(1)/3)*(c + d*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*a) - polylog(S(2), b**(S(1)/3)*(c + d*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x**S(2)*(a + b*x**S(3))), x), x, -log(c + d*x)/(a*x) + d*log(x)/(a*c) - d*log(c + d*x)/(a*c) + b**(S(1)/3)*log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(4)/3)) - (S(-1))**(S(1)/3)*b**(S(1)/3)*log(d*(a**(S(1)/3) - (S(-1))**(S(1)/3)*b**(S(1)/3)*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(4)/3)) + (S(-1))**(S(2)/3)*b**(S(1)/3)*log(-d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(4)/3)) + b**(S(1)/3)*polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*a**(S(4)/3)) - (S(-1))**(S(1)/3)*b**(S(1)/3)*polylog(S(2), (S(-1))**(S(1)/3)*b**(S(1)/3)*(c + d*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))/(S(3)*a**(S(4)/3)) + (S(-1))**(S(2)/3)*b**(S(1)/3)*polylog(S(2), (S(-1))**(S(2)/3)*b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))/(S(3)*a**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x**S(3)*(a + b*x**S(3))), x), x, -log(c + d*x)/(S(2)*a*x**S(2)) - d/(S(2)*a*c*x) - d**S(2)*log(x)/(S(2)*a*c**S(2)) + d**S(2)*log(c + d*x)/(S(2)*a*c**S(2)) - b**(S(2)/3)*log(-d*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(5)/3)) - (S(-1))**(S(2)/3)*b**(S(2)/3)*log(d*(a**(S(1)/3) - (S(-1))**(S(1)/3)*b**(S(1)/3)*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(5)/3)) + (S(-1))**(S(1)/3)*b**(S(2)/3)*log(-d*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))*log(c + d*x)/(S(3)*a**(S(5)/3)) - b**(S(2)/3)*polylog(S(2), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*a**(S(5)/3)) - (S(-1))**(S(2)/3)*b**(S(2)/3)*polylog(S(2), (S(-1))**(S(1)/3)*b**(S(1)/3)*(c + d*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*c))/(S(3)*a**(S(5)/3)) + (S(-1))**(S(1)/3)*b**(S(2)/3)*polylog(S(2), (S(-1))**(S(2)/3)*b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + (S(-1))**(S(2)/3)*b**(S(1)/3)*c))/(S(3)*a**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(c + d*x)/(a + b*x**S(4)), x), x, -x/b + (c + d*x)*log(c + d*x)/(b*d) - (-a)**(S(1)/4)*log(-d*(b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b**(S(5)/4)) + (-a)**(S(1)/4)*log(d*(-b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b**(S(5)/4)) - (-a)**(S(1)/4)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*b**(S(5)/4)) + (-a)**(S(1)/4)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*b**(S(5)/4)) - sqrt(-sqrt(-a))*log(-d*(b**(S(1)/4)*x + sqrt(-sqrt(-a)))/(b**(S(1)/4)*c - d*sqrt(-sqrt(-a))))*log(c + d*x)/(S(4)*b**(S(5)/4)) + sqrt(-sqrt(-a))*log(d*(-b**(S(1)/4)*x + sqrt(-sqrt(-a)))/(b**(S(1)/4)*c + d*sqrt(-sqrt(-a))))*log(c + d*x)/(S(4)*b**(S(5)/4)) - sqrt(-sqrt(-a))*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*sqrt(-sqrt(-a))))/(S(4)*b**(S(5)/4)) + sqrt(-sqrt(-a))*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*sqrt(-sqrt(-a))))/(S(4)*b**(S(5)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c + d*x)/(a + b*x**S(4)), x), x, log(-d*(b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b) + log(d*(-b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b) + log(-d*(b**(S(1)/4)*x + I*(-a)**(S(1)/4))/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b) + log(d*(-b**(S(1)/4)*x + I*(-a)**(S(1)/4))/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*b) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*b) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))/(S(4)*b) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c + d*x)/(a + b*x**S(4)), x), x, -log(-d*(b**(S(1)/4)*x + sqrt(-sqrt(-a)))/(b**(S(1)/4)*c - d*sqrt(-sqrt(-a))))*log(c + d*x)/(S(4)*b**(S(3)/4)*sqrt(-sqrt(-a))) + log(d*(-b**(S(1)/4)*x + sqrt(-sqrt(-a)))/(b**(S(1)/4)*c + d*sqrt(-sqrt(-a))))*log(c + d*x)/(S(4)*b**(S(3)/4)*sqrt(-sqrt(-a))) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*sqrt(-sqrt(-a))))/(S(4)*b**(S(3)/4)*sqrt(-sqrt(-a))) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*sqrt(-sqrt(-a))))/(S(4)*b**(S(3)/4)*sqrt(-sqrt(-a))) - log(-d*(b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b**(S(3)/4)*(-a)**(S(1)/4)) + log(d*(-b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b**(S(3)/4)*(-a)**(S(1)/4)) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(-a)**(S(1)/4)) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(-a)**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c + d*x)/(a + b*x**S(4)), x), x, log(-d*(b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*sqrt(b)*sqrt(-a)) + log(d*(-b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*sqrt(b)*sqrt(-a)) - log(-d*(b**(S(1)/4)*x + I*(-a)**(S(1)/4))/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*sqrt(b)*sqrt(-a)) - log(d*(-b**(S(1)/4)*x + I*(-a)**(S(1)/4))/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*sqrt(b)*sqrt(-a)) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*sqrt(b)*sqrt(-a)) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*sqrt(b)*sqrt(-a)) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))/(S(4)*sqrt(b)*sqrt(-a)) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))/(S(4)*sqrt(b)*sqrt(-a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(a + b*x**S(4)), x), x, -log(-d*(b**(S(1)/4)*x + sqrt(-sqrt(-a)))/(b**(S(1)/4)*c - d*sqrt(-sqrt(-a))))*log(c + d*x)/(S(4)*b**(S(1)/4)*(-sqrt(-a))**(S(3)/2)) + log(d*(-b**(S(1)/4)*x + sqrt(-sqrt(-a)))/(b**(S(1)/4)*c + d*sqrt(-sqrt(-a))))*log(c + d*x)/(S(4)*b**(S(1)/4)*(-sqrt(-a))**(S(3)/2)) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*sqrt(-sqrt(-a))))/(S(4)*b**(S(1)/4)*(-sqrt(-a))**(S(3)/2)) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*sqrt(-sqrt(-a))))/(S(4)*b**(S(1)/4)*(-sqrt(-a))**(S(3)/2)) - log(-d*(b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b**(S(1)/4)*(-a)**(S(3)/4)) + log(d*(-b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*b**(S(1)/4)*(-a)**(S(3)/4)) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*b**(S(1)/4)*(-a)**(S(3)/4)) + polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*b**(S(1)/4)*(-a)**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x*(a + b*x**S(4))), x), x, log(-d*x/c)*log(c + d*x)/a - log(-d*(b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*a) - log(d*(-b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*a) - log(-d*(b**(S(1)/4)*x + I*(-a)**(S(1)/4))/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*a) - log(d*(-b**(S(1)/4)*x + I*(-a)**(S(1)/4))/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*a) + polylog(S(2), (c + d*x)/c)/a - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*a) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*a) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))/(S(4)*a) - polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))/(S(4)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x**S(2)*(a + b*x**S(4))), x), x, -b**(S(1)/4)*log(-d*(b**(S(1)/4)*x + sqrt(-sqrt(-a)))/(b**(S(1)/4)*c - d*sqrt(-sqrt(-a))))*log(c + d*x)/(S(4)*(-sqrt(-a))**(S(5)/2)) + b**(S(1)/4)*log(d*(-b**(S(1)/4)*x + sqrt(-sqrt(-a)))/(b**(S(1)/4)*c + d*sqrt(-sqrt(-a))))*log(c + d*x)/(S(4)*(-sqrt(-a))**(S(5)/2)) - b**(S(1)/4)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*sqrt(-sqrt(-a))))/(S(4)*(-sqrt(-a))**(S(5)/2)) + b**(S(1)/4)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*sqrt(-sqrt(-a))))/(S(4)*(-sqrt(-a))**(S(5)/2)) - b**(S(1)/4)*log(-d*(b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*(-a)**(S(5)/4)) + b**(S(1)/4)*log(d*(-b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*(-a)**(S(5)/4)) - b**(S(1)/4)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*(-a)**(S(5)/4)) + b**(S(1)/4)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*(-a)**(S(5)/4)) - log(c + d*x)/(a*x) + d*log(x)/(a*c) - d*log(c + d*x)/(a*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c + d*x)/(x**S(3)*(a + b*x**S(4))), x), x, sqrt(b)*log(-d*(b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*(-a)**(S(3)/2)) + sqrt(b)*log(d*(-b**(S(1)/4)*x + (-a)**(S(1)/4))/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*(-a)**(S(3)/2)) - sqrt(b)*log(-d*(b**(S(1)/4)*x + I*(-a)**(S(1)/4))/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*(-a)**(S(3)/2)) - sqrt(b)*log(d*(-b**(S(1)/4)*x + I*(-a)**(S(1)/4))/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))*log(c + d*x)/(S(4)*(-a)**(S(3)/2)) + sqrt(b)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*(-a)**(S(3)/2)) + sqrt(b)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*(-a)**(S(3)/2)) - sqrt(b)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))/(S(4)*(-a)**(S(3)/2)) - sqrt(b)*polylog(S(2), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))/(S(4)*(-a)**(S(3)/2)) - log(c + d*x)/(S(2)*a*x**S(2)) - d/(S(2)*a*c*x) - d**S(2)*log(x)/(S(2)*a*c**S(2)) + d**S(2)*log(c + d*x)/(S(2)*a*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)**S(3)/(d*x + e*x**S(2)), x), x, S(6)*n**S(3)*polylog(S(4), (a + b*x)/a)/d - S(6)*n**S(3)*polylog(S(4), -e*(a + b*x)/(-a*e + b*d))/d - S(6)*n**S(2)*log(c*(a + b*x)**n)*polylog(S(3), (a + b*x)/a)/d + S(6)*n**S(2)*log(c*(a + b*x)**n)*polylog(S(3), -e*(a + b*x)/(-a*e + b*d))/d + S(3)*n*log(c*(a + b*x)**n)**S(2)*polylog(S(2), (a + b*x)/a)/d - S(3)*n*log(c*(a + b*x)**n)**S(2)*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/d + log(c*(a + b*x)**n)**S(3)*log(-b*x/a)/d - log(c*(a + b*x)**n)**S(3)*log(b*(d + e*x)/(-a*e + b*d))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)**S(2)/(d*x + e*x**S(2)), x), x, -S(2)*n**S(2)*polylog(S(3), (a + b*x)/a)/d + S(2)*n**S(2)*polylog(S(3), -e*(a + b*x)/(-a*e + b*d))/d + S(2)*n*log(c*(a + b*x)**n)*polylog(S(2), (a + b*x)/a)/d - S(2)*n*log(c*(a + b*x)**n)*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/d + log(c*(a + b*x)**n)**S(2)*log(-b*x/a)/d - log(c*(a + b*x)**n)**S(2)*log(b*(d + e*x)/(-a*e + b*d))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)/(d*x + e*x**S(2)), x), x, n*polylog(S(2), (a + b*x)/a)/d - n*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/d + log(c*(a + b*x)**n)*log(-b*x/a)/d - log(c*(a + b*x)**n)*log(b*(d + e*x)/(-a*e + b*d))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x + e*x**S(2))*log(c*(a + b*x)**n)), x), x, Integral(S(1)/(x*(d + e*x)*log(c*(a + b*x)**n)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)**S(3)/(d + e*x + f*x**S(2)), x), x, S(6)*n**S(3)*polylog(S(4), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - S(6)*n**S(3)*polylog(S(4), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - S(6)*n**S(2)*log(c*(a + b*x)**n)*polylog(S(3), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + S(6)*n**S(2)*log(c*(a + b*x)**n)*polylog(S(3), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + S(3)*n*log(c*(a + b*x)**n)**S(2)*polylog(S(2), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - S(3)*n*log(c*(a + b*x)**n)**S(2)*polylog(S(2), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + log(c*(a + b*x)**n)**S(3)*log(-b*(e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - log(c*(a + b*x)**n)**S(3)*log(-b*(e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)**S(2)/(d + e*x + f*x**S(2)), x), x, -S(2)*n**S(2)*polylog(S(3), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + S(2)*n**S(2)*polylog(S(3), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + S(2)*n*log(c*(a + b*x)**n)*polylog(S(2), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - S(2)*n*log(c*(a + b*x)**n)*polylog(S(2), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + log(c*(a + b*x)**n)**S(2)*log(-b*(e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - log(c*(a + b*x)**n)**S(2)*log(-b*(e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**n)/(d + e*x + f*x**S(2)), x), x, n*polylog(S(2), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - n*polylog(S(2), S(2)*f*(a + b*x)/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + log(c*(a + b*x)**n)*log(-b*(e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/(S(2)*a*f - b*(e - sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - log(c*(a + b*x)**n)*log(-b*(e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/(S(2)*a*f - b*(e + sqrt(-S(4)*d*f + e**S(2)))))/sqrt(-S(4)*d*f + e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x + f*x**S(2))*log(c*(a + b*x)**n)), x), x, Integral(S(1)/((d + e*x + f*x**S(2))*log(c*(a + b*x)**n)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(x)/(a + b*x + c*x**S(2)), x), x, -b*x*log(x)/c**S(2) + b*x/c**S(2) + x**S(2)*log(x)/(S(2)*c) - x**S(2)/(S(4)*c) + (-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(x)*log((b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**S(3)) + (-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**S(3)) + (-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(x)*log((b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**S(3)) + (-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(x)/(a + b*x + c*x**S(2)), x), x, x*log(x)/c - x/c - (b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(x)*log((b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**S(2)) - (b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**S(2)) - (b + (S(2)*a*c - b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(x)*log((b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**S(2)) - (b + (S(2)*a*c - b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(x)/(a + b*x + c*x**S(2)), x), x, (-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(x)*log((b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c) + (-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*polylog(S(2), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c) + (b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(x)*log((b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c) + (b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*polylog(S(2), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(a + b*x + c*x**S(2)), x), x, log(x)*log((b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(b - sqrt(-S(4)*a*c + b**S(2))))/sqrt(-S(4)*a*c + b**S(2)) - log(x)*log((b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(b + sqrt(-S(4)*a*c + b**S(2))))/sqrt(-S(4)*a*c + b**S(2)) + polylog(S(2), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2))))/sqrt(-S(4)*a*c + b**S(2)) - polylog(S(2), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2))))/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(x*(a + b*x + c*x**S(2))), x), x, -(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(x)*log((b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a) - (-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*polylog(S(2), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a) - (b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(x)*log((b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a) - (b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*polylog(S(2), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a) + log(x)**S(2)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(x**S(2)*(a + b*x + c*x**S(2))), x), x, -log(x)/(a*x) - S(1)/(a*x) - b*log(x)**S(2)/(S(2)*a**S(2)) + (b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(x)*log((b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)) + (b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)) + (b + (S(2)*a*c - b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(x)*log((b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)) + (b + (S(2)*a*c - b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(x**S(3)*(a + b*x + c*x**S(2))), x), x, -log(x)/(S(2)*a*x**S(2)) - S(1)/(S(4)*a*x**S(2)) + b*log(x)/(a**S(2)*x) + b/(a**S(2)*x) + (-a*c/S(2) + b**S(2)/S(2))*log(x)**S(2)/a**S(3) - (-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(x)*log((b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(3)) - (-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(3)) - (-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(x)*log((b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(3)) - (-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d + e/(f + g*x))**p))**S(4), x), x, -S(24)*b**S(4)*e*p**S(4)*polylog(S(4), (d + e/(f + g*x))/d)/(d*g) + S(24)*b**S(3)*e*p**S(3)*(a + b*log(c*(d + e/(f + g*x))**p))*polylog(S(3), (d + e/(f + g*x))/d)/(d*g) - S(12)*b**S(2)*e*p**S(2)*(a + b*log(c*(d + e/(f + g*x))**p))**S(2)*polylog(S(2), (d + e/(f + g*x))/d)/(d*g) - S(4)*b*e*p*(a + b*log(c*(d + e/(f + g*x))**p))**S(3)*log(-e/(d*(f + g*x)))/(d*g) + (a + b*log(c*(d + e/(f + g*x))**p))**S(4)*(d*(f + g*x) + e)/(d*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d + e/(f + g*x))**p))**S(3), x), x, S(6)*b**S(3)*e*p**S(3)*polylog(S(3), (d + e/(f + g*x))/d)/(d*g) - S(6)*b**S(2)*e*p**S(2)*(a + b*log(c*(d + e/(f + g*x))**p))*polylog(S(2), (d + e/(f + g*x))/d)/(d*g) - S(3)*b*e*p*(a + b*log(c*(d + e/(f + g*x))**p))**S(2)*log(-e/(d*(f + g*x)))/(d*g) + (a + b*log(c*(d + e/(f + g*x))**p))**S(3)*(d*(f + g*x) + e)/(d*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d + e/(f + g*x))**p))**S(2), x), x, -S(2)*b**S(2)*e*p**S(2)*polylog(S(2), (d + e/(f + g*x))/d)/(d*g) - S(2)*b*e*p*(a + b*log(c*(d + e/(f + g*x))**p))*log(-e/(d*(f + g*x)))/(d*g) + (a + b*log(c*(d + e/(f + g*x))**p))**S(2)*(d*(f + g*x) + e)/(d*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a + b*log(c*(d + e/(f + g*x))**p), x), x, a*x + b*(f + g*x)*log(c*(d + e/(f + g*x))**p)/g + b*e*p*log(d*(f + g*x) + e)/(d*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*log(c*(d + e/(f + g*x))**p)), x), x, Integral(S(1)/(a + b*log(c*(d + e/x)**p)), (x, f + g*x))/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*(d + e/(f + g*x))**p))**(S(-2)), x), x, Integral((a + b*log(c*(d + e/x)**p))**(S(-2)), (x, f + g*x))/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(e*(f + g*x)**p)**q), x), x, -p*q*x + (f + g*x)*log(c*(e*(f + g*x)**p)**q)/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(d + e*(f + g*x)**p)**q), x), x, -p*q*x + p*q*(f + g*x)*hyper((S(1), S(1)/p), (S(1) + S(1)/p,), -e*(f + g*x)**p/d)/g + (f + g*x)*log(c*(d + e*(f + g*x)**p)**q)/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(d + e*(f + g*x)**S(3))**q), x), x, d**(S(1)/3)*q*log(d**(S(1)/3) + e**(S(1)/3)*(f + g*x))/(e**(S(1)/3)*g) - d**(S(1)/3)*q*log(d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*(f + g*x) + e**(S(2)/3)*(f + g*x)**S(2))/(S(2)*e**(S(1)/3)*g) - sqrt(S(3))*d**(S(1)/3)*q*atan(sqrt(S(3))*(d**(S(1)/3) - S(2)*e**(S(1)/3)*(f + g*x))/(S(3)*d**(S(1)/3)))/(e**(S(1)/3)*g) - S(3)*q*x + (f + g*x)*log(c*(d + e*(f + g*x)**S(3))**q)/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(d + e*(f + g*x)**S(2))**q), x), x, S(2)*sqrt(d)*q*atan(sqrt(e)*(f + g*x)/sqrt(d))/(sqrt(e)*g) - S(2)*q*x + (f + g*x)*log(c*(d + e*(f + g*x)**S(2))**q)/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(d + e*(f + g*x))**q), x), x, -q*x + (d + e*f + e*g*x)*log(c*(d + e*f + e*g*x)**q)/(e*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(d + e/(f + g*x))**q), x), x, (f + g*x)*log(c*(d + e/(f + g*x))**q)/g + e*q*log(d*(f + g*x) + e)/(d*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(d + e/(f + g*x)**S(2))**q), x), x, (f + g*x)*log(c*(d + e/(f + g*x)**S(2))**q)/g + S(2)*sqrt(e)*q*atan(sqrt(d)*(f + g*x)/sqrt(e))/(sqrt(d)*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(d + e/(f + g*x)**S(3))**q), x), x, (f + g*x)*log(c*(d + e/(f + g*x)**S(3))**q)/g + e**(S(1)/3)*q*log(d**(S(1)/3)*(f + g*x) + e**(S(1)/3))/(d**(S(1)/3)*g) - e**(S(1)/3)*q*log(d**(S(2)/3)*(f + g*x)**S(2) - d**(S(1)/3)*e**(S(1)/3)*(f + g*x) + e**(S(2)/3))/(S(2)*d**(S(1)/3)*g) - sqrt(S(3))*e**(S(1)/3)*q*atan(sqrt(S(3))*(-S(2)*d**(S(1)/3)*(f + g*x) + e**(S(1)/3))/(S(3)*e**(S(1)/3)))/(d**(S(1)/3)*g), expand=True, _diff=True, _numerical=True) def test_2(): assert rubi_test(rubi_integrate(x**m*log(a*x**n), x), x, -n*x**(m + S(1))/(m + S(1))**S(2) + x**(m + S(1))*log(a*x**n)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*log(a*x**n), x), x, x**n*log(a*x**n)/n - x**n/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(a*x**n), x), x, -n*x**S(4)/S(16) + x**S(4)*log(a*x**n)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(a*x**n), x), x, -n*x**S(3)/S(9) + x**S(3)*log(a*x**n)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(a*x**n), x), x, -n*x**S(2)/S(4) + x**S(2)*log(a*x**n)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n), x), x, -n*x + x*log(a*x**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)/x, x), x, log(a*x**n)**S(2)/(S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)/x**S(2), x), x, -n/x - log(a*x**n)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)/x**S(3), x), x, -n/(S(4)*x**S(2)) - log(a*x**n)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(a*x**n)**S(2), x), x, S(2)*n**S(2)*x**(m + S(1))/(m + S(1))**S(3) - S(2)*n*x**(m + S(1))*log(a*x**n)/(m + S(1))**S(2) + x**(m + S(1))*log(a*x**n)**S(2)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*log(a*x**n)**S(2), x), x, x**n*log(a*x**n)**S(2)/n - S(2)*x**n*log(a*x**n)/n + S(2)*x**n/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(a*x**n)**S(2), x), x, n**S(2)*x**S(4)/S(32) - n*x**S(4)*log(a*x**n)/S(8) + x**S(4)*log(a*x**n)**S(2)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(a*x**n)**S(2), x), x, S(2)*n**S(2)*x**S(3)/S(27) - S(2)*n*x**S(3)*log(a*x**n)/S(9) + x**S(3)*log(a*x**n)**S(2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(a*x**n)**S(2), x), x, n**S(2)*x**S(2)/S(4) - n*x**S(2)*log(a*x**n)/S(2) + x**S(2)*log(a*x**n)**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**S(2), x), x, S(2)*n**S(2)*x - S(2)*n*x*log(a*x**n) + x*log(a*x**n)**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**S(2)/x, x), x, log(a*x**n)**S(3)/(S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**S(2)/x**S(2), x), x, -S(2)*n**S(2)/x - S(2)*n*log(a*x**n)/x - log(a*x**n)**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**S(2)/x**S(3), x), x, -n**S(2)/(S(4)*x**S(2)) - n*log(a*x**n)/(S(2)*x**S(2)) - log(a*x**n)**S(2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(a*x**n)**S(3), x), x, -S(6)*n**S(3)*x**(m + S(1))/(m + S(1))**S(4) + S(6)*n**S(2)*x**(m + S(1))*log(a*x**n)/(m + S(1))**S(3) - S(3)*n*x**(m + S(1))*log(a*x**n)**S(2)/(m + S(1))**S(2) + x**(m + S(1))*log(a*x**n)**S(3)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*log(a*x**n)**S(3), x), x, x**n*log(a*x**n)**S(3)/n - S(3)*x**n*log(a*x**n)**S(2)/n + S(6)*x**n*log(a*x**n)/n - S(6)*x**n/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(a*x**n)**S(3), x), x, -S(3)*n**S(3)*x**S(4)/S(128) + S(3)*n**S(2)*x**S(4)*log(a*x**n)/S(32) - S(3)*n*x**S(4)*log(a*x**n)**S(2)/S(16) + x**S(4)*log(a*x**n)**S(3)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(a*x**n)**S(3), x), x, -S(2)*n**S(3)*x**S(3)/S(27) + S(2)*n**S(2)*x**S(3)*log(a*x**n)/S(9) - n*x**S(3)*log(a*x**n)**S(2)/S(3) + x**S(3)*log(a*x**n)**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(a*x**n)**S(3), x), x, -S(3)*n**S(3)*x**S(2)/S(8) + S(3)*n**S(2)*x**S(2)*log(a*x**n)/S(4) - S(3)*n*x**S(2)*log(a*x**n)**S(2)/S(4) + x**S(2)*log(a*x**n)**S(3)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**S(3), x), x, -S(6)*n**S(3)*x + S(6)*n**S(2)*x*log(a*x**n) - S(3)*n*x*log(a*x**n)**S(2) + x*log(a*x**n)**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**S(3)/x, x), x, log(a*x**n)**S(4)/(S(4)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**S(3)/x**S(2), x), x, -S(6)*n**S(3)/x - S(6)*n**S(2)*log(a*x**n)/x - S(3)*n*log(a*x**n)**S(2)/x - log(a*x**n)**S(3)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**S(3)/x**S(3), x), x, -S(3)*n**S(3)/(S(8)*x**S(2)) - S(3)*n**S(2)*log(a*x**n)/(S(4)*x**S(2)) - S(3)*n*log(a*x**n)**S(2)/(S(4)*x**S(2)) - log(a*x**n)**S(3)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)*log(a*x), x), x, S(2)*x**(S(7)/2)*log(a*x)/S(7) - S(4)*x**(S(7)/2)/S(49), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*log(a*x), x), x, S(2)*x**(S(5)/2)*log(a*x)/S(5) - S(4)*x**(S(5)/2)/S(25), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*log(a*x), x), x, S(2)*x**(S(3)/2)*log(a*x)/S(3) - S(4)*x**(S(3)/2)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)/sqrt(x), x), x, S(2)*sqrt(x)*log(a*x) - S(4)*sqrt(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)/x**(S(3)/2), x), x, -S(2)*log(a*x)/sqrt(x) - S(4)/sqrt(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)/x**(S(5)/2), x), x, -S(2)*log(a*x)/(S(3)*x**(S(3)/2)) - S(4)/(S(9)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(a*x**n), x), x, x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*Ei((m + S(1))*log(a*x**n)/n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))/log(a*x**n), x), x, li(a*x**n)/(a*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(a*x**n), x), x, x**S(4)*(a*x**n)**(-S(4)/n)*Ei(S(4)*log(a*x**n)/n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(a*x**n), x), x, x**S(3)*(a*x**n)**(-S(3)/n)*Ei(S(3)*log(a*x**n)/n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(a*x**n), x), x, x**S(2)*(a*x**n)**(-S(2)/n)*Ei(S(2)*log(a*x**n)/n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/log(a*x**n), x), x, x*(a*x**n)**(-S(1)/n)*Ei(log(a*x**n)/n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(a*x**n)), x), x, log(log(a*x**n))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(a*x**n)), x), x, (a*x**n)**(S(1)/n)*Ei(-log(a*x**n)/n)/(n*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(a*x**n)), x), x, (a*x**n)**(S(2)/n)*Ei(-S(2)*log(a*x**n)/n)/(n*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(a*x**n)**S(2), x), x, -x**(m + S(1))/(n*log(a*x**n)) + x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*(m + S(1))*Ei((m + S(1))*log(a*x**n)/n)/n**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))/log(a*x**n)**S(2), x), x, -x**n/(n*log(a*x**n)) + li(a*x**n)/(a*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(a*x**n)**S(2), x), x, -x**S(4)/(n*log(a*x**n)) + S(4)*x**S(4)*(a*x**n)**(-S(4)/n)*Ei(S(4)*log(a*x**n)/n)/n**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(a*x**n)**S(2), x), x, -x**S(3)/(n*log(a*x**n)) + S(3)*x**S(3)*(a*x**n)**(-S(3)/n)*Ei(S(3)*log(a*x**n)/n)/n**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(a*x**n)**S(2), x), x, -x**S(2)/(n*log(a*x**n)) + S(2)*x**S(2)*(a*x**n)**(-S(2)/n)*Ei(S(2)*log(a*x**n)/n)/n**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**(S(-2)), x), x, -x/(n*log(a*x**n)) + x*(a*x**n)**(-S(1)/n)*Ei(log(a*x**n)/n)/n**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(a*x**n)**S(2)), x), x, -S(1)/(n*log(a*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(a*x**n)**S(2)), x), x, -S(1)/(n*x*log(a*x**n)) - (a*x**n)**(S(1)/n)*Ei(-log(a*x**n)/n)/(n**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(a*x**n)**S(2)), x), x, -S(1)/(n*x**S(2)*log(a*x**n)) - S(2)*(a*x**n)**(S(2)/n)*Ei(-S(2)*log(a*x**n)/n)/(n**S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(a*x**n)**S(3), x), x, -x**(m + S(1))/(S(2)*n*log(a*x**n)**S(2)) - x**(m + S(1))*(m/S(2) + S(1)/2)/(n**S(2)*log(a*x**n)) + x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*(m + S(1))**S(2)*Ei((m + S(1))*log(a*x**n)/n)/(S(2)*n**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))/log(a*x**n)**S(3), x), x, -x**n/(S(2)*n*log(a*x**n)) - x**n/(S(2)*n*log(a*x**n)**S(2)) + li(a*x**n)/(S(2)*a*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(a*x**n)**S(3), x), x, -x**S(4)/(S(2)*n*log(a*x**n)**S(2)) - S(2)*x**S(4)/(n**S(2)*log(a*x**n)) + S(8)*x**S(4)*(a*x**n)**(-S(4)/n)*Ei(S(4)*log(a*x**n)/n)/n**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(a*x**n)**S(3), x), x, -x**S(3)/(S(2)*n*log(a*x**n)**S(2)) - S(3)*x**S(3)/(S(2)*n**S(2)*log(a*x**n)) + S(9)*x**S(3)*(a*x**n)**(-S(3)/n)*Ei(S(3)*log(a*x**n)/n)/(S(2)*n**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(a*x**n)**S(3), x), x, -x**S(2)/(S(2)*n*log(a*x**n)**S(2)) - x**S(2)/(n**S(2)*log(a*x**n)) + S(2)*x**S(2)*(a*x**n)**(-S(2)/n)*Ei(S(2)*log(a*x**n)/n)/n**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**(S(-3)), x), x, -x/(S(2)*n*log(a*x**n)**S(2)) - x/(S(2)*n**S(2)*log(a*x**n)) + x*(a*x**n)**(-S(1)/n)*Ei(log(a*x**n)/n)/(S(2)*n**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(a*x**n)**S(3)), x), x, -S(1)/(S(2)*n*log(a*x**n)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(a*x**n)**S(3)), x), x, -S(1)/(S(2)*n*x*log(a*x**n)**S(2)) + S(1)/(S(2)*n**S(2)*x*log(a*x**n)) + (a*x**n)**(S(1)/n)*Ei(-log(a*x**n)/n)/(S(2)*n**S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(a*x**n)**S(3)), x), x, -S(1)/(S(2)*n*x**S(2)*log(a*x**n)**S(2)) + S(1)/(n**S(2)*x**S(2)*log(a*x**n)) + S(2)*(a*x**n)**(S(2)/n)*Ei(-S(2)*log(a*x**n)/n)/(n**S(3)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(a*x), x), x, x**(m + S(1))*(a*x)**(-m + S(-1))*Ei((m + S(1))*log(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(a*x), x), x, Ei(S(4)*log(a*x))/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(a*x), x), x, Ei(S(3)*log(a*x))/a**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(a*x), x), x, Ei(S(2)*log(a*x))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/log(a*x), x), x, li(a*x)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(a*x)), x), x, log(log(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(a*x)), x), x, a*Ei(-log(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(a*x)), x), x, a**S(2)*Ei(-S(2)*log(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(a*x)**S(2), x), x, x**(m + S(1))*(a*x)**(-m + S(-1))*(m + S(1))*Ei((m + S(1))*log(a*x)) - x**(m + S(1))/log(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(a*x)**S(2), x), x, -x**S(4)/log(a*x) + S(4)*Ei(S(4)*log(a*x))/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(a*x)**S(2), x), x, -x**S(3)/log(a*x) + S(3)*Ei(S(3)*log(a*x))/a**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(a*x)**S(2), x), x, -x**S(2)/log(a*x) + S(2)*Ei(S(2)*log(a*x))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)**(S(-2)), x), x, -x/log(a*x) + li(a*x)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(a*x)**S(2)), x), x, -S(1)/log(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(a*x)**S(2)), x), x, -a*Ei(-log(a*x)) - S(1)/(x*log(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(a*x)**S(2)), x), x, -S(2)*a**S(2)*Ei(-S(2)*log(a*x)) - S(1)/(x**S(2)*log(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(a*x)**S(3), x), x, x**(m + S(1))*(a*x)**(-m + S(-1))*(m + S(1))**S(2)*Ei((m + S(1))*log(a*x))/S(2) - x**(m + S(1))*(m/S(2) + S(1)/2)/log(a*x) - x**(m + S(1))/(S(2)*log(a*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(a*x)**S(3), x), x, -S(2)*x**S(4)/log(a*x) - x**S(4)/(S(2)*log(a*x)**S(2)) + S(8)*Ei(S(4)*log(a*x))/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(a*x)**S(3), x), x, -S(3)*x**S(3)/(S(2)*log(a*x)) - x**S(3)/(S(2)*log(a*x)**S(2)) + S(9)*Ei(S(3)*log(a*x))/(S(2)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(a*x)**S(3), x), x, -x**S(2)/log(a*x) - x**S(2)/(S(2)*log(a*x)**S(2)) + S(2)*Ei(S(2)*log(a*x))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)**(S(-3)), x), x, -x/(S(2)*log(a*x)) - x/(S(2)*log(a*x)**S(2)) + li(a*x)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(a*x)**S(3)), x), x, -S(1)/(S(2)*log(a*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(a*x)**S(3)), x), x, a*Ei(-log(a*x))/S(2) + S(1)/(S(2)*x*log(a*x)) - S(1)/(S(2)*x*log(a*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(a*x)**S(3)), x), x, S(2)*a**S(2)*Ei(-S(2)*log(a*x)) + S(1)/(x**S(2)*log(a*x)) - S(1)/(S(2)*x**S(2)*log(a*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sqrt(log(a*x**n)), x), x, -sqrt(pi)*sqrt(n)*x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*erfi(sqrt(m + S(1))*sqrt(log(a*x**n))/sqrt(n))/(S(2)*(m + S(1))**(S(3)/2)) + x**(m + S(1))*sqrt(log(a*x**n))/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(log(a*x**n)), x), x, -sqrt(pi)*sqrt(n)*x**S(4)*(a*x**n)**(-S(4)/n)*erfi(S(2)*sqrt(log(a*x**n))/sqrt(n))/S(16) + x**S(4)*sqrt(log(a*x**n))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(log(a*x**n)), x), x, -sqrt(S(3))*sqrt(pi)*sqrt(n)*x**S(3)*(a*x**n)**(-S(3)/n)*erfi(sqrt(S(3))*sqrt(log(a*x**n))/sqrt(n))/S(18) + x**S(3)*sqrt(log(a*x**n))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(log(a*x**n)), x), x, -sqrt(S(2))*sqrt(pi)*sqrt(n)*x**S(2)*(a*x**n)**(-S(2)/n)*erfi(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/S(8) + x**S(2)*sqrt(log(a*x**n))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(log(a*x**n)), x), x, -sqrt(pi)*sqrt(n)*x*(a*x**n)**(-S(1)/n)*erfi(sqrt(log(a*x**n))/sqrt(n))/S(2) + x*sqrt(log(a*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(log(a*x**n))/x, x), x, S(2)*log(a*x**n)**(S(3)/2)/(S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(log(a*x**n))/x**S(2), x), x, sqrt(pi)*sqrt(n)*(a*x**n)**(S(1)/n)*erf(sqrt(log(a*x**n))/sqrt(n))/(S(2)*x) - sqrt(log(a*x**n))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(log(a*x**n))/x**S(3), x), x, sqrt(S(2))*sqrt(pi)*sqrt(n)*(a*x**n)**(S(2)/n)*erf(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/(S(8)*x**S(2)) - sqrt(log(a*x**n))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(a*x**n)**(S(3)/2), x), x, S(3)*sqrt(pi)*n**(S(3)/2)*x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*erfi(sqrt(m + S(1))*sqrt(log(a*x**n))/sqrt(n))/(S(4)*(m + S(1))**(S(5)/2)) - S(3)*n*x**(m + S(1))*sqrt(log(a*x**n))/(S(2)*(m + S(1))**S(2)) + x**(m + S(1))*log(a*x**n)**(S(3)/2)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(a*x**n)**(S(3)/2), x), x, S(3)*sqrt(pi)*n**(S(3)/2)*x**S(4)*(a*x**n)**(-S(4)/n)*erfi(S(2)*sqrt(log(a*x**n))/sqrt(n))/S(128) - S(3)*n*x**S(4)*sqrt(log(a*x**n))/S(32) + x**S(4)*log(a*x**n)**(S(3)/2)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(a*x**n)**(S(3)/2), x), x, sqrt(S(3))*sqrt(pi)*n**(S(3)/2)*x**S(3)*(a*x**n)**(-S(3)/n)*erfi(sqrt(S(3))*sqrt(log(a*x**n))/sqrt(n))/S(36) - n*x**S(3)*sqrt(log(a*x**n))/S(6) + x**S(3)*log(a*x**n)**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(a*x**n)**(S(3)/2), x), x, S(3)*sqrt(S(2))*sqrt(pi)*n**(S(3)/2)*x**S(2)*(a*x**n)**(-S(2)/n)*erfi(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/S(32) - S(3)*n*x**S(2)*sqrt(log(a*x**n))/S(8) + x**S(2)*log(a*x**n)**(S(3)/2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**(S(3)/2), x), x, S(3)*sqrt(pi)*n**(S(3)/2)*x*(a*x**n)**(-S(1)/n)*erfi(sqrt(log(a*x**n))/sqrt(n))/S(4) - S(3)*n*x*sqrt(log(a*x**n))/S(2) + x*log(a*x**n)**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**(S(3)/2)/x, x), x, S(2)*log(a*x**n)**(S(5)/2)/(S(5)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**(S(3)/2)/x**S(2), x), x, S(3)*sqrt(pi)*n**(S(3)/2)*(a*x**n)**(S(1)/n)*erf(sqrt(log(a*x**n))/sqrt(n))/(S(4)*x) - S(3)*n*sqrt(log(a*x**n))/(S(2)*x) - log(a*x**n)**(S(3)/2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**(S(3)/2)/x**S(3), x), x, S(3)*sqrt(S(2))*sqrt(pi)*n**(S(3)/2)*(a*x**n)**(S(2)/n)*erf(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/(S(32)*x**S(2)) - S(3)*n*sqrt(log(a*x**n))/(S(8)*x**S(2)) - log(a*x**n)**(S(3)/2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/sqrt(log(a*x**n)), x), x, sqrt(pi)*x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*erfi(sqrt(m + S(1))*sqrt(log(a*x**n))/sqrt(n))/(sqrt(n)*sqrt(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(log(a*x**n)), x), x, sqrt(pi)*x**S(4)*(a*x**n)**(-S(4)/n)*erfi(S(2)*sqrt(log(a*x**n))/sqrt(n))/(S(2)*sqrt(n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(log(a*x**n)), x), x, sqrt(S(3))*sqrt(pi)*x**S(3)*(a*x**n)**(-S(3)/n)*erfi(sqrt(S(3))*sqrt(log(a*x**n))/sqrt(n))/(S(3)*sqrt(n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(log(a*x**n)), x), x, sqrt(S(2))*sqrt(pi)*x**S(2)*(a*x**n)**(-S(2)/n)*erfi(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/(S(2)*sqrt(n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(log(a*x**n)), x), x, sqrt(pi)*x*(a*x**n)**(-S(1)/n)*erfi(sqrt(log(a*x**n))/sqrt(n))/sqrt(n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(log(a*x**n))), x), x, S(2)*sqrt(log(a*x**n))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(log(a*x**n))), x), x, sqrt(pi)*(a*x**n)**(S(1)/n)*erf(sqrt(log(a*x**n))/sqrt(n))/(sqrt(n)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(log(a*x**n))), x), x, sqrt(S(2))*sqrt(pi)*(a*x**n)**(S(2)/n)*erf(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/(S(2)*sqrt(n)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(a*x**n)**(S(3)/2), x), x, -S(2)*x**(m + S(1))/(n*sqrt(log(a*x**n))) + S(2)*sqrt(pi)*x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*sqrt(m + S(1))*erfi(sqrt(m + S(1))*sqrt(log(a*x**n))/sqrt(n))/n**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(a*x**n)**(S(3)/2), x), x, -S(2)*x**S(4)/(n*sqrt(log(a*x**n))) + S(4)*sqrt(pi)*x**S(4)*(a*x**n)**(-S(4)/n)*erfi(S(2)*sqrt(log(a*x**n))/sqrt(n))/n**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(a*x**n)**(S(3)/2), x), x, -S(2)*x**S(3)/(n*sqrt(log(a*x**n))) + S(2)*sqrt(S(3))*sqrt(pi)*x**S(3)*(a*x**n)**(-S(3)/n)*erfi(sqrt(S(3))*sqrt(log(a*x**n))/sqrt(n))/n**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(a*x**n)**(S(3)/2), x), x, -S(2)*x**S(2)/(n*sqrt(log(a*x**n))) + S(2)*sqrt(S(2))*sqrt(pi)*x**S(2)*(a*x**n)**(-S(2)/n)*erfi(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/n**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**(S(-3)/2), x), x, -S(2)*x/(n*sqrt(log(a*x**n))) + S(2)*sqrt(pi)*x*(a*x**n)**(-S(1)/n)*erfi(sqrt(log(a*x**n))/sqrt(n))/n**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(a*x**n)**(S(3)/2)), x), x, -S(2)/(n*sqrt(log(a*x**n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(a*x**n)**(S(3)/2)), x), x, -S(2)/(n*x*sqrt(log(a*x**n))) - S(2)*sqrt(pi)*(a*x**n)**(S(1)/n)*erf(sqrt(log(a*x**n))/sqrt(n))/(n**(S(3)/2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(a*x**n)**(S(3)/2)), x), x, -S(2)/(n*x**S(2)*sqrt(log(a*x**n))) - S(2)*sqrt(S(2))*sqrt(pi)*(a*x**n)**(S(2)/n)*erf(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/(n**(S(3)/2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(a*x**n)**(S(5)/2), x), x, -S(2)*x**(m + S(1))/(S(3)*n*log(a*x**n)**(S(3)/2)) - x**(m + S(1))*(S(4)*m/S(3) + S(4)/3)/(n**S(2)*sqrt(log(a*x**n))) + S(4)*sqrt(pi)*x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*(m + S(1))**(S(3)/2)*erfi(sqrt(m + S(1))*sqrt(log(a*x**n))/sqrt(n))/(S(3)*n**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(a*x**n)**(S(5)/2), x), x, -S(2)*x**S(4)/(S(3)*n*log(a*x**n)**(S(3)/2)) - S(16)*x**S(4)/(S(3)*n**S(2)*sqrt(log(a*x**n))) + S(32)*sqrt(pi)*x**S(4)*(a*x**n)**(-S(4)/n)*erfi(S(2)*sqrt(log(a*x**n))/sqrt(n))/(S(3)*n**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(a*x**n)**(S(5)/2), x), x, -S(2)*x**S(3)/(S(3)*n*log(a*x**n)**(S(3)/2)) - S(4)*x**S(3)/(n**S(2)*sqrt(log(a*x**n))) + S(4)*sqrt(S(3))*sqrt(pi)*x**S(3)*(a*x**n)**(-S(3)/n)*erfi(sqrt(S(3))*sqrt(log(a*x**n))/sqrt(n))/n**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(a*x**n)**(S(5)/2), x), x, -S(2)*x**S(2)/(S(3)*n*log(a*x**n)**(S(3)/2)) - S(8)*x**S(2)/(S(3)*n**S(2)*sqrt(log(a*x**n))) + S(8)*sqrt(S(2))*sqrt(pi)*x**S(2)*(a*x**n)**(-S(2)/n)*erfi(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/(S(3)*n**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**(S(-5)/2), x), x, -S(2)*x/(S(3)*n*log(a*x**n)**(S(3)/2)) - S(4)*x/(S(3)*n**S(2)*sqrt(log(a*x**n))) + S(4)*sqrt(pi)*x*(a*x**n)**(-S(1)/n)*erfi(sqrt(log(a*x**n))/sqrt(n))/(S(3)*n**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(a*x**n)**(S(5)/2)), x), x, -S(2)/(S(3)*n*log(a*x**n)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(a*x**n)**(S(5)/2)), x), x, -S(2)/(S(3)*n*x*log(a*x**n)**(S(3)/2)) + S(4)/(S(3)*n**S(2)*x*sqrt(log(a*x**n))) + S(4)*sqrt(pi)*(a*x**n)**(S(1)/n)*erf(sqrt(log(a*x**n))/sqrt(n))/(S(3)*n**(S(5)/2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(a*x**n)**(S(5)/2)), x), x, -S(2)/(S(3)*n*x**S(2)*log(a*x**n)**(S(3)/2)) + S(8)/(S(3)*n**S(2)*x**S(2)*sqrt(log(a*x**n))) + S(8)*sqrt(S(2))*sqrt(pi)*(a*x**n)**(S(2)/n)*erf(sqrt(S(2))*sqrt(log(a*x**n))/sqrt(n))/(S(3)*n**(S(5)/2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(a*x)**p, x), x, x**(m + S(1))*(a*x)**(-m + S(-1))*((-m + S(-1))*log(a*x))**(-p)*Gamma(p + S(1), (-m + S(-1))*log(a*x))*log(a*x)**p/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(a*x)**p, x), x, S(4)**(-p + S(-1))*(-log(a*x))**(-p)*Gamma(p + S(1), -S(4)*log(a*x))*log(a*x)**p/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(a*x)**p, x), x, S(3)**(-p + S(-1))*(-log(a*x))**(-p)*Gamma(p + S(1), -S(3)*log(a*x))*log(a*x)**p/a**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(a*x)**p, x), x, S(2)**(-p + S(-1))*(-log(a*x))**(-p)*Gamma(p + S(1), -S(2)*log(a*x))*log(a*x)**p/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)**p, x), x, (-log(a*x))**(-p)*Gamma(p + S(1), -log(a*x))*log(a*x)**p/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)**p/x, x), x, log(a*x)**(p + S(1))/(p + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)**p/x**S(2), x), x, -a*Gamma(p + S(1), log(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)**p/x**S(3), x), x, -S(2)**(-p + S(-1))*a**S(2)*Gamma(p + S(1), S(2)*log(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(a*x**n)**p, x), x, x**(m + S(1))*(a*x**n)**(-(m + S(1))/n)*((-m + S(-1))*log(a*x**n)/n)**(-p)*Gamma(p + S(1), (-m + S(-1))*log(a*x**n)/n)*log(a*x**n)**p/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*log(a*x**n)**p, x), x, (-log(a*x**n))**(-p)*Gamma(p + S(1), -log(a*x**n))*log(a*x**n)**p/(a*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(a*x**n)**p, x), x, S(4)**(-p + S(-1))*x**S(4)*(a*x**n)**(-S(4)/n)*(-log(a*x**n)/n)**(-p)*Gamma(p + S(1), -S(4)*log(a*x**n)/n)*log(a*x**n)**p, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(a*x**n)**p, x), x, S(3)**(-p + S(-1))*x**S(3)*(a*x**n)**(-S(3)/n)*(-log(a*x**n)/n)**(-p)*Gamma(p + S(1), -S(3)*log(a*x**n)/n)*log(a*x**n)**p, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(a*x**n)**p, x), x, S(2)**(-p + S(-1))*x**S(2)*(a*x**n)**(-S(2)/n)*(-log(a*x**n)/n)**(-p)*Gamma(p + S(1), -S(2)*log(a*x**n)/n)*log(a*x**n)**p, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**p, x), x, x*(a*x**n)**(-S(1)/n)*(-log(a*x**n)/n)**(-p)*Gamma(p + S(1), -log(a*x**n)/n)*log(a*x**n)**p, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**p/x, x), x, log(a*x**n)**(p + S(1))/(n*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**p/x**S(2), x), x, -(a*x**n)**(S(1)/n)*(log(a*x**n)/n)**(-p)*Gamma(p + S(1), log(a*x**n)/n)*log(a*x**n)**p/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)**p/x**S(3), x), x, -S(2)**(-p + S(-1))*(a*x**n)**(S(2)/n)*(log(a*x**n)/n)**(-p)*Gamma(p + S(1), S(2)*log(a*x**n)/n)*log(a*x**n)**p/x**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(b*x**n)**p), x), x, -n*p*x**(m + S(1))/(m + S(1))**S(2) + x**(m + S(1))*log(c*(b*x**n)**p)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(b*x**n)**p), x), x, -n*p*x**S(3)/S(9) + x**S(3)*log(c*(b*x**n)**p)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(b*x**n)**p), x), x, -n*p*x**S(2)/S(4) + x**S(2)*log(c*(b*x**n)**p)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p), x), x, -n*p*x + x*log(c*(b*x**n)**p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)/x, x), x, log(c*(b*x**n)**p)**S(2)/(S(2)*n*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)/x**S(2), x), x, -n*p/x - log(c*(b*x**n)**p)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)/x**S(3), x), x, -n*p/(S(4)*x**S(2)) - log(c*(b*x**n)**p)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)/x**S(4), x), x, -n*p/(S(9)*x**S(3)) - log(c*(b*x**n)**p)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(b*x**n)**p)**S(2), x), x, S(2)*n**S(2)*p**S(2)*x**(m + S(1))/(m + S(1))**S(3) - S(2)*n*p*x**(m + S(1))*log(c*(b*x**n)**p)/(m + S(1))**S(2) + x**(m + S(1))*log(c*(b*x**n)**p)**S(2)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(b*x**n)**p)**S(2), x), x, S(2)*n**S(2)*p**S(2)*x**S(3)/S(27) - S(2)*n*p*x**S(3)*log(c*(b*x**n)**p)/S(9) + x**S(3)*log(c*(b*x**n)**p)**S(2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(b*x**n)**p)**S(2), x), x, n**S(2)*p**S(2)*x**S(2)/S(4) - n*p*x**S(2)*log(c*(b*x**n)**p)/S(2) + x**S(2)*log(c*(b*x**n)**p)**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)**S(2), x), x, S(2)*n**S(2)*p**S(2)*x - S(2)*n*p*x*log(c*(b*x**n)**p) + x*log(c*(b*x**n)**p)**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)**S(2)/x, x), x, log(c*(b*x**n)**p)**S(3)/(S(3)*n*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)**S(2)/x**S(2), x), x, -S(2)*n**S(2)*p**S(2)/x - S(2)*n*p*log(c*(b*x**n)**p)/x - log(c*(b*x**n)**p)**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)**S(2)/x**S(3), x), x, -n**S(2)*p**S(2)/(S(4)*x**S(2)) - n*p*log(c*(b*x**n)**p)/(S(2)*x**S(2)) - log(c*(b*x**n)**p)**S(2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(b*x**n)**p)**S(2)/x**S(4), x), x, -S(2)*n**S(2)*p**S(2)/(S(27)*x**S(3)) - S(2)*n*p*log(c*(b*x**n)**p)/(S(9)*x**S(3)) - log(c*(b*x**n)**p)**S(2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(c*(b*x**n)**p), x), x, x**(m + S(1))*(c*(b*x**n)**p)**(-(m + S(1))/(n*p))*Ei((m + S(1))*log(c*(b*x**n)**p)/(n*p))/(n*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(c*(b*x**n)**p)**S(2), x), x, -x**(m + S(1))/(n*p*log(c*(b*x**n)**p)) + x**(m + S(1))*(c*(b*x**n)**p)**(-(m + S(1))/(n*p))*(m + S(1))*Ei((m + S(1))*log(c*(b*x**n)**p)/(n*p))/(n**S(2)*p**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(b*x**n)**p)**q, x), x, x**(m + S(1))*(c*(b*x**n)**p)**(-(m + S(1))/(n*p))*((-m + S(-1))*log(c*(b*x**n)**p)/(n*p))**(-q)*Gamma(q + S(1), (-m + S(-1))*log(c*(b*x**n)**p)/(n*p))*log(c*(b*x**n)**p)**q/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**m*log(c*x), x), x, (a + b*x)**(m + S(1))*log(c*x)/(b*(m + S(1))) + (a + b*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), S(1) + b*x/a)/(a*b*(m**S(2) + S(3)*m + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*log(c*x), x), x, -a**S(4)*log(x)/(S(4)*b) - a**S(3)*x - S(3)*a**S(2)*b*x**S(2)/S(4) - a*b**S(2)*x**S(3)/S(3) - b**S(3)*x**S(4)/S(16) + (a + b*x)**S(4)*log(c*x)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*log(c*x), x), x, -a**S(3)*log(x)/(S(3)*b) - a**S(2)*x - a*b*x**S(2)/S(2) - b**S(2)*x**S(3)/S(9) + (a + b*x)**S(3)*log(c*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*log(c*x), x), x, -a*x - b*x**S(2)/S(4) + x*(S(2)*a + b*x)*log(c*x)/S(2), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x)*log(c*x), x), x, -a**S(2)*log(x)/(S(2)*b) - a*x - b*x**S(2)/S(4) + (a + b*x)**S(2)*log(c*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x)/(a + b*x), x), x, log((a + b*x)/a)*log(c*x)/b + polylog(S(2), -b*x/a)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x)/(a + b*x)**S(2), x), x, -log(c*x)/(b*(a + b*x)) + log(x)/(a*b) - log(a + b*x)/(a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x)/(a + b*x)**S(3), x), x, -log(c*x)/(S(2)*b*(a + b*x)**S(2)) + S(1)/(S(2)*a*b*(a + b*x)) + log(x)/(S(2)*a**S(2)*b) - log(a + b*x)/(S(2)*a**S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x)/(a + b*x)**S(4), x), x, -log(c*x)/(S(3)*b*(a + b*x)**S(3)) + S(1)/(S(6)*a*b*(a + b*x)**S(2)) + S(1)/(S(3)*a**S(2)*b*(a + b*x)) + log(x)/(S(3)*a**S(3)*b) - log(a + b*x)/(S(3)*a**S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**m*log(c*x**n), x), x, (a + b*x)**(m + S(1))*log(c*x**n)/(b*(m + S(1))) + n*(a + b*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), S(1) + b*x/a)/(a*b*(m**S(2) + S(3)*m + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*log(c*x**n), x), x, -a**S(4)*n*log(x)/(S(4)*b) - a**S(3)*n*x - S(3)*a**S(2)*b*n*x**S(2)/S(4) - a*b**S(2)*n*x**S(3)/S(3) - b**S(3)*n*x**S(4)/S(16) + (a + b*x)**S(4)*log(c*x**n)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*log(c*x**n), x), x, -a**S(3)*n*log(x)/(S(3)*b) - a**S(2)*n*x - a*b*n*x**S(2)/S(2) - b**S(2)*n*x**S(3)/S(9) + (a + b*x)**S(3)*log(c*x**n)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*log(c*x**n), x), x, -a**S(2)*n*log(x)/(S(2)*b) - a*n*x - b*n*x**S(2)/S(4) + (a + b*x)**S(2)*log(c*x**n)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**n)/(a + b*x), x), x, n*polylog(S(2), -b*x/a)/b + log((a + b*x)/a)*log(c*x**n)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**n)/(a + b*x)**S(2), x), x, -log(c*x**n)/(b*(a + b*x)) + n*log(x)/(a*b) - n*log(a + b*x)/(a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**n)/(a + b*x)**S(3), x), x, -log(c*x**n)/(S(2)*b*(a + b*x)**S(2)) + n/(S(2)*a*b*(a + b*x)) + n*log(x)/(S(2)*a**S(2)*b) - n*log(a + b*x)/(S(2)*a**S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**n)/(a + b*x)**S(4), x), x, -log(c*x**n)/(S(3)*b*(a + b*x)**S(3)) + n/(S(6)*a*b*(a + b*x)**S(2)) + n/(S(3)*a**S(2)*b*(a + b*x)) + n*log(x)/(S(3)*a**S(3)*b) - n*log(a + b*x)/(S(3)*a**S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**n)/(S(4)*x + S(2))**S(2), x), x, n*log(x)/S(8) - n*log(S(2)*x + S(1))/S(8) - log(c*x**n)/(S(8)*(S(2)*x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)/(-a*x + S(1)), x), x, polylog(S(2), -a*x + S(1))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x/a)/(a - x), x), x, polylog(S(2), (a - x)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(a*x**S(2))/(-a*x**S(2) + S(1)), x), x, polylog(S(2), -a*x**S(2) + S(1))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(x**S(2)/a)/(a - x**S(2)), x), x, polylog(S(2), (a - x**S(2))/a)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*log(a*x**n)/(-a*x**n + S(1)), x), x, polylog(S(2), -a*x**n + S(1))/(a*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*log(x**n/a)/(a - x**n), x), x, polylog(S(2), (a - x**n)/a)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a/x)/(a*x - x**S(2)), x), x, polylog(S(2), -a/x + S(1))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a/x**S(2))/(a*x - x**S(3)), x), x, polylog(S(2), (-a + x**S(2))/x**S(2))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**(-n + S(1)))/(a*x - x**n), x), x, -polylog(S(2), -a*x**(-n + S(1)) + S(1))/(a*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(-a*x**(-m)*(-c + S(1))/b + c)/(x*(a + b*x**m)), x), x, polylog(S(2), x**(-m)*(a + b*x**m)*(-c + S(1))/b)/(a*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**(-m)*(a*c - a + b*c*x**m)/b)/(x*(a + b*x**m)), x), x, polylog(S(2), x**(-m)*(a + b*x**m)*(-c + S(1))/b)/(a*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + x**(-m)*(a*c*d - d)/(c*e)))/(x*(d + e*x**m)), x), x, polylog(S(2), x**(-m)*(d + e*x**m)*(-a*c + S(1))/e)/(d*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**(-m)*(a*c*d + a*c*e*x**m - d)/e)/(x*(d + e*x**m)), x), x, polylog(S(2), x**(-m)*(d + e*x**m)*(-a*c + S(1))/e)/(d*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(2)*a/(a + b*x))/(a**S(2) - b**S(2)*x**S(2)), x), x, polylog(S(2), (-a + b*x)/(a + b*x))/(S(2)*a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(2)*a/(a + b*x))/((a - b*x)*(a + b*x)), x), x, polylog(S(2), (-a + b*x)/(a + b*x))/(S(2)*a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((a*(-c + S(1)) + b*x*(c + S(1)))/(a + b*x))/(a**S(2) - b**S(2)*x**S(2)), x), x, polylog(S(2), c*(a - b*x)/(a + b*x))/(S(2)*a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((a*(-c + S(1)) + b*x*(c + S(1)))/(a + b*x))/((a - b*x)*(a + b*x)), x), x, polylog(S(2), c*(a - b*x)/(a + b*x))/(S(2)*a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(-c*(a - b*x)/(a + b*x) + S(1))/(a**S(2) - b**S(2)*x**S(2)), x), x, polylog(S(2), c*(a - b*x)/(a + b*x))/(S(2)*a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(-c*(a - b*x)/(a + b*x) + S(1))/((a - b*x)*(a + b*x)), x), x, polylog(S(2), c*(a - b*x)/(a + b*x))/(S(2)*a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*x**n))/(d + e*x**S(2)), x), x, -I*b*n*polylog(S(2), -I*sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*sqrt(e)) + I*b*n*polylog(S(2), I*sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*sqrt(e)) + (a + b*log(c*x**n))*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*x**n))/(d + e*x + f*x**S(2)), x), x, b*n*polylog(S(2), -S(2)*f*x/(e - sqrt(-S(4)*d*f + e**S(2))))/sqrt(-S(4)*d*f + e**S(2)) - b*n*polylog(S(2), -S(2)*f*x/(e + sqrt(-S(4)*d*f + e**S(2))))/sqrt(-S(4)*d*f + e**S(2)) + (a + b*log(c*x**n))*log((e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/(e - sqrt(-S(4)*d*f + e**S(2))))/sqrt(-S(4)*d*f + e**S(2)) - (a + b*log(c*x**n))*log((e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/(e + sqrt(-S(4)*d*f + e**S(2))))/sqrt(-S(4)*d*f + e**S(2)), expand=True, _diff=True, _numerical=True) # same result as in mathematica but fails assert rubi_test(rubi_integrate((d + e*x)**m*log(c*x)/x, x), x, (d + e*x)**m*(d/(e*x) + S(1))**(-m)*log(c*x)*hyper((-m, -m), (-m + S(1),), -d/(e*x))/m - (d + e*x)**m*(d/(e*x) + S(1))**(-m)*hyper((-m, -m, -m), (-m + S(1), -m + S(1)), -d/(e*x))/m**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*x**n))**S(3), x), x, S(6)*a*b**S(2)*n**S(2)*x - S(6)*b**S(3)*n**S(3)*x + S(6)*b**S(3)*n**S(2)*x*log(c*x**n) - S(3)*b*n*x*(a + b*log(c*x**n))**S(2) + x*(a + b*log(c*x**n))**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*x**n))**S(2), x), x, -S(2)*a*b*n*x + S(2)*b**S(2)*n**S(2)*x - S(2)*b**S(2)*n*x*log(c*x**n) + x*(a + b*log(c*x**n))**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a + b*log(c*x**n), x), x, a*x - b*n*x + b*x*log(c*x**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*log(c*x**n)), x), x, x*(c*x**n)**(-S(1)/n)*exp(-a/(b*n))*Ei((a + b*log(c*x**n))/(b*n))/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*x**n))**(S(-2)), x), x, -x/(b*n*(a + b*log(c*x**n))) + x*(c*x**n)**(-S(1)/n)*exp(-a/(b*n))*Ei((a + b*log(c*x**n))/(b*n))/(b**S(2)*n**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*x**n))**(S(-3)), x), x, -x/(S(2)*b*n*(a + b*log(c*x**n))**S(2)) - x/(S(2)*b**S(2)*n**S(2)*(a + b*log(c*x**n))) + x*(c*x**n)**(-S(1)/n)*exp(-a/(b*n))*Ei((a + b*log(c*x**n))/(b*n))/(S(2)*b**S(3)*n**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(c*x**n))**m, x), x, x*(c*x**n)**(-S(1)/n)*((-a - b*log(c*x**n))/(b*n))**(-m)*(a + b*log(c*x**n))**m*Gamma(m + S(1), (-a - b*log(c*x**n))/(b*n))*exp(-a/(b*n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(a + b*log(c*x**n)), x), x, x**(m + S(1))*(c*x**n)**(-(m + S(1))/n)*exp(-a*(m + S(1))/(b*n))*Ei((a + b*log(c*x**n))*(m + S(1))/(b*n))/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(a + b*log(c*x**n))**S(2), x), x, -x**(m + S(1))/(b*n*(a + b*log(c*x**n))) + x**(m + S(1))*(c*x**n)**(-(m + S(1))/n)*(m + S(1))*exp(-a*(m + S(1))/(b*n))*Ei((a + b*log(c*x**n))*(m + S(1))/(b*n))/(b**S(2)*n**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a + b*log(c*x**n))**p, x), x, x**(m + S(1))*(c*x**n)**(-(m + S(1))/n)*((a + b*log(c*x**n))*(-m + S(-1))/(b*n))**(-p)*(a + b*log(c*x**n))**p*Gamma(p + S(1), (a + b*log(c*x**n))*(-m + S(-1))/(b*n))*exp(-a*(m + S(1))/(b*n))/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*log(-b*x**n/a)/(a + b*x**n), x), x, -polylog(S(2), (a + b*x**n)/a)/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(a + b*x**S(2))**p), x), x, x**(m + S(1))*log(c*(a + b*x**S(2))**p)/(m + S(1)) - S(2)*b*p*x**(m + S(3))*hyper((S(1), m/S(2) + S(3)/2), (m/S(2) + S(5)/2,), -b*x**S(2)/a)/(a*(m**S(2) + S(4)*m + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(c*(a + b*x**S(2))**p), x), x, S(2)*a**(S(5)/2)*p*atan(sqrt(b)*x/sqrt(a))/(S(5)*b**(S(5)/2)) - S(2)*a**S(2)*p*x/(S(5)*b**S(2)) + S(2)*a*p*x**S(3)/(S(15)*b) - S(2)*p*x**S(5)/S(25) + x**S(5)*log(c*(a + b*x**S(2))**p)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b*x**S(2))**p), x), x, -a**S(2)*p*log(a + b*x**S(2))/(S(4)*b**S(2)) + a*p*x**S(2)/(S(4)*b) - p*x**S(4)/S(8) + x**S(4)*log(c*(a + b*x**S(2))**p)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x**S(2))**p), x), x, -S(2)*a**(S(3)/2)*p*atan(sqrt(b)*x/sqrt(a))/(S(3)*b**(S(3)/2)) + S(2)*a*p*x/(S(3)*b) - S(2)*p*x**S(3)/S(9) + x**S(3)*log(c*(a + b*x**S(2))**p)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*x**S(2))**p), x), x, -p*x**S(2)/S(2) + (a/S(2) + b*x**S(2)/S(2))*log(c*(a + b*x**S(2))**p)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p), x), x, S(2)*sqrt(a)*p*atan(sqrt(b)*x/sqrt(a))/sqrt(b) - S(2)*p*x + x*log(c*(a + b*x**S(2))**p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/x, x), x, p*polylog(S(2), (a + b*x**S(2))/a)/S(2) + log(c*(a + b*x**S(2))**p)*log(-b*x**S(2)/a)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/x**S(2), x), x, -log(c*(a + b*x**S(2))**p)/x + S(2)*sqrt(b)*p*atan(sqrt(b)*x/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/x**S(3), x), x, b*p*log(x)/a - (a/S(2) + b*x**S(2)/S(2))*log(c*(a + b*x**S(2))**p)/(a*x**S(2)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/x**S(3), x), x, -log(c*(a + b*x**S(2))**p)/(S(2)*x**S(2)) + b*p*log(x)/a - b*p*log(a + b*x**S(2))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/x**S(4), x), x, -log(c*(a + b*x**S(2))**p)/(S(3)*x**S(3)) - S(2)*b*p/(S(3)*a*x) - S(2)*b**(S(3)/2)*p*atan(sqrt(b)*x/sqrt(a))/(S(3)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/x**S(5), x), x, -log(c*(a + b*x**S(2))**p)/(S(4)*x**S(4)) - b*p/(S(4)*a*x**S(2)) - b**S(2)*p*log(x)/(S(2)*a**S(2)) + b**S(2)*p*log(a + b*x**S(2))/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/x**S(6), x), x, -log(c*(a + b*x**S(2))**p)/(S(5)*x**S(5)) - S(2)*b*p/(S(15)*a*x**S(3)) + S(2)*b**S(2)*p/(S(5)*a**S(2)*x) + S(2)*b**(S(5)/2)*p*atan(sqrt(b)*x/sqrt(a))/(S(5)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/x**S(7), x), x, -log(c*(a + b*x**S(2))**p)/(S(6)*x**S(6)) - b*p/(S(12)*a*x**S(4)) + b**S(2)*p/(S(6)*a**S(2)*x**S(2)) + b**S(3)*p*log(x)/(S(3)*a**S(3)) - b**S(3)*p*log(a + b*x**S(2))/(S(6)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(a + b*x**S(3))**p), x), x, x**(m + S(1))*log(c*(a + b*x**S(3))**p)/(m + S(1)) - S(3)*b*p*x**(m + S(4))*hyper((S(1), m/S(3) + S(4)/3), (m/S(3) + S(7)/3,), -b*x**S(3)/a)/(a*(m**S(2) + S(5)*m + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*log(c*(a + b*x**S(3))**p), x), x, -a**S(2)*p*log(a + b*x**S(3))/(S(6)*b**S(2)) + a*p*x**S(3)/(S(6)*b) - p*x**S(6)/S(12) + x**S(6)*log(c*(a + b*x**S(3))**p)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(c*(a + b*x**S(3))**p), x), x, a**(S(5)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(5)*b**(S(5)/3)) - a**(S(5)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(10)*b**(S(5)/3)) + sqrt(S(3))*a**(S(5)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(5)*b**(S(5)/3)) + S(3)*a*p*x**S(2)/(S(10)*b) - S(3)*p*x**S(5)/S(25) + x**S(5)*log(c*(a + b*x**S(3))**p)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b*x**S(3))**p), x), x, -a**(S(4)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(4)*b**(S(4)/3)) + a**(S(4)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(8)*b**(S(4)/3)) + sqrt(S(3))*a**(S(4)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(4)*b**(S(4)/3)) + S(3)*a*p*x/(S(4)*b) - S(3)*p*x**S(4)/S(16) + x**S(4)*log(c*(a + b*x**S(3))**p)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x**S(3))**p), x), x, -p*x**S(3)/S(3) + (a/S(3) + b*x**S(3)/S(3))*log(c*(a + b*x**S(3))**p)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*x**S(3))**p), x), x, -a**(S(2)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(2)*b**(S(2)/3)) + a**(S(2)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(4)*b**(S(2)/3)) - sqrt(S(3))*a**(S(2)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(2)*b**(S(2)/3)) - S(3)*p*x**S(2)/S(4) + x**S(2)*log(c*(a + b*x**S(3))**p)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p), x), x, a**(S(1)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/b**(S(1)/3) - a**(S(1)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*b**(S(1)/3)) - sqrt(S(3))*a**(S(1)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/b**(S(1)/3) - S(3)*p*x + x*log(c*(a + b*x**S(3))**p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/x, x), x, p*polylog(S(2), (a + b*x**S(3))/a)/S(3) + log(c*(a + b*x**S(3))**p)*log(-b*x**S(3)/a)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/x**S(2), x), x, -log(c*(a + b*x**S(3))**p)/x - b**(S(1)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/a**(S(1)/3) + b**(S(1)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*a**(S(1)/3)) - sqrt(S(3))*b**(S(1)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/a**(S(1)/3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/x**S(3), x), x, -log(c*(a + b*x**S(3))**p)/(S(2)*x**S(2)) + b**(S(2)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(2)*a**(S(2)/3)) - b**(S(2)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(4)*a**(S(2)/3)) - sqrt(S(3))*b**(S(2)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(2)*a**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/x**S(4), x), x, -log(c*(a + b*x**S(3))**p)/(S(3)*x**S(3)) + b*p*log(x)/a - b*p*log(a + b*x**S(3))/(S(3)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/x**S(5), x), x, -log(c*(a + b*x**S(3))**p)/(S(4)*x**S(4)) - S(3)*b*p/(S(4)*a*x) + b**(S(4)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(4)*a**(S(4)/3)) - b**(S(4)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(8)*a**(S(4)/3)) + sqrt(S(3))*b**(S(4)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(4)*a**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/x**S(6), x), x, -log(c*(a + b*x**S(3))**p)/(S(5)*x**S(5)) - S(3)*b*p/(S(10)*a*x**S(2)) - b**(S(5)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(5)*a**(S(5)/3)) + b**(S(5)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(10)*a**(S(5)/3)) + sqrt(S(3))*b**(S(5)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(5)*a**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/x**S(7), x), x, -log(c*(a + b*x**S(3))**p)/(S(6)*x**S(6)) - b*p/(S(6)*a*x**S(3)) - b**S(2)*p*log(x)/(S(2)*a**S(2)) + b**S(2)*p*log(a + b*x**S(3))/(S(6)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(a + b*sqrt(x))**p), x), x, x**(m + S(1))*log(c*(a + b*sqrt(x))**p)/(m + S(1)) - b*p*x**(m + S(3)/2)*hyper((S(1), S(2)*m + S(3)), (S(2)*m + S(4),), -b*sqrt(x)/a)/(a*(S(2)*m**S(2) + S(5)*m + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b*sqrt(x))**p), x), x, -a**S(8)*p*log(a + b*sqrt(x))/(S(4)*b**S(8)) + a**S(7)*p*sqrt(x)/(S(4)*b**S(7)) - a**S(6)*p*x/(S(8)*b**S(6)) + a**S(5)*p*x**(S(3)/2)/(S(12)*b**S(5)) - a**S(4)*p*x**S(2)/(S(16)*b**S(4)) + a**S(3)*p*x**(S(5)/2)/(S(20)*b**S(3)) - a**S(2)*p*x**S(3)/(S(24)*b**S(2)) + a*p*x**(S(7)/2)/(S(28)*b) - p*x**S(4)/S(32) + x**S(4)*log(c*(a + b*sqrt(x))**p)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*sqrt(x))**p), x), x, -a**S(6)*p*log(a + b*sqrt(x))/(S(3)*b**S(6)) + a**S(5)*p*sqrt(x)/(S(3)*b**S(5)) - a**S(4)*p*x/(S(6)*b**S(4)) + a**S(3)*p*x**(S(3)/2)/(S(9)*b**S(3)) - a**S(2)*p*x**S(2)/(S(12)*b**S(2)) + a*p*x**(S(5)/2)/(S(15)*b) - p*x**S(3)/S(18) + x**S(3)*log(c*(a + b*sqrt(x))**p)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*sqrt(x))**p), x), x, -a**S(4)*p*log(a + b*sqrt(x))/(S(2)*b**S(4)) + a**S(3)*p*sqrt(x)/(S(2)*b**S(3)) - a**S(2)*p*x/(S(4)*b**S(2)) + a*p*x**(S(3)/2)/(S(6)*b) - p*x**S(2)/S(8) + x**S(2)*log(c*(a + b*sqrt(x))**p)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*sqrt(x))**p), x), x, -a**S(2)*p*log(a + b*sqrt(x))/b**S(2) + a*p*sqrt(x)/b - p*x/S(2) + x*log(c*(a + b*sqrt(x))**p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*sqrt(x))**p)/x, x), x, S(2)*p*polylog(S(2), (a + b*sqrt(x))/a) + S(2)*log(c*(a + b*sqrt(x))**p)*log(-b*sqrt(x)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*sqrt(x))**p)/x**S(2), x), x, -log(c*(a + b*sqrt(x))**p)/x - b*p/(a*sqrt(x)) - b**S(2)*p*log(x)/(S(2)*a**S(2)) + b**S(2)*p*log(a + b*sqrt(x))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*sqrt(x))**p)/x**S(3), x), x, -log(c*(a + b*sqrt(x))**p)/(S(2)*x**S(2)) - b*p/(S(6)*a*x**(S(3)/2)) + b**S(2)*p/(S(4)*a**S(2)*x) - b**S(3)*p/(S(2)*a**S(3)*sqrt(x)) - b**S(4)*p*log(x)/(S(4)*a**S(4)) + b**S(4)*p*log(a + b*sqrt(x))/(S(2)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*sqrt(x))**p)/x**S(4), x), x, -log(c*(a + b*sqrt(x))**p)/(S(3)*x**S(3)) - b*p/(S(15)*a*x**(S(5)/2)) + b**S(2)*p/(S(12)*a**S(2)*x**S(2)) - b**S(3)*p/(S(9)*a**S(3)*x**(S(3)/2)) + b**S(4)*p/(S(6)*a**S(4)*x) - b**S(5)*p/(S(3)*a**S(5)*sqrt(x)) - b**S(6)*p*log(x)/(S(6)*a**S(6)) + b**S(6)*p*log(a + b*sqrt(x))/(S(3)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*sqrt(x))/sqrt(x), x), x, -S(2)*sqrt(x) + S(2)*(a + b*sqrt(x))*log(a + b*sqrt(x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(a + b/x)**p), x), x, p*x**(m + S(1))*hyper((S(1), m + S(1)), (m + S(2),), -a*x/b)/(m + S(1))**S(2) + x**(m + S(1))*log(c*(a + b/x)**p)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(c*(a + b/x)**p), x), x, x**S(5)*log(c*(a + b/x)**p)/S(5) + b*p*x**S(4)/(S(20)*a) - b**S(2)*p*x**S(3)/(S(15)*a**S(2)) + b**S(3)*p*x**S(2)/(S(10)*a**S(3)) - b**S(4)*p*x/(S(5)*a**S(4)) + b**S(5)*p*log(a*x + b)/(S(5)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b/x)**p), x), x, x**S(4)*log(c*(a + b/x)**p)/S(4) + b*p*x**S(3)/(S(12)*a) - b**S(2)*p*x**S(2)/(S(8)*a**S(2)) + b**S(3)*p*x/(S(4)*a**S(3)) - b**S(4)*p*log(a*x + b)/(S(4)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b/x)**p), x), x, x**S(3)*log(c*(a + b/x)**p)/S(3) + b*p*x**S(2)/(S(6)*a) - b**S(2)*p*x/(S(3)*a**S(2)) + b**S(3)*p*log(a*x + b)/(S(3)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b/x)**p), x), x, x**S(2)*log(c*(a + b/x)**p)/S(2) + b*p*x/(S(2)*a) - b**S(2)*p*log(a*x + b)/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p), x), x, x*log(c*(a + b/x)**p) + b*p*log(a*x + b)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/x, x), x, -p*polylog(S(2), (a + b/x)/a) - log(c*(a + b/x)**p)*log(-b/(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/x**S(2), x), x, p/x - (a + b/x)*log(c*(a + b/x)**p)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/x**S(3), x), x, -a**S(2)*p*log(x)/(S(2)*b**S(2)) + a**S(2)*p*log(a*x + b)/(S(2)*b**S(2)) - a*p/(S(2)*b*x) + p/(S(4)*x**S(2)) - log(c*(a + b/x)**p)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/x**S(4), x), x, a**S(3)*p*log(x)/(S(3)*b**S(3)) - a**S(3)*p*log(a*x + b)/(S(3)*b**S(3)) + a**S(2)*p/(S(3)*b**S(2)*x) - a*p/(S(6)*b*x**S(2)) + p/(S(9)*x**S(3)) - log(c*(a + b/x)**p)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/x**S(5), x), x, -a**S(4)*p*log(x)/(S(4)*b**S(4)) + a**S(4)*p*log(a*x + b)/(S(4)*b**S(4)) - a**S(3)*p/(S(4)*b**S(3)*x) + a**S(2)*p/(S(8)*b**S(2)*x**S(2)) - a*p/(S(12)*b*x**S(3)) + p/(S(16)*x**S(4)) - log(c*(a + b/x)**p)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(b/x + S(1))/x, x), x, polylog(S(2), -b/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(a + b/x**S(2))**p), x), x, S(2)*p*x**(m + S(1))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -a*x**S(2)/b)/(m + S(1))**S(2) + x**(m + S(1))*log(c*(a + b/x**S(2))**p)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(c*(a + b/x**S(2))**p), x), x, x**S(5)*log(c*(a + b/x**S(2))**p)/S(5) + S(2)*b*p*x**S(3)/(S(15)*a) - S(2)*b**S(2)*p*x/(S(5)*a**S(2)) + S(2)*b**(S(5)/2)*p*atan(sqrt(a)*x/sqrt(b))/(S(5)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b/x**S(2))**p), x), x, x**S(4)*log(c*(a + b/x**S(2))**p)/S(4) + b*p*x**S(2)/(S(4)*a) - b**S(2)*p*log(a*x**S(2) + b)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b/x**S(2))**p), x), x, x**S(3)*log(c*(a + b/x**S(2))**p)/S(3) + S(2)*b*p*x/(S(3)*a) - S(2)*b**(S(3)/2)*p*atan(sqrt(a)*x/sqrt(b))/(S(3)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b/x**S(2))**p), x), x, x**S(2)*log(c*(a + b/x**S(2))**p)/S(2) + b*p*log(a*x**S(2) + b)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p), x), x, x*log(c*(a + b/x**S(2))**p) + S(2)*sqrt(b)*p*atan(sqrt(a)*x/sqrt(b))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p)/x, x), x, -p*polylog(S(2), (a + b/x**S(2))/a)/S(2) - log(c*(a + b/x**S(2))**p)*log(-b/(a*x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p)/x**S(2), x), x, S(2)*sqrt(a)*p*atan(sqrt(a)*x/sqrt(b))/sqrt(b) + S(2)*p/x - log(c*(a + b/x**S(2))**p)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p)/x**S(3), x), x, p/(S(2)*x**S(2)) - (a/S(2) + b/(S(2)*x**S(2)))*log(c*(a + b/x**S(2))**p)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p)/x**S(4), x), x, -S(2)*a**(S(3)/2)*p*atan(sqrt(a)*x/sqrt(b))/(S(3)*b**(S(3)/2)) - S(2)*a*p/(S(3)*b*x) + S(2)*p/(S(9)*x**S(3)) - log(c*(a + b/x**S(2))**p)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(c*(a + b*x**n)**p), x), x, x**(m + S(1))*log(c*(a + b*x**n)**p)/(m + S(1)) - b*n*p*x**(m + n + S(1))*hyper((S(1), (m + n + S(1))/n), ((m + S(2)*n + S(1))/n,), -b*x**n/a)/(a*(m + S(1))*(m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x**n)**p), x), x, x**S(3)*log(c*(a + b*x**n)**p)/S(3) - b*n*p*x**(n + S(3))*hyper((S(1), (n + S(3))/n), (S(2) + S(3)/n,), -b*x**n/a)/(S(3)*a*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*x**n)**p), x), x, x**S(2)*log(c*(a + b*x**n)**p)/S(2) - b*n*p*x**(n + S(2))*hyper((S(1), (n + S(2))/n), (S(2) + S(2)/n,), -b*x**n/a)/(S(2)*a*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**n)**p), x), x, x*log(c*(a + b*x**n)**p) - b*n*p*x**(n + S(1))*hyper((S(1), S(1) + S(1)/n), (S(2) + S(1)/n,), -b*x**n/a)/(a*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**n)**p)/x, x), x, p*polylog(S(2), (a + b*x**n)/a)/n + log(c*(a + b*x**n)**p)*log(-b*x**n/a)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**n)**p)/x**S(2), x), x, -log(c*(a + b*x**n)**p)/x - b*n*p*x**(n + S(-1))*hyper((S(1), (n + S(-1))/n), (S(2) - S(1)/n,), -b*x**n/a)/(a*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**n)**p)/x**S(3), x), x, -log(c*(a + b*x**n)**p)/(S(2)*x**S(2)) - b*n*p*x**(n + S(-2))*hyper((S(1), (n + S(-2))/n), (S(2) - S(2)/n,), -b*x**n/a)/(S(2)*a*(-n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**n)**p)/x**S(4), x), x, -log(c*(a + b*x**n)**p)/(S(3)*x**S(3)) - b*n*p*x**(n + S(-3))*hyper((S(1), (n + S(-3))/n), (S(2) - S(3)/n,), -b*x**n/a)/(S(3)*a*(-n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**m*log(c*(a + b*x)**p), x), x, b*p*(d + e*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), b*(d + e*x)/(-a*e + b*d))/(e*(m + S(1))*(m + S(2))*(-a*e + b*d)) + (d + e*x)**(m + S(1))*log(c*(a + b*x)**p)/(e*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)*log(c*(a + b*x)**p), x), x, -p*(d + e*x)**S(4)/(S(16)*e) + (d + e*x)**S(4)*log(c*(a + b*x)**p)/(S(4)*e) - p*(d + e*x)**S(3)*(-a*e/S(12) + b*d/S(12))/(b*e) - p*(d + e*x)**S(2)*(-a*e + b*d)**S(2)/(S(8)*b**S(2)*e) - p*x*(-a*e + b*d)**S(3)/(S(4)*b**S(3)) - p*(-a*e + b*d)**S(4)*log(a + b*x)/(S(4)*b**S(4)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(2)*log(c*(a + b*x)**p), x), x, -p*(d + e*x)**S(3)/(S(9)*e) + (d + e*x)**S(3)*log(c*(a + b*x)**p)/(S(3)*e) - p*(d + e*x)**S(2)*(-a*e/S(6) + b*d/S(6))/(b*e) - p*x*(-a*e + b*d)**S(2)/(S(3)*b**S(2)) - p*(-a*e + b*d)**S(3)*log(a + b*x)/(S(3)*b**S(3)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*log(c*(a + b*x)**p), x), x, -p*(d + e*x)**S(2)/(S(4)*e) + (d + e*x)**S(2)*log(c*(a + b*x)**p)/(S(2)*e) + p*x*(a*e/S(2) - b*d/S(2))/b - p*(-a*e + b*d)**S(2)*log(a + b*x)/(S(2)*b**S(2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p), x), x, -p*x + (a + b*x)*log(c*(a + b*x)**p)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p)/(d + e*x), x), x, p*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/e + log(c*(a + b*x)**p)*log(b*(d + e*x)/(-a*e + b*d))/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p)/(d + e*x)**S(2), x), x, b*p*log(a + b*x)/(e*(-a*e + b*d)) - b*p*log(d + e*x)/(e*(-a*e + b*d)) - log(c*(a + b*x)**p)/(e*(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p)/(d + e*x)**S(3), x), x, b**S(2)*p*log(a + b*x)/(S(2)*e*(-a*e + b*d)**S(2)) - b**S(2)*p*log(d + e*x)/(S(2)*e*(-a*e + b*d)**S(2)) + b*p/(S(2)*e*(d + e*x)*(-a*e + b*d)) - log(c*(a + b*x)**p)/(S(2)*e*(d + e*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p)/(d + e*x)**S(4), x), x, b**S(3)*p*log(a + b*x)/(S(3)*e*(-a*e + b*d)**S(3)) - b**S(3)*p*log(d + e*x)/(S(3)*e*(-a*e + b*d)**S(3)) + b**S(2)*p/(S(3)*e*(d + e*x)*(-a*e + b*d)**S(2)) + b*p/(S(6)*e*(d + e*x)**S(2)*(-a*e + b*d)) - log(c*(a + b*x)**p)/(S(3)*e*(d + e*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**m*log(c*(a + b*x**S(2))**p), x), x, sqrt(b)*p*(d + e*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/(e*(m + S(1))*(m + S(2))*(sqrt(b)*d + e*sqrt(-a))) + sqrt(b)*p*(d + e*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/(e*(m + S(1))*(m + S(2))*(sqrt(b)*d - e*sqrt(-a))) + (d + e*x)**(m + S(1))*log(c*(a + b*x**S(2))**p)/(e*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)*log(c*(a + b*x**S(2))**p), x), x, S(2)*sqrt(a)*d*p*(-a*e**S(2) + b*d**S(2))*atan(sqrt(b)*x/sqrt(a))/b**(S(3)/2) - S(2)*d*e**S(2)*p*x**S(3)/S(3) - e**S(3)*p*x**S(4)/S(8) + (d + e*x)**S(4)*log(c*(a + b*x**S(2))**p)/(S(4)*e) - S(2)*d*p*x*(-a*e**S(2) + b*d**S(2))/b - e*p*x**S(2)*(-a*e**S(2) + S(6)*b*d**S(2))/(S(4)*b) - p*(a**S(2)*e**S(4)/S(4) - S(3)*a*b*d**S(2)*e**S(2)/S(2) + b**S(2)*d**S(4)/S(4))*log(a + b*x**S(2))/(b**S(2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(2)*log(c*(a + b*x**S(2))**p), x), x, sqrt(a)*p*(-S(2)*a*e**S(2)/S(3) + S(2)*b*d**S(2))*atan(sqrt(b)*x/sqrt(a))/b**(S(3)/2) - d*e*p*x**S(2) - S(2)*e**S(2)*p*x**S(3)/S(9) + (d + e*x)**S(3)*log(c*(a + b*x**S(2))**p)/(S(3)*e) - d*p*(-S(3)*a*e**S(2) + b*d**S(2))*log(a + b*x**S(2))/(S(3)*b*e) + p*x*(S(2)*a*e**S(2)/S(3) - S(2)*b*d**S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*log(c*(a + b*x**S(2))**p), x), x, S(2)*sqrt(a)*d*p*atan(sqrt(b)*x/sqrt(a))/sqrt(b) - S(2)*d*p*x - e*p*x**S(2)/S(2) + (d + e*x)**S(2)*log(c*(a + b*x**S(2))**p)/(S(2)*e) - p*(-a*e**S(2)/S(2) + b*d**S(2)/S(2))*log(a + b*x**S(2))/(b*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p), x), x, S(2)*sqrt(a)*p*atan(sqrt(b)*x/sqrt(a))/sqrt(b) - S(2)*p*x + x*log(c*(a + b*x**S(2))**p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/(d + e*x), x), x, -p*log(-e*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*d - e*sqrt(-a)))*log(d + e*x)/e - p*log(e*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*d + e*sqrt(-a)))*log(d + e*x)/e - p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/e - p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/e + log(c*(a + b*x**S(2))**p)*log(d + e*x)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/(d + e*x)**S(2), x), x, S(2)*sqrt(a)*sqrt(b)*p*atan(sqrt(b)*x/sqrt(a))/(a*e**S(2) + b*d**S(2)) + b*d*p*log(a + b*x**S(2))/(e*(a*e**S(2) + b*d**S(2))) - S(2)*b*d*p*log(d + e*x)/(e*(a*e**S(2) + b*d**S(2))) - log(c*(a + b*x**S(2))**p)/(e*(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/(d + e*x)**S(3), x), x, S(2)*sqrt(a)*b**(S(3)/2)*d*p*atan(sqrt(b)*x/sqrt(a))/(a*e**S(2) + b*d**S(2))**S(2) + b*d*p/(e*(d + e*x)*(a*e**S(2) + b*d**S(2))) + b*p*(-a*e**S(2) + b*d**S(2))*log(a + b*x**S(2))/(S(2)*e*(a*e**S(2) + b*d**S(2))**S(2)) - b*p*(-a*e**S(2) + b*d**S(2))*log(d + e*x)/(e*(a*e**S(2) + b*d**S(2))**S(2)) - log(c*(a + b*x**S(2))**p)/(S(2)*e*(d + e*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**m*log(c*(a + b*x**S(3))**p), x), x, b**(S(1)/3)*p*(d + e*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/(e*(m + S(1))*(m + S(2))*(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d)) + b**(S(1)/3)*p*(d + e*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/(e*(m + S(1))*(m + S(2))*((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d)) + b**(S(1)/3)*p*(d + e*x)**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/(e*(m + S(1))*(m + S(2))*(-a**(S(1)/3)*e + b**(S(1)/3)*d)) + (d + e*x)**(m + S(1))*log(c*(a + b*x**S(3))**p)/(e*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)*log(c*(a + b*x**S(3))**p), x), x, a**(S(1)/3)*p*(-S(6)*a**(S(1)/3)*b**(S(2)/3)*d**S(2)*e - a*e**S(3) + S(4)*b*d**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(4)*b**(S(4)/3)) - a**(S(1)/3)*p*(-S(6)*a**(S(1)/3)*b**(S(2)/3)*d**S(2)*e - a*e**S(3) + S(4)*b*d**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(8)*b**(S(4)/3)) - sqrt(S(3))*a**(S(1)/3)*p*(S(6)*a**(S(1)/3)*b**(S(2)/3)*d**S(2)*e - a*e**S(3) + S(4)*b*d**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(4)*b**(S(4)/3)) - S(9)*d**S(2)*e*p*x**S(2)/S(4) - d*e**S(2)*p*x**S(3) - S(3)*e**S(3)*p*x**S(4)/S(16) + (d + e*x)**S(4)*log(c*(a + b*x**S(3))**p)/(S(4)*e) - d*p*(-S(4)*a*e**S(3) + b*d**S(3))*log(a + b*x**S(3))/(S(4)*b*e) + p*x*(S(3)*a*e**S(3)/S(4) - S(3)*b*d**S(3))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(2)*log(c*(a + b*x**S(3))**p), x), x, a**(S(1)/3)*d*p*(-a**(S(1)/3)*e + b**(S(1)/3)*d)*log(a**(S(1)/3) + b**(S(1)/3)*x)/b**(S(2)/3) - a**(S(1)/3)*d*p*(-a**(S(1)/3)*e + b**(S(1)/3)*d)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*b**(S(2)/3)) - sqrt(S(3))*a**(S(1)/3)*d*p*(a**(S(1)/3)*e + b**(S(1)/3)*d)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/b**(S(2)/3) - S(3)*d**S(2)*p*x - S(3)*d*e*p*x**S(2)/S(2) - e**S(2)*p*x**S(3)/S(3) + (d + e*x)**S(3)*log(c*(a + b*x**S(3))**p)/(S(3)*e) - p*(-a*e**S(3)/S(3) + b*d**S(3)/S(3))*log(a + b*x**S(3))/(b*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*log(c*(a + b*x**S(3))**p), x), x, a**(S(1)/3)*p*(-a**(S(1)/3)*e + S(2)*b**(S(1)/3)*d)*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(2)*b**(S(2)/3)) - a**(S(1)/3)*p*(-a**(S(1)/3)*e + S(2)*b**(S(1)/3)*d)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(4)*b**(S(2)/3)) - sqrt(S(3))*a**(S(1)/3)*p*(a**(S(1)/3)*e + S(2)*b**(S(1)/3)*d)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(2)*b**(S(2)/3)) - d**S(2)*p*log(a + b*x**S(3))/(S(2)*e) - S(3)*d*p*x - S(3)*e*p*x**S(2)/S(4) + (d + e*x)**S(2)*log(c*(a + b*x**S(3))**p)/(S(2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p), x), x, a**(S(1)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/b**(S(1)/3) - a**(S(1)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*b**(S(1)/3)) - sqrt(S(3))*a**(S(1)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/b**(S(1)/3) - S(3)*p*x + x*log(c*(a + b*x**S(3))**p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/(d + e*x), x), x, -p*log(-e*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e - p*log(-e*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e - p*log((S(-1))**(S(1)/3)*e*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e - p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/e - p*polylog(S(2), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e - p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e + log(c*(a + b*x**S(3))**p)*log(d + e*x)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/(d + e*x)**S(2), x), x, a**(S(1)/3)*b**(S(1)/3)*p*(a**(S(1)/3)*e + b**(S(1)/3)*d)*log(a**(S(1)/3) + b**(S(1)/3)*x)/(-a*e**S(3) + b*d**S(3)) - a**(S(1)/3)*b**(S(1)/3)*p*(a**(S(1)/3)*e + b**(S(1)/3)*d)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*(-a*e**S(3) + b*d**S(3))) - sqrt(S(3))*a**(S(1)/3)*b**(S(1)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(a**(S(2)/3)*e**S(2) + a**(S(1)/3)*b**(S(1)/3)*d*e + b**(S(2)/3)*d**S(2)) + b*d**S(2)*p*log(a + b*x**S(3))/(e*(-a*e**S(3) + b*d**S(3))) - S(3)*b*d**S(2)*p*log(d + e*x)/(e*(-a*e**S(3) + b*d**S(3))) - log(c*(a + b*x**S(3))**p)/(e*(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/(d + e*x)**S(3), x), x, -sqrt(S(3))*a**(S(1)/3)*b**(S(2)/3)*p*(-S(3)*a**(S(1)/3)*b**(S(2)/3)*d**S(2)*e + a*e**S(3) + S(2)*b*d**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(2)*(-a*e**S(3) + b*d**S(3))**S(2)) + a**(S(1)/3)*b**(S(2)/3)*p*(S(3)*a**(S(1)/3)*b**(S(2)/3)*d**S(2)*e + a*e**S(3) + S(2)*b*d**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(2)*(-a*e**S(3) + b*d**S(3))**S(2)) - a**(S(1)/3)*b**(S(2)/3)*p*(S(3)*a**(S(1)/3)*b**(S(2)/3)*d**S(2)*e + a*e**S(3) + S(2)*b*d**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(4)*(-a*e**S(3) + b*d**S(3))**S(2)) + S(3)*b*d**S(2)*p/(S(2)*e*(d + e*x)*(-a*e**S(3) + b*d**S(3))) + b*d*p*(S(2)*a*e**S(3) + b*d**S(3))*log(a + b*x**S(3))/(S(2)*e*(-a*e**S(3) + b*d**S(3))**S(2)) - S(3)*b*d*p*(S(2)*a*e**S(3) + b*d**S(3))*log(d + e*x)/(S(2)*e*(-a*e**S(3) + b*d**S(3))**S(2)) - log(c*(a + b*x**S(3))**p)/(S(2)*e*(d + e*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b/x)/(c + d*x), x), x, log(-d*x/c)*log(c + d*x)/d - log(-d*(a*x + b)/(a*c - b*d))*log(c + d*x)/d + log(a + b/x)*log(c + d*x)/d + polylog(S(2), (c + d*x)/c)/d - polylog(S(2), a*(c + d*x)/(a*c - b*d))/d, expand=True, _diff=True, _numerical=True) # recursion sympy and mathematica assert rubi_test(rubi_integrate(log(a + b*x**n)/(c + d*x), x), x, -b*n*Integral(x**(n + S(-1))*log(c + d*x)/(a + b*x**n), x)/d + log(a + b*x**n)*log(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x)/(c + d*x), x), x, log(a*x)*log((c + d*x)/c)/d + polylog(S(2), -d*x/c)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a/x)/(c + d*x), x), x, log(a/x)*log((c + d*x)/c)/d - polylog(S(2), -d*x/c)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*x**n)/(c + d*x), x), x, n*polylog(S(2), -d*x/c)/d + log(a*x**n)*log((c + d*x)/c)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**n)/(a + b*x), x), x, n*polylog(S(2), -b*x/a)/b + log(x**n)*log((a + b*x)/a)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b*x)**p)/(d + e*x), x), x, a**S(3)*p*log(a + b*x)/(S(3)*b**S(3)*e) + a**S(2)*d*p*log(a + b*x)/(S(2)*b**S(2)*e**S(2)) - a**S(2)*p*x/(S(3)*b**S(2)*e) - a*d*p*x/(S(2)*b*e**S(2)) + a*p*x**S(2)/(S(6)*b*e) - d**S(3)*p*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/e**S(4) - d**S(3)*log(c*(a + b*x)**p)*log(b*(d + e*x)/(-a*e + b*d))/e**S(4) - d**S(2)*p*x/e**S(3) + d*p*x**S(2)/(S(4)*e**S(2)) - d*x**S(2)*log(c*(a + b*x)**p)/(S(2)*e**S(2)) - p*x**S(3)/(S(9)*e) + x**S(3)*log(c*(a + b*x)**p)/(S(3)*e) + d**S(2)*(a + b*x)*log(c*(a + b*x)**p)/(b*e**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x)**p)/(d + e*x), x), x, -a**S(2)*p*log(a + b*x)/(S(2)*b**S(2)*e) + a*p*x/(S(2)*b*e) + d**S(2)*p*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/e**S(3) + d**S(2)*log(c*(a + b*x)**p)*log(b*(d + e*x)/(-a*e + b*d))/e**S(3) + d*p*x/e**S(2) - p*x**S(2)/(S(4)*e) + x**S(2)*log(c*(a + b*x)**p)/(S(2)*e) - d*(a + b*x)*log(c*(a + b*x)**p)/(b*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*x)**p)/(d + e*x), x), x, -d*p*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/e**S(2) - d*log(c*(a + b*x)**p)*log(b*(d + e*x)/(-a*e + b*d))/e**S(2) - p*x/e + (a + b*x)*log(c*(a + b*x)**p)/(b*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p)/(d + e*x), x), x, p*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/e + log(c*(a + b*x)**p)*log(b*(d + e*x)/(-a*e + b*d))/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p)/(x*(d + e*x)), x), x, p*polylog(S(2), (a + b*x)/a)/d - p*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/d + log(c*(a + b*x)**p)*log(-b*x/a)/d - log(c*(a + b*x)**p)*log(b*(d + e*x)/(-a*e + b*d))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p)/(x**S(2)*(d + e*x)), x), x, -log(c*(a + b*x)**p)/(d*x) - e*p*polylog(S(2), (a + b*x)/a)/d**S(2) + e*p*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/d**S(2) - e*log(c*(a + b*x)**p)*log(-b*x/a)/d**S(2) + e*log(c*(a + b*x)**p)*log(b*(d + e*x)/(-a*e + b*d))/d**S(2) + b*p*log(x)/(a*d) - b*p*log(a + b*x)/(a*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x)**p)/(x**S(3)*(d + e*x)), x), x, -log(c*(a + b*x)**p)/(S(2)*d*x**S(2)) + e*log(c*(a + b*x)**p)/(d**S(2)*x) + e**S(2)*p*polylog(S(2), (a + b*x)/a)/d**S(3) - e**S(2)*p*polylog(S(2), -e*(a + b*x)/(-a*e + b*d))/d**S(3) + e**S(2)*log(c*(a + b*x)**p)*log(-b*x/a)/d**S(3) - e**S(2)*log(c*(a + b*x)**p)*log(b*(d + e*x)/(-a*e + b*d))/d**S(3) - b*p/(S(2)*a*d*x) - b*e*p*log(x)/(a*d**S(2)) + b*e*p*log(a + b*x)/(a*d**S(2)) - b**S(2)*p*log(x)/(S(2)*a**S(2)*d) + b**S(2)*p*log(a + b*x)/(S(2)*a**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b*x**S(2))**p)/(d + e*x), x), x, -S(2)*a**(S(3)/2)*p*atan(sqrt(b)*x/sqrt(a))/(S(3)*b**(S(3)/2)*e) + S(2)*sqrt(a)*d**S(2)*p*atan(sqrt(b)*x/sqrt(a))/(sqrt(b)*e**S(3)) + S(2)*a*p*x/(S(3)*b*e) + d**S(3)*p*log(-e*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*d - e*sqrt(-a)))*log(d + e*x)/e**S(4) + d**S(3)*p*log(e*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*d + e*sqrt(-a)))*log(d + e*x)/e**S(4) + d**S(3)*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/e**S(4) + d**S(3)*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/e**S(4) - d**S(3)*log(c*(a + b*x**S(2))**p)*log(d + e*x)/e**S(4) - S(2)*d**S(2)*p*x/e**S(3) + d**S(2)*x*log(c*(a + b*x**S(2))**p)/e**S(3) + d*p*x**S(2)/(S(2)*e**S(2)) - S(2)*p*x**S(3)/(S(9)*e) + x**S(3)*log(c*(a + b*x**S(2))**p)/(S(3)*e) - d*(a + b*x**S(2))*log(c*(a + b*x**S(2))**p)/(S(2)*b*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x**S(2))**p)/(d + e*x), x), x, -S(2)*sqrt(a)*d*p*atan(sqrt(b)*x/sqrt(a))/(sqrt(b)*e**S(2)) - d**S(2)*p*log(-e*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*d - e*sqrt(-a)))*log(d + e*x)/e**S(3) - d**S(2)*p*log(e*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*d + e*sqrt(-a)))*log(d + e*x)/e**S(3) - d**S(2)*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/e**S(3) - d**S(2)*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/e**S(3) + d**S(2)*log(c*(a + b*x**S(2))**p)*log(d + e*x)/e**S(3) + S(2)*d*p*x/e**S(2) - d*x*log(c*(a + b*x**S(2))**p)/e**S(2) - p*x**S(2)/(S(2)*e) + (a/S(2) + b*x**S(2)/S(2))*log(c*(a + b*x**S(2))**p)/(b*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*x**S(2))**p)/(d + e*x), x), x, S(2)*sqrt(a)*p*atan(sqrt(b)*x/sqrt(a))/(sqrt(b)*e) + d*p*log(-e*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*d - e*sqrt(-a)))*log(d + e*x)/e**S(2) + d*p*log(e*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*d + e*sqrt(-a)))*log(d + e*x)/e**S(2) + d*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/e**S(2) + d*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/e**S(2) - d*log(c*(a + b*x**S(2))**p)*log(d + e*x)/e**S(2) - S(2)*p*x/e + x*log(c*(a + b*x**S(2))**p)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/(d + e*x), x), x, -p*log(-e*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*d - e*sqrt(-a)))*log(d + e*x)/e - p*log(e*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*d + e*sqrt(-a)))*log(d + e*x)/e - p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/e - p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/e + log(c*(a + b*x**S(2))**p)*log(d + e*x)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/(x*(d + e*x)), x), x, p*log(-e*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*d - e*sqrt(-a)))*log(d + e*x)/d + p*log(e*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*d + e*sqrt(-a)))*log(d + e*x)/d + p*polylog(S(2), (a + b*x**S(2))/a)/(S(2)*d) + p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/d + p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/d + log(c*(a + b*x**S(2))**p)*log(-b*x**S(2)/a)/(S(2)*d) - log(c*(a + b*x**S(2))**p)*log(d + e*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/(x**S(2)*(d + e*x)), x), x, -log(c*(a + b*x**S(2))**p)/(d*x) - e*p*log(-e*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*d - e*sqrt(-a)))*log(d + e*x)/d**S(2) - e*p*log(e*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*d + e*sqrt(-a)))*log(d + e*x)/d**S(2) - e*p*polylog(S(2), (a + b*x**S(2))/a)/(S(2)*d**S(2)) - e*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/d**S(2) - e*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/d**S(2) - e*log(c*(a + b*x**S(2))**p)*log(-b*x**S(2)/a)/(S(2)*d**S(2)) + e*log(c*(a + b*x**S(2))**p)*log(d + e*x)/d**S(2) + S(2)*sqrt(b)*p*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**p)/(x**S(3)*(d + e*x)), x), x, -log(c*(a + b*x**S(2))**p)/(S(2)*d*x**S(2)) + e*log(c*(a + b*x**S(2))**p)/(d**S(2)*x) + e**S(2)*p*log(-e*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*d - e*sqrt(-a)))*log(d + e*x)/d**S(3) + e**S(2)*p*log(e*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*d + e*sqrt(-a)))*log(d + e*x)/d**S(3) + e**S(2)*p*polylog(S(2), (a + b*x**S(2))/a)/(S(2)*d**S(3)) + e**S(2)*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d - e*sqrt(-a)))/d**S(3) + e**S(2)*p*polylog(S(2), sqrt(b)*(d + e*x)/(sqrt(b)*d + e*sqrt(-a)))/d**S(3) + e**S(2)*log(c*(a + b*x**S(2))**p)*log(-b*x**S(2)/a)/(S(2)*d**S(3)) - e**S(2)*log(c*(a + b*x**S(2))**p)*log(d + e*x)/d**S(3) + b*p*log(x)/(a*d) - b*p*log(a + b*x**S(2))/(S(2)*a*d) - S(2)*sqrt(b)*e*p*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b*x**S(3))**p)/(d + e*x), x), x, a**(S(2)/3)*d*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(2)*b**(S(2)/3)*e**S(2)) - a**(S(2)/3)*d*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(4)*b**(S(2)/3)*e**S(2)) + sqrt(S(3))*a**(S(2)/3)*d*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(2)*b**(S(2)/3)*e**S(2)) + a**(S(1)/3)*d**S(2)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(b**(S(1)/3)*e**S(3)) - a**(S(1)/3)*d**S(2)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*b**(S(1)/3)*e**S(3)) - sqrt(S(3))*a**(S(1)/3)*d**S(2)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(b**(S(1)/3)*e**S(3)) + d**S(3)*p*log(-e*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(4) + d**S(3)*p*log(-e*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(4) + d**S(3)*p*log((S(-1))**(S(1)/3)*e*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(4) + d**S(3)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(4) + d**S(3)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(4) + d**S(3)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(4) - d**S(3)*log(c*(a + b*x**S(3))**p)*log(d + e*x)/e**S(4) - S(3)*d**S(2)*p*x/e**S(3) + d**S(2)*x*log(c*(a + b*x**S(3))**p)/e**S(3) + S(3)*d*p*x**S(2)/(S(4)*e**S(2)) - d*x**S(2)*log(c*(a + b*x**S(3))**p)/(S(2)*e**S(2)) - p*x**S(3)/(S(3)*e) + (a/S(3) + b*x**S(3)/S(3))*log(c*(a + b*x**S(3))**p)/(b*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x**S(3))**p)/(d + e*x), x), x, -a**(S(2)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(2)*b**(S(2)/3)*e) + a**(S(2)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(4)*b**(S(2)/3)*e) - sqrt(S(3))*a**(S(2)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(2)*b**(S(2)/3)*e) - a**(S(1)/3)*d*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(b**(S(1)/3)*e**S(2)) + a**(S(1)/3)*d*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*b**(S(1)/3)*e**S(2)) + sqrt(S(3))*a**(S(1)/3)*d*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(b**(S(1)/3)*e**S(2)) - d**S(2)*p*log(-e*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(3) - d**S(2)*p*log(-e*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(3) - d**S(2)*p*log((S(-1))**(S(1)/3)*e*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(3) - d**S(2)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(3) - d**S(2)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(3) - d**S(2)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(3) + d**S(2)*log(c*(a + b*x**S(3))**p)*log(d + e*x)/e**S(3) + S(3)*d*p*x/e**S(2) - d*x*log(c*(a + b*x**S(3))**p)/e**S(2) - S(3)*p*x**S(2)/(S(4)*e) + x**S(2)*log(c*(a + b*x**S(3))**p)/(S(2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*x**S(3))**p)/(d + e*x), x), x, a**(S(1)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(b**(S(1)/3)*e) - a**(S(1)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*b**(S(1)/3)*e) - sqrt(S(3))*a**(S(1)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(b**(S(1)/3)*e) + d*p*log(-e*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(2) + d*p*log(-e*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(2) + d*p*log((S(-1))**(S(1)/3)*e*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e**S(2) + d*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(2) + d*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(2) + d*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e**S(2) - d*log(c*(a + b*x**S(3))**p)*log(d + e*x)/e**S(2) - S(3)*p*x/e + x*log(c*(a + b*x**S(3))**p)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/(d + e*x), x), x, -p*log(-e*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e - p*log(-e*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e - p*log((S(-1))**(S(1)/3)*e*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/e - p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/e - p*polylog(S(2), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e - p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/e + log(c*(a + b*x**S(3))**p)*log(d + e*x)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/(x*(d + e*x)), x), x, p*log(-e*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d + p*log(-e*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d + p*log((S(-1))**(S(1)/3)*e*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d + p*polylog(S(2), (a + b*x**S(3))/a)/(S(3)*d) + p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/d + p*polylog(S(2), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/d + p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/d + log(c*(a + b*x**S(3))**p)*log(-b*x**S(3)/a)/(S(3)*d) - log(c*(a + b*x**S(3))**p)*log(d + e*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/(x**S(2)*(d + e*x)), x), x, -log(c*(a + b*x**S(3))**p)/(d*x) - e*p*log(-e*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d**S(2) - e*p*log(-e*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d**S(2) - e*p*log((S(-1))**(S(1)/3)*e*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d**S(2) - e*p*polylog(S(2), (a + b*x**S(3))/a)/(S(3)*d**S(2)) - e*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/d**S(2) - e*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/d**S(2) - e*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/d**S(2) - e*log(c*(a + b*x**S(3))**p)*log(-b*x**S(3)/a)/(S(3)*d**S(2)) + e*log(c*(a + b*x**S(3))**p)*log(d + e*x)/d**S(2) - b**(S(1)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(a**(S(1)/3)*d) + b**(S(1)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*a**(S(1)/3)*d) - sqrt(S(3))*b**(S(1)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(a**(S(1)/3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(3))**p)/(x**S(3)*(d + e*x)), x), x, -log(c*(a + b*x**S(3))**p)/(S(2)*d*x**S(2)) + e*log(c*(a + b*x**S(3))**p)/(d**S(2)*x) + e**S(2)*p*log(-e*(a**(S(1)/3) + b**(S(1)/3)*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d**S(3) + e**S(2)*p*log(-e*((S(-1))**(S(2)/3)*a**(S(1)/3) + b**(S(1)/3)*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d**S(3) + e**S(2)*p*log((S(-1))**(S(1)/3)*e*(a**(S(1)/3) + (S(-1))**(S(2)/3)*b**(S(1)/3)*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))*log(d + e*x)/d**S(3) + e**S(2)*p*polylog(S(2), (a + b*x**S(3))/a)/(S(3)*d**S(3)) + e**S(2)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-a**(S(1)/3)*e + b**(S(1)/3)*d))/d**S(3) + e**S(2)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/d**S(3) + e**S(2)*p*polylog(S(2), b**(S(1)/3)*(d + e*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*e + b**(S(1)/3)*d))/d**S(3) + e**S(2)*log(c*(a + b*x**S(3))**p)*log(-b*x**S(3)/a)/(S(3)*d**S(3)) - e**S(2)*log(c*(a + b*x**S(3))**p)*log(d + e*x)/d**S(3) + b**(S(1)/3)*e*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(a**(S(1)/3)*d**S(2)) - b**(S(1)/3)*e*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(2)*a**(S(1)/3)*d**S(2)) + sqrt(S(3))*b**(S(1)/3)*e*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(a**(S(1)/3)*d**S(2)) + b**(S(2)/3)*p*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(2)*a**(S(2)/3)*d) - b**(S(2)/3)*p*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(4)*a**(S(2)/3)*d) - sqrt(S(3))*b**(S(2)/3)*p*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(2)*a**(S(2)/3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b/x)**p)/(d + e*x), x), x, -d**S(3)*p*log(-e*x/d)*log(d + e*x)/e**S(4) + d**S(3)*p*log(-e*(a*x + b)/(a*d - b*e))*log(d + e*x)/e**S(4) - d**S(3)*p*polylog(S(2), (d + e*x)/d)/e**S(4) + d**S(3)*p*polylog(S(2), a*(d + e*x)/(a*d - b*e))/e**S(4) - d**S(3)*log(c*(a + b/x)**p)*log(d + e*x)/e**S(4) + d**S(2)*x*log(c*(a + b/x)**p)/e**S(3) - d*x**S(2)*log(c*(a + b/x)**p)/(S(2)*e**S(2)) + x**S(3)*log(c*(a + b/x)**p)/(S(3)*e) + b*d**S(2)*p*log(a*x + b)/(a*e**S(3)) - b*d*p*x/(S(2)*a*e**S(2)) + b*p*x**S(2)/(S(6)*a*e) + b**S(2)*d*p*log(a*x + b)/(S(2)*a**S(2)*e**S(2)) - b**S(2)*p*x/(S(3)*a**S(2)*e) + b**S(3)*p*log(a*x + b)/(S(3)*a**S(3)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b/x)**p)/(d + e*x), x), x, d**S(2)*p*log(-e*x/d)*log(d + e*x)/e**S(3) - d**S(2)*p*log(-e*(a*x + b)/(a*d - b*e))*log(d + e*x)/e**S(3) + d**S(2)*p*polylog(S(2), (d + e*x)/d)/e**S(3) - d**S(2)*p*polylog(S(2), a*(d + e*x)/(a*d - b*e))/e**S(3) + d**S(2)*log(c*(a + b/x)**p)*log(d + e*x)/e**S(3) - d*x*log(c*(a + b/x)**p)/e**S(2) + x**S(2)*log(c*(a + b/x)**p)/(S(2)*e) - b*d*p*log(a*x + b)/(a*e**S(2)) + b*p*x/(S(2)*a*e) - b**S(2)*p*log(a*x + b)/(S(2)*a**S(2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b/x)**p)/(d + e*x), x), x, -d*p*log(-e*x/d)*log(d + e*x)/e**S(2) + d*p*log(-e*(a*x + b)/(a*d - b*e))*log(d + e*x)/e**S(2) - d*p*polylog(S(2), (d + e*x)/d)/e**S(2) + d*p*polylog(S(2), a*(d + e*x)/(a*d - b*e))/e**S(2) - d*log(c*(a + b/x)**p)*log(d + e*x)/e**S(2) + x*log(c*(a + b/x)**p)/e + b*p*log(a*x + b)/(a*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/(d + e*x), x), x, p*log(-e*x/d)*log(d + e*x)/e - p*log(-e*(a*x + b)/(a*d - b*e))*log(d + e*x)/e + p*polylog(S(2), (d + e*x)/d)/e - p*polylog(S(2), a*(d + e*x)/(a*d - b*e))/e + log(c*(a + b/x)**p)*log(d + e*x)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/(x*(d + e*x)), x), x, -p*log(-e*x/d)*log(d + e*x)/d + p*log(-e*(a*x + b)/(a*d - b*e))*log(d + e*x)/d - p*polylog(S(2), (a + b/x)/a)/d - p*polylog(S(2), (d + e*x)/d)/d + p*polylog(S(2), a*(d + e*x)/(a*d - b*e))/d - log(c*(a + b/x)**p)*log(-b/(a*x))/d - log(c*(a + b/x)**p)*log(d + e*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/(x**S(2)*(d + e*x)), x), x, p/(d*x) + e*p*log(-e*x/d)*log(d + e*x)/d**S(2) - e*p*log(-e*(a*x + b)/(a*d - b*e))*log(d + e*x)/d**S(2) + e*p*polylog(S(2), (a + b/x)/a)/d**S(2) + e*p*polylog(S(2), (d + e*x)/d)/d**S(2) - e*p*polylog(S(2), a*(d + e*x)/(a*d - b*e))/d**S(2) + e*log(c*(a + b/x)**p)*log(-b/(a*x))/d**S(2) + e*log(c*(a + b/x)**p)*log(d + e*x)/d**S(2) - (a + b/x)*log(c*(a + b/x)**p)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x)**p)/(x**S(3)*(d + e*x)), x), x, -a**S(2)*p*log(x)/(S(2)*b**S(2)*d) + a**S(2)*p*log(a*x + b)/(S(2)*b**S(2)*d) - a*p/(S(2)*b*d*x) + p/(S(4)*d*x**S(2)) - log(c*(a + b/x)**p)/(S(2)*d*x**S(2)) - e*p/(d**S(2)*x) - e**S(2)*p*log(-e*x/d)*log(d + e*x)/d**S(3) + e**S(2)*p*log(-e*(a*x + b)/(a*d - b*e))*log(d + e*x)/d**S(3) - e**S(2)*p*polylog(S(2), (a + b/x)/a)/d**S(3) - e**S(2)*p*polylog(S(2), (d + e*x)/d)/d**S(3) + e**S(2)*p*polylog(S(2), a*(d + e*x)/(a*d - b*e))/d**S(3) - e**S(2)*log(c*(a + b/x)**p)*log(-b/(a*x))/d**S(3) - e**S(2)*log(c*(a + b/x)**p)*log(d + e*x)/d**S(3) + e*(a + b/x)*log(c*(a + b/x)**p)/(b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b/x**S(2))**p)/(d + e*x), x), x, -S(2)*d**S(3)*p*log(-e*x/d)*log(d + e*x)/e**S(4) + d**S(3)*p*log(e*(sqrt(b) - x*sqrt(-a))/(sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/e**S(4) + d**S(3)*p*log(-e*(sqrt(b) + x*sqrt(-a))/(-sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/e**S(4) - S(2)*d**S(3)*p*polylog(S(2), (d + e*x)/d)/e**S(4) + d**S(3)*p*polylog(S(2), sqrt(-a)*(d + e*x)/(-sqrt(b)*e + d*sqrt(-a)))/e**S(4) + d**S(3)*p*polylog(S(2), sqrt(-a)*(d + e*x)/(sqrt(b)*e + d*sqrt(-a)))/e**S(4) - d**S(3)*log(c*(a + b/x**S(2))**p)*log(d + e*x)/e**S(4) + d**S(2)*x*log(c*(a + b/x**S(2))**p)/e**S(3) - d*x**S(2)*log(c*(a + b/x**S(2))**p)/(S(2)*e**S(2)) + x**S(3)*log(c*(a + b/x**S(2))**p)/(S(3)*e) - b*d*p*log(a*x**S(2) + b)/(S(2)*a*e**S(2)) + S(2)*b*p*x/(S(3)*a*e) + S(2)*sqrt(b)*d**S(2)*p*atan(sqrt(a)*x/sqrt(b))/(sqrt(a)*e**S(3)) - S(2)*b**(S(3)/2)*p*atan(sqrt(a)*x/sqrt(b))/(S(3)*a**(S(3)/2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b/x**S(2))**p)/(d + e*x), x), x, S(2)*d**S(2)*p*log(-e*x/d)*log(d + e*x)/e**S(3) - d**S(2)*p*log(e*(sqrt(b) - x*sqrt(-a))/(sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/e**S(3) - d**S(2)*p*log(-e*(sqrt(b) + x*sqrt(-a))/(-sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/e**S(3) + S(2)*d**S(2)*p*polylog(S(2), (d + e*x)/d)/e**S(3) - d**S(2)*p*polylog(S(2), sqrt(-a)*(d + e*x)/(-sqrt(b)*e + d*sqrt(-a)))/e**S(3) - d**S(2)*p*polylog(S(2), sqrt(-a)*(d + e*x)/(sqrt(b)*e + d*sqrt(-a)))/e**S(3) + d**S(2)*log(c*(a + b/x**S(2))**p)*log(d + e*x)/e**S(3) - d*x*log(c*(a + b/x**S(2))**p)/e**S(2) + x**S(2)*log(c*(a + b/x**S(2))**p)/(S(2)*e) + b*p*log(a*x**S(2) + b)/(S(2)*a*e) - S(2)*sqrt(b)*d*p*atan(sqrt(a)*x/sqrt(b))/(sqrt(a)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b/x**S(2))**p)/(d + e*x), x), x, -S(2)*d*p*log(-e*x/d)*log(d + e*x)/e**S(2) + d*p*log(e*(sqrt(b) - x*sqrt(-a))/(sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/e**S(2) + d*p*log(-e*(sqrt(b) + x*sqrt(-a))/(-sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/e**S(2) - S(2)*d*p*polylog(S(2), (d + e*x)/d)/e**S(2) + d*p*polylog(S(2), sqrt(-a)*(d + e*x)/(-sqrt(b)*e + d*sqrt(-a)))/e**S(2) + d*p*polylog(S(2), sqrt(-a)*(d + e*x)/(sqrt(b)*e + d*sqrt(-a)))/e**S(2) - d*log(c*(a + b/x**S(2))**p)*log(d + e*x)/e**S(2) + x*log(c*(a + b/x**S(2))**p)/e + S(2)*sqrt(b)*p*atan(sqrt(a)*x/sqrt(b))/(sqrt(a)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p)/(d + e*x), x), x, S(2)*p*log(-e*x/d)*log(d + e*x)/e - p*log(e*(sqrt(b) - x*sqrt(-a))/(sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/e - p*log(-e*(sqrt(b) + x*sqrt(-a))/(-sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/e + S(2)*p*polylog(S(2), (d + e*x)/d)/e - p*polylog(S(2), sqrt(-a)*(d + e*x)/(-sqrt(b)*e + d*sqrt(-a)))/e - p*polylog(S(2), sqrt(-a)*(d + e*x)/(sqrt(b)*e + d*sqrt(-a)))/e + log(c*(a + b/x**S(2))**p)*log(d + e*x)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p)/(x*(d + e*x)), x), x, -S(2)*p*log(-e*x/d)*log(d + e*x)/d + p*log(e*(sqrt(b) - x*sqrt(-a))/(sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/d + p*log(-e*(sqrt(b) + x*sqrt(-a))/(-sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/d - p*polylog(S(2), (a + b/x**S(2))/a)/(S(2)*d) - S(2)*p*polylog(S(2), (d + e*x)/d)/d + p*polylog(S(2), sqrt(-a)*(d + e*x)/(-sqrt(b)*e + d*sqrt(-a)))/d + p*polylog(S(2), sqrt(-a)*(d + e*x)/(sqrt(b)*e + d*sqrt(-a)))/d - log(c*(a + b/x**S(2))**p)*log(-b/(a*x**S(2)))/(S(2)*d) - log(c*(a + b/x**S(2))**p)*log(d + e*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p)/(x**S(2)*(d + e*x)), x), x, S(2)*sqrt(a)*p*atan(sqrt(a)*x/sqrt(b))/(sqrt(b)*d) + S(2)*p/(d*x) - log(c*(a + b/x**S(2))**p)/(d*x) + S(2)*e*p*log(-e*x/d)*log(d + e*x)/d**S(2) - e*p*log(e*(sqrt(b) - x*sqrt(-a))/(sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/d**S(2) - e*p*log(-e*(sqrt(b) + x*sqrt(-a))/(-sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/d**S(2) + e*p*polylog(S(2), (a + b/x**S(2))/a)/(S(2)*d**S(2)) + S(2)*e*p*polylog(S(2), (d + e*x)/d)/d**S(2) - e*p*polylog(S(2), sqrt(-a)*(d + e*x)/(-sqrt(b)*e + d*sqrt(-a)))/d**S(2) - e*p*polylog(S(2), sqrt(-a)*(d + e*x)/(sqrt(b)*e + d*sqrt(-a)))/d**S(2) + e*log(c*(a + b/x**S(2))**p)*log(-b/(a*x**S(2)))/(S(2)*d**S(2)) + e*log(c*(a + b/x**S(2))**p)*log(d + e*x)/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(2))**p)/(x**S(3)*(d + e*x)), x), x, -S(2)*sqrt(a)*e*p*atan(sqrt(a)*x/sqrt(b))/(sqrt(b)*d**S(2)) + p/(S(2)*d*x**S(2)) - S(2)*e*p/(d**S(2)*x) + e*log(c*(a + b/x**S(2))**p)/(d**S(2)*x) - S(2)*e**S(2)*p*log(-e*x/d)*log(d + e*x)/d**S(3) + e**S(2)*p*log(e*(sqrt(b) - x*sqrt(-a))/(sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/d**S(3) + e**S(2)*p*log(-e*(sqrt(b) + x*sqrt(-a))/(-sqrt(b)*e + d*sqrt(-a)))*log(d + e*x)/d**S(3) - e**S(2)*p*polylog(S(2), (a + b/x**S(2))/a)/(S(2)*d**S(3)) - S(2)*e**S(2)*p*polylog(S(2), (d + e*x)/d)/d**S(3) + e**S(2)*p*polylog(S(2), sqrt(-a)*(d + e*x)/(-sqrt(b)*e + d*sqrt(-a)))/d**S(3) + e**S(2)*p*polylog(S(2), sqrt(-a)*(d + e*x)/(sqrt(b)*e + d*sqrt(-a)))/d**S(3) - e**S(2)*log(c*(a + b/x**S(2))**p)*log(-b/(a*x**S(2)))/(S(2)*d**S(3)) - e**S(2)*log(c*(a + b/x**S(2))**p)*log(d + e*x)/d**S(3) - (a/S(2) + b/(S(2)*x**S(2)))*log(c*(a + b/x**S(2))**p)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b/x**S(3))**p)/(d + e*x), x), x, -S(3)*d**S(3)*p*log(-e*x/d)*log(d + e*x)/e**S(4) + d**S(3)*p*log(-e*(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d - b**(S(1)/3)*e))*log(d + e*x)/e**S(4) + d**S(3)*p*log(-e*(a**(S(1)/3)*x + (S(-1))**(S(2)/3)*b**(S(1)/3))/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))*log(d + e*x)/e**S(4) + d**S(3)*p*log((S(-1))**(S(1)/3)*e*((S(-1))**(S(2)/3)*a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))*log(d + e*x)/e**S(4) - S(3)*d**S(3)*p*polylog(S(2), (d + e*x)/d)/e**S(4) + d**S(3)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - b**(S(1)/3)*e))/e**S(4) + d**S(3)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/e**S(4) + d**S(3)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/e**S(4) - d**S(3)*log(c*(a + b/x**S(3))**p)*log(d + e*x)/e**S(4) + d**S(2)*x*log(c*(a + b/x**S(3))**p)/e**S(3) - d*x**S(2)*log(c*(a + b/x**S(3))**p)/(S(2)*e**S(2)) + x**S(3)*log(c*(a + b/x**S(3))**p)/(S(3)*e) + b*p*log(a*x**S(3) + b)/(S(3)*a*e) + b**(S(1)/3)*d**S(2)*p*log(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*e**S(3)) - b**(S(1)/3)*d**S(2)*p*log(a**(S(2)/3)*x**S(2) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3))/(S(2)*a**(S(1)/3)*e**S(3)) - sqrt(S(3))*b**(S(1)/3)*d**S(2)*p*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*x + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(a**(S(1)/3)*e**S(3)) + b**(S(2)/3)*d*p*log(a**(S(1)/3)*x + b**(S(1)/3))/(S(2)*a**(S(2)/3)*e**S(2)) - b**(S(2)/3)*d*p*log(a**(S(2)/3)*x**S(2) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3))/(S(4)*a**(S(2)/3)*e**S(2)) + sqrt(S(3))*b**(S(2)/3)*d*p*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*x + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(S(2)*a**(S(2)/3)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b/x**S(3))**p)/(d + e*x), x), x, S(3)*d**S(2)*p*log(-e*x/d)*log(d + e*x)/e**S(3) - d**S(2)*p*log(-e*(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d - b**(S(1)/3)*e))*log(d + e*x)/e**S(3) - d**S(2)*p*log(-e*(a**(S(1)/3)*x + (S(-1))**(S(2)/3)*b**(S(1)/3))/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))*log(d + e*x)/e**S(3) - d**S(2)*p*log((S(-1))**(S(1)/3)*e*((S(-1))**(S(2)/3)*a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))*log(d + e*x)/e**S(3) + S(3)*d**S(2)*p*polylog(S(2), (d + e*x)/d)/e**S(3) - d**S(2)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - b**(S(1)/3)*e))/e**S(3) - d**S(2)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/e**S(3) - d**S(2)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/e**S(3) + d**S(2)*log(c*(a + b/x**S(3))**p)*log(d + e*x)/e**S(3) - d*x*log(c*(a + b/x**S(3))**p)/e**S(2) + x**S(2)*log(c*(a + b/x**S(3))**p)/(S(2)*e) - b**(S(1)/3)*d*p*log(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*e**S(2)) + b**(S(1)/3)*d*p*log(a**(S(2)/3)*x**S(2) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3))/(S(2)*a**(S(1)/3)*e**S(2)) + sqrt(S(3))*b**(S(1)/3)*d*p*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*x + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(a**(S(1)/3)*e**S(2)) - b**(S(2)/3)*p*log(a**(S(1)/3)*x + b**(S(1)/3))/(S(2)*a**(S(2)/3)*e) + b**(S(2)/3)*p*log(a**(S(2)/3)*x**S(2) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3))/(S(4)*a**(S(2)/3)*e) - sqrt(S(3))*b**(S(2)/3)*p*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*x + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(S(2)*a**(S(2)/3)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b/x**S(3))**p)/(d + e*x), x), x, -S(3)*d*p*log(-e*x/d)*log(d + e*x)/e**S(2) + d*p*log(-e*(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d - b**(S(1)/3)*e))*log(d + e*x)/e**S(2) + d*p*log(-e*(a**(S(1)/3)*x + (S(-1))**(S(2)/3)*b**(S(1)/3))/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))*log(d + e*x)/e**S(2) + d*p*log((S(-1))**(S(1)/3)*e*((S(-1))**(S(2)/3)*a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))*log(d + e*x)/e**S(2) - S(3)*d*p*polylog(S(2), (d + e*x)/d)/e**S(2) + d*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - b**(S(1)/3)*e))/e**S(2) + d*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/e**S(2) + d*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/e**S(2) - d*log(c*(a + b/x**S(3))**p)*log(d + e*x)/e**S(2) + x*log(c*(a + b/x**S(3))**p)/e + b**(S(1)/3)*p*log(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*e) - b**(S(1)/3)*p*log(a**(S(2)/3)*x**S(2) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3))/(S(2)*a**(S(1)/3)*e) - sqrt(S(3))*b**(S(1)/3)*p*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*x + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(a**(S(1)/3)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(3))**p)/(d + e*x), x), x, S(3)*p*log(-e*x/d)*log(d + e*x)/e - p*log(-e*(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d - b**(S(1)/3)*e))*log(d + e*x)/e - p*log(-e*(a**(S(1)/3)*x + (S(-1))**(S(2)/3)*b**(S(1)/3))/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))*log(d + e*x)/e - p*log((S(-1))**(S(1)/3)*e*((S(-1))**(S(2)/3)*a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))*log(d + e*x)/e + S(3)*p*polylog(S(2), (d + e*x)/d)/e - p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - b**(S(1)/3)*e))/e - p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/e - p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/e + log(c*(a + b/x**S(3))**p)*log(d + e*x)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(3))**p)/(x*(d + e*x)), x), x, -S(3)*p*log(-e*x/d)*log(d + e*x)/d + p*log(-e*(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d - b**(S(1)/3)*e))*log(d + e*x)/d + p*log(-e*(a**(S(1)/3)*x + (S(-1))**(S(2)/3)*b**(S(1)/3))/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))*log(d + e*x)/d + p*log((S(-1))**(S(1)/3)*e*((S(-1))**(S(2)/3)*a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))*log(d + e*x)/d - p*polylog(S(2), (a + b/x**S(3))/a)/(S(3)*d) - S(3)*p*polylog(S(2), (d + e*x)/d)/d + p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - b**(S(1)/3)*e))/d + p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/d + p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/d - log(c*(a + b/x**S(3))**p)*log(-b/(a*x**S(3)))/(S(3)*d) - log(c*(a + b/x**S(3))**p)*log(d + e*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(3))**p)/(x**S(2)*(d + e*x)), x), x, -a**(S(1)/3)*p*log(a**(S(1)/3)*x + b**(S(1)/3))/(b**(S(1)/3)*d) + a**(S(1)/3)*p*log(a**(S(2)/3)*x**S(2) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3))/(S(2)*b**(S(1)/3)*d) - sqrt(S(3))*a**(S(1)/3)*p*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*x + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(b**(S(1)/3)*d) + S(3)*p/(d*x) - log(c*(a + b/x**S(3))**p)/(d*x) + S(3)*e*p*log(-e*x/d)*log(d + e*x)/d**S(2) - e*p*log(-e*(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d - b**(S(1)/3)*e))*log(d + e*x)/d**S(2) - e*p*log(-e*(a**(S(1)/3)*x + (S(-1))**(S(2)/3)*b**(S(1)/3))/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))*log(d + e*x)/d**S(2) - e*p*log((S(-1))**(S(1)/3)*e*((S(-1))**(S(2)/3)*a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))*log(d + e*x)/d**S(2) + e*p*polylog(S(2), (a + b/x**S(3))/a)/(S(3)*d**S(2)) + S(3)*e*p*polylog(S(2), (d + e*x)/d)/d**S(2) - e*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - b**(S(1)/3)*e))/d**S(2) - e*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/d**S(2) - e*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/d**S(2) + e*log(c*(a + b/x**S(3))**p)*log(-b/(a*x**S(3)))/(S(3)*d**S(2)) + e*log(c*(a + b/x**S(3))**p)*log(d + e*x)/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b/x**S(3))**p)/(x**S(3)*(d + e*x)), x), x, a**(S(2)/3)*p*log(a**(S(1)/3)*x + b**(S(1)/3))/(S(2)*b**(S(2)/3)*d) - a**(S(2)/3)*p*log(a**(S(2)/3)*x**S(2) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3))/(S(4)*b**(S(2)/3)*d) - sqrt(S(3))*a**(S(2)/3)*p*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*x + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(S(2)*b**(S(2)/3)*d) + a**(S(1)/3)*e*p*log(a**(S(1)/3)*x + b**(S(1)/3))/(b**(S(1)/3)*d**S(2)) - a**(S(1)/3)*e*p*log(a**(S(2)/3)*x**S(2) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3))/(S(2)*b**(S(1)/3)*d**S(2)) + sqrt(S(3))*a**(S(1)/3)*e*p*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*x + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(b**(S(1)/3)*d**S(2)) + S(3)*p/(S(4)*d*x**S(2)) - log(c*(a + b/x**S(3))**p)/(S(2)*d*x**S(2)) - S(3)*e*p/(d**S(2)*x) + e*log(c*(a + b/x**S(3))**p)/(d**S(2)*x) - S(3)*e**S(2)*p*log(-e*x/d)*log(d + e*x)/d**S(3) + e**S(2)*p*log(-e*(a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d - b**(S(1)/3)*e))*log(d + e*x)/d**S(3) + e**S(2)*p*log(-e*(a**(S(1)/3)*x + (S(-1))**(S(2)/3)*b**(S(1)/3))/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))*log(d + e*x)/d**S(3) + e**S(2)*p*log((S(-1))**(S(1)/3)*e*((S(-1))**(S(2)/3)*a**(S(1)/3)*x + b**(S(1)/3))/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))*log(d + e*x)/d**S(3) - e**S(2)*p*polylog(S(2), (a + b/x**S(3))/a)/(S(3)*d**S(3)) - S(3)*e**S(2)*p*polylog(S(2), (d + e*x)/d)/d**S(3) + e**S(2)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - b**(S(1)/3)*e))/d**S(3) + e**S(2)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/d**S(3) + e**S(2)*p*polylog(S(2), a**(S(1)/3)*(d + e*x)/(a**(S(1)/3)*d - (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/d**S(3) - e**S(2)*log(c*(a + b/x**S(3))**p)*log(-b/(a*x**S(3)))/(S(3)*d**S(3)) - e**S(2)*log(c*(a + b/x**S(3))**p)*log(d + e*x)/d**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d + e*x**S(2))/(-x**S(2) + S(1)), x), x, log((-sqrt(e)*x + sqrt(-d))/(-sqrt(e) + sqrt(-d)))*log(-x + S(1))/S(2) - log((sqrt(e)*x + sqrt(-d))/(-sqrt(e) + sqrt(-d)))*log(x + S(1))/S(2) - log((-sqrt(e)*x + sqrt(-d))/(sqrt(e) + sqrt(-d)))*log(x + S(1))/S(2) + log((sqrt(e)*x + sqrt(-d))/(sqrt(e) + sqrt(-d)))*log(-x + S(1))/S(2) + log(d + e*x**S(2))*atanh(x) - polylog(S(2), sqrt(e)*(-x + S(-1))/(-sqrt(e) + sqrt(-d)))/S(2) + polylog(S(2), sqrt(e)*(x + S(-1))/(-sqrt(e) + sqrt(-d)))/S(2) + polylog(S(2), sqrt(e)*(-x + S(1))/(sqrt(e) + sqrt(-d)))/S(2) - polylog(S(2), sqrt(e)*(x + S(1))/(sqrt(e) + sqrt(-d)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d + e*x**S(2))/(a + b*x**S(2)), x), x, I*log(sqrt(b)*(-sqrt(e)*x + sqrt(-d))/(-I*sqrt(a)*sqrt(e) + sqrt(b)*sqrt(-d)))*log(S(1) + I*sqrt(b)*x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)) - I*log(sqrt(b)*(-sqrt(e)*x + sqrt(-d))/(I*sqrt(a)*sqrt(e) + sqrt(b)*sqrt(-d)))*log(S(1) - I*sqrt(b)*x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)) - I*log(sqrt(b)*(sqrt(e)*x + sqrt(-d))/(-I*sqrt(a)*sqrt(e) + sqrt(b)*sqrt(-d)))*log(S(1) - I*sqrt(b)*x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)) + I*log(sqrt(b)*(sqrt(e)*x + sqrt(-d))/(I*sqrt(a)*sqrt(e) + sqrt(b)*sqrt(-d)))*log(S(1) + I*sqrt(b)*x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)) + log(d + e*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)) + I*polylog(S(2), sqrt(e)*(-sqrt(a) - I*sqrt(b)*x)/(-sqrt(a)*sqrt(e) + I*sqrt(b)*sqrt(-d)))/(S(2)*sqrt(a)*sqrt(b)) - I*polylog(S(2), sqrt(e)*(-sqrt(a) + I*sqrt(b)*x)/(-sqrt(a)*sqrt(e) + I*sqrt(b)*sqrt(-d)))/(S(2)*sqrt(a)*sqrt(b)) - I*polylog(S(2), sqrt(e)*(sqrt(a) - I*sqrt(b)*x)/(sqrt(a)*sqrt(e) + I*sqrt(b)*sqrt(-d)))/(S(2)*sqrt(a)*sqrt(b)) + I*polylog(S(2), sqrt(e)*(sqrt(a) + I*sqrt(b)*x)/(sqrt(a)*sqrt(e) + I*sqrt(b)*sqrt(-d)))/(S(2)*sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(-x**S(2) + S(1))/(-x**S(2) + S(2)), x), x, sqrt(S(2))*log(-x**S(2) + S(1))*atanh(sqrt(S(2))*x/S(2))/S(2) - sqrt(S(2))*log(-S(2)*sqrt(S(2)) + S(3))*atanh(x)/S(2) + sqrt(S(2))*polylog(S(2), sqrt(S(2))*(-x + S(-1))/(-sqrt(S(2)) + S(2)))/S(4) - sqrt(S(2))*polylog(S(2), sqrt(S(2))*(x + S(-1))/(-sqrt(S(2)) + S(2)))/S(4) + sqrt(S(2))*polylog(S(2), sqrt(S(2))*(-x + S(1))/(sqrt(S(2)) + S(2)))/S(4) - sqrt(S(2))*polylog(S(2), sqrt(S(2))*(x + S(1))/(sqrt(S(2)) + S(2)))/S(4), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(log(-x**S(2) + S(1))/(-x**S(2) + S(2)), x), x, -sqrt(S(2))*log(-x + S(1))*atanh(sqrt(S(2))/S(2))/S(2) + sqrt(S(2))*log(x + S(1))*atanh(sqrt(S(2))/S(2))/S(2) + sqrt(S(2))*log(-x**S(2) + S(1))*atanh(sqrt(S(2))*x/S(2))/S(2) + sqrt(S(2))*polylog(S(2), sqrt(S(2))*(-x + S(-1))/(-sqrt(S(2)) + S(2)))/S(4) - sqrt(S(2))*polylog(S(2), sqrt(S(2))*(x + S(-1))/(-sqrt(S(2)) + S(2)))/S(4) + sqrt(S(2))*polylog(S(2), sqrt(S(2))*(-x + S(1))/(sqrt(S(2)) + S(2)))/S(4) - sqrt(S(2))*polylog(S(2), sqrt(S(2))*(x + S(1))/(sqrt(S(2)) + S(2)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**S(2))*log(d + e*x**S(2))/x**S(2), x), x, -a*log(d + e*x**S(2))/x + c*x*log(d + e*x**S(2)) - S(2)*c*x + (S(2)*a*e + S(2)*c*d)*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*sqrt(e)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + c*x**S(2))*log(d + e*x**S(2))/x**S(2), x), x, -a*log(d + e*x**S(2))/x + S(2)*a*sqrt(e)*atan(sqrt(e)*x/sqrt(d))/sqrt(d) + S(2)*c*sqrt(d)*atan(sqrt(e)*x/sqrt(d))/sqrt(e) + c*x*log(d + e*x**S(2)) - S(2)*c*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*log(c*(a + b*x**S(2))**n)**S(2), x), x, -S(5)*a**S(3)*n**S(2)*log(a + b*x**S(2))/(S(18)*b**S(3)) + a**S(3)*log(c*(a + b*x**S(2))**n)**S(2)/(S(6)*b**S(3)) + S(11)*a**S(2)*n**S(2)*x**S(2)/(S(18)*b**S(2)) - a**S(2)*n*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)/(S(3)*b**S(3)) - S(5)*a*n**S(2)*x**S(4)/(S(36)*b) + a*n*x**S(4)*log(c*(a + b*x**S(2))**n)/(S(6)*b) + n**S(2)*x**S(6)/S(27) - n*x**S(6)*log(c*(a + b*x**S(2))**n)/S(9) + x**S(6)*log(c*(a + b*x**S(2))**n)**S(2)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b*x**S(2))**n)**S(2), x), x, -S(3)*a*n**S(2)*x**S(2)/(S(4)*b) + a*n*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)/b**S(2) - a*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)**S(2)/(S(2)*b**S(2)) + n**S(2)*x**S(4)/S(8) - n*(a + b*x**S(2))**S(2)*log(c*(a + b*x**S(2))**n)/(S(4)*b**S(2)) + (a + b*x**S(2))**S(2)*log(c*(a + b*x**S(2))**n)**S(2)/(S(4)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*x**S(2))**n)**S(2), x), x, n**S(2)*x**S(2) - n*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)/b + (a/S(2) + b*x**S(2)/S(2))*log(c*(a + b*x**S(2))**n)**S(2)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2)/x, x), x, -n**S(2)*polylog(S(3), (a + b*x**S(2))/a) + n*log(c*(a + b*x**S(2))**n)*polylog(S(2), (a + b*x**S(2))/a) + log(c*(a + b*x**S(2))**n)**S(2)*log(-b*x**S(2)/a)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2)/x**S(3), x), x, b*n**S(2)*polylog(S(2), (a + b*x**S(2))/a)/a + b*n*log(c*(a + b*x**S(2))**n)*log(-b*x**S(2)/a)/a - (a/S(2) + b*x**S(2)/S(2))*log(c*(a + b*x**S(2))**n)**S(2)/(a*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2)/x**S(5), x), x, -log(c*(a + b*x**S(2))**n)**S(2)/(S(4)*x**S(4)) - b*n*log(c*(a + b*x**S(2))**n)/(S(2)*a*x**S(2)) + b**S(2)*n**S(2)*log(x)/a**S(2) - b**S(2)*n**S(2)*log(a + b*x**S(2))/(S(2)*a**S(2)) - b**S(2)*n**S(2)*polylog(S(2), (a + b*x**S(2))/a)/(S(2)*a**S(2)) - b**S(2)*n*log(c*(a + b*x**S(2))**n)*log(-b*x**S(2)/a)/(S(2)*a**S(2)) + b**S(2)*log(c*(a + b*x**S(2))**n)**S(2)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2)/x**S(7), x), x, -log(c*(a + b*x**S(2))**n)**S(2)/(S(6)*x**S(6)) - b*n*log(c*(a + b*x**S(2))**n)/(S(6)*a*x**S(4)) - b**S(2)*n**S(2)/(S(6)*a**S(2)*x**S(2)) + b**S(2)*n*log(c*(a + b*x**S(2))**n)/(S(3)*a**S(2)*x**S(2)) - b**S(3)*n**S(2)*log(x)/a**S(3) + b**S(3)*n**S(2)*log(a + b*x**S(2))/(S(2)*a**S(3)) + b**S(3)*n**S(2)*polylog(S(2), (a + b*x**S(2))/a)/(S(3)*a**S(3)) + b**S(3)*n*log(c*(a + b*x**S(2))**n)*log(-b*x**S(2)/a)/(S(3)*a**S(3)) - b**S(3)*log(c*(a + b*x**S(2))**n)**S(2)/(S(6)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(c*(a + b*x**S(2))**n)**S(2), x), x, S(8)*a**(S(5)/2)*n**S(2)*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/(S(5)*b**(S(5)/2)) + S(4)*I*a**(S(5)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))**S(2)/(S(5)*b**(S(5)/2)) - S(184)*a**(S(5)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))/(S(75)*b**(S(5)/2)) + S(4)*I*a**(S(5)/2)*n**S(2)*polylog(S(2), (-sqrt(a) + I*sqrt(b)*x)/(sqrt(a) + I*sqrt(b)*x))/(S(5)*b**(S(5)/2)) + S(4)*a**(S(5)/2)*n*log(c*(a + b*x**S(2))**n)*atan(sqrt(b)*x/sqrt(a))/(S(5)*b**(S(5)/2)) + S(184)*a**S(2)*n**S(2)*x/(S(75)*b**S(2)) - S(4)*a**S(2)*n*x*log(c*(a + b*x**S(2))**n)/(S(5)*b**S(2)) - S(64)*a*n**S(2)*x**S(3)/(S(225)*b) + S(4)*a*n*x**S(3)*log(c*(a + b*x**S(2))**n)/(S(15)*b) + S(8)*n**S(2)*x**S(5)/S(125) - S(4)*n*x**S(5)*log(c*(a + b*x**S(2))**n)/S(25) + x**S(5)*log(c*(a + b*x**S(2))**n)**S(2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(c*(a + b*x**S(2))**n)**S(2), x), x, -S(8)*a**(S(3)/2)*n**S(2)*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/(S(3)*b**(S(3)/2)) - S(4)*I*a**(S(3)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))**S(2)/(S(3)*b**(S(3)/2)) + S(32)*a**(S(3)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))/(S(9)*b**(S(3)/2)) - S(4)*I*a**(S(3)/2)*n**S(2)*polylog(S(2), (-sqrt(a) + I*sqrt(b)*x)/(sqrt(a) + I*sqrt(b)*x))/(S(3)*b**(S(3)/2)) - S(4)*a**(S(3)/2)*n*log(c*(a + b*x**S(2))**n)*atan(sqrt(b)*x/sqrt(a))/(S(3)*b**(S(3)/2)) - S(32)*a*n**S(2)*x/(S(9)*b) + S(4)*a*n*x*log(c*(a + b*x**S(2))**n)/(S(3)*b) + S(8)*n**S(2)*x**S(3)/S(27) - S(4)*n*x**S(3)*log(c*(a + b*x**S(2))**n)/S(9) + x**S(3)*log(c*(a + b*x**S(2))**n)**S(2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2), x), x, S(8)*sqrt(a)*n**S(2)*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/sqrt(b) + S(4)*I*sqrt(a)*n**S(2)*atan(sqrt(b)*x/sqrt(a))**S(2)/sqrt(b) - S(8)*sqrt(a)*n**S(2)*atan(sqrt(b)*x/sqrt(a))/sqrt(b) + S(4)*I*sqrt(a)*n**S(2)*polylog(S(2), (-sqrt(a) + I*sqrt(b)*x)/(sqrt(a) + I*sqrt(b)*x))/sqrt(b) + S(4)*sqrt(a)*n*log(c*(a + b*x**S(2))**n)*atan(sqrt(b)*x/sqrt(a))/sqrt(b) + S(8)*n**S(2)*x - S(4)*n*x*log(c*(a + b*x**S(2))**n) + x*log(c*(a + b*x**S(2))**n)**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2)/x**S(2), x), x, -log(c*(a + b*x**S(2))**n)**S(2)/x + S(8)*sqrt(b)*n**S(2)*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/sqrt(a) + S(4)*I*sqrt(b)*n**S(2)*atan(sqrt(b)*x/sqrt(a))**S(2)/sqrt(a) + S(4)*I*sqrt(b)*n**S(2)*polylog(S(2), (-sqrt(a) + I*sqrt(b)*x)/(sqrt(a) + I*sqrt(b)*x))/sqrt(a) + S(4)*sqrt(b)*n*log(c*(a + b*x**S(2))**n)*atan(sqrt(b)*x/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2)/x**S(4), x), x, -log(c*(a + b*x**S(2))**n)**S(2)/(S(3)*x**S(3)) - S(4)*b*n*log(c*(a + b*x**S(2))**n)/(S(3)*a*x) - S(8)*b**(S(3)/2)*n**S(2)*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/(S(3)*a**(S(3)/2)) - S(4)*I*b**(S(3)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))**S(2)/(S(3)*a**(S(3)/2)) + S(8)*b**(S(3)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))/(S(3)*a**(S(3)/2)) - S(4)*I*b**(S(3)/2)*n**S(2)*polylog(S(2), (-sqrt(a) + I*sqrt(b)*x)/(sqrt(a) + I*sqrt(b)*x))/(S(3)*a**(S(3)/2)) - S(4)*b**(S(3)/2)*n*log(c*(a + b*x**S(2))**n)*atan(sqrt(b)*x/sqrt(a))/(S(3)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2)/x**S(6), x), x, -log(c*(a + b*x**S(2))**n)**S(2)/(S(5)*x**S(5)) - S(4)*b*n*log(c*(a + b*x**S(2))**n)/(S(15)*a*x**S(3)) - S(8)*b**S(2)*n**S(2)/(S(15)*a**S(2)*x) + S(4)*b**S(2)*n*log(c*(a + b*x**S(2))**n)/(S(5)*a**S(2)*x) + S(8)*b**(S(5)/2)*n**S(2)*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/(S(5)*a**(S(5)/2)) + S(4)*I*b**(S(5)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))**S(2)/(S(5)*a**(S(5)/2)) - S(32)*b**(S(5)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))/(S(15)*a**(S(5)/2)) + S(4)*I*b**(S(5)/2)*n**S(2)*polylog(S(2), (-sqrt(a) + I*sqrt(b)*x)/(sqrt(a) + I*sqrt(b)*x))/(S(5)*a**(S(5)/2)) + S(4)*b**(S(5)/2)*n*log(c*(a + b*x**S(2))**n)*atan(sqrt(b)*x/sqrt(a))/(S(5)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(2)/x**S(8), x), x, -log(c*(a + b*x**S(2))**n)**S(2)/(S(7)*x**S(7)) - S(4)*b*n*log(c*(a + b*x**S(2))**n)/(S(35)*a*x**S(5)) - S(8)*b**S(2)*n**S(2)/(S(105)*a**S(2)*x**S(3)) + S(4)*b**S(2)*n*log(c*(a + b*x**S(2))**n)/(S(21)*a**S(2)*x**S(3)) + S(64)*b**S(3)*n**S(2)/(S(105)*a**S(3)*x) - S(4)*b**S(3)*n*log(c*(a + b*x**S(2))**n)/(S(7)*a**S(3)*x) - S(8)*b**(S(7)/2)*n**S(2)*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/(S(7)*a**(S(7)/2)) - S(4)*I*b**(S(7)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))**S(2)/(S(7)*a**(S(7)/2)) + S(184)*b**(S(7)/2)*n**S(2)*atan(sqrt(b)*x/sqrt(a))/(S(105)*a**(S(7)/2)) - S(4)*I*b**(S(7)/2)*n**S(2)*polylog(S(2), (-sqrt(a) + I*sqrt(b)*x)/(sqrt(a) + I*sqrt(b)*x))/(S(7)*a**(S(7)/2)) - S(4)*b**(S(7)/2)*n*log(c*(a + b*x**S(2))**n)*atan(sqrt(b)*x/sqrt(a))/(S(7)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*log(c*(a + b*x**S(2))**n)**S(3), x), x, -S(9)*a**S(2)*n**S(3)*x**S(2)/(S(4)*b**S(2)) + S(3)*a**S(2)*n**S(2)*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)/b**S(3) - S(3)*a**S(2)*n*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)**S(2)/(S(2)*b**S(3)) + a**S(2)*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)**S(3)/(S(2)*b**S(3)) + S(3)*a*n**S(3)*x**S(4)/(S(8)*b) - S(3)*a*n**S(2)*(a + b*x**S(2))**S(2)*log(c*(a + b*x**S(2))**n)/(S(4)*b**S(3)) + S(3)*a*n*(a + b*x**S(2))**S(2)*log(c*(a + b*x**S(2))**n)**S(2)/(S(4)*b**S(3)) - a*(a + b*x**S(2))**S(2)*log(c*(a + b*x**S(2))**n)**S(3)/(S(2)*b**S(3)) - n**S(3)*(a + b*x**S(2))**S(3)/(S(27)*b**S(3)) + n**S(2)*(a + b*x**S(2))**S(3)*log(c*(a + b*x**S(2))**n)/(S(9)*b**S(3)) - n*(a + b*x**S(2))**S(3)*log(c*(a + b*x**S(2))**n)**S(2)/(S(6)*b**S(3)) + (a + b*x**S(2))**S(3)*log(c*(a + b*x**S(2))**n)**S(3)/(S(6)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(c*(a + b*x**S(2))**n)**S(3), x), x, S(21)*a*n**S(3)*x**S(2)/(S(8)*b) - S(3)*a*n**S(2)*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)/b**S(2) + S(3)*a*n*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)**S(2)/(S(2)*b**S(2)) - a*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)**S(3)/(S(2)*b**S(2)) - S(3)*n**S(3)*x**S(4)/S(16) + S(3)*n**S(2)*(a + b*x**S(2))**S(2)*log(c*(a + b*x**S(2))**n)/(S(8)*b**S(2)) - S(3)*n*(a + b*x**S(2))**S(2)*log(c*(a + b*x**S(2))**n)**S(2)/(S(8)*b**S(2)) + (a + b*x**S(2))**S(2)*log(c*(a + b*x**S(2))**n)**S(3)/(S(4)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c*(a + b*x**S(2))**n)**S(3), x), x, -S(3)*n**S(3)*x**S(2) + S(3)*n**S(2)*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)/b - S(3)*n*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)**S(2)/(S(2)*b) + (a/S(2) + b*x**S(2)/S(2))*log(c*(a + b*x**S(2))**n)**S(3)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(3)/x, x), x, S(3)*n**S(3)*polylog(S(4), (a + b*x**S(2))/a) - S(3)*n**S(2)*log(c*(a + b*x**S(2))**n)*polylog(S(3), (a + b*x**S(2))/a) + S(3)*n*log(c*(a + b*x**S(2))**n)**S(2)*polylog(S(2), (a + b*x**S(2))/a)/S(2) + log(c*(a + b*x**S(2))**n)**S(3)*log(-b*x**S(2)/a)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(3)/x**S(3), x), x, -S(3)*b*n**S(3)*polylog(S(3), (a + b*x**S(2))/a)/a + S(3)*b*n**S(2)*log(c*(a + b*x**S(2))**n)*polylog(S(2), (a + b*x**S(2))/a)/a + S(3)*b*n*log(c*(a + b*x**S(2))**n)**S(2)*log(-b*x**S(2)/a)/(S(2)*a) - (a/S(2) + b*x**S(2)/S(2))*log(c*(a + b*x**S(2))**n)**S(3)/(a*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(3)/x**S(5), x), x, -log(c*(a + b*x**S(2))**n)**S(3)/(S(4)*x**S(4)) + S(3)*b**S(2)*n**S(3)*polylog(S(2), (a + b*x**S(2))/a)/(S(2)*a**S(2)) + S(3)*b**S(2)*n**S(3)*polylog(S(3), (a + b*x**S(2))/a)/(S(2)*a**S(2)) + S(3)*b**S(2)*n**S(2)*log(c*(a + b*x**S(2))**n)*log(-b*x**S(2)/a)/(S(2)*a**S(2)) - S(3)*b**S(2)*n**S(2)*log(c*(a + b*x**S(2))**n)*polylog(S(2), (a + b*x**S(2))/a)/(S(2)*a**S(2)) - S(3)*b**S(2)*n*log(c*(a + b*x**S(2))**n)**S(2)*log(-b*x**S(2)/a)/(S(4)*a**S(2)) + b**S(2)*log(c*(a + b*x**S(2))**n)**S(3)/(S(4)*a**S(2)) - S(3)*b*n*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)**S(2)/(S(4)*a**S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)**S(3)/x**S(7), x), x, -log(c*(a + b*x**S(2))**n)**S(3)/(S(6)*x**S(6)) - b*n*log(c*(a + b*x**S(2))**n)**S(2)/(S(4)*a*x**S(4)) - b**S(2)*n**S(2)*log(c*(a + b*x**S(2))**n)/(S(2)*a**S(2)*x**S(2)) + b**S(3)*n**S(3)*log(x)/a**S(3) - b**S(3)*n**S(3)*log(a + b*x**S(2))/(S(2)*a**S(3)) - S(3)*b**S(3)*n**S(3)*polylog(S(2), (a + b*x**S(2))/a)/(S(2)*a**S(3)) - b**S(3)*n**S(3)*polylog(S(3), (a + b*x**S(2))/a)/a**S(3) - S(3)*b**S(3)*n**S(2)*log(c*(a + b*x**S(2))**n)*log(-b*x**S(2)/a)/(S(2)*a**S(3)) + b**S(3)*n**S(2)*log(c*(a + b*x**S(2))**n)*polylog(S(2), (a + b*x**S(2))/a)/a**S(3) + b**S(3)*n*log(c*(a + b*x**S(2))**n)**S(2)*log(-b*x**S(2)/a)/(S(2)*a**S(3)) + b**S(3)*n*log(c*(a + b*x**S(2))**n)**S(2)/(S(4)*a**S(3)) - b**S(3)*log(c*(a + b*x**S(2))**n)**S(3)/(S(6)*a**S(3)) + b**S(2)*n*(a + b*x**S(2))*log(c*(a + b*x**S(2))**n)**S(2)/(S(2)*a**S(3)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(c*(a + b*x**S(2))**n), x), x, -a*(c*(a + b*x**S(2))**n)**(-S(1)/n)*(a + b*x**S(2))*Ei(log(c*(a + b*x**S(2))**n)/n)/(S(2)*b**S(2)*n) + (c*(a + b*x**S(2))**n)**(-S(2)/n)*(a + b*x**S(2))**S(2)*Ei(S(2)*log(c*(a + b*x**S(2))**n)/n)/(S(2)*b**S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(c*(a + b*x**S(2))**n), x), x, (c*(a + b*x**S(2))**n)**(-S(1)/n)*(a/S(2) + b*x**S(2)/S(2))*Ei(log(c*(a + b*x**S(2))**n)/n)/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(c*(a + b*x**S(2))**n)), x), x, Integral(S(1)/(x*log(c*(a + b*x)**n)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(c*(a + b*x**S(2))**n)), x), x, Integral(S(1)/(x**S(2)*log(c*(a + b*x)**n)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(c*(a + b*x**S(2))**n)**S(2), x), x, -a*(c*(a + b*x**S(2))**n)**(-S(1)/n)*(a + b*x**S(2))*Ei(log(c*(a + b*x**S(2))**n)/n)/(S(2)*b**S(2)*n**S(2)) - x**S(2)*(a + b*x**S(2))/(S(2)*b*n*log(c*(a + b*x**S(2))**n)) + (c*(a + b*x**S(2))**n)**(-S(2)/n)*(a + b*x**S(2))**S(2)*Ei(S(2)*log(c*(a + b*x**S(2))**n)/n)/(b**S(2)*n**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(c*(a + b*x**S(2))**n)**S(2), x), x, (-a/S(2) - b*x**S(2)/S(2))/(b*n*log(c*(a + b*x**S(2))**n)) + (c*(a + b*x**S(2))**n)**(-S(1)/n)*(a/S(2) + b*x**S(2)/S(2))*Ei(log(c*(a + b*x**S(2))**n)/n)/(b*n**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(c*(a + b*x**S(2))**n)**S(2)), x), x, Integral(S(1)/(x*log(c*(a + b*x)**n)**S(2)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(c*(a + b*x**S(2))**n)**S(2)), x), x, Integral(S(1)/(x**S(2)*log(c*(a + b*x)**n)**S(2)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(c*(a + b*x**S(2))**n)**S(3), x), x, -a*(a + b*x**S(2))/(S(4)*b**S(2)*n**S(2)*log(c*(a + b*x**S(2))**n)) - a*(c*(a + b*x**S(2))**n)**(-S(1)/n)*(a + b*x**S(2))*Ei(log(c*(a + b*x**S(2))**n)/n)/(S(4)*b**S(2)*n**S(3)) - x**S(2)*(a + b*x**S(2))/(S(4)*b*n*log(c*(a + b*x**S(2))**n)**S(2)) - x**S(2)*(a + b*x**S(2))/(S(2)*b*n**S(2)*log(c*(a + b*x**S(2))**n)) + (c*(a + b*x**S(2))**n)**(-S(2)/n)*(a + b*x**S(2))**S(2)*Ei(S(2)*log(c*(a + b*x**S(2))**n)/n)/(b**S(2)*n**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(c*(a + b*x**S(2))**n)**S(3), x), x, (-a/S(4) - b*x**S(2)/S(4))/(b*n*log(c*(a + b*x**S(2))**n)**S(2)) + (-a/S(4) - b*x**S(2)/S(4))/(b*n**S(2)*log(c*(a + b*x**S(2))**n)) + (c*(a + b*x**S(2))**n)**(-S(1)/n)*(a/S(4) + b*x**S(2)/S(4))*Ei(log(c*(a + b*x**S(2))**n)/n)/(b*n**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(c*(a + b*x**S(2))**n)**S(3)), x), x, Integral(S(1)/(x*log(c*(a + b*x)**n)**S(3)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(c*(a + b*x**S(2))**n)**S(3)), x), x, Integral(S(1)/(x**S(2)*log(c*(a + b*x)**n)**S(3)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(c*(a + b*x**S(2))), x), x, Integral(x**m/log(c*(a + b*x**S(2))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(c*(a + b*x**S(2))), x), x, -a*li(a*c + b*c*x**S(2))/(S(2)*b**S(2)*c) + Ei(S(2)*log(a*c + b*c*x**S(2)))/(S(2)*b**S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(c*(a + b*x**S(2))), x), x, Integral(x**S(2)/log(c*(a + b*x**S(2))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(c*(a + b*x**S(2))), x), x, li(c*(a + b*x**S(2)))/(S(2)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/log(c*(a + b*x**S(2))), x), x, Integral(S(1)/log(c*(a + b*x**S(2))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(c*(a + b*x**S(2)))), x), x, Integral(S(1)/(x*log(a*c + b*c*x)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(c*(a + b*x**S(2)))), x), x, Integral(S(1)/(x**S(2)*log(c*(a + b*x**S(2)))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(c*(a + b*x**S(2)))), x), x, Integral(S(1)/(x**S(2)*log(a*c + b*c*x)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(c*(a + b*x**S(2)))**S(2), x), x, Integral(x**m/log(c*(a + b*x**S(2)))**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(c*(a + b*x**S(2)))**S(2), x), x, -a*li(a*c + b*c*x**S(2))/(S(2)*b**S(2)*c) - x**S(2)*(a + b*x**S(2))/(S(2)*b*log(a*c + b*c*x**S(2))) + Ei(S(2)*log(a*c + b*c*x**S(2)))/(b**S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(c*(a + b*x**S(2)))**S(2), x), x, Integral(x**S(2)/log(c*(a + b*x**S(2)))**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(c*(a + b*x**S(2)))**S(2), x), x, (-a/S(2) - b*x**S(2)/S(2))/(b*log(c*(a + b*x**S(2)))) + li(c*(a + b*x**S(2)))/(S(2)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2)))**(S(-2)), x), x, Integral(log(c*(a + b*x**S(2)))**(S(-2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(c*(a + b*x**S(2)))**S(2)), x), x, Integral(S(1)/(x*log(a*c + b*c*x)**S(2)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(c*(a + b*x**S(2)))**S(2)), x), x, Integral(S(1)/(x**S(2)*log(c*(a + b*x**S(2)))**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(c*(a + b*x**S(2)))**S(2)), x), x, Integral(S(1)/(x**S(2)*log(a*c + b*c*x)**S(2)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/log(c*(a + b*x**S(2)))**S(3), x), x, Integral(x**m/log(c*(a + b*x**S(2)))**S(3), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/log(c*(a + b*x**S(2)))**S(3), x), x, -a*(a + b*x**S(2))/(S(4)*b**S(2)*log(a*c + b*c*x**S(2))) - a*li(a*c + b*c*x**S(2))/(S(4)*b**S(2)*c) - x**S(2)*(a + b*x**S(2))/(S(2)*b*log(a*c + b*c*x**S(2))) - x**S(2)*(a + b*x**S(2))/(S(4)*b*log(a*c + b*c*x**S(2))**S(2)) + Ei(S(2)*log(a*c + b*c*x**S(2)))/(b**S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/log(c*(a + b*x**S(2)))**S(3), x), x, Integral(x**S(2)/log(c*(a + b*x**S(2)))**S(3), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/log(c*(a + b*x**S(2)))**S(3), x), x, (-a/S(4) - b*x**S(2)/S(4))/(b*log(c*(a + b*x**S(2)))) + (-a/S(4) - b*x**S(2)/S(4))/(b*log(c*(a + b*x**S(2)))**S(2)) + li(c*(a + b*x**S(2)))/(S(4)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2)))**(S(-3)), x), x, Integral(log(c*(a + b*x**S(2)))**(S(-3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(c*(a + b*x**S(2)))**S(3)), x), x, Integral(S(1)/(x*log(a*c + b*c*x)**S(3)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*log(c*(a + b*x**S(2)))**S(3)), x), x, Integral(S(1)/(x**S(2)*log(c*(a + b*x**S(2)))**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*log(c*(a + b*x**S(2)))**S(3)), x), x, Integral(S(1)/(x**S(2)*log(a*c + b*c*x)**S(3)), (x, x**S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(b*x**m + S(1))/x, x), x, -polylog(S(2), -b*x**m)/m, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(b*x**m + S(2))/x, x), x, log(S(2))*log(x) - polylog(S(2), -b*x**m/S(2))/m, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(2)*b*x**m + S(6))/x, x), x, log(S(6))*log(x) - polylog(S(2), -b*x**m/S(3))/m, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**m))/x, x), x, log(c*(a + b*x**m))*log(-b*x**m/a)/m + polylog(S(2), (a + b*x**m)/a)/m, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**m)**n)/x, x), x, n*polylog(S(2), (a + b*x**m)/a)/m + log(c*(a + b*x**m)**n)*log(-b*x**m/a)/m, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**m)**n)**S(2)/x, x), x, -S(2)*n**S(2)*polylog(S(3), (a + b*x**m)/a)/m + S(2)*n*log(c*(a + b*x**m)**n)*polylog(S(2), (a + b*x**m)/a)/m + log(c*(a + b*x**m)**n)**S(2)*log(-b*x**m/a)/m, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**m)**n)**S(3)/x, x), x, S(6)*n**S(3)*polylog(S(4), (a + b*x**m)/a)/m - S(6)*n**S(2)*log(c*(a + b*x**m)**n)*polylog(S(3), (a + b*x**m)/a)/m + S(3)*n*log(c*(a + b*x**m)**n)**S(2)*polylog(S(2), (a + b*x**m)/a)/m + log(c*(a + b*x**m)**n)**S(3)*log(-b*x**m/a)/m, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(d*(b*x + c*x**S(2))**n), x), x, n*x**(m + S(1))*hyper((S(1), m + S(1)), (m + S(2),), -c*x/b)/(m + S(1))**S(2) - S(2)*n*x**(m + S(1))/(m + S(1))**S(2) + x**(m + S(1))*log(d*(b*x + c*x**S(2))**n)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(d*(b*x + c*x**S(2))**n), x), x, b**S(5)*n*log(b + c*x)/(S(5)*c**S(5)) - b**S(4)*n*x/(S(5)*c**S(4)) + b**S(3)*n*x**S(2)/(S(10)*c**S(3)) - b**S(2)*n*x**S(3)/(S(15)*c**S(2)) + b*n*x**S(4)/(S(20)*c) - S(2)*n*x**S(5)/S(25) + x**S(5)*log(d*(b*x + c*x**S(2))**n)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(d*(b*x + c*x**S(2))**n), x), x, -b**S(4)*n*log(b + c*x)/(S(4)*c**S(4)) + b**S(3)*n*x/(S(4)*c**S(3)) - b**S(2)*n*x**S(2)/(S(8)*c**S(2)) + b*n*x**S(3)/(S(12)*c) - n*x**S(4)/S(8) + x**S(4)*log(d*(b*x + c*x**S(2))**n)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(d*(b*x + c*x**S(2))**n), x), x, b**S(3)*n*log(b + c*x)/(S(3)*c**S(3)) - b**S(2)*n*x/(S(3)*c**S(2)) + b*n*x**S(2)/(S(6)*c) - S(2)*n*x**S(3)/S(9) + x**S(3)*log(d*(b*x + c*x**S(2))**n)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(d*(b*x + c*x**S(2))**n), x), x, -b**S(2)*n*log(b + c*x)/(S(2)*c**S(2)) + b*n*x/(S(2)*c) - n*x**S(2)/S(2) + x**S(2)*log(d*(b*x + c*x**S(2))**n)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(b*x + c*x**S(2))**n), x), x, b*n*log(b + c*x)/c - S(2)*n*x + x*log(d*(b*x + c*x**S(2))**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(b*x + c*x**S(2))**n)/x, x), x, -n*log(x)**S(2)/S(2) - n*log(x)*log((b + c*x)/b) - n*polylog(S(2), -c*x/b) + log(x)*log(d*(b*x + c*x**S(2))**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(b*x + c*x**S(2))**n)/x**S(2), x), x, -n/x - log(d*(b*x + c*x**S(2))**n)/x + c*n*log(x)/b - c*n*log(b + c*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(b*x + c*x**S(2))**n)/x**S(3), x), x, -n/(S(4)*x**S(2)) - log(d*(b*x + c*x**S(2))**n)/(S(2)*x**S(2)) - c*n/(S(2)*b*x) - c**S(2)*n*log(x)/(S(2)*b**S(2)) + c**S(2)*n*log(b + c*x)/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(b*x + c*x**S(2))**n)/x**S(4), x), x, -n/(S(9)*x**S(3)) - log(d*(b*x + c*x**S(2))**n)/(S(3)*x**S(3)) - c*n/(S(6)*b*x**S(2)) + c**S(2)*n/(S(3)*b**S(2)*x) + c**S(3)*n*log(x)/(S(3)*b**S(3)) - c**S(3)*n*log(b + c*x)/(S(3)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(b*x + c*x**S(2))**n)/x**S(5), x), x, -n/(S(16)*x**S(4)) - log(d*(b*x + c*x**S(2))**n)/(S(4)*x**S(4)) - c*n/(S(12)*b*x**S(3)) + c**S(2)*n/(S(8)*b**S(2)*x**S(2)) - c**S(3)*n/(S(4)*b**S(3)*x) - c**S(4)*n*log(x)/(S(4)*b**S(4)) + c**S(4)*n*log(b + c*x)/(S(4)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(d*(a + b*x + c*x**S(2))**n), x), x, -S(2)*c*n*x**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2))))/((b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(m + S(2))) - S(2)*c*n*x**(m + S(2))*hyper((S(1), m + S(2)), (m + S(3),), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2))))/((b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(m + S(2))) + x**(m + S(1))*log(d*(a + b*x + c*x**S(2))**n)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*log(d*(a + b*x + c*x**S(2))**n), x), x, b*n*x**S(4)/(S(20)*c) + b*n*x**S(2)*(-S(3)*a*c + b**S(2))/(S(10)*c**S(3)) + b*n*(S(5)*a**S(2)*c**S(2) - S(5)*a*b**S(2)*c + b**S(4))*log(a + b*x + c*x**S(2))/(S(10)*c**S(5)) - S(2)*n*x**S(5)/S(25) + x**S(5)*log(d*(a + b*x + c*x**S(2))**n)/S(5) - n*x**S(3)*(-S(2)*a*c/S(15) + b**S(2)/S(15))/c**S(2) + n*x*(-S(2)*a**S(2)*c**S(2)/S(5) + S(4)*a*b**S(2)*c/S(5) - b**S(4)/S(5))/c**S(4) + n*sqrt(-S(4)*a*c + b**S(2))*(a**S(2)*c**S(2)/S(5) - S(3)*a*b**S(2)*c/S(5) + b**S(4)/S(5))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(d*(a + b*x + c*x**S(2))**n), x), x, b*n*x**S(3)/(S(12)*c) + b*n*x*(-S(3)*a*c + b**S(2))/(S(4)*c**S(3)) - b*n*sqrt(-S(4)*a*c + b**S(2))*(-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(S(4)*c**S(4)) - n*x**S(4)/S(8) + x**S(4)*log(d*(a + b*x + c*x**S(2))**n)/S(4) - n*x**S(2)*(-a*c/S(4) + b**S(2)/S(8))/c**S(2) - n*(a**S(2)*c**S(2)/S(4) - a*b**S(2)*c/S(2) + b**S(4)/S(8))*log(a + b*x + c*x**S(2))/c**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(d*(a + b*x + c*x**S(2))**n), x), x, b*n*x**S(2)/(S(6)*c) + b*n*(-S(3)*a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(6)*c**S(3)) - S(2)*n*x**S(3)/S(9) + x**S(3)*log(d*(a + b*x + c*x**S(2))**n)/S(3) + n*x*(S(2)*a*c/S(3) - b**S(2)/S(3))/c**S(2) + n*sqrt(-S(4)*a*c + b**S(2))*(-a*c/S(3) + b**S(2)/S(3))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(d*(a + b*x + c*x**S(2))**n), x), x, b*n*x/(S(2)*c) - b*n*sqrt(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)) - n*x**S(2)/S(2) + x**S(2)*log(d*(a + b*x + c*x**S(2))**n)/S(2) - n*(-a*c/S(2) + b**S(2)/S(4))*log(a + b*x + c*x**S(2))/c**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n), x), x, b*n*log(a + b*x + c*x**S(2))/(S(2)*c) - S(2)*n*x + x*log(d*(a + b*x + c*x**S(2))**n) + n*sqrt(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/x, x), x, -n*log(x)*log((b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(b - sqrt(-S(4)*a*c + b**S(2)))) - n*log(x)*log((b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(b + sqrt(-S(4)*a*c + b**S(2)))) - n*polylog(S(2), -S(2)*c*x/(b - sqrt(-S(4)*a*c + b**S(2)))) - n*polylog(S(2), -S(2)*c*x/(b + sqrt(-S(4)*a*c + b**S(2)))) + log(x)*log(d*(a + b*x + c*x**S(2))**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/x**S(2), x), x, -log(d*(a + b*x + c*x**S(2))**n)/x + b*n*log(x)/a - b*n*log(a + b*x + c*x**S(2))/(S(2)*a) + n*sqrt(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/x**S(3), x), x, -log(d*(a + b*x + c*x**S(2))**n)/(S(2)*x**S(2)) - b*n/(S(2)*a*x) - b*n*sqrt(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)) - n*(-a*c + b**S(2)/S(2))*log(x)/a**S(2) + n*(-a*c/S(2) + b**S(2)/S(4))*log(a + b*x + c*x**S(2))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/x**S(4), x), x, -log(d*(a + b*x + c*x**S(2))**n)/(S(3)*x**S(3)) - b*n/(S(6)*a*x**S(2)) + n*(-S(2)*a*c/S(3) + b**S(2)/S(3))/(a**S(2)*x) + b*n*(-S(3)*a*c + b**S(2))*log(x)/(S(3)*a**S(3)) - b*n*(-S(3)*a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(6)*a**S(3)) + n*sqrt(-S(4)*a*c + b**S(2))*(-a*c/S(3) + b**S(2)/S(3))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/a**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/x**S(5), x), x, -log(d*(a + b*x + c*x**S(2))**n)/(S(4)*x**S(4)) - b*n/(S(12)*a*x**S(3)) + n*(-a*c/S(4) + b**S(2)/S(8))/(a**S(2)*x**S(2)) - b*n*(-S(3)*a*c + b**S(2))/(S(4)*a**S(3)*x) - b*n*sqrt(-S(4)*a*c + b**S(2))*(-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(S(4)*a**S(4)) + n*(a**S(2)*c**S(2)/S(4) - a*b**S(2)*c/S(2) + b**S(4)/S(8))*log(a + b*x + c*x**S(2))/a**S(4) - n*(a**S(2)*c**S(2)/S(2) - a*b**S(2)*c + b**S(4)/S(4))*log(x)/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**S(2) + x + S(1)), x), x, x*log(x**S(2) + x + S(1)) - S(2)*x + log(x**S(2) + x + S(1))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3)), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((d + e*x)**S(4)*log(d*(a + b*x + c*x**S(2))**n), x), x, -S(2)*e**S(4)*n*x**S(5)/S(25) + (d + e*x)**S(5)*log(d*(a + b*x + c*x**S(2))**n)/(S(5)*e) - e**S(3)*n*x**S(4)*(-b*e + S(10)*c*d)/(S(20)*c) - e**S(2)*n*x**S(3)*(b**S(2)*e**S(2) + S(20)*c**S(2)*d**S(2) - c*e*(S(2)*a*e + S(5)*b*d))/(S(15)*c**S(2)) - e*n*x**S(2)*(-b**S(3)*e**S(3) + b*c*e**S(2)*(S(3)*a*e + S(5)*b*d) + S(20)*c**S(3)*d**S(3) - S(10)*c**S(2)*d*e*(a*e + b*d))/(S(10)*c**S(3)) + n*x*(-b**S(4)*e**S(4)/S(5) + b**S(2)*c*e**S(3)*(S(4)*a*e + S(5)*b*d)/S(5) - S(2)*c**S(4)*d**S(4) + S(2)*c**S(3)*d**S(2)*e*(S(2)*a*e + b*d) - c**S(2)*e**S(2)*(S(2)*a**S(2)*e**S(2) + S(15)*a*b*d*e + S(10)*b**S(2)*d**S(2))/S(5))/c**S(4) + n*sqrt(-S(4)*a*c + b**S(2))*(b**S(4)*e**S(4)/S(5) - b**S(2)*c*e**S(3)*(S(3)*a*e + S(5)*b*d)/S(5) + c**S(4)*d**S(4) - S(2)*c**S(3)*d**S(2)*e*(a*e + b*d) + c**S(2)*e**S(2)*(a**S(2)*e**S(2) + S(10)*a*b*d*e + S(10)*b**S(2)*d**S(2))/S(5))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c**S(5) - n*(-b*e/S(10) + c*d/S(5))*(b**S(4)*e**S(4) - b**S(2)*c*e**S(3)*(S(5)*a*e + S(3)*b*d) + c**S(4)*d**S(4) - S(2)*c**S(3)*d**S(2)*e*(S(5)*a*e + b*d) + c**S(2)*e**S(2)*(S(5)*a**S(2)*e**S(2) + S(10)*a*b*d*e + S(4)*b**S(2)*d**S(2)))*log(a + b*x + c*x**S(2))/(c**S(5)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)*log(d*(a + b*x + c*x**S(2))**n), x), x, -e**S(3)*n*x**S(4)/S(8) + (d + e*x)**S(4)*log(d*(a + b*x + c*x**S(2))**n)/(S(4)*e) - e**S(2)*n*x**S(3)*(-b*e + S(8)*c*d)/(S(12)*c) - e*n*x**S(2)*(b**S(2)*e**S(2) + S(12)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + S(2)*b*d))/(S(8)*c**S(2)) + n*x*(b**S(3)*e**S(3)/S(4) - b*c*e**S(2)*(S(3)*a*e + S(4)*b*d)/S(4) - S(2)*c**S(3)*d**S(3) + c**S(2)*d*e*(S(4)*a*e + S(3)*b*d)/S(2))/c**S(3) + n*sqrt(-S(4)*a*c + b**S(2))*(-b*e/S(4) + c*d/S(2))*(b**S(2)*e**S(2) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c**S(4) - n*(b**S(4)*e**S(4)/S(8) - b**S(2)*c*e**S(3)*(a*e + b*d)/S(2) + c**S(4)*d**S(4)/S(4) - c**S(3)*d**S(2)*e*(S(3)*a*e + b*d)/S(2) + c**S(2)*e**S(2)*(a**S(2)*e**S(2) + S(6)*a*b*d*e + S(3)*b**S(2)*d**S(2))/S(4))*log(a + b*x + c*x**S(2))/(c**S(4)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(2)*log(d*(a + b*x + c*x**S(2))**n), x), x, -S(2)*e**S(2)*n*x**S(3)/S(9) + (d + e*x)**S(3)*log(d*(a + b*x + c*x**S(2))**n)/(S(3)*e) - e*n*x**S(2)*(-b*e + S(6)*c*d)/(S(6)*c) + n*x*(-b**S(2)*e**S(2)/S(3) - S(2)*c**S(2)*d**S(2) + c*e*(S(2)*a*e + S(3)*b*d)/S(3))/c**S(2) + n*sqrt(-S(4)*a*c + b**S(2))*(b**S(2)*e**S(2)/S(3) + c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d)/S(3))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c**S(3) - n*(-b*e/S(6) + c*d/S(3))*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - c*e*(S(3)*a*e + b*d))*log(a + b*x + c*x**S(2))/(c**S(3)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*log(d*(a + b*x + c*x**S(2))**n), x), x, -e*n*x**S(2)/S(2) + n*x*(b*e/(S(2)*c) - S(2)*d) + (d + e*x)**S(2)*log(d*(a + b*x + c*x**S(2))**n)/(S(2)*e) + n*sqrt(-S(4)*a*c + b**S(2))*(-b*e/S(2) + c*d)*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c**S(2) - n*(b**S(2)*e**S(2)/S(4) + c**S(2)*d**S(2)/S(2) - c*e*(a*e + b*d)/S(2))*log(a + b*x + c*x**S(2))/(c**S(2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n), x), x, b*n*log(a + b*x + c*x**S(2))/(S(2)*c) - S(2)*n*x + x*log(d*(a + b*x + c*x**S(2))**n) + n*sqrt(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/(d + e*x), x), x, -n*log(-e*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))*log(d + e*x)/e - n*log(-e*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))*log(d + e*x)/e - n*polylog(S(2), S(2)*c*(d + e*x)/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/e - n*polylog(S(2), S(2)*c*(d + e*x)/(-b*e + S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))))/e + log(d*(a + b*x + c*x**S(2))**n)*log(d + e*x)/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/(d + e*x)**S(2), x), x, n*sqrt(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a*e**S(2) - b*d*e + c*d**S(2)) + n*(-b*e/S(2) + c*d)*log(a + b*x + c*x**S(2))/(e*(a*e**S(2) - b*d*e + c*d**S(2))) + n*(b*e - S(2)*c*d)*log(d + e*x)/(e*(a*e**S(2) - b*d*e + c*d**S(2))) - log(d*(a + b*x + c*x**S(2))**n)/(e*(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/(d + e*x)**S(3), x), x, n*sqrt(-S(4)*a*c + b**S(2))*(-b*e/S(2) + c*d)*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a*e**S(2) - b*d*e + c*d**S(2))**S(2) + n*(b**S(2)*e**S(2)/S(4) + c**S(2)*d**S(2)/S(2) - c*e*(a*e + b*d)/S(2))*log(a + b*x + c*x**S(2))/(e*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) - n*(b**S(2)*e**S(2)/S(2) + c**S(2)*d**S(2) - c*e*(a*e + b*d))*log(d + e*x)/(e*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + n*(-b*e/S(2) + c*d)/(e*(d + e*x)*(a*e**S(2) - b*d*e + c*d**S(2))) - log(d*(a + b*x + c*x**S(2))**n)/(S(2)*e*(d + e*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/(d + e*x)**S(4), x), x, n*sqrt(-S(4)*a*c + b**S(2))*(b**S(2)*e**S(2)/S(3) + c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d)/S(3))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a*e**S(2) - b*d*e + c*d**S(2))**S(3) - n*(-b*e/S(3) + S(2)*c*d/S(3))*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - c*e*(S(3)*a*e + b*d))*log(d + e*x)/(e*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + n*(-b*e/S(6) + c*d/S(3))*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - c*e*(S(3)*a*e + b*d))*log(a + b*x + c*x**S(2))/(e*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + n*(b**S(2)*e**S(2)/S(3) + S(2)*c**S(2)*d**S(2)/S(3) - S(2)*c*e*(a*e + b*d)/S(3))/(e*(d + e*x)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + n*(-b*e/S(6) + c*d/S(3))/(e*(d + e*x)**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))) - log(d*(a + b*x + c*x**S(2))**n)/(S(3)*e*(d + e*x)**S(3)), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/(d + e*x)**S(5), x), x, n*sqrt(-S(4)*a*c + b**S(2))*(-b*e/S(4) + c*d/S(2))*(b**S(2)*e**S(2) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a*e**S(2) - b*d*e + c*d**S(2))**S(4) + n*(b**S(4)*e**S(4)/S(8) - b**S(2)*c*e**S(3)*(a*e + b*d)/S(2) + c**S(4)*d**S(4)/S(4) - c**S(3)*d**S(2)*e*(S(3)*a*e + b*d)/S(2) + c**S(2)*e**S(2)*(a**S(2)*e**S(2) + S(6)*a*b*d*e + S(3)*b**S(2)*d**S(2))/S(4))*log(a + b*x + c*x**S(2))/(e*(a*e**S(2) - b*d*e + c*d**S(2))**S(4)) - n*(b**S(4)*e**S(4)/S(4) - b**S(2)*c*e**S(3)*(a*e + b*d) + c**S(4)*d**S(4)/S(2) - c**S(3)*d**S(2)*e*(S(3)*a*e + b*d) + c**S(2)*e**S(2)*(a**S(2)*e**S(2) + S(6)*a*b*d*e + S(3)*b**S(2)*d**S(2))/S(2))*log(d + e*x)/(e*(a*e**S(2) - b*d*e + c*d**S(2))**S(4)) + n*(-b*e/S(4) + c*d/S(2))*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - c*e*(S(3)*a*e + b*d))/(e*(d + e*x)*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + n*(b**S(2)*e**S(2)/S(8) + c**S(2)*d**S(2)/S(4) - c*e*(a*e + b*d)/S(4))/(e*(d + e*x)**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + n*(-b*e/S(12) + c*d/S(6))/(e*(d + e*x)**S(3)*(a*e**S(2) - b*d*e + c*d**S(2))) - log(d*(a + b*x + c*x**S(2))**n)/(S(4)*e*(d + e*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + c*x**S(2))**n)/(a*e + c*e*x**S(2)), x), x, S(2)*n*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(c)*x))*atan(sqrt(c)*x/sqrt(a))/(sqrt(a)*sqrt(c)*e) + I*n*atan(sqrt(c)*x/sqrt(a))**S(2)/(sqrt(a)*sqrt(c)*e) + I*n*polylog(S(2), (-sqrt(a) + I*sqrt(c)*x)/(sqrt(a) + I*sqrt(c)*x))/(sqrt(a)*sqrt(c)*e) + log(d*(a + c*x**S(2))**n)*atan(sqrt(c)*x/sqrt(a))/(sqrt(a)*sqrt(c)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)/(a*e + b*e*x + c*e*x**S(2)), x), x, -S(4)*n*log(S(2)/(-b/sqrt(-S(4)*a*c + b**S(2)) - S(2)*c*x/sqrt(-S(4)*a*c + b**S(2)) + S(1)))*atanh(b/sqrt(-S(4)*a*c + b**S(2)) + S(2)*c*x/sqrt(-S(4)*a*c + b**S(2)))/(e*sqrt(-S(4)*a*c + b**S(2))) + S(2)*n*atanh(b/sqrt(-S(4)*a*c + b**S(2)) + S(2)*c*x/sqrt(-S(4)*a*c + b**S(2)))**S(2)/(e*sqrt(-S(4)*a*c + b**S(2))) - S(2)*n*polylog(S(2), (-b/sqrt(-S(4)*a*c + b**S(2)) - S(2)*c*x/sqrt(-S(4)*a*c + b**S(2)) + S(-1))/(-b/sqrt(-S(4)*a*c + b**S(2)) - S(2)*c*x/sqrt(-S(4)*a*c + b**S(2)) + S(1)))/(e*sqrt(-S(4)*a*c + b**S(2))) - S(2)*log(d*(a + b*x + c*x**S(2))**n)*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(e*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(g*(a + b*x + c*x**S(2))**n)/(d + e*x**S(2)), x), x, n*log(sqrt(e)*(-b - S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-d) - sqrt(e)*(b - sqrt(-S(4)*a*c + b**S(2)))))*log(sqrt(e)*x + sqrt(-d))/(S(2)*sqrt(e)*sqrt(-d)) - n*log(sqrt(e)*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-d) + sqrt(e)*(b - sqrt(-S(4)*a*c + b**S(2)))))*log(-sqrt(e)*x + sqrt(-d))/(S(2)*sqrt(e)*sqrt(-d)) + n*log(sqrt(e)*(-b - S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-d) - sqrt(e)*(b + sqrt(-S(4)*a*c + b**S(2)))))*log(sqrt(e)*x + sqrt(-d))/(S(2)*sqrt(e)*sqrt(-d)) - n*log(sqrt(e)*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-d) + sqrt(e)*(b + sqrt(-S(4)*a*c + b**S(2)))))*log(-sqrt(e)*x + sqrt(-d))/(S(2)*sqrt(e)*sqrt(-d)) + n*polylog(S(2), S(2)*c*(sqrt(e)*x + sqrt(-d))/(S(2)*c*sqrt(-d) - sqrt(e)*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*sqrt(e)*sqrt(-d)) - n*polylog(S(2), S(2)*c*(-sqrt(e)*x + sqrt(-d))/(S(2)*c*sqrt(-d) + sqrt(e)*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*sqrt(e)*sqrt(-d)) + n*polylog(S(2), S(2)*c*(sqrt(e)*x + sqrt(-d))/(S(2)*c*sqrt(-d) - sqrt(e)*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*sqrt(e)*sqrt(-d)) - n*polylog(S(2), S(2)*c*(-sqrt(e)*x + sqrt(-d))/(S(2)*c*sqrt(-d) + sqrt(e)*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*sqrt(e)*sqrt(-d)) + log(g*(a + b*x + c*x**S(2))**n)*log(-sqrt(e)*x + sqrt(-d))/(S(2)*sqrt(e)*sqrt(-d)) - log(g*(a + b*x + c*x**S(2))**n)*log(sqrt(e)*x + sqrt(-d))/(S(2)*sqrt(e)*sqrt(-d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(g*(a + b*x + c*x**S(2))**n)/(d + e*x + f*x**S(2)), x), x, -n*log(f*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(-c*(e - sqrt(-S(4)*d*f + e**S(2))) + f*(b + sqrt(-S(4)*a*c + b**S(2)))))*log(e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/sqrt(-S(4)*d*f + e**S(2)) + n*log(f*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(-c*(e + sqrt(-S(4)*d*f + e**S(2))) + f*(b - sqrt(-S(4)*a*c + b**S(2)))))*log(e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/sqrt(-S(4)*d*f + e**S(2)) + n*log(f*(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/(-c*(e + sqrt(-S(4)*d*f + e**S(2))) + f*(b + sqrt(-S(4)*a*c + b**S(2)))))*log(e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/sqrt(-S(4)*d*f + e**S(2)) - n*log(-f*(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/(-b*f + c*e - c*sqrt(-S(4)*d*f + e**S(2)) + f*sqrt(-S(4)*a*c + b**S(2))))*log(e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/sqrt(-S(4)*d*f + e**S(2)) - n*polylog(S(2), -c*(e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/(-c*(e - sqrt(-S(4)*d*f + e**S(2))) + f*(b - sqrt(-S(4)*a*c + b**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) - n*polylog(S(2), -c*(e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/(-c*(e - sqrt(-S(4)*d*f + e**S(2))) + f*(b + sqrt(-S(4)*a*c + b**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + n*polylog(S(2), -c*(e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/(-c*(e + sqrt(-S(4)*d*f + e**S(2))) + f*(b - sqrt(-S(4)*a*c + b**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + n*polylog(S(2), -c*(e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/(-c*(e + sqrt(-S(4)*d*f + e**S(2))) + f*(b + sqrt(-S(4)*a*c + b**S(2)))))/sqrt(-S(4)*d*f + e**S(2)) + log(g*(a + b*x + c*x**S(2))**n)*log(e + S(2)*f*x - sqrt(-S(4)*d*f + e**S(2)))/sqrt(-S(4)*d*f + e**S(2)) - log(g*(a + b*x + c*x**S(2))**n)*log(e + S(2)*f*x + sqrt(-S(4)*d*f + e**S(2)))/sqrt(-S(4)*d*f + e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(b*x + c*x**S(2))**n)**S(2), x), x, -S(2)*b*n**S(2)*log(-c*x/b)*log(b + c*x)/c - b*n**S(2)*log(b + c*x)**S(2)/c - S(4)*b*n**S(2)*log(b + c*x)/c - S(2)*b*n**S(2)*polylog(S(2), (b + c*x)/b)/c + S(2)*b*n*log(d*(b*x + c*x**S(2))**n)*log(b + c*x)/c + S(8)*n**S(2)*x - S(4)*n*x*log(d*(b*x + c*x**S(2))**n) + x*log(d*(b*x + c*x**S(2))**n)**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x + c*x**S(2))**n)**S(2), x), x, -S(2)*b*n**S(2)*log(a + b*x + c*x**S(2))/c + S(8)*n**S(2)*x - S(4)*n*x*log(d*(a + b*x + c*x**S(2))**n) + x*log(d*(a + b*x + c*x**S(2))**n)**S(2) - n**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*log((b/S(2) + c*x + sqrt(-S(4)*a*c + b**S(2))/S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/c - n**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*log(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))**S(2)/(S(2)*c) - n**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), (-b/S(2) - c*x + sqrt(-S(4)*a*c + b**S(2))/S(2))/sqrt(-S(4)*a*c + b**S(2)))/c - n**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*log((-b/S(2) - c*x + sqrt(-S(4)*a*c + b**S(2))/S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/c - n**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*log(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))**S(2)/(S(2)*c) - n**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*polylog(S(2), (b/S(2) + c*x + sqrt(-S(4)*a*c + b**S(2))/S(2))/sqrt(-S(4)*a*c + b**S(2)))/c - S(4)*n**S(2)*sqrt(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/c + n*(b - sqrt(-S(4)*a*c + b**S(2)))*log(d*(a + b*x + c*x**S(2))**n)*log(b + S(2)*c*x - sqrt(-S(4)*a*c + b**S(2)))/c + n*(b + sqrt(-S(4)*a*c + b**S(2)))*log(d*(a + b*x + c*x**S(2))**n)*log(b + S(2)*c*x + sqrt(-S(4)*a*c + b**S(2)))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(x**S(2) + x + S(1))/(x**S(2) + S(3)*x + S(2)), x), x, x*log(x**S(2) + x + S(1)) - S(2)*x - log((-S(2)*x + S(-1) - sqrt(S(3))*I)/(S(1) - sqrt(S(3))*I))*log(S(2)*x + S(2)) - log((-S(2)*x + S(-1) + sqrt(S(3))*I)/(S(1) + sqrt(S(3))*I))*log(S(2)*x + S(2)) + S(4)*log((-S(2)*x + S(-1) - sqrt(S(3))*I)/(S(3) - sqrt(S(3))*I))*log(S(2)*x + S(4)) + S(4)*log((-S(2)*x + S(-1) + sqrt(S(3))*I)/(S(3) + sqrt(S(3))*I))*log(S(2)*x + S(4)) + log(S(2)*x + S(2))*log(x**S(2) + x + S(1)) - S(4)*log(S(2)*x + S(4))*log(x**S(2) + x + S(1)) + log(x**S(2) + x + S(1))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3)) - polylog(S(2), (S(2)*x + S(2))/(S(1) - sqrt(S(3))*I)) - polylog(S(2), (S(2)*x + S(2))/(S(1) + sqrt(S(3))*I)) + S(4)*polylog(S(2), (S(2)*x + S(4))/(S(3) - sqrt(S(3))*I)) + S(4)*polylog(S(2), (S(2)*x + S(4))/(S(3) + sqrt(S(3))*I)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**S(2) + x + S(1))**S(2), x), x, x*log(x**S(2) + x + S(1))**S(2) - S(4)*x*log(x**S(2) + x + S(1)) + S(8)*x - (S(1) + sqrt(S(3))*I)*log(sqrt(S(3))*I*(S(2)*x + S(1) - sqrt(S(3))*I)/S(6))*log(S(2)*x + S(1) + sqrt(S(3))*I) - (S(1) - sqrt(S(3))*I)*log(-sqrt(S(3))*I*(S(2)*x + S(1) + sqrt(S(3))*I)/S(6))*log(S(2)*x + S(1) - sqrt(S(3))*I) - (S(1) - sqrt(S(3))*I)*log(S(2)*x + S(1) - sqrt(S(3))*I)**S(2)/S(2) + (S(1) - sqrt(S(3))*I)*log(S(2)*x + S(1) - sqrt(S(3))*I)*log(x**S(2) + x + S(1)) - (S(1) + sqrt(S(3))*I)*log(S(2)*x + S(1) + sqrt(S(3))*I)**S(2)/S(2) + (S(1) + sqrt(S(3))*I)*log(S(2)*x + S(1) + sqrt(S(3))*I)*log(x**S(2) + x + S(1)) - S(2)*log(x**S(2) + x + S(1)) - S(4)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3)) - (S(1) - sqrt(S(3))*I)*polylog(S(2), sqrt(S(3))*I*(S(2)*x + S(1) - sqrt(S(3))*I)/S(6)) - (S(1) + sqrt(S(3))*I)*polylog(S(2), -sqrt(S(3))*I*(S(2)*x + S(1) + sqrt(S(3))*I)/S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**S(2) + x + S(-1))**S(2)/x**S(3), x), x, S(3)*log(x)*log((S(2)*x + S(1) + sqrt(S(5)))/(S(1) + sqrt(S(5)))) - S(3)*log(x)*log(x**S(2) + x + S(-1)) + log(x) - (sqrt(S(5)) + S(3))*log(sqrt(S(5))*(x + S(1)/2 + sqrt(S(5))/S(2))/S(5))*log(S(2)*x - sqrt(S(5)) + S(1))/S(2) - (-sqrt(S(5)) + S(3))*log(S(2)*x + S(1) + sqrt(S(5)))**S(2)/S(4) + (-sqrt(S(5)) + S(3))*log(S(2)*x + S(1) + sqrt(S(5)))*log(x**S(2) + x + S(-1))/S(2) - (-sqrt(S(5)) + S(1))*log(S(2)*x + S(1) + sqrt(S(5)))/S(2) - (sqrt(S(5)) + S(3))*log(S(2)*x - sqrt(S(5)) + S(1))**S(2)/S(4) + (sqrt(S(5)) + S(3))*log(S(2)*x - sqrt(S(5)) + S(1))*log(x**S(2) + x + S(-1))/S(2) - (S(1) + sqrt(S(5)))*log(S(2)*x - sqrt(S(5)) + S(1))/S(2) + S(3)*log(S(-1)/2 + sqrt(S(5))/S(2))*log(S(2)*x - sqrt(S(5)) + S(1)) - (-sqrt(S(5)) + S(3))*log(S(2)*sqrt(S(5)))*log(S(2)*x - sqrt(S(5)) + S(1))/S(2) - (sqrt(S(5)) + S(3))*polylog(S(2), sqrt(S(5))*(-x + S(-1)/2 + sqrt(S(5))/S(2))/S(5))/S(2) + (-sqrt(S(5)) + S(3))*polylog(S(2), sqrt(S(5))*(-x + S(-1)/2 + sqrt(S(5))/S(2))/S(5))/S(2) + S(3)*polylog(S(2), -S(2)*x/(S(1) + sqrt(S(5)))) - S(3)*polylog(S(2), (S(2)*x - sqrt(S(5)) + S(1))/(-sqrt(S(5)) + S(1))) + log(x**S(2) + x + S(-1))/x - log(x**S(2) + x + S(-1))**S(2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1)), x), x, x**S(4)*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/S(4) - x**S(4)/S(32) + x**S(3)/S(192) - x**S(2)/S(1024) - x*(x**S(2) - x)**(S(3)/2)/S(32) + x/S(4096) + (-S(149)*x/S(1024) + S(149)/2048)*sqrt(x**S(2) - x) - (x**S(2) - x)**(S(3)/2)/S(12) - S(683)*sqrt(x**S(2) - x)/S(4096) - log(S(8)*x + S(1))/S(32768) - S(1537)*atanh(x/sqrt(x**S(2) - x))/S(16384) + atanh((-S(5)*x/S(3) + S(1)/6)/sqrt(x**S(2) - x))/S(32768), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1)), x), x, x**S(3)*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/S(3) - x**S(3)/S(18) + x**S(2)/S(96) - x/S(384) + (-S(5)*x/S(32) + S(5)/64)*sqrt(x**S(2) - x) - (x**S(2) - x)**(S(3)/2)/S(18) - S(85)*sqrt(x**S(2) - x)/S(384) + log(S(8)*x + S(1))/S(3072) - S(223)*atanh(x/sqrt(x**S(2) - x))/S(1536) - atanh((-S(5)*x/S(3) + S(1)/6)/sqrt(x**S(2) - x))/S(3072), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1)), x), x, x**S(2)*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/S(2) - x**S(2)/S(8) + x/S(32) + (-x/S(8) + S(1)/16)*sqrt(x**S(2) - x) - S(11)*sqrt(x**S(2) - x)/S(32) - log(S(8)*x + S(1))/S(256) - S(33)*atanh(x/sqrt(x**S(2) - x))/S(128) + atanh((-S(5)*x/S(3) + S(1)/6)/sqrt(x**S(2) - x))/S(256), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1)), x), x, x*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1)) - x/S(2) - sqrt(x**S(2) - x)/S(2) + log(S(8)*x + S(1))/S(16) - S(7)*atanh(x/sqrt(x**S(2) - x))/S(8) - atanh((-S(5)*x/S(3) + S(1)/6)/sqrt(x**S(2) - x))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1))/x, x), x, Integral(log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1))/x**S(2), x), x, S(4)*log(x) - S(4)*log(S(8)*x + S(1)) + S(4)*atanh((-S(5)*x/S(3) + S(1)/6)/sqrt(x**S(2) - x)) + S(4)*sqrt(x**S(2) - x)/x - log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1))/x**S(3), x), x, -S(16)*log(x) + S(16)*log(S(8)*x + S(1)) - S(16)*atanh((-S(5)*x/S(3) + S(1)/6)/sqrt(x**S(2) - x)) - S(10)*sqrt(x**S(2) - x)/x - S(2)/x - log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/(S(2)*x**S(2)) - S(2)*(x**S(2) - x)**(S(3)/2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1)), x), x, S(2)*x**(S(5)/2)*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/S(5) - S(2)*x**(S(5)/2)/S(25) + x**(S(3)/2)/S(60) - sqrt(x)/S(160) + sqrt(S(2))*atan(S(2)*sqrt(S(2))*sqrt(x))/S(640) - S(2)*(x**S(2) - x)**(S(3)/2)/(S(25)*sqrt(x)) - S(127)*sqrt(x**S(2) - x)/(S(480)*sqrt(x)) - sqrt(S(2))*sqrt(x**S(2) - x)*atan(S(2)*sqrt(S(2))*sqrt(x + S(-1))/S(3))/(S(640)*sqrt(x)*sqrt(x + S(-1))) - (-S(2)*x/S(15) + S(2)/15)*sqrt(x**S(2) - x)/(sqrt(x)*(sqrt(x) + S(1))) - (-S(2)*x/S(15) + S(2)/15)*sqrt(x**S(2) - x)/(sqrt(x)*(-sqrt(x) + S(1))) - S(71)*(x**S(2) - x)**(S(3)/2)/(S(300)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) # failing due to apart assert rubi_test(rubi_integrate(sqrt(x)*log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1)), x), x, S(2)*x**(S(3)/2)*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/S(3) - S(2)*x**(S(3)/2)/S(9) + sqrt(x)/S(12) - sqrt(S(2))*atan(S(2)*sqrt(S(2))*sqrt(x))/S(48) - S(17)*sqrt(x**S(2) - x)/(S(36)*sqrt(x)) + sqrt(S(2))*sqrt(x**S(2) - x)*atan(S(2)*sqrt(S(2))*sqrt(x + S(-1))/S(3))/(S(48)*sqrt(x)*sqrt(x + S(-1))) - (-S(2)*x/S(9) + S(2)/9)*sqrt(x**S(2) - x)/(sqrt(x)*(sqrt(x) + S(1))) - (-S(2)*x/S(9) + S(2)/9)*sqrt(x**S(2) - x)/(sqrt(x)*(-sqrt(x) + S(1))) - S(2)*(x**S(2) - x)**(S(3)/2)/(S(9)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1))/sqrt(x), x), x, S(2)*sqrt(x)*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1)) - S(2)*sqrt(x) + sqrt(S(2))*atan(S(2)*sqrt(S(2))*sqrt(x))/S(2) - S(2)*sqrt(x**S(2) - x)/(S(3)*sqrt(x)) - sqrt(S(2))*sqrt(x**S(2) - x)*atan(S(2)*sqrt(S(2))*sqrt(x + S(-1))/S(3))/(S(2)*sqrt(x)*sqrt(x + S(-1))) - (-S(2)*x/S(3) + S(2)/3)*sqrt(x**S(2) - x)/(sqrt(x)*(sqrt(x) + S(1))) - (-S(2)*x/S(3) + S(2)/3)*sqrt(x**S(2) - x)/(sqrt(x)*(-sqrt(x) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1))/x**(S(3)/2), x), x, S(4)*sqrt(S(2))*atan(S(2)*sqrt(S(2))*sqrt(x)) - S(8)*atan(sqrt(x)/sqrt(x**S(2) - x)) - S(4)*sqrt(x**S(2) - x)/(S(3)*sqrt(x)) - S(2)*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/sqrt(x) - S(4)*sqrt(S(2))*sqrt(x**S(2) - x)*atan(S(2)*sqrt(S(2))*sqrt(x + S(-1))/S(3))/(sqrt(x)*sqrt(x + S(-1))) + (-S(2)*x/S(3) + S(2)/3)*sqrt(x**S(2) - x)/(sqrt(x)*(sqrt(x) + S(1))) + (-S(2)*x/S(3) + S(2)/3)*sqrt(x**S(2) - x)/(sqrt(x)*(-sqrt(x) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(4)*x + S(4)*sqrt(x*(x + S(-1))) + S(-1))/x**(S(5)/2), x), x, -S(32)*sqrt(S(2))*atan(S(2)*sqrt(S(2))*sqrt(x))/S(3) + S(44)*atan(sqrt(x)/sqrt(x**S(2) - x))/S(3) - S(4)*sqrt(x**S(2) - x)/(S(9)*sqrt(x)) - S(16)/(S(3)*sqrt(x)) + S(32)*sqrt(S(2))*sqrt(x**S(2) - x)*atan(S(2)*sqrt(S(2))*sqrt(x + S(-1))/S(3))/(S(3)*sqrt(x)*sqrt(x + S(-1))) + (-S(2)*x/S(9) + S(2)/9)*sqrt(x**S(2) - x)/(sqrt(x)*(sqrt(x) + S(1))) + (-S(2)*x/S(9) + S(2)/9)*sqrt(x**S(2) - x)/(sqrt(x)*(-sqrt(x) + S(1))) + S(4)*sqrt(x**S(2) - x)/(S(3)*x**(S(3)/2)) - S(2)*log(S(4)*x + S(4)*sqrt(x**S(2) - x) + S(-1))/(S(3)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((a + x)/x)/x, x), x, polylog(S(2), -a/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((a + x**S(2))/x**S(2))/x, x), x, polylog(S(2), -a/x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**(-n)*(a + x**n))/x, x), x, polylog(S(2), -a*x**(-n))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((a + b*x)/x)/x, x), x, -log(-a/(b*x))*log(a/x + b) - polylog(S(2), (a/x + b)/b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((a + b*x**S(2))/x**S(2))/x, x), x, -log(-a/(b*x**S(2)))*log(a/x**S(2) + b)/S(2) - polylog(S(2), (a/x**S(2) + b)/b)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**(-n)*(a + b*x**n))/x, x), x, -log(-a*x**(-n)/b)*log(a*x**(-n) + b)/n - polylog(S(2), (a*x**(-n) + b)/b)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((a + b*x)/x)/(c + d*x), x), x, log((a + b*x)/x)*log(c + d*x)/d + log(-d*x/c)*log(c + d*x)/d - log(-d*(a + b*x)/(-a*d + b*c))*log(c + d*x)/d + polylog(S(2), (c + d*x)/c)/d - polylog(S(2), b*(c + d*x)/(-a*d + b*c))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((a + b*x**S(2))/x**S(2))/(c + d*x), x), x, S(2)*log(-d*x/c)*log(c + d*x)/d - log(-d*(sqrt(b)*x + sqrt(-a))/(sqrt(b)*c - d*sqrt(-a)))*log(c + d*x)/d - log(d*(-sqrt(b)*x + sqrt(-a))/(sqrt(b)*c + d*sqrt(-a)))*log(c + d*x)/d + log(c + d*x)*log(a/x**S(2) + b)/d + S(2)*polylog(S(2), (c + d*x)/c)/d - polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c - d*sqrt(-a)))/d - polylog(S(2), sqrt(b)*(c + d*x)/(sqrt(b)*c + d*sqrt(-a)))/d, expand=True, _diff=True, _numerical=True) # recursion sympy and mathematica assert rubi_test(rubi_integrate(log(x**(-n)*(a + b*x**n))/(c + d*x), x), x, a*n*Integral(log(c + d*x)/(x*(a + b*x**n)), x)/d + log(c + d*x)*log(a*x**(-n) + b)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(4), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(4)/b + n**S(4)*(-S(24)*a*d + S(24)*b*c)*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/(b*d) - n**S(3)*(-S(24)*a*d + S(24)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n**S(2)*(-S(12)*a*d + S(12)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n*(-S(4)*a*d + S(4)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(3)*log((-a*d + b*c)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(3), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(3)/b - n**S(3)*(-S(6)*a*d + S(6)*b*c)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n**S(2)*(-S(6)*a*d + S(6)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n*(-S(3)*a*d + S(3)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(2), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(2)/b + n**S(2)*(-S(2)*a*d + S(2)*b*c)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n*(-S(2)*a*d + S(2)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)/b - n*(-a*d + b*c)*log(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/log(e*((a + b*x)/(c + d*x))**n), x), x, Integral(S(1)/log(e*((a + b*x)/(c + d*x))**n), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**(S(-2)), x), x, Integral(log(e*((a + b*x)/(c + d*x))**n)**(S(-2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(3)/x, x), x, S(6)*n**S(3)*polylog(S(4), c*(a + b*x)/(a*(c + d*x))) - S(6)*n**S(3)*polylog(S(4), d*(a + b*x)/(b*(c + d*x))) - S(6)*n**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(3), c*(a + b*x)/(a*(c + d*x))) + S(6)*n**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(3), d*(a + b*x)/(b*(c + d*x))) + S(3)*n*log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(2), c*(a + b*x)/(a*(c + d*x))) - S(3)*n*log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x))) - log(e*((a + b*x)/(c + d*x))**n)**S(3)*log((-a*d + b*c)/(b*(c + d*x))) + log(e*((a + b*x)/(c + d*x))**n)**S(3)*log(x*(a*d - b*c)/(a*(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(2)/x, x), x, -S(2)*n**S(2)*polylog(S(3), c*(a + b*x)/(a*(c + d*x))) + S(2)*n**S(2)*polylog(S(3), d*(a + b*x)/(b*(c + d*x))) + S(2)*n*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), c*(a + b*x)/(a*(c + d*x))) - S(2)*n*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), d*(a + b*x)/(b*(c + d*x))) - log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x))) + log(e*((a + b*x)/(c + d*x))**n)**S(2)*log(x*(a*d - b*c)/(a*(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/x, x), x, -n*log(x)*log((a + b*x)/a) + n*log(x)*log((c + d*x)/c) - n*polylog(S(2), -b*x/a) + n*polylog(S(2), -d*x/c) + log(x)*log(e*((a + b*x)/(c + d*x))**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(e*((a + b*x)/(c + d*x))**n)), x), x, Integral(S(1)/(x*log(e*((a + b*x)/(c + d*x))**n)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(e*((a + b*x)/(c + d*x))**n)**S(2)), x), x, Integral(S(1)/(x*log(e*((a + b*x)/(c + d*x))**n)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*log(e*(a + b*x)/(c + d*x)), x), x, -x*(-a*d + b*c)**S(3)/(S(4)*d**S(3)) + (a + b*x)**S(4)*log(e*(a + b*x)/(c + d*x))/(S(4)*b) - (a + b*x)**S(3)*(-a*d/S(12) + b*c/S(12))/(b*d) + (a + b*x)**S(2)*(-a*d + b*c)**S(2)/(S(8)*b*d**S(2)) + (-a*d + b*c)**S(4)*log(c + d*x)/(S(4)*b*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x)), x), x, x*(-a*d + b*c)**S(2)/(S(3)*d**S(2)) + (a + b*x)**S(3)*log(e*(a + b*x)/(c + d*x))/(S(3)*b) - (a + b*x)**S(2)*(-a*d/S(6) + b*c/S(6))/(b*d) - (-a*d + b*c)**S(3)*log(c + d*x)/(S(3)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*log(e*(a + b*x)/(c + d*x)), x), x, x*(a*d/S(2) - b*c/S(2))/d + (a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(2)*b) + (-a*d + b*c)**S(2)*log(c + d*x)/(S(2)*b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x)), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))/b - (-a*d + b*c)*log(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))/(a + b*x), x), x, -log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))/b + polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))/(a + b*x)**S(2), x), x, -(c + d*x)*log(e*(a + b*x)/(c + d*x))/((a + b*x)*(-a*d + b*c)) - S(1)/(b*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))/(a + b*x)**S(3), x), x, d**S(2)*log(a + b*x)/(S(2)*b*(-a*d + b*c)**S(2)) - d**S(2)*log(c + d*x)/(S(2)*b*(-a*d + b*c)**S(2)) + d/(S(2)*b*(a + b*x)*(-a*d + b*c)) - log(e*(a + b*x)/(c + d*x))/(S(2)*b*(a + b*x)**S(2)) - S(1)/(S(4)*b*(a + b*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)*log(e*(a + b*x)/(c + d*x))**S(2), x), x, -S(5)*x*(-a*d + b*c)**S(3)/(S(12)*d**S(3)) + (a + b*x)**S(4)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(4)*b) - (a + b*x)**S(3)*(-a*d/S(6) + b*c/S(6))*log(e*(a + b*x)/(c + d*x))/(b*d) + (a + b*x)**S(2)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(4)*b*d**S(2)) + (a + b*x)**S(2)*(-a*d + b*c)**S(2)/(S(12)*b*d**S(2)) - (a + b*x)*(-a*d + b*c)**S(3)*log(e*(a + b*x)/(c + d*x))/(S(2)*b*d**S(3)) - (-a*d + b*c)**S(4)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(S(2)*b*d**S(4)) + S(11)*(-a*d + b*c)**S(4)*log(c + d*x)/(S(12)*b*d**S(4)) - (-a*d + b*c)**S(4)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(S(2)*b*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2), x), x, x*(-a*d + b*c)**S(2)/(S(3)*d**S(2)) + (a + b*x)**S(3)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(3)*b) - (a + b*x)**S(2)*(-a*d/S(3) + b*c/S(3))*log(e*(a + b*x)/(c + d*x))/(b*d) + S(2)*(a + b*x)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(3)*b*d**S(2)) + S(2)*(-a*d + b*c)**S(3)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(S(3)*b*d**S(3)) - (-a*d + b*c)**S(3)*log(c + d*x)/(b*d**S(3)) + S(2)*(-a*d + b*c)**S(3)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(S(3)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*log(e*(a + b*x)/(c + d*x))**S(2), x), x, (a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(2)*b) + (a + b*x)*(a*d - b*c)*log(e*(a + b*x)/(c + d*x))/(b*d) - (-a*d + b*c)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(b*d**S(2)) + (-a*d + b*c)**S(2)*log(c + d*x)/(b*d**S(2)) - (-a*d + b*c)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(2), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))**S(2)/b + (-S(2)*a*d + S(2)*b*c)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(b*d) + (-S(2)*a*d + S(2)*b*c)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(2)/(a + b*x), x), x, -log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/b + S(2)*log(e*(a + b*x)/(c + d*x))*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/b + S(2)*polylog(S(3), b*(c + d*x)/(d*(a + b*x)))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(2)/(a + b*x)**S(2), x), x, -(c + d*x)*log(e*(a + b*x)/(c + d*x))**S(2)/((a + b*x)*(-a*d + b*c)) - (S(2)*c + S(2)*d*x)*log(e*(a + b*x)/(c + d*x))/((a + b*x)*(-a*d + b*c)) - S(2)/(b*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(2)/(a + b*x)**S(3), x), x, -b*(c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(2)*(a + b*x)**S(2)*(-a*d + b*c)**S(2)) - b*(c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(2)*(a + b*x)**S(2)*(-a*d + b*c)**S(2)) - b*(c + d*x)**S(2)/(S(4)*(a + b*x)**S(2)*(-a*d + b*c)**S(2)) + d*(c + d*x)*log(e*(a + b*x)/(c + d*x))**S(2)/((a + b*x)*(-a*d + b*c)**S(2)) + S(2)*d*(c + d*x)*log(e*(a + b*x)/(c + d*x))/((a + b*x)*(-a*d + b*c)**S(2)) + S(2)*d/(b*(a + b*x)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(3), x), x, (a + b*x)**S(3)*log(e*(a + b*x)/(c + d*x))**S(3)/(S(3)*b) - (a + b*x)**S(2)*(-a*d/S(2) + b*c/S(2))*log(e*(a + b*x)/(c + d*x))**S(2)/(b*d) + (a + b*x)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2)/(b*d**S(2)) + (a + b*x)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))/(b*d**S(2)) + (-a*d + b*c)**S(3)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/(b*d**S(3)) + S(3)*(-a*d + b*c)**S(3)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(b*d**S(3)) + S(2)*(-a*d + b*c)**S(3)*log(e*(a + b*x)/(c + d*x))*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d**S(3)) - (-a*d + b*c)**S(3)*log(c + d*x)/(b*d**S(3)) + S(3)*(-a*d + b*c)**S(3)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d**S(3)) - S(2)*(-a*d + b*c)**S(3)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*log(e*(a + b*x)/(c + d*x))**S(3), x), x, (a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(3)/(S(2)*b) - (a + b*x)*(-S(3)*a*d/S(2) + S(3)*b*c/S(2))*log(e*(a + b*x)/(c + d*x))**S(2)/(b*d) - S(3)*(-a*d + b*c)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/(S(2)*b*d**S(2)) - S(3)*(-a*d + b*c)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(b*d**S(2)) - S(3)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d**S(2)) - S(3)*(-a*d + b*c)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d**S(2)) + S(3)*(-a*d + b*c)**S(2)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(3), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))**S(3)/b + (-S(6)*a*d + S(6)*b*c)*log(e*(a + b*x)/(c + d*x))*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) - (-S(6)*a*d + S(6)*b*c)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + (-S(3)*a*d + S(3)*b*c)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(3)/(a + b*x), x), x, -log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))**S(3)/b + S(3)*log(e*(a + b*x)/(c + d*x))**S(2)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/b + S(6)*log(e*(a + b*x)/(c + d*x))*polylog(S(3), b*(c + d*x)/(d*(a + b*x)))/b + S(6)*polylog(S(4), b*(c + d*x)/(d*(a + b*x)))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(3)/(a + b*x)**S(2), x), x, -(c + d*x)*log(e*(a + b*x)/(c + d*x))**S(3)/((a + b*x)*(-a*d + b*c)) - (S(3)*c + S(3)*d*x)*log(e*(a + b*x)/(c + d*x))**S(2)/((a + b*x)*(-a*d + b*c)) - (S(6)*c + S(6)*d*x)*log(e*(a + b*x)/(c + d*x))/((a + b*x)*(-a*d + b*c)) - S(6)/(b*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(3)/(a + b*x)**S(3), x), x, -b*(c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(3)/(S(2)*(a + b*x)**S(2)*(-a*d + b*c)**S(2)) - S(3)*b*(c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(4)*(a + b*x)**S(2)*(-a*d + b*c)**S(2)) - S(3)*b*(c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(4)*(a + b*x)**S(2)*(-a*d + b*c)**S(2)) - S(3)*b*(c + d*x)**S(2)/(S(8)*(a + b*x)**S(2)*(-a*d + b*c)**S(2)) + d*(c + d*x)*log(e*(a + b*x)/(c + d*x))**S(3)/((a + b*x)*(-a*d + b*c)**S(2)) + S(3)*d*(c + d*x)*log(e*(a + b*x)/(c + d*x))**S(2)/((a + b*x)*(-a*d + b*c)**S(2)) + S(6)*d*(c + d*x)*log(e*(a + b*x)/(c + d*x))/((a + b*x)*(-a*d + b*c)**S(2)) + S(6)*d/(b*(a + b*x)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n), x), x, (c + d*x)**S(4)*log(e*((a + b*x)/(c + d*x))**n)/(S(4)*d) - n*(c + d*x)**S(3)*(-a*d/S(12) + b*c/S(12))/(b*d) - n*(c + d*x)**S(2)*(-a*d + b*c)**S(2)/(S(8)*b**S(2)*d) - n*x*(-a*d + b*c)**S(3)/(S(4)*b**S(3)) - n*(-a*d + b*c)**S(4)*log(a + b*x)/(S(4)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n), x), x, (c + d*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n)/(S(3)*d) - n*(c + d*x)**S(2)*(-a*d/S(6) + b*c/S(6))/(b*d) - n*x*(-a*d + b*c)**S(2)/(S(3)*b**S(2)) - n*(-a*d + b*c)**S(3)*log(a + b*x)/(S(3)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)*log(e*((a + b*x)/(c + d*x))**n), x), x, (c + d*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n)/(S(2)*d) + n*x*(a*d/S(2) - b*c/S(2))/b - n*(-a*d + b*c)**S(2)*log(a + b*x)/(S(2)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)/b - n*(-a*d + b*c)*log(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(c + d*x), x), x, -n*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/d - log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(c + d*x)**S(2), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)/((c + d*x)*(-a*d + b*c)) + n/(d*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(c + d*x)**S(3), x), x, b**S(2)*n*log(a + b*x)/(S(2)*d*(-a*d + b*c)**S(2)) - b**S(2)*n*log(c + d*x)/(S(2)*d*(-a*d + b*c)**S(2)) + b*n/(S(2)*d*(c + d*x)*(-a*d + b*c)) + n/(S(4)*d*(c + d*x)**S(2)) - log(e*((a + b*x)/(c + d*x))**n)/(S(2)*d*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(c + d*x)**S(4), x), x, b**S(3)*n*log(a + b*x)/(S(3)*d*(-a*d + b*c)**S(3)) - b**S(3)*n*log(c + d*x)/(S(3)*d*(-a*d + b*c)**S(3)) + b**S(2)*n/(S(3)*d*(c + d*x)*(-a*d + b*c)**S(2)) + b*n/(S(6)*d*(c + d*x)**S(2)*(-a*d + b*c)) + n/(S(9)*d*(c + d*x)**S(3)) - log(e*((a + b*x)/(c + d*x))**n)/(S(3)*d*(c + d*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)*log(e*(a + b*x)/(c + d*x))**S(2), x), x, (c + d*x)**S(4)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(4)*d) - (c + d*x)**S(3)*(-a*d/S(6) + b*c/S(6))*log(e*(a + b*x)/(c + d*x))/(b*d) - (c + d*x)**S(2)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(4)*b**S(2)*d) + (c + d*x)**S(2)*(-a*d + b*c)**S(2)/(S(12)*b**S(2)*d) + S(5)*x*(-a*d + b*c)**S(3)/(S(12)*b**S(3)) - (a + b*x)*(-a*d + b*c)**S(3)*log(e*(a + b*x)/(c + d*x))/(S(2)*b**S(4)) + (-a*d + b*c)**S(4)*log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))/(S(2)*b**S(4)*d) + S(5)*(-a*d + b*c)**S(4)*log(a + b*x)/(S(12)*b**S(4)*d) + (-a*d + b*c)**S(4)*log(c + d*x)/(S(2)*b**S(4)*d) - (-a*d + b*c)**S(4)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(S(2)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2), x), x, (c + d*x)**S(3)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(3)*d) - (c + d*x)**S(2)*(-a*d/S(3) + b*c/S(3))*log(e*(a + b*x)/(c + d*x))/(b*d) + x*(-a*d + b*c)**S(2)/(S(3)*b**S(2)) - S(2)*(a + b*x)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(3)*b**S(3)) + S(2)*(-a*d + b*c)**S(3)*log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))/(S(3)*b**S(3)*d) + (-a*d + b*c)**S(3)*log(a + b*x)/(S(3)*b**S(3)*d) + S(2)*(-a*d + b*c)**S(3)*log(c + d*x)/(S(3)*b**S(3)*d) - S(2)*(-a*d + b*c)**S(3)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(S(3)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)*log(e*(a + b*x)/(c + d*x))**S(2), x), x, (c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(2)*d) + (a + b*x)*(a*d - b*c)*log(e*(a + b*x)/(c + d*x))/b**S(2) + (-a*d + b*c)**S(2)*log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))/(b**S(2)*d) + (-a*d + b*c)**S(2)*log(c + d*x)/(b**S(2)*d) - (-a*d + b*c)**S(2)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(2), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))**S(2)/b + (-S(2)*a*d + S(2)*b*c)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(b*d) + (-S(2)*a*d + S(2)*b*c)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(2)/(c + d*x), x), x, -log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/d - S(2)*log(e*(a + b*x)/(c + d*x))*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/d + S(2)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(2)/(c + d*x)**S(2), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))**S(2)/((c + d*x)*(-a*d + b*c)) - (S(2)*a + S(2)*b*x)*log(e*(a + b*x)/(c + d*x))/((c + d*x)*(-a*d + b*c)) - S(2)/(d*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(2)/(c + d*x)**S(3), x), x, b*(a + b*x)*log(e*(a + b*x)/(c + d*x))**S(2)/((c + d*x)*(-a*d + b*c)**S(2)) - S(2)*b*(a + b*x)*log(e*(a + b*x)/(c + d*x))/((c + d*x)*(-a*d + b*c)**S(2)) - S(2)*b/(d*(c + d*x)*(-a*d + b*c)) - d*(a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(2)*(c + d*x)**S(2)*(-a*d + b*c)**S(2)) + d*(a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(2)*(c + d*x)**S(2)*(-a*d + b*c)**S(2)) - d*(a + b*x)**S(2)/(S(4)*(c + d*x)**S(2)*(-a*d + b*c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(3), x), x, (c + d*x)**S(3)*log(e*(a + b*x)/(c + d*x))**S(3)/(S(3)*d) - (c + d*x)**S(2)*(-a*d/S(2) + b*c/S(2))*log(e*(a + b*x)/(c + d*x))**S(2)/(b*d) - (a + b*x)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2)/b**S(3) + (a + b*x)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))/b**S(3) - S(2)*(-a*d + b*c)**S(3)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(b**S(3)*d) + (-a*d + b*c)**S(3)*log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/(b**S(3)*d) - (-a*d + b*c)**S(3)*log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))/(b**S(3)*d) - S(2)*(-a*d + b*c)**S(3)*log(e*(a + b*x)/(c + d*x))*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(b**S(3)*d) - (-a*d + b*c)**S(3)*log(c + d*x)/(b**S(3)*d) - S(2)*(-a*d + b*c)**S(3)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b**S(3)*d) + (-a*d + b*c)**S(3)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(b**S(3)*d) - S(2)*(-a*d + b*c)**S(3)*polylog(S(3), b*(c + d*x)/(d*(a + b*x)))/(b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)*log(e*(a + b*x)/(c + d*x))**S(3), x), x, (c + d*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(3)/(S(2)*d) - (a + b*x)*(-S(3)*a*d/S(2) + S(3)*b*c/S(2))*log(e*(a + b*x)/(c + d*x))**S(2)/b**S(2) - S(3)*(-a*d + b*c)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))/(b**S(2)*d) + S(3)*(-a*d + b*c)**S(2)*log((a*d - b*c)/(d*(a + b*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/(S(2)*b**S(2)*d) - S(3)*(-a*d + b*c)**S(2)*log(e*(a + b*x)/(c + d*x))*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(b**S(2)*d) - S(3)*(-a*d + b*c)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b**S(2)*d) - S(3)*(-a*d + b*c)**S(2)*polylog(S(3), b*(c + d*x)/(d*(a + b*x)))/(b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(3), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))**S(3)/b + (-S(6)*a*d + S(6)*b*c)*log(e*(a + b*x)/(c + d*x))*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) - (-S(6)*a*d + S(6)*b*c)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + (-S(3)*a*d + S(3)*b*c)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(3)/(c + d*x), x), x, -log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(3)/d - S(3)*log(e*(a + b*x)/(c + d*x))**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/d + S(6)*log(e*(a + b*x)/(c + d*x))*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/d - S(6)*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(3)/(c + d*x)**S(2), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))**S(3)/((c + d*x)*(-a*d + b*c)) - (S(3)*a + S(3)*b*x)*log(e*(a + b*x)/(c + d*x))**S(2)/((c + d*x)*(-a*d + b*c)) + (S(6)*a + S(6)*b*x)*log(e*(a + b*x)/(c + d*x))/((c + d*x)*(-a*d + b*c)) + S(6)/(d*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(3)/(c + d*x)**S(3), x), x, b*(a + b*x)*log(e*(a + b*x)/(c + d*x))**S(3)/((c + d*x)*(-a*d + b*c)**S(2)) - S(3)*b*(a + b*x)*log(e*(a + b*x)/(c + d*x))**S(2)/((c + d*x)*(-a*d + b*c)**S(2)) + S(6)*b*(a + b*x)*log(e*(a + b*x)/(c + d*x))/((c + d*x)*(-a*d + b*c)**S(2)) + S(6)*b/(d*(c + d*x)*(-a*d + b*c)) - d*(a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(3)/(S(2)*(c + d*x)**S(2)*(-a*d + b*c)**S(2)) + S(3)*d*(a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))**S(2)/(S(4)*(c + d*x)**S(2)*(-a*d + b*c)**S(2)) - S(3)*d*(a + b*x)**S(2)*log(e*(a + b*x)/(c + d*x))/(S(4)*(c + d*x)**S(2)*(-a*d + b*c)**S(2)) + S(3)*d*(a + b*x)**S(2)/(S(8)*(c + d*x)**S(2)*(-a*d + b*c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(4), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))**S(4)/b - (-S(24)*a*d + S(24)*b*c)*log(e*(a + b*x)/(c + d*x))*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + (-S(24)*a*d + S(24)*b*c)*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/(b*d) + (-S(12)*a*d + S(12)*b*c)*log(e*(a + b*x)/(c + d*x))**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + (-S(4)*a*d + S(4)*b*c)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(3)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(a + b*x)/(c + d*x))**S(5), x), x, (a + b*x)*log(e*(a + b*x)/(c + d*x))**S(5)/b + (-S(120)*a*d + S(120)*b*c)*log(e*(a + b*x)/(c + d*x))*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/(b*d) - (-S(120)*a*d + S(120)*b*c)*polylog(S(5), d*(a + b*x)/(b*(c + d*x)))/(b*d) - (-S(60)*a*d + S(60)*b*c)*log(e*(a + b*x)/(c + d*x))**S(2)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + (-S(20)*a*d + S(20)*b*c)*log(e*(a + b*x)/(c + d*x))**S(3)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + (-S(5)*a*d + S(5)*b*c)*log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(4)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d*(a + b*x)/(b*(c + d*x)))/(c*f + d*f*x), x), x, polylog(S(2), (-a*d + b*c)/(b*(c + d*x)))/(d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(1) + S(1)/(a + b*x))/(a + b*x), x), x, polylog(S(2), -S(1)/(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(1) - S(1)/(a + b*x))/(a + b*x), x), x, polylog(S(2), S(1)/(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f + g*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n), x), x, (f + g*x)**S(4)*log(e*((a + b*x)/(c + d*x))**n)/(S(4)*g) + n*(-c*g + d*f)**S(4)*log(c + d*x)/(S(4)*d**S(4)*g) - g**S(3)*n*x**S(3)*(-a*d/S(12) + b*c/S(12))/(b*d) - g**S(2)*n*x**S(2)*(-a*d/S(8) + b*c/S(8))*(-a*d*g - b*c*g + S(4)*b*d*f)/(b**S(2)*d**S(2)) + g*n*x*(a*d/S(4) - b*c/S(4))*(a**S(2)*d**S(2)*g**S(2) - a*b*d*g*(-c*g + S(4)*d*f) + b**S(2)*(c**S(2)*g**S(2) - S(4)*c*d*f*g + S(6)*d**S(2)*f**S(2)))/(b**S(3)*d**S(3)) - n*(-a*g + b*f)**S(4)*log(a + b*x)/(S(4)*b**S(4)*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f + g*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n), x), x, (f + g*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n)/(S(3)*g) + n*(-c*g + d*f)**S(3)*log(c + d*x)/(S(3)*d**S(3)*g) - g**S(2)*n*x**S(2)*(-a*d/S(6) + b*c/S(6))/(b*d) + g*n*x*(a*d/S(3) - b*c/S(3))*(-a*d*g - b*c*g + S(3)*b*d*f)/(b**S(2)*d**S(2)) - n*(-a*g + b*f)**S(3)*log(a + b*x)/(S(3)*b**S(3)*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f + g*x)*log(e*((a + b*x)/(c + d*x))**n), x), x, (f + g*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n)/(S(2)*g) + n*(-c*g + d*f)**S(2)*log(c + d*x)/(S(2)*d**S(2)*g) + g*n*x*(a*d/S(2) - b*c/S(2))/(b*d) - n*(-a*g + b*f)**S(2)*log(a + b*x)/(S(2)*b**S(2)*g), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)/b - n*(-a*d + b*c)*log(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(f + g*x), x), x, -n*log(-g*(a + b*x)/(-a*g + b*f))*log(f + g*x)/g + n*log(-g*(c + d*x)/(-c*g + d*f))*log(f + g*x)/g - n*polylog(S(2), b*(f + g*x)/(-a*g + b*f))/g + n*polylog(S(2), d*(f + g*x)/(-c*g + d*f))/g + log(e*((a + b*x)/(c + d*x))**n)*log(f + g*x)/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(f + g*x)**S(2), x), x, -n*(-a*d + b*c)*log(c + d*x)/((-a*g + b*f)*(-c*g + d*f)) + n*(-a*d + b*c)*log(f + g*x)/((-a*g + b*f)*(-c*g + d*f)) + (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)/((f + g*x)*(-a*g + b*f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(f + g*x)**S(3), x), x, b**S(2)*n*log(a + b*x)/(S(2)*g*(-a*g + b*f)**S(2)) - d**S(2)*n*log(c + d*x)/(S(2)*g*(-c*g + d*f)**S(2)) + n*(-a*d/S(2) + b*c/S(2))*(-a*d*g - b*c*g + S(2)*b*d*f)*log(f + g*x)/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + n*(a*d/S(2) - b*c/S(2))/((f + g*x)*(-a*g + b*f)*(-c*g + d*f)) - log(e*((a + b*x)/(c + d*x))**n)/(S(2)*g*(f + g*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(f + g*x)**S(4), x), x, b**S(3)*n*log(a + b*x)/(S(3)*g*(-a*g + b*f)**S(3)) - d**S(3)*n*log(c + d*x)/(S(3)*g*(-c*g + d*f)**S(3)) + n*(-a*d/S(3) + b*c/S(3))*(a**S(2)*d**S(2)*g**S(2) - a*b*d*g*(-c*g + S(3)*d*f) + b**S(2)*(c**S(2)*g**S(2) - S(3)*c*d*f*g + S(3)*d**S(2)*f**S(2)))*log(f + g*x)/((-a*g + b*f)**S(3)*(-c*g + d*f)**S(3)) - n*(-a*d/S(3) + b*c/S(3))*(-a*d*g - b*c*g + S(2)*b*d*f)/((f + g*x)*(-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + n*(a*d/S(6) - b*c/S(6))/((f + g*x)**S(2)*(-a*g + b*f)*(-c*g + d*f)) - log(e*((a + b*x)/(c + d*x))**n)/(S(3)*g*(f + g*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f + g*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n)**S(2), x), x, -a**S(3)*g**S(3)*n**S(2)*(-a*d + b*c)*log(a + b*x)/(S(6)*b**S(4)*d) + a**S(2)*g**S(2)*n**S(2)*(-a*d + b*c)*(-a*d*g - b*c*g + S(4)*b*d*f)*log(a + b*x)/(S(4)*b**S(4)*d**S(2)) + (f + g*x)**S(4)*log(e*((a + b*x)/(c + d*x))**n)**S(2)/(S(4)*g) - n**S(2)*(-c*g + d*f)**S(4)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(S(2)*d**S(4)*g) - n*(-c*g + d*f)**S(4)*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(S(2)*d**S(4)*g) + c**S(3)*g**S(3)*n**S(2)*(-a*d + b*c)*log(c + d*x)/(S(6)*b*d**S(4)) - g**S(3)*n*x**S(3)*(-a*d/S(6) + b*c/S(6))*log(e*((a + b*x)/(c + d*x))**n)/(b*d) - c**S(2)*g**S(2)*n**S(2)*(-a*d + b*c)*(-a*d*g - b*c*g + S(4)*b*d*f)*log(c + d*x)/(S(4)*b**S(2)*d**S(4)) + g**S(3)*n**S(2)*x**S(2)*(-a*d + b*c)**S(2)/(S(12)*b**S(2)*d**S(2)) - g**S(2)*n*x**S(2)*(-a*d/S(4) + b*c/S(4))*(-a*d*g - b*c*g + S(4)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)/(b**S(2)*d**S(2)) - g**S(3)*n**S(2)*x*(-a*d + b*c)**S(2)*(a*d + b*c)/(S(6)*b**S(3)*d**S(3)) + g**S(2)*n**S(2)*x*(-a*d + b*c)**S(2)*(-a*d*g - b*c*g + S(4)*b*d*f)/(S(4)*b**S(3)*d**S(3)) - n**S(2)*(-a*g + b*f)**S(4)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(S(2)*b**S(4)*g) + n*(-a*g + b*f)**S(4)*log(e*((a + b*x)/(c + d*x))**n)*log((a*d - b*c)/(d*(a + b*x)))/(S(2)*b**S(4)*g) - g*n*(a + b*x)*(-a*d/S(2) + b*c/S(2))*(a**S(2)*d**S(2)*g**S(2) - a*b*d*g*(-c*g + S(4)*d*f) + b**S(2)*(c**S(2)*g**S(2) - S(4)*c*d*f*g + S(6)*d**S(2)*f**S(2)))*log(e*((a + b*x)/(c + d*x))**n)/(b**S(4)*d**S(3)) + g*n**S(2)*(-a*d + b*c)**S(2)*(a**S(2)*d**S(2)*g**S(2) - a*b*d*g*(-c*g + S(4)*d*f) + b**S(2)*(c**S(2)*g**S(2) - S(4)*c*d*f*g + S(6)*d**S(2)*f**S(2)))*log(c + d*x)/(S(2)*b**S(4)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f + g*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n)**S(2), x), x, a**S(2)*g**S(2)*n**S(2)*(-a*d + b*c)*log(a + b*x)/(S(3)*b**S(3)*d) + (f + g*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n)**S(2)/(S(3)*g) - S(2)*n**S(2)*(-c*g + d*f)**S(3)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(S(3)*d**S(3)*g) - S(2)*n*(-c*g + d*f)**S(3)*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(S(3)*d**S(3)*g) - c**S(2)*g**S(2)*n**S(2)*(-a*d + b*c)*log(c + d*x)/(S(3)*b*d**S(3)) - g**S(2)*n*x**S(2)*(-a*d/S(3) + b*c/S(3))*log(e*((a + b*x)/(c + d*x))**n)/(b*d) + g**S(2)*n**S(2)*x*(-a*d + b*c)**S(2)/(S(3)*b**S(2)*d**S(2)) - S(2)*n**S(2)*(-a*g + b*f)**S(3)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(S(3)*b**S(3)*g) + S(2)*n*(-a*g + b*f)**S(3)*log(e*((a + b*x)/(c + d*x))**n)*log((a*d - b*c)/(d*(a + b*x)))/(S(3)*b**S(3)*g) - g*n*(a + b*x)*(-S(2)*a*d/S(3) + S(2)*b*c/S(3))*(-a*d*g - b*c*g + S(3)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)/(b**S(3)*d**S(2)) + S(2)*g*n**S(2)*(-a*d + b*c)**S(2)*(-a*d*g - b*c*g + S(3)*b*d*f)*log(c + d*x)/(S(3)*b**S(3)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f + g*x)*log(e*((a + b*x)/(c + d*x))**n)**S(2), x), x, (f + g*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n)**S(2)/(S(2)*g) - n**S(2)*(-c*g + d*f)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(d**S(2)*g) - n*(-c*g + d*f)**S(2)*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(d**S(2)*g) - n**S(2)*(-a*g + b*f)**S(2)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(b**S(2)*g) + n*(-a*g + b*f)**S(2)*log(e*((a + b*x)/(c + d*x))**n)*log((a*d - b*c)/(d*(a + b*x)))/(b**S(2)*g) + g*n*(a + b*x)*(a*d - b*c)*log(e*((a + b*x)/(c + d*x))**n)/(b**S(2)*d) + g*n**S(2)*(-a*d + b*c)**S(2)*log(c + d*x)/(b**S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(2), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(2)/b + n**S(2)*(-S(2)*a*d + S(2)*b*c)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n*(-S(2)*a*d + S(2)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) # taking long time in rubi_test assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(2)/(f + g*x), x), x, -S(2)*n**S(2)*polylog(S(3), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/g + S(2)*n**S(2)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/g + S(2)*n*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/g - S(2)*n*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/g - log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))/g + log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(2)/(f + g*x)**S(2), x), x, n**S(2)*(-S(2)*a*d + S(2)*b*c)*polylog(S(2), (a + b*x)*(-c*g + d*f)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)*(-c*g + d*f)) + n*(-S(2)*a*d + S(2)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)*(-c*g + d*f)) + (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(2)/((f + g*x)*(-a*g + b*f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(2)/(f + g*x)**S(3), x), x, b**S(2)*n**S(2)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(g*(-a*g + b*f)**S(2)) - b**S(2)*n*log(e*((a + b*x)/(c + d*x))**n)*log((a*d - b*c)/(d*(a + b*x)))/(g*(-a*g + b*f)**S(2)) + d**S(2)*n**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(g*(-c*g + d*f)**S(2)) + d**S(2)*n*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(g*(-c*g + d*f)**S(2)) - g*n**S(2)*(-a*d + b*c)**S(2)*log(c + d*x)/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + g*n**S(2)*(-a*d + b*c)**S(2)*log(f + g*x)/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + g*n*(a + b*x)*(-a*d + b*c)*log(e*((a + b*x)/(c + d*x))**n)/((f + g*x)*(-a*g + b*f)**S(2)*(-c*g + d*f)) - n**S(2)*(-a*d + b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*log(-g*(a + b*x)/(-a*g + b*f))*log(f + g*x)/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + n**S(2)*(-a*d + b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*log(-g*(c + d*x)/(-c*g + d*f))*log(f + g*x)/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) - n**S(2)*(-a*d + b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*polylog(S(2), b*(f + g*x)/(-a*g + b*f))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + n**S(2)*(-a*d + b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*polylog(S(2), d*(f + g*x)/(-c*g + d*f))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + n*(-a*d + b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)*log(f + g*x)/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) - log(e*((a + b*x)/(c + d*x))**n)**S(2)/(S(2)*g*(f + g*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f + g*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n)**S(3), x), x, a**S(2)*g**S(2)*n**S(3)*(-a*d + b*c)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(b**S(3)*d) - a**S(2)*g**S(2)*n**S(2)*(-a*d + b*c)*log(e*((a + b*x)/(c + d*x))**n)*log((a*d - b*c)/(d*(a + b*x)))/(b**S(3)*d) + (f + g*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n)**S(3)/(S(3)*g) + S(2)*n**S(3)*(-c*g + d*f)**S(3)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(d**S(3)*g) - S(2)*n**S(2)*(-c*g + d*f)**S(3)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(d**S(3)*g) - n*(-c*g + d*f)**S(3)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))/(d**S(3)*g) + c**S(2)*g**S(2)*n**S(3)*(-a*d + b*c)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d**S(3)) + c**S(2)*g**S(2)*n**S(2)*(-a*d + b*c)*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(b*d**S(3)) - g**S(2)*n*x**S(2)*(-a*d/S(2) + b*c/S(2))*log(e*((a + b*x)/(c + d*x))**n)**S(2)/(b*d) - S(2)*n**S(3)*(-a*g + b*f)**S(3)*polylog(S(3), b*(c + d*x)/(d*(a + b*x)))/(b**S(3)*g) - S(2)*n**S(2)*(-a*g + b*f)**S(3)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(b**S(3)*g) + n*(-a*g + b*f)**S(3)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((a*d - b*c)/(d*(a + b*x)))/(b**S(3)*g) + g**S(2)*n**S(2)*(a + b*x)*(-a*d + b*c)**S(2)*log(e*((a + b*x)/(c + d*x))**n)/(b**S(3)*d**S(2)) - g*n*(a + b*x)*(-a*d + b*c)*(-a*d*g - b*c*g + S(3)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)**S(2)/(b**S(3)*d**S(2)) - g**S(2)*n**S(3)*(-a*d + b*c)**S(3)*log(c + d*x)/(b**S(3)*d**S(3)) - S(2)*g*n**S(3)*(-a*d + b*c)**S(2)*(-a*d*g - b*c*g + S(3)*b*d*f)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b**S(3)*d**S(3)) - S(2)*g*n**S(2)*(-a*d + b*c)**S(2)*(-a*d*g - b*c*g + S(3)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(b**S(3)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f + g*x)*log(e*((a + b*x)/(c + d*x))**n)**S(3), x), x, (f + g*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n)**S(3)/(S(2)*g) + S(3)*n**S(3)*(-c*g + d*f)**S(2)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(d**S(2)*g) - S(3)*n**S(2)*(-c*g + d*f)**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(d**S(2)*g) - S(3)*n*(-c*g + d*f)**S(2)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))/(S(2)*d**S(2)*g) - S(3)*n**S(3)*(-a*g + b*f)**S(2)*polylog(S(3), b*(c + d*x)/(d*(a + b*x)))/(b**S(2)*g) - S(3)*n**S(2)*(-a*g + b*f)**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(b**S(2)*g) + S(3)*n*(-a*g + b*f)**S(2)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((a*d - b*c)/(d*(a + b*x)))/(S(2)*b**S(2)*g) + g*n*(a + b*x)*(S(3)*a*d/S(2) - S(3)*b*c/S(2))*log(e*((a + b*x)/(c + d*x))**n)**S(2)/(b**S(2)*d) - S(3)*g*n**S(3)*(-a*d + b*c)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b**S(2)*d**S(2)) - S(3)*g*n**S(2)*(-a*d + b*c)**S(2)*log(e*((a + b*x)/(c + d*x))**n)*log((-a*d + b*c)/(b*(c + d*x)))/(b**S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(3), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(3)/b - n**S(3)*(-S(6)*a*d + S(6)*b*c)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n**S(2)*(-S(6)*a*d + S(6)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n*(-S(3)*a*d + S(3)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) # takes long time in test assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(3)/(f + g*x), x), x, -S(6)*n**S(3)*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/g + S(6)*n**S(3)*polylog(S(4), (a + b*x)*(-c*g + d*f)/((c + d*x)*(-a*g + b*f)))/g - S(6)*n**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(3), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/g + S(6)*n**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/g + S(3)*n*log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(2), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/g - S(3)*n*log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/g - log(e*((a + b*x)/(c + d*x))**n)**S(3)*log((-a*d + b*c)/(b*(c + d*x)))/g + log(e*((a + b*x)/(c + d*x))**n)**S(3)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/g, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(3)/(f + g*x)**S(2), x), x, -n**S(3)*(-S(6)*a*d + S(6)*b*c)*polylog(S(3), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)*(-c*g + d*f)) + n**S(2)*(-S(6)*a*d + S(6)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)*(-c*g + d*f)) + n*(-S(3)*a*d + S(3)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)*(-c*g + d*f)) + (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(3)/((f + g*x)*(-a*g + b*f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(3)/(f + g*x)**S(3), x), x, S(3)*b**S(2)*n**S(3)*polylog(S(3), b*(c + d*x)/(d*(a + b*x)))/(g*(-a*g + b*f)**S(2)) + S(3)*b**S(2)*n**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), b*(c + d*x)/(d*(a + b*x)))/(g*(-a*g + b*f)**S(2)) - S(3)*b**S(2)*n*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((a*d - b*c)/(d*(a + b*x)))/(S(2)*g*(-a*g + b*f)**S(2)) - S(3)*d**S(2)*n**S(3)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(g*(-c*g + d*f)**S(2)) + S(3)*d**S(2)*n**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(g*(-c*g + d*f)**S(2)) + S(3)*d**S(2)*n*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))/(S(2)*g*(-c*g + d*f)**S(2)) + S(3)*g*n**S(3)*(-a*d + b*c)**S(2)*polylog(S(2), (a + b*x)*(-c*g + d*f)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + S(3)*g*n**S(2)*(-a*d + b*c)**S(2)*log(e*((a + b*x)/(c + d*x))**n)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + g*n*(a + b*x)*(-S(3)*a*d/S(2) + S(3)*b*c/S(2))*log(e*((a + b*x)/(c + d*x))**n)**S(2)/((f + g*x)*(-a*g + b*f)**S(2)*(-c*g + d*f)) - n**S(3)*(-S(3)*a*d + S(3)*b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*polylog(S(3), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + n**S(3)*(-S(3)*a*d + S(3)*b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + n**S(2)*(-S(3)*a*d + S(3)*b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) - n**S(2)*(-S(3)*a*d + S(3)*b*c)*(-a*d*g - b*c*g + S(2)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) - n*(-S(3)*a*d/S(2) + S(3)*b*c/S(2))*(-a*d*g - b*c*g + S(2)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) + n*(-S(3)*a*d/S(2) + S(3)*b*c/S(2))*(-a*d*g - b*c*g + S(2)*b*d*f)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/((-a*g + b*f)**S(2)*(-c*g + d*f)**S(2)) - log(e*((a + b*x)/(c + d*x))**n)**S(3)/(S(2)*g*(f + g*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(4), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(4)/b + n**S(4)*(-S(24)*a*d + S(24)*b*c)*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/(b*d) - n**S(3)*(-S(24)*a*d + S(24)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n**S(2)*(-S(12)*a*d + S(12)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n*(-S(4)*a*d + S(4)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(3)*log((-a*d + b*c)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(5), x), x, (a + b*x)*log(e*((a + b*x)/(c + d*x))**n)**S(5)/b - n**S(5)*(-S(120)*a*d + S(120)*b*c)*polylog(S(5), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n**S(4)*(-S(120)*a*d + S(120)*b*c)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/(b*d) - n**S(3)*(-S(60)*a*d + S(60)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n**S(2)*(-S(20)*a*d + S(20)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(3)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(b*d) + n*(-S(5)*a*d + S(5)*b*c)*log(e*((a + b*x)/(c + d*x))**n)**S(4)*log((-a*d + b*c)/(b*(c + d*x)))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**m*(c + d*x)**(-m + S(-2))/log(e*((a + b*x)/(c + d*x))**n), x), x, (e*((a + b*x)/(c + d*x))**n)**(-(m + S(1))/n)*(a + b*x)**(m + S(1))*(c + d*x)**(-m + S(-1))*Ei((m + S(1))*log(e*((a + b*x)/(c + d*x))**n)/n)/(n*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(3)/((c + d*x)**S(5)*log(e*((a + b*x)/(c + d*x))**n)), x), x, (e*((a + b*x)/(c + d*x))**n)**(-S(4)/n)*(a + b*x)**S(4)*Ei(S(4)*log(e*((a + b*x)/(c + d*x))**n)/n)/(n*(c + d*x)**S(4)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/((c + d*x)**S(4)*log(e*((a + b*x)/(c + d*x))**n)), x), x, (e*((a + b*x)/(c + d*x))**n)**(-S(3)/n)*(a + b*x)**S(3)*Ei(S(3)*log(e*((a + b*x)/(c + d*x))**n)/n)/(n*(c + d*x)**S(3)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/((c + d*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n)), x), x, (e*((a + b*x)/(c + d*x))**n)**(-S(2)/n)*(a + b*x)**S(2)*Ei(S(2)*log(e*((a + b*x)/(c + d*x))**n)/n)/(n*(c + d*x)**S(2)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n)), x), x, (e*((a + b*x)/(c + d*x))**n)**(-S(1)/n)*(a + b*x)*Ei(log(e*((a + b*x)/(c + d*x))**n)/n)/(n*(c + d*x)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x)*(c + d*x)*log(e*((a + b*x)/(c + d*x))**n)), x), x, log(log(e*((a + b*x)/(c + d*x))**n))/(n*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x)**S(2)*log(e*((a + b*x)/(c + d*x))**n)), x), x, (e*((a + b*x)/(c + d*x))**n)**(S(1)/n)*(c + d*x)*Ei(-log(e*((a + b*x)/(c + d*x))**n)/n)/(n*(a + b*x)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)/((a + b*x)**S(3)*log(e*((a + b*x)/(c + d*x))**n)), x), x, (e*((a + b*x)/(c + d*x))**n)**(S(2)/n)*(c + d*x)**S(2)*Ei(-S(2)*log(e*((a + b*x)/(c + d*x))**n)/n)/(n*(a + b*x)**S(2)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)/((a + b*x)**S(4)*log(e*((a + b*x)/(c + d*x))**n)), x), x, (e*((a + b*x)/(c + d*x))**n)**(S(3)/n)*(c + d*x)**S(3)*Ei(-S(3)*log(e*((a + b*x)/(c + d*x))**n)/n)/(n*(a + b*x)**S(3)*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**p/((a + b*x)*(c + d*x)), x), x, log(e*((a + b*x)/(c + d*x))**n)**(p + S(1))/(n*(p + S(1))*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**p/(a*c + b*d*x**S(2) + x*(a*d + b*c)), x), x, log(e*((a + b*x)/(c + d*x))**n)**(p + S(1))/(n*(p + S(1))*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x/(a + b*x))/(a + b*x), x), x, -log(a/(a + b*x))*log(c*x/(a + b*x))/b - polylog(S(2), b*x/(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x/(a + b*x))**S(2)/(x*(a + b*x)), x), x, log(c*x/(a + b*x))**S(3)/(S(3)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a/(a + b*x))*log(c*x/(a + b*x))**S(2)/(x*(a + b*x)), x), x, -log(c*x/(a + b*x))**S(2)*polylog(S(2), b*x/(a + b*x))/a + S(2)*log(c*x/(a + b*x))*polylog(S(3), b*x/(a + b*x))/a - S(2)*polylog(S(4), b*x/(a + b*x))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/((c + d*x)*(f + g*x)), x), x, -n*polylog(S(2), (a + b*x)*(-c*g + d*f)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f) - log(e*((a + b*x)/(c + d*x))**n)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f), expand=True, _diff=True, _numerical=True) # long time in test assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(2)/((c + d*x)*(f + g*x)), x), x, S(2)*n**S(2)*polylog(S(3), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f) - S(2)*n*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(2), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f) - log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f), expand=True, _diff=True, _numerical=True) # || assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(3)/((c + d*x)*(f + g*x)), x), x, -S(6)*n**S(3)*polylog(S(4), (a + b*x)*(-c*g + d*f)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f) + S(6)*n**S(2)*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(3), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f) - S(3)*n*log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(2), (a*(-c*g + d*f) - b*c*g*x + b*d*f*x)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f) - log(e*((a + b*x)/(c + d*x))**n)**S(3)*log((f + g*x)*(-a*d + b*c)/((c + d*x)*(-a*g + b*f)))/(-c*g + d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((-a*d + b*c)/(b*(c + d*x)))*log(e*(a + b*x)/(c + d*x))**S(2)/((c + d*x)*(a*g + b*g*x)), x), x, -log(e*(a + b*x)/(c + d*x))**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(g*(-a*d + b*c)) + S(2)*log(e*(a + b*x)/(c + d*x))*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(g*(-a*d + b*c)) - S(2)*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/(g*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)**S(2)*log((-a*d + b*c)/(b*(c + d*x)))/((c + d*x)*(a*g + b*g*x)), x), x, -S(2)*n**S(2)*polylog(S(4), d*(a + b*x)/(b*(c + d*x)))/(g*(-a*d + b*c)) + S(2)*n*log(e*((a + b*x)/(c + d*x))**n)*polylog(S(3), d*(a + b*x)/(b*(c + d*x)))/(g*(-a*d + b*c)) - log(e*((a + b*x)/(c + d*x))**n)**S(2)*polylog(S(2), d*(a + b*x)/(b*(c + d*x)))/(g*(-a*d + b*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a*x + b)/x), x), x, b*log(x)/a + (a*x + b)*log(c*(a*x + b)/x)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a*x + b)/x)**S(2), x), x, -S(2)*b*log(-b/(a*x))*log(c*(a*x + b)/x)/a - S(2)*b*polylog(S(2), S(1) + b/(a*x))/a + (a*x + b)*log(c*(a*x + b)/x)**S(2)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a*x + b)/x)**S(3), x), x, -S(3)*b*log(-b/(a*x))*log(c*(a*x + b)/x)**S(2)/a - S(6)*b*log(c*(a*x + b)/x)*polylog(S(2), (a*x + b)/(a*x))/a + S(6)*b*polylog(S(3), (a*x + b)/(a*x))/a + (a*x + b)*log(c*(a*x + b)/x)**S(3)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a*x + b)**S(2)/x**S(2)), x), x, x*log(c*(a*x + b)**S(2)/x**S(2)) + S(2)*b*log(a*x + b)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a*x + b)**S(2)/x**S(2))**S(2), x), x, x*log(c*(a*x + b)**S(2)/x**S(2))**S(2) - S(4)*b*log(b/(a*x + b))*log(c*(a*x + b)**S(2)/x**S(2))/a + S(8)*b*polylog(S(2), a*x/(a*x + b))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a*x + b)**S(2)/x**S(2))**S(3), x), x, x*log(c*(a*x + b)**S(2)/x**S(2))**S(3) - S(6)*b*log(b/(a*x + b))*log(c*(a*x + b)**S(2)/x**S(2))**S(2)/a + S(24)*b*log(c*(a*x + b)**S(2)/x**S(2))*polylog(S(2), a*x/(a*x + b))/a + S(48)*b*polylog(S(3), a*x/(a*x + b))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**S(2)/(a*x + b)**S(2)), x), x, x*log(c*x**S(2)/(a*x + b)**S(2)) - S(2)*b*log(a*x + b)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**S(2)/(a*x + b)**S(2))**S(2), x), x, x*log(c*x**S(2)/(a*x + b)**S(2))**S(2) + S(4)*b*log(b/(a*x + b))*log(c*x**S(2)/(a*x + b)**S(2))/a + S(8)*b*polylog(S(2), a*x/(a*x + b))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**S(2)/(a*x + b)**S(2))**S(3), x), x, x*log(c*x**S(2)/(a*x + b)**S(2))**S(3) + S(6)*b*log(b/(a*x + b))*log(c*x**S(2)/(a*x + b)**S(2))**S(2)/a + S(24)*b*log(c*x**S(2)/(a*x + b)**S(2))*polylog(S(2), a*x/(a*x + b))/a - S(48)*b*polylog(S(3), a*x/(a*x + b))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b/x)/(d + e*x**S(2)), x), x, -I*log(sqrt(e)*(-a*x - b)/(I*a*sqrt(d) - b*sqrt(e)))*log(S(1) - I*sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*sqrt(e)) + I*log(sqrt(e)*(a*x + b)/(I*a*sqrt(d) + b*sqrt(e)))*log(S(1) + I*sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*sqrt(e)) + log(a + b/x)*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*sqrt(e)) - I*polylog(S(2), a*(sqrt(d) - I*sqrt(e)*x)/(a*sqrt(d) + I*b*sqrt(e)))/(S(2)*sqrt(d)*sqrt(e)) + I*polylog(S(2), a*(sqrt(d) + I*sqrt(e)*x)/(a*sqrt(d) - I*b*sqrt(e)))/(S(2)*sqrt(d)*sqrt(e)) + I*polylog(S(2), -I*sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*sqrt(e)) - I*polylog(S(2), I*sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(f + g*x**S(2)), x), x, -I*n*log(sqrt(g)*(-a - b*x)/(-a*sqrt(g) + I*b*sqrt(f)))*log(S(1) - I*sqrt(g)*x/sqrt(f))/(S(2)*sqrt(f)*sqrt(g)) + I*n*log(sqrt(g)*(a + b*x)/(a*sqrt(g) + I*b*sqrt(f)))*log(S(1) + I*sqrt(g)*x/sqrt(f))/(S(2)*sqrt(f)*sqrt(g)) + I*n*log(sqrt(g)*(-c - d*x)/(-c*sqrt(g) + I*d*sqrt(f)))*log(S(1) - I*sqrt(g)*x/sqrt(f))/(S(2)*sqrt(f)*sqrt(g)) - I*n*log(sqrt(g)*(c + d*x)/(c*sqrt(g) + I*d*sqrt(f)))*log(S(1) + I*sqrt(g)*x/sqrt(f))/(S(2)*sqrt(f)*sqrt(g)) - I*n*polylog(S(2), b*(sqrt(f) - I*sqrt(g)*x)/(I*a*sqrt(g) + b*sqrt(f)))/(S(2)*sqrt(f)*sqrt(g)) + I*n*polylog(S(2), b*(sqrt(f) + I*sqrt(g)*x)/(-I*a*sqrt(g) + b*sqrt(f)))/(S(2)*sqrt(f)*sqrt(g)) + I*n*polylog(S(2), d*(sqrt(f) - I*sqrt(g)*x)/(I*c*sqrt(g) + d*sqrt(f)))/(S(2)*sqrt(f)*sqrt(g)) - I*n*polylog(S(2), d*(sqrt(f) + I*sqrt(g)*x)/(-I*c*sqrt(g) + d*sqrt(f)))/(S(2)*sqrt(f)*sqrt(g)) + log(e*((a + b*x)/(c + d*x))**n)*atan(sqrt(g)*x/sqrt(f))/(sqrt(f)*sqrt(g)), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate(log(e*((a + b*x)/(c + d*x))**n)/(f + g*x + h*x**S(2)), x), x, n*log((S(2)*a*h - b*g + b*(g + S(2)*h*x))/(S(2)*a*h - b*(g + sqrt(-S(4)*f*h + g**S(2)))))*log(g/sqrt(-S(4)*f*h + g**S(2)) + S(2)*h*x/sqrt(-S(4)*f*h + g**S(2)) + S(1))/sqrt(-S(4)*f*h + g**S(2)) - n*log((S(2)*c*h - d*g + d*(g + S(2)*h*x))/(S(2)*c*h - d*(g + sqrt(-S(4)*f*h + g**S(2)))))*log(g/sqrt(-S(4)*f*h + g**S(2)) + S(2)*h*x/sqrt(-S(4)*f*h + g**S(2)) + S(1))/sqrt(-S(4)*f*h + g**S(2)) - n*log((-S(2)*a*h + b*g - b*(g + S(2)*h*x))/(-S(2)*a*h + b*g - b*sqrt(-S(4)*f*h + g**S(2))))*log(-g/sqrt(-S(4)*f*h + g**S(2)) - S(2)*h*x/sqrt(-S(4)*f*h + g**S(2)) + S(1))/sqrt(-S(4)*f*h + g**S(2)) + n*log((-S(2)*c*h + d*g - d*(g + S(2)*h*x))/(-S(2)*c*h + d*g - d*sqrt(-S(4)*f*h + g**S(2))))*log(-g/sqrt(-S(4)*f*h + g**S(2)) - S(2)*h*x/sqrt(-S(4)*f*h + g**S(2)) + S(1))/sqrt(-S(4)*f*h + g**S(2)) - n*polylog(S(2), b*sqrt(-S(4)*f*h + g**S(2))*(-g/sqrt(-S(4)*f*h + g**S(2)) - S(2)*h*x/sqrt(-S(4)*f*h + g**S(2)) + S(1))/(S(2)*a*h - b*(g - sqrt(-S(4)*f*h + g**S(2)))))/sqrt(-S(4)*f*h + g**S(2)) + n*polylog(S(2), -b*sqrt(-S(4)*f*h + g**S(2))*(g/sqrt(-S(4)*f*h + g**S(2)) + S(2)*h*x/sqrt(-S(4)*f*h + g**S(2)) + S(1))/(S(2)*a*h - b*(g + sqrt(-S(4)*f*h + g**S(2)))))/sqrt(-S(4)*f*h + g**S(2)) + n*polylog(S(2), d*sqrt(-S(4)*f*h + g**S(2))*(-g/sqrt(-S(4)*f*h + g**S(2)) - S(2)*h*x/sqrt(-S(4)*f*h + g**S(2)) + S(1))/(S(2)*c*h - d*(g - sqrt(-S(4)*f*h + g**S(2)))))/sqrt(-S(4)*f*h + g**S(2)) - n*polylog(S(2), -d*sqrt(-S(4)*f*h + g**S(2))*(g/sqrt(-S(4)*f*h + g**S(2)) + S(2)*h*x/sqrt(-S(4)*f*h + g**S(2)) + S(1))/(S(2)*c*h - d*(g + sqrt(-S(4)*f*h + g**S(2)))))/sqrt(-S(4)*f*h + g**S(2)) - S(2)*log(e*((a + b*x)/(c + d*x))**n)*atanh((g + S(2)*h*x)/sqrt(-S(4)*f*h + g**S(2)))/sqrt(-S(4)*f*h + g**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**n/(-c**S(2)*x**S(2) + S(1)), x), x, -(a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**(n + S(1))/(b*c*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**S(3)/(-c**S(2)*x**S(2) + S(1)), x), x, -(a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**S(4)/(S(4)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**S(2)/(-c**S(2)*x**S(2) + S(1)), x), x, -(a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**S(3)/(S(3)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))/(-c**S(2)*x**S(2) + S(1)), x), x, -(a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**S(2)/(S(2)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))*(-c**S(2)*x**S(2) + S(1))), x), x, -log(a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))/(b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**S(2)*(-c**S(2)*x**S(2) + S(1))), x), x, S(1)/(b*c*(a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**S(3)*(-c**S(2)*x**S(2) + S(1))), x), x, S(1)/(S(2)*b*c*(a + b*log(sqrt(-c*x + S(1))/sqrt(c*x + S(1))))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sqrt(-a*x + S(1))/sqrt(a*x + S(1)))/(-a**S(2)*x**S(2) + S(1)), x), x, -log(sqrt(-a*x + S(1))/sqrt(a*x + S(1)))**S(2)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(a + b*exp(x)), x), x, -x**S(4)*log(S(1) + b*exp(x)/a)/S(4) + x**S(4)*log(a + b*exp(x))/S(4) - x**S(3)*polylog(S(2), -b*exp(x)/a) + S(3)*x**S(2)*polylog(S(3), -b*exp(x)/a) - S(6)*x*polylog(S(4), -b*exp(x)/a) + S(6)*polylog(S(5), -b*exp(x)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(a + b*exp(x)), x), x, -x**S(3)*log(S(1) + b*exp(x)/a)/S(3) + x**S(3)*log(a + b*exp(x))/S(3) - x**S(2)*polylog(S(2), -b*exp(x)/a) + S(2)*x*polylog(S(3), -b*exp(x)/a) - S(2)*polylog(S(4), -b*exp(x)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(a + b*exp(x)), x), x, -x**S(2)*log(S(1) + b*exp(x)/a)/S(2) + x**S(2)*log(a + b*exp(x))/S(2) - x*polylog(S(2), -b*exp(x)/a) + polylog(S(3), -b*exp(x)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*exp(x)), x), x, -x*log(S(1) + b*exp(x)/a) + x*log(a + b*exp(x)) - polylog(S(2), -b*exp(x)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*exp(x))/x, x), x, Integral(log(a + b*exp(x))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(e*(f**(c*(a + b*x)))**n + S(1)), x), x, -x**S(3)*polylog(S(2), -e*(f**(c*(a + b*x)))**n)/(b*c*n*log(f)) + S(3)*x**S(2)*polylog(S(3), -e*(f**(c*(a + b*x)))**n)/(b**S(2)*c**S(2)*n**S(2)*log(f)**S(2)) - S(6)*x*polylog(S(4), -e*(f**(c*(a + b*x)))**n)/(b**S(3)*c**S(3)*n**S(3)*log(f)**S(3)) + S(6)*polylog(S(5), -e*(f**(c*(a + b*x)))**n)/(b**S(4)*c**S(4)*n**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(e*(f**(c*(a + b*x)))**n + S(1)), x), x, -x**S(2)*polylog(S(2), -e*(f**(c*(a + b*x)))**n)/(b*c*n*log(f)) + S(2)*x*polylog(S(3), -e*(f**(c*(a + b*x)))**n)/(b**S(2)*c**S(2)*n**S(2)*log(f)**S(2)) - S(2)*polylog(S(4), -e*(f**(c*(a + b*x)))**n)/(b**S(3)*c**S(3)*n**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(e*(f**(c*(a + b*x)))**n + S(1)), x), x, -x*polylog(S(2), -e*(f**(c*(a + b*x)))**n)/(b*c*n*log(f)) + polylog(S(3), -e*(f**(c*(a + b*x)))**n)/(b**S(2)*c**S(2)*n**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(f**(c*(a + b*x)))**n + S(1)), x), x, -polylog(S(2), -e*(f**(c*(a + b*x)))**n)/(b*c*n*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(e*(f**(c*(a + b*x)))**n + S(1))/x, x), x, Integral(log(e*(f**(c*(a + b*x)))**n + S(1))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log(d + e*(f**(c*(a + b*x)))**n), x), x, -x**S(4)*log(S(1) + e*(f**(c*(a + b*x)))**n/d)/S(4) + x**S(4)*log(d + e*(f**(c*(a + b*x)))**n)/S(4) - x**S(3)*polylog(S(2), -e*(f**(c*(a + b*x)))**n/d)/(b*c*n*log(f)) + S(3)*x**S(2)*polylog(S(3), -e*(f**(c*(a + b*x)))**n/d)/(b**S(2)*c**S(2)*n**S(2)*log(f)**S(2)) - S(6)*x*polylog(S(4), -e*(f**(c*(a + b*x)))**n/d)/(b**S(3)*c**S(3)*n**S(3)*log(f)**S(3)) + S(6)*polylog(S(5), -e*(f**(c*(a + b*x)))**n/d)/(b**S(4)*c**S(4)*n**S(4)*log(f)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*log(d + e*(f**(c*(a + b*x)))**n), x), x, -x**S(3)*log(S(1) + e*(f**(c*(a + b*x)))**n/d)/S(3) + x**S(3)*log(d + e*(f**(c*(a + b*x)))**n)/S(3) - x**S(2)*polylog(S(2), -e*(f**(c*(a + b*x)))**n/d)/(b*c*n*log(f)) + S(2)*x*polylog(S(3), -e*(f**(c*(a + b*x)))**n/d)/(b**S(2)*c**S(2)*n**S(2)*log(f)**S(2)) - S(2)*polylog(S(4), -e*(f**(c*(a + b*x)))**n/d)/(b**S(3)*c**S(3)*n**S(3)*log(f)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(d + e*(f**(c*(a + b*x)))**n), x), x, -x**S(2)*log(S(1) + e*(f**(c*(a + b*x)))**n/d)/S(2) + x**S(2)*log(d + e*(f**(c*(a + b*x)))**n)/S(2) - x*polylog(S(2), -e*(f**(c*(a + b*x)))**n/d)/(b*c*n*log(f)) + polylog(S(3), -e*(f**(c*(a + b*x)))**n/d)/(b**S(2)*c**S(2)*n**S(2)*log(f)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d + e*(f**(c*(a + b*x)))**n), x), x, -x*log(S(1) + e*(f**(c*(a + b*x)))**n/d) + x*log(d + e*(f**(c*(a + b*x)))**n) - polylog(S(2), -e*(f**(c*(a + b*x)))**n/d)/(b*c*n*log(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(d + e*(f**(c*(a + b*x)))**n)/x, x), x, Integral(log(d + e*(f**(c*(a + b*x)))**n)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(b*(F**(e*(c + d*x)))**n + pi), x), x, x*log(pi) - polylog(S(2), -b*(F**(e*(c + d*x)))**n/pi)/(d*e*n*log(F)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*sin(a + b*x), x), x, -log(x)*cos(a + b*x)/b - sin(a)*Si(b*x)/b + cos(a)*Ci(b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*sin(a + b*x)**S(2), x), x, x*log(x)/S(2) - x/S(2) - log(x)*sin(a + b*x)*cos(a + b*x)/(S(2)*b) + sin(S(2)*a)*Ci(S(2)*b*x)/(S(4)*b) + cos(S(2)*a)*Si(S(2)*b*x)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*sin(a + b*x)**S(3), x), x, log(x)*cos(a + b*x)**S(3)/(S(3)*b) - log(x)*cos(a + b*x)/b - S(3)*sin(a)*Si(b*x)/(S(4)*b) + sin(S(3)*a)*Si(S(3)*b*x)/(S(12)*b) + S(3)*cos(a)*Ci(b*x)/(S(4)*b) - cos(S(3)*a)*Ci(S(3)*b*x)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*cos(a + b*x), x), x, log(x)*sin(a + b*x)/b - sin(a)*Ci(b*x)/b - cos(a)*Si(b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*cos(a + b*x)**S(2), x), x, x*log(x)/S(2) - x/S(2) + log(x)*sin(a + b*x)*cos(a + b*x)/(S(2)*b) - sin(S(2)*a)*Ci(S(2)*b*x)/(S(4)*b) - cos(S(2)*a)*Si(S(2)*b*x)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*cos(a + b*x)**S(3), x), x, -log(x)*sin(a + b*x)**S(3)/(S(3)*b) + log(x)*sin(a + b*x)/b - S(3)*sin(a)*Ci(b*x)/(S(4)*b) - sin(S(3)*a)*Ci(S(3)*b*x)/(S(12)*b) - S(3)*cos(a)*Si(b*x)/(S(4)*b) - cos(S(3)*a)*Si(S(3)*b*x)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*cos(x) + sin(x)/x, x), x, log(x)*sin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sin(x)), x), x, I*x**S(2)/S(2) + x*log(a*sin(x)) - x*log(-exp(S(2)*I*x) + S(1)) + I*polylog(S(2), exp(S(2)*I*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sin(x)**S(2)), x), x, I*x**S(2) + x*log(a*sin(x)**S(2)) - S(2)*x*log(-exp(S(2)*I*x) + S(1)) + I*polylog(S(2), exp(S(2)*I*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sin(x)**n), x), x, I*n*x**S(2)/S(2) - n*x*log(-exp(S(2)*I*x) + S(1)) + I*n*polylog(S(2), exp(S(2)*I*x))/S(2) + x*log(a*sin(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cos(x)), x), x, I*x**S(2)/S(2) + x*log(a*cos(x)) - x*log(exp(S(2)*I*x) + S(1)) + I*polylog(S(2), -exp(S(2)*I*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cos(x)**S(2)), x), x, I*x**S(2) + x*log(a*cos(x)**S(2)) - S(2)*x*log(exp(S(2)*I*x) + S(1)) + I*polylog(S(2), -exp(S(2)*I*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cos(x)**n), x), x, I*n*x**S(2)/S(2) - n*x*log(exp(S(2)*I*x) + S(1)) + I*n*polylog(S(2), -exp(S(2)*I*x))/S(2) + x*log(a*cos(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*tan(x)), x), x, x*log(a*tan(x)) + S(2)*x*atanh(exp(S(2)*I*x)) - I*polylog(S(2), -exp(S(2)*I*x))/S(2) + I*polylog(S(2), exp(S(2)*I*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*tan(x)**S(2)), x), x, x*log(a*tan(x)**S(2)) + S(4)*x*atanh(exp(S(2)*I*x)) - I*polylog(S(2), -exp(S(2)*I*x)) + I*polylog(S(2), exp(S(2)*I*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*tan(x)**n), x), x, S(2)*n*x*atanh(exp(S(2)*I*x)) - I*n*polylog(S(2), -exp(S(2)*I*x))/S(2) + I*n*polylog(S(2), exp(S(2)*I*x))/S(2) + x*log(a*tan(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cot(x)), x), x, x*log(a*cot(x)) - S(2)*x*atanh(exp(S(2)*I*x)) + I*polylog(S(2), -exp(S(2)*I*x))/S(2) - I*polylog(S(2), exp(S(2)*I*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cot(x)**S(2)), x), x, x*log(a*cot(x)**S(2)) - S(4)*x*atanh(exp(S(2)*I*x)) + I*polylog(S(2), -exp(S(2)*I*x)) - I*polylog(S(2), exp(S(2)*I*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cot(x)**n), x), x, -S(2)*n*x*atanh(exp(S(2)*I*x)) + I*n*polylog(S(2), -exp(S(2)*I*x))/S(2) - I*n*polylog(S(2), exp(S(2)*I*x))/S(2) + x*log(a*cot(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sec(x)), x), x, -I*x**S(2)/S(2) + x*log(a*sec(x)) + x*log(exp(S(2)*I*x) + S(1)) - I*polylog(S(2), -exp(S(2)*I*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sec(x)**S(2)), x), x, -I*x**S(2) + x*log(a*sec(x)**S(2)) + S(2)*x*log(exp(S(2)*I*x) + S(1)) - I*polylog(S(2), -exp(S(2)*I*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sec(x)**n), x), x, -I*n*x**S(2)/S(2) + n*x*log(exp(S(2)*I*x) + S(1)) - I*n*polylog(S(2), -exp(S(2)*I*x))/S(2) + x*log(a*sec(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*csc(x)), x), x, -I*x**S(2)/S(2) + x*log(a*csc(x)) + x*log(-exp(S(2)*I*x) + S(1)) - I*polylog(S(2), exp(S(2)*I*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*csc(x)**S(2)), x), x, -I*x**S(2) + x*log(a*csc(x)**S(2)) + S(2)*x*log(-exp(S(2)*I*x) + S(1)) - I*polylog(S(2), exp(S(2)*I*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*csc(x)**n), x), x, -I*n*x**S(2)/S(2) + n*x*log(-exp(S(2)*I*x) + S(1)) - I*n*polylog(S(2), exp(S(2)*I*x))/S(2) + x*log(a*csc(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(-cos(S(2)*x)/S(2) + S(1)/2)*cos(x), x), x, log(-cos(S(2)*x)/S(2) + S(1)/2)*sin(x) - S(2)*sin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(x)/log(E*sin(x)), x), x, log(log(E*sin(x))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(cot(x)/log(E*sin(x)), x), x, log(log(sin(x)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(x)/log(exp(sin(x))), x), x, log(log(exp(sin(x))))/(-log(exp(sin(x))) + sin(x)) - log(sin(x))/(-log(exp(sin(x))) + sin(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(cos(x))*sec(x)**S(2), x), x, -x + log(cos(x))*tan(x) + tan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sin(x))*cot(x), x), x, log(sin(x))**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sin(x))*sin(x)**S(2)*cos(x), x), x, log(sin(x))*sin(x)**S(3)/S(3) - sin(x)**S(3)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sin(a/S(2) + b*x/S(2))*cos(a/S(2) + b*x/S(2)))*cos(a + b*x), x), x, log(sin(a/S(2) + b*x/S(2))*cos(a/S(2) + b*x/S(2)))*sin(a + b*x)/b - sin(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(x)/log(cos(x)), x), x, -log(log(cos(x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(cos(x))*tan(x), x), x, -log(cos(x))**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(cos(x))*sin(x), x), x, -log(cos(x))*cos(x) + cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(cos(x))*cos(x), x), x, log(cos(x))*sin(x) - sin(x) + atanh(sin(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sin(x))*cos(x), x), x, log(sin(x))*sin(x) - sin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sin(x))*sin(x)**S(2), x), x, I*x**S(2)/S(4) - x*log(-exp(S(2)*I*x) + S(1))/S(2) + x*log(sin(x))/S(2) + x/S(4) - log(sin(x))*sin(x)*cos(x)/S(2) + sin(x)*cos(x)/S(4) + I*polylog(S(2), exp(S(2)*I*x))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sin(x))*sin(x)**S(3), x), x, log(sin(x))*cos(x)**S(3)/S(3) - log(sin(x))*cos(x) - cos(x)**S(3)/S(9) + S(2)*cos(x)/S(3) - S(2)*atanh(cos(x))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sin(sqrt(x))), x), x, I*x**(S(3)/2)/S(3) + I*sqrt(x)*polylog(S(2), exp(S(2)*I*sqrt(x))) - x*log(-exp(S(2)*I*sqrt(x)) + S(1)) + x*log(sin(sqrt(x))) - polylog(S(3), exp(S(2)*I*sqrt(x)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sin(x))*csc(x)**S(2), x), x, -x - log(sin(x))*cot(x) - cot(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*sinh(a + b*x), x), x, log(x)*cosh(a + b*x)/b - sinh(a)*Shi(b*x)/b - cosh(a)*Chi(b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*sinh(a + b*x)**S(2), x), x, -x*log(x)/S(2) + x/S(2) + log(x)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b) - sinh(S(2)*a)*Chi(S(2)*b*x)/(S(4)*b) - cosh(S(2)*a)*Shi(S(2)*b*x)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*sinh(a + b*x)**S(3), x), x, log(x)*cosh(a + b*x)**S(3)/(S(3)*b) - log(x)*cosh(a + b*x)/b + S(3)*sinh(a)*Shi(b*x)/(S(4)*b) - sinh(S(3)*a)*Shi(S(3)*b*x)/(S(12)*b) + S(3)*cosh(a)*Chi(b*x)/(S(4)*b) - cosh(S(3)*a)*Chi(S(3)*b*x)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*cosh(a + b*x), x), x, log(x)*sinh(a + b*x)/b - sinh(a)*Chi(b*x)/b - cosh(a)*Shi(b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*cosh(a + b*x)**S(2), x), x, x*log(x)/S(2) - x/S(2) + log(x)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b) - sinh(S(2)*a)*Chi(S(2)*b*x)/(S(4)*b) - cosh(S(2)*a)*Shi(S(2)*b*x)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*cosh(a + b*x)**S(3), x), x, log(x)*sinh(a + b*x)**S(3)/(S(3)*b) + log(x)*sinh(a + b*x)/b - S(3)*sinh(a)*Chi(b*x)/(S(4)*b) - sinh(S(3)*a)*Chi(S(3)*b*x)/(S(12)*b) - S(3)*cosh(a)*Shi(b*x)/(S(4)*b) - cosh(S(3)*a)*Shi(S(3)*b*x)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sinh(x)), x), x, x**S(2)/S(2) + x*log(a*sinh(x)) - x*log(-exp(S(2)*x) + S(1)) - polylog(S(2), exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sinh(x)**S(2)), x), x, x**S(2) + x*log(a*sinh(x)**S(2)) - S(2)*x*log(-exp(S(2)*x) + S(1)) - polylog(S(2), exp(S(2)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sinh(x)**n), x), x, n*x**S(2)/S(2) - n*x*log(-exp(S(2)*x) + S(1)) - n*polylog(S(2), exp(S(2)*x))/S(2) + x*log(a*sinh(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cosh(x)), x), x, x**S(2)/S(2) + x*log(a*cosh(x)) - x*log(exp(S(2)*x) + S(1)) - polylog(S(2), -exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cosh(x)**S(2)), x), x, x**S(2) + x*log(a*cosh(x)**S(2)) - S(2)*x*log(exp(S(2)*x) + S(1)) - polylog(S(2), -exp(S(2)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*cosh(x)**n), x), x, n*x**S(2)/S(2) - n*x*log(exp(S(2)*x) + S(1)) - n*polylog(S(2), -exp(S(2)*x))/S(2) + x*log(a*cosh(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(tanh(x)), x), x, x*log(tanh(x)) + S(2)*x*atanh(exp(S(2)*x)) + polylog(S(2), -exp(S(2)*x))/S(2) - polylog(S(2), exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*tanh(x)), x), x, x*log(a*tanh(x)) + S(2)*x*atanh(exp(S(2)*x)) + polylog(S(2), -exp(S(2)*x))/S(2) - polylog(S(2), exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*tanh(x)**S(2)), x), x, x*log(a*tanh(x)**S(2)) + S(4)*x*atanh(exp(S(2)*x)) + polylog(S(2), -exp(S(2)*x)) - polylog(S(2), exp(S(2)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*tanh(x)**n), x), x, S(2)*n*x*atanh(exp(S(2)*x)) + n*polylog(S(2), -exp(S(2)*x))/S(2) - n*polylog(S(2), exp(S(2)*x))/S(2) + x*log(a*tanh(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(coth(x)), x), x, x*log(coth(x)) - S(2)*x*atanh(exp(S(2)*x)) - polylog(S(2), -exp(S(2)*x))/S(2) + polylog(S(2), exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*coth(x)), x), x, x*log(a*coth(x)) - S(2)*x*atanh(exp(S(2)*x)) - polylog(S(2), -exp(S(2)*x))/S(2) + polylog(S(2), exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*coth(x)**S(2)), x), x, x*log(a*coth(x)**S(2)) - S(4)*x*atanh(exp(S(2)*x)) - polylog(S(2), -exp(S(2)*x)) + polylog(S(2), exp(S(2)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*coth(x)**n), x), x, -S(2)*n*x*atanh(exp(S(2)*x)) - n*polylog(S(2), -exp(S(2)*x))/S(2) + n*polylog(S(2), exp(S(2)*x))/S(2) + x*log(a*coth(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sech(x)), x), x, -x**S(2)/S(2) + x*log(a*sech(x)) + x*log(exp(S(2)*x) + S(1)) + polylog(S(2), -exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sech(x)**S(2)), x), x, -x**S(2) + x*log(a*sech(x)**S(2)) + S(2)*x*log(exp(S(2)*x) + S(1)) + polylog(S(2), -exp(S(2)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*sech(x)**n), x), x, -n*x**S(2)/S(2) + n*x*log(exp(S(2)*x) + S(1)) + n*polylog(S(2), -exp(S(2)*x))/S(2) + x*log(a*sech(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*csch(x)), x), x, -x**S(2)/S(2) + x*log(a*csch(x)) + x*log(-exp(S(2)*x) + S(1)) + polylog(S(2), exp(S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*csch(x)**S(2)), x), x, -x**S(2) + x*log(a*csch(x)**S(2)) + S(2)*x*log(-exp(S(2)*x) + S(1)) + polylog(S(2), exp(S(2)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*csch(x)**n), x), x, -n*x**S(2)/S(2) + n*x*log(-exp(S(2)*x) + S(1)) + n*polylog(S(2), exp(S(2)*x))/S(2) + x*log(a*csch(x)**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(cosh(x)**S(2))*sinh(x), x), x, log(cosh(x)**S(2))*cosh(x) - S(2)*cosh(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/sqrt(x), x), x, S(2)*sqrt(x)*log(x) - S(4)*sqrt(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(-S(3)*x**S(2) + S(2)), x), x, -x**S(2)/S(2) - (-x**S(2)/S(2) + S(1)/3)*log(-S(3)*x**S(2) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(-log(x)**S(2) + S(1))), x), x, asin(log(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(16)*x**S(3)*log(x)**S(2), x), x, S(4)*x**S(4)*log(x)**S(2) - S(2)*x**S(4)*log(x) + x**S(4)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sqrt(a + b*x)), x), x, -x/S(2) + (a + b*x)*log(sqrt(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(sqrt(x + S(2))), x), x, x**S(2)*log(sqrt(x + S(2)))/S(2) - x**S(2)/S(8) + x/S(2) - log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log((S(3)*x + S(1))**(S(1)/3)), x), x, x**S(2)*log((S(3)*x + S(1))**(S(1)/3))/S(2) - x**S(2)/S(12) + x/S(18) - log(S(3)*x + S(1))/S(54), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(x**S(3) + x), x), x, x**S(2)*log(x**S(3) + x)/S(2) - S(3)*x**S(2)/S(4) + log(x**S(2) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x + sqrt(x**S(2) + S(1))), x), x, x*log(x + sqrt(x**S(2) + S(1))) - sqrt(x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x + sqrt(x**S(2) + S(-1))), x), x, x*log(x + sqrt(x**S(2) + S(-1))) - sqrt(x**S(2) + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x - sqrt(x**S(2) + S(-1))), x), x, x*log(x - sqrt(x**S(2) + S(-1))) + sqrt(x**S(2) + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sqrt(x) + sqrt(x + S(1))), x), x, -sqrt(x)*sqrt(x + S(1))/S(2) + x*log(sqrt(x) + sqrt(x + S(1))) + asinh(sqrt(x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(1)/3)*log(x), x), x, S(3)*x**(S(4)/3)*log(x)/S(4) - S(9)*x**(S(4)/3)/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**log(x), x), x, x**(log(S(2)) + S(1))/(log(S(2)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-log(x) + S(1))/x**S(2), x), x, log(x)/x, expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-log(x) + S(1))/x**S(2), x), x, (log(x) + S(-1))/x + S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x + sqrt(x + S(1)) + S(1)), x), x, x*log(x + sqrt(x + S(1)) + S(1)) - x + sqrt(x + S(1)) + log(x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**S(3) + x), x), x, x*log(x**S(3) + x) - S(3)*x + S(2)*atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**log(S(7)*x + S(-8)), x), x, (S(7)*x + S(-8))**(log(S(2)) + S(1))/(S(7)*(log(S(2)) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((S(5)*x + S(-11))/(S(76)*x + S(5))), x), x, (x + S(-11)/5)*log((S(5)*x + S(-11))/(S(76)*x + S(5))) - S(861)*log(S(76)*x + S(5))/S(380), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((x + S(1))/(x + S(-1)))/x**S(2), x), x, S(2)*log(x) - S(2)*log(-x + S(1)) - (x + S(1))*log((-x + S(-1))/(-x + S(1)))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(1)/(x + S(13))), x), x, x + (x + S(13))*log(S(1)/(x + S(13))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log((x + S(1))/x**S(2)), x), x, x**S(2)*log((x + S(1))/x**S(2))/S(2) + x**S(2)/S(4) + x/S(2) - log(x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*log((S(5)*x + S(7))/x**S(2)), x), x, x**S(4)*log((S(5)*x + S(7))/x**S(2))/S(4) + x**S(4)/S(16) + S(7)*x**S(3)/S(60) - S(49)*x**S(2)/S(200) + S(343)*x/S(500) - S(2401)*log(S(5)*x + S(7))/S(2500), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*log(a + b*x), x), x, -a*x/S(2) - b*x**S(2)/S(4) + (a + b*x)**S(2)*log(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)*log(a + b*x), x), x, (a + b*x)**S(3)*log(a + b*x)/(S(3)*b) - (a + b*x)**S(3)/(S(9)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x)/(a + b*x), x), x, log(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x)/(a + b*x)**S(2), x), x, -log(a + b*x)/(b*(a + b*x)) - S(1)/(b*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n*log(a + b*x), x), x, (a + b*x)**(n + S(1))*log(a + b*x)/(b*(n + S(1))) - (a + b*x)**(n + S(1))/(b*(n + S(1))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*log(b*x)**p), x), x, x*log(a*log(b*x)**p) - p*li(b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*log(b*x**n)**p), x), x, -p*x*(b*x**n)**(-S(1)/n)*Ei(log(b*x**n)/n) + x*log(a*log(b*x**n)**p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*log(b*x)**p)/x, x), x, -(p - log(a*log(b*x)**p))*log(b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a*log(b*x**n)**p)/x, x), x, -(p - log(a*log(b*x**n)**p))*log(b*x**n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(a*log(b*x)**p), x), x, -p*x**(m + S(1))*(b*x)**(-m + S(-1))*Ei((m + S(1))*log(b*x))/(m + S(1)) + x**(m + S(1))*log(a*log(b*x)**p)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*log(a*log(b*x**n)**p), x), x, -p*x**(m + S(1))*(b*x**n)**(-(m + S(1))/n)*Ei((m + S(1))*log(b*x**n)/n)/(m + S(1)) + x**(m + S(1))*log(a*log(b*x**n)**p)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/sqrt(a + b*log(x)), x), x, -sqrt(pi)*a*exp(-a/b)*erfi(sqrt(a + b*log(x))/sqrt(b))/b**(S(3)/2) + x*sqrt(a + b*log(x))/b - sqrt(pi)*exp(-a/b)*erfi(sqrt(a + b*log(x))/sqrt(b))/(S(2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/sqrt(a - b*log(x)), x), x, -sqrt(pi)*a*exp(a/b)*erf(sqrt(a - b*log(x))/sqrt(b))/b**(S(3)/2) - x*sqrt(a - b*log(x))/b + sqrt(pi)*exp(a/b)*erf(sqrt(a - b*log(x))/sqrt(b))/(S(2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*log(x))/sqrt(a + b*log(x)), x), x, B*x*sqrt(a + b*log(x))/b - sqrt(pi)*B*exp(-a/b)*erfi(sqrt(a + b*log(x))/sqrt(b))/(S(2)*sqrt(b)) + sqrt(pi)*(A*b - B*a)*exp(-a/b)*erfi(sqrt(a + b*log(x))/sqrt(b))/b**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*log(x))/sqrt(a - b*log(x)), x), x, -B*x*sqrt(a - b*log(x))/b + sqrt(pi)*B*exp(a/b)*erf(sqrt(a - b*log(x))/sqrt(b))/(S(2)*sqrt(b)) + sqrt(pi)*(-A*b - B*a)*exp(a/b)*erf(sqrt(a - b*log(x))/sqrt(b))/b**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(x)/sqrt(x**S(2) + S(-1)), x), x, sqrt(x**S(2) + S(-1))*log(x) - sqrt(x**S(2) + S(-1)) + atan(sqrt(x**S(2) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(x**S(2) + S(4))*log(x), x), x, (x**S(2) + S(4))**(S(3)/2)*log(x)/S(3) - (x**S(2) + S(4))**(S(3)/2)/S(9) - S(4)*sqrt(x**S(2) + S(4))/S(3) + S(8)*atanh(sqrt(x**S(2) + S(4))/S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x*log(c*x**n)), x), x, log(a + b*log(c*x**n))/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x*log(c*x**n)**S(2)), x), x, atan(sqrt(b)*log(c*x**n)/sqrt(a))/(sqrt(a)*sqrt(b)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x*log(c*x**n)**S(3)), x), x, log(a**(S(1)/3) + b**(S(1)/3)*log(c*x**n))/(S(3)*a**(S(2)/3)*b**(S(1)/3)*n) - log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*log(c*x**n) + b**(S(2)/3)*log(c*x**n)**S(2))/(S(6)*a**(S(2)/3)*b**(S(1)/3)*n) - sqrt(S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*log(c*x**n))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*b**(S(1)/3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x*log(c*x**n)**S(4)), x), x, -sqrt(S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*log(c*x**n) + sqrt(a) + sqrt(b)*log(c*x**n)**S(2))/(S(8)*a**(S(3)/4)*b**(S(1)/4)*n) + sqrt(S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*log(c*x**n) + sqrt(a) + sqrt(b)*log(c*x**n)**S(2))/(S(8)*a**(S(3)/4)*b**(S(1)/4)*n) - sqrt(S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*log(c*x**n)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(1)/4)*n) + sqrt(S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*log(c*x**n)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(1)/4)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x/log(c*x**n)), x), x, log(x)/a - b*log(a*log(c*x**n) + b)/(a**S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x/log(c*x**n)**S(2)), x), x, log(x)/a - sqrt(b)*atan(sqrt(a)*log(c*x**n)/sqrt(b))/(a**(S(3)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x/log(c*x**n)**S(3)), x), x, log(x)/a - b**(S(1)/3)*log(a**(S(1)/3)*log(c*x**n) + b**(S(1)/3))/(S(3)*a**(S(4)/3)*n) + b**(S(1)/3)*log(a**(S(2)/3)*log(c*x**n)**S(2) - a**(S(1)/3)*b**(S(1)/3)*log(c*x**n) + b**(S(2)/3))/(S(6)*a**(S(4)/3)*n) + sqrt(S(3))*b**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*a**(S(1)/3)*log(c*x**n) + b**(S(1)/3))/(S(3)*b**(S(1)/3)))/(S(3)*a**(S(4)/3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x/log(c*x**n)**S(4)), x), x, log(x)/a + sqrt(S(2))*b**(S(1)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*log(c*x**n) + sqrt(a)*log(c*x**n)**S(2) + sqrt(b))/(S(8)*a**(S(5)/4)*n) - sqrt(S(2))*b**(S(1)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*log(c*x**n) + sqrt(a)*log(c*x**n)**S(2) + sqrt(b))/(S(8)*a**(S(5)/4)*n) - sqrt(S(2))*b**(S(1)/4)*atan(sqrt(S(2))*a**(S(1)/4)*log(c*x**n)/b**(S(1)/4) + S(-1))/(S(4)*a**(S(5)/4)*n) - sqrt(S(2))*b**(S(1)/4)*atan(sqrt(S(2))*a**(S(1)/4)*log(c*x**n)/b**(S(1)/4) + S(1))/(S(4)*a**(S(5)/4)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(S(4)*x*log(x)**S(2) + x), x), x, log(S(4)*log(x)**S(2) + S(1))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(S(7)*x)**S(2) + x*log(S(7)*x) + x), x), x, S(2)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*log(S(7)*x) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((log(S(3)*x) + S(-1))/(x*(log(S(3)*x)**S(2) - log(S(3)*x) + S(1))), x), x, log(log(S(3)*x)**S(2) - log(S(3)*x) + S(1))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*log(S(3)*x) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((log(S(3)*x)**S(2) + S(-1))/(x*log(S(3)*x)**S(3) + x), x), x, log(log(S(3)*x)**S(2) - log(S(3)*x) + S(1))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*log(S(3)*x) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((log(S(3)*x)**S(2) + S(-1))/(x*log(S(3)*x)**S(2) + x*log(S(3)*x) + x), x), x, log(x) - log(log(S(3)*x)**S(2) + log(S(3)*x) + S(1))/S(2) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*log(S(3)*x) + S(1))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(log(x) + S(3))), x), x, log(log(x) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(log(x) + S(1))/x, x), x, S(2)*(log(x) + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((log(x) + S(1))**S(5)/x, x), x, (log(x) + S(1))**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(log(x))), x), x, S(2)*sqrt(log(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(log(x)**S(2) + S(1))), x), x, atan(log(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(log(x)**S(2) + S(-3))), x), x, atanh(log(x)/sqrt(log(x)**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(-S(9)*log(x)**S(2) + S(4))), x), x, asin(S(3)*log(x)/S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(log(x)**S(2) + S(4))), x), x, asinh(log(x)/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(S(3)*log(S(6)*x)**S(3) + S(2))), x), x, S(2)**(S(1)/3)*S(3)**(S(2)/3)*log(S(3)**(S(1)/3)*log(S(6)*x) + S(2)**(S(1)/3))/S(18) - S(2)**(S(1)/3)*S(3)**(S(2)/3)*log(S(3)**(S(2)/3)*log(S(6)*x)**S(2) - S(6)**(S(1)/3)*log(S(6)*x) + S(2)**(S(2)/3))/S(36) - S(2)**(S(1)/3)*S(3)**(S(1)/6)*atan(sqrt(S(3))*(-S(2)**(S(2)/3)*S(3)**(S(1)/3)*log(S(6)*x) + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(log(S(6)*x))/(x*log(S(6)*x)), x), x, log(log(S(6)*x))**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)**log(x)/x, x), x, S(2)**log(x)/log(S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(log(x))**S(2)/x, x), x, log(x)/S(2) - sin(log(x))*cos(log(x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-log(x) + S(7))/(x*(log(x) + S(3))), x), x, -log(x) + S(10)*log(log(x) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-log(x) + S(2))*(log(x) + S(3))**S(2)/x, x), x, -log(x)**S(4)/S(4) - S(4)*log(x)**S(3)/S(3) + S(3)*log(x)**S(2)/S(2) + S(18)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(log(x)**S(2) + S(1))*log(x)**S(2)/x, x), x, sqrt(log(x)**S(2) + S(1))*log(x)**S(3)/S(4) + sqrt(log(x)**S(2) + S(1))*log(x)/S(8) - asinh(log(x))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((log(x) + S(1))/(x*(S(2)*log(x) + S(3))**S(2)), x), x, log(S(2)*log(x) + S(3))/S(4) + S(1)/(S(4)*(S(2)*log(x) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(x*sqrt(log(x) + S(1))), x), x, S(2)*(log(x) + S(1))**(S(3)/2)/S(3) - S(2)*sqrt(log(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(x*sqrt(S(4)*log(x) + S(-1))), x), x, (S(4)*log(x) + S(-1))**(S(3)/2)/S(24) + sqrt(S(4)*log(x) + S(-1))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(log(x) + S(1))/(x*log(x)), x), x, S(2)*sqrt(log(x) + S(1)) - S(2)*atanh(sqrt(log(x) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((log(x)**S(2) - S(4)*log(x) + S(1))/(x*(log(x) + S(-1))**S(4)), x), x, (log(x) + S(-1))**(S(-2)) + S(1)/(-log(x) + S(1)) - S(2)/(S(3)*(-log(x) + S(1))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(S(1)/x)**S(2)/x**S(5), x), x, -log(S(1)/x)**S(2)/(S(4)*x**S(4)) + log(S(1)/x)/(S(8)*x**S(4)) - S(1)/(S(32)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((log(a*x**n)**S(2))**p/x, x), x, (log(a*x**n)**S(2))**p*log(a*x**n)/(n*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((log(a*x**n)**m)**p/x, x), x, (log(a*x**n)**m)**p*log(a*x**n)/(n*(m*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(log(a*x**n)**S(2))/x, x), x, sqrt(log(a*x**n)**S(2))*log(a*x**n)/(S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*log(a*x**n)**m)**p/x, x), x, (b*log(a*x**n)**m)**p*log(a*x**n)/(n*(m*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-log(a*x**S(2))), x), x, -sqrt(S(2))*sqrt(pi)*x*erf(sqrt(S(2))*sqrt(-log(a*x**S(2)))/S(2))/(S(2)*sqrt(a*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-log(a/x**S(2))), x), x, sqrt(S(2))*sqrt(pi)*x*sqrt(a/x**S(2))*erfi(sqrt(S(2))*sqrt(-log(a/x**S(2)))/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-log(a*x**n)), x), x, -sqrt(pi)*x*(a*x**n)**(-S(1)/n)*erf(sqrt(-log(a*x**n))/sqrt(n))/sqrt(n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sqrt(x) - x + S(1))/x, x), x, -S(2)*log(sqrt(x))*log((-S(2)*sqrt(x) - sqrt(S(5)) + S(1))/(-sqrt(S(5)) + S(1))) + S(2)*log(sqrt(x))*log(sqrt(x) - x + S(1)) - S(2)*log(S(1)/2 + sqrt(S(5))/S(2))*log(-S(2)*sqrt(x) + S(1) + sqrt(S(5))) - S(2)*polylog(S(2), S(2)*sqrt(x)/(-sqrt(S(5)) + S(1))) + S(2)*polylog(S(2), (-S(2)*sqrt(x) + S(1) + sqrt(S(5)))/(S(1) + sqrt(S(5)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(c + d*x)/(a + b*x), x), x, -a*log(-d*(a + b*x)/(-a*d + b*c))*log(c + d*x)/b**S(2) - a*polylog(S(2), b*(c + d*x)/(-a*d + b*c))/b**S(2) - x/b + (c + d*x)*log(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(x + S(-1)), x), x, -polylog(S(2), -x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*log(-a - b*x + S(1))/(a + b*x), x), x, a*polylog(S(2), a + b*x)/b**S(2) - x/b - (-a - b*x + S(1))*log(-a - b*x + S(1))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*log(x)/(x*(b + c*x)), x), x, log(x)**S(2)/S(2) + log(x)*log((b + c*x)/b) + polylog(S(2), -c*x/b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)*sin(x*log(x)) + sin(x*log(x)), x), x, -cos(x*log(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((-(x + S(-1))**S(2) + S(1))/((x + S(-1))**S(2) + S(1)))/x**S(2), x), x, log(x)/S(2) + log(-x + S(2))/S(2) - log(x**S(2) - S(2)*x + S(2))/S(2) - atan(x + S(-1)) - log((-(-x + S(1))**S(2) + S(1))/((x + S(-1))**S(2) + S(1)))/x - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(sqrt(x) + x), x), x, sqrt(x) + x*log(sqrt(x) + x) - x - log(sqrt(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(-x/(x + S(1))), x), x, x*log(-x/(x + S(1))) - log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((x + S(-1))/(x + S(1))), x), x, (x + S(-1))*log((x + S(-1))/(x + S(1))) - S(2)*log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log((-x**S(2) + S(1))/(x**S(2) + S(1)))/(x + S(1))**S(2), x), x, log(-x**S(2) + S(1))/S(2) - log(x**S(2) + S(1))/S(2) - atan(x) - log((-x**S(2) + S(1))/(x**S(2) + S(1)))/(x + S(1)) - S(1)/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(-x**S(2) + S(1)), x), x, log(x)*atanh(x) + polylog(S(2), -x)/S(2) - polylog(S(2), x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x)/(x**S(2) + S(1)), x), x, log(x)*atan(x) - I*polylog(S(2), -I*x)/S(2) + I*polylog(S(2), I*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(x**S(2) + S(1))**n)/(x**S(2) + S(1)), x), x, S(2)*n*log(S(2)*I/(-x + I))*atan(x) + I*n*atan(x)**S(2) + I*n*polylog(S(2), (-x - I)/(-x + I)) + log(c*(x**S(2) + S(1))**n)*atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(x**S(2)/(x**S(2) + S(1)))/(x**S(2) + S(1)), x), x, -S(2)*log(S(2)*x/(x + I))*atan(x) + log(x**S(2)/(x**S(2) + S(1)))*atan(x) + I*atan(x)**S(2) + I*polylog(S(2), (-x + I)/(x + I)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**n)/(a + b*x**S(2)), x), x, -I*n*polylog(S(2), -I*sqrt(b)*x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)) + I*n*polylog(S(2), I*sqrt(b)*x/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)) + log(c*x**n)*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*(a + b*x**S(2))**n)/(a + b*x**S(2)), x), x, S(2)*n*log(S(2)*I*sqrt(a)/(I*sqrt(a) - sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)) + I*n*atan(sqrt(b)*x/sqrt(a))**S(2)/(sqrt(a)*sqrt(b)) + I*n*polylog(S(2), (-sqrt(a) + I*sqrt(b)*x)/(sqrt(a) + I*sqrt(b)*x))/(sqrt(a)*sqrt(b)) + log(c*(a + b*x**S(2))**n)*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(c*x**S(2)/(a + b*x**S(2)))/(a + b*x**S(2)), x), x, -S(2)*log(S(2)*sqrt(b)*x/(I*sqrt(a) + sqrt(b)*x))*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)) + log(c*x**S(2)/(a + b*x**S(2)))*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)) + I*atan(sqrt(b)*x/sqrt(a))**S(2)/(sqrt(a)*sqrt(b)) + I*polylog(S(2), (sqrt(a) + I*sqrt(b)*x)/(sqrt(a) - I*sqrt(b)*x))/(sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(I*sqrt(-a*x + S(1))/sqrt(a*x + S(1)) + S(1))/(-a**S(2)*x**S(2) + S(1)), x), x, polylog(S(2), -I*sqrt(-a*x + S(1))/sqrt(a*x + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(-I*sqrt(-a*x + S(1))/sqrt(a*x + S(1)) + S(1))/(-a**S(2)*x**S(2) + S(1)), x), x, polylog(S(2), I*sqrt(-a*x + S(1))/sqrt(a*x + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(exp(a + b*x)), x), x, log(exp(a + b*x))**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(exp(a + b*x**n)), x), x, -b*n*x**(n + S(1))/(n + S(1)) + x*log(exp(a + b*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(x)*log(a + b*exp(x)), x), x, -exp(x) + (a + b*exp(x))*log(a + b*exp(x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*log(exp(x))), x), x, -log(x)/(x - log(exp(x))) + log(log(exp(x)))/(x - log(exp(x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(exp(a + b*x)*log(x), x), x, -exp(a)*Ei(b*x)/b + exp(a + b*x)*log(x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x + log(x)), x), x, Integral(x**S(2)/(x + log(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x + log(x)), x), x, Integral(x/(x + log(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x + log(x)), x), x, Integral(S(1)/(x + log(x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x + log(x))), x), x, Integral(S(1)/(x*(x + log(x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(x + log(x))), x), x, Integral(S(1)/(x**S(2)*(x + log(x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-log(x) + S(1))/(x*(x + log(x))), x), x, log(S(1) + log(x)/x), expand=True, _diff=True, _numerical=True) ''' apart # apart assert rubi_test(rubi_integrate((x + S(1))/((x + log(x))*log(x)), x), x, -log(x + log(x)) + log(log(x)) + li(x), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x + S(1))/((x + log(x))*log(x)), x), x, -log(x + log(x)) + log(log(x)) + Ei(log(x)), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(log(sqrt((x + S(1))/x) + S(2)), x), x, x*log(sqrt((x + S(1))/x) + S(2)) - log(-sqrt((x + S(1))/x) + S(1))/S(6) + log(sqrt((x + S(1))/x) + S(1))/S(2) - log(sqrt((x + S(1))/x) + S(2))/S(3), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(log(sqrt((x + S(1))/x) + S(1)), x), x, x*log(sqrt((x + S(1))/x) + S(1)) + atanh(sqrt((x + S(1))/x))/S(2) - S(1)/(S(2)*(sqrt((x + S(1))/x) + S(1))), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(log(sqrt((x + S(1))/x)), x), x, (x + S(1))*log(sqrt((x + S(1))/x)) + log(x)/S(2), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(log(sqrt((x + S(1))/x) + S(-1)), x), x, x*log(sqrt((x + S(1))/x) + S(-1)) - atanh(sqrt(S(1) + S(1)/x))/S(2) - S(1)/(S(2)*(-sqrt(S(1) + S(1)/x) + S(1))), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(log(sqrt((x + S(1))/x) + S(-2)), x), x, x*log(sqrt((x + S(1))/x) + S(-2)) + log(-sqrt(S(1) + S(1)/x) + S(1))/S(2) - log(-sqrt(S(1) + S(1)/x) + S(2))/S(3) - log(sqrt(S(1) + S(1)/x) + S(1))/S(6), expand=True, _diff=True, _numerical=True) ''' assert rubi_test(rubi_integrate(x**(a*x)*log(x) + x**(a*x), x), x, x**(a*x)/a, expand=True, _diff=True, _numerical=True) # fails in mathematica too assert rubi_test(rubi_integrate((log(x)**m)**p, x), x, (-log(x))**(-m*p)*(log(x)**m)**p*Gamma(m*p + S(1), -log(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(log(a + b*x + c*sqrt(d + e*x))/(f + g*x**S(2)), x), x, -log((a*e - b*d + b*(d + e*x) + c*e*sqrt(d + e*x))/e)*log(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) + log((a*e - b*d + b*(d + e*x) + c*e*sqrt(d + e*x))/e)*log(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) - log((a*e - b*d + b*(d + e*x) + c*e*sqrt(d + e*x))/e)*log(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) + log((a*e - b*d + b*(d + e*x) + c*e*sqrt(d + e*x))/e)*log(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) + log(-g**(S(1)/4)*(S(2)*b*sqrt(d + e*x) + c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))/(S(2)*b*sqrt(d*sqrt(g) - e*sqrt(-f)) - g**(S(1)/4)*(c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))*log(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) + log(g**(S(1)/4)*(S(2)*b*sqrt(d + e*x) + c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))/(S(2)*b*sqrt(d*sqrt(g) - e*sqrt(-f)) + g**(S(1)/4)*(c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))*log(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) + log(-g**(S(1)/4)*(S(2)*b*sqrt(d + e*x) + c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))/(S(2)*b*sqrt(d*sqrt(g) - e*sqrt(-f)) - g**(S(1)/4)*(c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))*log(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) + log(g**(S(1)/4)*(S(2)*b*sqrt(d + e*x) + c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))/(S(2)*b*sqrt(d*sqrt(g) - e*sqrt(-f)) + g**(S(1)/4)*(c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))*log(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) - log(-g**(S(1)/4)*(S(2)*b*sqrt(d + e*x) + c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))/(S(2)*b*sqrt(d*sqrt(g) + e*sqrt(-f)) - g**(S(1)/4)*(c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))*log(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) - log(g**(S(1)/4)*(S(2)*b*sqrt(d + e*x) + c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))/(S(2)*b*sqrt(d*sqrt(g) + e*sqrt(-f)) + g**(S(1)/4)*(c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))*log(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) - log(-g**(S(1)/4)*(S(2)*b*sqrt(d + e*x) + c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))/(S(2)*b*sqrt(d*sqrt(g) + e*sqrt(-f)) - g**(S(1)/4)*(c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))*log(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) - log(g**(S(1)/4)*(S(2)*b*sqrt(d + e*x) + c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))/(S(2)*b*sqrt(d*sqrt(g) + e*sqrt(-f)) + g**(S(1)/4)*(c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))*log(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*sqrt(g)*sqrt(-f)) + polylog(S(2), S(2)*b*(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*b*sqrt(d*sqrt(g) - e*sqrt(-f)) - g**(S(1)/4)*(c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))/(S(2)*sqrt(g)*sqrt(-f)) + polylog(S(2), S(2)*b*(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*b*sqrt(d*sqrt(g) - e*sqrt(-f)) + g**(S(1)/4)*(c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))/(S(2)*sqrt(g)*sqrt(-f)) + polylog(S(2), S(2)*b*(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*b*sqrt(d*sqrt(g) - e*sqrt(-f)) - g**(S(1)/4)*(c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))/(S(2)*sqrt(g)*sqrt(-f)) + polylog(S(2), S(2)*b*(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) - e*sqrt(-f)))/(S(2)*b*sqrt(d*sqrt(g) - e*sqrt(-f)) + g**(S(1)/4)*(c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))/(S(2)*sqrt(g)*sqrt(-f)) - polylog(S(2), S(2)*b*(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*b*sqrt(d*sqrt(g) + e*sqrt(-f)) - g**(S(1)/4)*(c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))/(S(2)*sqrt(g)*sqrt(-f)) - polylog(S(2), S(2)*b*(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*b*sqrt(d*sqrt(g) + e*sqrt(-f)) + g**(S(1)/4)*(c*e - sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))/(S(2)*sqrt(g)*sqrt(-f)) - polylog(S(2), S(2)*b*(g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*b*sqrt(d*sqrt(g) + e*sqrt(-f)) - g**(S(1)/4)*(c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))/(S(2)*sqrt(g)*sqrt(-f)) - polylog(S(2), S(2)*b*(-g**(S(1)/4)*sqrt(d + e*x) + sqrt(d*sqrt(g) + e*sqrt(-f)))/(S(2)*b*sqrt(d*sqrt(g) + e*sqrt(-f)) + g**(S(1)/4)*(c*e + sqrt(-S(4)*a*b*e + S(4)*b**S(2)*d + c**S(2)*e**S(2)))))/(S(2)*sqrt(g)*sqrt(-f)), expand=True, _diff=True, _numerical=True)
c85025247a6042ead2c5c81e5ecc103082811783cba28d3b2cbacd17469e3879
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.utility_function import ( sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec) from sympy.core.numbers import pi as Pi from sympy.integrals.rubi.rubi import rubi_integrate a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j= symbols('a b c d e f m n x u k p r s t i j') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', ) def test_1(): assert rubi_test(rubi_integrate(tan(c + d*x), x), x, -log(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(c + d*x)**S(2), x), x, -x + tan(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(c + d*x)**S(3), x), x, log(cos(c + d*x))/d + tan(c + d*x)**S(2)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(c + d*x)**S(4), x), x, x + tan(c + d*x)**S(3)/(S(3)*d) - tan(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(c + d*x)**S(5), x), x, -log(cos(c + d*x))/d + tan(c + d*x)**S(4)/(S(4)*d) - tan(c + d*x)**S(2)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(c + d*x)**S(6), x), x, -x + tan(c + d*x)**S(5)/(S(5)*d) - tan(c + d*x)**S(3)/(S(3)*d) + tan(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(c + d*x)**S(7), x), x, log(cos(c + d*x))/d + tan(c + d*x)**S(6)/(S(6)*d) - tan(c + d*x)**S(4)/(S(4)*d) + tan(c + d*x)**S(2)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(c + d*x)**S(8), x), x, x + tan(c + d*x)**S(7)/(S(7)*d) - tan(c + d*x)**S(5)/(S(5)*d) + tan(c + d*x)**S(3)/(S(3)*d) - tan(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(7)/2), x), x, -sqrt(S(2))*b**(S(7)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*d) + sqrt(S(2))*b**(S(7)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*d) - sqrt(S(2))*b**(S(7)/2)*log(sqrt(b)*tan(c + d*x) + sqrt(b) - sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*d) + sqrt(S(2))*b**(S(7)/2)*log(sqrt(b)*tan(c + d*x) + sqrt(b) + sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*d) - S(2)*b**S(3)*sqrt(b*tan(c + d*x))/d + S(2)*b*(b*tan(c + d*x))**(S(5)/2)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(5)/2), x), x, sqrt(S(2))*b**(S(5)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*d) - sqrt(S(2))*b**(S(5)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*d) - sqrt(S(2))*b**(S(5)/2)*log(sqrt(b)*tan(c + d*x) + sqrt(b) - sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*d) + sqrt(S(2))*b**(S(5)/2)*log(sqrt(b)*tan(c + d*x) + sqrt(b) + sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*d) + S(2)*b*(b*tan(c + d*x))**(S(3)/2)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(3)/2), x), x, sqrt(S(2))*b**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*d) - sqrt(S(2))*b**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*d) + sqrt(S(2))*b**(S(3)/2)*log(sqrt(b)*tan(c + d*x) + sqrt(b) - sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*d) - sqrt(S(2))*b**(S(3)/2)*log(sqrt(b)*tan(c + d*x) + sqrt(b) + sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*d) + S(2)*b*sqrt(b*tan(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(c + d*x)), x), x, -sqrt(S(2))*sqrt(b)*ArcTan(S(1) - sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*d) + sqrt(S(2))*sqrt(b)*ArcTan(S(1) + sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*d) + sqrt(S(2))*sqrt(b)*log(sqrt(b)*tan(c + d*x) + sqrt(b) - sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*d) - sqrt(S(2))*sqrt(b)*log(sqrt(b)*tan(c + d*x) + sqrt(b) + sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*tan(c + d*x)), x), x, -sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*sqrt(b)*d) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*sqrt(b)*d) - sqrt(S(2))*log(sqrt(b)*tan(c + d*x) + sqrt(b) - sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*sqrt(b)*d) + sqrt(S(2))*log(sqrt(b)*tan(c + d*x) + sqrt(b) + sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*sqrt(b)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(-3)/2), x), x, -S(2)/(b*d*sqrt(b*tan(c + d*x))) + sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*b**(S(3)/2)*d) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*b**(S(3)/2)*d) - sqrt(S(2))*log(sqrt(b)*tan(c + d*x) + sqrt(b) - sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*b**(S(3)/2)*d) + sqrt(S(2))*log(sqrt(b)*tan(c + d*x) + sqrt(b) + sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*b**(S(3)/2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(-5)/2), x), x, -S(2)/(S(3)*b*d*(b*tan(c + d*x))**(S(3)/2)) + sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*b**(S(5)/2)*d) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*b**(S(5)/2)*d) + sqrt(S(2))*log(sqrt(b)*tan(c + d*x) + sqrt(b) - sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*b**(S(5)/2)*d) - sqrt(S(2))*log(sqrt(b)*tan(c + d*x) + sqrt(b) + sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*b**(S(5)/2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(-7)/2), x), x, -S(2)/(S(5)*b*d*(b*tan(c + d*x))**(S(5)/2)) + S(2)/(b**S(3)*d*sqrt(b*tan(c + d*x))) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*b**(S(7)/2)*d) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(b*tan(c + d*x))/sqrt(b))/(S(2)*b**(S(7)/2)*d) + sqrt(S(2))*log(sqrt(b)*tan(c + d*x) + sqrt(b) - sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*b**(S(7)/2)*d) - sqrt(S(2))*log(sqrt(b)*tan(c + d*x) + sqrt(b) + sqrt(S(2))*sqrt(b*tan(c + d*x)))/(S(4)*b**(S(7)/2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(4)/3), x), x, -b**(S(4)/3)*ArcTan((b*tan(c + d*x))**(S(1)/3)/b**(S(1)/3))/d + b**(S(4)/3)*ArcTan((sqrt(S(3))*b**(S(1)/3) - S(2)*(b*tan(c + d*x))**(S(1)/3))/b**(S(1)/3))/(S(2)*d) - b**(S(4)/3)*ArcTan((sqrt(S(3))*b**(S(1)/3) + S(2)*(b*tan(c + d*x))**(S(1)/3))/b**(S(1)/3))/(S(2)*d) + sqrt(S(3))*b**(S(4)/3)*log(b**(S(2)/3) - sqrt(S(3))*b**(S(1)/3)*(b*tan(c + d*x))**(S(1)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(4)*d) - sqrt(S(3))*b**(S(4)/3)*log(b**(S(2)/3) + sqrt(S(3))*b**(S(1)/3)*(b*tan(c + d*x))**(S(1)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(4)*d) + S(3)*b*(b*tan(c + d*x))**(S(1)/3)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(2)/3), x), x, b**(S(2)/3)*ArcTan((b*tan(c + d*x))**(S(1)/3)/b**(S(1)/3))/d - b**(S(2)/3)*ArcTan((sqrt(S(3))*b**(S(1)/3) - S(2)*(b*tan(c + d*x))**(S(1)/3))/b**(S(1)/3))/(S(2)*d) + b**(S(2)/3)*ArcTan((sqrt(S(3))*b**(S(1)/3) + S(2)*(b*tan(c + d*x))**(S(1)/3))/b**(S(1)/3))/(S(2)*d) + sqrt(S(3))*b**(S(2)/3)*log(b**(S(2)/3) - sqrt(S(3))*b**(S(1)/3)*(b*tan(c + d*x))**(S(1)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(4)*d) - sqrt(S(3))*b**(S(2)/3)*log(b**(S(2)/3) + sqrt(S(3))*b**(S(1)/3)*(b*tan(c + d*x))**(S(1)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(1)/3), x), x, -sqrt(S(3))*b**(S(1)/3)*ArcTan(sqrt(S(3))*(b**(S(2)/3) - S(2)*(b*tan(c + d*x))**(S(2)/3))/(S(3)*b**(S(2)/3)))/(S(2)*d) - b**(S(1)/3)*log(b**(S(2)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(2)*d) + b**(S(1)/3)*log(b**(S(4)/3) - b**(S(2)/3)*(b*tan(c + d*x))**(S(2)/3) + (b*tan(c + d*x))**(S(4)/3))/(S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(-1)/3), x), x, -sqrt(S(3))*ArcTan(sqrt(S(3))*(b**(S(2)/3) - S(2)*(b*tan(c + d*x))**(S(2)/3))/(S(3)*b**(S(2)/3)))/(S(2)*b**(S(1)/3)*d) + log(b**(S(2)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(2)*b**(S(1)/3)*d) - log(b**(S(4)/3) - b**(S(2)/3)*(b*tan(c + d*x))**(S(2)/3) + (b*tan(c + d*x))**(S(4)/3))/(S(4)*b**(S(1)/3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(-2)/3), x), x, ArcTan((b*tan(c + d*x))**(S(1)/3)/b**(S(1)/3))/(b**(S(2)/3)*d) - ArcTan((sqrt(S(3))*b**(S(1)/3) - S(2)*(b*tan(c + d*x))**(S(1)/3))/b**(S(1)/3))/(S(2)*b**(S(2)/3)*d) + ArcTan((sqrt(S(3))*b**(S(1)/3) + S(2)*(b*tan(c + d*x))**(S(1)/3))/b**(S(1)/3))/(S(2)*b**(S(2)/3)*d) - sqrt(S(3))*log(b**(S(2)/3) - sqrt(S(3))*b**(S(1)/3)*(b*tan(c + d*x))**(S(1)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(4)*b**(S(2)/3)*d) + sqrt(S(3))*log(b**(S(2)/3) + sqrt(S(3))*b**(S(1)/3)*(b*tan(c + d*x))**(S(1)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(4)*b**(S(2)/3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**(S(-4)/3), x), x, -S(3)/(b*d*(b*tan(c + d*x))**(S(1)/3)) - ArcTan((b*tan(c + d*x))**(S(1)/3)/b**(S(1)/3))/(b**(S(4)/3)*d) + ArcTan((sqrt(S(3))*b**(S(1)/3) - S(2)*(b*tan(c + d*x))**(S(1)/3))/b**(S(1)/3))/(S(2)*b**(S(4)/3)*d) - ArcTan((sqrt(S(3))*b**(S(1)/3) + S(2)*(b*tan(c + d*x))**(S(1)/3))/b**(S(1)/3))/(S(2)*b**(S(4)/3)*d) - sqrt(S(3))*log(b**(S(2)/3) - sqrt(S(3))*b**(S(1)/3)*(b*tan(c + d*x))**(S(1)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(4)*b**(S(4)/3)*d) + sqrt(S(3))*log(b**(S(2)/3) + sqrt(S(3))*b**(S(1)/3)*(b*tan(c + d*x))**(S(1)/3) + (b*tan(c + d*x))**(S(2)/3))/(S(4)*b**(S(4)/3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x))**n, x), x, (b*tan(c + d*x))**(n + S(1))*Hypergeometric2F1(S(1), n/S(2) + S(1)/2, n/S(2) + S(3)/2, -tan(c + d*x)**S(2))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(2))**(S(5)/2), x), x, -b**S(2)*sqrt(b*tan(c + d*x)**S(2))*log(cos(c + d*x))*cot(c + d*x)/d + b**S(2)*sqrt(b*tan(c + d*x)**S(2))*tan(c + d*x)**S(3)/(S(4)*d) - b**S(2)*sqrt(b*tan(c + d*x)**S(2))*tan(c + d*x)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(2))**(S(3)/2), x), x, b*sqrt(b*tan(c + d*x)**S(2))*log(cos(c + d*x))*cot(c + d*x)/d + b*sqrt(b*tan(c + d*x)**S(2))*tan(c + d*x)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(c + d*x)**S(2)), x), x, -sqrt(b*tan(c + d*x)**S(2))*log(cos(c + d*x))*cot(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*tan(c + d*x)**S(2)), x), x, log(sin(c + d*x))*tan(c + d*x)/(d*sqrt(b*tan(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(2))**(S(-3)/2), x), x, -log(sin(c + d*x))*tan(c + d*x)/(b*d*sqrt(b*tan(c + d*x)**S(2))) - cot(c + d*x)/(S(2)*b*d*sqrt(b*tan(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(2))**(S(-5)/2), x), x, log(sin(c + d*x))*tan(c + d*x)/(b**S(2)*d*sqrt(b*tan(c + d*x)**S(2))) - cot(c + d*x)**S(3)/(S(4)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(2))) + cot(c + d*x)/(S(2)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(3))**(S(5)/2), x), x, -sqrt(S(2))*b**S(2)*sqrt(b*tan(c + d*x)**S(3))*ArcTan(-sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))/(S(2)*d*tan(c + d*x)**(S(3)/2)) + sqrt(S(2))*b**S(2)*sqrt(b*tan(c + d*x)**S(3))*ArcTan(sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))/(S(2)*d*tan(c + d*x)**(S(3)/2)) - sqrt(S(2))*b**S(2)*sqrt(b*tan(c + d*x)**S(3))*log(-sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))/(S(4)*d*tan(c + d*x)**(S(3)/2)) + sqrt(S(2))*b**S(2)*sqrt(b*tan(c + d*x)**S(3))*log(sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))/(S(4)*d*tan(c + d*x)**(S(3)/2)) + S(2)*b**S(2)*sqrt(b*tan(c + d*x)**S(3))*tan(c + d*x)**S(5)/(S(13)*d) - S(2)*b**S(2)*sqrt(b*tan(c + d*x)**S(3))*tan(c + d*x)**S(3)/(S(9)*d) + S(2)*b**S(2)*sqrt(b*tan(c + d*x)**S(3))*tan(c + d*x)/(S(5)*d) - S(2)*b**S(2)*sqrt(b*tan(c + d*x)**S(3))*cot(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(3))**(S(3)/2), x), x, -sqrt(S(2))*b*sqrt(b*tan(c + d*x)**S(3))*ArcTan(-sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))/(S(2)*d*tan(c + d*x)**(S(3)/2)) + sqrt(S(2))*b*sqrt(b*tan(c + d*x)**S(3))*ArcTan(sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))/(S(2)*d*tan(c + d*x)**(S(3)/2)) + sqrt(S(2))*b*sqrt(b*tan(c + d*x)**S(3))*log(-sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))/(S(4)*d*tan(c + d*x)**(S(3)/2)) - sqrt(S(2))*b*sqrt(b*tan(c + d*x)**S(3))*log(sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))/(S(4)*d*tan(c + d*x)**(S(3)/2)) + S(2)*b*sqrt(b*tan(c + d*x)**S(3))*tan(c + d*x)**S(2)/(S(7)*d) - S(2)*b*sqrt(b*tan(c + d*x)**S(3))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(c + d*x)**S(3)), x), x, sqrt(S(2))*sqrt(b*tan(c + d*x)**S(3))*ArcTan(-sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))/(S(2)*d*tan(c + d*x)**(S(3)/2)) - sqrt(S(2))*sqrt(b*tan(c + d*x)**S(3))*ArcTan(sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))/(S(2)*d*tan(c + d*x)**(S(3)/2)) + sqrt(S(2))*sqrt(b*tan(c + d*x)**S(3))*log(-sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))/(S(4)*d*tan(c + d*x)**(S(3)/2)) - sqrt(S(2))*sqrt(b*tan(c + d*x)**S(3))*log(sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))/(S(4)*d*tan(c + d*x)**(S(3)/2)) + S(2)*sqrt(b*tan(c + d*x)**S(3))*cot(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*tan(c + d*x)**S(3)), x), x, sqrt(S(2))*ArcTan(-sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))*tan(c + d*x)**(S(3)/2)/(S(2)*d*sqrt(b*tan(c + d*x)**S(3))) - sqrt(S(2))*ArcTan(sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))*tan(c + d*x)**(S(3)/2)/(S(2)*d*sqrt(b*tan(c + d*x)**S(3))) - sqrt(S(2))*log(-sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))*tan(c + d*x)**(S(3)/2)/(S(4)*d*sqrt(b*tan(c + d*x)**S(3))) + sqrt(S(2))*log(sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))*tan(c + d*x)**(S(3)/2)/(S(4)*d*sqrt(b*tan(c + d*x)**S(3))) - S(2)*tan(c + d*x)/(d*sqrt(b*tan(c + d*x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(3))**(S(-3)/2), x), x, -sqrt(S(2))*ArcTan(-sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))*tan(c + d*x)**(S(3)/2)/(S(2)*b*d*sqrt(b*tan(c + d*x)**S(3))) + sqrt(S(2))*ArcTan(sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))*tan(c + d*x)**(S(3)/2)/(S(2)*b*d*sqrt(b*tan(c + d*x)**S(3))) - sqrt(S(2))*log(-sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))*tan(c + d*x)**(S(3)/2)/(S(4)*b*d*sqrt(b*tan(c + d*x)**S(3))) + sqrt(S(2))*log(sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))*tan(c + d*x)**(S(3)/2)/(S(4)*b*d*sqrt(b*tan(c + d*x)**S(3))) - S(2)*cot(c + d*x)**S(2)/(S(7)*b*d*sqrt(b*tan(c + d*x)**S(3))) + S(2)/(S(3)*b*d*sqrt(b*tan(c + d*x)**S(3))), expand=True, _diff=True, _numerical=True) # taking a long time assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(3))**(S(-5)/2), x), x, -sqrt(S(2))*ArcTan(-sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))*tan(c + d*x)**(S(3)/2)/(S(2)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(3))) + sqrt(S(2))*ArcTan(sqrt(S(2))*sqrt(tan(c + d*x)) + S(1))*tan(c + d*x)**(S(3)/2)/(S(2)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(3))) + sqrt(S(2))*log(-sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))*tan(c + d*x)**(S(3)/2)/(S(4)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(3))) - sqrt(S(2))*log(sqrt(S(2))*sqrt(tan(c + d*x)) + tan(c + d*x) + S(1))*tan(c + d*x)**(S(3)/2)/(S(4)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(3))) + S(2)*tan(c + d*x)/(b**S(2)*d*sqrt(b*tan(c + d*x)**S(3))) - S(2)*cot(c + d*x)**S(5)/(S(13)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(3))) + S(2)*cot(c + d*x)**S(3)/(S(9)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(3))) - S(2)*cot(c + d*x)/(S(5)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(4))**(S(5)/2), x), x, -b**S(2)*x*sqrt(b*tan(c + d*x)**S(4))*cot(c + d*x)**S(2) + b**S(2)*sqrt(b*tan(c + d*x)**S(4))*tan(c + d*x)**S(7)/(S(9)*d) - b**S(2)*sqrt(b*tan(c + d*x)**S(4))*tan(c + d*x)**S(5)/(S(7)*d) + b**S(2)*sqrt(b*tan(c + d*x)**S(4))*tan(c + d*x)**S(3)/(S(5)*d) - b**S(2)*sqrt(b*tan(c + d*x)**S(4))*tan(c + d*x)/(S(3)*d) + b**S(2)*sqrt(b*tan(c + d*x)**S(4))*cot(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(4))**(S(3)/2), x), x, -b*x*sqrt(b*tan(c + d*x)**S(4))*cot(c + d*x)**S(2) + b*sqrt(b*tan(c + d*x)**S(4))*tan(c + d*x)**S(3)/(S(5)*d) - b*sqrt(b*tan(c + d*x)**S(4))*tan(c + d*x)/(S(3)*d) + b*sqrt(b*tan(c + d*x)**S(4))*cot(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(c + d*x)**S(4)), x), x, -x*sqrt(b*tan(c + d*x)**S(4))*cot(c + d*x)**S(2) + sqrt(b*tan(c + d*x)**S(4))*cot(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*tan(c + d*x)**S(4)), x), x, -x*tan(c + d*x)**S(2)/sqrt(b*tan(c + d*x)**S(4)) - tan(c + d*x)/(d*sqrt(b*tan(c + d*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(4))**(S(-3)/2), x), x, -x*tan(c + d*x)**S(2)/(b*sqrt(b*tan(c + d*x)**S(4))) - tan(c + d*x)/(b*d*sqrt(b*tan(c + d*x)**S(4))) - cot(c + d*x)**S(3)/(S(5)*b*d*sqrt(b*tan(c + d*x)**S(4))) + cot(c + d*x)/(S(3)*b*d*sqrt(b*tan(c + d*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(4))**(S(-5)/2), x), x, -x*tan(c + d*x)**S(2)/(b**S(2)*sqrt(b*tan(c + d*x)**S(4))) - tan(c + d*x)/(b**S(2)*d*sqrt(b*tan(c + d*x)**S(4))) - cot(c + d*x)**S(7)/(S(9)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(4))) + cot(c + d*x)**S(5)/(S(7)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(4))) - cot(c + d*x)**S(3)/(S(5)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(4))) + cot(c + d*x)/(S(3)*b**S(2)*d*sqrt(b*tan(c + d*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**p)**n, x), x, (b*tan(c + d*x)**p)**n*Hypergeometric2F1(S(1), n*p/S(2) + S(1)/2, n*p/S(2) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)/(d*(n*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(2))**n, x), x, (b*tan(c + d*x)**S(2))**n*Hypergeometric2F1(S(1), n + S(1)/2, n + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)/(d*(S(2)*n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(3))**n, x), x, (b*tan(c + d*x)**S(3))**n*Hypergeometric2F1(S(1), S(3)*n/S(2) + S(1)/2, S(3)*n/S(2) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)/(d*(S(3)*n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**S(4))**n, x), x, (b*tan(c + d*x)**S(4))**n*Hypergeometric2F1(S(1), S(2)*n + S(1)/2, S(2)*n + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)/(d*(S(4)*n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**p)**(S(5)/2), x), x, S(2)*b**S(2)*sqrt(b*tan(c + d*x)**p)*Hypergeometric2F1(S(1), S(5)*p/S(4) + S(1)/2, S(5)*p/S(4) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)**(S(2)*p + S(1))/(d*(S(5)*p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**p)**(S(3)/2), x), x, S(2)*b*sqrt(b*tan(c + d*x)**p)*Hypergeometric2F1(S(1), S(3)*p/S(4) + S(1)/2, S(3)*p/S(4) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)**(p + S(1))/(d*(S(3)*p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(c + d*x)**p), x), x, S(2)*sqrt(b*tan(c + d*x)**p)*Hypergeometric2F1(S(1), p/S(4) + S(1)/2, p/S(4) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)/(d*(p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*tan(c + d*x)**p), x), x, S(2)*Hypergeometric2F1(S(1), -p/S(4) + S(1)/2, -p/S(4) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)/(d*sqrt(b*tan(c + d*x)**p)*(-p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**p)**(S(-3)/2), x), x, S(2)*Hypergeometric2F1(S(1), -S(3)*p/S(4) + S(1)/2, -S(3)*p/S(4) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)**(-p + S(1))/(b*d*sqrt(b*tan(c + d*x)**p)*(-S(3)*p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**p)**(S(-5)/2), x), x, S(2)*Hypergeometric2F1(S(1), -S(5)*p/S(4) + S(1)/2, -S(5)*p/S(4) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)**(-S(2)*p + S(1))/(b**S(2)*d*sqrt(b*tan(c + d*x)**p)*(-S(5)*p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(c + d*x)**p)**(S(1)/p), x), x, -(b*tan(c + d*x)**p)**(S(1)/p)*log(cos(c + d*x))*cot(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*tan(c + d*x))**p)**n, x), x, (a*(b*tan(c + d*x))**p)**n*Hypergeometric2F1(S(1), n*p/S(2) + S(1)/2, n*p/S(2) + S(3)/2, -tan(c + d*x)**S(2))*tan(c + d*x)/(d*(n*p + S(1))), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*sin(a + b*x)**S(4), x), x, -S(21)*sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b) + S(21)*sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b) + S(21)*sqrt(S(2))*sqrt(d)*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b) - S(21)*sqrt(S(2))*sqrt(d)*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b) - S(7)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(2)/(S(16)*b*d) - (d*tan(a + b*x))**(S(7)/2)*cos(a + b*x)**S(4)/(S(4)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*sin(a + b*x)**S(2), x), x, -S(3)*sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b) + S(3)*sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b) + S(3)*sqrt(S(2))*sqrt(d)*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b) - S(3)*sqrt(S(2))*sqrt(d)*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b) - (d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(2)/(S(2)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*csc(a + b*x)**S(2), x), x, -S(2)*d/(b*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*csc(a + b*x)**S(4), x), x, -S(2)*d**S(3)/(S(5)*b*(d*tan(a + b*x))**(S(5)/2)) - S(2)*d/(b*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*csc(a + b*x)**S(6), x), x, -S(2)*d**S(5)/(S(9)*b*(d*tan(a + b*x))**(S(9)/2)) - S(4)*d**S(3)/(S(5)*b*(d*tan(a + b*x))**(S(5)/2)) - S(2)*d/(b*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*sin(a + b*x)**S(3), x), x, S(5)*d*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(12)*b*sqrt(d*tan(a + b*x))) - S(5)*sqrt(d*tan(a + b*x))*cos(a + b*x)/(S(6)*b) - (d*tan(a + b*x))**(S(5)/2)*cos(a + b*x)**S(3)/(S(3)*b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*sin(a + b*x), x), x, d*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(2)*b*sqrt(d*tan(a + b*x))) - sqrt(d*tan(a + b*x))*cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*csc(a + b*x), x), x, d*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(b*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*csc(a + b*x)**S(3), x), x, -S(2)*d**S(2)*sec(a + b*x)/(S(3)*b*(d*tan(a + b*x))**(S(3)/2)) + S(2)*d*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(3)*b*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(a + b*x))*csc(a + b*x)**S(5), x), x, -S(2)*d**S(4)*sec(a + b*x)**S(3)/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)) - S(4)*d**S(2)*sec(a + b*x)/(S(7)*b*(d*tan(a + b*x))**(S(3)/2)) + S(4)*d*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(7)*b*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sin(a + b*x)**S(4), x), x, S(45)*sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b) - S(45)*sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b) + S(45)*sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b) - S(45)*sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b) + S(45)*d*sqrt(d*tan(a + b*x))/(S(16)*b) - S(9)*(d*tan(a + b*x))**(S(5)/2)*cos(a + b*x)**S(2)/(S(16)*b*d) - (d*tan(a + b*x))**(S(9)/2)*cos(a + b*x)**S(4)/(S(4)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sin(a + b*x)**S(2), x), x, S(5)*sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b) - S(5)*sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b) + S(5)*sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b) - S(5)*sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b) + S(5)*d*sqrt(d*tan(a + b*x))/(S(2)*b) - (d*tan(a + b*x))**(S(5)/2)*cos(a + b*x)**S(2)/(S(2)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*csc(a + b*x)**S(2), x), x, S(2)*d*sqrt(d*tan(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*csc(a + b*x)**S(4), x), x, -S(2)*d**S(3)/(S(3)*b*(d*tan(a + b*x))**(S(3)/2)) + S(2)*d*sqrt(d*tan(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*csc(a + b*x)**S(6), x), x, -S(2)*d**S(5)/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)) - S(4)*d**S(3)/(S(3)*b*(d*tan(a + b*x))**(S(3)/2)) + S(2)*d*sqrt(d*tan(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sin(a + b*x)**S(3), x), x, -S(7)*d*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(2)*b*sqrt(sin(S(2)*a + S(2)*b*x))) + S(7)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)/(S(3)*b) - (d*tan(a + b*x))**(S(7)/2)*cos(a + b*x)**S(3)/(S(3)*b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sin(a + b*x), x), x, -S(3)*d*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*csc(a + b*x), x), x, -S(2)*d*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*csc(a + b*x)**S(3), x), x, -S(2)*d**S(2)*sec(a + b*x)/(b*sqrt(d*tan(a + b*x))) - S(4)*d*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*sqrt(sin(S(2)*a + S(2)*b*x))) + S(4)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*sin(a + b*x)**S(4), x), x, S(77)*sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b) - S(77)*sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b) - S(77)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b) + S(77)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b) + S(77)*d*(d*tan(a + b*x))**(S(3)/2)/(S(48)*b) - S(11)*(d*tan(a + b*x))**(S(7)/2)*cos(a + b*x)**S(2)/(S(16)*b*d) - (d*tan(a + b*x))**(S(11)/2)*cos(a + b*x)**S(4)/(S(4)*b*d**S(3)), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*sin(a + b*x)**S(2), x), x, S(7)*sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b) - S(7)*sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b) - S(7)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b) + S(7)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b) + S(7)*d*(d*tan(a + b*x))**(S(3)/2)/(S(6)*b) - (d*tan(a + b*x))**(S(7)/2)*cos(a + b*x)**S(2)/(S(2)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*csc(a + b*x)**S(2), x), x, S(2)*d*(d*tan(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*csc(a + b*x)**S(4), x), x, -S(2)*d**S(3)/(b*sqrt(d*tan(a + b*x))) + S(2)*d*(d*tan(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*csc(a + b*x)**S(6), x), x, -S(2)*d**S(5)/(S(5)*b*(d*tan(a + b*x))**(S(5)/2)) - S(4)*d**S(3)/(b*sqrt(d*tan(a + b*x))) + S(2)*d*(d*tan(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*sin(a + b*x)**S(3), x), x, -S(5)*d**S(3)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(4)*b*sqrt(d*tan(a + b*x))) + S(5)*d**S(2)*sqrt(d*tan(a + b*x))*cos(a + b*x)/(S(2)*b) + (d*tan(a + b*x))**(S(5)/2)*cos(a + b*x)/b - (d*tan(a + b*x))**(S(9)/2)*cos(a + b*x)**S(3)/(S(3)*b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*sin(a + b*x), x), x, -S(5)*d**S(3)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(6)*b*sqrt(d*tan(a + b*x))) + S(5)*d**S(2)*sqrt(d*tan(a + b*x))*cos(a + b*x)/(S(3)*b) + S(2)*(d*tan(a + b*x))**(S(5)/2)*cos(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*csc(a + b*x), x), x, -d**S(3)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(3)*b*sqrt(d*tan(a + b*x))) + S(2)*d**S(2)*sqrt(d*tan(a + b*x))*sec(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*csc(a + b*x)**S(3), x), x, S(2)*d**S(3)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(3)*b*sqrt(d*tan(a + b*x))) + S(2)*d**S(2)*sqrt(d*tan(a + b*x))*sec(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*csc(a + b*x)**S(5), x), x, -S(2)*d**S(4)*sec(a + b*x)**S(3)/(S(3)*b*(d*tan(a + b*x))**(S(3)/2)) + S(4)*d**S(3)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(3)*b*sqrt(d*tan(a + b*x))) + S(4)*d**S(2)*sqrt(d*tan(a + b*x))*sec(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(5)/2)*csc(a + b*x)**S(7), x), x, -S(2)*d**S(6)*sec(a + b*x)**S(5)/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)) - S(20)*d**S(4)*sec(a + b*x)**S(3)/(S(21)*b*(d*tan(a + b*x))**(S(3)/2)) + S(40)*d**S(3)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(21)*b*sqrt(d*tan(a + b*x))) + S(40)*d**S(2)*sqrt(d*tan(a + b*x))*sec(a + b*x)/(S(21)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)/sqrt(d*tan(a + b*x)), x), x, -S(5)*sqrt(d*tan(a + b*x))*cos(a + b*x)**S(2)/(S(16)*b*d) - (d*tan(a + b*x))**(S(5)/2)*cos(a + b*x)**S(4)/(S(4)*b*d**S(3)) - S(5)*sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b*sqrt(d)) + S(5)*sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b*sqrt(d)) - S(5)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b*sqrt(d)) + S(5)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)/sqrt(d*tan(a + b*x)), x), x, -sqrt(d*tan(a + b*x))*cos(a + b*x)**S(2)/(S(2)*b*d) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b*sqrt(d)) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b*sqrt(d)) - sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b*sqrt(d)) + sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(2)/sqrt(d*tan(a + b*x)), x), x, -S(2)*d/(S(3)*b*(d*tan(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(4)/sqrt(d*tan(a + b*x)), x), x, -S(2)*d**S(3)/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)) - S(2)*d/(S(3)*b*(d*tan(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(6)/sqrt(d*tan(a + b*x)), x), x, -S(2)*d**S(5)/(S(11)*b*(d*tan(a + b*x))**(S(11)/2)) - S(4)*d**S(3)/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)) - S(2)*d/(S(3)*b*(d*tan(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/sqrt(d*tan(a + b*x)), x), x, sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(2)*b*d*sqrt(sin(S(2)*a + S(2)*b*x))) - (d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(3)/(S(3)*b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/sqrt(d*tan(a + b*x)), x), x, sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*d*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)/sqrt(d*tan(a + b*x)), x), x, -S(2)*cos(a + b*x)/(b*sqrt(d*tan(a + b*x))) - S(2)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*d*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(3)/sqrt(d*tan(a + b*x)), x), x, -S(2)*d**S(2)*sec(a + b*x)/(S(5)*b*(d*tan(a + b*x))**(S(5)/2)) - S(4)*cos(a + b*x)/(S(5)*b*sqrt(d*tan(a + b*x))) - S(4)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(5)*b*d*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)/(d*tan(a + b*x))**(S(3)/2), x), x, -(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(4)/(S(4)*b*d**S(3)) + S(3)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(2)/(S(16)*b*d**S(3)) - S(3)*sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b*d**(S(3)/2)) + S(3)*sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b*d**(S(3)/2)) + S(3)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b*d**(S(3)/2)) - S(3)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)/(d*tan(a + b*x))**(S(3)/2), x), x, (d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(2)/(S(2)*b*d**S(3)) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b*d**(S(3)/2)) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b*d**(S(3)/2)) + sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b*d**(S(3)/2)) - sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(2)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*d/(S(5)*b*(d*tan(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(4)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*d**S(3)/(S(9)*b*(d*tan(a + b*x))**(S(9)/2)) - S(2)*d/(S(5)*b*(d*tan(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(6)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*d**S(5)/(S(13)*b*(d*tan(a + b*x))**(S(13)/2)) - S(4)*d**S(3)/(S(9)*b*(d*tan(a + b*x))**(S(9)/2)) - S(2)*d/(S(5)*b*(d*tan(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/(d*tan(a + b*x))**(S(3)/2), x), x, EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(12)*b*d*sqrt(d*tan(a + b*x))) - sqrt(d*tan(a + b*x))*cos(a + b*x)**S(3)/(S(3)*b*d**S(2)) + sqrt(d*tan(a + b*x))*cos(a + b*x)/(S(6)*b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/(d*tan(a + b*x))**(S(3)/2), x), x, EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(2)*b*d*sqrt(d*tan(a + b*x))) + sqrt(d*tan(a + b*x))*cos(a + b*x)/(b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*sec(a + b*x)/(S(3)*b*(d*tan(a + b*x))**(S(3)/2)) - EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(3)*b*d*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(3)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*d**S(2)*sec(a + b*x)/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)) - S(4)*sec(a + b*x)/(S(21)*b*(d*tan(a + b*x))**(S(3)/2)) - S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(21)*b*d*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)/(d*tan(a + b*x))**(S(5)/2), x), x, -sqrt(d*tan(a + b*x))*cos(a + b*x)**S(4)/(S(4)*b*d**S(3)) + sqrt(d*tan(a + b*x))*cos(a + b*x)**S(2)/(S(16)*b*d**S(3)) - S(3)*sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b*d**(S(5)/2)) + S(3)*sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(64)*b*d**(S(5)/2)) - S(3)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b*d**(S(5)/2)) + S(3)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(128)*b*d**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)/(d*tan(a + b*x))**(S(5)/2), x), x, sqrt(d*tan(a + b*x))*cos(a + b*x)**S(2)/(S(2)*b*d**S(3)) - S(3)*sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b*d**(S(5)/2)) + S(3)*sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b*d**(S(5)/2)) - S(3)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b*d**(S(5)/2)) + S(3)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b*d**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(2)/(d*tan(a + b*x))**(S(5)/2), x), x, -S(2)*d/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(4)/(d*tan(a + b*x))**(S(5)/2), x), x, -S(2)*d**S(3)/(S(11)*b*(d*tan(a + b*x))**(S(11)/2)) - S(2)*d/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(6)/(d*tan(a + b*x))**(S(5)/2), x), x, -S(2)*d**S(5)/(S(15)*b*(d*tan(a + b*x))**(S(15)/2)) - S(4)*d**S(3)/(S(11)*b*(d*tan(a + b*x))**(S(11)/2)) - S(2)*d/(S(7)*b*(d*tan(a + b*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)/(d*tan(a + b*x))**(S(5)/2), x), x, S(3)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(20)*b*d**S(3)*sqrt(sin(S(2)*a + S(2)*b*x))) - (d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(5)/(S(5)*b*d**S(4)) + (d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(3)/(S(10)*b*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/(d*tan(a + b*x))**(S(5)/2), x), x, sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(2)*b*d**S(3)*sqrt(sin(S(2)*a + S(2)*b*x))) + (d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(3)/(S(3)*b*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/(d*tan(a + b*x))**(S(5)/2), x), x, -S(2)*cos(a + b*x)/(b*d**S(2)*sqrt(d*tan(a + b*x))) - S(3)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*d**S(3)*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)/(d*tan(a + b*x))**(S(5)/2), x), x, -S(2)*sec(a + b*x)/(S(5)*b*(d*tan(a + b*x))**(S(5)/2)) + S(6)*cos(a + b*x)/(S(5)*b*d**S(2)*sqrt(d*tan(a + b*x))) + S(6)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(5)*b*d**S(3)*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(3)/(d*tan(a + b*x))**(S(5)/2), x), x, -S(2)*d**S(2)*sec(a + b*x)/(S(9)*b*(d*tan(a + b*x))**(S(9)/2)) - S(4)*sec(a + b*x)/(S(45)*b*(d*tan(a + b*x))**(S(5)/2)) + S(4)*cos(a + b*x)/(S(15)*b*d**S(2)*sqrt(d*tan(a + b*x))) + S(4)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(15)*b*d**S(3)*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(3)/2), x), x, S(8)*b**S(2)*d*sqrt(d*tan(e + f*x))/(S(3)*f*sqrt(b*sin(e + f*x))) - S(2)*d*(b*sin(e + f*x))**(S(3)/2)*sqrt(d*tan(e + f*x))/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(x)**(S(5)/2)/tan(x)**(S(3)/2), x), x, -S(2)*sin(x)**(S(5)/2)/(S(5)*tan(x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(4)/3)*sqrt(d*tan(e + f*x)), x), x, S(6)*(b*sin(e + f*x))**(S(4)/3)*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(3)/4, S(17)/12, S(29)/12, sin(e + f*x)**S(2))/(S(17)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(1)/3)*sqrt(d*tan(e + f*x)), x), x, S(6)*(b*sin(e + f*x))**(S(1)/3)*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(3)/4, S(11)/12, S(23)/12, sin(e + f*x)**S(2))/(S(11)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))/(b*sin(e + f*x))**(S(1)/3), x), x, S(6)*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(7)/12, S(3)/4, S(19)/12, sin(e + f*x)**S(2))/(S(7)*d*f*(b*sin(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))/(b*sin(e + f*x))**(S(4)/3), x), x, S(6)*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(1)/12, S(3)/4, S(13)/12, sin(e + f*x)**S(2))/(d*f*(b*sin(e + f*x))**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(4)/3)*(d*tan(e + f*x))**(S(3)/2), x), x, S(6)*d*(b*sin(e + f*x))**(S(10)/3)*sqrt(d*tan(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/4, S(23)/12, S(35)/12, sin(e + f*x)**S(2))/(S(23)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(1)/3)*(d*tan(e + f*x))**(S(3)/2), x), x, S(6)*d*(b*sin(e + f*x))**(S(7)/3)*sqrt(d*tan(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/4, S(17)/12, S(29)/12, sin(e + f*x)**S(2))/(S(17)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(3)/2)/(b*sin(e + f*x))**(S(1)/3), x), x, S(6)*d*(b*sin(e + f*x))**(S(5)/3)*sqrt(d*tan(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(13)/12, S(5)/4, S(25)/12, sin(e + f*x)**S(2))/(S(13)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(3)/2)/(b*sin(e + f*x))**(S(4)/3), x), x, S(6)*d*(b*sin(e + f*x))**(S(2)/3)*sqrt(d*tan(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(7)/12, S(5)/4, S(19)/12, sin(e + f*x)**S(2))/(S(7)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sin(e + f*x))*(d*tan(e + f*x))**(S(4)/3), x), x, S(6)*d*(b*sin(e + f*x))**(S(5)/2)*(d*tan(e + f*x))**(S(1)/3)*(cos(e + f*x)**S(2))**(S(1)/6)*Hypergeometric2F1(S(7)/6, S(17)/12, S(29)/12, sin(e + f*x)**S(2))/(S(17)*b**S(2)*f), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(b*sin(e + f*x))*(d*tan(e + f*x))**(S(4)/3), x), x, -S(3)*d*sqrt(b*sin(e + f*x))*(d*tan(e + f*x))**(S(1)/3)*(sec(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/12, S(5)/4, S(17)/12, -tan(e + f*x)**S(2))/f + S(3)*d*sqrt(b*sin(e + f*x))*(d*tan(e + f*x))**(S(1)/3)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sin(e + f*x))*(d*tan(e + f*x))**(S(1)/3), x), x, S(6)*sqrt(b*sin(e + f*x))*(d*tan(e + f*x))**(S(4)/3)*(cos(e + f*x)**S(2))**(S(2)/3)*Hypergeometric2F1(S(2)/3, S(11)/12, S(23)/12, sin(e + f*x)**S(2))/(S(11)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sin(e + f*x))/(d*tan(e + f*x))**(S(1)/3), x), x, S(6)*sqrt(b*sin(e + f*x))*(d*tan(e + f*x))**(S(2)/3)*(cos(e + f*x)**S(2))**(S(1)/3)*Hypergeometric2F1(S(1)/3, S(7)/12, S(19)/12, sin(e + f*x)**S(2))/(S(7)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sin(e + f*x))/(d*tan(e + f*x))**(S(4)/3), x), x, S(6)*sqrt(b*sin(e + f*x))*Hypergeometric2F1(S(-1)/6, S(1)/12, S(13)/12, sin(e + f*x)**S(2))/(d*f*(d*tan(e + f*x))**(S(1)/3)*(cos(e + f*x)**S(2))**(S(1)/6)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(b*sin(e + f*x))/(d*tan(e + f*x))**(S(4)/3), x), x, S(4)*sqrt(b*sin(e + f*x))*(sec(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(1)/12, S(1)/4, S(13)/12, -tan(e + f*x)**S(2))/(d*f*(d*tan(e + f*x))**(S(1)/3)) + S(2)*sqrt(b*sin(e + f*x))/(d*f*(d*tan(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(4)/3), x), x, S(6)*d*(b*sin(e + f*x))**(S(7)/2)*(d*tan(e + f*x))**(S(1)/3)*(cos(e + f*x)**S(2))**(S(1)/6)*Hypergeometric2F1(S(7)/6, S(23)/12, S(35)/12, sin(e + f*x)**S(2))/(S(23)*b**S(2)*f), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((b*sin(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(4)/3), x), x, -S(3)*d*(b*sin(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(1)/3)*(sec(e + f*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(11)/12, S(7)/4, S(23)/12, -tan(e + f*x)**S(2))/f + S(3)*d*(b*sin(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(1)/3)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(1)/3), x), x, S(6)*(b*sin(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(4)/3)*(cos(e + f*x)**S(2))**(S(2)/3)*Hypergeometric2F1(S(2)/3, S(17)/12, S(29)/12, sin(e + f*x)**S(2))/(S(17)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(3)/2)/(d*tan(e + f*x))**(S(1)/3), x), x, S(6)*(b*sin(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(2)/3)*(cos(e + f*x)**S(2))**(S(1)/3)*Hypergeometric2F1(S(1)/3, S(13)/12, S(25)/12, sin(e + f*x)**S(2))/(S(13)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(3)/2)/(d*tan(e + f*x))**(S(4)/3), x), x, S(6)*(b*sin(e + f*x))**(S(3)/2)*Hypergeometric2F1(S(-1)/6, S(7)/12, S(19)/12, sin(e + f*x)**S(2))/(S(7)*d*f*(d*tan(e + f*x))**(S(1)/3)*(cos(e + f*x)**S(2))**(S(1)/6)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((b*sin(e + f*x))**(S(3)/2)/(d*tan(e + f*x))**(S(4)/3), x), x, S(4)*(b*sin(e + f*x))**(S(3)/2)*(sec(e + f*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(7)/12, S(3)/4, S(19)/12, -tan(e + f*x)**S(2))/(S(21)*d*f*(d*tan(e + f*x))**(S(1)/3)) + S(2)*(b*sin(e + f*x))**(S(3)/2)/(S(3)*d*f*(d*tan(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*tan(e + f*x)**S(3), x), x, (b*sin(e + f*x))**(m + S(4))*Hypergeometric2F1(S(2), m/S(2) + S(2), m/S(2) + S(3), sin(e + f*x)**S(2))/(b**S(4)*f*(m + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*tan(e + f*x), x), x, (b*sin(e + f*x))**(m + S(2))*Hypergeometric2F1(S(1), m/S(2) + S(1), m/S(2) + S(2), sin(e + f*x)**S(2))/(b**S(2)*f*(m + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*cot(e + f*x), x), x, (b*sin(e + f*x))**m/(f*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*cot(e + f*x)**S(3), x), x, -b**S(2)*(b*sin(e + f*x))**(m + S(-2))/(f*(-m + S(2))) - (b*sin(e + f*x))**m/(f*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*cot(e + f*x)**S(5), x), x, -b**S(4)*(b*sin(e + f*x))**(m + S(-4))/(f*(-m + S(4))) + S(2)*b**S(2)*(b*sin(e + f*x))**(m + S(-2))/(f*(-m + S(2))) + (b*sin(e + f*x))**m/(f*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*tan(e + f*x)**S(4), x), x, (b*sin(e + f*x))**(m + S(5))*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(5)/2, m/S(2) + S(5)/2, m/S(2) + S(7)/2, sin(e + f*x)**S(2))*sec(e + f*x)/(b**S(5)*f*(m + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*tan(e + f*x)**S(2), x), x, (b*sin(e + f*x))**(m + S(3))*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(3)/2, m/S(2) + S(3)/2, m/S(2) + S(5)/2, sin(e + f*x)**S(2))*sec(e + f*x)/(b**S(3)*f*(m + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*cot(e + f*x)**S(2), x), x, -b*(b*sin(e + f*x))**(m + S(-1))*Hypergeometric2F1(S(-1)/2, m/S(2) + S(-1)/2, m/S(2) + S(1)/2, sin(e + f*x)**S(2))*cos(e + f*x)/(f*(-m + S(1))*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*cot(e + f*x)**S(4), x), x, -b**S(3)*(b*sin(e + f*x))**(m + S(-3))*Hypergeometric2F1(S(-3)/2, m/S(2) + S(-3)/2, m/S(2) + S(-1)/2, sin(e + f*x)**S(2))*cos(e + f*x)/(f*(-m + S(3))*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*(d*tan(e + f*x))**(S(3)/2), x), x, S(2)*d*(b*sin(e + f*x))**(m + S(2))*sqrt(d*tan(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/4, m/S(2) + S(5)/4, m/S(2) + S(9)/4, sin(e + f*x)**S(2))/(b**S(2)*f*(S(2)*m + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*sqrt(d*tan(e + f*x)), x), x, S(2)*(b*sin(e + f*x))**m*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(3)/4, m/S(2) + S(3)/4, m/S(2) + S(7)/4, sin(e + f*x)**S(2))/(d*f*(S(2)*m + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m/sqrt(d*tan(e + f*x)), x), x, S(2)*(b*sin(e + f*x))**m*sqrt(d*tan(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(1)/4, m/S(2) + S(1)/4, m/S(2) + S(5)/4, sin(e + f*x)**S(2))/(d*f*(S(2)*m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m/(d*tan(e + f*x))**(S(3)/2), x), x, -S(2)*(b*sin(e + f*x))**m*Hypergeometric2F1(S(-1)/4, m/S(2) + S(-1)/4, m/S(2) + S(3)/4, sin(e + f*x)**S(2))/(d*f*sqrt(d*tan(e + f*x))*(-S(2)*m + S(1))*(cos(e + f*x)**S(2))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(e + f*x))**m*(b*tan(e + f*x))**n, x), x, (a*sin(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(1)/2, m/S(2) + n/S(2) + S(1)/2, m/S(2) + n/S(2) + S(3)/2, sin(e + f*x)**S(2))/(b*f*(m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*sin(e + f*x)**S(4), x), x, (b*tan(e + f*x))**(n + S(5))*Hypergeometric2F1(S(3), n/S(2) + S(5)/2, n/S(2) + S(7)/2, -tan(e + f*x)**S(2))/(b**S(5)*f*(n + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*sin(e + f*x)**S(2), x), x, (b*tan(e + f*x))**(n + S(3))*Hypergeometric2F1(S(2), n/S(2) + S(3)/2, n/S(2) + S(5)/2, -tan(e + f*x)**S(2))/(b**S(3)*f*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*csc(e + f*x)**S(2), x), x, -b*(b*tan(e + f*x))**(n + S(-1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*csc(e + f*x)**S(4), x), x, -b**S(3)*(b*tan(e + f*x))**(n + S(-3))/(f*(-n + S(3))) - b*(b*tan(e + f*x))**(n + S(-1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*csc(e + f*x)**S(6), x), x, -b**S(5)*(b*tan(e + f*x))**(n + S(-5))/(f*(-n + S(5))) - S(2)*b**S(3)*(b*tan(e + f*x))**(n + S(-3))/(f*(-n + S(3))) - b*(b*tan(e + f*x))**(n + S(-1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*sin(e + f*x)**S(3), x), x, (b*tan(e + f*x))**(n + S(4))*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(1)/2, n/S(2) + S(2), n/S(2) + S(3), sin(e + f*x)**S(2))*cos(e + f*x)**S(3)/(b**S(4)*f*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*sin(e + f*x), x), x, (b*tan(e + f*x))**(n + S(2))*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(1)/2, n/S(2) + S(1), n/S(2) + S(2), sin(e + f*x)**S(2))*cos(e + f*x)/(b**S(2)*f*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*csc(e + f*x), x), x, (b*tan(e + f*x))**n*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2), n/S(2) + S(1)/2, n/S(2) + S(1), sin(e + f*x)**S(2))*sec(e + f*x)/(f*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*csc(e + f*x)**S(3), x), x, -b**S(2)*(b*tan(e + f*x))**(n + S(-2))*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(-1), n/S(2) + S(1)/2, n/S(2), sin(e + f*x)**S(2))*sec(e + f*x)**S(3)/(f*(-n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*cos(e + f*x))**m*(b*tan(e + f*x))**n, x), x, (a*cos(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))*(cos(e + f*x)**S(2))**(-m/S(2) + n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(1)/2, -m/S(2) + n/S(2) + S(1)/2, n/S(2) + S(3)/2, sin(e + f*x)**S(2))/(b*f*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*tan(e + f*x))**m*(b*tan(e + f*x))**n, x), x, (a*tan(e + f*x))**(m + S(1))*(b*tan(e + f*x))**n*Hypergeometric2F1(S(1), m/S(2) + n/S(2) + S(1)/2, m/S(2) + n/S(2) + S(3)/2, -tan(e + f*x)**S(2))/(a*f*(m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cot(e + f*x))*tan(e + f*x)**S(4), x), x, sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + S(2)*d**S(3)/(S(5)*f*(d*cot(e + f*x))**(S(5)/2)) - S(2)*d/(f*sqrt(d*cot(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cot(e + f*x))*tan(e + f*x)**S(3), x), x, -sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + S(2)*d**S(2)/(S(3)*f*(d*cot(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cot(e + f*x))*tan(e + f*x)**S(2), x), x, -sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + S(2)*d/(f*sqrt(d*cot(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cot(e + f*x))*tan(e + f*x), x), x, sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cot(e + f*x)), x), x, sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cot(e + f*x))*cot(e + f*x), x), x, -sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - S(2)*sqrt(d*cot(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cot(e + f*x))*cot(e + f*x)**S(2), x), x, -sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - S(2)*(d*cot(e + f*x))**(S(3)/2)/(S(3)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cot(e + f*x))*cot(e + f*x)**S(3), x), x, sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + S(2)*sqrt(d*cot(e + f*x))/f - S(2)*(d*cot(e + f*x))**(S(5)/2)/(S(5)*d**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(3)/2)*tan(e + f*x)**S(5), x), x, sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + S(2)*d**S(4)/(S(5)*f*(d*cot(e + f*x))**(S(5)/2)) - S(2)*d**S(2)/(f*sqrt(d*cot(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(3)/2)*tan(e + f*x)**S(4), x), x, -sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + S(2)*d**S(3)/(S(3)*f*(d*cot(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(3)/2)*tan(e + f*x)**S(3), x), x, -sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + S(2)*d**S(2)/(f*sqrt(d*cot(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(3)/2)*tan(e + f*x)**S(2), x), x, sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(3)/2)*tan(e + f*x), x), x, sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(3)/2), x), x, -sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - S(2)*d*sqrt(d*cot(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(3)/2)*cot(e + f*x), x), x, -sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - S(2)*(d*cot(e + f*x))**(S(3)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(3)/2)*cot(e + f*x)**S(2), x), x, sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*f) + S(2)*d*sqrt(d*cot(e + f*x))/f - S(2)*(d*cot(e + f*x))**(S(5)/2)/(S(5)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(3)/sqrt(d*cot(e + f*x)), x), x, S(2)*d**S(2)/(S(5)*f*(d*cot(e + f*x))**(S(5)/2)) - S(2)/(f*sqrt(d*cot(e + f*x))) + sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)/sqrt(d*cot(e + f*x)), x), x, S(2)*d/(S(3)*f*(d*cot(e + f*x))**(S(3)/2)) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)/sqrt(d*cot(e + f*x)), x), x, S(2)/(f*sqrt(d*cot(e + f*x))) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(d*cot(e + f*x)), x), x, sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(e + f*x)/sqrt(d*cot(e + f*x)), x), x, sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(e + f*x)**S(2)/sqrt(d*cot(e + f*x)), x), x, -S(2)*sqrt(d*cot(e + f*x))/(d*f) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(e + f*x)**S(3)/sqrt(d*cot(e + f*x)), x), x, -S(2)*(d*cot(e + f*x))**(S(3)/2)/(S(3)*d**S(2)*f) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*sqrt(d)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*sqrt(d)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)/(d*cot(e + f*x))**(S(3)/2), x), x, S(2)*d/(S(5)*f*(d*cot(e + f*x))**(S(5)/2)) - S(2)/(d*f*sqrt(d*cot(e + f*x))) + sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)/(d*cot(e + f*x))**(S(3)/2), x), x, S(2)/(S(3)*f*(d*cot(e + f*x))**(S(3)/2)) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cot(e + f*x))**(S(-3)/2), x), x, S(2)/(d*f*sqrt(d*cot(e + f*x))) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(e + f*x)/(d*cot(e + f*x))**(S(3)/2), x), x, sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(e + f*x)**S(2)/(d*cot(e + f*x))**(S(3)/2), x), x, sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(e + f*x)**S(3)/(d*cot(e + f*x))**(S(3)/2), x), x, -S(2)*sqrt(d*cot(e + f*x))/(d**S(2)*f) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(e + f*x)**S(4)/(d*cot(e + f*x))**(S(3)/2), x), x, -S(2)*(d*cot(e + f*x))**(S(3)/2)/(S(3)*d**S(3)*f) - sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cot(e + f*x)**S(5)/(d*cot(e + f*x))**(S(3)/2), x), x, S(2)*sqrt(d*cot(e + f*x))/(d**S(2)*f) - S(2)*(d*cot(e + f*x))**(S(5)/2)/(S(5)*d**S(4)*f) + sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*cot(e + f*x))/sqrt(d))/(S(2)*d**(S(3)/2)*f) + sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f) - sqrt(S(2))*log(sqrt(d)*cot(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*cot(e + f*x)))/(S(4)*d**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**n*cot(e + f*x)**m, x), x, Hypergeometric2F1(S(1), -m/S(2) + n/S(2) + S(1)/2, -m/S(2) + n/S(2) + S(3)/2, -tan(e + f*x)**S(2))*tan(e + f*x)**(n + S(1))*cot(e + f*x)**m/(f*(-m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**n*cot(e + f*x)**m, x), x, (b*tan(e + f*x))**(n + S(1))*Hypergeometric2F1(S(1), -m/S(2) + n/S(2) + S(1)/2, -m/S(2) + n/S(2) + S(3)/2, -tan(e + f*x)**S(2))*cot(e + f*x)**m/(b*f*(-m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*cot(e + f*x))**m*tan(e + f*x)**n, x), x, (a*cot(e + f*x))**m*Hypergeometric2F1(S(1), -m/S(2) + n/S(2) + S(1)/2, -m/S(2) + n/S(2) + S(3)/2, -tan(e + f*x)**S(2))*tan(e + f*x)**(n + S(1))/(f*(-m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*cot(e + f*x))**m*(b*tan(e + f*x))**n, x), x, (a*cot(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))*Hypergeometric2F1(S(1), -m/S(2) + n/S(2) + S(1)/2, -m/S(2) + n/S(2) + S(3)/2, -tan(e + f*x)**S(2))/(b*f*(-m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*sec(e + f*x)**S(6), x), x, S(2)*(d*tan(e + f*x))**(S(3)/2)/(S(3)*d*f) + S(4)*(d*tan(e + f*x))**(S(7)/2)/(S(7)*d**S(3)*f) + S(2)*(d*tan(e + f*x))**(S(11)/2)/(S(11)*d**S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*sec(e + f*x)**S(4), x), x, S(2)*(d*tan(e + f*x))**(S(3)/2)/(S(3)*d*f) + S(2)*(d*tan(e + f*x))**(S(7)/2)/(S(7)*d**S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*sec(e + f*x)**S(2), x), x, S(2)*(d*tan(e + f*x))**(S(3)/2)/(S(3)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x)), x), x, -sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(2)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*tan(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(4)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*tan(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(4)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*cos(e + f*x)**S(2), x), x, -sqrt(S(2))*sqrt(d)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(8)*f) + sqrt(S(2))*sqrt(d)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(8)*f) + sqrt(S(2))*sqrt(d)*log(sqrt(d)*tan(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(16)*f) - sqrt(S(2))*sqrt(d)*log(sqrt(d)*tan(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(16)*f) + (d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)**S(2)/(S(2)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*sec(e + f*x)**S(3), x), x, -S(4)*sqrt(d*tan(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*cos(e + f*x)/(S(5)*f*sqrt(sin(S(2)*e + S(2)*f*x))) + S(4)*(d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)/(S(5)*d*f) + S(2)*(d*tan(e + f*x))**(S(3)/2)*sec(e + f*x)/(S(5)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*sec(e + f*x), x), x, -S(2)*sqrt(d*tan(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*cos(e + f*x)/(f*sqrt(sin(S(2)*e + S(2)*f*x))) + S(2)*(d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)/(d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*cos(e + f*x), x), x, sqrt(d*tan(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*cos(e + f*x)/(f*sqrt(sin(S(2)*e + S(2)*f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*cos(e + f*x)**S(3), x), x, sqrt(d*tan(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*cos(e + f*x)/(S(2)*f*sqrt(sin(S(2)*e + S(2)*f*x))) + (d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)**S(3)/(S(3)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))*cos(e + f*x)**S(5), x), x, S(7)*sqrt(d*tan(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*cos(e + f*x)/(S(20)*f*sqrt(sin(S(2)*e + S(2)*f*x))) + (d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)**S(5)/(S(5)*d*f) + S(7)*(d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)**S(3)/(S(30)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sec(a + b*x)**S(6), x), x, S(2)*(d*tan(a + b*x))**(S(5)/2)/(S(5)*b*d) + S(4)*(d*tan(a + b*x))**(S(9)/2)/(S(9)*b*d**S(3)) + S(2)*(d*tan(a + b*x))**(S(13)/2)/(S(13)*b*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sec(a + b*x)**S(4), x), x, S(2)*(d*tan(a + b*x))**(S(5)/2)/(S(5)*b*d) + S(2)*(d*tan(a + b*x))**(S(9)/2)/(S(9)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sec(a + b*x)**S(2), x), x, S(2)*(d*tan(a + b*x))**(S(5)/2)/(S(5)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2), x), x, sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(2)*b) - sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(2)*b) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(4)*b) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(4)*b) + S(2)*d*sqrt(d*tan(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(2), x), x, -sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b) + sqrt(S(2))*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b) - sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b) - d*sqrt(d*tan(a + b*x))*cos(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sec(a + b*x)**S(5), x), x, -S(4)*d**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(77)*b*sqrt(d*tan(a + b*x))) + S(2)*d*sqrt(d*tan(a + b*x))*sec(a + b*x)**S(5)/(S(11)*b) - S(2)*d*sqrt(d*tan(a + b*x))*sec(a + b*x)**S(3)/(S(77)*b) - S(4)*d*sqrt(d*tan(a + b*x))*sec(a + b*x)/(S(77)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sec(a + b*x)**S(3), x), x, -S(2)*d**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(21)*b*sqrt(d*tan(a + b*x))) + S(2)*d*sqrt(d*tan(a + b*x))*sec(a + b*x)**S(3)/(S(7)*b) - S(2)*d*sqrt(d*tan(a + b*x))*sec(a + b*x)/(S(21)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*sec(a + b*x), x), x, -d**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(3)*b*sqrt(d*tan(a + b*x))) + S(2)*d*sqrt(d*tan(a + b*x))*sec(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*cos(a + b*x), x), x, d**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(2)*b*sqrt(d*tan(a + b*x))) - d*sqrt(d*tan(a + b*x))*cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(3), x), x, d**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(12)*b*sqrt(d*tan(a + b*x))) - d*sqrt(d*tan(a + b*x))*cos(a + b*x)**S(3)/(S(3)*b) + d*sqrt(d*tan(a + b*x))*cos(a + b*x)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(5), x), x, d**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(24)*b*sqrt(d*tan(a + b*x))) - d*sqrt(d*tan(a + b*x))*cos(a + b*x)**S(5)/(S(5)*b) + d*sqrt(d*tan(a + b*x))*cos(a + b*x)**S(3)/(S(30)*b) + d*sqrt(d*tan(a + b*x))*cos(a + b*x)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(5)/2)*sec(e + f*x)**S(6), x), x, S(2)*(d*tan(e + f*x))**(S(7)/2)/(S(7)*d*f) + S(4)*(d*tan(e + f*x))**(S(11)/2)/(S(11)*d**S(3)*f) + S(2)*(d*tan(e + f*x))**(S(15)/2)/(S(15)*d**S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(5)/2)*sec(e + f*x)**S(4), x), x, S(2)*(d*tan(e + f*x))**(S(7)/2)/(S(7)*d*f) + S(2)*(d*tan(e + f*x))**(S(11)/2)/(S(11)*d**S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(5)/2)*sec(e + f*x)**S(2), x), x, S(2)*(d*tan(e + f*x))**(S(7)/2)/(S(7)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(5)/2), x), x, sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(2)*f) - sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(4)*f) + sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(4)*f) + S(2)*d*(d*tan(e + f*x))**(S(3)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(5)/2)*cos(e + f*x)**S(2), x), x, -S(3)*sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(8)*f) + S(3)*sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(8)*f) + S(3)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(16)*f) - S(3)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(16)*f) - d*(d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)**S(2)/(S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(5)/2)*cos(e + f*x)**S(4), x), x, -S(3)*sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(64)*f) + S(3)*sqrt(S(2))*d**(S(5)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(e + f*x))/sqrt(d))/(S(64)*f) + S(3)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(e + f*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(128)*f) - S(3)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(d)*tan(e + f*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(e + f*x)))/(S(128)*f) - d*(d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)**S(4)/(S(4)*f) + S(3)*d*(d*tan(e + f*x))**(S(3)/2)*cos(e + f*x)**S(2)/(S(16)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(e + f*x)**S(5)/sqrt(d*tan(e + f*x)), x), x, S(4)*EllipticF(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(S(2)*e + S(2)*f*x))*sec(e + f*x)/(S(7)*f*sqrt(d*tan(e + f*x))) + S(2)*sqrt(d*tan(e + f*x))*sec(e + f*x)**S(3)/(S(7)*d*f) + S(4)*sqrt(d*tan(e + f*x))*sec(e + f*x)/(S(7)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(e + f*x)**S(3)/sqrt(d*tan(e + f*x)), x), x, S(2)*EllipticF(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(S(2)*e + S(2)*f*x))*sec(e + f*x)/(S(3)*f*sqrt(d*tan(e + f*x))) + S(2)*sqrt(d*tan(e + f*x))*sec(e + f*x)/(S(3)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(e + f*x)/sqrt(d*tan(e + f*x)), x), x, EllipticF(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(S(2)*e + S(2)*f*x))*sec(e + f*x)/(f*sqrt(d*tan(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(e + f*x)/sqrt(d*tan(e + f*x)), x), x, EllipticF(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(S(2)*e + S(2)*f*x))*sec(e + f*x)/(S(2)*f*sqrt(d*tan(e + f*x))) + sqrt(d*tan(e + f*x))*cos(e + f*x)/(d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(e + f*x)**S(3)/sqrt(d*tan(e + f*x)), x), x, S(5)*EllipticF(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(S(2)*e + S(2)*f*x))*sec(e + f*x)/(S(12)*f*sqrt(d*tan(e + f*x))) + sqrt(d*tan(e + f*x))*cos(e + f*x)**S(3)/(S(3)*d*f) + S(5)*sqrt(d*tan(e + f*x))*cos(e + f*x)/(S(6)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(6)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)/(b*d*sqrt(d*tan(a + b*x))) + S(4)*(d*tan(a + b*x))**(S(3)/2)/(S(3)*b*d**S(3)) + S(2)*(d*tan(a + b*x))**(S(7)/2)/(S(7)*b*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(4)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)/(b*d*sqrt(d*tan(a + b*x))) + S(2)*(d*tan(a + b*x))**(S(3)/2)/(S(3)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(2)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)/(b*d*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**(S(-3)/2), x), x, -S(2)/(b*d*sqrt(d*tan(a + b*x))) + sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(2)*b*d**(S(3)/2)) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(2)*b*d**(S(3)/2)) - sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(4)*b*d**(S(3)/2)) + sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(4)*b*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(2)/(d*tan(a + b*x))**(S(3)/2), x), x, cos(a + b*x)**S(2)/(S(2)*b*d*sqrt(d*tan(a + b*x))) - S(5)/(S(2)*b*d*sqrt(d*tan(a + b*x))) + S(5)*sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b*d**(S(3)/2)) - S(5)*sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(d*tan(a + b*x))/sqrt(d))/(S(8)*b*d**(S(3)/2)) - S(5)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) - sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b*d**(S(3)/2)) + S(5)*sqrt(S(2))*log(sqrt(d)*tan(a + b*x) + sqrt(d) + sqrt(S(2))*sqrt(d*tan(a + b*x)))/(S(16)*b*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(5)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*sec(a + b*x)**S(3)/(b*d*sqrt(d*tan(a + b*x))) - S(24)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(5)*b*d**S(2)*sqrt(sin(S(2)*a + S(2)*b*x))) + S(24)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)/(S(5)*b*d**S(3)) + S(12)*(d*tan(a + b*x))**(S(3)/2)*sec(a + b*x)/(S(5)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*sec(a + b*x)/(b*d*sqrt(d*tan(a + b*x))) - S(4)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*d**S(2)*sqrt(sin(S(2)*a + S(2)*b*x))) + S(4)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)/(b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*cos(a + b*x)/(b*d*sqrt(d*tan(a + b*x))) - S(2)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*d**S(2)*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*cos(a + b*x)/(b*d*sqrt(d*tan(a + b*x))) - S(3)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(b*d**S(2)*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(3)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*cos(a + b*x)**S(3)/(b*d*sqrt(d*tan(a + b*x))) - S(7)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(2)*b*d**S(2)*sqrt(sin(S(2)*a + S(2)*b*x))) - S(7)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(3)/(S(3)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(5)/(d*tan(a + b*x))**(S(3)/2), x), x, -S(2)*cos(a + b*x)**S(5)/(b*d*sqrt(d*tan(a + b*x))) - S(77)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(20)*b*d**S(2)*sqrt(sin(S(2)*a + S(2)*b*x))) - S(11)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(5)/(S(5)*b*d**S(3)) - S(77)*(d*tan(a + b*x))**(S(3)/2)*cos(a + b*x)**S(3)/(S(30)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)/(d*tan(a + b*x))**(S(5)/2), x), x, -S(2)*sec(a + b*x)/(S(3)*b*d*(d*tan(a + b*x))**(S(3)/2)) - EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))*sec(a + b*x)/(S(3)*b*d**S(2)*sqrt(d*tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3)/(d*tan(a + b*x))**(S(7)/2), x), x, -S(2)*sec(a + b*x)/(S(5)*b*d*(d*tan(a + b*x))**(S(5)/2)) - S(4)*cos(a + b*x)/(S(5)*b*d**S(3)*sqrt(d*tan(a + b*x))) - S(4)*sqrt(d*tan(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))*cos(a + b*x)/(S(5)*b*d**S(4)*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)*sec(e + f*x)**(S(4)/3), x), x, (cos(e + f*x)**S(2))**(S(1)/6)*Hypergeometric2F1(S(3)/2, S(13)/6, S(5)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(3)*sec(e + f*x)**(S(1)/3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)*sec(e + f*x)**(S(2)/3), x), x, (cos(e + f*x)**S(2))**(S(5)/6)*Hypergeometric2F1(S(3)/2, S(11)/6, S(5)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(3)*sec(e + f*x)**(S(5)/3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)*sec(e + f*x)**(S(1)/3), x), x, (cos(e + f*x)**S(2))**(S(2)/3)*Hypergeometric2F1(S(3)/2, S(5)/3, S(5)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(3)*sec(e + f*x)**(S(4)/3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)/sec(e + f*x)**(S(1)/3), x), x, (cos(e + f*x)**S(2))**(S(1)/3)*Hypergeometric2F1(S(4)/3, S(3)/2, S(5)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(3)*sec(e + f*x)**(S(2)/3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)/sec(e + f*x)**(S(2)/3), x), x, (cos(e + f*x)**S(2))**(S(1)/6)*Hypergeometric2F1(S(7)/6, S(3)/2, S(5)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(3)*sec(e + f*x)**(S(1)/3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(4)*sec(e + f*x)**(S(4)/3), x), x, (cos(e + f*x)**S(2))**(S(1)/6)*Hypergeometric2F1(S(5)/2, S(19)/6, S(7)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(5)*sec(e + f*x)**(S(1)/3)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(4)*sec(e + f*x)**(S(2)/3), x), x, (cos(e + f*x)**S(2))**(S(5)/6)*Hypergeometric2F1(S(5)/2, S(17)/6, S(7)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(5)*sec(e + f*x)**(S(5)/3)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(4)*sec(e + f*x)**(S(1)/3), x), x, (cos(e + f*x)**S(2))**(S(2)/3)*Hypergeometric2F1(S(5)/2, S(8)/3, S(7)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(5)*sec(e + f*x)**(S(4)/3)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(4)/sec(e + f*x)**(S(1)/3), x), x, (cos(e + f*x)**S(2))**(S(1)/3)*Hypergeometric2F1(S(7)/3, S(5)/2, S(7)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(5)*sec(e + f*x)**(S(2)/3)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(4)/sec(e + f*x)**(S(2)/3), x), x, (cos(e + f*x)**S(2))**(S(1)/6)*Hypergeometric2F1(S(13)/6, S(5)/2, S(7)/2, sin(e + f*x)**S(2))*sin(e + f*x)**S(5)*sec(e + f*x)**(S(1)/3)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(4)/3)*tan(e + f*x)**S(2), x), x, (d*sec(e + f*x))**(S(4)/3)*(cos(e + f*x)**S(2))**(S(13)/6)*Hypergeometric2F1(S(3)/2, S(13)/6, S(5)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(2)/3)*tan(e + f*x)**S(2), x), x, (d*sec(e + f*x))**(S(2)/3)*(cos(e + f*x)**S(2))**(S(11)/6)*Hypergeometric2F1(S(3)/2, S(11)/6, S(5)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(1)/3)*tan(e + f*x)**S(2), x), x, (d*sec(e + f*x))**(S(1)/3)*(cos(e + f*x)**S(2))**(S(5)/3)*Hypergeometric2F1(S(3)/2, S(5)/3, S(5)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)/(d*sec(e + f*x))**(S(1)/3), x), x, (cos(e + f*x)**S(2))**(S(4)/3)*Hypergeometric2F1(S(4)/3, S(3)/2, S(5)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(3)/(S(3)*f*(d*sec(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(2)/(d*sec(e + f*x))**(S(2)/3), x), x, (cos(e + f*x)**S(2))**(S(7)/6)*Hypergeometric2F1(S(7)/6, S(3)/2, S(5)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(3)/(S(3)*f*(d*sec(e + f*x))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(4)/3)*tan(e + f*x)**S(4), x), x, (d*sec(e + f*x))**(S(4)/3)*(cos(e + f*x)**S(2))**(S(19)/6)*Hypergeometric2F1(S(5)/2, S(19)/6, S(7)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(5)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(2)/3)*tan(e + f*x)**S(4), x), x, (d*sec(e + f*x))**(S(2)/3)*(cos(e + f*x)**S(2))**(S(17)/6)*Hypergeometric2F1(S(5)/2, S(17)/6, S(7)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(5)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(1)/3)*tan(e + f*x)**S(4), x), x, (d*sec(e + f*x))**(S(1)/3)*(cos(e + f*x)**S(2))**(S(8)/3)*Hypergeometric2F1(S(5)/2, S(8)/3, S(7)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(5)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(4)/(d*sec(e + f*x))**(S(1)/3), x), x, (cos(e + f*x)**S(2))**(S(7)/3)*Hypergeometric2F1(S(7)/3, S(5)/2, S(7)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(5)/(S(5)*f*(d*sec(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(tan(e + f*x)**S(4)/(d*sec(e + f*x))**(S(2)/3), x), x, (cos(e + f*x)**S(2))**(S(13)/6)*Hypergeometric2F1(S(13)/6, S(5)/2, S(7)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(5)/(S(5)*f*(d*sec(e + f*x))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(5)/2), x), x, -sqrt(b)*d**S(3)*sqrt(b*tan(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(S(4)*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) + sqrt(b)*d**S(3)*sqrt(b*tan(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(S(4)*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) + d**S(2)*(b*tan(e + f*x))**(S(3)/2)*sqrt(d*sec(e + f*x))/(S(2)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(3)/2), x), x, -d**S(2)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))) + d**S(2)*(b*tan(e + f*x))**(S(3)/2)/(b*f*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(e + f*x))*sqrt(d*sec(e + f*x)), x), x, -sqrt(b)*d*sqrt(b*tan(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) + sqrt(b)*d*sqrt(b*tan(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(e + f*x))/sqrt(d*sec(e + f*x)), x), x, S(2)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(e + f*x))/(d*sec(e + f*x))**(S(3)/2), x), x, S(2)*(b*tan(e + f*x))**(S(3)/2)/(S(3)*b*f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(e + f*x))/(d*sec(e + f*x))**(S(5)/2), x), x, S(4)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*d**S(2)*f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))) + S(2)*(b*tan(e + f*x))**(S(3)/2)/(S(5)*b*f*(d*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(e + f*x))/(d*sec(e + f*x))**(S(7)/2), x), x, S(2)*(b*tan(e + f*x))**(S(3)/2)/(S(7)*b*f*(d*sec(e + f*x))**(S(7)/2)) + S(8)*(b*tan(e + f*x))**(S(3)/2)/(S(21)*b*d**S(2)*f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*tan(e + f*x))/(d*sec(e + f*x))**(S(9)/2), x), x, S(8)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(15)*d**S(4)*f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))) + S(2)*(b*tan(e + f*x))**(S(3)/2)/(S(9)*b*f*(d*sec(e + f*x))**(S(9)/2)) + S(4)*(b*tan(e + f*x))**(S(3)/2)/(S(15)*b*d**S(2)*f*(d*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(5)/2), x), x, -b**S(2)*d**S(2)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(6)*f*sqrt(b*tan(e + f*x))) - b*d**S(2)*sqrt(b*tan(e + f*x))*sqrt(d*sec(e + f*x))/(S(6)*f) + b*sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(5)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(3)/2), x), x, -b**(S(3)/2)*d*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(S(4)*f*sqrt(b*tan(e + f*x))) - b**(S(3)/2)*d*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(S(4)*f*sqrt(b*tan(e + f*x))) + b*sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(3)/2)/(S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(3)/2)*sqrt(d*sec(e + f*x)), x), x, -b**S(2)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(f*sqrt(b*tan(e + f*x))) + b*sqrt(b*tan(e + f*x))*sqrt(d*sec(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(3)/2)/sqrt(d*sec(e + f*x)), x), x, b**(S(3)/2)*d*(b*tan(e + f*x))**(S(3)/2)*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(f*(b*sin(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(3)/2)) + b**(S(3)/2)*d*(b*tan(e + f*x))**(S(3)/2)*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(f*(b*sin(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(3)/2)) - S(2)*d*(b*tan(e + f*x))**(S(3)/2)*csc(e + f*x)/(f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(3)/2)/(d*sec(e + f*x))**(S(3)/2), x), x, S(2)*b**S(2)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*d**S(2)*f*sqrt(b*tan(e + f*x))) - S(2)*b*sqrt(b*tan(e + f*x))/(S(3)*f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(3)/2)/(d*sec(e + f*x))**(S(5)/2), x), x, S(2)*(b*tan(e + f*x))**(S(5)/2)/(S(5)*b*f*(d*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(3)/2)/(d*sec(e + f*x))**(S(7)/2), x), x, S(4)*b**S(2)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(21)*d**S(4)*f*sqrt(b*tan(e + f*x))) - S(2)*b*sqrt(b*tan(e + f*x))/(S(7)*f*(d*sec(e + f*x))**(S(7)/2)) + S(2)*b*sqrt(b*tan(e + f*x))/(S(21)*d**S(2)*f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(3)/2)/(d*sec(e + f*x))**(S(9)/2), x), x, -S(2)*b*sqrt(b*tan(e + f*x))/(S(9)*f*(d*sec(e + f*x))**(S(9)/2)) + S(2)*b*sqrt(b*tan(e + f*x))/(S(45)*d**S(2)*f*(d*sec(e + f*x))**(S(5)/2)) + S(8)*b*sqrt(b*tan(e + f*x))/(S(45)*d**S(4)*f*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(5)/2)*(d*sec(e + f*x))**(S(5)/2), x), x, S(3)*b**(S(5)/2)*d**S(3)*sqrt(b*tan(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(S(32)*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) - S(3)*b**(S(5)/2)*d**S(3)*sqrt(b*tan(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(S(32)*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) - S(3)*b*d**S(2)*(b*tan(e + f*x))**(S(3)/2)*sqrt(d*sec(e + f*x))/(S(16)*f) + b*(b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(5)/2)/(S(4)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(5)/2)*(d*sec(e + f*x))**(S(3)/2), x), x, b**S(2)*d**S(2)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(2)*f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))) - b*d**S(2)*(b*tan(e + f*x))**(S(3)/2)/(S(2)*f*sqrt(d*sec(e + f*x))) + b*(b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(3)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(5)/2)*sqrt(d*sec(e + f*x)), x), x, S(3)*b**(S(5)/2)*d*sqrt(b*tan(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(S(4)*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) - S(3)*b**(S(5)/2)*d*sqrt(b*tan(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(S(4)*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) + b*(b*tan(e + f*x))**(S(3)/2)*sqrt(d*sec(e + f*x))/(S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(5)/2)/sqrt(d*sec(e + f*x)), x), x, -S(3)*b**S(2)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))) + b*(b*tan(e + f*x))**(S(3)/2)/(f*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(5)/2)/(d*sec(e + f*x))**(S(3)/2), x), x, -b**(S(5)/2)*sqrt(b*tan(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(d*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) + b**(S(5)/2)*sqrt(b*tan(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(d*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) - S(2)*b*(b*tan(e + f*x))**(S(3)/2)/(S(3)*f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(5)/2)/(d*sec(e + f*x))**(S(5)/2), x), x, S(6)*b**S(2)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*d**S(2)*f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))) - S(2)*b*(b*tan(e + f*x))**(S(3)/2)/(S(5)*f*(d*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(5)/2)/(d*sec(e + f*x))**(S(7)/2), x), x, S(2)*(b*tan(e + f*x))**(S(7)/2)/(S(7)*b*f*(d*sec(e + f*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*tan(e + f*x))**(S(5)/2)/(d*sec(e + f*x))**(S(9)/2), x), x, S(4)*b**S(2)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(15)*d**S(4)*f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))) - S(2)*b*(b*tan(e + f*x))**(S(3)/2)/(S(9)*f*(d*sec(e + f*x))**(S(9)/2)) + S(2)*b*(b*tan(e + f*x))**(S(3)/2)/(S(15)*d**S(2)*f*(d*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(7)/2)/sqrt(b*tan(e + f*x)), x), x, d**S(2)*sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(3)/2)/(S(2)*b*f) + S(3)*d**S(3)*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(S(4)*sqrt(b)*f*sqrt(b*tan(e + f*x))) + S(3)*d**S(3)*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(S(4)*sqrt(b)*f*sqrt(b*tan(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(5)/2)/sqrt(b*tan(e + f*x)), x), x, d**S(2)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(f*sqrt(b*tan(e + f*x))) + d**S(2)*sqrt(b*tan(e + f*x))*sqrt(d*sec(e + f*x))/(b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(3)/2)/sqrt(b*tan(e + f*x)), x), x, d*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(sqrt(b)*f*sqrt(b*tan(e + f*x))) + d*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(sqrt(b)*f*sqrt(b*tan(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*sec(e + f*x))/sqrt(b*tan(e + f*x)), x), x, S(2)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(f*sqrt(b*tan(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*tan(e + f*x))*sqrt(d*sec(e + f*x))), x), x, S(2)*sqrt(b*tan(e + f*x))/(b*f*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(3)/2)), x), x, S(4)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*d**S(2)*f*sqrt(b*tan(e + f*x))) + S(2)*sqrt(b*tan(e + f*x))/(S(3)*b*f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(5)/2)), x), x, S(2)*sqrt(b*tan(e + f*x))/(S(5)*b*f*(d*sec(e + f*x))**(S(5)/2)) + S(8)*sqrt(b*tan(e + f*x))/(S(5)*b*d**S(2)*f*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(5)/2)/(b*tan(e + f*x))**(S(3)/2), x), x, -S(2)*d**S(2)*sqrt(d*sec(e + f*x))/(b*f*sqrt(b*tan(e + f*x))) - d**S(3)*sqrt(b*tan(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(b**(S(3)/2)*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))) + d**S(3)*sqrt(b*tan(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(b**(S(3)/2)*f*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(3)/2)/(b*tan(e + f*x))**(S(3)/2), x), x, -S(2)*d**S(2)/(b*f*sqrt(b*tan(e + f*x))*sqrt(d*sec(e + f*x))) - S(2)*d**S(2)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(b**S(2)*f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*sec(e + f*x))/(b*tan(e + f*x))**(S(3)/2), x), x, -S(2)*sqrt(d*sec(e + f*x))/(b*f*sqrt(b*tan(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*tan(e + f*x))**(S(3)/2)*sqrt(d*sec(e + f*x))), x), x, -S(2)/(b*f*sqrt(b*tan(e + f*x))*sqrt(d*sec(e + f*x))) - S(4)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(b**S(2)*f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(3)/2)), x), x, S(2)/(S(3)*b*f*sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(3)/2)) - S(8)*sqrt(d*sec(e + f*x))/(S(3)*b*d**S(2)*f*sqrt(b*tan(e + f*x))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/((b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(3)/2)), x), x, -S(2)/(b*f*sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(3)/2)) - S(8)*(b*tan(e + f*x))**(S(3)/2)/(S(3)*b**S(3)*f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(5)/2)), x), x, -S(2)/(b*f*sqrt(b*tan(e + f*x))*(d*sec(e + f*x))**(S(5)/2)) - S(24)*sqrt(b*tan(e + f*x))*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*b**S(2)*d**S(2)*f*sqrt(d*sec(e + f*x))*sqrt(sin(e + f*x))) - S(12)*(b*tan(e + f*x))**(S(3)/2)/(S(5)*b**S(3)*f*(d*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(7)/2)/(b*tan(e + f*x))**(S(5)/2), x), x, -S(2)*d**S(2)*(d*sec(e + f*x))**(S(3)/2)/(S(3)*b*f*(b*tan(e + f*x))**(S(3)/2)) + d**S(3)*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))*ArcTan(sqrt(b*sin(e + f*x))/sqrt(b))/(b**(S(5)/2)*f*sqrt(b*tan(e + f*x))) + d**S(3)*sqrt(b*sin(e + f*x))*sqrt(d*sec(e + f*x))*atanh(sqrt(b*sin(e + f*x))/sqrt(b))/(b**(S(5)/2)*f*sqrt(b*tan(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(5)/2)/(b*tan(e + f*x))**(S(5)/2), x), x, -S(2)*d**S(2)*sqrt(d*sec(e + f*x))/(S(3)*b*f*(b*tan(e + f*x))**(S(3)/2)) + S(2)*d**S(2)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*b**S(2)*f*sqrt(b*tan(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(e + f*x))**(S(3)/2)/(b*tan(e + f*x))**(S(5)/2), x), x, -S(2)*(d*sec(e + f*x))**(S(3)/2)/(S(3)*b*f*(b*tan(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*sec(e + f*x))/(b*tan(e + f*x))**(S(5)/2), x), x, -S(2)*sqrt(d*sec(e + f*x))/(S(3)*b*f*(b*tan(e + f*x))**(S(3)/2)) - S(4)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*b**S(2)*f*sqrt(b*tan(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*tan(e + f*x))**(S(5)/2)*sqrt(d*sec(e + f*x))), x), x, -S(2)/(S(3)*b*f*(b*tan(e + f*x))**(S(3)/2)*sqrt(d*sec(e + f*x))) - S(8)*sqrt(b*tan(e + f*x))/(S(3)*b**S(3)*f*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*tan(e + f*x))**(S(5)/2)*(d*sec(e + f*x))**(S(3)/2)), x), x, -S(2)/(S(3)*b*f*(b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(3)/2)) - S(8)*sqrt(d*sec(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*b**S(2)*d**S(2)*f*sqrt(b*tan(e + f*x))) - S(4)*sqrt(b*tan(e + f*x))/(S(3)*b**S(3)*f*(d*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*tan(e + f*x))**(S(5)/2)*(d*sec(e + f*x))**(S(5)/2)), x), x, -S(2)/(S(3)*b*f*(b*tan(e + f*x))**(S(3)/2)*(d*sec(e + f*x))**(S(5)/2)) - S(16)*sqrt(b*tan(e + f*x))/(S(15)*b**S(3)*f*(d*sec(e + f*x))**(S(5)/2)) - S(64)*sqrt(b*tan(e + f*x))/(S(15)*b**S(3)*d**S(2)*f*sqrt(d*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(4)/3)*sqrt(d*tan(e + f*x)), x), x, S(2)*(b*sec(e + f*x))**(S(4)/3)*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(17)/12)*Hypergeometric2F1(S(3)/4, S(17)/12, S(7)/4, sin(e + f*x)**S(2))/(S(3)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(1)/3)*sqrt(d*tan(e + f*x)), x), x, S(2)*(b*sec(e + f*x))**(S(1)/3)*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(11)/12)*Hypergeometric2F1(S(3)/4, S(11)/12, S(7)/4, sin(e + f*x)**S(2))/(S(3)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))/(b*sec(e + f*x))**(S(1)/3), x), x, S(2)*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(7)/12)*Hypergeometric2F1(S(7)/12, S(3)/4, S(7)/4, sin(e + f*x)**S(2))/(S(3)*d*f*(b*sec(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*tan(e + f*x))/(b*sec(e + f*x))**(S(4)/3), x), x, S(2)*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(1)/12)*Hypergeometric2F1(S(1)/12, S(3)/4, S(7)/4, sin(e + f*x)**S(2))/(S(3)*d*f*(b*sec(e + f*x))**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(4)/3)*(d*tan(e + f*x))**(S(3)/2), x), x, S(2)*(b*sec(e + f*x))**(S(4)/3)*(d*tan(e + f*x))**(S(5)/2)*(cos(e + f*x)**S(2))**(S(23)/12)*Hypergeometric2F1(S(5)/4, S(23)/12, S(9)/4, sin(e + f*x)**S(2))/(S(5)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(1)/3)*(d*tan(e + f*x))**(S(3)/2), x), x, S(2)*(b*sec(e + f*x))**(S(1)/3)*(d*tan(e + f*x))**(S(5)/2)*(cos(e + f*x)**S(2))**(S(17)/12)*Hypergeometric2F1(S(5)/4, S(17)/12, S(9)/4, sin(e + f*x)**S(2))/(S(5)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(3)/2)/(b*sec(e + f*x))**(S(1)/3), x), x, S(2)*(d*tan(e + f*x))**(S(5)/2)*(cos(e + f*x)**S(2))**(S(13)/12)*Hypergeometric2F1(S(13)/12, S(5)/4, S(9)/4, sin(e + f*x)**S(2))/(S(5)*d*f*(b*sec(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(e + f*x))**(S(3)/2)/(b*sec(e + f*x))**(S(4)/3), x), x, S(2)*(d*tan(e + f*x))**(S(5)/2)*(cos(e + f*x)**S(2))**(S(7)/12)*Hypergeometric2F1(S(7)/12, S(5)/4, S(9)/4, sin(e + f*x)**S(2))/(S(5)*d*f*(b*sec(e + f*x))**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*(d*tan(e + f*x))**(S(4)/3), x), x, S(3)*sqrt(b*sec(e + f*x))*(d*tan(e + f*x))**(S(7)/3)*(cos(e + f*x)**S(2))**(S(17)/12)*Hypergeometric2F1(S(7)/6, S(17)/12, S(13)/6, sin(e + f*x)**S(2))/(S(7)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*(d*tan(e + f*x))**(S(1)/3), x), x, S(3)*sqrt(b*sec(e + f*x))*(d*tan(e + f*x))**(S(4)/3)*(cos(e + f*x)**S(2))**(S(11)/12)*Hypergeometric2F1(S(2)/3, S(11)/12, S(5)/3, sin(e + f*x)**S(2))/(S(4)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))/(d*tan(e + f*x))**(S(1)/3), x), x, S(3)*sqrt(b*sec(e + f*x))*(d*tan(e + f*x))**(S(2)/3)*(cos(e + f*x)**S(2))**(S(7)/12)*Hypergeometric2F1(S(1)/3, S(7)/12, S(4)/3, sin(e + f*x)**S(2))/(S(2)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))/(d*tan(e + f*x))**(S(4)/3), x), x, -S(3)*sqrt(b*sec(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/12)*Hypergeometric2F1(S(-1)/6, S(1)/12, S(5)/6, sin(e + f*x)**S(2))/(d*f*(d*tan(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(4)/3), x), x, S(3)*(b*sec(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(7)/3)*(cos(e + f*x)**S(2))**(S(23)/12)*Hypergeometric2F1(S(7)/6, S(23)/12, S(13)/6, sin(e + f*x)**S(2))/(S(7)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(1)/3), x), x, S(3)*(b*sec(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(4)/3)*(cos(e + f*x)**S(2))**(S(17)/12)*Hypergeometric2F1(S(2)/3, S(17)/12, S(5)/3, sin(e + f*x)**S(2))/(S(4)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)/(d*tan(e + f*x))**(S(1)/3), x), x, S(3)*(b*sec(e + f*x))**(S(3)/2)*(d*tan(e + f*x))**(S(2)/3)*(cos(e + f*x)**S(2))**(S(13)/12)*Hypergeometric2F1(S(1)/3, S(13)/12, S(4)/3, sin(e + f*x)**S(2))/(S(2)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)/(d*tan(e + f*x))**(S(4)/3), x), x, -S(3)*(b*sec(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(7)/12)*Hypergeometric2F1(S(-1)/6, S(7)/12, S(5)/6, sin(e + f*x)**S(2))/(d*f*(d*tan(e + f*x))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*tan(e + f*x)**S(5), x), x, (b*sec(e + f*x))**m/(f*m) - S(2)*(b*sec(e + f*x))**(m + S(2))/(b**S(2)*f*(m + S(2))) + (b*sec(e + f*x))**(m + S(4))/(b**S(4)*f*(m + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*tan(e + f*x)**S(3), x), x, -(b*sec(e + f*x))**m/(f*m) + (b*sec(e + f*x))**(m + S(2))/(b**S(2)*f*(m + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*tan(e + f*x), x), x, (b*sec(e + f*x))**m/(f*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*cot(e + f*x), x), x, -(b*sec(e + f*x))**m*Hypergeometric2F1(S(1), m/S(2), m/S(2) + S(1), sec(e + f*x)**S(2))/(f*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*cot(e + f*x)**S(3), x), x, (b*sec(e + f*x))**m*Hypergeometric2F1(S(2), m/S(2), m/S(2) + S(1), sec(e + f*x)**S(2))/(f*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*cot(e + f*x)**S(5), x), x, -(b*sec(e + f*x))**m*Hypergeometric2F1(S(3), m/S(2), m/S(2) + S(1), sec(e + f*x)**S(2))/(f*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*tan(e + f*x)**S(4), x), x, (b*sec(e + f*x))**m*(cos(e + f*x)**S(2))**(m/S(2) + S(5)/2)*Hypergeometric2F1(S(5)/2, m/S(2) + S(5)/2, S(7)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(5)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*tan(e + f*x)**S(2), x), x, (b*sec(e + f*x))**m*(cos(e + f*x)**S(2))**(m/S(2) + S(3)/2)*Hypergeometric2F1(S(3)/2, m/S(2) + S(3)/2, S(5)/2, sin(e + f*x)**S(2))*tan(e + f*x)**S(3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*cot(e + f*x)**S(2), x), x, -(b*sec(e + f*x))**m*(cos(e + f*x)**S(2))**(m/S(2) + S(-1)/2)*Hypergeometric2F1(S(-1)/2, m/S(2) + S(-1)/2, S(1)/2, sin(e + f*x)**S(2))*cot(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*cot(e + f*x)**S(4), x), x, -(b*sec(e + f*x))**m*(cos(e + f*x)**S(2))**(m/S(2) + S(-3)/2)*Hypergeometric2F1(S(-3)/2, m/S(2) + S(-3)/2, S(-1)/2, sin(e + f*x)**S(2))*cot(e + f*x)**S(3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**m*cot(e + f*x)**S(6), x), x, -(b*sec(e + f*x))**m*(cos(e + f*x)**S(2))**(m/S(2) + S(-5)/2)*Hypergeometric2F1(S(-5)/2, m/S(2) + S(-5)/2, S(-3)/2, sin(e + f*x)**S(2))*cot(e + f*x)**S(5)/(S(5)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(e + f*x))**m*(b*tan(e + f*x))**n, x), x, (a*sec(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))*(cos(e + f*x)**S(2))**(m/S(2) + n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(1)/2, m/S(2) + n/S(2) + S(1)/2, n/S(2) + S(3)/2, sin(e + f*x)**S(2))/(b*f*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*sec(a + b*x)**S(6), x), x, (d*tan(a + b*x))**(n + S(1))/(b*d*(n + S(1))) + S(2)*(d*tan(a + b*x))**(n + S(3))/(b*d**S(3)*(n + S(3))) + (d*tan(a + b*x))**(n + S(5))/(b*d**S(5)*(n + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*sec(a + b*x)**S(4), x), x, (d*tan(a + b*x))**(n + S(1))/(b*d*(n + S(1))) + (d*tan(a + b*x))**(n + S(3))/(b*d**S(3)*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*sec(a + b*x)**S(2), x), x, (d*tan(a + b*x))**(n + S(1))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n, x), x, (d*tan(a + b*x))**(n + S(1))*Hypergeometric2F1(S(1), n/S(2) + S(1)/2, n/S(2) + S(3)/2, -tan(a + b*x)**S(2))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*cos(a + b*x)**S(2), x), x, (d*tan(a + b*x))**(n + S(1))*Hypergeometric2F1(S(2), n/S(2) + S(1)/2, n/S(2) + S(3)/2, -tan(a + b*x)**S(2))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*cos(a + b*x)**S(4), x), x, (d*tan(a + b*x))**(n + S(1))*Hypergeometric2F1(S(3), n/S(2) + S(1)/2, n/S(2) + S(3)/2, -tan(a + b*x)**S(2))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*sec(a + b*x)**S(5), x), x, (d*tan(a + b*x))**(n + S(1))*(cos(a + b*x)**S(2))**(n/S(2) + S(3))*Hypergeometric2F1(n/S(2) + S(1)/2, n/S(2) + S(3), n/S(2) + S(3)/2, sin(a + b*x)**S(2))*sec(a + b*x)**S(5)/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*sec(a + b*x)**S(3), x), x, (d*tan(a + b*x))**(n + S(1))*(cos(a + b*x)**S(2))**(n/S(2) + S(2))*Hypergeometric2F1(n/S(2) + S(1)/2, n/S(2) + S(2), n/S(2) + S(3)/2, sin(a + b*x)**S(2))*sec(a + b*x)**S(3)/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*sec(a + b*x), x), x, (d*tan(a + b*x))**(n + S(1))*(cos(a + b*x)**S(2))**(n/S(2) + S(1))*Hypergeometric2F1(n/S(2) + S(1)/2, n/S(2) + S(1), n/S(2) + S(3)/2, sin(a + b*x)**S(2))*sec(a + b*x)/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*cos(a + b*x), x), x, (d*tan(a + b*x))**(n + S(1))*(cos(a + b*x)**S(2))**(n/S(2))*Hypergeometric2F1(n/S(2), n/S(2) + S(1)/2, n/S(2) + S(3)/2, sin(a + b*x)**S(2))*cos(a + b*x)/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*tan(a + b*x))**n*cos(a + b*x)**S(3), x), x, (d*tan(a + b*x))**(n + S(1))*(cos(a + b*x)**S(2))**(n/S(2) + S(-1))*Hypergeometric2F1(n/S(2) + S(-1), n/S(2) + S(1)/2, n/S(2) + S(3)/2, sin(a + b*x)**S(2))*cos(a + b*x)**S(3)/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((b*csc(e + f*x))**m*tan(e + f*x)**S(3), x), x, -(b*csc(e + f*x))**m*Hypergeometric2F1(S(2), m/S(2), m/S(2) + S(1), csc(e + f*x)**S(2))/(f*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*csc(e + f*x))**m*(d*tan(e + f*x))**(S(3)/2), x), x, (b*csc(e + f*x))**m*(d*tan(e + f*x))**(S(5)/2)*(cos(e + f*x)**S(2))**(S(5)/4)*Hypergeometric2F1(S(5)/4, -m/S(2) + S(5)/4, -m/S(2) + S(9)/4, sin(e + f*x)**S(2))/(d*f*(-m + S(5)/2)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((b*csc(e + f*x))**m*(d*tan(e + f*x))**(S(3)/2), x), x, S(2)*d*(b*csc(e + f*x))**m*sqrt(d*tan(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/4, -m/S(2) + S(5)/4, -m/S(2) + S(9)/4, sin(e + f*x)**S(2))*sin(e + f*x)**S(2)/(f*(-S(2)*m + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*csc(e + f*x))**m*sqrt(d*tan(e + f*x)), x), x, S(2)*(b*csc(e + f*x))**m*(d*tan(e + f*x))**(S(3)/2)*(cos(e + f*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(3)/4, -m/S(2) + S(3)/4, -m/S(2) + S(7)/4, sin(e + f*x)**S(2))/(d*f*(-S(2)*m + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*csc(e + f*x))**m/sqrt(d*tan(e + f*x)), x), x, S(2)*(b*csc(e + f*x))**m*sqrt(d*tan(e + f*x))*(cos(e + f*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(1)/4, -m/S(2) + S(1)/4, -m/S(2) + S(5)/4, sin(e + f*x)**S(2))/(d*f*(-S(2)*m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*csc(e + f*x))**m/(d*tan(e + f*x))**(S(3)/2), x), x, -S(2)*(b*csc(e + f*x))**m*Hypergeometric2F1(S(-1)/4, -m/S(2) + S(-1)/4, -m/S(2) + S(3)/4, sin(e + f*x)**S(2))/(d*f*sqrt(d*tan(e + f*x))*(S(2)*m + S(1))*(cos(e + f*x)**S(2))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*csc(e + f*x))**m*(b*tan(e + f*x))**n, x), x, (a*csc(e + f*x))**m*(b*tan(e + f*x))**(n + S(1))*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(n/S(2) + S(1)/2, -m/S(2) + n/S(2) + S(1)/2, -m/S(2) + n/S(2) + S(3)/2, sin(e + f*x)**S(2))/(b*f*(-m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-tan(e + f*x)**S(2))**n*sin(e + f*x), x), x, -Hypergeometric2F1(S(-1)/2, -n, S(1)/2, sec(e + f*x)**S(2))*cos(e + f*x)/f, expand=True, _diff=True, _numerical=True)
f31b8ef807f1912adf6429b9af9ddd8017602327e330c801724828401b634131
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.rubi import rubi_integrate from sympy.functions import log, sqrt, exp, cos, sin, tan, sec, csc, cot from sympy.functions.elementary.hyperbolic import atanh, asinh, acosh from sympy.functions.elementary.hyperbolic import atanh as arctanh from sympy.functions.elementary.hyperbolic import asinh as arcsinh from sympy.functions.elementary.hyperbolic import acosh as arccosh from sympy.functions.elementary.trigonometric import atan, asin, acos from sympy.functions.elementary.trigonometric import atan as arctan from sympy.functions.elementary.trigonometric import asin as arcsin from sympy.functions.elementary.trigonometric import acos as arccos from sympy.integrals.rubi.utility_function import (EllipticE, EllipticF, hypergeom, rubi_test, AppellF1, EllipticPi, Log, Sqrt, ArcTan, ArcTanh, ArcSin, Hypergeometric2F1) from sympy.core.mod import Mod from sympy.core.numbers import (I, pi as Pi) from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import exp_polar from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.special.elliptic_integrals import (elliptic_e, elliptic_f, elliptic_pi as Pi) from sympy.functions.special.hyper import hyper from sympy.simplify.simplify import simplify from sympy.testing.pytest import SKIP a, b, c, d, e, f, m, n, x, u , k, p, j, l , i= symbols('a b c d e f m n x u k p j l i1') A, B, C, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C a b c d e f g h y z m n p q u v w F', real=True, imaginary=False) def test_1(): assert rubi_test(rubi_integrate(x**m*(b*x**S(2) + c*x**S(4)), x), x, b*x**(m + S(3))/(m + S(3)) + c*x**(m + S(5))/(m + S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b*x**S(2) + c*x**S(4)), x), x, b*x**S(5)/S(5) + c*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b*x**S(2) + c*x**S(4)), x), x, b*x**S(4)/S(4) + c*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(b*x**S(2) + c*x**S(4), x), x, b*x**S(3)/S(3) + c*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x, x), x, b*x**S(2)/S(2) + c*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**S(2), x), x, b*x + c*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**S(3), x), x, b*log(x) + c*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**S(4), x), x, -b/x + c*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**S(5), x), x, -b/(S(2)*x**S(2)) + c*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**S(6), x), x, -b/(S(3)*x**S(3)) - c/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**S(7), x), x, -b/(S(4)*x**S(4)) - c/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**S(8), x), x, -b/(S(5)*x**S(5)) - c/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(b*x**S(2) + c*x**S(4))**S(2), x), x, b**S(2)*x**(m + S(5))/(m + S(5)) + S(2)*b*c*x**(m + S(7))/(m + S(7)) + c**S(2)*x**(m + S(9))/(m + S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2), x), x, b**S(2)*x**S(5)/S(5) + S(2)*b*c*x**S(7)/S(7) + c**S(2)*x**S(9)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x, x), x, b**S(2)*x**S(4)/S(4) + b*c*x**S(6)/S(3) + c**S(2)*x**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(2), x), x, b**S(2)*x**S(3)/S(3) + S(2)*b*c*x**S(5)/S(5) + c**S(2)*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(3), x), x, (b + c*x**S(2))**S(3)/(S(6)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(4), x), x, b**S(2)*x + S(2)*b*c*x**S(3)/S(3) + c**S(2)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(5), x), x, b**S(2)*log(x) + b*c*x**S(2) + c**S(2)*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(6), x), x, -b**S(2)/x + S(2)*b*c*x + c**S(2)*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(7), x), x, -b**S(2)/(S(2)*x**S(2)) + S(2)*b*c*log(x) + c**S(2)*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(8), x), x, -b**S(2)/(S(3)*x**S(3)) - S(2)*b*c/x + c**S(2)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(9), x), x, -b**S(2)/(S(4)*x**S(4)) - b*c/x**S(2) + c**S(2)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(10), x), x, -b**S(2)/(S(5)*x**S(5)) - S(2)*b*c/(S(3)*x**S(3)) - c**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(11), x), x, -(b + c*x**S(2))**S(3)/(S(6)*b*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**S(12), x), x, -b**S(2)/(S(7)*x**S(7)) - S(2)*b*c/(S(5)*x**S(5)) - c**S(2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(b*x**S(2) + c*x**S(4))**S(3), x), x, b**S(3)*x**(m + S(7))/(m + S(7)) + S(3)*b**S(2)*c*x**(m + S(9))/(m + S(9)) + S(3)*b*c**S(2)*x**(m + S(11))/(m + S(11)) + c**S(3)*x**(m + S(13))/(m + S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(2), x), x, b**S(3)*x**S(5)/S(5) + S(3)*b**S(2)*c*x**S(7)/S(7) + b*c**S(2)*x**S(9)/S(3) + c**S(3)*x**S(11)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(3), x), x, -b*(b + c*x**S(2))**S(4)/(S(8)*c**S(2)) + (b + c*x**S(2))**S(5)/(S(10)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(4), x), x, b**S(3)*x**S(3)/S(3) + S(3)*b**S(2)*c*x**S(5)/S(5) + S(3)*b*c**S(2)*x**S(7)/S(7) + c**S(3)*x**S(9)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(5), x), x, (b + c*x**S(2))**S(4)/(S(8)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(6), x), x, b**S(3)*x + b**S(2)*c*x**S(3) + S(3)*b*c**S(2)*x**S(5)/S(5) + c**S(3)*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(7), x), x, b**S(3)*log(x) + S(3)*b**S(2)*c*x**S(2)/S(2) + S(3)*b*c**S(2)*x**S(4)/S(4) + c**S(3)*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(8), x), x, -b**S(3)/x + S(3)*b**S(2)*c*x + b*c**S(2)*x**S(3) + c**S(3)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(9), x), x, -b**S(3)/(S(2)*x**S(2)) + S(3)*b**S(2)*c*log(x) + S(3)*b*c**S(2)*x**S(2)/S(2) + c**S(3)*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(10), x), x, -b**S(3)/(S(3)*x**S(3)) - S(3)*b**S(2)*c/x + S(3)*b*c**S(2)*x + c**S(3)*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(11), x), x, -b**S(3)/(S(4)*x**S(4)) - S(3)*b**S(2)*c/(S(2)*x**S(2)) + S(3)*b*c**S(2)*log(x) + c**S(3)*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(12), x), x, -b**S(3)/(S(5)*x**S(5)) - b**S(2)*c/x**S(3) - S(3)*b*c**S(2)/x + c**S(3)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(13), x), x, -b**S(3)/(S(6)*x**S(6)) - S(3)*b**S(2)*c/(S(4)*x**S(4)) - S(3)*b*c**S(2)/(S(2)*x**S(2)) + c**S(3)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(14), x), x, -b**S(3)/(S(7)*x**S(7)) - S(3)*b**S(2)*c/(S(5)*x**S(5)) - b*c**S(2)/x**S(3) - c**S(3)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(15), x), x, -(b + c*x**S(2))**S(4)/(S(8)*b*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(16), x), x, -b**S(3)/(S(9)*x**S(9)) - S(3)*b**S(2)*c/(S(7)*x**S(7)) - S(3)*b*c**S(2)/(S(5)*x**S(5)) - c**S(3)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**S(17), x), x, -b**S(3)/(S(10)*x**S(10)) - S(3)*b**S(2)*c/(S(8)*x**S(8)) - b*c**S(2)/(S(2)*x**S(6)) - c**S(3)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(b*x**S(2) + c*x**S(4)), x), x, b**(S(7)/2)*atan(sqrt(c)*x/sqrt(b))/c**(S(9)/2) - b**S(3)*x/c**S(4) + b**S(2)*x**S(3)/(S(3)*c**S(3)) - b*x**S(5)/(S(5)*c**S(2)) + x**S(7)/(S(7)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(b*x**S(2) + c*x**S(4)), x), x, -b**S(3)*log(b + c*x**S(2))/(S(2)*c**S(4)) + b**S(2)*x**S(2)/(S(2)*c**S(3)) - b*x**S(4)/(S(4)*c**S(2)) + x**S(6)/(S(6)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(b*x**S(2) + c*x**S(4)), x), x, -b**(S(5)/2)*atan(sqrt(c)*x/sqrt(b))/c**(S(7)/2) + b**S(2)*x/c**S(3) - b*x**S(3)/(S(3)*c**S(2)) + x**S(5)/(S(5)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(b*x**S(2) + c*x**S(4)), x), x, b**S(2)*log(b + c*x**S(2))/(S(2)*c**S(3)) - b*x**S(2)/(S(2)*c**S(2)) + x**S(4)/(S(4)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(b*x**S(2) + c*x**S(4)), x), x, b**(S(3)/2)*atan(sqrt(c)*x/sqrt(b))/c**(S(5)/2) - b*x/c**S(2) + x**S(3)/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(b*x**S(2) + c*x**S(4)), x), x, -b*log(b + c*x**S(2))/(S(2)*c**S(2)) + x**S(2)/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(b*x**S(2) + c*x**S(4)), x), x, -sqrt(b)*atan(sqrt(c)*x/sqrt(b))/c**(S(3)/2) + x/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(b*x**S(2) + c*x**S(4)), x), x, log(b + c*x**S(2))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(b*x**S(2) + c*x**S(4)), x), x, atan(sqrt(c)*x/sqrt(b))/(sqrt(b)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(b*x**S(2) + c*x**S(4)), x), x, log(x)/b - log(b + c*x**S(2))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(b*x**S(2) + c*x**S(4)), x), x, -S(1)/(b*x) - sqrt(c)*atan(sqrt(c)*x/sqrt(b))/b**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(2)*b*x**S(2)) - c*log(x)/b**S(2) + c*log(b + c*x**S(2))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(3)*b*x**S(3)) + c/(b**S(2)*x) + c**(S(3)/2)*atan(sqrt(c)*x/sqrt(b))/b**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(4)*b*x**S(4)) + c/(S(2)*b**S(2)*x**S(2)) + c**S(2)*log(x)/b**S(3) - c**S(2)*log(b + c*x**S(2))/(S(2)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(5)*b*x**S(5)) + c/(S(3)*b**S(2)*x**S(3)) - c**S(2)/(b**S(3)*x) - c**(S(5)/2)*atan(sqrt(c)*x/sqrt(b))/b**(S(7)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(6)*b*x**S(6)) + c/(S(4)*b**S(2)*x**S(4)) - c**S(2)/(S(2)*b**S(3)*x**S(2)) - c**S(3)*log(x)/b**S(4) + c**S(3)*log(b + c*x**S(2))/(S(2)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(12)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -S(7)*b**(S(5)/2)*atan(sqrt(c)*x/sqrt(b))/(S(2)*c**(S(9)/2)) + S(7)*b**S(2)*x/(S(2)*c**S(4)) - S(7)*b*x**S(3)/(S(6)*c**S(3)) - x**S(7)/(S(2)*c*(b + c*x**S(2))) + S(7)*x**S(5)/(S(10)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(b*x**S(2) + c*x**S(4))**S(2), x), x, b**S(3)/(S(2)*c**S(4)*(b + c*x**S(2))) + S(3)*b**S(2)*log(b + c*x**S(2))/(S(2)*c**S(4)) - b*x**S(2)/c**S(3) + x**S(4)/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(b*x**S(2) + c*x**S(4))**S(2), x), x, S(5)*b**(S(3)/2)*atan(sqrt(c)*x/sqrt(b))/(S(2)*c**(S(7)/2)) - S(5)*b*x/(S(2)*c**S(3)) - x**S(5)/(S(2)*c*(b + c*x**S(2))) + S(5)*x**S(3)/(S(6)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -b**S(2)/(S(2)*c**S(3)*(b + c*x**S(2))) - b*log(b + c*x**S(2))/c**S(3) + x**S(2)/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -S(3)*sqrt(b)*atan(sqrt(c)*x/sqrt(b))/(S(2)*c**(S(5)/2)) - x**S(3)/(S(2)*c*(b + c*x**S(2))) + S(3)*x/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(b*x**S(2) + c*x**S(4))**S(2), x), x, b/(S(2)*c**S(2)*(b + c*x**S(2))) + log(b + c*x**S(2))/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -x/(S(2)*c*(b + c*x**S(2))) + atan(sqrt(c)*x/sqrt(b))/(S(2)*sqrt(b)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -S(1)/(S(2)*c*(b + c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(b*x**S(2) + c*x**S(4))**S(2), x), x, x/(S(2)*b*(b + c*x**S(2))) + atan(sqrt(c)*x/sqrt(b))/(S(2)*b**(S(3)/2)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(b*x**S(2) + c*x**S(4))**S(2), x), x, S(1)/(S(2)*b*(b + c*x**S(2))) + log(x)/b**S(2) - log(b + c*x**S(2))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, S(1)/(S(2)*b*x*(b + c*x**S(2))) - S(3)/(S(2)*b**S(2)*x) - S(3)*sqrt(c)*atan(sqrt(c)*x/sqrt(b))/(S(2)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(b*x**S(2) + c*x**S(4))**S(2), x), x, -c/(S(2)*b**S(2)*(b + c*x**S(2))) - S(1)/(S(2)*b**S(2)*x**S(2)) - S(2)*c*log(x)/b**S(3) + c*log(b + c*x**S(2))/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(-2)), x), x, S(1)/(S(2)*b*x**S(3)*(b + c*x**S(2))) - S(5)/(S(6)*b**S(2)*x**S(3)) + S(5)*c/(S(2)*b**S(3)*x) + S(5)*c**(S(3)/2)*atan(sqrt(c)*x/sqrt(b))/(S(2)*b**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(b*x**S(2) + c*x**S(4))**S(2)), x), x, -S(1)/(S(4)*b**S(2)*x**S(4)) + c**S(2)/(S(2)*b**S(3)*(b + c*x**S(2))) + c/(b**S(3)*x**S(2)) + S(3)*c**S(2)*log(x)/b**S(4) - S(3)*c**S(2)*log(b + c*x**S(2))/(S(2)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(b*x**S(2) + c*x**S(4))**S(2)), x), x, S(1)/(S(2)*b*x**S(5)*(b + c*x**S(2))) - S(7)/(S(10)*b**S(2)*x**S(5)) + S(7)*c/(S(6)*b**S(3)*x**S(3)) - S(7)*c**S(2)/(S(2)*b**S(4)*x) - S(7)*c**(S(5)/2)*atan(sqrt(c)*x/sqrt(b))/(S(2)*b**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(14)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(35)*b**(S(3)/2)*atan(sqrt(c)*x/sqrt(b))/(S(8)*c**(S(9)/2)) - S(35)*b*x/(S(8)*c**S(4)) - x**S(7)/(S(4)*c*(b + c*x**S(2))**S(2)) - S(7)*x**S(5)/(S(8)*c**S(2)*(b + c*x**S(2))) + S(35)*x**S(3)/(S(24)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(13)/(b*x**S(2) + c*x**S(4))**S(3), x), x, b**S(3)/(S(4)*c**S(4)*(b + c*x**S(2))**S(2)) - S(3)*b**S(2)/(S(2)*c**S(4)*(b + c*x**S(2))) - S(3)*b*log(b + c*x**S(2))/(S(2)*c**S(4)) + x**S(2)/(S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(12)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -S(15)*sqrt(b)*atan(sqrt(c)*x/sqrt(b))/(S(8)*c**(S(7)/2)) - x**S(5)/(S(4)*c*(b + c*x**S(2))**S(2)) - S(5)*x**S(3)/(S(8)*c**S(2)*(b + c*x**S(2))) + S(15)*x/(S(8)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -b**S(2)/(S(4)*c**S(3)*(b + c*x**S(2))**S(2)) + b/(c**S(3)*(b + c*x**S(2))) + log(b + c*x**S(2))/(S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -x**S(3)/(S(4)*c*(b + c*x**S(2))**S(2)) - S(3)*x/(S(8)*c**S(2)*(b + c*x**S(2))) + S(3)*atan(sqrt(c)*x/sqrt(b))/(S(8)*sqrt(b)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(b*x**S(2) + c*x**S(4))**S(3), x), x, x**S(4)/(S(4)*b*(b + c*x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -x/(S(4)*c*(b + c*x**S(2))**S(2)) + x/(S(8)*b*c*(b + c*x**S(2))) + atan(sqrt(c)*x/sqrt(b))/(S(8)*b**(S(3)/2)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -S(1)/(S(4)*c*(b + c*x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(b*x**S(2) + c*x**S(4))**S(3), x), x, x/(S(4)*b*(b + c*x**S(2))**S(2)) + S(3)*x/(S(8)*b**S(2)*(b + c*x**S(2))) + S(3)*atan(sqrt(c)*x/sqrt(b))/(S(8)*b**(S(5)/2)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(1)/(S(4)*b*(b + c*x**S(2))**S(2)) + S(1)/(S(2)*b**S(2)*(b + c*x**S(2))) + log(x)/b**S(3) - log(b + c*x**S(2))/(S(2)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(1)/(S(4)*b*x*(b + c*x**S(2))**S(2)) + S(5)/(S(8)*b**S(2)*x*(b + c*x**S(2))) - S(15)/(S(8)*b**S(3)*x) - S(15)*sqrt(c)*atan(sqrt(c)*x/sqrt(b))/(S(8)*b**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -c/(S(4)*b**S(2)*(b + c*x**S(2))**S(2)) - c/(b**S(3)*(b + c*x**S(2))) - S(1)/(S(2)*b**S(3)*x**S(2)) - S(3)*c*log(x)/b**S(4) + S(3)*c*log(b + c*x**S(2))/(S(2)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(1)/(S(4)*b*x**S(3)*(b + c*x**S(2))**S(2)) + S(7)/(S(8)*b**S(2)*x**S(3)*(b + c*x**S(2))) - S(35)/(S(24)*b**S(3)*x**S(3)) + S(35)*c/(S(8)*b**S(4)*x) + S(35)*c**(S(3)/2)*atan(sqrt(c)*x/sqrt(b))/(S(8)*b**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(b*x**S(2) + c*x**S(4))**S(3), x), x, c**S(2)/(S(4)*b**S(3)*(b + c*x**S(2))**S(2)) - S(1)/(S(4)*b**S(3)*x**S(4)) + S(3)*c**S(2)/(S(2)*b**S(4)*(b + c*x**S(2))) + S(3)*c/(S(2)*b**S(4)*x**S(2)) + S(6)*c**S(2)*log(x)/b**S(5) - S(3)*c**S(2)*log(b + c*x**S(2))/b**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(-3)), x), x, S(1)/(S(4)*b*x**S(5)*(b + c*x**S(2))**S(2)) + S(9)/(S(8)*b**S(2)*x**S(5)*(b + c*x**S(2))) - S(63)/(S(40)*b**S(3)*x**S(5)) + S(21)*c/(S(8)*b**S(4)*x**S(3)) - S(63)*c**S(2)/(S(8)*b**S(5)*x) - S(63)*c**(S(5)/2)*atan(sqrt(c)*x/sqrt(b))/(S(8)*b**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(b*x**S(2) + c*x**S(4))**S(3)), x), x, -S(1)/(S(6)*b**S(3)*x**S(6)) - c**S(3)/(S(4)*b**S(4)*(b + c*x**S(2))**S(2)) + S(3)*c/(S(4)*b**S(4)*x**S(4)) - S(2)*c**S(3)/(b**S(5)*(b + c*x**S(2))) - S(3)*c**S(2)/(b**S(5)*x**S(2)) - S(10)*c**S(3)*log(x)/b**S(6) + S(5)*c**S(3)*log(b + c*x**S(2))/b**S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(5)*b**S(4)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(128)*c**(S(7)/2)) + S(5)*b**S(2)*(b + S(2)*c*x**S(2))*sqrt(b*x**S(2) + c*x**S(4))/(S(128)*c**S(3)) - S(5)*b*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(48)*c**S(2)) + x**S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(8)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(b*x**S(2) + c*x**S(4)), x), x, b**S(3)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(16)*c**(S(5)/2)) - b*(b + S(2)*c*x**S(2))*sqrt(b*x**S(2) + c*x**S(4))/(S(16)*c**S(2)) + (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(b*x**S(2) + c*x**S(4)), x), x, -b**S(2)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*c**(S(3)/2)) + (b + S(2)*c*x**S(2))*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x, x), x, b*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(2)*sqrt(c)) + sqrt(b*x**S(2) + c*x**S(4))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(3), x), x, sqrt(c)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4))) - sqrt(b*x**S(2) + c*x**S(4))/x**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(5), x), x, -(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(3)*b*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(7), x), x, -(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(5)*b*x**S(8)) + S(2)*c*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(15)*b**S(2)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(9), x), x, -(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(7)*b*x**S(10)) + S(4)*c*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(35)*b**S(2)*x**S(8)) - S(8)*c**S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(105)*b**S(3)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(11), x), x, -(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(9)*b*x**S(12)) + S(2)*c*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(21)*b**S(2)*x**S(10)) - S(8)*c**S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(105)*b**S(3)*x**S(8)) + S(16)*c**S(3)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(315)*b**S(4)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(13), x), x, -(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(11)*b*x**S(14)) + S(8)*c*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(99)*b**S(2)*x**S(12)) - S(16)*c**S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(231)*b**S(3)*x**S(10)) + S(64)*c**S(3)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(1155)*b**S(4)*x**S(8)) - S(128)*c**S(4)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(3465)*b**S(5)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(b*x**S(2) + c*x**S(4)), x), x, S(8)*b**S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(105)*c**S(3)*x**S(3)) - S(4)*b*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(35)*c**S(2)*x) + x*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(7)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(2)*b*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(15)*c**S(2)*x**S(3)) + (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(5)*c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4)), x), x, (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(3)*c*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(2), x), x, -sqrt(b)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4))) + sqrt(b*x**S(2) + c*x**S(4))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(4), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(2)*x**S(3)) - c*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(6), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(4)*x**S(5)) - c*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*b*x**S(3)) + c**S(2)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*b**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**S(8), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(6)*x**S(7)) - c*sqrt(b*x**S(2) + c*x**S(4))/(S(24)*b*x**S(5)) + c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(16)*b**S(2)*x**S(3)) - c**S(3)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(16)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(3)*b**S(5)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(256)*c**(S(7)/2)) + S(3)*b**S(3)*(b + S(2)*c*x**S(2))*sqrt(b*x**S(2) + c*x**S(4))/(S(256)*c**S(3)) - b*(b + S(2)*c*x**S(2))*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(32)*c**S(2)) + (b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(10)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(3)*b**S(4)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(128)*c**(S(5)/2)) - S(3)*b**S(2)*(b + S(2)*c*x**S(2))*sqrt(b*x**S(2) + c*x**S(4))/(S(128)*c**S(2)) + (b + S(2)*c*x**S(2))*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(16)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x, x), x, -b**S(3)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(16)*c**(S(3)/2)) + b*(b + S(2)*c*x**S(2))*sqrt(b*x**S(2) + c*x**S(4))/(S(16)*c) + (b*x**S(2) + c*x**S(4))**(S(3)/2)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(3), x), x, S(3)*b**S(2)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*sqrt(c)) + S(3)*b*sqrt(b*x**S(2) + c*x**S(4))/S(8) + (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(5), x), x, S(3)*b*sqrt(c)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/S(2) + S(3)*c*sqrt(b*x**S(2) + c*x**S(4))/S(2) - (b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(7), x), x, c**(S(3)/2)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4))) - c*sqrt(b*x**S(2) + c*x**S(4))/x**S(2) - (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(3)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(9), x), x, -(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(5)*b*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(11), x), x, -(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(7)*b*x**S(12)) + S(2)*c*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(35)*b**S(2)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(13), x), x, -(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(9)*b*x**S(14)) + S(4)*c*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(63)*b**S(2)*x**S(12)) - S(8)*c**S(2)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(315)*b**S(3)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(15), x), x, -(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(11)*b*x**S(16)) + S(2)*c*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(33)*b**S(2)*x**S(14)) - S(8)*c**S(2)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(231)*b**S(3)*x**S(12)) + S(16)*c**S(3)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(1155)*b**S(4)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(17), x), x, -(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(13)*b*x**S(18)) + S(8)*c*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(143)*b**S(2)*x**S(16)) - S(16)*c**S(2)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(429)*b**S(3)*x**S(14)) + S(64)*c**S(3)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(3003)*b**S(4)*x**S(12)) - S(128)*c**S(4)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(15015)*b**S(5)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(128)*b**S(4)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(15015)*c**S(5)*x**S(5)) - S(64)*b**S(3)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(3003)*c**S(4)*x**S(3)) + S(16)*b**S(2)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(429)*c**S(3)*x) - S(8)*b*x*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(143)*c**S(2)) + x**S(3)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(13)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(16)*b**S(3)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(1155)*c**S(4)*x**S(5)) + S(8)*b**S(2)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(231)*c**S(3)*x**S(3)) - S(2)*b*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(33)*c**S(2)*x) + x*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(11)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(8)*b**S(2)*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(315)*c**S(3)*x**S(5)) - S(4)*b*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(63)*c**S(2)*x**S(3)) + (b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(9)*c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(2)*b*(b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(35)*c**S(2)*x**S(5)) + (b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(7)*c*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(2), x), x, (b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(5)*c*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(4), x), x, -b**(S(3)/2)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4))) + b*sqrt(b*x**S(2) + c*x**S(4))/x + (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(6), x), x, -S(3)*sqrt(b)*c*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/S(2) + S(3)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(2)*x) - (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(2)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(8), x), x, -S(3)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*x**S(3)) - (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(4)*x**S(7)) - S(3)*c**S(2)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(10), x), x, -c*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*x**S(5)) - (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*x**S(9)) - c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(16)*b*x**S(3)) + c**S(3)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(16)*b**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(12), x), x, -c*sqrt(b*x**S(2) + c*x**S(4))/(S(16)*x**S(7)) - (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(8)*x**S(11)) - c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(64)*b*x**S(5)) + S(3)*c**S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(128)*b**S(2)*x**S(3)) - S(3)*c**S(4)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(128)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(14), x), x, -S(3)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(80)*x**S(9)) - (b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(10)*x**S(13)) - c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(160)*b*x**S(7)) + c**S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(128)*b**S(2)*x**S(5)) - S(3)*c**S(4)*sqrt(b*x**S(2) + c*x**S(4))/(S(256)*b**S(3)*x**S(3)) + S(3)*c**S(5)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(256)*b**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(5)*b**S(3)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(16)*c**(S(7)/2)) + S(5)*b**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(16)*c**S(3)) - S(5)*b*x**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(24)*c**S(2)) + x**S(4)*sqrt(b*x**S(2) + c*x**S(4))/(S(6)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/sqrt(b*x**S(2) + c*x**S(4)), x), x, S(3)*b**S(2)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*c**(S(5)/2)) - S(3)*b*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*c**S(2)) + x**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(4)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -b*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(2)*c**(S(3)/2)) + sqrt(b*x**S(2) + c*x**S(4))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(b*x**S(2) + c*x**S(4)), x), x, atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/sqrt(c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(b*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(3)*b*x**S(4)) + S(2)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*b**S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b*x**S(6)) + S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(15)*b**S(2)*x**S(4)) - S(8)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(15)*b**S(3)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(7)*b*x**S(8)) + S(6)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(35)*b**S(2)*x**S(6)) - S(8)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(35)*b**S(3)*x**S(4)) + S(16)*c**S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(35)*b**S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(2)*b*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*c**S(2)*x) + x*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(b*x**S(2) + c*x**S(4)), x), x, sqrt(b*x**S(2) + c*x**S(4))/(c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(2)*b*x**S(3)) + c*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(2)*b**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(4)*b*x**S(5)) + S(3)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*b**S(2)*x**S(3)) - S(3)*c**S(2)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(15)*b**S(2)*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*c**(S(7)/2)) - S(15)*b*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*c**S(3)) - x**S(6)/(c*sqrt(b*x**S(2) + c*x**S(4))) + S(5)*x**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(3)*b*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(2)*c**(S(5)/2)) - x**S(4)/(c*sqrt(b*x**S(2) + c*x**S(4))) + S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -x**S(2)/(c*sqrt(b*x**S(2) + c*x**S(4))) + atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/c**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, x**S(2)/(b*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -(b + S(2)*c*x**S(2))/(b**S(2)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(1)/(b*x**S(2)*sqrt(b*x**S(2) + c*x**S(4))) - S(4)*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*b**S(2)*x**S(4)) + S(8)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*b**S(3)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(1)/(b*x**S(4)*sqrt(b*x**S(2) + c*x**S(4))) - S(6)*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b**S(2)*x**S(6)) + S(8)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b**S(3)*x**S(4)) - S(16)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b**S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(1)/(b*x**S(6)*sqrt(b*x**S(2) + c*x**S(4))) - S(8)*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*b**S(2)*x**S(8)) + S(48)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(35)*b**S(3)*x**S(6)) - S(64)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(35)*b**S(4)*x**S(4)) + S(128)*c**S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(35)*b**S(5)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -x**S(3)/(c*sqrt(b*x**S(2) + c*x**S(4))) + S(2)*sqrt(b*x**S(2) + c*x**S(4))/(c**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -x/(c*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, x/(b*sqrt(b*x**S(2) + c*x**S(4))) - atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/b**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(-3)/2), x), x, S(1)/(b*x*sqrt(b*x**S(2) + c*x**S(4))) - S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(2)*b**S(2)*x**S(3)) + S(3)*c*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(2)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(1)/(b*x**S(3)*sqrt(b*x**S(2) + c*x**S(4))) - S(5)*sqrt(b*x**S(2) + c*x**S(4))/(S(4)*b**S(2)*x**S(5)) + S(15)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*b**S(3)*x**S(3)) - S(15)*c**S(2)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*b**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(-S(4)*x**S(4) + S(3)*x**S(2)), x), x, -sqrt(-S(4)*x**S(4) + S(3)*x**S(2))/S(8) + S(3)*asin(S(8)*x**S(2)/S(3) + S(-1))/S(32), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(-S(4)*x**S(4) - S(3)*x**S(2)), x), x, -sqrt(-S(4)*x**S(4) - S(3)*x**S(2))/S(8) - S(3)*asin(S(8)*x**S(2)/S(3) + S(1))/S(32), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(S(4)*x**S(4) + S(3)*x**S(2)), x), x, sqrt(S(4)*x**S(4) + S(3)*x**S(2))/S(8) - S(3)*atanh(S(2)*x**S(2)/sqrt(S(4)*x**S(4) + S(3)*x**S(2)))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(S(4)*x**S(4) - S(3)*x**S(2)), x), x, sqrt(S(4)*x**S(4) - S(3)*x**S(2))/S(8) + S(3)*atanh(S(2)*x**S(2)/sqrt(S(4)*x**S(4) - S(3)*x**S(2)))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a*x**S(2) + b*x**S(4)), x), x, -a*atanh(sqrt(b)*x**S(2)/sqrt(a*x**S(2) + b*x**S(4)))/(S(2)*b**(S(3)/2)) + sqrt(a*x**S(2) + b*x**S(4))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a*x**S(2) - b*x**S(4)), x), x, a*atan(sqrt(b)*x**S(2)/sqrt(a*x**S(2) - b*x**S(4)))/(S(2)*b**(S(3)/2)) - sqrt(a*x**S(2) - b*x**S(4))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)*(b*x**S(2) + c*x**S(4)), x), x, S(2)*b*x**(S(13)/2)/S(13) + S(2)*c*x**(S(17)/2)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)*(b*x**S(2) + c*x**S(4)), x), x, S(2)*b*x**(S(11)/2)/S(11) + S(2)*c*x**(S(15)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*(b*x**S(2) + c*x**S(4)), x), x, S(2)*b*x**(S(9)/2)/S(9) + S(2)*c*x**(S(13)/2)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(b*x**S(2) + c*x**S(4)), x), x, S(2)*b*x**(S(7)/2)/S(7) + S(2)*c*x**(S(11)/2)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/sqrt(x), x), x, S(2)*b*x**(S(5)/2)/S(5) + S(2)*c*x**(S(9)/2)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**(S(3)/2), x), x, S(2)*b*x**(S(3)/2)/S(3) + S(2)*c*x**(S(7)/2)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**(S(5)/2), x), x, S(2)*b*sqrt(x) + S(2)*c*x**(S(5)/2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))/x**(S(7)/2), x), x, -S(2)*b/sqrt(x) + S(2)*c*x**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)*(b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*b**S(2)*x**(S(17)/2)/S(17) + S(4)*b*c*x**(S(21)/2)/S(21) + S(2)*c**S(2)*x**(S(25)/2)/S(25), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)*(b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*b**S(2)*x**(S(15)/2)/S(15) + S(4)*b*c*x**(S(19)/2)/S(19) + S(2)*c**S(2)*x**(S(23)/2)/S(23), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*(b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*b**S(2)*x**(S(13)/2)/S(13) + S(4)*b*c*x**(S(17)/2)/S(17) + S(2)*c**S(2)*x**(S(21)/2)/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*b**S(2)*x**(S(11)/2)/S(11) + S(4)*b*c*x**(S(15)/2)/S(15) + S(2)*c**S(2)*x**(S(19)/2)/S(19), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/sqrt(x), x), x, S(2)*b**S(2)*x**(S(9)/2)/S(9) + S(4)*b*c*x**(S(13)/2)/S(13) + S(2)*c**S(2)*x**(S(17)/2)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**(S(3)/2), x), x, S(2)*b**S(2)*x**(S(7)/2)/S(7) + S(4)*b*c*x**(S(11)/2)/S(11) + S(2)*c**S(2)*x**(S(15)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**(S(5)/2), x), x, S(2)*b**S(2)*x**(S(5)/2)/S(5) + S(4)*b*c*x**(S(9)/2)/S(9) + S(2)*c**S(2)*x**(S(13)/2)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(2)/x**(S(7)/2), x), x, S(2)*b**S(2)*x**(S(3)/2)/S(3) + S(4)*b*c*x**(S(7)/2)/S(7) + S(2)*c**S(2)*x**(S(11)/2)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)*(b*x**S(2) + c*x**S(4))**S(3), x), x, S(2)*b**S(3)*x**(S(21)/2)/S(21) + S(6)*b**S(2)*c*x**(S(25)/2)/S(25) + S(6)*b*c**S(2)*x**(S(29)/2)/S(29) + S(2)*c**S(3)*x**(S(33)/2)/S(33), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)*(b*x**S(2) + c*x**S(4))**S(3), x), x, S(2)*b**S(3)*x**(S(19)/2)/S(19) + S(6)*b**S(2)*c*x**(S(23)/2)/S(23) + S(2)*b*c**S(2)*x**(S(27)/2)/S(9) + S(2)*c**S(3)*x**(S(31)/2)/S(31), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*(b*x**S(2) + c*x**S(4))**S(3), x), x, S(2)*b**S(3)*x**(S(17)/2)/S(17) + S(2)*b**S(2)*c*x**(S(21)/2)/S(7) + S(6)*b*c**S(2)*x**(S(25)/2)/S(25) + S(2)*c**S(3)*x**(S(29)/2)/S(29), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(b*x**S(2) + c*x**S(4))**S(3), x), x, S(2)*b**S(3)*x**(S(15)/2)/S(15) + S(6)*b**S(2)*c*x**(S(19)/2)/S(19) + S(6)*b*c**S(2)*x**(S(23)/2)/S(23) + S(2)*c**S(3)*x**(S(27)/2)/S(27), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/sqrt(x), x), x, S(2)*b**S(3)*x**(S(13)/2)/S(13) + S(6)*b**S(2)*c*x**(S(17)/2)/S(17) + S(2)*b*c**S(2)*x**(S(21)/2)/S(7) + S(2)*c**S(3)*x**(S(25)/2)/S(25), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**(S(3)/2), x), x, S(2)*b**S(3)*x**(S(11)/2)/S(11) + S(2)*b**S(2)*c*x**(S(15)/2)/S(5) + S(6)*b*c**S(2)*x**(S(19)/2)/S(19) + S(2)*c**S(3)*x**(S(23)/2)/S(23), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**(S(5)/2), x), x, S(2)*b**S(3)*x**(S(9)/2)/S(9) + S(6)*b**S(2)*c*x**(S(13)/2)/S(13) + S(6)*b*c**S(2)*x**(S(17)/2)/S(17) + S(2)*c**S(3)*x**(S(21)/2)/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**S(3)/x**(S(7)/2), x), x, S(2)*b**S(3)*x**(S(7)/2)/S(7) + S(6)*b**S(2)*c*x**(S(11)/2)/S(11) + S(2)*b*c**S(2)*x**(S(15)/2)/S(5) + S(2)*c**S(3)*x**(S(19)/2)/S(19), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(13)/2)/(b*x**S(2) + c*x**S(4)), x), x, sqrt(S(2))*b**(S(7)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*c**(S(11)/4)) - sqrt(S(2))*b**(S(7)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*c**(S(11)/4)) - sqrt(S(2))*b**(S(7)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*c**(S(11)/4)) + sqrt(S(2))*b**(S(7)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*c**(S(11)/4)) - S(2)*b*x**(S(3)/2)/(S(3)*c**S(2)) + S(2)*x**(S(7)/2)/(S(7)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(11)/2)/(b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*b**(S(5)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*c**(S(9)/4)) + sqrt(S(2))*b**(S(5)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*c**(S(9)/4)) - sqrt(S(2))*b**(S(5)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*c**(S(9)/4)) + sqrt(S(2))*b**(S(5)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*c**(S(9)/4)) - S(2)*b*sqrt(x)/c**S(2) + S(2)*x**(S(5)/2)/(S(5)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(9)/2)/(b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*b**(S(3)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*c**(S(7)/4)) + sqrt(S(2))*b**(S(3)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*c**(S(7)/4)) + sqrt(S(2))*b**(S(3)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*c**(S(7)/4)) - sqrt(S(2))*b**(S(3)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*c**(S(7)/4)) + S(2)*x**(S(3)/2)/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)/(b*x**S(2) + c*x**S(4)), x), x, sqrt(S(2))*b**(S(1)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*c**(S(5)/4)) - sqrt(S(2))*b**(S(1)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*c**(S(5)/4)) + sqrt(S(2))*b**(S(1)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*c**(S(5)/4)) - sqrt(S(2))*b**(S(1)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*c**(S(5)/4)) + S(2)*sqrt(x)/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)/(b*x**S(2) + c*x**S(4)), x), x, sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(1)/4)*c**(S(3)/4)) - sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(1)/4)*c**(S(3)/4)) - sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(1)/4)*c**(S(3)/4)) + sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(1)/4)*c**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/(b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(3)/4)*c**(S(1)/4)) + sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(3)/4)*c**(S(1)/4)) - sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(3)/4)*c**(S(1)/4)) + sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(3)/4)*c**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(b*x**S(2) + c*x**S(4)), x), x, -S(2)/(b*sqrt(x)) - sqrt(S(2))*c**(S(1)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(5)/4)) + sqrt(S(2))*c**(S(1)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(5)/4)) + sqrt(S(2))*c**(S(1)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(5)/4)) - sqrt(S(2))*c**(S(1)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(5)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(b*x**S(2) + c*x**S(4))), x), x, -S(2)/(S(3)*b*x**(S(3)/2)) + sqrt(S(2))*c**(S(3)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(7)/4)) - sqrt(S(2))*c**(S(3)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(7)/4)) + sqrt(S(2))*c**(S(3)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(7)/4)) - sqrt(S(2))*c**(S(3)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(7)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(3)/2)*(b*x**S(2) + c*x**S(4))), x), x, -S(2)/(S(5)*b*x**(S(5)/2)) + S(2)*c/(b**S(2)*sqrt(x)) + sqrt(S(2))*c**(S(5)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(9)/4)) - sqrt(S(2))*c**(S(5)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(9)/4)) - sqrt(S(2))*c**(S(5)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(9)/4)) + sqrt(S(2))*c**(S(5)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(9)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(5)/2)*(b*x**S(2) + c*x**S(4))), x), x, -S(2)/(S(7)*b*x**(S(7)/2)) + S(2)*c/(S(3)*b**S(2)*x**(S(3)/2)) - sqrt(S(2))*c**(S(7)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(11)/4)) + sqrt(S(2))*c**(S(7)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(11)/4)) - sqrt(S(2))*c**(S(7)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(11)/4)) + sqrt(S(2))*c**(S(7)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(11)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(7)/2)*(b*x**S(2) + c*x**S(4))), x), x, -S(2)/(S(9)*b*x**(S(9)/2)) + S(2)*c/(S(5)*b**S(2)*x**(S(5)/2)) - S(2)*c**S(2)/(b**S(3)*sqrt(x)) - sqrt(S(2))*c**(S(9)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(13)/4)) + sqrt(S(2))*c**(S(9)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(4)*b**(S(13)/4)) + sqrt(S(2))*c**(S(9)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(13)/4)) - sqrt(S(2))*c**(S(9)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(2)*b**(S(13)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(19)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -S(9)*sqrt(S(2))*b**(S(5)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*c**(S(13)/4)) + S(9)*sqrt(S(2))*b**(S(5)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*c**(S(13)/4)) - S(9)*sqrt(S(2))*b**(S(5)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*c**(S(13)/4)) + S(9)*sqrt(S(2))*b**(S(5)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*c**(S(13)/4)) - S(9)*b*sqrt(x)/(S(2)*c**S(3)) - x**(S(9)/2)/(S(2)*c*(b + c*x**S(2))) + S(9)*x**(S(5)/2)/(S(10)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(17)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -S(7)*sqrt(S(2))*b**(S(3)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*c**(S(11)/4)) + S(7)*sqrt(S(2))*b**(S(3)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*c**(S(11)/4)) + S(7)*sqrt(S(2))*b**(S(3)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*c**(S(11)/4)) - S(7)*sqrt(S(2))*b**(S(3)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*c**(S(11)/4)) - x**(S(7)/2)/(S(2)*c*(b + c*x**S(2))) + S(7)*x**(S(3)/2)/(S(6)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(15)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, S(5)*sqrt(S(2))*b**(S(1)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*c**(S(9)/4)) - S(5)*sqrt(S(2))*b**(S(1)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*c**(S(9)/4)) + S(5)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*c**(S(9)/4)) - S(5)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*c**(S(9)/4)) - x**(S(5)/2)/(S(2)*c*(b + c*x**S(2))) + S(5)*sqrt(x)/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(13)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -x**(S(3)/2)/(S(2)*c*(b + c*x**S(2))) + S(3)*sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(1)/4)*c**(S(7)/4)) - S(3)*sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(1)/4)*c**(S(7)/4)) - S(3)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(1)/4)*c**(S(7)/4)) + S(3)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(1)/4)*c**(S(7)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(11)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, -sqrt(x)/(S(2)*c*(b + c*x**S(2))) - sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(3)/4)*c**(S(5)/4)) + sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(3)/4)*c**(S(5)/4)) - sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(3)/4)*c**(S(5)/4)) + sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(3)/4)*c**(S(5)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(9)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, x**(S(3)/2)/(S(2)*b*(b + c*x**S(2))) + sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(5)/4)*c**(S(3)/4)) - sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(5)/4)*c**(S(3)/4)) - sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(5)/4)*c**(S(3)/4)) + sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(5)/4)*c**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, sqrt(x)/(S(2)*b*(b + c*x**S(2))) - S(3)*sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(7)/4)*c**(S(1)/4)) + S(3)*sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(7)/4)*c**(S(1)/4)) - S(3)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(7)/4)*c**(S(1)/4)) + S(3)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(7)/4)*c**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, S(1)/(S(2)*b*sqrt(x)*(b + c*x**S(2))) - S(5)/(S(2)*b**S(2)*sqrt(x)) - S(5)*sqrt(S(2))*c**(S(1)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(9)/4)) + S(5)*sqrt(S(2))*c**(S(1)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(9)/4)) + S(5)*sqrt(S(2))*c**(S(1)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(9)/4)) - S(5)*sqrt(S(2))*c**(S(1)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(9)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/(b*x**S(2) + c*x**S(4))**S(2), x), x, S(1)/(S(2)*b*x**(S(3)/2)*(b + c*x**S(2))) - S(7)/(S(6)*b**S(2)*x**(S(3)/2)) + S(7)*sqrt(S(2))*c**(S(3)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(11)/4)) - S(7)*sqrt(S(2))*c**(S(3)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(11)/4)) + S(7)*sqrt(S(2))*c**(S(3)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(11)/4)) - S(7)*sqrt(S(2))*c**(S(3)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(11)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(b*x**S(2) + c*x**S(4))**S(2), x), x, S(1)/(S(2)*b*x**(S(5)/2)*(b + c*x**S(2))) - S(9)/(S(10)*b**S(2)*x**(S(5)/2)) + S(9)*c/(S(2)*b**S(3)*sqrt(x)) + S(9)*sqrt(S(2))*c**(S(5)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(13)/4)) - S(9)*sqrt(S(2))*c**(S(5)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(13)/4)) - S(9)*sqrt(S(2))*c**(S(5)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(13)/4)) + S(9)*sqrt(S(2))*c**(S(5)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(13)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(b*x**S(2) + c*x**S(4))**S(2)), x), x, S(1)/(S(2)*b*x**(S(7)/2)*(b + c*x**S(2))) - S(11)/(S(14)*b**S(2)*x**(S(7)/2)) + S(11)*c/(S(6)*b**S(3)*x**(S(3)/2)) - S(11)*sqrt(S(2))*c**(S(7)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(15)/4)) + S(11)*sqrt(S(2))*c**(S(7)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(15)/4)) - S(11)*sqrt(S(2))*c**(S(7)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(15)/4)) + S(11)*sqrt(S(2))*c**(S(7)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(15)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(3)/2)*(b*x**S(2) + c*x**S(4))**S(2)), x), x, S(1)/(S(2)*b*x**(S(9)/2)*(b + c*x**S(2))) - S(13)/(S(18)*b**S(2)*x**(S(9)/2)) + S(13)*c/(S(10)*b**S(3)*x**(S(5)/2)) - S(13)*c**S(2)/(S(2)*b**S(4)*sqrt(x)) - S(13)*sqrt(S(2))*c**(S(9)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(17)/4)) + S(13)*sqrt(S(2))*c**(S(9)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(16)*b**(S(17)/4)) + S(13)*sqrt(S(2))*c**(S(9)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(17)/4)) - S(13)*sqrt(S(2))*c**(S(9)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(8)*b**(S(17)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(23)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(45)*sqrt(S(2))*b**(S(1)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*c**(S(13)/4)) - S(45)*sqrt(S(2))*b**(S(1)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*c**(S(13)/4)) + S(45)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*c**(S(13)/4)) - S(45)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*c**(S(13)/4)) - x**(S(9)/2)/(S(4)*c*(b + c*x**S(2))**S(2)) - S(9)*x**(S(5)/2)/(S(16)*c**S(2)*(b + c*x**S(2))) + S(45)*sqrt(x)/(S(16)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(21)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -x**(S(7)/2)/(S(4)*c*(b + c*x**S(2))**S(2)) - S(7)*x**(S(3)/2)/(S(16)*c**S(2)*(b + c*x**S(2))) + S(21)*sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(1)/4)*c**(S(11)/4)) - S(21)*sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(1)/4)*c**(S(11)/4)) - S(21)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(1)/4)*c**(S(11)/4)) + S(21)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(1)/4)*c**(S(11)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(19)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -x**(S(5)/2)/(S(4)*c*(b + c*x**S(2))**S(2)) - S(5)*sqrt(x)/(S(16)*c**S(2)*(b + c*x**S(2))) - S(5)*sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(3)/4)*c**(S(9)/4)) + S(5)*sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(3)/4)*c**(S(9)/4)) - S(5)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(3)/4)*c**(S(9)/4)) + S(5)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(3)/4)*c**(S(9)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(17)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -x**(S(3)/2)/(S(4)*c*(b + c*x**S(2))**S(2)) + S(3)*x**(S(3)/2)/(S(16)*b*c*(b + c*x**S(2))) + S(3)*sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(5)/4)*c**(S(7)/4)) - S(3)*sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(5)/4)*c**(S(7)/4)) - S(3)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(5)/4)*c**(S(7)/4)) + S(3)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(5)/4)*c**(S(7)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(15)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, -sqrt(x)/(S(4)*c*(b + c*x**S(2))**S(2)) + sqrt(x)/(S(16)*b*c*(b + c*x**S(2))) - S(3)*sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(7)/4)*c**(S(5)/4)) + S(3)*sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(7)/4)*c**(S(5)/4)) - S(3)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(7)/4)*c**(S(5)/4)) + S(3)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(7)/4)*c**(S(5)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(13)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, x**(S(3)/2)/(S(4)*b*(b + c*x**S(2))**S(2)) + S(5)*x**(S(3)/2)/(S(16)*b**S(2)*(b + c*x**S(2))) + S(5)*sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(9)/4)*c**(S(3)/4)) - S(5)*sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(9)/4)*c**(S(3)/4)) - S(5)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(9)/4)*c**(S(3)/4)) + S(5)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(9)/4)*c**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(11)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, sqrt(x)/(S(4)*b*(b + c*x**S(2))**S(2)) + S(7)*sqrt(x)/(S(16)*b**S(2)*(b + c*x**S(2))) - S(21)*sqrt(S(2))*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(11)/4)*c**(S(1)/4)) + S(21)*sqrt(S(2))*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(11)/4)*c**(S(1)/4)) - S(21)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(11)/4)*c**(S(1)/4)) + S(21)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(11)/4)*c**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(9)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(1)/(S(4)*b*sqrt(x)*(b + c*x**S(2))**S(2)) + S(9)/(S(16)*b**S(2)*sqrt(x)*(b + c*x**S(2))) - S(45)/(S(16)*b**S(3)*sqrt(x)) - S(45)*sqrt(S(2))*c**(S(1)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(13)/4)) + S(45)*sqrt(S(2))*c**(S(1)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(13)/4)) + S(45)*sqrt(S(2))*c**(S(1)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(13)/4)) - S(45)*sqrt(S(2))*c**(S(1)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(13)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(1)/(S(4)*b*x**(S(3)/2)*(b + c*x**S(2))**S(2)) + S(11)/(S(16)*b**S(2)*x**(S(3)/2)*(b + c*x**S(2))) - S(77)/(S(48)*b**S(3)*x**(S(3)/2)) + S(77)*sqrt(S(2))*c**(S(3)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(15)/4)) - S(77)*sqrt(S(2))*c**(S(3)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(15)/4)) + S(77)*sqrt(S(2))*c**(S(3)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(15)/4)) - S(77)*sqrt(S(2))*c**(S(3)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(15)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(1)/(S(4)*b*x**(S(5)/2)*(b + c*x**S(2))**S(2)) + S(13)/(S(16)*b**S(2)*x**(S(5)/2)*(b + c*x**S(2))) - S(117)/(S(80)*b**S(3)*x**(S(5)/2)) + S(117)*c/(S(16)*b**S(4)*sqrt(x)) + S(117)*sqrt(S(2))*c**(S(5)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(17)/4)) - S(117)*sqrt(S(2))*c**(S(5)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(17)/4)) - S(117)*sqrt(S(2))*c**(S(5)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(17)/4)) + S(117)*sqrt(S(2))*c**(S(5)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(17)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(1)/(S(4)*b*x**(S(7)/2)*(b + c*x**S(2))**S(2)) + S(15)/(S(16)*b**S(2)*x**(S(7)/2)*(b + c*x**S(2))) - S(165)/(S(112)*b**S(3)*x**(S(7)/2)) + S(55)*c/(S(16)*b**S(4)*x**(S(3)/2)) - S(165)*sqrt(S(2))*c**(S(7)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(19)/4)) + S(165)*sqrt(S(2))*c**(S(7)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(19)/4)) - S(165)*sqrt(S(2))*c**(S(7)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(19)/4)) + S(165)*sqrt(S(2))*c**(S(7)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(19)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(b*x**S(2) + c*x**S(4))**S(3), x), x, S(1)/(S(4)*b*x**(S(9)/2)*(b + c*x**S(2))**S(2)) + S(17)/(S(16)*b**S(2)*x**(S(9)/2)*(b + c*x**S(2))) - S(221)/(S(144)*b**S(3)*x**(S(9)/2)) + S(221)*c/(S(80)*b**S(4)*x**(S(5)/2)) - S(221)*c**S(2)/(S(16)*b**S(5)*sqrt(x)) - S(221)*sqrt(S(2))*c**(S(9)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(21)/4)) + S(221)*sqrt(S(2))*c**(S(9)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(21)/4)) + S(221)*sqrt(S(2))*c**(S(9)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(21)/4)) - S(221)*sqrt(S(2))*c**(S(9)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(21)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(b*x**S(2) + c*x**S(4))**S(3)), x), x, S(1)/(S(4)*b*x**(S(11)/2)*(b + c*x**S(2))**S(2)) + S(19)/(S(16)*b**S(2)*x**(S(11)/2)*(b + c*x**S(2))) - S(285)/(S(176)*b**S(3)*x**(S(11)/2)) + S(285)*c/(S(112)*b**S(4)*x**(S(7)/2)) - S(95)*c**S(2)/(S(16)*b**S(5)*x**(S(3)/2)) + S(285)*sqrt(S(2))*c**(S(11)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(23)/4)) - S(285)*sqrt(S(2))*c**(S(11)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*sqrt(x) + sqrt(b) + sqrt(c)*x)/(S(128)*b**(S(23)/4)) + S(285)*sqrt(S(2))*c**(S(11)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(23)/4)) - S(285)*sqrt(S(2))*c**(S(11)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*sqrt(x)/b**(S(1)/4))/(S(64)*b**(S(23)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)*sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(28)*b**(S(13)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(195)*c**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(14)*b**(S(13)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(195)*c**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(28)*b**S(3)*x**(S(3)/2)*(b + c*x**S(2))/(S(195)*c**(S(5)/2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(28)*b**S(2)*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/(S(585)*c**S(2)) + S(4)*b*x**(S(5)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(117)*c) + S(2)*x**(S(9)/2)*sqrt(b*x**S(2) + c*x**S(4))/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)*sqrt(b*x**S(2) + c*x**S(4)), x), x, S(10)*b**(S(11)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(231)*c**(S(9)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(20)*b**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(231)*c**S(2)*sqrt(x)) + S(4)*b*x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*c) + S(2)*x**(S(7)/2)*sqrt(b*x**S(2) + c*x**S(4))/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4)), x), x, S(4)*b**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*c**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(2)*b**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*c**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(4)*b**S(2)*x**(S(3)/2)*(b + c*x**S(2))/(S(15)*c**(S(3)/2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*b*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/(S(45)*c) + S(2)*x**(S(5)/2)*sqrt(b*x**S(2) + c*x**S(4))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(2)*b**(S(7)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(21)*c**(S(5)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*b*sqrt(b*x**S(2) + c*x**S(4))/(S(21)*c*sqrt(x)) + S(2)*x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/sqrt(x), x), x, -S(4)*b**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*c**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(2)*b**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*c**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*b*x**(S(3)/2)*(b + c*x**S(2))/(S(5)*sqrt(c)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(2)*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**(S(3)/2), x), x, S(2)*b**(S(3)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(3)*c**(S(1)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**(S(5)/2), x), x, -S(4)*b**(S(1)/4)*c**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/sqrt(b*x**S(2) + c*x**S(4)) + S(2)*b**(S(1)/4)*c**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/sqrt(b*x**S(2) + c*x**S(4)) + S(4)*sqrt(c)*x**(S(3)/2)*(b + c*x**S(2))/((sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(2)*sqrt(b*x**S(2) + c*x**S(4))/x**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**(S(7)/2), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*x**(S(5)/2)) + S(2)*c**(S(3)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(3)*b**(S(1)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**(S(9)/2), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*x**(S(7)/2)) + S(4)*c**(S(3)/2)*x**(S(3)/2)*(b + c*x**S(2))/(S(5)*b*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b*x**(S(3)/2)) - S(4)*c**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*b**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(2)*c**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*b**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**(S(11)/2), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*x**(S(9)/2)) - S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(21)*b*x**(S(5)/2)) - S(2)*c**(S(7)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(21)*b**(S(5)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**(S(13)/2), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(9)*x**(S(11)/2)) - S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(45)*b*x**(S(7)/2)) - S(4)*c**(S(5)/2)*x**(S(3)/2)*(b + c*x**S(2))/(S(15)*b**S(2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(15)*b**S(2)*x**(S(3)/2)) + S(4)*c**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*b**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(2)*c**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*b**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + c*x**S(4))/x**(S(15)/2), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(11)*x**(S(13)/2)) - S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*b*x**(S(9)/2)) + S(20)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(231)*b**S(2)*x**(S(5)/2)) + S(10)*c**(S(11)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(231)*b**(S(9)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(56)*b**(S(17)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(1105)*c**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(28)*b**(S(17)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(1105)*c**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(56)*b**S(4)*x**(S(3)/2)*(b + c*x**S(2))/(S(1105)*c**(S(5)/2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(56)*b**S(3)*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/(S(3315)*c**S(2)) + S(8)*b**S(2)*x**(S(5)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(663)*c) + S(12)*b*x**(S(9)/2)*sqrt(b*x**S(2) + c*x**S(4))/S(221) + S(2)*x**(S(5)/2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(4)*b**(S(15)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(231)*c**(S(9)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(8)*b**S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(231)*c**S(2)*sqrt(x)) + S(8)*b**S(2)*x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(385)*c) + S(4)*b*x**(S(7)/2)*sqrt(b*x**S(2) + c*x**S(4))/S(55) + S(2)*x**(S(3)/2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/sqrt(x), x), x, S(8)*b**(S(13)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(65)*c**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(4)*b**(S(13)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(65)*c**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(8)*b**S(3)*x**(S(3)/2)*(b + c*x**S(2))/(S(65)*c**(S(3)/2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(8)*b**S(2)*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/(S(195)*c) + S(4)*b*x**(S(5)/2)*sqrt(b*x**S(2) + c*x**S(4))/S(39) + S(2)*sqrt(x)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(3)/2), x), x, -S(4)*b**(S(11)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(77)*c**(S(5)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(8)*b**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*c*sqrt(x)) + S(12)*b*x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))/S(77) + S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(11)*sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(5)/2), x), x, -S(8)*b**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*c**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*b**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*c**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(8)*b**S(2)*x**(S(3)/2)*(b + c*x**S(2))/(S(15)*sqrt(c)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*b*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/S(15) + S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(9)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(7)/2), x), x, S(4)*b**(S(7)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(7)*c**(S(1)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*b*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*sqrt(x)) + S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(7)*x**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(9)/2), x), x, -S(24)*b**(S(5)/4)*c**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*sqrt(b*x**S(2) + c*x**S(4))) + S(12)*b**(S(5)/4)*c**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*sqrt(b*x**S(2) + c*x**S(4))) + S(24)*b*sqrt(c)*x**(S(3)/2)*(b + c*x**S(2))/((S(5)*sqrt(b) + S(5)*sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(12)*c*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/S(5) - S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(7)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(11)/2), x), x, S(4)*b**(S(3)/4)*c**(S(3)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(3)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*sqrt(x)) - S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(3)*x**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(13)/2), x), x, -S(24)*b**(S(1)/4)*c**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*sqrt(b*x**S(2) + c*x**S(4))) + S(12)*b**(S(1)/4)*c**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*sqrt(b*x**S(2) + c*x**S(4))) + S(24)*c**(S(3)/2)*x**(S(3)/2)*(b + c*x**S(2))/((S(5)*sqrt(b) + S(5)*sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(12)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*x**(S(3)/2)) - S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(5)*x**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(15)/2), x), x, -S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*x**(S(5)/2)) - S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(7)*x**(S(13)/2)) + S(4)*c**(S(7)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(7)*b**(S(1)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(17)/2), x), x, -S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(15)*x**(S(7)/2)) - S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(9)*x**(S(15)/2)) + S(8)*c**(S(5)/2)*x**(S(3)/2)*(b + c*x**S(2))/(S(15)*b*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(8)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(15)*b*x**(S(3)/2)) - S(8)*c**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*b**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(4)*c**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*b**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(19)/2), x), x, -S(12)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*x**(S(9)/2)) - S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(11)*x**(S(17)/2)) - S(8)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*b*x**(S(5)/2)) - S(4)*c**(S(11)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(77)*b**(S(5)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(21)/2), x), x, -S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(39)*x**(S(11)/2)) - S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(13)*x**(S(19)/2)) - S(8)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(195)*b*x**(S(7)/2)) - S(8)*c**(S(7)/2)*x**(S(3)/2)*(b + c*x**S(2))/(S(65)*b**S(2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(8)*c**S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(65)*b**S(2)*x**(S(3)/2)) + S(8)*c**(S(13)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(65)*b**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(4)*c**(S(13)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(65)*b**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + c*x**S(4))**(S(3)/2)/x**(S(23)/2), x), x, -S(4)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(55)*x**(S(13)/2)) - S(2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(15)*x**(S(21)/2)) - S(8)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(385)*b*x**(S(9)/2)) + S(8)*c**S(3)*sqrt(b*x**S(2) + c*x**S(4))/(S(231)*b**S(2)*x**(S(5)/2)) + S(4)*c**(S(15)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(231)*b**(S(9)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(13)/2)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(15)*b**(S(11)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(77)*c**(S(13)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(30)*b**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*c**S(3)*sqrt(x)) - S(18)*b*x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*c**S(2)) + S(2)*x**(S(7)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(11)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(11)/2)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(14)*b**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*c**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(7)*b**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*c**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(14)*b**S(2)*x**(S(3)/2)*(b + c*x**S(2))/(S(15)*c**(S(5)/2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(14)*b*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/(S(45)*c**S(2)) + S(2)*x**(S(5)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(9)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(9)/2)/sqrt(b*x**S(2) + c*x**S(4)), x), x, S(5)*b**(S(7)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(21)*c**(S(9)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(10)*b*sqrt(b*x**S(2) + c*x**S(4))/(S(21)*c**S(2)*sqrt(x)) + S(2)*x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)/sqrt(b*x**S(2) + c*x**S(4)), x), x, S(6)*b**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*c**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(3)*b**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*c**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(6)*b*x**(S(3)/2)*(b + c*x**S(2))/(S(5)*c**(S(3)/2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(2)*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -b**(S(3)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(3)*c**(S(5)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*c*sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(2)*b**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(c**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + b**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(c**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(2)*x**(S(3)/2)*(b + c*x**S(2))/(sqrt(c)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/sqrt(b*x**S(2) + c*x**S(4)), x), x, x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(b**(S(1)/4)*c**(S(1)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))), x), x, S(2)*sqrt(c)*x**(S(3)/2)*(b + c*x**S(2))/(b*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(2)*sqrt(b*x**S(2) + c*x**S(4))/(b*x**(S(3)/2)) - S(2)*c**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(b**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) + c**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(b**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*b*x**(S(5)/2)) - c**(S(3)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(3)*b**(S(5)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(5)/2)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b*x**(S(7)/2)) - S(6)*c**(S(3)/2)*x**(S(3)/2)*(b + c*x**S(2))/(S(5)*b**S(2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(6)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b**S(2)*x**(S(3)/2)) + S(6)*c**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*b**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(3)*c**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*b**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(7)/2)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*b*x**(S(9)/2)) + S(10)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(21)*b**S(2)*x**(S(5)/2)) + S(5)*c**(S(7)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(21)*b**(S(9)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(9)/2)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(9)*b*x**(S(11)/2)) + S(14)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(45)*b**S(2)*x**(S(7)/2)) + S(14)*c**(S(5)/2)*x**(S(3)/2)*(b + c*x**S(2))/(S(15)*b**S(3)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(14)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(15)*b**S(3)*x**(S(3)/2)) - S(14)*c**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*b**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(7)*c**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*b**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(11)/2)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(11)*b*x**(S(13)/2)) + S(18)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*b**S(2)*x**(S(9)/2)) - S(30)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(77)*b**S(3)*x**(S(5)/2)) - S(15)*c**(S(11)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(77)*b**(S(13)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(17)/2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(15)*b**(S(7)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(14)*c**(S(13)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(15)*b*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*c**S(3)*sqrt(x)) - x**(S(11)/2)/(c*sqrt(b*x**S(2) + c*x**S(4))) + S(9)*x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(15)/2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(21)*b**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*c**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(21)*b**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(10)*c**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(21)*b*x**(S(3)/2)*(b + c*x**S(2))/(S(5)*c**(S(5)/2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - x**(S(9)/2)/(c*sqrt(b*x**S(2) + c*x**S(4))) + S(7)*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(13)/2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(5)*b**(S(3)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(6)*c**(S(9)/4)*sqrt(b*x**S(2) + c*x**S(4))) - x**(S(7)/2)/(c*sqrt(b*x**S(2) + c*x**S(4))) + S(5)*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*c**S(2)*sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(11)/2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(3)*b**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(c**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(3)*b**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(2)*c**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) - x**(S(5)/2)/(c*sqrt(b*x**S(2) + c*x**S(4))) + S(3)*x**(S(3)/2)*(b + c*x**S(2))/(c**(S(3)/2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(9)/2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -x**(S(3)/2)/(c*sqrt(b*x**S(2) + c*x**S(4))) + x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(2)*b**(S(1)/4)*c**(S(5)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, x**(S(5)/2)/(b*sqrt(b*x**S(2) + c*x**S(4))) - x**(S(3)/2)*(b + c*x**S(2))/(b*sqrt(c)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(b**(S(3)/4)*c**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))) - x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(2)*b**(S(3)/4)*c**(S(3)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, x**(S(3)/2)/(b*sqrt(b*x**S(2) + c*x**S(4))) + x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(2)*b**(S(5)/4)*c**(S(1)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, sqrt(x)/(b*sqrt(b*x**S(2) + c*x**S(4))) + S(3)*sqrt(c)*x**(S(3)/2)*(b + c*x**S(2))/(b**S(2)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(3)*sqrt(b*x**S(2) + c*x**S(4))/(b**S(2)*x**(S(3)/2)) - S(3)*c**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(b**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(3)*c**(S(1)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(2)*b**(S(7)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(1)/(b*sqrt(x)*sqrt(b*x**S(2) + c*x**S(4))) - S(5)*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*b**S(2)*x**(S(5)/2)) - S(5)*c**(S(3)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(6)*b**(S(9)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(1)/(b*x**(S(3)/2)*sqrt(b*x**S(2) + c*x**S(4))) - S(7)*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b**S(2)*x**(S(7)/2)) - S(21)*c**(S(3)/2)*x**(S(3)/2)*(b + c*x**S(2))/(S(5)*b**S(3)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) + S(21)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(5)*b**S(3)*x**(S(3)/2)) + S(21)*c**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(5)*b**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))) - S(21)*c**(S(5)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(10)*b**(S(11)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(3)/2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(1)/(b*x**(S(5)/2)*sqrt(b*x**S(2) + c*x**S(4))) - S(9)*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*b**S(2)*x**(S(9)/2)) + S(15)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(7)*b**S(3)*x**(S(5)/2)) + S(15)*c**(S(7)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(14)*b**(S(13)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(5)/2)*(b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(1)/(b*x**(S(7)/2)*sqrt(b*x**S(2) + c*x**S(4))) - S(11)*sqrt(b*x**S(2) + c*x**S(4))/(S(9)*b**S(2)*x**(S(11)/2)) + S(77)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(45)*b**S(3)*x**(S(7)/2)) + S(77)*c**(S(5)/2)*x**(S(3)/2)*(b + c*x**S(2))/(S(15)*b**S(4)*(sqrt(b) + sqrt(c)*x)*sqrt(b*x**S(2) + c*x**S(4))) - S(77)*c**S(2)*sqrt(b*x**S(2) + c*x**S(4))/(S(15)*b**S(4)*x**(S(3)/2)) - S(77)*c**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_e(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(15)*b**(S(15)/4)*sqrt(b*x**S(2) + c*x**S(4))) + S(77)*c**(S(9)/4)*x*sqrt((b + c*x**S(2))/(sqrt(b) + sqrt(c)*x)**S(2))*(sqrt(b) + sqrt(c)*x)*elliptic_f(S(2)*atan(c**(S(1)/4)*sqrt(x)/b**(S(1)/4)), S(1)/2)/(S(30)*b**(S(15)/4)*sqrt(b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a**S(2)*(d*x)**(m + S(1))/(d*(m + S(1))) + S(2)*a*b*(d*x)**(m + S(3))/(d**S(3)*(m + S(3))) + b**S(2)*(d*x)**(m + S(5))/(d**S(5)*(m + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a**S(2)*x**S(4)/S(4) + a*b*x**S(6)/S(3) + b**S(2)*x**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a**S(2)*x**S(3)/S(3) + S(2)*a*b*x**S(5)/S(5) + b**S(2)*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a**S(2)*x**S(2)/S(2) + a*b*x**S(4)/S(2) + b**S(2)*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4), x), x, a**S(2)*x + S(2)*a*b*x**S(3)/S(3) + b**S(2)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x, x), x, a**S(2)*log(x) + a*b*x**S(2) + b**S(2)*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(2), x), x, -a**S(2)/x + S(2)*a*b*x + b**S(2)*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(3), x), x, -a**S(2)/(S(2)*x**S(2)) + S(2)*a*b*log(x) + b**S(2)*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(4), x), x, -a**S(2)/(S(3)*x**S(3)) - S(2)*a*b/x + b**S(2)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(5), x), x, -a**S(2)/(S(4)*x**S(4)) - a*b/x**S(2) + b**S(2)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(6), x), x, -a**S(2)/(S(5)*x**S(5)) - S(2)*a*b/(S(3)*x**S(3)) - b**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(7), x), x, -a**S(2)/(S(6)*x**S(6)) - a*b/(S(2)*x**S(4)) - b**S(2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(8), x), x, -a**S(2)/(S(7)*x**S(7)) - S(2)*a*b/(S(5)*x**S(5)) - b**S(2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a**S(4)*(d*x)**(m + S(1))/(d*(m + S(1))) + S(4)*a**S(3)*b*(d*x)**(m + S(3))/(d**S(3)*(m + S(3))) + S(6)*a**S(2)*b**S(2)*(d*x)**(m + S(5))/(d**S(5)*(m + S(5))) + S(4)*a*b**S(3)*(d*x)**(m + S(7))/(d**S(7)*(m + S(7))) + b**S(4)*(d*x)**(m + S(9))/(d**S(9)*(m + S(9))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a**S(4)*x**S(7)/S(7) + S(4)*a**S(3)*b*x**S(9)/S(9) + S(6)*a**S(2)*b**S(2)*x**S(11)/S(11) + S(4)*a*b**S(3)*x**S(13)/S(13) + b**S(4)*x**S(15)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a**S(4)*x**S(6)/S(6) + a**S(3)*b*x**S(8)/S(2) + S(3)*a**S(2)*b**S(2)*x**S(10)/S(5) + a*b**S(3)*x**S(12)/S(3) + b**S(4)*x**S(14)/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a**S(4)*x**S(5)/S(5) + S(4)*a**S(3)*b*x**S(7)/S(7) + S(2)*a**S(2)*b**S(2)*x**S(9)/S(3) + S(4)*a*b**S(3)*x**S(11)/S(11) + b**S(4)*x**S(13)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -a*(a + b*x**S(2))**S(5)/(S(10)*b**S(2)) + (a + b*x**S(2))**S(6)/(S(12)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a**S(4)*x**S(3)/S(3) + S(4)*a**S(3)*b*x**S(5)/S(5) + S(6)*a**S(2)*b**S(2)*x**S(7)/S(7) + S(4)*a*b**S(3)*x**S(9)/S(9) + b**S(4)*x**S(11)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, (a + b*x**S(2))**S(5)/(S(10)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a**S(4)*x + S(4)*a**S(3)*b*x**S(3)/S(3) + S(6)*a**S(2)*b**S(2)*x**S(5)/S(5) + S(4)*a*b**S(3)*x**S(7)/S(7) + b**S(4)*x**S(9)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x, x), x, a**S(4)*log(x) + S(2)*a**S(3)*b*x**S(2) + S(3)*a**S(2)*b**S(2)*x**S(4)/S(2) + S(2)*a*b**S(3)*x**S(6)/S(3) + b**S(4)*x**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(2), x), x, -a**S(4)/x + S(4)*a**S(3)*b*x + S(2)*a**S(2)*b**S(2)*x**S(3) + S(4)*a*b**S(3)*x**S(5)/S(5) + b**S(4)*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(3), x), x, -a**S(4)/(S(2)*x**S(2)) + S(4)*a**S(3)*b*log(x) + S(3)*a**S(2)*b**S(2)*x**S(2) + a*b**S(3)*x**S(4) + b**S(4)*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(4), x), x, -a**S(4)/(S(3)*x**S(3)) - S(4)*a**S(3)*b/x + S(6)*a**S(2)*b**S(2)*x + S(4)*a*b**S(3)*x**S(3)/S(3) + b**S(4)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(5), x), x, -a**S(4)/(S(4)*x**S(4)) - S(2)*a**S(3)*b/x**S(2) + S(6)*a**S(2)*b**S(2)*log(x) + S(2)*a*b**S(3)*x**S(2) + b**S(4)*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(6), x), x, -a**S(4)/(S(5)*x**S(5)) - S(4)*a**S(3)*b/(S(3)*x**S(3)) - S(6)*a**S(2)*b**S(2)/x + S(4)*a*b**S(3)*x + b**S(4)*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(7), x), x, -a**S(4)/(S(6)*x**S(6)) - a**S(3)*b/x**S(4) - S(3)*a**S(2)*b**S(2)/x**S(2) + S(4)*a*b**S(3)*log(x) + b**S(4)*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(8), x), x, -a**S(4)/(S(7)*x**S(7)) - S(4)*a**S(3)*b/(S(5)*x**S(5)) - S(2)*a**S(2)*b**S(2)/x**S(3) - S(4)*a*b**S(3)/x + b**S(4)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(9), x), x, -a**S(4)/(S(8)*x**S(8)) - S(2)*a**S(3)*b/(S(3)*x**S(6)) - S(3)*a**S(2)*b**S(2)/(S(2)*x**S(4)) - S(2)*a*b**S(3)/x**S(2) + b**S(4)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(10), x), x, -a**S(4)/(S(9)*x**S(9)) - S(4)*a**S(3)*b/(S(7)*x**S(7)) - S(6)*a**S(2)*b**S(2)/(S(5)*x**S(5)) - S(4)*a*b**S(3)/(S(3)*x**S(3)) - b**S(4)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(11), x), x, -(a + b*x**S(2))**S(5)/(S(10)*a*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(12), x), x, -a**S(4)/(S(11)*x**S(11)) - S(4)*a**S(3)*b/(S(9)*x**S(9)) - S(6)*a**S(2)*b**S(2)/(S(7)*x**S(7)) - S(4)*a*b**S(3)/(S(5)*x**S(5)) - b**S(4)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(13), x), x, -(a + b*x**S(2))**S(5)/(S(12)*a*x**S(12)) + b*(a + b*x**S(2))**S(5)/(S(60)*a**S(2)*x**S(10)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(13), x), x, -a**S(4)/(S(12)*x**S(12)) - S(2)*a**S(3)*b/(S(5)*x**S(10)) - S(3)*a**S(2)*b**S(2)/(S(4)*x**S(8)) - S(2)*a*b**S(3)/(S(3)*x**S(6)) - b**S(4)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(14), x), x, -a**S(4)/(S(13)*x**S(13)) - S(4)*a**S(3)*b/(S(11)*x**S(11)) - S(2)*a**S(2)*b**S(2)/(S(3)*x**S(9)) - S(4)*a*b**S(3)/(S(7)*x**S(7)) - b**S(4)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(15), x), x, -a**S(4)/(S(14)*x**S(14)) - a**S(3)*b/(S(3)*x**S(12)) - S(3)*a**S(2)*b**S(2)/(S(5)*x**S(10)) - a*b**S(3)/(S(2)*x**S(8)) - b**S(4)/(S(6)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/x**S(16), x), x, -a**S(4)/(S(15)*x**S(15)) - S(4)*a**S(3)*b/(S(13)*x**S(13)) - S(6)*a**S(2)*b**S(2)/(S(11)*x**S(11)) - S(4)*a*b**S(3)/(S(9)*x**S(9)) - b**S(4)/(S(7)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(6)*(d*x)**(m + S(1))/(d*(m + S(1))) + S(6)*a**S(5)*b*(d*x)**(m + S(3))/(d**S(3)*(m + S(3))) + S(15)*a**S(4)*b**S(2)*(d*x)**(m + S(5))/(d**S(5)*(m + S(5))) + S(20)*a**S(3)*b**S(3)*(d*x)**(m + S(7))/(d**S(7)*(m + S(7))) + S(15)*a**S(2)*b**S(4)*(d*x)**(m + S(9))/(d**S(9)*(m + S(9))) + S(6)*a*b**S(5)*(d*x)**(m + S(11))/(d**S(11)*(m + S(11))) + b**S(6)*(d*x)**(m + S(13))/(d**S(13)*(m + S(13))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(6)*x**S(9)/S(9) + S(6)*a**S(5)*b*x**S(11)/S(11) + S(15)*a**S(4)*b**S(2)*x**S(13)/S(13) + S(4)*a**S(3)*b**S(3)*x**S(15)/S(3) + S(15)*a**S(2)*b**S(4)*x**S(17)/S(17) + S(6)*a*b**S(5)*x**S(19)/S(19) + b**S(6)*x**S(21)/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(6)*x**S(8)/S(8) + S(3)*a**S(5)*b*x**S(10)/S(5) + S(5)*a**S(4)*b**S(2)*x**S(12)/S(4) + S(10)*a**S(3)*b**S(3)*x**S(14)/S(7) + S(15)*a**S(2)*b**S(4)*x**S(16)/S(16) + a*b**S(5)*x**S(18)/S(3) + b**S(6)*x**S(20)/S(20), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(6)*x**S(7)/S(7) + S(2)*a**S(5)*b*x**S(9)/S(3) + S(15)*a**S(4)*b**S(2)*x**S(11)/S(11) + S(20)*a**S(3)*b**S(3)*x**S(13)/S(13) + a**S(2)*b**S(4)*x**S(15) + S(6)*a*b**S(5)*x**S(17)/S(17) + b**S(6)*x**S(19)/S(19), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(2)*(a + b*x**S(2))**S(7)/(S(14)*b**S(3)) - a*(a + b*x**S(2))**S(8)/(S(8)*b**S(3)) + (a + b*x**S(2))**S(9)/(S(18)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(6)*x**S(5)/S(5) + S(6)*a**S(5)*b*x**S(7)/S(7) + S(5)*a**S(4)*b**S(2)*x**S(9)/S(3) + S(20)*a**S(3)*b**S(3)*x**S(11)/S(11) + S(15)*a**S(2)*b**S(4)*x**S(13)/S(13) + S(2)*a*b**S(5)*x**S(15)/S(5) + b**S(6)*x**S(17)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -a*(a + b*x**S(2))**S(7)/(S(14)*b**S(2)) + (a + b*x**S(2))**S(8)/(S(16)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(6)*x**S(3)/S(3) + S(6)*a**S(5)*b*x**S(5)/S(5) + S(15)*a**S(4)*b**S(2)*x**S(7)/S(7) + S(20)*a**S(3)*b**S(3)*x**S(9)/S(9) + S(15)*a**S(2)*b**S(4)*x**S(11)/S(11) + S(6)*a*b**S(5)*x**S(13)/S(13) + b**S(6)*x**S(15)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, (a + b*x**S(2))**S(7)/(S(14)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(6)*x + S(2)*a**S(5)*b*x**S(3) + S(3)*a**S(4)*b**S(2)*x**S(5) + S(20)*a**S(3)*b**S(3)*x**S(7)/S(7) + S(5)*a**S(2)*b**S(4)*x**S(9)/S(3) + S(6)*a*b**S(5)*x**S(11)/S(11) + b**S(6)*x**S(13)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x, x), x, a**S(6)*log(x) + S(3)*a**S(5)*b*x**S(2) + S(15)*a**S(4)*b**S(2)*x**S(4)/S(4) + S(10)*a**S(3)*b**S(3)*x**S(6)/S(3) + S(15)*a**S(2)*b**S(4)*x**S(8)/S(8) + S(3)*a*b**S(5)*x**S(10)/S(5) + b**S(6)*x**S(12)/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(2), x), x, -a**S(6)/x + S(6)*a**S(5)*b*x + S(5)*a**S(4)*b**S(2)*x**S(3) + S(4)*a**S(3)*b**S(3)*x**S(5) + S(15)*a**S(2)*b**S(4)*x**S(7)/S(7) + S(2)*a*b**S(5)*x**S(9)/S(3) + b**S(6)*x**S(11)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(3), x), x, -a**S(6)/(S(2)*x**S(2)) + S(6)*a**S(5)*b*log(x) + S(15)*a**S(4)*b**S(2)*x**S(2)/S(2) + S(5)*a**S(3)*b**S(3)*x**S(4) + S(5)*a**S(2)*b**S(4)*x**S(6)/S(2) + S(3)*a*b**S(5)*x**S(8)/S(4) + b**S(6)*x**S(10)/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(4), x), x, -a**S(6)/(S(3)*x**S(3)) - S(6)*a**S(5)*b/x + S(15)*a**S(4)*b**S(2)*x + S(20)*a**S(3)*b**S(3)*x**S(3)/S(3) + S(3)*a**S(2)*b**S(4)*x**S(5) + S(6)*a*b**S(5)*x**S(7)/S(7) + b**S(6)*x**S(9)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(5), x), x, -a**S(6)/(S(4)*x**S(4)) - S(3)*a**S(5)*b/x**S(2) + S(15)*a**S(4)*b**S(2)*log(x) + S(10)*a**S(3)*b**S(3)*x**S(2) + S(15)*a**S(2)*b**S(4)*x**S(4)/S(4) + a*b**S(5)*x**S(6) + b**S(6)*x**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(6), x), x, -a**S(6)/(S(5)*x**S(5)) - S(2)*a**S(5)*b/x**S(3) - S(15)*a**S(4)*b**S(2)/x + S(20)*a**S(3)*b**S(3)*x + S(5)*a**S(2)*b**S(4)*x**S(3) + S(6)*a*b**S(5)*x**S(5)/S(5) + b**S(6)*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(7), x), x, -a**S(6)/(S(6)*x**S(6)) - S(3)*a**S(5)*b/(S(2)*x**S(4)) - S(15)*a**S(4)*b**S(2)/(S(2)*x**S(2)) + S(20)*a**S(3)*b**S(3)*log(x) + S(15)*a**S(2)*b**S(4)*x**S(2)/S(2) + S(3)*a*b**S(5)*x**S(4)/S(2) + b**S(6)*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(8), x), x, -a**S(6)/(S(7)*x**S(7)) - S(6)*a**S(5)*b/(S(5)*x**S(5)) - S(5)*a**S(4)*b**S(2)/x**S(3) - S(20)*a**S(3)*b**S(3)/x + S(15)*a**S(2)*b**S(4)*x + S(2)*a*b**S(5)*x**S(3) + b**S(6)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(9), x), x, -a**S(6)/(S(8)*x**S(8)) - a**S(5)*b/x**S(6) - S(15)*a**S(4)*b**S(2)/(S(4)*x**S(4)) - S(10)*a**S(3)*b**S(3)/x**S(2) + S(15)*a**S(2)*b**S(4)*log(x) + S(3)*a*b**S(5)*x**S(2) + b**S(6)*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(10), x), x, -a**S(6)/(S(9)*x**S(9)) - S(6)*a**S(5)*b/(S(7)*x**S(7)) - S(3)*a**S(4)*b**S(2)/x**S(5) - S(20)*a**S(3)*b**S(3)/(S(3)*x**S(3)) - S(15)*a**S(2)*b**S(4)/x + S(6)*a*b**S(5)*x + b**S(6)*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(11), x), x, -a**S(6)/(S(10)*x**S(10)) - S(3)*a**S(5)*b/(S(4)*x**S(8)) - S(5)*a**S(4)*b**S(2)/(S(2)*x**S(6)) - S(5)*a**S(3)*b**S(3)/x**S(4) - S(15)*a**S(2)*b**S(4)/(S(2)*x**S(2)) + S(6)*a*b**S(5)*log(x) + b**S(6)*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(12), x), x, -a**S(6)/(S(11)*x**S(11)) - S(2)*a**S(5)*b/(S(3)*x**S(9)) - S(15)*a**S(4)*b**S(2)/(S(7)*x**S(7)) - S(4)*a**S(3)*b**S(3)/x**S(5) - S(5)*a**S(2)*b**S(4)/x**S(3) - S(6)*a*b**S(5)/x + b**S(6)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(13), x), x, -a**S(6)/(S(12)*x**S(12)) - S(3)*a**S(5)*b/(S(5)*x**S(10)) - S(15)*a**S(4)*b**S(2)/(S(8)*x**S(8)) - S(10)*a**S(3)*b**S(3)/(S(3)*x**S(6)) - S(15)*a**S(2)*b**S(4)/(S(4)*x**S(4)) - S(3)*a*b**S(5)/x**S(2) + b**S(6)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(14), x), x, -a**S(6)/(S(13)*x**S(13)) - S(6)*a**S(5)*b/(S(11)*x**S(11)) - S(5)*a**S(4)*b**S(2)/(S(3)*x**S(9)) - S(20)*a**S(3)*b**S(3)/(S(7)*x**S(7)) - S(3)*a**S(2)*b**S(4)/x**S(5) - S(2)*a*b**S(5)/x**S(3) - b**S(6)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(15), x), x, -(a + b*x**S(2))**S(7)/(S(14)*a*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(16), x), x, -a**S(6)/(S(15)*x**S(15)) - S(6)*a**S(5)*b/(S(13)*x**S(13)) - S(15)*a**S(4)*b**S(2)/(S(11)*x**S(11)) - S(20)*a**S(3)*b**S(3)/(S(9)*x**S(9)) - S(15)*a**S(2)*b**S(4)/(S(7)*x**S(7)) - S(6)*a*b**S(5)/(S(5)*x**S(5)) - b**S(6)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(17), x), x, -(a + b*x**S(2))**S(7)/(S(16)*a*x**S(16)) + b*(a + b*x**S(2))**S(7)/(S(112)*a**S(2)*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(18), x), x, -a**S(6)/(S(17)*x**S(17)) - S(2)*a**S(5)*b/(S(5)*x**S(15)) - S(15)*a**S(4)*b**S(2)/(S(13)*x**S(13)) - S(20)*a**S(3)*b**S(3)/(S(11)*x**S(11)) - S(5)*a**S(2)*b**S(4)/(S(3)*x**S(9)) - S(6)*a*b**S(5)/(S(7)*x**S(7)) - b**S(6)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(19), x), x, -(a + b*x**S(2))**S(7)/(S(18)*a*x**S(18)) + b*(a + b*x**S(2))**S(7)/(S(72)*a**S(2)*x**S(16)) - b**S(2)*(a + b*x**S(2))**S(7)/(S(504)*a**S(3)*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(20), x), x, -a**S(6)/(S(19)*x**S(19)) - S(6)*a**S(5)*b/(S(17)*x**S(17)) - a**S(4)*b**S(2)/x**S(15) - S(20)*a**S(3)*b**S(3)/(S(13)*x**S(13)) - S(15)*a**S(2)*b**S(4)/(S(11)*x**S(11)) - S(2)*a*b**S(5)/(S(3)*x**S(9)) - b**S(6)/(S(7)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(21), x), x, -a**S(6)/(S(20)*x**S(20)) - a**S(5)*b/(S(3)*x**S(18)) - S(15)*a**S(4)*b**S(2)/(S(16)*x**S(16)) - S(10)*a**S(3)*b**S(3)/(S(7)*x**S(14)) - S(5)*a**S(2)*b**S(4)/(S(4)*x**S(12)) - S(3)*a*b**S(5)/(S(5)*x**S(10)) - b**S(6)/(S(8)*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/x**S(22), x), x, -a**S(6)/(S(21)*x**S(21)) - S(6)*a**S(5)*b/(S(19)*x**S(19)) - S(15)*a**S(4)*b**S(2)/(S(17)*x**S(17)) - S(4)*a**S(3)*b**S(3)/(S(3)*x**S(15)) - S(15)*a**S(2)*b**S(4)/(S(13)*x**S(13)) - S(6)*a*b**S(5)/(S(11)*x**S(11)) - b**S(6)/(S(9)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, (d*x)**(m + S(1))*hyper((S(2), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(a**S(2)*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a**S(5)/(S(2)*b**S(6)*(a + b*x**S(2))) + S(5)*a**S(4)*log(a + b*x**S(2))/(S(2)*b**S(6)) - S(2)*a**S(3)*x**S(2)/b**S(5) + S(3)*a**S(2)*x**S(4)/(S(4)*b**S(4)) - a*x**S(6)/(S(3)*b**S(3)) + x**S(8)/(S(8)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -a**S(4)/(S(2)*b**S(5)*(a + b*x**S(2))) - S(2)*a**S(3)*log(a + b*x**S(2))/b**S(5) + S(3)*a**S(2)*x**S(2)/(S(2)*b**S(4)) - a*x**S(4)/(S(2)*b**S(3)) + x**S(6)/(S(6)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a**S(3)/(S(2)*b**S(4)*(a + b*x**S(2))) + S(3)*a**S(2)*log(a + b*x**S(2))/(S(2)*b**S(4)) - a*x**S(2)/b**S(3) + x**S(4)/(S(4)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -a**S(2)/(S(2)*b**S(3)*(a + b*x**S(2))) - a*log(a + b*x**S(2))/b**S(3) + x**S(2)/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a/(S(2)*b**S(2)*(a + b*x**S(2))) + log(a + b*x**S(2))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -S(1)/(S(2)*b*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, S(1)/(S(2)*a*(a + b*x**S(2))) + log(x)/a**S(2) - log(a + b*x**S(2))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, -b/(S(2)*a**S(2)*(a + b*x**S(2))) - S(1)/(S(2)*a**S(2)*x**S(2)) - S(2)*b*log(x)/a**S(3) + b*log(a + b*x**S(2))/a**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, -S(1)/(S(4)*a**S(2)*x**S(4)) + b**S(2)/(S(2)*a**S(3)*(a + b*x**S(2))) + b/(a**S(3)*x**S(2)) + S(3)*b**S(2)*log(x)/a**S(4) - S(3)*b**S(2)*log(a + b*x**S(2))/(S(2)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(9)*a**(S(7)/2)*atan(sqrt(b)*x/sqrt(a))/(S(2)*b**(S(11)/2)) - S(9)*a**S(3)*x/(S(2)*b**S(5)) + S(3)*a**S(2)*x**S(3)/(S(2)*b**S(4)) - S(9)*a*x**S(5)/(S(10)*b**S(3)) - x**S(9)/(S(2)*b*(a + b*x**S(2))) + S(9)*x**S(7)/(S(14)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -S(7)*a**(S(5)/2)*atan(sqrt(b)*x/sqrt(a))/(S(2)*b**(S(9)/2)) + S(7)*a**S(2)*x/(S(2)*b**S(4)) - S(7)*a*x**S(3)/(S(6)*b**S(3)) - x**S(7)/(S(2)*b*(a + b*x**S(2))) + S(7)*x**S(5)/(S(10)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(5)*a**(S(3)/2)*atan(sqrt(b)*x/sqrt(a))/(S(2)*b**(S(7)/2)) - S(5)*a*x/(S(2)*b**S(3)) - x**S(5)/(S(2)*b*(a + b*x**S(2))) + S(5)*x**S(3)/(S(6)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -S(3)*sqrt(a)*atan(sqrt(b)*x/sqrt(a))/(S(2)*b**(S(5)/2)) - x**S(3)/(S(2)*b*(a + b*x**S(2))) + S(3)*x/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -x/(S(2)*b*(a + b*x**S(2))) + atan(sqrt(b)*x/sqrt(a))/(S(2)*sqrt(a)*b**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, x/(S(2)*a*(a + b*x**S(2))) + atan(sqrt(b)*x/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, S(1)/(S(2)*a*x*(a + b*x**S(2))) - S(3)/(S(2)*a**S(2)*x) - S(3)*sqrt(b)*atan(sqrt(b)*x/sqrt(a))/(S(2)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, S(1)/(S(2)*a*x**S(3)*(a + b*x**S(2))) - S(5)/(S(6)*a**S(2)*x**S(3)) + S(5)*b/(S(2)*a**S(3)*x) + S(5)*b**(S(3)/2)*atan(sqrt(b)*x/sqrt(a))/(S(2)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, S(1)/(S(2)*a*x**S(5)*(a + b*x**S(2))) - S(7)/(S(10)*a**S(2)*x**S(5)) + S(7)*b/(S(6)*a**S(3)*x**S(3)) - S(7)*b**S(2)/(S(2)*a**S(4)*x) - S(7)*b**(S(5)/2)*atan(sqrt(b)*x/sqrt(a))/(S(2)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, (d*x)**(m + S(1))*hyper((S(4), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(a**S(4)*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a**S(5)/(S(6)*b**S(6)*(a + b*x**S(2))**S(3)) - S(5)*a**S(4)/(S(4)*b**S(6)*(a + b*x**S(2))**S(2)) + S(5)*a**S(3)/(b**S(6)*(a + b*x**S(2))) + S(5)*a**S(2)*log(a + b*x**S(2))/b**S(6) - S(2)*a*x**S(2)/b**S(5) + x**S(4)/(S(4)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -a**S(4)/(S(6)*b**S(5)*(a + b*x**S(2))**S(3)) + a**S(3)/(b**S(5)*(a + b*x**S(2))**S(2)) - S(3)*a**S(2)/(b**S(5)*(a + b*x**S(2))) - S(2)*a*log(a + b*x**S(2))/b**S(5) + x**S(2)/(S(2)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a**S(3)/(S(6)*b**S(4)*(a + b*x**S(2))**S(3)) - S(3)*a**S(2)/(S(4)*b**S(4)*(a + b*x**S(2))**S(2)) + S(3)*a/(S(2)*b**S(4)*(a + b*x**S(2))) + log(a + b*x**S(2))/(S(2)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, x**S(6)/(S(6)*a*(a + b*x**S(2))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, a/(S(6)*b**S(2)*(a + b*x**S(2))**S(3)) - S(1)/(S(4)*b**S(2)*(a + b*x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -S(1)/(S(6)*b*(a + b*x**S(2))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, S(1)/(S(6)*a*(a + b*x**S(2))**S(3)) + S(1)/(S(4)*a**S(2)*(a + b*x**S(2))**S(2)) + S(1)/(S(2)*a**S(3)*(a + b*x**S(2))) + log(x)/a**S(4) - log(a + b*x**S(2))/(S(2)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, -b/(S(6)*a**S(2)*(a + b*x**S(2))**S(3)) - b/(S(2)*a**S(3)*(a + b*x**S(2))**S(2)) - S(3)*b/(S(2)*a**S(4)*(a + b*x**S(2))) - S(1)/(S(2)*a**S(4)*x**S(2)) - S(4)*b*log(x)/a**S(5) + S(2)*b*log(a + b*x**S(2))/a**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, b**S(2)/(S(6)*a**S(3)*(a + b*x**S(2))**S(3)) + S(3)*b**S(2)/(S(4)*a**S(4)*(a + b*x**S(2))**S(2)) - S(1)/(S(4)*a**S(4)*x**S(4)) + S(3)*b**S(2)/(a**S(5)*(a + b*x**S(2))) + S(2)*b/(a**S(5)*x**S(2)) + S(10)*b**S(2)*log(x)/a**S(6) - S(5)*b**S(2)*log(a + b*x**S(2))/a**S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(12)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -S(231)*a**(S(5)/2)*atan(sqrt(b)*x/sqrt(a))/(S(16)*b**(S(13)/2)) + S(231)*a**S(2)*x/(S(16)*b**S(6)) - S(77)*a*x**S(3)/(S(16)*b**S(5)) - x**S(11)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(11)*x**S(9)/(S(24)*b**S(2)*(a + b*x**S(2))**S(2)) - S(33)*x**S(7)/(S(16)*b**S(3)*(a + b*x**S(2))) + S(231)*x**S(5)/(S(80)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, S(105)*a**(S(3)/2)*atan(sqrt(b)*x/sqrt(a))/(S(16)*b**(S(11)/2)) - S(105)*a*x/(S(16)*b**S(5)) - x**S(9)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(3)*x**S(7)/(S(8)*b**S(2)*(a + b*x**S(2))**S(2)) - S(21)*x**S(5)/(S(16)*b**S(3)*(a + b*x**S(2))) + S(35)*x**S(3)/(S(16)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -S(35)*sqrt(a)*atan(sqrt(b)*x/sqrt(a))/(S(16)*b**(S(9)/2)) - x**S(7)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(7)*x**S(5)/(S(24)*b**S(2)*(a + b*x**S(2))**S(2)) - S(35)*x**S(3)/(S(48)*b**S(3)*(a + b*x**S(2))) + S(35)*x/(S(16)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -x**S(5)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(5)*x**S(3)/(S(24)*b**S(2)*(a + b*x**S(2))**S(2)) - S(5)*x/(S(16)*b**S(3)*(a + b*x**S(2))) + S(5)*atan(sqrt(b)*x/sqrt(a))/(S(16)*sqrt(a)*b**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -x**S(3)/(S(6)*b*(a + b*x**S(2))**S(3)) - x/(S(8)*b**S(2)*(a + b*x**S(2))**S(2)) + x/(S(16)*a*b**S(2)*(a + b*x**S(2))) + atan(sqrt(b)*x/sqrt(a))/(S(16)*a**(S(3)/2)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -x/(S(6)*b*(a + b*x**S(2))**S(3)) + x/(S(24)*a*b*(a + b*x**S(2))**S(2)) + x/(S(16)*a**S(2)*b*(a + b*x**S(2))) + atan(sqrt(b)*x/sqrt(a))/(S(16)*a**(S(5)/2)*b**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(-2)), x), x, x/(S(6)*a*(a + b*x**S(2))**S(3)) + S(5)*x/(S(24)*a**S(2)*(a + b*x**S(2))**S(2)) + S(5)*x/(S(16)*a**S(3)*(a + b*x**S(2))) + S(5)*atan(sqrt(b)*x/sqrt(a))/(S(16)*a**(S(7)/2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, S(1)/(S(6)*a*x*(a + b*x**S(2))**S(3)) + S(7)/(S(24)*a**S(2)*x*(a + b*x**S(2))**S(2)) + S(35)/(S(48)*a**S(3)*x*(a + b*x**S(2))) - S(35)/(S(16)*a**S(4)*x) - S(35)*sqrt(b)*atan(sqrt(b)*x/sqrt(a))/(S(16)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, S(1)/(S(6)*a*x**S(3)*(a + b*x**S(2))**S(3)) + S(3)/(S(8)*a**S(2)*x**S(3)*(a + b*x**S(2))**S(2)) + S(21)/(S(16)*a**S(3)*x**S(3)*(a + b*x**S(2))) - S(35)/(S(16)*a**S(4)*x**S(3)) + S(105)*b/(S(16)*a**S(5)*x) + S(105)*b**(S(3)/2)*atan(sqrt(b)*x/sqrt(a))/(S(16)*a**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, S(1)/(S(6)*a*x**S(5)*(a + b*x**S(2))**S(3)) + S(11)/(S(24)*a**S(2)*x**S(5)*(a + b*x**S(2))**S(2)) + S(33)/(S(16)*a**S(3)*x**S(5)*(a + b*x**S(2))) - S(231)/(S(80)*a**S(4)*x**S(5)) + S(77)*b/(S(16)*a**S(5)*x**S(3)) - S(231)*b**S(2)/(S(16)*a**S(6)*x) - S(231)*b**(S(5)/2)*atan(sqrt(b)*x/sqrt(a))/(S(16)*a**(S(13)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, (d*x)**(m + S(1))*hyper((S(6), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(a**S(6)*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(15)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(7)/(S(10)*b**S(8)*(a + b*x**S(2))**S(5)) - S(7)*a**S(6)/(S(8)*b**S(8)*(a + b*x**S(2))**S(4)) + S(7)*a**S(5)/(S(2)*b**S(8)*(a + b*x**S(2))**S(3)) - S(35)*a**S(4)/(S(4)*b**S(8)*(a + b*x**S(2))**S(2)) + S(35)*a**S(3)/(S(2)*b**S(8)*(a + b*x**S(2))) + S(21)*a**S(2)*log(a + b*x**S(2))/(S(2)*b**S(8)) - S(3)*a*x**S(2)/b**S(7) + x**S(4)/(S(4)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(13)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -a**S(6)/(S(10)*b**S(7)*(a + b*x**S(2))**S(5)) + S(3)*a**S(5)/(S(4)*b**S(7)*(a + b*x**S(2))**S(4)) - S(5)*a**S(4)/(S(2)*b**S(7)*(a + b*x**S(2))**S(3)) + S(5)*a**S(3)/(b**S(7)*(a + b*x**S(2))**S(2)) - S(15)*a**S(2)/(S(2)*b**S(7)*(a + b*x**S(2))) - S(3)*a*log(a + b*x**S(2))/b**S(7) + x**S(2)/(S(2)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a**S(5)/(S(10)*b**S(6)*(a + b*x**S(2))**S(5)) - S(5)*a**S(4)/(S(8)*b**S(6)*(a + b*x**S(2))**S(4)) + S(5)*a**S(3)/(S(3)*b**S(6)*(a + b*x**S(2))**S(3)) - S(5)*a**S(2)/(S(2)*b**S(6)*(a + b*x**S(2))**S(2)) + S(5)*a/(S(2)*b**S(6)*(a + b*x**S(2))) + log(a + b*x**S(2))/(S(2)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, x**S(10)/(S(10)*a*(a + b*x**S(2))**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, x**S(8)/(S(10)*a*(a + b*x**S(2))**S(5)) + x**S(8)/(S(40)*a**S(2)*(a + b*x**S(2))**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -a**S(2)/(S(10)*b**S(3)*(a + b*x**S(2))**S(5)) + a/(S(4)*b**S(3)*(a + b*x**S(2))**S(4)) - S(1)/(S(6)*b**S(3)*(a + b*x**S(2))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, a/(S(10)*b**S(2)*(a + b*x**S(2))**S(5)) - S(1)/(S(8)*b**S(2)*(a + b*x**S(2))**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -S(1)/(S(10)*b*(a + b*x**S(2))**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, S(1)/(S(10)*a*(a + b*x**S(2))**S(5)) + S(1)/(S(8)*a**S(2)*(a + b*x**S(2))**S(4)) + S(1)/(S(6)*a**S(3)*(a + b*x**S(2))**S(3)) + S(1)/(S(4)*a**S(4)*(a + b*x**S(2))**S(2)) + S(1)/(S(2)*a**S(5)*(a + b*x**S(2))) + log(x)/a**S(6) - log(a + b*x**S(2))/(S(2)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, -b/(S(10)*a**S(2)*(a + b*x**S(2))**S(5)) - b/(S(4)*a**S(3)*(a + b*x**S(2))**S(4)) - b/(S(2)*a**S(4)*(a + b*x**S(2))**S(3)) - b/(a**S(5)*(a + b*x**S(2))**S(2)) - S(5)*b/(S(2)*a**S(6)*(a + b*x**S(2))) - S(1)/(S(2)*a**S(6)*x**S(2)) - S(6)*b*log(x)/a**S(7) + S(3)*b*log(a + b*x**S(2))/a**S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, b**S(2)/(S(10)*a**S(3)*(a + b*x**S(2))**S(5)) + S(3)*b**S(2)/(S(8)*a**S(4)*(a + b*x**S(2))**S(4)) + b**S(2)/(a**S(5)*(a + b*x**S(2))**S(3)) + S(5)*b**S(2)/(S(2)*a**S(6)*(a + b*x**S(2))**S(2)) - S(1)/(S(4)*a**S(6)*x**S(4)) + S(15)*b**S(2)/(S(2)*a**S(7)*(a + b*x**S(2))) + S(3)*b/(a**S(7)*x**S(2)) + S(21)*b**S(2)*log(x)/a**S(8) - S(21)*b**S(2)*log(a + b*x**S(2))/(S(2)*a**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(16)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -S(9009)*a**(S(5)/2)*atan(sqrt(b)*x/sqrt(a))/(S(256)*b**(S(17)/2)) + S(9009)*a**S(2)*x/(S(256)*b**S(8)) - S(3003)*a*x**S(3)/(S(256)*b**S(7)) - x**S(15)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(3)*x**S(13)/(S(16)*b**S(2)*(a + b*x**S(2))**S(4)) - S(13)*x**S(11)/(S(32)*b**S(3)*(a + b*x**S(2))**S(3)) - S(143)*x**S(9)/(S(128)*b**S(4)*(a + b*x**S(2))**S(2)) - S(1287)*x**S(7)/(S(256)*b**S(5)*(a + b*x**S(2))) + S(9009)*x**S(5)/(S(1280)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(14)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, S(3003)*a**(S(3)/2)*atan(sqrt(b)*x/sqrt(a))/(S(256)*b**(S(15)/2)) - S(3003)*a*x/(S(256)*b**S(7)) - x**S(13)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(13)*x**S(11)/(S(80)*b**S(2)*(a + b*x**S(2))**S(4)) - S(143)*x**S(9)/(S(480)*b**S(3)*(a + b*x**S(2))**S(3)) - S(429)*x**S(7)/(S(640)*b**S(4)*(a + b*x**S(2))**S(2)) - S(3003)*x**S(5)/(S(1280)*b**S(5)*(a + b*x**S(2))) + S(1001)*x**S(3)/(S(256)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(12)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -S(693)*sqrt(a)*atan(sqrt(b)*x/sqrt(a))/(S(256)*b**(S(13)/2)) - x**S(11)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(11)*x**S(9)/(S(80)*b**S(2)*(a + b*x**S(2))**S(4)) - S(33)*x**S(7)/(S(160)*b**S(3)*(a + b*x**S(2))**S(3)) - S(231)*x**S(5)/(S(640)*b**S(4)*(a + b*x**S(2))**S(2)) - S(231)*x**S(3)/(S(256)*b**S(5)*(a + b*x**S(2))) + S(693)*x/(S(256)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -x**S(9)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(9)*x**S(7)/(S(80)*b**S(2)*(a + b*x**S(2))**S(4)) - S(21)*x**S(5)/(S(160)*b**S(3)*(a + b*x**S(2))**S(3)) - S(21)*x**S(3)/(S(128)*b**S(4)*(a + b*x**S(2))**S(2)) - S(63)*x/(S(256)*b**S(5)*(a + b*x**S(2))) + S(63)*atan(sqrt(b)*x/sqrt(a))/(S(256)*sqrt(a)*b**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -x**S(7)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(7)*x**S(5)/(S(80)*b**S(2)*(a + b*x**S(2))**S(4)) - S(7)*x**S(3)/(S(96)*b**S(3)*(a + b*x**S(2))**S(3)) - S(7)*x/(S(128)*b**S(4)*(a + b*x**S(2))**S(2)) + S(7)*x/(S(256)*a*b**S(4)*(a + b*x**S(2))) + S(7)*atan(sqrt(b)*x/sqrt(a))/(S(256)*a**(S(3)/2)*b**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -x**S(5)/(S(10)*b*(a + b*x**S(2))**S(5)) - x**S(3)/(S(16)*b**S(2)*(a + b*x**S(2))**S(4)) - x/(S(32)*b**S(3)*(a + b*x**S(2))**S(3)) + x/(S(128)*a*b**S(3)*(a + b*x**S(2))**S(2)) + S(3)*x/(S(256)*a**S(2)*b**S(3)*(a + b*x**S(2))) + S(3)*atan(sqrt(b)*x/sqrt(a))/(S(256)*a**(S(5)/2)*b**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -x**S(3)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(3)*x/(S(80)*b**S(2)*(a + b*x**S(2))**S(4)) + x/(S(160)*a*b**S(2)*(a + b*x**S(2))**S(3)) + x/(S(128)*a**S(2)*b**S(2)*(a + b*x**S(2))**S(2)) + S(3)*x/(S(256)*a**S(3)*b**S(2)*(a + b*x**S(2))) + S(3)*atan(sqrt(b)*x/sqrt(a))/(S(256)*a**(S(7)/2)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -x/(S(10)*b*(a + b*x**S(2))**S(5)) + x/(S(80)*a*b*(a + b*x**S(2))**S(4)) + S(7)*x/(S(480)*a**S(2)*b*(a + b*x**S(2))**S(3)) + S(7)*x/(S(384)*a**S(3)*b*(a + b*x**S(2))**S(2)) + S(7)*x/(S(256)*a**S(4)*b*(a + b*x**S(2))) + S(7)*atan(sqrt(b)*x/sqrt(a))/(S(256)*a**(S(9)/2)*b**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(-3)), x), x, x/(S(10)*a*(a + b*x**S(2))**S(5)) + S(9)*x/(S(80)*a**S(2)*(a + b*x**S(2))**S(4)) + S(21)*x/(S(160)*a**S(3)*(a + b*x**S(2))**S(3)) + S(21)*x/(S(128)*a**S(4)*(a + b*x**S(2))**S(2)) + S(63)*x/(S(256)*a**S(5)*(a + b*x**S(2))) + S(63)*atan(sqrt(b)*x/sqrt(a))/(S(256)*a**(S(11)/2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, S(1)/(S(10)*a*x*(a + b*x**S(2))**S(5)) + S(11)/(S(80)*a**S(2)*x*(a + b*x**S(2))**S(4)) + S(33)/(S(160)*a**S(3)*x*(a + b*x**S(2))**S(3)) + S(231)/(S(640)*a**S(4)*x*(a + b*x**S(2))**S(2)) + S(231)/(S(256)*a**S(5)*x*(a + b*x**S(2))) - S(693)/(S(256)*a**S(6)*x) - S(693)*sqrt(b)*atan(sqrt(b)*x/sqrt(a))/(S(256)*a**(S(13)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, S(1)/(S(10)*a*x**S(3)*(a + b*x**S(2))**S(5)) + S(13)/(S(80)*a**S(2)*x**S(3)*(a + b*x**S(2))**S(4)) + S(143)/(S(480)*a**S(3)*x**S(3)*(a + b*x**S(2))**S(3)) + S(429)/(S(640)*a**S(4)*x**S(3)*(a + b*x**S(2))**S(2)) + S(3003)/(S(1280)*a**S(5)*x**S(3)*(a + b*x**S(2))) - S(1001)/(S(256)*a**S(6)*x**S(3)) + S(3003)*b/(S(256)*a**S(7)*x) + S(3003)*b**(S(3)/2)*atan(sqrt(b)*x/sqrt(a))/(S(256)*a**(S(15)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, S(1)/(S(10)*a*x**S(5)*(a + b*x**S(2))**S(5)) + S(3)/(S(16)*a**S(2)*x**S(5)*(a + b*x**S(2))**S(4)) + S(13)/(S(32)*a**S(3)*x**S(5)*(a + b*x**S(2))**S(3)) + S(143)/(S(128)*a**S(4)*x**S(5)*(a + b*x**S(2))**S(2)) + S(1287)/(S(256)*a**S(5)*x**S(5)*(a + b*x**S(2))) - S(9009)/(S(1280)*a**S(6)*x**S(5)) + S(3003)*b/(S(256)*a**S(7)*x**S(3)) - S(9009)*b**S(2)/(S(256)*a**S(8)*x) - S(9009)*b**(S(5)/2)*atan(sqrt(b)*x/sqrt(a))/(S(256)*a**(S(17)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, x/(S(2)*x**S(2) + S(2)) + atan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, -S(1)/(S(2)*x**S(2) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, -x/(S(2)*x**S(2) + S(2)) + atan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, log(x**S(2) + S(1))/S(2) + S(1)/(S(2)*x**S(2) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(4) - S(18)*x**S(2) + S(81)), x), x, S(1)/(-S(2)*x**S(2) + S(18)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(4) - S(8)*x**S(2) + S(16)), x), x, log(-x**S(2) + S(4))/S(2) + S(2)/(-x**S(2) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(2)*a*(d*x)**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*(a + b*x**S(2))*(m**S(2) + S(4)*m + S(3))) + (d*x)**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*(m + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a*x**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(24)*a + S(24)*b*x**S(2)) + x**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(2)*a*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(35)*a + S(35)*b*x**S(2)) + x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a*x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(12)*a + S(12)*b*x**S(2)) + x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(2)*a*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(15)*a + S(15)*b*x**S(2)) + x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, (a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(2)*a*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3)*a + S(3)*b*x**S(2)) + x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x, x), x, a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(2), x), x, -S(2)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(x*(a + b*x**S(2))) + sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(3), x), x, -a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*x**S(2)*(a + b*x**S(2))) + b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(4), x), x, S(2)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3)*x**S(3)*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(5), x), x, -(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*a*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(6), x), x, S(2)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(15)*x**S(5)*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(7), x), x, a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(12)*x**S(6)*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(8), x), x, S(2)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(35)*x**S(7)*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(9), x), x, a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(24)*x**S(8)*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(6)*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(10), x), x, S(2)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(63)*x**S(9)*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(7)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(11), x), x, a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(40)*x**S(10)*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(8)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, a**S(3)*x**S(10)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(560)*a + S(560)*b*x**S(2)) + a**S(2)*x**S(10)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(112) + S(3)*a*x**S(10)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(112) + x**S(10)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(16)*a**S(3)*x**S(9)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(6435)*a + S(6435)*b*x**S(2)) + S(8)*a**S(2)*x**S(9)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(715) + S(2)*a*x**S(9)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(65) + x**S(9)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, a**S(3)*x**S(8)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(280)*a + S(280)*b*x**S(2)) + a**S(2)*x**S(8)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(70) + a*x**S(8)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(28) + x**S(8)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(16)*a**S(3)*x**S(7)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3003)*a + S(3003)*b*x**S(2)) + S(8)*a**S(2)*x**S(7)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(429) + S(6)*a*x**S(7)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(143) + x**S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, a**S(2)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(24)*b**S(3)) - a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(30)*b**S(3)) + x**S(4)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(16)*a**S(3)*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1155)*a + S(1155)*b*x**S(2)) + S(8)*a**S(2)*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(231) + S(2)*a*x**S(5)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(33) + x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, -a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(8)*b**S(2)) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(10)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(16)*a**S(3)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(315)*a + S(315)*b*x**S(2)) + S(8)*a**S(2)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(105) + S(2)*a*x**S(3)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(21) + x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, (a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(16)*a**S(3)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(35)*a + S(35)*b*x**S(2)) + S(8)*a**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(35) + S(6)*a*x*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(35) + x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x, x), x, a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2) + a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(4) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(2), x), x, -S(16)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*x*(a + b*x**S(2))) + S(8)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*x) + S(2)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*x) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(5)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(3), x), x, S(3)*a**S(2)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + S(3)*a*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2) - S(3)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*x**S(2)) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(4), x), x, S(16)*a*b**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3)*a + S(3)*b*x**S(2)) + S(2)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(3) + S(8)*b**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(3) - S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(5), x), x, S(3)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + S(3)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*x**S(4)) + S(3)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2) - (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(6), x), x, -S(16)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*x*(a + b*x**S(2))) + S(2)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*x**S(5)) + S(8)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*x) - S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(7), x), x, -a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*x**S(2)*(a + b*x**S(2))) + a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*x**S(6)) + b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) - S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(12)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(8), x), x, S(16)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(35)*x**S(3)*(a + b*x**S(2))) + S(6)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(35)*x**S(7)) - S(24)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(35)*x**S(3)) - S(11)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(35)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(9), x), x, -(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(8)*a*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(10), x), x, S(16)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(315)*x**S(5)*(a + b*x**S(2))) + S(2)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(21)*x**S(9)) - S(8)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(63)*x**S(5)) - S(13)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(63)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(11), x), x, -(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(8)*a*x**S(10)) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(40)*a**S(2)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(12), x), x, S(16)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1155)*x**S(7)*(a + b*x**S(2))) + S(2)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(33)*x**S(11)) - S(8)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(165)*x**S(7)) - S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(33)*x**S(11)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(13), x), x, -(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(12)*a*x**S(12)) + b*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(24)*a**S(2)*x**S(10)) - b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(120)*a**S(3)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(14), x), x, S(16)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3003)*x**S(9)*(a + b*x**S(2))) + S(6)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(143)*x**S(13)) - S(24)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1001)*x**S(9)) - S(17)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(143)*x**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(15), x), x, a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(280)*x**S(10)*(a + b*x**S(2))) + a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(28)*x**S(14)) - b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(56)*x**S(10)) - S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(28)*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(16), x), x, S(16)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(6435)*x**S(11)*(a + b*x**S(2))) + S(2)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(65)*x**S(15)) - S(8)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(585)*x**S(11)) - S(19)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(195)*x**S(15)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/x**S(17), x), x, a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(560)*x**S(12)*(a + b*x**S(2))) + S(3)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(112)*x**S(16)) - S(3)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(280)*x**S(12)) - S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(56)*x**S(16)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(13)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a**S(5)*x**S(14)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(11088)*a + S(11088)*b*x**S(2)) + a**S(4)*x**S(14)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(1584) + a**S(3)*x**S(14)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(396) + a**S(2)*x**S(14)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(132) + S(5)*a*x**S(14)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(264) + x**S(14)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(24), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(12)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(256)*a**S(5)*x**S(13)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2028117)*a + S(2028117)*b*x**S(2)) + S(128)*a**S(4)*x**S(13)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(156009) + S(160)*a**S(3)*x**S(13)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(52003) + S(80)*a**S(2)*x**S(13)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(9177) + S(10)*a*x**S(13)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(483) + x**S(13)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(23), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a**S(5)*x**S(12)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5544)*a + S(5544)*b*x**S(2)) + a**S(4)*x**S(12)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(924) + a**S(3)*x**S(12)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(264) + a**S(2)*x**S(12)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(99) + a*x**S(12)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(44) + x**S(12)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(22), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(256)*a**S(5)*x**S(11)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(969969)*a + S(969969)*b*x**S(2)) + S(128)*a**S(4)*x**S(11)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(88179) + S(32)*a**S(3)*x**S(11)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(6783) + S(80)*a**S(2)*x**S(11)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(6783) + S(10)*a*x**S(11)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(399) + x**S(11)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a**S(4)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(360)*b**S(5)) - a**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(7)/2)/(S(420)*b**S(5)) + a**S(2)*x**S(4)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(120)*b**S(3)) - a*x**S(6)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(45)*b**S(2)) + x**S(8)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(20)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(256)*a**S(5)*x**S(9)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(415701)*a + S(415701)*b*x**S(2)) + S(128)*a**S(4)*x**S(9)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(46189) + S(32)*a**S(3)*x**S(9)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(4199) + S(16)*a**S(2)*x**S(9)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(969) + S(10)*a*x**S(9)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(323) + x**S(9)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(19), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, -a**S(3)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(144)*b**S(4)) + a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(7)/2)/(S(168)*b**S(4)) - a*x**S(4)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(48)*b**S(2)) + x**S(6)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(18)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(256)*a**S(5)*x**S(7)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(153153)*a + S(153153)*b*x**S(2)) + S(128)*a**S(4)*x**S(7)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(21879) + S(32)*a**S(3)*x**S(7)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2431) + S(16)*a**S(2)*x**S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(663) + S(2)*a*x**S(7)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(51) + x**S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a**S(2)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(48)*b**S(3)) - a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(7)/2)/(S(56)*b**S(3)) + x**S(4)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(256)*a**S(5)*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(45045)*a + S(45045)*b*x**S(2)) + S(128)*a**S(4)*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(9009) + S(32)*a**S(3)*x**S(5)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(1287) + S(16)*a**S(2)*x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(429) + S(2)*a*x**S(5)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(39) + x**S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, -a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(12)*b**S(2)) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(7)/2)/(S(14)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(256)*a**S(5)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(9009)*a + S(9009)*b*x**S(2)) + S(128)*a**S(4)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(3003) + S(160)*a**S(3)*x**S(3)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(3003) + S(80)*a**S(2)*x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(1287) + S(10)*a*x**S(3)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(143) + x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, (a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(256)*a**S(5)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(693)*a + S(693)*b*x**S(2)) + S(128)*a**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(693) + S(32)*a**S(3)*x*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(231) + S(80)*a**S(2)*x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(693) + S(10)*a*x*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(99) + x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x, x), x, a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2) + a**S(3)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(4) + a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(6) + a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(8) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(2), x), x, -S(256)*a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(63)*x*(a + b*x**S(2))) + S(128)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(63)*x) + S(32)*a**S(3)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(63)*x) + S(16)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(63)*x) + S(10)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(63)*x) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(9)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(3), x), x, S(5)*a**S(4)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + S(5)*a**S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2) + S(5)*a**S(2)*b*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(4) + S(5)*a*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(6) - S(5)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(8)*x**S(2)) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(8)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(4), x), x, S(256)*a**S(3)*b**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(21)*a + S(21)*b*x**S(2)) + S(128)*a**S(2)*b**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(21) + S(32)*a*b**S(2)*x*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(7) + S(10)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(3)*x**S(3)) + S(80)*b**S(2)*x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(21) - S(11)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(5), x), x, S(10)*a**S(3)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + S(5)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)) + S(5)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2) + S(5)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(4)*x**S(4)) + S(5)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/S(3) - S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(2)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(6), x), x, -S(256)*a**S(3)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(15)*x*(a + b*x**S(2))) + S(128)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(15)*x) + S(32)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(15)*x) + S(2)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(3)*x**S(5)) + S(16)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(15)*x) - S(13)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(15)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(7), x), x, S(10)*a**S(2)*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + S(5)*a*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)) - S(5)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*x**S(2)) + S(5)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(12)*x**S(6)) + S(5)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(6)*x**S(2)) - S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(12)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(8), x), x, S(256)*a*b**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(21)*a + S(21)*b*x**S(2)) + S(32)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(7)*x**S(3)) + S(2)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(7)*x**S(7)) + S(128)*b**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(21) - S(16)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(3)*x**S(3)) - S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(7)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(9), x), x, S(5)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) + S(5)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*x**S(4)) + S(5)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(24)*x**S(8)) + S(5)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/S(2) - S(5)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(3)*x**S(4)) - (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(3)*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(10), x), x, -S(256)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(63)*x*(a + b*x**S(2))) + S(32)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(63)*x**S(5)) + S(10)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(63)*x**S(9)) + S(128)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(63)*x) - S(16)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(21)*x**S(5)) - S(17)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(63)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(11), x), x, -a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*x**S(2)*(a + b*x**S(2))) + a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*x**S(6)) + a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(8)*x**S(10)) + b**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*log(x)/(a + b*x**S(2)) - S(5)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(12)*x**S(6)) - S(9)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(40)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(12), x), x, S(256)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(693)*x**S(3)*(a + b*x**S(2))) + S(32)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(231)*x**S(7)) + S(10)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(99)*x**S(11)) - S(128)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(231)*x**S(3)) - S(16)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(63)*x**S(7)) - S(19)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(99)*x**S(11)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(13), x), x, -(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(12)*a*x**S(12)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(14), x), x, S(256)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(9009)*x**S(5)*(a + b*x**S(2))) + S(160)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3003)*x**S(9)) + S(10)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(143)*x**S(13)) - S(640)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(9009)*x**S(5)) - S(80)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(693)*x**S(9)) - S(21)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(143)*x**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(15), x), x, -(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(12)*a*x**S(14)) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(7)/2)/(S(84)*a**S(2)*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(16), x), x, S(256)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(45045)*x**S(7)*(a + b*x**S(2))) + S(32)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1287)*x**S(11)) + S(2)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(39)*x**S(15)) - S(128)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(6435)*x**S(7)) - S(80)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(1287)*x**S(11)) - S(23)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(195)*x**S(15)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(17), x), x, -(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(16)*a*x**S(16)) + b*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(48)*a**S(2)*x**S(14)) - b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(7)/2)/(S(336)*a**S(3)*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(18), x), x, S(256)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(153153)*x**S(9)*(a + b*x**S(2))) + S(32)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2431)*x**S(13)) + S(2)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(51)*x**S(17)) - S(128)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(17017)*x**S(9)) - S(16)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(429)*x**S(13)) - S(5)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(51)*x**S(17)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(19), x), x, -(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(18)*a*x**S(18)) + b*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(48)*a**S(2)*x**S(16)) - b**S(2)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(144)*a**S(3)*x**S(14)) + b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(7)/2)/(S(1008)*a**S(4)*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(20), x), x, S(256)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(415701)*x**S(11)*(a + b*x**S(2))) + S(32)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4199)*x**S(15)) + S(10)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(323)*x**S(19)) - S(128)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(37791)*x**S(11)) - S(16)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(663)*x**S(15)) - S(27)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(323)*x**S(19)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(21), x), x, a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2520)*x**S(12)*(a + b*x**S(2))) + a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(168)*x**S(16)) + a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(36)*x**S(20)) - b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(420)*x**S(12)) - S(5)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(252)*x**S(16)) - S(7)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(90)*x**S(20)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(22), x), x, S(256)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(969969)*x**S(13)*(a + b*x**S(2))) + S(32)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(6783)*x**S(17)) + S(10)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(399)*x**S(21)) - S(128)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(74613)*x**S(13)) - S(16)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(969)*x**S(17)) - S(29)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(399)*x**S(21)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(23), x), x, a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5544)*x**S(14)*(a + b*x**S(2))) + a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(264)*x**S(18)) + a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(44)*x**S(22)) - b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(792)*x**S(14)) - b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(72)*x**S(18)) - S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(44)*x**S(22)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(24), x), x, S(256)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2028117)*x**S(15)*(a + b*x**S(2))) + S(160)*a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(52003)*x**S(19)) + S(10)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(483)*x**S(23)) - S(640)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(676039)*x**S(15)) - S(80)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(6783)*x**S(19)) - S(31)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(483)*x**S(23)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/x**S(25), x), x, a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(11088)*x**S(16)*(a + b*x**S(2))) + a*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(396)*x**S(20)) + S(5)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(264)*x**S(24)) - b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1386)*x**S(16)) - b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(99)*x**S(20)) - S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(33)*x**S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, (d*x)**(m + S(1))*(a + b*x**S(2))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(a*d*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, a**(S(3)/2)*(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(b**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - a*x*(a + b*x**S(2))/(b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + x**S(3)*(a + b*x**S(2))/(S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -a*(a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -sqrt(a)*(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(b**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + x*(a + b*x**S(2))/(b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, (a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, (a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, (a + b*x**S(2))*log(x)/(a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, -(a + b*x**S(2))/(a*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(b)*(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(a**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, -b*(a + b*x**S(2))*log(x)/(a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + b*(a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*a**S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, -(a + b*x**S(2))/(S(3)*a*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + b*(a + b*x**S(2))/(a**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + b**(S(3)/2)*(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(a**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, (d*x)**(m + S(1))*(a + b*x**S(2))*hyper((S(3), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(a**S(3)*d*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, a*x*(a + b*x**S(2))/(S(4)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(5)*x/(S(8)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (S(3)*a + S(3)*b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(8)*sqrt(a)*b**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, x**S(4)*(a + b*x**S(2))/(S(4)*a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, x**S(3)*(a + b*x**S(2))/(S(4)*a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - x/(S(8)*a*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(8)*a**(S(3)/2)*b**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, -(a + b*x**S(2))/(S(4)*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(-3)/2), x), x, x*(a + b*x**S(2))/(S(4)*a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(3)*x/(S(8)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (S(3)*a + S(3)*b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, (a + b*x**S(2))/(S(4)*a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(1)/(S(2)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (a + b*x**S(2))*log(x)/(a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, (a + b*x**S(2))/(S(4)*a*x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(5)/(S(8)*a**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(15)*a + S(15)*b*x**S(2))/(S(8)*a**S(3)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(15)*sqrt(b)*(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(8)*a**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, (a + b*x**S(2))/(S(4)*a*x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(3)/(S(4)*a**S(2)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3)*b*(a + b*x**S(2))*log(x)/(a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3)*b*(a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*a**S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, (a + b*x**S(2))/(S(4)*a*x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(7)/(S(8)*a**S(2)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(35)*a + S(35)*b*x**S(2))/(S(24)*a**S(3)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(35)*b*(a + b*x**S(2))/(S(8)*a**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(35)*b**(S(3)/2)*(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(8)*a**(S(9)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, (d*x)**(m + S(1))*(a + b*x**S(2))*hyper((S(5), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(a**S(5)*d*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*x**S(3)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(11)*x**S(3)/(S(48)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(5)*x**S(3)*(a + b*x**S(2))/(S(64)*a*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(5)*x/(S(128)*a*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (S(5)*a + S(5)*b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(128)*a**(S(3)/2)*b**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, x**S(6)*(a + b*x**S(2))/(S(8)*a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + x**S(6)/(S(24)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*x*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(3)*x/(S(16)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + x*(a + b*x**S(2))/(S(64)*a*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(3)*x/(S(128)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (S(3)*a + S(3)*b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(128)*a**(S(5)/2)*b**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(1)/(S(6)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, x**S(3)*(a + b*x**S(2))/(S(8)*a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(5)*x/(S(48)*a*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(5)*x*(a + b*x**S(2))/(S(192)*a**S(2)*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(5)*x/(S(128)*a**S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (S(5)*a + S(5)*b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(128)*a**(S(7)/2)*b**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, -(a + b*x**S(2))/(S(8)*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(-5)/2), x), x, x*(a + b*x**S(2))/(S(8)*a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(7)*x/(S(48)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(35)*x*(a + b*x**S(2))/(S(192)*a**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(35)*x/(S(128)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (S(35)*a + S(35)*b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(128)*a**(S(9)/2)*sqrt(b)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), x), x, (a + b*x**S(2))/(S(8)*a*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(1)/(S(6)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + (a + b*x**S(2))/(S(4)*a**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(1)/(S(2)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (a + b*x**S(2))*log(x)/(a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), x), x, (a + b*x**S(2))/(S(8)*a*x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(3)/(S(16)*a**S(2)*x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + (S(21)*a + S(21)*b*x**S(2))/(S(64)*a**S(3)*x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(105)/(S(128)*a**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(315)*a + S(315)*b*x**S(2))/(S(128)*a**S(5)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(315)*sqrt(b)*(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(128)*a**(S(11)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), x), x, (a + b*x**S(2))/(S(8)*a*x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(5)/(S(24)*a**S(2)*x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + (S(5)*a + S(5)*b*x**S(2))/(S(12)*a**S(3)*x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(5)/(S(4)*a**S(4)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(5)*b*(a + b*x**S(2))*log(x)/(a**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(5)*b*(a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*a**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*a**S(6)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), x), x, (a + b*x**S(2))/(S(8)*a*x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(11)/(S(48)*a**S(2)*x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + (S(33)*a + S(33)*b*x**S(2))/(S(64)*a**S(3)*x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(231)/(S(128)*a**S(4)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(385)*a + S(385)*b*x**S(2))/(S(128)*a**S(5)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(1155)*b*(a + b*x**S(2))/(S(128)*a**S(6)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(1155)*b**(S(3)/2)*(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a))/(S(128)*a**(S(13)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(2)*a**S(2)*(d*x)**(S(7)/2)/(S(7)*d) + S(4)*a*b*(d*x)**(S(11)/2)/(S(11)*d**S(3)) + S(2)*b**S(2)*(d*x)**(S(15)/2)/(S(15)*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(2)*a**S(2)*(d*x)**(S(5)/2)/(S(5)*d) + S(4)*a*b*(d*x)**(S(9)/2)/(S(9)*d**S(3)) + S(2)*b**S(2)*(d*x)**(S(13)/2)/(S(13)*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(2)*a**S(2)*(d*x)**(S(3)/2)/(S(3)*d) + S(4)*a*b*(d*x)**(S(7)/2)/(S(7)*d**S(3)) + S(2)*b**S(2)*(d*x)**(S(11)/2)/(S(11)*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/sqrt(d*x), x), x, S(2)*a**S(2)*sqrt(d*x)/d + S(4)*a*b*(d*x)**(S(5)/2)/(S(5)*d**S(3)) + S(2)*b**S(2)*(d*x)**(S(9)/2)/(S(9)*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*x)**(S(3)/2), x), x, -S(2)*a**S(2)/(d*sqrt(d*x)) + S(4)*a*b*(d*x)**(S(3)/2)/(S(3)*d**S(3)) + S(2)*b**S(2)*(d*x)**(S(7)/2)/(S(7)*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*x)**(S(5)/2), x), x, -S(2)*a**S(2)/(S(3)*d*(d*x)**(S(3)/2)) + S(4)*a*b*sqrt(d*x)/d**S(3) + S(2)*b**S(2)*(d*x)**(S(5)/2)/(S(5)*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*x)**(S(7)/2), x), x, -S(2)*a**S(2)/(S(5)*d*(d*x)**(S(5)/2)) - S(4)*a*b/(d**S(3)*sqrt(d*x)) + S(2)*b**S(2)*(d*x)**(S(3)/2)/(S(3)*d**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, S(2)*a**S(4)*(d*x)**(S(7)/2)/(S(7)*d) + S(8)*a**S(3)*b*(d*x)**(S(11)/2)/(S(11)*d**S(3)) + S(4)*a**S(2)*b**S(2)*(d*x)**(S(15)/2)/(S(5)*d**S(5)) + S(8)*a*b**S(3)*(d*x)**(S(19)/2)/(S(19)*d**S(7)) + S(2)*b**S(4)*(d*x)**(S(23)/2)/(S(23)*d**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, S(2)*a**S(4)*(d*x)**(S(5)/2)/(S(5)*d) + S(8)*a**S(3)*b*(d*x)**(S(9)/2)/(S(9)*d**S(3)) + S(12)*a**S(2)*b**S(2)*(d*x)**(S(13)/2)/(S(13)*d**S(5)) + S(8)*a*b**S(3)*(d*x)**(S(17)/2)/(S(17)*d**S(7)) + S(2)*b**S(4)*(d*x)**(S(21)/2)/(S(21)*d**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, S(2)*a**S(4)*(d*x)**(S(3)/2)/(S(3)*d) + S(8)*a**S(3)*b*(d*x)**(S(7)/2)/(S(7)*d**S(3)) + S(12)*a**S(2)*b**S(2)*(d*x)**(S(11)/2)/(S(11)*d**S(5)) + S(8)*a*b**S(3)*(d*x)**(S(15)/2)/(S(15)*d**S(7)) + S(2)*b**S(4)*(d*x)**(S(19)/2)/(S(19)*d**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/sqrt(d*x), x), x, S(2)*a**S(4)*sqrt(d*x)/d + S(8)*a**S(3)*b*(d*x)**(S(5)/2)/(S(5)*d**S(3)) + S(4)*a**S(2)*b**S(2)*(d*x)**(S(9)/2)/(S(3)*d**S(5)) + S(8)*a*b**S(3)*(d*x)**(S(13)/2)/(S(13)*d**S(7)) + S(2)*b**S(4)*(d*x)**(S(17)/2)/(S(17)*d**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/(d*x)**(S(3)/2), x), x, -S(2)*a**S(4)/(d*sqrt(d*x)) + S(8)*a**S(3)*b*(d*x)**(S(3)/2)/(S(3)*d**S(3)) + S(12)*a**S(2)*b**S(2)*(d*x)**(S(7)/2)/(S(7)*d**S(5)) + S(8)*a*b**S(3)*(d*x)**(S(11)/2)/(S(11)*d**S(7)) + S(2)*b**S(4)*(d*x)**(S(15)/2)/(S(15)*d**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/(d*x)**(S(5)/2), x), x, -S(2)*a**S(4)/(S(3)*d*(d*x)**(S(3)/2)) + S(8)*a**S(3)*b*sqrt(d*x)/d**S(3) + S(12)*a**S(2)*b**S(2)*(d*x)**(S(5)/2)/(S(5)*d**S(5)) + S(8)*a*b**S(3)*(d*x)**(S(9)/2)/(S(9)*d**S(7)) + S(2)*b**S(4)*(d*x)**(S(13)/2)/(S(13)*d**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)/(d*x)**(S(7)/2), x), x, -S(2)*a**S(4)/(S(5)*d*(d*x)**(S(5)/2)) - S(8)*a**S(3)*b/(d**S(3)*sqrt(d*x)) + S(4)*a**S(2)*b**S(2)*(d*x)**(S(3)/2)/d**S(5) + S(8)*a*b**S(3)*(d*x)**(S(7)/2)/(S(7)*d**S(7)) + S(2)*b**S(4)*(d*x)**(S(11)/2)/(S(11)*d**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, S(2)*a**S(6)*(d*x)**(S(7)/2)/(S(7)*d) + S(12)*a**S(5)*b*(d*x)**(S(11)/2)/(S(11)*d**S(3)) + S(2)*a**S(4)*b**S(2)*(d*x)**(S(15)/2)/d**S(5) + S(40)*a**S(3)*b**S(3)*(d*x)**(S(19)/2)/(S(19)*d**S(7)) + S(30)*a**S(2)*b**S(4)*(d*x)**(S(23)/2)/(S(23)*d**S(9)) + S(4)*a*b**S(5)*(d*x)**(S(27)/2)/(S(9)*d**S(11)) + S(2)*b**S(6)*(d*x)**(S(31)/2)/(S(31)*d**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, S(2)*a**S(6)*(d*x)**(S(5)/2)/(S(5)*d) + S(4)*a**S(5)*b*(d*x)**(S(9)/2)/(S(3)*d**S(3)) + S(30)*a**S(4)*b**S(2)*(d*x)**(S(13)/2)/(S(13)*d**S(5)) + S(40)*a**S(3)*b**S(3)*(d*x)**(S(17)/2)/(S(17)*d**S(7)) + S(10)*a**S(2)*b**S(4)*(d*x)**(S(21)/2)/(S(7)*d**S(9)) + S(12)*a*b**S(5)*(d*x)**(S(25)/2)/(S(25)*d**S(11)) + S(2)*b**S(6)*(d*x)**(S(29)/2)/(S(29)*d**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, S(2)*a**S(6)*(d*x)**(S(3)/2)/(S(3)*d) + S(12)*a**S(5)*b*(d*x)**(S(7)/2)/(S(7)*d**S(3)) + S(30)*a**S(4)*b**S(2)*(d*x)**(S(11)/2)/(S(11)*d**S(5)) + S(8)*a**S(3)*b**S(3)*(d*x)**(S(15)/2)/(S(3)*d**S(7)) + S(30)*a**S(2)*b**S(4)*(d*x)**(S(19)/2)/(S(19)*d**S(9)) + S(12)*a*b**S(5)*(d*x)**(S(23)/2)/(S(23)*d**S(11)) + S(2)*b**S(6)*(d*x)**(S(27)/2)/(S(27)*d**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/sqrt(d*x), x), x, S(2)*a**S(6)*sqrt(d*x)/d + S(12)*a**S(5)*b*(d*x)**(S(5)/2)/(S(5)*d**S(3)) + S(10)*a**S(4)*b**S(2)*(d*x)**(S(9)/2)/(S(3)*d**S(5)) + S(40)*a**S(3)*b**S(3)*(d*x)**(S(13)/2)/(S(13)*d**S(7)) + S(30)*a**S(2)*b**S(4)*(d*x)**(S(17)/2)/(S(17)*d**S(9)) + S(4)*a*b**S(5)*(d*x)**(S(21)/2)/(S(7)*d**S(11)) + S(2)*b**S(6)*(d*x)**(S(25)/2)/(S(25)*d**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/(d*x)**(S(3)/2), x), x, -S(2)*a**S(6)/(d*sqrt(d*x)) + S(4)*a**S(5)*b*(d*x)**(S(3)/2)/d**S(3) + S(30)*a**S(4)*b**S(2)*(d*x)**(S(7)/2)/(S(7)*d**S(5)) + S(40)*a**S(3)*b**S(3)*(d*x)**(S(11)/2)/(S(11)*d**S(7)) + S(2)*a**S(2)*b**S(4)*(d*x)**(S(15)/2)/d**S(9) + S(12)*a*b**S(5)*(d*x)**(S(19)/2)/(S(19)*d**S(11)) + S(2)*b**S(6)*(d*x)**(S(23)/2)/(S(23)*d**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/(d*x)**(S(5)/2), x), x, -S(2)*a**S(6)/(S(3)*d*(d*x)**(S(3)/2)) + S(12)*a**S(5)*b*sqrt(d*x)/d**S(3) + S(6)*a**S(4)*b**S(2)*(d*x)**(S(5)/2)/d**S(5) + S(40)*a**S(3)*b**S(3)*(d*x)**(S(9)/2)/(S(9)*d**S(7)) + S(30)*a**S(2)*b**S(4)*(d*x)**(S(13)/2)/(S(13)*d**S(9)) + S(12)*a*b**S(5)*(d*x)**(S(17)/2)/(S(17)*d**S(11)) + S(2)*b**S(6)*(d*x)**(S(21)/2)/(S(21)*d**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)/(d*x)**(S(7)/2), x), x, -S(2)*a**S(6)/(S(5)*d*(d*x)**(S(5)/2)) - S(12)*a**S(5)*b/(d**S(3)*sqrt(d*x)) + S(10)*a**S(4)*b**S(2)*(d*x)**(S(3)/2)/d**S(5) + S(40)*a**S(3)*b**S(3)*(d*x)**(S(7)/2)/(S(7)*d**S(7)) + S(30)*a**S(2)*b**S(4)*(d*x)**(S(11)/2)/(S(11)*d**S(9)) + S(4)*a*b**S(5)*(d*x)**(S(15)/2)/(S(5)*d**S(11)) + S(2)*b**S(6)*(d*x)**(S(19)/2)/(S(19)*d**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(11)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -S(9)*sqrt(S(2))*a**(S(5)/4)*d**(S(11)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*b**(S(13)/4)) + S(9)*sqrt(S(2))*a**(S(5)/4)*d**(S(11)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*b**(S(13)/4)) - S(9)*sqrt(S(2))*a**(S(5)/4)*d**(S(11)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*b**(S(13)/4)) + S(9)*sqrt(S(2))*a**(S(5)/4)*d**(S(11)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*b**(S(13)/4)) - S(9)*a*d**S(5)*sqrt(d*x)/(S(2)*b**S(3)) - d*(d*x)**(S(9)/2)/(S(2)*b*(a + b*x**S(2))) + S(9)*d**S(3)*(d*x)**(S(5)/2)/(S(10)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(9)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -S(7)*sqrt(S(2))*a**(S(3)/4)*d**(S(9)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*b**(S(11)/4)) + S(7)*sqrt(S(2))*a**(S(3)/4)*d**(S(9)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*b**(S(11)/4)) + S(7)*sqrt(S(2))*a**(S(3)/4)*d**(S(9)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*b**(S(11)/4)) - S(7)*sqrt(S(2))*a**(S(3)/4)*d**(S(9)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*b**(S(11)/4)) - d*(d*x)**(S(7)/2)/(S(2)*b*(a + b*x**S(2))) + S(7)*d**S(3)*(d*x)**(S(3)/2)/(S(6)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(7)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(5)*sqrt(S(2))*a**(S(1)/4)*d**(S(7)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*b**(S(9)/4)) - S(5)*sqrt(S(2))*a**(S(1)/4)*d**(S(7)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*b**(S(9)/4)) + S(5)*sqrt(S(2))*a**(S(1)/4)*d**(S(7)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*b**(S(9)/4)) - S(5)*sqrt(S(2))*a**(S(1)/4)*d**(S(7)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*b**(S(9)/4)) - d*(d*x)**(S(5)/2)/(S(2)*b*(a + b*x**S(2))) + S(5)*d**S(3)*sqrt(d*x)/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -d*(d*x)**(S(3)/2)/(S(2)*b*(a + b*x**S(2))) + S(3)*sqrt(S(2))*d**(S(5)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(1)/4)*b**(S(7)/4)) - S(3)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(1)/4)*b**(S(7)/4)) - S(3)*sqrt(S(2))*d**(S(5)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(1)/4)*b**(S(7)/4)) + S(3)*sqrt(S(2))*d**(S(5)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(1)/4)*b**(S(7)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -d*sqrt(d*x)/(S(2)*b*(a + b*x**S(2))) - sqrt(S(2))*d**(S(3)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(3)/4)*b**(S(5)/4)) + sqrt(S(2))*d**(S(3)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(3)/4)*b**(S(5)/4)) - sqrt(S(2))*d**(S(3)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(3)/4)*b**(S(5)/4)) + sqrt(S(2))*d**(S(3)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(3)/4)*b**(S(5)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, (d*x)**(S(3)/2)/(S(2)*a*d*(a + b*x**S(2))) + sqrt(S(2))*sqrt(d)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(5)/4)*b**(S(3)/4)) - sqrt(S(2))*sqrt(d)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(5)/4)*b**(S(3)/4)) - sqrt(S(2))*sqrt(d)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(5)/4)*b**(S(3)/4)) + sqrt(S(2))*sqrt(d)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(5)/4)*b**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, sqrt(d*x)/(S(2)*a*d*(a + b*x**S(2))) - S(3)*sqrt(S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(7)/4)*b**(S(1)/4)*sqrt(d)) + S(3)*sqrt(S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(7)/4)*b**(S(1)/4)*sqrt(d)) - S(3)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(7)/4)*b**(S(1)/4)*sqrt(d)) + S(3)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(7)/4)*b**(S(1)/4)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, S(1)/(S(2)*a*d*sqrt(d*x)*(a + b*x**S(2))) - S(5)/(S(2)*a**S(2)*d*sqrt(d*x)) - S(5)*sqrt(S(2))*b**(S(1)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(9)/4)*d**(S(3)/2)) + S(5)*sqrt(S(2))*b**(S(1)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(9)/4)*d**(S(3)/2)) + S(5)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(9)/4)*d**(S(3)/2)) - S(5)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(9)/4)*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, S(1)/(S(2)*a*d*(d*x)**(S(3)/2)*(a + b*x**S(2))) - S(7)/(S(6)*a**S(2)*d*(d*x)**(S(3)/2)) + S(7)*sqrt(S(2))*b**(S(3)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(11)/4)*d**(S(5)/2)) - S(7)*sqrt(S(2))*b**(S(3)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(11)/4)*d**(S(5)/2)) + S(7)*sqrt(S(2))*b**(S(3)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(11)/4)*d**(S(5)/2)) - S(7)*sqrt(S(2))*b**(S(3)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(11)/4)*d**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(7)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, S(1)/(S(2)*a*d*(d*x)**(S(5)/2)*(a + b*x**S(2))) - S(9)/(S(10)*a**S(2)*d*(d*x)**(S(5)/2)) + S(9)*b/(S(2)*a**S(3)*d**S(3)*sqrt(d*x)) + S(9)*sqrt(S(2))*b**(S(5)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(13)/4)*d**(S(7)/2)) - S(9)*sqrt(S(2))*b**(S(5)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(16)*a**(S(13)/4)*d**(S(7)/2)) - S(9)*sqrt(S(2))*b**(S(5)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(13)/4)*d**(S(7)/2)) + S(9)*sqrt(S(2))*b**(S(5)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(8)*a**(S(13)/4)*d**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(19)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -S(663)*sqrt(S(2))*a**(S(5)/4)*d**(S(19)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*b**(S(21)/4)) + S(663)*sqrt(S(2))*a**(S(5)/4)*d**(S(19)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*b**(S(21)/4)) - S(663)*sqrt(S(2))*a**(S(5)/4)*d**(S(19)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*b**(S(21)/4)) + S(663)*sqrt(S(2))*a**(S(5)/4)*d**(S(19)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*b**(S(21)/4)) - S(663)*a*d**S(9)*sqrt(d*x)/(S(64)*b**S(5)) - d*(d*x)**(S(17)/2)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(17)*d**S(3)*(d*x)**(S(13)/2)/(S(48)*b**S(2)*(a + b*x**S(2))**S(2)) - S(221)*d**S(5)*(d*x)**(S(9)/2)/(S(192)*b**S(3)*(a + b*x**S(2))) + S(663)*d**S(7)*(d*x)**(S(5)/2)/(S(320)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(17)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -S(385)*sqrt(S(2))*a**(S(3)/4)*d**(S(17)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*b**(S(19)/4)) + S(385)*sqrt(S(2))*a**(S(3)/4)*d**(S(17)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*b**(S(19)/4)) + S(385)*sqrt(S(2))*a**(S(3)/4)*d**(S(17)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*b**(S(19)/4)) - S(385)*sqrt(S(2))*a**(S(3)/4)*d**(S(17)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*b**(S(19)/4)) - d*(d*x)**(S(15)/2)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(5)*d**S(3)*(d*x)**(S(11)/2)/(S(16)*b**S(2)*(a + b*x**S(2))**S(2)) - S(55)*d**S(5)*(d*x)**(S(7)/2)/(S(64)*b**S(3)*(a + b*x**S(2))) + S(385)*d**S(7)*(d*x)**(S(3)/2)/(S(192)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(15)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, S(195)*sqrt(S(2))*a**(S(1)/4)*d**(S(15)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*b**(S(17)/4)) - S(195)*sqrt(S(2))*a**(S(1)/4)*d**(S(15)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*b**(S(17)/4)) + S(195)*sqrt(S(2))*a**(S(1)/4)*d**(S(15)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*b**(S(17)/4)) - S(195)*sqrt(S(2))*a**(S(1)/4)*d**(S(15)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*b**(S(17)/4)) - d*(d*x)**(S(13)/2)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(13)*d**S(3)*(d*x)**(S(9)/2)/(S(48)*b**S(2)*(a + b*x**S(2))**S(2)) - S(39)*d**S(5)*(d*x)**(S(5)/2)/(S(64)*b**S(3)*(a + b*x**S(2))) + S(195)*d**S(7)*sqrt(d*x)/(S(64)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(13)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -d*(d*x)**(S(11)/2)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(11)*d**S(3)*(d*x)**(S(7)/2)/(S(48)*b**S(2)*(a + b*x**S(2))**S(2)) - S(77)*d**S(5)*(d*x)**(S(3)/2)/(S(192)*b**S(3)*(a + b*x**S(2))) + S(77)*sqrt(S(2))*d**(S(13)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(1)/4)*b**(S(15)/4)) - S(77)*sqrt(S(2))*d**(S(13)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(1)/4)*b**(S(15)/4)) - S(77)*sqrt(S(2))*d**(S(13)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(1)/4)*b**(S(15)/4)) + S(77)*sqrt(S(2))*d**(S(13)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(1)/4)*b**(S(15)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(11)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -d*(d*x)**(S(9)/2)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(3)*d**S(3)*(d*x)**(S(5)/2)/(S(16)*b**S(2)*(a + b*x**S(2))**S(2)) - S(15)*d**S(5)*sqrt(d*x)/(S(64)*b**S(3)*(a + b*x**S(2))) - S(15)*sqrt(S(2))*d**(S(11)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(3)/4)*b**(S(13)/4)) + S(15)*sqrt(S(2))*d**(S(11)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(3)/4)*b**(S(13)/4)) - S(15)*sqrt(S(2))*d**(S(11)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(3)/4)*b**(S(13)/4)) + S(15)*sqrt(S(2))*d**(S(11)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(3)/4)*b**(S(13)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(9)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -d*(d*x)**(S(7)/2)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(7)*d**S(3)*(d*x)**(S(3)/2)/(S(48)*b**S(2)*(a + b*x**S(2))**S(2)) + S(7)*d**S(3)*(d*x)**(S(3)/2)/(S(64)*a*b**S(2)*(a + b*x**S(2))) + S(7)*sqrt(S(2))*d**(S(9)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(5)/4)*b**(S(11)/4)) - S(7)*sqrt(S(2))*d**(S(9)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(5)/4)*b**(S(11)/4)) - S(7)*sqrt(S(2))*d**(S(9)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(5)/4)*b**(S(11)/4)) + S(7)*sqrt(S(2))*d**(S(9)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(5)/4)*b**(S(11)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(7)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -d*(d*x)**(S(5)/2)/(S(6)*b*(a + b*x**S(2))**S(3)) - S(5)*d**S(3)*sqrt(d*x)/(S(48)*b**S(2)*(a + b*x**S(2))**S(2)) + S(5)*d**S(3)*sqrt(d*x)/(S(192)*a*b**S(2)*(a + b*x**S(2))) - S(5)*sqrt(S(2))*d**(S(7)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(7)/4)*b**(S(9)/4)) + S(5)*sqrt(S(2))*d**(S(7)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(7)/4)*b**(S(9)/4)) - S(5)*sqrt(S(2))*d**(S(7)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(7)/4)*b**(S(9)/4)) + S(5)*sqrt(S(2))*d**(S(7)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(7)/4)*b**(S(9)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -d*(d*x)**(S(3)/2)/(S(6)*b*(a + b*x**S(2))**S(3)) + d*(d*x)**(S(3)/2)/(S(16)*a*b*(a + b*x**S(2))**S(2)) + S(5)*d*(d*x)**(S(3)/2)/(S(64)*a**S(2)*b*(a + b*x**S(2))) + S(5)*sqrt(S(2))*d**(S(5)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(9)/4)*b**(S(7)/4)) - S(5)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(9)/4)*b**(S(7)/4)) - S(5)*sqrt(S(2))*d**(S(5)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(9)/4)*b**(S(7)/4)) + S(5)*sqrt(S(2))*d**(S(5)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(9)/4)*b**(S(7)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, -d*sqrt(d*x)/(S(6)*b*(a + b*x**S(2))**S(3)) + d*sqrt(d*x)/(S(48)*a*b*(a + b*x**S(2))**S(2)) + S(7)*d*sqrt(d*x)/(S(192)*a**S(2)*b*(a + b*x**S(2))) - S(7)*sqrt(S(2))*d**(S(3)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(11)/4)*b**(S(5)/4)) + S(7)*sqrt(S(2))*d**(S(3)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(11)/4)*b**(S(5)/4)) - S(7)*sqrt(S(2))*d**(S(3)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(11)/4)*b**(S(5)/4)) + S(7)*sqrt(S(2))*d**(S(3)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(11)/4)*b**(S(5)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2), x), x, (d*x)**(S(3)/2)/(S(6)*a*d*(a + b*x**S(2))**S(3)) + S(3)*(d*x)**(S(3)/2)/(S(16)*a**S(2)*d*(a + b*x**S(2))**S(2)) + S(15)*(d*x)**(S(3)/2)/(S(64)*a**S(3)*d*(a + b*x**S(2))) + S(15)*sqrt(S(2))*sqrt(d)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(13)/4)*b**(S(3)/4)) - S(15)*sqrt(S(2))*sqrt(d)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(13)/4)*b**(S(3)/4)) - S(15)*sqrt(S(2))*sqrt(d)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(13)/4)*b**(S(3)/4)) + S(15)*sqrt(S(2))*sqrt(d)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(13)/4)*b**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, sqrt(d*x)/(S(6)*a*d*(a + b*x**S(2))**S(3)) + S(11)*sqrt(d*x)/(S(48)*a**S(2)*d*(a + b*x**S(2))**S(2)) + S(77)*sqrt(d*x)/(S(192)*a**S(3)*d*(a + b*x**S(2))) - S(77)*sqrt(S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(15)/4)*b**(S(1)/4)*sqrt(d)) + S(77)*sqrt(S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(15)/4)*b**(S(1)/4)*sqrt(d)) - S(77)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(15)/4)*b**(S(1)/4)*sqrt(d)) + S(77)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(15)/4)*b**(S(1)/4)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, S(1)/(S(6)*a*d*sqrt(d*x)*(a + b*x**S(2))**S(3)) + S(13)/(S(48)*a**S(2)*d*sqrt(d*x)*(a + b*x**S(2))**S(2)) + S(39)/(S(64)*a**S(3)*d*sqrt(d*x)*(a + b*x**S(2))) - S(195)/(S(64)*a**S(4)*d*sqrt(d*x)) - S(195)*sqrt(S(2))*b**(S(1)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(17)/4)*d**(S(3)/2)) + S(195)*sqrt(S(2))*b**(S(1)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(17)/4)*d**(S(3)/2)) + S(195)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(17)/4)*d**(S(3)/2)) - S(195)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(17)/4)*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, S(1)/(S(6)*a*d*(d*x)**(S(3)/2)*(a + b*x**S(2))**S(3)) + S(5)/(S(16)*a**S(2)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))**S(2)) + S(55)/(S(64)*a**S(3)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))) - S(385)/(S(192)*a**S(4)*d*(d*x)**(S(3)/2)) + S(385)*sqrt(S(2))*b**(S(3)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(19)/4)*d**(S(5)/2)) - S(385)*sqrt(S(2))*b**(S(3)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(19)/4)*d**(S(5)/2)) + S(385)*sqrt(S(2))*b**(S(3)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(19)/4)*d**(S(5)/2)) - S(385)*sqrt(S(2))*b**(S(3)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(19)/4)*d**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(7)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(2)), x), x, S(1)/(S(6)*a*d*(d*x)**(S(5)/2)*(a + b*x**S(2))**S(3)) + S(17)/(S(48)*a**S(2)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))**S(2)) + S(221)/(S(192)*a**S(3)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))) - S(663)/(S(320)*a**S(4)*d*(d*x)**(S(5)/2)) + S(663)*b/(S(64)*a**S(5)*d**S(3)*sqrt(d*x)) + S(663)*sqrt(S(2))*b**(S(5)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(21)/4)*d**(S(7)/2)) - S(663)*sqrt(S(2))*b**(S(5)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(512)*a**(S(21)/4)*d**(S(7)/2)) - S(663)*sqrt(S(2))*b**(S(5)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(21)/4)*d**(S(7)/2)) + S(663)*sqrt(S(2))*b**(S(5)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(256)*a**(S(21)/4)*d**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(27)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -S(69615)*sqrt(S(2))*a**(S(5)/4)*d**(S(27)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*b**(S(29)/4)) + S(69615)*sqrt(S(2))*a**(S(5)/4)*d**(S(27)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*b**(S(29)/4)) - S(69615)*sqrt(S(2))*a**(S(5)/4)*d**(S(27)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*b**(S(29)/4)) + S(69615)*sqrt(S(2))*a**(S(5)/4)*d**(S(27)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*b**(S(29)/4)) - S(69615)*a*d**S(13)*sqrt(d*x)/(S(4096)*b**S(7)) - d*(d*x)**(S(25)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(5)*d**S(3)*(d*x)**(S(21)/2)/(S(32)*b**S(2)*(a + b*x**S(2))**S(4)) - S(35)*d**S(5)*(d*x)**(S(17)/2)/(S(128)*b**S(3)*(a + b*x**S(2))**S(3)) - S(595)*d**S(7)*(d*x)**(S(13)/2)/(S(1024)*b**S(4)*(a + b*x**S(2))**S(2)) - S(7735)*d**S(9)*(d*x)**(S(9)/2)/(S(4096)*b**S(5)*(a + b*x**S(2))) + S(13923)*d**S(11)*(d*x)**(S(5)/2)/(S(4096)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(25)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -S(33649)*sqrt(S(2))*a**(S(3)/4)*d**(S(25)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*b**(S(27)/4)) + S(33649)*sqrt(S(2))*a**(S(3)/4)*d**(S(25)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*b**(S(27)/4)) + S(33649)*sqrt(S(2))*a**(S(3)/4)*d**(S(25)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*b**(S(27)/4)) - S(33649)*sqrt(S(2))*a**(S(3)/4)*d**(S(25)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*b**(S(27)/4)) - d*(d*x)**(S(23)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(23)*d**S(3)*(d*x)**(S(19)/2)/(S(160)*b**S(2)*(a + b*x**S(2))**S(4)) - S(437)*d**S(5)*(d*x)**(S(15)/2)/(S(1920)*b**S(3)*(a + b*x**S(2))**S(3)) - S(437)*d**S(7)*(d*x)**(S(11)/2)/(S(1024)*b**S(4)*(a + b*x**S(2))**S(2)) - S(4807)*d**S(9)*(d*x)**(S(7)/2)/(S(4096)*b**S(5)*(a + b*x**S(2))) + S(33649)*d**S(11)*(d*x)**(S(3)/2)/(S(12288)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(23)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, S(13923)*sqrt(S(2))*a**(S(1)/4)*d**(S(23)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*b**(S(25)/4)) - S(13923)*sqrt(S(2))*a**(S(1)/4)*d**(S(23)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*b**(S(25)/4)) + S(13923)*sqrt(S(2))*a**(S(1)/4)*d**(S(23)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*b**(S(25)/4)) - S(13923)*sqrt(S(2))*a**(S(1)/4)*d**(S(23)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*b**(S(25)/4)) - d*(d*x)**(S(21)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(21)*d**S(3)*(d*x)**(S(17)/2)/(S(160)*b**S(2)*(a + b*x**S(2))**S(4)) - S(119)*d**S(5)*(d*x)**(S(13)/2)/(S(640)*b**S(3)*(a + b*x**S(2))**S(3)) - S(1547)*d**S(7)*(d*x)**(S(9)/2)/(S(5120)*b**S(4)*(a + b*x**S(2))**S(2)) - S(13923)*d**S(9)*(d*x)**(S(5)/2)/(S(20480)*b**S(5)*(a + b*x**S(2))) + S(13923)*d**S(11)*sqrt(d*x)/(S(4096)*b**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(21)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(19)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(19)*d**S(3)*(d*x)**(S(15)/2)/(S(160)*b**S(2)*(a + b*x**S(2))**S(4)) - S(19)*d**S(5)*(d*x)**(S(11)/2)/(S(128)*b**S(3)*(a + b*x**S(2))**S(3)) - S(209)*d**S(7)*(d*x)**(S(7)/2)/(S(1024)*b**S(4)*(a + b*x**S(2))**S(2)) - S(1463)*d**S(9)*(d*x)**(S(3)/2)/(S(4096)*b**S(5)*(a + b*x**S(2))) + S(4389)*sqrt(S(2))*d**(S(21)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(1)/4)*b**(S(23)/4)) - S(4389)*sqrt(S(2))*d**(S(21)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(1)/4)*b**(S(23)/4)) - S(4389)*sqrt(S(2))*d**(S(21)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(1)/4)*b**(S(23)/4)) + S(4389)*sqrt(S(2))*d**(S(21)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(1)/4)*b**(S(23)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(19)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(17)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(17)*d**S(3)*(d*x)**(S(13)/2)/(S(160)*b**S(2)*(a + b*x**S(2))**S(4)) - S(221)*d**S(5)*(d*x)**(S(9)/2)/(S(1920)*b**S(3)*(a + b*x**S(2))**S(3)) - S(663)*d**S(7)*(d*x)**(S(5)/2)/(S(5120)*b**S(4)*(a + b*x**S(2))**S(2)) - S(663)*d**S(9)*sqrt(d*x)/(S(4096)*b**S(5)*(a + b*x**S(2))) - S(663)*sqrt(S(2))*d**(S(19)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(3)/4)*b**(S(21)/4)) + S(663)*sqrt(S(2))*d**(S(19)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(3)/4)*b**(S(21)/4)) - S(663)*sqrt(S(2))*d**(S(19)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(3)/4)*b**(S(21)/4)) + S(663)*sqrt(S(2))*d**(S(19)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(3)/4)*b**(S(21)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(17)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(15)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(3)*d**S(3)*(d*x)**(S(11)/2)/(S(32)*b**S(2)*(a + b*x**S(2))**S(4)) - S(11)*d**S(5)*(d*x)**(S(7)/2)/(S(128)*b**S(3)*(a + b*x**S(2))**S(3)) - S(77)*d**S(7)*(d*x)**(S(3)/2)/(S(1024)*b**S(4)*(a + b*x**S(2))**S(2)) + S(231)*d**S(7)*(d*x)**(S(3)/2)/(S(4096)*a*b**S(4)*(a + b*x**S(2))) + S(231)*sqrt(S(2))*d**(S(17)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(5)/4)*b**(S(19)/4)) - S(231)*sqrt(S(2))*d**(S(17)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(5)/4)*b**(S(19)/4)) - S(231)*sqrt(S(2))*d**(S(17)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(5)/4)*b**(S(19)/4)) + S(231)*sqrt(S(2))*d**(S(17)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(5)/4)*b**(S(19)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(15)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(13)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(13)*d**S(3)*(d*x)**(S(9)/2)/(S(160)*b**S(2)*(a + b*x**S(2))**S(4)) - S(39)*d**S(5)*(d*x)**(S(5)/2)/(S(640)*b**S(3)*(a + b*x**S(2))**S(3)) - S(39)*d**S(7)*sqrt(d*x)/(S(1024)*b**S(4)*(a + b*x**S(2))**S(2)) + S(39)*d**S(7)*sqrt(d*x)/(S(4096)*a*b**S(4)*(a + b*x**S(2))) - S(117)*sqrt(S(2))*d**(S(15)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(7)/4)*b**(S(17)/4)) + S(117)*sqrt(S(2))*d**(S(15)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(7)/4)*b**(S(17)/4)) - S(117)*sqrt(S(2))*d**(S(15)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(7)/4)*b**(S(17)/4)) + S(117)*sqrt(S(2))*d**(S(15)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(7)/4)*b**(S(17)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(13)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(11)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(11)*d**S(3)*(d*x)**(S(7)/2)/(S(160)*b**S(2)*(a + b*x**S(2))**S(4)) - S(77)*d**S(5)*(d*x)**(S(3)/2)/(S(1920)*b**S(3)*(a + b*x**S(2))**S(3)) + S(77)*d**S(5)*(d*x)**(S(3)/2)/(S(5120)*a*b**S(3)*(a + b*x**S(2))**S(2)) + S(77)*d**S(5)*(d*x)**(S(3)/2)/(S(4096)*a**S(2)*b**S(3)*(a + b*x**S(2))) + S(77)*sqrt(S(2))*d**(S(13)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(9)/4)*b**(S(15)/4)) - S(77)*sqrt(S(2))*d**(S(13)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(9)/4)*b**(S(15)/4)) - S(77)*sqrt(S(2))*d**(S(13)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(9)/4)*b**(S(15)/4)) + S(77)*sqrt(S(2))*d**(S(13)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(9)/4)*b**(S(15)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(11)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(9)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(9)*d**S(3)*(d*x)**(S(5)/2)/(S(160)*b**S(2)*(a + b*x**S(2))**S(4)) - S(3)*d**S(5)*sqrt(d*x)/(S(128)*b**S(3)*(a + b*x**S(2))**S(3)) + S(3)*d**S(5)*sqrt(d*x)/(S(1024)*a*b**S(3)*(a + b*x**S(2))**S(2)) + S(21)*d**S(5)*sqrt(d*x)/(S(4096)*a**S(2)*b**S(3)*(a + b*x**S(2))) - S(63)*sqrt(S(2))*d**(S(11)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(11)/4)*b**(S(13)/4)) + S(63)*sqrt(S(2))*d**(S(11)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(11)/4)*b**(S(13)/4)) - S(63)*sqrt(S(2))*d**(S(11)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(11)/4)*b**(S(13)/4)) + S(63)*sqrt(S(2))*d**(S(11)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(11)/4)*b**(S(13)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(9)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(7)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - S(7)*d**S(3)*(d*x)**(S(3)/2)/(S(160)*b**S(2)*(a + b*x**S(2))**S(4)) + S(7)*d**S(3)*(d*x)**(S(3)/2)/(S(640)*a*b**S(2)*(a + b*x**S(2))**S(3)) + S(63)*d**S(3)*(d*x)**(S(3)/2)/(S(5120)*a**S(2)*b**S(2)*(a + b*x**S(2))**S(2)) + S(63)*d**S(3)*(d*x)**(S(3)/2)/(S(4096)*a**S(3)*b**S(2)*(a + b*x**S(2))) + S(63)*sqrt(S(2))*d**(S(9)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(13)/4)*b**(S(11)/4)) - S(63)*sqrt(S(2))*d**(S(9)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(13)/4)*b**(S(11)/4)) - S(63)*sqrt(S(2))*d**(S(9)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(13)/4)*b**(S(11)/4)) + S(63)*sqrt(S(2))*d**(S(9)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(13)/4)*b**(S(11)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(7)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(5)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) - d**S(3)*sqrt(d*x)/(S(32)*b**S(2)*(a + b*x**S(2))**S(4)) + d**S(3)*sqrt(d*x)/(S(384)*a*b**S(2)*(a + b*x**S(2))**S(3)) + S(11)*d**S(3)*sqrt(d*x)/(S(3072)*a**S(2)*b**S(2)*(a + b*x**S(2))**S(2)) + S(77)*d**S(3)*sqrt(d*x)/(S(12288)*a**S(3)*b**S(2)*(a + b*x**S(2))) - S(77)*sqrt(S(2))*d**(S(7)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(15)/4)*b**(S(9)/4)) + S(77)*sqrt(S(2))*d**(S(7)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(15)/4)*b**(S(9)/4)) - S(77)*sqrt(S(2))*d**(S(7)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(15)/4)*b**(S(9)/4)) + S(77)*sqrt(S(2))*d**(S(7)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(15)/4)*b**(S(9)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*(d*x)**(S(3)/2)/(S(10)*b*(a + b*x**S(2))**S(5)) + S(3)*d*(d*x)**(S(3)/2)/(S(160)*a*b*(a + b*x**S(2))**S(4)) + S(13)*d*(d*x)**(S(3)/2)/(S(640)*a**S(2)*b*(a + b*x**S(2))**S(3)) + S(117)*d*(d*x)**(S(3)/2)/(S(5120)*a**S(3)*b*(a + b*x**S(2))**S(2)) + S(117)*d*(d*x)**(S(3)/2)/(S(4096)*a**S(4)*b*(a + b*x**S(2))) + S(117)*sqrt(S(2))*d**(S(5)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(17)/4)*b**(S(7)/4)) - S(117)*sqrt(S(2))*d**(S(5)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(17)/4)*b**(S(7)/4)) - S(117)*sqrt(S(2))*d**(S(5)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(17)/4)*b**(S(7)/4)) + S(117)*sqrt(S(2))*d**(S(5)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(17)/4)*b**(S(7)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, -d*sqrt(d*x)/(S(10)*b*(a + b*x**S(2))**S(5)) + d*sqrt(d*x)/(S(160)*a*b*(a + b*x**S(2))**S(4)) + d*sqrt(d*x)/(S(128)*a**S(2)*b*(a + b*x**S(2))**S(3)) + S(11)*d*sqrt(d*x)/(S(1024)*a**S(3)*b*(a + b*x**S(2))**S(2)) + S(77)*d*sqrt(d*x)/(S(4096)*a**S(4)*b*(a + b*x**S(2))) - S(231)*sqrt(S(2))*d**(S(3)/2)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(19)/4)*b**(S(5)/4)) + S(231)*sqrt(S(2))*d**(S(3)/2)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(19)/4)*b**(S(5)/4)) - S(231)*sqrt(S(2))*d**(S(3)/2)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(19)/4)*b**(S(5)/4)) + S(231)*sqrt(S(2))*d**(S(3)/2)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(19)/4)*b**(S(5)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3), x), x, (d*x)**(S(3)/2)/(S(10)*a*d*(a + b*x**S(2))**S(5)) + S(17)*(d*x)**(S(3)/2)/(S(160)*a**S(2)*d*(a + b*x**S(2))**S(4)) + S(221)*(d*x)**(S(3)/2)/(S(1920)*a**S(3)*d*(a + b*x**S(2))**S(3)) + S(663)*(d*x)**(S(3)/2)/(S(5120)*a**S(4)*d*(a + b*x**S(2))**S(2)) + S(663)*(d*x)**(S(3)/2)/(S(4096)*a**S(5)*d*(a + b*x**S(2))) + S(663)*sqrt(S(2))*sqrt(d)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(21)/4)*b**(S(3)/4)) - S(663)*sqrt(S(2))*sqrt(d)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(21)/4)*b**(S(3)/4)) - S(663)*sqrt(S(2))*sqrt(d)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(21)/4)*b**(S(3)/4)) + S(663)*sqrt(S(2))*sqrt(d)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(21)/4)*b**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, sqrt(d*x)/(S(10)*a*d*(a + b*x**S(2))**S(5)) + S(19)*sqrt(d*x)/(S(160)*a**S(2)*d*(a + b*x**S(2))**S(4)) + S(19)*sqrt(d*x)/(S(128)*a**S(3)*d*(a + b*x**S(2))**S(3)) + S(209)*sqrt(d*x)/(S(1024)*a**S(4)*d*(a + b*x**S(2))**S(2)) + S(1463)*sqrt(d*x)/(S(4096)*a**S(5)*d*(a + b*x**S(2))) - S(4389)*sqrt(S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(23)/4)*b**(S(1)/4)*sqrt(d)) + S(4389)*sqrt(S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(23)/4)*b**(S(1)/4)*sqrt(d)) - S(4389)*sqrt(S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(23)/4)*b**(S(1)/4)*sqrt(d)) + S(4389)*sqrt(S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(23)/4)*b**(S(1)/4)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, S(1)/(S(10)*a*d*sqrt(d*x)*(a + b*x**S(2))**S(5)) + S(21)/(S(160)*a**S(2)*d*sqrt(d*x)*(a + b*x**S(2))**S(4)) + S(119)/(S(640)*a**S(3)*d*sqrt(d*x)*(a + b*x**S(2))**S(3)) + S(1547)/(S(5120)*a**S(4)*d*sqrt(d*x)*(a + b*x**S(2))**S(2)) + S(13923)/(S(20480)*a**S(5)*d*sqrt(d*x)*(a + b*x**S(2))) - S(13923)/(S(4096)*a**S(6)*d*sqrt(d*x)) - S(13923)*sqrt(S(2))*b**(S(1)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(25)/4)*d**(S(3)/2)) + S(13923)*sqrt(S(2))*b**(S(1)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(25)/4)*d**(S(3)/2)) + S(13923)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(25)/4)*d**(S(3)/2)) - S(13923)*sqrt(S(2))*b**(S(1)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(25)/4)*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, S(1)/(S(10)*a*d*(d*x)**(S(3)/2)*(a + b*x**S(2))**S(5)) + S(23)/(S(160)*a**S(2)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))**S(4)) + S(437)/(S(1920)*a**S(3)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))**S(3)) + S(437)/(S(1024)*a**S(4)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))**S(2)) + S(4807)/(S(4096)*a**S(5)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))) - S(33649)/(S(12288)*a**S(6)*d*(d*x)**(S(3)/2)) + S(33649)*sqrt(S(2))*b**(S(3)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(27)/4)*d**(S(5)/2)) - S(33649)*sqrt(S(2))*b**(S(3)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(27)/4)*d**(S(5)/2)) + S(33649)*sqrt(S(2))*b**(S(3)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(27)/4)*d**(S(5)/2)) - S(33649)*sqrt(S(2))*b**(S(3)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(27)/4)*d**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(7)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**S(3)), x), x, S(1)/(S(10)*a*d*(d*x)**(S(5)/2)*(a + b*x**S(2))**S(5)) + S(5)/(S(32)*a**S(2)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))**S(4)) + S(35)/(S(128)*a**S(3)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))**S(3)) + S(595)/(S(1024)*a**S(4)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))**S(2)) + S(7735)/(S(4096)*a**S(5)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))) - S(13923)/(S(4096)*a**S(6)*d*(d*x)**(S(5)/2)) + S(69615)*b/(S(4096)*a**S(7)*d**S(3)*sqrt(d*x)) + S(69615)*sqrt(S(2))*b**(S(5)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(29)/4)*d**(S(7)/2)) - S(69615)*sqrt(S(2))*b**(S(5)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(32768)*a**(S(29)/4)*d**(S(7)/2)) - S(69615)*sqrt(S(2))*b**(S(5)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(29)/4)*d**(S(7)/2)) + S(69615)*sqrt(S(2))*b**(S(5)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(16384)*a**(S(29)/4)*d**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(8)*a*(d*x)**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(77)*d*(a + b*x**S(2))) + S(2)*(d*x)**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(11)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(8)*a*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(45)*d*(a + b*x**S(2))) + S(2)*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(9)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, S(8)*a*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(21)*d*(a + b*x**S(2))) + S(2)*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(7)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/sqrt(d*x), x), x, S(8)*a*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*d*(a + b*x**S(2))) + S(2)*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*x)**(S(3)/2), x), x, -S(8)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3)*d*sqrt(d*x)*(a + b*x**S(2))) + S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3)*d*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*x)**(S(5)/2), x), x, -S(8)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))) + S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*(d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*x)**(S(7)/2), x), x, S(8)*a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))) - S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(d*(d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(256)*a**S(3)*(d*x)**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(7315)*d*(a + b*x**S(2))) + S(64)*a**S(2)*(d*x)**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1045)*d) + S(8)*a*(d*x)**(S(7)/2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(95)*d) + S(2)*(d*x)**(S(7)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(19)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(256)*a**S(3)*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3315)*d*(a + b*x**S(2))) + S(64)*a**S(2)*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(663)*d) + S(24)*a*(d*x)**(S(5)/2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(221)*d) + S(2)*(d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(17)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(256)*a**S(3)*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1155)*d*(a + b*x**S(2))) + S(64)*a**S(2)*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(385)*d) + S(8)*a*(d*x)**(S(3)/2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(55)*d) + S(2)*(d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(15)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/sqrt(d*x), x), x, S(256)*a**S(3)*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(195)*d*(a + b*x**S(2))) + S(64)*a**S(2)*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(195)*d) + S(8)*a*sqrt(d*x)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(39)*d) + S(2)*sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(13)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(d*x)**(S(3)/2), x), x, -S(256)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(77)*d*sqrt(d*x)*(a + b*x**S(2))) + S(64)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(77)*d*sqrt(d*x)) + S(24)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(77)*d*sqrt(d*x)) + S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(11)*d*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(d*x)**(S(5)/2), x), x, -S(256)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(45)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))) + S(64)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(15)*d*(d*x)**(S(3)/2)) + S(8)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(15)*d*(d*x)**(S(3)/2)) + S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(9)*d*(d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(d*x)**(S(7)/2), x), x, S(256)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(35)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))) - S(64)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(7)*d*(d*x)**(S(5)/2)) + S(8)*a*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(7)*d*(d*x)**(S(5)/2)) + S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(7)*d*(d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(16384)*a**S(5)*(d*x)**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(908523)*d*(a + b*x**S(2))) + S(4096)*a**S(4)*(d*x)**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(129789)*d) + S(512)*a**S(3)*(d*x)**(S(7)/2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(11799)*d) + S(640)*a**S(2)*(d*x)**(S(7)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(11799)*d) + S(40)*a*(d*x)**(S(7)/2)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(621)*d) + S(2)*(d*x)**(S(7)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(27)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(16384)*a**S(5)*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(348075)*d*(a + b*x**S(2))) + S(4096)*a**S(4)*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(69615)*d) + S(512)*a**S(3)*(d*x)**(S(5)/2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(7735)*d) + S(128)*a**S(2)*(d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(1785)*d) + S(8)*a*(d*x)**(S(5)/2)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(105)*d) + S(2)*(d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(25)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(16384)*a**S(5)*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(100947)*d*(a + b*x**S(2))) + S(4096)*a**S(4)*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(33649)*d) + S(512)*a**S(3)*(d*x)**(S(3)/2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4807)*d) + S(128)*a**S(2)*(d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(1311)*d) + S(40)*a*(d*x)**(S(3)/2)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(437)*d) + S(2)*(d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(23)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/sqrt(d*x), x), x, S(16384)*a**S(5)*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(13923)*d*(a + b*x**S(2))) + S(4096)*a**S(4)*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(13923)*d) + S(2560)*a**S(3)*sqrt(d*x)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(13923)*d) + S(640)*a**S(2)*sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(4641)*d) + S(40)*a*sqrt(d*x)*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(357)*d) + S(2)*sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(21)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(d*x)**(S(3)/2), x), x, -S(16384)*a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4389)*d*sqrt(d*x)*(a + b*x**S(2))) + S(4096)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4389)*d*sqrt(d*x)) + S(512)*a**S(3)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1463)*d*sqrt(d*x)) + S(128)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(627)*d*sqrt(d*x)) + S(8)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(57)*d*sqrt(d*x)) + S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(19)*d*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(d*x)**(S(5)/2), x), x, -S(16384)*a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1989)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))) + S(4096)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(663)*d*(d*x)**(S(3)/2)) + S(512)*a**S(3)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(663)*d*(d*x)**(S(3)/2)) + S(640)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(1989)*d*(d*x)**(S(3)/2)) + S(40)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(221)*d*(d*x)**(S(3)/2)) + S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(17)*d*(d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(d*x)**(S(7)/2), x), x, S(16384)*a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(1155)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))) - S(4096)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(231)*d*(d*x)**(S(5)/2)) + S(512)*a**S(3)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(231)*d*(d*x)**(S(5)/2)) + S(128)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(231)*d*(d*x)**(S(5)/2)) + S(8)*a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)/(S(33)*d*(d*x)**(S(5)/2)) + S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)/(S(15)*d*(d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(7)/2)/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -sqrt(S(2))*a**(S(5)/4)*d**(S(7)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*a**(S(5)/4)*d**(S(7)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*a**(S(5)/4)*d**(S(7)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*a**(S(5)/4)*d**(S(7)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(2)*a*d**S(3)*sqrt(d*x)*(a + b*x**S(2))/(b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(2)*d*(d*x)**(S(5)/2)*(a + b*x**S(2))/(S(5)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -sqrt(S(2))*a**(S(3)/4)*d**(S(5)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*a**(S(3)/4)*d**(S(5)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*a**(S(3)/4)*d**(S(5)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*a**(S(3)/4)*d**(S(5)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(2)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, sqrt(S(2))*a**(S(1)/4)*d**(S(3)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*a**(S(1)/4)*d**(S(3)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*a**(S(1)/4)*d**(S(3)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*a**(S(1)/4)*d**(S(3)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(2)*d*sqrt(d*x)*(a + b*x**S(2))/(b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(1)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(1)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(1)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(1)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, -sqrt(S(2))*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(3)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(3)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(3)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(3)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, (-S(2)*a - S(2)*b*x**S(2))/(a*d*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(5)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(5)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(5)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(5)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, (-S(2)*a - S(2)*b*x**S(2))/(S(3)*a*d*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(7)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(7)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(7)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(7)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, (-S(2)*a - S(2)*b*x**S(2))/(S(5)*a*d*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(2)*b*(a + b*x**S(2))/(a**S(2)*d**S(3)*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(9)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(4)*a**(S(9)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(9)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(2)*a**(S(9)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(15)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, -S(117)*sqrt(S(2))*a**(S(5)/4)*d**(S(15)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*b**(S(17)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(117)*sqrt(S(2))*a**(S(5)/4)*d**(S(15)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*b**(S(17)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(117)*sqrt(S(2))*a**(S(5)/4)*d**(S(15)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*b**(S(17)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(117)*sqrt(S(2))*a**(S(5)/4)*d**(S(15)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*b**(S(17)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + a*d**S(3)*(d*x)**(S(9)/2)*(a + b*x**S(2))/(S(4)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(117)*a*d**S(7)*sqrt(d*x)*(a + b*x**S(2))/(S(16)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(17)*d**S(3)*(d*x)**(S(9)/2)/(S(16)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(117)*d**S(5)*(d*x)**(S(5)/2)*(a + b*x**S(2))/(S(80)*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(13)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, -S(77)*sqrt(S(2))*a**(S(3)/4)*d**(S(13)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*b**(S(15)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*sqrt(S(2))*a**(S(3)/4)*d**(S(13)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*b**(S(15)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*sqrt(S(2))*a**(S(3)/4)*d**(S(13)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*b**(S(15)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(77)*sqrt(S(2))*a**(S(3)/4)*d**(S(13)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*b**(S(15)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + a*d**S(3)*(d*x)**(S(7)/2)*(a + b*x**S(2))/(S(4)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(15)*d**S(3)*(d*x)**(S(7)/2)/(S(16)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*d**S(5)*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(48)*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(11)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, S(45)*sqrt(S(2))*a**(S(1)/4)*d**(S(11)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*b**(S(13)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(45)*sqrt(S(2))*a**(S(1)/4)*d**(S(11)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*b**(S(13)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(45)*sqrt(S(2))*a**(S(1)/4)*d**(S(11)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*b**(S(13)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(45)*sqrt(S(2))*a**(S(1)/4)*d**(S(11)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*b**(S(13)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + a*d**S(3)*(d*x)**(S(5)/2)*(a + b*x**S(2))/(S(4)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(13)*d**S(3)*(d*x)**(S(5)/2)/(S(16)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(45)*d**S(5)*sqrt(d*x)*(a + b*x**S(2))/(S(16)*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(9)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, a*d**S(3)*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(4)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(11)*d**S(3)*(d*x)**(S(3)/2)/(S(16)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(21)*sqrt(S(2))*d**(S(9)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(1)/4)*b**(S(11)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(21)*sqrt(S(2))*d**(S(9)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(1)/4)*b**(S(11)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(21)*sqrt(S(2))*d**(S(9)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(1)/4)*b**(S(11)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(21)*sqrt(S(2))*d**(S(9)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(1)/4)*b**(S(11)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(7)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, a*d**S(3)*sqrt(d*x)*(a + b*x**S(2))/(S(4)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(9)*d**S(3)*sqrt(d*x)/(S(16)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(5)*sqrt(S(2))*d**(S(7)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(3)/4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(5)*sqrt(S(2))*d**(S(7)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(3)/4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(5)*sqrt(S(2))*d**(S(7)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(3)/4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(5)*sqrt(S(2))*d**(S(7)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(3)/4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, (d*x)**(S(7)/2)*(a + b*x**S(2))/(S(4)*a*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - d*(d*x)**(S(3)/2)/(S(16)*a*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3)*sqrt(S(2))*d**(S(5)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(5)/4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3)*sqrt(S(2))*d**(S(5)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(5)/4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3)*sqrt(S(2))*d**(S(5)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(5)/4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3)*sqrt(S(2))*d**(S(5)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(5)/4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, (d*x)**(S(5)/2)*(a + b*x**S(2))/(S(4)*a*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(3)*d*sqrt(d*x)/(S(16)*a*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3)*sqrt(S(2))*d**(S(3)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(7)/4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3)*sqrt(S(2))*d**(S(3)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(7)/4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3)*sqrt(S(2))*d**(S(3)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(7)/4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3)*sqrt(S(2))*d**(S(3)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(7)/4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, (d*x)**(S(3)/2)*(a + b*x**S(2))/(S(4)*a*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(5)*(d*x)**(S(3)/2)/(S(16)*a**S(2)*d*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(5)*sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(9)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(5)*sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(9)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(5)*sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(9)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(5)*sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(9)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, sqrt(d*x)*(a + b*x**S(2))/(S(4)*a*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(7)*sqrt(d*x)/(S(16)*a**S(2)*d*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*(S(21)*a + S(21)*b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(11)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*(S(21)*a + S(21)*b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(11)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*(S(21)*a + S(21)*b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(11)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*(S(21)*a + S(21)*b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(11)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, (a + b*x**S(2))/(S(4)*a*d*sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(9)/(S(16)*a**S(2)*d*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(45)*a + S(45)*b*x**S(2))/(S(16)*a**S(3)*d*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(45)*sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(13)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(45)*sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(13)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(45)*sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(13)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(45)*sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(13)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, (a + b*x**S(2))/(S(4)*a*d*(d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(11)/(S(16)*a**S(2)*d*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(77)*a + S(77)*b*x**S(2))/(S(48)*a**S(3)*d*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(15)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(77)*sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(15)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(15)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(77)*sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(15)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(7)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, (a + b*x**S(2))/(S(4)*a*d*(d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(13)/(S(16)*a**S(2)*d*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(117)*a + S(117)*b*x**S(2))/(S(80)*a**S(3)*d*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(117)*b*(a + b*x**S(2))/(S(16)*a**S(4)*d**S(3)*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(117)*sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(17)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(117)*sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(128)*a**(S(17)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(117)*sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(17)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(117)*sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(64)*a**(S(17)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(23)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, -S(13923)*sqrt(S(2))*a**(S(5)/4)*d**(S(23)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*b**(S(25)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(13923)*sqrt(S(2))*a**(S(5)/4)*d**(S(23)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*b**(S(25)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(13923)*sqrt(S(2))*a**(S(5)/4)*d**(S(23)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*b**(S(25)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(13923)*sqrt(S(2))*a**(S(5)/4)*d**(S(23)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*b**(S(25)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + a*d**S(3)*(d*x)**(S(17)/2)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(119)*a*d**S(7)*(d*x)**(S(9)/2)*(a + b*x**S(2))/(S(256)*b**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(13923)*a*d**S(11)*sqrt(d*x)*(a + b*x**S(2))/(S(1024)*b**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(11)*d**S(3)*(d*x)**(S(17)/2)/(S(32)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(2023)*d**S(7)*(d*x)**(S(9)/2)/(S(1024)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(13923)*d**S(9)*(d*x)**(S(5)/2)*(a + b*x**S(2))/(S(5120)*b**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(21)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, -S(7315)*sqrt(S(2))*a**(S(3)/4)*d**(S(21)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*b**(S(23)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(7315)*sqrt(S(2))*a**(S(3)/4)*d**(S(21)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*b**(S(23)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(7315)*sqrt(S(2))*a**(S(3)/4)*d**(S(21)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*b**(S(23)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(7315)*sqrt(S(2))*a**(S(3)/4)*d**(S(21)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*b**(S(23)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + a*d**S(3)*(d*x)**(S(15)/2)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(95)*a*d**S(7)*(d*x)**(S(7)/2)*(a + b*x**S(2))/(S(256)*b**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(31)*d**S(3)*(d*x)**(S(15)/2)/(S(96)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(1425)*d**S(7)*(d*x)**(S(7)/2)/(S(1024)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(7315)*d**S(9)*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(3072)*b**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(19)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, S(3315)*sqrt(S(2))*a**(S(1)/4)*d**(S(19)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*b**(S(21)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3315)*sqrt(S(2))*a**(S(1)/4)*d**(S(19)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*b**(S(21)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3315)*sqrt(S(2))*a**(S(1)/4)*d**(S(19)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*b**(S(21)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3315)*sqrt(S(2))*a**(S(1)/4)*d**(S(19)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*b**(S(21)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + a*d**S(3)*(d*x)**(S(13)/2)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(221)*a*d**S(7)*(d*x)**(S(5)/2)*(a + b*x**S(2))/(S(768)*b**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(29)*d**S(3)*(d*x)**(S(13)/2)/(S(96)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(2873)*d**S(7)*(d*x)**(S(5)/2)/(S(3072)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3315)*d**S(9)*sqrt(d*x)*(a + b*x**S(2))/(S(1024)*b**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(17)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*d**S(3)*(d*x)**(S(11)/2)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(55)*a*d**S(7)*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(256)*b**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(9)*d**S(3)*(d*x)**(S(11)/2)/(S(32)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(605)*d**S(7)*(d*x)**(S(3)/2)/(S(1024)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(1155)*sqrt(S(2))*d**(S(17)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(1)/4)*b**(S(19)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(1155)*sqrt(S(2))*d**(S(17)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(1)/4)*b**(S(19)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(1155)*sqrt(S(2))*d**(S(17)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(1)/4)*b**(S(19)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(1155)*sqrt(S(2))*d**(S(17)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(1)/4)*b**(S(19)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(15)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*d**S(3)*(d*x)**(S(9)/2)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(39)*a*d**S(7)*sqrt(d*x)*(a + b*x**S(2))/(S(256)*b**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(25)*d**S(3)*(d*x)**(S(9)/2)/(S(96)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(351)*d**S(7)*sqrt(d*x)/(S(1024)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(195)*sqrt(S(2))*d**(S(15)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(3)/4)*b**(S(17)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(195)*sqrt(S(2))*d**(S(15)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(3)/4)*b**(S(17)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(195)*sqrt(S(2))*d**(S(15)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(3)/4)*b**(S(17)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(195)*sqrt(S(2))*d**(S(15)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(3)/4)*b**(S(17)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(13)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*d**S(3)*(d*x)**(S(7)/2)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(23)*d**S(3)*(d*x)**(S(7)/2)/(S(96)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(77)*d**S(3)*(d*x)**(S(7)/2)*(a + b*x**S(2))/(S(768)*a*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(77)*d**S(5)*(d*x)**(S(3)/2)/(S(3072)*a*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*sqrt(S(2))*d**(S(13)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(5)/4)*b**(S(15)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(77)*sqrt(S(2))*d**(S(13)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(5)/4)*b**(S(15)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(77)*sqrt(S(2))*d**(S(13)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(5)/4)*b**(S(15)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*sqrt(S(2))*d**(S(13)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(5)/4)*b**(S(15)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(11)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*d**S(3)*(d*x)**(S(5)/2)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(7)*d**S(3)*(d*x)**(S(5)/2)/(S(32)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(15)*d**S(3)*(d*x)**(S(5)/2)*(a + b*x**S(2))/(S(256)*a*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) - S(45)*d**S(5)*sqrt(d*x)/(S(1024)*a*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(45)*sqrt(S(2))*d**(S(11)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(7)/4)*b**(S(13)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(45)*sqrt(S(2))*d**(S(11)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(7)/4)*b**(S(13)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(45)*sqrt(S(2))*d**(S(11)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(7)/4)*b**(S(13)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(45)*sqrt(S(2))*d**(S(11)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(7)/4)*b**(S(13)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(9)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*d**S(3)*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(19)*d**S(3)*(d*x)**(S(3)/2)/(S(96)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(7)*d**S(3)*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(256)*a*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(35)*d**S(3)*(d*x)**(S(3)/2)/(S(1024)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(35)*sqrt(S(2))*d**(S(9)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(9)/4)*b**(S(11)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(35)*sqrt(S(2))*d**(S(9)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(9)/4)*b**(S(11)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(35)*sqrt(S(2))*d**(S(9)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(9)/4)*b**(S(11)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(35)*sqrt(S(2))*d**(S(9)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(9)/4)*b**(S(11)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(7)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, a*d**S(3)*sqrt(d*x)*(a + b*x**S(2))/(S(8)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(17)*d**S(3)*sqrt(d*x)/(S(96)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(5)*d**S(3)*sqrt(d*x)*(a + b*x**S(2))/(S(768)*a*b**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(35)*d**S(3)*sqrt(d*x)/(S(3072)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(35)*sqrt(S(2))*d**(S(7)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(11)/4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(35)*sqrt(S(2))*d**(S(7)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(11)/4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(35)*sqrt(S(2))*d**(S(7)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(11)/4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(35)*sqrt(S(2))*d**(S(7)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(11)/4)*b**(S(9)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, (d*x)**(S(7)/2)*(a + b*x**S(2))/(S(8)*a*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(3)*d*(d*x)**(S(3)/2)/(S(32)*a*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(9)*d*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(256)*a**S(2)*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(45)*d*(d*x)**(S(3)/2)/(S(1024)*a**S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(45)*sqrt(S(2))*d**(S(5)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(13)/4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(45)*sqrt(S(2))*d**(S(5)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(13)/4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(45)*sqrt(S(2))*d**(S(5)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(13)/4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(45)*sqrt(S(2))*d**(S(5)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(13)/4)*b**(S(7)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, (d*x)**(S(5)/2)*(a + b*x**S(2))/(S(8)*a*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) - S(11)*d*sqrt(d*x)/(S(96)*a*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(11)*d*sqrt(d*x)*(a + b*x**S(2))/(S(768)*a**S(2)*b*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(77)*d*sqrt(d*x)/(S(3072)*a**S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(77)*sqrt(S(2))*d**(S(3)/2)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(15)/4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*sqrt(S(2))*d**(S(3)/2)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(15)/4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(77)*sqrt(S(2))*d**(S(3)/2)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(15)/4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(77)*sqrt(S(2))*d**(S(3)/2)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(15)/4)*b**(S(5)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2), x), x, (d*x)**(S(3)/2)*(a + b*x**S(2))/(S(8)*a*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(13)*(d*x)**(S(3)/2)/(S(96)*a**S(2)*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(39)*(d*x)**(S(3)/2)*(a + b*x**S(2))/(S(256)*a**S(3)*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(195)*(d*x)**(S(3)/2)/(S(1024)*a**S(4)*d*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(195)*sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(17)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(195)*sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(17)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(195)*sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(17)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(195)*sqrt(S(2))*sqrt(d)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(17)/4)*b**(S(3)/4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), x), x, sqrt(d*x)*(a + b*x**S(2))/(S(8)*a*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(5)*sqrt(d*x)/(S(32)*a**S(2)*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(55)*sqrt(d*x)*(a + b*x**S(2))/(S(256)*a**S(3)*d*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(385)*sqrt(d*x)/(S(1024)*a**S(4)*d*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*(S(1155)*a + S(1155)*b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(19)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*(S(1155)*a + S(1155)*b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(19)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - sqrt(S(2))*(S(1155)*a + S(1155)*b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(19)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + sqrt(S(2))*(S(1155)*a + S(1155)*b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(19)/4)*b**(S(1)/4)*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), x), x, (a + b*x**S(2))/(S(8)*a*d*sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(17)/(S(96)*a**S(2)*d*sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + (S(221)*a + S(221)*b*x**S(2))/(S(768)*a**S(3)*d*sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(663)/(S(1024)*a**S(4)*d*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(3315)*a + S(3315)*b*x**S(2))/(S(1024)*a**S(5)*d*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3315)*sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(21)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3315)*sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(21)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(3315)*sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(21)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(3315)*sqrt(S(2))*b**(S(1)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(21)/4)*d**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), x), x, (a + b*x**S(2))/(S(8)*a*d*(d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(19)/(S(96)*a**S(2)*d*(d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + (S(95)*a + S(95)*b*x**S(2))/(S(256)*a**S(3)*d*(d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(1045)/(S(1024)*a**S(4)*d*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(7315)*a + S(7315)*b*x**S(2))/(S(3072)*a**S(5)*d*(d*x)**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(7315)*sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(23)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(7315)*sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(23)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(7315)*sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(23)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(7315)*sqrt(S(2))*b**(S(3)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(23)/4)*d**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(7)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)), x), x, (a + b*x**S(2))/(S(8)*a*d*(d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(5)/2)) + S(7)/(S(32)*a**S(2)*d*(d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + (S(119)*a + S(119)*b*x**S(2))/(S(256)*a**S(3)*d*(d*x)**(S(5)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)) + S(1547)/(S(1024)*a**S(4)*d*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (S(13923)*a + S(13923)*b*x**S(2))/(S(5120)*a**S(5)*d*(d*x)**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(13923)*b*(a + b*x**S(2))/(S(1024)*a**S(6)*d**S(3)*sqrt(d*x)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(13923)*sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(25)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(13923)*sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*sqrt(d*x) + sqrt(a)*sqrt(d) + sqrt(b)*sqrt(d)*x)/(S(8192)*a**(S(25)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - S(13923)*sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(25)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + S(13923)*sqrt(S(2))*b**(S(5)/4)*(a + b*x**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*sqrt(d*x)/(a**(S(1)/4)*sqrt(d)))/(S(4096)*a**(S(25)/4)*d**(S(7)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(4)/3)), x), x, S(3)/(S(10)*a*x*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(1)/3)) + S(39)/(S(40)*a**S(2)*x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(1)/3)) - (S(91)*a + S(91)*b*x**S(2))/(S(40)*a**S(3)*x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(1)/3)) + S(91)*S(3)**(S(3)/4)*sqrt((a**(S(2)/3)*b**(S(2)/3) + a**(S(1)/3)*b**(S(1)/3)*(a*b + b**S(2)*x**S(2))**(S(1)/3) + (a*b + b**S(2)*x**S(2))**(S(2)/3))/(a**(S(1)/3)*b**(S(1)/3)*(-sqrt(S(3)) + S(1)) - (a*b + b**S(2)*x**S(2))**(S(1)/3))**S(2))*sqrt(-sqrt(S(3)) + S(2))*(a**(S(1)/3)*b**(S(1)/3) - (a*b + b**S(2)*x**S(2))**(S(1)/3))*(a*b + b**S(2)*x**S(2))**(S(2)/3)*elliptic_f(asin((a**(S(1)/3)*b**(S(1)/3)*(S(1) + sqrt(S(3))) - (a*b + b**S(2)*x**S(2))**(S(1)/3))/(a**(S(1)/3)*b**(S(1)/3)*(-sqrt(S(3)) + S(1)) - (a*b + b**S(2)*x**S(2))**(S(1)/3))), S(-7) + S(4)*sqrt(S(3)))/(S(120)*a**S(3)*b*x*sqrt(-a**(S(1)/3)*b**(S(1)/3)*(a**(S(1)/3)*b**(S(1)/3) - (a*b + b**S(2)*x**S(2))**(S(1)/3))/(a**(S(1)/3)*b**(S(1)/3)*(-sqrt(S(3)) + S(1)) - (a*b + b**S(2)*x**S(2))**(S(1)/3))**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, (d*x)**(m + S(1))*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(1), m/S(2) + S(2)*p + S(3)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(a*d*(m + S(1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((d*x)**m*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, (d*x)**(m + S(1))*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((m/S(2) + S(1)/2, -S(2)*p), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, -a*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/(S(2)*b**S(2)*(S(2)*p + S(1))) + (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(p + S(1))/(S(4)*b**S(2)*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, (a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/(S(2)*b*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/x, x), x, -(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(1), S(2)*p + S(1)), (S(2)*p + S(2),), S(1) + b*x**S(2)/a)/(S(2)*a*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/x**S(3), x), x, b*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(2), S(2)*p + S(1)), (S(2)*p + S(2),), S(1) + b*x**S(2)/a)/(S(2)*a**S(2)*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, x**S(5)*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(5)/2, -S(2)*p), (S(7)/2,), -b*x**S(2)/a)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, x**S(3)*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(3)/2, -S(2)*p), (S(5)/2,), -b*x**S(2)/a)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, x*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(1)/2, -S(2)*p), (S(3)/2,), -b*x**S(2)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/x**S(2), x), x, -(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(-1)/2, -S(2)*p), (S(1)/2,), -b*x**S(2)/a)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/x**S(4), x), x, -(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(-3)/2, -S(2)*p), (S(-1)/2,), -b*x**S(2)/a)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, S(2)*(d*x)**(S(5)/2)*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(5)/4, -S(2)*p), (S(9)/4,), -b*x**S(2)/a)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, S(2)*(d*x)**(S(3)/2)*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(3)/4, -S(2)*p), (S(7)/4,), -b*x**S(2)/a)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/sqrt(d*x), x), x, S(2)*sqrt(d*x)*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(1)/4, -S(2)*p), (S(5)/4,), -b*x**S(2)/a)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/(d*x)**(S(3)/2), x), x, -S(2)*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(-1)/4, -S(2)*p), (S(3)/4,), -b*x**S(2)/a)/(d*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p/(d*x)**(S(5)/2), x), x, -S(2)*(S(1) + b*x**S(2)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p*hyper((S(-3)/4, -S(2)*p), (S(1)/4,), -b*x**S(2)/a)/(S(3)*d*(d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4)), x), x, a*x**S(3)/S(3) + b*x**S(5)/S(5) + c*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2) + c*x**S(4)), x), x, a*x**S(2)/S(2) + b*x**S(4)/S(4) + c*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a + b*x**S(2) + c*x**S(4), x), x, a*x + b*x**S(3)/S(3) + c*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x, x), x, a*log(x) + b*x**S(2)/S(2) + c*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**S(2), x), x, -a/x + b*x + c*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**S(3), x), x, -a/(S(2)*x**S(2)) + b*log(x) + c*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**S(4), x), x, -a/(S(3)*x**S(3)) - b/x + c*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**S(5), x), x, -a/(S(4)*x**S(4)) - b/(S(2)*x**S(2)) + c*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**S(6), x), x, -a/(S(5)*x**S(5)) - b/(S(3)*x**S(3)) - c/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**S(7), x), x, -a/(S(6)*x**S(6)) - b/(S(4)*x**S(4)) - c/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**S(8), x), x, -a/(S(7)*x**S(7)) - b/(S(5)*x**S(5)) - c/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*x**S(3)/S(3) + S(2)*a*b*x**S(5)/S(5) + S(2)*b*c*x**S(9)/S(9) + c**S(2)*x**S(11)/S(11) + x**S(7)*(S(2)*a*c/S(7) + b**S(2)/S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*x**S(2)/S(2) + a*b*x**S(4)/S(2) + b*c*x**S(8)/S(4) + c**S(2)*x**S(10)/S(10) + x**S(6)*(a*c/S(3) + b**S(2)/S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*x + S(2)*a*b*x**S(3)/S(3) + S(2)*b*c*x**S(7)/S(7) + c**S(2)*x**S(9)/S(9) + x**S(5)*(S(2)*a*c/S(5) + b**S(2)/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x, x), x, a**S(2)*log(x) + a*b*x**S(2) + b*c*x**S(6)/S(3) + c**S(2)*x**S(8)/S(8) + x**S(4)*(a*c/S(2) + b**S(2)/S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(2), x), x, -a**S(2)/x + S(2)*a*b*x + S(2)*b*c*x**S(5)/S(5) + c**S(2)*x**S(7)/S(7) + x**S(3)*(S(2)*a*c/S(3) + b**S(2)/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(3), x), x, -a**S(2)/(S(2)*x**S(2)) + S(2)*a*b*log(x) + b*c*x**S(4)/S(2) + c**S(2)*x**S(6)/S(6) + x**S(2)*(a*c + b**S(2)/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(4), x), x, -a**S(2)/(S(3)*x**S(3)) - S(2)*a*b/x + S(2)*b*c*x**S(3)/S(3) + c**S(2)*x**S(5)/S(5) + x*(S(2)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(5), x), x, -a**S(2)/(S(4)*x**S(4)) - a*b/x**S(2) + b*c*x**S(2) + c**S(2)*x**S(4)/S(4) + (S(2)*a*c + b**S(2))*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(6), x), x, -a**S(2)/(S(5)*x**S(5)) - S(2)*a*b/(S(3)*x**S(3)) + S(2)*b*c*x + c**S(2)*x**S(3)/S(3) - (S(2)*a*c + b**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(7), x), x, -a**S(2)/(S(6)*x**S(6)) - a*b/(S(2)*x**S(4)) + S(2)*b*c*log(x) + c**S(2)*x**S(2)/S(2) - (S(2)*a*c + b**S(2))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(8), x), x, -a**S(2)/(S(7)*x**S(7)) - S(2)*a*b/(S(5)*x**S(5)) - S(2)*b*c/x + c**S(2)*x - (S(2)*a*c + b**S(2))/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(9), x), x, -a**S(2)/(S(8)*x**S(8)) - a*b/(S(3)*x**S(6)) - b*c/x**S(2) + c**S(2)*log(x) - (S(2)*a*c + b**S(2))/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(10), x), x, -a**S(2)/(S(9)*x**S(9)) - S(2)*a*b/(S(7)*x**S(7)) - S(2)*b*c/(S(3)*x**S(3)) - c**S(2)/x - (S(2)*a*c + b**S(2))/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(11), x), x, -a**S(2)/(S(10)*x**S(10)) - a*b/(S(4)*x**S(8)) - b*c/(S(2)*x**S(4)) - c**S(2)/(S(2)*x**S(2)) - (S(2)*a*c + b**S(2))/(S(6)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(12), x), x, -a**S(2)/(S(11)*x**S(11)) - S(2)*a*b/(S(9)*x**S(9)) - S(2)*b*c/(S(5)*x**S(5)) - c**S(2)/(S(3)*x**S(3)) - (S(2)*a*c + b**S(2))/(S(7)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**S(13), x), x, -a**S(2)/(S(12)*x**S(12)) - a*b/(S(5)*x**S(10)) - b*c/(S(3)*x**S(6)) - c**S(2)/(S(4)*x**S(4)) - (S(2)*a*c + b**S(2))/(S(8)*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, a**S(3)*x**S(3)/S(3) + S(3)*a**S(2)*b*x**S(5)/S(5) + S(3)*a*x**S(7)*(a*c + b**S(2))/S(7) + S(3)*b*c**S(2)*x**S(13)/S(13) + b*x**S(9)*(S(6)*a*c + b**S(2))/S(9) + c**S(3)*x**S(15)/S(15) + S(3)*c*x**S(11)*(a*c + b**S(2))/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, a**S(3)*x**S(2)/S(2) + S(3)*a**S(2)*b*x**S(4)/S(4) + a*x**S(6)*(a*c + b**S(2))/S(2) + b*c**S(2)*x**S(12)/S(4) + b*x**S(8)*(S(6)*a*c + b**S(2))/S(8) + c**S(3)*x**S(14)/S(14) + S(3)*c*x**S(10)*(a*c + b**S(2))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3), x), x, a**S(3)*x + a**S(2)*b*x**S(3) + S(3)*a*x**S(5)*(a*c + b**S(2))/S(5) + S(3)*b*c**S(2)*x**S(11)/S(11) + b*x**S(7)*(S(6)*a*c + b**S(2))/S(7) + c**S(3)*x**S(13)/S(13) + c*x**S(9)*(a*c + b**S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)/x, x), x, a**S(3)*log(x) + S(3)*a**S(2)*b*x**S(2)/S(2) + S(3)*a*x**S(4)*(a*c + b**S(2))/S(4) + S(3)*b*c**S(2)*x**S(10)/S(10) + b*x**S(6)*(S(6)*a*c + b**S(2))/S(6) + c**S(3)*x**S(12)/S(12) + S(3)*c*x**S(8)*(a*c + b**S(2))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)/x**S(2), x), x, -a**S(3)/x + S(3)*a**S(2)*b*x + a*x**S(3)*(a*c + b**S(2)) + b*c**S(2)*x**S(9)/S(3) + b*x**S(5)*(S(6)*a*c + b**S(2))/S(5) + c**S(3)*x**S(11)/S(11) + S(3)*c*x**S(7)*(a*c + b**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)/x**S(3), x), x, -a**S(3)/(S(2)*x**S(2)) + S(3)*a**S(2)*b*log(x) + S(3)*a*x**S(2)*(a*c + b**S(2))/S(2) + S(3)*b*c**S(2)*x**S(8)/S(8) + b*x**S(4)*(S(6)*a*c + b**S(2))/S(4) + c**S(3)*x**S(10)/S(10) + c*x**S(6)*(a*c + b**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)/x**S(4), x), x, -a**S(3)/(S(3)*x**S(3)) - S(3)*a**S(2)*b/x + S(3)*a*x*(a*c + b**S(2)) + S(3)*b*c**S(2)*x**S(7)/S(7) + b*x**S(3)*(S(6)*a*c + b**S(2))/S(3) + c**S(3)*x**S(9)/S(9) + S(3)*c*x**S(5)*(a*c + b**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a + b*x**S(2) + c*x**S(4)), x), x, -b*x**S(2)/(S(2)*c**S(2)) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*sqrt(-S(4)*a*c + b**S(2))) + x**S(4)/(S(4)*c) + (-a*c + b**S(2))*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a + b*x**S(2) + c*x**S(4)), x), x, -b*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) + x**S(2)/(S(2)*c) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*x**S(2) + c*x**S(4)), x), x, b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))) + log(a + b*x**S(2) + c*x**S(4))/(S(4)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**S(2) + c*x**S(4)), x), x, -atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**S(2) + c*x**S(4))), x), x, b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))) + log(x)/a - log(a + b*x**S(2) + c*x**S(4))/(S(4)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(2)*a*x**S(2)) - b*log(x)/a**S(2) + b*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a + b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(4)*a*x**S(4)) + b/(S(2)*a**S(2)*x**S(2)) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(3)*sqrt(-S(4)*a*c + b**S(2))) + (-a*c + b**S(2))*log(x)/a**S(3) - (-a*c + b**S(2))*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a + b*x**S(2) + c*x**S(4)), x), x, -b*x/c**S(2) + x**S(3)/(S(3)*c) + sqrt(S(2))*(-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a + b*x**S(2) + c*x**S(4)), x), x, x/c - sqrt(S(2))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(S(2))*sqrt(c)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - S(1)/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a + b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(3)*a*x**S(3)) + b/(a**S(2)*x) + sqrt(S(2))*sqrt(c)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*sqrt(c)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -b*x**S(2)/(S(2)*c*(-S(4)*a*c + b**S(2))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x**S(4)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*a*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + x**S(2)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + (S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*c*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - (b + S(2)*c*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + log(x)/a**S(2) - log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*x**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (-S(3)*a*c + b**S(2))/(a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) - S(2)*b*log(x)/a**S(3) + b*log(a + b*x**S(2) + c*x**S(4))/(S(2)*a**S(3)) - (S(6)*a**S(2)*c**S(2) - S(6)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -b*x**S(3)/(S(2)*c*(-S(4)*a*c + b**S(2))) + x**S(5)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + x*(-S(10)*a*c + S(3)*b**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*(-S(13)*a*b*c + S(3)*b**S(3) + (S(20)*a**S(2)*c**S(2) - S(19)*a*b**S(2)*c + S(3)*b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*(-S(13)*a*b*c + S(3)*b**S(3) - (S(20)*a**S(2)*c**S(2) - S(19)*a*b**S(2)*c + S(3)*b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -b*x/(S(2)*c*(-S(4)*a*c + b**S(2))) + x**S(3)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(-S(6)*a*c + b**S(2) + b*(-S(8)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(-S(6)*a*c + b**S(2) - b*(-S(8)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, x*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(b - (S(4)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -sqrt(S(2))*sqrt(c)*(S(2)*b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(S(2)*b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - x*(b + S(2)*c*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(-2)), x), x, -sqrt(S(2))*sqrt(c)*(-S(12)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(-S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*x*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) - (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) + (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (-S(10)*a*c + S(3)*b**S(2))/(S(2)*a**S(2)*x*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -b*x**S(2)*(-S(7)*a*c + b**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**S(2)) + b*(S(30)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x**S(8)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + x**S(4)*(a*(-S(16)*a*c + b**S(2)) + b*x**S(2)*(-S(10)*a*c + b**S(2)))/(S(4)*c*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(6)*a**S(2)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) - S(3)*a*x**S(2)*(S(2)*a + b*x**S(2))/(S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + x**S(6)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(3)*a*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + S(3)*b*x**S(2)*(S(2)*a + b*x**S(2))/(S(4)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - x**S(6)*(b + S(2)*c*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, x**S(2)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + (S(3)*a*b + x**S(2)*(S(2)*a*c + b**S(2)))/(S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - (S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(3)*b*c*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) - S(3)*b*(b + S(2)*c*x**S(2))/(S(4)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + (S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(6)*c**S(2)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + S(3)*c*(b + S(2)*c*x**S(2))/(S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - (b + S(2)*c*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**S(2) + c*x**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + (S(16)*a**S(2)*c**S(2) - S(15)*a*b**S(2)*c + S(2)*b**S(4) + S(2)*b*c*x**S(2)*(-S(7)*a*c + b**S(2)))/(S(4)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + b*(S(30)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + log(x)/a**S(3) - log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**S(2) + c*x**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(4)*a*x**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + (S(20)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4) + S(3)*b*c*x**S(2)*(-S(6)*a*c + b**S(2)))/(S(4)*a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - (S(30)*a**S(2)*c**S(2) - S(21)*a*b**S(2)*c + S(3)*b**S(4))/(S(2)*a**S(3)*x**S(2)*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*b*log(x)/a**S(4) + S(3)*b*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(4)) - (-S(60)*a**S(3)*c**S(3) + S(90)*a**S(2)*b**S(2)*c**S(2) - S(30)*a*b**S(4)*c + S(3)*b**S(6))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(4)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(3)*b*x*(-S(8)*a*c + b**S(2))/(S(8)*c**S(2)*(-S(4)*a*c + b**S(2))**S(2)) + x**S(7)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + x**S(5)*(S(12)*a*b - x**S(2)*(-S(28)*a*c + b**S(2)))/(S(8)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + x**S(3)*(-S(28)*a*c + b**S(2))/(S(8)*c*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(S(84)*a**S(2)*c**S(2) - S(27)*a*b**S(2)*c + S(3)*b**S(4) + S(3)*(S(44)*a**S(2)*b*c**S(2) - S(11)*a*b**S(3)*c + b**S(5))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(S(84)*a**S(2)*c**S(2) - S(27)*a*b**S(2)*c + S(3)*b**S(4) - S(3)*b*(S(44)*a**S(2)*c**S(2) - S(11)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, x**S(5)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + x**S(3)*(S(12)*a*b + x**S(2)*(S(20)*a*c + b**S(2)))/(S(8)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - x*(S(20)*a*c + b**S(2))/(S(8)*c*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(-S(16)*a*b*c + b**S(3) + (-S(40)*a**S(2)*c**S(2) - S(18)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(-S(16)*a*b*c + b**S(3) - (-S(40)*a**S(2)*c**S(2) - S(18)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, x**S(3)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + S(3)*x*(S(4)*a*b + x**S(2)*(S(4)*a*c + b**S(2)))/(S(8)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(S(12)*a*c + S(3)*b**S(2) + S(3)*b*(S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(S(12)*a*c + S(3)*b**S(2) - S(3)*b*(S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(3)*sqrt(S(2))*sqrt(c)*(S(4)*a*c + S(3)*b**S(2) + S(2)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(8)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*sqrt(S(2))*sqrt(c)*(S(4)*a*c + S(3)*b**S(2) - S(2)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(8)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - x*(-S(4)*a*c + S(7)*b**S(2) + S(12)*b*c*x**S(2))/(S(8)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x*(b + S(2)*c*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + sqrt(S(2))*sqrt(c)*(S(20)*a*c + b**S(2) - b*(-S(52)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*sqrt(c)*(S(20)*a*c + b**S(2) + b*(-S(52)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + x*(b*(S(8)*a*c + b**S(2)) + c*x**S(2)*(S(20)*a*c + b**S(2)))/(S(8)*a*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(-3)), x), x, x*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + S(3)*sqrt(S(2))*sqrt(c)*(-S(8)*a*b*c + b**S(3) - (S(56)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + S(3)*sqrt(S(2))*sqrt(c)*(S(56)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4) + b*(-S(8)*a*c + b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x*(S(3)*b*c*x**S(2)*(-S(8)*a*c + b**S(2)) + (-S(7)*a*c + b**S(2))*(-S(4)*a*c + S(3)*b**S(2)))/(S(8)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**S(2) + c*x**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(4)*a*x*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + (S(36)*a**S(2)*c**S(2) - S(35)*a*b**S(2)*c + S(5)*b**S(4) + b*c*x**S(2)*(-S(32)*a*c + S(5)*b**S(2)))/(S(8)*a**S(2)*x*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - S(3)*sqrt(S(2))*sqrt(c)*((-S(12)*a*c + S(5)*b**S(2))*(-S(5)*a*c + b**S(2)) - (S(124)*a**S(2)*b*c**S(2) - S(47)*a*b**S(3)*c + S(5)*b**S(5))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(3)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*sqrt(S(2))*sqrt(c)*(b*(S(124)*a**S(2)*c**S(2) - S(47)*a*b**S(2)*c + S(5)*b**S(4))/sqrt(-S(4)*a*c + b**S(2)) + (-S(12)*a*c + S(5)*b**S(2))*(-S(5)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(3)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - (-S(36)*a*c + S(15)*b**S(2))*(-S(5)*a*c + b**S(2))/(S(8)*a**S(3)*x*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a - b*x**S(2) + c*x**S(4)), x), x, b*log(a - b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) + x**S(2)/(S(2)*c) + (-S(2)*a*c + b**S(2))*atanh((b - S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a - b*x**S(2) + c*x**S(4)), x), x, b*atanh((b - S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))) + log(a - b*x**S(2) + c*x**S(4))/(S(4)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a - b*x**S(2) + c*x**S(4)), x), x, atanh((b - S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a - b*x**S(2) + c*x**S(4))), x), x, b*atanh((b - S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))) + log(x)/a - log(a - b*x**S(2) + c*x**S(4))/(S(4)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a - b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(2)*a*x**S(2)) + b*log(x)/a**S(2) - b*log(a - b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)) + (-S(2)*a*c + b**S(2))*atanh((b - S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a - b*x**S(2) + c*x**S(4)), x), x, x/c - sqrt(S(2))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a - b*x**S(2) + c*x**S(4)), x), x, sqrt(S(2))*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))) - sqrt(S(2))*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a - b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*sqrt(c)*atanh(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*atanh(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a - b*x**S(2) + c*x**S(4))), x), x, sqrt(S(2))*sqrt(c)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*sqrt(c)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - S(1)/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a*x**S(4) + S(2)*a*x**S(2) + a + b), x), x, x**S(2)/(S(2)*a) - log(a*x**S(4) + S(2)*a*x**S(2) + a + b)/(S(2)*a) + (a - b)*atan(sqrt(a)*(x**S(2) + S(1))/sqrt(b))/(S(2)*a**(S(3)/2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*x**S(4) + S(2)*a*x**S(2) + a + b), x), x, log(a*x**S(4) + S(2)*a*x**S(2) + a + b)/(S(4)*a) - atan(sqrt(a)*(x**S(2) + S(1))/sqrt(b))/(S(2)*sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*x**S(4) + S(2)*a*x**S(2) + a + b), x), x, atan(sqrt(a)*(x**S(2) + S(1))/sqrt(b))/(S(2)*sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a*x**S(4) + S(2)*a*x**S(2) + a + b)), x), x, -sqrt(a)*atan(sqrt(a)*(x**S(2) + S(1))/sqrt(b))/(S(2)*sqrt(b)*(a + b)) - log(a*x**S(4) + S(2)*a*x**S(2) + a + b)/(S(4)*a + S(4)*b) + log(x)/(a + b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a*x**S(4) + S(2)*a*x**S(2) + a + b)), x), x, sqrt(a)*(a - b)*atan(sqrt(a)*(x**S(2) + S(1))/sqrt(b))/(S(2)*sqrt(b)*(a + b)**S(2)) - S(2)*a*log(x)/(a + b)**S(2) + a*log(a*x**S(4) + S(2)*a*x**S(2) + a + b)/(S(2)*(a + b)**S(2)) - S(1)/(x**S(2)*(S(2)*a + S(2)*b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a*x**S(4) + S(2)*a*x**S(2) + a + b), x), x, (S(2)*sqrt(-a) + (a - b)/sqrt(b))*atan(x*(-a)**(S(1)/4)/sqrt(-sqrt(b) + sqrt(-a)))/(S(2)*(-a)**(S(5)/4)*sqrt(-sqrt(b) + sqrt(-a))) - (a - S(2)*sqrt(b)*sqrt(-a) - b)*atan(x*(-a)**(S(1)/4)/sqrt(sqrt(b) + sqrt(-a)))/(S(2)*sqrt(b)*(-a)**(S(5)/4)*sqrt(sqrt(b) + sqrt(-a))) + x/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*x**S(4) + S(2)*a*x**S(2) + a + b), x), x, sqrt(-sqrt(b) + sqrt(-a))*atan(x*(-a)**(S(1)/4)/sqrt(-sqrt(b) + sqrt(-a)))/(S(2)*sqrt(b)*(-a)**(S(3)/4)) - sqrt(sqrt(b) + sqrt(-a))*atan(x*(-a)**(S(1)/4)/sqrt(sqrt(b) + sqrt(-a)))/(S(2)*sqrt(b)*(-a)**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x**S(4) + S(2)*a*x**S(2) + a + b), x), x, atan(x*(-a)**(S(1)/4)/sqrt(sqrt(b) + sqrt(-a)))/(S(2)*sqrt(b)*(-a)**(S(1)/4)*sqrt(sqrt(b) + sqrt(-a))) - atan(x*(-a)**(S(1)/4)/sqrt(-sqrt(b) + sqrt(-a)))/(S(2)*sqrt(b)*(-a)**(S(1)/4)*sqrt(-sqrt(b) + sqrt(-a))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a*x**S(4) + S(2)*a*x**S(2) + a + b)), x), x, -S(1)/(x*(a + b)) + (-a)**(S(1)/4)*(-sqrt(b) + sqrt(-a))*atan(x*(-a)**(S(1)/4)/sqrt(sqrt(b) + sqrt(-a)))/(S(2)*sqrt(b)*(a + b)*sqrt(sqrt(b) + sqrt(-a))) - (-a)**(S(1)/4)*(sqrt(b) + sqrt(-a))*atan(x*(-a)**(S(1)/4)/sqrt(-sqrt(b) + sqrt(-a)))/(S(2)*sqrt(b)*(a + b)*sqrt(-sqrt(b) + sqrt(-a))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a**S(2) + S(2)*a*x**S(2) + b + x**S(4)), x), x, -atan(x/sqrt(a + sqrt(-b)))/(S(2)*sqrt(-b)*sqrt(a + sqrt(-b))) + atan(x/sqrt(a - sqrt(-b)))/(S(2)*sqrt(-b)*sqrt(a - sqrt(-b))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a**S(2) + S(2)*a*x**S(2) + x**S(4) + S(-1)), x), x, -atan(x/sqrt(a + S(1)))/(S(2)*sqrt(a + S(1))) - atanh(x/sqrt(-a + S(1)))/(S(2)*sqrt(-a + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a**S(2) + S(2)*a*x**S(2) + x**S(4) + S(1)), x), x, -sqrt(S(2))*atan((-sqrt(S(2))*x + sqrt(-a + sqrt(a**S(2) + S(1))))/sqrt(a + sqrt(a**S(2) + S(1))))/(S(4)*sqrt(a + sqrt(a**S(2) + S(1)))*sqrt(a**S(2) + S(1))) + sqrt(S(2))*atan((sqrt(S(2))*x + sqrt(-a + sqrt(a**S(2) + S(1))))/sqrt(a + sqrt(a**S(2) + S(1))))/(S(4)*sqrt(a + sqrt(a**S(2) + S(1)))*sqrt(a**S(2) + S(1))) - sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x*sqrt(-a + sqrt(a**S(2) + S(1))) + sqrt(a**S(2) + S(1)))/(S(8)*sqrt(-a + sqrt(a**S(2) + S(1)))*sqrt(a**S(2) + S(1))) + sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x*sqrt(-a + sqrt(a**S(2) + S(1))) + sqrt(a**S(2) + S(1)))/(S(8)*sqrt(-a + sqrt(a**S(2) + S(1)))*sqrt(a**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, -atanh(x/S(2))/S(6) + atanh(x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4) + S(4)*x**S(2) + S(3)), x), x, atan(x)/S(2) - sqrt(S(3))*atan(sqrt(S(3))*x/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4) + S(5)*x**S(2) + S(9)), x), x, -log(x**S(2) - x + S(3))/S(12) + log(x**S(2) + x + S(3))/S(12) - sqrt(S(11))*atan(sqrt(S(11))*(-S(2)*x + S(1))/S(11))/S(66) + sqrt(S(11))*atan(sqrt(S(11))*(S(2)*x + S(1))/S(11))/S(66), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4) - x**S(2) + S(1)), x), x, -sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(12) + sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(12) + atan(S(2)*x - sqrt(S(3)))/S(2) + atan(S(2)*x + sqrt(S(3)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4) + S(2)*x**S(2) + S(2)), x), x, -log(x**S(2) - x*sqrt(S(-2) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(8)*sqrt(S(-1) + sqrt(S(2)))) + log(x**S(2) + x*sqrt(S(-2) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(8)*sqrt(S(-1) + sqrt(S(2)))) - sqrt(S(-1) + sqrt(S(2)))*atan((-S(2)*x + sqrt(S(-2) + S(2)*sqrt(S(2))))/sqrt(S(2) + S(2)*sqrt(S(2))))/S(4) + sqrt(S(-1) + sqrt(S(2)))*atan((S(2)*x + sqrt(S(-2) + S(2)*sqrt(S(2))))/sqrt(S(2) + S(2)*sqrt(S(2))))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(4) + x**S(2) + S(1)), x), x, sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(4) + S(2)*x**S(2) + S(10)), x), x, atan(x**S(2)/S(3) + S(1)/3)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(4) + S(9)*x**S(2) + S(20)), x), x, -S(2)*atan(x/S(2)) + sqrt(S(5))*atan(sqrt(S(5))*x/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(4) - x**S(2) + S(1)), x), x, sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(12) - sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(12) + atan(S(2)*x - sqrt(S(3)))/S(2) + atan(S(2)*x + sqrt(S(3)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(4) - S(2)*x**S(2) + S(2)), x), x, log(x**S(2) - x*sqrt(S(2) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(4)*sqrt(S(2) + S(2)*sqrt(S(2)))) - log(x**S(2) + x*sqrt(S(2) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(4)*sqrt(S(2) + S(2)*sqrt(S(2)))) - sqrt(S(1)/2 + sqrt(S(2))/S(2))*atan((-S(2)*x + sqrt(S(2) + S(2)*sqrt(S(2))))/sqrt(S(-2) + S(2)*sqrt(S(2))))/S(2) + sqrt(S(1)/2 + sqrt(S(2))/S(2))*atan((S(2)*x + sqrt(S(2) + S(2)*sqrt(S(2))))/sqrt(S(-2) + S(2)*sqrt(S(2))))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -b*(b + S(2)*c*x**S(2))*(-S(12)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(256)*c**S(4)) + b*(-S(12)*a*c + S(7)*b**S(2))*(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(512)*c**(S(9)/2)) + x**S(4)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(10)*c) + (a + b*x**S(2) + c*x**S(4))**(S(3)/2)*(-S(32)*a*c + S(35)*b**S(2) - S(42)*b*c*x**S(2))/(S(480)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -S(5)*b*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(48)*c**S(2)) + x**S(2)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(8)*c) + (b + S(2)*c*x**S(2))*(-S(4)*a*c + S(5)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(128)*c**S(3)) - (-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(5)*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(256)*c**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -b*(b + S(2)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(16)*c**S(2)) + b*(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(5)/2)) + (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, (b + S(2)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*c) - (-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x, x), x, -sqrt(a)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/S(2) + b*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(c)) + sqrt(a + b*x**S(2) + c*x**S(4))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x**S(3), x), x, sqrt(c)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/S(2) - sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*x**S(2)) - b*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x**S(5), x), x, -(S(2)*a + b*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*a*x**S(4)) + (-S(4)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x**S(7), x), x, -(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*a*x**S(6)) + b*(S(2)*a + b*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(16)*a**S(2)*x**S(4)) - b*(-S(4)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x**S(9), x), x, -(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(8)*a*x**S(8)) + S(5)*b*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(48)*a**S(2)*x**S(6)) - (S(2)*a + b*x**S(2))*(-S(4)*a*c + S(5)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(128)*a**S(3)*x**S(4)) + (-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(5)*b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(256)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x**S(11), x), x, -(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(10)*a*x**S(10)) + S(7)*b*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(80)*a**S(2)*x**S(8)) - (-S(32)*a*c + S(35)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(480)*a**S(3)*x**S(6)) + b*(S(2)*a + b*x**S(2))*(-S(12)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(256)*a**S(4)*x**S(4)) - b*(-S(12)*a*c + S(7)*b**S(2))*(-S(4)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(512)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -a**(S(1)/4)*b*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(29)*a*c + S(8)*b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(105)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(2)*sqrt(a)*sqrt(c)*(-S(5)*a*c + S(2)*b**S(2)) - S(29)*a*b*c + S(8)*b**S(3))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(210)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + b*x*(-S(29)*a*c + S(8)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(105)*c**(S(5)/2)*(sqrt(a) + sqrt(c)*x**S(2))) + x**S(3)*(b + S(5)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(35)*c) - x*(-S(10)*a*c + S(4)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(105)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(15)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*b*sqrt(c) - S(6)*a*c + S(2)*b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(30)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + x*(b + S(3)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*c) - x*(-S(6)*a*c + S(2)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -a**(S(1)/4)*b*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(2)*sqrt(a)*sqrt(c) + b)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + b*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))) + x*sqrt(a + b*x**S(2) + c*x**S(4))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x**S(2), x), x, -S(2)*a**(S(1)/4)*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/sqrt(a + b*x**S(2) + c*x**S(4)) + S(2)*sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2)) - sqrt(a + b*x**S(2) + c*x**S(4))/x + sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(2)*sqrt(a)*sqrt(c) + b)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*c**(S(1)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x**S(4), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*x**S(3)) + b*sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*a*(sqrt(a) + sqrt(c)*x**S(2))) - b*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*a*x) - b*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*a**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(2)*sqrt(a)*sqrt(c) + b)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*a**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/x**S(6), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))/(S(5)*x**S(5)) - b*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*a*x**S(3)) - S(2)*sqrt(c)*x*(-S(3)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*a**S(2)*(sqrt(a) + sqrt(c)*x**S(2))) + (-S(6)*a*c + S(2)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*a**S(2)*x) + S(2)*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(15)*a**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*b*sqrt(c) - S(6)*a*c + S(2)*b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(30)*a**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -b*(b + S(2)*c*x**S(2))*(-S(4)*a*c + S(3)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(256)*c**S(4)) + S(3)*b*(b + S(2)*c*x**S(2))*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2048)*c**S(5)) - S(3)*b*(-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(3)*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4096)*c**(S(11)/2)) + x**S(4)*(a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(14)*c) + (a + b*x**S(2) + c*x**S(4))**(S(5)/2)*(-S(16)*a*c + S(21)*b**S(2) - S(30)*b*c*x**S(2))/(S(560)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(7)*b*(a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(120)*c**S(2)) + x**S(2)*(a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(12)*c) + (b + S(2)*c*x**S(2))*(-S(4)*a*c + S(7)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(384)*c**S(3)) - (b + S(2)*c*x**S(2))*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(1024)*c**S(4)) + (-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(7)*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2048)*c**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -b*(b + S(2)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(32)*c**S(2)) + S(3)*b*(b + S(2)*c*x**S(2))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(256)*c**S(3)) - S(3)*b*(-S(4)*a*c + b**S(2))**S(2)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(512)*c**(S(7)/2)) + (a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(10)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, (b + S(2)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(16)*c) - (b + S(2)*c*x**S(2))*(-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(128)*c**S(2)) + S(3)*(-S(4)*a*c + b**S(2))**S(2)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(256)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x, x), x, -a**(S(3)/2)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/S(2) - b*(-S(12)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(3)/2)) + (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/S(6) + sqrt(a + b*x**S(2) + c*x**S(4))*(S(8)*a*c + b**S(2) + S(2)*b*c*x**S(2))/(S(16)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(3), x), x, -S(3)*sqrt(a)*b*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/S(4) + (S(9)*b/S(8) + S(3)*c*x**S(2)/S(4))*sqrt(a + b*x**S(2) + c*x**S(4)) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(2)*x**S(2)) + (S(12)*a*c + S(3)*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(5), x), x, S(3)*b*sqrt(c)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/S(4) - (S(3)*b - S(6)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*x**S(2)) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(4)*x**S(4)) - (S(12)*a*c + S(3)*b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(7), x), x, c**(S(3)/2)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/S(2) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*x**S(6)) - (S(2)*a*b + x**S(2)*(S(8)*a*c + b**S(2)))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(16)*a*x**S(4)) + b*(-S(12)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(9), x), x, -(S(2)*a + b*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(16)*a*x**S(8)) + (S(2)*a + b*x**S(2))*(-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(128)*a**S(2)*x**S(4)) - S(3)*(-S(4)*a*c + b**S(2))**S(2)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(256)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(11), x), x, -(a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(10)*a*x**S(10)) + b*(S(2)*a + b*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(32)*a**S(2)*x**S(8)) - S(3)*b*(S(2)*a + b*x**S(2))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(256)*a**S(3)*x**S(4)) + S(3)*b*(-S(4)*a*c + b**S(2))**S(2)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(512)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(13), x), x, -(a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(12)*a*x**S(12)) + S(7)*b*(a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(120)*a**S(2)*x**S(10)) - (S(2)*a + b*x**S(2))*(-S(4)*a*c + S(7)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(384)*a**S(3)*x**S(8)) + (S(2)*a + b*x**S(2))*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(1024)*a**S(4)*x**S(4)) - (-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(7)*b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2048)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(8)*a**(S(1)/4)*b*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(9)*a*c + S(2)*b**S(2))*(-S(3)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(1155)*c**(S(15)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*sqrt(c)*(S(60)*a**S(2)*c**S(2) - S(51)*a*b**S(2)*c + S(8)*b**S(4)) + S(8)*b*(-S(9)*a*c + S(2)*b**S(2))*(-S(3)*a*c + b**S(2)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2310)*c**(S(15)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - S(8)*b*x*(-S(9)*a*c + S(2)*b**S(2))*(-S(3)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(1155)*c**(S(7)/2)*(sqrt(a) + sqrt(c)*x**S(2))) + x**S(3)*(b + S(3)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(33)*c) - x**S(3)*(b*(a*c + S(2)*b**S(2)) + S(10)*c*x**S(2)*(-S(3)*a*c + b**S(2)))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(385)*c**S(2)) + x*sqrt(a + b*x**S(2) + c*x**S(4))*(S(60)*a**S(2)*c**S(2) - S(51)*a*b**S(2)*c + S(8)*b**S(4))/(S(1155)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(84)*a**S(2)*c**S(2) - S(57)*a*b**S(2)*c + S(8)*b**S(4))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(315)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(4)*sqrt(a)*b*sqrt(c)*(-S(6)*a*c + b**S(2)) + S(84)*a**S(2)*c**S(2) - S(57)*a*b**S(2)*c + S(8)*b**S(4))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(630)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + x*(S(3)*b + S(7)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(63)*c) - x*(b*(-S(9)*a*c + S(4)*b**S(2)) + S(6)*c*x**S(2)*(-S(7)*a*c + S(2)*b**S(2)))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(315)*c**S(2)) + x*sqrt(a + b*x**S(2) + c*x**S(4))*(S(84)*a**S(2)*c**S(2) - S(57)*a*b**S(2)*c + S(8)*b**S(4))/(S(315)*c**(S(5)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*a**(S(1)/4)*b*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(8)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(35)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*sqrt(c)*(-S(20)*a*c + b**S(2)) + S(2)*b*(-S(8)*a*c + b**S(2)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(70)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - S(2)*b*x*(-S(8)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(35)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))) + x*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/S(7) + x*sqrt(a + b*x**S(2) + c*x**S(4))*(S(10)*a*c + b**S(2) + S(3)*b*c*x**S(2))/(S(35)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(2), x), x, -a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(12)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(5)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(8)*sqrt(a)*b*sqrt(c) + S(12)*a*c + b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(10)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + x*(S(7)*b + S(6)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/S(5) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x + x*(S(12)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(5)*sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(4), x), x, -S(8)*a**(S(1)/4)*b*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*sqrt(a + b*x**S(2) + c*x**S(4))) + S(8)*b*sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*sqrt(a) + S(3)*sqrt(c)*x**S(2)) - (S(3)*b - S(2)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*x) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(3)*x**S(3)) + sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(8)*sqrt(a)*b*sqrt(c) + S(4)*a*c + S(3)*b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*a**(S(1)/4)*c**(S(1)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(6), x), x, -(b - S(6)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(5)*x**S(3)) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(5)*x**S(5)) + sqrt(c)*x*(S(12)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(5)*a*(sqrt(a) + sqrt(c)*x**S(2))) - (S(12)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(5)*a*x) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(12)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(5)*a**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(8)*sqrt(a)*b*sqrt(c) + S(12)*a*c + b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(10)*a**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(8), x), x, -(S(3)*b + S(30)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(35)*x**S(5)) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(7)*x**S(7)) - (-S(20)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(35)*a*x**S(3)) - S(2)*b*sqrt(c)*x*(-S(8)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(35)*a**S(2)*(sqrt(a) + sqrt(c)*x**S(2))) + S(2)*b*(-S(8)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(35)*a**S(2)*x) + S(2)*b*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(8)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(35)*a**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*sqrt(c)*(-S(20)*a*c + b**S(2)) + S(2)*b*(-S(8)*a*c + b**S(2)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(70)*a**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(4) - S(2)*x**S(2) + S(3)), x), x, x*sqrt(-x**S(4) - S(2)*x**S(2) + S(3))/S(3) - S(2)*sqrt(S(3))*elliptic_e(asin(x), S(-1)/3)/S(3) + S(4)*sqrt(S(3))*elliptic_f(asin(x), S(-1)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -b*(-S(12)*a*c + S(5)*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(7)/2)) + x**S(4)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(6)*c) + sqrt(a + b*x**S(2) + c*x**S(4))*(-S(16)*a*c + S(15)*b**S(2) - S(10)*b*c*x**S(2))/(S(48)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -S(3)*b*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*c**S(2)) + x**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(4)*c) + (-S(4)*a*c + S(3)*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -b*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*c**(S(3)/2)) + sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*a*x**S(2)) + b*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))/(S(4)*a*x**S(4)) + S(3)*b*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*a**S(2)*x**S(2)) - (-S(4)*a*c + S(3)*b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))/(S(6)*a*x**S(6)) + S(5)*b*sqrt(a + b*x**S(2) + c*x**S(4))/(S(24)*a**S(2)*x**S(4)) - (-S(16)*a*c + S(15)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(48)*a**S(3)*x**S(2)) + b*(-S(12)*a*c + S(5)*b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*a**(S(1)/4)*b*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*sqrt(c) + S(2)*b)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - S(2)*b*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))) + x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + x*sqrt(a + b*x**S(2) + c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*c**(S(1)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(a*(sqrt(a) + sqrt(c)*x**S(2))) - sqrt(a + b*x**S(2) + c*x**S(4))/(a*x) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*a*x**S(3)) - S(2)*b*sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*a**S(2)*(sqrt(a) + sqrt(c)*x**S(2))) + S(2)*b*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*a**S(2)*x) + S(2)*b*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*a**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*sqrt(c) + S(2)*b)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*a**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -b*(S(12)*a*c + S(5)*b**S(2))*atan((b - S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))))/(S(32)*c**(S(7)/2)) - x**S(4)*sqrt(a + b*x**S(2) - c*x**S(4))/(S(6)*c) - sqrt(a + b*x**S(2) - c*x**S(4))*(S(16)*a*c + S(15)*b**S(2) + S(10)*b*c*x**S(2))/(S(48)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -S(3)*b*sqrt(a + b*x**S(2) - c*x**S(4))/(S(8)*c**S(2)) - x**S(2)*sqrt(a + b*x**S(2) - c*x**S(4))/(S(4)*c) - (S(4)*a*c + S(3)*b**S(2))*atan((b - S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))))/(S(16)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -b*atan((b - S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))))/(S(4)*c**(S(3)/2)) - sqrt(a + b*x**S(2) - c*x**S(4))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -atan((b - S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))))/(S(2)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(-a + b*x**S(2) + c*x**S(4))), x), x, -atan((S(2)*a - b*x**S(2))/(S(2)*sqrt(a)*sqrt(-a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(-a + b*x**S(2) + c*x**S(4))), x), x, sqrt(-a + b*x**S(2) + c*x**S(4))/(S(2)*a*x**S(2)) - b*atan((S(2)*a - b*x**S(2))/(S(2)*sqrt(a)*sqrt(-a + b*x**S(2) + c*x**S(4))))/(S(4)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*sqrt(-a + b*x**S(2) + c*x**S(4))), x), x, sqrt(-a + b*x**S(2) + c*x**S(4))/(S(4)*a*x**S(4)) + S(3)*b*sqrt(-a + b*x**S(2) + c*x**S(4))/(S(8)*a**S(2)*x**S(2)) - (S(4)*a*c + S(3)*b**S(2))*atan((S(2)*a - b*x**S(2))/(S(2)*sqrt(a)*sqrt(-a + b*x**S(2) + c*x**S(4))))/(S(16)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*sqrt(-a + b*x**S(2) + c*x**S(4))), x), x, sqrt(-a + b*x**S(2) + c*x**S(4))/(S(6)*a*x**S(6)) + S(5)*b*sqrt(-a + b*x**S(2) + c*x**S(4))/(S(24)*a**S(2)*x**S(4)) + (S(16)*a*c + S(15)*b**S(2))*sqrt(-a + b*x**S(2) + c*x**S(4))/(S(48)*a**S(3)*x**S(2)) - b*(S(12)*a*c + S(5)*b**S(2))*atan((S(2)*a - b*x**S(2))/(S(2)*sqrt(a)*sqrt(-a + b*x**S(2) + c*x**S(4))))/(S(32)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -sqrt(S(2))*b*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_e(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(6)*c**(S(5)/2)*sqrt(a + b*x**S(2) - c*x**S(4))) - x*sqrt(a + b*x**S(2) - c*x**S(4))/(S(3)*c) + sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*(a*c + b**S(2) - b*sqrt(S(4)*a*c + b**S(2)))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(6)*c**(S(5)/2)*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -sqrt(S(2))*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_e(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(a + b*x**S(2) - c*x**S(4))) + sqrt(S(2))*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*x**S(2) - c*x**S(4))), x), x, -sqrt(a + b*x**S(2) - c*x**S(4))/(a*x) + sqrt(S(2))*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_e(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))) - sqrt(S(2))*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a + b*x**S(2) - c*x**S(4))), x), x, -sqrt(a + b*x**S(2) - c*x**S(4))/(S(3)*a*x**S(3)) + S(2)*b*sqrt(a + b*x**S(2) - c*x**S(4))/(S(3)*a**S(2)*x) - sqrt(S(2))*b*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_e(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(6)*a**S(2)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))) + sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*(a*c + b**S(2) - b*sqrt(S(4)*a*c + b**S(2)))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(6)*a**S(2)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -b*x**S(4)*sqrt(a + b*x**S(2) + c*x**S(4))/(c*(-S(4)*a*c + b**S(2))) + x**S(6)*(S(2)*a + b*x**S(2))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - (b*(-S(52)*a*c + S(15)*b**S(2)) - S(2)*c*x**S(2)*(-S(12)*a*c + S(5)*b**S(2)))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*c**S(3)*(-S(4)*a*c + b**S(2))) + (-S(12)*a*c + S(15)*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*c**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(3)*b*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*c**(S(5)/2)) + x**S(4)*(S(2)*a + b*x**S(2))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + sqrt(a + b*x**S(2) + c*x**S(4))*(-S(8)*a*c + S(3)*b**S(2) - S(2)*b*c*x**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -b*sqrt(a + b*x**S(2) + c*x**S(4))/(c*(-S(4)*a*c + b**S(2))) + x**S(2)*(S(2)*a + b*x**S(2))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, (S(2)*a + b*x**S(2))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -(b + S(2)*c*x**S(2))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*x**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - (-S(8)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) + S(3)*b*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*x**S(4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - (-S(12)*a*c + S(5)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)*x**S(4)*(-S(4)*a*c + b**S(2))) + b*(-S(52)*a*c + S(15)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*a**S(3)*x**S(2)*(-S(4)*a*c + b**S(2))) - (-S(12)*a*c + S(15)*b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(2)*a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(7)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*b*sqrt(c) - S(6)*a*c + S(2)*b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*c**(S(7)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - b*x*sqrt(a + b*x**S(2) + c*x**S(4))/(c*(-S(4)*a*c + b**S(2))) + x**S(3)*(S(2)*a + b*x**S(2))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + x*(-S(6)*a*c + S(2)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, a**(S(1)/4)*b*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(3)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(3)/4)*(-S(4)*sqrt(a)*sqrt(c) + S(2)*b)*sqrt(a + b*x**S(2) + c*x**S(4))) - b*x*sqrt(a + b*x**S(2) + c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))) + x*(S(2)*a + b*x**S(2))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -S(2)*a**(S(1)/4)*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/((sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))) - x*(b + S(2)*c*x**S(2))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*c**(S(1)/4)*(-S(2)*sqrt(a)*sqrt(c) + b)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(-3)/2), x), x, -b*sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(a*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))) + x*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + b*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(3)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(3)/4)*(-S(2)*sqrt(a)*sqrt(c) + b)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*x*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*sqrt(c)*x*(-S(3)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(a**S(2)*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))) - (-S(6)*a*c + S(2)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(a**S(2)*x*(-S(4)*a*c + b**S(2))) - S(2)*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(7)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*b*sqrt(c) - S(6)*a*c + S(2)*b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(7)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, elliptic_f(asin(sqrt(S(2))*x/S(2)), S(-6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(4)*x**S(2) + S(2)), x), x, sqrt(S(1)/3 + sqrt(S(10))/S(6))*elliptic_f(asin(x*sqrt(S(-1) + sqrt(S(10))/S(2))), S(-7)/3 - S(2)*sqrt(S(10))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(3)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(sqrt(S(6))*x/sqrt(S(3) + sqrt(S(33)))), S(-7)/4 - sqrt(S(33))/S(4))/sqrt(S(-3) + sqrt(S(33))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(2)*x**S(2) + S(2)), x), x, elliptic_f(asin(sqrt(S(3))*x/sqrt(S(1) + sqrt(S(7)))), S(-4)/3 - sqrt(S(7))/S(3))/sqrt(S(-1) + sqrt(S(7))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(x), S(-3)/2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(2)), x), x, S(6)**(S(3)/4)*elliptic_f(asin(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), S(-1))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - x**S(2) + S(2)), x), x, sqrt(S(3))*elliptic_f(asin(sqrt(S(6))*x/S(2)), S(-2)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - S(2)*x**S(2) + S(2)), x), x, elliptic_f(asin(sqrt(S(3))*x/sqrt(S(-1) + sqrt(S(7)))), S(-4)/3 + sqrt(S(7))/S(3))/sqrt(S(1) + sqrt(S(7))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - S(3)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(sqrt(S(6))*x/sqrt(S(-3) + sqrt(S(33)))), S(-7)/4 + sqrt(S(33))/S(4))/sqrt(S(3) + sqrt(S(33))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - S(4)*x**S(2) + S(2)), x), x, sqrt(S(-1)/3 + sqrt(S(10))/S(6))*elliptic_f(asin(x*sqrt(S(1) + sqrt(S(10))/S(2))), S(-7)/3 + S(2)*sqrt(S(10))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - S(5)*x**S(2) + S(2)), x), x, sqrt(S(6))*elliptic_f(asin(sqrt(S(3))*x), S(-1)/6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(7)*x**S(2) + S(3)), x), x, sqrt(S(2))*elliptic_f(asin(S(2)*x/sqrt(S(7) + sqrt(S(73)))), S(-61)/12 - S(7)*sqrt(S(73))/S(12))/sqrt(S(-7) + sqrt(S(73))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(6)*x**S(2) + S(3)), x), x, sqrt(S(1)/2 + sqrt(S(15))/S(6))*elliptic_f(asin(x*sqrt(S(-1) + sqrt(S(15))/S(3))), S(-4) - sqrt(S(15))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(5)*x**S(2) + S(3)), x), x, elliptic_f(asin(sqrt(S(3))*x/S(3)), S(-6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(4)*x**S(2) + S(3)), x), x, elliptic_f(asin(sqrt(S(2))*x/sqrt(S(2) + sqrt(S(10)))), S(-7)/3 - S(2)*sqrt(S(10))/S(3))/sqrt(S(-2) + sqrt(S(10))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(3)*x**S(2) + S(3)), x), x, sqrt(S(2))*elliptic_f(asin(S(2)*x/sqrt(S(3) + sqrt(S(33)))), S(-7)/4 - sqrt(S(33))/S(4))/sqrt(S(-3) + sqrt(S(33))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(2)*x**S(2) + S(3)), x), x, elliptic_f(asin(sqrt(S(2))*x/sqrt(S(1) + sqrt(S(7)))), S(-4)/3 - sqrt(S(7))/S(3))/sqrt(S(-1) + sqrt(S(7))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + x**S(2) + S(3)), x), x, sqrt(S(2))*elliptic_f(asin(sqrt(S(6))*x/S(3)), S(-3)/2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(3)), x), x, S(6)**(S(3)/4)*elliptic_f(asin(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), S(-1))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - x**S(2) + S(3)), x), x, sqrt(S(3))*elliptic_f(asin(x), S(-2)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(2)*x**S(2) + S(3)), x), x, elliptic_f(asin(sqrt(S(2))*x/sqrt(S(-1) + sqrt(S(7)))), S(-4)/3 + sqrt(S(7))/S(3))/sqrt(S(1) + sqrt(S(7))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(3)*x**S(2) + S(3)), x), x, sqrt(S(2))*elliptic_f(asin(S(2)*x/sqrt(S(-3) + sqrt(S(33)))), S(-7)/4 + sqrt(S(33))/S(4))/sqrt(S(3) + sqrt(S(33))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(4)*x**S(2) + S(3)), x), x, elliptic_f(asin(sqrt(S(2))*x/sqrt(S(-2) + sqrt(S(10)))), S(-7)/3 + S(2)*sqrt(S(10))/S(3))/sqrt(S(2) + sqrt(S(10))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(5)*x**S(2) + S(3)), x), x, sqrt(S(6))*elliptic_f(asin(sqrt(S(2))*x), S(-1)/6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(6)*x**S(2) + S(3)), x), x, sqrt(S(-1)/2 + sqrt(S(15))/S(6))*elliptic_f(asin(x*sqrt(S(1) + sqrt(S(15))/S(3))), S(-4) + sqrt(S(15))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(7)*x**S(2) + S(3)), x), x, sqrt(S(2))*elliptic_f(asin(S(2)*x/sqrt(S(-7) + sqrt(S(73)))), S(-61)/12 + S(7)*sqrt(S(73))/S(12))/sqrt(S(7) + sqrt(S(73))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(5)*x**S(2) + S(-2)), x), x, sqrt(S(7))*sqrt(x**S(2) + S(2))*sqrt(S(3)*x**S(2) + S(-1))*elliptic_f(asin(sqrt(S(14))*x/(S(2)*sqrt(S(3)*x**S(2) + S(-1)))), S(6)/7)/(S(7)*sqrt(S(3)*x**S(4) + S(5)*x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(4)*x**S(2) + S(-2)), x), x, S(10)**(S(3)/4)*sqrt((-x**S(2)*(-sqrt(S(10)) + S(2)) + S(2))/(-x**S(2)*(S(2) + sqrt(S(10))) + S(2)))*sqrt(x**S(2)*(S(2) + sqrt(S(10))) + S(-2))*elliptic_f(asin(S(2)**(S(3)/4)*S(5)**(S(1)/4)*x/sqrt(x**S(2)*(S(2) + sqrt(S(10))) + S(-2))), sqrt(S(10))/S(10) + S(1)/2)/(S(20)*sqrt(S(3)*x**S(4) + S(4)*x**S(2) + S(-2))*sqrt(S(1)/(-x**S(2)*(S(2) + sqrt(S(10))) + S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(3)*x**S(2) + S(-2)), x), x, sqrt(S(2))*S(33)**(S(3)/4)*sqrt((-x**S(2)*(-sqrt(S(33)) + S(3)) + S(4))/(-x**S(2)*(S(3) + sqrt(S(33))) + S(4)))*sqrt(x**S(2)*(S(3) + sqrt(S(33))) + S(-4))*elliptic_f(asin(sqrt(S(2))*S(33)**(S(1)/4)*x/sqrt(x**S(2)*(S(3) + sqrt(S(33))) + S(-4))), sqrt(S(33))/S(22) + S(1)/2)/(S(132)*sqrt(S(3)*x**S(4) + S(3)*x**S(2) + S(-2))*sqrt(S(1)/(-x**S(2)*(S(3) + sqrt(S(33))) + S(4)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(2)*x**S(2) + S(-2)), x), x, S(7)**(S(3)/4)*sqrt((-x**S(2)*(-sqrt(S(7)) + S(1)) + S(2))/(-x**S(2)*(S(1) + sqrt(S(7))) + S(2)))*sqrt(x**S(2)*(S(1) + sqrt(S(7))) + S(-2))*elliptic_f(asin(sqrt(S(2))*S(7)**(S(1)/4)*x/sqrt(x**S(2)*(S(1) + sqrt(S(7))) + S(-2))), sqrt(S(7))/S(14) + S(1)/2)/(S(14)*sqrt(S(3)*x**S(4) + S(2)*x**S(2) + S(-2))*sqrt(S(1)/(-x**S(2)*(S(1) + sqrt(S(7))) + S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + x**S(2) + S(-2)), x), x, sqrt(S(5))*sqrt(x**S(2) + S(1))*sqrt(S(3)*x**S(2) + S(-2))*elliptic_f(asin(sqrt(S(5))*x/sqrt(S(3)*x**S(2) + S(-2))), S(3)/5)/(S(5)*sqrt(S(3)*x**S(4) + x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((sqrt(S(6))*x**S(2) + S(2))/(-sqrt(S(6))*x**S(2) + S(2)))*sqrt(sqrt(S(6))*x**S(2) + S(-2))*elliptic_f(asin(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/sqrt(sqrt(S(6))*x**S(2) + S(-2))), S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) + S(-2))*sqrt(S(1)/(-sqrt(S(6))*x**S(2) + S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - x**S(2) + S(-2)), x), x, sqrt(S(5))*sqrt(x**S(2) + S(-1))*sqrt(S(3)*x**S(2) + S(2))*elliptic_f(asin(sqrt(S(10))*x/(S(2)*sqrt(x**S(2) + S(-1)))), S(2)/5)/(S(5)*sqrt(S(3)*x**S(4) - x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(2)*x**S(2) + S(-2)), x), x, S(7)**(S(3)/4)*sqrt((x**S(2)*(S(1) + sqrt(S(7))) + S(2))/(x**S(2)*(-sqrt(S(7)) + S(1)) + S(2)))*sqrt(-x**S(2)*(-sqrt(S(7)) + S(1)) + S(-2))*elliptic_f(asin(sqrt(S(2))*S(7)**(S(1)/4)*x/sqrt(-x**S(2)*(-sqrt(S(7)) + S(1)) + S(-2))), -sqrt(S(7))/S(14) + S(1)/2)/(S(14)*sqrt(S(3)*x**S(4) - S(2)*x**S(2) + S(-2))*sqrt(S(1)/(x**S(2)*(-sqrt(S(7)) + S(1)) + S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(3)*x**S(2) + S(-2)), x), x, sqrt(S(2))*S(33)**(S(3)/4)*sqrt((x**S(2)*(S(3) + sqrt(S(33))) + S(4))/(x**S(2)*(-sqrt(S(33)) + S(3)) + S(4)))*sqrt(-x**S(2)*(-sqrt(S(33)) + S(3)) + S(-4))*elliptic_f(asin(sqrt(S(2))*S(33)**(S(1)/4)*x/sqrt(-x**S(2)*(-sqrt(S(33)) + S(3)) + S(-4))), -sqrt(S(33))/S(22) + S(1)/2)/(S(132)*sqrt(S(3)*x**S(4) - S(3)*x**S(2) + S(-2))*sqrt(S(1)/(x**S(2)*(-sqrt(S(33)) + S(3)) + S(4)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(4)*x**S(2) + S(-2)), x), x, S(10)**(S(3)/4)*sqrt((x**S(2)*(S(2) + sqrt(S(10))) + S(2))/(x**S(2)*(-sqrt(S(10)) + S(2)) + S(2)))*sqrt(-x**S(2)*(-sqrt(S(10)) + S(2)) + S(-2))*elliptic_f(asin(S(2)**(S(3)/4)*S(5)**(S(1)/4)*x/sqrt(-x**S(2)*(-sqrt(S(10)) + S(2)) + S(-2))), -sqrt(S(10))/S(10) + S(1)/2)/(S(20)*sqrt(S(3)*x**S(4) - S(4)*x**S(2) + S(-2))*sqrt(S(1)/(x**S(2)*(-sqrt(S(10)) + S(2)) + S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(5)*x**S(2) + S(-2)), x), x, sqrt(S(7))*sqrt(x**S(2) + S(-2))*sqrt(S(3)*x**S(2) + S(1))*elliptic_f(asin(sqrt(S(7))*x/sqrt(x**S(2) + S(-2))), S(1)/7)/(S(7)*sqrt(S(3)*x**S(4) - S(5)*x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(7)*x**S(2) + S(-3)), x), x, sqrt(S(3))*S(73)**(S(3)/4)*sqrt((-x**S(2)*(-sqrt(S(73)) + S(7)) + S(6))/(-x**S(2)*(S(7) + sqrt(S(73))) + S(6)))*sqrt(x**S(2)*(S(7) + sqrt(S(73))) + S(-6))*elliptic_f(asin(sqrt(S(2))*S(73)**(S(1)/4)*x/sqrt(x**S(2)*(S(7) + sqrt(S(73))) + S(-6))), S(7)*sqrt(S(73))/S(146) + S(1)/2)/(S(438)*sqrt(S(2)*x**S(4) + S(7)*x**S(2) + S(-3))*sqrt(S(1)/(-x**S(2)*(S(7) + sqrt(S(73))) + S(6)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(6)*x**S(2) + S(-3)), x), x, sqrt(S(2))*S(3)**(S(1)/4)*S(5)**(S(3)/4)*sqrt((-x**S(2)*(-sqrt(S(15)) + S(3)) + S(3))/(-x**S(2)*(S(3) + sqrt(S(15))) + S(3)))*sqrt(x**S(2)*(S(3) + sqrt(S(15))) + S(-3))*elliptic_f(asin(S(15)**(S(1)/4)*sqrt(S(2))*x/sqrt(x**S(2)*(S(3) + sqrt(S(15))) + S(-3))), sqrt(S(15))/S(10) + S(1)/2)/(S(30)*sqrt(S(2)*x**S(4) + S(6)*x**S(2) + S(-3))*sqrt(S(1)/(-x**S(2)*(S(3) + sqrt(S(15))) + S(3)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(5)*x**S(2) + S(-3)), x), x, sqrt(S(7))*sqrt(x**S(2) + S(3))*sqrt(S(2)*x**S(2) + S(-1))*elliptic_f(asin(sqrt(S(21))*x/(S(3)*sqrt(S(2)*x**S(2) + S(-1)))), S(6)/7)/(S(7)*sqrt(S(2)*x**S(4) + S(5)*x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(4)*x**S(2) + S(-3)), x), x, S(2)**(S(1)/4)*sqrt(S(3))*S(5)**(S(3)/4)*sqrt((-x**S(2)*(-sqrt(S(10)) + S(2)) + S(3))/(-x**S(2)*(S(2) + sqrt(S(10))) + S(3)))*sqrt(x**S(2)*(S(2) + sqrt(S(10))) + S(-3))*elliptic_f(asin(S(2)**(S(3)/4)*S(5)**(S(1)/4)*x/sqrt(x**S(2)*(S(2) + sqrt(S(10))) + S(-3))), sqrt(S(10))/S(10) + S(1)/2)/(S(30)*sqrt(S(2)*x**S(4) + S(4)*x**S(2) + S(-3))*sqrt(S(1)/(-x**S(2)*(S(2) + sqrt(S(10))) + S(3)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(3)*x**S(2) + S(-3)), x), x, S(11)**(S(3)/4)*S(3)**(S(1)/4)*sqrt((-x**S(2)*(-sqrt(S(33)) + S(3)) + S(6))/(-x**S(2)*(S(3) + sqrt(S(33))) + S(6)))*sqrt(x**S(2)*(S(3) + sqrt(S(33))) + S(-6))*elliptic_f(asin(sqrt(S(2))*S(33)**(S(1)/4)*x/sqrt(x**S(2)*(S(3) + sqrt(S(33))) + S(-6))), sqrt(S(33))/S(22) + S(1)/2)/(S(66)*sqrt(S(2)*x**S(4) + S(3)*x**S(2) + S(-3))*sqrt(S(1)/(-x**S(2)*(S(3) + sqrt(S(33))) + S(6)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(-3)), x), x, sqrt(S(6))*S(7)**(S(3)/4)*sqrt((-x**S(2)*(-sqrt(S(7)) + S(1)) + S(3))/(-x**S(2)*(S(1) + sqrt(S(7))) + S(3)))*sqrt(x**S(2)*(S(1) + sqrt(S(7))) + S(-3))*elliptic_f(asin(sqrt(S(2))*S(7)**(S(1)/4)*x/sqrt(x**S(2)*(S(1) + sqrt(S(7))) + S(-3))), sqrt(S(7))/S(14) + S(1)/2)/(S(42)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(-3))*sqrt(S(1)/(-x**S(2)*(S(1) + sqrt(S(7))) + S(3)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + x**S(2) + S(-3)), x), x, sqrt(S(5))*sqrt(x**S(2) + S(-1))*sqrt(S(2)*x**S(2) + S(3))*elliptic_f(asin(sqrt(S(15))*x/(S(3)*sqrt(x**S(2) + S(-1)))), S(3)/5)/(S(5)*sqrt(S(2)*x**S(4) + x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(-3)), x), x, S(6)**(S(1)/4)*sqrt((sqrt(S(6))*x**S(2) + S(3))/(-sqrt(S(6))*x**S(2) + S(3)))*sqrt(sqrt(S(6))*x**S(2) + S(-3))*elliptic_f(asin(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/sqrt(sqrt(S(6))*x**S(2) + S(-3))), S(1)/2)/(S(6)*sqrt(S(2)*x**S(4) + S(-3))*sqrt(S(1)/(-sqrt(S(6))*x**S(2) + S(3)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - x**S(2) + S(-3)), x), x, sqrt(S(5))*sqrt(x**S(2) + S(1))*sqrt(S(2)*x**S(2) + S(-3))*elliptic_f(asin(sqrt(S(5))*x/sqrt(S(2)*x**S(2) + S(-3))), S(2)/5)/(S(5)*sqrt(S(2)*x**S(4) - x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(2)*x**S(2) + S(-3)), x), x, sqrt(S(6))*S(7)**(S(3)/4)*sqrt((x**S(2)*(S(1) + sqrt(S(7))) + S(3))/(x**S(2)*(-sqrt(S(7)) + S(1)) + S(3)))*sqrt(-x**S(2)*(-sqrt(S(7)) + S(1)) + S(-3))*elliptic_f(asin(sqrt(S(2))*S(7)**(S(1)/4)*x/sqrt(-x**S(2)*(-sqrt(S(7)) + S(1)) + S(-3))), -sqrt(S(7))/S(14) + S(1)/2)/(S(42)*sqrt(S(2)*x**S(4) - S(2)*x**S(2) + S(-3))*sqrt(S(1)/(x**S(2)*(-sqrt(S(7)) + S(1)) + S(3)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(3)*x**S(2) + S(-3)), x), x, S(11)**(S(3)/4)*S(3)**(S(1)/4)*sqrt((x**S(2)*(S(3) + sqrt(S(33))) + S(6))/(x**S(2)*(-sqrt(S(33)) + S(3)) + S(6)))*sqrt(-x**S(2)*(-sqrt(S(33)) + S(3)) + S(-6))*elliptic_f(asin(sqrt(S(2))*S(33)**(S(1)/4)*x/sqrt(-x**S(2)*(-sqrt(S(33)) + S(3)) + S(-6))), -sqrt(S(33))/S(22) + S(1)/2)/(S(66)*sqrt(S(2)*x**S(4) - S(3)*x**S(2) + S(-3))*sqrt(S(1)/(x**S(2)*(-sqrt(S(33)) + S(3)) + S(6)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(4)*x**S(2) + S(-3)), x), x, S(2)**(S(1)/4)*sqrt(S(3))*S(5)**(S(3)/4)*sqrt((x**S(2)*(S(2) + sqrt(S(10))) + S(3))/(x**S(2)*(-sqrt(S(10)) + S(2)) + S(3)))*sqrt(-x**S(2)*(-sqrt(S(10)) + S(2)) + S(-3))*elliptic_f(asin(S(2)**(S(3)/4)*S(5)**(S(1)/4)*x/sqrt(-x**S(2)*(-sqrt(S(10)) + S(2)) + S(-3))), -sqrt(S(10))/S(10) + S(1)/2)/(S(30)*sqrt(S(2)*x**S(4) - S(4)*x**S(2) + S(-3))*sqrt(S(1)/(x**S(2)*(-sqrt(S(10)) + S(2)) + S(3)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(5)*x**S(2) + S(-3)), x), x, sqrt(S(7))*sqrt(x**S(2) + S(-3))*sqrt(S(2)*x**S(2) + S(1))*elliptic_f(asin(sqrt(S(7))*x/sqrt(x**S(2) + S(-3))), S(1)/7)/(S(7)*sqrt(S(2)*x**S(4) - S(5)*x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*sqrt((S(3)*x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(-1)/2)/(S(2)*sqrt(S(3)*x**S(4) + S(5)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(4)*x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + S(4)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), -sqrt(S(6))/S(6) + S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) + S(4)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(3)*x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + S(3)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), -sqrt(S(6))/S(8) + S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(2)*x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + S(2)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), -sqrt(S(6))/S(12) + S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) + S(2)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), -sqrt(S(6))/S(24) + S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) + x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), sqrt(S(6))/S(24) + S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) - x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(2)*x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - S(2)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), sqrt(S(6))/S(12) + S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) - S(2)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(3)*x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - S(3)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), sqrt(S(6))/S(8) + S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) - S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(4)*x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - S(4)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), sqrt(S(6))/S(6) + S(1)/2)/(S(12)*sqrt(S(3)*x**S(4) - S(4)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(5)*x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - S(5)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), S(1)/2 + S(5)*sqrt(S(6))/S(24))/(S(12)*sqrt(S(3)*x**S(4) - S(5)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) - S(6)*x**S(2) + S(2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - S(6)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), S(1)/2 + sqrt(S(6))/S(4))/(S(12)*sqrt(S(3)*x**S(4) - S(6)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(9)*x**S(2) + S(3)), x), x, sqrt((x**S(2)*(-sqrt(S(57)) + S(9)) + S(6))/(x**S(2)*(sqrt(S(57)) + S(9)) + S(6)))*(x**S(2)*(sqrt(S(57)) + S(9)) + S(6))*elliptic_f(atan(x*sqrt(sqrt(S(57))/S(6) + S(3)/2)), S(-19)/4 + S(3)*sqrt(S(57))/S(4))/(sqrt(S(6)*sqrt(S(57)) + S(54))*sqrt(S(2)*x**S(4) + S(9)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(8)*x**S(2) + S(3)), x), x, sqrt((x**S(2)*(-sqrt(S(10)) + S(4)) + S(3))/(x**S(2)*(sqrt(S(10)) + S(4)) + S(3)))*(x**S(2)*(sqrt(S(10)) + S(4)) + S(3))*elliptic_f(atan(x*sqrt(sqrt(S(10))/S(3) + S(4)/3)), S(-10)/3 + S(4)*sqrt(S(10))/S(3))/(sqrt(S(3)*sqrt(S(10)) + S(12))*sqrt(S(2)*x**S(4) + S(8)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(7)*x**S(2) + S(3)), x), x, sqrt(S(6))*sqrt((x**S(2) + S(3))/(S(2)*x**S(2) + S(1)))*(S(2)*x**S(2) + S(1))*elliptic_f(atan(sqrt(S(2))*x), S(5)/6)/(S(6)*sqrt(S(2)*x**S(4) + S(7)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(6)*x**S(2) + S(3)), x), x, sqrt((x**S(2)*(-sqrt(S(3)) + S(3)) + S(3))/(x**S(2)*(sqrt(S(3)) + S(3)) + S(3)))*(x**S(2)*(sqrt(S(3)) + S(3)) + S(3))*elliptic_f(atan(x*sqrt(sqrt(S(3))/S(3) + S(1))), S(-1) + sqrt(S(3)))/(sqrt(S(3)*sqrt(S(3)) + S(9))*sqrt(S(2)*x**S(4) + S(6)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(5)*x**S(2) + S(3)), x), x, sqrt(S(3))*sqrt((S(2)*x**S(2) + S(3))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/3)/(S(3)*sqrt(S(2)*x**S(4) + S(5)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(4)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(4)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), -sqrt(S(6))/S(6) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(4)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(3)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(3)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), -sqrt(S(6))/S(8) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(3)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), -sqrt(S(6))/S(12) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), -sqrt(S(6))/S(24) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), sqrt(S(6))/S(24) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) - x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(2)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(2)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), sqrt(S(6))/S(12) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) - S(2)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(3)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(3)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), sqrt(S(6))/S(8) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) - S(3)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(4)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(4)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), sqrt(S(6))/S(6) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) - S(4)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(5)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(5)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), S(1)/2 + S(5)*sqrt(S(6))/S(24))/(S(12)*sqrt(S(2)*x**S(4) - S(5)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(6)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(6)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), S(1)/2 + sqrt(S(6))/S(4))/(S(12)*sqrt(S(2)*x**S(4) - S(6)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) - S(7)*x**S(2) + S(3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(7)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), S(1)/2 + S(7)*sqrt(S(6))/S(24))/(S(12)*sqrt(S(2)*x**S(4) - S(7)*x**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(7)*x**S(2) + S(-3)), x), x, -sqrt(S(5))*elliptic_f(acos(sqrt(S(3))*x/S(3)), S(6)/5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(6)*x**S(2) + S(-3)), x), x, -sqrt(S(2))*S(3)**(S(3)/4)*elliptic_f(acos(x*sqrt(-sqrt(S(3))/S(3) + S(1))), S(1)/2 + sqrt(S(3))/S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(5)*x**S(2) + S(-3)), x), x, -elliptic_f(acos(sqrt(S(6))*x/S(3)), S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(4)*x**S(2) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(4)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), sqrt(S(6))/S(6) + S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) + S(4)*x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(3)*x**S(2) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(3)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), sqrt(S(6))/S(8) + S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) + S(3)*x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(2)*x**S(2) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - S(2)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), sqrt(S(6))/S(12) + S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) + S(2)*x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + x**S(2) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) - x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), sqrt(S(6))/S(24) + S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) + x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - x**S(2) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), -sqrt(S(6))/S(24) + S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) - x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(2)*x**S(2) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), -sqrt(S(6))/S(12) + S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) - S(2)*x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(3)*x**S(2) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(3)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), -sqrt(S(6))/S(8) + S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) - S(3)*x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(4)*x**S(2) + S(-3)), x), x, S(6)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(4)*x**S(2) + S(3))/(sqrt(S(6))*x**S(2) + S(3))**S(2))*(sqrt(S(6))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*S(3)**(S(3)/4)*x/S(3)), -sqrt(S(6))/S(6) + S(1)/2)/(S(12)*sqrt(-S(2)*x**S(4) - S(4)*x**S(2) + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) - S(5)*x**S(2) + S(-3)), x), x, sqrt(S(3))*sqrt(S(2)*x**S(2) + S(3))*elliptic_f(atan(x), S(1)/3)/(S(3)*sqrt((S(2)*x**S(2) + S(3))/(x**S(2) + S(1)))*sqrt(-x**S(2) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(6)*x**S(2) + S(-2)), x), x, -sqrt(S(2))*S(3)**(S(3)/4)*elliptic_f(acos(sqrt(S(3))*x/sqrt(sqrt(S(3)) + S(3))), S(1)/2 + sqrt(S(3))/S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(5)*x**S(2) + S(-2)), x), x, -elliptic_f(acos(x), S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(4)*x**S(2) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - S(4)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), sqrt(S(6))/S(6) + S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) + S(4)*x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(3)*x**S(2) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - S(3)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), sqrt(S(6))/S(8) + S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) + S(3)*x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(2)*x**S(2) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - S(2)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), sqrt(S(6))/S(12) + S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) + S(2)*x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + x**S(2) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) - x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), sqrt(S(6))/S(24) + S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) + x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - x**S(2) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), -sqrt(S(6))/S(24) + S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) - x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - S(2)*x**S(2) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + S(2)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), -sqrt(S(6))/S(12) + S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) - S(2)*x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - S(3)*x**S(2) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + S(3)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), -sqrt(S(6))/S(8) + S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) - S(3)*x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - S(4)*x**S(2) + S(-2)), x), x, S(6)**(S(3)/4)*sqrt((S(3)*x**S(4) + S(4)*x**S(2) + S(2))/(sqrt(S(6))*x**S(2) + S(2))**S(2))*(sqrt(S(6))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(3)**(S(1)/4)*x/S(2)), -sqrt(S(6))/S(6) + S(1)/2)/(S(12)*sqrt(-S(3)*x**S(4) - S(4)*x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) - S(5)*x**S(2) + S(-2)), x), x, -sqrt(S(2))*sqrt(-S(3)*x**S(2) + S(-2))*elliptic_f(atan(x), S(-1)/2)/(S(2)*sqrt((S(3)*x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(5)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, S(10)**(S(3)/4)*sqrt((S(5)*x**S(4) + S(5)*x**S(2) + S(2))/(sqrt(S(10))*x**S(2) + S(2))**S(2))*(sqrt(S(10))*x**S(2) + S(2))*elliptic_f(S(2)*atan(S(2)**(S(3)/4)*S(5)**(S(1)/4)*x/S(2)), -sqrt(S(10))/S(8) + S(1)/2)/(S(20)*sqrt(S(5)*x**S(4) + S(5)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(4)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, S(2)**(S(1)/4)*sqrt((S(4)*x**S(4) + S(5)*x**S(2) + S(2))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -S(5)*sqrt(S(2))/S(16) + S(1)/2)/(S(4)*sqrt(S(4)*x**S(4) + S(5)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*sqrt((S(3)*x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(-1)/2)/(S(2)*sqrt(S(3)*x**S(4) + S(5)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt((x**S(2) + S(2))/(S(2)*x**S(2) + S(1)))*(S(2)*x**S(2) + S(1))*elliptic_f(atan(sqrt(S(2))*x), S(3)/4)/(S(2)*sqrt(S(2)*x**S(4) + S(5)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt((x**S(2)*(-sqrt(S(17)) + S(5)) + S(4))/(x**S(2)*(sqrt(S(17)) + S(5)) + S(4)))*(x**S(2)*(sqrt(S(17)) + S(5)) + S(4))*elliptic_f(atan(x*sqrt(sqrt(S(17)) + S(5))/S(2)), S(-17)/4 + S(5)*sqrt(S(17))/S(4))/(S(2)*sqrt(sqrt(S(17)) + S(5))*sqrt(x**S(4) + S(5)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(sqrt(S(2))*x/sqrt(S(5) + sqrt(S(33)))), S(-29)/4 - S(5)*sqrt(S(33))/S(4))/sqrt(S(-5) + sqrt(S(33))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(2)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(S(2)*x/sqrt(S(5) + sqrt(S(41)))), S(-33)/8 - S(5)*sqrt(S(41))/S(8))/sqrt(S(-5) + sqrt(S(41))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(3)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, elliptic_f(asin(sqrt(S(2))*x/S(2)), S(-6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(4)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(S(2)*sqrt(S(2))*x/sqrt(S(5) + sqrt(S(57)))), S(-41)/16 - S(5)*sqrt(S(57))/S(16))/sqrt(S(-5) + sqrt(S(57))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(5)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(sqrt(S(10))*x/sqrt(S(5) + sqrt(S(65)))), S(-9)/4 - sqrt(S(65))/S(4))/sqrt(S(-5) + sqrt(S(65))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(6)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(S(2)*sqrt(S(3))*x/sqrt(S(5) + sqrt(S(73)))), S(-49)/24 - S(5)*sqrt(S(73))/S(24))/sqrt(S(-5) + sqrt(S(73))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(7)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(x), S(-7)/2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(8)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(S(4)*x/sqrt(S(5) + sqrt(S(89)))), S(-57)/32 - S(5)*sqrt(S(89))/S(32))/sqrt(S(-5) + sqrt(S(89))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(9)*x**S(4) + S(5)*x**S(2) + S(2)), x), x, sqrt(S(2))*elliptic_f(asin(S(3)*sqrt(S(2))*x/sqrt(S(5) + sqrt(S(97)))), S(-61)/36 - S(5)*sqrt(S(97))/S(36))/sqrt(S(-5) + sqrt(S(97))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -S(2)*b*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*c**S(2)*x) + x*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -b*atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/(S(2)*c**(S(3)/2)) + sqrt(b*x**S(2) + c*x**S(4))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(b*x**S(2) + c*x**S(4)), x), x, sqrt(b*x**S(2) + c*x**S(4))/(c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(b*x**S(2) + c*x**S(4)), x), x, atanh(sqrt(c)*x**S(2)/sqrt(b*x**S(2) + c*x**S(4)))/sqrt(c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*x**S(2) + c*x**S(4)), x), x, -atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(b*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(2)*b*x**S(3)) + c*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(2)*b**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(3)*b*x**S(4)) + S(2)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(3)*b**S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(b*x**S(2) + c*x**S(4))), x), x, -sqrt(b*x**S(2) + c*x**S(4))/(S(4)*b*x**S(5)) + S(3)*c*sqrt(b*x**S(2) + c*x**S(4))/(S(8)*b**S(2)*x**S(3)) - S(3)*c**S(2)*atanh(sqrt(b)*x/sqrt(b*x**S(2) + c*x**S(4)))/(S(8)*b**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(a + c*x**S(4)), x), x, -a**(S(3)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(6)*c**(S(5)/4)*sqrt(a + c*x**S(4))) + x*sqrt(a + c*x**S(4))/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a + c*x**S(4)), x), x, sqrt(a + c*x**S(4))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + c*x**S(4)), x), x, -a**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(c**(S(3)/4)*sqrt(a + c*x**S(4))) + a**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*c**(S(3)/4)*sqrt(a + c*x**S(4))) + x*sqrt(a + c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + c*x**S(4)), x), x, atanh(sqrt(c)*x**S(2)/sqrt(a + c*x**S(4)))/(S(2)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + c*x**S(4)), x), x, sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*c**(S(1)/4)*sqrt(a + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + c*x**S(4))), x), x, -atanh(sqrt(a + c*x**S(4))/sqrt(a))/(S(2)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + c*x**S(4))), x), x, sqrt(c)*x*sqrt(a + c*x**S(4))/(a*(sqrt(a) + sqrt(c)*x**S(2))) - sqrt(a + c*x**S(4))/(a*x) - c**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(a**(S(3)/4)*sqrt(a + c*x**S(4))) + c**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(3)/4)*sqrt(a + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a + c*x**S(4))), x), x, -sqrt(a + c*x**S(4))/(S(2)*a*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a + c*x**S(4))), x), x, -sqrt(a + c*x**S(4))/(S(3)*a*x**S(3)) - c**(S(3)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(6)*a**(S(5)/4)*sqrt(a + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(a + b*x**S(2)), x), x, S(3)*a**S(2)*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(8)*b**(S(5)/2)) - S(3)*a*x*sqrt(a + b*x**S(2))/(S(8)*b**S(2)) + x**S(3)*sqrt(a + b*x**S(2))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a + b*x**S(2)), x), x, -a*sqrt(a + b*x**S(2))/b**S(2) + (a + b*x**S(2))**(S(3)/2)/(S(3)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*x**S(2)), x), x, -a*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(2)*b**(S(3)/2)) + x*sqrt(a + b*x**S(2))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*x**S(2)), x), x, sqrt(a + b*x**S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*x**S(2)), x), x, atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*x**S(2))), x), x, -atanh(sqrt(a + b*x**S(2))/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*x**S(2))), x), x, -sqrt(a + b*x**S(2))/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a + b*x**S(2))), x), x, -sqrt(a + b*x**S(2))/(S(2)*a*x**S(2)) + b*atanh(sqrt(a + b*x**S(2))/sqrt(a))/(S(2)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a + b*x**S(2))), x), x, -sqrt(a + b*x**S(2))/(S(3)*a*x**S(3)) + S(2)*b*sqrt(a + b*x**S(2))/(S(3)*a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(c*x**S(4)), x), x, x*sqrt(c*x**S(4))/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(c*x**S(4)), x), x, sqrt(c*x**S(4))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(c*x**S(4)), x), x, x**S(3)/sqrt(c*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(c*x**S(4)), x), x, x**S(2)*log(x)/sqrt(c*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(c*x**S(4)), x), x, -x/sqrt(c*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(c*x**S(4))), x), x, -S(1)/(S(2)*sqrt(c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(c*x**S(4))), x), x, -S(1)/(S(3)*x*sqrt(c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(c*x**S(4))), x), x, -S(1)/(S(4)*x**S(2)*sqrt(c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(c*x**S(4))), x), x, -S(1)/(S(5)*x**S(3)*sqrt(c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(a), x), x, x**S(5)/(S(5)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a), x), x, x**S(4)/(S(4)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a), x), x, x**S(3)/(S(3)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a), x), x, x**S(2)/(S(2)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a), x), x, x/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a)*x), x), x, log(x)/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a)*x**S(2)), x), x, -S(1)/(sqrt(a)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a)*x**S(3)), x), x, -S(1)/(S(2)*sqrt(a)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a)*x**S(4)), x), x, -S(1)/(S(3)*sqrt(a)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-x**S(4) - S(2)*x**S(2) + S(3)), x), x, sqrt(S(3))*elliptic_f(asin(x), S(-1)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-x**S(4) + S(5)*x**S(2) + S(-1)), x), x, -S(21)**(S(3)/4)*elliptic_f(acos(sqrt(S(2))*x/sqrt(sqrt(S(21)) + S(5))), S(1)/2 + S(5)*sqrt(S(21))/S(42))/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)*(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*a*x**(S(7)/2)/S(7) + S(2)*b*x**(S(11)/2)/S(11) + S(2)*c*x**(S(15)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*a*x**(S(5)/2)/S(5) + S(2)*b*x**(S(9)/2)/S(9) + S(2)*c*x**(S(13)/2)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*a*x**(S(3)/2)/S(3) + S(2)*b*x**(S(7)/2)/S(7) + S(2)*c*x**(S(11)/2)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/sqrt(x), x), x, S(2)*a*sqrt(x) + S(2)*b*x**(S(5)/2)/S(5) + S(2)*c*x**(S(9)/2)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**(S(3)/2), x), x, -S(2)*a/sqrt(x) + S(2)*b*x**(S(3)/2)/S(3) + S(2)*c*x**(S(7)/2)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**(S(5)/2), x), x, -S(2)*a/(S(3)*x**(S(3)/2)) + S(2)*b*sqrt(x) + S(2)*c*x**(S(5)/2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/x**(S(7)/2), x), x, -S(2)*a/(S(5)*x**(S(5)/2)) - S(2)*b/sqrt(x) + S(2)*c*x**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*a**S(2)*x**(S(7)/2)/S(7) + S(4)*a*b*x**(S(11)/2)/S(11) + S(4)*b*c*x**(S(19)/2)/S(19) + S(2)*c**S(2)*x**(S(23)/2)/S(23) + x**(S(15)/2)*(S(4)*a*c/S(15) + S(2)*b**S(2)/S(15)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*a**S(2)*x**(S(5)/2)/S(5) + S(4)*a*b*x**(S(9)/2)/S(9) + S(4)*b*c*x**(S(17)/2)/S(17) + S(2)*c**S(2)*x**(S(21)/2)/S(21) + x**(S(13)/2)*(S(4)*a*c/S(13) + S(2)*b**S(2)/S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*a**S(2)*x**(S(3)/2)/S(3) + S(4)*a*b*x**(S(7)/2)/S(7) + S(4)*b*c*x**(S(15)/2)/S(15) + S(2)*c**S(2)*x**(S(19)/2)/S(19) + x**(S(11)/2)*(S(4)*a*c/S(11) + S(2)*b**S(2)/S(11)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/sqrt(x), x), x, S(2)*a**S(2)*sqrt(x) + S(4)*a*b*x**(S(5)/2)/S(5) + S(4)*b*c*x**(S(13)/2)/S(13) + S(2)*c**S(2)*x**(S(17)/2)/S(17) + x**(S(9)/2)*(S(4)*a*c/S(9) + S(2)*b**S(2)/S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**(S(3)/2), x), x, -S(2)*a**S(2)/sqrt(x) + S(4)*a*b*x**(S(3)/2)/S(3) + S(4)*b*c*x**(S(11)/2)/S(11) + S(2)*c**S(2)*x**(S(15)/2)/S(15) + x**(S(7)/2)*(S(4)*a*c/S(7) + S(2)*b**S(2)/S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**(S(5)/2), x), x, -S(2)*a**S(2)/(S(3)*x**(S(3)/2)) + S(4)*a*b*sqrt(x) + S(4)*b*c*x**(S(9)/2)/S(9) + S(2)*c**S(2)*x**(S(13)/2)/S(13) + x**(S(5)/2)*(S(4)*a*c/S(5) + S(2)*b**S(2)/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/x**(S(7)/2), x), x, -S(2)*a**S(2)/(S(5)*x**(S(5)/2)) - S(4)*a*b/sqrt(x) + S(4)*b*c*x**(S(7)/2)/S(7) + S(2)*c**S(2)*x**(S(11)/2)/S(11) + x**(S(3)/2)*(S(4)*a*c/S(3) + S(2)*b**S(2)/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(2)*a**S(3)*x**(S(7)/2)/S(7) + S(6)*a**S(2)*b*x**(S(11)/2)/S(11) + S(2)*a*x**(S(15)/2)*(a*c + b**S(2))/S(5) + S(2)*b*c**S(2)*x**(S(27)/2)/S(9) + S(2)*b*x**(S(19)/2)*(S(6)*a*c + b**S(2))/S(19) + S(2)*c**S(3)*x**(S(31)/2)/S(31) + S(6)*c*x**(S(23)/2)*(a*c + b**S(2))/S(23), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(2)*a**S(3)*x**(S(5)/2)/S(5) + S(2)*a**S(2)*b*x**(S(9)/2)/S(3) + S(6)*a*x**(S(13)/2)*(a*c + b**S(2))/S(13) + S(6)*b*c**S(2)*x**(S(25)/2)/S(25) + S(2)*b*x**(S(17)/2)*(S(6)*a*c + b**S(2))/S(17) + S(2)*c**S(3)*x**(S(29)/2)/S(29) + S(2)*c*x**(S(21)/2)*(a*c + b**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(2)*a**S(3)*x**(S(3)/2)/S(3) + S(6)*a**S(2)*b*x**(S(7)/2)/S(7) + S(6)*a*x**(S(11)/2)*(a*c + b**S(2))/S(11) + S(6)*b*c**S(2)*x**(S(23)/2)/S(23) + S(2)*b*x**(S(15)/2)*(S(6)*a*c + b**S(2))/S(15) + S(2)*c**S(3)*x**(S(27)/2)/S(27) + S(6)*c*x**(S(19)/2)*(a*c + b**S(2))/S(19), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)/sqrt(x), x), x, S(2)*a**S(3)*sqrt(x) + S(6)*a**S(2)*b*x**(S(5)/2)/S(5) + S(2)*a*x**(S(9)/2)*(a*c + b**S(2))/S(3) + S(2)*b*c**S(2)*x**(S(21)/2)/S(7) + S(2)*b*x**(S(13)/2)*(S(6)*a*c + b**S(2))/S(13) + S(2)*c**S(3)*x**(S(25)/2)/S(25) + S(6)*c*x**(S(17)/2)*(a*c + b**S(2))/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)/x**(S(3)/2), x), x, -S(2)*a**S(3)/sqrt(x) + S(2)*a**S(2)*b*x**(S(3)/2) + S(6)*a*x**(S(7)/2)*(a*c + b**S(2))/S(7) + S(6)*b*c**S(2)*x**(S(19)/2)/S(19) + S(2)*b*x**(S(11)/2)*(S(6)*a*c + b**S(2))/S(11) + S(2)*c**S(3)*x**(S(23)/2)/S(23) + S(2)*c*x**(S(15)/2)*(a*c + b**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)/x**(S(5)/2), x), x, -S(2)*a**S(3)/(S(3)*x**(S(3)/2)) + S(6)*a**S(2)*b*sqrt(x) + S(6)*a*x**(S(5)/2)*(a*c + b**S(2))/S(5) + S(6)*b*c**S(2)*x**(S(17)/2)/S(17) + S(2)*b*x**(S(9)/2)*(S(6)*a*c + b**S(2))/S(9) + S(2)*c**S(3)*x**(S(21)/2)/S(21) + S(6)*c*x**(S(13)/2)*(a*c + b**S(2))/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)/x**(S(7)/2), x), x, -S(2)*a**S(3)/(S(5)*x**(S(5)/2)) - S(6)*a**S(2)*b/sqrt(x) + S(2)*a*x**(S(3)/2)*(a*c + b**S(2)) + S(2)*b*c**S(2)*x**(S(15)/2)/S(5) + S(2)*b*x**(S(7)/2)*(S(6)*a*c + b**S(2))/S(7) + S(2)*c**S(3)*x**(S(19)/2)/S(19) + S(6)*c*x**(S(11)/2)*(a*c + b**S(2))/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(9)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*x**(S(3)/2)/(S(3)*c) - S(2)**(S(1)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(7)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(7)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(7)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(7)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*sqrt(x)/c + S(2)**(S(3)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, -S(2)**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, S(2)**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*c**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(a + b*x**S(2) + c*x**S(4)), x), x, S(2)**(S(1)/4)*c**(S(1)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/((-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*c**(S(1)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/((-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*c**(S(1)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/((-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/4)*c**(S(1)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/((-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(a + b*x**S(2) + c*x**S(4))), x), x, -S(2)**(S(3)/4)*c**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/((-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*c**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/((-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/((-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/((-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -S(2)**(S(1)/4)*c**(S(1)/4)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*c**(S(1)/4)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*c**(S(1)/4)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*c**(S(1)/4)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)/(a*sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(5)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, S(2)**(S(3)/4)*c**(S(3)/4)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)/(S(3)*a*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(7)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -S(2)/(S(5)*a*x**(S(5)/2)) + S(2)*b/(a**S(2)*sqrt(x)) + S(2)**(S(1)/4)*c**(S(1)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a**S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*c**(S(1)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a**S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*c**(S(1)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a**S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*c**(S(1)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*a**S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(13)/2)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -b*x**(S(3)/2)/(S(2)*c*(-S(4)*a*c + b**S(2))) + x**(S(7)/2)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - S(2)**(S(1)/4)*(-S(20)*a*b*c + S(3)*b**S(3) - (-S(14)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(7)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)**(S(1)/4)*(-S(20)*a*b*c + S(3)*b**S(3) - (-S(14)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(7)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)**(S(1)/4)*(-S(20)*a*b*c + S(3)*b**S(3) + (-S(14)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(7)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)**(S(1)/4)*(-S(20)*a*b*c + S(3)*b**S(3) + (-S(14)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(7)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(11)/2)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -b*sqrt(x)/(S(2)*c*(-S(4)*a*c + b**S(2))) + x**(S(5)/2)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - S(2)**(S(3)/4)*(-S(10)*a*c + b**S(2) - b*(-S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*(-S(10)*a*c + b**S(2) - b*(-S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*(-S(10)*a*c + b**S(2) + b*(-S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*(-S(10)*a*c + b**S(2) + b*(-S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(9)/2)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, x**(S(3)/2)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + S(2)**(S(1)/4)*(b - (S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*(b - (S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/4)*(S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)**(S(1)/4)*(S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, sqrt(x)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + S(2)**(S(3)/4)*(S(4)*a*c + S(3)*b**S(2) - S(3)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)**(S(3)/4)*(S(4)*a*c + S(3)*b**S(2) - S(3)*b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)**(S(3)/4)*(S(4)*a*c + S(3)*b**S(2) + S(3)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)**(S(3)/4)*(S(4)*a*c + S(3)*b**S(2) + S(3)*b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*c**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)**(S(1)/4)*c**(S(1)/4)*(S(4)*b - sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)**(S(1)/4)*c**(S(1)/4)*(S(4)*b - sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)**(S(1)/4)*c**(S(1)/4)*(S(4)*b + sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)**(S(1)/4)*c**(S(1)/4)*(S(4)*b + sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - x**(S(3)/2)*(b + S(2)*c*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)**(S(3)/4)*c**(S(3)/4)*(-S(4)*b/sqrt(-S(4)*a*c + b**S(2)) + S(3))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*(-S(4)*b/sqrt(-S(4)*a*c + b**S(2)) + S(3))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*(S(4)*b/sqrt(-S(4)*a*c + b**S(2)) + S(3))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*(S(4)*b/sqrt(-S(4)*a*c + b**S(2)) + S(3))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))) - sqrt(x)*(b + S(2)*c*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)**(S(1)/4)*c**(S(1)/4)*(b + (-S(20)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*c**(S(1)/4)*(b + (-S(20)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/4)*c**(S(1)/4)*(b - (-S(20)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*c**(S(1)/4)*(b - (-S(20)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))) + x**(S(3)/2)*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, -S(2)**(S(3)/4)*c**(S(3)/4)*(-S(28)*a*c + S(3)*b**S(2) + S(3)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)**(S(3)/4)*c**(S(3)/4)*(-S(28)*a*c + S(3)*b**S(2) + S(3)*b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)**(S(3)/4)*c**(S(3)/4)*(-S(28)*a*c + S(3)*b**S(2) - S(3)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)**(S(3)/4)*c**(S(3)/4)*(-S(28)*a*c + S(3)*b**S(2) - S(3)*b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(x)*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*sqrt(x)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - S(2)**(S(1)/4)*c**(S(1)/4)*(-S(28)*a*b*c + S(5)*b**S(3) + (-S(18)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a**S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)**(S(1)/4)*c**(S(1)/4)*(-S(28)*a*b*c + S(5)*b**S(3) + (-S(18)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a**S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)**(S(1)/4)*c**(S(1)/4)*(-S(28)*a*b*c + S(5)*b**S(3) - (-S(18)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a**S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)**(S(1)/4)*c**(S(1)/4)*(-S(28)*a*b*c + S(5)*b**S(3) - (-S(18)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(8)*a**S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (-S(18)*a*c + S(5)*b**S(2))/(S(2)*a**S(2)*sqrt(x)*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(15)/2)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, x**(S(9)/2)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + S(3)*x**(S(5)/2)*(S(8)*a*b + x**S(2)*(S(12)*a*c + b**S(2)))/(S(16)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - sqrt(x)*(S(36)*a*c + S(3)*b**S(2))/(S(16)*c*(-S(4)*a*c + b**S(2))**S(2)) - S(2)**(S(3)/4)*(-S(84)*a*b*c + S(3)*b**S(3) - S(3)*(-S(24)*a**S(2)*c**S(2) - S(30)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**S(2)) - S(2)**(S(3)/4)*(-S(84)*a*b*c + S(3)*b**S(3) - S(3)*(-S(24)*a**S(2)*c**S(2) - S(30)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**S(2)) - S(2)**(S(3)/4)*(-S(84)*a*b*c + S(3)*b**S(3) + S(3)*(-S(24)*a**S(2)*c**S(2) - S(30)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**S(2)) - S(2)**(S(3)/4)*(-S(84)*a*b*c + S(3)*b**S(3) + S(3)*(-S(24)*a**S(2)*c**S(2) - S(30)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(13)/2)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, x**(S(7)/2)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + x**(S(3)/2)*(S(24)*a*b + x**S(2)*(S(28)*a*c + S(5)*b**S(2)))/(S(16)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + S(2)**(S(1)/4)*(S(28)*a*c + S(5)*b**S(2) - (S(172)*a*b*c + S(5)*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**S(2)) - S(2)**(S(1)/4)*(S(28)*a*c + S(5)*b**S(2) - (S(172)*a*b*c + S(5)*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**S(2)) + S(2)**(S(1)/4)*(S(172)*a*b*c + S(5)*b**S(3) + sqrt(-S(4)*a*c + b**S(2))*(S(28)*a*c + S(5)*b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(2)**(S(1)/4)*(S(172)*a*b*c + S(5)*b**S(3) + sqrt(-S(4)*a*c + b**S(2))*(S(28)*a*c + S(5)*b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(11)/2)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, x**(S(5)/2)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + sqrt(x)*(S(24)*a*b + x**S(2)*(S(20)*a*c + S(7)*b**S(2)))/(S(16)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - S(2)**(S(3)/4)*(S(60)*a*c + S(21)*b**S(2) - S(3)*(S(36)*a*b*c + S(7)*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**S(2)) - S(2)**(S(3)/4)*(S(60)*a*c + S(21)*b**S(2) - S(3)*(S(36)*a*b*c + S(7)*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**S(2)) - S(2)**(S(3)/4)*(S(108)*a*b*c + S(21)*b**S(3) + S(3)*sqrt(-S(4)*a*c + b**S(2))*(S(20)*a*c + S(7)*b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(2)**(S(3)/4)*(S(108)*a*b*c + S(21)*b**S(3) + S(3)*sqrt(-S(4)*a*c + b**S(2))*(S(20)*a*c + S(7)*b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*c**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(9)/2)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(3)*S(2)**(S(1)/4)*c**(S(1)/4)*(S(20)*a*c + S(11)*b**S(2) - S(4)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(32)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(3)*S(2)**(S(1)/4)*c**(S(1)/4)*(S(20)*a*c + S(11)*b**S(2) - S(4)*b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(32)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(3)*S(2)**(S(1)/4)*c**(S(1)/4)*(S(20)*a*c + S(11)*b**S(2) + S(4)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(32)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*S(2)**(S(1)/4)*c**(S(1)/4)*(S(20)*a*c + S(11)*b**S(2) + S(4)*b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(32)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x**(S(3)/2)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - S(3)*x**(S(3)/2)*(-S(4)*a*c + S(5)*b**S(2) + S(8)*b*c*x**S(2))/(S(16)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(7)/2)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(2)**(S(3)/4)*c**(S(3)/4)*(S(28)*a*c + S(41)*b**S(2) - S(36)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(32)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(2)**(S(3)/4)*c**(S(3)/4)*(S(28)*a*c + S(41)*b**S(2) - S(36)*b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(32)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(2)**(S(3)/4)*c**(S(3)/4)*(S(28)*a*c + S(41)*b**S(2) + S(36)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(32)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(2)**(S(3)/4)*c**(S(3)/4)*(S(28)*a*c + S(41)*b**S(2) + S(36)*b*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(32)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + sqrt(x)*(S(2)*a + b*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - sqrt(x)*(-S(4)*a*c + S(13)*b**S(2) + S(24)*b*c*x**S(2))/(S(16)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(5)/2)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x**(S(3)/2)*(b + S(2)*c*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + S(3)*S(2)**(S(1)/4)*c**(S(1)/4)*(-S(68)*a*b*c + b**S(3) + sqrt(-S(4)*a*c + b**S(2))*(S(12)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(3)*S(2)**(S(1)/4)*c**(S(1)/4)*(-S(68)*a*b*c + b**S(3) + sqrt(-S(4)*a*c + b**S(2))*(S(12)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*S(2)**(S(1)/4)*c**(S(1)/4)*(S(68)*a*b*c/sqrt(-S(4)*a*c + b**S(2)) + S(12)*a*c - b**S(3)/sqrt(-S(4)*a*c + b**S(2)) + b**S(2))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*S(2)**(S(1)/4)*c**(S(1)/4)*(S(68)*a*b*c/sqrt(-S(4)*a*c + b**S(2)) + S(12)*a*c - b**S(3)/sqrt(-S(4)*a*c + b**S(2)) + b**S(2))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**S(2)) + S(3)*x**(S(3)/2)*(b*(S(4)*a*c + b**S(2)) + c*x**S(2)*(S(12)*a*c + b**S(2)))/(S(16)*a*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -sqrt(x)*(b + S(2)*c*x**S(2))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - S(3)*S(2)**(S(3)/4)*c**(S(3)/4)*(-S(68)*a*b*c + b**S(3) + sqrt(-S(4)*a*c + b**S(2))*(S(44)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(3)*S(2)**(S(3)/4)*c**(S(3)/4)*(-S(68)*a*b*c + b**S(3) + sqrt(-S(4)*a*c + b**S(2))*(S(44)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(3)*S(2)**(S(3)/4)*c**(S(3)/4)*(S(68)*a*b*c/sqrt(-S(4)*a*c + b**S(2)) + S(44)*a*c - b**S(3)/sqrt(-S(4)*a*c + b**S(2)) + b**S(2))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*S(2)**(S(3)/4)*c**(S(3)/4)*(S(68)*a*b*c/sqrt(-S(4)*a*c + b**S(2)) + S(44)*a*c - b**S(3)/sqrt(-S(4)*a*c + b**S(2)) + b**S(2))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(x)*(b*(S(20)*a*c + b**S(2)) + c*x**S(2)*(S(44)*a*c + b**S(2)))/(S(16)*a*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, x**(S(3)/2)*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + S(2)**(S(1)/4)*c**(S(1)/4)*(S(520)*a**S(2)*c**S(2) - S(54)*a*b**S(2)*c + S(5)*b**S(4) + b*(-S(44)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a**S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(2)**(S(1)/4)*c**(S(1)/4)*(S(520)*a**S(2)*c**S(2) - S(54)*a*b**S(2)*c + S(5)*b**S(4) + b*(-S(44)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a**S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(2)**(S(1)/4)*c**(S(1)/4)*(S(520)*a**S(2)*c**S(2) - S(54)*a*b**S(2)*c + S(5)*b**S(4) - b*(-S(44)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a**S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(2)**(S(1)/4)*c**(S(1)/4)*(S(520)*a**S(2)*c**S(2) - S(54)*a*b**S(2)*c + S(5)*b**S(4) - b*(-S(44)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a**S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x**(S(3)/2)*(S(52)*a**S(2)*c**S(2) - S(45)*a*b**S(2)*c + S(5)*b**S(4) + b*c*x**S(2)*(-S(44)*a*c + S(5)*b**S(2)))/(S(16)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(a + b*x**S(2) + c*x**S(4))**S(3)), x), x, sqrt(x)*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - S(3)*S(2)**(S(3)/4)*c**(S(3)/4)*(S(280)*a**S(2)*c**S(2) - S(66)*a*b**S(2)*c + S(7)*b**S(4) + b*(-S(52)*a*c + S(7)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a**S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(3)*S(2)**(S(3)/4)*c**(S(3)/4)*(S(280)*a**S(2)*c**S(2) - S(66)*a*b**S(2)*c + S(7)*b**S(4) + b*(-S(52)*a*c + S(7)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a**S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*S(2)**(S(3)/4)*c**(S(3)/4)*(S(280)*a**S(2)*c**S(2) - S(66)*a*b**S(2)*c + S(7)*b**S(4) - b*(-S(52)*a*c + S(7)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a**S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*S(2)**(S(3)/4)*c**(S(3)/4)*(S(280)*a**S(2)*c**S(2) - S(66)*a*b**S(2)*c + S(7)*b**S(4) - b*(-S(52)*a*c + S(7)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(x)/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(64)*a**S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + sqrt(x)*(S(60)*a**S(2)*c**S(2) - S(55)*a*b**S(2)*c + S(7)*b**S(4) + b*c*x**S(2)*(-S(52)*a*c + S(7)*b**S(2)))/(S(16)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*(d*x)**(S(5)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(5)/4, S(-1)/2, S(-1)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*d*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*(d*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(3)/4, S(-1)/2, S(-1)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*d*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/sqrt(d*x), x), x, S(2)*sqrt(d*x)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(1)/4, S(-1)/2, S(-1)/2, S(5)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/(d*x)**(S(3)/2), x), x, -S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(-1)/4, S(-1)/2, S(-1)/2, S(3)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*sqrt(d*x)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*a*(d*x)**(S(5)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(5)/4, S(-3)/2, S(-3)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*d*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*a*(d*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(3)/4, S(-3)/2, S(-3)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*d*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/sqrt(d*x), x), x, S(2)*a*sqrt(d*x)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(1)/4, S(-3)/2, S(-3)/2, S(5)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(d*x)**(S(3)/2), x), x, -S(2)*a*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(-1)/4, S(-3)/2, S(-3)/2, S(3)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*sqrt(d*x)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*(d*x)**(S(5)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(5)/4, S(1)/2, S(1)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*d*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*(d*x)**(S(3)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/4, S(1)/2, S(1)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*d*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, S(2)*sqrt(d*x)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/4, S(1)/2, S(1)/2, S(5)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -S(2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(-1)/4, S(1)/2, S(1)/2, S(3)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*sqrt(d*x)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*(d*x)**(S(5)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(5)/4, S(3)/2, S(3)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*a*d*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*(d*x)**(S(3)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/4, S(3)/2, S(3)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*d*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(2)*sqrt(d*x)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/4, S(3)/2, S(3)/2, S(5)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*d*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, -S(2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(-1)/4, S(3)/2, S(3)/2, S(3)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*d*sqrt(d*x)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, a**S(3)*(d*x)**(m + S(1))/(d*(m + S(1))) + S(3)*a**S(2)*b*(d*x)**(m + S(3))/(d**S(3)*(m + S(3))) + S(3)*a*(d*x)**(m + S(5))*(a*c + b**S(2))/(d**S(5)*(m + S(5))) + S(3)*b*c**S(2)*(d*x)**(m + S(11))/(d**S(11)*(m + S(11))) + b*(d*x)**(m + S(7))*(S(6)*a*c + b**S(2))/(d**S(7)*(m + S(7))) + c**S(3)*(d*x)**(m + S(13))/(d**S(13)*(m + S(13))) + S(3)*c*(d*x)**(m + S(9))*(a*c + b**S(2))/(d**S(9)*(m + S(9))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*(d*x)**(m + S(1))/(d*(m + S(1))) + S(2)*a*b*(d*x)**(m + S(3))/(d**S(3)*(m + S(3))) + S(2)*b*c*(d*x)**(m + S(7))/(d**S(7)*(m + S(7))) + c**S(2)*(d*x)**(m + S(9))/(d**S(9)*(m + S(9))) + (d*x)**(m + S(5))*(S(2)*a*c + b**S(2))/(d**S(5)*(m + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(2) + c*x**S(4)), x), x, a*(d*x)**(m + S(1))/(d*(m + S(1))) + b*(d*x)**(m + S(3))/(d**S(3)*(m + S(3))) + c*(d*x)**(m + S(5))/(d**S(5)*(m + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**S(2) + c*x**S(4)), x), x, -S(2)*c*(d*x)**(m + S(1))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*c*(d*x)**(m + S(1))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))))/(d*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -c*(d*x)**(m + S(1))*(-S(4)*a*c*(-m + S(3)) + b**S(2)*(-m + S(1)) - b*(-m + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*d*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + c*(d*x)**(m + S(1))*(-S(4)*a*c*(-m + S(3)) + b**S(2)*(-m + S(1)) + b*(-m + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*d*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (d*x)**(m + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*d*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**p/x, x), x, S(4)**(p + S(-1))*((b + S(2)*c*x**S(2) - sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(2)))**(-p)*((b + S(2)*c*x**S(2) + sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(2)))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(-S(2)*p, -p, -p, -S(2)*p + S(1), -(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(2)), -(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(2)))/p, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**p/x**S(3), x), x, -S(2)**(S(2)*p + S(-1))*((b + S(2)*c*x**S(2) - sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(2)))**(-p)*((b + S(2)*c*x**S(2) + sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(2)))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(-S(2)*p + S(1), -p, -p, -S(2)*p + S(2), -(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(2)), -(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(2)))/(x**S(2)*(-S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**p/x**S(5), x), x, -S(4)**(p + S(-1))*((b + S(2)*c*x**S(2) - sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(2)))**(-p)*((b + S(2)*c*x**S(2) + sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(2)))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(-S(2)*p + S(2), -p, -p, -S(2)*p + S(3), -(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(2)), -(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(2)))/(x**S(4)*(-p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(2) + c*x**S(4))**p, x), x, x**S(5)*(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(S(5)/2, -p, -p, S(7)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))**p, x), x, x**S(3)*(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(S(3)/2, -p, -p, S(5)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**p, x), x, x*(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(S(1)/2, -p, -p, S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**p/x**S(2), x), x, -(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(S(-1)/2, -p, -p, S(1)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**p/x**S(4), x), x, -(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(S(-3)/2, -p, -p, S(-1)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, a*(d*x)**(m + S(1))*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(m/S(2) + S(1)/2, S(-3)/2, S(-3)/2, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, (d*x)**(m + S(1))*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(m/S(2) + S(1)/2, S(-1)/2, S(-1)/2, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, (d*x)**(m + S(1))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(m/S(2) + S(1)/2, S(1)/2, S(1)/2, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, (d*x)**(m + S(1))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(m/S(2) + S(1)/2, S(3)/2, S(3)/2, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*d*(m + S(1))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(2) + c*x**S(4))**p, x), x, (d*x)**(m + S(1))*(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(2) + c*x**S(4))**p*AppellF1(m/S(2) + S(1)/2, -p, -p, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(2) + c*x**S(4))**p, x), x, S(2)**(p + S(-1))*b*(-(b + S(2)*c*x**S(2) - sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))**(-p + S(-1))*(a + b*x**S(2) + c*x**S(4))**(p + S(1))*hyper((-p, p + S(1)), (p + S(2),), (b + S(2)*c*x**S(2) + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*sqrt(-S(4)*a*c + b**S(2))))/(c*(p + S(1))*sqrt(-S(4)*a*c + b**S(2))) + (a + b*x**S(2) + c*x**S(4))**(p + S(1))/(S(4)*c*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2) + c*x**S(4))**p, x), x, -S(2)**p*(-(b + S(2)*c*x**S(2) - sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))**(-p + S(-1))*(a + b*x**S(2) + c*x**S(4))**(p + S(1))*hyper((-p, p + S(1)), (p + S(2),), (b + S(2)*c*x**S(2) + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*sqrt(-S(4)*a*c + b**S(2))))/((p + S(1))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(3) + b*x**S(6))**(S(5)/3), x), x, -S(3)*a*(a*x**S(3) + b*x**S(6))**(S(8)/3)/(S(88)*b**S(2)*x**S(8)) + (a*x**S(3) + b*x**S(6))**(S(8)/3)/(S(11)*b*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(3) + b*x**S(6))**(S(2)/3), x), x, (a*x**S(3) + b*x**S(6))**(S(5)/3)/(S(5)*b*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(3) + b*x**S(6))**(S(-2)/3), x), x, -(a*x**S(3) + b*x**S(6))**(S(1)/3)/(a*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(3) + b*x**S(6))**(S(-5)/3), x), x, S(1)/(S(2)*a*x**S(2)*(a*x**S(3) + b*x**S(6))**(S(2)/3)) - S(3)*(a*x**S(3) + b*x**S(6))**(S(1)/3)/(S(4)*a**S(2)*x**S(5)) + S(9)*b*(a*x**S(3) + b*x**S(6))**(S(1)/3)/(S(4)*a**S(3)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6) - x**S(3)), x), x, log(-x + S(1))/S(3) - log(x**S(2) + x + S(1))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(3) + S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, S(3)*a*x**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/((a + b*x**S(3))*(m**S(2) + S(5)*m + S(4))) + x**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(m + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, a*x**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(18)*a + S(18)*b*x**S(3)) + x**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, S(3)*a*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(40)*a + S(40)*b*x**S(3)) + x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, S(3)*a*x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(28)*a + S(28)*b*x**S(3)) + x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, (a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, S(3)*a*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(10)*a + S(10)*b*x**S(3)) + x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, S(3)*a*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(4)*a + S(4)*b*x**S(3)) + x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x, x), x, a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(2), x), x, -S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(2)*x*(a + b*x**S(3))) + sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(3), x), x, -S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(2)*x**S(2)*(a + b*x**S(3))) + sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(4), x), x, -a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3)*x**S(3)*(a + b*x**S(3))) + b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(5), x), x, S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(4)*x**S(4)*(a + b*x**S(3))) - sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(6), x), x, S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(10)*x**S(5)*(a + b*x**S(3))) - sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(2)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(7), x), x, -(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(6)*a*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(8), x), x, S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(28)*x**S(7)*(a + b*x**S(3))) - sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(4)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(9), x), x, S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(40)*x**S(8)*(a + b*x**S(3))) - sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(5)*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(10), x), x, a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(18)*x**S(9)*(a + b*x**S(3))) - sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(6)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/x**S(11), x), x, S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(70)*x**S(10)*(a + b*x**S(3))) - sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(7)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, S(162)*a**S(3)*x**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/((a + b*x**S(3))*(m + S(7))*(m + S(10))*(m**S(2) + S(5)*m + S(4))) + S(54)*a**S(2)*x**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/((m + S(4))*(m + S(7))*(m + S(10))) + S(9)*a*x**(m + S(1))*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(m**S(2) + S(17)*m + S(70)) + x**(m + S(1))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(m + S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, S(81)*a**S(3)*x**S(10)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(19760)*a + S(19760)*b*x**S(3)) + S(27)*a**S(2)*x**S(10)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(1976) + S(9)*a*x**S(10)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(304) + x**S(10)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(19), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, a**S(2)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(36)*b**S(3)) - a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(45)*b**S(3)) + x**S(6)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(18)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, S(81)*a**S(3)*x**S(8)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(10472)*a + S(10472)*b*x**S(3)) + S(27)*a**S(2)*x**S(8)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(1309) + S(9)*a*x**S(8)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(238) + x**S(8)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, S(81)*a**S(3)*x**S(7)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(7280)*a + S(7280)*b*x**S(3)) + S(27)*a**S(2)*x**S(7)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(1040) + S(9)*a*x**S(7)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(208) + x**S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, -a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(12)*b**S(2)) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(15)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, S(81)*a**S(3)*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3080)*a + S(3080)*b*x**S(3)) + S(27)*a**S(2)*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(616) + S(9)*a*x**S(5)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(154) + x**S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, S(81)*a**S(3)*x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(1820)*a + S(1820)*b*x**S(3)) + S(27)*a**S(2)*x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(455) + S(9)*a*x**S(4)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(130) + x**S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, (a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, S(81)*a**S(3)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(440)*a + S(440)*b*x**S(3)) + S(27)*a**S(2)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(220) + S(9)*a*x**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(88) + x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, S(81)*a**S(3)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(140)*a + S(140)*b*x**S(3)) + S(27)*a**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(140) + S(9)*a*x*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(70) + x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x, x), x, a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(3) + a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(6) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(2), x), x, -S(81)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(40)*x*(a + b*x**S(3))) + S(27)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(40)*x) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(40)*x) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(8)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(3), x), x, -S(81)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(28)*x**S(2)*(a + b*x**S(3))) + S(27)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(14)*x**S(2)) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(28)*x**S(2)) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(7)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(4), x), x, S(3)*a**S(2)*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + a*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)) - a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(2)*x**S(3)) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(6)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(5), x), x, S(81)*a*b**S(2)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(20)*a + S(20)*b*x**S(3)) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(4)*x**S(4)) + S(27)*b**S(2)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(10) - S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(2)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(6), x), x, S(81)*a*b**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(20)*a + S(20)*b*x**S(3)) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(10)*x**S(5)) + S(27)*b**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(20) - S(11)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(10)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(7), x), x, S(3)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(2)*x**S(6)) + b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)) - S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(3)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(8), x), x, -S(81)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(28)*x*(a + b*x**S(3))) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(28)*x**S(7)) + S(27)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(28)*x) - S(13)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(28)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(9), x), x, -S(81)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(40)*x**S(2)*(a + b*x**S(3))) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(40)*x**S(8)) + S(27)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(20)*x**S(2)) - S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(20)*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(10), x), x, -a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3)*x**S(3)*(a + b*x**S(3))) + a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(6)*x**S(9)) + b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) - S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(18)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(11), x), x, S(81)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(140)*x**S(4)*(a + b*x**S(3))) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(70)*x**S(10)) - S(27)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(35)*x**S(4)) - S(8)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(35)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(12), x), x, S(81)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(440)*x**S(5)*(a + b*x**S(3))) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(88)*x**S(11)) - S(27)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(88)*x**S(5)) - S(17)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(88)*x**S(11)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(13), x), x, -(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(12)*a*x**S(12)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(14), x), x, S(81)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(1820)*x**S(7)*(a + b*x**S(3))) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(130)*x**S(13)) - S(27)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(260)*x**S(7)) - S(19)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(130)*x**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(15), x), x, S(81)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3080)*x**S(8)*(a + b*x**S(3))) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(154)*x**S(14)) - S(27)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(385)*x**S(8)) - S(10)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(77)*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(16), x), x, -(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(12)*a*x**S(15)) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(60)*a**S(2)*x**S(15)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/x**S(17), x), x, S(81)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(7280)*x**S(10)*(a + b*x**S(3))) + S(9)*a*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(208)*x**S(16)) - S(27)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(728)*x**S(10)) - S(11)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(104)*x**S(16)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(29160)*a**S(5)*x**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/((a + b*x**S(3))*(m + S(7))*(m + S(10))*(m + S(13))*(m + S(16))*(m**S(2) + S(5)*m + S(4))) + S(9720)*a**S(4)*x**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/((m + S(4))*(m + S(7))*(m + S(10))*(m + S(13))*(m + S(16))) + S(1620)*a**S(3)*x**(m + S(1))*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/((m + S(13))*(m + S(16))*(m**S(2) + S(17)*m + S(70))) + S(180)*a**S(2)*x**(m + S(1))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/((m + S(10))*(m + S(13))*(m + S(16))) + S(15)*a*x**(m + S(1))*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(m**S(2) + S(29)*m + S(208)) + x**(m + S(1))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(m + S(16)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(13)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(14)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(2063698)*a + S(2063698)*b*x**S(3)) + S(243)*a**S(4)*x**S(14)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(147407) + S(81)*a**S(3)*x**S(14)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(17342) + S(90)*a**S(2)*x**S(14)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(8671) + S(15)*a*x**S(14)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(754) + x**S(14)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(29), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(12)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(13)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(1521520)*a + S(1521520)*b*x**S(3)) + S(243)*a**S(4)*x**S(13)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(117040) + S(81)*a**S(3)*x**S(13)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(14630) + S(9)*a**S(2)*x**S(13)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(770) + S(3)*a*x**S(13)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(140) + x**S(13)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(28), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, -a**S(3)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(216)*b**S(4)) + a**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(7)/2)/(S(252)*b**S(4)) - a*x**S(6)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(72)*b**S(2)) + x**S(9)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(27)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(11)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(782782)*a + S(782782)*b*x**S(3)) + S(243)*a**S(4)*x**S(11)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(71162) + S(81)*a**S(3)*x**S(11)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(10166) + S(9)*a**S(2)*x**S(11)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(598) + S(15)*a*x**S(11)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(598) + x**S(11)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(26), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(10)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(543400)*a + S(543400)*b*x**S(3)) + S(243)*a**S(4)*x**S(10)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(54340) + S(81)*a**S(3)*x**S(10)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(8360) + S(18)*a**S(2)*x**S(10)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(1045) + S(3)*a*x**S(10)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(110) + x**S(10)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(25), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, a**S(2)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(72)*b**S(3)) - a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(7)/2)/(S(84)*b**S(3)) + x**S(6)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(24)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(8)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(240856)*a + S(240856)*b*x**S(3)) + S(243)*a**S(4)*x**S(8)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(30107) + S(81)*a**S(3)*x**S(8)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(5474) + S(9)*a**S(2)*x**S(8)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(391) + S(3)*a*x**S(8)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(92) + x**S(8)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(23), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(7)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(152152)*a + S(152152)*b*x**S(3)) + S(243)*a**S(4)*x**S(7)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(21736) + S(405)*a**S(3)*x**S(7)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(21736) + S(45)*a**S(2)*x**S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(1672) + S(15)*a*x**S(7)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(418) + x**S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(22), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, -a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(18)*b**S(2)) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(7)/2)/(S(21)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(52360)*a + S(52360)*b*x**S(3)) + S(243)*a**S(4)*x**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(10472) + S(81)*a**S(3)*x**S(5)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(2618) + S(9)*a**S(2)*x**S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(238) + S(3)*a*x**S(5)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(68) + x**S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(20), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(27664)*a + S(27664)*b*x**S(3)) + S(243)*a**S(4)*x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(6916) + S(81)*a**S(3)*x**S(4)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(1976) + S(45)*a**S(2)*x**S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(988) + S(15)*a*x**S(4)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(304) + x**S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(19), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, (a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(18)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(5236)*a + S(5236)*b*x**S(3)) + S(243)*a**S(4)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(2618) + S(405)*a**S(3)*x**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(5236) + S(90)*a**S(2)*x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(1309) + S(15)*a*x**S(2)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(238) + x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, S(729)*a**S(5)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(1456)*a + S(1456)*b*x**S(3)) + S(243)*a**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(1456) + S(81)*a**S(3)*x*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(728) + S(9)*a**S(2)*x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(104) + S(15)*a*x*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(208) + x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x, x), x, a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(3) + a**S(3)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(6) + a**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(9) + a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(12) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(2), x), x, -S(729)*a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(308)*x*(a + b*x**S(3))) + S(243)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(308)*x) + S(81)*a**S(3)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(308)*x) + S(45)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(308)*x) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(154)*x) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(14)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(3), x), x, -S(729)*a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(182)*x**S(2)*(a + b*x**S(3))) + S(243)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(91)*x**S(2)) + S(81)*a**S(3)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(182)*x**S(2)) + S(18)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(91)*x**S(2)) + S(3)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(26)*x**S(2)) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(13)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(4), x), x, S(5)*a**S(4)*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + S(5)*a**S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(3) + S(5)*a**S(2)*b*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(6) + S(5)*a*b*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(9) - S(5)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(12)*x**S(3)) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(12)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(5), x), x, S(729)*a**S(3)*b**S(2)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(88)*a + S(88)*b*x**S(3)) + S(243)*a**S(2)*b**S(2)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(44) + S(405)*a*b**S(2)*x**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(88) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(4)*x**S(4)) + S(45)*b**S(2)*x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(11) - S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(6), x), x, S(729)*a**S(3)*b**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(70)*a + S(70)*b*x**S(3)) + S(243)*a**S(2)*b**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(70) + S(81)*a*b**S(2)*x*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(35) + S(3)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(2)*x**S(5)) + S(9)*b**S(2)*x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(5) - S(17)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(10)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(7), x), x, S(10)*a**S(3)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + S(10)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(3) + S(5)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(3) + S(5)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(6)*x**S(6)) + S(10)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/S(9) - (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(8), x), x, -S(729)*a**S(3)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(56)*x*(a + b*x**S(3))) + S(243)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(56)*x) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(56)*x) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(28)*x**S(7)) + S(45)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(56)*x) - S(19)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(28)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(9), x), x, -S(729)*a**S(3)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(56)*x**S(2)*(a + b*x**S(3))) + S(243)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(28)*x**S(2)) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(56)*x**S(2)) + S(3)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(8)*x**S(8)) + S(9)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(14)*x**S(2)) - (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(2)*x**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(10), x), x, S(10)*a**S(2)*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + S(10)*a*b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(3) - S(5)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3)*x**S(3)) + S(5)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(18)*x**S(9)) + S(5)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(9)*x**S(3)) - S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(18)*x**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(11), x), x, S(729)*a*b**S(4)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(70)*a + S(70)*b*x**S(3)) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(14)*x**S(4)) + S(3)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(14)*x**S(10)) + S(243)*b**S(4)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(35) - S(45)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(7)*x**S(4)) - S(11)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(35)*x**S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(12), x), x, S(729)*a*b**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(88)*a + S(88)*b*x**S(3)) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(44)*x**S(5)) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(88)*x**S(11)) + S(243)*b**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(88) - S(9)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(4)*x**S(5)) - S(23)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(88)*x**S(11)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(13), x), x, S(5)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) + S(5)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(6)*x**S(6)) + S(5)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(36)*x**S(12)) + S(5)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/S(3) - S(10)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(9)*x**S(6)) - S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(9)*x**S(12)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(14), x), x, -S(729)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(182)*x*(a + b*x**S(3))) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(182)*x**S(7)) + S(3)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(26)*x**S(13)) + S(243)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(182)*x) - S(9)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(14)*x**S(7)) - S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(26)*x**S(13)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(15), x), x, -S(729)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(308)*x**S(2)*(a + b*x**S(3))) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(308)*x**S(8)) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(154)*x**S(14)) + S(243)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(154)*x**S(2)) - S(9)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(22)*x**S(8)) - S(13)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(77)*x**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(16), x), x, -a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3)*x**S(3)*(a + b*x**S(3))) + a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(6)*x**S(9)) + a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(12)*x**S(15)) + b**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))*log(x)/(a + b*x**S(3)) - S(5)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(18)*x**S(9)) - S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(20)*x**S(15)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(17), x), x, S(729)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(1456)*x**S(4)*(a + b*x**S(3))) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(728)*x**S(10)) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(208)*x**S(16)) - S(243)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(364)*x**S(4)) - S(18)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(91)*x**S(10)) - S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(52)*x**S(16)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(18), x), x, S(729)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(5236)*x**S(5)*(a + b*x**S(3))) + S(405)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(5236)*x**S(11)) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(238)*x**S(17)) - S(1215)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(5236)*x**S(5)) - S(45)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(308)*x**S(11)) - S(29)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(238)*x**S(17)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(19), x), x, -(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(18)*a*x**S(18)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(20), x), x, S(729)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(27664)*x**S(7)*(a + b*x**S(3))) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(1976)*x**S(13)) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(304)*x**S(19)) - S(243)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3952)*x**S(7)) - S(9)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(104)*x**S(13)) - S(31)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(304)*x**S(19)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(21), x), x, S(729)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(52360)*x**S(8)*(a + b*x**S(3))) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(2618)*x**S(14)) + S(3)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(68)*x**S(20)) - S(243)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(6545)*x**S(8)) - S(90)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(1309)*x**S(14)) - S(8)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(85)*x**S(20)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(22), x), x, -(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(18)*a*x**S(21)) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(7)/2)/(S(126)*a**S(2)*x**S(21)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(23), x), x, S(729)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(152152)*x**S(10)*(a + b*x**S(3))) + S(405)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(21736)*x**S(16)) + S(15)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(418)*x**S(22)) - S(1215)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(76076)*x**S(10)) - S(45)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(988)*x**S(16)) - S(17)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(209)*x**S(22)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(24), x), x, S(729)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(240856)*x**S(11)*(a + b*x**S(3))) + S(81)*a*b**S(2)*(a + b*x**S(3))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(5474)*x**S(17)) + S(3)*a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(92)*x**S(23)) - S(243)*b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(21896)*x**S(11)) - S(9)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)/(S(238)*x**S(17)) - S(7)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(92)*x**S(23)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/x**S(25), x), x, -(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(24)*a*x**S(24)) + b*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)/(S(72)*a**S(2)*x**S(21)) - b*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(7)/2)/(S(504)*a**S(3)*x**S(21)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, x**(m + S(1))*(a + b*x**S(3))*hyper((S(1), m/S(3) + S(1)/3), (m/S(3) + S(4)/3,), -b*x**S(3)/a)/(a*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, a**(S(2)/3)*(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(3)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - a**(S(2)/3)*(a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(6)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + sqrt(S(3))*a**(S(2)/3)*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + x**S(2)*(a + b*x**S(3))/(S(2)*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, -a**(S(1)/3)*(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(3)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + a**(S(1)/3)*(a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(6)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + sqrt(S(3))*a**(S(1)/3)*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + x*(a + b*x**S(3))/(b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, (a + b*x**S(3))*log(a + b*x**S(3))/(S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, -(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(6)*a**(S(1)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(1)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6)), x), x, (a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(3)*a**(S(2)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(6)*a**(S(2)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), x), x, (a + b*x**S(3))*log(x)/(a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (a + b*x**S(3))*log(a + b*x**S(3))/(S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), x), x, -(a + b*x**S(3))/(a*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + b**(S(1)/3)*(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(3)*a**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - b**(S(1)/3)*(a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(6)*a**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + sqrt(S(3))*b**(S(1)/3)*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), x), x, (-a - b*x**S(3))/(S(2)*a*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - b**(S(2)/3)*(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(3)*a**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + b**(S(2)/3)*(a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(6)*a**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + sqrt(S(3))*b**(S(2)/3)*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), x), x, -b*(a + b*x**S(3))*log(x)/(a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + b*(a + b*x**S(3))*log(a + b*x**S(3))/(S(3)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3)*a**S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, x**(m + S(1))*(a + b*x**S(3))*hyper((S(3), m/S(3) + S(1)/3), (m/S(3) + S(4)/3,), -b*x**S(3)/a)/(a**S(3)*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, x**S(5)*(a + b*x**S(3))/(S(6)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) - x**S(2)/(S(18)*a*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(27)*a**(S(4)/3)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(54)*a**(S(4)/3)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(27)*a**(S(4)/3)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, x**S(4)*(a + b*x**S(3))/(S(6)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) - x/(S(9)*a*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(27)*a**(S(5)/3)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(54)*a**(S(5)/3)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(27)*a**(S(5)/3)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, (-a - b*x**S(3))/(S(6)*b*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2), x), x, x**S(2)*(a + b*x**S(3))/(S(6)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(2)*x**S(2)/(S(9)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(27)*a**(S(7)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(2)*a + S(2)*b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(27)*a**(S(7)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(S(2)*a + S(2)*b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(27)*a**(S(7)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(-3)/2), x), x, x*(a + b*x**S(3))/(S(6)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(5)*x/(S(18)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (S(5)*a + S(5)*b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(27)*a**(S(8)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(5)*a + S(5)*b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(54)*a**(S(8)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(S(5)*a + S(5)*b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(27)*a**(S(8)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)), x), x, (a + b*x**S(3))/(S(6)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(1)/(S(3)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (a + b*x**S(3))*log(x)/(a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (a + b*x**S(3))*log(a + b*x**S(3))/(S(3)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)), x), x, (a + b*x**S(3))/(S(6)*a*x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(7)/(S(18)*a**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(14)*a + S(14)*b*x**S(3))/(S(9)*a**S(3)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(14)*b**(S(1)/3)*(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(27)*a**(S(10)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - S(7)*b**(S(1)/3)*(a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(27)*a**(S(10)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(14)*sqrt(S(3))*b**(S(1)/3)*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(27)*a**(S(10)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)), x), x, (a + b*x**S(3))/(S(6)*a*x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(4)/(S(9)*a**S(2)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(10)*a + S(10)*b*x**S(3))/(S(9)*a**S(3)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - S(20)*b**(S(2)/3)*(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(27)*a**(S(11)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(10)*b**(S(2)/3)*(a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(27)*a**(S(11)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(20)*sqrt(S(3))*b**(S(2)/3)*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(27)*a**(S(11)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)), x), x, (a + b*x**S(3))/(S(6)*a*x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(1)/(S(2)*a**S(2)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - S(3)*b*(a + b*x**S(3))*log(x)/(a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + b*(a + b*x**S(3))*log(a + b*x**S(3))/(a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(a**S(4)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, x**(m + S(1))*(a + b*x**S(3))*hyper((S(5), m/S(3) + S(1)/3), (m/S(3) + S(4)/3,), -b*x**S(3)/a)/(a**S(5)*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, a*x*(a + b*x**S(3))/(S(12)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) - S(13)*x/(S(108)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + x*(a + b*x**S(3))/(S(162)*a*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(5)*x/(S(486)*a**S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (S(5)*a + S(5)*b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(729)*a**(S(8)/3)*b**(S(7)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(5)*a + S(5)*b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(1458)*a**(S(8)/3)*b**(S(7)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(S(5)*a + S(5)*b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(729)*a**(S(8)/3)*b**(S(7)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, a*(a + b*x**S(3))/(S(12)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) - S(1)/(S(9)*b**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, x**S(5)*(a + b*x**S(3))/(S(12)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) - S(7)*x**S(2)/(S(108)*a*b*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(7)*x**S(2)*(a + b*x**S(3))/(S(324)*a**S(2)*b*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(7)*x**S(2)/(S(243)*a**S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(7)*a + S(7)*b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(729)*a**(S(10)/3)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (S(7)*a + S(7)*b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(1458)*a**(S(10)/3)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(S(7)*a + S(7)*b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(729)*a**(S(10)/3)*b**(S(5)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, x**S(4)*(a + b*x**S(3))/(S(12)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) - S(2)*x/(S(27)*a*b*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + x*(a + b*x**S(3))/(S(81)*a**S(2)*b*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(5)*x/(S(243)*a**S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(5)*a + S(5)*b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(729)*a**(S(11)/3)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (S(10)*a + S(10)*b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(729)*a**(S(11)/3)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(S(10)*a + S(10)*b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(729)*a**(S(11)/3)*b**(S(4)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, (-a - b*x**S(3))/(S(12)*b*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2), x), x, x**S(2)*(a + b*x**S(3))/(S(12)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) + S(5)*x**S(2)/(S(54)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(35)*x**S(2)*(a + b*x**S(3))/(S(324)*a**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(35)*x**S(2)/(S(243)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(35)*a + S(35)*b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(729)*a**(S(13)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (S(35)*a + S(35)*b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(1458)*a**(S(13)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(S(35)*a + S(35)*b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(729)*a**(S(13)/3)*b**(S(2)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(-5)/2), x), x, x*(a + b*x**S(3))/(S(12)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) + S(11)*x/(S(108)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(11)*x*(a + b*x**S(3))/(S(81)*a**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(55)*x/(S(243)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(55)*a + S(55)*b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(729)*a**(S(14)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (S(110)*a + S(110)*b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(729)*a**(S(14)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - sqrt(S(3))*(S(110)*a + S(110)*b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(729)*a**(S(14)/3)*b**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)), x), x, (a + b*x**S(3))/(S(12)*a*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) + S(1)/(S(9)*a**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + (a + b*x**S(3))/(S(6)*a**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(1)/(S(3)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + (a + b*x**S(3))*log(x)/(a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (a + b*x**S(3))*log(a + b*x**S(3))/(S(3)*a**S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)), x), x, (a + b*x**S(3))/(S(12)*a*x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) + S(13)/(S(108)*a**S(2)*x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + (S(65)*a + S(65)*b*x**S(3))/(S(324)*a**S(3)*x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(455)/(S(972)*a**S(4)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(455)*a + S(455)*b*x**S(3))/(S(243)*a**S(5)*x*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(455)*b**(S(1)/3)*(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(729)*a**(S(16)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - S(455)*b**(S(1)/3)*(a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(1458)*a**(S(16)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(455)*sqrt(S(3))*b**(S(1)/3)*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(729)*a**(S(16)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)), x), x, (a + b*x**S(3))/(S(12)*a*x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) + S(7)/(S(54)*a**S(2)*x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + (S(77)*a + S(77)*b*x**S(3))/(S(324)*a**S(3)*x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(154)/(S(243)*a**S(4)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - (S(385)*a + S(385)*b*x**S(3))/(S(243)*a**S(5)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - S(770)*b**(S(2)/3)*(a + b*x**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(729)*a**(S(17)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(385)*b**(S(2)/3)*(a + b*x**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(729)*a**(S(17)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(770)*sqrt(S(3))*b**(S(2)/3)*(a + b*x**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(729)*a**(S(17)/3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)), x), x, (a + b*x**S(3))/(S(12)*a*x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(5)/2)) + S(5)/(S(36)*a**S(2)*x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + (S(5)*a + S(5)*b*x**S(3))/(S(18)*a**S(3)*x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(S(3)/2)) + S(5)/(S(6)*a**S(4)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - S(5)*b*(a + b*x**S(3))*log(x)/(a**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) + S(5)*b*(a + b*x**S(3))*log(a + b*x**S(3))/(S(3)*a**S(6)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))) - S(5)*sqrt(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))/(S(3)*a**S(6)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, x**(m + S(1))*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(1), m/S(3) + S(2)*p + S(4)/3), (m/S(3) + S(4)/3,), -b*x**S(3)/a)/(a*(m + S(1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**m*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, x**(m + S(1))*(S(1) + b*x**S(3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((m/S(3) + S(1)/3, -S(2)*p), (m/S(3) + S(4)/3,), -b*x**S(3)/a)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, -a*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p/(S(3)*b**S(2)*(S(2)*p + S(1))) + (a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**(p + S(1))/(S(6)*b**S(2)*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, x**S(5)*(S(1) + b*x**S(3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(5)/3, -S(2)*p), (S(8)/3,), -b*x**S(3)/a)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, x**S(4)*(S(1) + b*x**S(3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(4)/3, -S(2)*p), (S(7)/3,), -b*x**S(3)/a)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, (a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p/(S(3)*b*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, x**S(2)*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(1), S(2)*p + S(5)/3), (S(5)/3,), -b*x**S(3)/a)/(S(2)*a), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, x**S(2)*(S(1) + b*x**S(3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(2)/3, -S(2)*p), (S(5)/3,), -b*x**S(3)/a)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, x*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(1), S(2)*p + S(4)/3), (S(4)/3,), -b*x**S(3)/a)/a, expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p, x), x, x*(S(1) + b*x**S(3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(1)/3, -S(2)*p), (S(4)/3,), -b*x**S(3)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p/x, x), x, -(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(1), S(2)*p + S(1)), (S(2)*p + S(2),), S(1) + b*x**S(3)/a)/(S(3)*a*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p/x**S(2), x), x, -(S(1) + b*x**S(3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(-1)/3, -S(2)*p), (S(2)/3,), -b*x**S(3)/a)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p/x**S(3), x), x, -(S(1) + b*x**S(3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(-2)/3, -S(2)*p), (S(1)/3,), -b*x**S(3)/a)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p/x**S(4), x), x, b*(a + b*x**S(3))*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(2), S(2)*p + S(1)), (S(2)*p + S(2),), S(1) + b*x**S(3)/a)/(S(3)*a**S(2)*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p/x**S(5), x), x, -(S(1) + b*x**S(3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**S(3) + b**S(2)*x**S(6))**p*hyper((S(-4)/3, -S(2)*p), (S(-1)/3,), -b*x**S(3)/a)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a + b*x**S(3) + c*x**S(6)), x), x, -b*log(a + b*x**S(3) + c*x**S(6))/(S(6)*c**S(2)) + x**S(3)/(S(3)*c) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a + b*x**S(3) + c*x**S(6)), x), x, b*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*c*sqrt(-S(4)*a*c + b**S(2))) + log(a + b*x**S(3) + c*x**S(6))/(S(6)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**S(3) + c*x**S(6)), x), x, -S(2)*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**S(3) + c*x**S(6))), x), x, b*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*a*sqrt(-S(4)*a*c + b**S(2))) + log(x)/a - log(a + b*x**S(3) + c*x**S(6))/(S(6)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a + b*x**S(3) + c*x**S(6))), x), x, -S(1)/(S(3)*a*x**S(3)) - b*log(x)/a**S(2) + b*log(a + b*x**S(3) + c*x**S(6))/(S(6)*a**S(2)) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a + b*x**S(3) + c*x**S(6)), x), x, x**S(2)/(S(2)*c) + S(2)**(S(1)/3)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(5)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(5)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*sqrt(S(3))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(5)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(5)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(5)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*sqrt(S(3))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(5)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a + b*x**S(3) + c*x**S(6)), x), x, x/c - S(2)**(S(2)/3)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a + b*x**S(3) + c*x**S(6)), x), x, S(2)**(S(1)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/3)*sqrt(S(3))*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/3)*sqrt(S(3))*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*x**S(3) + c*x**S(6)), x), x, -S(2)**(S(2)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*sqrt(S(3))*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(2)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(2)/3)*sqrt(S(3))*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**S(3) + c*x**S(6)), x), x, S(2)**(S(1)/3)*c**(S(1)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/3)*c**(S(1)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(6)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/3)*sqrt(S(3))*c**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/3)*c**(S(1)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/3)*c**(S(1)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(6)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/3)*sqrt(S(3))*c**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*x**S(3) + c*x**S(6)), x), x, -S(2)**(S(2)/3)*c**(S(2)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*c**(S(2)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(6)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*sqrt(S(3))*c**(S(2)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*c**(S(2)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(2)/3)*c**(S(2)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(6)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(2)/3)*sqrt(S(3))*c**(S(2)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**S(3) + c*x**S(6))), x), x, S(2)**(S(1)/3)*c**(S(1)/3)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*c**(S(1)/3)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*sqrt(S(3))*c**(S(1)/3)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*c**(S(1)/3)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*c**(S(1)/3)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*sqrt(S(3))*c**(S(1)/3)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(1)/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**S(3) + c*x**S(6))), x), x, -S(2)**(S(2)/3)*c**(S(2)/3)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*c**(S(2)/3)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*c**(S(2)/3)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*c**(S(2)/3)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*c**(S(2)/3)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*c**(S(2)/3)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(1)/(S(2)*a*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, x**S(6)/S(6) - S(4)*x**S(3)/S(3) - log(x**S(3) + S(1))/S(6) + S(9)*log(x**S(3) + S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, x**S(3)/S(3) + log(x**S(3) + S(1))/S(6) - S(3)*log(x**S(3) + S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, -log(x**S(3) + S(1))/S(6) + log(x**S(3) + S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, -atanh(x**S(3) + S(2))/S(3), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(2)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, log(x**S(3) + S(1))/S(6) - log(x**S(3) + S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(6) + S(4)*x**S(3) + S(3))), x), x, log(x)/S(3) - log(x**S(3) + S(1))/S(6) + log(x**S(3) + S(3))/S(18), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(x**S(6) + S(4)*x**S(3) + S(3))), x), x, -S(4)*log(x)/S(9) + log(x**S(3) + S(1))/S(6) - log(x**S(3) + S(3))/S(54) - S(1)/(S(9)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(x**S(6) + S(4)*x**S(3) + S(3))), x), x, S(13)*log(x)/S(27) - log(x**S(3) + S(1))/S(6) + log(x**S(3) + S(3))/S(162) + S(4)/(S(27)*x**S(3)) - S(1)/(S(18)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, x**S(5)/S(5) - S(2)*x**S(2) + log(x + S(1))/S(6) - S(3)*S(3)**(S(2)/3)*log(x + S(3)**(S(1)/3))/S(2) - log(x**S(2) - x + S(1))/S(12) + S(3)*S(3)**(S(2)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(4) - S(9)*S(3)**(S(1)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, x**S(4)/S(4) - S(4)*x - log(x + S(1))/S(6) + S(3)*S(3)**(S(1)/3)*log(x + S(3)**(S(1)/3))/S(2) + log(x**S(2) - x + S(1))/S(12) - S(3)*S(3)**(S(1)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(4) - S(3)*S(3)**(S(5)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, x**S(2)/S(2) - log(x + S(1))/S(6) + S(3)**(S(2)/3)*log(x + S(3)**(S(1)/3))/S(2) + log(x**S(2) - x + S(1))/S(12) - S(3)**(S(2)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(4) + S(3)*S(3)**(S(1)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(2) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, x + log(x + S(1))/S(6) - S(3)**(S(1)/3)*log(x + S(3)**(S(1)/3))/S(2) - log(x**S(2) - x + S(1))/S(12) + S(3)**(S(1)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(4) + S(3)**(S(5)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(2) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, log(x + S(1))/S(6) - S(3)**(S(2)/3)*log(x + S(3)**(S(1)/3))/S(6) - log(x**S(2) - x + S(1))/S(12) + S(3)**(S(2)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(12) - S(3)**(S(1)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, -log(x + S(1))/S(6) + S(3)**(S(1)/3)*log(x + S(3)**(S(1)/3))/S(6) + log(x**S(2) - x + S(1))/S(12) - S(3)**(S(1)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(12) - S(3)**(S(5)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, -log(x + S(1))/S(6) + S(3)**(S(2)/3)*log(x + S(3)**(S(1)/3))/S(18) + log(x**S(2) - x + S(1))/S(12) - S(3)**(S(2)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(36) + S(3)**(S(1)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6) + S(4)*x**S(3) + S(3)), x), x, log(x + S(1))/S(6) - S(3)**(S(1)/3)*log(x + S(3)**(S(1)/3))/S(18) - log(x**S(2) - x + S(1))/S(12) + S(3)**(S(1)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(36) + S(3)**(S(5)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(18) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(x**S(6) + S(4)*x**S(3) + S(3))), x), x, log(x + S(1))/S(6) - S(3)**(S(2)/3)*log(x + S(3)**(S(1)/3))/S(54) - log(x**S(2) - x + S(1))/S(12) + S(3)**(S(2)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(108) - S(3)**(S(1)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(18) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) - S(1)/(S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(x**S(6) + S(4)*x**S(3) + S(3))), x), x, -log(x + S(1))/S(6) + S(3)**(S(1)/3)*log(x + S(3)**(S(1)/3))/S(54) + log(x**S(2) - x + S(1))/S(12) - S(3)**(S(1)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(108) - S(3)**(S(5)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(54) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) - S(1)/(S(6)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(x**S(6) + S(4)*x**S(3) + S(3))), x), x, -log(x + S(1))/S(6) + S(3)**(S(2)/3)*log(x + S(3)**(S(1)/3))/S(162) + log(x**S(2) - x + S(1))/S(12) - S(3)**(S(2)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(324) + S(3)**(S(1)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(54) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + S(4)/(S(9)*x) - S(1)/(S(12)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(x**S(6) + S(4)*x**S(3) + S(3))), x), x, log(x + S(1))/S(6) - S(3)**(S(1)/3)*log(x + S(3)**(S(1)/3))/S(162) - log(x**S(2) - x + S(1))/S(12) + S(3)**(S(1)/3)*log(x**S(2) - S(3)**(S(1)/3)*x + S(3)**(S(2)/3))/S(324) + S(3)**(S(5)/6)*atan(S(3)**(S(1)/6)*(-S(2)*x + S(3)**(S(1)/3))/S(3))/S(162) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + S(2)/(S(9)*x**S(2)) - S(1)/(S(15)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(x**S(6) - x**S(3) + S(1)), x), x, x + S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(x**S(6) - x**S(3) + S(1)), x), x, log(x**S(6) - x**S(3) + S(1))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(6) - x**S(3) + S(1)), x), x, S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(6) - x**S(3) + S(1)), x), x, S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(6) - x**S(3) + S(1)), x), x, -S(2)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(6) - x**S(3) + S(1)), x), x, sqrt(S(3))*I*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(9)*(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3)) - sqrt(S(3))*I*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(9)*(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3)) - S(2)**(S(1)/3)*sqrt(S(3))*I*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*sqrt(S(3))*I*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + I*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3)) - I*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6) - x**S(3) + S(1)), x), x, -(S(-1))**(S(5)/18)*sqrt(S(3))*(S(3)*log(-x + (S(-1))**(S(1)/9)) + log(S(2)))/S(27) + (S(-1))**(S(13)/18)*sqrt(S(3))*log(-S(2)**(S(1)/3)*(x + (S(-1))**(S(8)/9)))/S(9) - (S(-1))**(S(13)/18)*sqrt(S(3))*log(-S(2)**(S(2)/3)*(x*(-x + (S(-1))**(S(8)/9)) + (S(-1))**(S(7)/9)))/S(18) + (S(-1))**(S(5)/18)*sqrt(S(3))*log(S(2)**(S(2)/3)*(x*(x + (S(-1))**(S(1)/9)) + (S(-1))**(S(2)/9)))/S(18) - (S(-1))**(S(13)/18)*atan(sqrt(S(3))*(S(2)*(S(-1))**(S(1)/9)*x + S(1))/S(3))/S(3) + (S(-1))**(S(5)/18)*atan(sqrt(S(3))*(-S(2)*(S(-1))**(S(8)/9)*x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/(x**S(6) - x**S(3) + S(1)), x), x, sqrt(S(3))*I*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(9)*(S(1)/2 - sqrt(S(3))*I/S(2))**(S(2)/3)) - sqrt(S(3))*I*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(9)*(S(1)/2 + sqrt(S(3))*I/S(2))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*I*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*I*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - I*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(S(1)/2 - sqrt(S(3))*I/S(2))**(S(2)/3)) + I*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(S(1)/2 + sqrt(S(3))*I/S(2))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(6) - x**S(3) + S(1))), x), x, log(x) - log(x**S(6) - x**S(3) + S(1))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(x**S(6) - x**S(3) + S(1))), x), x, -S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(x**S(6) - x**S(3) + S(1))), x), x, -S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(x**S(6) - x**S(3) + S(1))), x), x, log(x) - log(x**S(6) - x**S(3) + S(1))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9) - S(1)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(x**S(6) - x**S(3) + S(1))), x), x, -S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) - S(1)/x - S(1)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6) + x**S(3) + S(2)), x), x, -sqrt(S(7))*I*log(S(2)**(S(1)/3)*x + (S(1) - sqrt(S(7))*I)**(S(1)/3))/(S(21)*(S(1)/2 - sqrt(S(7))*I/S(2))**(S(2)/3)) + sqrt(S(7))*I*log(S(2)**(S(1)/3)*x + (S(1) + sqrt(S(7))*I)**(S(1)/3))/(S(21)*(S(1)/2 + sqrt(S(7))*I/S(2))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(7))*I*log(S(2)**(S(2)/3)*x**S(2) - x*(S(2) - S(2)*sqrt(S(7))*I)**(S(1)/3) + (S(1) - sqrt(S(7))*I)**(S(2)/3))/(S(42)*(S(1) - sqrt(S(7))*I)**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(7))*I*log(S(2)**(S(2)/3)*x**S(2) - x*(S(2) + S(2)*sqrt(S(7))*I)**(S(1)/3) + (S(1) + sqrt(S(7))*I)**(S(2)/3))/(S(42)*(S(1) + sqrt(S(7))*I)**(S(2)/3)) + sqrt(S(21))*I*atan(sqrt(S(3))*(-S(2)*x/(S(1)/2 - sqrt(S(7))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(21)*(S(1)/2 - sqrt(S(7))*I/S(2))**(S(2)/3)) - sqrt(S(21))*I*atan(sqrt(S(3))*(-S(2)*x/(S(1)/2 + sqrt(S(7))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(21)*(S(1)/2 + sqrt(S(7))*I/S(2))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(6) + x**S(3) + S(2)), x), x, S(2)*sqrt(S(7))*atan(sqrt(S(7))*(S(2)*x**S(3) + S(1))/S(7))/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(6) + x**S(3) + S(2)), x), x, S(2)**(S(2)/3)*(S(7) + sqrt(S(7))*I)*log(S(2)**(S(1)/3)*x + (S(1) - sqrt(S(7))*I)**(S(1)/3))/(S(42)*(S(1) - sqrt(S(7))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(7) - sqrt(S(7))*I)*log(S(2)**(S(1)/3)*x + (S(1) + sqrt(S(7))*I)**(S(1)/3))/(S(42)*(S(1) + sqrt(S(7))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(7) + sqrt(S(7))*I)*log(S(2)**(S(2)/3)*x**S(2) - x*(S(2) - S(2)*sqrt(S(7))*I)**(S(1)/3) + (S(1) - sqrt(S(7))*I)**(S(2)/3))/(S(84)*(S(1) - sqrt(S(7))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(7) - sqrt(S(7))*I)*log(S(2)**(S(2)/3)*x**S(2) - x*(S(2) + S(2)*sqrt(S(7))*I)**(S(1)/3) + (S(1) + sqrt(S(7))*I)**(S(2)/3))/(S(84)*(S(1) + sqrt(S(7))*I)**(S(2)/3)) - sqrt(S(21))*I*(S(1)/2 - sqrt(S(7))*I/S(2))**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*x/(S(1)/2 - sqrt(S(7))*I/S(2))**(S(1)/3) + S(1))/S(3))/S(21) + sqrt(S(21))*I*(S(1)/2 + sqrt(S(7))*I/S(2))**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*x/(S(1)/2 + sqrt(S(7))*I/S(2))**(S(1)/3) + S(1))/S(3))/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(14)*sqrt(a + b*x**S(3) + c*x**S(6)), x), x, -b*x**S(6)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(20)*c**S(2)) + x**S(9)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(18)*c) - (S(7)*b*(-S(28)*a*c + S(15)*b**S(2)) - S(6)*c*x**S(3)*(-S(20)*a*c + S(21)*b**S(2)))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(2880)*c**S(4)) + (b + S(2)*c*x**S(3))*sqrt(a + b*x**S(3) + c*x**S(6))*(S(16)*a**S(2)*c**S(2) - S(56)*a*b**S(2)*c + S(21)*b**S(4))/(S(1536)*c**S(5)) - (-S(4)*a*c + b**S(2))*(S(16)*a**S(2)*c**S(2) - S(56)*a*b**S(2)*c + S(21)*b**S(4))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(3072)*c**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)*sqrt(a + b*x**S(3) + c*x**S(6)), x), x, -b*(b + S(2)*c*x**S(3))*(-S(12)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(384)*c**S(4)) + b*(-S(12)*a*c + S(7)*b**S(2))*(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(768)*c**(S(9)/2)) + x**S(6)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(15)*c) + (a + b*x**S(3) + c*x**S(6))**(S(3)/2)*(-S(32)*a*c + S(35)*b**S(2) - S(42)*b*c*x**S(3))/(S(720)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*sqrt(a + b*x**S(3) + c*x**S(6)), x), x, -S(5)*b*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(72)*c**S(2)) + x**S(3)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(12)*c) + (b + S(2)*c*x**S(3))*(-S(4)*a*c + S(5)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(192)*c**S(3)) - (-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(5)*b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(384)*c**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(a + b*x**S(3) + c*x**S(6)), x), x, -b*(b + S(2)*c*x**S(3))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(24)*c**S(2)) + b*(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(48)*c**(S(5)/2)) + (a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(9)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a + b*x**S(3) + c*x**S(6)), x), x, (b + S(2)*c*x**S(3))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(12)*c) - (-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(24)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6))/x, x), x, -sqrt(a)*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/S(3) + b*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(6)*sqrt(c)) + sqrt(a + b*x**S(3) + c*x**S(6))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6))/x**S(4), x), x, sqrt(c)*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/S(3) - sqrt(a + b*x**S(3) + c*x**S(6))/(S(3)*x**S(3)) - b*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(6)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6))/x**S(7), x), x, -(S(2)*a + b*x**S(3))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(12)*a*x**S(6)) + (-S(4)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(24)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6))/x**S(10), x), x, -(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(9)*a*x**S(9)) + b*(S(2)*a + b*x**S(3))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(24)*a**S(2)*x**S(6)) - b*(-S(4)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(48)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6))/x**S(13), x), x, -(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(12)*a*x**S(12)) + S(5)*b*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(72)*a**S(2)*x**S(9)) - (S(2)*a + b*x**S(3))*(-S(4)*a*c + S(5)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(192)*a**S(3)*x**S(6)) + (-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(5)*b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(384)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6))/x**S(16), x), x, -(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(15)*a*x**S(15)) + S(7)*b*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(120)*a**S(2)*x**S(12)) - (-S(32)*a*c + S(35)*b**S(2))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(720)*a**S(3)*x**S(9)) + b*(S(2)*a + b*x**S(3))*(-S(12)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(384)*a**S(4)*x**S(6)) - b*(-S(12)*a*c + S(7)*b**S(2))*(-S(4)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(768)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(a + b*x**S(3) + c*x**S(6)), x), x, x**S(4)*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(4)/3, S(-1)/2, S(-1)/2, S(7)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*x**S(3) + c*x**S(6)), x), x, x**S(2)*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(2)/3, S(-1)/2, S(-1)/2, S(5)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6)), x), x, x*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(1)/3, S(-1)/2, S(-1)/2, S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6))/x**S(2), x), x, -sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(-1)/3, S(-1)/2, S(-1)/2, S(2)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(x*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(3) + c*x**S(6))/x**S(3), x), x, -sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(-2)/3, S(-1)/2, S(-1)/2, S(1)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*x**S(2)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, a*x**S(4)*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(4)/3, S(-3)/2, S(-3)/2, S(7)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, a*x**S(2)*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(2)/3, S(-3)/2, S(-3)/2, S(5)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, a*x*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(1)/3, S(-3)/2, S(-3)/2, S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(2), x), x, -a*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(-1)/3, S(-3)/2, S(-3)/2, S(2)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(x*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(3), x), x, -a*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(S(-2)/3, S(-3)/2, S(-3)/2, S(1)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*x**S(2)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, x**S(4)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(4)/3, S(1)/2, S(1)/2, S(7)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, x**S(2)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(2)/3, S(1)/2, S(1)/2, S(5)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, x*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/3, S(1)/2, S(1)/2, S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/sqrt(a + b*x**S(3) + c*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*x**S(3) + c*x**S(6))), x), x, -sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(-1)/3, S(1)/2, S(1)/2, S(2)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(x*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a + b*x**S(3) + c*x**S(6))), x), x, -sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(-2)/3, S(1)/2, S(1)/2, S(1)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*x**S(2)*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, x**S(4)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(4)/3, S(3)/2, S(3)/2, S(7)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, x**S(2)*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(2)/3, S(3)/2, S(3)/2, S(5)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(-3)/2), x), x, x*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/3, S(3)/2, S(3)/2, S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)), x), x, -sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(-1)/3, S(3)/2, S(3)/2, S(2)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*x*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)), x), x, -sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(-2)/3, S(3)/2, S(3)/2, S(1)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*x**S(2)*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, a*(d*x)**(m + S(1))*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(m/S(3) + S(1)/3, S(-3)/2, S(-3)/2, m/S(3) + S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*sqrt(a + b*x**S(3) + c*x**S(6)), x), x, (d*x)**(m + S(1))*sqrt(a + b*x**S(3) + c*x**S(6))*AppellF1(m/S(3) + S(1)/3, S(-1)/2, S(-1)/2, m/S(3) + S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, (d*x)**(m + S(1))*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(m/S(3) + S(1)/3, S(1)/2, S(1)/2, m/S(3) + S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, (d*x)**(m + S(1))*sqrt(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(m/S(3) + S(1)/3, S(3)/2, S(3)/2, m/S(3) + S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*d*(m + S(1))*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(3) + c*x**S(6))**p, x), x, (d*x)**(m + S(1))*(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(m/S(3) + S(1)/3, -p, -p, m/S(3) + S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(3) + c*x**S(6))**p, x), x, x**S(5)*(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(S(5)/3, -p, -p, S(8)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(3) + c*x**S(6))**p, x), x, x**S(4)*(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(S(4)/3, -p, -p, S(7)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(3) + c*x**S(6))**p, x), x, x**S(2)*(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(S(2)/3, -p, -p, S(5)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**p, x), x, x*(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(S(1)/3, -p, -p, S(4)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**p/x, x), x, S(2)**(S(2)*p + S(-1))*((b + S(2)*c*x**S(3) - sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(3)))**(-p)*((b + S(2)*c*x**S(3) + sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(3)))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(-S(2)*p, -p, -p, -S(2)*p + S(1), -(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(3)), -(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(3)))/(S(3)*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**p/x**S(2), x), x, -(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(S(-1)/3, -p, -p, S(2)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**p/x**S(3), x), x, -(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(S(-2)/3, -p, -p, S(1)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**p/x**S(4), x), x, -S(4)**p*((b + S(2)*c*x**S(3) - sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(3)))**(-p)*((b + S(2)*c*x**S(3) + sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(3)))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(-S(2)*p + S(1), -p, -p, -S(2)*p + S(2), -(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(3)), -(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(3)))/(x**S(3)*(-S(6)*p + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**p/x**S(5), x), x, -(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(S(-4)/3, -p, -p, S(-1)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**p/x**S(6), x), x, -(S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(S(-5)/3, -p, -p, S(-2)/3, -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**p/x**S(7), x), x, -S(2)**(S(2)*p + S(-1))*((b + S(2)*c*x**S(3) - sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(3)))**(-p)*((b + S(2)*c*x**S(3) + sqrt(-S(4)*a*c + b**S(2)))/(c*x**S(3)))**(-p)*(a + b*x**S(3) + c*x**S(6))**p*AppellF1(-S(2)*p + S(2), -p, -p, -S(2)*p + S(3), -(b - sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(3)), -(b + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*x**S(3)))/(x**S(6)*(-S(3)*p + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(14)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, -S(11)*b*x**S(6)*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(336)*c**S(2)) + x**S(9)*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(24)*c) - (S(3)*b*(-S(124)*a*c + S(77)*b**S(2)) - S(10)*c*x**S(3)*(-S(28)*a*c + S(33)*b**S(2)))*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(13440)*c**S(4)) + (b + S(2)*c*x**S(3))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)*(S(16)*a**S(2)*c**S(2) - S(72)*a*b**S(2)*c + S(33)*b**S(4))/(S(6144)*c**S(5)) - (b + S(2)*c*x**S(3))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))*(S(16)*a**S(2)*c**S(2) - S(72)*a*b**S(2)*c + S(33)*b**S(4))/(S(16384)*c**S(6)) + (-S(4)*a*c + b**S(2))**S(2)*(S(16)*a**S(2)*c**S(2) - S(72)*a*b**S(2)*c + S(33)*b**S(4))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(32768)*c**(S(13)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, -b*(b + S(2)*c*x**S(3))*(-S(4)*a*c + S(3)*b**S(2))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(384)*c**S(4)) + b*(b + S(2)*c*x**S(3))*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(1024)*c**S(5)) - b*(-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(3)*b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(2048)*c**(S(11)/2)) + x**S(6)*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(21)*c) + (a + b*x**S(3) + c*x**S(6))**(S(5)/2)*(-S(16)*a*c + S(21)*b**S(2) - S(30)*b*c*x**S(3))/(S(840)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, -S(7)*b*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(180)*c**S(2)) + x**S(3)*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(18)*c) + (b + S(2)*c*x**S(3))*(-S(4)*a*c + S(7)*b**S(2))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(576)*c**S(3)) - (b + S(2)*c*x**S(3))*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(1536)*c**S(4)) + (-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(7)*b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(3072)*c**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, -b*(b + S(2)*c*x**S(3))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(48)*c**S(2)) + b*(b + S(2)*c*x**S(3))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(128)*c**S(3)) - b*(-S(4)*a*c + b**S(2))**S(2)*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(256)*c**(S(7)/2)) + (a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(15)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, (b + S(2)*c*x**S(3))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(24)*c) - (b + S(2)*c*x**S(3))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(64)*c**S(2)) + (-S(4)*a*c + b**S(2))**S(2)*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(128)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x, x), x, -a**(S(3)/2)*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/S(3) - b*(-S(12)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(48)*c**(S(3)/2)) + (a + b*x**S(3) + c*x**S(6))**(S(3)/2)/S(9) + sqrt(a + b*x**S(3) + c*x**S(6))*(S(8)*a*c + b**S(2) + S(2)*b*c*x**S(3))/(S(24)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(4), x), x, -sqrt(a)*b*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/S(2) + (S(3)*b/S(4) + c*x**S(3)/S(2))*sqrt(a + b*x**S(3) + c*x**S(6)) - (a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(3)*x**S(3)) + (S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(8)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(7), x), x, b*sqrt(c)*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/S(2) - (b - S(2)*c*x**S(3))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(4)*x**S(3)) - (a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(6)*x**S(6)) - (S(4)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(8)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(10), x), x, c**(S(3)/2)*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/S(3) - (a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(9)*x**S(9)) - (S(2)*a*b + x**S(3)*(S(8)*a*c + b**S(2)))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(24)*a*x**S(6)) + b*(-S(12)*a*c + b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(48)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(13), x), x, -(S(2)*a + b*x**S(3))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(24)*a*x**S(12)) + (S(2)*a + b*x**S(3))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(64)*a**S(2)*x**S(6)) - (-S(4)*a*c + b**S(2))**S(2)*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(128)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(16), x), x, -(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(15)*a*x**S(15)) + b*(S(2)*a + b*x**S(3))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(48)*a**S(2)*x**S(12)) - b*(S(2)*a + b*x**S(3))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(128)*a**S(3)*x**S(6)) + b*(-S(4)*a*c + b**S(2))**S(2)*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(256)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(19), x), x, -(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(18)*a*x**S(18)) + S(7)*b*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(180)*a**S(2)*x**S(15)) - (S(2)*a + b*x**S(3))*(-S(4)*a*c + S(7)*b**S(2))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(576)*a**S(3)*x**S(12)) + (S(2)*a + b*x**S(3))*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(1536)*a**S(4)*x**S(6)) - (-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(7)*b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(3072)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))**(S(3)/2)/x**S(22), x), x, -(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(21)*a*x**S(21)) + b*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(28)*a**S(2)*x**S(18)) - (-S(16)*a*c + S(21)*b**S(2))*(a + b*x**S(3) + c*x**S(6))**(S(5)/2)/(S(840)*a**S(3)*x**S(15)) + b*(S(2)*a + b*x**S(3))*(-S(4)*a*c + S(3)*b**S(2))*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)/(S(384)*a**S(4)*x**S(12)) - b*(S(2)*a + b*x**S(3))*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(1024)*a**S(5)*x**S(6)) + b*(-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(3)*b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(2048)*a**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, x**(m + S(1))*hyper((S(2), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), -x**S(4))/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(14)/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, -S(7)*b*x**S(6)*sqrt(a + b*x**S(3) + c*x**S(6))/(S(72)*c**S(2)) + x**S(9)*sqrt(a + b*x**S(3) + c*x**S(6))/(S(12)*c) - (S(5)*b*(-S(44)*a*c + S(21)*b**S(2)) - S(2)*c*x**S(3)*(-S(36)*a*c + S(35)*b**S(2)))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(576)*c**S(4)) + (S(48)*a**S(2)*c**S(2) - S(120)*a*b**S(2)*c + S(35)*b**S(4))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(384)*c**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, -b*(-S(12)*a*c + S(5)*b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(48)*c**(S(7)/2)) + x**S(6)*sqrt(a + b*x**S(3) + c*x**S(6))/(S(9)*c) + sqrt(a + b*x**S(3) + c*x**S(6))*(-S(16)*a*c + S(15)*b**S(2) - S(10)*b*c*x**S(3))/(S(72)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, -b*sqrt(a + b*x**S(3) + c*x**S(6))/(S(4)*c**S(2)) + x**S(3)*sqrt(a + b*x**S(3) + c*x**S(6))/(S(6)*c) + (-S(4)*a*c + S(3)*b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(24)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, -b*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(6)*c**(S(3)/2)) + sqrt(a + b*x**S(3) + c*x**S(6))/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*x**S(3) + c*x**S(6)), x), x, atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(3)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*x**S(3) + c*x**S(6))), x), x, -atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(3)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a + b*x**S(3) + c*x**S(6))), x), x, -sqrt(a + b*x**S(3) + c*x**S(6))/(S(3)*a*x**S(3)) + b*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(6)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*sqrt(a + b*x**S(3) + c*x**S(6))), x), x, -sqrt(a + b*x**S(3) + c*x**S(6))/(S(6)*a*x**S(6)) + b*sqrt(a + b*x**S(3) + c*x**S(6))/(S(4)*a**S(2)*x**S(3)) - (-S(4)*a*c + S(3)*b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(24)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(10)*sqrt(a + b*x**S(3) + c*x**S(6))), x), x, -sqrt(a + b*x**S(3) + c*x**S(6))/(S(9)*a*x**S(9)) + S(5)*b*sqrt(a + b*x**S(3) + c*x**S(6))/(S(36)*a**S(2)*x**S(6)) - (-S(16)*a*c + S(15)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(72)*a**S(3)*x**S(3)) + b*(-S(12)*a*c + S(5)*b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(48)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(13)*sqrt(a + b*x**S(3) + c*x**S(6))), x), x, -sqrt(a + b*x**S(3) + c*x**S(6))/(S(12)*a*x**S(12)) + S(7)*b*sqrt(a + b*x**S(3) + c*x**S(6))/(S(72)*a**S(2)*x**S(9)) - (-S(36)*a*c + S(35)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(288)*a**S(3)*x**S(6)) + S(5)*b*(-S(44)*a*c + S(21)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(576)*a**S(4)*x**S(3)) - (S(48)*a**S(2)*c**S(2) - S(120)*a*b**S(2)*c + S(35)*b**S(4))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(384)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(14)/(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, -S(2)*b*x**S(6)*sqrt(a + b*x**S(3) + c*x**S(6))/(S(3)*c*(-S(4)*a*c + b**S(2))) + S(2)*x**S(9)*(S(2)*a + b*x**S(3))/((-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))) - (b*(-S(52)*a*c + S(15)*b**S(2)) - S(2)*c*x**S(3)*(-S(12)*a*c + S(5)*b**S(2)))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(12)*c**S(3)*(-S(4)*a*c + b**S(2))) + (-S(4)*a*c + S(5)*b**S(2))*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(8)*c**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, -b*atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(2)*c**(S(5)/2)) + S(2)*x**S(6)*(S(2)*a + b*x**S(3))/((-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))) + sqrt(a + b*x**S(3) + c*x**S(6))*(-S(8)*a*c + S(3)*b**S(2) - S(2)*b*c*x**S(3))/(S(3)*c**S(2)*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, -S(2)*b*sqrt(a + b*x**S(3) + c*x**S(6))/(S(3)*c*(-S(4)*a*c + b**S(2))) + S(2)*x**S(3)*(S(2)*a + b*x**S(3))/((-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))) + atanh((b + S(2)*c*x**S(3))/(S(2)*sqrt(c)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(3)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, (S(4)*a + S(2)*b*x**S(3))/((-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**S(3) + c*x**S(6))**(S(3)/2), x), x, -(S(2)*b + S(4)*c*x**S(3))/((-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x**S(3))/(S(3)*a*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))) - atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(3)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x**S(3))/(S(3)*a*x**S(3)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))) - (-S(8)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(3)*a**S(2)*x**S(3)*(-S(4)*a*c + b**S(2))) + b*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(2)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x**S(3))/(S(3)*a*x**S(6)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))) - (-S(12)*a*c + S(5)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(6)*a**S(2)*x**S(6)*(-S(4)*a*c + b**S(2))) + b*(-S(52)*a*c + S(15)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(12)*a**S(3)*x**S(3)*(-S(4)*a*c + b**S(2))) - (-S(4)*a*c + S(5)*b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(8)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(10)*(a + b*x**S(3) + c*x**S(6))**(S(3)/2)), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x**S(3))/(S(3)*a*x**S(9)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))) - (-S(16)*a*c + S(7)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(9)*a**S(2)*x**S(9)*(-S(4)*a*c + b**S(2))) + b*(-S(116)*a*c + S(35)*b**S(2))*sqrt(a + b*x**S(3) + c*x**S(6))/(S(36)*a**S(3)*x**S(6)*(-S(4)*a*c + b**S(2))) - sqrt(a + b*x**S(3) + c*x**S(6))*(S(256)*a**S(2)*c**S(2) - S(460)*a*b**S(2)*c + S(105)*b**S(4))/(S(72)*a**S(4)*x**S(3)*(-S(4)*a*c + b**S(2))) + S(5)*b*(-S(12)*a*c + S(7)*b**S(2))*atanh((S(2)*a + b*x**S(3))/(S(2)*sqrt(a)*sqrt(a + b*x**S(3) + c*x**S(6))))/(S(48)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(3) + c*x**S(6))**S(2), x), x, a**S(2)*(d*x)**(m + S(1))/(d*(m + S(1))) + S(2)*a*b*(d*x)**(m + S(4))/(d**S(4)*(m + S(4))) + S(2)*b*c*(d*x)**(m + S(10))/(d**S(10)*(m + S(10))) + c**S(2)*(d*x)**(m + S(13))/(d**S(13)*(m + S(13))) + (d*x)**(m + S(7))*(S(2)*a*c + b**S(2))/(d**S(7)*(m + S(7))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**S(3) + c*x**S(6)), x), x, a*(d*x)**(m + S(1))/(d*(m + S(1))) + b*(d*x)**(m + S(4))/(d**S(4)*(m + S(4))) + c*(d*x)**(m + S(7))/(d**S(7)*(m + S(7))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**S(3) + c*x**S(6)), x), x, -S(2)*c*(d*x)**(m + S(1))*hyper((S(1), m/S(3) + S(1)/3), (m/S(3) + S(4)/3,), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*c*(d*x)**(m + S(1))*hyper((S(1), m/S(3) + S(1)/3), (m/S(3) + S(4)/3,), -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))))/(d*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**S(3) + c*x**S(6))**S(2), x), x, -c*(d*x)**(m + S(1))*(-S(4)*a*c*(-m + S(5)) + b**S(2)*(-m + S(2)) - b*(-m + S(2))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), m/S(3) + S(1)/3), (m/S(3) + S(4)/3,), -S(2)*c*x**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*d*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + c*(d*x)**(m + S(1))*(-S(4)*a*c*(-m + S(5)) + b**S(2)*(-m + S(2)) + b*(-m + S(2))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), m/S(3) + S(1)/3), (m/S(3) + S(4)/3,), -S(2)*c*x**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*d*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (d*x)**(m + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**S(3))/(S(3)*a*d*(-S(4)*a*c + b**S(2))*(a + b*x**S(3) + c*x**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a + b*x**S(3) + c*x**S(6))**p, x), x, S(2)**p*b*(-(b + S(2)*c*x**S(3) - sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))**(-p + S(-1))*(a + b*x**S(3) + c*x**S(6))**(p + S(1))*hyper((-p, p + S(1)), (p + S(2),), (b + S(2)*c*x**S(3) + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*sqrt(-S(4)*a*c + b**S(2))))/(S(3)*c*(p + S(1))*sqrt(-S(4)*a*c + b**S(2))) + (a + b*x**S(3) + c*x**S(6))**(p + S(1))/(S(6)*c*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(3) + c*x**S(6))**p, x), x, -S(2)**(p + S(1))*(-(b + S(2)*c*x**S(3) - sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))**(-p + S(-1))*(a + b*x**S(3) + c*x**S(6))**(p + S(1))*hyper((-p, p + S(1)), (p + S(2),), (b + S(2)*c*x**S(3) + sqrt(-S(4)*a*c + b**S(2)))/(S(2)*sqrt(-S(4)*a*c + b**S(2))))/(S(3)*(p + S(1))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, -x**S(6)/(S(4)*x**S(4) + S(4)) + S(3)*x**S(2)/S(4) - S(3)*atan(x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, log(x**S(4) + S(1))/S(4) + S(1)/(S(4)*x**S(4) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, -x**S(2)/(S(4)*x**S(4) + S(4)) + atan(x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, -S(1)/(S(4)*x**S(4) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, x**S(2)/(S(4)*x**S(4) + S(4)) + atan(x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(8) + S(2)*x**S(4) + S(1))), x), x, log(x) - log(x**S(4) + S(1))/S(4) + S(1)/(S(4)*x**S(4) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(x**S(8) + S(2)*x**S(4) + S(1))), x), x, -S(3)*atan(x**S(2))/S(4) - S(3)/(S(4)*x**S(2)) + S(1)/(S(4)*x**S(2)*(x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(x**S(8) + S(2)*x**S(4) + S(1))), x), x, -S(2)*log(x) + log(x**S(4) + S(1))/S(2) - S(1)/(S(4)*x**S(4) + S(4)) - S(1)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(x**S(8) + S(2)*x**S(4) + S(1))), x), x, S(5)*atan(x**S(2))/S(4) + S(5)/(S(4)*x**S(2)) - S(5)/(S(12)*x**S(6)) + S(1)/(S(4)*x**S(6)*(x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, -x**S(5)/(S(4)*x**S(4) + S(4)) + S(5)*x/S(4) + S(5)*sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) - S(5)*sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) - S(5)*sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) - S(5)*sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, -x**S(3)/(S(4)*x**S(4) + S(4)) + S(3)*sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) - S(3)*sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) + S(3)*sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) + S(3)*sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, -x/(S(4)*x**S(4) + S(4)) - sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) + sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) + sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) + sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, x**S(3)/(S(4)*x**S(4) + S(4)) + sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) - sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) + sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) + sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8) + S(2)*x**S(4) + S(1)), x), x, x/(S(4)*x**S(4) + S(4)) - S(3)*sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) + S(3)*sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) + S(3)*sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) + S(3)*sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(x**S(8) + S(2)*x**S(4) + S(1))), x), x, -S(5)*sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) + S(5)*sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) - S(5)*sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) - S(5)*sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16) - S(5)/(S(4)*x) + S(1)/(S(4)*x*(x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(x**S(8) + S(2)*x**S(4) + S(1))), x), x, S(7)*sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) - S(7)*sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) - S(7)*sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) - S(7)*sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16) - S(7)/(S(12)*x**S(3)) + S(1)/(S(4)*x**S(3)*(x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(x**S(8) + S(2)*x**S(4) + S(1))), x), x, S(9)*sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) - S(9)*sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) + S(9)*sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) + S(9)*sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16) + S(9)/(S(4)*x) - S(9)/(S(20)*x**S(5)) + S(1)/(S(4)*x**S(5)*(x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8)*(x**S(8) + S(2)*x**S(4) + S(1))), x), x, -S(11)*sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(32) + S(11)*sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(32) + S(11)*sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(16) + S(11)*sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(16) + S(11)/(S(12)*x**S(3)) - S(11)/(S(28)*x**S(7)) + S(1)/(S(4)*x**S(7)*(x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x**(m + S(1))*hyper((S(2), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), x**S(4))/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x**S(6)/(-S(4)*x**S(4) + S(4)) + S(3)*x**S(2)/S(4) - S(3)*atanh(x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, log(-x**S(4) + S(1))/S(4) + S(1)/(-S(4)*x**S(4) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x**S(2)/(-S(4)*x**S(4) + S(4)) - atanh(x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, S(1)/(-S(4)*x**S(4) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x**S(2)/(-S(4)*x**S(4) + S(4)) + atanh(x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(8) - S(2)*x**S(4) + S(1))), x), x, log(x) - log(-x**S(4) + S(1))/S(4) + S(1)/(-S(4)*x**S(4) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(x**S(8) - S(2)*x**S(4) + S(1))), x), x, S(3)*atanh(x**S(2))/S(4) - S(3)/(S(4)*x**S(2)) + S(1)/(S(4)*x**S(2)*(-x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(x**S(8) - S(2)*x**S(4) + S(1))), x), x, S(2)*log(x) - log(-x**S(4) + S(1))/S(2) + S(1)/(-S(4)*x**S(4) + S(4)) - S(1)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(x**S(8) - S(2)*x**S(4) + S(1))), x), x, S(5)*atanh(x**S(2))/S(4) - S(5)/(S(4)*x**S(2)) - S(5)/(S(12)*x**S(6)) + S(1)/(S(4)*x**S(6)*(-x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x**S(5)/(-S(4)*x**S(4) + S(4)) + S(5)*x/S(4) - S(5)*atan(x)/S(8) - S(5)*atanh(x)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x**S(3)/(-S(4)*x**S(4) + S(4)) + S(3)*atan(x)/S(8) - S(3)*atanh(x)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x/(-S(4)*x**S(4) + S(4)) - atan(x)/S(8) - atanh(x)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x**S(3)/(-S(4)*x**S(4) + S(4)) - atan(x)/S(8) + atanh(x)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8) - S(2)*x**S(4) + S(1)), x), x, x/(-S(4)*x**S(4) + S(4)) + S(3)*atan(x)/S(8) + S(3)*atanh(x)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(x**S(8) - S(2)*x**S(4) + S(1))), x), x, -S(5)*atan(x)/S(8) + S(5)*atanh(x)/S(8) - S(5)/(S(4)*x) + S(1)/(S(4)*x*(-x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(x**S(8) - S(2)*x**S(4) + S(1))), x), x, S(7)*atan(x)/S(8) + S(7)*atanh(x)/S(8) - S(7)/(S(12)*x**S(3)) + S(1)/(S(4)*x**S(3)*(-x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(x**S(8) - S(2)*x**S(4) + S(1))), x), x, -S(9)*atan(x)/S(8) + S(9)*atanh(x)/S(8) - S(9)/(S(4)*x) - S(9)/(S(20)*x**S(5)) + S(1)/(S(4)*x**S(5)*(-x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8)*(x**S(8) - S(2)*x**S(4) + S(1))), x), x, S(11)*atan(x)/S(8) + S(11)*atanh(x)/S(8) - S(11)/(S(12)*x**S(3)) - S(11)/(S(28)*x**S(7)) + S(1)/(S(4)*x**S(7)*(-x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(a + b*x**S(4) + c*x**S(8)), x), x, -S(2)*c*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), -S(2)*c*x**S(4)/(b + sqrt(-S(4)*a*c + b**S(2))))/((b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*c*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), -S(2)*c*x**S(4)/(b - sqrt(-S(4)*a*c + b**S(2))))/((b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(a + b*x**S(4) + c*x**S(8)), x), x, -b*log(a + b*x**S(4) + c*x**S(8))/(S(8)*c**S(2)) + x**S(4)/(S(4)*c) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(4))/sqrt(-S(4)*a*c + b**S(2)))/(S(4)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(a + b*x**S(4) + c*x**S(8)), x), x, x**S(2)/(S(2)*c) - sqrt(S(2))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a + b*x**S(4) + c*x**S(8)), x), x, b*atanh((b + S(2)*c*x**S(4))/sqrt(-S(4)*a*c + b**S(2)))/(S(4)*c*sqrt(-S(4)*a*c + b**S(2))) + log(a + b*x**S(4) + c*x**S(8))/(S(8)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a + b*x**S(4) + c*x**S(8)), x), x, -sqrt(S(2))*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*x**S(4) + c*x**S(8)), x), x, -atanh((b + S(2)*c*x**S(4))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**S(4) + c*x**S(8)), x), x, -sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**S(4) + c*x**S(8))), x), x, b*atanh((b + S(2)*c*x**S(4))/sqrt(-S(4)*a*c + b**S(2)))/(S(4)*a*sqrt(-S(4)*a*c + b**S(2))) + log(x)/a - log(a + b*x**S(4) + c*x**S(8))/(S(8)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**S(4) + c*x**S(8))), x), x, -sqrt(S(2))*sqrt(c)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - S(1)/(S(2)*a*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a + b*x**S(4) + c*x**S(8))), x), x, -S(1)/(S(4)*a*x**S(4)) - b*log(x)/a**S(2) + b*log(a + b*x**S(4) + c*x**S(8))/(S(8)*a**S(2)) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(4))/sqrt(-S(4)*a*c + b**S(2)))/(S(4)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(a + b*x**S(4) + c*x**S(8)), x), x, x**S(3)/(S(3)*c) - S(2)**(S(1)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(7)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(7)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(7)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(7)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a + b*x**S(4) + c*x**S(8)), x), x, x/c + S(2)**(S(3)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a + b*x**S(4) + c*x**S(8)), x), x, -S(2)**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a + b*x**S(4) + c*x**S(8)), x), x, S(2)**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**S(4) + c*x**S(8)), x), x, S(2)**(S(1)/4)*c**(S(1)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*c**(S(1)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(1)/4)*c**(S(1)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(1)/4)*c**(S(1)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*x**S(4) + c*x**S(8)), x), x, -S(2)**(S(3)/4)*c**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(3)/4)*c**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(2)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**S(4) + c*x**S(8))), x), x, -S(2)**(S(1)/4)*c**(S(1)/4)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*c**(S(1)/4)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*c**(S(1)/4)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*c**(S(1)/4)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(1)/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a + b*x**S(4) + c*x**S(8))), x), x, S(2)**(S(3)/4)*c**(S(3)/4)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(1)/(S(3)*a*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(x**S(8) + x**S(4) + S(1)), x), x, S(2)*sqrt(S(3))*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), -S(2)*x**S(4)/(S(1) - sqrt(S(3))*I))/(S(3)*(sqrt(S(3)) + I)*(m + S(1))) - S(2)*sqrt(S(3))*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), -S(2)*x**S(4)/(S(1) + sqrt(S(3))*I))/(S(3)*(-sqrt(S(3)) + I)*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(x**S(8) + x**S(4) + S(1)), x), x, x**S(4)/S(4) - log(x**S(8) + x**S(4) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(4) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(x**S(8) + x**S(4) + S(1)), x), x, x**S(2)/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(2) + S(1))/S(3))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(x**S(8) + x**S(4) + S(1)), x), x, log(x**S(8) + x**S(4) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(4) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(x**S(8) + x**S(4) + S(1)), x), x, log(x**S(4) - x**S(2) + S(1))/S(8) - log(x**S(4) + x**S(2) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(2) + S(1))/S(3))/S(12) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(8) + x**S(4) + S(1)), x), x, sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(4) + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(8) + x**S(4) + S(1)), x), x, -log(x**S(4) - x**S(2) + S(1))/S(8) + log(x**S(4) + x**S(2) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(2) + S(1))/S(3))/S(12) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(8) + x**S(4) + S(1))), x), x, log(x) - log(x**S(8) + x**S(4) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(4) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(x**S(8) + x**S(4) + S(1))), x), x, sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(2) + S(1))/S(3))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(6) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(x**S(8) + x**S(4) + S(1))), x), x, -log(x) + log(x**S(8) + x**S(4) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(4) + S(1))/S(3))/S(12) - S(1)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(x**S(8) + x**S(4) + S(1))), x), x, log(x**S(4) - x**S(2) + S(1))/S(8) - log(x**S(4) + x**S(2) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(2) + S(1))/S(3))/S(12) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(12) + S(1)/(S(2)*x**S(2)) - S(1)/(S(6)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(x**S(8) + x**S(4) + S(1)), x), x, x + log(x**S(2) - x + S(1))/S(8) - log(x**S(2) + x + S(1))/S(8) + sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(24) - sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(12) - atan(S(2)*x - sqrt(S(3)))/S(4) - atan(S(2)*x + sqrt(S(3)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(x**S(8) + x**S(4) + S(1)), x), x, sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(12) - sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(8) + x**S(4) + S(1)), x), x, -log(x**S(2) - x + S(1))/S(8) + log(x**S(2) + x + S(1))/S(8) + sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(24) - sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(12) + atan(S(2)*x - sqrt(S(3)))/S(4) + atan(S(2)*x + sqrt(S(3)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(8) + x**S(4) + S(1)), x), x, log(x**S(2) - x + S(1))/S(8) - log(x**S(2) + x + S(1))/S(8) - sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(12) + atan(S(2)*x - sqrt(S(3)))/S(4) + atan(S(2)*x + sqrt(S(3)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8) + x**S(4) + S(1)), x), x, -sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(12) + sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(x**S(8) + x**S(4) + S(1))), x), x, -log(x**S(2) - x + S(1))/S(8) + log(x**S(2) + x + S(1))/S(8) - sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(12) - atan(S(2)*x - sqrt(S(3)))/S(4) - atan(S(2)*x + sqrt(S(3)))/S(4) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(x**S(8) + x**S(4) + S(1))), x), x, log(x**S(2) - x + S(1))/S(8) - log(x**S(2) + x + S(1))/S(8) + sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(24) - sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(12) - atan(S(2)*x - sqrt(S(3)))/S(4) - atan(S(2)*x + sqrt(S(3)))/S(4) - S(1)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(x**S(8) + x**S(4) + S(1))), x), x, sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(12) - sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6) + S(1)/x - S(1)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8)*(x**S(8) + x**S(4) + S(1))), x), x, -log(x**S(2) - x + S(1))/S(8) + log(x**S(2) + x + S(1))/S(8) + sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(24) - sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(12) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(12) + atan(S(2)*x - sqrt(S(3)))/S(4) + atan(S(2)*x + sqrt(S(3)))/S(4) + S(1)/(S(3)*x**S(3)) - S(1)/(S(7)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(x**S(8) - x**S(4) + S(1)), x), x, S(2)*sqrt(S(3))*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), S(2)*x**S(4)/(S(1) - sqrt(S(3))*I))/(S(3)*(sqrt(S(3)) + I)*(m + S(1))) - S(2)*sqrt(S(3))*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), S(2)*x**S(4)/(S(1) + sqrt(S(3))*I))/(S(3)*(-sqrt(S(3)) + I)*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(x**S(8) - x**S(4) + S(1)), x), x, x**S(4)/S(4) + log(x**S(8) - x**S(4) + S(1))/S(8) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(4) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(x**S(8) - x**S(4) + S(1)), x), x, x**S(2)/S(2) + sqrt(S(3))*log(x**S(4) - sqrt(S(3))*x**S(2) + S(1))/S(12) - sqrt(S(3))*log(x**S(4) + sqrt(S(3))*x**S(2) + S(1))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(x**S(8) - x**S(4) + S(1)), x), x, log(x**S(8) - x**S(4) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(4) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(x**S(8) - x**S(4) + S(1)), x), x, sqrt(S(3))*log(x**S(4) - sqrt(S(3))*x**S(2) + S(1))/S(24) - sqrt(S(3))*log(x**S(4) + sqrt(S(3))*x**S(2) + S(1))/S(24) + atan(S(2)*x**S(2) - sqrt(S(3)))/S(4) + atan(S(2)*x**S(2) + sqrt(S(3)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(8) - x**S(4) + S(1)), x), x, -sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(4) + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(8) - x**S(4) + S(1)), x), x, -sqrt(S(3))*log(x**S(4) - sqrt(S(3))*x**S(2) + S(1))/S(24) + sqrt(S(3))*log(x**S(4) + sqrt(S(3))*x**S(2) + S(1))/S(24) + atan(S(2)*x**S(2) - sqrt(S(3)))/S(4) + atan(S(2)*x**S(2) + sqrt(S(3)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(8) - x**S(4) + S(1))), x), x, log(x) - log(x**S(8) - x**S(4) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(4) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(x**S(8) - x**S(4) + S(1))), x), x, -sqrt(S(3))*log(x**S(4) - sqrt(S(3))*x**S(2) + S(1))/S(12) + sqrt(S(3))*log(x**S(4) + sqrt(S(3))*x**S(2) + S(1))/S(12) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(x**S(8) - x**S(4) + S(1))), x), x, log(x) - log(x**S(8) - x**S(4) + S(1))/S(8) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(4) + S(1))/S(3))/S(12) - S(1)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(x**S(8) - x**S(4) + S(1))), x), x, -sqrt(S(3))*log(x**S(4) - sqrt(S(3))*x**S(2) + S(1))/S(24) + sqrt(S(3))*log(x**S(4) + sqrt(S(3))*x**S(2) + S(1))/S(24) - atan(S(2)*x**S(2) - sqrt(S(3)))/S(4) - atan(S(2)*x**S(2) + sqrt(S(3)))/S(4) - S(1)/(S(2)*x**S(2)) - S(1)/(S(6)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(x**S(8) - x**S(4) + S(1)), x), x, x - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) - atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) + atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) + atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))) - atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(x**S(8) - x**S(4) + S(1)), x), x, sqrt(S(6))*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) + sqrt(S(6))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) - sqrt(S(6))*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12) + sqrt(S(6))*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(8) - x**S(4) + S(1)), x), x, -log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(-S(3)*sqrt(S(3)) + S(6))) + log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(-S(3)*sqrt(S(3)) + S(6))) + log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(S(3)*sqrt(S(3)) + S(6))) - log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(S(3)*sqrt(S(3)) + S(6))) - atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))) + atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))) + atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) - atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(8) - x**S(4) + S(1)), x), x, log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(-S(3)*sqrt(S(3)) + S(6))) - log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(-S(3)*sqrt(S(3)) + S(6))) - log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(S(3)*sqrt(S(3)) + S(6))) + log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(S(3)*sqrt(S(3)) + S(6))) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) + sqrt(-sqrt(S(3))/S(3) + S(2)/3)*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8) - x**S(4) + S(1)), x), x, -sqrt(S(6))*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) + sqrt(S(6))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) - sqrt(S(6))*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12) + sqrt(S(6))*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(x**S(8) - x**S(4) + S(1))), x), x, sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) - atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) + atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) + atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))) - atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(x**S(8) - x**S(4) + S(1))), x), x, sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(-sqrt(S(3))/S(3) + S(2)/3)*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4) - S(1)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(x**S(8) - x**S(4) + S(1))), x), x, -sqrt(S(6))*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) - sqrt(S(6))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) + sqrt(S(6))*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12) - sqrt(S(6))*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12) - S(1)/x - S(1)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8)*(x**S(8) - x**S(4) + S(1))), x), x, sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4) + sqrt(-sqrt(S(3))/S(3) + S(2)/3)*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4) - S(1)/(S(3)*x**S(3)) - S(1)/(S(7)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(x**S(8) + S(3)*x**S(4) + S(1)), x), x, S(2)*sqrt(S(5))*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), -S(2)*x**S(4)/(-sqrt(S(5)) + S(3)))/(S(5)*(-sqrt(S(5)) + S(3))*(m + S(1))) - S(2)*sqrt(S(5))*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), -S(2)*x**S(4)/(sqrt(S(5)) + S(3)))/(S(5)*(sqrt(S(5)) + S(3))*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(x**S(8) + S(3)*x**S(4) + S(1)), x), x, x**S(4)/S(4) - (-S(7)*sqrt(S(5))/S(40) + S(3)/8)*log(S(2)*x**S(4) - sqrt(S(5)) + S(3)) - (S(3)/8 + S(7)*sqrt(S(5))/S(40))*log(S(2)*x**S(4) + sqrt(S(5)) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(x**S(8) + S(3)*x**S(4) + S(1)), x), x, x**S(2)/S(2) + sqrt(-S(4)*sqrt(S(5))/S(5) + S(9)/5)*atan(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(2) - sqrt(S(4)*sqrt(S(5))/S(5) + S(9)/5)*atan(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(x**S(8) + S(3)*x**S(4) + S(1)), x), x, (-S(3)*sqrt(S(5))/S(40) + S(1)/8)*log(S(2)*x**S(4) - sqrt(S(5)) + S(3)) + (S(1)/8 + S(3)*sqrt(S(5))/S(40))*log(S(2)*x**S(4) + sqrt(S(5)) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(x**S(8) + S(3)*x**S(4) + S(1)), x), x, -sqrt(-sqrt(S(5))/S(10) + S(3)/10)*atan(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(2) + sqrt(sqrt(S(5))/S(10) + S(3)/10)*atan(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(8) + S(3)*x**S(4) + S(1)), x), x, -sqrt(S(5))*atanh(sqrt(S(5))*(S(2)*x**S(4) + S(3))/S(5))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(8) + S(3)*x**S(4) + S(1)), x), x, sqrt(sqrt(S(5))/S(10) + S(3)/10)*atan(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(2) - atan(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/sqrt(S(10)*sqrt(S(5)) + S(30)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(8) + S(3)*x**S(4) + S(1))), x), x, log(x) - (S(1)/8 + S(3)*sqrt(S(5))/S(40))*log(S(2)*x**S(4) - sqrt(S(5)) + S(3)) - (-S(3)*sqrt(S(5))/S(40) + S(1)/8)*log(S(2)*x**S(4) + sqrt(S(5)) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(x**S(8) + S(3)*x**S(4) + S(1))), x), x, -sqrt(S(10))*(sqrt(S(5)) + S(3))**(S(3)/2)*atan(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(40) + sqrt(-S(4)*sqrt(S(5))/S(5) + S(9)/5)*atan(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/S(2) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(x**S(8) + S(3)*x**S(4) + S(1))), x), x, -S(3)*log(x) + (S(3)/8 + S(7)*sqrt(S(5))/S(40))*log(S(2)*x**S(4) - sqrt(S(5)) + S(3)) + (-S(7)*sqrt(S(5))/S(40) + S(3)/8)*log(S(2)*x**S(4) + sqrt(S(5)) + S(3)) - S(1)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(x**S(8) + S(3)*x**S(4) + S(1))), x), x, sqrt(S(11)*sqrt(S(5))/S(2) + S(123)/10)*atan(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(2) - sqrt(-S(11)*sqrt(S(5))/S(2) + S(123)/10)*atan(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/S(2) + S(3)/(S(2)*x**S(2)) - S(1)/(S(6)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, S(2)*sqrt(S(5))*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), S(2)*x**S(4)/(-sqrt(S(5)) + S(3)))/(S(5)*(-sqrt(S(5)) + S(3))*(m + S(1))) - S(2)*sqrt(S(5))*x**(m + S(1))*hyper((S(1), m/S(4) + S(1)/4), (m/S(4) + S(5)/4,), S(2)*x**S(4)/(sqrt(S(5)) + S(3)))/(S(5)*(sqrt(S(5)) + S(3))*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, x**S(4)/S(4) + (-S(7)*sqrt(S(5))/S(40) + S(3)/8)*log(-S(2)*x**S(4) - sqrt(S(5)) + S(3)) + (S(3)/8 + S(7)*sqrt(S(5))/S(40))*log(-S(2)*x**S(4) + sqrt(S(5)) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, x**S(2)/S(2) + sqrt(-S(4)*sqrt(S(5))/S(5) + S(9)/5)*atanh(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(2) - sqrt(S(4)*sqrt(S(5))/S(5) + S(9)/5)*atanh(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, (-S(3)*sqrt(S(5))/S(40) + S(1)/8)*log(-S(2)*x**S(4) - sqrt(S(5)) + S(3)) + (S(1)/8 + S(3)*sqrt(S(5))/S(40))*log(-S(2)*x**S(4) + sqrt(S(5)) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, sqrt(-sqrt(S(5))/S(10) + S(3)/10)*atanh(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(2) - sqrt(sqrt(S(5))/S(10) + S(3)/10)*atanh(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, sqrt(S(5))*atanh(sqrt(S(5))*(-S(2)*x**S(4) + S(3))/S(5))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, sqrt(sqrt(S(5))/S(10) + S(3)/10)*atanh(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(2) - atanh(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/sqrt(S(10)*sqrt(S(5)) + S(30)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(8) - S(3)*x**S(4) + S(1))), x), x, log(x) - (S(1)/8 + S(3)*sqrt(S(5))/S(40))*log(-S(2)*x**S(4) - sqrt(S(5)) + S(3)) - (-S(3)*sqrt(S(5))/S(40) + S(1)/8)*log(-S(2)*x**S(4) + sqrt(S(5)) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(x**S(8) - S(3)*x**S(4) + S(1))), x), x, sqrt(S(10))*(sqrt(S(5)) + S(3))**(S(3)/2)*atanh(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(40) - sqrt(-S(4)*sqrt(S(5))/S(5) + S(9)/5)*atanh(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/S(2) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(x**S(8) - S(3)*x**S(4) + S(1))), x), x, S(3)*log(x) - (S(3)/8 + S(7)*sqrt(S(5))/S(40))*log(-S(2)*x**S(4) - sqrt(S(5)) + S(3)) - (-S(7)*sqrt(S(5))/S(40) + S(3)/8)*log(-S(2)*x**S(4) + sqrt(S(5)) + S(3)) - S(1)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(x**S(8) - S(3)*x**S(4) + S(1))), x), x, sqrt(S(11)*sqrt(S(5))/S(2) + S(123)/10)*atanh(x**S(2)*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(2) - sqrt(-S(11)*sqrt(S(5))/S(2) + S(123)/10)*atanh(sqrt(S(2))*x**S(2)/sqrt(sqrt(S(5)) + S(3)))/S(2) - S(3)/(S(2)*x**S(2)) - S(1)/(S(6)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, x + sqrt(S(5))*(-S(440)*sqrt(S(5)) + S(984))**(S(1)/4)*atan(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(20) - sqrt(S(5))*(S(55)*sqrt(S(5))/S(2) + S(123)/2)**(S(1)/4)*atan(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10) + sqrt(S(5))*(-S(440)*sqrt(S(5)) + S(984))**(S(1)/4)*atanh(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(20) - sqrt(S(5))*(S(55)*sqrt(S(5))/S(2) + S(123)/2)**(S(1)/4)*atanh(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, -sqrt(S(5))*(-S(64)*sqrt(S(5)) + S(144))**(S(1)/4)*atan(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(20) + S(2)**(S(1)/4)*sqrt(S(5))*(sqrt(S(5)) + S(3))**(S(3)/4)*atan(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(20) + sqrt(S(5))*(-S(64)*sqrt(S(5)) + S(144))**(S(1)/4)*atanh(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(20) - S(2)**(S(1)/4)*sqrt(S(5))*(sqrt(S(5)) + S(3))**(S(3)/4)*atanh(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(20), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, sqrt(S(5))*(-sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atan(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) - sqrt(S(5))*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atan(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10) + sqrt(S(5))*(-sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atanh(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) - sqrt(S(5))*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atanh(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, sqrt(S(-10) + S(10)*sqrt(S(5)))*atan(x*sqrt(S(-2) + S(2)*sqrt(S(5)))/S(2))/S(20) - sqrt(S(10) + S(10)*sqrt(S(5)))*atan(x*sqrt(S(2) + S(2)*sqrt(S(5)))/S(2))/S(20) - sqrt(S(-10) + S(10)*sqrt(S(5)))*atanh(x*sqrt(S(-2) + S(2)*sqrt(S(5)))/S(2))/S(20) + sqrt(S(10) + S(10)*sqrt(S(5)))*atanh(x*sqrt(S(2) + S(2)*sqrt(S(5)))/S(2))/S(20), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(2)/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, -sqrt(S(5))*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atan(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) + S(2)**(S(1)/4)*sqrt(S(5))*atan(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/(S(10)*(sqrt(S(5)) + S(3))**(S(1)/4)) + sqrt(S(5))*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atanh(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) - S(2)**(S(1)/4)*sqrt(S(5))*atanh(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/(S(10)*(sqrt(S(5)) + S(3))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(x**S(8) - S(3)*x**S(4) + S(1))), x), x, -S(2)**(S(3)/4)*sqrt(S(5))*(sqrt(S(5)) + S(3))**(S(5)/4)*atan(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(40) + sqrt(S(5))*(-S(440)*sqrt(S(5)) + S(984))**(S(1)/4)*atan(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(20) + S(2)**(S(3)/4)*sqrt(S(5))*(sqrt(S(5)) + S(3))**(S(5)/4)*atanh(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(40) - sqrt(S(5))*(-S(440)*sqrt(S(5)) + S(984))**(S(1)/4)*atanh(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(20) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(x**S(8) - S(3)*x**S(4) + S(1))), x), x, -sqrt(S(5))*(S(1292)*sqrt(S(5)) + S(2889))**(S(1)/4)*atan(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) + sqrt(S(5))*(-S(1292)*sqrt(S(5)) + S(2889))**(S(1)/4)*atan(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10) + sqrt(S(5))*(S(1292)*sqrt(S(5)) + S(2889))**(S(1)/4)*atanh(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) - sqrt(S(5))*(-S(1292)*sqrt(S(5)) + S(2889))**(S(1)/4)*atanh(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10) - S(3)/x - S(1)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8)*(x**S(8) - S(3)*x**S(4) + S(1))), x), x, sqrt(S(5))*(S(17711)*sqrt(S(5))/S(2) + S(39603)/2)**(S(1)/4)*atan(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) - sqrt(S(5))*(-S(17711)*sqrt(S(5))/S(2) + S(39603)/2)**(S(1)/4)*atan(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10) + sqrt(S(5))*(S(17711)*sqrt(S(5))/S(2) + S(39603)/2)**(S(1)/4)*atanh(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) - sqrt(S(5))*(-S(17711)*sqrt(S(5))/S(2) + S(39603)/2)**(S(1)/4)*atanh(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10) - S(1)/x**S(3) - S(1)/(S(7)*x**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(x**S(8) + S(3)*x**S(4) + S(2)), x), x, -atanh(S(2)*x**S(4) + S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(x**S(8) + S(3)*x**S(4) + S(2)), x), x, x**S(4)/S(4) + log(x**S(4) + S(1))/S(4) - log(x**S(4) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(x**S(10) + x**S(5) + S(2)), x), x, log(x**S(10) + x**S(5) + S(2))/S(10) - sqrt(S(7))*atan(sqrt(S(7))*(S(2)*x**S(5) + S(1))/S(7))/S(35), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(10) + x**S(5) + S(2)), x), x, S(2)*sqrt(S(7))*atan(sqrt(S(7))*(S(2)*x**S(5) + S(1))/S(7))/S(35), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(10) + x**S(5) + S(1))), x), x, log(x) - log(x**S(10) + x**S(5) + S(1))/S(10) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(5) + S(1))/S(3))/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(x**S(10) + x**S(5) + S(1))), x), x, -log(x) + log(x**S(10) + x**S(5) + S(1))/S(10) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(5) + S(1))/S(3))/S(15) - S(1)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(11) + x**S(6) + x), x), x, log(x) - log(x**S(10) + x**S(5) + S(1))/S(10) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(5) + S(1))/S(3))/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a/x**S(2) + b/x + c), x), x, -b*x**S(3)/(S(3)*c**S(2)) - b*x*(-S(2)*a*c + b**S(2))/c**S(4) + b*(S(5)*a**S(2)*c**S(2) - S(5)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(5)*sqrt(-S(4)*a*c + b**S(2))) + x**S(4)/(S(4)*c) + x**S(2)*(-a*c + b**S(2))/(S(2)*c**S(3)) + (a**S(2)*c**S(2) - S(3)*a*b**S(2)*c + b**S(4))*log(a + b*x + c*x**S(2))/(S(2)*c**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a/x**S(2) + b/x + c), x), x, -b*x**S(2)/(S(2)*c**S(2)) - b*(-S(2)*a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*c**S(4)) + x**S(3)/(S(3)*c) + x*(-a*c + b**S(2))/c**S(3) - (S(2)*a**S(2)*c**S(2) - S(4)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a/x**S(2) + b/x + c), x), x, -b*x/c**S(2) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(3)*sqrt(-S(4)*a*c + b**S(2))) + x**S(2)/(S(2)*c) + (-a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a/x**S(2) + b/x + c), x), x, -b*log(a + b*x + c*x**S(2))/(S(2)*c**S(2)) + x/c - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a/x**S(2) + b/x + c)), x), x, b*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c*sqrt(-S(4)*a*c + b**S(2))) + log(a + b*x + c*x**S(2))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a/x**S(2) + b/x + c)), x), x, S(2)*atanh((S(2)*a/x + b)/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a/x**S(2) + b/x + c)), x), x, b*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a*sqrt(-S(4)*a*c + b**S(2))) + log(x)/a - log(a + b*x + c*x**S(2))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a/x**S(2) + b/x + c)), x), x, -S(1)/(a*x) - b*log(x)/a**S(2) + b*log(a + b*x + c*x**S(2))/(S(2)*a**S(2)) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a/x**S(2) + b/x + c)), x), x, -S(1)/(S(2)*a*x**S(2)) + b/(a**S(2)*x) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*sqrt(-S(4)*a*c + b**S(2))) + (-a*c + b**S(2))*log(x)/a**S(3) - (-a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(a/x**S(2) + b/x + c)), x), x, -S(1)/(S(3)*a*x**S(3)) + b/(S(2)*a**S(2)*x**S(2)) - (-a*c + b**S(2))/(a**S(3)*x) - b*(-S(2)*a*c + b**S(2))*log(x)/a**S(4) + b*(-S(2)*a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*a**S(4)) - (S(2)*a**S(2)*c**S(2) - S(4)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a/x**S(2) + b/x + c)**S(2), x), x, -b*x**S(3)/(c*(-S(4)*a*c + b**S(2))) - b*x*(-S(11)*a*c + S(3)*b**S(2))/(c**S(3)*(-S(4)*a*c + b**S(2))) + b*(S(30)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x**S(4)*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + x**S(2)*(-S(8)*a*c + S(3)*b**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))) + (-S(2)*a*c + S(3)*b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*c**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a/x**S(2) + b/x + c)**(S(-2)), x), x, -b*x**S(2)/(c*(-S(4)*a*c + b**S(2))) - b*log(a + b*x + c*x**S(2))/c**S(3) + x**S(3)*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + x*(-S(6)*a*c + S(2)*b**S(2))/(c**S(2)*(-S(4)*a*c + b**S(2))) - (S(12)*a**S(2)*c**S(2) - S(12)*a*b**S(2)*c + S(2)*b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a/x**S(2) + b/x + c)**S(2)), x), x, -b*x/(c*(-S(4)*a*c + b**S(2))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x**S(2)*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + log(a + b*x + c*x**S(2))/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a/x**S(2) + b/x + c)**S(2)), x), x, -S(4)*a*atanh((S(2)*a/x + b)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + (S(2)*a/x + b)/((-S(4)*a*c + b**S(2))*(a/x**S(2) + b/x + c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a/x**S(2) + b/x + c)**S(2)), x), x, -S(2)*b*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + (S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a/x**S(2) + b/x + c)**S(2)), x), x, S(4)*c*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - (b + S(2)*c*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a/x**S(2) + b/x + c)**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(a*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + log(x)/a**S(2) - log(a + b*x + c*x**S(2))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(a/x**S(2) + b/x + c)**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(a*x*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + (S(6)*a*c - S(2)*b**S(2))/(a**S(2)*x*(-S(4)*a*c + b**S(2))) - S(2)*b*log(x)/a**S(3) + b*log(a + b*x + c*x**S(2))/a**S(3) - (S(12)*a**S(2)*c**S(2) - S(12)*a*b**S(2)*c + S(2)*b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(a/x**S(2) + b/x + c)**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(a*x**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) - (-S(8)*a*c + S(3)*b**S(2))/(S(2)*a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) + b*(-S(11)*a*c + S(3)*b**S(2))/(a**S(3)*x*(-S(4)*a*c + b**S(2))) + b*(S(30)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (-S(2)*a*c + S(3)*b**S(2))*log(x)/a**S(4) - (-S(2)*a*c + S(3)*b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a/x**S(2) + b/x + c)**(S(-3)), x), x, -S(3)*b*x**S(2)*(-S(6)*a*c + b**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*b*log(a + b*x + c*x**S(2))/(S(2)*c**S(4)) + x**S(5)*(S(2)*a + b*x)/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x + c*x**S(2))**S(2)) + x**S(3)*(a*(-S(10)*a*c + b**S(2)) + b*x*(-S(7)*a*c + b**S(2)))/(c*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) + x*(S(30)*a**S(2)*c**S(2) - S(21)*a*b**S(2)*c + S(3)*b**S(4))/(c**S(3)*(-S(4)*a*c + b**S(2))**S(2)) - (-S(60)*a**S(3)*c**S(3) + S(90)*a**S(2)*b**S(2)*c**S(2) - S(30)*a*b**S(4)*c + S(3)*b**S(6))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(4)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a/x**S(2) + b/x + c)**S(3)), x), x, -b*x*(-S(7)*a*c + b**S(2))/(c**S(2)*(-S(4)*a*c + b**S(2))**S(2)) + b*(S(30)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x**S(4)*(S(2)*a + b*x)/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x + c*x**S(2))**S(2)) + x**S(2)*(a*(-S(16)*a*c + b**S(2)) + b*x*(-S(10)*a*c + b**S(2)))/(S(2)*c*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) + log(a + b*x + c*x**S(2))/(S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a/x**S(2) + b/x + c)**S(3)), x), x, S(12)*a**S(2)*atanh((S(2)*a/x + b)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) - S(3)*a*(S(2)*a/x + b)/((-S(4)*a*c + b**S(2))**S(2)*(a/x**S(2) + b/x + c)) + (S(2)*a/x + b)/((-S(8)*a*c + S(2)*b**S(2))*(a/x**S(2) + b/x + c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a/x**S(2) + b/x + c)**S(3)), x), x, S(6)*a*b*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + S(3)*b*x*(S(2)*a + b*x)/(S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) - x**S(3)*(b + S(2)*c*x)/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x + c*x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a/x**S(2) + b/x + c)**S(3)), x), x, x*(S(2)*a + b*x)/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x + c*x**S(2))**S(2)) + (S(3)*a*b + x*(S(2)*a*c + b**S(2)))/((-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) - (S(4)*a*c + S(2)*b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(a/x**S(2) + b/x + c)**S(3)), x), x, S(6)*b*c*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) - S(3)*b*(b + S(2)*c*x)/(S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) + (S(2)*a + b*x)/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x + c*x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(a/x**S(2) + b/x + c)**S(3)), x), x, -S(12)*c**S(2)*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + S(3)*c*(b + S(2)*c*x)/((-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) + (-b - S(2)*c*x)/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x + c*x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(7)*(a/x**S(2) + b/x + c)**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))**S(2)) + (S(16)*a**S(2)*c**S(2) - S(15)*a*b**S(2)*c + S(2)*b**S(4) + S(2)*b*c*x*(-S(7)*a*c + b**S(2)))/(S(2)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) + b*(S(30)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + log(x)/a**S(3) - log(a + b*x + c*x**S(2))/(S(2)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(8)*(a/x**S(2) + b/x + c)**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(S(2)*a*x*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))**S(2)) + (S(20)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4) + S(3)*b*c*x*(-S(6)*a*c + b**S(2)))/(S(2)*a**S(2)*x*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) - (S(30)*a**S(2)*c**S(2) - S(21)*a*b**S(2)*c + S(3)*b**S(4))/(a**S(3)*x*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*b*log(x)/a**S(4) + S(3)*b*log(a + b*x + c*x**S(2))/(S(2)*a**S(4)) - (-S(60)*a**S(3)*c**S(3) + S(90)*a**S(2)*b**S(2)*c**S(2) - S(30)*a*b**S(4)*c + S(3)*b**S(6))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(4)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(S(15) + S(13)/x + S(2)/x**S(2)), x), x, x**S(3)/S(45) - S(13)*x**S(2)/S(450) + S(139)*x/S(3375) - S(16)*log(S(3)*x + S(2))/S(567) + log(S(5)*x + S(1))/S(4375), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(S(15) + S(13)/x + S(2)/x**S(2)), x), x, x**S(2)/S(30) - S(13)*x/S(225) + S(8)*log(S(3)*x + S(2))/S(189) - log(S(5)*x + S(1))/S(875), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(15) + S(13)/x + S(2)/x**S(2)), x), x, x/S(15) - S(4)*log(S(3)*x + S(2))/S(63) + log(S(5)*x + S(1))/S(175), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(S(15) + S(13)/x + S(2)/x**S(2))), x), x, S(2)*log(S(3)*x + S(2))/S(21) - log(S(5)*x + S(1))/S(35), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(S(15) + S(13)/x + S(2)/x**S(2))), x), x, -log(S(3) + S(2)/x)/S(7) + log(S(5) + S(1)/x)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(S(15) + S(13)/x + S(2)/x**S(2))), x), x, log(x)/S(2) + S(3)*log(S(3)*x + S(2))/S(14) - S(5)*log(S(5)*x + S(1))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(S(15) + S(13)/x + S(2)/x**S(2))), x), x, -S(13)*log(x)/S(4) - S(9)*log(S(3)*x + S(2))/S(28) + S(25)*log(S(5)*x + S(1))/S(7) - S(1)/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(S(15) + S(13)/x + S(2)/x**S(2))), x), x, S(139)*log(x)/S(8) + S(27)*log(S(3)*x + S(2))/S(56) - S(125)*log(S(5)*x + S(1))/S(7) + S(13)/(S(4)*x) - S(1)/(S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*(S(15) + S(13)/x + S(2)/x**S(2))), x), x, -S(1417)*log(x)/S(16) - S(81)*log(S(3)*x + S(2))/S(112) + S(625)*log(S(5)*x + S(1))/S(7) - S(139)/(S(8)*x) + S(13)/(S(8)*x**S(2)) - S(1)/(S(6)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x + c/x**S(2))**(S(5)/2), x), x, S(5)*a**(S(3)/2)*b*atanh((S(2)*a + b/x)/(S(2)*sqrt(a)*sqrt(a + b/x + c/x**S(2))))/S(2) + x*(a + b/x + c/x**S(2))**(S(5)/2) - S(5)*(S(7)*b + S(6)*c/x)*(a + b/x + c/x**S(2))**(S(3)/2)/S(24) - S(5)*(b*(S(44)*a*c + b**S(2)) + S(2)*c*(S(12)*a*c + b**S(2))/x)*sqrt(a + b/x + c/x**S(2))/(S(64)*c) + (-S(240)*a**S(2)*c**S(2) - S(120)*a*b**S(2)*c + S(5)*b**S(4))*atanh((b + S(2)*c/x)/(S(2)*sqrt(c)*sqrt(a + b/x + c/x**S(2))))/(S(128)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x + c/x**S(2))**(S(3)/2), x), x, S(3)*sqrt(a)*b*atanh((S(2)*a + b/x)/(S(2)*sqrt(a)*sqrt(a + b/x + c/x**S(2))))/S(2) + x*(a + b/x + c/x**S(2))**(S(3)/2) - S(3)*(S(3)*b + S(2)*c/x)*sqrt(a + b/x + c/x**S(2))/S(4) - (S(12)*a*c + S(3)*b**S(2))*atanh((b + S(2)*c/x)/(S(2)*sqrt(c)*sqrt(a + b/x + c/x**S(2))))/(S(8)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b/x + c/x**S(2)), x), x, -sqrt(c)*atanh((b + S(2)*c/x)/(S(2)*sqrt(c)*sqrt(a + b/x + c/x**S(2)))) + x*sqrt(a + b/x + c/x**S(2)) + b*atanh((S(2)*a + b/x)/(S(2)*sqrt(a)*sqrt(a + b/x + c/x**S(2))))/(S(2)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b/x + c/x**S(2)), x), x, x*sqrt(a + b/x + c/x**S(2))/a - b*atanh((S(2)*a + b/x)/(S(2)*sqrt(a)*sqrt(a + b/x + c/x**S(2))))/(S(2)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x + c/x**S(2))**(S(-3)/2), x), x, -x*(-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c/x)/(a*(-S(4)*a*c + b**S(2))*sqrt(a + b/x + c/x**S(2))) + x*(-S(8)*a*c + S(3)*b**S(2))*sqrt(a + b/x + c/x**S(2))/(a**S(2)*(-S(4)*a*c + b**S(2))) - S(3)*b*atanh((S(2)*a + b/x)/(S(2)*sqrt(a)*sqrt(a + b/x + c/x**S(2))))/(S(2)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x + c/x**S(2))**(S(-5)/2), x), x, -x*(-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c/x)/(S(3)*a*(-S(4)*a*c + b**S(2))*(a + b/x + c/x**S(2))**(S(3)/2)) - x*(S(64)*a**S(2)*c**S(2) - S(64)*a*b**S(2)*c + S(10)*b**S(4) + S(2)*b*c*(-S(28)*a*c + S(5)*b**S(2))/x)/(S(3)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b/x + c/x**S(2))) + x*sqrt(a + b/x + c/x**S(2))*(S(128)*a**S(2)*c**S(2) - S(100)*a*b**S(2)*c + S(15)*b**S(4))/(S(3)*a**S(3)*(-S(4)*a*c + b**S(2))**S(2)) - S(5)*b*atanh((S(2)*a + b/x)/(S(2)*sqrt(a)*sqrt(a + b/x + c/x**S(2))))/(S(2)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b/x + b**S(2)/x**S(2)), x), x, a*x*sqrt(a**S(2) + S(2)*a*b/x + b**S(2)/x**S(2))/(a + b/x) + b*sqrt(a**S(2) + S(2)*a*b/x + b**S(2)/x**S(2))*log(x)/(a + b/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a/x**S(4) + b/x**S(2) + c), x), x, x/c - sqrt(S(2))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a/x**S(6) + b/x**S(3) + c), x), x, x/c - S(2)**(S(2)/3)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a/x**S(8) + b/x**S(4) + c), x), x, x/c + S(2)**(S(3)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(x) + c*x)/x, x), x, -S(2)*sqrt(a)*atanh((S(2)*a + b*sqrt(x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(x) + c*x))) + b*atanh((b + S(2)*c*sqrt(x))/(S(2)*sqrt(c)*sqrt(a + b*sqrt(x) + c*x)))/sqrt(c) + S(2)*sqrt(a + b*sqrt(x) + c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b**S(2)/(S(4)*c) + b*sqrt(x) + c*x)**S(2), x), x, -b*(b + S(2)*c*sqrt(x))**S(5)/(S(160)*c**S(4)) + (b + S(2)*c*sqrt(x))**S(6)/(S(192)*c**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a**S(2) + S(2)*a*b*sqrt(x) + b**S(2)*x), x), x, -S(2)*a*(a + b*sqrt(x))*log(a + b*sqrt(x))/(b**S(2)*sqrt(a**S(2) + S(2)*a*b*sqrt(x) + b**S(2)*x)) + S(2)*sqrt(a**S(2) + S(2)*a*b*sqrt(x) + b**S(2)*x)/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p, x), x, x*(d*x)**m*(S(1) + b*x**(S(1)/3)/a)**(-S(2)*p)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p*hyper((S(3)*m + S(3), -S(2)*p), (S(3)*m + S(4),), -b*x**(S(1)/3)/a)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p, x), x, S(3)*a**S(8)*(a + b*x**(S(1)/3))*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(9)*(S(2)*p + S(1))) - S(12)*a**S(7)*(a*b + b**S(2)*x**(S(1)/3))**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(11)*(p + S(1))) + S(84)*a**S(6)*(a*b + b**S(2)*x**(S(1)/3))**S(3)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(12)*(S(2)*p + S(3))) - S(84)*a**S(5)*(a*b + b**S(2)*x**(S(1)/3))**S(4)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(13)*(p + S(2))) + S(210)*a**S(4)*(a*b + b**S(2)*x**(S(1)/3))**S(5)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(14)*(S(2)*p + S(5))) - S(84)*a**S(3)*(a*b + b**S(2)*x**(S(1)/3))**S(6)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(15)*(p + S(3))) + S(84)*a**S(2)*(a*b + b**S(2)*x**(S(1)/3))**S(7)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(16)*(S(2)*p + S(7))) - S(12)*a*(a*b + b**S(2)*x**(S(1)/3))**S(8)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(17)*(p + S(4))) + S(3)*(a*b + b**S(2)*x**(S(1)/3))**S(9)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(18)*(S(2)*p + S(9))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p, x), x, -S(3)*a**S(5)*(a + b*x**(S(1)/3))*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(6)*(S(2)*p + S(1))) + S(15)*a**S(4)*(a*b + b**S(2)*x**(S(1)/3))**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(S(2)*b**S(8)*(p + S(1))) - S(30)*a**S(3)*(a*b + b**S(2)*x**(S(1)/3))**S(3)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(9)*(S(2)*p + S(3))) + S(15)*a**S(2)*(a*b + b**S(2)*x**(S(1)/3))**S(4)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(10)*(p + S(2))) - S(15)*a*(a*b + b**S(2)*x**(S(1)/3))**S(5)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(b**S(11)*(S(2)*p + S(5))) + S(3)*(a*b + b**S(2)*x**(S(1)/3))**S(6)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(S(2)*b**S(12)*(p + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/x, x), x, -(S(3)*a + S(3)*b*x**(S(1)/3))*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p*hyper((S(1), S(2)*p + S(1)), (S(2)*p + S(2),), S(1) + b*x**(S(1)/3)/a)/(a*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/x**S(2), x), x, (S(3)*a*b**S(3) + S(3)*b**S(4)*x**(S(1)/3))*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p*hyper((S(4), S(2)*p + S(1)), (S(2)*p + S(2),), S(1) + b*x**(S(1)/3)/a)/(a**S(4)*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/x**S(2) - S(2)*b**S(3)*p*(-S(2)*p + S(1))*(-p + S(1))*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(S(3)*a**S(3)*x), x), x, -(a + b*x**(S(1)/3))*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(a*x) + b*(a + b*x**(S(1)/3))*(-p + S(1))*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(a**S(2)*x**(S(2)/3)) - b**S(2)*(a + b*x**(S(1)/3))*(-S(2)*p + S(1))*(-p + S(1))*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**p/(a**S(3)*x**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/4) + b**S(2)*sqrt(x))**(S(-3)/2), x), x, -S(12)*a*(a + b*x**(S(1)/4))*log(a + b*x**(S(1)/4))/(b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/4) + b**S(2)*sqrt(x))) - x**(S(3)/4)*(S(2)*a + S(2)*b*x**(S(1)/4))/(b*(a**S(2) + S(2)*a*b*x**(S(1)/4) + b**S(2)*sqrt(x))**(S(3)/2)) - S(6)*sqrt(x)/(b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/4) + b**S(2)*sqrt(x))) + S(12)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/4) + b**S(2)*sqrt(x))/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/6) + b**S(2)*x**(S(1)/3))**(S(-5)/2), x), x, -S(30)*a*(a + b*x**(S(1)/6))*log(a + b*x**(S(1)/6))/(b**S(6)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/6) + b**S(2)*x**(S(1)/3))) - x**(S(5)/6)*(S(3)*a + S(3)*b*x**(S(1)/6))/(S(2)*b*(a**S(2) + S(2)*a*b*x**(S(1)/6) + b**S(2)*x**(S(1)/3))**(S(5)/2)) - S(5)*x**(S(2)/3)/(S(2)*b**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/6) + b**S(2)*x**(S(1)/3))**(S(3)/2)) - sqrt(x)*(S(5)*a + S(5)*b*x**(S(1)/6))/(b**S(3)*(a**S(2) + S(2)*a*b*x**(S(1)/6) + b**S(2)*x**(S(1)/3))**(S(3)/2)) - S(15)*x**(S(1)/3)/(b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/6) + b**S(2)*x**(S(1)/3))) + S(30)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/6) + b**S(2)*x**(S(1)/3))/b**S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b/sqrt(x) + b**S(2)/x)**(S(3)/2), x), x, -S(6)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b/sqrt(x) + b**S(2)/x)*log(S(1)/sqrt(x))/(a + b/sqrt(x)) - S(6)*b**S(2)*sqrt(a**S(2) + S(2)*a*b/sqrt(x) + b**S(2)/x) + S(3)*b*sqrt(x)*(a + b/sqrt(x))*sqrt(a**S(2) + S(2)*a*b/sqrt(x) + b**S(2)/x) + x*(a**S(2) + S(2)*a*b/sqrt(x) + b**S(2)/x)**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(7)/2), x), x, -S(105)*a**S(4)*b**S(3)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))*log(x**(S(-1)/3))/(a + b/x**(S(1)/3)) - S(105)*a**S(3)*b**S(3)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3)) - S(105)*a**S(2)*b**S(3)*(a + b/x**(S(1)/3))*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))/S(2) - S(35)*a*b**S(3)*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(3)/2) - S(105)*b**S(3)*(a + b/x**(S(1)/3))*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(3)/2)/S(4) + S(21)*b**S(2)*x**(S(1)/3)*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(5)/2) + S(7)*b*x**(S(2)/3)*(a + b/x**(S(1)/3))*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(5)/2)/S(2) + x*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(7)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(5)/2), x), x, -S(30)*a**S(2)*b**S(3)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))*log(x**(S(-1)/3))/(a + b/x**(S(1)/3)) - S(30)*a*b**S(3)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3)) - S(15)*b**S(3)*(a + b/x**(S(1)/3))*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3)) + S(10)*b**S(2)*x**(S(1)/3)*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(3)/2) + S(5)*b*x**(S(2)/3)*(a + b/x**(S(1)/3))*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(3)/2)/S(2) + x*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(3)/2), x), x, S(3)*a*b**S(2)*x**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))/(a + b/x**(S(1)/3)) - S(3)*b**S(3)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))*log(x**(S(-1)/3))/(a + b/x**(S(1)/3)) + S(3)*b*x**(S(2)/3)*(a + b/x**(S(1)/3))*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))/S(2) + x*(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3)), x), x, -a*x*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))/(S(2)*a + S(2)*b/x**(S(1)/3)) + S(3)*x*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3)), x), x, x*(a + b/x**(S(1)/3))/(a*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))) - S(3)*b*x**(S(2)/3)*(a + b/x**(S(1)/3))/(S(2)*a**S(2)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))) + S(3)*b**S(2)*x**(S(1)/3)*(a + b/x**(S(1)/3))/(a**S(3)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))) - S(3)*b**S(3)*(a + b/x**(S(1)/3))*log(a*x**(S(1)/3) + b)/(a**S(4)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3)), x), x, x*(a + b/x**(S(1)/3))/(a*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))) - S(3)*b*x**(S(2)/3)*(a + b/x**(S(1)/3))/(S(2)*a**S(2)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))) + S(3)*b**S(3)*(a + b/x**(S(1)/3))*log(x**(S(-1)/3))/(a**S(4)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))) - S(3)*b**S(3)*(a + b/x**(S(1)/3))*log(a + b/x**(S(1)/3))/(a**S(4)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))) + S(3)*b**S(2)*x**(S(1)/3)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/3) + b**S(2)/x**(S(2)/3))/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(-3)/2), x), x, -x**(S(2)/3)*(S(3)*a + S(3)*b*x**(S(1)/3))/(S(2)*b*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(3)/2)) - S(3)*x**(S(1)/3)/(b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))) + (S(3)*a + S(3)*b*x**(S(1)/3))*log(a + b*x**(S(1)/3))/(b**S(3)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(-5)/2), x), x, x*(S(3)*a + S(3)*b*x**(S(1)/3))/(S(4)*a*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(5)/2)) + x/(S(4)*a**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(-7)/2), x), x, -x**(S(2)/3)*(a + b*x**(S(1)/3))/(S(2)*b*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(7)/2)) - x**(S(1)/3)/(S(5)*b**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(5)/2)) - (a + b*x**(S(1)/3))/(S(20)*b**S(3)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(-9)/2), x), x, -x**(S(2)/3)*(S(3)*a + S(3)*b*x**(S(1)/3))/(S(8)*b*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(9)/2)) - S(3)*x**(S(1)/3)/(S(28)*b**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(7)/2)) - (a + b*x**(S(1)/3))/(S(56)*b**S(3)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(-11)/2), x), x, -x**(S(2)/3)*(S(3)*a + S(3)*b*x**(S(1)/3))/(S(10)*b*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(11)/2)) - x**(S(1)/3)/(S(15)*b**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(9)/2)) - (a + b*x**(S(1)/3))/(S(120)*b**S(3)*(a**S(2) + S(2)*a*b*x**(S(1)/3) + b**S(2)*x**(S(2)/3))**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b/x**(S(1)/4) + b**S(2)/sqrt(x))**(S(5)/2), x), x, -S(20)*a*b**S(4)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/4) + b**S(2)/sqrt(x))*log(x**(S(-1)/4))/(a + b/x**(S(1)/4)) - S(20)*b**S(4)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/4) + b**S(2)/sqrt(x)) + S(10)*b**S(3)*x**(S(1)/4)*(a + b/x**(S(1)/4))*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/4) + b**S(2)/sqrt(x)) + S(10)*b**S(2)*sqrt(x)*(a**S(2) + S(2)*a*b/x**(S(1)/4) + b**S(2)/sqrt(x))**(S(3)/2)/S(3) + S(5)*b*x**(S(3)/4)*(a + b/x**(S(1)/4))*(a**S(2) + S(2)*a*b/x**(S(1)/4) + b**S(2)/sqrt(x))**(S(3)/2)/S(3) + x*(a**S(2) + S(2)*a*b/x**(S(1)/4) + b**S(2)/sqrt(x))**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b/x**(S(1)/5) + b**S(2)/x**(S(2)/5))**(S(5)/2), x), x, S(5)*a*b**S(4)*x**(S(1)/5)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/5) + b**S(2)/x**(S(2)/5))/(a + b/x**(S(1)/5)) - S(5)*b**S(5)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/5) + b**S(2)/x**(S(2)/5))*log(x**(S(-1)/5))/(a + b/x**(S(1)/5)) + S(5)*b**S(3)*x**(S(2)/5)*(a + b/x**(S(1)/5))*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/5) + b**S(2)/x**(S(2)/5))/S(2) + S(5)*b**S(2)*x**(S(3)/5)*(a**S(2) + S(2)*a*b/x**(S(1)/5) + b**S(2)/x**(S(2)/5))**(S(3)/2)/S(3) + S(5)*b*x**(S(4)/5)*(a + b/x**(S(1)/5))*(a**S(2) + S(2)*a*b/x**(S(1)/5) + b**S(2)/x**(S(2)/5))**(S(3)/2)/S(4) + x*(a**S(2) + S(2)*a*b/x**(S(1)/5) + b**S(2)/x**(S(2)/5))**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(S(1)/5) + b**S(2)*x**(S(2)/5))**(S(-5)/2), x), x, -x**(S(4)/5)*(S(5)*a + S(5)*b*x**(S(1)/5))/(S(4)*b*(a**S(2) + S(2)*a*b*x**(S(1)/5) + b**S(2)*x**(S(2)/5))**(S(5)/2)) - S(5)*x**(S(3)/5)/(S(3)*b**S(2)*(a**S(2) + S(2)*a*b*x**(S(1)/5) + b**S(2)*x**(S(2)/5))**(S(3)/2)) - x**(S(2)/5)*(S(5)*a + S(5)*b*x**(S(1)/5))/(S(2)*b**S(3)*(a**S(2) + S(2)*a*b*x**(S(1)/5) + b**S(2)*x**(S(2)/5))**(S(3)/2)) - S(5)*x**(S(1)/5)/(b**S(4)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/5) + b**S(2)*x**(S(2)/5))) + (S(5)*a + S(5)*b*x**(S(1)/5))*log(a + b*x**(S(1)/5))/(b**S(5)*sqrt(a**S(2) + S(2)*a*b*x**(S(1)/5) + b**S(2)*x**(S(2)/5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3))**(S(7)/2), x), x, -S(42)*a*b**S(6)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3))*log(x**(S(-1)/6))/(a + b/x**(S(1)/6)) - S(42)*b**S(6)*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3)) + S(21)*b**S(5)*x**(S(1)/6)*(a + b/x**(S(1)/6))*sqrt(a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3)) + S(7)*b**S(4)*x**(S(1)/3)*(a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3))**(S(3)/2) + S(7)*b**S(3)*sqrt(x)*(a + b/x**(S(1)/6))*(a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3))**(S(3)/2)/S(2) + S(21)*b**S(2)*x**(S(2)/3)*(a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3))**(S(5)/2)/S(10) + S(7)*b*x**(S(5)/6)*(a + b/x**(S(1)/6))*(a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3))**(S(5)/2)/S(5) + x*(a**S(2) + S(2)*a*b/x**(S(1)/6) + b**S(2)/x**(S(1)/3))**(S(7)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(4)*n + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, b**S(2)*log(b + c*x**n)/(c**S(3)*n) - b*x**n/(c**S(2)*n) + x**(S(2)*n)/(S(2)*c*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)*n + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -b*log(b + c*x**n)/(c**S(2)*n) + x**n/(c*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, log(b + c*x**n)/(c*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, log(x)/b - log(b + c*x**n)/(b*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -x**(-S(2)*n)/(S(2)*b*n) + c*x**(-n)/(b**S(2)*n) + c**S(2)*log(x)/b**S(3) - c**S(2)*log(b + c*x**n)/(b**S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-S(2)*n + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -x**(-S(3)*n)/(S(3)*b*n) + c*x**(-S(2)*n)/(S(2)*b**S(2)*n) - c**S(2)*x**(-n)/(b**S(3)*n) - c**S(3)*log(x)/b**S(4) + c**S(3)*log(b + c*x**n)/(b**S(4)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-S(3)*n + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -x**(-S(4)*n)/(S(4)*b*n) + c*x**(-S(3)*n)/(S(3)*b**S(2)*n) - c**S(2)*x**(-S(2)*n)/(S(2)*b**S(3)*n) + c**S(3)*x**(-n)/(b**S(4)*n) + c**S(4)*log(x)/b**S(5) - c**S(4)*log(b + c*x**n)/(b**S(5)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n/S(4) + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -S(4)*x**(-S(3)*n/S(4))/(S(3)*b*n) + sqrt(S(2))*c**(S(3)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*x**(n/S(4)) + sqrt(b) + sqrt(c)*x**(n/S(2)))/(S(2)*b**(S(7)/4)*n) - sqrt(S(2))*c**(S(3)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*x**(n/S(4)) + sqrt(b) + sqrt(c)*x**(n/S(2)))/(S(2)*b**(S(7)/4)*n) + sqrt(S(2))*c**(S(3)/4)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*x**(n/S(4))/b**(S(1)/4))/(b**(S(7)/4)*n) - sqrt(S(2))*c**(S(3)/4)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*x**(n/S(4))/b**(S(1)/4))/(b**(S(7)/4)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n/S(3) + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -S(3)*x**(-S(2)*n/S(3))/(S(2)*b*n) - c**(S(2)/3)*log(b**(S(1)/3) + c**(S(1)/3)*x**(n/S(3)))/(b**(S(5)/3)*n) + c**(S(2)/3)*log(b**(S(2)/3) - b**(S(1)/3)*c**(S(1)/3)*x**(n/S(3)) + c**(S(2)/3)*x**(S(2)*n/S(3)))/(S(2)*b**(S(5)/3)*n) + sqrt(S(3))*c**(S(2)/3)*atan(sqrt(S(3))*(b**(S(1)/3) - S(2)*c**(S(1)/3)*x**(n/S(3)))/(S(3)*b**(S(1)/3)))/(b**(S(5)/3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n/S(2) + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -S(2)*x**(-n/S(2))/(b*n) + S(2)*sqrt(c)*atan(sqrt(b)*x**(-n/S(2))/sqrt(c))/(b**(S(3)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n/S(2) + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -S(2)*x**(-S(3)*n/S(2))/(S(3)*b*n) + S(2)*c*x**(-n/S(2))/(b**S(2)*n) - S(2)*c**(S(3)/2)*atan(sqrt(b)*x**(-n/S(2))/sqrt(c))/(b**(S(5)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n/S(3) + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -S(3)*x**(-S(4)*n/S(3))/(S(4)*b*n) + S(3)*c*x**(-n/S(3))/(b**S(2)*n) - c**(S(4)/3)*log(b**(S(1)/3)*x**(-n/S(3)) + c**(S(1)/3))/(b**(S(7)/3)*n) + c**(S(4)/3)*log(b**(S(2)/3)*x**(-S(2)*n/S(3)) - b**(S(1)/3)*c**(S(1)/3)*x**(-n/S(3)) + c**(S(2)/3))/(S(2)*b**(S(7)/3)*n) + sqrt(S(3))*c**(S(4)/3)*atan(sqrt(S(3))*(-S(2)*b**(S(1)/3)*x**(-n/S(3)) + c**(S(1)/3))/(S(3)*c**(S(1)/3)))/(b**(S(7)/3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n/S(4) + S(-1))/(b*x**n + c*x**(S(2)*n)), x), x, -S(4)*x**(-S(5)*n/S(4))/(S(5)*b*n) + S(4)*c*x**(-n/S(4))/(b**S(2)*n) + sqrt(S(2))*c**(S(5)/4)*log(-sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*x**(-n/S(4)) + sqrt(b)*x**(-n/S(2)) + sqrt(c))/(S(2)*b**(S(9)/4)*n) - sqrt(S(2))*c**(S(5)/4)*log(sqrt(S(2))*b**(S(1)/4)*c**(S(1)/4)*x**(-n/S(4)) + sqrt(b)*x**(-n/S(2)) + sqrt(c))/(S(2)*b**(S(9)/4)*n) - sqrt(S(2))*c**(S(5)/4)*atan(sqrt(S(2))*b**(S(1)/4)*x**(-n/S(4))/c**(S(1)/4) + S(-1))/(b**(S(9)/4)*n) - sqrt(S(2))*c**(S(5)/4)*atan(sqrt(S(2))*b**(S(1)/4)*x**(-n/S(4))/c**(S(1)/4) + S(1))/(b**(S(9)/4)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n*(p + S(-1)) + S(-1))*(b*x**n + c*x**(S(2)*n))**p, x), x, x**(-n*(p + S(1)))*(b*x**n + c*x**(S(2)*n))**(p + S(1))/(c*n*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n*(S(2)*p + S(1)) + S(-1))*(b*x**n + c*x**(S(2)*n))**p, x), x, -x**(-S(2)*n*(p + S(1)))*(b*x**n + c*x**(S(2)*n))**(p + S(1))/(b*n*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**p, x), x, -a*(a + b*x**n)*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**p/(b**S(2)*n*(S(2)*p + S(1))) + (a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(p + S(1))/(S(2)*b**S(2)*n*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(5)/2), x), x, -a*(a + b*x**n)*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(5)/2)/(S(6)*b**S(2)*n) + (a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(7)/2)/(S(7)*b**S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, -a*(a + b*x**n)*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)/(S(4)*b**S(2)*n) + (a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(5)/2)/(S(5)*b**S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, a*x**(S(2)*n)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(S(6)*n*(a + b*x**n)) + x**(S(2)*n)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))/sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, -a*(a + b*x**n)*log(a + b*x**n)/(b**S(2)*n*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))) + sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(b**S(2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, x**(S(2)*n)*(a + b*x**n)/(S(2)*a*n*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(5)/2), x), x, a*(a + b*x**n)/(S(4)*b**S(2)*n*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(5)/2)) - S(1)/(S(3)*b**S(2)*n*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(7)/2), x), x, a*(a + b*x**n)/(S(6)*b**S(2)*n*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(7)/2)) - S(1)/(S(5)*b**S(2)*n*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, a*n*(d*x)**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(d*(a + b*x**n)*(m + S(1))*(m + n + S(1))) + (d*x)**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(d*(m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, a*n*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((a + b*x**n)*(S(3)*n + S(9))) + x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(n + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, a*n*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((a + b*x**n)*(S(2)*n + S(4))) + x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(n + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, a*n*x*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((a + b*x**n)*(n + S(1))) + x*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/x, x), x, a*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))*log(x)/(a + b*x**n) + sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/x**S(2), x), x, a*n*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(x*(a + b*x**n)*(-n + S(1))) - sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(x*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/x**S(3), x), x, a*n*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(x**S(2)*(a + b*x**n)*(-S(2)*n + S(4))) - sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(x**S(2)*(-n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, a**S(3)*(d*x)**(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(d*(a + b*x**n)*(m + S(1))) + S(3)*a**S(2)*b**S(2)*x**(n + S(1))*(d*x)**m*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((a*b + b**S(2)*x**n)*(m + n + S(1))) + S(3)*a*b**S(3)*x**(S(2)*n + S(1))*(d*x)**m*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((a*b + b**S(2)*x**n)*(m + S(2)*n + S(1))) + b**S(4)*x**(S(3)*n + S(1))*(d*x)**m*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((a*b + b**S(2)*x**n)*(m + S(3)*n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, a**S(3)*x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(S(3)*a + S(3)*b*x**n) + S(3)*a**S(2)*b**S(2)*x**(n + S(3))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((n + S(3))*(a*b + b**S(2)*x**n)) + S(3)*a*b**S(3)*x**(S(2)*n + S(3))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((S(2)*n + S(3))*(a*b + b**S(2)*x**n)) + b**S(4)*x**(S(3)*n + S(3))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((S(3)*n + S(3))*(a*b + b**S(2)*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, a**S(3)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(S(2)*a + S(2)*b*x**n) + S(3)*a**S(2)*b**S(2)*x**(n + S(2))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((n + S(2))*(a*b + b**S(2)*x**n)) + S(3)*a*b**S(3)*x**(S(2)*n + S(2))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((S(2)*n + S(2))*(a*b + b**S(2)*x**n)) + b**S(4)*x**(S(3)*n + S(2))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((S(3)*n + S(2))*(a*b + b**S(2)*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, S(6)*a**S(3)*n**S(3)*x*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((a + b*x**n)*(S(6)*n**S(3) + S(11)*n**S(2) + S(6)*n + S(1))) + S(6)*a**S(2)*n**S(2)*x*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(S(6)*n**S(3) + S(11)*n**S(2) + S(6)*n + S(1)) + S(3)*n*x*(a**S(2) + a*b*x**n)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(S(6)*n**S(2) + S(5)*n + S(1)) + x*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)/(S(3)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)/x, x), x, a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))*log(x)/(a + b*x**n) + a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/n + (a**S(2) + a*b*x**n)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(S(2)*n) + (a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)/(S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)/x**S(2), x), x, -a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(x*(a + b*x**n)) - S(3)*a**S(2)*b**S(2)*x**(n + S(-1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((-n + S(1))*(a*b + b**S(2)*x**n)) - S(3)*a*b**S(3)*x**(S(2)*n + S(-1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((-S(2)*n + S(1))*(a*b + b**S(2)*x**n)) - b**S(4)*x**(S(3)*n + S(-1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((-S(3)*n + S(1))*(a*b + b**S(2)*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)/x**S(3), x), x, -a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/(S(2)*x**S(2)*(a + b*x**n)) - S(3)*a**S(2)*b**S(2)*x**(n + S(-2))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((-n + S(2))*(a*b + b**S(2)*x**n)) - S(3)*a*b**S(3)*x**(S(2)*n + S(-2))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((-S(2)*n + S(2))*(a*b + b**S(2)*x**n)) - b**S(4)*x**(S(3)*n + S(-2))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))/((-S(3)*n + S(2))*(a*b + b**S(2)*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, (d*x)**(m + S(1))*(a + b*x**n)*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -b*x**n/a)/(a*d*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, x**S(3)*(a + b*x**n)*hyper((S(1), S(3)/n), ((n + S(3))/n,), -b*x**n/a)/(S(3)*a*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, x**S(2)*(a + b*x**n)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -b*x**n/a)/(S(2)*a*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n)), x), x, x*(a + b*x**n)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -b*x**n/a)/(a*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), x), x, (a + b*x**n)*log(x)/(a*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))) - (a + b*x**n)*log(a + b*x**n)/(a*n*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), x), x, -(a + b*x**n)*hyper((S(1), -S(1)/n), (-(-n + S(1))/n,), -b*x**n/a)/(a*x*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), x), x, -(a + b*x**n)*hyper((S(1), -S(2)/n), (-(-n + S(2))/n,), -b*x**n/a)/(S(2)*a*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, (d*x)**(m + S(1))*(a + b*x**n)*hyper((S(3), (m + S(1))/n), ((m + n + S(1))/n,), -b*x**n/a)/(a**S(3)*d*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, x**S(3)*(a + b*x**n)*hyper((S(3), S(3)/n), ((n + S(3))/n,), -b*x**n/a)/(S(3)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2), x), x, x**S(2)*(a + b*x**n)*hyper((S(3), S(2)/n), ((n + S(2))/n,), -b*x**n/a)/(S(2)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(-3)/2), x), x, x*(a + b*x**n)*hyper((S(3), S(1)/n), (S(1) + S(1)/n,), -b*x**n/a)/(a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)), x), x, (a + b*x**n)/(S(2)*a*n*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)) + S(1)/(a**S(2)*n*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))) + (a + b*x**n)*log(x)/(a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))) - (a + b*x**n)*log(a + b*x**n)/(a**S(3)*n*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)), x), x, -(a + b*x**n)*hyper((S(3), -S(1)/n), (-(-n + S(1))/n,), -b*x**n/a)/(a**S(3)*x*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(3)/2)), x), x, -(a + b*x**n)*hyper((S(3), -S(2)/n), (-(-n + S(2))/n,), -b*x**n/a)/(S(2)*a**S(3)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(-S(1)/(S(2)*p + S(1))) + b**S(2)*x**(-S(2)/(S(2)*p + S(1))))**p, x), x, x*(a + b*x**(S(1)/(-S(2)*p + S(-1))))*(a**S(2) + S(2)*a*b*x**(S(1)/(-S(2)*p + S(-1))) + b**S(2)*x**(-S(2)/(S(2)*p + S(1))))**p/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**((-n + S(-1))/(S(2)*n)), x), x, x*(a + b*x**n)*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(-(n + S(1))/(S(2)*n))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**(-S(1)/(S(2)*p + S(2))) + b**S(2)*x**(-S(1)/(p + S(1))))**p, x), x, x*(a + b*x**(-S(1)/(S(2)*p + S(2))))*(S(2)*p + S(2))*(a**S(2) + S(2)*a*b*x**(-S(1)/(S(2)*p + S(2))) + b**S(2)*x**(-S(1)/(p + S(1))))**p/(a*(S(2)*p + S(1))) - x*(a**S(2) + S(2)*a*b*x**(-S(1)/(S(2)*p + S(2))) + b**S(2)*x**(-S(1)/(p + S(1))))**(p + S(1))/(a**S(2)*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**((-S(2)*n + S(-1))/(S(2)*n)), x), x, x*(a + b*x**n)*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(S(-1) - S(1)/(S(2)*n))/(a*(n + S(1))) + n*x*(a**S(2) + S(2)*a*b*x**n + b**S(2)*x**(S(2)*n))**(-S(1)/(S(2)*n))/(a**S(2)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(4)*n + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -b*x**n/(c**S(2)*n) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x**n)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(3)*n*sqrt(-S(4)*a*c + b**S(2))) + x**(S(2)*n)/(S(2)*c*n) + (-a*c + b**S(2))*log(a + b*x**n + c*x**(S(2)*n))/(S(2)*c**S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)*n + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -b*log(a + b*x**n + c*x**(S(2)*n))/(S(2)*c**S(2)*n) + x**n/(c*n) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**n)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(2)*n*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, b*atanh((b + S(2)*c*x**n)/sqrt(-S(4)*a*c + b**S(2)))/(c*n*sqrt(-S(4)*a*c + b**S(2))) + log(a + b*x**n + c*x**(S(2)*n))/(S(2)*c*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*atanh((b + S(2)*c*x**n)/sqrt(-S(4)*a*c + b**S(2)))/(n*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -x**(-n)/(a*n) - b*log(x)/a**S(2) + b*log(a + b*x**n + c*x**(S(2)*n))/(S(2)*a**S(2)*n) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**n)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(2)*n*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-S(2)*n + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -x**(-S(2)*n)/(S(2)*a*n) + b*x**(-n)/(a**S(2)*n) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x**n)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*n*sqrt(-S(4)*a*c + b**S(2))) + (-a*c + b**S(2))*log(x)/a**S(3) - (-a*c + b**S(2))*log(a + b*x**n + c*x**(S(2)*n))/(S(2)*a**S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-S(3)*n + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -x**(-S(3)*n)/(S(3)*a*n) + b*x**(-S(2)*n)/(S(2)*a**S(2)*n) - x**(-n)*(-a*c + b**S(2))/(a**S(3)*n) - b*(-S(2)*a*c + b**S(2))*log(x)/a**S(4) + b*(-S(2)*a*c + b**S(2))*log(a + b*x**n + c*x**(S(2)*n))/(S(2)*a**S(4)*n) - (S(2)*a**S(2)*c**S(2) - S(4)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x**n)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(4)*n*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n/S(4) + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*S(2)**(S(3)/4)*c**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x**(n/S(4))/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(n*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) - S(2)*S(2)**(S(3)/4)*c**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x**(n/S(4))/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(n*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)*S(2)**(S(3)/4)*c**(S(3)/4)*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x**(n/S(4))/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(n*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))) + S(2)*S(2)**(S(3)/4)*c**(S(3)/4)*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x**(n/S(4))/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(n*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n/S(3) + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)**(S(2)/3)*c**(S(2)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x**(n/S(3)) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(n*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*c**(S(2)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**(S(2)*n/S(3)) - S(2)**(S(1)/3)*c**(S(1)/3)*x**(n/S(3))*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(2)*n*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*sqrt(S(3))*c**(S(2)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x**(n/S(3))/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(n*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*c**(S(2)/3)*log(S(2)**(S(1)/3)*c**(S(1)/3)*x**(n/S(3)) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(n*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(2)/3)*c**(S(2)/3)*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**(S(2)*n/S(3)) - S(2)**(S(1)/3)*c**(S(1)/3)*x**(n/S(3))*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(2)*n*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))) - S(2)**(S(2)/3)*sqrt(S(3))*c**(S(2)/3)*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x**(n/S(3))/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(n*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n/S(2) + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x**(n/S(2))/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(n*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x**(n/S(2))/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(n*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n/S(2) + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*x**(-n/S(2))/(a*n) + sqrt(S(2))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(a)*x**(-n/S(2))/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(a**(S(3)/2)*n*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(a)*x**(-n/S(2))/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(a**(S(3)/2)*n*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n/S(3) + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(3)*x**(-n/S(3))/(a*n) + S(2)**(S(2)/3)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*a**(S(1)/3)*x**(-n/S(3)) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(2)*a**(S(4)/3)*n*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*a**(S(2)/3)*x**(-S(2)*n/S(3)) - S(2)**(S(1)/3)*a**(S(1)/3)*x**(-n/S(3))*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(4)*a**(S(4)/3)*n*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*a**(S(1)/3)*x**(-n/S(3))/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(2)*a**(S(4)/3)*n*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*a**(S(1)/3)*x**(-n/S(3)) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(2)*a**(S(4)/3)*n*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*a**(S(2)/3)*x**(-S(2)*n/S(3)) - S(2)**(S(1)/3)*a**(S(1)/3)*x**(-n/S(3))*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(4)*a**(S(4)/3)*n*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*a**(S(1)/3)*x**(-n/S(3))/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(2)*a**(S(4)/3)*n*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n/S(4) + S(-1))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(4)*x**(-n/S(4))/(a*n) - S(2)**(S(3)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*a**(S(1)/4)*x**(-n/S(4))/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(a**(S(5)/4)*n*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*a**(S(1)/4)*x**(-n/S(4))/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(a**(S(5)/4)*n*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*a**(S(1)/4)*x**(-n/S(4))/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(a**(S(5)/4)*n*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*a**(S(1)/4)*x**(-n/S(4))/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(a**(S(5)/4)*n*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*x**S(3)*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(12)*a*c + S(3)*b**S(2) + S(3)*b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*x**S(3)*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(12)*a*c + S(3)*b**S(2) - S(3)*b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**n + c*x**(S(2)*n)), x), x, -c*x**S(2)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - c*x**S(2)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**n + c*x**(S(2)*n))), x), x, b*atanh((b + S(2)*c*x**n)/sqrt(-S(4)*a*c + b**S(2)))/(a*n*sqrt(-S(4)*a*c + b**S(2))) + log(x)/a - log(a + b*x**n + c*x**(S(2)*n))/(S(2)*a*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**n + c*x**(S(2)*n))), x), x, S(2)*c*hyper((S(1), -S(1)/n), (-(-n + S(1))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(x*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) + S(2)*c*hyper((S(1), -S(1)/n), (-(-n + S(1))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(x*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**n + c*x**(S(2)*n))), x), x, c*hyper((S(1), -S(2)/n), (-(-n + S(2))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(x**S(2)*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) + c*hyper((S(1), -S(2)/n), (-(-n + S(2))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(x**S(2)*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, x**S(4)*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(4)/n, S(-1)/2, S(-1)/2, (n + S(4))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, x**S(3)*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(3)/n, S(-1)/2, S(-1)/2, (n + S(3))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, x**S(2)*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(2)/n, S(-1)/2, S(-1)/2, (n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, x*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(1)/n, S(-1)/2, S(-1)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**n + c*x**(S(2)*n))/x**S(2), x), x, -sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(-S(1)/n, S(-1)/2, S(-1)/2, -(-n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(x*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**n + c*x**(S(2)*n))/x**S(3), x), x, -sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(-S(2)/n, S(-1)/2, S(-1)/2, -(-n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*x**S(2)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, a*x**S(4)*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(4)/n, S(-3)/2, S(-3)/2, (n + S(4))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, a*x**S(3)*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(3)/n, S(-3)/2, S(-3)/2, (n + S(3))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, a*x**S(2)*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(2)/n, S(-3)/2, S(-3)/2, (n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, a*x*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(1)/n, S(-3)/2, S(-3)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**n + c*x**(S(2)*n))**(S(3)/2)/x**S(2), x), x, -a*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(-S(1)/n, S(-3)/2, S(-3)/2, -(-n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(x*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**n + c*x**(S(2)*n))**(S(3)/2)/x**S(3), x), x, -a*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(-S(2)/n, S(-3)/2, S(-3)/2, -(-n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*x**S(2)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, x**S(4)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(4)/n, S(1)/2, S(1)/2, (n + S(4))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, x**S(3)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/n, S(1)/2, S(1)/2, (n + S(3))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, x**S(2)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(2)/n, S(1)/2, S(1)/2, (n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, x*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/n, S(1)/2, S(1)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/sqrt(a + b*x**n + c*x**(S(2)*n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, x**S(3)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/n, S(3)/2, S(3)/2, (n + S(3))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, x**S(2)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(2)/n, S(3)/2, S(3)/2, (n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**n + c*x**(S(2)*n))**(S(-3)/2), x), x, x*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/n, S(3)/2, S(3)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*x**n + c*x**(S(2)*n))**(S(3)/2)), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**n + c*x**(S(2)*n))) - atanh((S(2)*a + b*x**n)/(S(2)*sqrt(a)*sqrt(a + b*x**n + c*x**(S(2)*n))))/(a**(S(3)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*x**n + c*x**(S(2)*n))**(S(3)/2)), x), x, -sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(-S(1)/n, S(3)/2, S(3)/2, -(-n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*x*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*x**n + c*x**(S(2)*n))**(S(3)/2)), x), x, -sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(-S(2)/n, S(3)/2, S(3)/2, -(-n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*x**S(2)*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*x**n + c*x**(S(2)*n))), x), x, -sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(-S(1)/n, S(1)/2, S(1)/2, -(-n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(x*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a + b*x**n + c*x**(S(2)*n))), x), x, -sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(-S(2)/n, S(1)/2, S(1)/2, -(-n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*x**S(2)*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, x**S(4)*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(4)/n, S(3)/2, S(3)/2, (n + S(4))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, a*(d*x)**(m + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1((m + S(1))/n, S(-3)/2, S(-3)/2, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, (d*x)**(m + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1((m + S(1))/n, S(-1)/2, S(-1)/2, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, (d*x)**(m + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1((m + S(1))/n, S(1)/2, S(1)/2, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, (d*x)**(m + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1((m + S(1))/n, S(3)/2, S(3)/2, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*d*(m + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x, (d*x)**(m + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1((m + S(1))/n, -p, -p, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*(d + e*x)**S(3) + c*(d + e*x)**S(6)), x), x, -d*(d + e*x)*sqrt(S(2)*c*(d + e*x)**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*(d + e*x)**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/3, S(1)/2, S(1)/2, S(4)/3, -S(2)*c*(d + e*x)**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*(d + e*x)**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(e**S(2)*sqrt(a + b*(d + e*x)**S(3) + c*(d + e*x)**S(6))) + (d + e*x)**S(2)*sqrt(S(2)*c*(d + e*x)**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*(d + e*x)**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(2)/3, S(1)/2, S(1)/2, S(5)/3, -S(2)*c*(d + e*x)**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*(d + e*x)**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*e**S(2)*sqrt(a + b*(d + e*x)**S(3) + c*(d + e*x)**S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*(d + e*x)**S(3) + c*(d + e*x)**S(6)), x), x, d**S(2)*(d + e*x)*sqrt(S(2)*c*(d + e*x)**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*(d + e*x)**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/3, S(1)/2, S(1)/2, S(4)/3, -S(2)*c*(d + e*x)**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*(d + e*x)**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(e**S(3)*sqrt(a + b*(d + e*x)**S(3) + c*(d + e*x)**S(6))) - d*(d + e*x)**S(2)*sqrt(S(2)*c*(d + e*x)**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*(d + e*x)**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(2)/3, S(1)/2, S(1)/2, S(5)/3, -S(2)*c*(d + e*x)**S(3)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*(d + e*x)**S(3)/(b + sqrt(-S(4)*a*c + b**S(2))))/(e**S(3)*sqrt(a + b*(d + e*x)**S(3) + c*(d + e*x)**S(6))) + atanh((b + S(2)*c*(d + e*x)**S(3))/(S(2)*sqrt(c)*sqrt(a + b*(d + e*x)**S(3) + c*(d + e*x)**S(6))))/(S(3)*sqrt(c)*e**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**n + c*x**(S(2)*n))/x, x), x, -sqrt(a)*atanh((S(2)*a + b*x**n)/(S(2)*sqrt(a)*sqrt(a + b*x**n + c*x**(S(2)*n))))/n + b*atanh((b + S(2)*c*x**n)/(S(2)*sqrt(c)*sqrt(a + b*x**n + c*x**(S(2)*n))))/(S(2)*sqrt(c)*n) + sqrt(a + b*x**n + c*x**(S(2)*n))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**n + c*x**(S(2)*n))**(S(3)/2)/x, x), x, -a**(S(3)/2)*atanh((S(2)*a + b*x**n)/(S(2)*sqrt(a)*sqrt(a + b*x**n + c*x**(S(2)*n))))/n - b*(-S(12)*a*c + b**S(2))*atanh((b + S(2)*c*x**n)/(S(2)*sqrt(c)*sqrt(a + b*x**n + c*x**(S(2)*n))))/(S(16)*c**(S(3)/2)*n) + (a + b*x**n + c*x**(S(2)*n))**(S(3)/2)/(S(3)*n) + sqrt(a + b*x**n + c*x**(S(2)*n))*(S(8)*a*c + b**S(2) + S(2)*b*c*x**n)/(S(8)*c*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*x**n + c*x**(S(2)*n))), x), x, -atanh((S(2)*a + b*x**n)/(S(2)*sqrt(a)*sqrt(a + b*x**n + c*x**(S(2)*n))))/(sqrt(a)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**S(3), x), x, a**S(3)*(d*x)**(m + S(1))/(d*(m + S(1))) + S(3)*a**S(2)*b*x**(n + S(1))*(d*x)**m/(m + n + S(1)) + S(3)*a*x**(S(2)*n + S(1))*(d*x)**m*(a*c + b**S(2))/(m + S(2)*n + S(1)) + S(3)*b*c**S(2)*x**(S(5)*n + S(1))*(d*x)**m/(m + S(5)*n + S(1)) + b*x**(S(3)*n + S(1))*(d*x)**m*(S(6)*a*c + b**S(2))/(m + S(3)*n + S(1)) + c**S(3)*x**(S(6)*n + S(1))*(d*x)**m/(m + S(6)*n + S(1)) + S(3)*c*x**(S(4)*n + S(1))*(d*x)**m*(a*c + b**S(2))/(m + S(4)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, a**S(2)*(d*x)**(m + S(1))/(d*(m + S(1))) + S(2)*a*b*x**(n + S(1))*(d*x)**m/(m + n + S(1)) + S(2)*b*c*x**(S(3)*n + S(1))*(d*x)**m/(m + S(3)*n + S(1)) + c**S(2)*x**(S(4)*n + S(1))*(d*x)**m/(m + S(4)*n + S(1)) + x**(S(2)*n + S(1))*(d*x)**m*(S(2)*a*c + b**S(2))/(m + S(2)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m*(a + b*x**n + c*x**(S(2)*n)), x), x, a*(d*x)**(m + S(1))/(d*(m + S(1))) + b*x**(n + S(1))*(d*x)**m/(m + n + S(1)) + c*x**(S(2)*n + S(1))*(d*x)**m/(m + S(2)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*(d*x)**(m + S(1))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(d*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*c*(d*x)**(m + S(1))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(d*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, -c*(d*x)**(m + S(1))*(S(4)*a*c*(m - S(2)*n + S(1)) - b**S(2)*(m - n + S(1)) + b*sqrt(-S(4)*a*c + b**S(2))*(m - n + S(1)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*d*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + c*(d*x)**(m + S(1))*(-b*(m - n + S(1)) + (S(4)*a*c*(m - S(2)*n + S(1)) - b**S(2)*(m - n + S(1)))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*d*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))) + (d*x)**(m + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*d*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**m/(a + b*x**n + c*x**(S(2)*n))**S(3), x), x, (d*x)**(m + S(1))*(-S(2)*a*c + b**S(2) + b*c*x**n)/(S(2)*a*d*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))**S(2)) - c*(d*x)**(m + S(1))*(S(8)*a**S(2)*c**S(2)*(m**S(2) + m*(-S(6)*n + S(2)) + S(8)*n**S(2) - S(6)*n + S(1)) - S(6)*a*b**S(2)*c*(m**S(2) + m*(-S(4)*n + S(2)) + S(3)*n**S(2) - S(4)*n + S(1)) + b**S(4)*(m**S(2) + m*(-S(3)*n + S(2)) + S(2)*n**S(2) - S(3)*n + S(1)) + b*sqrt(-S(4)*a*c + b**S(2))*(S(2)*a*c*(S(2)*m - S(7)*n + S(2)) - b**S(2)*(m - S(2)*n + S(1)))*(m - n + S(1)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*d*n**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(5)/2)) - c*(d*x)**(m + S(1))*(-S(8)*a**S(2)*c**S(2)*(m**S(2) + m*(-S(6)*n + S(2)) + S(8)*n**S(2) - S(6)*n + S(1)) + S(6)*a*b**S(2)*c*(m**S(2) + m*(-S(4)*n + S(2)) + S(3)*n**S(2) - S(4)*n + S(1)) - b**S(4)*(m**S(2) + m*(-S(3)*n + S(2)) + S(2)*n**S(2) - S(3)*n + S(1)) + b*sqrt(-S(4)*a*c + b**S(2))*(S(2)*a*c*(S(2)*m - S(7)*n + S(2)) - b**S(2)*(m - S(2)*n + S(1)))*(m - n + S(1)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*d*n**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(5)/2)) - (d*x)**(m + S(1))*(S(4)*a**S(2)*c**S(2)*(m - S(4)*n + S(1)) - S(5)*a*b**S(2)*c*(m - S(3)*n + S(1)) + b**S(4)*(m - S(2)*n + S(1)) - b*c*x**n*(S(2)*a*c*(S(2)*m - S(7)*n + S(2)) - b**S(2)*(m - S(2)*n + S(1))))/(S(2)*a**S(2)*d*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, a*(d + e*x)**S(4)/(S(4)*e) + b*(d + e*x)**S(6)/(S(6)*e) + c*(d + e*x)**S(8)/(S(8)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, a**S(2)*(d + e*x)**S(4)/(S(4)*e) + a*b*(d + e*x)**S(6)/(S(3)*e) + b*c*(d + e*x)**S(10)/(S(5)*e) + c**S(2)*(d + e*x)**S(12)/(S(12)*e) + (d + e*x)**S(8)*(S(2)*a*c + b**S(2))/(S(8)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, a**S(3)*(d + e*x)**S(4)/(S(4)*e) + a**S(2)*b*(d + e*x)**S(6)/(S(2)*e) + S(3)*a*(d + e*x)**S(8)*(a*c + b**S(2))/(S(8)*e) + S(3)*b*c**S(2)*(d + e*x)**S(14)/(S(14)*e) + b*(d + e*x)**S(10)*(S(6)*a*c + b**S(2))/(S(10)*e) + c**S(3)*(d + e*x)**S(16)/(S(16)*e) + c*(d + e*x)**S(12)*(a*c + b**S(2))/(S(4)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, a*f**S(3)*(d + e*x)**S(4)/(S(4)*e) + b*f**S(3)*(d + e*x)**S(6)/(S(6)*e) + c*f**S(3)*(d + e*x)**S(8)/(S(8)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, a**S(2)*f**S(3)*(d + e*x)**S(4)/(S(4)*e) + a*b*f**S(3)*(d + e*x)**S(6)/(S(3)*e) + b*c*f**S(3)*(d + e*x)**S(10)/(S(5)*e) + c**S(2)*f**S(3)*(d + e*x)**S(12)/(S(12)*e) + f**S(3)*(d + e*x)**S(8)*(S(2)*a*c + b**S(2))/(S(8)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, a**S(3)*f**S(3)*(d + e*x)**S(4)/(S(4)*e) + a**S(2)*b*f**S(3)*(d + e*x)**S(6)/(S(2)*e) + S(3)*a*f**S(3)*(d + e*x)**S(8)*(a*c + b**S(2))/(S(8)*e) + S(3)*b*c**S(2)*f**S(3)*(d + e*x)**S(14)/(S(14)*e) + b*f**S(3)*(d + e*x)**S(10)*(S(6)*a*c + b**S(2))/(S(10)*e) + c**S(3)*f**S(3)*(d + e*x)**S(16)/(S(16)*e) + c*f**S(3)*(d + e*x)**S(12)*(a*c + b**S(2))/(S(4)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(4)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, x/c - sqrt(S(2))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, b*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*e*sqrt(-S(4)*a*c + b**S(2))) + log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*c*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(2)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, -sqrt(S(2))*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*e*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*e*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, -atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), x), x, b*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*e*sqrt(-S(4)*a*c + b**S(2))) + log(d + e*x)/(a*e) - log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), x), x, -sqrt(S(2))*sqrt(c)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - S(1)/(a*e*(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), x), x, -S(1)/(S(2)*a*e*(d + e*x)**S(2)) - b*log(d + e*x)/(a**S(2)*e) + b*log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a**S(2)*e) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*e*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(4)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), x), x, -S(1)/(S(3)*a*e*(d + e*x)**S(3)) + b/(a**S(2)*e*(d + e*x)) + sqrt(S(2))*sqrt(c)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*sqrt(c)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(4)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, (S(2)*a + b*(d + e*x)**S(2))*(d + e*x)/(e*(-S(8)*a*c + S(2)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + sqrt(S(2))*(b - (S(4)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, -b*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (S(2)*a + b*(d + e*x)**S(2))/(e*(-S(8)*a*c + S(2)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(2)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, -sqrt(S(2))*sqrt(c)*(S(2)*b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(S(2)*b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (b + S(2)*c*(d + e*x)**S(2))*(d + e*x)/(e*(-S(8)*a*c + S(2)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, S(2)*c*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (-b - S(2)*c*(d + e*x)**S(2))/(e*(-S(8)*a*c + S(2)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**(S(-2)), x), x, -sqrt(S(2))*sqrt(c)*(-S(12)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(-S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (d + e*x)*(-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*e*(-S(4)*a*c + b**S(2))**(S(3)/2)) + log(d + e*x)/(a**S(2)*e) - log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a**S(2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*(d + e*x)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + sqrt(S(2))*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) - (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) + (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (-S(10)*a*c + S(3)*b**S(2))/(S(2)*a**S(2)*e*(d + e*x)*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - (-S(3)*a*c + b**S(2))/(a**S(2)*e*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))) - S(2)*b*log(d + e*x)/(a**S(3)*e) + b*log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(2)*a**S(3)*e) - (S(6)*a**S(2)*c**S(2) - S(6)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*e*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(4)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*(d + e*x)**S(3)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - (-S(14)*a*c + S(5)*b**S(2))/(S(6)*a**S(2)*e*(d + e*x)**S(3)*(-S(4)*a*c + b**S(2))) + b*(-S(19)*a*c + S(5)*b**S(2))/(S(2)*a**S(3)*e*(d + e*x)*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*sqrt(c)*(S(28)*a**S(2)*c**S(2) - S(29)*a*b**S(2)*c + S(5)*b**S(4) - b*(-S(19)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(3)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(S(28)*a**S(2)*c**S(2) - S(29)*a*b**S(2)*c + S(5)*b**S(4) + b*(-S(19)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(3)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(4)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, -S(3)*sqrt(S(2))*sqrt(c)*(S(4)*a*c + S(3)*b**S(2) + S(2)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(8)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*sqrt(S(2))*sqrt(c)*(S(4)*a*c + S(3)*b**S(2) - S(2)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(8)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + (S(2)*a + b*(d + e*x)**S(2))*(d + e*x)/(e*(-S(16)*a*c + S(4)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) - (d + e*x)*(-S(4)*a*c + S(7)*b**S(2) + S(12)*b*c*(d + e*x)**S(2))/(S(8)*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(3)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, S(3)*b*c*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(3)*b*(b + S(2)*c*(d + e*x)**S(2))/(S(4)*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + (S(2)*a + b*(d + e*x)**S(2))/(e*(-S(16)*a*c + S(4)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(2)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, -(b + S(2)*c*(d + e*x)**S(2))*(d + e*x)/(e*(-S(16)*a*c + S(4)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + sqrt(S(2))*sqrt(c)*(S(20)*a*c + b**S(2) - b*(-S(52)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*sqrt(c)*(S(20)*a*c + b**S(2) + b*(-S(52)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + (d + e*x)*(b*(S(8)*a*c + b**S(2)) + c*(d + e*x)**S(2)*(S(20)*a*c + b**S(2)))/(S(8)*a*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, -S(6)*c**S(2)*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*c*(b + S(2)*c*(d + e*x)**S(2))/(S(2)*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + (-b - S(2)*c*(d + e*x)**S(2))/(e*(-S(16)*a*c + S(4)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**(S(-3)), x), x, (d + e*x)*(-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(4)*a*e*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + S(3)*sqrt(S(2))*sqrt(c)*(-S(8)*a*b*c + b**S(3) - (S(56)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + S(3)*sqrt(S(2))*sqrt(c)*(S(56)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4) + b*(-S(8)*a*c + b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + (d + e*x)*(S(3)*b*c*(d + e*x)**S(2)*(-S(8)*a*c + b**S(2)) + (-S(7)*a*c + b**S(2))*(-S(4)*a*c + S(3)*b**S(2)))/(S(8)*a**S(2)*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(4)*a*e*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + (S(16)*a**S(2)*c**S(2) - S(15)*a*b**S(2)*c + S(2)*b**S(4) + S(2)*b*c*(d + e*x)**S(2)*(-S(7)*a*c + b**S(2)))/(S(4)*a**S(2)*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + b*(S(30)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(3)*e*(-S(4)*a*c + b**S(2))**(S(5)/2)) + log(d + e*x)/(a**S(3)*e) - log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a**S(3)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(4)*a*e*(d + e*x)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + (S(36)*a**S(2)*c**S(2) - S(35)*a*b**S(2)*c + S(5)*b**S(4) + b*c*(d + e*x)**S(2)*(-S(32)*a*c + S(5)*b**S(2)))/(S(8)*a**S(2)*e*(d + e*x)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - S(3)*sqrt(S(2))*sqrt(c)*((-S(12)*a*c + S(5)*b**S(2))*(-S(5)*a*c + b**S(2)) - (S(124)*a**S(2)*b*c**S(2) - S(47)*a*b**S(3)*c + S(5)*b**S(5))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(3)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*sqrt(S(2))*sqrt(c)*(b*(S(124)*a**S(2)*c**S(2) - S(47)*a*b**S(2)*c + S(5)*b**S(4))/sqrt(-S(4)*a*c + b**S(2)) + (-S(12)*a*c + S(5)*b**S(2))*(-S(5)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(3)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - (-S(36)*a*c + S(15)*b**S(2))*(-S(5)*a*c + b**S(2))/(S(8)*a**S(3)*e*(d + e*x)*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(4)*a*e*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + (S(20)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4) + S(3)*b*c*(d + e*x)**S(2)*(-S(6)*a*c + b**S(2)))/(S(4)*a**S(2)*e*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - (S(30)*a**S(2)*c**S(2) - S(21)*a*b**S(2)*c + S(3)*b**S(4))/(S(2)*a**S(3)*e*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*b*log(d + e*x)/(a**S(4)*e) + S(3)*b*log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a**S(4)*e) - (-S(60)*a**S(3)*c**S(3) + S(90)*a**S(2)*b**S(2)*c**S(2) - S(30)*a*b**S(4)*c + S(3)*b**S(6))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(4)*e*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(4)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, f**S(4)*x/c - sqrt(S(2))*f**S(4)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*f**S(4)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(3)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, b*f**S(3)*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*e*sqrt(-S(4)*a*c + b**S(2))) + f**S(3)*log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*c*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(2)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, -sqrt(S(2))*f**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*e*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*f**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*e*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4)), x), x, -f*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), x), x, b*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*e*f*sqrt(-S(4)*a*c + b**S(2))) + log(d + e*x)/(a*e*f) - log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a*e*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), x), x, -sqrt(S(2))*sqrt(c)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*e*f**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*e*f**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - S(1)/(a*e*f**S(2)*(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), x), x, -S(1)/(S(2)*a*e*f**S(3)*(d + e*x)**S(2)) - b*log(d + e*x)/(a**S(2)*e*f**S(3)) + b*log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a**S(2)*e*f**S(3)) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*e*f**S(3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)**S(4)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), x), x, -S(1)/(S(3)*a*e*f**S(4)*(d + e*x)**S(3)) + b/(a**S(2)*e*f**S(4)*(d + e*x)) + sqrt(S(2))*sqrt(c)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*e*f**S(4)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*sqrt(c)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*e*f**S(4)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(4)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, f**S(4)*(S(2)*a + b*(d + e*x)**S(2))*(d + e*x)/(e*(-S(8)*a*c + S(2)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + sqrt(S(2))*f**S(4)*(b - (S(4)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*f**S(4)*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(3)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, -b*f**S(3)*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*(-S(4)*a*c + b**S(2))**(S(3)/2)) + f**S(3)*(S(2)*a + b*(d + e*x)**S(2))/(e*(-S(8)*a*c + S(2)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(2)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, -sqrt(S(2))*sqrt(c)*f**S(2)*(S(2)*b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*f**S(2)*(S(2)*b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - f**S(2)*(b + S(2)*c*(d + e*x)**S(2))*(d + e*x)/(e*(-S(8)*a*c + S(2)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2), x), x, S(2)*c*f*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*(-S(4)*a*c + b**S(2))**(S(3)/2)) - f*(b + S(2)*c*(d + e*x)**S(2))/(e*(-S(8)*a*c + S(2)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*f*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*e*f*(-S(4)*a*c + b**S(2))**(S(3)/2)) + log(d + e*x)/(a**S(2)*e*f) - log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a**S(2)*e*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*f**S(2)*(d + e*x)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + sqrt(S(2))*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) - (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*e*f**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) + (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*e*f**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (-S(10)*a*c + S(3)*b**S(2))/(S(2)*a**S(2)*e*f**S(2)*(d + e*x)*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*f**S(3)*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - (-S(3)*a*c + b**S(2))/(a**S(2)*e*f**S(3)*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))) - S(2)*b*log(d + e*x)/(a**S(3)*e*f**S(3)) + b*log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(2)*a**S(3)*e*f**S(3)) - (S(6)*a**S(2)*c**S(2) - S(6)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*e*f**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)**S(4)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(2)*a*e*f**S(4)*(d + e*x)**S(3)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - (-S(14)*a*c + S(5)*b**S(2))/(S(6)*a**S(2)*e*f**S(4)*(d + e*x)**S(3)*(-S(4)*a*c + b**S(2))) + b*(-S(19)*a*c + S(5)*b**S(2))/(S(2)*a**S(3)*e*f**S(4)*(d + e*x)*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*sqrt(c)*(S(28)*a**S(2)*c**S(2) - S(29)*a*b**S(2)*c + S(5)*b**S(4) - b*(-S(19)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(3)*e*f**S(4)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(S(28)*a**S(2)*c**S(2) - S(29)*a*b**S(2)*c + S(5)*b**S(4) + b*(-S(19)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(3)*e*f**S(4)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(4)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, -S(3)*sqrt(S(2))*sqrt(c)*f**S(4)*(S(4)*a*c + S(3)*b**S(2) + S(2)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(8)*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*sqrt(S(2))*sqrt(c)*f**S(4)*(S(4)*a*c + S(3)*b**S(2) - S(2)*b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(8)*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + f**S(4)*(S(2)*a + b*(d + e*x)**S(2))*(d + e*x)/(e*(-S(16)*a*c + S(4)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) - f**S(4)*(d + e*x)*(-S(4)*a*c + S(7)*b**S(2) + S(12)*b*c*(d + e*x)**S(2))/(S(8)*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(3)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, S(3)*b*c*f**S(3)*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*(-S(4)*a*c + b**S(2))**(S(5)/2)) - S(3)*b*f**S(3)*(b + S(2)*c*(d + e*x)**S(2))/(S(4)*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + f**S(3)*(S(2)*a + b*(d + e*x)**S(2))/(e*(-S(16)*a*c + S(4)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)**S(2)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, -f**S(2)*(b + S(2)*c*(d + e*x)**S(2))*(d + e*x)/(e*(-S(16)*a*c + S(4)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + sqrt(S(2))*sqrt(c)*f**S(2)*(S(20)*a*c + b**S(2) - b*(-S(52)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a*e*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*sqrt(c)*f**S(2)*(S(20)*a*c + b**S(2) + b*(-S(52)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a*e*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + f**S(2)*(d + e*x)*(b*(S(8)*a*c + b**S(2)) + c*(d + e*x)**S(2)*(S(20)*a*c + b**S(2)))/(S(8)*a*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*f + e*f*x)/(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3), x), x, -S(6)*c**S(2)*f*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(e*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*c*f*(b + S(2)*c*(d + e*x)**S(2))/(S(2)*e*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - f*(b + S(2)*c*(d + e*x)**S(2))/(e*(-S(16)*a*c + S(4)*b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(4)*a*e*f*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + (S(16)*a**S(2)*c**S(2) - S(15)*a*b**S(2)*c + S(2)*b**S(4) + S(2)*b*c*(d + e*x)**S(2)*(-S(7)*a*c + b**S(2)))/(S(4)*a**S(2)*e*f*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) + b*(S(30)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(3)*e*f*(-S(4)*a*c + b**S(2))**(S(5)/2)) + log(d + e*x)/(a**S(3)*e*f) - log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a**S(3)*e*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(4)*a*e*f**S(2)*(d + e*x)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + (S(36)*a**S(2)*c**S(2) - S(35)*a*b**S(2)*c + S(5)*b**S(4) + b*c*(d + e*x)**S(2)*(-S(32)*a*c + S(5)*b**S(2)))/(S(8)*a**S(2)*e*f**S(2)*(d + e*x)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - S(3)*sqrt(S(2))*sqrt(c)*((-S(12)*a*c + S(5)*b**S(2))*(-S(5)*a*c + b**S(2)) - (S(124)*a**S(2)*b*c**S(2) - S(47)*a*b**S(3)*c + S(5)*b**S(5))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(3)*e*f**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*sqrt(S(2))*sqrt(c)*(b*(S(124)*a**S(2)*c**S(2) - S(47)*a*b**S(2)*c + S(5)*b**S(4))/sqrt(-S(4)*a*c + b**S(2)) + (-S(12)*a*c + S(5)*b**S(2))*(-S(5)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*(d + e*x)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(3)*e*f**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - (-S(36)*a*c + S(15)*b**S(2))*(-S(5)*a*c + b**S(2))/(S(8)*a**S(3)*e*f**S(2)*(d + e*x)*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*f + e*f*x)**S(3)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(3)), x), x, (-S(2)*a*c + b**S(2) + b*c*(d + e*x)**S(2))/(S(4)*a*e*f**S(3)*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))**S(2)) + (S(20)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4) + S(3)*b*c*(d + e*x)**S(2)*(-S(6)*a*c + b**S(2)))/(S(4)*a**S(2)*e*f**S(3)*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))) - (S(30)*a**S(2)*c**S(2) - S(21)*a*b**S(2)*c + S(3)*b**S(4))/(S(2)*a**S(3)*e*f**S(3)*(d + e*x)**S(2)*(-S(4)*a*c + b**S(2))**S(2)) - S(3)*b*log(d + e*x)/(a**S(4)*e*f**S(3)) + S(3)*b*log(a + b*(d + e*x)**S(2) + c*(d + e*x)**S(4))/(S(4)*a**S(4)*e*f**S(3)) - (-S(60)*a**S(3)*c**S(3) + S(90)*a**S(2)*b**S(2)*c**S(2) - S(30)*a*b**S(4)*c + S(3)*b**S(6))*atanh((b + S(2)*c*(d + e*x)**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(4)*e*f**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x + S(2))**S(6)*((S(3)*x + S(2))**S(14) + (S(3)*x + S(2))**S(7) + S(1)), x), x, (S(3)*x + S(2))**S(21)/S(63) + (S(3)*x + S(2))**S(14)/S(42) + (S(3)*x + S(2))**S(7)/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x + S(2))**S(6)*((S(3)*x + S(2))**S(14) + (S(3)*x + S(2))**S(7) + S(1))**S(2), x), x, (S(3)*x + S(2))**S(35)/S(105) + (S(3)*x + S(2))**S(28)/S(42) + (S(3)*x + S(2))**S(21)/S(21) + (S(3)*x + S(2))**S(14)/S(21) + (S(3)*x + S(2))**S(7)/S(21), expand=True, _diff=True, _numerical=True) def test_2(): assert rubi_test(rubi_integrate((c + d*x**S(2))/(a + b*x**S(4)), x), x, -sqrt(S(2))*(-sqrt(a)*d + sqrt(b)*c)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*x + sqrt(a) + sqrt(b)*x**S(2))/(S(8)*a**(S(3)/4)*b**(S(3)/4)) + sqrt(S(2))*(-sqrt(a)*d + sqrt(b)*c)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*x + sqrt(a) + sqrt(b)*x**S(2))/(S(8)*a**(S(3)/4)*b**(S(3)/4)) - sqrt(S(2))*(sqrt(a)*d + sqrt(b)*c)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*x/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(3)/4)) + sqrt(S(2))*(sqrt(a)*d + sqrt(b)*c)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*x/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c - d*x**S(2))/(a + b*x**S(4)), x), x, -sqrt(S(2))*(-sqrt(a)*d + sqrt(b)*c)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*x/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(3)/4)) + sqrt(S(2))*(-sqrt(a)*d + sqrt(b)*c)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*x/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(3)/4)) - sqrt(S(2))*(sqrt(a)*d + sqrt(b)*c)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*x + sqrt(a) + sqrt(b)*x**S(2))/(S(8)*a**(S(3)/4)*b**(S(3)/4)) + sqrt(S(2))*(sqrt(a)*d + sqrt(b)*c)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*x + sqrt(a) + sqrt(b)*x**S(2))/(S(8)*a**(S(3)/4)*b**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x**S(2))/(a - b*x**S(4)), x), x, (-sqrt(a)*d + sqrt(b)*c)*atan(b**(S(1)/4)*x/a**(S(1)/4))/(S(2)*a**(S(3)/4)*b**(S(3)/4)) + (sqrt(a)*d + sqrt(b)*c)*atanh(b**(S(1)/4)*x/a**(S(1)/4))/(S(2)*a**(S(3)/4)*b**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c - d*x**S(2))/(a - b*x**S(4)), x), x, (-sqrt(a)*d + sqrt(b)*c)*atanh(b**(S(1)/4)*x/a**(S(1)/4))/(S(2)*a**(S(3)/4)*b**(S(3)/4)) + (sqrt(a)*d + sqrt(b)*c)*atan(b**(S(1)/4)*x/a**(S(1)/4))/(S(2)*a**(S(3)/4)*b**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) + S(2))/(S(9)*x**S(4) + S(4)), x), x, sqrt(S(3))*atan(sqrt(S(3))*x + S(-1))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*x + S(1))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(3)*x**S(2) + S(2))/(S(9)*x**S(4) + S(4)), x), x, -sqrt(S(3))*log(S(3)*x**S(2) - S(2)*sqrt(S(3))*x + S(2))/S(12) + sqrt(S(3))*log(S(3)*x**S(2) + S(2)*sqrt(S(3))*x + S(2))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) + S(2))/(-S(9)*x**S(4) + S(4)), x), x, sqrt(S(6))*atanh(sqrt(S(6))*x/S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(3)*x**S(2) + S(2))/(-S(9)*x**S(4) + S(4)), x), x, sqrt(S(6))*atan(sqrt(S(6))*x/S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(a)*sqrt(b) + b*x**S(2))/(a + b*x**S(4)), x), x, -sqrt(S(2))*b**(S(1)/4)*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*x/a**(S(1)/4))/(S(2)*a**(S(1)/4)) + sqrt(S(2))*b**(S(1)/4)*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*x/a**(S(1)/4))/(S(2)*a**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(a)*sqrt(b) - b*x**S(2))/(a + b*x**S(4)), x), x, -sqrt(S(2))*b**(S(1)/4)*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*x + sqrt(a) + sqrt(b)*x**S(2))/(S(4)*a**(S(1)/4)) + sqrt(S(2))*b**(S(1)/4)*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*x + sqrt(a) + sqrt(b)*x**S(2))/(S(4)*a**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(d**S(2) + e**S(2)*x**S(4)), x), x, -sqrt(S(2))*atan(S(1) - sqrt(S(2))*sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*sqrt(e)) + sqrt(S(2))*atan(S(1) + sqrt(S(2))*sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d - e*x**S(2))/(d**S(2) + e**S(2)*x**S(4)), x), x, -sqrt(S(2))*log(-sqrt(S(2))*sqrt(d)*sqrt(e)*x + d + e*x**S(2))/(S(4)*sqrt(d)*sqrt(e)) + sqrt(S(2))*log(sqrt(S(2))*sqrt(d)*sqrt(e)*x + d + e*x**S(2))/(S(4)*sqrt(d)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(5))/(x**S(4) + S(-1)), x), x, -S(3)*atan(x)/S(2) - S(7)*atanh(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/sqrt(a + c*x**S(4)), x), x, -S(3)*a**(S(1)/4)*e*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-a*e**S(2) + S(5)*c*d**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(5)*c**(S(7)/4)*sqrt(a + c*x**S(4))) + a**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*a*e**S(3) + S(15)*c*d**S(2)*e + S(5)*sqrt(c)*d*(-a*e**S(2) + c*d**S(2))/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(10)*c**(S(7)/4)*sqrt(a + c*x**S(4))) + d*e**S(2)*x*sqrt(a + c*x**S(4))/c + e**S(3)*x**S(3)*sqrt(a + c*x**S(4))/(S(5)*c) + S(3)*e*x*sqrt(a + c*x**S(4))*(-a*e**S(2) + S(5)*c*d**S(2))/(S(5)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/sqrt(a + c*x**S(4)), x), x, -S(2)*a**(S(1)/4)*d*e*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(c**(S(3)/4)*sqrt(a + c*x**S(4))) + e**S(2)*x*sqrt(a + c*x**S(4))/(S(3)*c) + S(2)*d*e*x*sqrt(a + c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))) + sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(6)*sqrt(a)*sqrt(c)*d*e - a*e**S(2) + S(3)*c*d**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(6)*a**(S(1)/4)*c**(S(5)/4)*sqrt(a + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(a + c*x**S(4)), x), x, -a**(S(1)/4)*e*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(c**(S(3)/4)*sqrt(a + c*x**S(4))) + a**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*c**(S(3)/4)*sqrt(a + c*x**S(4))) + e*x*sqrt(a + c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + c*x**S(4))*(d + e*x**S(2))), x), x, atan(x*sqrt(a*e/d + c*d/e)/sqrt(a + c*x**S(4)))/(S(2)*d*sqrt(a*e/d + c*d/e)) + c**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*sqrt(a + c*x**S(4))*(-sqrt(a)*e + sqrt(c)*d)) - sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_pi(-sqrt(a)*(-e + sqrt(c)*d/sqrt(a))**S(2)/(S(4)*sqrt(c)*d*e), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(4)*a**(S(1)/4)*c**(S(1)/4)*d*sqrt(a + c*x**S(4))*(-e + sqrt(c)*d/sqrt(a))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + c*x**S(4))*(d + e*x**S(2))**S(2)), x), x, a**(S(1)/4)*c**(S(1)/4)*e*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*d*sqrt(a + c*x**S(4))*(a*e**S(2) + c*d**S(2))) - a**(S(1)/4)*c**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(4)*d*sqrt(a + c*x**S(4))*(a*e**S(2) + c*d**S(2))) - a**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*(a*e**S(2) + S(3)*c*d**S(2))*elliptic_pi(-(-sqrt(a)*e + sqrt(c)*d)**S(2)/(S(4)*sqrt(a)*sqrt(c)*d*e), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(8)*c**(S(1)/4)*d**S(2)*sqrt(a + c*x**S(4))*(-sqrt(a)*e + sqrt(c)*d)*(a*e**S(2) + c*d**S(2))) - sqrt(c)*e*x*sqrt(a + c*x**S(4))/(S(2)*d*(sqrt(a) + sqrt(c)*x**S(2))*(a*e**S(2) + c*d**S(2))) + e**S(2)*x*sqrt(a + c*x**S(4))/(S(2)*d*(d + e*x**S(2))*(a*e**S(2) + c*d**S(2))) + (a*e**S(2) + S(3)*c*d**S(2))*atan(x*sqrt(a*e/d + c*d/e)/sqrt(a + c*x**S(4)))/(S(4)*d**S(3)*e*(a*e/d + c*d/e)**(S(3)/2)) + c**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(a*e**S(2) + S(3)*c*d**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(4)*a**(S(1)/4)*d*sqrt(a + c*x**S(4))*(-sqrt(a)*e + sqrt(c)*d)*(a*e**S(2) + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/sqrt(a - c*x**S(4)), x), x, S(3)*a**(S(3)/4)*e*sqrt(S(1) - c*x**S(4)/a)*(a*e**S(2) + S(5)*c*d**S(2))*elliptic_e(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(S(5)*c**(S(7)/4)*sqrt(a - c*x**S(4))) - a**(S(3)/4)*sqrt(S(1) - c*x**S(4)/a)*(S(3)*a*e**S(3) + S(15)*c*d**S(2)*e - S(5)*sqrt(c)*d*(a*e**S(2) + c*d**S(2))/sqrt(a))*elliptic_f(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(S(5)*c**(S(7)/4)*sqrt(a - c*x**S(4))) - d*e**S(2)*x*sqrt(a - c*x**S(4))/c - e**S(3)*x**S(3)*sqrt(a - c*x**S(4))/(S(5)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/sqrt(a - c*x**S(4)), x), x, S(2)*a**(S(3)/4)*d*e*sqrt(S(1) - c*x**S(4)/a)*elliptic_e(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(c**(S(3)/4)*sqrt(a - c*x**S(4))) + a**(S(1)/4)*sqrt(S(1) - c*x**S(4)/a)*(-S(6)*sqrt(a)*sqrt(c)*d*e + a*e**S(2) + S(3)*c*d**S(2))*elliptic_f(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(S(3)*c**(S(5)/4)*sqrt(a - c*x**S(4))) - e**S(2)*x*sqrt(a - c*x**S(4))/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(a - c*x**S(4)), x), x, a**(S(3)/4)*e*sqrt(S(1) - c*x**S(4)/a)*elliptic_e(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(c**(S(3)/4)*sqrt(a - c*x**S(4))) + a**(S(3)/4)*sqrt(S(1) - c*x**S(4)/a)*(-e + sqrt(c)*d/sqrt(a))*elliptic_f(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(c**(S(3)/4)*sqrt(a - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a - c*x**S(4))*(d + e*x**S(2))), x), x, a**(S(1)/4)*sqrt(S(1) - c*x**S(4)/a)*elliptic_pi(-sqrt(a)*e/(sqrt(c)*d), asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(c**(S(1)/4)*d*sqrt(a - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a - c*x**S(4))*(d + e*x**S(2))**S(2)), x), x, -a**(S(3)/4)*c**(S(1)/4)*e*sqrt(S(1) - c*x**S(4)/a)*elliptic_e(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(S(2)*d*sqrt(a - c*x**S(4))*(-a*e**S(2) + c*d**S(2))) - a**(S(1)/4)*c**(S(1)/4)*sqrt(S(1) - c*x**S(4)/a)*elliptic_f(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(S(2)*d*sqrt(a - c*x**S(4))*(sqrt(a)*e + sqrt(c)*d)) + a**(S(1)/4)*sqrt(S(1) - c*x**S(4)/a)*(-a*e**S(2) + S(3)*c*d**S(2))*elliptic_pi(-sqrt(a)*e/(sqrt(c)*d), asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(S(2)*c**(S(1)/4)*d**S(2)*sqrt(a - c*x**S(4))*(-a*e**S(2) + c*d**S(2))) - e**S(2)*x*sqrt(a - c*x**S(4))/(S(2)*d*(d + e*x**S(2))*(-a*e**S(2) + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(-a + c*x**S(4)), x), x, a**(S(3)/4)*e*sqrt(S(1) - c*x**S(4)/a)*elliptic_e(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(c**(S(3)/4)*sqrt(-a + c*x**S(4))) + a**(S(3)/4)*sqrt(S(1) - c*x**S(4)/a)*(-e + sqrt(c)*d/sqrt(a))*elliptic_f(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(c**(S(3)/4)*sqrt(-a + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(-a + c*x**S(4))*(d + e*x**S(2))), x), x, a**(S(1)/4)*sqrt(S(1) - c*x**S(4)/a)*elliptic_pi(-sqrt(a)*e/(sqrt(c)*d), asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(c**(S(1)/4)*d*sqrt(-a + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(a) + sqrt(c)*x**S(2))/sqrt(-a + c*x**S(4)), x), x, a**(S(3)/4)*sqrt(S(1) - c*x**S(4)/a)*elliptic_e(asin(c**(S(1)/4)*x/a**(S(1)/4)), S(-1))/(c**(S(1)/4)*sqrt(-a + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2)*sqrt(c/a) + S(1))/sqrt(-a + c*x**S(4)), x), x, sqrt(S(1) - c*x**S(4)/a)*elliptic_e(asin(x*(c/a)**(S(1)/4)), S(-1))/((c/a)**(S(1)/4)*sqrt(-a + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(-a - c*x**S(4)), x), x, -a**(S(1)/4)*e*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(c**(S(3)/4)*sqrt(-a - c*x**S(4))) + a**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*c**(S(3)/4)*sqrt(-a - c*x**S(4))) - e*x*sqrt(-a - c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(-a - c*x**S(4))*(d + e*x**S(2))), x), x, atan(x*sqrt(-a*e/d - c*d/e)/sqrt(-a - c*x**S(4)))/(S(2)*d*sqrt(-a*e/d - c*d/e)) + c**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*sqrt(-a - c*x**S(4))*(-sqrt(a)*e + sqrt(c)*d)) - sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_pi(-sqrt(a)*(-e + sqrt(c)*d/sqrt(a))**S(2)/(S(4)*sqrt(c)*d*e), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(4)*a**(S(1)/4)*c**(S(1)/4)*d*sqrt(-a - c*x**S(4))*(-e + sqrt(c)*d/sqrt(a))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x**S(2))*sqrt(-S(5)*x**S(4) + S(4))), x), x, sqrt(S(2))*S(5)**(S(3)/4)*elliptic_pi(-S(2)*sqrt(S(5))*b/(S(5)*a), asin(sqrt(S(2))*S(5)**(S(1)/4)*x/S(2)), S(-1))/(S(10)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x**S(2))*sqrt(S(5)*x**S(4) + S(4))), x), x, sqrt(S(2))*S(5)**(S(1)/4)*sqrt((S(5)*x**S(4) + S(4))/(sqrt(S(5))*x**S(2) + S(2))**S(2))*(sqrt(S(5))*x**S(2) + S(2))*elliptic_f(S(2)*atan(sqrt(S(2))*S(5)**(S(1)/4)*x/S(2)), S(1)/2)/(S(4)*sqrt(S(5)*x**S(4) + S(4))*(sqrt(S(5))*a - S(2)*b)) - sqrt(S(2))*S(5)**(S(3)/4)*sqrt((S(5)*x**S(4) + S(4))/(sqrt(S(5))*x**S(2) + S(2))**S(2))*(sqrt(S(5))*a + S(2)*b)*(sqrt(S(5))*x**S(2) + S(2))*elliptic_pi(-sqrt(S(5))*(sqrt(S(5))*a - S(2)*b)**S(2)/(S(40)*a*b), S(2)*atan(sqrt(S(2))*S(5)**(S(1)/4)*x/S(2)), S(1)/2)/(S(40)*a*sqrt(S(5)*x**S(4) + S(4))*(sqrt(S(5))*a - S(2)*b)) + atan(x*sqrt(S(5)*a/b + S(4)*b/a)/sqrt(S(5)*x**S(4) + S(4)))/(S(2)*a*sqrt(S(5)*a/b + S(4)*b/a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x**S(2))*sqrt(-d*x**S(4) + S(4))), x), x, sqrt(S(2))*elliptic_pi(-S(2)*b/(a*sqrt(d)), asin(sqrt(S(2))*d**(S(1)/4)*x/S(2)), S(-1))/(S(2)*a*d**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x**S(2))*sqrt(d*x**S(4) + S(4))), x), x, -sqrt(S(2))*d**(S(1)/4)*sqrt((d*x**S(4) + S(4))/(sqrt(d)*x**S(2) + S(2))**S(2))*(sqrt(d)*x**S(2) + S(2))*elliptic_f(S(2)*atan(sqrt(S(2))*d**(S(1)/4)*x/S(2)), S(1)/2)/(S(4)*(-a*sqrt(d) + S(2)*b)*sqrt(d*x**S(4) + S(4))) + atan(x*sqrt(a*d/b + S(4)*b/a)/sqrt(d*x**S(4) + S(4)))/(S(2)*a*sqrt(a*d/b + S(4)*b/a)) + sqrt(S(2))*sqrt((d*x**S(4) + S(4))/(sqrt(d)*x**S(2) + S(2))**S(2))*(a*sqrt(d) + S(2)*b)*(sqrt(d)*x**S(2) + S(2))*elliptic_pi(-(-a*sqrt(d) + S(2)*b)**S(2)/(S(8)*a*b*sqrt(d)), S(2)*atan(sqrt(S(2))*d**(S(1)/4)*x/S(2)), S(1)/2)/(S(8)*a*d**(S(1)/4)*(-a*sqrt(d) + S(2)*b)*sqrt(d*x**S(4) + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c**S(2)*x**S(2) + S(1))/sqrt(-c**S(2)*x**S(2) + S(1)), x), x, elliptic_e(asin(c*x), S(-1))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c**S(2)*x**S(2) + S(1))/sqrt(-c**S(4)*x**S(4) + S(1)), x), x, elliptic_e(asin(c*x), S(-1))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-c**S(2)*x**S(2) + S(1))/sqrt(c**S(2)*x**S(2) + S(1)), x), x, -elliptic_e(asin(c*x), S(-1))/c + S(2)*elliptic_f(asin(c*x), S(-1))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-c**S(2)*x**S(2) + S(1))/sqrt(-c**S(4)*x**S(4) + S(1)), x), x, -elliptic_e(asin(c*x), S(-1))/c + S(2)*elliptic_f(asin(c*x), S(-1))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + S(1))/sqrt(-b**S(2)*x**S(4) + S(1)), x), x, elliptic_e(asin(sqrt(b)*x), S(-1))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-b*x**S(2) + S(1))/sqrt(-b**S(2)*x**S(4) + S(1)), x), x, -elliptic_e(asin(sqrt(b)*x), S(-1))/sqrt(b) + S(2)*elliptic_f(asin(sqrt(b)*x), S(-1))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + S(1))/sqrt(b**S(2)*x**S(4) + S(-1)), x), x, sqrt(-b**S(2)*x**S(4) + S(1))*elliptic_e(asin(sqrt(b)*x), S(-1))/(sqrt(b)*sqrt(b**S(2)*x**S(4) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-b*x**S(2) + S(1))/sqrt(b**S(2)*x**S(4) + S(-1)), x), x, -sqrt(-b**S(2)*x**S(4) + S(1))*elliptic_e(asin(sqrt(b)*x), S(-1))/(sqrt(b)*sqrt(b**S(2)*x**S(4) + S(-1))) + S(2)*sqrt(-b**S(2)*x**S(4) + S(1))*elliptic_f(asin(sqrt(b)*x), S(-1))/(sqrt(b)*sqrt(b**S(2)*x**S(4) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-b*x**S(2) + S(1))/sqrt(b**S(2)*x**S(4) + S(1)), x), x, -x*sqrt(b**S(2)*x**S(4) + S(1))/(b*x**S(2) + S(1)) + sqrt((b**S(2)*x**S(4) + S(1))/(b*x**S(2) + S(1))**S(2))*(b*x**S(2) + S(1))*elliptic_e(S(2)*atan(sqrt(b)*x), S(1)/2)/(sqrt(b)*sqrt(b**S(2)*x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + S(1))/sqrt(b**S(2)*x**S(4) + S(1)), x), x, x*sqrt(b**S(2)*x**S(4) + S(1))/(b*x**S(2) + S(1)) - sqrt((b**S(2)*x**S(4) + S(1))/(b*x**S(2) + S(1))**S(2))*(b*x**S(2) + S(1))*elliptic_e(S(2)*atan(sqrt(b)*x), S(1)/2)/(sqrt(b)*sqrt(b**S(2)*x**S(4) + S(1))) + sqrt((b**S(2)*x**S(4) + S(1))/(b*x**S(2) + S(1))**S(2))*(b*x**S(2) + S(1))*elliptic_f(S(2)*atan(sqrt(b)*x), S(1)/2)/(sqrt(b)*sqrt(b**S(2)*x**S(4) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-b*x**S(2) + S(1))/sqrt(-b**S(2)*x**S(4) + S(-1)), x), x, x*sqrt(-b**S(2)*x**S(4) + S(-1))/(b*x**S(2) + S(1)) + sqrt((b**S(2)*x**S(4) + S(1))/(b*x**S(2) + S(1))**S(2))*(b*x**S(2) + S(1))*elliptic_e(S(2)*atan(sqrt(b)*x), S(1)/2)/(sqrt(b)*sqrt(-b**S(2)*x**S(4) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x**S(2) + S(1))/sqrt(-b**S(2)*x**S(4) + S(-1)), x), x, -x*sqrt(-b**S(2)*x**S(4) + S(-1))/(b*x**S(2) + S(1)) - sqrt((b**S(2)*x**S(4) + S(1))/(b*x**S(2) + S(1))**S(2))*(b*x**S(2) + S(1))*elliptic_e(S(2)*atan(sqrt(b)*x), S(1)/2)/(sqrt(b)*sqrt(-b**S(2)*x**S(4) + S(-1))) + sqrt((b**S(2)*x**S(4) + S(1))/(b*x**S(2) + S(1))**S(2))*(b*x**S(2) + S(1))*elliptic_f(S(2)*atan(sqrt(b)*x), S(1)/2)/(sqrt(b)*sqrt(-b**S(2)*x**S(4) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(4)/(-d**S(2) + e**S(2)*x**S(4)), x), x, -S(8)*d**(S(5)/2)*atanh(sqrt(e)*x/sqrt(d))/sqrt(e) + S(7)*d**S(2)*x + S(4)*d*e*x**S(3)/S(3) + e**S(2)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/(-d**S(2) + e**S(2)*x**S(4)), x), x, -S(4)*d**(S(3)/2)*atanh(sqrt(e)*x/sqrt(d))/sqrt(e) + S(3)*d*x + e*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/(-d**S(2) + e**S(2)*x**S(4)), x), x, -S(2)*sqrt(d)*atanh(sqrt(e)*x/sqrt(d))/sqrt(e) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(-d**S(2) + e**S(2)*x**S(4)), x), x, -atanh(sqrt(e)*x/sqrt(d))/(sqrt(d)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*(-d**S(2) + e**S(2)*x**S(4))), x), x, -x/(S(4)*d**S(2)*(d + e*x**S(2))) - atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(5)/2)*sqrt(e)) - atanh(sqrt(e)*x/sqrt(d))/(S(4)*d**(S(5)/2)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**S(2)*(-d**S(2) + e**S(2)*x**S(4))), x), x, -x/(S(8)*d**S(2)*(d + e*x**S(2))**S(2)) - S(5)*x/(S(16)*d**S(3)*(d + e*x**S(2))) - S(7)*atan(sqrt(e)*x/sqrt(d))/(S(16)*d**(S(7)/2)*sqrt(e)) - atanh(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(7)/2)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(3)/2)/(-d**S(2) + e**S(2)*x**S(4)), x), x, atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/sqrt(e) - sqrt(S(2))*atanh(sqrt(S(2))*sqrt(e)*x/sqrt(d + e*x**S(2)))/sqrt(e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))/(-d**S(2) + e**S(2)*x**S(4)), x), x, -sqrt(S(2))*atanh(sqrt(S(2))*sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*d*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d + e*x**S(2))*(-d**S(2) + e**S(2)*x**S(4))), x), x, -x/(S(2)*d**S(2)*sqrt(d + e*x**S(2))) - sqrt(S(2))*atanh(sqrt(S(2))*sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(4)*d**S(2)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**(S(3)/2)*(-d**S(2) + e**S(2)*x**S(4))), x), x, -x/(S(6)*d**S(2)*(d + e*x**S(2))**(S(3)/2)) - S(7)*x/(S(12)*d**S(3)*sqrt(d + e*x**S(2))) - sqrt(S(2))*atanh(sqrt(S(2))*sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(8)*d**S(3)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(4)/(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4)), x), x, e**S(2)*x**S(5)/(S(5)*c) + e*x**S(3)*(-b*e + S(4)*c*d)/(S(3)*c**S(2)) + x*(b**S(2)*e**S(2) - S(5)*b*c*d*e + S(7)*c**S(2)*d**S(2))/c**S(3) - (-b*e + S(2)*c*d)**S(3)*atanh(sqrt(c)*sqrt(e)*x/sqrt(-b*e + c*d))/(c**(S(7)/2)*sqrt(e)*sqrt(-b*e + c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4)), x), x, e*x**S(3)/(S(3)*c) + x*(-b*e + S(3)*c*d)/c**S(2) - (-b*e + S(2)*c*d)**S(2)*atanh(sqrt(c)*sqrt(e)*x/sqrt(-b*e + c*d))/(c**(S(5)/2)*sqrt(e)*sqrt(-b*e + c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4)), x), x, x/c - (-b*e + S(2)*c*d)*atanh(sqrt(c)*sqrt(e)*x/sqrt(-b*e + c*d))/(c**(S(3)/2)*sqrt(e)*sqrt(-b*e + c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4)), x), x, -atanh(sqrt(c)*sqrt(e)*x/sqrt(-b*e + c*d))/(sqrt(c)*sqrt(e)*sqrt(-b*e + c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4))), x), x, -c**(S(3)/2)*atanh(sqrt(c)*sqrt(e)*x/sqrt(-b*e + c*d))/(sqrt(e)*sqrt(-b*e + c*d)*(-b*e + S(2)*c*d)**S(2)) - x/(S(2)*d*(d + e*x**S(2))*(-b*e + S(2)*c*d)) - (-b*e + S(4)*c*d)*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(3)/2)*sqrt(e)*(-b*e + S(2)*c*d)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**S(2)*(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4))), x), x, -c**(S(5)/2)*atanh(sqrt(c)*sqrt(e)*x/sqrt(-b*e + c*d))/(sqrt(e)*sqrt(-b*e + c*d)*(-b*e + S(2)*c*d)**S(3)) - x/(S(4)*d*(d + e*x**S(2))**S(2)*(-b*e + S(2)*c*d)) - x*(-S(3)*b*e + S(10)*c*d)/(S(8)*d**S(2)*(d + e*x**S(2))*(-b*e + S(2)*c*d)**S(2)) - (S(3)*b**S(2)*e**S(2) - S(16)*b*c*d*e + S(28)*c**S(2)*d**S(2))*atan(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(5)/2)*sqrt(e)*(-b*e + S(2)*c*d)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(5)/2)/(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4)), x), x, x*sqrt(d + e*x**S(2))/(S(2)*c) + (-S(2)*b*e + S(5)*c*d)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c**S(2)*sqrt(e)) - (-b*e + S(2)*c*d)**(S(3)/2)*atanh(sqrt(e)*x*sqrt(-b*e + S(2)*c*d)/(sqrt(d + e*x**S(2))*sqrt(-b*e + c*d)))/(c**S(2)*sqrt(e)*sqrt(-b*e + c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(3)/2)/(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4)), x), x, atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(c*sqrt(e)) - sqrt(-b*e + S(2)*c*d)*atanh(sqrt(e)*x*sqrt(-b*e + S(2)*c*d)/(sqrt(d + e*x**S(2))*sqrt(-b*e + c*d)))/(c*sqrt(e)*sqrt(-b*e + c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))/(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4)), x), x, -atanh(sqrt(e)*x*sqrt(-b*e + S(2)*c*d)/(sqrt(d + e*x**S(2))*sqrt(-b*e + c*d)))/(sqrt(e)*sqrt(-b*e + c*d)*sqrt(-b*e + S(2)*c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d + e*x**S(2))*(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4))), x), x, -c*atanh(sqrt(e)*x*sqrt(-b*e + S(2)*c*d)/(sqrt(d + e*x**S(2))*sqrt(-b*e + c*d)))/(sqrt(e)*sqrt(-b*e + c*d)*(-b*e + S(2)*c*d)**(S(3)/2)) - x/(d*sqrt(d + e*x**S(2))*(-b*e + S(2)*c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**(S(3)/2)*(b*d*e + b*e**S(2)*x**S(2) - c*d**S(2) + c*e**S(2)*x**S(4))), x), x, -c**S(2)*atanh(sqrt(e)*x*sqrt(-b*e + S(2)*c*d)/(sqrt(d + e*x**S(2))*sqrt(-b*e + c*d)))/(sqrt(e)*sqrt(-b*e + c*d)*(-b*e + S(2)*c*d)**(S(5)/2)) - x/(S(3)*d*(d + e*x**S(2))**(S(3)/2)*(-b*e + S(2)*c*d)) - x*(-S(2)*b*e + S(7)*c*d)/(S(3)*d**S(2)*sqrt(d + e*x**S(2))*(-b*e + S(2)*c*d)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(b*x**S(2) + d**S(2) + e**S(2)*x**S(4)), x), x, -atan((-S(2)*e*x + sqrt(-b + S(2)*d*e))/sqrt(b + S(2)*d*e))/sqrt(b + S(2)*d*e) + atan((S(2)*e*x + sqrt(-b + S(2)*d*e))/sqrt(b + S(2)*d*e))/sqrt(b + S(2)*d*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(-b*x**S(2) + d**S(2) + e**S(2)*x**S(4)), x), x, atanh((-S(2)*e*x + sqrt(b + S(2)*d*e))/sqrt(b - S(2)*d*e))/sqrt(b - S(2)*d*e) - atanh((S(2)*e*x + sqrt(b + S(2)*d*e))/sqrt(b - S(2)*d*e))/sqrt(b - S(2)*d*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(d**S(2) + e**S(2)*x**S(4) + f*x**S(2)), x), x, -atan((-S(2)*e*x + sqrt(S(2)*d*e - f))/sqrt(S(2)*d*e + f))/sqrt(S(2)*d*e + f) + atan((S(2)*e*x + sqrt(S(2)*d*e - f))/sqrt(S(2)*d*e + f))/sqrt(S(2)*d*e + f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(d**S(2) + e**S(2)*x**S(4) - f*x**S(2)), x), x, -atan((-S(2)*e*x + sqrt(S(2)*d*e + f))/sqrt(S(2)*d*e - f))/sqrt(S(2)*d*e - f) + atan((S(2)*e*x + sqrt(S(2)*d*e + f))/sqrt(S(2)*d*e - f))/sqrt(S(2)*d*e - f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d - e*x**S(2))/(b*x**S(2) + d**S(2) + e**S(2)*x**S(4)), x), x, -log(d + e*x**S(2) - x*sqrt(-b + S(2)*d*e))/(S(2)*sqrt(-b + S(2)*d*e)) + log(d + e*x**S(2) + x*sqrt(-b + S(2)*d*e))/(S(2)*sqrt(-b + S(2)*d*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d - e*x**S(2))/(-b*x**S(2) + d**S(2) + e**S(2)*x**S(4)), x), x, -log(d + e*x**S(2) - x*sqrt(b + S(2)*d*e))/(S(2)*sqrt(b + S(2)*d*e)) + log(d + e*x**S(2) + x*sqrt(b + S(2)*d*e))/(S(2)*sqrt(b + S(2)*d*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d - e*x**S(2))/(d**S(2) + e**S(2)*x**S(4) + f*x**S(2)), x), x, -log(d + e*x**S(2) - x*sqrt(S(2)*d*e - f))/(S(2)*sqrt(S(2)*d*e - f)) + log(d + e*x**S(2) + x*sqrt(S(2)*d*e - f))/(S(2)*sqrt(S(2)*d*e - f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d - e*x**S(2))/(d**S(2) + e**S(2)*x**S(4) - f*x**S(2)), x), x, -log(d + e*x**S(2) - x*sqrt(S(2)*d*e + f))/(S(2)*sqrt(S(2)*d*e + f)) + log(d + e*x**S(2) + x*sqrt(S(2)*d*e + f))/(S(2)*sqrt(S(2)*d*e + f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d - e*x**S(2))/(b*x**S(2) + c*d**S(2)/e**S(2) + c*x**S(4)), x), x, -e**(S(3)/2)*log(sqrt(c)*d + sqrt(c)*e*x**S(2) - sqrt(e)*x*sqrt(-b*e + S(2)*c*d))/(S(2)*sqrt(c)*sqrt(-b*e + S(2)*c*d)) + e**(S(3)/2)*log(sqrt(c)*d + sqrt(c)*e*x**S(2) + sqrt(e)*x*sqrt(-b*e + S(2)*c*d))/(S(2)*sqrt(c)*sqrt(-b*e + S(2)*c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(b*x**S(2) + c*d**S(2)/e**S(2) + c*x**S(4)), x), x, -e**(S(3)/2)*atan((-S(2)*sqrt(c)*sqrt(e)*x + sqrt(-b*e + S(2)*c*d))/sqrt(b*e + S(2)*c*d))/(sqrt(c)*sqrt(b*e + S(2)*c*d)) + e**(S(3)/2)*atan((S(2)*sqrt(c)*sqrt(e)*x + sqrt(-b*e + S(2)*c*d))/sqrt(b*e + S(2)*c*d))/(sqrt(c)*sqrt(b*e + S(2)*c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(b*x**S(2) + c*(d**S(2)/e**S(2) + x**S(4))), x), x, -e**(S(3)/2)*atan((-S(2)*sqrt(c)*sqrt(e)*x + sqrt(-b*e + S(2)*c*d))/sqrt(b*e + S(2)*c*d))/(sqrt(c)*sqrt(b*e + S(2)*c*d)) + e**(S(3)/2)*atan((S(2)*sqrt(c)*sqrt(e)*x + sqrt(-b*e + S(2)*c*d))/sqrt(b*e + S(2)*c*d))/(sqrt(c)*sqrt(b*e + S(2)*c*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - b*x**S(2))/(a**S(2) + b**S(2)*x**S(4) + x**S(2)*(S(2)*a*b + S(-1))), x), x, -log(a + b*x**S(2) - x)/S(2) + log(a + b*x**S(2) + x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(a**S(2) + b**S(2)*x**S(4) + x**S(2)*(S(2)*a*b + S(-1))), x), x, atanh((-S(2)*b*x + S(1))/sqrt(-S(4)*a*b + S(1)))/sqrt(-S(4)*a*b + S(1)) - atanh((S(2)*b*x + S(1))/sqrt(-S(4)*a*b + S(1)))/sqrt(-S(4)*a*b + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(b*x**S(2) + S(4)*x**S(4) + S(1)), x), x, -atan((-S(4)*x + sqrt(-b + S(4)))/sqrt(b + S(4)))/sqrt(b + S(4)) + atan((S(4)*x + sqrt(-b + S(4)))/sqrt(b + S(4)))/sqrt(b + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(-b*x**S(2) + S(4)*x**S(4) + S(1)), x), x, -atan((-S(4)*x + sqrt(b + S(4)))/sqrt(-b + S(4)))/sqrt(-b + S(4)) + atan((S(4)*x + sqrt(b + S(4)))/sqrt(-b + S(4)))/sqrt(-b + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(6)*x**S(2) + S(1)), x), x, sqrt(S(10))*atan(S(2)*x/sqrt(-sqrt(S(5)) + S(3)))/S(10) + sqrt(S(10))*atan(S(2)*x/sqrt(sqrt(S(5)) + S(3)))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(5)*x**S(2) + S(1)), x), x, atan(x)/S(3) + atan(S(2)*x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(4)*x**S(2) + S(1)), x), x, sqrt(S(2))*atan(sqrt(S(2))*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(3)*x**S(2) + S(1)), x), x, -sqrt(S(7))*atan(sqrt(S(7))*(-S(4)*x + S(1))/S(7))/S(7) + sqrt(S(7))*atan(sqrt(S(7))*(S(4)*x + S(1))/S(7))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(2)*x**S(2) + S(1)), x), x, -sqrt(S(6))*atan(sqrt(S(6))*(-S(4)*x + sqrt(S(2)))/S(6))/S(6) + sqrt(S(6))*atan(sqrt(S(6))*(S(4)*x + sqrt(S(2)))/S(6))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + x**S(2) + S(1)), x), x, -sqrt(S(5))*atan(sqrt(S(5))*(-S(4)*x + sqrt(S(3)))/S(5))/S(5) + sqrt(S(5))*atan(sqrt(S(5))*(S(4)*x + sqrt(S(3)))/S(5))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(1)), x), x, atan(S(2)*x + S(-1))/S(2) + atan(S(2)*x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - x**S(2) + S(1)), x), x, -sqrt(S(3))*atan(sqrt(S(3))*(-S(4)*x + sqrt(S(5)))/S(3))/S(3) + sqrt(S(3))*atan(sqrt(S(3))*(S(4)*x + sqrt(S(5)))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(2)*x**S(2) + S(1)), x), x, -sqrt(S(2))*atan(sqrt(S(2))*(-S(4)*x + sqrt(S(6)))/S(2))/S(2) + sqrt(S(2))*atan(sqrt(S(2))*(S(4)*x + sqrt(S(6)))/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(3)*x**S(2) + S(1)), x), x, atan(S(4)*x - sqrt(S(7))) + atan(S(4)*x + sqrt(S(7))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(4)*x**S(2) + S(1)), x), x, x/(-S(2)*x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(5)*x**S(2) + S(1)), x), x, -log(-S(2)*x**S(2) - x + S(1))/S(2) + log(-S(2)*x**S(2) + x + S(1))/S(2), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(5)*x**S(2) + S(1)), x), x, -log(-S(2)*x + S(1))/S(2) + log(-x + S(1))/S(2) - log(x + S(1))/S(2) + log(S(2)*x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(6)*x**S(2) + S(1)), x), x, -sqrt(S(10))*log(S(2)*x**S(2) - sqrt(S(10))*x + S(1))/S(20) + sqrt(S(10))*log(S(2)*x**S(2) + sqrt(S(10))*x + S(1))/S(20), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(6)*x**S(2) + S(1)), x), x, sqrt(S(2))*atanh(sqrt(S(2))*(-S(4)*x + sqrt(S(10)))/S(2))/S(2) - sqrt(S(2))*atanh(sqrt(S(2))*(S(4)*x + sqrt(S(10)))/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(b*x**S(2) + S(4)*x**S(4) + S(1)), x), x, -log(S(2)*x**S(2) - x*sqrt(-b + S(4)) + S(1))/(S(2)*sqrt(-b + S(4))) + log(S(2)*x**S(2) + x*sqrt(-b + S(4)) + S(1))/(S(2)*sqrt(-b + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(6)*x**S(2) + S(1)), x), x, sqrt(S(2))*atan(S(2)*x/sqrt(-sqrt(S(5)) + S(3)))/S(2) - sqrt(S(2))*atan(S(2)*x/sqrt(sqrt(S(5)) + S(3)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(5)*x**S(2) + S(1)), x), x, -atan(x) + atan(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(4)*x**S(2) + S(1)), x), x, x/(S(2)*x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(3)*x**S(2) + S(1)), x), x, -log(S(2)*x**S(2) - x + S(1))/S(2) + log(S(2)*x**S(2) + x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(2)*x**S(2) + S(1)), x), x, -sqrt(S(2))*log(S(2)*x**S(2) - sqrt(S(2))*x + S(1))/S(4) + sqrt(S(2))*log(S(2)*x**S(2) + sqrt(S(2))*x + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + x**S(2) + S(1)), x), x, -sqrt(S(3))*log(S(2)*x**S(2) - sqrt(S(3))*x + S(1))/S(6) + sqrt(S(3))*log(S(2)*x**S(2) + sqrt(S(3))*x + S(1))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) + S(1)), x), x, -log(S(2)*x**S(2) - S(2)*x + S(1))/S(4) + log(S(2)*x**S(2) + S(2)*x + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - x**S(2) + S(1)), x), x, -sqrt(S(5))*log(S(2)*x**S(2) - sqrt(S(5))*x + S(1))/S(10) + sqrt(S(5))*log(S(2)*x**S(2) + sqrt(S(5))*x + S(1))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(2)*x**S(2) + S(1)), x), x, -sqrt(S(6))*log(S(2)*x**S(2) - sqrt(S(6))*x + S(1))/S(12) + sqrt(S(6))*log(S(2)*x**S(2) + sqrt(S(6))*x + S(1))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(3)*x**S(2) + S(1)), x), x, -sqrt(S(7))*log(S(2)*x**S(2) - sqrt(S(7))*x + S(1))/S(14) + sqrt(S(7))*log(S(2)*x**S(2) + sqrt(S(7))*x + S(1))/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(4)*x**S(2) + S(1)), x), x, sqrt(S(2))*atanh(sqrt(S(2))*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(5)*x**S(2) + S(1)), x), x, -log(S(2)*x**S(2) - S(3)*x + S(1))/S(6) + log(S(2)*x**S(2) + S(3)*x + S(1))/S(6), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(5)*x**S(2) + S(1)), x), x, atanh(x)/S(3) + atanh(S(2)*x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(6)*x**S(2) + S(1)), x), x, -sqrt(S(10))*log(S(2)*x**S(2) - sqrt(S(10))*x + S(1))/S(20) + sqrt(S(10))*log(S(2)*x**S(2) + sqrt(S(10))*x + S(1))/S(20), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-S(2)*x**S(2) + S(1))/(S(4)*x**S(4) - S(6)*x**S(2) + S(1)), x), x, sqrt(S(10))*atanh(S(2)*x/sqrt(-sqrt(S(5)) + S(3)))/S(10) + sqrt(S(10))*atanh(S(2)*x/sqrt(sqrt(S(5)) + S(3)))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(b*x**S(2) + x**S(4) + S(1)), x), x, -atan((-S(2)*x + sqrt(-b + S(2)))/sqrt(b + S(2)))/sqrt(b + S(2)) + atan((S(2)*x + sqrt(-b + S(2)))/sqrt(b + S(2)))/sqrt(b + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) + S(5)*x**S(2) + S(1)), x), x, sqrt(S(7))*atan(x*sqrt(sqrt(S(21))/S(2) + S(5)/2))/S(7) + sqrt(S(7))*atan(sqrt(S(2))*x/sqrt(sqrt(S(21)) + S(5)))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) + S(4)*x**S(2) + S(1)), x), x, sqrt(S(6))*atan(x/sqrt(-sqrt(S(3)) + S(2)))/S(6) + sqrt(S(6))*atan(x/sqrt(sqrt(S(3)) + S(2)))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) + S(3)*x**S(2) + S(1)), x), x, sqrt(S(5))*atan(x*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(5) + sqrt(S(5))*atan(sqrt(S(2))*x/sqrt(sqrt(S(5)) + S(3)))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) + x**S(2) + S(1)), x), x, -sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(3) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) + S(1)), x), x, sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(2) + sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) - x**S(2) + S(1)), x), x, atan(S(2)*x - sqrt(S(3))) + atan(S(2)*x + sqrt(S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) - S(2)*x**S(2) + S(1)), x), x, x/(-x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) - S(3)*x**S(2) + S(1)), x), x, atanh(-S(2)*x + sqrt(S(5))) - atanh(S(2)*x + sqrt(S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) - S(4)*x**S(2) + S(1)), x), x, sqrt(S(2))*atanh(-sqrt(S(2))*x + sqrt(S(3)))/S(2) - sqrt(S(2))*atanh(sqrt(S(2))*x + sqrt(S(3)))/S(2), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) - S(4)*x**S(2) + S(1)), x), x, sqrt(S(2))*atanh(sqrt(S(2))*(-S(2)*x + sqrt(S(6)))/S(2))/S(2) - sqrt(S(2))*atanh(sqrt(S(2))*(S(2)*x + sqrt(S(6)))/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(4) - S(5)*x**S(2) + S(1)), x), x, sqrt(S(3))*atanh(sqrt(S(3))*(-S(2)*x + sqrt(S(7)))/S(3))/S(3) - sqrt(S(3))*atanh(sqrt(S(3))*(S(2)*x + sqrt(S(7)))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(b*x**S(2) + x**S(4) + S(1)), x), x, -log(x**S(2) - x*sqrt(-b + S(2)) + S(1))/(S(2)*sqrt(-b + S(2))) + log(x**S(2) + x*sqrt(-b + S(2)) + S(1))/(S(2)*sqrt(-b + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) + S(5)*x**S(2) + S(1)), x), x, sqrt(S(3))*atan(x*sqrt(sqrt(S(21))/S(2) + S(5)/2))/S(3) - sqrt(S(3))*atan(sqrt(S(2))*x/sqrt(sqrt(S(21)) + S(5)))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) + S(4)*x**S(2) + S(1)), x), x, sqrt(S(2))*atan(x/sqrt(-sqrt(S(3)) + S(2)))/S(2) - sqrt(S(2))*atan(x/sqrt(sqrt(S(3)) + S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) + S(3)*x**S(2) + S(1)), x), x, atan(x*sqrt(sqrt(S(5))/S(2) + S(3)/2)) - atan(sqrt(S(2))*x/sqrt(sqrt(S(5)) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, x/(x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) + x**S(2) + S(1)), x), x, -log(x**S(2) - x + S(1))/S(2) + log(x**S(2) + x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) + S(1)), x), x, -sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(4) + sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) - x**S(2) + S(1)), x), x, -sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(6) + sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) - S(2)*x**S(2) + S(1)), x), x, atanh(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) - S(3)*x**S(2) + S(1)), x), x, -sqrt(S(5))*log(x**S(2) - sqrt(S(5))*x + S(1))/S(10) + sqrt(S(5))*log(x**S(2) + sqrt(S(5))*x + S(1))/S(10), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) - S(3)*x**S(2) + S(1)), x), x, sqrt(S(5))*atanh(x*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(5) + sqrt(S(5))*atanh(sqrt(S(2))*x/sqrt(sqrt(S(5)) + S(3)))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) - S(4)*x**S(2) + S(1)), x), x, -sqrt(S(6))*log(x**S(2) - sqrt(S(6))*x + S(1))/S(12) + sqrt(S(6))*log(x**S(2) + sqrt(S(6))*x + S(1))/S(12), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) - S(4)*x**S(2) + S(1)), x), x, sqrt(S(6))*atanh(x/sqrt(-sqrt(S(3)) + S(2)))/S(6) + sqrt(S(6))*atanh(x/sqrt(sqrt(S(3)) + S(2)))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) - S(5)*x**S(2) + S(1)), x), x, -sqrt(S(7))*log(x**S(2) - sqrt(S(7))*x + S(1))/S(14) + sqrt(S(7))*log(x**S(2) + sqrt(S(7))*x + S(1))/S(14), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-x**S(2) + S(1))/(x**S(4) - S(5)*x**S(2) + S(1)), x), x, sqrt(S(7))*atanh(x*sqrt(sqrt(S(21))/S(2) + S(5)/2))/S(7) + sqrt(S(7))*atanh(sqrt(S(2))*x/sqrt(sqrt(S(21)) + S(5)))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(4)*(a + b*x**S(2) + c*x**S(4)), x), x, a*d**S(4)*x + c*e**S(4)*x**S(13)/S(13) + d**S(3)*x**S(3)*(S(4)*a*e + b*d)/S(3) + d**S(2)*x**S(5)*(S(6)*a*e**S(2) + S(4)*b*d*e + c*d**S(2))/S(5) + S(2)*d*e*x**S(7)*(S(2)*c*d**S(2) + e*(S(2)*a*e + S(3)*b*d))/S(7) + e**S(3)*x**S(11)*(b*e + S(4)*c*d)/S(11) + e**S(2)*x**S(9)*(S(6)*c*d**S(2) + e*(a*e + S(4)*b*d))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)*(a + b*x**S(2) + c*x**S(4)), x), x, a*d**S(3)*x + c*e**S(3)*x**S(11)/S(11) + d**S(2)*x**S(3)*(S(3)*a*e + b*d)/S(3) + d*x**S(5)*(c*d**S(2) + S(3)*e*(a*e + b*d))/S(5) + e**S(2)*x**S(9)*(b*e + S(3)*c*d)/S(9) + e*x**S(7)*(S(3)*c*d**S(2) + e*(a*e + S(3)*b*d))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4)), x), x, a*d**S(2)*x + c*e**S(2)*x**S(9)/S(9) + d*x**S(3)*(S(2)*a*e + b*d)/S(3) + e*x**S(7)*(b*e + S(2)*c*d)/S(7) + x**S(5)*(c*d**S(2) + e*(a*e + S(2)*b*d))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4)), x), x, a*d*x + c*e*x**S(7)/S(7) + x**S(5)*(b*e + c*d)/S(5) + x**S(3)*(a*e + b*d)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2)), x), x, c*x**S(3)/(S(3)*e) - x*(-b*e + c*d)/e**S(2) + (a*e**S(2) - b*d*e + c*d**S(2))*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(2), x), x, c*x/e**S(2) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*d*e**S(2)*(d + e*x**S(2))) - (S(3)*c*d**S(2) - e*(a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(3)/2)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(3), x), x, x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(4)*d*e**S(2)*(d + e*x**S(2))**S(2)) - x*(S(5)*c*d**S(2) - e*(S(3)*a*e + b*d))/(S(8)*d**S(2)*e**S(2)*(d + e*x**S(2))) + (S(3)*c*d**S(2) + e*(S(3)*a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(5)/2)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(4), x), x, x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(6)*d*e**S(2)*(d + e*x**S(2))**S(3)) - x*(S(7)*c*d**S(2) - e*(S(5)*a*e + b*d))/(S(24)*d**S(2)*e**S(2)*(d + e*x**S(2))**S(2)) + x*(c*d**S(2) + e*(S(5)*a*e + b*d))/(S(16)*d**S(3)*e**S(2)*(d + e*x**S(2))) + (c*d**S(2) + e*(S(5)*a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(16)*d**(S(7)/2)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*d**S(3)*x + a*d**S(2)*x**S(3)*(S(3)*a*e + S(2)*b*d)/S(3) + c**S(2)*e**S(3)*x**S(15)/S(15) + c*e**S(2)*x**S(13)*(S(2)*b*e + S(3)*c*d)/S(13) + d*x**S(5)*(S(6)*a*b*d*e + a*(S(3)*a*e**S(2) + S(2)*c*d**S(2)) + b**S(2)*d**S(2))/S(5) + e*x**S(11)*(b**S(2)*e**S(2) + S(3)*c**S(2)*d**S(2) + S(2)*c*e*(a*e + S(3)*b*d))/S(11) + x**S(9)*(b*e**S(2)*(S(2)*a*e + S(3)*b*d)/S(9) + c**S(2)*d**S(3)/S(9) + S(2)*c*d*e*(a*e + b*d)/S(3)) + x**S(7)*(a**S(2)*e**S(3)/S(7) + S(6)*a*b*d*e**S(2)/S(7) + S(6)*a*c*d**S(2)*e/S(7) + S(3)*b**S(2)*d**S(2)*e/S(7) + S(2)*b*c*d**S(3)/S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*d**S(2)*x + S(2)*a*d*x**S(3)*(a*e + b*d)/S(3) + c**S(2)*e**S(2)*x**S(13)/S(13) + S(2)*c*e*x**S(11)*(b*e + c*d)/S(11) + x**S(9)*(b**S(2)*e**S(2)/S(9) + c**S(2)*d**S(2)/S(9) + S(2)*c*e*(a*e + S(2)*b*d)/S(9)) + x**S(7)*(S(2)*a*b*e**S(2)/S(7) + S(4)*a*c*d*e/S(7) + S(2)*b**S(2)*d*e/S(7) + S(2)*b*c*d**S(2)/S(7)) + x**S(5)*(S(4)*a*b*d*e/S(5) + a*(a*e**S(2) + S(2)*c*d**S(2))/S(5) + b**S(2)*d**S(2)/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*d*x + a*x**S(3)*(a*e + S(2)*b*d)/S(3) + c**S(2)*e*x**S(11)/S(11) + c*x**S(9)*(S(2)*b*e + c*d)/S(9) + x**S(7)*(S(2)*a*c*e/S(7) + b**S(2)*e/S(7) + S(2)*b*c*d/S(7)) + x**S(5)*(S(2)*a*b*e/S(5) + S(2)*a*c*d/S(5) + b**S(2)*d/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*x + S(2)*a*b*x**S(3)/S(3) + S(2)*b*c*x**S(7)/S(7) + c**S(2)*x**S(9)/S(9) + x**S(5)*(S(2)*a*c/S(5) + b**S(2)/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/(d + e*x**S(2)), x), x, c**S(2)*x**S(7)/(S(7)*e) - c*x**S(5)*(-S(2)*b*e + c*d)/(S(5)*e**S(2)) + x**S(3)*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - S(2)*c*e*(-a*e + b*d))/(S(3)*e**S(3)) - x*(-b*e + c*d)*(c*d**S(2) - e*(-S(2)*a*e + b*d))/e**S(4) + (a*e**S(2) - b*d*e + c*d**S(2))**S(2)*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*e**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/(d + e*x**S(2))**S(2), x), x, c**S(2)*x**S(7)/(S(5)*e*(d + e*x**S(2))) - c*x**S(3)*(-S(10)*b*e + S(7)*c*d)/(S(15)*e**S(3)) + x*(S(5)*b**S(2)*e**S(2) + S(14)*c**S(2)*d**S(2) - S(10)*c*e*(-a*e + S(2)*b*d))/(S(5)*e**S(4)) + x*(S(7)*c**S(2)*d**S(4) - S(10)*c*d**S(2)*e*(-a*e + b*d) + S(5)*e**S(2)*(-a*e + b*d)**S(2))/(S(10)*d*e**S(4)*(d + e*x**S(2))) - (S(7)*c*d**S(2) - e*(a*e + S(3)*b*d))*(a*e**S(2) - b*d*e + c*d**S(2))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(3)/2)*e**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/(d + e*x**S(2))**S(3), x), x, c**S(2)*x**S(7)/(S(3)*e*(d + e*x**S(2))**S(2)) - c*x*(-S(6)*b*e + S(7)*c*d)/(S(3)*e**S(4)) + x*(S(7)*c**S(2)*d**S(4) - S(6)*c*d**S(2)*e*(-a*e + b*d) + S(3)*e**S(2)*(-a*e + b*d)**S(2))/(S(12)*d*e**S(4)*(d + e*x**S(2))**S(2)) - x*(S(21)*c**S(2)*d**S(4) - S(2)*c*d**S(2)*e*(-S(5)*a*e + S(9)*b*d) + e**S(2)*(-S(3)*a**S(2)*e**S(2) - S(2)*a*b*d*e + S(5)*b**S(2)*d**S(2)))/(S(8)*d**S(2)*e**S(4)*(d + e*x**S(2))) + (S(35)*c**S(2)*d**S(4) - S(6)*c*d**S(2)*e*(-a*e + S(5)*b*d) + e**S(2)*(S(3)*a**S(2)*e**S(2) + S(2)*a*b*d*e + S(3)*b**S(2)*d**S(2)))*atan(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(5)/2)*e**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/(d + e*x**S(2))**S(4), x), x, c**S(2)*x**S(7)/(e*(d + e*x**S(2))**S(3)) + x*(S(7)*c**S(2)*d**S(4) - S(2)*c*d**S(2)*e*(-a*e + b*d) + e**S(2)*(-a*e + b*d)**S(2))/(S(6)*d*e**S(4)*(d + e*x**S(2))**S(3)) - x*(S(91)*c**S(2)*d**S(4) - S(2)*c*d**S(2)*e*(-S(7)*a*e + S(13)*b*d) + e**S(2)*(-S(5)*a**S(2)*e**S(2) - S(2)*a*b*d*e + S(7)*b**S(2)*d**S(2)))/(S(24)*d**S(2)*e**S(4)*(d + e*x**S(2))**S(2)) + x*(S(77)*c**S(2)*d**S(4) - S(2)*c*d**S(2)*e*(-a*e + S(11)*b*d) + e**S(2)*(S(5)*a**S(2)*e**S(2) + S(2)*a*b*d*e + b**S(2)*d**S(2)))/(S(16)*d**S(3)*e**S(4)*(d + e*x**S(2))) - (S(35)*c**S(2)*d**S(4) - S(2)*c*d**S(2)*e*(a*e + S(5)*b*d) - e**S(2)*(S(5)*a**S(2)*e**S(2) + S(2)*a*b*d*e + b**S(2)*d**S(2)))*atan(sqrt(e)*x/sqrt(d))/(S(16)*d**(S(7)/2)*e**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)/(d + e*x**S(2))**S(5), x), x, -c**S(2)*x**S(7)/(e*(d + e*x**S(2))**S(4)) - x*(S(7)*c**S(2)*d**S(4) + S(2)*c*d**S(2)*e*(-a*e + b*d) - e**S(2)*(-a*e + b*d)**S(2))/(S(8)*d*e**S(4)*(d + e*x**S(2))**S(4)) + x*(S(119)*c**S(2)*d**S(4) + S(2)*c*d**S(2)*e*(-S(9)*a*e + S(17)*b*d) - e**S(2)*(-S(7)*a**S(2)*e**S(2) - S(2)*a*b*d*e + S(9)*b**S(2)*d**S(2)))/(S(48)*d**S(2)*e**S(4)*(d + e*x**S(2))**S(3)) - x*(S(413)*c**S(2)*d**S(4) + S(2)*c*d**S(2)*e*(-S(3)*a*e + S(59)*b*d) - e**S(2)*(S(35)*a**S(2)*e**S(2) + S(10)*a*b*d*e + S(3)*b**S(2)*d**S(2)))/(S(192)*d**S(3)*e**S(4)*(d + e*x**S(2))**S(2)) + x*(S(35)*c**S(2)*d**S(4) + S(2)*c*d**S(2)*e*(S(3)*a*e + S(5)*b*d) + e**S(2)*(S(35)*a**S(2)*e**S(2) + S(10)*a*b*d*e + S(3)*b**S(2)*d**S(2)))/(S(128)*d**S(4)*e**S(4)*(d + e*x**S(2))) + (S(35)*c**S(2)*d**S(4) + S(2)*c*d**S(2)*e*(S(3)*a*e + S(5)*b*d) + e**S(2)*(S(35)*a**S(2)*e**S(2) + S(10)*a*b*d*e + S(3)*b**S(2)*d**S(2)))*atan(sqrt(e)*x/sqrt(d))/(S(128)*d**(S(9)/2)*e**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(2), x), x, c*x/e**S(2) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*d*e**S(2)*(d + e*x**S(2))) - (S(3)*c*d**S(2) - e*(a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(3)/2)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2)*(b + c*x**S(2)))/(d + e*x**S(2))**S(2), x), x, c*x/e**S(2) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*d*e**S(2)*(d + e*x**S(2))) - (S(3)*c*d**S(2) - e*(a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(3)/2)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(4)/(a + b*x**S(2) + c*x**S(4)), x), x, e**S(4)*x**S(5)/(S(5)*c) + e**S(3)*x**S(3)*(-b*e + S(4)*c*d)/(S(3)*c**S(2)) + e**S(2)*x*(b**S(2)*e**S(2) + S(6)*c**S(2)*d**S(2) - c*e*(a*e + S(4)*b*d))/c**S(3) + sqrt(S(2))*(e*(-b*e + S(2)*c*d)*(b**S(2)*e**S(2) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d)) - (b**S(4)*e**S(4) - S(4)*b**S(2)*c*e**S(3)*(a*e + b*d) + S(2)*c**S(4)*d**S(4) - S(4)*c**S(3)*d**S(2)*e*(S(3)*a*e + b*d) + S(2)*c**S(2)*e**S(2)*(a**S(2)*e**S(2) + S(6)*a*b*d*e + S(3)*b**S(2)*d**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(7)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(e*(-b*e + S(2)*c*d)*(b**S(2)*e**S(2) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d)) + (b**S(4)*e**S(4) - S(4)*b**S(2)*c*e**S(3)*(a*e + b*d) + S(2)*c**S(4)*d**S(4) - S(4)*c**S(3)*d**S(2)*e*(S(3)*a*e + b*d) + S(2)*c**S(2)*e**S(2)*(a**S(2)*e**S(2) + S(6)*a*b*d*e + S(3)*b**S(2)*d**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(7)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/(a + b*x**S(2) + c*x**S(4)), x), x, e**S(3)*x**S(3)/(S(3)*c) + e**S(2)*x*(-b*e + S(3)*c*d)/c**S(2) + sqrt(S(2))*(e*(b**S(2)*e**S(2) + S(3)*c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d)) - (-b*e + S(2)*c*d)*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - c*e*(S(3)*a*e + b*d))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(e*(b**S(2)*e**S(2) + S(3)*c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d)) + (-b*e + S(2)*c*d)*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - c*e*(S(3)*a*e + b*d))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/(a + b*x**S(2) + c*x**S(4)), x), x, e**S(2)*x/c + sqrt(S(2))*(e*(-b*e + S(2)*c*d) - (b**S(2)*e**S(2) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(e*(-b*e + S(2)*c*d) + (b**S(2)*e**S(2) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, sqrt(S(2))*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(S(2))*sqrt(c)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(S(2))*sqrt(c)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) + e**(S(3)/2)*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(S(2))*sqrt(c)*(b*e**S(2)*(b - sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d - d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + sqrt(S(2))*sqrt(c)*(b*e**S(2)*(b + sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d + d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + e**S(2)*x/(S(2)*d*(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + e**(S(3)/2)*(-b*e + S(2)*c*d)*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + e**(S(3)/2)*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(3)/2)*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, x*(-a*b*e*(a*e**S(2) + S(3)*c*d**S(2)) - S(2)*a*c*d*(-S(3)*a*e**S(2) + c*d**S(2)) + b**S(2)*c*d**S(3) - x**S(2)*(a*b**S(2)*e**S(3) + S(2)*a*c*e*(-a*e**S(2) + S(3)*c*d**S(2)) - b*c*d*(S(3)*a*e**S(2) + c*d**S(2))))/(S(2)*a*c*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(a*b**S(3)*e**S(3) + S(6)*a*c*(a*e**S(2) + c*d**S(2))*(S(2)*c*d - e*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*(-S(3)*a*c*d*e**S(2) - a*e**S(3)*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*d**S(3)) + b*c*(a*e**S(2)*(-S(8)*a*e + S(3)*d*sqrt(-S(4)*a*c + b**S(2))) + c*d**S(2)*(-S(12)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*(a*b**S(3)*e**S(3) + S(6)*a*c*(a*e**S(2) + c*d**S(2))*(S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*(-S(3)*a*c*d*e**S(2) + a*e**S(3)*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*d**S(3)) - b*c*(a*e**S(2)*(S(8)*a*e + S(3)*d*sqrt(-S(4)*a*c + b**S(2))) + c*d**S(2)*(S(12)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, x*(-S(2)*a*b*d*e - S(2)*a*(-a*e**S(2) + c*d**S(2)) + b**S(2)*d**S(2) + x**S(2)*(a*b*e**S(2) - S(4)*a*c*d*e + b*c*d**S(2)))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(-S(4)*a*c*(S(3)*c*d**S(2) - e*(-a*e + d*sqrt(-S(4)*a*c + b**S(2)))) + b**S(2)*(-a*e**S(2) + c*d**S(2)) - b*(a*e**S(2)*sqrt(-S(4)*a*c + b**S(2)) + c*d*(-S(8)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(-S(4)*a*c*(S(3)*c*d**S(2) + e*(a*e + d*sqrt(-S(4)*a*c + b**S(2)))) + b**S(2)*(-a*e**S(2) + c*d**S(2)) + b*(a*e**S(2)*sqrt(-S(4)*a*c + b**S(2)) + c*d*(S(8)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, sqrt(S(2))*sqrt(c)*(-S(2)*a*e + b*d - (S(4)*a*b*e - S(12)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*(-S(2)*a*e + b*d + (S(4)*a*b*e - S(12)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + x*(-a*b*e - S(2)*a*c*d + b**S(2)*d + c*x**S(2)*(-S(2)*a*e + b*d))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(-2)), x), x, -sqrt(S(2))*sqrt(c)*(-S(12)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(-S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, -sqrt(S(2))*sqrt(c)*e**S(2)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) - sqrt(S(2))*sqrt(c)*e**S(2)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + e**(S(7)/2)*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + sqrt(S(2))*sqrt(c)*(S(2)*a*c*e - b**S(2)*e + b*c*d - (S(8)*a*b*c*e - S(12)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(S(2))*sqrt(c)*(S(2)*a*c*e - b**S(2)*e + b*c*d + (S(8)*a*b*c*e - S(12)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + x*(S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d + c*x**S(2)*(S(2)*a*c*e - b**S(2)*e + b*c*d))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, -sqrt(S(2))*sqrt(c)*e**S(2)*(b*e**S(2)*(b - sqrt(-S(4)*a*c + b**S(2))) + S(3)*c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d - S(2)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + sqrt(S(2))*sqrt(c)*e**S(2)*(b*e**S(2)*(b + sqrt(-S(4)*a*c + b**S(2))) + S(3)*c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d + S(2)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + e**S(4)*x/(S(2)*d*(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + S(2)*e**(S(7)/2)*(-b*e + S(2)*c*d)*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + e**(S(7)/2)*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(3)/2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) - sqrt(S(2))*sqrt(c)*(-S(4)*a*c**S(2)*(S(3)*c*d**S(2) + e*(-S(3)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))) + b**S(4)*e**S(2) - b**S(3)*e*(S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*c*(c*d**S(2) + e*(-S(9)*a*e + S(2)*d*sqrt(-S(4)*a*c + b**S(2)))) + b*c*(S(3)*a*e**S(2)*sqrt(-S(4)*a*c + b**S(2)) - c*d*(-S(16)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + sqrt(S(2))*sqrt(c)*(-S(4)*a*c**S(2)*(S(3)*c*d**S(2) - e*(S(3)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))) + b**S(4)*e**S(2) - b**S(3)*e*(S(2)*c*d - e*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*c*(c*d**S(2) - e*(S(9)*a*e + S(2)*d*sqrt(-S(4)*a*c + b**S(2)))) - b*c*(S(3)*a*e**S(2)*sqrt(-S(4)*a*c + b**S(2)) - c*d*(S(16)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) - x*(-S(6)*a*b*c**S(2)*d*e + S(2)*a*c**S(2)*(-a*e**S(2) + c*d**S(2)) - b**S(4)*e**S(2) + S(2)*b**S(3)*c*d*e - b**S(2)*c*(-S(4)*a*e**S(2) + c*d**S(2)) + c*x**S(2)*(-S(4)*a*c**S(2)*d*e - b**S(3)*e**S(2) + S(2)*b**S(2)*c*d*e - b*c*(-S(3)*a*e**S(2) + c*d**S(2))))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(3))/(x**S(4) - S(2)*x**S(2) + S(1)), x), x, S(5)*x/(-S(2)*x**S(2) + S(2)) + atanh(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) + S(2))/(S(3)*x**S(4) - S(8)*x**S(2) + S(5)), x), x, S(5)*atanh(x)/S(2) - S(7)*sqrt(S(15))*atanh(sqrt(S(15))*x/S(5))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(S(3)*x**S(4) - S(8)*x**S(2) + S(5)), x), x, (d/S(2) + e/S(2))*atanh(x) - sqrt(S(15))*(S(3)*d + S(5)*e)*atanh(sqrt(S(15))*x/S(5))/S(30), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(3))/(x**S(4) + S(3)*x**S(2) + S(1)), x), x, sqrt(S(10))*(sqrt(S(5)) + S(3))**(S(3)/2)*atan(x*sqrt(sqrt(S(5))/S(2) + S(3)/2))/S(20) - sqrt(-S(80)*sqrt(S(5)) + S(180))*atan(sqrt(S(2))*x/sqrt(sqrt(S(5)) + S(3)))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(4) + x**S(2) + S(1)), x), x, -(a/S(4) - b/S(4))*log(x**S(2) - x + S(1)) + (a/S(4) - b/S(4))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(a + b)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*(a + b)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(4) + x**S(2) + S(1))**S(2), x), x, x*(a + b - x**S(2)*(a - S(2)*b))/(S(6)*x**S(4) + S(6)*x**S(2) + S(6)) - (a/S(4) - b/S(8))*log(x**S(2) - x + S(1)) + (a/S(4) - b/S(8))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(4)*a + b)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(36) + sqrt(S(3))*(S(4)*a + b)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(36), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(4) + x**S(2) + S(2)), x), x, -(a - sqrt(S(2))*b)*log(x**S(2) - x*sqrt(S(-1) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(4)*sqrt(S(-2) + S(4)*sqrt(S(2)))) + (a - sqrt(S(2))*b)*log(x**S(2) + x*sqrt(S(-1) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(4)*sqrt(S(-2) + S(4)*sqrt(S(2)))) - sqrt(S(-1)/14 + sqrt(S(2))/S(7))*(a + sqrt(S(2))*b)*atan((-S(2)*x + sqrt(S(-1) + S(2)*sqrt(S(2))))/sqrt(S(1) + S(2)*sqrt(S(2))))/S(2) + sqrt(S(-1)/14 + sqrt(S(2))/S(7))*(a + sqrt(S(2))*b)*atan((S(2)*x + sqrt(S(-1) + S(2)*sqrt(S(2))))/sqrt(S(1) + S(2)*sqrt(S(2))))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(4) + x**S(2) + S(2))**S(2), x), x, x*(S(3)*a + S(2)*b - x**S(2)*(a - S(4)*b))/(S(28)*x**S(4) + S(28)*x**S(2) + S(56)) - sqrt(S(-1)/14 + sqrt(S(2))/S(7))*(a*(-sqrt(S(2)) + S(11)) - b*(-S(4)*sqrt(S(2)) + S(2)))*atan((-S(2)*x + sqrt(S(-1) + S(2)*sqrt(S(2))))/sqrt(S(1) + S(2)*sqrt(S(2))))/S(56) + sqrt(S(-1)/14 + sqrt(S(2))/S(7))*(a*(-sqrt(S(2)) + S(11)) - b*(-S(4)*sqrt(S(2)) + S(2)))*atan((S(2)*x + sqrt(S(-1) + S(2)*sqrt(S(2))))/sqrt(S(1) + S(2)*sqrt(S(2))))/S(56) - (S(11)*a - S(2)*b + sqrt(S(2))*(a - S(4)*b))*log(x**S(2) - x*sqrt(S(-1) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(112)*sqrt(S(-2) + S(4)*sqrt(S(2)))) + (a*(sqrt(S(2)) + S(11)) - S(4)*sqrt(S(2))*b - S(2)*b)*log(x**S(2) + x*sqrt(S(-1) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(112)*sqrt(S(-2) + S(4)*sqrt(S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + sqrt(S(2)))/(x**S(4) - sqrt(S(2))*x**S(2) + S(1)), x), x, -sqrt(sqrt(S(2))/S(2) + S(1))*log(x**S(2) - x*sqrt(sqrt(S(2)) + S(2)) + S(1))/S(4) + sqrt(sqrt(S(2))/S(2) + S(1))*log(x**S(2) + x*sqrt(sqrt(S(2)) + S(2)) + S(1))/S(4) - atan((-S(2)*x + sqrt(sqrt(S(2)) + S(2)))/sqrt(-sqrt(S(2)) + S(2)))/(S(2)*sqrt(sqrt(S(2)) + S(2))) + atan((S(2)*x + sqrt(sqrt(S(2)) + S(2)))/sqrt(-sqrt(S(2)) + S(2)))/(S(2)*sqrt(sqrt(S(2)) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + sqrt(S(2)))/(x**S(4) + sqrt(S(2))*x**S(2) + S(1)), x), x, -sqrt(-sqrt(S(2))/S(2) + S(1))*log(x**S(2) - x*sqrt(-sqrt(S(2)) + S(2)) + S(1))/S(4) + sqrt(-sqrt(S(2))/S(2) + S(1))*log(x**S(2) + x*sqrt(-sqrt(S(2)) + S(2)) + S(1))/S(4) - atan((-S(2)*x + sqrt(-sqrt(S(2)) + S(2)))/sqrt(sqrt(S(2)) + S(2)))/(S(2)*sqrt(-sqrt(S(2)) + S(2))) + atan((S(2)*x + sqrt(-sqrt(S(2)) + S(2)))/sqrt(sqrt(S(2)) + S(2)))/(S(2)*sqrt(-sqrt(S(2)) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + sqrt(S(2)))/(b*x**S(2) + x**S(4) + S(1)), x), x, (-sqrt(S(2)) + S(1))*atan((-S(2)*x + sqrt(-b + S(2)))/sqrt(b + S(2)))/(S(2)*sqrt(b + S(2))) - (-sqrt(S(2)) + S(1))*atan((S(2)*x + sqrt(-b + S(2)))/sqrt(b + S(2)))/(S(2)*sqrt(b + S(2))) - (S(1) + sqrt(S(2)))*log(x**S(2) - x*sqrt(-b + S(2)) + S(1))/(S(4)*sqrt(-b + S(2))) + (S(1) + sqrt(S(2)))*log(x**S(2) + x*sqrt(-b + S(2)) + S(1))/(S(4)*sqrt(-b + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + sqrt(S(2)))/(b*x**S(2) + x**S(4) + S(1)), x), x, -(S(1) + sqrt(S(2)))*atan((-S(2)*x + sqrt(-b + S(2)))/sqrt(b + S(2)))/(S(2)*sqrt(b + S(2))) + (S(1) + sqrt(S(2)))*atan((S(2)*x + sqrt(-b + S(2)))/sqrt(b + S(2)))/(S(2)*sqrt(b + S(2))) + (-sqrt(S(2)) + S(1))*log(x**S(2) - x*sqrt(-b + S(2)) + S(1))/(S(4)*sqrt(-b + S(2))) - (-sqrt(S(2)) + S(1))*log(x**S(2) + x*sqrt(-b + S(2)) + S(1))/(S(4)*sqrt(-b + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*a - x**S(2))/(a**S(2) - a*x**S(2) + x**S(4)), x), x, -sqrt(S(3))*log(-sqrt(S(3))*sqrt(a)*x + a + x**S(2))/(S(4)*sqrt(a)) + sqrt(S(3))*log(sqrt(S(3))*sqrt(a)*x + a + x**S(2))/(S(4)*sqrt(a)) - atan((sqrt(S(3))*sqrt(a) - S(2)*x)/sqrt(a))/(S(2)*sqrt(a)) + atan((sqrt(S(3))*sqrt(a) + S(2)*x)/sqrt(a))/(S(2)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*sqrt(a) - x**S(2))/(-sqrt(a)*x**S(2) + a + x**S(4)), x), x, -sqrt(S(3))*log(-sqrt(S(3))*a**(S(1)/4)*x + sqrt(a) + x**S(2))/(S(4)*a**(S(1)/4)) + sqrt(S(3))*log(sqrt(S(3))*a**(S(1)/4)*x + sqrt(a) + x**S(2))/(S(4)*a**(S(1)/4)) - atan((sqrt(S(3))*a**(S(1)/4) - S(2)*x)/a**(S(1)/4))/(S(2)*a**(S(1)/4)) + atan((sqrt(S(3))*a**(S(1)/4) + S(2)*x)/a**(S(1)/4))/(S(2)*a**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*b**(S(2)/3) + x**S(2))/(b**(S(4)/3) + b**(S(2)/3)*x**S(2) + x**S(4)), x), x, -log(b**(S(2)/3) - b**(S(1)/3)*x + x**S(2))/(S(4)*b**(S(1)/3)) + log(b**(S(2)/3) + b**(S(1)/3)*x + x**S(2))/(S(4)*b**(S(1)/3)) - sqrt(S(3))*atan(sqrt(S(3))*(b**(S(1)/3) - S(2)*x)/(S(3)*b**(S(1)/3)))/(S(2)*b**(S(1)/3)) + sqrt(S(3))*atan(sqrt(S(3))*(b**(S(1)/3) + S(2)*x)/(S(3)*b**(S(1)/3)))/(S(2)*b**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(a**S(2) - a*x**S(2) + x**S(4)), x), x, -sqrt(S(3))*(A - B*a)*log(-sqrt(S(3))*sqrt(a)*x + a + x**S(2))/(S(12)*a**(S(3)/2)) + sqrt(S(3))*(A - B*a)*log(sqrt(S(3))*sqrt(a)*x + a + x**S(2))/(S(12)*a**(S(3)/2)) - (A + B*a)*atan((sqrt(S(3))*sqrt(a) - S(2)*x)/sqrt(a))/(S(2)*a**(S(3)/2)) + (A + B*a)*atan((sqrt(S(3))*sqrt(a) + S(2)*x)/sqrt(a))/(S(2)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(-sqrt(a)*x**S(2) + a + x**S(4)), x), x, -sqrt(S(3))*(A - B*sqrt(a))*log(-sqrt(S(3))*a**(S(1)/4)*x + sqrt(a) + x**S(2))/(S(12)*a**(S(3)/4)) + sqrt(S(3))*(A - B*sqrt(a))*log(sqrt(S(3))*a**(S(1)/4)*x + sqrt(a) + x**S(2))/(S(12)*a**(S(3)/4)) - (A + B*sqrt(a))*atan((sqrt(S(3))*a**(S(1)/4) - S(2)*x)/a**(S(1)/4))/(S(2)*a**(S(3)/4)) + (A + B*sqrt(a))*atan((sqrt(S(3))*a**(S(1)/4) + S(2)*x)/a**(S(1)/4))/(S(2)*a**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(a + c*x**S(4) - x**S(2)*sqrt(a*c)), x), x, -(A - B*sqrt(a)/sqrt(c))*log(sqrt(a) + sqrt(c)*x**S(2) - x*sqrt(S(2)*sqrt(a)*sqrt(c) + sqrt(a*c)))/(S(4)*sqrt(a)*sqrt(S(2)*sqrt(a)*sqrt(c) + sqrt(a*c))) + (A - B*sqrt(a)/sqrt(c))*log(sqrt(a) + sqrt(c)*x**S(2) + x*sqrt(S(2)*sqrt(a)*sqrt(c) + sqrt(a*c)))/(S(4)*sqrt(a)*sqrt(S(2)*sqrt(a)*sqrt(c) + sqrt(a*c))) - (A*sqrt(c) + B*sqrt(a))*atan((-S(2)*sqrt(c)*x + sqrt(S(2)*sqrt(a)*sqrt(c) + sqrt(a*c)))/sqrt(S(2)*sqrt(a)*sqrt(c) - sqrt(a*c)))/(S(2)*sqrt(a)*sqrt(c)*sqrt(S(2)*sqrt(a)*sqrt(c) - sqrt(a*c))) + (A*sqrt(c) + B*sqrt(a))*atan((S(2)*sqrt(c)*x + sqrt(S(2)*sqrt(a)*sqrt(c) + sqrt(a*c)))/sqrt(S(2)*sqrt(a)*sqrt(c) - sqrt(a*c)))/(S(2)*sqrt(a)*sqrt(c)*sqrt(S(2)*sqrt(a)*sqrt(c) - sqrt(a*c))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(-sqrt(a)*sqrt(c)*x**S(2) + a + c*x**S(4)), x), x, -sqrt(S(3))*(A - B*sqrt(a)/sqrt(c))*log(-sqrt(S(3))*a**(S(1)/4)*c**(S(1)/4)*x + sqrt(a) + sqrt(c)*x**S(2))/(S(12)*a**(S(3)/4)*c**(S(1)/4)) + sqrt(S(3))*(A - B*sqrt(a)/sqrt(c))*log(sqrt(S(3))*a**(S(1)/4)*c**(S(1)/4)*x + sqrt(a) + sqrt(c)*x**S(2))/(S(12)*a**(S(3)/4)*c**(S(1)/4)) - (A*sqrt(c) + B*sqrt(a))*atan((sqrt(S(3))*a**(S(1)/4) - S(2)*c**(S(1)/4)*x)/a**(S(1)/4))/(S(2)*a**(S(3)/4)*c**(S(3)/4)) + (A*sqrt(c) + B*sqrt(a))*atan((sqrt(S(3))*a**(S(1)/4) + S(2)*c**(S(1)/4)*x)/a**(S(1)/4))/(S(2)*a**(S(3)/4)*c**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))**S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, S(125)*x**S(3)*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/S(9) + S(577)*x*(x**S(2) + S(2))/(S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(S(757)*x**S(2) + S(2608))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(21) + S(275)*x*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/S(7) - S(577)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(2945)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(21)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))**S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, S(31)*x*(x**S(2) + S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + x*(S(114)*x**S(2) + S(407))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(21) + S(25)*x*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/S(7) - S(31)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + S(472)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(21)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))*sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, S(5)*x*(x**S(2) + S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + x*(S(3)*x**S(2) + S(10))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(3) - S(5)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + S(11)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, x*(x**S(2) + S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(3) - sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + S(2)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(5)*x**S(2) + S(7)), x), x, x*(x**S(2) + S(2))/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(3)*x**S(2) + S(3))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(70)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt((x**S(2) + S(2))/(S(2)*x**S(2) + S(2)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(5)*x**S(2) + S(7)), x), x, x*(x**S(2) + S(2))/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(4)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(25)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(3)*x**S(2) + S(3))*elliptic_f(atan(x), S(1)/2)/(S(50)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*(S(3)*x**S(2) + S(6))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(70)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(5)*x**S(2) + S(7))**S(2), x), x, x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(70)*x**S(2) + S(98)) - x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(70)*x**S(2) + S(70)) + sqrt(S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))*elliptic_e(atan(x), S(1)/2)/(S(70)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))) + S(3)*sqrt(S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))*elliptic_f(atan(x), S(1)/2)/(S(280)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))) - sqrt(S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(1960)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))**S(3)*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2), x), x, S(125)*x**S(3)*(x**S(4) + S(3)*x**S(2) + S(2))**(S(5)/2)/S(13) + S(20884)*x*(x**S(2) + S(2))/(S(65)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(S(65345)*x**S(2) + S(208212))*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/S(3003) + x*(S(297911)*x**S(2) + S(1032541))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(5005) + S(3825)*x*(x**S(4) + S(3)*x**S(2) + S(2))**(S(5)/2)/S(143) - S(20884)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(65)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(1171349)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(5005)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))**S(2)*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2), x), x, S(742)*x*(x**S(2) + S(2))/(S(15)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(S(2240)*x**S(2) + S(7281))*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/S(693) + x*(S(10643)*x**S(2) + S(36783))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(1155) + S(25)*x*(x**S(4) + S(3)*x**S(2) + S(2))**(S(5)/2)/S(11) - S(742)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(15)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(13879)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(385)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2), x), x, S(116)*x*(x**S(2) + S(2))/(S(15)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(S(35)*x**S(2) + S(108))*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/S(63) + x*(S(149)*x**S(2) + S(519))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(105) - S(116)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(15)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(197)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(35)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2), x), x, S(6)*x*(x**S(2) + S(2))/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(S(9)*x**S(2) + S(29))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(35) + x*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/S(7) - S(6)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(31)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(35)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/(S(5)*x**S(2) + S(7)), x), x, x**S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(25) + S(24)*x*(x**S(2) + S(2))/(S(125)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(11)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(75) - S(24)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(125)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(47)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(375)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + (S(24)*x**S(2) + S(24))*elliptic_pi(S(-3)/7, atan(sqrt(S(2))*x/S(2)), S(-1))/(S(875)*sqrt((x**S(2) + S(1))/(x**S(2) + S(2)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)/(S(5)*x**S(2) + S(7))**S(2), x), x, x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(75) - S(3)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(875)*x**S(2) + S(1225)) + S(9)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(175)*x**S(2) + S(175)) + S(8)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))*elliptic_pi(S(-3)/7, atan(sqrt(S(2))*x/S(2)), S(-1))/(S(875)*sqrt((x**S(2) + S(1))/(x**S(2) + S(2)))*(x**S(2) + S(2))) - S(9)*sqrt(S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))*elliptic_e(atan(x), S(1)/2)/(sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(175)*x**S(2) + S(175))) + S(211)*sqrt(S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))*elliptic_f(atan(x), S(1)/2)/(S(10500)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))) + S(129)*sqrt(S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(24500)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(9)*a*e**S(3)/c + S(8)*b**S(2)*e**S(3)/c**S(2) - S(30)*b*d*e**S(2)/c + S(45)*d**S(2)*e + (S(4)*a*b*e**S(3) - S(15)*a*c*d*e**S(2) + S(15)*c**S(2)*d**S(3))/(sqrt(a)*c**(S(3)/2)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(30)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - a**(S(1)/4)*e*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(8)*b**S(2)*e**S(2) + S(45)*c**S(2)*d**S(2) - S(3)*c*e*(S(3)*a*e + S(10)*b*d))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(15)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + e**S(3)*x**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(5)*c) + e**S(2)*x*(-S(4)*b*e + S(15)*c*d)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*c**S(2)) + e*x*sqrt(a + b*x**S(2) + c*x**S(4))*(S(8)*b**S(2)*e**S(2) + S(45)*c**S(2)*d**S(2) - S(3)*c*e*(S(3)*a*e + S(10)*b*d))/(S(15)*c**(S(5)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(2)*b*e**S(2)/c + S(6)*d*e + (-a*e**S(2) + S(3)*c*d**S(2))/(sqrt(a)*sqrt(c)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - S(2)*a**(S(1)/4)*e*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-b*e + S(3)*c*d)*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + e**S(2)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*c) + S(2)*e*x*(-b*e + S(3)*c*d)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -a**(S(1)/4)*e*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + e*x*sqrt(a + b*x**S(2) + c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, atan(x*sqrt(a*e/d - b + c*d/e)/sqrt(a + b*x**S(2) + c*x**S(4)))/(S(2)*d*sqrt(a*e/d - b + c*d/e)) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*(-sqrt(a)*e + sqrt(c)*d)*sqrt(a + b*x**S(2) + c*x**S(4))) - sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_pi(-sqrt(a)*(-e + sqrt(c)*d/sqrt(a))**S(2)/(S(4)*sqrt(c)*d*e), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(4)*a**(S(1)/4)*c**(S(1)/4)*d*(-e + sqrt(c)*d/sqrt(a))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, a**(S(1)/4)*c**(S(1)/4)*e*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*d*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))) - a**(S(1)/4)*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(4)*d*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*(S(3)*c*d**S(2) - e*(-a*e + S(2)*b*d))*elliptic_pi(-(-sqrt(a)*e + sqrt(c)*d)**S(2)/(S(4)*sqrt(a)*sqrt(c)*d*e), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(8)*c**(S(1)/4)*d**S(2)*(-sqrt(a)*e + sqrt(c)*d)*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(c)*e*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*d*(sqrt(a) + sqrt(c)*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + e**S(2)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*d*(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + (S(3)*c*d**S(2) - e*(-a*e + S(2)*b*d))*atan(x*sqrt(a*e/d - b + c*d/e)/sqrt(a + b*x**S(2) + c*x**S(4)))/(S(4)*d**S(3)*e*(a*e/d - b + c*d/e)**(S(3)/2)) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(3)*c*d**S(2) - e*(-a*e + S(2)*b*d))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(4)*a**(S(1)/4)*d*(-sqrt(a)*e + sqrt(c)*d)*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -e**S(3)*x**S(3)*sqrt(a + b*x**S(2) - c*x**S(4))/(S(5)*c) - e**S(2)*x*(S(4)*b*e + S(15)*c*d)*sqrt(a + b*x**S(2) - c*x**S(4))/(S(15)*c**S(2)) + sqrt(S(2))*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*(S(9)*a*e**S(3)/c + S(8)*b**S(2)*e**S(3)/c**S(2) + S(30)*b*d*e**S(2)/c + S(45)*d**S(2)*e + (S(8)*a*b*e**S(3) + S(30)*a*c*d*e**S(2) + S(30)*c**S(2)*d**S(3))/(b*c - c*sqrt(S(4)*a*c + b**S(2))))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(60)*c**(S(3)/2)*sqrt(a + b*x**S(2) - c*x**S(4))) - sqrt(S(2))*e*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*(S(8)*b**S(2)*e**S(2) + S(45)*c**S(2)*d**S(2) + S(3)*c*e*(S(3)*a*e + S(10)*b*d))*elliptic_e(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(60)*c**(S(7)/2)*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -e**S(2)*x*sqrt(a + b*x**S(2) - c*x**S(4))/(S(3)*c) - sqrt(S(2))*e*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*(b*e + S(3)*c*d)*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_e(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(6)*c**(S(5)/2)*sqrt(a + b*x**S(2) - c*x**S(4))) + sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*(b*e**S(2)*(b - sqrt(S(4)*a*c + b**S(2))) + S(3)*c**S(2)*d**S(2) + c*e*(a*e + S(3)*b*d - S(3)*d*sqrt(S(4)*a*c + b**S(2))))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(6)*c**(S(5)/2)*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(a + b*x**S(2) - c*x**S(4)), x), x, -sqrt(S(2))*e*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_e(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(a + b*x**S(2) - c*x**S(4))) + sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*(S(2)*c*d + e*(b - sqrt(S(4)*a*c + b**S(2))))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*sqrt(a + b*x**S(2) - c*x**S(4))), x), x, sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_pi(-e*(b + sqrt(S(4)*a*c + b**S(2)))/(S(2)*c*d), asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*d*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**S(2)*sqrt(a + b*x**S(2) - c*x**S(4))), x), x, -e**S(2)*x*sqrt(a + b*x**S(2) - c*x**S(4))/(S(2)*d*(d + e*x**S(2))*(-a*e**S(2) + b*d*e + c*d**S(2))) + sqrt(S(2))*e*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_e(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(8)*sqrt(c)*d*(c*d**S(2) + e*(-a*e + b*d))*sqrt(a + b*x**S(2) - c*x**S(4))) - sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*(S(2)*c*d + e*(b - sqrt(S(4)*a*c + b**S(2))))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_f(asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(8)*sqrt(c)*d*(c*d**S(2) + e*(-a*e + b*d))*sqrt(a + b*x**S(2) - c*x**S(4))) + sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*(S(3)*c*d**S(2) + e*(-a*e + S(2)*b*d))*sqrt(-S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(-S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_pi(-e*(b + sqrt(S(4)*a*c + b**S(2)))/(S(2)*c*d), asin(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), (b + sqrt(S(4)*a*c + b**S(2)))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*d**S(2)*(c*d**S(2) + e*(-a*e + b*d))*sqrt(a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(-a + b*x**S(2) + c*x**S(4)), x), x, e*x*(b - sqrt(S(4)*a*c + b**S(2)))*(S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))/(S(2)*c*sqrt(-a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*d*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*(S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_f(atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), -S(2)*sqrt(S(4)*a*c + b**S(2))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt((S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))/(S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1)))*sqrt(-a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*e*(b - sqrt(S(4)*a*c + b**S(2)))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*(S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_e(atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), -S(2)*sqrt(S(4)*a*c + b**S(2))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt((S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))/(S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1)))*sqrt(-a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*sqrt(-a + b*x**S(2) + c*x**S(4))), x), x, sqrt(S(2))*sqrt(-b + sqrt(S(4)*a*c + b**S(2)))*sqrt(S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_pi(e*(b - sqrt(S(4)*a*c + b**S(2)))/(S(2)*c*d), asin(sqrt(S(2))*sqrt(c)*x/sqrt(-b + sqrt(S(4)*a*c + b**S(2)))), (b - sqrt(S(4)*a*c + b**S(2)))/(b + sqrt(S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*d*sqrt(-a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*sqrt(-a + b*x**S(2) + c*x**S(4))), x), x, sqrt(S(2))*sqrt(c)*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*(S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_f(atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), -S(2)*sqrt(S(4)*a*c + b**S(2))/(b - sqrt(S(4)*a*c + b**S(2))))/(sqrt((S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))/(S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1)))*(S(2)*c*d - e*(b + sqrt(S(4)*a*c + b**S(2))))*sqrt(-a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*e*(b + sqrt(S(4)*a*c + b**S(2)))**(S(3)/2)*(S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))*elliptic_pi(S(1) - e*(b + sqrt(S(4)*a*c + b**S(2)))/(S(2)*c*d), atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(S(4)*a*c + b**S(2)))), -S(2)*sqrt(S(4)*a*c + b**S(2))/(b - sqrt(S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*d*sqrt((S(2)*c*x**S(2)/(b - sqrt(S(4)*a*c + b**S(2))) + S(1))/(S(2)*c*x**S(2)/(b + sqrt(S(4)*a*c + b**S(2))) + S(1)))*(S(2)*c*d - e*(b + sqrt(S(4)*a*c + b**S(2))))*sqrt(-a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(-a + b*x**S(2) - c*x**S(4)), x), x, -a**(S(1)/4)*e*sqrt((a - b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 + b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(3)/4)*sqrt(-a + b*x**S(2) - c*x**S(4))) + a**(S(1)/4)*sqrt((a - b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 + b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*c**(S(3)/4)*sqrt(-a + b*x**S(2) - c*x**S(4))) - e*x*sqrt(-a + b*x**S(2) - c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*sqrt(-a + b*x**S(2) - c*x**S(4))), x), x, atan(x*sqrt(-a*e/d - b - c*d/e)/sqrt(-a + b*x**S(2) - c*x**S(4)))/(S(2)*d*sqrt(-a*e/d - b - c*d/e)) + c**(S(1)/4)*sqrt((a - b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 + b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*(-sqrt(a)*e + sqrt(c)*d)*sqrt(-a + b*x**S(2) - c*x**S(4))) - sqrt((a - b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(e + sqrt(c)*d/sqrt(a))*elliptic_pi(-sqrt(a)*(-e + sqrt(c)*d/sqrt(a))**S(2)/(S(4)*sqrt(c)*d*e), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 + b/(S(4)*sqrt(a)*sqrt(c)))/(S(4)*a**(S(1)/4)*c**(S(1)/4)*d*(-e + sqrt(c)*d/sqrt(a))*sqrt(-a + b*x**S(2) - c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(3)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, e**S(3)*x**S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(5) + e**S(2)*x*(d - S(4)*e/S(5))*sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + S(3)*e*x*(x**S(2) + S(2))*(S(5)*d**S(2) - S(10)*d*e + S(6)*e**S(2))/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - S(3)*sqrt(S(2))*e*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*(S(5)*d**S(2) - S(10)*d*e + S(6)*e**S(2))*elliptic_e(atan(x), S(1)/2)/(S(5)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*(S(5)*d**S(3) - S(10)*d*e**S(2) + S(8)*e**S(3))*elliptic_f(atan(x), S(1)/2)/(S(10)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, e**S(2)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(3) + e*x*(S(2)*d - S(2)*e)*(x**S(2) + S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) - S(2)*sqrt(S(2))*e*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(d - e)*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(3)*d**S(2) - S(2)*e**S(2))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(6)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, sqrt(S(2))*d*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + e*x*(x**S(2) + S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) - sqrt(S(2))*e*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), x), x, sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(2)*(d - e)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*e*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_pi(S(1) - e/d, atan(x), S(1)/2)/(S(2)*d*(d - e)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), x), x, sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(2)*(d - e)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*e*(x**S(2) + S(2))*elliptic_pi(S(1) - e/d, atan(x), S(1)/2)/(S(2)*d*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(d - e)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), x), x, e**S(2)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(2)*d*(d + e*x**S(2))*(d**S(2) - S(3)*d*e + S(2)*e**S(2))) - e*x*(x**S(2) + S(2))/(S(2)*d*(d**S(2) - S(3)*d*e + S(2)*e**S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*e*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(2)*d*(d - S(2)*e)*(d - e)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt((x**S(2) + S(2))/(S(2)*x**S(2) + S(2)))*(S(2)*d - e)*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(2)*d*(d - e)**S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*e*(x**S(2) + S(2))*(S(3)*d**S(2) - S(6)*d*e + S(2)*e**S(2))*elliptic_pi(S(1) - e/d, atan(x), S(1)/2)/(S(4)*d**S(2)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(d - S(2)*e)*(d - e)**S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), x), x, -sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(4)*(d - S(2)*e)*(d - e)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + e**S(2)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(2)*d*(d + e*x**S(2))*(d**S(2) - S(3)*d*e + S(2)*e**S(2))) - e*x*(x**S(2) + S(2))/(S(2)*d*(d**S(2) - S(3)*d*e + S(2)*e**S(2))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*e*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(2)*d*(d - S(2)*e)*(d - e)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*(S(3)*d**S(2) - S(6)*d*e + S(2)*e**S(2))*elliptic_f(atan(x), S(1)/2)/(S(4)*d*(d - S(2)*e)*(d - e)**S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*e*(x**S(2) + S(2))*(S(3)*d**S(2) - S(6)*d*e + S(2)*e**S(2))*elliptic_pi(S(1) - e/d, atan(x), S(1)/2)/(S(4)*d**S(2)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(d - S(2)*e)*(d - e)**S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))**S(3)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, S(25)*x**S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + S(135)*x*(x**S(2) + S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + S(75)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2)) - S(135)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(193)*x**S(2) + S(193))*elliptic_f(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))**S(2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, S(20)*x*(x**S(2) + S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + S(25)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/S(3) - S(20)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(97)*x**S(2) + S(97))*elliptic_f(atan(x), S(1)/2)/(S(6)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, S(5)*x*(x**S(2) + S(2))/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) - S(5)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(7)*x**S(2) + S(7))*elliptic_f(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)), x), x, sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((S(5)*x**S(2) + S(7))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), x), x, sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(4)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*(S(5)*x**S(2) + S(10))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(28)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((S(5)*x**S(2) + S(7))**S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), x), x, S(5)*x*(x**S(2) + S(2))/(S(84)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - S(25)*x*sqrt(x**S(4) + S(3)*x**S(2) + S(2))/(S(420)*x**S(2) + S(588)) - sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(5)*x**S(2) + S(5))*elliptic_e(atan(x), S(1)/2)/(S(84)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(9)*x**S(2) + S(9))*elliptic_f(atan(x), S(1)/2)/(S(112)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*(S(65)*x**S(2) + S(130))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(2352)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))**S(3)/(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2), x), x, x*(-S(11)*x**S(2) + S(5))/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(261)*x*(x**S(2) + S(2))/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(169)*x**S(2) + S(169))*elliptic_f(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(261)*x**S(2) + S(261))*elliptic_e(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))**S(2)/(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2), x), x, -S(17)*x*(x**S(2) + S(2))/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(S(17)*x**S(2) + S(25))/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + S(6)*sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(17)*x**S(2) + S(17))*elliptic_e(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(7))/(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2), x), x, -x*(x**S(2) + S(2))/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(x**S(2) + S(5))/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(3)*x**S(2) + S(2))**(S(-3)/2), x), x, -S(3)*x*(x**S(2) + S(2))/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(S(3)*x**S(2) + S(5))/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_f(atan(x), S(1)/2)/sqrt(x**S(4) + S(3)*x**S(2) + S(2)) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(3)*x**S(2) + S(3))*elliptic_e(atan(x), S(1)/2)/(S(2)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((S(5)*x**S(2) + S(7))*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)), x), x, x/(S(6)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(125)*x**S(2) + S(125))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(168)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt((x**S(2) + S(2))/(S(2)*x**S(2) + S(2)))*(S(9)*x**S(2) + S(9))*elliptic_f(atan(x), S(1)/2)/(S(4)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/((S(5)*x**S(2) + S(7))*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)), x), x, -x*(x**S(2) + S(2))/(S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + x*(S(2)*x**S(2) + S(5))/(S(6)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(x**S(2) + S(1))*elliptic_e(atan(x), S(1)/2)/(S(3)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(9)*x**S(2) + S(9))*elliptic_f(atan(x), S(1)/2)/(S(8)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*(S(125)*x**S(2) + S(250))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(168)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((S(5)*x**S(2) + S(7))**S(2)*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)), x), x, S(625)*x*(x**S(2) + S(1))*(x**S(2) + S(2))/((S(2520)*x**S(2) + S(3528))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - S(125)*x*(x**S(2) + S(2))/(S(504)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - x/(S(18)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(31)*x**S(2) + S(31))*elliptic_e(atan(x), S(1)/2)/(S(56)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*(S(375)*x**S(2) + S(375))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(1568)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt((x**S(2) + S(2))/(S(2)*x**S(2) + S(2)))*(S(463)*x**S(2) + S(463))*elliptic_f(atan(x), S(1)/2)/(S(336)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/((S(5)*x**S(2) + S(7))**S(2)*(x**S(4) + S(3)*x**S(2) + S(2))**(S(3)/2)), x), x, S(625)*x*(x**S(2) + S(1))*(x**S(2) + S(2))/((S(2520)*x**S(2) + S(3528))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - S(125)*x*(x**S(2) + S(2))/(S(504)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - x/(S(18)*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + (S(125)*x**S(2) + S(125))*elliptic_pi(S(-3)/7, atan(sqrt(S(2))*x/S(2)), S(-1))/(S(189)*sqrt((x**S(2) + S(1))/(x**S(2) + S(2)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*(S(31)*x**S(2) + S(62))*elliptic_e(atan(x), S(1)/2)/(S(56)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) + sqrt(S(2))*(S(6875)*x**S(2) + S(13750))*elliptic_pi(S(2)/7, atan(x), S(1)/2)/(S(14112)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))) - sqrt(S(2))*(S(7667)*x**S(2) + S(15334))*elliptic_f(atan(x), S(1)/2)/(S(6048)*sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(3))/sqrt(-x**S(4) + x**S(2) + S(3)), x), x, -sqrt(S(-1)/2 + sqrt(S(13))/S(2))*elliptic_e(asin(sqrt(S(2))*x/sqrt(S(1) + sqrt(S(13)))), S(-7)/6 - sqrt(S(13))/S(6)) + sqrt(S(7) + S(2)*sqrt(S(13)))*elliptic_f(asin(sqrt(S(2))*x/sqrt(S(1) + sqrt(S(13)))), S(-7)/6 - sqrt(S(13))/S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(3))/sqrt(-x**S(4) + S(2)*x**S(2) + S(3)), x), x, -elliptic_e(asin(sqrt(S(3))*x/S(3)), S(-3)) + S(4)*elliptic_f(asin(sqrt(S(3))*x/S(3)), S(-3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(3))/sqrt(-x**S(4) + S(3)*x**S(2) + S(3)), x), x, -sqrt(S(-3)/2 + sqrt(S(21))/S(2))*elliptic_e(asin(sqrt(S(2))*x/sqrt(S(3) + sqrt(S(21)))), S(-5)/2 - sqrt(S(21))/S(2)) + sqrt(S(9) + S(2)*sqrt(S(21)))*elliptic_f(asin(sqrt(S(2))*x/sqrt(S(3) + sqrt(S(21)))), S(-5)/2 - sqrt(S(21))/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(3))/sqrt(-x**S(4) - x**S(2) + S(3)), x), x, -sqrt(S(1)/2 + sqrt(S(13))/S(2))*elliptic_e(asin(sqrt(S(2))*x/sqrt(S(-1) + sqrt(S(13)))), S(-7)/6 + sqrt(S(13))/S(6)) + sqrt(S(5) + S(2)*sqrt(S(13)))*elliptic_f(asin(sqrt(S(2))*x/sqrt(S(-1) + sqrt(S(13)))), S(-7)/6 + sqrt(S(13))/S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(3))/sqrt(-x**S(4) - S(2)*x**S(2) + S(3)), x), x, -sqrt(S(3))*elliptic_e(asin(x), S(-1)/3) + S(2)*sqrt(S(3))*elliptic_f(asin(x), S(-1)/3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(3))/sqrt(-x**S(4) - S(3)*x**S(2) + S(3)), x), x, -sqrt(S(3)/2 + sqrt(S(21))/S(2))*elliptic_e(asin(sqrt(S(2))*x/sqrt(S(-3) + sqrt(S(21)))), S(-5)/2 + sqrt(S(21))/S(2)) + sqrt(S(3) + S(2)*sqrt(S(21)))*elliptic_f(asin(sqrt(S(2))*x/sqrt(S(-3) + sqrt(S(21)))), S(-5)/2 + sqrt(S(21))/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x**S(2) - sqrt(-S(4)*a*c + b**S(2)))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -S(2)*a**(S(1)/4)*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/sqrt(a + b*x**S(2) + c*x**S(4)) + S(2)*sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2)) + sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(2)*sqrt(a)*sqrt(c) + b - sqrt(-S(4)*a*c + b**S(2)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*c**(S(1)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(2))/((x**S(2) + S(1))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), x), x, sqrt(S(2))*(x**S(2) + S(2))*elliptic_e(atan(x), S(1)/2)/(sqrt((x**S(2) + S(2))/(x**S(2) + S(1)))*sqrt(x**S(4) + S(3)*x**S(2) + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(5)/2)*(a + b*x**S(2) + c*x**S(4)), x), x, c*x**S(3)*(d + e*x**S(2))**(S(7)/2)/(S(10)*e) + d**S(3)*(S(80)*a*e**S(2) - S(10)*b*d*e + S(3)*c*d**S(2))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(256)*e**(S(5)/2)) + d**S(2)*x*sqrt(d + e*x**S(2))*(S(80)*a*e**S(2) - S(10)*b*d*e + S(3)*c*d**S(2))/(S(256)*e**S(2)) + d*x*(d + e*x**S(2))**(S(3)/2)*(S(80)*a*e**S(2) - S(10)*b*d*e + S(3)*c*d**S(2))/(S(384)*e**S(2)) - x*(d + e*x**S(2))**(S(7)/2)*(-S(10)*b*e + S(3)*c*d)/(S(80)*e**S(2)) + x*(d + e*x**S(2))**(S(5)/2)*(S(80)*a*e**S(2) - S(10)*b*d*e + S(3)*c*d**S(2))/(S(480)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4)), x), x, c*x**S(3)*(d + e*x**S(2))**(S(5)/2)/(S(8)*e) + d**S(2)*(S(48)*a*e**S(2) - S(8)*b*d*e + S(3)*c*d**S(2))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(128)*e**(S(5)/2)) + d*x*sqrt(d + e*x**S(2))*(S(48)*a*e**S(2) - S(8)*b*d*e + S(3)*c*d**S(2))/(S(128)*e**S(2)) - x*(d + e*x**S(2))**(S(5)/2)*(-S(8)*b*e + S(3)*c*d)/(S(48)*e**S(2)) + x*(d + e*x**S(2))**(S(3)/2)*(S(48)*a*e**S(2) - S(8)*b*d*e + S(3)*c*d**S(2))/(S(192)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4)), x), x, c*x**S(3)*(d + e*x**S(2))**(S(3)/2)/(S(6)*e) + d*(S(8)*a*e**S(2) - S(2)*b*d*e + c*d**S(2))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(16)*e**(S(5)/2)) - x*(d + e*x**S(2))**(S(3)/2)*(-S(2)*b*e + c*d)/(S(8)*e**S(2)) + x*sqrt(d + e*x**S(2))*(S(8)*a*e**S(2) - S(2)*b*d*e + c*d**S(2))/(S(16)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/sqrt(d + e*x**S(2)), x), x, c*x**S(3)*sqrt(d + e*x**S(2))/(S(4)*e) - x*sqrt(d + e*x**S(2))*(-S(4)*b*e + S(3)*c*d)/(S(8)*e**S(2)) + (S(8)*a*e**S(2) - S(4)*b*d*e + S(3)*c*d**S(2))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(8)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**(S(3)/2), x), x, c*x*sqrt(d + e*x**S(2))/(S(2)*e**S(2)) - (-S(2)*b*e + S(3)*c*d)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*e**(S(5)/2)) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(d*e**S(2)*sqrt(d + e*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**(S(5)/2), x), x, c*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/e**(S(5)/2) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(3)*d*e**S(2)*(d + e*x**S(2))**(S(3)/2)) - x*(S(4)*c*d**S(2) - e*(S(2)*a*e + b*d))/(S(3)*d**S(2)*e**S(2)*sqrt(d + e*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**(S(7)/2), x), x, x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(5)*d*e**S(2)*(d + e*x**S(2))**(S(5)/2)) - x*(c*d**S(2) - S(5)*c*d*e*x**S(2) - e*(S(4)*a*e + b*d))/(S(15)*d**S(2)*e**S(2)*(d + e*x**S(2))**(S(3)/2)) - x*(S(2)*c*d**S(2) - S(2)*e*(S(4)*a*e + b*d))/(S(15)*d**S(3)*e**S(2)*sqrt(d + e*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**(S(9)/2), x), x, x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(7)*d*e**S(2)*(d + e*x**S(2))**(S(7)/2)) - x*(S(8)*c*d**S(2) - e*(S(6)*a*e + b*d))/(S(35)*d**S(2)*e**S(2)*(d + e*x**S(2))**(S(5)/2)) + x*(S(3)*c*d**S(2) + S(4)*e*(S(6)*a*e + b*d))/(S(105)*d**S(3)*e**S(2)*(d + e*x**S(2))**(S(3)/2)) + x*(S(6)*c*d**S(2) + S(8)*e*(S(6)*a*e + b*d))/(S(105)*d**S(4)*e**S(2)*sqrt(d + e*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**(S(11)/2), x), x, x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(9)*d*e**S(2)*(d + e*x**S(2))**(S(9)/2)) - x*(S(10)*c*d**S(2) - e*(S(8)*a*e + b*d))/(S(63)*d**S(2)*e**S(2)*(d + e*x**S(2))**(S(7)/2)) + x*(c*d**S(2) + S(2)*e*(S(8)*a*e + b*d))/(S(105)*d**S(3)*e**S(2)*(d + e*x**S(2))**(S(5)/2)) + x*(S(4)*c*d**S(2) + S(8)*e*(S(8)*a*e + b*d))/(S(315)*d**S(4)*e**S(2)*(d + e*x**S(2))**(S(3)/2)) + x*(S(8)*c*d**S(2) + S(16)*e*(S(8)*a*e + b*d))/(S(315)*d**S(5)*e**S(2)*sqrt(d + e*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(3)/(a + c*x**(S(2)*n)), x), x, S(3)*d*e**S(2)*x/c + e**S(3)*x**(n + S(1))/(c*(n + S(1))) - x*(-a*e**S(3) + sqrt(c)*d*(-S(3)*a*e**S(2) + c*d**S(2))/sqrt(-a) + S(3)*c*d**S(2)*e)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*c**(S(3)/2)*sqrt(-a)) + x*(-S(3)*a*sqrt(c)*d*e**S(2) + a*e**S(3)*sqrt(-a) + c**(S(3)/2)*d**S(3) - S(3)*c*d**S(2)*e*sqrt(-a))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(2)/(a + c*x**(S(2)*n)), x), x, e**S(2)*x/c + x*(-a*e**S(2) - S(2)*sqrt(c)*d*e*sqrt(-a) + c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*c) + x*(-a*e**S(2) + S(2)*sqrt(c)*d*e*sqrt(-a) + c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a + c*x**(S(2)*n)), x), x, x*(d - e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a) + x*(d + e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))*(d + e*x**n)), x), x, e**S(2)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))) + c*x*(d - e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))) + c*x*(d + e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))*(d + e*x**n)**S(2)), x), x, S(2)*c*e**S(2)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(a*e**S(2) + c*d**S(2))**S(2) + e**S(2)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(2)*(a*e**S(2) + c*d**S(2))) + c*x*(-a*e**S(2) - S(2)*sqrt(c)*d*e*sqrt(-a) + c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(2)) + c*x*(-a*e**S(2) + S(2)*sqrt(c)*d*e*sqrt(-a) + c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))*(d + e*x**n)**S(3)), x), x, c**(S(3)/2)*x*(-a*e**S(3) - sqrt(c)*d*(-S(3)*a*e**S(2) + c*d**S(2))/sqrt(-a) + S(3)*c*d**S(2)*e)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*sqrt(-a)*(a*e**S(2) + c*d**S(2))**S(3)) + c*e**S(2)*x*(-a*e**S(2) + S(3)*c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))**S(3)) + S(2)*c*e**S(2)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))**S(2)) + e**S(2)*x*hyper((S(3), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(3)*(a*e**S(2) + c*d**S(2))) + c**(S(3)/2)*x*(-S(3)*a*sqrt(c)*d*e**S(2) + c**(S(3)/2)*d**S(3) + S(3)*c*d**S(2)*e*sqrt(-a) + e**S(3)*(-a)**(S(3)/2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a - c*x**(S(2)*n)), x), x, x*(-sqrt(a)*e/sqrt(c) + d)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(a))/(S(2)*a) + x*(sqrt(a)*e/sqrt(c) + d)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(a))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(3)/(a + c*x**(S(2)*n))**S(2), x), x, -x*(sqrt(c)*(-S(2)*n + S(1))*(-S(3)*a*d*e**S(2) + c*d**S(3))/sqrt(-a) - (-n + S(1))*(-a*e**S(3) + S(3)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*c**(S(3)/2)*n*(-a)**(S(3)/2)) - x*(sqrt(c)*(-S(2)*n + S(1))*(-S(3)*a*d*e**S(2) + c*d**S(3))/sqrt(-a) + (-n + S(1))*(-a*e**S(3) + S(3)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*c**(S(3)/2)*n*(-a)**(S(3)/2)) + e**S(2)*x*(S(3)*d - e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*c) + e**S(2)*x*(S(3)*d + e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a*c) + x*(d*(-S(3)*a*e**S(2) + c*d**S(2)) + e*x**n*(-a*e**S(2) + S(3)*c*d**S(2)))/(S(2)*a*c*n*(a + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(2)/(a + c*x**(S(2)*n))**S(2), x), x, e**S(2)*x*hyper((S(1), S(1)/(S(2)*n)), (S(1) + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a)/(a*c) + x*(-a*e**S(2) + c*d**S(2) + S(2)*c*d*e*x**n)/(S(2)*a*c*n*(a + c*x**(S(2)*n))) - x*(-a*e**S(2)*(-S(2)*n + S(1)) - S(2)*sqrt(c)*d*e*sqrt(-a)*(-n + S(1)) + c*d**S(2)*(-S(2)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*c*n) - x*(-a*e**S(2)*(-S(2)*n + S(1)) + S(2)*sqrt(c)*d*e*sqrt(-a)*(-n + S(1)) + c*d**S(2)*(-S(2)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*c*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a + c*x**(S(2)*n))**S(2), x), x, x*(d + e*x**n)/(S(2)*a*n*(a + c*x**(S(2)*n))) - x*(sqrt(c)*(-S(2)*d*n + d) + e*sqrt(-a)*(-n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*sqrt(c)*n) - x*(sqrt(c)*d*(-S(2)*n + S(1)) - e*sqrt(-a)*(-n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*sqrt(c)*n), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))**S(2)*(d + e*x**n)), x), x, e**S(4)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))**S(2)) + c*e**S(2)*x*(d - e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(2)) + c*e**S(2)*x*(d + e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(2)) + c*x*(d - e*x**n)/(S(2)*a*n*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))) - sqrt(c)*x*(sqrt(c)*(-S(2)*d*n + d) + e*sqrt(-a)*(-n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*n*(a*e**S(2) + c*d**S(2))) - sqrt(c)*x*(sqrt(c)*d*(-S(2)*n + S(1)) - e*sqrt(-a)*(-n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*n*(a*e**S(2) + c*d**S(2))), expand=True, _diff=True, _numerical=True) # apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))**S(2)*(d + e*x**n)**S(2)), x), x, S(4)*c*e**S(4)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(a*e**S(2) + c*d**S(2))**S(3) + e**S(4)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(2)*(a*e**S(2) + c*d**S(2))**S(2)) + c*e**S(2)*x*(-a*e**S(2) - S(4)*sqrt(c)*d*e*sqrt(-a) + S(3)*c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(3)) + c*e**S(2)*x*(-a*e**S(2) + S(4)*sqrt(c)*d*e*sqrt(-a) + S(3)*c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(3)) + c*x*(-a*e**S(2) + c*d**S(2) - S(2)*c*d*e*x**n)/(S(2)*a*n*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))**S(2)) - c*x*(-a*e**S(2)*(-S(2)*n + S(1)) - S(2)*sqrt(c)*d*e*sqrt(-a)*(-n + S(1)) + c*d**S(2)*(-S(2)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*n*(a*e**S(2) + c*d**S(2))**S(2)) - c*x*(-a*e**S(2)*(-S(2)*n + S(1)) + S(2)*sqrt(c)*d*e*sqrt(-a)*(-n + S(1)) + c*d**S(2)*(-S(2)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*n*(a*e**S(2) + c*d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) # apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))**S(2)*(d + e*x**n)**S(3)), x), x, c**(S(3)/2)*e**S(2)*x*(-a*e**S(3) - S(3)*sqrt(c)*d*(-a*e**S(2) + c*d**S(2))/sqrt(-a) + S(5)*c*d**S(2)*e)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(sqrt(-a)*(a*e**S(2) + c*d**S(2))**S(4)) - c**(S(3)/2)*x*(sqrt(c)*(-S(2)*n + S(1))*(-S(3)*a*d*e**S(2) + c*d**S(3))/sqrt(-a) - (-n + S(1))*(-a*e**S(3) + S(3)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*n*(-a)**(S(3)/2)*(a*e**S(2) + c*d**S(2))**S(3)) - c**(S(3)/2)*x*(sqrt(c)*(-S(2)*n + S(1))*(-S(3)*a*d*e**S(2) + c*d**S(3))/sqrt(-a) + (-n + S(1))*(-a*e**S(3) + S(3)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*n*(-a)**(S(3)/2)*(a*e**S(2) + c*d**S(2))**S(3)) + S(2)*c*e**S(4)*x*(-a*e**S(2) + S(5)*c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))**S(4)) + S(4)*c*e**S(4)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))**S(3)) + e**S(4)*x*hyper((S(3), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(3)*(a*e**S(2) + c*d**S(2))**S(2)) + c**(S(3)/2)*e**S(2)*x*(-S(3)*a*sqrt(c)*d*e**S(2) + S(3)*c**(S(3)/2)*d**S(3) + S(5)*c*d**S(2)*e*sqrt(-a) + e**S(3)*(-a)**(S(3)/2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(a*(a*e**S(2) + c*d**S(2))**S(4)) + c**S(2)*x*(d*(-S(3)*a*e**S(2) + c*d**S(2)) - e*x**n*(-a*e**S(2) + S(3)*c*d**S(2)))/(S(2)*a*n*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(3)/(a + c*x**(S(2)*n))**S(3), x), x, -x*(sqrt(c)*(-S(4)*n + S(1))*(-S(2)*n + S(1))*(-S(3)*a*d*e**S(2) + c*d**S(3))/sqrt(-a) - (-S(3)*n + S(1))*(-n + S(1))*(-a*e**S(3) + S(3)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(16)*c**(S(3)/2)*n**S(2)*(-a)**(S(5)/2)) - x*(sqrt(c)*(-S(4)*n + S(1))*(-S(2)*n + S(1))*(-S(3)*a*d*e**S(2) + c*d**S(3))/sqrt(-a) + (-S(3)*n + S(1))*(-n + S(1))*(-a*e**S(3) + S(3)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(16)*c**(S(3)/2)*n**S(2)*(-a)**(S(5)/2)) + e**S(2)*x*(S(3)*d + e*x**n)/(S(2)*a*c*n*(a + c*x**(S(2)*n))) + x*(d*(-S(3)*a*e**S(2) + c*d**S(2)) + e*x**n*(-a*e**S(2) + S(3)*c*d**S(2)))/(S(4)*a*c*n*(a + c*x**(S(2)*n))**S(2)) - x*(d*(-S(4)*n + S(1))*(-S(3)*a*e**S(2) + c*d**S(2)) + e*x**n*(-S(3)*n + S(1))*(-a*e**S(2) + S(3)*c*d**S(2)))/(S(8)*a**S(2)*c*n**S(2)*(a + c*x**(S(2)*n))) - e**S(2)*x*(sqrt(c)*d*(-S(6)*n + S(3)) - e*sqrt(-a)*(-n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*c**(S(3)/2)*n) - e**S(2)*x*(sqrt(c)*d*(-S(6)*n + S(3)) + e*sqrt(-a)*(-n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*c**(S(3)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(2)/(a + c*x**(S(2)*n))**S(3), x), x, x*(-a*e**S(2) + c*d**S(2) + S(2)*c*d*e*x**n)/(S(4)*a*c*n*(a + c*x**(S(2)*n))**S(2)) + e**S(2)*x*hyper((S(2), S(1)/(S(2)*n)), (S(1) + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a)/(a**S(2)*c) - x*(S(2)*c*d*e*x**n*(-S(3)*n + S(1)) + (-S(4)*n + S(1))*(-a*e**S(2) + c*d**S(2)))/(S(8)*a**S(2)*c*n**S(2)*(a + c*x**(S(2)*n))) + x*(-a*e**S(2)*(S(8)*n**S(2) - S(6)*n + S(1)) + S(2)*sqrt(c)*d*e*sqrt(-a)*(S(3)*n**S(2) - S(4)*n + S(1)) + c*d**S(2)*(S(8)*n**S(2) - S(6)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(16)*a**S(3)*c*n**S(2)) - x*(a*e**S(2)*(S(8)*n**S(2) - S(6)*n + S(1)) + S(2)*sqrt(c)*d*e*sqrt(-a)*(S(3)*n**S(2) - S(4)*n + S(1)) - c*d**S(2)*(S(8)*n**S(2) - S(6)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(16)*a**S(3)*c*n**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a + c*x**(S(2)*n))**S(3), x), x, x*(d + e*x**n)/(S(4)*a*n*(a + c*x**(S(2)*n))**S(2)) - x*(d*(-S(4)*n + S(1)) + e*x**n*(-S(3)*n + S(1)))/(S(8)*a**S(2)*n**S(2)*(a + c*x**(S(2)*n))) - x*(-sqrt(c)*d*(S(8)*n**S(2) - S(6)*n + S(1)) + e*sqrt(-a)*(S(3)*n**S(2) - S(4)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(16)*a**S(3)*sqrt(c)*n**S(2)) + x*(sqrt(c)*d*(S(8)*n**S(2) - S(6)*n + S(1)) + e*sqrt(-a)*(S(3)*n**S(2) - S(4)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(16)*a**S(3)*sqrt(c)*n**S(2)), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))**S(3)*(d + e*x**n)), x), x, e**S(6)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))**S(3)) + c*e**S(4)*x*(d - e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(3)) + c*e**S(4)*x*(d + e*sqrt(-a)/sqrt(c))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(3)) + c*e**S(2)*x*(d - e*x**n)/(S(2)*a*n*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))**S(2)) + c*x*(d - e*x**n)/(S(4)*a*n*(a + c*x**(S(2)*n))**S(2)*(a*e**S(2) + c*d**S(2))) - sqrt(c)*e**S(2)*x*(sqrt(c)*(-S(2)*d*n + d) + e*sqrt(-a)*(-n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*n*(a*e**S(2) + c*d**S(2))**S(2)) - sqrt(c)*e**S(2)*x*(sqrt(c)*d*(-S(2)*n + S(1)) - e*sqrt(-a)*(-n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*n*(a*e**S(2) + c*d**S(2))**S(2)) - c*x*(d*(-S(4)*n + S(1)) - e*x**n*(-S(3)*n + S(1)))/(S(8)*a**S(2)*n**S(2)*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))) - sqrt(c)*x*(-sqrt(c)*d*(S(8)*n**S(2) - S(6)*n + S(1)) + e*sqrt(-a)*(S(3)*n**S(2) - S(4)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(16)*a**S(3)*n**S(2)*(a*e**S(2) + c*d**S(2))) + sqrt(c)*x*(sqrt(c)*d*(S(8)*n**S(2) - S(6)*n + S(1)) + e*sqrt(-a)*(S(3)*n**S(2) - S(4)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(16)*a**S(3)*n**S(2)*(a*e**S(2) + c*d**S(2))), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))**S(3)*(d + e*x**n)**S(2)), x), x, S(6)*c*e**S(6)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(a*e**S(2) + c*d**S(2))**S(4) + e**S(6)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(2)*(a*e**S(2) + c*d**S(2))**S(3)) + c*e**S(4)*x*(-a*e**S(2) - S(6)*sqrt(c)*d*e*sqrt(-a) + S(5)*c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(4)) + c*e**S(4)*x*(-a*e**S(2) + S(6)*sqrt(c)*d*e*sqrt(-a) + S(5)*c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(4)) + c*e**S(2)*x*(-a*e**S(2) + S(3)*c*d**S(2) - S(4)*c*d*e*x**n)/(S(2)*a*n*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))**S(3)) + c*x*(-a*e**S(2) + c*d**S(2) - S(2)*c*d*e*x**n)/(S(4)*a*n*(a + c*x**(S(2)*n))**S(2)*(a*e**S(2) + c*d**S(2))**S(2)) - c*e**S(2)*x*(-a*e**S(2)*(-S(2)*n + S(1)) - S(4)*sqrt(c)*d*e*sqrt(-a)*(-n + S(1)) + S(3)*c*d**S(2)*(-S(2)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*n*(a*e**S(2) + c*d**S(2))**S(3)) - c*e**S(2)*x*(-a*e**S(2)*(-S(2)*n + S(1)) + S(4)*sqrt(c)*d*e*sqrt(-a)*(-n + S(1)) + S(3)*c*d**S(2)*(-S(2)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(4)*a**S(2)*n*(a*e**S(2) + c*d**S(2))**S(3)) - c*x*(-S(2)*c*d*e*x**n*(-S(3)*n + S(1)) + (-S(4)*n + S(1))*(-a*e**S(2) + c*d**S(2)))/(S(8)*a**S(2)*n**S(2)*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))**S(2)) + c*x*(-a*e**S(2)*(S(8)*n**S(2) - S(6)*n + S(1)) + S(2)*sqrt(c)*d*e*sqrt(-a)*(S(3)*n**S(2) - S(4)*n + S(1)) + c*d**S(2)*(S(8)*n**S(2) - S(6)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(16)*a**S(3)*n**S(2)*(a*e**S(2) + c*d**S(2))**S(2)) - c*x*(a*e**S(2)*(S(8)*n**S(2) - S(6)*n + S(1)) + S(2)*sqrt(c)*d*e*sqrt(-a)*(S(3)*n**S(2) - S(4)*n + S(1)) - c*d**S(2)*(S(8)*n**S(2) - S(6)*n + S(1)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(16)*a**S(3)*n**S(2)*(a*e**S(2) + c*d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((a + c*x**(S(2)*n))**S(3)*(d + e*x**n)**S(3)), x), x, S(3)*c**(S(3)/2)*e**S(4)*x*(-a*e**S(3) - sqrt(c)*d*(-S(3)*a*e**S(2) + S(5)*c*d**S(2))/sqrt(-a) + S(7)*c*d**S(2)*e)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*sqrt(-a)*(a*e**S(2) + c*d**S(2))**S(5)) - c**(S(3)/2)*e**S(2)*x*(S(3)*sqrt(c)*(-S(2)*n + S(1))*(-a*d*e**S(2) + c*d**S(3))/sqrt(-a) - (-n + S(1))*(-a*e**S(3) + S(5)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(2)*n*(-a)**(S(3)/2)*(a*e**S(2) + c*d**S(2))**S(4)) - c**(S(3)/2)*e**S(2)*x*(S(3)*sqrt(c)*(-S(2)*n + S(1))*(-a*d*e**S(2) + c*d**S(3))/sqrt(-a) + (-n + S(1))*(-a*e**S(3) + S(5)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*n*(-a)**(S(3)/2)*(a*e**S(2) + c*d**S(2))**S(4)) - c**(S(3)/2)*x*(sqrt(c)*(-S(4)*n + S(1))*(-S(2)*n + S(1))*(-S(3)*a*d*e**S(2) + c*d**S(3))/sqrt(-a) - (-S(3)*n + S(1))*(-n + S(1))*(-a*e**S(3) + S(3)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), sqrt(c)*x**n/sqrt(-a))/(S(16)*n**S(2)*(-a)**(S(5)/2)*(a*e**S(2) + c*d**S(2))**S(3)) - c**(S(3)/2)*x*(sqrt(c)*(-S(4)*n + S(1))*(-S(2)*n + S(1))*(-S(3)*a*d*e**S(2) + c*d**S(3))/sqrt(-a) + (-S(3)*n + S(1))*(-n + S(1))*(-a*e**S(3) + S(3)*c*d**S(2)*e))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(16)*n**S(2)*(-a)**(S(5)/2)*(a*e**S(2) + c*d**S(2))**S(3)) + S(3)*c*e**S(6)*x*(-a*e**S(2) + S(7)*c*d**S(2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))**S(5)) + S(6)*c*e**S(6)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) + c*d**S(2))**S(4)) + e**S(6)*x*hyper((S(3), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(3)*(a*e**S(2) + c*d**S(2))**S(3)) + S(3)*c**(S(3)/2)*e**S(4)*x*(-S(3)*a*sqrt(c)*d*e**S(2) + S(5)*c**(S(3)/2)*d**S(3) + S(7)*c*d**S(2)*e*sqrt(-a) + e**S(3)*(-a)**(S(3)/2))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -sqrt(c)*x**n/sqrt(-a))/(S(2)*a*(a*e**S(2) + c*d**S(2))**S(5)) + c**S(2)*e**S(2)*x*(S(3)*d*(-a*e**S(2) + c*d**S(2)) - e*x**n*(-a*e**S(2) + S(5)*c*d**S(2)))/(a*n*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))**S(4)) + c**S(2)*x*(d*(-S(3)*a*e**S(2) + c*d**S(2)) - e*x**n*(-a*e**S(2) + S(3)*c*d**S(2)))/(S(4)*a*n*(a + c*x**(S(2)*n))**S(2)*(a*e**S(2) + c*d**S(2))**S(3)) - c**S(2)*x*(d*(-S(4)*n + S(1))*(-S(3)*a*e**S(2) + c*d**S(2)) - e*x**n*(-S(3)*n + S(1))*(-a*e**S(2) + S(3)*c*d**S(2)))/(S(8)*a**S(2)*n**S(2)*(a + c*x**(S(2)*n))*(a*e**S(2) + c*d**S(2))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**(S(2)*n))**p*(d + e*x**n)**S(3), x), x, d**S(3)*x*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper((S(1)/(S(2)*n), -p), (S(1) + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a) + S(3)*d**S(2)*e*x**(n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((n + S(1))/(S(2)*n), -p), (S(3)/2 + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a)/(n + S(1)) + S(3)*d*e**S(2)*x**(S(2)*n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper((S(1) + S(1)/(S(2)*n), -p), (S(2) + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a)/(S(2)*n + S(1)) + e**S(3)*x**(S(3)*n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper((S(3)/2 + S(1)/(S(2)*n), -p), (S(5)/2 + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a)/(S(3)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**(S(2)*n))**p*(d + e*x**n)**S(2), x), x, d**S(2)*x*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper((S(1)/(S(2)*n), -p), (S(1) + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a) + S(2)*d*e*x**(n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((n + S(1))/(S(2)*n), -p), (S(3)/2 + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a)/(n + S(1)) + e**S(2)*x**(S(2)*n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper((S(1) + S(1)/(S(2)*n), -p), (S(2) + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a)/(S(2)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**(S(2)*n))**p*(d + e*x**n), x), x, d*x*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper((S(1)/(S(2)*n), -p), (S(1) + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a) + e*x**(n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((n + S(1))/(S(2)*n), -p), (S(3)/2 + S(1)/(S(2)*n),), -c*x**(S(2)*n)/a)/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n)), x), x, a*d*x + c*e*x**(S(3)*n + S(1))/(S(3)*n + S(1)) + x**(n + S(1))*(a*e + b*d)/(n + S(1)) + x**(S(2)*n + S(1))*(b*e + c*d)/(S(2)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, a**S(2)*d*x + a*x**(n + S(1))*(a*e + S(2)*b*d)/(n + S(1)) + c**S(2)*e*x**(S(5)*n + S(1))/(S(5)*n + S(1)) + c*x**(S(4)*n + S(1))*(S(2)*b*e + c*d)/(S(4)*n + S(1)) + x**(S(2)*n + S(1))*(S(2)*a*b*e + S(2)*a*c*d + b**S(2)*d)/(S(2)*n + S(1)) + x**(S(3)*n + S(1))*(S(2)*a*c*e + b**S(2)*e + S(2)*b*c*d)/(S(3)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))**S(3), x), x, a**S(3)*d*x + a**S(2)*x**(n + S(1))*(a*e + S(3)*b*d)/(n + S(1)) + S(3)*a*x**(S(2)*n + S(1))*(a*b*e + a*c*d + b**S(2)*d)/(S(2)*n + S(1)) + c**S(3)*e*x**(S(7)*n + S(1))/(S(7)*n + S(1)) + c**S(2)*x**(S(6)*n + S(1))*(S(3)*b*e + c*d)/(S(6)*n + S(1)) + S(3)*c*x**(S(5)*n + S(1))*(a*c*e + b**S(2)*e + b*c*d)/(S(5)*n + S(1)) + x**(S(3)*n + S(1))*(S(3)*a**S(2)*c*e + S(3)*a*b**S(2)*e + S(6)*a*b*c*d + b**S(3)*d)/(S(3)*n + S(1)) + x**(S(4)*n + S(1))*(S(6)*a*b*c*e + S(3)*a*c**S(2)*d + b**S(3)*e + S(3)*b**S(2)*c*d)/(S(4)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(3)/(a + b*x**n + c*x**(S(2)*n)), x), x, e**S(3)*x**(n + S(1))/(c*(n + S(1))) + e**S(2)*x*(-b*e + S(3)*c*d)/c**S(2) + x*(-a*c*e**S(3) + b**S(2)*e**S(3) - S(3)*b*c*d*e**S(2) + S(3)*c**S(2)*d**S(2)*e - (-b*e + S(2)*c*d)*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - c*e*(S(3)*a*e + b*d))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(c**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))) + x*(-a*c*e**S(3) + b**S(2)*e**S(3) - S(3)*b*c*d*e**S(2) + S(3)*c**S(2)*d**S(2)*e + (-b*e + S(2)*c*d)*(b**S(2)*e**S(2) + c**S(2)*d**S(2) - c*e*(S(3)*a*e + b*d))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(c**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(2)/(a + b*x**n + c*x**(S(2)*n)), x), x, e**S(2)*x/c + x*(-b*e**S(2) + S(2)*c*d*e - (b**S(2)*e**S(2) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(c*(b + sqrt(-S(4)*a*c + b**S(2)))) + x*(-b*e**S(2) + S(2)*c*d*e + (b**S(2)*e**S(2) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(c*(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a + b*x**n + c*x**(S(2)*n)), x), x, x*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(b + sqrt(-S(4)*a*c + b**S(2))) + x*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(b - sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))), x), x, -c*x*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) - c*x*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((b + sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) + e**S(2)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((d + e*x**n)**S(2)*(a + b*x**n + c*x**(S(2)*n))), x), x, -c*x*(b*e**S(2)*(b - sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d - d*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) - c*x*(b*e**S(2)*(b + sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d + d*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + e**S(2)*x*(-b*e + S(2)*c*d)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + e**S(2)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate(S(1)/((d + e*x**n)**S(3)*(a + b*x**n + c*x**(S(2)*n))), x), x, -c*x*(-b**S(2)*e**S(3)*(b - sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(3)*d**S(3) - S(3)*c**S(2)*d*e*(S(2)*a*e + b*d - d*sqrt(-S(4)*a*c + b**S(2))) + c*e**S(2)*(S(3)*a*b*e - a*e*sqrt(-S(4)*a*c + b**S(2)) + S(3)*b**S(2)*d - S(3)*b*d*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) - c*x*(-b**S(2)*e**S(3)*(b + sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(3)*d**S(3) - S(3)*c**S(2)*d*e*(S(2)*a*e + b*d + d*sqrt(-S(4)*a*c + b**S(2))) + c*e**S(2)*(a*e*sqrt(-S(4)*a*c + b**S(2)) + S(3)*b**S(2)*d + S(3)*b*(a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + e**S(2)*x*(b**S(2)*e**S(2) + S(3)*c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + e**S(2)*x*(-b*e + S(2)*c*d)*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + e**S(2)*x*hyper((S(3), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(3)*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(3)/(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, e**S(2)*x*(e - (-S(3)*b*e + S(6)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(c*(b + sqrt(-S(4)*a*c + b**S(2)))) + e**S(2)*x*(e + (-S(3)*b*e + S(6)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(c*(b - sqrt(-S(4)*a*c + b**S(2)))) + x*(-a*b*e*(a*e**S(2) + S(3)*c*d**S(2)) - S(2)*a*c*d*(-S(3)*a*e**S(2) + c*d**S(2)) + b**S(2)*c*d**S(3) - x**n*(a*b**S(2)*e**S(3) + S(2)*a*c*e*(-a*e**S(2) + S(3)*c*d**S(2)) - b*c*d*(S(3)*a*e**S(2) + c*d**S(2))))/(a*c*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) + x*((-n + S(1))*(a*b**S(2)*e**S(3) + S(2)*a*c*e*(-a*e**S(2) + S(3)*c*d**S(2)) - b*c*d*(S(3)*a*e**S(2) + c*d**S(2))) - (-a*b**S(3)*e**S(3)*(-S(3)*n + S(1)) + S(2)*a*b*c*e*(a*e**S(2)*(-S(5)*n + S(2)) + S(3)*c*d**S(2)*n) + S(4)*a*c**S(2)*d*(-S(2)*n + S(1))*(-S(3)*a*e**S(2) + c*d**S(2)) + b**S(2)*c*d*(S(3)*a*e**S(2)*(-S(3)*n + S(1)) - c*d**S(2)*(-n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*c*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + x*((-n + S(1))*(a*b**S(2)*e**S(3) + S(2)*a*c*e*(-a*e**S(2) + S(3)*c*d**S(2)) - b*c*d*(S(3)*a*e**S(2) + c*d**S(2))) + (-a*b**S(3)*e**S(3)*(-S(3)*n + S(1)) + S(2)*a*b*c*e*(a*e**S(2)*(-S(5)*n + S(2)) + S(3)*c*d**S(2)*n) + S(4)*a*c**S(2)*d*(-S(2)*n + S(1))*(-S(3)*a*e**S(2) + c*d**S(2)) + b**S(2)*c*d*(S(3)*a*e**S(2)*(-S(3)*n + S(1)) - c*d**S(2)*(-n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*c*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(2)/(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, -S(2)*e**S(2)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*e**S(2)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) + x*(-S(2)*a*b*d*e - S(2)*a*(-a*e**S(2) + c*d**S(2)) + b**S(2)*d**S(2) + x**n*(a*b*e**S(2) - S(4)*a*c*d*e + b*c*d**S(2)))/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) - x*((-n + S(1))*(a*b*e**S(2) - S(4)*a*c*d*e + b*c*d**S(2)) + (S(4)*a*b*c*d*e*n + S(4)*a*c*(-S(2)*n + S(1))*(-a*e**S(2) + c*d**S(2)) + b**S(2)*(a*e**S(2)*(-S(3)*n + S(1)) - c*d**S(2)*(-n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) - x*((-n + S(1))*(a*b*e**S(2) - S(4)*a*c*d*e + b*c*d**S(2)) - (S(4)*a*b*c*d*e*n + S(4)*a*c*(-S(2)*n + S(1))*(-a*e**S(2) + c*d**S(2)) + b**S(2)*(a*e**S(2)*(-S(3)*n + S(1)) - c*d**S(2)*(-n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, -c*x*(S(2)*a*(c*d*(-S(4)*n + S(2)) - e*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*d*(-n + S(1)) + b*(S(2)*a*e*n + d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*x*(S(2)*a*(S(2)*c*d*(-S(2)*n + S(1)) + e*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*(-d*n + d) - b*(-S(2)*a*e*n + d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) + x*(-a*b*e - S(2)*a*c*d + b**S(2)*d + c*x**n*(-S(2)*a*e + b*d))/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) #Apart assert rubi_test(rubi_integrate(S(1)/((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))**S(2)), x), x, -c*e**S(2)*x*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) - c*e**S(2)*x*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + e**S(4)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + c*x*(-S(2)*a*c*(S(2)*c*d*(-S(2)*n + S(1)) + e*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))) - b**S(3)*e*(-n + S(1)) + b**S(2)*(-n + S(1))*(c*d + e*sqrt(-S(4)*a*c + b**S(2))) + b*c*(S(2)*a*e*(-S(3)*n + S(2)) - d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) - c*x*((-n + S(1))*(S(2)*a*c*e - b**S(2)*e + b*c*d) + (S(2)*a*b*c*e*(-S(3)*n + S(2)) - S(4)*a*c**S(2)*d*(-S(2)*n + S(1)) - b**S(3)*e*(-n + S(1)) + b**S(2)*c*d*(-n + S(1)))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + x*(S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d + c*x**n*(S(2)*a*c*e - b**S(2)*e + b*c*d))/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) #Apart assert rubi_test(rubi_integrate(S(1)/((d + e*x**n)**S(2)*(a + b*x**n + c*x**(S(2)*n))**S(2)), x), x, -S(2)*c*e**S(2)*x*(b*e**S(2)*(b - sqrt(-S(4)*a*c + b**S(2))) + S(3)*c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d - S(2)*d*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) - S(2)*c*e**S(2)*x*(b*e**S(2)*(b + sqrt(-S(4)*a*c + b**S(2))) + S(3)*c**S(2)*d**S(2) - c*e*(a*e + S(3)*b*d + S(2)*d*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + S(2)*e**S(4)*x*(-b*e + S(2)*c*d)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + e**S(4)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + c*x*(S(4)*a*c**S(2)*(-c*d**S(2)*(-S(2)*n + S(1)) + e*(a*e*(-S(2)*n + S(1)) - d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))) + b**S(4)*e**S(2)*(-n + S(1)) - b**S(3)*e*(-n + S(1))*(S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*c*(-c*d**S(2)*(-n + S(1)) + e*(a*e*(-S(7)*n + S(5)) - S(2)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))) + b*c*(S(3)*a*e**S(2)*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)) + c*d*(S(4)*a*e*(-S(3)*n + S(2)) - d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + c*x*(S(4)*a*c**S(2)*(-c*d**S(2)*(-S(2)*n + S(1)) + e*(a*e*(-S(2)*n + S(1)) + d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))) + b**S(4)*e**S(2)*(-n + S(1)) - b**S(3)*e*(-n + S(1))*(S(2)*c*d - e*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*c*(-c*d**S(2)*(-n + S(1)) + e*(a*e*(-S(7)*n + S(5)) + S(2)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))) + b*c*(-S(3)*a*e**S(2)*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)) + c*d*(S(4)*a*e*(-S(3)*n + S(2)) + d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) - x*(-S(6)*a*b*c**S(2)*d*e + S(2)*a*c**S(2)*(-a*e**S(2) + c*d**S(2)) - b**S(4)*e**S(2) + S(2)*b**S(3)*c*d*e - b**S(2)*c*(-S(4)*a*e**S(2) + c*d**S(2)) + c*x**n*(-S(4)*a*c**S(2)*d*e - b**S(3)*e**S(2) + S(2)*b**S(2)*c*d*e - b*c*(-S(3)*a*e**S(2) + c*d**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(3)/(a + b*x**n + c*x**(S(2)*n))**S(3), x), x, e**S(2)*x*(-S(2)*a*c*(S(6)*c*d*(-S(2)*n + S(1)) - e*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))) - b**S(3)*e*(-n + S(1)) + b**S(2)*(-n + S(1))*(S(3)*c*d + e*sqrt(-S(4)*a*c + b**S(2))) + b*c*(S(2)*a*e*(-S(5)*n + S(2)) - S(3)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*c*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) + e**S(2)*x*(-S(2)*a*c*(S(6)*c*d*(-S(2)*n + S(1)) + e*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))) - b**S(3)*e*(-n + S(1)) + b**S(2)*(-n + S(1))*(S(3)*c*d - e*sqrt(-S(4)*a*c + b**S(2))) + b*c*(S(2)*a*e*(-S(5)*n + S(2)) + S(3)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*c*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) + x*(-a*b*e*(a*e**S(2) + S(3)*c*d**S(2)) - S(2)*a*c*d*(-S(3)*a*e**S(2) + c*d**S(2)) + b**S(2)*c*d**S(3) - x**n*(a*b**S(2)*e**S(3) + S(2)*a*c*e*(-a*e**S(2) + S(3)*c*d**S(2)) - b*c*d*(S(3)*a*e**S(2) + c*d**S(2))))/(S(2)*a*c*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))**S(2)) + e**S(2)*x*(a*b*c*e - S(6)*a*c**S(2)*d - b**S(3)*e + S(3)*b**S(2)*c*d + c*x**n*(-S(2)*a*c*e - b**S(2)*e + S(3)*b*c*d))/(a*c**S(2)*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) + x*((-n + S(1))*(S(4)*a**S(2)*c**S(2)*e*(-S(3)*n + S(1))*(-a*e**S(2) + S(3)*c*d**S(2)) - S(2)*a*b**S(4)*e**S(3)*n - a*b**S(2)*c*e*(-a*e**S(2)*(S(2)*n + S(1)) + S(3)*c*d**S(2)) - S(2)*a*b*c**S(2)*d*(S(3)*a*e**S(2)*n + c*d**S(2)*(-S(7)*n + S(2))) + b**S(3)*c*d*(S(6)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1)))) + (-S(4)*a**S(2)*b*c**S(2)*e*(a*e**S(2)*(S(19)*n**S(2) - S(11)*n + S(1)) + S(3)*c*d**S(2)*(-S(3)*n**S(2) - n + S(1))) - S(8)*a**S(2)*c**S(3)*d*(-S(3)*a*e**S(2) + c*d**S(2))*(S(8)*n**S(2) - S(6)*n + S(1)) + S(2)*a*b**S(5)*e**S(3)*n*(-n + S(1)) + a*b**S(3)*c*e*(a*e**S(2)*(S(30)*n**S(2) - S(19)*n + S(1)) + S(3)*c*d**S(2)*(-n + S(1))) + S(6)*a*b**S(2)*c**S(2)*d*(-a*e**S(2)*(S(15)*n**S(2) - S(10)*n + S(1)) + c*d**S(2)*(S(3)*n**S(2) - S(4)*n + S(1))) - b**S(4)*c*d*(-n + S(1))*(S(6)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*c*n**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + x*((-n + S(1))*(S(4)*a**S(2)*c**S(2)*e*(-S(3)*n + S(1))*(-a*e**S(2) + S(3)*c*d**S(2)) - S(2)*a*b**S(4)*e**S(3)*n - a*b**S(2)*c*e*(-a*e**S(2)*(S(2)*n + S(1)) + S(3)*c*d**S(2)) - S(2)*a*b*c**S(2)*d*(S(3)*a*e**S(2)*n + c*d**S(2)*(-S(7)*n + S(2))) + b**S(3)*c*d*(S(6)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1)))) - (-S(4)*a**S(2)*b*c**S(2)*e*(a*e**S(2)*(S(19)*n**S(2) - S(11)*n + S(1)) + S(3)*c*d**S(2)*(-S(3)*n**S(2) - n + S(1))) - S(8)*a**S(2)*c**S(3)*d*(-S(3)*a*e**S(2) + c*d**S(2))*(S(8)*n**S(2) - S(6)*n + S(1)) + S(2)*a*b**S(5)*e**S(3)*n*(-n + S(1)) + a*b**S(3)*c*e*(a*e**S(2)*(S(30)*n**S(2) - S(19)*n + S(1)) + S(3)*c*d**S(2)*(-n + S(1))) + S(6)*a*b**S(2)*c**S(2)*d*(-a*e**S(2)*(S(15)*n**S(2) - S(10)*n + S(1)) + c*d**S(2)*(S(3)*n**S(2) - S(4)*n + S(1))) - b**S(4)*c*d*(-n + S(1))*(S(6)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*c*n**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - x*(S(2)*a**S(2)*b*c**S(2)*e*(-S(5)*a*e**S(2)*n + S(3)*c*d**S(2)*(-S(3)*n + S(2))) + S(4)*a**S(2)*c**S(3)*d*(-S(4)*n + S(1))*(-S(3)*a*e**S(2) + c*d**S(2)) - S(2)*a*b**S(5)*e**S(3)*n - S(3)*a*b**S(3)*c*e*(-S(3)*a*e**S(2)*n + c*d**S(2)) + a*b**S(2)*c**S(2)*d*(S(3)*a*e**S(2)*(-S(9)*n + S(1)) - S(5)*c*d**S(2)*(-S(3)*n + S(1))) + b**S(4)*c*d*(S(6)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1))) + c*x**n*(S(4)*a**S(2)*c**S(2)*e*(-S(3)*n + S(1))*(-a*e**S(2) + S(3)*c*d**S(2)) - S(2)*a*b**S(4)*e**S(3)*n - a*b**S(2)*c*e*(-a*e**S(2)*(S(2)*n + S(1)) + S(3)*c*d**S(2)) - S(2)*a*b*c**S(2)*d*(S(3)*a*e**S(2)*n + c*d**S(2)*(-S(7)*n + S(2))) + b**S(3)*c*d*(S(6)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1)))))/(S(2)*a**S(2)*c**S(2)*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(2)/(a + b*x**n + c*x**(S(2)*n))**S(3), x), x, -e**S(2)*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) + b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - e**S(2)*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) - b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) + x*(-S(2)*a*b*d*e - S(2)*a*(-a*e**S(2) + c*d**S(2)) + b**S(2)*d**S(2) + x**n*(a*b*e**S(2) - S(4)*a*c*d*e + b*c*d**S(2)))/(S(2)*a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))**S(2)) + e**S(2)*x*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*c*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) - x*((-n + S(1))*(-S(8)*a**S(2)*c**S(2)*d*e*(-S(3)*n + S(1)) + S(2)*a*b**S(2)*c*d*e + S(2)*a*b*c*(a*e**S(2)*n + c*d**S(2)*(-S(7)*n + S(2))) - b**S(3)*(S(2)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1)))) - (-S(8)*a**S(2)*b*c**S(2)*d*e*(-S(3)*n**S(2) - n + S(1)) - S(8)*a**S(2)*c**S(2)*(-a*e**S(2) + c*d**S(2))*(S(8)*n**S(2) - S(6)*n + S(1)) + S(2)*a*b**S(3)*c*d*e*(-n + S(1)) + S(2)*a*b**S(2)*c*(-a*e**S(2)*(S(15)*n**S(2) - S(10)*n + S(1)) + S(3)*c*d**S(2)*(S(3)*n**S(2) - S(4)*n + S(1))) - b**S(4)*(-n + S(1))*(S(2)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*n**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - x*((-n + S(1))*(-S(8)*a**S(2)*c**S(2)*d*e*(-S(3)*n + S(1)) + S(2)*a*b**S(2)*c*d*e + S(2)*a*b*c*(a*e**S(2)*n + c*d**S(2)*(-S(7)*n + S(2))) - b**S(3)*(S(2)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1)))) + (-S(8)*a**S(2)*b*c**S(2)*d*e*(-S(3)*n**S(2) - n + S(1)) - S(8)*a**S(2)*c**S(2)*(-a*e**S(2) + c*d**S(2))*(S(8)*n**S(2) - S(6)*n + S(1)) + S(2)*a*b**S(3)*c*d*e*(-n + S(1)) + S(2)*a*b**S(2)*c*(-a*e**S(2)*(S(15)*n**S(2) - S(10)*n + S(1)) + S(3)*c*d**S(2)*(S(3)*n**S(2) - S(4)*n + S(1))) - b**S(4)*(-n + S(1))*(S(2)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*n**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + x*(-S(4)*a**S(2)*b*c**S(2)*d*e*(-S(3)*n + S(2)) - S(4)*a**S(2)*c**S(2)*(-S(4)*n + S(1))*(-a*e**S(2) + c*d**S(2)) + S(2)*a*b**S(3)*c*d*e - a*b**S(2)*c*(a*e**S(2)*(-S(9)*n + S(1)) - S(5)*c*d**S(2)*(-S(3)*n + S(1))) - b**S(4)*(S(2)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1))) + c*x**n*(-S(8)*a**S(2)*c**S(2)*d*e*(-S(3)*n + S(1)) + S(2)*a*b**S(2)*c*d*e + S(2)*a*b*c*(a*e**S(2)*n + c*d**S(2)*(-S(7)*n + S(2))) - b**S(3)*(S(2)*a*e**S(2)*n + c*d**S(2)*(-S(2)*n + S(1)))))/(S(2)*a**S(2)*c*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a + b*x**n + c*x**(S(2)*n))**S(3), x), x, x*(-a*b*e - S(2)*a*c*d + b**S(2)*d + c*x**n*(-S(2)*a*e + b*d))/(S(2)*a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))**S(2)) - c*x*(-S(4)*a**S(2)*c*(-S(2)*c*d*(S(8)*n**S(2) - S(6)*n + S(1)) + e*sqrt(-S(4)*a*c + b**S(2))*(S(3)*n**S(2) - S(4)*n + S(1))) + a*b**S(2)*(-n + S(1))*(-S(6)*c*d*(-S(3)*n + S(1)) + e*sqrt(-S(4)*a*c + b**S(2))) + S(2)*a*b*c*(S(2)*a*e*(-S(3)*n**S(2) - n + S(1)) + d*sqrt(-S(4)*a*c + b**S(2))*(S(7)*n**S(2) - S(9)*n + S(2))) + b**S(4)*d*(S(2)*n**S(2) - S(3)*n + S(1)) - b**S(3)*(-n + S(1))*(a*e + d*(-S(2)*n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) + c*x*(-S(4)*a**S(2)*c*(S(2)*c*d*(S(8)*n**S(2) - S(6)*n + S(1)) + e*sqrt(-S(4)*a*c + b**S(2))*(S(3)*n**S(2) - S(4)*n + S(1))) + a*b**S(2)*(-n + S(1))*(S(6)*c*d*(-S(3)*n + S(1)) + e*sqrt(-S(4)*a*c + b**S(2))) - S(2)*a*b*c*(S(2)*a*e*(-S(3)*n**S(2) - n + S(1)) - d*sqrt(-S(4)*a*c + b**S(2))*(S(7)*n**S(2) - S(9)*n + S(2))) - b**S(4)*d*(S(2)*n**S(2) - S(3)*n + S(1)) + b**S(3)*(-n + S(1))*(a*e - d*(-S(2)*n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) + x*(-S(2)*a**S(2)*b*c*e*(-S(3)*n + S(2)) - S(4)*a**S(2)*c**S(2)*d*(-S(4)*n + S(1)) + a*b**S(3)*e + S(5)*a*b**S(2)*c*d*(-S(3)*n + S(1)) - b**S(4)*d*(-S(2)*n + S(1)) + c*x**n*(-S(4)*a**S(2)*c*e*(-S(3)*n + S(1)) + a*b**S(2)*e + S(2)*a*b*c*d*(-S(7)*n + S(2)) - b**S(3)*d*(-S(2)*n + S(1))))/(S(2)*a**S(2)*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) #Apart# assert rubi_test(rubi_integrate(S(1)/((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))**S(3)), x), x, -c*e**S(4)*x*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) - c*e**S(4)*x*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + e**S(6)*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + c*e**S(2)*x*(-S(2)*a*c*(S(2)*c*d*(-S(2)*n + S(1)) + e*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))) - b**S(3)*e*(-n + S(1)) + b**S(2)*(-n + S(1))*(c*d + e*sqrt(-S(4)*a*c + b**S(2))) + b*c*(S(2)*a*e*(-S(3)*n + S(2)) - d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + c*e**S(2)*x*(-S(2)*a*c*(S(2)*c*d*(-S(2)*n + S(1)) - e*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))) - b**S(3)*e*(-n + S(1)) + b**S(2)*(-n + S(1))*(c*d - e*sqrt(-S(4)*a*c + b**S(2))) + b*c*(S(2)*a*e*(-S(3)*n + S(2)) + d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + e**S(2)*x*(S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d + c*x**n*(S(2)*a*c*e - b**S(2)*e + b*c*d))/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + x*(S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d + c*x**n*(S(2)*a*c*e - b**S(2)*e + b*c*d))/(S(2)*a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))) - c*x*(-S(4)*a**S(2)*c**S(2)*(-S(2)*c*d*(S(8)*n**S(2) - S(6)*n + S(1)) + e*sqrt(-S(4)*a*c + b**S(2))*(S(3)*n**S(2) - S(4)*n + S(1))) + a*b**S(2)*c*(-n + S(1))*(-S(6)*c*d*(-S(3)*n + S(1)) + e*(-S(14)*n + S(5))*sqrt(-S(4)*a*c + b**S(2))) - S(2)*a*b*c**S(2)*(S(2)*a*e*(S(13)*n**S(2) - S(13)*n + S(3)) + d*sqrt(-S(4)*a*c + b**S(2))*(S(7)*n**S(2) - S(9)*n + S(2))) - b**S(5)*e*(S(2)*n**S(2) - S(3)*n + S(1)) + b**S(4)*(c*d - e*sqrt(-S(4)*a*c + b**S(2)))*(S(2)*n**S(2) - S(3)*n + S(1)) + b**S(3)*c*(-n + S(1))*(a*e*(-S(18)*n + S(7)) + d*(-S(2)*n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) + c*x*(-S(4)*a**S(2)*c**S(2)*(S(2)*c*d*(S(8)*n**S(2) - S(6)*n + S(1)) + e*sqrt(-S(4)*a*c + b**S(2))*(S(3)*n**S(2) - S(4)*n + S(1))) + a*b**S(2)*c*(-n + S(1))*(S(6)*c*d*(-S(3)*n + S(1)) + e*(-S(14)*n + S(5))*sqrt(-S(4)*a*c + b**S(2))) - S(2)*a*b*c**S(2)*(-S(2)*a*e*(S(13)*n**S(2) - S(13)*n + S(3)) + d*sqrt(-S(4)*a*c + b**S(2))*(S(7)*n**S(2) - S(9)*n + S(2))) + b**S(5)*e*(S(2)*n**S(2) - S(3)*n + S(1)) - b**S(4)*(c*d + e*sqrt(-S(4)*a*c + b**S(2)))*(S(2)*n**S(2) - S(3)*n + S(1)) - b**S(3)*c*(-n + S(1))*(a*e*(-S(18)*n + S(7)) - d*(-S(2)*n + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(c*d**S(2) - e*(-a*e + b*d))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) + x*(S(2)*a**S(2)*b*c**S(2)*e*(-S(11)*n + S(4)) - S(4)*a**S(2)*c**S(3)*d*(-S(4)*n + S(1)) - S(3)*a*b**S(3)*c*e*(-S(5)*n + S(2)) + S(5)*a*b**S(2)*c**S(2)*d*(-S(3)*n + S(1)) + b**S(5)*(-S(2)*e*n + e) - b**S(4)*c*d*(-S(2)*n + S(1)) - c*x**n*(-S(4)*a**S(2)*c**S(2)*e*(-S(3)*n + S(1)) + a*b**S(2)*c*e*(-S(14)*n + S(5)) - S(2)*a*b*c**S(2)*d*(-S(7)*n + S(2)) - b**S(4)*e*(-S(2)*n + S(1)) + b**S(3)*c*d*(-S(2)*n + S(1))))/(S(2)*a**S(2)*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**n + c*x**(S(2)*n))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) #Apart# assert rubi_test(rubi_integrate(S(1)/((d + e*x**n)**S(2)*(a + b*x**n + c*x**(S(2)*n))**S(3)), x), x, -c*e**S(4)*x*(S(3)*b*e**S(2)*(b - sqrt(-S(4)*a*c + b**S(2))) + S(10)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + S(5)*b*d - S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(4)) - c*e**S(4)*x*(S(3)*b*e**S(2)*(b + sqrt(-S(4)*a*c + b**S(2))) + S(10)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + S(5)*b*d + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/((-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(4)) + S(3)*e**S(6)*x*(-b*e + S(2)*c*d)*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d*(a*e**S(2) - b*d*e + c*d**S(2))**S(4)) + e**S(6)*x*hyper((S(2), S(1)/n), (S(1) + S(1)/n,), -e*x**n/d)/(d**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + c*e**S(2)*x*(S(4)*a*c**S(2)*(-S(3)*c*d**S(2)*(-S(2)*n + S(1)) + e*(a*e*(-S(2)*n + S(1)) - S(2)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))) + S(2)*b**S(4)*e**S(2)*(-n + S(1)) - b**S(3)*e*(-n + S(1))*(S(5)*c*d + S(2)*e*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*c*(-S(3)*c*d**S(2)*(-n + S(1)) + e*(a*e*(-S(13)*n + S(9)) - S(5)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))) + b*c*(S(5)*a*e**S(2)*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)) + c*d*(S(4)*a*e*(-S(8)*n + S(5)) - S(3)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) + c*e**S(2)*x*(S(4)*a*c**S(2)*(-S(3)*c*d**S(2)*(-S(2)*n + S(1)) + e*(a*e*(-S(2)*n + S(1)) + S(2)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))) + S(2)*b**S(4)*e**S(2)*(-n + S(1)) - b**S(3)*e*(-n + S(1))*(S(5)*c*d - S(2)*e*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*c*(-S(3)*c*d**S(2)*(-n + S(1)) + e*(a*e*(-S(13)*n + S(9)) + S(5)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))) + b*c*(-S(5)*a*e**S(2)*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)) + c*d*(S(4)*a*e*(-S(8)*n + S(5)) + S(3)*d*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) - e**S(2)*x*(-S(14)*a*b*c**S(2)*d*e + S(2)*a*c**S(2)*(-a*e**S(2) + S(3)*c*d**S(2)) - S(2)*b**S(4)*e**S(2) + S(5)*b**S(3)*c*d*e - b**S(2)*c*(-S(7)*a*e**S(2) + S(3)*c*d**S(2)) + c*x**n*(-S(8)*a*c**S(2)*d*e - S(2)*b**S(3)*e**S(2) + S(5)*b**S(2)*c*d*e - b*c*(-S(5)*a*e**S(2) + S(3)*c*d**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))*(a*e**S(2) - b*d*e + c*d**S(2))**S(3)) - x*(-S(6)*a*b*c**S(2)*d*e + S(2)*a*c**S(2)*(-a*e**S(2) + c*d**S(2)) - b**S(4)*e**S(2) + S(2)*b**S(3)*c*d*e - b**S(2)*c*(-S(4)*a*e**S(2) + c*d**S(2)) + c*x**n*(-S(4)*a*c**S(2)*d*e - b**S(3)*e**S(2) + S(2)*b**S(2)*c*d*e - b*c*(-S(3)*a*e**S(2) + c*d**S(2))))/(S(2)*a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + c*x*((-n + S(1))*(-S(8)*a**S(2)*c**S(3)*d*e*(-S(3)*n + S(1)) + S(2)*a*b**S(2)*c**S(2)*d*e*(-S(14)*n + S(5)) + S(2)*a*b*c**S(2)*(a*e**S(2)*(-S(13)*n + S(4)) - c*d**S(2)*(-S(7)*n + S(2))) + b**S(5)*e**S(2)*(-S(2)*n + S(1)) - S(2)*b**S(4)*c*d*e*(-S(2)*n + S(1)) - b**S(3)*c*(S(2)*a*e**S(2)*(-S(8)*n + S(3)) - c*d**S(2)*(-S(2)*n + S(1)))) + (S(8)*a**S(2)*b*c**S(3)*d*e*(S(13)*n**S(2) - S(13)*n + S(3)) - S(8)*a**S(2)*c**S(3)*(-a*e**S(2) + c*d**S(2))*(S(8)*n**S(2) - S(6)*n + S(1)) - S(2)*a*b**S(3)*c**S(2)*d*e*(S(18)*n**S(2) - S(25)*n + S(7)) + S(2)*a*b**S(2)*c**S(2)*(-a*e**S(2)*(S(35)*n**S(2) - S(38)*n + S(9)) + S(3)*c*d**S(2)*(S(3)*n**S(2) - S(4)*n + S(1))) - b**S(6)*e**S(2)*(S(2)*n**S(2) - S(3)*n + S(1)) + S(2)*b**S(5)*c*d*e*(S(2)*n**S(2) - S(3)*n + S(1)) + b**S(4)*c*(-n + S(1))*(S(4)*a*e**S(2)*(-S(5)*n + S(2)) - c*d**S(2)*(-S(2)*n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*n**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) + c*x*((-n + S(1))*(-S(8)*a**S(2)*c**S(3)*d*e*(-S(3)*n + S(1)) + S(2)*a*b**S(2)*c**S(2)*d*e*(-S(14)*n + S(5)) + S(2)*a*b*c**S(2)*(a*e**S(2)*(-S(13)*n + S(4)) - c*d**S(2)*(-S(7)*n + S(2))) + b**S(5)*e**S(2)*(-S(2)*n + S(1)) - S(2)*b**S(4)*c*d*e*(-S(2)*n + S(1)) - b**S(3)*c*(S(2)*a*e**S(2)*(-S(8)*n + S(3)) - c*d**S(2)*(-S(2)*n + S(1)))) - (S(8)*a**S(2)*b*c**S(3)*d*e*(S(13)*n**S(2) - S(13)*n + S(3)) - S(8)*a**S(2)*c**S(3)*(-a*e**S(2) + c*d**S(2))*(S(8)*n**S(2) - S(6)*n + S(1)) - S(2)*a*b**S(3)*c**S(2)*d*e*(S(18)*n**S(2) - S(25)*n + S(7)) + S(2)*a*b**S(2)*c**S(2)*(-a*e**S(2)*(S(35)*n**S(2) - S(38)*n + S(9)) + S(3)*c*d**S(2)*(S(3)*n**S(2) - S(4)*n + S(1))) - b**S(6)*e**S(2)*(S(2)*n**S(2) - S(3)*n + S(1)) + S(2)*b**S(5)*c*d*e*(S(2)*n**S(2) - S(3)*n + S(1)) + b**S(4)*c*(-n + S(1))*(S(4)*a*e**S(2)*(-S(5)*n + S(2)) - c*d**S(2)*(-S(2)*n + S(1))))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*n**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)) - x*(-S(4)*a**S(2)*b*c**S(3)*d*e*(-S(11)*n + S(4)) + S(4)*a**S(2)*c**S(3)*(-S(4)*n + S(1))*(-a*e**S(2) + c*d**S(2)) + S(6)*a*b**S(3)*c**S(2)*d*e*(-S(5)*n + S(2)) + a*b**S(2)*c**S(2)*(a*e**S(2)*(-S(37)*n + S(13)) - S(5)*c*d**S(2)*(-S(3)*n + S(1))) + b**S(6)*e**S(2)*(-S(2)*n + S(1)) - S(2)*b**S(5)*c*d*e*(-S(2)*n + S(1)) - b**S(4)*c*(a*e**S(2)*(-S(17)*n + S(7)) - c*d**S(2)*(-S(2)*n + S(1))) + c*x**n*(-S(8)*a**S(2)*c**S(3)*d*e*(-S(3)*n + S(1)) + S(2)*a*b**S(2)*c**S(2)*d*e*(-S(14)*n + S(5)) + S(2)*a*b*c**S(2)*(a*e**S(2)*(-S(13)*n + S(4)) - c*d**S(2)*(-S(7)*n + S(2))) + b**S(5)*e**S(2)*(-S(2)*n + S(1)) - S(2)*b**S(4)*c*d*e*(-S(2)*n + S(1)) - b**S(3)*c*(S(2)*a*e**S(2)*(-S(8)*n + S(3)) - c*d**S(2)*(-S(2)*n + S(1)))))/(S(2)*a**S(2)*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**n + c*x**(S(2)*n))*(a*e**S(2) - b*d*e + c*d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**(S(2)*n))**p/(d + e*x**n), x), x, x*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1(S(1)/(S(2)*n), -p, S(1), S(1) + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/d - e*x**(n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((n + S(1))/(S(2)*n), -p, S(1), S(3)/2 + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(2)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**(S(2)*n))**p/(d + e*x**n)**S(2), x), x, x*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1(S(1)/(S(2)*n), -p, S(2), S(1) + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/d**S(2) - S(2)*e*x**(n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((n + S(1))/(S(2)*n), -p, S(2), S(3)/2 + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(3)*(n + S(1))) + e**S(2)*x**(S(2)*n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1(S(1) + S(1)/(S(2)*n), -p, S(2), S(2) + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(4)*(S(2)*n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**(S(2)*n))**p/(d + e*x**n)**S(3), x), x, x*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1(S(1)/(S(2)*n), -p, S(3), S(1) + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/d**S(3) - S(3)*e*x**(n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((n + S(1))/(S(2)*n), -p, S(3), S(3)/2 + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(4)*(n + S(1))) + S(3)*e**S(2)*x**(S(2)*n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1(S(1) + S(1)/(S(2)*n), -p, S(3), S(2) + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(5)*(S(2)*n + S(1))) - e**S(3)*x**(S(3)*n + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1(S(3)/2 + S(1)/(S(2)*n), -p, S(3), S(5)/2 + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(6)*(S(3)*n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + c*x**(S(2)*n))*(d + e*x**n)), x), x, x*sqrt(S(1) + c*x**(S(2)*n)/a)*AppellF1(S(1)/(S(2)*n), S(1)/2, S(1), S(1) + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d*sqrt(a + c*x**(S(2)*n))) - e*x**(n + S(1))*sqrt(S(1) + c*x**(S(2)*n)/a)*AppellF1((n + S(1))/(S(2)*n), S(1)/2, S(1), S(3)/2 + S(1)/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(2)*sqrt(a + c*x**(S(2)*n))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)*sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, d*x*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(1)/n, S(-1)/2, S(-1)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + e*x**(n + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(1) + S(1)/n, S(-1)/2, S(-1)/2, S(2) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((n + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, a*d*x*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(1)/n, S(-3)/2, S(-3)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + a*e*x**(n + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))*AppellF1(S(1) + S(1)/n, S(-3)/2, S(-3)/2, S(2) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((n + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/sqrt(a + b*x**n + c*x**(S(2)*n)), x), x, d*x*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/n, S(1)/2, S(1)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/sqrt(a + b*x**n + c*x**(S(2)*n)) + e*x**(n + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1) + S(1)/n, S(1)/2, S(1)/2, S(2) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/((n + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, d*x*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/n, S(3)/2, S(3)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*sqrt(a + b*x**n + c*x**(S(2)*n))) + e*x**(n + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1) + S(1)/n, S(3)/2, S(3)/2, S(2) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*(n + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)/(a + b*x**n + c*x**(S(2)*n))**(S(5)/2), x), x, d*x*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/n, S(5)/2, S(5)/2, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a**S(2)*sqrt(a + b*x**n + c*x**(S(2)*n))) + e*x**(n + S(1))*sqrt(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1) + S(1)/n, S(5)/2, S(5)/2, S(2) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a**S(2)*(n + S(1))*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(3)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, d**S(3)*x*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(1)/n, -p, -p, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2)))) + S(3)*d**S(2)*e*x**(n + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(1) + S(1)/n, -p, -p, S(2) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(n + S(1)) + S(3)*d*e**S(2)*x**(S(2)*n + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(2) + S(1)/n, -p, -p, S(3) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*n + S(1)) + e**S(3)*x**(S(3)*n + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(3) + S(1)/n, -p, -p, S(4) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**S(2)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, d**S(2)*x*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(1)/n, -p, -p, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2)))) + S(2)*d*e*x**(n + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(1) + S(1)/n, -p, -p, S(2) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(n + S(1)) + e**S(2)*x**(S(2)*n + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(2) + S(1)/n, -p, -p, S(3) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, d*x*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(1)/n, -p, -p, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2)))) + e*x**(n + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1(S(1) + S(1)/n, -p, -p, S(2) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(n + S(1)), expand=True, _diff=True, _numerical=True) def test_3(): assert rubi_test(rubi_integrate(x**S(3)*(a + c*x**S(4))**S(5)*(d + e*x**S(2)), x), x, a**S(5)*d*x**S(4)/S(4) + a**S(5)*e*x**S(6)/S(6) + S(5)*a**S(4)*c*d*x**S(8)/S(8) + a**S(4)*c*e*x**S(10)/S(2) + S(5)*a**S(3)*c**S(2)*d*x**S(12)/S(6) + S(5)*a**S(3)*c**S(2)*e*x**S(14)/S(7) + S(5)*a**S(2)*c**S(3)*d*x**S(16)/S(8) + S(5)*a**S(2)*c**S(3)*e*x**S(18)/S(9) + a*c**S(4)*d*x**S(20)/S(4) + S(5)*a*c**S(4)*e*x**S(22)/S(22) + c**S(5)*d*x**S(24)/S(24) + c**S(5)*e*x**S(26)/S(26), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + c*x**S(4))**S(5)*(d + e*x**S(2)), x), x, a**S(5)*d*x**S(3)/S(3) + a**S(5)*e*x**S(5)/S(5) + S(5)*a**S(4)*c*d*x**S(7)/S(7) + S(5)*a**S(4)*c*e*x**S(9)/S(9) + S(10)*a**S(3)*c**S(2)*d*x**S(11)/S(11) + S(10)*a**S(3)*c**S(2)*e*x**S(13)/S(13) + S(2)*a**S(2)*c**S(3)*d*x**S(15)/S(3) + S(10)*a**S(2)*c**S(3)*e*x**S(17)/S(17) + S(5)*a*c**S(4)*d*x**S(19)/S(19) + S(5)*a*c**S(4)*e*x**S(21)/S(21) + c**S(5)*d*x**S(23)/S(23) + c**S(5)*e*x**S(25)/S(25), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + c*x**S(4))**S(5)*(d + e*x**S(2)), x), x, a**S(5)*d*x**S(2)/S(2) + S(5)*a**S(4)*c*d*x**S(6)/S(6) + a**S(3)*c**S(2)*d*x**S(10) + S(5)*a**S(2)*c**S(3)*d*x**S(14)/S(7) + S(5)*a*c**S(4)*d*x**S(18)/S(18) + c**S(5)*d*x**S(22)/S(22) + e*(a + c*x**S(4))**S(6)/(S(24)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**S(4))**S(5)*(d + e*x**S(2)), x), x, a**S(5)*d*x + a**S(5)*e*x**S(3)/S(3) + a**S(4)*c*d*x**S(5) + S(5)*a**S(4)*c*e*x**S(7)/S(7) + S(10)*a**S(3)*c**S(2)*d*x**S(9)/S(9) + S(10)*a**S(3)*c**S(2)*e*x**S(11)/S(11) + S(10)*a**S(2)*c**S(3)*d*x**S(13)/S(13) + S(2)*a**S(2)*c**S(3)*e*x**S(15)/S(3) + S(5)*a*c**S(4)*d*x**S(17)/S(17) + S(5)*a*c**S(4)*e*x**S(19)/S(19) + c**S(5)*d*x**S(21)/S(21) + c**S(5)*e*x**S(23)/S(23), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**S(4))**S(5)*(d + e*x**S(2))/x, x), x, a**S(5)*d*log(x) + a**S(5)*e*x**S(2)/S(2) + S(5)*a**S(4)*c*d*x**S(4)/S(4) + S(5)*a**S(4)*c*e*x**S(6)/S(6) + S(5)*a**S(3)*c**S(2)*d*x**S(8)/S(4) + a**S(3)*c**S(2)*e*x**S(10) + S(5)*a**S(2)*c**S(3)*d*x**S(12)/S(6) + S(5)*a**S(2)*c**S(3)*e*x**S(14)/S(7) + S(5)*a*c**S(4)*d*x**S(16)/S(16) + S(5)*a*c**S(4)*e*x**S(18)/S(18) + c**S(5)*d*x**S(20)/S(20) + c**S(5)*e*x**S(22)/S(22), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**S(4))**S(5)*(d + e*x**S(2))/x**S(2), x), x, -a**S(5)*d/x + a**S(5)*e*x + S(5)*a**S(4)*c*d*x**S(3)/S(3) + a**S(4)*c*e*x**S(5) + S(10)*a**S(3)*c**S(2)*d*x**S(7)/S(7) + S(10)*a**S(3)*c**S(2)*e*x**S(9)/S(9) + S(10)*a**S(2)*c**S(3)*d*x**S(11)/S(11) + S(10)*a**S(2)*c**S(3)*e*x**S(13)/S(13) + a*c**S(4)*d*x**S(15)/S(3) + S(5)*a*c**S(4)*e*x**S(17)/S(17) + c**S(5)*d*x**S(19)/S(19) + c**S(5)*e*x**S(21)/S(21), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**S(4))**S(5)*(d + e*x**S(2))/x**S(3), x), x, -a**S(5)*d/(S(2)*x**S(2)) + a**S(5)*e*log(x) + S(5)*a**S(4)*c*d*x**S(2)/S(2) + S(5)*a**S(4)*c*e*x**S(4)/S(4) + S(5)*a**S(3)*c**S(2)*d*x**S(6)/S(3) + S(5)*a**S(3)*c**S(2)*e*x**S(8)/S(4) + a**S(2)*c**S(3)*d*x**S(10) + S(5)*a**S(2)*c**S(3)*e*x**S(12)/S(6) + S(5)*a*c**S(4)*d*x**S(14)/S(14) + S(5)*a*c**S(4)*e*x**S(16)/S(16) + c**S(5)*d*x**S(18)/S(18) + c**S(5)*e*x**S(20)/S(20), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, d*(f*x)**(m + S(1))/(f*(m + S(1))) + e*(f*x)**(m + S(23))/(f**S(23)*(m + S(23))) + (f*x)**(m + S(3))*(S(10)*d + e)/(f**S(3)*(m + S(3))) + (f*x)**(m + S(5))*(S(45)*d + S(10)*e)/(f**S(5)*(m + S(5))) + (f*x)**(m + S(7))*(S(120)*d + S(45)*e)/(f**S(7)*(m + S(7))) + (f*x)**(m + S(9))*(S(210)*d + S(120)*e)/(f**S(9)*(m + S(9))) + (f*x)**(m + S(11))*(S(252)*d + S(210)*e)/(f**S(11)*(m + S(11))) + (f*x)**(m + S(13))*(S(210)*d + S(252)*e)/(f**S(13)*(m + S(13))) + (f*x)**(m + S(15))*(S(120)*d + S(210)*e)/(f**S(15)*(m + S(15))) + (f*x)**(m + S(17))*(S(45)*d + S(120)*e)/(f**S(17)*(m + S(17))) + (f*x)**(m + S(19))*(S(10)*d + S(45)*e)/(f**S(19)*(m + S(19))) + (f*x)**(m + S(21))*(d + S(10)*e)/(f**S(21)*(m + S(21))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, e*(x**S(2) + S(1))**S(14)/S(28) + (d/S(26) - S(3)*e/S(26))*(x**S(2) + S(1))**S(13) + (d/S(22) - e/S(22))*(x**S(2) + S(1))**S(11) - (d/S(12) - e/S(8))*(x**S(2) + S(1))**S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, d*x**S(5)/S(5) + e*x**S(27)/S(27) + x**S(25)*(d/S(25) + S(2)*e/S(5)) + x**S(23)*(S(10)*d/S(23) + S(45)*e/S(23)) + x**S(21)*(S(15)*d/S(7) + S(40)*e/S(7)) + x**S(19)*(S(120)*d/S(19) + S(210)*e/S(19)) + x**S(17)*(S(210)*d/S(17) + S(252)*e/S(17)) + x**S(15)*(S(84)*d/S(5) + S(14)*e) + x**S(13)*(S(210)*d/S(13) + S(120)*e/S(13)) + x**S(11)*(S(120)*d/S(11) + S(45)*e/S(11)) + x**S(9)*(S(5)*d + S(10)*e/S(9)) + x**S(7)*(S(10)*d/S(7) + e/S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, e*(x**S(2) + S(1))**S(13)/S(26) + (-d/S(22) + e/S(22))*(x**S(2) + S(1))**S(11) + (d/S(24) - e/S(12))*(x**S(2) + S(1))**S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, d*x**S(3)/S(3) + e*x**S(25)/S(25) + x**S(23)*(d/S(23) + S(10)*e/S(23)) + x**S(21)*(S(10)*d/S(21) + S(15)*e/S(7)) + x**S(19)*(S(45)*d/S(19) + S(120)*e/S(19)) + x**S(17)*(S(120)*d/S(17) + S(210)*e/S(17)) + x**S(15)*(S(14)*d + S(84)*e/S(5)) + x**S(13)*(S(252)*d/S(13) + S(210)*e/S(13)) + x**S(11)*(S(210)*d/S(11) + S(120)*e/S(11)) + x**S(9)*(S(40)*d/S(3) + S(5)*e) + x**S(7)*(S(45)*d/S(7) + S(10)*e/S(7)) + x**S(5)*(S(2)*d + e/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, e*(x**S(2) + S(1))**S(12)/S(24) + (d/S(22) - e/S(22))*(x**S(2) + S(1))**S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, d*x + e*x**S(23)/S(23) + x**S(21)*(d/S(21) + S(10)*e/S(21)) + x**S(19)*(S(10)*d/S(19) + S(45)*e/S(19)) + x**S(17)*(S(45)*d/S(17) + S(120)*e/S(17)) + x**S(15)*(S(8)*d + S(14)*e) + x**S(13)*(S(210)*d/S(13) + S(252)*e/S(13)) + x**S(11)*(S(252)*d/S(11) + S(210)*e/S(11)) + x**S(9)*(S(70)*d/S(3) + S(40)*e/S(3)) + x**S(7)*(S(120)*d/S(7) + S(45)*e/S(7)) + x**S(5)*(S(9)*d + S(2)*e) + x**S(3)*(S(10)*d/S(3) + e/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5)/x, x), x, d*x**S(20)/S(20) + S(5)*d*x**S(18)/S(9) + S(45)*d*x**S(16)/S(16) + S(60)*d*x**S(14)/S(7) + S(35)*d*x**S(12)/S(2) + S(126)*d*x**S(10)/S(5) + S(105)*d*x**S(8)/S(4) + S(20)*d*x**S(6) + S(45)*d*x**S(4)/S(4) + S(5)*d*x**S(2) + d*log(x) + e*(x**S(2) + S(1))**S(11)/S(22), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5)/x**S(2), x), x, -d/x + e*x**S(21)/S(21) + x**S(19)*(d/S(19) + S(10)*e/S(19)) + x**S(17)*(S(10)*d/S(17) + S(45)*e/S(17)) + x**S(15)*(S(3)*d + S(8)*e) + x**S(13)*(S(120)*d/S(13) + S(210)*e/S(13)) + x**S(11)*(S(210)*d/S(11) + S(252)*e/S(11)) + x**S(9)*(S(28)*d + S(70)*e/S(3)) + x**S(7)*(S(30)*d + S(120)*e/S(7)) + x**S(5)*(S(24)*d + S(9)*e) + x**S(3)*(S(15)*d + S(10)*e/S(3)) + x*(S(10)*d + e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5)/x**S(3), x), x, -d/(S(2)*x**S(2)) + e*x**S(20)/S(20) + x**S(18)*(d/S(18) + S(5)*e/S(9)) + x**S(16)*(S(5)*d/S(8) + S(45)*e/S(16)) + x**S(14)*(S(45)*d/S(14) + S(60)*e/S(7)) + x**S(12)*(S(10)*d + S(35)*e/S(2)) + x**S(10)*(S(21)*d + S(126)*e/S(5)) + x**S(8)*(S(63)*d/S(2) + S(105)*e/S(4)) + x**S(6)*(S(35)*d + S(20)*e) + x**S(4)*(S(30)*d + S(45)*e/S(4)) + x**S(2)*(S(45)*d/S(2) + S(5)*e) + (S(10)*d + e)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, (f*x)**(m + S(1))/(f*(m + S(1))) + S(11)*(f*x)**(m + S(3))/(f**S(3)*(m + S(3))) + S(55)*(f*x)**(m + S(5))/(f**S(5)*(m + S(5))) + S(165)*(f*x)**(m + S(7))/(f**S(7)*(m + S(7))) + S(330)*(f*x)**(m + S(9))/(f**S(9)*(m + S(9))) + S(462)*(f*x)**(m + S(11))/(f**S(11)*(m + S(11))) + S(462)*(f*x)**(m + S(13))/(f**S(13)*(m + S(13))) + S(330)*(f*x)**(m + S(15))/(f**S(15)*(m + S(15))) + S(165)*(f*x)**(m + S(17))/(f**S(17)*(m + S(17))) + S(55)*(f*x)**(m + S(19))/(f**S(19)*(m + S(19))) + S(11)*(f*x)**(m + S(21))/(f**S(21)*(m + S(21))) + (f*x)**(m + S(23))/(f**S(23)*(m + S(23))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, (x**S(2) + S(1))**S(14)/S(28) - (x**S(2) + S(1))**S(13)/S(13) + (x**S(2) + S(1))**S(12)/S(24), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, x**S(27)/S(27) + S(11)*x**S(25)/S(25) + S(55)*x**S(23)/S(23) + S(55)*x**S(21)/S(7) + S(330)*x**S(19)/S(19) + S(462)*x**S(17)/S(17) + S(154)*x**S(15)/S(5) + S(330)*x**S(13)/S(13) + S(15)*x**S(11) + S(55)*x**S(9)/S(9) + S(11)*x**S(7)/S(7) + x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, (x**S(2) + S(1))**S(13)/S(26) - (x**S(2) + S(1))**S(12)/S(24), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, x**S(25)/S(25) + S(11)*x**S(23)/S(23) + S(55)*x**S(21)/S(21) + S(165)*x**S(19)/S(19) + S(330)*x**S(17)/S(17) + S(154)*x**S(15)/S(5) + S(462)*x**S(13)/S(13) + S(30)*x**S(11) + S(55)*x**S(9)/S(3) + S(55)*x**S(7)/S(7) + S(11)*x**S(5)/S(5) + x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, (x**S(2) + S(1))**S(12)/S(24), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5), x), x, x**S(23)/S(23) + S(11)*x**S(21)/S(21) + S(55)*x**S(19)/S(19) + S(165)*x**S(17)/S(17) + S(22)*x**S(15) + S(462)*x**S(13)/S(13) + S(42)*x**S(11) + S(110)*x**S(9)/S(3) + S(165)*x**S(7)/S(7) + S(11)*x**S(5) + S(11)*x**S(3)/S(3) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5)/x, x), x, x**S(22)/S(22) + S(11)*x**S(20)/S(20) + S(55)*x**S(18)/S(18) + S(165)*x**S(16)/S(16) + S(165)*x**S(14)/S(7) + S(77)*x**S(12)/S(2) + S(231)*x**S(10)/S(5) + S(165)*x**S(8)/S(4) + S(55)*x**S(6)/S(2) + S(55)*x**S(4)/S(4) + S(11)*x**S(2)/S(2) + log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5)/x**S(2), x), x, x**S(21)/S(21) + S(11)*x**S(19)/S(19) + S(55)*x**S(17)/S(17) + S(11)*x**S(15) + S(330)*x**S(13)/S(13) + S(42)*x**S(11) + S(154)*x**S(9)/S(3) + S(330)*x**S(7)/S(7) + S(33)*x**S(5) + S(55)*x**S(3)/S(3) + S(11)*x - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))*(x**S(4) + S(2)*x**S(2) + S(1))**S(5)/x**S(3), x), x, x**S(20)/S(20) + S(11)*x**S(18)/S(18) + S(55)*x**S(16)/S(16) + S(165)*x**S(14)/S(14) + S(55)*x**S(12)/S(2) + S(231)*x**S(10)/S(5) + S(231)*x**S(8)/S(4) + S(55)*x**S(6) + S(165)*x**S(4)/S(4) + S(55)*x**S(2)/S(2) + S(11)*log(x) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, e*(f*x)**(m + S(1))*(a + b*x**S(2))/(b*f*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (f*x)**(m + S(1))*(a + b*x**S(2))*(-a*e + b*d)*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(a*b*f*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**S(2))/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, -sqrt(a)*(a + b*x**S(2))*(-a*e + b*d)*atan(sqrt(b)*x/sqrt(a))/(b**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + e*x**S(3)*(a + b*x**S(2))/(S(3)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + x*(a + b*x**S(2))*(-a*e + b*d)/(b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(2))/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, e*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*b**S(2)) + (a + b*x**S(2))*(-a*e + b*d)*log(a + b*x**S(2))/(S(2)*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, e*x*(a + b*x**S(2))/(b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (a + b*x**S(2))*(-a*e + b*d)*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*b**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, d*(a + b*x**S(2))*log(x)/(a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (a + b*x**S(2))*(-a*e + b*d)*log(a + b*x**S(2))/(S(2)*a*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, -d*(a + b*x**S(2))/(a*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (a + b*x**S(2))*(-a*e + b*d)*atan(sqrt(b)*x/sqrt(a))/(a**(S(3)/2)*sqrt(b)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(x**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), x), x, -d*(a + b*x**S(2))/(S(2)*a*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (a + b*x**S(2))*(-a*e + b*d)*log(x)/(a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (a + b*x**S(2))*(-a*e + b*d)*log(a + b*x**S(2))/(S(2)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, (f*x)**(m + S(1))*(-a*e + b*d)/(S(4)*a*b*f*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (f*x)**(m + S(1))*(a + b*x**S(2))*(a*e*(m + S(1)) + b*d*(-m + S(3)))*hyper((S(2), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -b*x**S(2)/a)/(S(4)*a**S(3)*b*f*(m + S(1))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**S(2))/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, -x*(-a*e + b*d)/(S(4)*b**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + x*(-S(5)*a*e + b*d)/(S(8)*a*b**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (a + b*x**S(2))*(S(3)*a*e + b*d)*atan(sqrt(b)*x/sqrt(a))/(S(8)*a**(S(3)/2)*b**(S(5)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(2))/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, -(a + b*x**S(2))*(d + e*x**S(2))**S(2)/((-S(4)*a*e + S(4)*b*d)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2), x), x, x*(-a*e + b*d)/(S(4)*a*b*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + x*(a*e + S(3)*b*d)/(S(8)*a**S(2)*b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (a + b*x**S(2))*(a*e + S(3)*b*d)*atan(sqrt(b)*x/sqrt(a))/(S(8)*a**(S(5)/2)*b**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(x*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, (-a*e + b*d)/(S(4)*a*b*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + d/(S(2)*a**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + d*(a + b*x**S(2))*log(x)/(a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - d*(a + b*x**S(2))*log(a + b*x**S(2))/(S(2)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(x**S(2)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, -x*(-a*e + b*d)/(S(4)*a**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - d*(a + b*x**S(2))/(a**S(3)*x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - x*(-S(3)*a*e + S(7)*b*d)/(S(8)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (a + b*x**S(2))*(-S(3)*a*e + S(15)*b*d)*atan(sqrt(b)*x/sqrt(a))/(S(8)*a**(S(7)/2)*sqrt(b)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(x**S(3)*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(S(3)/2)), x), x, -(-a*e + b*d)/(S(4)*a**S(2)*(a + b*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - d*(a + b*x**S(2))/(S(2)*a**S(3)*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (-a*e + S(2)*b*d)/(S(2)*a**S(3)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) - (a + b*x**S(2))*(-a*e + S(3)*b*d)*log(x)/(a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))) + (a + b*x**S(2))*(-a*e + S(3)*b*d)*log(a + b*x**S(2))/(S(2)*a**S(4)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2))*(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**p, x), x, (a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))**(p + S(1))/(S(4)*b*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(c + d*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, b*x**S(3)*(c + d*x**S(2))**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(6)*d*(a + b*x**S(2))) + c**S(2)*(-S(2)*a*d + b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh(sqrt(d)*x/sqrt(c + d*x**S(2)))/(S(16)*d**(S(5)/2)*(a + b*x**S(2))) - c*x*sqrt(c + d*x**S(2))*(-S(2)*a*d + b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(16)*d**S(2)*(a + b*x**S(2))) - x**S(3)*sqrt(c + d*x**S(2))*(-S(2)*a*d + b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(8)*d*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(c + d*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, (c + d*x**S(2))**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(5)*d) - (c + d*x**S(2))**(S(3)/2)*(-S(2)*a*d + S(2)*b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(15)*d**S(2)*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c + d*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4)), x), x, b*x*(c + d*x**S(2))**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(4)*d*(a + b*x**S(2))) - c*(-S(4)*a*d + b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh(sqrt(d)*x/sqrt(c + d*x**S(2)))/(S(8)*d**(S(3)/2)*(a + b*x**S(2))) - x*sqrt(c + d*x**S(2))*(-S(4)*a*d + b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(8)*d*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c + d*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x, x), x, -a*sqrt(c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh(sqrt(c + d*x**S(2))/sqrt(c))/(a + b*x**S(2)) + a*sqrt(c + d*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(a + b*x**S(2)) + b*(c + d*x**S(2))**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(3)*d*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c + d*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(2), x), x, -a*(c + d*x**S(2))**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(c*x*(a + b*x**S(2))) + (S(2)*a*d + b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh(sqrt(d)*x/sqrt(c + d*x**S(2)))/(S(2)*sqrt(d)*(a + b*x**S(2))) + x*sqrt(c + d*x**S(2))*(S(2)*a*d + b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*c*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c + d*x**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/x**S(3), x), x, -a*(c + d*x**S(2))**(S(3)/2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*c*x**S(2)*(a + b*x**S(2))) + sqrt(c + d*x**S(2))*(a*d + S(2)*b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))/(S(2)*c*(a + b*x**S(2))) - (a*d + S(2)*b*c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh(sqrt(c + d*x**S(2))/sqrt(c))/(S(2)*sqrt(c)*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, A*a**S(3)*x**S(4)/S(4) + B*c**S(3)*x**S(18)/S(18) + a**S(2)*x**S(6)*(S(3)*A*b + B*a)/S(6) + S(3)*a*x**S(8)*(A*(a*c + b**S(2)) + B*a*b)/S(8) + c**S(2)*x**S(16)*(A*c + S(3)*B*b)/S(16) + S(3)*c*x**S(14)*(A*b*c + B*a*c + B*b**S(2))/S(14) + x**S(12)*(A*a*c**S(2)/S(4) + A*b**S(2)*c/S(4) + B*a*b*c/S(2) + B*b**S(3)/S(12)) + x**S(10)*(A*(S(6)*a*b*c + b**S(3))/S(10) + S(3)*B*a*(a*c + b**S(2))/S(10)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, A*a**S(3)*x**S(3)/S(3) + B*c**S(3)*x**S(17)/S(17) + a**S(2)*x**S(5)*(S(3)*A*b + B*a)/S(5) + S(3)*a*x**S(7)*(A*(a*c + b**S(2)) + B*a*b)/S(7) + c**S(2)*x**S(15)*(A*c + S(3)*B*b)/S(15) + S(3)*c*x**S(13)*(A*b*c + B*a*c + B*b**S(2))/S(13) + x**S(11)*(S(3)*A*a*c**S(2)/S(11) + S(3)*A*b**S(2)*c/S(11) + S(6)*B*a*b*c/S(11) + B*b**S(3)/S(11)) + x**S(9)*(A*(S(6)*a*b*c + b**S(3))/S(9) + B*a*(a*c + b**S(2))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, A*a**S(3)*x**S(2)/S(2) + B*c**S(3)*x**S(16)/S(16) + a**S(2)*x**S(4)*(S(3)*A*b + B*a)/S(4) + a*x**S(6)*(A*(a*c + b**S(2)) + B*a*b)/S(2) + c**S(2)*x**S(14)*(A*c + S(3)*B*b)/S(14) + c*x**S(12)*(A*b*c + B*a*c + B*b**S(2))/S(4) + x**S(10)*(S(3)*A*a*c**S(2)/S(10) + S(3)*A*b**S(2)*c/S(10) + S(3)*B*a*b*c/S(5) + B*b**S(3)/S(10)) + x**S(8)*(A*(S(6)*a*b*c + b**S(3))/S(8) + S(3)*B*a*(a*c + b**S(2))/S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, A*a**S(3)*x + B*c**S(3)*x**S(15)/S(15) + a**S(2)*x**S(3)*(S(3)*A*b + B*a)/S(3) + S(3)*a*x**S(5)*(A*(a*c + b**S(2)) + B*a*b)/S(5) + c**S(2)*x**S(13)*(A*c + S(3)*B*b)/S(13) + S(3)*c*x**S(11)*(A*b*c + B*a*c + B*b**S(2))/S(11) + x**S(9)*(A*a*c**S(2)/S(3) + A*b**S(2)*c/S(3) + S(2)*B*a*b*c/S(3) + B*b**S(3)/S(9)) + x**S(7)*(A*(S(6)*a*b*c + b**S(3))/S(7) + S(3)*B*a*(a*c + b**S(2))/S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(3)/x, x), x, A*a**S(3)*log(x) + B*c**S(3)*x**S(14)/S(14) + a**S(2)*x**S(2)*(S(3)*A*b + B*a)/S(2) + S(3)*a*x**S(4)*(A*(a*c + b**S(2)) + B*a*b)/S(4) + c**S(2)*x**S(12)*(A*c + S(3)*B*b)/S(12) + S(3)*c*x**S(10)*(A*b*c + B*a*c + B*b**S(2))/S(10) + x**S(8)*(S(3)*A*a*c**S(2)/S(8) + S(3)*A*b**S(2)*c/S(8) + S(3)*B*a*b*c/S(4) + B*b**S(3)/S(8)) + x**S(6)*(A*(S(6)*a*b*c + b**S(3))/S(6) + B*a*(a*c + b**S(2))/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(3)/x**S(2), x), x, -A*a**S(3)/x + B*c**S(3)*x**S(13)/S(13) + a**S(2)*x*(S(3)*A*b + B*a) + a*x**S(3)*(A*(a*c + b**S(2)) + B*a*b) + c**S(2)*x**S(11)*(A*c + S(3)*B*b)/S(11) + c*x**S(9)*(A*b*c + B*a*c + B*b**S(2))/S(3) + x**S(7)*(S(3)*A*a*c**S(2)/S(7) + S(3)*A*b**S(2)*c/S(7) + S(6)*B*a*b*c/S(7) + B*b**S(3)/S(7)) + x**S(5)*(A*(S(6)*a*b*c + b**S(3))/S(5) + S(3)*B*a*(a*c + b**S(2))/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(3)/x**S(3), x), x, -A*a**S(3)/(S(2)*x**S(2)) + B*c**S(3)*x**S(12)/S(12) + a**S(2)*(S(3)*A*b + B*a)*log(x) + S(3)*a*x**S(2)*(A*(a*c + b**S(2)) + B*a*b)/S(2) + c**S(2)*x**S(10)*(A*c + S(3)*B*b)/S(10) + S(3)*c*x**S(8)*(A*b*c + B*a*c + B*b**S(2))/S(8) + x**S(6)*(A*a*c**S(2)/S(2) + A*b**S(2)*c/S(2) + B*a*b*c + B*b**S(3)/S(6)) + x**S(4)*(A*(S(6)*a*b*c + b**S(3))/S(4) + S(3)*B*a*(a*c + b**S(2))/S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, B*x**S(4)/(S(4)*c) - x**S(2)*(-A*c + B*b)/(S(2)*c**S(2)) + (-A*b*c - B*a*c + B*b**S(2))*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)) + (S(2)*A*a*c**S(2) - A*b**S(2)*c - S(3)*B*a*b*c + B*b**S(3))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, B*x**S(2)/(S(2)*c) - (-A*c + B*b)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) - (-A*b*c - S(2)*B*a*c + B*b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, B*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c) + (-S(2)*A*c + B*b)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x*(a + b*x**S(2) + c*x**S(4))), x), x, A*log(x)/a - A*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a) + (A*b - S(2)*B*a)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(3)*(a + b*x**S(2) + c*x**S(4))), x), x, -A/(S(2)*a*x**S(2)) - (A*b - B*a)*log(x)/a**S(2) + (A*b - B*a)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)) - (-S(2)*A*a*c + A*b**S(2) - B*a*b)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, B*x**S(3)/(S(3)*c) - x*(-A*c + B*b)/c**S(2) + sqrt(S(2))*(-A*b*c - B*a*c + B*b**S(2) + (S(2)*A*a*c**S(2) - A*b**S(2)*c - S(3)*B*a*b*c + B*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(-A*b*c - B*a*c + B*b**S(2) - (S(2)*A*a*c**S(2) - A*b**S(2)*c - S(3)*B*a*b*c + B*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, B*x/c - sqrt(S(2))*(-A*c + B*b + (-A*b*c - S(2)*B*a*c + B*b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(-A*c + B*b - (-A*b*c - S(2)*B*a*c + B*b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, sqrt(S(2))*(B - (-S(2)*A*c + B*b)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(B + (-S(2)*A*c + B*b)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(2)*(a + b*x**S(2) + c*x**S(4))), x), x, -A/(a*x) - sqrt(S(2))*sqrt(c)*(A - (A*b - S(2)*B*a)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(A + (A*b - S(2)*B*a)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(4)*(a + b*x**S(2) + c*x**S(4))), x), x, -A/(S(3)*a*x**S(3)) + sqrt(S(2))*sqrt(c)*(-A*(-S(2)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) + B*a*(b - sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) - sqrt(S(2))*sqrt(c)*(-A*(-S(2)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) + B*a*(b + sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + (A*b - B*a)/(a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -x**S(4)*(a*(-S(2)*A*c + B*b) + x**S(2)*(-A*b*c - S(2)*B*a*c + B*b**S(2)))/(S(2)*c*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + x**S(2)*(-A*b*c - S(6)*B*a*c + S(2)*B*b**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))) - (-A*c + S(2)*B*b)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)) - (S(6)*A*a*b*c**S(2) - A*b**S(3)*c + S(12)*B*a**S(2)*c**S(2) - S(12)*B*a*b**S(2)*c + S(2)*B*b**S(4))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, B*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) - x**S(2)*(a*(-S(2)*A*c + B*b) + x**S(2)*(-A*b*c - S(2)*B*a*c + B*b**S(2)))/(S(2)*c*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + (S(4)*A*a*c**S(2) - S(6)*B*a*b*c + B*b**S(3))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, (A + B*x**S(2))*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (A*b - S(2)*B*a)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -(-S(2)*A*c + B*b)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - (A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, A*log(x)/a**S(2) - A*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)) - (-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + (A*(-S(6)*a*b*c + b**S(3)) + S(4)*B*a**S(2)*c)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(3)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, -(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(S(2)*a*x**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (-S(6)*A*a*c + S(2)*A*b**S(2) - B*a*b)/(S(2)*a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) - (S(2)*A*b - B*a)*log(x)/a**S(3) + (S(2)*A*b - B*a)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(3)) + (-S(2)*A*(S(6)*a**S(2)*c**S(2) - S(6)*a*b**S(2)*c + b**S(4)) + B*a*b*(-S(6)*a*c + b**S(2)))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -x**S(5)*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - x**S(3)*(-S(2)*A*c + B*b)/(S(2)*c*(-S(4)*a*c + b**S(2))) + x*(-A*b*c - S(10)*B*a*c + S(3)*B*b**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*(S(6)*A*a*c**S(2) - A*b**S(2)*c - S(13)*B*a*b*c + S(3)*B*b**S(3) + (S(8)*A*a*b*c**S(2) - A*b**S(3)*c + S(20)*B*a**S(2)*c**S(2) - S(19)*B*a*b**S(2)*c + S(3)*B*b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*(S(6)*A*a*c**S(2) - A*b**S(2)*c - S(13)*B*a*b*c + S(3)*B*b**S(3) - (S(8)*A*a*b*c**S(2) - A*b**S(3)*c + S(20)*B*a**S(2)*c**S(2) - S(19)*B*a*b**S(2)*c + S(3)*B*b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -x**S(3)*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - x*(-S(2)*A*c + B*b)/(S(2)*c*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(A*b*c - S(6)*B*a*c + B*b**S(2) + (S(4)*A*a*c**S(2) + A*b**S(2)*c - S(8)*B*a*b*c + B*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(A*b*c - S(6)*B*a*c + B*b**S(2) - (S(4)*A*a*c**S(2) + A*b**S(2)*c - S(8)*B*a*b*c + B*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -x*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(-S(2)*A*c + B*b + (-S(4)*A*b*c + S(4)*B*a*c + B*b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(-S(2)*A*c + B*b - (-S(4)*A*b*c + S(4)*B*a*c + B*b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, sqrt(S(2))*sqrt(c)*(A*b - S(2)*B*a - (-S(12)*A*a*c + A*b**S(2) + S(4)*B*a*b)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*(A*b - S(2)*B*a + (A*(-S(12)*a*c + b**S(2)) + S(4)*B*a*b)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) - x*(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(2)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, -(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(S(2)*a*x*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*sqrt(c)*(-S(10)*A*a*c + S(3)*A*b**S(2) - B*a*b + (-A*(-S(16)*a*b*c + S(3)*b**S(3)) + B*a*(-S(12)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*(-A*(-S(16)*a*b*c - S(10)*a*c*sqrt(-S(4)*a*c + b**S(2)) + S(3)*b**S(3) + S(3)*b**S(2)*sqrt(-S(4)*a*c + b**S(2))) + B*a*(-S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (-S(10)*A*a*c + S(3)*A*b**S(2) - B*a*b)/(S(2)*a**S(2)*x*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(4)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, -(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(S(2)*a*x**S(3)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (-S(14)*A*a*c + S(5)*A*b**S(2) - S(3)*B*a*b)/(S(6)*a**S(2)*x**S(3)*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*(-A*(S(28)*a**S(2)*c**S(2) - S(29)*a*b**S(2)*c + S(19)*a*b*c*sqrt(-S(4)*a*c + b**S(2)) + S(5)*b**S(4) - S(5)*b**S(3)*sqrt(-S(4)*a*c + b**S(2))) + B*a*(-S(16)*a*b*c + S(10)*a*c*sqrt(-S(4)*a*c + b**S(2)) + S(3)*b**S(3) - S(3)*b**S(2)*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(3)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*sqrt(c)*(-A*(S(28)*a**S(2)*c**S(2) - S(29)*a*b**S(2)*c - S(19)*a*b*c*sqrt(-S(4)*a*c + b**S(2)) + S(5)*b**S(4) + S(5)*b**S(3)*sqrt(-S(4)*a*c + b**S(2))) + B*a*(-S(16)*a*b*c - S(10)*a*c*sqrt(-S(4)*a*c + b**S(2)) + S(3)*b**S(3) + S(3)*b**S(2)*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(3)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (-A*(-S(19)*a*b*c + S(5)*b**S(3)) + B*a*(-S(10)*a*c + S(3)*b**S(2)))/(S(2)*a**S(3)*x*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x**S(8)*(a*(-S(2)*A*c + B*b) + x**S(2)*(-A*b*c - S(2)*B*a*c + B*b**S(2)))/(S(4)*c*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - x**S(4)*(a*(S(16)*A*a*c**S(2) - A*b**S(2)*c - S(18)*B*a*b*c + S(3)*B*b**S(3)) + x**S(2)*(S(10)*A*a*b*c**S(2) - A*b**S(3)*c + S(20)*B*a**S(2)*c**S(2) - S(20)*B*a*b**S(2)*c + S(3)*B*b**S(4)))/(S(4)*c**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - x**S(2)*(A*(-S(7)*a*b*c + b**S(3)) + S(3)*B*(-S(10)*a**S(2)*c + S(7)*a*b**S(2) - b**S(4)/c))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**S(2)) - (-A*c + S(3)*B*b)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(4)) - (-S(30)*A*a**S(2)*b*c**S(3) + S(10)*A*a*b**S(3)*c**S(2) - A*b**S(5)*c - S(60)*B*a**S(3)*c**S(3) + S(90)*B*a**S(2)*b**S(2)*c**S(2) - S(30)*B*a*b**S(4)*c + S(3)*B*b**S(6))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(4)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, B*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)) - x**S(6)*(a*(-S(2)*A*c + B*b) + x**S(2)*(-A*b*c - S(2)*B*a*c + B*b**S(2)))/(S(4)*c*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - x**S(2)*(S(2)*a*(S(6)*A*a*c**S(2) - S(7)*B*a*b*c + B*b**S(3)) + x**S(2)*(S(6)*A*a*b*c**S(2) + S(16)*B*a**S(2)*c**S(2) - S(15)*B*a*b**S(2)*c + S(2)*B*b**S(4)))/(S(4)*c**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + (-S(12)*A*a**S(2)*c**S(3) + S(30)*B*a**S(2)*b*c**S(2) - S(10)*B*a*b**S(3)*c + B*b**S(5))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(3)*a*(A*b - S(2)*B*a)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) - x**S(6)*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + x**S(2)*(S(2)*a + b*x**S(2))*(S(3)*A*b - S(6)*B*a)/(S(4)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x**S(4)*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + (S(2)*a + b*x**S(2))*(S(2)*A*b - S(4)*B*a + x**S(2)*(-S(2)*A*c + B*b))/(S(4)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + (-A*(S(2)*a*c + b**S(2)) + S(3)*B*a*b)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -(-S(3)*A*b*c + S(2)*B*a*c + B*b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + (b + S(2)*c*x**S(2))*(-S(3)*A*b*c + S(2)*B*a*c + B*b**S(2))/(S(4)*c*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - (a*(-S(2)*A*c + B*b) + x**S(2)*(-A*b*c - S(2)*B*a*c + B*b**S(2)))/(S(4)*c*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(3)*c*(-S(2)*A*c + B*b)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) - (b + S(2)*c*x**S(2))*(-S(6)*A*c + S(3)*B*b)/(S(4)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - (A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x*(a + b*x**S(2) + c*x**S(4))**S(3)), x), x, A*log(x)/a**S(3) - A*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(3)) - (-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + (A*(S(16)*a**S(2)*c**S(2) - S(15)*a*b**S(2)*c + S(2)*b**S(4)) + S(6)*B*a**S(2)*b*c + S(2)*c*x**S(2)*(A*(-S(7)*a*b*c + b**S(3)) + S(6)*B*a**S(2)*c))/(S(4)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - (-A*(S(30)*a**S(2)*b*c**S(2) - S(10)*a*b**S(3)*c + b**S(5)) + S(12)*B*a**S(3)*c**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(3)*(a + b*x**S(2) + c*x**S(4))**S(3)), x), x, -(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(S(4)*a*x**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - (-A*(S(20)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4)) + B*a*b*(-S(10)*a*c + b**S(2)) + c*x**S(2)*(-S(3)*A*(-S(6)*a*b*c + b**S(3)) + B*a*(-S(16)*a*c + b**S(2))))/(S(4)*a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + (-S(3)*A*(S(10)*a**S(2)*c**S(2) - S(7)*a*b**S(2)*c + b**S(4)) + B*a*b*(-S(7)*a*c + b**S(2)))/(S(2)*a**S(3)*x**S(2)*(-S(4)*a*c + b**S(2))**S(2)) - (S(3)*A*b - B*a)*log(x)/a**S(4) + (S(3)*A*b - B*a)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(4)) + (-S(3)*A*(-S(20)*a**S(3)*c**S(3) + S(30)*a**S(2)*b**S(2)*c**S(2) - S(10)*a*b**S(4)*c + b**S(6)) + B*a*b*(S(30)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4)))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(4)*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x**S(7)*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - x**S(5)*(-S(4)*A*a*c + S(7)*A*b**S(2) - S(12)*B*a*b + x**S(2)*(S(12)*A*b*c - S(28)*B*a*c + B*b**S(2)))/(S(8)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + x**S(3)*(S(12)*A*b*c - S(28)*B*a*c + B*b**S(2))/(S(8)*c*(-S(4)*a*c + b**S(2))**S(2)) - x*(S(20)*A*a*c**S(2) + A*b**S(2)*c - S(24)*B*a*b*c + S(3)*B*b**S(3))/(S(8)*c**S(2)*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(-S(16)*A*a*b*c**S(2) + A*b**S(3)*c + S(84)*B*a**S(2)*c**S(2) - S(27)*B*a*b**S(2)*c + S(3)*B*b**S(4) + (-S(40)*A*a**S(2)*c**S(3) - S(18)*A*a*b**S(2)*c**S(2) + A*b**S(4)*c + S(132)*B*a**S(2)*b*c**S(2) - S(33)*B*a*b**S(3)*c + S(3)*B*b**S(5))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(-S(16)*A*a*b*c**S(2) + A*b**S(3)*c + S(84)*B*a**S(2)*c**S(2) - S(27)*B*a*b**S(2)*c + S(3)*B*b**S(4) - (-S(40)*A*a**S(2)*c**S(3) - S(18)*A*a*b**S(2)*c**S(2) + A*b**S(4)*c + S(132)*B*a**S(2)*b*c**S(2) - S(33)*B*a*b**S(3)*c + S(3)*B*b**S(5))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x**S(5)*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - x**S(3)*(S(4)*A*a*c + S(5)*A*b**S(2) - S(12)*B*a*b - x**S(2)*(-S(12)*A*b*c + S(20)*B*a*c + B*b**S(2)))/(S(8)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - x*(-S(12)*A*b*c + S(20)*B*a*c + B*b**S(2))/(S(8)*c*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(S(12)*A*a*c**S(2) + S(3)*A*b**S(2)*c - S(16)*B*a*b*c + B*b**S(3) + (S(36)*A*a*b*c**S(2) + S(3)*A*b**S(3)*c - S(40)*B*a**S(2)*c**S(2) - S(18)*B*a*b**S(2)*c + B*b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(S(12)*A*a*c**S(2) + S(3)*A*b**S(2)*c - S(16)*B*a*b*c + B*b**S(3) - (S(36)*A*a*b*c**S(2) + S(3)*A*b**S(3)*c - S(40)*B*a**S(2)*c**S(2) - S(18)*B*a*b**S(2)*c + B*b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x**S(3)*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + S(3)*x*(-A*(S(4)*a*c + b**S(2)) + S(4)*B*a*b + x**S(2)*(-S(4)*A*b*c + S(4)*B*a*c + B*b**S(2)))/(S(8)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(-S(12)*A*b*c + S(12)*B*a*c + S(3)*B*b**S(2) + S(3)*(-S(8)*A*a*c**S(2) - S(6)*A*b**S(2)*c + S(12)*B*a*b*c + B*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*(-S(12)*A*b*c + S(12)*B*a*c + S(3)*B*b**S(2) - S(3)*(-S(8)*A*a*c**S(2) - S(6)*A*b**S(2)*c + S(12)*B*a*b*c + B*b**S(3))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(16)*a*c + S(4)*b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - sqrt(S(2))*sqrt(c)*(-A*(S(20)*a*c + b**S(2)) + S(12)*B*a*b + (A*(-S(52)*a*b*c + b**S(3)) + S(6)*B*a*(S(4)*a*c + S(3)*b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - sqrt(S(2))*sqrt(c)*(-A*(S(20)*a*c + b**S(2)) + S(12)*B*a*b - (A*(-S(52)*a*b*c + b**S(3)) + S(6)*B*a*(S(4)*a*c + S(3)*b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) - x*(-A*(S(8)*a*b*c + b**S(3)) + B*a*(-S(4)*a*c + S(7)*b**S(2)) + c*x**S(2)*(-A*(S(20)*a*c + b**S(2)) + S(12)*B*a*b))/(S(8)*a*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -x*(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + sqrt(S(2))*sqrt(c)*(S(3)*A*(-S(8)*a*b*c + b**S(3)) + B*a*(S(20)*a*c + b**S(2)) - (S(3)*A*(S(56)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4)) + B*a*b*(-S(52)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + sqrt(S(2))*sqrt(c)*(S(3)*A*(-S(8)*a*b*c + b**S(3)) + B*a*(S(20)*a*c + b**S(2)) + (S(3)*A*(S(56)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4)) + B*a*b*(-S(52)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**S(2)) + x*(A*(S(28)*a**S(2)*c**S(2) - S(25)*a*b**S(2)*c + S(3)*b**S(4)) + B*a*b*(S(8)*a*c + b**S(2)) + c*x**S(2)*(S(3)*A*(-S(8)*a*b*c + b**S(3)) + B*a*(S(20)*a*c + b**S(2))))/(S(8)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(4)*x**S(2) + S(-7))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, log(-x**S(2) + S(1))/S(2) + S(3)*log(-x**S(2) + S(4))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(3) - S(7)*x)/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, log(-x**S(2) + S(1))/S(2) + S(3)*log(-x**S(2) + S(4))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(x**S(2) + S(2))/(x**S(4) + x**S(2) + S(1)), x), x, log(x**S(4) + x**S(2) + S(1))/S(4) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(2)*x)/(x**S(4) + x**S(2) + S(1)), x), x, log(x**S(4) + x**S(2) + S(1))/S(4) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(11)*x)/(x**S(4) + S(2)*x**S(2) + S(3))**S(2), x), x, (S(9)*x**S(2) + S(5))/(S(8)*x**S(4) + S(16)*x**S(2) + S(24)) + S(9)*sqrt(S(2))*atan(sqrt(S(2))*(x**S(2) + S(1))/S(2))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -(a + b*x**S(2) + c*x**S(4))**(S(5)/2)*(-S(12)*A*c + S(7)*B*b - S(10)*B*c*x**S(2))/(S(120)*c**S(2)) + (b + S(2)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)*(-S(12)*A*b*c - S(4)*B*a*c + S(7)*B*b**S(2))/(S(384)*c**S(3)) - (b + S(2)*c*x**S(2))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(-S(12)*A*b*c - S(4)*B*a*c + S(7)*B*b**S(2))/(S(1024)*c**S(4)) + (-S(4)*a*c + b**S(2))**S(2)*(-S(12)*A*b*c - S(4)*B*a*c + S(7)*B*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2048)*c**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, B*(a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(10)*c) - (b + S(2)*c*x**S(2))*(-S(2)*A*c + B*b)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(32)*c**S(2)) + (b + S(2)*c*x**S(2))*(-S(2)*A*c + B*b)*(-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(256)*c**S(3)) - S(3)*(-S(2)*A*c + B*b)*(-S(4)*a*c + b**S(2))**S(2)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(512)*c**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x, x), x, -A*a**(S(3)/2)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/S(2) + (a + b*x**S(2) + c*x**S(4))**(S(3)/2)*(S(8)*A*c + S(3)*B*b + S(6)*B*c*x**S(2))/(S(48)*c) - sqrt(a + b*x**S(2) + c*x**S(4))*(-S(64)*A*a*c**S(2) - S(8)*A*b**S(2)*c - S(12)*B*a*b*c + S(3)*B*b**S(3) + S(2)*c*x**S(2)*(-S(8)*A*b*c - S(12)*B*a*c + S(3)*B*b**S(2)))/(S(128)*c**S(2)) + (S(64)*A*a*b*c**S(2) + (-S(4)*a*c + b**S(2))*(-S(8)*A*b*c - S(12)*B*a*c + S(3)*B*b**S(2)))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(256)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(3), x), x, -sqrt(a)*(S(3)*A*b + S(2)*B*a)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/S(4) - (S(3)*A - B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*x**S(2)) + sqrt(a + b*x**S(2) + c*x**S(4))*(S(18)*A*b*c + S(8)*B*a*c + B*b**S(2) + S(2)*c*x**S(2)*(S(6)*A*c + B*b))/(S(16)*c) - (-S(24)*A*a*c**S(2) - S(6)*A*b**S(2)*c - S(12)*B*a*b*c + B*b**S(3))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(5), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))*(S(3)*A*b + S(6)*B*a - S(3)*x**S(2)*(S(2)*A*c + B*b))/(S(8)*x**S(2)) - (A - B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(4)*x**S(4)) + (S(12)*A*b*c + S(12)*B*a*c + S(3)*B*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*sqrt(c)) - (S(3)*A*(S(4)*a*c + b**S(2)) + S(12)*B*a*b)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*sqrt(a)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(144)*A*a*b*c**S(2) - S(18)*A*b**S(3)*c + S(84)*B*a**S(2)*c**S(2) - S(57)*B*a*b**S(2)*c + S(8)*B*b**S(4))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(315)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(144)*A*a*b*c**S(2) - S(18)*A*b**S(3)*c + S(84)*B*a**S(2)*c**S(2) - S(57)*B*a*b**S(2)*c + S(8)*B*b**S(4) + sqrt(a)*sqrt(c)*(S(180)*A*a*c**S(2) - S(9)*A*b**S(2)*c - S(24)*B*a*b*c + S(4)*B*b**S(3)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(630)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + x*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)*(S(9)*A*c + S(3)*B*b + S(7)*B*c*x**S(2))/(S(63)*c) - x*sqrt(a + b*x**S(2) + c*x**S(4))*(-S(90)*A*a*c**S(2) - S(9)*A*b**S(2)*c - S(9)*B*a*b*c + S(4)*B*b**S(3) + S(3)*c*x**S(2)*(-S(9)*A*b*c - S(14)*B*a*c + S(4)*B*b**S(2)))/(S(315)*c**S(2)) + x*sqrt(a + b*x**S(2) + c*x**S(4))*(S(144)*A*a*b*c**S(2) - S(18)*A*b**S(3)*c + S(84)*B*a**S(2)*c**S(2) - S(57)*B*a*b**S(2)*c + S(8)*B*b**S(4))/(S(315)*c**(S(5)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(2), x), x, a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(84)*A*a*c**S(2) - S(7)*A*b**S(2)*c - S(16)*B*a*b*c + S(2)*B*b**S(3))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(35)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(84)*A*a*c**S(2) - S(7)*A*b**S(2)*c - S(16)*B*a*b*c + S(2)*B*b**S(3) + sqrt(a)*sqrt(c)*(-S(56)*A*b*c - S(20)*B*a*c + B*b**S(2)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(70)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - (S(7)*A - B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(7)*x) + x*sqrt(a + b*x**S(2) + c*x**S(4))*(S(49)*A*b*c + S(10)*B*a*c + B*b**S(2) + S(3)*c*x**S(2)*(S(14)*A*c + B*b))/(S(35)*c) - x*sqrt(a + b*x**S(2) + c*x**S(4))*(-S(84)*A*a*c**S(2) - S(7)*A*b**S(2)*c - S(16)*B*a*b*c + S(2)*B*b**S(3))/(S(35)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(4), x), x, -a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(40)*A*b*c + S(36)*B*a*c + S(3)*B*b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(15)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(40)*A*b*c + S(36)*B*a*c + S(3)*B*b**S(2) + sqrt(c)*(S(5)*A*(S(4)*a*c + S(3)*b**S(2)) + S(24)*B*a*b)/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(30)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - sqrt(a + b*x**S(2) + c*x**S(4))*(S(15)*A*b + S(18)*B*a - x**S(2)*(S(10)*A*c + S(3)*B*b))/(S(15)*x) - (S(5)*A - S(3)*B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(15)*x**S(3)) + x*sqrt(a + b*x**S(2) + c*x**S(4))*(S(40)*A*b*c + S(36)*B*a*c + S(3)*B*b**S(2))/(S(15)*sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/x**S(6), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))*(S(3)*A*b + S(10)*B*a - x**S(2)*(S(18)*A*c + S(15)*B*b))/(S(15)*x**S(3)) - (S(3)*A - S(5)*B*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(15)*x**S(5)) + sqrt(c)*x*(S(3)*A*(S(12)*a*c + b**S(2)) + S(40)*B*a*b)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*a*(sqrt(a) + sqrt(c)*x**S(2))) - (S(3)*A*(S(12)*a*c + b**S(2)) + S(40)*B*a*b)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*a*x) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(3)*A*(S(12)*a*c + b**S(2)) + S(40)*B*a*b)*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(15)*a**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(2)*sqrt(a)*sqrt(c) + b)*(S(3)*A*b*sqrt(c) + S(10)*B*a*sqrt(c) + S(3)*sqrt(a)*(S(6)*A*c + S(5)*B*b))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(30)*a**(S(3)/4)*c**(S(1)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(A + B*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, B*x**S(4)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(6)*c) + sqrt(a + b*x**S(2) + c*x**S(4))*(-S(18)*A*b*c - S(16)*B*a*c + S(15)*B*b**S(2) - S(2)*c*x**S(2)*(-S(6)*A*c + S(5)*B*b))/(S(48)*c**S(3)) - (S(8)*A*a*c**S(2) - S(6)*A*b**S(2)*c - S(12)*B*a*b*c + S(5)*B*b**S(3))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(a + b*x**S(2) + c*x**S(4))*(-S(4)*A*c + S(3)*B*b - S(2)*B*c*x**S(2))/(S(8)*c**S(2)) + (-S(4)*A*b*c - S(4)*B*a*c + S(3)*B*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, B*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*c) - (-S(2)*A*c + B*b)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*c**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -A*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(a)) + B*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -A*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*a*x**S(2)) + (A*b - S(2)*B*a)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(5)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -A*sqrt(a + b*x**S(2) + c*x**S(4))/(S(4)*a*x**S(4)) + (S(3)*A*b - S(4)*B*a)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*a**S(2)*x**S(2)) - (-S(4)*A*a*c + S(3)*A*b**S(2) - S(4)*B*a*b)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(7)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -A*sqrt(a + b*x**S(2) + c*x**S(4))/(S(6)*a*x**S(6)) + (S(5)*A*b - S(6)*B*a)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(24)*a**S(2)*x**S(4)) - sqrt(a + b*x**S(2) + c*x**S(4))*(-S(16)*A*a*c + S(15)*A*b**S(2) - S(18)*B*a*b)/(S(48)*a**S(3)*x**S(2)) + (-S(12)*A*a*b*c + S(5)*A*b**S(3) + S(8)*B*a**S(2)*c - S(6)*B*a*b**S(2))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(A + B*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, B*x**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(5)*c) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(10)*A*b*c - S(9)*B*a*c + S(8)*B*b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(15)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(10)*A*b*c - S(9)*B*a*c + S(8)*B*b**S(2) + sqrt(a)*sqrt(c)*(-S(5)*A*c + S(4)*B*b))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(30)*c**(S(11)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - x*(-S(5)*A*c + S(4)*B*b)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(15)*c**S(2)) + x*sqrt(a + b*x**S(2) + c*x**S(4))*(-S(10)*A*b*c - S(9)*B*a*c + S(8)*B*b**S(2))/(S(15)*c**(S(5)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, B*x*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*c) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*A*c + S(2)*B*b)*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*A*c + B*sqrt(a)*sqrt(c) + S(2)*B*b)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*c**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - x*(-S(3)*A*c + S(2)*B*b)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, -B*a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + B*x*sqrt(a + b*x**S(2) + c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(A*sqrt(c)/sqrt(a) + B)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*c**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, A*sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))/(a*(sqrt(a) + sqrt(c)*x**S(2))) - A*sqrt(a + b*x**S(2) + c*x**S(4))/(a*x) - A*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(3)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) + sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(A*sqrt(c) + B*sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(3)/4)*c**(S(1)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(4)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -A*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*a*x**S(3)) - sqrt(c)*x*(S(2)*A*b - S(3)*B*a)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*a**S(2)*(sqrt(a) + sqrt(c)*x**S(2))) + (S(2)*A*b - S(3)*B*a)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(3)*a**S(2)*x) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(2)*A*b - S(3)*B*a)*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*a**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(A*sqrt(a)*sqrt(c) + S(2)*A*b - S(3)*B*a)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*a**(S(7)/4)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -x**S(2)*(a*(-S(2)*A*c + B*b) + x**S(2)*(-A*b*c - S(2)*B*a*c + B*b**S(2)))/(c*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + sqrt(a + b*x**S(2) + c*x**S(4))*(-S(2)*A*b*c - S(8)*B*a*c + S(3)*B*b**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))) - (-S(2)*A*c + S(3)*B*b)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*c**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, B*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*c**(S(3)/2)) - (a*(-S(2)*A*c + B*b) + x**S(2)*(-A*b*c - S(2)*B*a*c + B*b**S(2)))/(c*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, -A*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*a**(S(3)/2)) - (-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(a*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(3)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, -(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(a*x**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - sqrt(a + b*x**S(2) + c*x**S(4))*(-S(8)*A*a*c + S(3)*A*b**S(2) - S(2)*B*a*b)/(S(2)*a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) + (S(3)*A*b - S(2)*B*a)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-A*b*c - S(6)*B*a*c + S(2)*B*b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(7)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-A*c - S(3)*B*sqrt(a)*sqrt(c) + S(2)*B*b)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(7)/4)*(-S(4)*sqrt(a)*sqrt(c) + S(2)*b)*sqrt(a + b*x**S(2) + c*x**S(4))) - x**S(3)*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - x*(-S(2)*A*c + B*b)*sqrt(a + b*x**S(2) + c*x**S(4))/(c*(-S(4)*a*c + b**S(2))) + x*sqrt(a + b*x**S(2) + c*x**S(4))*(-A*b*c - S(6)*B*a*c + S(2)*B*b**S(2))/(c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, a**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(2)*A*c + B*b)*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(c**(S(3)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - x*(A*b - S(2)*B*a - x**S(2)*(-S(2)*A*c + B*b))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - x*(-S(2)*A*c + B*b)*sqrt(a + b*x**S(2) + c*x**S(4))/(sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))) - sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-A*sqrt(c) + B*sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*c**(S(3)/4)*(-S(2)*sqrt(a)*sqrt(c) + b)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -sqrt(c)*x*(A*b - S(2)*B*a)*sqrt(a + b*x**S(2) + c*x**S(4))/(a*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))) - x*(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(a*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(A*b - S(2)*B*a)*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(3)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-A*sqrt(c) + B*sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(3)/4)*c**(S(1)/4)*(-S(2)*sqrt(a)*sqrt(c) + b)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x**S(2))/(x**S(2)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, -(-A*(-S(2)*a*c + b**S(2)) + B*a*b - c*x**S(2)*(A*b - S(2)*B*a))/(a*x*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + sqrt(c)*x*sqrt(a + b*x**S(2) + c*x**S(4))*(-S(6)*A*a*c + S(2)*A*b**S(2) - B*a*b)/(a**S(2)*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))) - sqrt(a + b*x**S(2) + c*x**S(4))*(-S(6)*A*a*c + S(2)*A*b**S(2) - B*a*b)/(a**S(2)*x*(-S(4)*a*c + b**S(2))) - c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(6)*A*a*c + S(2)*A*b**S(2) - B*a*b)*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(7)/4)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*A*sqrt(a)*sqrt(c) + S(2)*A*b - B*a)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(7)/4)*(-S(2)*sqrt(a)*sqrt(c) + b)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**(S(3)/2)*(d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*d*(f*x)**(S(5)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(5)/4, S(-1)/2, S(-1)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*f*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + S(2)*e*(f*x)**(S(9)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(9)/4, S(-1)/2, S(-1)/2, S(13)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(9)*f**S(3)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(f*x)*(d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*d*(f*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(3)/4, S(-1)/2, S(-1)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*f*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + S(2)*e*(f*x)**(S(7)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(7)/4, S(-1)/2, S(-1)/2, S(11)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(7)*f**S(3)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/sqrt(f*x), x), x, S(2)*d*sqrt(f*x)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(1)/4, S(-1)/2, S(-1)/2, S(5)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + S(2)*e*(f*x)**(S(5)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(5)/4, S(-1)/2, S(-1)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*f**S(3)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(f*x)**(S(3)/2), x), x, -S(2)*d*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(-1)/4, S(-1)/2, S(-1)/2, S(3)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*sqrt(f*x)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + S(2)*e*(f*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(3)/4, S(-1)/2, S(-1)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*f**S(3)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**(S(3)/2)*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*a*d*(f*x)**(S(5)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(5)/4, S(-3)/2, S(-3)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*f*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + S(2)*a*e*(f*x)**(S(9)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(9)/4, S(-3)/2, S(-3)/2, S(13)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(9)*f**S(3)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(f*x)*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*a*d*(f*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(3)/4, S(-3)/2, S(-3)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*f*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + S(2)*a*e*(f*x)**(S(7)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(7)/4, S(-3)/2, S(-3)/2, S(11)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(7)*f**S(3)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/sqrt(f*x), x), x, S(2)*a*d*sqrt(f*x)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(1)/4, S(-3)/2, S(-3)/2, S(5)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + S(2)*a*e*(f*x)**(S(5)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(5)/4, S(-3)/2, S(-3)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*f**S(3)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(f*x)**(S(3)/2), x), x, -S(2)*a*d*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(-1)/4, S(-3)/2, S(-3)/2, S(3)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*sqrt(f*x)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + S(2)*a*e*(f*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(S(3)/4, S(-3)/2, S(-3)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*f**S(3)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**(S(3)/2)*(d + e*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*d*(f*x)**(S(5)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(5)/4, S(1)/2, S(1)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*f*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*e*(f*x)**(S(9)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(9)/4, S(1)/2, S(1)/2, S(13)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(9)*f**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(f*x)*(d + e*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, S(2)*d*(f*x)**(S(3)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/4, S(1)/2, S(1)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*f*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*e*(f*x)**(S(7)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(7)/4, S(1)/2, S(1)/2, S(11)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(7)*f**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(sqrt(f*x)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, S(2)*d*sqrt(f*x)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/4, S(1)/2, S(1)/2, S(5)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*e*(f*x)**(S(5)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(5)/4, S(1)/2, S(1)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*f**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/((f*x)**(S(3)/2)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -S(2)*d*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(-1)/4, S(1)/2, S(1)/2, S(3)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*sqrt(f*x)*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*e*(f*x)**(S(3)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/4, S(1)/2, S(1)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*f**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**(S(3)/2)*(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*d*(f*x)**(S(5)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(5)/4, S(3)/2, S(3)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*a*f*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*e*(f*x)**(S(9)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(9)/4, S(3)/2, S(3)/2, S(13)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(9)*a*f**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(f*x)*(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, S(2)*d*(f*x)**(S(3)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/4, S(3)/2, S(3)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*f*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*e*(f*x)**(S(7)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(7)/4, S(3)/2, S(3)/2, S(11)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(7)*a*f**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/(sqrt(f*x)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, S(2)*d*sqrt(f*x)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(1)/4, S(3)/2, S(3)/2, S(5)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*f*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*e*(f*x)**(S(5)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(5)/4, S(3)/2, S(3)/2, S(9)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(5)*a*f**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))/((f*x)**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, -S(2)*d*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(-1)/4, S(3)/2, S(3)/2, S(3)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*f*sqrt(f*x)*sqrt(a + b*x**S(2) + c*x**S(4))) + S(2)*e*(f*x)**(S(3)/2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/4, S(3)/2, S(3)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*f**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -c*(f*x)**(m + S(1))*(S(2)*a*(-S(2)*c*d*(-m + S(3)) + e*(-m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*d*(-m + S(1)) + b*(S(4)*a*e - d*(-m + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*f*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + c*(f*x)**(m + S(1))*(-S(2)*a*(S(2)*c*d*(-m + S(3)) + e*(-m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*(-d*m + d) + b*(S(4)*a*e + d*(-m + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*f*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (f*x)**(m + S(1))*(-a*b*e - S(2)*a*c*d + b**S(2)*d + c*x**S(2)*(-S(2)*a*e + b*d))/(S(2)*a*f*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, a*d*(f*x)**(m + S(1))*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(m/S(2) + S(1)/2, S(-3)/2, S(-3)/2, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*(m + S(1))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + a*e*(f*x)**(m + S(3))*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(m/S(2) + S(3)/2, S(-3)/2, S(-3)/2, m/S(2) + S(5)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f**S(3)*(m + S(3))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4)), x), x, d*(f*x)**(m + S(1))*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(m/S(2) + S(1)/2, S(-1)/2, S(-1)/2, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*(m + S(1))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))) + e*(f*x)**(m + S(3))*sqrt(a + b*x**S(2) + c*x**S(4))*AppellF1(m/S(2) + S(3)/2, S(-1)/2, S(-1)/2, m/S(2) + S(5)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f**S(3)*(m + S(3))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))/sqrt(a + b*x**S(2) + c*x**S(4)), x), x, d*(f*x)**(m + S(1))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(m/S(2) + S(1)/2, S(1)/2, S(1)/2, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*(m + S(1))*sqrt(a + b*x**S(2) + c*x**S(4))) + e*(f*x)**(m + S(3))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(m/S(2) + S(3)/2, S(1)/2, S(1)/2, m/S(2) + S(5)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f**S(3)*(m + S(3))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, d*(f*x)**(m + S(1))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(m/S(2) + S(1)/2, S(3)/2, S(3)/2, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*f*(m + S(1))*sqrt(a + b*x**S(2) + c*x**S(4))) + e*(f*x)**(m + S(3))*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(m/S(2) + S(3)/2, S(3)/2, S(3)/2, m/S(2) + S(5)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*f**S(3)*(m + S(3))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(3), x), x, a**S(3)*d*(f*x)**(m + S(1))/(f*(m + S(1))) + a**S(2)*(f*x)**(m + S(3))*(a*e + S(3)*b*d)/(f**S(3)*(m + S(3))) + S(3)*a*(f*x)**(m + S(5))*(a*b*e + a*c*d + b**S(2)*d)/(f**S(5)*(m + S(5))) + c**S(3)*e*(f*x)**(m + S(15))/(f**S(15)*(m + S(15))) + c**S(2)*(f*x)**(m + S(13))*(S(3)*b*e + c*d)/(f**S(13)*(m + S(13))) + S(3)*c*(f*x)**(m + S(11))*(a*c*e + b**S(2)*e + b*c*d)/(f**S(11)*(m + S(11))) + (f*x)**(m + S(7))*(S(3)*a**S(2)*c*e + S(3)*a*b**S(2)*e + S(6)*a*b*c*d + b**S(3)*d)/(f**S(7)*(m + S(7))) + (f*x)**(m + S(9))*(S(6)*a*b*c*e + S(3)*a*c**S(2)*d + b**S(3)*e + S(3)*b**S(2)*c*d)/(f**S(9)*(m + S(9))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*d*(f*x)**(m + S(1))/(f*(m + S(1))) + a*(f*x)**(m + S(3))*(a*e + S(2)*b*d)/(f**S(3)*(m + S(3))) + c**S(2)*e*(f*x)**(m + S(11))/(f**S(11)*(m + S(11))) + c*(f*x)**(m + S(9))*(S(2)*b*e + c*d)/(f**S(9)*(m + S(9))) + (f*x)**(m + S(5))*(S(2)*a*b*e + S(2)*a*c*d + b**S(2)*d)/(f**S(5)*(m + S(5))) + (f*x)**(m + S(7))*(S(2)*a*c*e + b**S(2)*e + S(2)*b*c*d)/(f**S(7)*(m + S(7))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4)), x), x, a*d*(f*x)**(m + S(1))/(f*(m + S(1))) + c*e*(f*x)**(m + S(7))/(f**S(7)*(m + S(7))) + (f*x)**(m + S(3))*(a*e + b*d)/(f**S(3)*(m + S(3))) + (f*x)**(m + S(5))*(b*e + c*d)/(f**S(5)*(m + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, (f*x)**(m + S(1))*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))) + (f*x)**(m + S(1))*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))))/(f*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4)), x), x, a*d**S(2)*x**S(4)/S(4) + c*e**S(2)*x**S(12)/S(12) + d*x**S(6)*(S(2)*a*e + b*d)/S(6) + e*x**S(10)*(b*e + S(2)*c*d)/S(10) + x**S(8)*(c*d**S(2)/S(8) + e*(a*e + S(2)*b*d)/S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4)), x), x, a*d**S(2)*x**S(3)/S(3) + c*e**S(2)*x**S(11)/S(11) + d*x**S(5)*(S(2)*a*e + b*d)/S(5) + e*x**S(9)*(b*e + S(2)*c*d)/S(9) + x**S(7)*(c*d**S(2)/S(7) + e*(a*e + S(2)*b*d)/S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4)), x), x, a*d**S(2)*x**S(2)/S(2) + c*e**S(2)*x**S(10)/S(10) + d*x**S(4)*(S(2)*a*e + b*d)/S(4) + e*x**S(8)*(b*e + S(2)*c*d)/S(8) + x**S(6)*(c*d**S(2)/S(6) + e*(a*e + S(2)*b*d)/S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4)), x), x, a*d**S(2)*x + c*e**S(2)*x**S(9)/S(9) + d*x**S(3)*(S(2)*a*e + b*d)/S(3) + e*x**S(7)*(b*e + S(2)*c*d)/S(7) + x**S(5)*(c*d**S(2)/S(5) + e*(a*e + S(2)*b*d)/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))/x, x), x, a*d**S(2)*log(x) + c*e**S(2)*x**S(8)/S(8) + d*x**S(2)*(S(2)*a*e + b*d)/S(2) + e*x**S(6)*(b*e + S(2)*c*d)/S(6) + x**S(4)*(c*d**S(2)/S(4) + e*(a*e + S(2)*b*d)/S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))/x**S(2), x), x, -a*d**S(2)/x + c*e**S(2)*x**S(7)/S(7) + d*x*(S(2)*a*e + b*d) + e*x**S(5)*(b*e + S(2)*c*d)/S(5) + x**S(3)*(c*d**S(2)/S(3) + e*(a*e + S(2)*b*d)/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))/x**S(3), x), x, -a*d**S(2)/(S(2)*x**S(2)) + c*e**S(2)*x**S(6)/S(6) + d*(S(2)*a*e + b*d)*log(x) + e*x**S(4)*(b*e + S(2)*c*d)/S(4) + x**S(2)*(c*d**S(2)/S(2) + e*(a*e + S(2)*b*d)/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(2), x), x, c*x**S(7)/(S(7)*e**S(2)) + d**(S(3)/2)*(S(9)*c*d**S(2) - e*(-S(5)*a*e + S(7)*b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*e**(S(11)/2)) - d**S(2)*x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*e**S(5)*(d + e*x**S(2))) - d*x*(S(4)*c*d**S(2) - e*(-S(2)*a*e + S(3)*b*d))/e**S(5) - x**S(5)*(-b*e + S(2)*c*d)/(S(5)*e**S(3)) + x**S(3)*(S(3)*c*d**S(2) - e*(-a*e + S(2)*b*d))/(S(3)*e**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(2), x), x, c*x**S(5)/(S(5)*e**S(2)) - sqrt(d)*(S(7)*c*d**S(2) - e*(-S(3)*a*e + S(5)*b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*e**(S(9)/2)) + d*x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*e**S(4)*(d + e*x**S(2))) - x**S(3)*(-b*e + S(2)*c*d)/(S(3)*e**S(3)) + x*(S(3)*c*d**S(2) - e*(-a*e + S(2)*b*d))/e**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(2), x), x, c*x**S(3)/(S(3)*e**S(2)) - x*(-b*e + S(2)*c*d)/e**S(3) - x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*e**S(3)*(d + e*x**S(2))) + (S(5)*c*d**S(2) - e*(-a*e + S(3)*b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*sqrt(d)*e**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(2), x), x, c*x/e**S(2) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*d*e**S(2)*(d + e*x**S(2))) - (S(3)*c*d**S(2) - e*(a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(3)/2)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(2)*(d + e*x**S(2))**S(2)), x), x, -a/(d**S(2)*x) - x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*d**S(2)*e*(d + e*x**S(2))) + (c*d**S(2) + e*(-S(3)*a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(5)/2)*e**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(4)*(d + e*x**S(2))**S(2)), x), x, -a/(S(3)*d**S(2)*x**S(3)) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*d**S(3)*(d + e*x**S(2))) - (-S(2)*a*e + b*d)/(d**S(3)*x) + (c*d**S(2) - e*(-S(5)*a*e + S(3)*b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(7)/2)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(6)*(d + e*x**S(2))**S(2)), x), x, -a/(S(5)*d**S(2)*x**S(5)) - (-S(2)*a*e + b*d)/(S(3)*d**S(3)*x**S(3)) - e*x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*d**S(4)*(d + e*x**S(2))) - (c*d**S(2) - e*(-S(3)*a*e + S(2)*b*d))/(d**S(4)*x) - sqrt(e)*(S(3)*c*d**S(2) - e*(-S(7)*a*e + S(5)*b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(8)*(d + e*x**S(2))**S(2)), x), x, -a/(S(7)*d**S(2)*x**S(7)) - (-S(2)*a*e + b*d)/(S(5)*d**S(3)*x**S(5)) - (c*d**S(2) - e*(-S(3)*a*e + S(2)*b*d))/(S(3)*d**S(4)*x**S(3)) + e**S(2)*x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*d**S(5)*(d + e*x**S(2))) + e*(S(2)*c*d**S(2) - e*(-S(4)*a*e + S(3)*b*d))/(d**S(5)*x) + e**(S(3)/2)*(S(5)*c*d**S(2) - e*(-S(9)*a*e + S(7)*b*d))*atan(sqrt(e)*x/sqrt(d))/(S(2)*d**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(3), x), x, c*x**S(5)/(S(5)*e**S(3)) - sqrt(d)*(S(15)*a*e**S(2) - S(35)*b*d*e + S(63)*c*d**S(2))*atan(sqrt(e)*x/sqrt(d))/(S(8)*e**(S(11)/2)) - d**S(2)*x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(4)*e**S(5)*(d + e*x**S(2))**S(2)) + d*x*(S(17)*c*d**S(2) - e*(-S(9)*a*e + S(13)*b*d))/(S(8)*e**S(5)*(d + e*x**S(2))) - x**S(3)*(-b*e + S(3)*c*d)/(S(3)*e**S(4)) + x*(S(6)*c*d**S(2) - e*(-a*e + S(3)*b*d))/e**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(3), x), x, c*x**S(3)/(S(3)*e**S(3)) + d*x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(4)*e**S(4)*(d + e*x**S(2))**S(2)) - x*(-b*e + S(3)*c*d)/e**S(4) - x*(S(13)*c*d**S(2) - e*(-S(5)*a*e + S(9)*b*d))/(S(8)*e**S(4)*(d + e*x**S(2))) + (S(35)*c*d**S(2) - S(3)*e*(-a*e + S(5)*b*d))*atan(sqrt(e)*x/sqrt(d))/(S(8)*sqrt(d)*e**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(3), x), x, c*x/e**S(3) - x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(4)*e**S(3)*(d + e*x**S(2))**S(2)) + x*(S(9)*c*d**S(2) - e*(-a*e + S(5)*b*d))/(S(8)*d*e**S(3)*(d + e*x**S(2))) - (S(15)*c*d**S(2) - e*(a*e + S(3)*b*d))*atan(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(3)/2)*e**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2))**S(3), x), x, x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(4)*d*e**S(2)*(d + e*x**S(2))**S(2)) - x*(S(5)*c*d**S(2) - e*(S(3)*a*e + b*d))/(S(8)*d**S(2)*e**S(2)*(d + e*x**S(2))) + (S(3)*c*d**S(2) + e*(S(3)*a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(5)/2)*e**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(2)*(d + e*x**S(2))**S(3)), x), x, -a/(d**S(3)*x) - x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(4)*d**S(2)*e*(d + e*x**S(2))**S(2)) + x*(c*d**S(2) + e*(-S(7)*a*e + S(3)*b*d))/(S(8)*d**S(3)*e*(d + e*x**S(2))) + (c*d**S(2) + S(3)*e*(-S(5)*a*e + b*d))*atan(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(7)/2)*e**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(4)*(d + e*x**S(2))**S(3)), x), x, -a/(S(3)*d**S(3)*x**S(3)) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(4)*d**S(3)*(d + e*x**S(2))**S(2)) + x*(S(3)*c*d**S(2) - e*(-S(11)*a*e + S(7)*b*d))/(S(8)*d**S(4)*(d + e*x**S(2))) - (-S(3)*a*e + b*d)/(d**S(4)*x) + (S(35)*a*e**S(2) - S(15)*b*d*e + S(3)*c*d**S(2))*atan(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(9)/2)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(6)*(d + e*x**S(2))**S(3)), x), x, -a/(S(5)*d**S(3)*x**S(5)) - e*x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(4)*d**S(4)*(d + e*x**S(2))**S(2)) - (-S(3)*a*e + b*d)/(S(3)*d**S(4)*x**S(3)) - e*x*(S(7)*c*d**S(2) - e*(-S(15)*a*e + S(11)*b*d))/(S(8)*d**S(5)*(d + e*x**S(2))) - (S(6)*a*e**S(2) - S(3)*b*d*e + c*d**S(2))/(d**S(5)*x) - sqrt(e)*(S(63)*a*e**S(2) - S(35)*b*d*e + S(15)*c*d**S(2))*atan(sqrt(e)*x/sqrt(d))/(S(8)*d**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, d**S(4)*log(d + e*x**S(2))/(S(2)*e**S(3)*(a*e**S(2) - b*d*e + c*d**S(2))) + x**S(4)/(S(4)*c*e) - x**S(2)*(b*e + c*d)/(S(2)*c**S(2)*e**S(2)) - (a**S(2)*c*e - a*b**S(2)*e - S(2)*a*b*c*d + b**S(3)*d)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)*(a*e**S(2) - b*d*e + c*d**S(2))) - (S(3)*a**S(2)*b*c*e + S(2)*a**S(2)*c**S(2)*d - a*b**S(3)*e - S(4)*a*b**S(2)*c*d + b**S(4)*d)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -d**S(3)*log(d + e*x**S(2))/(S(2)*e**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))) + x**S(2)/(S(2)*c*e) + (-a*b*e - a*c*d + b**S(2)*d)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))) + (S(2)*a**S(2)*c*e - a*b**S(2)*e - S(3)*a*b*c*d + b**S(3)*d)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, d**S(2)*log(d + e*x**S(2))/(S(2)*e*(a*e**S(2) - b*d*e + c*d**S(2))) - (-a*e + b*d)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c*(a*e**S(2) - b*d*e + c*d**S(2))) - (-a*b*e - S(2)*a*c*d + b**S(2)*d)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, d*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a*e**S(2) - S(4)*b*d*e + S(4)*c*d**S(2)) - d*log(d + e*x**S(2))/(S(2)*a*e**S(2) - S(2)*b*d*e + S(2)*c*d**S(2)) + (-S(2)*a*e + b*d)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -e*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a*e**S(2) - S(4)*b*d*e + S(4)*c*d**S(2)) + e*log(d + e*x**S(2))/(S(2)*a*e**S(2) - S(2)*b*d*e + S(2)*c*d**S(2)) - (-b*e + S(2)*c*d)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -e**S(2)*log(d + e*x**S(2))/(S(2)*d*(a*e**S(2) - b*d*e + c*d**S(2))) - (-b*e + c*d)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a*(a*e**S(2) - b*d*e + c*d**S(2))) + (S(2)*a*c*e - b**S(2)*e + b*c*d)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + log(x)/(a*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, e**S(3)*log(d + e*x**S(2))/(S(2)*d**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))) - S(1)/(S(2)*a*d*x**S(2)) + (a*c*e - b**S(2)*e + b*c*d)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))) - (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - (a*e + b*d)*log(x)/(a**S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -e**S(4)*log(d + e*x**S(2))/(S(2)*d**S(3)*(a*e**S(2) - b*d*e + c*d**S(2))) - S(1)/(S(4)*a*d*x**S(4)) + (a*e + b*d)/(S(2)*a**S(2)*d**S(2)*x**S(2)) - (S(2)*a*b*c*e - a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(3)*(a*e**S(2) - b*d*e + c*d**S(2))) + (-S(2)*a**S(2)*c**S(2)*e + S(4)*a*b**S(2)*c*e - S(3)*a*b*c**S(2)*d - b**S(4)*e + b**S(3)*c*d)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(3)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + (a*b*d*e - a*(-a*e**S(2) + c*d**S(2)) + b**S(2)*d**S(2))*log(x)/(a**S(3)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, d**(S(7)/2)*atan(sqrt(e)*x/sqrt(d))/(e**(S(5)/2)*(a*e**S(2) - b*d*e + c*d**S(2))) + x**S(3)/(S(3)*c*e) - x*(b*e + c*d)/(c**S(2)*e**S(2)) - sqrt(S(2))*(a**S(2)*c*e - a*b**S(2)*e - S(2)*a*b*c*d + b**S(3)*d + (S(3)*a**S(2)*b*c*e + S(2)*a**S(2)*c**S(2)*d - a*b**S(3)*e - S(4)*a*b**S(2)*c*d + b**S(4)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(S(2))*(a**S(2)*c*e - a*b**S(2)*e - S(2)*a*b*c*d + b**S(3)*d - (S(3)*a**S(2)*b*c*e + S(2)*a**S(2)*c**S(2)*d - a*b**S(3)*e - S(4)*a*b**S(2)*c*d + b**S(4)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -d**(S(5)/2)*atan(sqrt(e)*x/sqrt(d))/(e**(S(3)/2)*(a*e**S(2) - b*d*e + c*d**S(2))) + x/(c*e) + sqrt(S(2))*(-a*b*e - a*c*d + b**S(2)*d + (S(2)*a**S(2)*c*e - a*b**S(2)*e - S(3)*a*b*c*d + b**S(3)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(S(2))*(-a*b*e - a*c*d + b**S(2)*d - (S(2)*a**S(2)*c*e - a*b**S(2)*e - S(3)*a*b*c*d + b**S(3)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, d**(S(3)/2)*atan(sqrt(e)*x/sqrt(d))/(sqrt(e)*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(S(2))*(-a*e + b*d + (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(S(2))*(-a*e + b*d - (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, sqrt(S(2))*sqrt(c)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(S(2))*sqrt(c)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(d)*sqrt(e)*atan(sqrt(e)*x/sqrt(d))/(a*e**S(2) - b*d*e + c*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(S(2))*sqrt(c)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(S(2))*sqrt(c)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) + e**(S(3)/2)*atan(sqrt(e)*x/sqrt(d))/(sqrt(d)*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -e**(S(5)/2)*atan(sqrt(e)*x/sqrt(d))/(d**(S(3)/2)*(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(S(2))*sqrt(c)*(S(2)*a*c*e - b**S(2)*e + b*c*d - sqrt(-S(4)*a*c + b**S(2))*(-b*e + c*d))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(S(2))*sqrt(c)*(S(2)*a*c*e - b**S(2)*e + b*c*d + sqrt(-S(4)*a*c + b**S(2))*(-b*e + c*d))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - S(1)/(a*d*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, e**(S(7)/2)*atan(sqrt(e)*x/sqrt(d))/(d**(S(5)/2)*(a*e**S(2) - b*d*e + c*d**S(2))) - S(1)/(S(3)*a*d*x**S(3)) + sqrt(S(2))*sqrt(c)*(a*c*(S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))) + b**S(3)*e - b**S(2)*(c*d + e*sqrt(-S(4)*a*c + b**S(2))) + b*c*(-S(3)*a*e + d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(S(2))*sqrt(c)*(a*c*e - b**S(2)*e + b*c*d + (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(a*e**S(2) - b*d*e + c*d**S(2))) + (a*e + b*d)/(a**S(2)*d**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(f*x)*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -S(2)**(S(3)/4)*c**(S(3)/4)*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(f*x)/(sqrt(f)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)))/(S(2)*sqrt(f)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - S(2)**(S(3)/4)*c**(S(3)/4)*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(f*x)/(sqrt(f)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)))/(S(2)*sqrt(f)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(f*x)/(sqrt(f)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)))/(S(2)*sqrt(f)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + S(2)**(S(3)/4)*c**(S(3)/4)*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*sqrt(f*x)/(sqrt(f)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)))/(S(2)*sqrt(f)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)*sqrt(-S(4)*a*c + b**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(S(2))*e**(S(7)/4)*log(-sqrt(S(2))*d**(S(1)/4)*e**(S(1)/4)*sqrt(f*x) + sqrt(d)*sqrt(f) + sqrt(e)*sqrt(f)*x)/(S(4)*d**(S(3)/4)*sqrt(f)*(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(S(2))*e**(S(7)/4)*log(sqrt(S(2))*d**(S(1)/4)*e**(S(1)/4)*sqrt(f*x) + sqrt(d)*sqrt(f) + sqrt(e)*sqrt(f)*x)/(S(4)*d**(S(3)/4)*sqrt(f)*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(S(2))*e**(S(7)/4)*atan(S(1) - sqrt(S(2))*e**(S(1)/4)*sqrt(f*x)/(d**(S(1)/4)*sqrt(f)))/(S(2)*d**(S(3)/4)*sqrt(f)*(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(S(2))*e**(S(7)/4)*atan(S(1) + sqrt(S(2))*e**(S(1)/4)*sqrt(f*x)/(d**(S(1)/4)*sqrt(f)))/(S(2)*d**(S(3)/4)*sqrt(f)*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2)), x), x, -b*(b + S(2)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(16)*c**S(2)*e) + b*(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(5)/2)*e) + d**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*e**S(3)) + d**S(2)*sqrt(a*e**S(2) - b*d*e + c*d**S(2))*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e**S(4)) - d*(b + S(2)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*c*e**S(2)) + (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*c*e) - d**S(2)*(-b*e + S(2)*c*d)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(c)*e**S(4)) + d*(-S(4)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*c**(S(3)/2)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2)), x), x, -d*sqrt(a*e**S(2) - b*d*e + c*d**S(2))*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e**S(3)) - sqrt(a + b*x**S(2) + c*x**S(4))*(-b*e + S(4)*c*d - S(2)*c*e*x**S(2))/(S(8)*c*e**S(2)) + (-b**S(2)*e**S(2) + S(8)*c**S(2)*d**S(2) - S(4)*c*e*(-a*e + b*d))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*c**(S(3)/2)*e**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*x**S(2) + c*x**S(4))/(d + e*x**S(2)), x), x, sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*e) + sqrt(a*e**S(2) - b*d*e + c*d**S(2))*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e**S(2)) - (-b*e + S(2)*c*d)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(c)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/(x*(d + e*x**S(2))), x), x, -sqrt(a)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*d) + sqrt(c)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*e) - sqrt(a*e**S(2) - b*d*e + c*d**S(2))*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*d*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/(x**S(3)*(d + e*x**S(2))), x), x, sqrt(a)*e*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*d**S(2)) - b*e*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(c)*d**S(2)) + sqrt(c)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*d) - sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*d*x**S(2)) + sqrt(a*e**S(2) - b*d*e + c*d**S(2))*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*d**S(2)) - (-b*e + S(2)*c*d)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(c)*d**S(2)) - b*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(a)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(2)*x**S(2) + S(3)), x), x, x*(S(3)*x**S(2) + S(1))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(30) - x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(4) + S(109)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(120)*(sqrt(S(2))*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(-70) + S(263)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(120)*(S(-2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(15)*sqrt(S(2)) + S(45))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(32)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(109)*sqrt(S(2))*x**S(2) + S(109))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(120)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(3)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(16), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(4)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(2)*x**S(2) + S(3)), x), x, x*(S(3)*x**S(2) + S(1))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(30) - x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(4) + S(109)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(120)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(1) + sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(139)*sqrt(S(2)) + S(139))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(480)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(15)*sqrt(S(2)) + S(45))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(32)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(45)*sqrt(S(2))*x**S(2) + S(45))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(16)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(109)*sqrt(S(2))*x**S(2) + S(109))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(120)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(3)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(2)*x**S(2) + S(3)), x), x, x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(6) - S(7)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(12)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(-4) + S(17)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*(S(-2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2)) + S(15))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(16)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(7)*sqrt(S(2))*x**S(2) + S(7))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(8), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(2)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(2)*x**S(2) + S(3)), x), x, x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(6) - S(7)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(12)*(sqrt(S(2))*x**S(2) + S(1))) + S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(3)*sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(16)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(1) + sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2)) + S(15))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(16)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(7)*sqrt(S(2))*x**S(2) + S(7))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(15)*sqrt(S(2))*x**S(2) + S(15))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(2)*x**S(2) + S(3)), x), x, sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(2)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(2)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((S(-2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2)) + S(15))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(24)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(12), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(2)*x**S(2) + S(3)), x), x, sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(2)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(2)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-sqrt(S(2)) + S(1))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2)) + S(15))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(24)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2))*x**S(2) + S(5))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(4)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(x**S(2)*(S(2)*x**S(2) + S(3))), x), x, sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*sqrt(S(2))*x**S(2) + S(3)) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((S(-6) + S(9)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2)) + S(15))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(36)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(18) - sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*x), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(x**S(2)*(S(2)*x**S(2) + S(3))), x), x, sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*sqrt(S(2))*x**S(2) + S(3)) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2)) + S(15))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(36)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2))*x**S(2) + S(5))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(6)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(18) - sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(x**S(4)*(S(2)*x**S(2) + S(3))), x), x, -S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(18)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(5)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(27)*sqrt(S(2)) + S(18))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2)) + S(15))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(54)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(27) - sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(9)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(x**S(6)*(S(2)*x**S(2) + S(3))), x), x, S(4)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(45)*sqrt(S(2))*x**S(2) + S(45)) - S(4)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(45)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(10)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(81)*sqrt(S(2)) + S(54))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(2)*sqrt(S(2)) + S(19))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(135)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(5)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(27)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(5)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(243)*sqrt(S(2)) + S(162))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(81) - S(4)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(45)*x) + S(4)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(135)*x**S(3)) - sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(15)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(d + e*x**S(2)), x), x, -b*(b + S(2)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(32)*c**S(2)*e) + S(3)*b*(b + S(2)*c*x**S(2))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(256)*c**S(3)*e) - S(3)*b*(-S(4)*a*c + b**S(2))**S(2)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(512)*c**(S(7)/2)*e) + d**S(2)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*e**S(3)) + d**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e**S(6)) + d**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*(b**S(2)*e**S(2) + S(8)*c**S(2)*d**S(2) - S(2)*c*e*x**S(2)*(-b*e + S(2)*c*d) - S(2)*c*e*(-S(4)*a*e + S(5)*b*d))/(S(16)*c*e**S(5)) - d*(b + S(2)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(16)*c*e**S(2)) + (a + b*x**S(2) + c*x**S(4))**(S(5)/2)/(S(10)*c*e) + d*(b + S(2)*c*x**S(2))*(-S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(128)*c**S(2)*e**S(2)) - d**S(2)*(-b*e + S(2)*c*d)*(-b**S(2)*e**S(2) + S(8)*c**S(2)*d**S(2) - S(4)*c*e*(-S(3)*a*e + S(2)*b*d))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(3)/2)*e**S(6)) - S(3)*d*(-S(4)*a*c + b**S(2))**S(2)*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(256)*c**(S(5)/2)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(d + e*x**S(2)), x), x, -d*(a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e**S(5)) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)*(-S(3)*b*e + S(8)*c*d - S(6)*c*e*x**S(2))/(S(48)*c*e**S(2)) - sqrt(a + b*x**S(2) + c*x**S(4))*(S(3)*b**S(3)*e**S(3) + S(4)*b*c*e**S(2)*(-S(3)*a*e + S(2)*b*d) + S(64)*c**S(3)*d**S(3) - S(16)*c**S(2)*d*e*(-S(4)*a*e + S(5)*b*d) - S(2)*c*e*x**S(2)*(-S(3)*b**S(2)*e**S(2) + S(16)*c**S(2)*d**S(2) - S(4)*c*e*(-S(3)*a*e + S(2)*b*d)))/(S(128)*c**S(2)*e**S(4)) + (S(3)*b**S(4)*e**S(4) + S(8)*b**S(2)*c*e**S(3)*(-S(3)*a*e + b*d) + S(128)*c**S(4)*d**S(4) - S(192)*c**S(3)*d**S(2)*e*(-a*e + b*d) + S(48)*c**S(2)*e**S(2)*(-a*e + b*d)**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(256)*c**(S(5)/2)*e**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(d + e*x**S(2)), x), x, (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(6)*e) + (a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e**S(4)) + sqrt(a + b*x**S(2) + c*x**S(4))*(b**S(2)*e**S(2) + S(8)*c**S(2)*d**S(2) - S(2)*c*e*x**S(2)*(-b*e + S(2)*c*d) - S(2)*c*e*(-S(4)*a*e + S(5)*b*d))/(S(16)*c*e**S(3)) - (-b*e + S(2)*c*d)*(-b**S(2)*e**S(2) + S(8)*c**S(2)*d**S(2) - S(4)*c*e*(-S(3)*a*e + S(2)*b*d))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(3)/2)*e**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(x*(d + e*x**S(2))), x), x, -a**(S(3)/2)*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*d) + a*b*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(c)*d) + a*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*d) - sqrt(a + b*x**S(2) + c*x**S(4))*(S(4)*c*d**S(2) - S(2)*c*d*e*x**S(2) - e*(-S(4)*a*e + S(5)*b*d))/(S(8)*d*e**S(2)) - (a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*d*e**S(3)) + (b*e**S(2)*(-S(4)*a*e + S(3)*b*d) + S(8)*c**S(2)*d**S(3) - S(12)*c*d*e*(-a*e + b*d))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*sqrt(c)*d*e**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(x**S(3)*(d + e*x**S(2))), x), x, a**(S(3)/2)*e*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*d**S(2)) - S(3)*sqrt(a)*b*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*d) + b*e*(-S(12)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(3)/2)*d**S(2)) + (S(9)*b + S(6)*c*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(8)*d) - (a + b*x**S(2) + c*x**S(4))**(S(3)/2)/(S(2)*d*x**S(2)) + (a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*d**S(2)*e**S(2)) - e*sqrt(a + b*x**S(2) + c*x**S(4))*(S(8)*a*c + b**S(2) + S(2)*b*c*x**S(2))/(S(16)*c*d**S(2)) + sqrt(a + b*x**S(2) + c*x**S(4))*(b**S(2)*e**S(2) + S(8)*c**S(2)*d**S(2) - S(2)*c*e*x**S(2)*(-b*e + S(2)*c*d) - S(2)*c*e*(-S(4)*a*e + S(5)*b*d))/(S(16)*c*d**S(2)*e) + (S(12)*a*c + S(3)*b**S(2))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*sqrt(c)*d) - (-b*e + S(2)*c*d)*(-b**S(2)*e**S(2) + S(8)*c**S(2)*d**S(2) - S(4)*c*e*(-S(3)*a*e + S(2)*b*d))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(32)*c**(S(3)/2)*d**S(2)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/(-S(2)*x**S(2) + S(3)), x), x, -S(27)*x**S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(70) - x*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/S(14) - S(213)*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(140) - S(2211)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(280)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(1542) + S(8151)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(280)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(289)*sqrt(S(2)) + S(867))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(S(1)/2 + S(11)*sqrt(S(2))/S(24), S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(32)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(2211)*sqrt(S(2))*x**S(2) + S(2211))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(280)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(17)*sqrt(S(51))*atanh(sqrt(S(51))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(16), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(2)*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/(-S(2)*x**S(2) + S(3)), x), x, -S(3)*x*(x**S(2) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(35) - x*(S(3)*x**S(2) + S(1))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(10) - x*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/S(14) - S(5)*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(4) - S(6)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(35)*sqrt(S(2))*x**S(2) + S(35)) - S(309)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(40)*(sqrt(S(2))*x**S(2) + S(1))) + S(6)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(35)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(51)*sqrt(S(2)) + S(255))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(32)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5) + S(5)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(6)*sqrt(S(2)) + S(9))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(140)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-sqrt(S(2)) + S(1))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(40)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(289)*sqrt(S(2)) + S(867))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(S(1)/2 + S(11)*sqrt(S(2))/S(24), S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(32)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(309)*sqrt(S(2))*x**S(2) + S(309))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(40)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(867)*sqrt(S(2))*x**S(2) + S(867))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(16)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(17)*sqrt(S(51))*atanh(sqrt(S(51))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/(-S(2)*x**S(2) + S(3)), x), x, -x**S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(5) - S(9)*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(10) - S(103)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(20)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(66) + S(383)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(289)*sqrt(S(2)) + S(867))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(S(1)/2 + S(11)*sqrt(S(2))/S(24), S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(48)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(103)*sqrt(S(2))*x**S(2) + S(103))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(17)*sqrt(S(51))*atanh(sqrt(S(51))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(24), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/(-S(2)*x**S(2) + S(3)), x), x, -x*(S(3)*x**S(2) + S(1))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(15) - S(5)*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(6) - S(103)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(20)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(17)*sqrt(S(2)) + S(85))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(16)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5) + S(5)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-sqrt(S(2)) + S(1))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(60)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(289)*sqrt(S(2)) + S(867))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(S(1)/2 + S(11)*sqrt(S(2))/S(24), S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(48)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(103)*sqrt(S(2))*x**S(2) + S(103))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(289)*sqrt(S(2))*x**S(2) + S(289))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(17)*sqrt(S(51))*atanh(sqrt(S(51))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(24), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/(x**S(2)*(-S(2)*x**S(2) + S(3))), x), x, sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*sqrt(S(2))*x**S(2) + S(3)) - S(17)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(6)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(17)*sqrt(S(2)) + S(85))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(24)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(6)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(289)*sqrt(S(2)) + S(867))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(S(1)/2 + S(11)*sqrt(S(2))/S(24), S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(72)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(17)*sqrt(S(2))*x**S(2) + S(17))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(6)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(289)*sqrt(S(2))*x**S(2) + S(289))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(17)*sqrt(S(51))*atanh(sqrt(S(51))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(36) - (x**S(2) + S(1))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/(x**S(4)*(-S(2)*x**S(2) + S(3))), x), x, sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(9)*sqrt(S(2))*x**S(2) + S(9)) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(9)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(17)*sqrt(S(2)) + S(85))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(36)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(5)*sqrt(S(2)) + S(9))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(9)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(289)*sqrt(S(2)) + S(867))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(S(1)/2 + S(11)*sqrt(S(2))/S(24), S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(108)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(289)*sqrt(S(2))*x**S(2) + S(289))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(18)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(17)*sqrt(S(51))*atanh(sqrt(S(51))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(54) - S(2)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/x - (-S(8)*x**S(2) + S(1))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(9)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)/(x**S(6)*(-S(2)*x**S(2) + S(3))), x), x, S(262)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(135)*sqrt(S(2))*x**S(2) + S(135)) - S(262)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(135)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(17)*sqrt(S(2)) + S(51))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(54)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(23)*sqrt(S(2)) + S(37))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(135)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(289)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((S(54) + S(81)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-S(289)*sqrt(S(2)) + S(867))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(S(1)/2 + S(11)*sqrt(S(2))/S(24), S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(162)*(S(2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(17)*sqrt(S(51))*atanh(sqrt(S(51))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(81) - S(262)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(135)*x) + S(74)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(135)*x**S(3)) - (S(40)*x**S(2) + S(3))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(45)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -b*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*c**(S(3)/2)*e) + d**S(2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e**S(2)*sqrt(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*c*e) - d*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(c)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -d*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e*sqrt(a*e**S(2) - b*d*e + c*d**S(2))) + atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(c)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*sqrt(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -e*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*d*sqrt(a*e**S(2) - b*d*e + c*d**S(2))) - atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(a)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(d + e*x**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, e**S(2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*d**S(2)*sqrt(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*a*d*x**S(2)) + e*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(a)*d**S(2)) + b*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*a**(S(3)/2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/((S(2)*x**S(2) + S(3))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))), x), x, sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(4)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(4)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(3)*sqrt(S(2)) + S(9))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(16)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(3)*sqrt(S(2))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(16)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(9)*sqrt(S(2))*x**S(2) + S(9))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(3)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(40), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((S(2)*x**S(2) + S(3))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))), x), x, S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(8)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(3)*sqrt(S(2))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(4)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(20), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((S(2)*x**S(2) + S(3))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))), x), x, -S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(2)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(30), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(S(2)*x**S(2) + S(3))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))), x), x, sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*sqrt(S(2))*x**S(2) + S(3)) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(9)*sqrt(S(2)) + S(6))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(6)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(18)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(45) - sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(S(2)*x**S(2) + S(3))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))), x), x, -S(2)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*sqrt(S(2))*x**S(2) + S(3)) + S(2)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(1) + S(2)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(18)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(9)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(27)*sqrt(S(2)) + S(18))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(81)*sqrt(S(2)) + S(54))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(135) + S(2)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*x) - sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(9)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, -b*sqrt(a + b*x**S(2) + c*x**S(4))/(c*e*(-S(4)*a*c + b**S(2))) - d**S(3)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*e*(a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)) + d**S(3)*(S(2)*a*c*e - b**S(2)*e + b*c*d + c*x**S(2)*(-b*e + S(2)*c*d))/(e**S(3)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))) - d**S(2)*(b + S(2)*c*x**S(2))/(e**S(3)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - d*(S(2)*a + b*x**S(2))/(e**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + x**S(2)*(S(2)*a + b*x**S(2))/(e*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*c**(S(3)/2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, d**S(2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)) - d**S(2)*(S(2)*a*c*e - b**S(2)*e + b*c*d + c*x**S(2)*(-b*e + S(2)*c*d))/(e**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))) + d*(b + S(2)*c*x**S(2))/(e**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) + (S(2)*a + b*x**S(2))/(e*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, -d*e*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)) + (a*(-b*e + S(2)*c*d) + c*x**S(2)*(-S(2)*a*e + b*d))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, e**S(2)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)) - (S(2)*a*c*e - b**S(2)*e + b*c*d + c*x**S(2)*(-b*e + S(2)*c*d))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, -e**S(3)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*d*(a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)) + e*(S(2)*a*c*e - b**S(2)*e + b*c*d + c*x**S(2)*(-b*e + S(2)*c*d))/(d*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))) + (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*d*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*a**(S(3)/2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))**(S(3)/2)), x), x, e**S(4)*atanh((-S(2)*a*e + b*d + x**S(2)*(-b*e + S(2)*c*d))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(2) - b*d*e + c*d**S(2))))/(S(2)*d**S(2)*(a*e**S(2) - b*d*e + c*d**S(2))**(S(3)/2)) - e**S(2)*(S(2)*a*c*e - b**S(2)*e + b*c*d + c*x**S(2)*(-b*e + S(2)*c*d))/(d**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(2) - b*d*e + c*d**S(2))) + (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*d*x**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - e*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*d**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - (-S(8)*a*c + S(3)*b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))/(S(2)*a**S(2)*d*x**S(2)*(-S(4)*a*c + b**S(2))) + e*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*a**(S(3)/2)*d**S(2)) + S(3)*b*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*a**(S(5)/2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/((S(2)*x**S(2) + S(3))*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, x**S(3)*(-S(2)*x**S(2) + S(1))/(S(20)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/S(20) + sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(20)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(7))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(80)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(27)*sqrt(S(2)) + S(81))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(160)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(9)*sqrt(S(2))*x**S(2) + S(9))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(80)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(27)*sqrt(S(2))*x**S(2) + S(27))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(160)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(81)*sqrt(S(2))*x**S(2) + S(81))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(80)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(27)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(400), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/((S(2)*x**S(2) + S(3))*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, x*(-S(2)*x**S(2) + S(1))/(S(20)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(20)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-sqrt(S(2)) + S(1))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(80)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(9)*sqrt(S(2)) + S(27))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(80)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(9)*sqrt(S(2))*x**S(2) + S(9))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(80)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(27)*sqrt(S(2))*x**S(2) + S(27))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(40)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(9)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(200), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/((S(2)*x**S(2) + S(3))*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, -x*(x**S(2) + S(2))/(S(10)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(20)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-sqrt(S(2)) + S(1))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(40)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(3)*sqrt(S(2)) + S(9))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(40)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(9)*sqrt(S(2))*x**S(2) + S(9))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(3)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(100), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((S(2)*x**S(2) + S(3))*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, x*(S(4)*x**S(2) + S(3))/(S(10)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(5)*sqrt(S(2))*x**S(2) + S(5)) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(5)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(1) + S(2)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(40)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(3)*sqrt(S(2))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(10)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(50), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((S(2)*x**S(2) + S(3))*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, -x*(S(3)*x**S(2) + S(1))/(S(5)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(3)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(10)*(sqrt(S(2))*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(4)*(S(-2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(30)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(3)*sqrt(S(2))*x**S(2) + S(3))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(10)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(75), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/((S(2)*x**S(2) + S(3))*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, -x*(S(3)*x**S(2) + S(1))/(S(5)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(3)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(10)*(sqrt(S(2))*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(15)*sqrt(S(2)) + S(10))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(10)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(30)*(-S(3)*sqrt(S(2)) + S(2))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(3)*sqrt(S(2))*x**S(2) + S(3))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(10)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(3)*sqrt(S(2))*x**S(2) + S(3))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(20)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(75), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(S(2)*x**S(2) + S(3))*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, S(2)*x*(S(3)*x**S(2) + S(1))/(S(15)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(15)*sqrt(S(2))*x**S(2) + S(15)) - S(2)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(15)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(S(-7) + S(3)*sqrt(S(2)))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(6)*(S(-2) + S(3)*sqrt(S(2)))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(135)*sqrt(S(2)) + S(90))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(225) - sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*x), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/(x**S(2)*(S(2)*x**S(2) + S(3))*(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, S(2)*x*(S(3)*x**S(2) + S(1))/(S(15)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)*sqrt(S(2))*x*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(15)*sqrt(S(2))*x**S(2) + S(15)) - S(2)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_e(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(15)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(10)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(15)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) + S(2)*S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(45)*sqrt(S(2)) + S(30))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(3)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(-sqrt(S(2)) + S(1))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_f(S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/(S(12)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)**(S(1)/4)*sqrt((S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(sqrt(S(2))*x**S(2) + S(1))**S(2))*(sqrt(S(2)) + S(3))*(sqrt(S(2))*x**S(2) + S(1))*elliptic_pi(-S(11)*sqrt(S(2))/S(24) + S(1)/2, S(2)*atan(S(2)**(S(1)/4)*x), -sqrt(S(2))/S(4) + S(1)/2)/((-S(135)*sqrt(S(2)) + S(90))*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))) - S(2)*sqrt(S(15))*atan(sqrt(S(15))*x/(S(3)*sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))))/S(225) - sqrt(S(2)*x**S(4) + S(2)*x**S(2) + S(1))/(S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*sqrt(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, (d + e*x**S(2))**(S(5)/2)/(S(5)*c*e**S(2)) - (d + e*x**S(2))**(S(3)/2)*(b*e + c*d)/(S(3)*c**S(2)*e**S(2)) + sqrt(d + e*x**S(2))*(-a*c + b**S(2))/c**S(3) - sqrt(S(2))*(S(2)*a*b*c*e - a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d + (-S(2)*a**S(2)*c**S(2)*e + S(4)*a*b**S(2)*c*e - S(3)*a*b*c**S(2)*d - b**S(4)*e + b**S(3)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(7)/2)*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - sqrt(S(2))*(S(2)*a*b*c*e - a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d - (-S(2)*a**S(2)*c**S(2)*e + S(4)*a*b**S(2)*c*e - S(3)*a*b*c**S(2)*d - b**S(4)*e + b**S(3)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(7)/2)*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, -b*sqrt(d + e*x**S(2))/c**S(2) + (d + e*x**S(2))**(S(3)/2)/(S(3)*c*e) + sqrt(S(2))*(a*c*e - b**S(2)*e + b*c*d + (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(5)/2)*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + sqrt(S(2))*(a*c*e - b**S(2)*e + b*c*d - (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(5)/2)*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, sqrt(d + e*x**S(2))/c - sqrt(S(2))*(S(2)*a*c*e - b**S(2)*e + b*c*d + sqrt(-S(4)*a*c + b**S(2))*(-b*e + c*d))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(3)/2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + sqrt(S(2))*(S(2)*a*c*e - b**S(2)*e + b*c*d - sqrt(-S(4)*a*c + b**S(2))*(-b*e + c*d))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(3)/2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))/(x*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(S(2))*sqrt(c)*(-S(2)*a*e + b*d - d*sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + sqrt(S(2))*sqrt(c)*(-S(2)*a*e + b*d + d*sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - sqrt(d)*atanh(sqrt(d + e*x**S(2))/sqrt(d))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))/(x**S(5)*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(d + e*x**S(2))/(S(4)*a*x**S(4)) + S(3)*e*sqrt(d + e*x**S(2))/(S(8)*a*d*x**S(2)) - S(3)*e**S(2)*atanh(sqrt(d + e*x**S(2))/sqrt(d))/(S(8)*a*d**(S(3)/2)) + sqrt(d + e*x**S(2))*(-a*e + b*d)/(S(2)*a**S(2)*d*x**S(2)) - e*(-a*e + b*d)*atanh(sqrt(d + e*x**S(2))/sqrt(d))/(S(2)*a**S(2)*d**(S(3)/2)) - sqrt(S(2))*sqrt(c)*(-a*b*(S(3)*c*d - e*sqrt(-S(4)*a*c + b**S(2))) + a*c*(S(2)*a*e + d*sqrt(-S(4)*a*c + b**S(2))) + b**S(3)*d - b**S(2)*(a*e + d*sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a**S(3)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + sqrt(S(2))*sqrt(c)*(-a*b*(S(3)*c*d + e*sqrt(-S(4)*a*c + b**S(2))) - a*c*(-S(2)*a*e + d*sqrt(-S(4)*a*c + b**S(2))) + b**S(3)*d + b**S(2)*(-a*e + d*sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a**S(3)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - (-a*b*e - a*c*d + b**S(2)*d)*atanh(sqrt(d + e*x**S(2))/sqrt(d))/(a**S(3)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, x*sqrt(d + e*x**S(2))/(S(2)*c) - (a*c*e - b**S(2)*e + b*c*d + (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - (a*c*e - b**S(2)*e + b*c*d - (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) + (-S(2)*b*e + c*d)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c**S(2)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, sqrt(e)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/c + (-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + (-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))/(x**S(2)*(a + b*x**S(2) + c*x**S(4))), x), x, -c*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - c*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - sqrt(d + e*x**S(2))/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))/(x**S(4)*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(d + e*x**S(2))/(S(3)*a*x**S(3)) + S(2)*e*sqrt(d + e*x**S(2))/(S(3)*a*d*x) + c*(-a*e + b*d - (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + c*(-a*e + b*d + (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) + sqrt(d + e*x**S(2))*(-a*e + b*d)/(a**S(2)*d*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(2))/(x**S(6)*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(d + e*x**S(2))/(S(5)*a*x**S(5)) + S(4)*e*sqrt(d + e*x**S(2))/(S(15)*a*d*x**S(3)) - S(8)*e**S(2)*sqrt(d + e*x**S(2))/(S(15)*a*d**S(2)*x) + sqrt(d + e*x**S(2))*(-a*e + b*d)/(S(3)*a**S(2)*d*x**S(3)) - S(2)*e*sqrt(d + e*x**S(2))*(-a*e + b*d)/(S(3)*a**S(2)*d**S(2)*x) - c*(-a*b*e - a*c*d + b**S(2)*d - (S(2)*a**S(2)*c*e - a*b**S(2)*e - S(3)*a*b*c*d + b**S(3)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(3)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - c*(-a*b*e - a*c*d + b**S(2)*d + (S(2)*a**S(2)*c*e - a*b**S(2)*e - S(3)*a*b*c*d + b**S(3)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(3)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - sqrt(d + e*x**S(2))*(-a*b*e - a*c*d + b**S(2)*d)/(a**S(3)*d*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(d + e*x**S(2))**(S(3)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, (d + e*x**S(2))**(S(3)/2)/(S(3)*c) + sqrt(d + e*x**S(2))*(-b*e + c*d)/c**S(2) - sqrt(S(2))*(b**S(3)*e**S(2) - b**S(2)*e*(S(2)*c*d - e*sqrt(-S(4)*a*c + b**S(2))) + b*c*(c*d**S(2) - e*(S(3)*a*e + S(2)*d*sqrt(-S(4)*a*c + b**S(2)))) - c*(a*e**S(2)*sqrt(-S(4)*a*c + b**S(2)) - c*d*(S(4)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(5)/2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + sqrt(S(2))*(b**S(3)*e**S(2) - b**S(2)*e*(S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))) + b*c*(c*d**S(2) + e*(-S(3)*a*e + S(2)*d*sqrt(-S(4)*a*c + b**S(2)))) + c*(a*e**S(2)*sqrt(-S(4)*a*c + b**S(2)) - c*d*(-S(4)*a*e + d*sqrt(-S(4)*a*c + b**S(2)))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(5)/2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(2))**(S(3)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, e*sqrt(d + e*x**S(2))/c + sqrt(S(2))*(b*e**S(2)*(b + sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d + d*sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(3)/2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - sqrt(S(2))*(b*e**S(2)*(b - sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d - d*sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c**(S(3)/2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(3)/2)/(x*(a + b*x**S(2) + c*x**S(4))), x), x, -d**(S(3)/2)*atanh(sqrt(d + e*x**S(2))/sqrt(d))/a - sqrt(S(2))*(a*e**S(2)*sqrt(-S(4)*a*c + b**S(2)) + b*(a*e**S(2) + c*d**S(2)) - c*d*(S(4)*a*e + d*sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - sqrt(S(2))*(a*e**S(2)*sqrt(-S(4)*a*c + b**S(2)) - b*(a*e**S(2) + c*d**S(2)) - c*d*(-S(4)*a*e + d*sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(3)/2)/(x**S(3)*(a + b*x**S(2) + c*x**S(4))), x), x, sqrt(d)*e*atanh(sqrt(d + e*x**S(2))/sqrt(d))/(S(2)*a) - d*sqrt(d + e*x**S(2))/(S(2)*a*x**S(2)) + sqrt(S(2))*sqrt(c)*(-S(2)*a*(c*d**S(2) - e*(a*e + d*sqrt(-S(4)*a*c + b**S(2)))) + b**S(2)*d**S(2) - b*d*(S(2)*a*e + d*sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - sqrt(S(2))*sqrt(c)*(-S(2)*a*(c*d**S(2) + e*(-a*e + d*sqrt(-S(4)*a*c + b**S(2)))) + b**S(2)*d**S(2) + b*d*(-S(2)*a*e + d*sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(d + e*x**S(2))/sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) + sqrt(d)*(-S(2)*a*e + b*d)*atanh(sqrt(d + e*x**S(2))/sqrt(d))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(d + e*x**S(2))**(S(3)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, x*(d + e*x**S(2))**(S(3)/2)/(S(4)*c) + d*(-S(4)*b*e + S(3)*c*d)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(8)*c**S(2)*sqrt(e)) + x*sqrt(d + e*x**S(2))*(-S(4)*b*e + S(3)*c*d)/(S(8)*c**S(2)) - sqrt(e)*(a*c*e - b**S(2)*e + b*c*d - (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c**S(3)) - sqrt(e)*(a*c*e - b**S(2)*e + b*c*d + (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c**S(3)) - sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(a*c*e - b**S(2)*e + b*c*d + (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(S(2)*c**S(3)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(a*c*e - b**S(2)*e + b*c*d - (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(S(2)*c**S(3)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**S(2))**(S(3)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, d*sqrt(e)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c) + e*x*sqrt(d + e*x**S(2))/(S(2)*c) + sqrt(e)*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c**S(2)) + sqrt(e)*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c**S(2)) + sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(S(2)*c**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(S(2)*c**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(3)/2)/(a + b*x**S(2) + c*x**S(4)), x), x, sqrt(e)*(S(3)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))) - sqrt(e)*(S(3)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))) - (b*e**S(2)*(b + sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d + d*sqrt(-S(4)*a*c + b**S(2))))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + (b*e**S(2)*(b - sqrt(-S(4)*a*c + b**S(2))) + S(2)*c**S(2)*d**S(2) - S(2)*c*e*(a*e + b*d - d*sqrt(-S(4)*a*c + b**S(2))))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(3)/2)/(x**S(2)*(a + b*x**S(2) + c*x**S(4))), x), x, (S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))**(S(3)/2)*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/((b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/2)*sqrt(-S(4)*a*c + b**S(2))) - (S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))**(S(3)/2)*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/((b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/2)*sqrt(-S(4)*a*c + b**S(2))) - d*sqrt(d + e*x**S(2))/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(2))**(S(3)/2)/(x**S(4)*(a + b*x**S(2) + c*x**S(4))), x), x, -(d + e*x**S(2))**(S(3)/2)/(S(3)*a*x**S(3)) - sqrt(e)*(-a*e + b*d)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/a**S(2) + sqrt(e)*(-a*e + b*d - (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*a**S(2)) + sqrt(e)*(-a*e + b*d + (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*a**S(2)) + sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(-a*e + b*d - (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(S(2)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(-a*e + b*d + (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(S(2)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) + sqrt(d + e*x**S(2))*(-a*e + b*d)/(a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(-x**S(2) + S(1))/(a + b*x**S(2) + c*x**S(4)), x), x, -b*sqrt(-x**S(2) + S(1))/c**S(2) - (-x**S(2) + S(1))**(S(3)/2)/(S(3)*c) + sqrt(S(2))*(-a*c + b**S(2) + b*c + (-S(3)*a*b*c - S(2)*a*c**S(2) + b**S(3) + b**S(2)*c)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(-a*c + b**S(2) + b*c - (-S(3)*a*b*c - S(2)*a*c**S(2) + b**S(3) + b**S(2)*c)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(-x**S(2) + S(1))/(a + b*x**S(2) + c*x**S(4)), x), x, sqrt(-x**S(2) + S(1))/c - sqrt(S(2))*(b + c - (-S(2)*a*c + b**S(2) + b*c)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(b + c + (-S(2)*a*c + b**S(2) + b*c)/sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(-x**S(2) + S(1))/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + S(1))/(x*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(S(2))*sqrt(c)*(S(2)*a + b - sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*sqrt(c)*(S(2)*a + b + sqrt(-S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))) - atanh(sqrt(-x**S(2) + S(1)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + S(1))/(x**S(3)*(a + b*x**S(2) + c*x**S(4))), x), x, S(1)/(S(4)*a*(sqrt(-x**S(2) + S(1)) + S(1))) - S(1)/(S(4)*a*(-sqrt(-x**S(2) + S(1)) + S(1))) + sqrt(S(2))*sqrt(c)*(a*(b - S(2)*c - sqrt(-S(4)*a*c + b**S(2))) + b*(b - sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(a*(b - S(2)*c + sqrt(-S(4)*a*c + b**S(2))) + b*(b + sqrt(-S(4)*a*c + b**S(2))))*atanh(sqrt(S(2))*sqrt(c)*sqrt(-x**S(2) + S(1))/sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))) + (a + S(2)*b)*atanh(sqrt(-x**S(2) + S(1)))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(-x**S(2) + S(1))/(a + b*x**S(2) + c*x**S(4)), x), x, x*sqrt(-x**S(2) + S(1))/(S(2)*c) + (S(2)*b + c)*asin(x)/(S(2)*c**S(2)) - (-a*c + b**S(2) + b*c + (-S(3)*a*b*c - S(2)*a*c**S(2) + b**S(3) + b**S(2)*c)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-x**S(2) + S(1))))/(c**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))) - (-a*c + b**S(2) + b*c - (-S(3)*a*b*c - S(2)*a*c**S(2) + b**S(3) + b**S(2)*c)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-x**S(2) + S(1))))/(c**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(-x**S(2) + S(1))/(a + b*x**S(2) + c*x**S(4)), x), x, -asin(x)/c + (b + c + (-S(2)*a*c + b**S(2) + b*c)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-x**S(2) + S(1))))/(c*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))) + (b + c - (-S(2)*a*c + b**S(2) + b*c)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-x**S(2) + S(1))))/(c*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + S(1))/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-x**S(2) + S(1))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-x**S(2) + S(1))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + S(1))/(x**S(2)*(a + b*x**S(2) + c*x**S(4))), x), x, -c*(-(S(2)*a + b)/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(x*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-x**S(2) + S(1))))/(a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(b + S(2)*c + sqrt(-S(4)*a*c + b**S(2)))) - c*((S(2)*a + b)/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(x*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-x**S(2) + S(1))))/(a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(b + S(2)*c - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(-x**S(2) + S(1))/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(-x**S(2) + S(1))/(x**S(4) + x**S(2) + S(-1)), x), x, -asin(x) + sqrt(S(2)/5 + sqrt(S(5))/S(5))*atan(x*sqrt(S(1)/2 + sqrt(S(5))/S(2))/sqrt(-x**S(2) + S(1))) - sqrt(S(-2)/5 + sqrt(S(5))/S(5))*atanh(x*sqrt(S(-1)/2 + sqrt(S(5))/S(2))/sqrt(-x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, b*d*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c**S(2)*e**(S(3)/2)) - b*x*sqrt(d + e*x**S(2))/(S(2)*c**S(2)*e) + S(3)*d**S(2)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(8)*c*e**(S(5)/2)) - S(3)*d*x*sqrt(d + e*x**S(2))/(S(8)*c*e**S(2)) + x**S(3)*sqrt(d + e*x**S(2))/(S(4)*c*e) - (-S(2)*a*b*c + b**S(3) + (S(2)*a**S(2)*c**S(2) - S(4)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c**S(3)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - (-S(2)*a*b*c + b**S(3) - (S(2)*a**S(2)*c**S(2) - S(4)*a*b**S(2)*c + b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c**S(3)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) + (-a*c + b**S(2))*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(c**S(3)*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -b*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(c**S(2)*sqrt(e)) - d*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(S(2)*c*e**(S(3)/2)) + x*sqrt(d + e*x**S(2))/(S(2)*c*e) + (-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + (-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - (b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(c*sqrt(e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) + sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -S(2)*c*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + S(2)*c*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -c*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - c*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - sqrt(d + e*x**S(2))/(a*d*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(d + e*x**S(2))/(S(3)*a*d*x**S(3)) + S(2)*e*sqrt(d + e*x**S(2))/(S(3)*a*d**S(2)*x) + b*sqrt(d + e*x**S(2))/(a**S(2)*d*x) + c*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + c*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(6)*sqrt(d + e*x**S(2))*(a + b*x**S(2) + c*x**S(4))), x), x, -sqrt(d + e*x**S(2))/(S(5)*a*d*x**S(5)) + S(4)*e*sqrt(d + e*x**S(2))/(S(15)*a*d**S(2)*x**S(3)) - S(8)*e**S(2)*sqrt(d + e*x**S(2))/(S(15)*a*d**S(3)*x) + b*sqrt(d + e*x**S(2))/(S(3)*a**S(2)*d*x**S(3)) - S(2)*b*e*sqrt(d + e*x**S(2))/(S(3)*a**S(2)*d**S(2)*x) - c*(-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(3)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - c*(-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(3)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - sqrt(d + e*x**S(2))*(-a*c + b**S(2))/(a**S(3)*d*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/((d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -d**S(2)*x/(e*sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + (-S(2)*a*c + S(2)*b**S(2) + S(2)*b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))**(S(3)/2)) + (-S(2)*a*c + S(2)*b**S(2) - S(2)*b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))**(S(3)/2)) + atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(c*e**(S(3)/2)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(6)/((d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -d**S(2)*x/(e*sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + d**S(2)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(e**(S(3)/2)*(a*e**S(2) - b*d*e + c*d**S(2))) + (-a*b*e - a*c*d + b**S(2)*d + (S(2)*a**S(2)*c*e - a*b**S(2)*e - S(3)*a*b*c*d + b**S(3)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) + (-a*b*e - a*c*d + b**S(2)*d - (S(2)*a**S(2)*c*e - a*b**S(2)*e - S(3)*a*b*c*d + b**S(3)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(c*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) - (-a*e + b*d)*atanh(sqrt(e)*x/sqrt(d + e*x**S(2)))/(c*sqrt(e)*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/((d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, d*x/(sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - (-a*e + b*d + (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) - (-a*e + b*d - (-a*b*e - S(2)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, c*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) + c*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) - e*x/(sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -c*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) - c*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) + e**S(2)*x/(d*sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -S(2)*c**S(2)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))**(S(3)/2)) - S(2)*c**S(2)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))**(S(3)/2)) + e*x*(-b*e + c*d)/(a*d*sqrt(d + e*x**S(2))*(c*d**S(2) + e*(a*e - b*d))) + (-d - S(2)*e*x**S(2))/(a*d**S(2)*x*sqrt(d + e*x**S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/(x**S(2)*(d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -e**S(2)/(d*x*sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - S(2)*e**S(3)*x/(d**S(2)*sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - c*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) - c*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(d + e*x**S(2))*(-b*e + c*d)/(a*d*x*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -S(1)/(S(3)*a*d*x**S(3)*sqrt(d + e*x**S(2))) + S(2)*c**S(2)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))**(S(3)/2)) + S(2)*c**S(2)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))**(S(3)/2)) - e*x*(a*c*e - b**S(2)*e + b*c*d)/(a**S(2)*d*sqrt(d + e*x**S(2))*(c*d**S(2) + e*(a*e - b*d))) + (S(4)*a*e + S(3)*b*d)/(S(3)*a**S(2)*d**S(2)*x*sqrt(d + e*x**S(2))) + S(2)*e*x*(S(4)*a*e + S(3)*b*d)/(S(3)*a**S(2)*d**S(3)*sqrt(d + e*x**S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/(x**S(4)*(d + e*x**S(2))**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))), x), x, -e**S(2)/(S(3)*d*x**S(3)*sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + S(4)*e**S(3)/(S(3)*d**S(2)*x*sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) + S(8)*e**S(4)*x/(S(3)*d**S(3)*sqrt(d + e*x**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))) - sqrt(d + e*x**S(2))*(-b*e + c*d)/(S(3)*a*d*x**S(3)*(a*e**S(2) - b*d*e + c*d**S(2))) + S(2)*e*sqrt(d + e*x**S(2))*(-b*e + c*d)/(S(3)*a*d**S(2)*x*(a*e**S(2) - b*d*e + c*d**S(2))) + c*(a*c*e - b**S(2)*e + b*c*d - (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) + c*(a*c*e - b**S(2)*e + b*c*d + (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(x*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(d + e*x**S(2))))/(a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))*(a*e**S(2) - b*d*e + c*d**S(2))) + sqrt(d + e*x**S(2))*(a*c*e - b**S(2)*e + b*c*d)/(a**S(2)*d*x*(a*e**S(2) - b*d*e + c*d**S(2))), expand=True, _diff=True, _numerical=True) # '''Apart # assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, -S(2)*c*(f*x)**(m + S(1))*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*AppellF1(m/S(2) + S(1)/2, S(1), -q, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(f*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*c*(f*x)**(m + S(1))*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*AppellF1(m/S(2) + S(1)/2, S(1), -q, m/S(2) + S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(f*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(x**S(7)*(d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, (d + e*x**S(2))**(q + S(1))*(a - b**S(2)/c - b*(-S(3)*a*c + b**S(2))/(c*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c*(q + S(1))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + (d + e*x**S(2))**(q + S(1))*(a - b**S(2)/c + b*(-S(3)*a*c + b**S(2))/(c*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(-b*e + S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c*(q + S(1))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) + (d + e*x**S(2))**(q + S(2))/(S(2)*c*e**S(2)*(q + S(2))) - (d + e*x**S(2))**(q + S(1))*(b*e + c*d)/(S(2)*c**S(2)*e**S(2)*(q + S(1))), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(x**S(5)*(d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, (b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*(d + e*x**S(2))**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(-b*e + S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c*(q + S(1))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) + (b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*(d + e*x**S(2))**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*c*(q + S(1))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + (d + e*x**S(2))**(q + S(1))/(S(2)*c*e*(q + S(1))), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(x**S(3)*(d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, -(d + e*x**S(2))**(q + S(1))*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(-b*e + S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))))/((q + S(1))*(S(4)*c*d - S(2)*e*(b - sqrt(-S(4)*a*c + b**S(2))))) - (d + e*x**S(2))**(q + S(1))*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/((q + S(1))*(S(4)*c*d - S(2)*e*(b + sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate(x*(d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, c*(d + e*x**S(2))**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/((q + S(1))*sqrt(-S(4)*a*c + b**S(2))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - c*(d + e*x**S(2))**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(-b*e + S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))))/((q + S(1))*sqrt(-S(4)*a*c + b**S(2))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate((d + e*x**S(2))**q/(x*(a + b*x**S(2) + c*x**S(4))), x), x, c*(d + e*x**S(2))**(q + S(1))*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a*(q + S(1))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + c*(d + e*x**S(2))**(q + S(1))*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(-b*e + S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*(q + S(1))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - (d + e*x**S(2))**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(1) + e*x**S(2)/d)/(S(2)*a*d*(q + S(1))), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate((d + e*x**S(2))**q/(x**S(3)*(a + b*x**S(2) + c*x**S(4))), x), x, e*(d + e*x**S(2))**(q + S(1))*hyper((S(2), q + S(1)), (q + S(2),), S(1) + e*x**S(2)/d)/(S(2)*a*d**S(2)*(q + S(1))) + b*(d + e*x**S(2))**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(1) + e*x**S(2)/d)/(S(2)*a**S(2)*d*(q + S(1))) - c*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*(d + e*x**S(2))**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(S(2)*a**S(2)*(q + S(1))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) - c*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*(d + e*x**S(2))**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**S(2))/(-b*e + S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*(q + S(1))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate(x**S(6)*(d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, -b*x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*hyper((S(1)/2, -q), (S(3)/2,), -e*x**S(2)/d)/c**S(2) + x**S(3)*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*hyper((S(3)/2, -q), (S(5)/2,), -e*x**S(2)/d)/(S(3)*c) + x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*(-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(c**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))) + x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*(-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(c**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate(x**S(4)*(d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, -x*(S(1) + e*x**S(2)/d)**(-q)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*(d + e*x**S(2))**q*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(c*(b - sqrt(-S(4)*a*c + b**S(2)))) - x*(S(1) + e*x**S(2)/d)**(-q)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*(d + e*x**S(2))**q*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(c*(b + sqrt(-S(4)*a*c + b**S(2)))) + x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*hyper((S(1)/2, -q), (S(3)/2,), -e*x**S(2)/d)/c, expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, -x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/sqrt(-S(4)*a*c + b**S(2)) + x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate((d + e*x**S(2))**q/(a + b*x**S(2) + c*x**S(4)), x), x, -S(2)*c*x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate((d + e*x**S(2))**q/(x**S(2)*(a + b*x**S(2) + c*x**S(4))), x), x, -c*x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(a*(b + sqrt(-S(4)*a*c + b**S(2)))) - c*x*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(a*(b - sqrt(-S(4)*a*c + b**S(2)))) - (S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*hyper((S(-1)/2, -q), (S(1)/2,), -e*x**S(2)/d)/(a*x), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate((d + e*x**S(2))**q/(x**S(4)*(a + b*x**S(2) + c*x**S(4))), x), x, -(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*hyper((S(-3)/2, -q), (S(-1)/2,), -e*x**S(2)/d)/(S(3)*a*x**S(3)) + b*(S(1) + e*x**S(2)/d)**(-q)*(d + e*x**S(2))**q*hyper((S(-1)/2, -q), (S(1)/2,), -e*x**S(2)/d)/(a**S(2)*x) + c*x*(S(1) + e*x**S(2)/d)**(-q)*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*(d + e*x**S(2))**q*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(a**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))) + c*x*(S(1) + e*x**S(2)/d)**(-q)*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*(d + e*x**S(2))**q*AppellF1(S(1)/2, S(1), -q, S(3)/2, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**S(2)/d)/(a**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate((d + e*x**S(3))/(a + c*x**S(6)), x), x, -(sqrt(c)*d - e*sqrt(-a))*log(c**(S(1)/6)*x + (-a)**(S(1)/6))/(S(6)*c**(S(2)/3)*(-a)**(S(5)/6)) + (sqrt(c)*d - e*sqrt(-a))*log(-c**(S(1)/6)*x*(-a)**(S(1)/6) + c**(S(1)/3)*x**S(2) + (-a)**(S(1)/3))/(S(12)*c**(S(2)/3)*(-a)**(S(5)/6)) + sqrt(S(3))*(sqrt(c)*d - e*sqrt(-a))*atan(sqrt(S(3))*(-S(2)*c**(S(1)/6)*x/(-a)**(S(1)/6) + S(1))/S(3))/(S(6)*c**(S(2)/3)*(-a)**(S(5)/6)) + (sqrt(c)*d + e*sqrt(-a))*log(-c**(S(1)/6)*x + (-a)**(S(1)/6))/(S(6)*c**(S(2)/3)*(-a)**(S(5)/6)) - (sqrt(c)*d + e*sqrt(-a))*log(c**(S(1)/6)*x*(-a)**(S(1)/6) + c**(S(1)/3)*x**S(2) + (-a)**(S(1)/3))/(S(12)*c**(S(2)/3)*(-a)**(S(5)/6)) - sqrt(S(3))*(sqrt(c)*d + e*sqrt(-a))*atan(sqrt(S(3))*(S(2)*c**(S(1)/6)*x/(-a)**(S(1)/6) + S(1))/S(3))/(S(6)*c**(S(2)/3)*(-a)**(S(5)/6)), expand=True, _diff=True, _numerical=True) # NC assert rubi_test(rubi_integrate((d + e*x**S(3))/(a - c*x**S(6)), x), x, (-sqrt(a)*e + sqrt(c)*d)*log(a**(S(1)/6) + c**(S(1)/6)*x)/(S(6)*a**(S(5)/6)*c**(S(2)/3)) - (-sqrt(a)*e + sqrt(c)*d)*log(-a**(S(1)/6)*c**(S(1)/6)*x + a**(S(1)/3) + c**(S(1)/3)*x**S(2))/(S(12)*a**(S(5)/6)*c**(S(2)/3)) - sqrt(S(3))*(-sqrt(a)*e + sqrt(c)*d)*atan(sqrt(S(3))*(a**(S(1)/6) - S(2)*c**(S(1)/6)*x)/(S(3)*a**(S(1)/6)))/(S(6)*a**(S(5)/6)*c**(S(2)/3)) - (sqrt(a)*e + sqrt(c)*d)*log(a**(S(1)/6) - c**(S(1)/6)*x)/(S(6)*a**(S(5)/6)*c**(S(2)/3)) + (sqrt(a)*e + sqrt(c)*d)*log(a**(S(1)/6)*c**(S(1)/6)*x + a**(S(1)/3) + c**(S(1)/3)*x**S(2))/(S(12)*a**(S(5)/6)*c**(S(2)/3)) + sqrt(S(3))*(sqrt(a)*e + sqrt(c)*d)*atan(sqrt(S(3))*(a**(S(1)/6) + S(2)*c**(S(1)/6)*x)/(S(3)*a**(S(1)/6)))/(S(6)*a**(S(5)/6)*c**(S(2)/3)), expand=True, _diff=True, _numerical=True) # nc assert rubi_test(rubi_integrate((d + e*x**S(3))**S(5)*(a + b*x**S(3) + c*x**S(6)), x), x, a*d**S(5)*x + c*e**S(5)*x**S(22)/S(22) + d**S(4)*x**S(4)*(S(5)*a*e + b*d)/S(4) + d**S(3)*x**S(7)*(c*d**S(2) + S(5)*e*(S(2)*a*e + b*d))/S(7) + d**S(2)*e*x**S(10)*(c*d**S(2) + S(2)*e*(a*e + b*d))/S(2) + S(5)*d*e**S(2)*x**S(13)*(S(2)*c*d**S(2) + e*(a*e + S(2)*b*d))/S(13) + e**S(4)*x**S(19)*(b*e + S(5)*c*d)/S(19) + e**S(3)*x**S(16)*(S(10)*c*d**S(2) + e*(a*e + S(5)*b*d))/S(16), expand=True, _diff=True, _numerical=True) # nc assert rubi_test(rubi_integrate((d + e*x**S(3))**S(4)*(a + b*x**S(3) + c*x**S(6)), x), x, a*d**S(4)*x + c*e**S(4)*x**S(19)/S(19) + d**S(3)*x**S(4)*(S(4)*a*e + b*d)/S(4) + d**S(2)*x**S(7)*(S(6)*a*e**S(2) + S(4)*b*d*e + c*d**S(2))/S(7) + d*e*x**S(10)*(S(2)*c*d**S(2) + e*(S(2)*a*e + S(3)*b*d))/S(5) + e**S(3)*x**S(16)*(b*e + S(4)*c*d)/S(16) + e**S(2)*x**S(13)*(S(6)*c*d**S(2) + e*(a*e + S(4)*b*d))/S(13), expand=True, _diff=True, _numerical=True) # nc assert rubi_test(rubi_integrate((d + e*x**S(3))**S(3)*(a + b*x**S(3) + c*x**S(6)), x), x, a*d**S(3)*x + c*e**S(3)*x**S(16)/S(16) + d**S(2)*x**S(4)*(S(3)*a*e + b*d)/S(4) + d*x**S(7)*(c*d**S(2) + S(3)*e*(a*e + b*d))/S(7) + e**S(2)*x**S(13)*(b*e + S(3)*c*d)/S(13) + e*x**S(10)*(S(3)*c*d**S(2) + e*(a*e + S(3)*b*d))/S(10), expand=True, _diff=True, _numerical=True) # ncassert rubi_test(rubi_integrate((d + e*x**S(3))**S(2)*(a + b*x**S(3) + c*x**S(6)), x), x, a*d**S(2)*x + c*e**S(2)*x**S(13)/S(13) + d*x**S(4)*(S(2)*a*e + b*d)/S(4) + e*x**S(10)*(b*e + S(2)*c*d)/S(10) + x**S(7)*(c*d**S(2) + e*(a*e + S(2)*b*d))/S(7), expand=True, _diff=True, _numerical=True) # nc assert rubi_test(rubi_integrate((d + e*x**S(3))*(a + b*x**S(3) + c*x**S(6)), x), x, a*d*x + c*e*x**S(10)/S(10) + x**S(7)*(b*e + c*d)/S(7) + x**S(4)*(a*e + b*d)/S(4), expand=True, _diff=True, _numerical=True) # nc assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))/(d + e*x**S(3)), x), x, c*x**S(4)/(S(4)*e) - x*(-b*e + c*d)/e**S(2) + (a*e**S(2) - b*d*e + c*d**S(2))*log(d**(S(1)/3) + e**(S(1)/3)*x)/(S(3)*d**(S(2)/3)*e**(S(7)/3)) - (a*e**S(2) - b*d*e + c*d**S(2))*log(d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(S(6)*d**(S(2)/3)*e**(S(7)/3)) - sqrt(S(3))*(a*e**S(2) - b*d*e + c*d**S(2))*atan(sqrt(S(3))*(d**(S(1)/3) - S(2)*e**(S(1)/3)*x)/(S(3)*d**(S(1)/3)))/(S(3)*d**(S(2)/3)*e**(S(7)/3)), expand=True, _diff=True, _numerical=True) # nc assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))/(d + e*x**S(3))**S(2), x), x, c*x/e**S(2) + x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(3)*d*e**S(2)*(d + e*x**S(3))) - (S(4)*c*d**S(2) - e*(S(2)*a*e + b*d))*log(d**(S(1)/3) + e**(S(1)/3)*x)/(S(9)*d**(S(5)/3)*e**(S(7)/3)) + (S(4)*c*d**S(2) - e*(S(2)*a*e + b*d))*log(d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(S(18)*d**(S(5)/3)*e**(S(7)/3)) + sqrt(S(3))*(S(4)*c*d**S(2) - e*(S(2)*a*e + b*d))*atan(sqrt(S(3))*(d**(S(1)/3) - S(2)*e**(S(1)/3)*x)/(S(3)*d**(S(1)/3)))/(S(9)*d**(S(5)/3)*e**(S(7)/3)), expand=True, _diff=True, _numerical=True) # nc assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))/(d + e*x**S(3))**S(3), x), x, x*(a*e**S(2) - b*d*e + c*d**S(2))/(S(6)*d*e**S(2)*(d + e*x**S(3))**S(2)) - x*(S(7)*c*d**S(2) - e*(S(5)*a*e + b*d))/(S(18)*d**S(2)*e**S(2)*(d + e*x**S(3))) + (S(2)*c*d**S(2) + e*(S(5)*a*e + b*d))*log(d**(S(1)/3) + e**(S(1)/3)*x)/(S(27)*d**(S(8)/3)*e**(S(7)/3)) - (S(2)*c*d**S(2) + e*(S(5)*a*e + b*d))*log(d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(S(54)*d**(S(8)/3)*e**(S(7)/3)) - sqrt(S(3))*(S(2)*c*d**S(2) + e*(S(5)*a*e + b*d))*atan(sqrt(S(3))*(d**(S(1)/3) - S(2)*e**(S(1)/3)*x)/(S(3)*d**(S(1)/3)))/(S(27)*d**(S(8)/3)*e**(S(7)/3)), expand=True, _diff=True, _numerical=True) # ''' assert rubi_test(rubi_integrate(x**S(8)*(d + e*x**S(3))/(a + b*x**S(3) + c*x**S(6)), x), x, e*x**S(6)/(S(6)*c) + x**S(3)*(-b*e + c*d)/(S(3)*c**S(2)) - (a*c*e - b**S(2)*e + b*c*d)*log(a + b*x**S(3) + c*x**S(6))/(S(6)*c**S(3)) - (S(3)*a*b*c*e - S(2)*a*c**S(2)*d - b**S(3)*e + b**S(2)*c*d)*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*c**S(3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(d + e*x**S(3))/(a + b*x**S(3) + c*x**S(6)), x), x, e*x**S(3)/(S(3)*c) + (-b*e + c*d)*log(a + b*x**S(3) + c*x**S(6))/(S(6)*c**S(2)) + (S(2)*a*c*e - b**S(2)*e + b*c*d)*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**S(3))/(a + b*x**S(3) + c*x**S(6)), x), x, e*log(a + b*x**S(3) + c*x**S(6))/(S(6)*c) - (-b*e + S(2)*c*d)*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*c*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(3))/(x*(a + b*x**S(3) + c*x**S(6))), x), x, d*log(x)/a - d*log(a + b*x**S(3) + c*x**S(6))/(S(6)*a) + (-S(2)*a*e + b*d)*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*a*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(3))/(x**S(4)*(a + b*x**S(3) + c*x**S(6))), x), x, -d/(S(3)*a*x**S(3)) - (-a*e + b*d)*log(x)/a**S(2) + (-a*e + b*d)*log(a + b*x**S(3) + c*x**S(6))/(S(6)*a**S(2)) - (-a*b*e - S(2)*a*c*d + b**S(2)*d)*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(d + e*x**S(3))/(a + b*x**S(3) + c*x**S(6)), x), x, e*x**S(2)/(S(2)*c) - S(2)**(S(1)/3)*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(5)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(5)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*sqrt(S(3))*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(5)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(5)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(5)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*sqrt(S(3))*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(5)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(d + e*x**S(3))/(a + b*x**S(3) + c*x**S(6)), x), x, e*x/c + S(2)**(S(2)/3)*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(3))/(a + b*x**S(3) + c*x**S(6)), x), x, -S(2)**(S(1)/3)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(2)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(2)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*sqrt(S(3))*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(2)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(2)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(2)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*sqrt(S(3))*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(2)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(3))/(a + b*x**S(3) + c*x**S(6)), x), x, S(2)**(S(2)/3)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(1)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(1)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(1)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(1)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(1)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(1)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(3))/(x**S(2)*(a + b*x**S(3) + c*x**S(6))), x), x, S(2)**(S(1)/3)*c**(S(1)/3)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*c**(S(1)/3)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*sqrt(S(3))*c**(S(1)/3)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*c**(S(1)/3)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*c**(S(1)/3)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*sqrt(S(3))*c**(S(1)/3)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - d/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(3))/(x**S(3)*(a + b*x**S(3) + c*x**S(6))), x), x, -S(2)**(S(2)/3)*c**(S(2)/3)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*c**(S(2)/3)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*c**(S(2)/3)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*a*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*c**(S(2)/3)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*c**(S(2)/3)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*c**(S(2)/3)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*a*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - d/(S(2)*a*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(-x**S(3) + S(1))/(x**S(6) - x**S(3) + S(1)), x), x, -x**S(6)/S(6) + log(x**S(6) - x**S(3) + S(1))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(-x**S(3) + S(1))/(x**S(6) - x**S(3) + S(1)), x), x, -x**S(3)/S(3) - S(2)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(-x**S(3) + S(1))/(x**S(6) - x**S(3) + S(1)), x), x, -log(x**S(6) - x**S(3) + S(1))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(3) + S(1))/(x*(x**S(6) - x**S(3) + S(1))), x), x, log(x) - log(x**S(6) - x**S(3) + S(1))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(3) + S(1))/(x**S(4)*(x**S(6) - x**S(3) + S(1))), x), x, S(2)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(9) - S(1)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(-x**S(3) + S(1))/(x**S(6) - x**S(3) + S(1)), x), x, -x**S(4)/S(4) + S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(-x**S(3) + S(1))/(x**S(6) - x**S(3) + S(1)), x), x, -x**S(2)/S(2) + sqrt(S(3))*I*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(9)*(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3)) - sqrt(S(3))*I*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(9)*(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3)) - S(2)**(S(1)/3)*sqrt(S(3))*I*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*sqrt(S(3))*I*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + I*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3)) - I*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(-x**S(3) + S(1))/(x**S(6) - x**S(3) + S(1)), x), x, -x + sqrt(S(3))*I*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(9)*(S(1)/2 - sqrt(S(3))*I/S(2))**(S(2)/3)) - sqrt(S(3))*I*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(9)*(S(1)/2 + sqrt(S(3))*I/S(2))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*I*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*I*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - I*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(S(1)/2 - sqrt(S(3))*I/S(2))**(S(2)/3)) + I*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(S(1)/2 + sqrt(S(3))*I/S(2))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(-x**S(3) + S(1))/(x**S(6) - x**S(3) + S(1)), x), x, -S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(3) + S(1))/(x**S(6) - x**S(3) + S(1)), x), x, -S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(3) + S(1))/(x**S(2)*(x**S(6) - x**S(3) + S(1))), x), x, -S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) - S(2)**(S(1)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(1)/3)) + S(2)**(S(1)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(1)/3)) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(3) + S(1))/(x**S(3)*(x**S(6) - x**S(3) + S(1))), x), x, -S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) - sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(-S(2)**(S(1)/3)*x + (S(1) + sqrt(S(3))*I)**(S(1)/3))/(S(18)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) + sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) - S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) - sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(S(3) - sqrt(S(3))*I)*log(S(2)**(S(2)/3)*x**S(2) + x*(S(2) + S(2)*sqrt(S(3))*I)**(S(1)/3) + (S(1) + sqrt(S(3))*I)**(S(2)/3))/(S(36)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) + S(2)**(S(2)/3)*(sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 - sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) - sqrt(S(3))*I)**(S(2)/3)) - S(2)**(S(2)/3)*(-sqrt(S(3)) + I)*atan(sqrt(S(3))*(S(2)*x/(S(1)/2 + sqrt(S(3))*I/S(2))**(S(1)/3) + S(1))/S(3))/(S(6)*(S(1) + sqrt(S(3))*I)**(S(2)/3)) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(x**S(3) + S(-2))/(x**S(6) - x**S(3) + S(1)), x), x, log(x**S(6) - x**S(3) + S(1))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(1))/(x*(x**S(6) - x**S(3) + S(1))), x), x, log(x) - log(x**S(6) - x**S(3) + S(1))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(1))/(x**S(7) - x**S(4) + x), x), x, log(x) - log(x**S(6) - x**S(3) + S(1))/S(6) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(3) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(3))**(S(5)/2)*(a + b*x**S(3) + c*x**S(6)), x), x, S(2)*c*x**S(4)*(d + e*x**S(3))**(S(7)/2)/(S(29)*e) + S(54)*S(3)**(S(3)/4)*d**S(3)*sqrt((d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(sqrt(S(3)) + S(2))*(d**(S(1)/3) + e**(S(1)/3)*x)*(S(667)*a*e**S(2) - S(58)*b*d*e + S(16)*c*d**S(2))*elliptic_f(asin((d**(S(1)/3)*(-sqrt(S(3)) + S(1)) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)), S(-7) - S(4)*sqrt(S(3)))/(S(124729)*e**(S(7)/3)*sqrt(d**(S(1)/3)*(d**(S(1)/3) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(d + e*x**S(3))) + S(54)*d**S(2)*x*sqrt(d + e*x**S(3))*(S(667)*a*e**S(2) - S(58)*b*d*e + S(16)*c*d**S(2))/(S(124729)*e**S(2)) + S(30)*d*x*(d + e*x**S(3))**(S(3)/2)*(S(667)*a*e**S(2) - S(58)*b*d*e + S(16)*c*d**S(2))/(S(124729)*e**S(2)) - x*(d + e*x**S(3))**(S(7)/2)*(-S(58)*b*e + S(16)*c*d)/(S(667)*e**S(2)) + x*(d + e*x**S(3))**(S(5)/2)*(S(1334)*a*e**S(2) - S(116)*b*d*e + S(32)*c*d**S(2))/(S(11339)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(3))**(S(3)/2)*(a + b*x**S(3) + c*x**S(6)), x), x, S(2)*c*x**S(4)*(d + e*x**S(3))**(S(5)/2)/(S(23)*e) + S(18)*S(3)**(S(3)/4)*d**S(2)*sqrt((d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(sqrt(S(3)) + S(2))*(d**(S(1)/3) + e**(S(1)/3)*x)*(S(391)*a*e**S(2) - S(46)*b*d*e + S(16)*c*d**S(2))*elliptic_f(asin((d**(S(1)/3)*(-sqrt(S(3)) + S(1)) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)), S(-7) - S(4)*sqrt(S(3)))/(S(21505)*e**(S(7)/3)*sqrt(d**(S(1)/3)*(d**(S(1)/3) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(d + e*x**S(3))) + S(18)*d*x*sqrt(d + e*x**S(3))*(S(391)*a*e**S(2) - S(46)*b*d*e + S(16)*c*d**S(2))/(S(21505)*e**S(2)) - x*(d + e*x**S(3))**(S(5)/2)*(-S(46)*b*e + S(16)*c*d)/(S(391)*e**S(2)) + x*(d + e*x**S(3))**(S(3)/2)*(S(782)*a*e**S(2) - S(92)*b*d*e + S(32)*c*d**S(2))/(S(4301)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x**S(3))*(a + b*x**S(3) + c*x**S(6)), x), x, S(2)*c*x**S(4)*(d + e*x**S(3))**(S(3)/2)/(S(17)*e) + S(2)*S(3)**(S(3)/4)*d*sqrt((d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(sqrt(S(3)) + S(2))*(d**(S(1)/3) + e**(S(1)/3)*x)*(S(187)*a*e**S(2) - S(34)*b*d*e + S(16)*c*d**S(2))*elliptic_f(asin((d**(S(1)/3)*(-sqrt(S(3)) + S(1)) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)), S(-7) - S(4)*sqrt(S(3)))/(S(935)*e**(S(7)/3)*sqrt(d**(S(1)/3)*(d**(S(1)/3) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(d + e*x**S(3))) - x*(d + e*x**S(3))**(S(3)/2)*(-S(34)*b*e + S(16)*c*d)/(S(187)*e**S(2)) + x*sqrt(d + e*x**S(3))*(S(374)*a*e**S(2) - S(68)*b*d*e + S(32)*c*d**S(2))/(S(935)*e**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))/sqrt(d + e*x**S(3)), x), x, S(2)*c*x**S(4)*sqrt(d + e*x**S(3))/(S(11)*e) - x*sqrt(d + e*x**S(3))*(-S(22)*b*e + S(16)*c*d)/(S(55)*e**S(2)) + S(2)*S(3)**(S(3)/4)*sqrt((d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(sqrt(S(3)) + S(2))*(d**(S(1)/3) + e**(S(1)/3)*x)*(S(55)*a*e**S(2) - S(22)*b*d*e + S(16)*c*d**S(2))*elliptic_f(asin((d**(S(1)/3)*(-sqrt(S(3)) + S(1)) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)), S(-7) - S(4)*sqrt(S(3)))/(S(165)*e**(S(7)/3)*sqrt(d**(S(1)/3)*(d**(S(1)/3) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(d + e*x**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))/(d + e*x**S(3))**(S(3)/2), x), x, S(2)*c*x*sqrt(d + e*x**S(3))/(S(5)*e**S(2)) + x*(S(2)*a*e**S(2) - S(2)*b*d*e + S(2)*c*d**S(2))/(S(3)*d*e**S(2)*sqrt(d + e*x**S(3))) - S(2)*S(3)**(S(3)/4)*sqrt((d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(sqrt(S(3)) + S(2))*(d**(S(1)/3) + e**(S(1)/3)*x)*(S(16)*c*d**S(2) - S(5)*e*(a*e + S(2)*b*d))*elliptic_f(asin((d**(S(1)/3)*(-sqrt(S(3)) + S(1)) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)), S(-7) - S(4)*sqrt(S(3)))/(S(45)*d*e**(S(7)/3)*sqrt(d**(S(1)/3)*(d**(S(1)/3) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(d + e*x**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))/(d + e*x**S(3))**(S(5)/2), x), x, x*(S(2)*a*e**S(2) - S(2)*b*d*e + S(2)*c*d**S(2))/(S(9)*d*e**S(2)*(d + e*x**S(3))**(S(3)/2)) - x*(-S(14)*a*e**S(2) - S(4)*b*d*e + S(22)*c*d**S(2))/(S(27)*d**S(2)*e**S(2)*sqrt(d + e*x**S(3))) + S(2)*S(3)**(S(3)/4)*sqrt((d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(sqrt(S(3)) + S(2))*(d**(S(1)/3) + e**(S(1)/3)*x)*(S(16)*c*d**S(2) + e*(S(7)*a*e + S(2)*b*d))*elliptic_f(asin((d**(S(1)/3)*(-sqrt(S(3)) + S(1)) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)), S(-7) - S(4)*sqrt(S(3)))/(S(81)*d**S(2)*e**(S(7)/3)*sqrt(d**(S(1)/3)*(d**(S(1)/3) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(d + e*x**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))/(d + e*x**S(3))**(S(7)/2), x), x, x*(S(2)*a*e**S(2) - S(2)*b*d*e + S(2)*c*d**S(2))/(S(15)*d*e**S(2)*(d + e*x**S(3))**(S(5)/2)) - x*(-S(26)*a*e**S(2) - S(4)*b*d*e + S(34)*c*d**S(2))/(S(135)*d**S(2)*e**S(2)*(d + e*x**S(3))**(S(3)/2)) + x*(S(182)*a*e**S(2) + S(28)*b*d*e + S(32)*c*d**S(2))/(S(405)*d**S(3)*e**S(2)*sqrt(d + e*x**S(3))) + S(2)*S(3)**(S(3)/4)*sqrt((d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(sqrt(S(3)) + S(2))*(d**(S(1)/3) + e**(S(1)/3)*x)*(S(91)*a*e**S(2) + S(14)*b*d*e + S(16)*c*d**S(2))*elliptic_f(asin((d**(S(1)/3)*(-sqrt(S(3)) + S(1)) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)), S(-7) - S(4)*sqrt(S(3)))/(S(1215)*d**S(3)*e**(S(7)/3)*sqrt(d**(S(1)/3)*(d**(S(1)/3) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(d + e*x**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3) + c*x**S(6))/(d + e*x**S(3))**(S(9)/2), x), x, x*(S(2)*a*e**S(2) - S(2)*b*d*e + S(2)*c*d**S(2))/(S(21)*d*e**S(2)*(d + e*x**S(3))**(S(7)/2)) - x*(-S(38)*a*e**S(2) - S(4)*b*d*e + S(46)*c*d**S(2))/(S(315)*d**S(2)*e**S(2)*(d + e*x**S(3))**(S(5)/2)) + x*(S(494)*a*e**S(2) + S(52)*b*d*e + S(32)*c*d**S(2))/(S(2835)*d**S(3)*e**S(2)*(d + e*x**S(3))**(S(3)/2)) + x*(S(494)*a*e**S(2) + S(52)*b*d*e + S(32)*c*d**S(2))/(S(1215)*d**S(4)*e**S(2)*sqrt(d + e*x**S(3))) + S(2)*S(3)**(S(3)/4)*sqrt((d**(S(2)/3) - d**(S(1)/3)*e**(S(1)/3)*x + e**(S(2)/3)*x**S(2))/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(sqrt(S(3)) + S(2))*(d**(S(1)/3) + e**(S(1)/3)*x)*(S(247)*a*e**S(2) + S(26)*b*d*e + S(16)*c*d**S(2))*elliptic_f(asin((d**(S(1)/3)*(-sqrt(S(3)) + S(1)) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)), S(-7) - S(4)*sqrt(S(3)))/(S(3645)*d**S(4)*e**(S(7)/3)*sqrt(d**(S(1)/3)*(d**(S(1)/3) + e**(S(1)/3)*x)/(d**(S(1)/3)*(S(1) + sqrt(S(3))) + e**(S(1)/3)*x)**S(2))*sqrt(d + e*x**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(4))/(a + c*x**S(8)), x), x, sqrt(S(2))*(sqrt(c)*d - e*sqrt(-a))*log(-sqrt(S(2))*c**(S(1)/8)*x*(-a)**(S(1)/8) + c**(S(1)/4)*x**S(2) + (-a)**(S(1)/4))/(S(16)*c**(S(5)/8)*(-a)**(S(7)/8)) - sqrt(S(2))*(sqrt(c)*d - e*sqrt(-a))*log(sqrt(S(2))*c**(S(1)/8)*x*(-a)**(S(1)/8) + c**(S(1)/4)*x**S(2) + (-a)**(S(1)/4))/(S(16)*c**(S(5)/8)*(-a)**(S(7)/8)) - sqrt(S(2))*(sqrt(c)*d - e*sqrt(-a))*atan(sqrt(S(2))*c**(S(1)/8)*x/(-a)**(S(1)/8) + S(-1))/(S(8)*c**(S(5)/8)*(-a)**(S(7)/8)) - sqrt(S(2))*(sqrt(c)*d - e*sqrt(-a))*atan(sqrt(S(2))*c**(S(1)/8)*x/(-a)**(S(1)/8) + S(1))/(S(8)*c**(S(5)/8)*(-a)**(S(7)/8)) - (sqrt(c)*d + e*sqrt(-a))*atan(c**(S(1)/8)*x/(-a)**(S(1)/8))/(S(4)*c**(S(5)/8)*(-a)**(S(7)/8)) - (sqrt(c)*d + e*sqrt(-a))*atanh(c**(S(1)/8)*x/(-a)**(S(1)/8))/(S(4)*c**(S(5)/8)*(-a)**(S(7)/8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(4))/(a - c*x**S(8)), x), x, -sqrt(S(2))*(-sqrt(a)*e + sqrt(c)*d)*log(-sqrt(S(2))*a**(S(1)/8)*c**(S(1)/8)*x + a**(S(1)/4) + c**(S(1)/4)*x**S(2))/(S(16)*a**(S(7)/8)*c**(S(5)/8)) + sqrt(S(2))*(-sqrt(a)*e + sqrt(c)*d)*log(sqrt(S(2))*a**(S(1)/8)*c**(S(1)/8)*x + a**(S(1)/4) + c**(S(1)/4)*x**S(2))/(S(16)*a**(S(7)/8)*c**(S(5)/8)) - sqrt(S(2))*(-sqrt(a)*e + sqrt(c)*d)*atan(S(1) - sqrt(S(2))*c**(S(1)/8)*x/a**(S(1)/8))/(S(8)*a**(S(7)/8)*c**(S(5)/8)) + sqrt(S(2))*(-sqrt(a)*e + sqrt(c)*d)*atan(S(1) + sqrt(S(2))*c**(S(1)/8)*x/a**(S(1)/8))/(S(8)*a**(S(7)/8)*c**(S(5)/8)) + (sqrt(a)*e + sqrt(c)*d)*atan(c**(S(1)/8)*x/a**(S(1)/8))/(S(4)*a**(S(7)/8)*c**(S(5)/8)) + (sqrt(a)*e + sqrt(c)*d)*atanh(c**(S(1)/8)*x/a**(S(1)/8))/(S(4)*a**(S(7)/8)*c**(S(5)/8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(d + e*x**S(4))/(a + b*x**S(4) + c*x**S(8)), x), x, e*x/c - S(2)**(S(3)/4)*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(-b*e + c*d - (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(-b*e + c*d + (S(2)*a*c*e - b**S(2)*e + b*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(d + e*x**S(4))/(a + b*x**S(4) + c*x**S(8)), x), x, e*log(a + b*x**S(4) + c*x**S(8))/(S(8)*c) - (-b*e + S(2)*c*d)*atanh((b + S(2)*c*x**S(4))/sqrt(-S(4)*a*c + b**S(2)))/(S(4)*c*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**S(4))/(a + b*x**S(4) + c*x**S(8)), x), x, S(2)**(S(1)/4)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(3)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(3)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(4))/(a + b*x**S(4) + c*x**S(8)), x), x, sqrt(S(2))*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(4))/(a + b*x**S(4) + c*x**S(8)), x), x, -S(2)**(S(3)/4)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(1)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - S(2)**(S(3)/4)*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(1)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(4))/(x*(a + b*x**S(4) + c*x**S(8))), x), x, d*log(x)/a - d*log(a + b*x**S(4) + c*x**S(8))/(S(8)*a) + (-S(2)*a*e + b*d)*atanh((b + S(2)*c*x**S(4))/sqrt(-S(4)*a*c + b**S(2)))/(S(4)*a*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(4))/(x**S(2)*(a + b*x**S(4) + c*x**S(8))), x), x, -S(2)**(S(1)/4)*c**(S(1)/4)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*c**(S(1)/4)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - S(2)**(S(1)/4)*c**(S(1)/4)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) + S(2)**(S(1)/4)*c**(S(1)/4)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4)) - d/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(4))/(x**S(3)*(a + b*x**S(4) + c*x**S(8))), x), x, -sqrt(S(2))*sqrt(c)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x**S(2)/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - d/(S(2)*a*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**S(4))/(x**S(4)*(a + b*x**S(4) + c*x**S(8))), x), x, S(2)**(S(3)/4)*c**(S(3)/4)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(d + (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*c**(S(3)/4)*(d - (-S(2)*a*e + b*d)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*a*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) - d/(S(3)*a*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(-x**S(4) + S(1))/(x**S(8) - x**S(4) + S(1)), x), x, -x - sqrt(S(6))*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) + sqrt(S(6))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) - sqrt(S(6))*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12) + sqrt(S(6))*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(-x**S(4) + S(1))/(x**S(8) - x**S(4) + S(1)), x), x, -log(x**S(8) - x**S(4) + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(4) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(-x**S(4) + S(1))/(x**S(8) - x**S(4) + S(1)), x), x, sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) - atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) + atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) + atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))) - atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(-x**S(4) + S(1))/(x**S(8) - x**S(4) + S(1)), x), x, -sqrt(S(3))*log(x**S(4) - sqrt(S(3))*x**S(2) + S(1))/S(12) + sqrt(S(3))*log(x**S(4) + sqrt(S(3))*x**S(2) + S(1))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(1))/(x**S(8) - x**S(4) + S(1)), x), x, sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) - atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/(S(4)*sqrt(S(3)*sqrt(S(3)) + S(6))) - atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))) + atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/(S(4)*sqrt(-S(3)*sqrt(S(3)) + S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(1))/(x*(x**S(8) - x**S(4) + S(1))), x), x, log(x) - log(x**S(8) - x**S(4) + S(1))/S(8) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**S(4) + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(1))/(x**S(2)*(x**S(8) - x**S(4) + S(1))), x), x, -sqrt(S(6))*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(24) - sqrt(S(6))*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(24) + sqrt(S(6))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) - sqrt(S(6))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(12) + sqrt(S(6))*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12) - sqrt(S(6))*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(12) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(1))/(x**S(3)*(x**S(8) - x**S(4) + S(1))), x), x, -sqrt(S(3))*log(x**S(4) - sqrt(S(3))*x**S(2) + S(1))/S(24) + sqrt(S(3))*log(x**S(4) + sqrt(S(3))*x**S(2) + S(1))/S(24) - atan(S(2)*x**S(2) - sqrt(S(3)))/S(4) - atan(S(2)*x**S(2) + sqrt(S(3)))/S(4) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(1))/(x**S(4)*(x**S(8) - x**S(4) + S(1))), x), x, sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(8) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(-sqrt(S(3))/S(3) + S(2)/3)*log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/S(8) + sqrt(sqrt(S(3))/S(3) + S(2)/3)*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) - sqrt(sqrt(S(3))/S(3) + S(2)/3)*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) - sqrt(-sqrt(S(3))/S(3) + S(2)/3)*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4) + sqrt(-sqrt(S(3))/S(3) + S(2)/3)*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4) - S(1)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(1))/(x**S(8) + x**S(4) + S(1)), x), x, -log(x**S(2) - x + S(1))/S(8) + log(x**S(2) + x + S(1))/S(8) - sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(24) + sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(24) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(12) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(12) + atan(S(2)*x - sqrt(S(3)))/S(4) + atan(S(2)*x + sqrt(S(3)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(1))/(x**S(8) + x**S(4) + S(1)), x), x, log(x**S(2) - x + S(1))/S(8) - log(x**S(2) + x + S(1))/S(8) - sqrt(S(3))*log(x**S(2) - sqrt(S(3))*x + S(1))/S(8) + sqrt(S(3))*log(x**S(2) + sqrt(S(3))*x + S(1))/S(8) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(4) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(4) - atan(S(2)*x - sqrt(S(3)))/S(4) - atan(S(2)*x + sqrt(S(3)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(1))/(x**S(8) - x**S(4) + S(1)), x), x, -log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(-sqrt(S(3)) + S(2))) + log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(-sqrt(S(3)) + S(2))) - log(x**S(2) - x*sqrt(sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(sqrt(S(3)) + S(2))) + log(x**S(2) + x*sqrt(sqrt(S(3)) + S(2)) + S(1))/(S(8)*sqrt(sqrt(S(3)) + S(2))) - sqrt(sqrt(S(3)) + S(2))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) + sqrt(sqrt(S(3)) + S(2))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(4) - sqrt(-sqrt(S(3)) + S(2))*atan((-S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4) + sqrt(-sqrt(S(3)) + S(2))*atan((S(2)*x + sqrt(-sqrt(S(3)) + S(2)))/sqrt(sqrt(S(3)) + S(2)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(1))/(x**S(8) - S(3)*x**S(4) + S(1)), x), x, sqrt(S(5))*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atan(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) + sqrt(S(5))*(-sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atan(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10) + sqrt(S(5))*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atanh(x*(sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4))/S(10) + sqrt(S(5))*(-sqrt(S(5))/S(2) + S(3)/2)**(S(1)/4)*atanh(S(2)**(S(1)/4)*x/(sqrt(S(5)) + S(3))**(S(1)/4))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(4) + S(-1) + sqrt(S(3)))/(x**S(8) - x**S(4) + S(1)), x), x, -sqrt(S(2))*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(4) + sqrt(S(2))*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(4) - sqrt(S(2))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(2) + sqrt(S(2))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4)*(S(1) + sqrt(S(3))) + S(1))/(x**S(8) - x**S(4) + S(1)), x), x, -sqrt(sqrt(S(3)) + S(2))*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(4) + sqrt(sqrt(S(3)) + S(2))*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(4) - sqrt(sqrt(S(3)) + S(2))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(2) + sqrt(sqrt(S(3)) + S(2))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4)*(S(-3) + sqrt(S(3))) - S(2)*sqrt(S(3)) + S(3))/(x**S(8) - x**S(4) + S(1)), x), x, sqrt(-S(3)*sqrt(S(3)) + S(6))*log(x**S(2) - x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(4) - sqrt(-S(3)*sqrt(S(3)) + S(6))*log(x**S(2) + x*sqrt(-sqrt(S(3)) + S(2)) + S(1))/S(4) + sqrt(-S(3)*sqrt(S(3)) + S(6))*atan((-S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(2) - sqrt(-S(3)*sqrt(S(3)) + S(6))*atan((S(2)*x + sqrt(sqrt(S(3)) + S(2)))/sqrt(-sqrt(S(3)) + S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e/x)/(a/x**S(2) + c), x), x, -sqrt(a)*d*atan(sqrt(c)*x/sqrt(a))/c**(S(3)/2) + d*x/c + e*log(a + c*x**S(2))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e/x)/(a/x**S(2) + b/x + c), x), x, d*x/c - (b*d - c*e)*log(a + b*x + c*x**S(2))/(S(2)*c**S(2)) - (-S(2)*a*c*d + b**S(2)*d - b*c*e)*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e/x**S(2))/(a/x**S(4) + c), x), x, d*x/c + sqrt(S(2))*(sqrt(a)*d - sqrt(c)*e)*atan(S(1) - sqrt(S(2))*c**(S(1)/4)*x/a**(S(1)/4))/(S(4)*a**(S(1)/4)*c**(S(5)/4)) - sqrt(S(2))*(sqrt(a)*d - sqrt(c)*e)*atan(S(1) + sqrt(S(2))*c**(S(1)/4)*x/a**(S(1)/4))/(S(4)*a**(S(1)/4)*c**(S(5)/4)) + sqrt(S(2))*(sqrt(a)*d + sqrt(c)*e)*log(-sqrt(S(2))*a**(S(1)/4)*c**(S(1)/4)*x + sqrt(a) + sqrt(c)*x**S(2))/(S(8)*a**(S(1)/4)*c**(S(5)/4)) - sqrt(S(2))*(sqrt(a)*d + sqrt(c)*e)*log(sqrt(S(2))*a**(S(1)/4)*c**(S(1)/4)*x + sqrt(a) + sqrt(c)*x**S(2))/(S(8)*a**(S(1)/4)*c**(S(5)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e/x**S(2))/(a/x**S(4) + b/x**S(2) + c), x), x, d*x/c - sqrt(S(2))*(b*d - c*e + (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(b*d - c*e - (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e/x**S(3))/(a/x**S(6) + c), x), x, d*x/c - (-sqrt(c)*e + d*sqrt(-a))*log(c**(S(1)/6)*x + (-a)**(S(1)/6))/(S(6)*c**(S(7)/6)*(-a)**(S(1)/3)) + (-sqrt(c)*e + d*sqrt(-a))*log(-c**(S(1)/6)*x*(-a)**(S(1)/6) + c**(S(1)/3)*x**S(2) + (-a)**(S(1)/3))/(S(12)*c**(S(7)/6)*(-a)**(S(1)/3)) + sqrt(S(3))*(-sqrt(c)*e + d*sqrt(-a))*atan(sqrt(S(3))*(-S(2)*c**(S(1)/6)*x/(-a)**(S(1)/6) + S(1))/S(3))/(S(6)*c**(S(7)/6)*(-a)**(S(1)/3)) + (sqrt(c)*e + d*sqrt(-a))*log(-c**(S(1)/6)*x + (-a)**(S(1)/6))/(S(6)*c**(S(7)/6)*(-a)**(S(1)/3)) - (sqrt(c)*e + d*sqrt(-a))*log(c**(S(1)/6)*x*(-a)**(S(1)/6) + c**(S(1)/3)*x**S(2) + (-a)**(S(1)/3))/(S(12)*c**(S(7)/6)*(-a)**(S(1)/3)) - sqrt(S(3))*(sqrt(c)*e + d*sqrt(-a))*atan(sqrt(S(3))*(S(2)*c**(S(1)/6)*x/(-a)**(S(1)/6) + S(1))/S(3))/(S(6)*c**(S(7)/6)*(-a)**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e/x**S(3))/(a/x**S(6) + b/x**S(3) + c), x), x, d*x/c - S(2)**(S(2)/3)*(b*d - c*e + (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(b*d - c*e + (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*(b*d - c*e + (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(4)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(b*d - c*e - (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(b*d - c*e - (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*sqrt(S(3))*(b*d - c*e - (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(4)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e/x**S(4))/(a/x**S(8) + c), x), x, d*x/c + sqrt(S(2))*(-sqrt(c)*e + d*sqrt(-a))*log(-sqrt(S(2))*c**(S(1)/8)*x*(-a)**(S(1)/8) + c**(S(1)/4)*x**S(2) + (-a)**(S(1)/4))/(S(16)*c**(S(9)/8)*(-a)**(S(3)/8)) - sqrt(S(2))*(-sqrt(c)*e + d*sqrt(-a))*log(sqrt(S(2))*c**(S(1)/8)*x*(-a)**(S(1)/8) + c**(S(1)/4)*x**S(2) + (-a)**(S(1)/4))/(S(16)*c**(S(9)/8)*(-a)**(S(3)/8)) - sqrt(S(2))*(-sqrt(c)*e + d*sqrt(-a))*atan(sqrt(S(2))*c**(S(1)/8)*x/(-a)**(S(1)/8) + S(-1))/(S(8)*c**(S(9)/8)*(-a)**(S(3)/8)) - sqrt(S(2))*(-sqrt(c)*e + d*sqrt(-a))*atan(sqrt(S(2))*c**(S(1)/8)*x/(-a)**(S(1)/8) + S(1))/(S(8)*c**(S(9)/8)*(-a)**(S(3)/8)) - (sqrt(c)*e + d*sqrt(-a))*atan(c**(S(1)/8)*x/(-a)**(S(1)/8))/(S(4)*c**(S(9)/8)*(-a)**(S(3)/8)) - (sqrt(c)*e + d*sqrt(-a))*atanh(c**(S(1)/8)*x/(-a)**(S(1)/8))/(S(4)*c**(S(9)/8)*(-a)**(S(3)/8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e/x**S(4))/(a/x**S(8) + b/x**S(4) + c), x), x, d*x/c + S(2)**(S(3)/4)*(b*d - c*e - (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b*d - c*e - (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b + sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b*d - c*e + (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*atan(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)) + S(2)**(S(3)/4)*(b*d - c*e + (-S(2)*a*c*d + b**S(2)*d - b*c*e)/sqrt(-S(4)*a*c + b**S(2)))*atanh(S(2)**(S(1)/4)*c**(S(1)/4)*x/(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/4))/(S(4)*c**(S(5)/4)*(-b - sqrt(-S(4)*a*c + b**S(2)))**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**S(3), x), x, d**S(3)*(f*x)**(m + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + S(1))/(S(2)*n), -p), (S(1) + (m + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(f*(m + S(1))) + S(3)*d**S(2)*e*x**(n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + n + S(1))/(S(2)*n), -p), ((m + S(3)*n + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(m + n + S(1)) + S(3)*d*e**S(2)*x**(S(2)*n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + S(2)*n + S(1))/(S(2)*n), -p), ((m + S(4)*n + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(m + S(2)*n + S(1)) + e**S(3)*x**(S(3)*n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + S(3)*n + S(1))/(S(2)*n), -p), ((m + S(5)*n + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(m + S(3)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(a + c*x**(S(2)*n))**p*(d + e*x**n)**S(2), x), x, d**S(2)*(f*x)**(m + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + S(1))/(S(2)*n), -p), (S(1) + (m + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(f*(m + S(1))) + S(2)*d*e*x**(n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + n + S(1))/(S(2)*n), -p), ((m + S(3)*n + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(m + n + S(1)) + e**S(2)*x**(S(2)*n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + S(2)*n + S(1))/(S(2)*n), -p), ((m + S(4)*n + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(m + S(2)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(a + c*x**(S(2)*n))**p*(d + e*x**n), x), x, d*(f*x)**(m + S(1))*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + S(1))/(S(2)*n), -p), (S(1) + (m + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(f*(m + S(1))) + e*x**(n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*hyper(((m + n + S(1))/(S(2)*n), -p), ((m + S(3)*n + S(1))/(S(2)*n),), -c*x**(S(2)*n)/a)/(m + n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))**S(13), x), x, (a + b*x + c*x**S(2))**S(14)/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(13), x), x, (a + b*x**S(2) + c*x**S(4))**S(14)/S(28), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))*(a + b*x**S(3) + c*x**S(6))**S(13), x), x, (a + b*x**S(3) + c*x**S(6))**S(14)/S(42), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**S(13), x), x, (a + b*x**n + c*x**(S(2)*n))**S(14)/(S(14)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(-a + b*x + c*x**S(2))**S(13), x), x, (-a + b*x + c*x**S(2))**S(14)/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))*(-a + b*x**S(2) + c*x**S(4))**S(13), x), x, (a - b*x**S(2) - c*x**S(4))**S(14)/S(28), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))*(-a + b*x**S(3) + c*x**S(6))**S(13), x), x, (a - b*x**S(3) - c*x**S(6))**S(14)/S(42), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)*(-a + b*x**n + c*x**(S(2)*n))**S(13), x), x, (a - b*x**n - c*x**(S(2)*n))**S(14)/(S(14)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(b*x + c*x**S(2))**S(13), x), x, (b*x + c*x**S(2))**S(14)/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))*(b*x**S(2) + c*x**S(4))**S(13), x), x, x**S(28)*(b + c*x**S(2))**S(14)/S(28), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))*(b*x**S(3) + c*x**S(6))**S(13), x), x, x**S(42)*(b + c*x**S(3))**S(14)/S(42), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)*(b*x**n + c*x**(S(2)*n))**S(13), x), x, x**(S(14)*n)*(b + c*x**n)**S(14)/(S(14)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)/(a + b*x + c*x**S(2)), x), x, log(a + b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, log(a + b*x**S(2) + c*x**S(4))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))/(a + b*x**S(3) + c*x**S(6)), x), x, log(a + b*x**S(3) + c*x**S(6))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)/(a + b*x**n + c*x**(S(2)*n)), x), x, log(a + b*x**n + c*x**(S(2)*n))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)/(a + b*x + c*x**S(2))**S(8), x), x, -S(1)/(S(7)*(a + b*x + c*x**S(2))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(8), x), x, -S(1)/(S(14)*(a + b*x**S(2) + c*x**S(4))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))/(a + b*x**S(3) + c*x**S(6))**S(8), x), x, -S(1)/(S(21)*(a + b*x**S(3) + c*x**S(6))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)/(a + b*x**n + c*x**(S(2)*n))**S(8), x), x, -S(1)/(S(7)*n*(a + b*x**n + c*x**(S(2)*n))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)/(-a + b*x + c*x**S(2)), x), x, log(a - b*x - c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))/(-a + b*x**S(2) + c*x**S(4)), x), x, log(a - b*x**S(2) - c*x**S(4))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))/(-a + b*x**S(3) + c*x**S(6)), x), x, log(a - b*x**S(3) - c*x**S(6))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)/(-a + b*x**n + c*x**(S(2)*n)), x), x, log(a - b*x**n - c*x**(S(2)*n))/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)/(-a + b*x + c*x**S(2))**S(8), x), x, -S(1)/(S(7)*(-a + b*x + c*x**S(2))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))/(-a + b*x**S(2) + c*x**S(4))**S(8), x), x, S(1)/(S(14)*(a - b*x**S(2) - c*x**S(4))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))/(-a + b*x**S(3) + c*x**S(6))**S(8), x), x, S(1)/(S(21)*(a - b*x**S(3) - c*x**S(6))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)/(-a + b*x**n + c*x**(S(2)*n))**S(8), x), x, S(1)/(S(7)*n*(a - b*x**n - c*x**(S(2)*n))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)/(b*x + c*x**S(2)), x), x, log(b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))/(b*x**S(2) + c*x**S(4)), x), x, log(x) + log(b + c*x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))/(b*x**S(3) + c*x**S(6)), x), x, log(x) + log(b + c*x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)/(b*x**n + c*x**(S(2)*n)), x), x, log(x) + log(b + c*x**n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)/(b*x + c*x**S(2))**S(8), x), x, -S(1)/(S(7)*(b*x + c*x**S(2))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))/(b*x**S(2) + c*x**S(4))**S(8), x), x, -S(1)/(S(14)*x**S(14)*(b + c*x**S(2))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))/(b*x**S(3) + c*x**S(6))**S(8), x), x, -S(1)/(S(21)*x**S(21)*(b + c*x**S(3))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)/(b*x**n + c*x**(S(2)*n))**S(8), x), x, -x**(-S(7)*n)/(S(7)*n*(b + c*x**n)**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(a + b*x + c*x**S(2))**p, x), x, (a + b*x + c*x**S(2))**(p + S(1))/(p + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))*(a + b*x**S(2) + c*x**S(4))**p, x), x, (a + b*x**S(2) + c*x**S(4))**(p + S(1))/(S(2)*p + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))*(a + b*x**S(3) + c*x**S(6))**p, x), x, (a + b*x**S(3) + c*x**S(6))**(p + S(1))/(S(3)*p + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, (a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(n*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(-a + b*x + c*x**S(2))**p, x), x, (-a + b*x + c*x**S(2))**(p + S(1))/(p + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))*(-a + b*x**S(2) + c*x**S(4))**p, x), x, (-a + b*x**S(2) + c*x**S(4))**(p + S(1))/(S(2)*p + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))*(-a + b*x**S(3) + c*x**S(6))**p, x), x, (-a + b*x**S(3) + c*x**S(6))**(p + S(1))/(S(3)*p + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)*(-a + b*x**n + c*x**(S(2)*n))**p, x), x, (-a + b*x**n + c*x**(S(2)*n))**(p + S(1))/(n*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(b*x + c*x**S(2))**p, x), x, (b*x + c*x**S(2))**(p + S(1))/(p + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(b + S(2)*c*x**S(2))*(b*x**S(2) + c*x**S(4))**p, x), x, (b*x**S(2) + c*x**S(4))**(p + S(1))/(S(2)*p + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(b + S(2)*c*x**S(3))*(b*x**S(3) + c*x**S(6))**p, x), x, (b*x**S(3) + c*x**S(6))**(p + S(1))/(S(3)*p + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))*(b + S(2)*c*x**n)*(b*x**n + c*x**(S(2)*n))**p, x), x, (b*x**n + c*x**(S(2)*n))**(p + S(1))/(n*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**n)/(a + b*x**n + c*x**(S(2)*n)), x), x, (f*x)**(m + S(1))*(e - (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))) + (f*x)**(m + S(1))*(e + (-b*e + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(f*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**n)/(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, -c*(f*x)**(m + S(1))*((-S(2)*a*e + b*d)*(m - n + S(1)) + (S(2)*a*b*e*n + S(4)*a*c*d*(m - S(2)*n + S(1)) - b**S(2)*d*(m - n + S(1)))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*f*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))) - c*(f*x)**(m + S(1))*((-S(2)*a*e + b*d)*(m - n + S(1)) - (S(2)*a*b*e*n + S(4)*a*c*d*(m - S(2)*n + S(1)) - b**S(2)*d*(m - n + S(1)))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*f*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))) + (f*x)**(m + S(1))*(-a*b*e - S(2)*a*c*d + b**S(2)*d + c*x**n*(-S(2)*a*e + b*d))/(a*f*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) # large time assert rubi_test(rubi_integrate((d + e*x**n)**q/(x*(a + b*x**n + c*x**(S(2)*n))), x), x, c*(d + e*x**n)**(q + S(1))*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**n)/(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2)))))/(a*n*(q + S(1))*(S(2)*c*d - e*(b + sqrt(-S(4)*a*c + b**S(2))))) + c*(d + e*x**n)**(q + S(1))*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(2)*c*(d + e*x**n)/(-b*e + S(2)*c*d + e*sqrt(-S(4)*a*c + b**S(2))))/(a*n*(q + S(1))*(S(2)*c*d - e*(b - sqrt(-S(4)*a*c + b**S(2))))) - (d + e*x**n)**(q + S(1))*hyper((S(1), q + S(1)), (q + S(2),), S(1) + e*x**n/d)/(a*d*n*(q + S(1))), expand=True, _diff=True, _numerical=True) # Apart assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**n)/(a + b*x**n + c*x**(S(2)*n))**S(3), x), x, (f*x)**(m + S(1))*(-a*b*e - S(2)*a*c*d + b**S(2)*d + c*x**n*(-S(2)*a*e + b*d))/(S(2)*a*f*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))**S(2)) - c*(f*x)**(m + S(1))*((m - n + S(1))*(-S(4)*a**S(2)*c*e*(m - S(3)*n + S(1)) + a*b**S(2)*e*(m + S(1)) + S(2)*a*b*c*d*(S(2)*m - S(7)*n + S(2)) - b**S(3)*d*(m - S(2)*n + S(1))) - (-S(4)*a**S(2)*b*c*e*(m**S(2) + m*(-n + S(2)) - S(3)*n**S(2) - n + S(1)) - S(8)*a**S(2)*c**S(2)*d*(m**S(2) + m*(-S(6)*n + S(2)) + S(8)*n**S(2) - S(6)*n + S(1)) + a*b**S(3)*e*(m + S(1))*(m - n + S(1)) + S(6)*a*b**S(2)*c*d*(m**S(2) + m*(-S(4)*n + S(2)) + S(3)*n**S(2) - S(4)*n + S(1)) - b**S(4)*d*(m**S(2) + m*(-S(3)*n + S(2)) + S(2)*n**S(2) - S(3)*n + S(1)))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*f*n**S(2)*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**S(2)) - c*(f*x)**(m + S(1))*((m - n + S(1))*(-S(4)*a**S(2)*c*e*(m - S(3)*n + S(1)) + a*b**S(2)*e*(m + S(1)) + S(2)*a*b*c*d*(S(2)*m - S(7)*n + S(2)) - b**S(3)*d*(m - S(2)*n + S(1))) + (-S(4)*a**S(2)*b*c*e*(m**S(2) + m*(-n + S(2)) - S(3)*n**S(2) - n + S(1)) - S(8)*a**S(2)*c**S(2)*d*(m**S(2) + m*(-S(6)*n + S(2)) + S(8)*n**S(2) - S(6)*n + S(1)) + a*b**S(3)*e*(m + S(1))*(m - n + S(1)) + S(6)*a*b**S(2)*c*d*(m**S(2) + m*(-S(4)*n + S(2)) + S(3)*n**S(2) - S(4)*n + S(1)) - b**S(4)*d*(m**S(2) + m*(-S(3)*n + S(2)) + S(2)*n**S(2) - S(3)*n + S(1)))/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a**S(2)*f*n**S(2)*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**S(2)) + (f*x)**(m + S(1))*(a*b*c*(-S(2)*a*e + b*d)*(m - S(3)*n + S(1)) + c*x**n*(-S(4)*a**S(2)*c*e*(m - S(3)*n + S(1)) + a*b**S(2)*e*(m + S(1)) + S(2)*a*b*c*d*(S(2)*m - S(7)*n + S(2)) - b**S(3)*d*(m - S(2)*n + S(1))) + (-S(2)*a*c + b**S(2))*(a*b*e*(m + S(1)) + S(2)*a*c*d*(m - S(4)*n + S(1)) - b**S(2)*d*(m - S(2)*n + S(1))))/(S(2)*a**S(2)*f*n**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c**(S(1)/3) - S(2)*d**(S(1)/3)*x**(S(1)/3))/(-c**(S(2)/3)*d**(S(2)/3)*x + c**(S(1)/3)*d*x**(S(4)/3) + c*d**(S(1)/3)*x**(S(2)/3)), x), x, -S(3)*log(c**(S(2)/3) - c**(S(1)/3)*d**(S(1)/3)*x**(S(1)/3) + d**(S(2)/3)*x**(S(2)/3))/(c**(S(1)/3)*d**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, -c*(d - e*x)**(S(9)/2)*(d + e*x)**(S(9)/2)/(S(9)*e**S(10)) - d**S(4)*sqrt(d - e*x)*sqrt(d + e*x)*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))/e**S(10) + d**S(2)*(d - e*x)**(S(3)/2)*(d + e*x)**(S(3)/2)*(S(2)*a*e**S(4) + S(3)*b*d**S(2)*e**S(2) + S(4)*c*d**S(4))/(S(3)*e**S(10)) + (d - e*x)**(S(7)/2)*(d + e*x)**(S(7)/2)*(b*e**S(2) + S(4)*c*d**S(2))/(S(7)*e**S(10)) - (d - e*x)**(S(5)/2)*(d + e*x)**(S(5)/2)*(a*e**S(4) + S(3)*b*d**S(2)*e**S(2) + S(6)*c*d**S(4))/(S(5)*e**S(10)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(5)*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, -c*(d**S(2) - e**S(2)*x**S(2))**S(5)/(S(9)*e**S(10)*sqrt(d - e*x)*sqrt(d + e*x)) - d**S(4)*(d**S(2) - e**S(2)*x**S(2))*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))/(e**S(10)*sqrt(d - e*x)*sqrt(d + e*x)) + d**S(2)*(d**S(2) - e**S(2)*x**S(2))**S(2)*(S(2)*a*e**S(4) + S(3)*b*d**S(2)*e**S(2) + S(4)*c*d**S(4))/(S(3)*e**S(10)*sqrt(d - e*x)*sqrt(d + e*x)) + (d**S(2) - e**S(2)*x**S(2))**S(4)*(b*e**S(2) + S(4)*c*d**S(2))/(S(7)*e**S(10)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))**S(3)*(a*e**S(4) + S(3)*b*d**S(2)*e**S(2) + S(6)*c*d**S(4))/(S(5)*e**S(10)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, c*(d - e*x)**(S(7)/2)*(d + e*x)**(S(7)/2)/(S(7)*e**S(8)) - d**S(2)*sqrt(d - e*x)*sqrt(d + e*x)*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))/e**S(8) - (d - e*x)**(S(5)/2)*(d + e*x)**(S(5)/2)*(b*e**S(2) + S(3)*c*d**S(2))/(S(5)*e**S(8)) + (d - e*x)**(S(3)/2)*(d + e*x)**(S(3)/2)*(a*e**S(4) + S(2)*b*d**S(2)*e**S(2) + S(3)*c*d**S(4))/(S(3)*e**S(8)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, c*(d**S(2) - e**S(2)*x**S(2))**S(4)/(S(7)*e**S(8)*sqrt(d - e*x)*sqrt(d + e*x)) - d**S(2)*(d**S(2) - e**S(2)*x**S(2))*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))/(e**S(8)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))**S(3)*(b*e**S(2) + S(3)*c*d**S(2))/(S(5)*e**S(8)*sqrt(d - e*x)*sqrt(d + e*x)) + (d**S(2) - e**S(2)*x**S(2))**S(2)*(a*e**S(4) + S(2)*b*d**S(2)*e**S(2) + S(3)*c*d**S(4))/(S(3)*e**S(8)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, -c*(d - e*x)**(S(5)/2)*(d + e*x)**(S(5)/2)/(S(5)*e**S(6)) + (d - e*x)**(S(3)/2)*(d + e*x)**(S(3)/2)*(b*e**S(2) + S(2)*c*d**S(2))/(S(3)*e**S(6)) - sqrt(d - e*x)*sqrt(d + e*x)*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))/e**S(6), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, -c*(d**S(2) - e**S(2)*x**S(2))**S(3)/(S(5)*e**S(6)*sqrt(d - e*x)*sqrt(d + e*x)) + (d**S(2) - e**S(2)*x**S(2))**S(2)*(b*e**S(2) + S(2)*c*d**S(2))/(S(3)*e**S(6)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))/(e**S(6)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*atanh(sqrt(d - e*x)*sqrt(d + e*x)/d)/d + c*(d - e*x)**(S(3)/2)*(d + e*x)**(S(3)/2)/(S(3)*e**S(4)) - sqrt(d - e*x)*sqrt(d + e*x)*(b*e**S(2) + c*d**S(2))/e**S(4), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*sqrt(d**S(2) - e**S(2)*x**S(2))*atanh(sqrt(d**S(2) - e**S(2)*x**S(2))/d)/(d*sqrt(d - e*x)*sqrt(d + e*x)) + c*(d**S(2) - e**S(2)*x**S(2))**S(2)/(S(3)*e**S(4)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))*(b*e**S(2) + c*d**S(2))/(e**S(4)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(3)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*sqrt(d - e*x)*sqrt(d + e*x)/(S(2)*d**S(2)*x**S(2)) - c*sqrt(d - e*x)*sqrt(d + e*x)/e**S(2) - (a*e**S(2) + S(2)*b*d**S(2))*atanh(sqrt(d - e*x)*sqrt(d + e*x)/d)/(S(2)*d**S(3)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(3)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*(d**S(2) - e**S(2)*x**S(2))/(S(2)*d**S(2)*x**S(2)*sqrt(d - e*x)*sqrt(d + e*x)) - c*(d**S(2) - e**S(2)*x**S(2))/(e**S(2)*sqrt(d - e*x)*sqrt(d + e*x)) - sqrt(d**S(2) - e**S(2)*x**S(2))*(a*e**S(2) + S(2)*b*d**S(2))*atanh(sqrt(d**S(2) - e**S(2)*x**S(2))/d)/(S(2)*d**S(3)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(5)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*sqrt(d - e*x)*sqrt(d + e*x)/(S(4)*d**S(2)*x**S(4)) - sqrt(d - e*x)*sqrt(d + e*x)*(S(3)*a*e**S(2) + S(4)*b*d**S(2))/(S(8)*d**S(4)*x**S(2)) - (S(3)*a*e**S(4) + S(4)*b*d**S(2)*e**S(2) + S(8)*c*d**S(4))*atanh(sqrt(d - e*x)*sqrt(d + e*x)/d)/(S(8)*d**S(5)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(5)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*(d**S(2) - e**S(2)*x**S(2))/(S(4)*d**S(2)*x**S(4)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))*(S(3)*a*e**S(2) + S(4)*b*d**S(2))/(S(8)*d**S(4)*x**S(2)*sqrt(d - e*x)*sqrt(d + e*x)) - sqrt(d**S(2) - e**S(2)*x**S(2))*(S(3)*a*e**S(4) + S(4)*b*d**S(2)*e**S(2) + S(8)*c*d**S(4))*atanh(sqrt(d**S(2) - e**S(2)*x**S(2))/d)/(S(8)*d**S(5)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(7)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*sqrt(d - e*x)*sqrt(d + e*x)/(S(6)*d**S(2)*x**S(6)) - sqrt(d - e*x)*sqrt(d + e*x)*(S(5)*a*e**S(2) + S(6)*b*d**S(2))/(S(24)*d**S(4)*x**S(4)) - sqrt(d - e*x)*sqrt(d + e*x)*(S(5)*a*e**S(4) + S(6)*b*d**S(2)*e**S(2) + S(8)*c*d**S(4))/(S(16)*d**S(6)*x**S(2)) - e**S(2)*sqrt(d**S(2) - e**S(2)*x**S(2))*(S(5)*a*e**S(4) + S(6)*b*d**S(2)*e**S(2) + S(8)*c*d**S(4))*atanh(sqrt(d**S(2) - e**S(2)*x**S(2))/d)/(S(16)*d**S(7)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(7)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*(d**S(2) - e**S(2)*x**S(2))/(S(6)*d**S(2)*x**S(6)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))*(S(5)*a*e**S(2) + S(6)*b*d**S(2))/(S(24)*d**S(4)*x**S(4)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))*(S(5)*a*e**S(4) + S(6)*b*d**S(2)*e**S(2) + S(8)*c*d**S(4))/(S(16)*d**S(6)*x**S(2)*sqrt(d - e*x)*sqrt(d + e*x)) - e**S(2)*sqrt(d**S(2) - e**S(2)*x**S(2))*(S(5)*a*e**S(4) + S(6)*b*d**S(2)*e**S(2) + S(8)*c*d**S(4))*atanh(sqrt(d**S(2) - e**S(2)*x**S(2))/d)/(S(16)*d**S(7)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, c*x**S(7)*(-d + e*x)*sqrt(d + e*x)/(S(8)*e**S(2)*sqrt(d - e*x)) + d**S(4)*sqrt(d**S(2) - e**S(2)*x**S(2))*(S(48)*a*e**S(4) + S(40)*b*d**S(2)*e**S(2) + S(35)*c*d**S(4))*atan(e*x/sqrt(d**S(2) - e**S(2)*x**S(2)))/(S(128)*e**S(9)*sqrt(d - e*x)*sqrt(d + e*x)) - d**S(2)*x*sqrt(d - e*x)*sqrt(d + e*x)*(S(48)*a*e**S(4) + S(40)*b*d**S(2)*e**S(2) + S(35)*c*d**S(4))/(S(128)*e**S(8)) - x**S(5)*sqrt(d - e*x)*sqrt(d + e*x)*(S(8)*b*e**S(2) + S(7)*c*d**S(2))/(S(48)*e**S(4)) - x**S(3)*sqrt(d - e*x)*sqrt(d + e*x)*(S(48)*a*e**S(4) + S(40)*b*d**S(2)*e**S(2) + S(35)*c*d**S(4))/(S(192)*e**S(6)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, -c*x**S(7)*(d**S(2) - e**S(2)*x**S(2))/(S(8)*e**S(2)*sqrt(d - e*x)*sqrt(d + e*x)) + d**S(4)*sqrt(d**S(2) - e**S(2)*x**S(2))*(S(48)*a*e**S(4) + S(40)*b*d**S(2)*e**S(2) + S(35)*c*d**S(4))*atan(e*x/sqrt(d**S(2) - e**S(2)*x**S(2)))/(S(128)*e**S(9)*sqrt(d - e*x)*sqrt(d + e*x)) - d**S(2)*x*(d**S(2) - e**S(2)*x**S(2))*(S(48)*a*e**S(4) + S(40)*b*d**S(2)*e**S(2) + S(35)*c*d**S(4))/(S(128)*e**S(8)*sqrt(d - e*x)*sqrt(d + e*x)) - x**S(5)*(d**S(2) - e**S(2)*x**S(2))*(S(8)*b*e**S(2) + S(7)*c*d**S(2))/(S(48)*e**S(4)*sqrt(d - e*x)*sqrt(d + e*x)) - x**S(3)*(d**S(2) - e**S(2)*x**S(2))*(S(48)*a*e**S(4) + S(40)*b*d**S(2)*e**S(2) + S(35)*c*d**S(4))/(S(192)*e**S(6)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, c*x**S(5)*(-d + e*x)*sqrt(d + e*x)/(S(6)*e**S(2)*sqrt(d - e*x)) + d**S(2)*sqrt(d**S(2) - e**S(2)*x**S(2))*(S(8)*a*e**S(4) + S(6)*b*d**S(2)*e**S(2) + S(5)*c*d**S(4))*atan(e*x/sqrt(d**S(2) - e**S(2)*x**S(2)))/(S(16)*e**S(7)*sqrt(d - e*x)*sqrt(d + e*x)) - x**S(3)*sqrt(d - e*x)*sqrt(d + e*x)*(S(6)*b*e**S(2) + S(5)*c*d**S(2))/(S(24)*e**S(4)) - x*sqrt(d - e*x)*sqrt(d + e*x)*(S(8)*a*e**S(4) + S(6)*b*d**S(2)*e**S(2) + S(5)*c*d**S(4))/(S(16)*e**S(6)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, -c*x**S(5)*(d**S(2) - e**S(2)*x**S(2))/(S(6)*e**S(2)*sqrt(d - e*x)*sqrt(d + e*x)) + d**S(2)*sqrt(d**S(2) - e**S(2)*x**S(2))*(S(8)*a*e**S(4) + S(6)*b*d**S(2)*e**S(2) + S(5)*c*d**S(4))*atan(e*x/sqrt(d**S(2) - e**S(2)*x**S(2)))/(S(16)*e**S(7)*sqrt(d - e*x)*sqrt(d + e*x)) - x**S(3)*(d**S(2) - e**S(2)*x**S(2))*(S(6)*b*e**S(2) + S(5)*c*d**S(2))/(S(24)*e**S(4)*sqrt(d - e*x)*sqrt(d + e*x)) - x*(d**S(2) - e**S(2)*x**S(2))*(S(8)*a*e**S(4) + S(6)*b*d**S(2)*e**S(2) + S(5)*c*d**S(4))/(S(16)*e**S(6)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, c*x**S(3)*(-d + e*x)*sqrt(d + e*x)/(S(4)*e**S(2)*sqrt(d - e*x)) - x*sqrt(d - e*x)*sqrt(d + e*x)*(S(4)*b*e**S(2) + S(3)*c*d**S(2))/(S(8)*e**S(4)) - (S(8)*a*e**S(4) + S(4)*b*d**S(2)*e**S(2) + S(3)*c*d**S(4))*atan(sqrt(d - e*x)/sqrt(d + e*x))/(S(4)*e**S(5)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(sqrt(d - e*x)*sqrt(d + e*x)), x), x, -c*x**S(3)*(d**S(2) - e**S(2)*x**S(2))/(S(4)*e**S(2)*sqrt(d - e*x)*sqrt(d + e*x)) - x*(d**S(2) - e**S(2)*x**S(2))*(S(4)*b*e**S(2) + S(3)*c*d**S(2))/(S(8)*e**S(4)*sqrt(d - e*x)*sqrt(d + e*x)) + sqrt(d**S(2) - e**S(2)*x**S(2))*(S(8)*a*e**S(4) + S(4)*b*d**S(2)*e**S(2) + S(3)*c*d**S(4))*atan(e*x/sqrt(d**S(2) - e**S(2)*x**S(2)))/(S(8)*e**S(5)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(2)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*sqrt(d - e*x)*sqrt(d + e*x)/(d**S(2)*x) + c*x*(-d + e*x)*sqrt(d + e*x)/(S(2)*e**S(2)*sqrt(d - e*x)) - (S(2)*b*e**S(2) + c*d**S(2))*atan(sqrt(d - e*x)/sqrt(d + e*x))/e**S(3), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(2)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*(d**S(2) - e**S(2)*x**S(2))/(d**S(2)*x*sqrt(d - e*x)*sqrt(d + e*x)) - c*x*(d**S(2) - e**S(2)*x**S(2))/(S(2)*e**S(2)*sqrt(d - e*x)*sqrt(d + e*x)) + sqrt(d**S(2) - e**S(2)*x**S(2))*(S(2)*b*e**S(2) + c*d**S(2))*atan(e*x/sqrt(d**S(2) - e**S(2)*x**S(2)))/(S(2)*e**S(3)*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(4)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*sqrt(d - e*x)*sqrt(d + e*x)/(S(3)*d**S(2)*x**S(3)) - S(2)*a*e**S(2)*sqrt(d - e*x)*sqrt(d + e*x)/(S(3)*d**S(4)*x) - b*sqrt(d - e*x)*sqrt(d + e*x)/(d**S(2)*x) + c*sqrt(d**S(2) - e**S(2)*x**S(2))*atan(e*x/sqrt(d**S(2) - e**S(2)*x**S(2)))/(e*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(4)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*(d**S(2) - e**S(2)*x**S(2))/(S(3)*d**S(2)*x**S(3)*sqrt(d - e*x)*sqrt(d + e*x)) - S(2)*a*e**S(2)*(d**S(2) - e**S(2)*x**S(2))/(S(3)*d**S(4)*x*sqrt(d - e*x)*sqrt(d + e*x)) - b*(d**S(2) - e**S(2)*x**S(2))/(d**S(2)*x*sqrt(d - e*x)*sqrt(d + e*x)) + c*sqrt(d**S(2) - e**S(2)*x**S(2))*atan(e*x/sqrt(d**S(2) - e**S(2)*x**S(2)))/(e*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(6)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*sqrt(d - e*x)*sqrt(d + e*x)/(S(5)*d**S(2)*x**S(5)) - c*(-d + e*x)*sqrt(d + e*x)/(S(2)*e**S(2)*x**S(3)*sqrt(d - e*x)) - sqrt(d - e*x)*sqrt(d + e*x)*(S(8)*a*e**S(4) + S(10)*b*d**S(2)*e**S(2) + S(15)*c*d**S(4))/(S(30)*d**S(4)*e**S(2)*x**S(3)) - sqrt(d - e*x)*sqrt(d + e*x)*(S(8)*a*e**S(4) + S(10)*b*d**S(2)*e**S(2) + S(15)*c*d**S(4))/(S(15)*d**S(6)*x), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))/(x**S(6)*sqrt(d - e*x)*sqrt(d + e*x)), x), x, -a*(d**S(2) - e**S(2)*x**S(2))/(S(5)*d**S(2)*x**S(5)*sqrt(d - e*x)*sqrt(d + e*x)) + c*(d**S(2) - e**S(2)*x**S(2))/(S(2)*e**S(2)*x**S(3)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))*(S(8)*a*e**S(4) + S(10)*b*d**S(2)*e**S(2) + S(15)*c*d**S(4))/(S(30)*d**S(4)*e**S(2)*x**S(3)*sqrt(d - e*x)*sqrt(d + e*x)) - (d**S(2) - e**S(2)*x**S(2))*(S(8)*a*e**S(4) + S(10)*b*d**S(2)*e**S(2) + S(15)*c*d**S(4))/(S(15)*d**S(6)*x*sqrt(d - e*x)*sqrt(d + e*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(a + c*x**(S(2)*n))**p/(d + e*x**n), x), x, x*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + S(1))/(S(2)*n), -p, S(1), S(1) + (m + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d*(m + S(1))) - e*x**(n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + n + S(1))/(S(2)*n), -p, S(1), (m + S(3)*n + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(2)*(m + n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(a + c*x**(S(2)*n))**p/(d + e*x**n)**S(2), x), x, x*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + S(1))/(S(2)*n), -p, S(2), S(1) + (m + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(2)*(m + S(1))) - S(2)*e*x**(n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + n + S(1))/(S(2)*n), -p, S(2), (m + S(3)*n + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(3)*(m + n + S(1))) + e**S(2)*x**(S(2)*n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + S(2)*n + S(1))/(S(2)*n), -p, S(2), (m + S(4)*n + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(4)*(m + S(2)*n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(a + c*x**(S(2)*n))**p/(d + e*x**n)**S(3), x), x, x*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + S(1))/(S(2)*n), -p, S(3), S(1) + (m + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(3)*(m + S(1))) - S(3)*e*x**(n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + n + S(1))/(S(2)*n), -p, S(3), (m + S(3)*n + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(4)*(m + n + S(1))) + S(3)*e**S(2)*x**(S(2)*n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + S(2)*n + S(1))/(S(2)*n), -p, S(3), (m + S(4)*n + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(5)*(m + S(2)*n + S(1))) - e**S(3)*x**(S(3)*n + S(1))*(f*x)**m*(S(1) + c*x**(S(2)*n)/a)**(-p)*(a + c*x**(S(2)*n))**p*AppellF1((m + S(3)*n + S(1))/(S(2)*n), -p, S(3), (m + S(5)*n + S(1))/(S(2)*n), -c*x**(S(2)*n)/a, e**S(2)*x**(S(2)*n)/d**S(2))/(d**S(6)*(m + S(3)*n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**n)**S(2)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, d**S(2)*(f*x)**(m + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1((m + S(1))/n, -p, -p, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*(m + S(1))) + S(2)*d*e*x**(n + S(1))*(f*x)**m*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1((m + n + S(1))/n, -p, -p, (m + S(2)*n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(m + n + S(1)) + e**S(2)*x**(S(2)*n + S(1))*(f*x)**m*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1((m + S(2)*n + S(1))/n, -p, -p, (m + S(3)*n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(m + S(2)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**n)*(a + b*x**n + c*x**(S(2)*n))**p, x), x, d*(f*x)**(m + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1((m + S(1))/n, -p, -p, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*(m + S(1))) + e*x**(n + S(1))*(f*x)**m*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1((m + n + S(1))/n, -p, -p, (m + S(2)*n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(m + n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(a + b*x**n + c*x**(S(2)*n))**p, x), x, (f*x)**(m + S(1))*(S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))**(-p)*(a + b*x**n + c*x**(S(2)*n))**p*AppellF1((m + S(1))/n, -p, -p, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(f*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((f*x)**m*(d + e*x**n)**q/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*(f*x)**(m + S(1))*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1((m + S(1))/n, S(1), -q, (m + n + S(1))/n, -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(f*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*c*(f*x)**(m + S(1))*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1((m + S(1))/n, S(1), -q, (m + n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(f*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(d + e*x**n)**q/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*x**S(3)*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(S(3)/n, S(1), -q, (n + S(3))/n, -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(-S(12)*a*c + S(3)*b**S(2) + S(3)*b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*x**S(3)*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(S(3)/n, S(1), -q, (n + S(3))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(-S(12)*a*c + S(3)*b**S(2) - S(3)*b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**n)**q/(a + b*x**n + c*x**(S(2)*n)), x), x, -c*x**S(2)*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(S(2)/n, S(1), -q, (n + S(2))/n, -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - c*x**S(2)*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(S(2)/n, S(1), -q, (n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**q/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*x*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(S(1)/n, S(1), -q, S(1) + S(1)/n, -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*x*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(S(1)/n, S(1), -q, S(1) + S(1)/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**q/(x**S(2)*(a + b*x**n + c*x**(S(2)*n))), x), x, S(2)*c*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(-S(1)/n, S(1), -q, -(-n + S(1))/n, -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(x*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) + S(2)*c*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(-S(1)/n, S(1), -q, -(-n + S(1))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(x*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x**n)**q/(x**S(3)*(a + b*x**n + c*x**(S(2)*n))), x), x, c*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(-S(2)/n, S(1), -q, -(-n + S(2))/n, -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(x**S(2)*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) + c*(S(1) + e*x**n/d)**(-q)*(d + e*x**n)**q*AppellF1(-S(2)/n, S(1), -q, -(-n + S(2))/n, -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))), -e*x**n/d)/(x**S(2)*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) def test_4(): assert rubi_test(rubi_integrate((x**S(3) + x**S(2))/(x**S(2) + x + S(-2)), x), x, x**S(2)/S(2) + S(2)*log(-x + S(1))/S(3) + S(4)*log(x + S(2))/S(3), expand=True, _diff=True, _numerical=True) # Large time assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + j*x**S(5) + k*x**S(6) + l*x**S(7) + m*x**S(8))/(a + b*x + c*x**S(2)), x), x, m*x**S(7)/(S(7)*c) + x**S(6)*(-b*m + c*l)/(S(6)*c**S(2)) + x**S(5)*(b**S(2)*m + c**S(2)*k - c*(a*m + b*l))/(S(5)*c**S(3)) + x**S(4)*(-b**S(3)*m + b*c*(S(2)*a*m + b*l) + c**S(3)*j - c**S(2)*(a*l + b*k))/(S(4)*c**S(4)) + x**S(3)*(b**S(4)*m - b**S(2)*c*(S(3)*a*m + b*l) + c**S(4)*h - c**S(3)*(a*k + b*j) + c**S(2)*(a**S(2)*m + S(2)*a*b*l + b**S(2)*k))/(S(3)*c**S(5)) + x**S(2)*(-b**S(5)*m + b**S(3)*c*(S(4)*a*m + b*l) - b*c**S(2)*(S(3)*a**S(2)*m + S(3)*a*b*l + b**S(2)*k) + c**S(5)*g - c**S(4)*(a*j + b*h) + c**S(3)*(a**S(2)*l + S(2)*a*b*k + b**S(2)*j))/(S(2)*c**S(6)) + x*(b**S(6)*m - b**S(4)*c*(S(5)*a*m + b*l) + b**S(2)*c**S(2)*(S(6)*a**S(2)*m + S(4)*a*b*l + b**S(2)*k) + c**S(6)*f - c**S(5)*(a*h + b*g) + c**S(4)*(a**S(2)*k + S(2)*a*b*j + b**S(2)*h) - c**S(3)*(a**S(3)*m + S(3)*a**S(2)*b*l + S(3)*a*b**S(2)*k + b**S(3)*j))/c**S(7) + (-b**S(7)*m + b**S(5)*c*(S(6)*a*m + b*l) - b**S(3)*c**S(2)*(S(10)*a**S(2)*m + S(5)*a*b*l + b**S(2)*k) + b*c**S(3)*(S(4)*a**S(3)*m + S(6)*a**S(2)*b*l + S(4)*a*b**S(2)*k + b**S(3)*j) + c**S(7)*e - c**S(6)*(a*g + b*f) + c**S(5)*(a**S(2)*j + S(2)*a*b*h + b**S(2)*g) - c**S(4)*(a**S(3)*l + S(3)*a**S(2)*b*k + S(3)*a*b**S(2)*j + b**S(3)*h))*log(a + b*x + c*x**S(2))/(S(2)*c**S(8)) - (b**S(8)*m - b**S(6)*c*(S(8)*a*m + b*l) + b**S(4)*c**S(2)*(S(20)*a**S(2)*m + S(7)*a*b*l + b**S(2)*k) - b**S(2)*c**S(3)*(S(16)*a**S(3)*m + S(14)*a**S(2)*b*l + S(6)*a*b**S(2)*k + b**S(3)*j) + S(2)*c**S(8)*d - c**S(7)*(S(2)*a*f + b*e) + c**S(6)*(S(2)*a**S(2)*h + S(3)*a*b*g + b**S(2)*f) - c**S(5)*(S(2)*a**S(3)*k + S(5)*a**S(2)*b*j + S(4)*a*b**S(2)*h + b**S(3)*g) + c**S(4)*(S(2)*a**S(4)*m + S(7)*a**S(3)*b*l + S(9)*a**S(2)*b**S(2)*k + S(5)*a*b**S(3)*j + b**S(4)*h))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(8)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(a + b*x + c*x**S(2))**S(2), x), x, g*log(a + b*x + c*x**S(2))/(S(2)*c**S(2)) - (-a*b**S(2)*g - S(2)*a*c*(-a*g + c*e) + b*c*(a*f + c*d) + x*(-b**S(3)*g + b*c*(S(3)*a*g + b*f) + S(2)*c**S(3)*d - c**S(2)*(S(2)*a*f + b*e)))/(c**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + (-S(6)*a*b*c*g + b**S(3)*g + S(4)*c**S(3)*d - c**S(2)*(-S(4)*a*f + S(2)*b*e))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(a + b*x + c*x**S(2))**S(3), x), x, -x**S(3)*(-S(5)*b*i + S(2)*c*h)/(S(2)*c**S(2)*(a + b*x + c*x**S(2))**S(2)) + i*log(a + b*x + c*x**S(2))/(S(2)*c**S(3)) - x**S(2)*(-S(4)*a*c*i - S(9)*b**S(2)*i + S(2)*b*c*h + S(2)*c**S(2)*g)/(S(4)*c**S(3)*(a + b*x + c*x**S(2))**S(2)) - (-S(30)*a**S(2)*b*c**S(2)*i + S(10)*a*b**S(3)*c*i - b**S(5)*i + S(12)*c**S(5)*d - c**S(4)*(-S(4)*a*f + S(6)*b*e) + S(2)*c**S(3)*(S(6)*a**S(2)*h - S(3)*a*b*g + b**S(2)*f))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)) + (b + S(2)*c*x)*(-S(30)*a**S(2)*b*c**S(2)*i + S(10)*a*b**S(3)*c*i - b**S(5)*i + S(12)*c**S(5)*d - c**S(4)*(-S(4)*a*f + S(6)*b*e) + S(2)*c**S(3)*(S(6)*a**S(2)*h - S(3)*a*b*g + b**S(2)*f))/(S(4)*c**S(4)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x + c*x**S(2))) - (c**S(3)*(-a*b**S(4)*i/c**S(3) - S(4)*a*(-S(3)*a**S(2)*i/c + a*g + c*e) + S(2)*b*(a**S(2)*h/c + a*f + c*d)) + x*(-S(8)*a*b**S(3)*c*i + S(2)*a*b*c**S(2)*(S(23)*a*i + S(2)*b*h) - b**S(5)*i + S(4)*c**S(5)*d - S(2)*c**S(4)*(S(2)*a*f + b*e) + S(2)*c**S(3)*(-S(6)*a**S(2)*h - a*b*g + b**S(2)*f)))/(S(4)*c**S(4)*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(a + b*x + c*x**S(2))**(S(5)/2), x), x, -x**S(2)*(-S(2)*b*h + c*g)/(c**S(2)*(a + b*x + c*x**S(2))**(S(3)/2)) + (b + S(2)*c*x)*(-S(4)*b**S(4)*h + b**S(2)*c*(S(28)*a*h + b*g) + S(16)*c**S(4)*d - c**S(3)*(-S(8)*a*f + S(8)*b*e) + S(2)*c**S(2)*(-S(16)*a**S(2)*h - S(6)*a*b*g + b**S(2)*f))/(S(3)*c**S(3)*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x + c*x**S(2))) - (c**S(2)*(-S(4)*a*b**S(3)*h/c**S(2) + a*b**S(2)*g/c - S(4)*a*(S(2)*a*g + c*e) + S(2)*b*(S(9)*a**S(2)*h/c + a*f + c*d)) + x*(-S(4)*b**S(4)*h + b**S(2)*c*(S(16)*a*h + b*g) + S(4)*c**S(4)*d - S(2)*c**S(3)*(S(2)*a*f + b*e) + S(2)*c**S(2)*(S(2)*a**S(2)*h - S(3)*a*b*g + b**S(2)*f)))/(S(3)*c**S(3)*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))**(S(3)/2)) + h*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/c**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(a + b*x - c*x**S(2))**(S(5)/2), x), x, x**S(2)*(S(2)*b*h + c*g)/(c**S(2)*(a + b*x - c*x**S(2))**(S(3)/2)) - (b - S(2)*c*x)*(-S(4)*b**S(4)*h - b**S(2)*c*(S(28)*a*h + b*g) + S(16)*c**S(4)*d + S(8)*c**S(3)*(-a*f + b*e) + S(2)*c**S(2)*(-S(16)*a**S(2)*h - S(6)*a*b*g + b**S(2)*f))/(S(3)*c**S(3)*(S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x - c*x**S(2))) - (c**S(2)*(S(4)*a*b**S(3)*h/c**S(2) + a*b**S(2)*g/c - S(4)*a*(-S(2)*a*g + c*e) + S(2)*b*(S(9)*a**S(2)*h/c - a*f + c*d)) - x*(-S(4)*b**S(4)*h - b**S(2)*c*(S(16)*a*h + b*g) + S(4)*c**S(4)*d + S(2)*c**S(3)*(S(2)*a*f + b*e) + S(2)*c**S(2)*(S(2)*a**S(2)*h - S(3)*a*b*g + b**S(2)*f)))/(S(3)*c**S(3)*(S(4)*a*c + b**S(2))*(a + b*x - c*x**S(2))**(S(3)/2)) - h*atan((b - S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x - c*x**S(2))))/c**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*(a + b*x**S(2) + c*x**S(4)), x), x, a*d*x + a*e*x**S(2)/S(2) + b*d*x**S(3)/S(3) + b*e*x**S(4)/S(4) + c*d*x**S(5)/S(5) + c*e*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))*(d + e*x + f*x**S(2)), x), x, a*d*x + a*e*x**S(2)/S(2) + b*e*x**S(4)/S(4) + c*e*x**S(6)/S(6) + c*f*x**S(7)/S(7) + x**S(5)*(b*f/S(5) + c*d/S(5)) + x**S(3)*(a*f/S(3) + b*d/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))*(d + e*x + f*x**S(2) + g*x**S(3)), x), x, a*d*x + a*e*x**S(2)/S(2) + c*f*x**S(7)/S(7) + c*g*x**S(8)/S(8) + x**S(6)*(b*g/S(6) + c*e/S(6)) + x**S(5)*(b*f/S(5) + c*d/S(5)) + x**S(4)*(a*g/S(4) + b*e/S(4)) + x**S(3)*(a*f/S(3) + b*d/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4)), x), x, a*d*x + a*e*x**S(2)/S(2) + c*g*x**S(8)/S(8) + c*h*x**S(9)/S(9) + x**S(7)*(b*h/S(7) + c*f/S(7)) + x**S(6)*(b*g/S(6) + c*e/S(6)) + x**S(5)*(a*h/S(5) + b*f/S(5) + c*d/S(5)) + x**S(4)*(a*g/S(4) + b*e/S(4)) + x**S(3)*(a*f/S(3) + b*d/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5)), x), x, a*d*x + a*e*x**S(2)/S(2) + c*h*x**S(9)/S(9) + c*i*x**S(10)/S(10) + x**S(8)*(b*i/S(8) + c*g/S(8)) + x**S(7)*(b*h/S(7) + c*f/S(7)) + x**S(6)*(a*i/S(6) + b*g/S(6) + c*e/S(6)) + x**S(5)*(a*h/S(5) + b*f/S(5) + c*d/S(5)) + x**S(4)*(a*g/S(4) + b*e/S(4)) + x**S(3)*(a*f/S(3) + b*d/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, a**S(2)*d*x + a**S(2)*e*x**S(2)/S(2) + S(2)*a*b*d*x**S(3)/S(3) + a*b*e*x**S(4)/S(2) + S(2)*b*c*d*x**S(7)/S(7) + b*c*e*x**S(8)/S(4) + c**S(2)*d*x**S(9)/S(9) + c**S(2)*e*x**S(10)/S(10) + d*x**S(5)*(S(2)*a*c/S(5) + b**S(2)/S(5)) + e*x**S(6)*(a*c/S(3) + b**S(2)/S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)*(d + e*x + f*x**S(2)), x), x, a**S(2)*d*x + a**S(2)*e*x**S(2)/S(2) + a*b*e*x**S(4)/S(2) + a*x**S(3)*(a*f + S(2)*b*d)/S(3) + b*c*e*x**S(8)/S(4) + c**S(2)*e*x**S(10)/S(10) + c**S(2)*f*x**S(11)/S(11) + c*x**S(9)*(S(2)*b*f + c*d)/S(9) + e*x**S(6)*(a*c/S(3) + b**S(2)/S(6)) + x**S(7)*(S(2)*a*c*f/S(7) + b**S(2)*f/S(7) + S(2)*b*c*d/S(7)) + x**S(5)*(S(2)*a*b*f/S(5) + S(2)*a*c*d/S(5) + b**S(2)*d/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)*(d + e*x + f*x**S(2) + g*x**S(3)), x), x, a**S(2)*d*x + a**S(2)*e*x**S(2)/S(2) + a*x**S(4)*(a*g + S(2)*b*e)/S(4) + a*x**S(3)*(a*f + S(2)*b*d)/S(3) + c**S(2)*f*x**S(11)/S(11) + c**S(2)*g*x**S(12)/S(12) + c*x**S(10)*(S(2)*b*g + c*e)/S(10) + c*x**S(9)*(S(2)*b*f + c*d)/S(9) + x**S(8)*(a*c*g/S(4) + b**S(2)*g/S(8) + b*c*e/S(4)) + x**S(7)*(S(2)*a*c*f/S(7) + b**S(2)*f/S(7) + S(2)*b*c*d/S(7)) + x**S(6)*(a*b*g/S(3) + a*c*e/S(3) + b**S(2)*e/S(6)) + x**S(5)*(S(2)*a*b*f/S(5) + S(2)*a*c*d/S(5) + b**S(2)*d/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4)), x), x, a**S(2)*d*x + a**S(2)*e*x**S(2)/S(2) + a*x**S(4)*(a*g + S(2)*b*e)/S(4) + a*x**S(3)*(a*f + S(2)*b*d)/S(3) + c**S(2)*g*x**S(12)/S(12) + c**S(2)*h*x**S(13)/S(13) + c*x**S(11)*(S(2)*b*h + c*f)/S(11) + c*x**S(10)*(S(2)*b*g + c*e)/S(10) + x**S(9)*(b**S(2)*h/S(9) + c**S(2)*d/S(9) + S(2)*c*(a*h + b*f)/S(9)) + x**S(8)*(a*c*g/S(4) + b**S(2)*g/S(8) + b*c*e/S(4)) + x**S(7)*(S(2)*a*c*f/S(7) + b**S(2)*f/S(7) + S(2)*b*(a*h + c*d)/S(7)) + x**S(6)*(a*b*g/S(3) + a*c*e/S(3) + b**S(2)*e/S(6)) + x**S(5)*(S(2)*a*b*f/S(5) + a*(a*h + S(2)*c*d)/S(5) + b**S(2)*d/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, -d*atanh(x/S(2))/S(6) + d*atanh(x)/S(3) - e*log(-x**S(2) + S(1))/S(6) + e*log(-x**S(2) + S(4))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, -e*log(-x**S(2) + S(1))/S(6) + e*log(-x**S(2) + S(4))/S(6) + (-d/S(6) - S(2)*f/S(3))*atanh(x/S(2)) + (d/S(3) + f/S(3))*atanh(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, (-d/S(6) - S(2)*f/S(3))*atanh(x/S(2)) + (d/S(3) + f/S(3))*atanh(x) - (e/S(6) + g/S(6))*log(-x**S(2) + S(1)) + (e/S(6) + S(2)*g/S(3))*log(-x**S(2) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, h*x - (e/S(6) + g/S(6))*log(-x**S(2) + S(1)) + (e/S(6) + S(2)*g/S(3))*log(-x**S(2) + S(4)) - (d/S(6) + S(2)*f/S(3) + S(8)*h/S(3))*atanh(x/S(2)) + (d/S(3) + f/S(3) + h/S(3))*atanh(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, h*x + i*x**S(2)/S(2) - (d/S(6) + S(2)*f/S(3) + S(8)*h/S(3))*atanh(x/S(2)) + (d/S(3) + f/S(3) + h/S(3))*atanh(x) - (e/S(6) + g/S(6) + i/S(6))*log(-x**S(2) + S(1)) + (e/S(6) + S(2)*g/S(3) + S(8)*i/S(3))*log(-x**S(2) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(x**S(4) + x**S(2) + S(1)), x), x, -d*log(x**S(2) - x + S(1))/S(4) + d*log(x**S(2) + x + S(1))/S(4) - sqrt(S(3))*d*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*d*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*e*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(x**S(4) + x**S(2) + S(1)), x), x, sqrt(S(3))*e*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(3) - (d/S(4) - f/S(4))*log(x**S(2) - x + S(1)) + (d/S(4) - f/S(4))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(d + f)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*(d + f)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) + x**S(2) + S(1)), x), x, g*log(x**S(4) + x**S(2) + S(1))/S(4) - (d/S(4) - f/S(4))*log(x**S(2) - x + S(1)) + (d/S(4) - f/S(4))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(d + f)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*(d + f)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*(S(2)*e - g)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) + x**S(2) + S(1)), x), x, g*log(x**S(4) + x**S(2) + S(1))/S(4) + h*x - (d/S(4) - f/S(4))*log(x**S(2) - x + S(1)) + (d/S(4) - f/S(4))*log(x**S(2) + x + S(1)) + sqrt(S(3))*(S(2)*e - g)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(6) - sqrt(S(3))*(d + f - S(2)*h)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*(d + f - S(2)*h)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) + x**S(2) + S(1)), x), x, h*x + i*x**S(2)/S(2) - (d/S(4) - f/S(4))*log(x**S(2) - x + S(1)) + (d/S(4) - f/S(4))*log(x**S(2) + x + S(1)) + (g/S(4) - i/S(4))*log(x**S(4) + x**S(2) + S(1)) - sqrt(S(3))*(d + f - S(2)*h)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*(d + f - S(2)*h)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(6) + sqrt(S(3))*(S(2)*e - g - i)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*sqrt(c)*d*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*d*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) - e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, -e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)) + sqrt(S(2))*(f - (-b*f + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(f + (-b*f + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(a + b*x**S(2) + c*x**S(4)), x), x, g*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c) - (-b*g + S(2)*c*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(f - (-b*f + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(f + (-b*f + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(a + b*x**S(2) + c*x**S(4)), x), x, g*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c) + h*x/c - (-b*g + S(2)*c*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(-b*h/c + f - (-S(2)*a*c*h + b**S(2)*h - b*c*f + S(2)*c**S(2)*d)/(c*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(-b*h/c + f + (b**S(2)*h + S(2)*c**S(2)*d - c*(S(2)*a*h + b*f))/(c*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(a + b*x**S(2) + c*x**S(4)), x), x, h*x/c + i*x**S(2)/(S(2)*c) + (-b*i + c*g)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) - (-S(2)*a*c*i + b**S(2)*i - b*c*g + S(2)*c**S(2)*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(-b*h/c + f - (-S(2)*a*c*h + b**S(2)*h - b*c*f + S(2)*c**S(2)*d)/(c*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(-b*h/c + f + (b**S(2)*h + S(2)*c**S(2)*d - c*(S(2)*a*h + b*f))/(c*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) # failing assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + j*x**S(5) + k*x**S(6) + l*x**S(7) + m*x**S(8))/(a + b*x**S(2) + c*x**S(4)), x), x, l*x**S(4)/(S(4)*c) + m*x**S(5)/(S(5)*c) + x**S(3)*(-b*m + c*k)/(S(3)*c**S(2)) + x**S(2)*(-b*l + c*j)/(S(2)*c**S(2)) + x*(b**S(2)*m + c**S(2)*h - c*(a*m + b*k))/c**S(3) + (b**S(2)*l + c**S(2)*g - c*(a*l + b*j))*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)) - (-b**S(3)*l + b*c*(S(3)*a*l + b*j) + S(2)*c**S(3)*e - c**S(2)*(S(2)*a*j + b*g))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(S(2)*a*b*m/c**S(2) - a*k/c - b**S(3)*m/c**S(3) + b**S(2)*k/c**S(2) - b*h/c + f - (b**S(4)*m - b**S(2)*c*(S(4)*a*m + b*k) + S(2)*c**S(4)*d - c**S(3)*(S(2)*a*h + b*f) + c**S(2)*(S(2)*a**S(2)*m + S(3)*a*b*k + b**S(2)*h))/(c**S(3)*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(S(2)*a*b*m/c**S(2) - a*k/c - b**S(3)*m/c**S(3) + b**S(2)*k/c**S(2) - b*h/c + f + (b**S(4)*m - b**S(2)*c*(S(4)*a*m + b*k) + S(2)*c**S(4)*d - c**S(3)*(S(2)*a*h + b*f) + c**S(2)*(S(2)*a**S(2)*m + S(3)*a*b*k + b**S(2)*h))/(c**S(3)*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, S(19)*d*atanh(x/S(2))/S(432) - d*atanh(x)/S(54) + e*log(-x**S(2) + S(1))/S(27) - e*log(-x**S(2) + S(4))/S(27) + x*(-S(5)*d*x**S(2) + S(17)*d - S(5)*e*x**S(3) + S(17)*e*x)/(S(72)*x**S(4) - S(360)*x**S(2) + S(288)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, e*log(-x**S(2) + S(1))/S(27) - e*log(-x**S(2) + S(4))/S(27) + x*(S(17)*d - S(5)*e*x**S(3) + S(17)*e*x + S(20)*f - x**S(2)*(S(5)*d + S(8)*f))/(S(72)*x**S(4) - S(360)*x**S(2) + S(288)) - (d/S(54) + S(7)*f/S(54))*atanh(x) + (S(19)*d/S(432) + S(13)*f/S(108))*atanh(x/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, x*(S(17)*d + S(20)*f - x**S(3)*(S(5)*e + S(8)*g) - x**S(2)*(S(5)*d + S(8)*f) + x*(S(17)*e + S(20)*g))/(S(72)*x**S(4) - S(360)*x**S(2) + S(288)) - (d/S(54) + S(7)*f/S(54))*atanh(x) + (S(19)*d/S(432) + S(13)*f/S(108))*atanh(x/S(2)) + (e/S(27) + S(5)*g/S(54))*log(-x**S(2) + S(1)) - (e/S(27) + S(5)*g/S(54))*log(-x**S(2) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, x*(S(17)*d + S(20)*f + S(32)*h - x**S(3)*(S(5)*e + S(8)*g) - x**S(2)*(S(5)*d + S(8)*f + S(20)*h) + x*(S(17)*e + S(20)*g))/(S(72)*x**S(4) - S(360)*x**S(2) + S(288)) + (e/S(27) + S(5)*g/S(54))*log(-x**S(2) + S(1)) - (e/S(27) + S(5)*g/S(54))*log(-x**S(2) + S(4)) - (d/S(54) + S(7)*f/S(54) + S(13)*h/S(54))*atanh(x) + (S(19)*d/S(432) + S(13)*f/S(108) + S(7)*h/S(27))*atanh(x/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, x*(S(17)*d + S(20)*f + S(32)*h - x**S(3)*(S(5)*e + S(8)*g + S(20)*i) - x**S(2)*(S(5)*d + S(8)*f + S(20)*h) + x*(S(17)*e + S(20)*g + S(32)*i))/(S(72)*x**S(4) - S(360)*x**S(2) + S(288)) - (d/S(54) + S(7)*f/S(54) + S(13)*h/S(54))*atanh(x) + (S(19)*d/S(432) + S(13)*f/S(108) + S(7)*h/S(27))*atanh(x/S(2)) + (e/S(27) + S(5)*g/S(54) + S(4)*i/S(27))*log(-x**S(2) + S(1)) - (e/S(27) + S(5)*g/S(54) + S(4)*i/S(27))*log(-x**S(2) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(x**S(4) + x**S(2) + S(1))**S(2), x), x, -d*log(x**S(2) - x + S(1))/S(4) + d*log(x**S(2) + x + S(1))/S(4) - sqrt(S(3))*d*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(9) + sqrt(S(3))*d*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9) + S(2)*sqrt(S(3))*e*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9) + x*(-d*x**S(2) + d - e*x**S(3) + e*x)/(S(6)*x**S(4) + S(6)*x**S(2) + S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(x**S(4) + x**S(2) + S(1))**S(2), x), x, S(2)*sqrt(S(3))*e*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9) + x*(d - e*x**S(3) + e*x + f - x**S(2)*(d - S(2)*f))/(S(6)*x**S(4) + S(6)*x**S(2) + S(6)) - (d/S(4) - f/S(8))*log(x**S(2) - x + S(1)) + (d/S(4) - f/S(8))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(4)*d + f)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(36) + sqrt(S(3))*(S(4)*d + f)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(36), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) + x**S(2) + S(1))**S(2), x), x, x*(d + f - x**S(3)*(e - S(2)*g) - x**S(2)*(d - S(2)*f) + x*(e + g))/(S(6)*x**S(4) + S(6)*x**S(2) + S(6)) - (d/S(4) - f/S(8))*log(x**S(2) - x + S(1)) + (d/S(4) - f/S(8))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(4)*d + f)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(36) + sqrt(S(3))*(S(4)*d + f)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(36) + sqrt(S(3))*(S(2)*e - g)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) + x**S(2) + S(1))**S(2), x), x, x*(d + f - S(2)*h - x**S(3)*(e - S(2)*g) - x**S(2)*(d - S(2)*f + h) + x*(e + g))/(S(6)*x**S(4) + S(6)*x**S(2) + S(6)) + sqrt(S(3))*(S(2)*e - g)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9) - (d/S(4) - f/S(8) + h/S(8))*log(x**S(2) - x + S(1)) + (d/S(4) - f/S(8) + h/S(8))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(4)*d + f + h)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(36) + sqrt(S(3))*(S(4)*d + f + h)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(36), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) + x**S(2) + S(1))**S(2), x), x, x*(d + f - S(2)*h - x**S(3)*(e - S(2)*g + i) - x**S(2)*(d - S(2)*f + h) + x*(e + g - S(2)*i))/(S(6)*x**S(4) + S(6)*x**S(2) + S(6)) - (d/S(4) - f/S(8) + h/S(8))*log(x**S(2) - x + S(1)) + (d/S(4) - f/S(8) + h/S(8))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(4)*d + f + h)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(36) + sqrt(S(3))*(S(4)*d + f + h)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(36) + sqrt(S(3))*(S(2)*e - g + S(2)*i)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*c*e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + sqrt(S(2))*sqrt(c)*d*(b - (-S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*d*(b + (-S(12)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + x*(b*c*d*x**S(2) + b*c*e*x**S(3) + d*(-S(2)*a*c + b**S(2)) + e*x*(-S(2)*a*c + b**S(2)))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*c*e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + sqrt(S(2))*sqrt(c)*(-S(2)*a*f + b*d - (S(4)*a*b*f - S(12)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*(-S(2)*a*f + b*d + (S(4)*a*b*f - S(12)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + x*(-a*b*f - S(2)*a*c*d + b**S(2)*d + b*c*e*x**S(3) + c*x**S(2)*(-S(2)*a*f + b*d) + e*x*(-S(2)*a*c + b**S(2)))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, (-b*g + S(2)*c*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + sqrt(S(2))*sqrt(c)*(-S(2)*a*f + b*d - (S(4)*a*b*f - S(12)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*(-S(2)*a*f + b*d + (S(4)*a*b*f - S(12)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + x*(-a*b*f - S(2)*a*c*d + b**S(2)*d + c*x**S(3)*(-S(2)*a*g + b*e) + c*x**S(2)*(-S(2)*a*f + b*d) + x*(-a*b*g - S(2)*a*c*e + b**S(2)*e))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, (-b*g + S(2)*c*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + x*(-a*b*f - S(2)*a*(-a*h + c*d) + b**S(2)*d + c*x**S(3)*(-S(2)*a*g + b*e) + x**S(2)*(a*b*h - S(2)*a*c*f + b*c*d) + x*(-a*b*g - S(2)*a*c*e + b**S(2)*e))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(-S(2)*a*c*(S(2)*a*h + S(6)*c*d - f*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*(-a*h + c*d) - b*(-S(4)*a*c*f + a*h*sqrt(-S(4)*a*c + b**S(2)) + c*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(-S(2)*a*c*(S(2)*a*h + S(6)*c*d + f*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*(-a*h + c*d) + b*(S(4)*a*c*f + a*h*sqrt(-S(4)*a*c + b**S(2)) + c*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, (S(2)*a*i - b*g + S(2)*c*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + x*(-a*b*f - S(2)*a*(-a*h + c*d) + b**S(2)*d + x**S(3)*(a*b*i - S(2)*a*c*g + b*c*e) + x**S(2)*(a*b*h - S(2)*a*c*f + b*c*d) + x*(-a*b*g - S(2)*a*(-a*i + c*e) + b**S(2)*e))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(-S(2)*a*c*(S(2)*a*h + S(6)*c*d - f*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*(-a*h + c*d) - b*(-S(4)*a*c*f + a*h*sqrt(-S(4)*a*c + b**S(2)) + c*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(-S(2)*a*c*(S(2)*a*h + S(6)*c*d + f*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*(-a*h + c*d) + b*(S(4)*a*c*f + a*h*sqrt(-S(4)*a*c + b**S(2)) + c*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + j*x**S(5) + k*x**S(6) + l*x**S(7) + m*x**S(8))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, l*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) + m*x/c**S(2) + (-S(6)*a*b*c*l + b**S(3)*l + S(4)*c**S(3)*e - c**S(2)*(-S(4)*a*j + S(2)*b*g))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) - x*(a*b*c*(a*k + c*f) + S(2)*a*c*(a**S(2)*m - a*c*h + c**S(2)*d) - b**S(2)*(a**S(2)*m + c**S(2)*d) - c*x**S(3)*(-a*b**S(2)*l - S(2)*a*c*(-a*l + c*g) + b*c*(a*j + c*e)) - c*x*(-a*b*(a*l + c*g) - S(2)*a*c*(-a*j + c*e) + b**S(2)*c*e) + x**S(2)*(-a*b**S(3)*m + a*b**S(2)*c*k + S(2)*a*c**S(2)*(-a*k + c*f) - b*c*(-S(3)*a**S(2)*m + a*c*h + c**S(2)*d)))/(S(2)*a*c**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(S(3)*a*b**S(4)*m - a*b**S(3)*(c*k - S(3)*m*sqrt(-S(4)*a*c + b**S(2))) - S(2)*a*c**S(2)*(-S(10)*a**S(2)*m + S(2)*a*c*h - S(3)*a*k*sqrt(-S(4)*a*c + b**S(2)) + S(6)*c**S(2)*d - c*f*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*c*(-a*c*h - a*(S(19)*a*m + k*sqrt(-S(4)*a*c + b**S(2))) + c**S(2)*d) - b*c*(S(13)*a**S(2)*m*sqrt(-S(4)*a*c + b**S(2)) + a*c*(-S(8)*a*k + h*sqrt(-S(4)*a*c + b**S(2))) + c**S(2)*(-S(4)*a*f + d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(S(3)*a*b**S(4)*m - a*b**S(3)*(c*k + S(3)*m*sqrt(-S(4)*a*c + b**S(2))) - S(2)*a*c**S(2)*(-S(10)*a**S(2)*m + S(2)*a*c*h + S(3)*a*k*sqrt(-S(4)*a*c + b**S(2)) + S(6)*c**S(2)*d + c*f*sqrt(-S(4)*a*c + b**S(2))) + b**S(2)*c*(-a*c*h + a*(-S(19)*a*m + k*sqrt(-S(4)*a*c + b**S(2))) + c**S(2)*d) + b*c*(S(13)*a**S(2)*m*sqrt(-S(4)*a*c + b**S(2)) + a*c*(S(8)*a*k + h*sqrt(-S(4)*a*c + b**S(2))) + c**S(2)*(S(4)*a*f + d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(x**S(4) - S(5)*x**S(2) + S(4))**S(3), x), x, -S(313)*d*atanh(x/S(2))/S(20736) + S(13)*d*atanh(x)/S(648) - e*log(-x**S(2) + S(1))/S(81) + e*log(-x**S(2) + S(4))/S(81) - x*(-S(35)*d*x**S(2) + S(59)*d - S(50)*e*x**S(3) + S(122)*e*x)/(S(3456)*x**S(4) - S(17280)*x**S(2) + S(13824)) + x*(-S(5)*d*x**S(2) + S(17)*d - S(5)*e*x**S(3) + S(17)*e*x)/(S(144)*(x**S(4) - S(5)*x**S(2) + S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(3), x), x, -e*log(-x**S(2) + S(1))/S(81) + e*log(-x**S(2) + S(4))/S(81) - x*(S(59)*d - S(50)*e*x**S(3) + S(122)*e*x + S(380)*f - x**S(2)*(S(35)*d + S(140)*f))/(S(3456)*x**S(4) - S(17280)*x**S(2) + S(13824)) + x*(S(17)*d - S(5)*e*x**S(3) + S(17)*e*x + S(20)*f - x**S(2)*(S(5)*d + S(8)*f))/(S(144)*(x**S(4) - S(5)*x**S(2) + S(4))**S(2)) + (S(13)*d/S(648) + S(25)*f/S(648))*atanh(x) - (S(313)*d + S(820)*f)*atanh(x/S(2))/S(20736), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) - S(5)*x**S(2) + S(4))**S(3), x), x, -x*(S(59)*d + S(380)*f - x**S(3)*(S(50)*e + S(152)*g) - x**S(2)*(S(35)*d + S(140)*f) + x*(S(122)*e + S(440)*g))/(S(3456)*x**S(4) - S(17280)*x**S(2) + S(13824)) + x*(S(17)*d + S(20)*f - x**S(3)*(S(5)*e + S(8)*g) - x**S(2)*(S(5)*d + S(8)*f) + x*(S(17)*e + S(20)*g))/(S(144)*(x**S(4) - S(5)*x**S(2) + S(4))**S(2)) + (S(13)*d/S(648) + S(25)*f/S(648))*atanh(x) - (S(313)*d + S(820)*f)*atanh(x/S(2))/S(20736) - (e/S(81) + S(5)*g/S(162))*log(-x**S(2) + S(1)) + (e/S(81) + S(5)*g/S(162))*log(-x**S(2) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4))**S(3), x), x, -x*(S(59)*d + S(380)*f + S(848)*h - x**S(3)*(S(50)*e + S(152)*g) - x**S(2)*(S(35)*d + S(140)*f + S(320)*h) + x*(S(122)*e + S(440)*g))/(S(3456)*x**S(4) - S(17280)*x**S(2) + S(13824)) + x*(S(17)*d + S(20)*f + S(32)*h - x**S(3)*(S(5)*e + S(8)*g) - x**S(2)*(S(5)*d + S(8)*f + S(20)*h) + x*(S(17)*e + S(20)*g))/(S(144)*(x**S(4) - S(5)*x**S(2) + S(4))**S(2)) - (e/S(81) + S(5)*g/S(162))*log(-x**S(2) + S(1)) + (e/S(81) + S(5)*g/S(162))*log(-x**S(2) + S(4)) + (S(13)*d/S(648) + S(25)*f/S(648) + S(61)*h/S(648))*atanh(x) - (S(313)*d + S(820)*f + S(1936)*h)*atanh(x/S(2))/S(20736), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4))**S(3), x), x, -x*(S(59)*d + S(380)*f + S(848)*h - x**S(3)*(S(50)*e + S(152)*g + S(320)*i) - x**S(2)*(S(35)*d + S(140)*f + S(320)*h) + x*(S(122)*e + S(440)*g + S(896)*i))/(S(3456)*x**S(4) - S(17280)*x**S(2) + S(13824)) + x*(S(17)*d + S(20)*f + S(32)*h - x**S(3)*(S(5)*e + S(8)*g + S(20)*i) - x**S(2)*(S(5)*d + S(8)*f + S(20)*h) + x*(S(17)*e + S(20)*g + S(32)*i))/(S(144)*(x**S(4) - S(5)*x**S(2) + S(4))**S(2)) + (S(13)*d/S(648) + S(25)*f/S(648) + S(61)*h/S(648))*atanh(x) - (S(313)*d + S(820)*f + S(1936)*h)*atanh(x/S(2))/S(20736) - (e/S(81) + S(5)*g/S(162) + S(11)*i/S(162))*log(-x**S(2) + S(1)) + (e/S(81) + S(5)*g/S(162) + S(11)*i/S(162))*log(-x**S(2) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(x**S(4) + x**S(2) + S(1))**S(3), x), x, -S(9)*d*log(x**S(2) - x + S(1))/S(32) + S(9)*d*log(x**S(2) + x + S(1))/S(32) - S(13)*sqrt(S(3))*d*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(144) + S(13)*sqrt(S(3))*d*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(144) + S(2)*sqrt(S(3))*e*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9) + x*(-S(7)*d*x**S(2) + S(2)*d - S(6)*e*x**S(3) + S(2)*e*x)/(S(24)*x**S(4) + S(24)*x**S(2) + S(24)) + x*(-d*x**S(2) + d - e*x**S(3) + e*x)/(S(12)*(x**S(4) + x**S(2) + S(1))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(x**S(4) + x**S(2) + S(1))**S(3), x), x, S(2)*sqrt(S(3))*e*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9) + x*(S(2)*d - S(6)*e*x**S(3) + S(2)*e*x + S(3)*f - x**S(2)*(S(7)*d - S(7)*f))/(S(24)*x**S(4) + S(24)*x**S(2) + S(24)) + x*(d - e*x**S(3) + e*x + f - x**S(2)*(d - S(2)*f))/(S(12)*(x**S(4) + x**S(2) + S(1))**S(2)) - (S(9)*d/S(32) - f/S(8))*log(x**S(2) - x + S(1)) + (S(9)*d/S(32) - f/S(8))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(13)*d + S(2)*f)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(144) + sqrt(S(3))*(S(13)*d + S(2)*f)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(144), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) + x**S(2) + S(1))**S(3), x), x, x*(S(2)*d + S(3)*f - x**S(3)*(S(6)*e - S(6)*g) - x**S(2)*(S(7)*d - S(7)*f) + x*(S(2)*e + S(2)*g))/(S(24)*x**S(4) + S(24)*x**S(2) + S(24)) + x*(d + f - x**S(3)*(e - S(2)*g) - x**S(2)*(d - S(2)*f) + x*(e + g))/(S(12)*(x**S(4) + x**S(2) + S(1))**S(2)) - (S(9)*d/S(32) - f/S(8))*log(x**S(2) - x + S(1)) + (S(9)*d/S(32) - f/S(8))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(13)*d + S(2)*f)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(144) + sqrt(S(3))*(S(13)*d + S(2)*f)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(144) + sqrt(S(3))*(S(2)*e - g)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) + x**S(2) + S(1))**S(3), x), x, x*(S(2)*d + S(3)*f - h - x**S(3)*(S(6)*e - S(6)*g) - x**S(2)*(S(7)*d - S(7)*f + S(4)*h) + x*(S(2)*e + S(2)*g))/(S(24)*x**S(4) + S(24)*x**S(2) + S(24)) + x*(d + f - S(2)*h - x**S(3)*(e - S(2)*g) - x**S(2)*(d - S(2)*f + h) + x*(e + g))/(S(12)*(x**S(4) + x**S(2) + S(1))**S(2)) + sqrt(S(3))*(S(2)*e - g)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9) - (S(9)*d/S(32) - f/S(8) + S(3)*h/S(32))*log(x**S(2) - x + S(1)) + (S(9)*d/S(32) - f/S(8) + S(3)*h/S(32))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(13)*d + S(2)*f + h)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(144) + sqrt(S(3))*(S(13)*d + S(2)*f + h)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(144), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) + x**S(2) + S(1))**S(3), x), x, x*(S(2)*d + S(3)*f - h - x**S(3)*(S(6)*e - S(6)*g + S(4)*i) - x**S(2)*(S(7)*d - S(7)*f + S(4)*h) + x*(S(2)*e + S(2)*g))/(S(24)*x**S(4) + S(24)*x**S(2) + S(24)) + x*(d + f - S(2)*h - x**S(3)*(e - S(2)*g + i) - x**S(2)*(d - S(2)*f + h) + x*(e + g - S(2)*i))/(S(12)*(x**S(4) + x**S(2) + S(1))**S(2)) - (S(9)*d/S(32) - f/S(8) + S(3)*h/S(32))*log(x**S(2) - x + S(1)) + (S(9)*d/S(32) - f/S(8) + S(3)*h/S(32))*log(x**S(2) + x + S(1)) - sqrt(S(3))*(S(13)*d + S(2)*f + h)*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(144) + sqrt(S(3))*(S(13)*d + S(2)*f + h)*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(144) + sqrt(S(3))*(S(2)*e - g + i)*atan(sqrt(S(3))*(S(2)*x**S(2) + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(6)*c**S(2)*e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + x*(b*c*d*x**S(2) + b*c*e*x**S(3) + d*(-S(2)*a*c + b**S(2)) + e*x*(-S(2)*a*c + b**S(2)))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - S(3)*sqrt(S(2))*sqrt(c)*d*(S(56)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4) - b*(-S(8)*a*c + b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + S(3)*sqrt(S(2))*sqrt(c)*d*(S(56)*a**S(2)*c**S(2) - S(10)*a*b**S(2)*c + b**S(4) + b*(-S(8)*a*c + b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x*(S(3)*b*c*d*x**S(2)*(-S(8)*a*c + b**S(2)) + S(2)*b*c*e*x**S(3)*(-S(10)*a*c + b**S(2)) + d*(-S(7)*a*c + b**S(2))*(-S(4)*a*c + S(3)*b**S(2)) + e*x*(S(24)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(2)*b**S(4)))/(S(8)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(6)*c**S(2)*e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + x*(-a*b*f - S(2)*a*c*d + b**S(2)*d + b*c*e*x**S(3) + c*x**S(2)*(-S(2)*a*f + b*d) + e*x*(-S(2)*a*c + b**S(2)))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(42)*c*d - S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(S(30)*c*d + f*sqrt(-S(4)*a*c + b**S(2))) + S(4)*a*b*c*(-S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d - b**S(3)*(-a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(42)*c*d + S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(S(30)*c*d - f*sqrt(-S(4)*a*c + b**S(2))) - S(4)*a*b*c*(S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d + b**S(3)*(a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x*(S(8)*a**S(2)*b*c*f + S(28)*a**S(2)*c**S(2)*d + a*b**S(3)*f - S(25)*a*b**S(2)*c*d + S(3)*b**S(4)*d + S(2)*b*c*e*x**S(3)*(-S(10)*a*c + b**S(2)) + c*x**S(2)*(S(20)*a**S(2)*c*f + a*b**S(2)*f - S(24)*a*b*c*d + S(3)*b**S(3)*d) + e*x*(S(24)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(2)*b**S(4)))/(S(8)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(3)*c*(-b*g + S(2)*c*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + x*(-a*b*f - S(2)*a*c*d + b**S(2)*d + c*x**S(3)*(-S(2)*a*g + b*e) + c*x**S(2)*(-S(2)*a*f + b*d) + x*(-a*b*g - S(2)*a*c*e + b**S(2)*e))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(42)*c*d - S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(S(30)*c*d + f*sqrt(-S(4)*a*c + b**S(2))) + S(4)*a*b*c*(-S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d - b**S(3)*(-a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(42)*c*d + S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(S(30)*c*d - f*sqrt(-S(4)*a*c + b**S(2))) - S(4)*a*b*c*(S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d + b**S(3)*(a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x*(S(8)*a**S(2)*b*c*f + S(28)*a**S(2)*c**S(2)*d + a*b**S(3)*f - S(25)*a*b**S(2)*c*d + S(3)*b**S(4)*d + S(2)*c*x**S(3)*(S(8)*a**S(2)*c*g + a*b**S(2)*g - S(10)*a*b*c*e + b**S(3)*e) + c*x**S(2)*(S(20)*a**S(2)*c*f + a*b**S(2)*f - S(24)*a*b*c*d + S(3)*b**S(3)*d) + x*(S(4)*a**S(2)*b*c*g + S(24)*a**S(2)*c**S(2)*e + S(2)*a*b**S(3)*g - S(20)*a*b**S(2)*c*e + S(2)*b**S(4)*e))/(S(8)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -S(3)*c*(-b*g + S(2)*c*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + x*(-a*b*f - S(2)*a*(-a*h + c*d) + b**S(2)*d + c*x**S(3)*(-S(2)*a*g + b*e) + x**S(2)*(a*b*h - S(2)*a*c*f + b*c*d) + x*(-a*b*g - S(2)*a*c*e + b**S(2)*e))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(6)*a*h + S(42)*c*d - S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(-S(18)*a*h + S(30)*c*d + f*sqrt(-S(4)*a*c + b**S(2))) + S(4)*a*b*(-S(13)*a*c*f + S(3)*a*h*sqrt(-S(4)*a*c + b**S(2)) + S(6)*c*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d - b**S(3)*(-a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(6)*a*h + S(42)*c*d + S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(-S(18)*a*h + S(30)*c*d - f*sqrt(-S(4)*a*c + b**S(2))) - S(4)*a*b*(S(13)*a*c*f + S(3)*a*h*sqrt(-S(4)*a*c + b**S(2)) + S(6)*c*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d + b**S(3)*(a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x*(S(8)*a**S(2)*b*c*f + S(4)*a**S(2)*c*(a*h + S(7)*c*d) + a*b**S(3)*f - a*b**S(2)*(S(7)*a*h + S(25)*c*d) + S(3)*b**S(4)*d + S(2)*c*x**S(3)*(S(8)*a**S(2)*c*g + a*b**S(2)*g - S(10)*a*b*c*e + b**S(3)*e) + c*x**S(2)*(S(20)*a**S(2)*c*f + a*b**S(2)*f - S(12)*a*b*(a*h + S(2)*c*d) + S(3)*b**S(3)*d) + x*(S(4)*a**S(2)*b*c*g + S(24)*a**S(2)*c**S(2)*e + S(2)*a*b**S(3)*g - S(20)*a*b**S(2)*c*e + S(2)*b**S(4)*e))/(S(8)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -(S(2)*a*c*i + b**S(2)*i - S(3)*b*c*g + S(6)*c**S(2)*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + x*(-a*b*f - S(2)*a*(-a*h + c*d) + b**S(2)*d + x**S(3)*(a*b*i - S(2)*a*c*g + b*c*e) + x**S(2)*(a*b*h - S(2)*a*c*f + b*c*d) + x*(-a*b*g - S(2)*a*(-a*i + c*e) + b**S(2)*e))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(6)*a*h + S(42)*c*d - S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(-S(18)*a*h + S(30)*c*d + f*sqrt(-S(4)*a*c + b**S(2))) + S(4)*a*b*(-S(13)*a*c*f + S(3)*a*h*sqrt(-S(4)*a*c + b**S(2)) + S(6)*c*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d - b**S(3)*(-a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(6)*a*h + S(42)*c*d + S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(-S(18)*a*h + S(30)*c*d - f*sqrt(-S(4)*a*c + b**S(2))) - S(4)*a*b*(S(13)*a*c*f + S(3)*a*h*sqrt(-S(4)*a*c + b**S(2)) + S(6)*c*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d + b**S(3)*(a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x*(S(8)*a**S(2)*b*c*f + S(4)*a**S(2)*c*(a*h + S(7)*c*d) + a*b**S(3)*f - a*b**S(2)*(S(7)*a*h + S(25)*c*d) + S(3)*b**S(4)*d + S(2)*c*x**S(3)*(S(8)*a**S(2)*c*g + a*b**S(2)*g - S(2)*a*b*(S(3)*a*i + S(5)*c*e) + b**S(3)*e) + c*x**S(2)*(S(20)*a**S(2)*c*f + a*b**S(2)*f - S(12)*a*b*(a*h + S(2)*c*d) + S(3)*b**S(3)*d) + x*(S(4)*a**S(2)*b*c*g + S(8)*a**S(2)*c*(a*i + S(3)*c*e) + S(2)*a*b**S(3)*g - S(4)*a*b**S(2)*(S(2)*a*i + S(5)*c*e) + S(2)*b**S(4)*e))/(S(8)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + j*x**S(5) + k*x**S(6) + l*x**S(7) + m*x**S(8))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, -(-S(3)*a*b*l + S(2)*a*c*j + b**S(2)*j - S(3)*b*c*g + S(6)*c**S(2)*e)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) - x*(a*b*c*(a*k + c*f) + S(2)*a*c*(a**S(2)*m - a*c*h + c**S(2)*d) - b**S(2)*(a**S(2)*m + c**S(2)*d) - c*x**S(3)*(-a*b**S(2)*l - S(2)*a*c*(-a*l + c*g) + b*c*(a*j + c*e)) - c*x*(-a*b*(a*l + c*g) - S(2)*a*c*(-a*j + c*e) + b**S(2)*c*e) + x**S(2)*(-a*b**S(3)*m + a*b**S(2)*c*k + S(2)*a*c**S(2)*(-a*k + c*f) - b*c*(-S(3)*a**S(2)*m + a*c*h + c**S(2)*d)))/(S(4)*a*c**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + x*(S(4)*a**S(2)*b*c**S(2)*(a*k + S(2)*c*f) + S(4)*a**S(2)*c**S(2)*(-S(9)*a**S(2)*m + a*c*h + S(7)*c**S(2)*d) + a*b**S(3)*c*(S(2)*a*k + c*f) - a*b**S(2)*c*(-S(11)*a**S(2)*m + S(7)*a*c*h + S(25)*c**S(2)*d) + b**S(4)*(-S(2)*a**S(2)*m + S(3)*c**S(2)*d) + S(2)*c**S(2)*x**S(3)*(S(8)*a**S(2)*c*(a*l + c*g) + a*b**S(2)*(a*l + c*g) - S(2)*a*b*c*(S(3)*a*j + S(5)*c*e) + b**S(3)*c*e) + c*x**S(2)*(S(4)*a**S(2)*c**S(2)*(S(3)*a*k + S(5)*c*f) + a*b**S(2)*c*(S(3)*a*k + c*f) - S(4)*a*b*c*(S(4)*a**S(2)*m + S(3)*a*c*h + S(6)*c**S(2)*d) + b**S(3)*(a**S(2)*m + S(3)*c**S(2)*d)) + S(2)*c*x*(S(2)*a**S(2)*b*c*(a*l + c*g) + S(4)*a**S(2)*c**S(2)*(a*j + S(3)*c*e) + a*b**S(3)*(a*l + c*g) - S(2)*a*b**S(2)*c*(S(2)*a*j + S(5)*c*e) + b**S(4)*c*e))/(S(8)*a**S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(S(4)*a**S(2)*c**S(2)*(S(10)*a**S(2)*m + S(6)*a*c*h - S(3)*a*k*sqrt(-S(4)*a*c + b**S(2)) + S(42)*c**S(2)*d - S(5)*c*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*c*(S(3)*a*(-S(6)*a*m + k*sqrt(-S(4)*a*c + b**S(2))) + S(30)*c**S(2)*d + c*(-S(18)*a*h + f*sqrt(-S(4)*a*c + b**S(2)))) + S(4)*a*b*c*(S(4)*a**S(2)*m*sqrt(-S(4)*a*c + b**S(2)) + S(3)*a*c*(-S(3)*a*k + h*sqrt(-S(4)*a*c + b**S(2))) + c**S(2)*(-S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2)))) + b**S(4)*(-a**S(2)*m + S(3)*c**S(2)*d) - b**S(3)*(S(3)*a**S(2)*c*k + a**S(2)*m*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*(-a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + sqrt(S(2))*(S(4)*a**S(2)*c**S(2)*(S(10)*a**S(2)*m + S(6)*a*c*h + S(3)*a*k*sqrt(-S(4)*a*c + b**S(2)) + S(42)*c**S(2)*d + S(5)*c*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*c*(-S(3)*a*(S(6)*a*m + k*sqrt(-S(4)*a*c + b**S(2))) + S(30)*c**S(2)*d - c*(S(18)*a*h + f*sqrt(-S(4)*a*c + b**S(2)))) - S(4)*a*b*c*(S(4)*a**S(2)*m*sqrt(-S(4)*a*c + b**S(2)) + S(3)*a*c*(S(3)*a*k + h*sqrt(-S(4)*a*c + b**S(2))) + c**S(2)*(S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2)))) + b**S(4)*(-a**S(2)*m + S(3)*c**S(2)*d) + b**S(3)*(-S(3)*a**S(2)*c*k + a**S(2)*m*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*(a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5) + j*x**S(6) + k*x**S(7))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, k*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) + (-S(6)*a*b*c*k + b**S(3)*k + S(4)*c**S(3)*e - c**S(2)*(-S(4)*a*i + S(2)*b*g))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x*(-a*b*(a*j + c*f) - S(2)*a*c*(-a*h + c*d) + b**S(2)*c*d + x**S(3)*(-a*b**S(2)*k - S(2)*a*c*(-a*k + c*g) + b*c*(a*i + c*e)) + x**S(2)*(-a*b**S(2)*j - S(2)*a*c*(-a*j + c*f) + b*c*(a*h + c*d)) + x*(-a*b*(a*k + c*g) - S(2)*a*c*(-a*i + c*e) + b**S(2)*c*e))/(S(2)*a*c*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(a*b**S(3)*j + S(2)*a*c*(S(2)*a*c*h - S(3)*a*j*sqrt(-S(4)*a*c + b**S(2)) + S(6)*c**S(2)*d - c*f*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*(-a*c*h - a*j*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*d) + b*c*(-S(8)*a**S(2)*j - S(4)*a*c*f + a*h*sqrt(-S(4)*a*c + b**S(2)) + c*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*(a*b**S(3)*j + S(2)*a*c*(S(2)*a*c*h + S(3)*a*j*sqrt(-S(4)*a*c + b**S(2)) + S(6)*c**S(2)*d + c*f*sqrt(-S(4)*a*c + b**S(2))) - b**S(2)*(-a*c*h + a*j*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*d) - b*c*(S(8)*a**S(2)*j + S(4)*a*c*f + a*h*sqrt(-S(4)*a*c + b**S(2)) + c*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5) + j*x**S(8) + k*x**S(11))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, k*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)) - (-S(30)*a**S(2)*b*c**S(2)*k + S(10)*a*b**S(3)*c*k - b**S(5)*k + S(2)*b**S(2)*c**S(3)*i + S(12)*c**S(5)*e - c**S(4)*(-S(4)*a*i + S(6)*b*g))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*(-S(4)*a*c + b**S(2))**(S(5)/2)) - x*(c*x**S(2)*(-a*b**S(3)*j + S(2)*a*c**S(3)*f - b*c*(-S(3)*a**S(2)*j + a*c*h + c**S(2)*d)) + c*(a*b*c**S(2)*f + S(2)*a*c*(a**S(2)*j - a*c*h + c**S(2)*d) - b**S(2)*(a**S(2)*j + c**S(2)*d)) - x**S(3)*(-S(2)*a**S(3)*c**S(2)*k + S(4)*a**S(2)*b**S(2)*c*k - a*b**S(4)*k - S(2)*a*c**S(4)*g + b*c**S(3)*(a*i + c*e)) - x*(-a**S(2)*b**S(3)*k - S(2)*a*c**S(3)*(-a*i + c*e) + b**S(2)*c**S(3)*e - b*(-S(3)*a**S(3)*c*k + a*c**S(3)*g)))/(S(4)*a*c**S(3)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) + x*(c**S(2)*x**S(2)*(S(20)*a**S(2)*c**S(3)*f + a*b**S(2)*c**S(2)*f - S(4)*a*b*c*(S(4)*a**S(2)*j + S(3)*a*c*h + S(6)*c**S(2)*d) + b**S(3)*(a**S(2)*j + S(3)*c**S(2)*d)) + S(2)*c*x**S(3)*(-S(24)*a**S(4)*c**S(2)*k - S(3)*a**S(2)*b**S(4)*k + S(8)*a**S(2)*c**S(4)*g - S(2)*a*b*c**S(3)*(S(3)*a*i + S(5)*c*e) + b**S(3)*c**S(3)*e + b**S(2)*(S(21)*a**S(3)*c*k + a*c**S(3)*g)) + c*(S(8)*a**S(2)*b*c**S(3)*f + S(4)*a**S(2)*c**S(2)*(-S(9)*a**S(2)*j + a*c*h + S(7)*c**S(2)*d) + a*b**S(3)*c**S(2)*f - a*b**S(2)*c*(-S(11)*a**S(2)*j + S(7)*a*c*h + S(25)*c**S(2)*d) + b**S(4)*(-S(2)*a**S(2)*j + S(3)*c**S(2)*d)) + x*(S(2)*a**S(2)*b**S(5)*k + S(8)*a**S(2)*c**S(4)*(a*i + S(3)*c*e) - S(4)*a*b**S(2)*c**S(3)*(S(2)*a*i + S(5)*c*e) + S(2)*b**S(4)*c**S(3)*e + S(2)*b**S(3)*(-S(9)*a**S(3)*c*k + a*c**S(3)*g) + S(4)*b*(S(13)*a**S(4)*c**S(2)*k + a**S(2)*c**S(4)*g)))/(S(8)*a**S(2)*c**S(3)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(-S(4)*a**S(2)*c**S(2)*(S(10)*a**S(2)*j + S(6)*a*c*h + S(42)*c**S(2)*d - S(5)*c*f*sqrt(-S(4)*a*c + b**S(2))) + a*b**S(2)*c*(-S(18)*a**S(2)*j - S(18)*a*c*h + S(30)*c**S(2)*d + c*f*sqrt(-S(4)*a*c + b**S(2))) - S(4)*a*b*c*(S(4)*a**S(2)*j*sqrt(-S(4)*a*c + b**S(2)) + S(3)*a*c*h*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*(-S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2)))) - b**S(4)*(-a**S(2)*j + S(3)*c**S(2)*d) + b**S(3)*(a**S(2)*j*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*(-a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) - sqrt(S(2))*(-S(4)*a**S(2)*c**S(2)*(S(10)*a**S(2)*j + S(6)*a*c*h + S(42)*c**S(2)*d + S(5)*c*f*sqrt(-S(4)*a*c + b**S(2))) + a*b**S(2)*c*(-S(18)*a**S(2)*j - S(18)*a*c*h + S(30)*c**S(2)*d - c*f*sqrt(-S(4)*a*c + b**S(2))) + S(4)*a*b*c*(S(4)*a**S(2)*j*sqrt(-S(4)*a*c + b**S(2)) + S(3)*a*c*h*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*(S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2)))) - b**S(4)*(-a**S(2)*j + S(3)*c**S(2)*d) - b**S(3)*(a**S(2)*j*sqrt(-S(4)*a*c + b**S(2)) + c**S(2)*(a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2)))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(3)*(a*d + a*e*x + b*e*x**S(3) + c*e*x**S(5) + c*f*x**S(6) + x**S(4)*(b*f + c*d) + x**S(2)*(a*f + b*d)), x), x, a**S(4)*d*x + a**S(4)*e*x**S(2)/S(2) + a**S(3)*b*e*x**S(4) + a**S(3)*x**S(3)*(a*f + S(4)*b*d)/S(3) + a**S(2)*e*x**S(6)*(S(2)*a*c + S(3)*b**S(2))/S(3) + S(2)*a**S(2)*x**S(5)*(S(2)*a*b*f + S(2)*a*c*d + S(3)*b**S(2)*d)/S(5) + a*b*e*x**S(8)*(S(3)*a*c + b**S(2))/S(2) + S(2)*a*x**S(7)*(S(2)*a**S(2)*c*f + S(3)*a*b**S(2)*f + S(6)*a*b*c*d + S(2)*b**S(3)*d)/S(7) + b*c**S(3)*e*x**S(16)/S(4) + b*c*e*x**S(12)*(S(3)*a*c + b**S(2))/S(3) + c**S(4)*e*x**S(18)/S(18) + c**S(4)*f*x**S(19)/S(19) + c**S(3)*x**S(17)*(S(4)*b*f + c*d)/S(17) + c**S(2)*e*x**S(14)*(S(2)*a*c + S(3)*b**S(2))/S(7) + S(2)*c**S(2)*x**S(15)*(S(2)*a*c*f + S(3)*b**S(2)*f + S(2)*b*c*d)/S(15) + S(2)*c*x**S(13)*(S(6)*a*b*c*f + S(2)*a*c**S(2)*d + S(2)*b**S(3)*f + S(3)*b**S(2)*c*d)/S(13) + e*x**S(10)*(S(3)*a**S(2)*c**S(2)/S(5) + S(6)*a*b**S(2)*c/S(5) + b**S(4)/S(10)) + x**S(11)*(S(6)*a**S(2)*c**S(2)*f/S(11) + S(12)*a*b**S(2)*c*f/S(11) + S(12)*a*b*c**S(2)*d/S(11) + b**S(4)*f/S(11) + S(4)*b**S(3)*c*d/S(11)) + x**S(9)*(S(4)*a**S(2)*b*c*f/S(3) + S(2)*a**S(2)*c**S(2)*d/S(3) + S(4)*a*b**S(3)*f/S(9) + S(4)*a*b**S(2)*c*d/S(3) + b**S(4)*d/S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))**S(2)*(a*d + a*e*x + b*e*x**S(3) + c*e*x**S(5) + c*f*x**S(6) + x**S(4)*(b*f + c*d) + x**S(2)*(a*f + b*d)), x), x, a**S(3)*d*x + a**S(3)*e*x**S(2)/S(2) + S(3)*a**S(2)*b*e*x**S(4)/S(4) + a**S(2)*x**S(3)*(a*f + S(3)*b*d)/S(3) + a*e*x**S(6)*(a*c + b**S(2))/S(2) + S(3)*a*x**S(5)*(a*b*f + a*c*d + b**S(2)*d)/S(5) + b*c**S(2)*e*x**S(12)/S(4) + b*e*x**S(8)*(S(6)*a*c + b**S(2))/S(8) + c**S(3)*e*x**S(14)/S(14) + c**S(3)*f*x**S(15)/S(15) + c**S(2)*x**S(13)*(S(3)*b*f + c*d)/S(13) + S(3)*c*e*x**S(10)*(a*c + b**S(2))/S(10) + S(3)*c*x**S(11)*(a*c*f + b**S(2)*f + b*c*d)/S(11) + x**S(9)*(S(2)*a*b*c*f/S(3) + a*c**S(2)*d/S(3) + b**S(3)*f/S(9) + b**S(2)*c*d/S(3)) + x**S(7)*(S(3)*a**S(2)*c*f/S(7) + S(3)*a*b**S(2)*f/S(7) + S(6)*a*b*c*d/S(7) + b**S(3)*d/S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2) + c*x**S(4))*(a*d + a*e*x + b*e*x**S(3) + c*e*x**S(5) + c*f*x**S(6) + x**S(4)*(b*f + c*d) + x**S(2)*(a*f + b*d)), x), x, a**S(2)*d*x + a**S(2)*e*x**S(2)/S(2) + a*b*e*x**S(4)/S(2) + a*x**S(3)*(a*f + S(2)*b*d)/S(3) + b*c*e*x**S(8)/S(4) + c**S(2)*e*x**S(10)/S(10) + c**S(2)*f*x**S(11)/S(11) + c*x**S(9)*(S(2)*b*f + c*d)/S(9) + e*x**S(6)*(a*c/S(3) + b**S(2)/S(6)) + x**S(7)*(S(2)*a*c*f/S(7) + b**S(2)*f/S(7) + S(2)*b*c*d/S(7)) + x**S(5)*(S(2)*a*b*f/S(5) + S(2)*a*c*d/S(5) + b**S(2)*d/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*d + a*e*x + b*e*x**S(3) + c*e*x**S(5) + c*f*x**S(6) + x**S(4)*(b*f + c*d) + x**S(2)*(a*f + b*d))/(a + b*x**S(2) + c*x**S(4)), x), x, d*x + e*x**S(2)/S(2) + f*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*d + a*e*x + b*e*x**S(3) + c*e*x**S(5) + c*f*x**S(6) + x**S(4)*(b*f + c*d) + x**S(2)*(a*f + b*d))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)) + sqrt(S(2))*(f - (-b*f + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(f + (-b*f + S(2)*c*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*d + a*e*x + b*e*x**S(3) + c*e*x**S(5) + c*f*x**S(6) + x**S(4)*(b*f + c*d) + x**S(2)*(a*f + b*d))/(a + b*x**S(2) + c*x**S(4))**S(3), x), x, S(2)*c*e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + sqrt(S(2))*sqrt(c)*(-S(2)*a*f + b*d - (S(4)*a*b*f - S(12)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*(-S(2)*a*f + b*d + (S(4)*a*b*f - S(12)*a*c*d + b**S(2)*d)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + x*(-a*b*f - S(2)*a*c*d + b**S(2)*d + b*c*e*x**S(3) + c*x**S(2)*(-S(2)*a*f + b*d) + e*x*(-S(2)*a*c + b**S(2)))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*d + a*e*x + b*e*x**S(3) + c*e*x**S(5) + c*f*x**S(6) + x**S(4)*(b*f + c*d) + x**S(2)*(a*f + b*d))/(a + b*x**S(2) + c*x**S(4))**S(4), x), x, -S(6)*c**S(2)*e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(5)/2) + x*(-a*b*f - S(2)*a*c*d + b**S(2)*d + b*c*e*x**S(3) + c*x**S(2)*(-S(2)*a*f + b*d) + e*x*(-S(2)*a*c + b**S(2)))/(S(4)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)) - sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(42)*c*d - S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(S(30)*c*d + f*sqrt(-S(4)*a*c + b**S(2))) + S(4)*a*b*c*(-S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d - b**S(3)*(-a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + sqrt(S(2))*sqrt(c)*(S(4)*a**S(2)*c*(S(42)*c*d + S(5)*f*sqrt(-S(4)*a*c + b**S(2))) - a*b**S(2)*(S(30)*c*d - f*sqrt(-S(4)*a*c + b**S(2))) - S(4)*a*b*c*(S(13)*a*f + S(6)*d*sqrt(-S(4)*a*c + b**S(2))) + S(3)*b**S(4)*d + b**S(3)*(a*f + S(3)*d*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(16)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(5)/2)) + x*(S(8)*a**S(2)*b*c*f + S(28)*a**S(2)*c**S(2)*d + a*b**S(3)*f - S(25)*a*b**S(2)*c*d + S(3)*b**S(4)*d + S(2)*b*c*e*x**S(3)*(-S(10)*a*c + b**S(2)) + c*x**S(2)*(S(20)*a**S(2)*c*f + a*b**S(2)*f - S(24)*a*b*c*d + S(3)*b**S(3)*d) + e*x*(S(24)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(2)*b**S(4)))/(S(8)*a**S(2)*(-S(4)*a*c + b**S(2))**S(2)*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(2)*x**S(2) - x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*(x**S(3) - S(2)*x**S(2) - x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, e*x + (d - S(2)*e)*log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))*(x**S(3) - S(2)*x**S(2) - x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, f*(x + S(2))**S(2)/S(2) + x*(e - S(4)*f) + (d - S(2)*e + S(4)*f)*log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))*(x**S(3) - S(2)*x**S(2) - x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, g*(x + S(2))**S(3)/S(3) + x*(e - S(4)*f + S(12)*g) + (f/S(2) - S(3)*g)*(x + S(2))**S(2) + (d - S(2)*e + S(4)*f - S(8)*g)*log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(2)*x**S(2) - x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, h*x**S(4)/S(4) + x**S(3)*(g/S(3) - S(2)*h/S(3)) + x**S(2)*(f/S(2) - g + S(2)*h) + x*(e - S(2)*f + S(4)*g - S(8)*h) + (d - S(2)*e + S(4)*f - S(8)*g + S(16)*h)*log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(2)*x**S(2) - x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, i*x**S(5)/S(5) + x**S(4)*(h/S(4) - i/S(2)) + x**S(3)*(g/S(3) - S(2)*h/S(3) + S(4)*i/S(3)) + x**S(2)*(f/S(2) - g + S(2)*h - S(4)*i) + x*(e - S(2)*f + S(4)*g - S(8)*h + S(16)*i) + (d - S(2)*e + S(4)*f - S(8)*g + S(16)*h - S(32)*i)*log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, -S(2)*atanh(S(2)*x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*(x**S(2) - S(3)*x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, -(d - S(2)*e)*log(x + S(2)) + (d - e)*log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))*(x**S(2) - S(3)*x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, f*x - (d - S(2)*e + S(4)*f)*log(x + S(2)) + (d - e + f)*log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, g*x**S(2)/S(2) + x*(f - S(3)*g) - (d - S(2)*e + S(4)*f - S(8)*g)*log(x + S(2)) + (d - e + f - g)*log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, h*x**S(3)/S(3) + x**S(2)*(g/S(2) - S(3)*h/S(2)) + x*(f - S(3)*g + S(7)*h) - (d - S(2)*e + S(4)*f - S(8)*g + S(16)*h)*log(x + S(2)) + (d - e + f - g + h)*log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, i*x**S(4)/S(4) + x**S(3)*(h/S(3) - i) + x**S(2)*(g/S(2) - S(3)*h/S(2) + S(7)*i/S(2)) + x*(f - S(3)*g + S(7)*h - S(15)*i) - (d - S(2)*e + S(4)*f - S(8)*g + S(16)*h - S(32)*i)*log(x + S(2)) + (d - e + f - g + h - i)*log(x + S(1)), expand=True, _diff=True, _numerical=True) # wromg result (rule) assert rubi_test(rubi_integrate((x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, -log(-x + S(1))/S(2) + log(-x + S(2))/S(3) + log(x + S(1))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*(x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, (-d/S(2) - e/S(2))*log(-x + S(1)) + (d/S(6) - e/S(6))*log(x + S(1)) + (d/S(3) + S(2)*e/S(3))*log(-x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))*(d + e*x + f*x**S(2))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, (-d/S(2) - e/S(2) - f/S(2))*log(-x + S(1)) + (d/S(6) - e/S(6) + f/S(6))*log(x + S(1)) + (d/S(3) + S(2)*e/S(3) + S(4)*f/S(3))*log(-x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, g*x + (d/S(6) - e/S(6) + f/S(6) - g/S(6))*log(x + S(1)) + (d/S(3) + S(2)*e/S(3) + S(4)*f/S(3) + S(8)*g/S(3))*log(-x + S(2)) - (d/S(2) + e/S(2) + f/S(2) + g/S(2))*log(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, h*x**S(2)/S(2) + x*(g + S(2)*h) + (d/S(6) - e/S(6) + f/S(6) - g/S(6) + h/S(6))*log(x + S(1)) + (d/S(3) + S(2)*e/S(3) + S(4)*f/S(3) + S(8)*g/S(3) + S(16)*h/S(3))*log(-x + S(2)) - (d/S(2) + e/S(2) + f/S(2) + g/S(2) + h/S(2))*log(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4)), x), x, i*x**S(3)/S(3) + x**S(2)*(h/S(2) + i) + x*(g + S(2)*h + S(5)*i) + (d/S(6) - e/S(6) + f/S(6) - g/S(6) + h/S(6) - i/S(6))*log(x + S(1)) + (d/S(3) + S(2)*e/S(3) + S(4)*f/S(3) + S(8)*g/S(3) + S(16)*h/S(3) + S(32)*i/S(3))*log(-x + S(2)) - (d/S(2) + e/S(2) + f/S(2) + g/S(2) + h/S(2) + i/S(2))*log(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(2)*x**S(2) - x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, -log(-x + S(1))/S(18) + log(-x + S(2))/S(48) + log(x + S(1))/S(6) - S(19)*log(x + S(2))/S(144) + S(1)/(S(12)*x + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*(x**S(3) - S(2)*x**S(2) - x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(48) + e/S(24))*log(-x + S(2)) - (d/S(18) + e/S(18))*log(-x + S(1)) - (S(19)*d/S(144) - S(13)*e/S(72))*log(x + S(2)) + (d/S(6) - e/S(6))*log(x + S(1)) + (d - S(2)*e)/(S(12)*x + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))*(x**S(3) - S(2)*x**S(2) - x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(48) + e/S(24) + f/S(12))*log(-x + S(2)) - (d/S(18) + e/S(18) + f/S(18))*log(-x + S(1)) - (S(19)*d/S(144) - S(13)*e/S(72) + S(7)*f/S(36))*log(x + S(2)) + (d/S(6) - e/S(6) + f/S(6))*log(x + S(1)) + (d - S(2)*e + S(4)*f)/(S(12)*x + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))*(x**S(3) - S(2)*x**S(2) - x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(48) + e/S(24) + f/S(12) + g/S(6))*log(-x + S(2)) - (d/S(18) + e/S(18) + f/S(18) + g/S(18))*log(-x + S(1)) - (S(19)*d/S(144) - S(13)*e/S(72) + S(7)*f/S(36) - g/S(18))*log(x + S(2)) + (d/S(6) - e/S(6) + f/S(6) - g/S(6))*log(x + S(1)) + (d - S(2)*e + S(4)*f - S(8)*g)/(S(12)*x + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(2)*x**S(2) - x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(48) + e/S(24) + f/S(12) + g/S(6) + h/S(3))*log(-x + S(2)) - (d/S(18) + e/S(18) + f/S(18) + g/S(18) + h/S(18))*log(-x + S(1)) - (S(19)*d/S(144) - S(13)*e/S(72) + S(7)*f/S(36) - g/S(18) - S(5)*h/S(9))*log(x + S(2)) + (d/S(6) - e/S(6) + f/S(6) - g/S(6) + h/S(6))*log(x + S(1)) + (d - S(2)*e + S(4)*f - S(8)*g + S(16)*h)/(S(12)*x + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(2)*x**S(2) - x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, i*x + (d/S(48) + e/S(24) + f/S(12) + g/S(6) + h/S(3) + S(2)*i/S(3))*log(-x + S(2)) - (d/S(18) + e/S(18) + f/S(18) + g/S(18) + h/S(18) + i/S(18))*log(-x + S(1)) - (S(19)*d/S(144) - S(13)*e/S(72) + S(7)*f/S(36) - g/S(18) - S(5)*h/S(9) + S(22)*i/S(9))*log(x + S(2)) + (d/S(6) - e/S(6) + f/S(6) - g/S(6) + h/S(6) - i/S(6))*log(x + S(1)) + (d - S(2)*e + S(4)*f - S(8)*g + S(16)*h - S(32)*i)/(S(12)*x + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, -(S(3)*x + S(5))/(S(12)*x**S(2) + S(36)*x + S(24)) - log(-x + S(1))/S(36) + log(-x + S(2))/S(144) - S(7)*log(x + S(1))/S(36) + S(31)*log(x + S(2))/S(144), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*(x**S(2) - S(3)*x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) + e/S(72))*log(-x + S(2)) - (d/S(36) + e/S(36))*log(-x + S(1)) - (S(7)*d/S(36) - S(13)*e/S(36))*log(x + S(1)) + (S(31)*d/S(144) - S(25)*e/S(72))*log(x + S(2)) - (S(5)*d - S(6)*e + x*(S(3)*d - S(4)*e))/(S(12)*x**S(2) + S(36)*x + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))*(x**S(2) - S(3)*x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) + e/S(72) + f/S(36))*log(-x + S(2)) - (d/S(36) + e/S(36) + f/S(36))*log(-x + S(1)) - (S(7)*d/S(36) - S(13)*e/S(36) + S(19)*f/S(36))*log(x + S(1)) + (S(31)*d/S(144) - S(25)*e/S(72) + S(19)*f/S(36))*log(x + S(2)) - (S(5)*d - S(6)*e + S(8)*f + x*(S(3)*d - S(4)*e + S(6)*f))/(S(12)*x**S(2) + S(36)*x + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) + e/S(72) + f/S(36) + g/S(18))*log(-x + S(2)) - (d/S(36) + e/S(36) + f/S(36) + g/S(36))*log(-x + S(1)) - (S(7)*d/S(36) - S(13)*e/S(36) + S(19)*f/S(36) - S(25)*g/S(36))*log(x + S(1)) + (S(31)*d/S(144) - S(25)*e/S(72) + S(19)*f/S(36) - S(13)*g/S(18))*log(x + S(2)) - (d - S(2)*e + S(4)*f - S(8)*g)/(S(12)*x + S(24)) - (d - e + f - g)/(S(6)*x + S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) + e/S(72) + f/S(36) + g/S(18) + h/S(9))*log(-x + S(2)) - (d/S(36) + e/S(36) + f/S(36) + g/S(36) + h/S(36))*log(-x + S(1)) - (S(7)*d/S(36) - S(13)*e/S(36) + S(19)*f/S(36) - S(25)*g/S(36) + S(31)*h/S(36))*log(x + S(1)) + (S(31)*d/S(144) - S(25)*e/S(72) + S(19)*f/S(36) - S(13)*g/S(18) + S(7)*h/S(9))*log(x + S(2)) - (d - S(2)*e + S(4)*f - S(8)*g + S(16)*h)/(S(12)*x + S(24)) - (d - e + f - g + h)/(S(6)*x + S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) + e/S(72) + f/S(36) + g/S(18) + h/S(9) + S(2)*i/S(9))*log(-x + S(2)) - (d/S(36) + e/S(36) + f/S(36) + g/S(36) + h/S(36) + i/S(36))*log(-x + S(1)) - (S(7)*d/S(36) - S(13)*e/S(36) + S(19)*f/S(36) - S(25)*g/S(36) + S(31)*h/S(36) - S(37)*i/S(36))*log(x + S(1)) + (S(31)*d/S(144) - S(25)*e/S(72) + S(19)*f/S(36) - S(13)*g/S(18) + S(7)*h/S(9) - S(2)*i/S(9))*log(x + S(2)) - (d - S(2)*e + S(4)*f - S(8)*g + S(16)*h - S(32)*i)/(S(12)*x + S(24)) - (d - e + f - g + h - i)/(S(6)*x + S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, log(-x + S(1))/S(18) - S(35)*log(-x + S(2))/S(432) + log(x + S(1))/S(54) + log(x + S(2))/S(144) - S(1)/(S(36)*x + S(36)) + S(1)/(-S(12)*x + S(12)) + S(1)/(-S(36)*x + S(72)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)*(x + S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) - e/S(72))*log(x + S(2)) + (d/S(54) + e/S(108))*log(x + S(1)) + (d/S(18) + S(5)*e/S(36))*log(-x + S(1)) - (S(35)*d/S(432) + S(29)*e/S(216))*log(-x + S(2)) - (d - e)/(S(36)*x + S(36)) + (d + e)/(-S(12)*x + S(12)) + (d + S(2)*e)/(-S(36)*x + S(72)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))*(d + e*x + f*x**S(2))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) - e/S(72) + f/S(36))*log(x + S(2)) + (d/S(54) + e/S(108) - f/S(27))*log(x + S(1)) + (d/S(18) + S(5)*e/S(36) + S(2)*f/S(9))*log(-x + S(1)) - (S(35)*d/S(432) + S(29)*e/S(216) + S(23)*f/S(108))*log(-x + S(2)) - (d - e + f)/(S(36)*x + S(36)) + (d + e + f)/(-S(12)*x + S(12)) + (d + S(2)*e + S(4)*f)/(-S(36)*x + S(72)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) - e/S(72) + f/S(36) - g/S(18))*log(x + S(2)) + (d/S(54) + e/S(108) - f/S(27) + S(7)*g/S(108))*log(x + S(1)) + (d/S(18) + S(5)*e/S(36) + S(2)*f/S(9) + S(11)*g/S(36))*log(-x + S(1)) - (S(35)*d/S(432) + S(29)*e/S(216) + S(23)*f/S(108) + S(17)*g/S(54))*log(-x + S(2)) - (d - e + f - g)/(S(36)*x + S(36)) + (d + e + f + g)/(-S(12)*x + S(12)) + (d + S(2)*e + S(4)*f + S(8)*g)/(-S(36)*x + S(72)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) - e/S(72) + f/S(36) - g/S(18) + h/S(9))*log(x + S(2)) + (d/S(54) + e/S(108) - f/S(27) + S(7)*g/S(108) - S(5)*h/S(54))*log(x + S(1)) + (d/S(18) + S(5)*e/S(36) + S(2)*f/S(9) + S(11)*g/S(36) + S(7)*h/S(18))*log(-x + S(1)) - (S(35)*d/S(432) + S(29)*e/S(216) + S(23)*f/S(108) + S(17)*g/S(54) + S(11)*h/S(27))*log(-x + S(2)) - (d - e + f - g + h)/(S(36)*x + S(36)) + (d + e + f + g + h)/(-S(12)*x + S(12)) + (d + S(2)*e + S(4)*f + S(8)*g + S(16)*h)/(-S(36)*x + S(72)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))*(d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + i*x**S(5))/(x**S(4) - S(5)*x**S(2) + S(4))**S(2), x), x, (d/S(144) - e/S(72) + f/S(36) - g/S(18) + h/S(9) - S(2)*i/S(9))*log(x + S(2)) + (d/S(54) + e/S(108) - f/S(27) + S(7)*g/S(108) - S(5)*h/S(54) + S(13)*i/S(108))*log(x + S(1)) + (d/S(18) + S(5)*e/S(36) + S(2)*f/S(9) + S(11)*g/S(36) + S(7)*h/S(18) + S(17)*i/S(36))*log(-x + S(1)) - (S(35)*d/S(432) + S(29)*e/S(216) + S(23)*f/S(108) + S(17)*g/S(54) + S(11)*h/S(27) + S(10)*i/S(27))*log(-x + S(2)) - (d - e + f - g + h - i)/(S(36)*x + S(36)) + (d + e + f + g + h + i)/(-S(12)*x + S(12)) + (d + S(2)*e + S(4)*f + S(8)*g + S(16)*h + S(32)*i)/(-S(36)*x + S(72)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*g - c*g*x**S(4))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, g*x/sqrt(a + b*x**S(2) + c*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*g - c*g*x**S(4) + e*x)/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -(b*e + S(2)*c*e*x**S(2) - g*x*(-S(4)*a*c + b**S(2)))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*g - c*g*x**S(4) + f*x**S(3))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, (S(2)*a*f + b*f*x**S(2) + g*x*(-S(4)*a*c + b**S(2)))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*g - c*g*x**S(4) + e*x + f*x**S(3))/(a + b*x**S(2) + c*x**S(4))**(S(3)/2), x), x, -(-S(2)*a*f + b*e - g*x*(-S(4)*a*c + b**S(2)) + x**S(2)*(-b*f + S(2)*c*e))/((-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) # large time assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3) + h*x**S(4) + j*x**S(5) + k*x**S(6) + l*x**S(7) + m*x**S(8))/(a + b*x**S(3) + c*x**S(6)), x), x, k*x/c + l*x**S(2)/(S(2)*c) + m*x**S(3)/(S(3)*c) + (-b*m + c*j)*log(a + b*x**S(3) + c*x**S(6))/(S(6)*c**S(2)) - (-S(2)*a*c*m + b**S(2)*m - b*c*j + S(2)*c**S(2)*f)*atanh((b + S(2)*c*x**S(3))/sqrt(-S(4)*a*c + b**S(2)))/(S(3)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))) + S(2)**(S(2)/3)*(-b*k/c + g - (-S(2)*a*c*k + b**S(2)*k - b*c*g + S(2)*c**S(2)*d)/(c*sqrt(-S(4)*a*c + b**S(2))))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(1)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(-b*k/c + g - (-S(2)*a*c*k + b**S(2)*k - b*c*g + S(2)*c**S(2)*d)/(c*sqrt(-S(4)*a*c + b**S(2))))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(1)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*(-b*k/c + g - (-S(2)*a*c*k + b**S(2)*k - b*c*g + S(2)*c**S(2)*d)/(c*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(1)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) + S(2)**(S(2)/3)*(-b*k/c + g + (b**S(2)*k + S(2)*c**S(2)*d - c*(S(2)*a*k + b*g))/(c*sqrt(-S(4)*a*c + b**S(2))))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(1)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*(-b*k/c + g + (b**S(2)*k + S(2)*c**S(2)*d - c*(S(2)*a*k + b*g))/(c*sqrt(-S(4)*a*c + b**S(2))))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(1)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(2)/3)*sqrt(S(3))*(-b*k/c + g + (b**S(2)*k + S(2)*c**S(2)*d - c*(S(2)*a*k + b*g))/(c*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(1)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3)) - S(2)**(S(1)/3)*(-b*l/c + h - (-S(2)*a*c*l + b**S(2)*l - b*c*h + S(2)*c**S(2)*e)/(c*sqrt(-S(4)*a*c + b**S(2))))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(2)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*(-b*l/c + h - (-S(2)*a*c*l + b**S(2)*l - b*c*h + S(2)*c**S(2)*e)/(c*sqrt(-S(4)*a*c + b**S(2))))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b + sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(2)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*sqrt(S(3))*(-b*l/c + h - (-S(2)*a*c*l + b**S(2)*l - b*c*h + S(2)*c**S(2)*e)/(c*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(2)/3)*(b + sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*(-b*l/c + h + (b**S(2)*l + S(2)*c**S(2)*e - c*(S(2)*a*l + b*h))/(c*sqrt(-S(4)*a*c + b**S(2))))*log(S(2)**(S(1)/3)*c**(S(1)/3)*x + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3))/(S(6)*c**(S(2)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) + S(2)**(S(1)/3)*(-b*l/c + h + (b**S(2)*l + S(2)*c**S(2)*e - c*(S(2)*a*l + b*h))/(c*sqrt(-S(4)*a*c + b**S(2))))*log(S(2)**(S(2)/3)*c**(S(2)/3)*x**S(2) - S(2)**(S(1)/3)*c**(S(1)/3)*x*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + (b - sqrt(-S(4)*a*c + b**S(2)))**(S(2)/3))/(S(12)*c**(S(2)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)) - S(2)**(S(1)/3)*sqrt(S(3))*(-b*l/c + h + (b**S(2)*l + S(2)*c**S(2)*e - c*(S(2)*a*l + b*h))/(c*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*c**(S(1)/3)*x/(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3) + S(1))/S(3))/(S(6)*c**(S(2)/3)*(b - sqrt(-S(4)*a*c + b**S(2)))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*d*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*d*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) - c*e*x**S(2)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - c*e*x**S(2)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*d*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*d*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) - c*e*x**S(2)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - c*e*x**S(2)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*f*x**S(3)*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(12)*a*c + S(3)*b**S(2) + S(3)*b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*f*x**S(3)*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(12)*a*c + S(3)*b**S(2) - S(3)*b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(a + b*x**n + c*x**(S(2)*n)), x), x, -S(2)*c*d*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*d*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) - c*e*x**S(2)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) - c*e*x**S(2)*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*f*x**S(3)*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(12)*a*c + S(3)*b**S(2) + S(3)*b*sqrt(-S(4)*a*c + b**S(2))) - S(2)*c*f*x**S(3)*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(12)*a*c + S(3)*b**S(2) - S(3)*b*sqrt(-S(4)*a*c + b**S(2))) - c*g*x**S(4)*hyper((S(1), S(4)/n), ((n + S(4))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(-S(8)*a*c + S(2)*b**S(2) + S(2)*b*sqrt(-S(4)*a*c + b**S(2))) - c*g*x**S(4)*hyper((S(1), S(4)/n), ((n + S(4))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(-S(8)*a*c + S(2)*b**S(2) - S(2)*b*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**n + c*x**(S(2)*n))**(S(-2)), x), x, -c*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) + b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) - b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) + x*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)/(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, S(2)*b*c**S(2)*e*x**(n + S(2))*(-n + S(2))*hyper((S(1), (n + S(2))/n), (S(2) + S(2)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(n + S(2))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)*b*c**S(2)*e*x**(n + S(2))*(-n + S(2))*hyper((S(1), (n + S(2))/n), (S(2) + S(2)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(n + S(2))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - c*d*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) + b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*d*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) - b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) - c*e*x**S(2)*(S(4)*a*c*(-n + S(1)) - b**S(2)*(-n + S(2)))*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*e*x**S(2)*(S(4)*a*c*(-n + S(1)) - b**S(2)*(-n + S(2)))*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) + d*x*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) + e*x**S(2)*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2))/(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, S(2)*b*c**S(2)*e*x**(n + S(2))*(-n + S(2))*hyper((S(1), (n + S(2))/n), (S(2) + S(2)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(n + S(2))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)*b*c**S(2)*e*x**(n + S(2))*(-n + S(2))*hyper((S(1), (n + S(2))/n), (S(2) + S(2)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(n + S(2))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)*b*c**S(2)*f*x**(n + S(3))*(-n + S(3))*hyper((S(1), (n + S(3))/n), (S(2) + S(3)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(n + S(3))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)*b*c**S(2)*f*x**(n + S(3))*(-n + S(3))*hyper((S(1), (n + S(3))/n), (S(2) + S(3)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(n + S(3))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - c*d*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) + b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*d*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) - b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) - c*e*x**S(2)*(S(4)*a*c*(-n + S(1)) - b**S(2)*(-n + S(2)))*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*e*x**S(2)*(S(4)*a*c*(-n + S(1)) - b**S(2)*(-n + S(2)))*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) - S(2)*c*f*x**S(3)*(S(2)*a*c*(-S(2)*n + S(3)) - b**S(2)*(-n + S(3)))*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - S(2)*c*f*x**S(3)*(S(2)*a*c*(-S(2)*n + S(3)) - b**S(2)*(-n + S(3)))*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) + d*x*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) + e*x**S(2)*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) + f*x**S(3)*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*x**S(2) + g*x**S(3))/(a + b*x**n + c*x**(S(2)*n))**S(2), x), x, S(2)*b*c**S(2)*e*x**(n + S(2))*(-n + S(2))*hyper((S(1), (n + S(2))/n), (S(2) + S(2)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(n + S(2))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)*b*c**S(2)*e*x**(n + S(2))*(-n + S(2))*hyper((S(1), (n + S(2))/n), (S(2) + S(2)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(n + S(2))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)*b*c**S(2)*f*x**(n + S(3))*(-n + S(3))*hyper((S(1), (n + S(3))/n), (S(2) + S(3)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(n + S(3))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)*b*c**S(2)*f*x**(n + S(3))*(-n + S(3))*hyper((S(1), (n + S(3))/n), (S(2) + S(3)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(n + S(3))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + S(2)*b*c**S(2)*g*x**(n + S(4))*(-n + S(4))*hyper((S(1), (n + S(4))/n), (S(2) + S(4)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b + sqrt(-S(4)*a*c + b**S(2)))*(n + S(4))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - S(2)*b*c**S(2)*g*x**(n + S(4))*(-n + S(4))*hyper((S(1), (n + S(4))/n), (S(2) + S(4)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(b - sqrt(-S(4)*a*c + b**S(2)))*(n + S(4))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - c*d*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) + b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*d*x*(S(4)*a*c*(-S(2)*n + S(1)) - b**S(2)*(-n + S(1)) - b*(-n + S(1))*sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) - c*e*x**S(2)*(S(4)*a*c*(-n + S(1)) - b**S(2)*(-n + S(2)))*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*e*x**S(2)*(S(4)*a*c*(-n + S(1)) - b**S(2)*(-n + S(2)))*hyper((S(1), S(2)/n), ((n + S(2))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) - S(2)*c*f*x**S(3)*(S(2)*a*c*(-S(2)*n + S(3)) - b**S(2)*(-n + S(3)))*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - S(2)*c*f*x**S(3)*(S(2)*a*c*(-S(2)*n + S(3)) - b**S(2)*(-n + S(3)))*hyper((S(1), S(3)/n), ((n + S(3))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(3)*a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) - c*g*x**S(4)*(S(4)*a*c*(-n + S(2)) - b**S(2)*(-n + S(4)))*hyper((S(1), S(4)/n), ((n + S(4))/n,), -S(2)*c*x**n/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))) - c*g*x**S(4)*(S(4)*a*c*(-n + S(2)) - b**S(2)*(-n + S(4)))*hyper((S(1), S(4)/n), ((n + S(4))/n,), -S(2)*c*x**n/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*n*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))) + d*x*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) + e*x**S(2)*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) + f*x**S(3)*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))) + g*x**S(4)*(-S(2)*a*c + b**S(2) + b*c*x**n)/(a*n*(-S(4)*a*c + b**S(2))*(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-a*h*x**(n/S(2) + S(-1)) + c*f*x**(n + S(-1)) + c*g*x**(S(2)*n + S(-1)) + c*h*x**(S(5)*n/S(2) + S(-1)))/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, -(S(2)*c*x**n*(-b*g + S(2)*c*f) + S(2)*c*(-S(2)*a*g + b*f) + S(2)*h*x**(n/S(2))*(-S(4)*a*c + b**S(2)))/(n*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**n + c*x**(S(2)*n))**p*(a + b*x**n*(n*p + n + S(1)) + c*x**(S(2)*n)*(S(2)*n*(p + S(1)) + S(1))), x), x, x*(a + b*x**n + c*x**(S(2)*n))**(p + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4)), x), x, A*a*x**(m + S(1))/(m + S(1)) + B*a*x**(m + S(2))/(m + S(2)) + B*b*x**(m + S(4))/(m + S(4)) + B*c*x**(m + S(6))/(m + S(6)) + C*c*x**(m + S(7))/(m + S(7)) + x**(m + S(3))*(A*b + C*a)/(m + S(3)) + x**(m + S(5))*(A*c + C*b)/(m + S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4)), x), x, A*a*x**S(4)/S(4) + B*a*x**S(5)/S(5) + B*b*x**S(7)/S(7) + B*c*x**S(9)/S(9) + C*c*x**S(10)/S(10) + x**S(8)*(A*c/S(8) + C*b/S(8)) + x**S(6)*(A*b/S(6) + C*a/S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4)), x), x, A*a*x**S(3)/S(3) + B*a*x**S(4)/S(4) + B*b*x**S(6)/S(6) + B*c*x**S(8)/S(8) + C*c*x**S(9)/S(9) + x**S(7)*(A*c/S(7) + C*b/S(7)) + x**S(5)*(A*b/S(5) + C*a/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4)), x), x, A*a*x**S(2)/S(2) + B*a*x**S(3)/S(3) + B*b*x**S(5)/S(5) + B*c*x**S(7)/S(7) + C*c*x**S(8)/S(8) + x**S(6)*(A*c/S(6) + C*b/S(6)) + x**S(4)*(A*b/S(4) + C*a/S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4)), x), x, A*a*x + B*a*x**S(2)/S(2) + B*b*x**S(4)/S(4) + B*c*x**S(6)/S(6) + C*c*x**S(7)/S(7) + x**S(5)*(A*c/S(5) + C*b/S(5)) + x**S(3)*(A*b/S(3) + C*a/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))/x, x), x, A*a*log(x) + B*a*x + B*b*x**S(3)/S(3) + B*c*x**S(5)/S(5) + C*c*x**S(6)/S(6) + x**S(4)*(A*c/S(4) + C*b/S(4)) + x**S(2)*(A*b/S(2) + C*a/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))/x**S(2), x), x, -A*a/x + B*a*log(x) + B*b*x**S(2)/S(2) + B*c*x**S(4)/S(4) + C*c*x**S(5)/S(5) + x**S(3)*(A*c/S(3) + C*b/S(3)) + x*(A*b + C*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))/x**S(3), x), x, -A*a/(S(2)*x**S(2)) - B*a/x + B*b*x + B*c*x**S(3)/S(3) + C*c*x**S(4)/S(4) + x**S(2)*(A*c/S(2) + C*b/S(2)) + (A*b + C*a)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))/x**S(4), x), x, -A*a/(S(3)*x**S(3)) - B*a/(S(2)*x**S(2)) + B*b*log(x) + B*c*x**S(2)/S(2) + C*c*x**S(3)/S(3) + x*(A*c + C*b) - (A*b + C*a)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))/x**S(5), x), x, -A*a/(S(4)*x**S(4)) - B*a/(S(3)*x**S(3)) - B*b/x + B*c*x + C*c*x**S(2)/S(2) + (A*c + C*b)*log(x) - (A*b + C*a)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))/x**S(6), x), x, -A*a/(S(5)*x**S(5)) - B*a/(S(4)*x**S(4)) - B*b/(S(2)*x**S(2)) + B*c*log(x) + C*c*x - (A*c + C*b)/x - (A*b + C*a)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))/x**S(7), x), x, -A*a/(S(6)*x**S(6)) - B*a/(S(5)*x**S(5)) - B*b/(S(3)*x**S(3)) - B*c/x + C*c*log(x) - (A*c + C*b)/(S(2)*x**S(2)) - (A*b + C*a)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, A*a**S(2)*x**(m + S(1))/(m + S(1)) + B*a**S(2)*x**(m + S(2))/(m + S(2)) + S(2)*B*a*b*x**(m + S(4))/(m + S(4)) + S(2)*B*b*c*x**(m + S(8))/(m + S(8)) + B*c**S(2)*x**(m + S(10))/(m + S(10)) + B*x**(m + S(6))*(S(2)*a*c + b**S(2))/(m + S(6)) + C*c**S(2)*x**(m + S(11))/(m + S(11)) + a*x**(m + S(3))*(S(2)*A*b + C*a)/(m + S(3)) + c*x**(m + S(9))*(A*c + S(2)*C*b)/(m + S(9)) + x**(m + S(5))*(A*(S(2)*a*c + b**S(2)) + S(2)*C*a*b)/(m + S(5)) + x**(m + S(7))*(S(2)*A*b*c + C*(S(2)*a*c + b**S(2)))/(m + S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, A*a**S(2)*x**S(4)/S(4) + B*a**S(2)*x**S(5)/S(5) + S(2)*B*a*b*x**S(7)/S(7) + S(2)*B*b*c*x**S(11)/S(11) + B*c**S(2)*x**S(13)/S(13) + B*x**S(9)*(S(2)*a*c + b**S(2))/S(9) + C*c**S(2)*x**S(14)/S(14) + a*x**S(6)*(S(2)*A*b + C*a)/S(6) + c*x**S(12)*(A*c + S(2)*C*b)/S(12) + x**S(10)*(A*b*c/S(5) + C*(S(2)*a*c + b**S(2))/S(10)) + x**S(8)*(A*(S(2)*a*c + b**S(2))/S(8) + C*a*b/S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, A*a**S(2)*x**S(3)/S(3) + B*a**S(2)*x**S(4)/S(4) + B*a*b*x**S(6)/S(3) + B*b*c*x**S(10)/S(5) + B*c**S(2)*x**S(12)/S(12) + B*x**S(8)*(S(2)*a*c + b**S(2))/S(8) + C*c**S(2)*x**S(13)/S(13) + a*x**S(5)*(S(2)*A*b + C*a)/S(5) + c*x**S(11)*(A*c + S(2)*C*b)/S(11) + x**S(9)*(S(2)*A*b*c/S(9) + C*(S(2)*a*c + b**S(2))/S(9)) + x**S(7)*(A*(S(2)*a*c + b**S(2))/S(7) + S(2)*C*a*b/S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, A*a**S(2)*x**S(2)/S(2) + B*a**S(2)*x**S(3)/S(3) + S(2)*B*a*b*x**S(5)/S(5) + S(2)*B*b*c*x**S(9)/S(9) + B*c**S(2)*x**S(11)/S(11) + B*x**S(7)*(S(2)*a*c + b**S(2))/S(7) + C*c**S(2)*x**S(12)/S(12) + a*x**S(4)*(S(2)*A*b + C*a)/S(4) + c*x**S(10)*(A*c + S(2)*C*b)/S(10) + x**S(8)*(A*b*c/S(4) + C*(S(2)*a*c + b**S(2))/S(8)) + x**S(6)*(A*(S(2)*a*c + b**S(2))/S(6) + C*a*b/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2), x), x, A*a**S(2)*x + B*a**S(2)*x**S(2)/S(2) + B*a*b*x**S(4)/S(2) + B*b*c*x**S(8)/S(4) + B*c**S(2)*x**S(10)/S(10) + B*x**S(6)*(S(2)*a*c + b**S(2))/S(6) + C*c**S(2)*x**S(11)/S(11) + a*x**S(3)*(S(2)*A*b + C*a)/S(3) + c*x**S(9)*(A*c + S(2)*C*b)/S(9) + x**S(7)*(S(2)*A*b*c/S(7) + C*(S(2)*a*c + b**S(2))/S(7)) + x**S(5)*(A*(S(2)*a*c + b**S(2))/S(5) + S(2)*C*a*b/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)/x, x), x, A*a**S(2)*log(x) + B*a**S(2)*x + S(2)*B*a*b*x**S(3)/S(3) + S(2)*B*b*c*x**S(7)/S(7) + B*c**S(2)*x**S(9)/S(9) + B*x**S(5)*(S(2)*a*c + b**S(2))/S(5) + C*c**S(2)*x**S(10)/S(10) + a*x**S(2)*(S(2)*A*b + C*a)/S(2) + c*x**S(8)*(A*c + S(2)*C*b)/S(8) + x**S(6)*(A*b*c/S(3) + C*(S(2)*a*c + b**S(2))/S(6)) + x**S(4)*(A*(S(2)*a*c + b**S(2))/S(4) + C*a*b/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)/x**S(2), x), x, -A*a**S(2)/x + B*a**S(2)*log(x) + B*a*b*x**S(2) + B*b*c*x**S(6)/S(3) + B*c**S(2)*x**S(8)/S(8) + B*x**S(4)*(S(2)*a*c + b**S(2))/S(4) + C*c**S(2)*x**S(9)/S(9) + a*x*(S(2)*A*b + C*a) + c*x**S(7)*(A*c + S(2)*C*b)/S(7) + x**S(5)*(S(2)*A*b*c/S(5) + C*(S(2)*a*c + b**S(2))/S(5)) + x**S(3)*(A*(S(2)*a*c + b**S(2))/S(3) + S(2)*C*a*b/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)/x**S(3), x), x, -A*a**S(2)/(S(2)*x**S(2)) - B*a**S(2)/x + S(2)*B*a*b*x + S(2)*B*b*c*x**S(5)/S(5) + B*c**S(2)*x**S(7)/S(7) + B*x**S(3)*(S(2)*a*c + b**S(2))/S(3) + C*c**S(2)*x**S(8)/S(8) + a*(S(2)*A*b + C*a)*log(x) + c*x**S(6)*(A*c + S(2)*C*b)/S(6) + x**S(4)*(A*b*c/S(2) + C*(S(2)*a*c + b**S(2))/S(4)) + x**S(2)*(A*(S(2)*a*c + b**S(2))/S(2) + C*a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)/x**S(4), x), x, -A*a**S(2)/(S(3)*x**S(3)) - B*a**S(2)/(S(2)*x**S(2)) + S(2)*B*a*b*log(x) + B*b*c*x**S(4)/S(2) + B*c**S(2)*x**S(6)/S(6) + B*x**S(2)*(S(2)*a*c + b**S(2))/S(2) + C*c**S(2)*x**S(7)/S(7) - a*(S(2)*A*b + C*a)/x + c*x**S(5)*(A*c + S(2)*C*b)/S(5) + x**S(3)*(S(2)*A*b*c/S(3) + C*(S(2)*a*c + b**S(2))/S(3)) + x*(A*(S(2)*a*c + b**S(2)) + S(2)*C*a*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)/x**S(5), x), x, -A*a**S(2)/(S(4)*x**S(4)) - B*a**S(2)/(S(3)*x**S(3)) - S(2)*B*a*b/x + S(2)*B*b*c*x**S(3)/S(3) + B*c**S(2)*x**S(5)/S(5) + B*x*(S(2)*a*c + b**S(2)) + C*c**S(2)*x**S(6)/S(6) - a*(S(2)*A*b + C*a)/(S(2)*x**S(2)) + c*x**S(4)*(A*c + S(2)*C*b)/S(4) + x**S(2)*(A*b*c + C*(S(2)*a*c + b**S(2))/S(2)) + (A*(S(2)*a*c + b**S(2)) + S(2)*C*a*b)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)/x**S(6), x), x, -A*a**S(2)/(S(5)*x**S(5)) - B*a**S(2)/(S(4)*x**S(4)) - B*a*b/x**S(2) + B*b*c*x**S(2) + B*c**S(2)*x**S(4)/S(4) + B*(S(2)*a*c + b**S(2))*log(x) + C*c**S(2)*x**S(5)/S(5) - a*(S(2)*A*b + C*a)/(S(3)*x**S(3)) + c*x**S(3)*(A*c + S(2)*C*b)/S(3) + x*(S(2)*A*b*c + C*(S(2)*a*c + b**S(2))) - (A*(S(2)*a*c + b**S(2)) + S(2)*C*a*b)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))*(a + b*x**S(2) + c*x**S(4))**S(2)/x**S(7), x), x, -A*a**S(2)/(S(6)*x**S(6)) - B*a**S(2)/(S(5)*x**S(5)) - S(2)*B*a*b/(S(3)*x**S(3)) + S(2)*B*b*c*x + B*c**S(2)*x**S(3)/S(3) - B*(S(2)*a*c + b**S(2))/x + C*c**S(2)*x**S(4)/S(4) - a*(S(2)*A*b + C*a)/(S(4)*x**S(4)) + c*x**S(2)*(A*c + S(2)*C*b)/S(2) + (S(2)*A*b*c + C*(S(2)*a*c + b**S(2)))*log(x) - (A*(S(2)*a*c + b**S(2)) + S(2)*C*a*b)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, -S(2)*B*c*x**(m + S(2))*hyper((S(1), m/S(2) + S(1)), (m/S(2) + S(2),), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/((b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(2))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*B*c*x**(m + S(2))*hyper((S(1), m/S(2) + S(1)), (m/S(2) + S(2),), -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))))/((b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(2))*sqrt(-S(4)*a*c + b**S(2))) + x**(m + S(1))*(C - (S(2)*A*c - C*b)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/((b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))) + x**(m + S(1))*(C + (S(2)*A*c - C*b)/sqrt(-S(4)*a*c + b**S(2)))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))))/((b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, -B*b*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) + B*x**S(2)/(S(2)*c) - B*(-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))) + C*x**S(3)/(S(3)*c) + x*(A*c - C*b)/c**S(2) - sqrt(S(2))*(A*b*c + C*a*c - C*b**S(2) + (A*c*(-S(2)*a*c + b**S(2)) - C*b*(-S(3)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(A*b*c + C*a*c - C*b**S(2) - (A*c*(-S(2)*a*c + b**S(2)) - C*b*(-S(3)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, B*x/c - sqrt(S(2))*B*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*B*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + C*x**S(2)/(S(2)*c) + (A*c - C*b)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) + (A*b*c + S(2)*C*a*c - C*b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, B*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))) + B*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c) + C*x/c + sqrt(S(2))*(A*c - C*b + (A*b*c + S(2)*C*a*c - C*b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(A*c - C*b - (A*b*c - C*(-S(2)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, -sqrt(S(2))*B*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*B*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))) + C*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c) - (S(2)*A*c - C*b)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4)), x), x, -B*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)) + sqrt(S(2))*(C - (S(2)*A*c - C*b)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(C + (S(2)*A*c - C*b)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))/(x*(a + b*x**S(2) + c*x**S(4))), x), x, A*log(x)/a - A*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a) - sqrt(S(2))*B*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*B*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + (A*b - S(2)*C*a)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))/(x**S(2)*(a + b*x**S(2) + c*x**S(4))), x), x, -A/(a*x) + B*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))) + B*log(x)/a - B*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a) - sqrt(S(2))*sqrt(c)*(A - (A*b - S(2)*C*a)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(A + (A*b - S(2)*C*a)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))/(x**S(3)*(a + b*x**S(2) + c*x**S(4))), x), x, -A/(S(2)*a*x**S(2)) - sqrt(S(2))*B*sqrt(c)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*B*sqrt(c)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - B/(a*x) - (A*b - C*a)*log(x)/a**S(2) + (A*b - C*a)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)) - (A*(-S(2)*a*c + b**S(2)) - C*a*b)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, B*c*x**(m + S(2))*(S(4)*a*c*(-m + S(2)) + b*m*(b - sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), m/S(2) + S(1)), (m/S(2) + S(2),), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(2))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - B*c*x**(m + S(2))*(S(4)*a*c*(-m + S(2)) + b*m*(b + sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), m/S(2) + S(1)), (m/S(2) + S(2),), -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(2))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + B*x**(m + S(2))*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - c*x**(m + S(1))*(A*(-S(4)*a*c*(-m + S(3)) + b**S(2)*(-m + S(1)) - b*(-m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*C*a*(S(2)*b + (-m + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*(b + sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + c*x**(m + S(1))*(A*(-S(4)*a*c*(-m + S(3)) + b**S(2)*(-m + S(1)) + b*(-m + S(1))*sqrt(-S(4)*a*c + b**S(2))) + S(2)*C*a*(S(2)*b - (-m + S(1))*sqrt(-S(4)*a*c + b**S(2))))*hyper((S(1), m/S(2) + S(1)/2), (m/S(2) + S(3)/2,), -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*(b - sqrt(-S(4)*a*c + b**S(2)))*(m + S(1))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x**(m + S(1))*(A*(-S(2)*a*c + b**S(2)) - C*a*b + c*x**S(2)*(A*b - S(2)*C*a))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*B*a*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + x*(S(2)*B*a*c*x + B*b*c*x**S(3) + a*(S(2)*A*c - C*b) + x**S(2)*(A*b*c + S(2)*C*a*c - C*b**S(2)))/(S(2)*c*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(A*c*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))) + C*(-S(8)*a*b*c - S(6)*a*c*sqrt(-S(4)*a*c + b**S(2)) + b**S(3) + b**S(2)*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*(A*c*(S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))) + C*(-S(8)*a*b*c + S(6)*a*c*sqrt(-S(4)*a*c + b**S(2)) + b**S(3) - b**S(2)*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, sqrt(S(2))*B*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*B*(S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x*(S(2)*B*a + B*b*x**S(2) - x**S(3)*(S(2)*A*c - C*b) - x*(A*b - S(2)*C*a))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (A*b - S(2)*C*a)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -B*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - x*(A*b + B*b*x + S(2)*B*c*x**S(3) - S(2)*C*a + x**S(2)*(S(2)*A*c - C*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(S(2)*A*c*(S(2)*b + sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(S(2)*A*c*(S(2)*b - sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -sqrt(S(2))*B*sqrt(c)*(S(2)*b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*B*sqrt(c)*(S(2)*b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (S(2)*A*c - C*b)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - x*(B*a*b + S(2)*B*a*c*x**S(2) - c*x**S(3)*(A*b - S(2)*C*a) - x*(A*(-S(2)*a*c + b**S(2)) - C*a*b))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, S(2)*B*c*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + sqrt(S(2))*sqrt(c)*(A*b - S(2)*C*a - (-S(12)*A*a*c + A*b**S(2) + S(4)*C*a*b)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*(A*b - S(2)*C*a + (A*(-S(12)*a*c + b**S(2)) + S(4)*C*a*b)/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + x*(A*(-S(2)*a*c + b**S(2)) + B*b*c*x**S(3) + B*x*(-S(2)*a*c + b**S(2)) - C*a*b + c*x**S(2)*(A*b - S(2)*C*a))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))/(x*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, A*log(x)/a**S(2) - A*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)) - sqrt(S(2))*B*sqrt(c)*(-S(12)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*B*sqrt(c)*(-S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + B*x*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + (A*(-S(2)*a*c + b**S(2)) - C*a*b + c*x**S(2)*(A*b - S(2)*C*a))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + (A*(-S(6)*a*b*c + b**S(3)) + S(4)*C*a**S(2)*c)*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))/(x**S(2)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, B*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + B*b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + B*log(x)/a**S(2) - B*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)) + (A*(-S(2)*a*c + b**S(2)) - C*a*b + c*x**S(2)*(A*b - S(2)*C*a))/(S(2)*a*x*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*sqrt(c)*(-S(10)*A*a*c + S(3)*A*b**S(2) - C*a*b - (A*(-S(16)*a*b*c + S(3)*b**S(3)) - C*a*(-S(12)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*sqrt(c)*(A*(-S(16)*a*b*c - S(10)*a*c*sqrt(-S(4)*a*c + b**S(2)) + S(3)*b**S(3) + S(3)*b**S(2)*sqrt(-S(4)*a*c + b**S(2))) - C*a*(-S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (-S(10)*A*a*c + S(3)*A*b**S(2) - C*a*b)/(S(2)*a**S(2)*x*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2))/(x**S(3)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, B*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*x*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*B*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) - (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*B*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) + (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - B*(-S(10)*a*c + S(3)*b**S(2))/(S(2)*a**S(2)*x*(-S(4)*a*c + b**S(2))) + (A*(-S(2)*a*c + b**S(2)) - C*a*b + c*x**S(2)*(A*b - S(2)*C*a))/(S(2)*a*x**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (-S(6)*A*a*c + S(2)*A*b**S(2) - C*a*b)/(S(2)*a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) - (S(2)*A*b - C*a)*log(x)/a**S(3) + (S(2)*A*b - C*a)*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(3)) - (S(2)*A*(S(6)*a**S(2)*c**S(2) - S(6)*a*b**S(2)*c + b**S(4)) - C*a*b*(-S(6)*a*c + b**S(2)))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(A + B*x + C*x**S(2))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -B*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - x*(A*b + B*b*x + S(2)*B*c*x**S(3) - S(2)*C*a + x**S(2)*(S(2)*A*c - C*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(S(2)*A*c*(S(2)*b + sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(S(2)*A*c*(S(2)*b - sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(A*x + B*x**S(2) + C*x**S(3))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -B*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - x*(A*b + B*b*x + S(2)*B*c*x**S(3) - S(2)*C*a + x**S(2)*(S(2)*A*c - C*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(S(2)*A*c*(S(2)*b + sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(S(2)*A*c*(S(2)*b - sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A*x**S(2) + B*x**S(3) + C*x**S(4))/(a + b*x**S(2) + c*x**S(4))**S(2), x), x, -B*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - x*(A*b + B*b*x + S(2)*B*c*x**S(3) - S(2)*C*a + x**S(2)*(S(2)*A*c - C*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(S(2)*A*c*(S(2)*b + sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(S(2)*A*c*(S(2)*b - sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A*x**S(3) + B*x**S(4) + C*x**S(5))/(x*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, -B*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - x*(A*b + B*b*x + S(2)*B*c*x**S(3) - S(2)*C*a + x**S(2)*(S(2)*A*c - C*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(S(2)*A*c*(S(2)*b + sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(S(2)*A*c*(S(2)*b - sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A*x**S(4) + B*x**S(5) + C*x**S(6))/(x**S(2)*(a + b*x**S(2) + c*x**S(4))**S(2)), x), x, -B*b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - x*(A*b + B*b*x + S(2)*B*c*x**S(3) - S(2)*C*a + x**S(2)*(S(2)*A*c - C*b))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) - sqrt(S(2))*(S(2)*A*c*(S(2)*b + sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*(S(2)*A*c*(S(2)*b - sqrt(-S(4)*a*c + b**S(2))) - C*(S(4)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2))))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(2) + f*x**S(4) + g*x**S(6))/(a + b*x**S(2) + c*x**S(4)), x), x, g*x**S(4)/(S(4)*c) + x**S(2)*(-b*g + c*f)/(S(2)*c**S(2)) + (b**S(2)*g + c**S(2)*e - c*(a*g + b*f))*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)) - (-b**S(3)*g + b*c*(S(3)*a*g + b*f) + S(2)*c**S(3)*d - c**S(2)*(S(2)*a*f + b*e))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2) + c*x**S(4))**p*(S(3)*a + b*x**S(2)*(S(2)*p + S(5)) + c*x**S(4)*(S(4)*p + S(7))), x), x, x**S(3)*(a + b*x**S(2) + c*x**S(4))**(p + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n/S(4) + S(-1))*(-a*h + c*f*x**(n/S(4)) + c*g*x**(S(3)*n/S(4)) + c*h*x**n)/(a + c*x**n)**(S(3)/2), x), x, -(S(2)*a*g + S(4)*a*h*x**(n/S(4)) - S(2)*c*f*x**(n/S(2)))/(a*n*sqrt(a + c*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(n/S(4) + S(-1))*(-a*h + c*f*x**(n/S(4)) + c*g*x**(S(3)*n/S(4)) + c*h*x**n)/(a + c*x**n)**(S(3)/2), x), x, -S(2)*x**(-n/S(4) + S(1))*(d*x)**(n/S(4) + S(-1))*(a*g + S(2)*a*h*x**(n/S(4)) - c*f*x**(n/S(2)))/(a*n*sqrt(a + c*x**n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n/S(2) + S(-1))*(-a*h + c*f*x**(n/S(2)) + c*g*x**(S(3)*n/S(2)) + c*h*x**(S(2)*n))/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, -(S(2)*c*x**n*(-b*g + S(2)*c*f) + S(2)*c*(-S(2)*a*g + b*f) + S(2)*h*x**(n/S(2))*(-S(4)*a*c + b**S(2)))/(n*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(n/S(2) + S(-1))*(-a*h + c*f*x**(n/S(2)) + c*g*x**(S(3)*n/S(2)) + c*h*x**(S(2)*n))/(a + b*x**n + c*x**(S(2)*n))**(S(3)/2), x), x, -S(2)*x**(-n/S(2) + S(1))*(d*x)**(n/S(2) + S(-1))*(c*x**n*(-b*g + S(2)*c*f) + c*(-S(2)*a*g + b*f) + h*x**(n/S(2))*(-S(4)*a*c + b**S(2)))/(n*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**n + c*x**(S(2)*n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((g*x)**m*(a + b*x**n + c*x**(S(2)*n))**p*(a*(m + S(1)) + b*x**n*(m + n*p + n + S(1)) + c*x**(S(2)*n)*(m + S(2)*n*(p + S(1)) + S(1))), x), x, (g*x)**(m + S(1))*(a + b*x**n + c*x**(S(2)*n))**(p + S(1))/g, expand=True, _diff=True, _numerical=True) def test_5(): assert rubi_test(rubi_integrate(x**S(2)*(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, a*x**S(5)/S(5) + b*x**S(6)/S(6) + c*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, a*x**S(4)/S(4) + b*x**S(5)/S(5) + c*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a*x**S(2) + b*x**S(3) + c*x**S(4), x), x, a*x**S(3)/S(3) + b*x**S(4)/S(4) + c*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))/x, x), x, a*x**S(2)/S(2) + b*x**S(3)/S(3) + c*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))/x**S(2), x), x, a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, a**S(2)*x**S(7)/S(7) + a*b*x**S(8)/S(4) + b*c*x**S(10)/S(5) + c**S(2)*x**S(11)/S(11) + x**S(9)*(S(2)*a*c + b**S(2))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, a**S(2)*x**S(6)/S(6) + S(2)*a*b*x**S(7)/S(7) + S(2)*b*c*x**S(9)/S(9) + c**S(2)*x**S(10)/S(10) + x**S(8)*(S(2)*a*c + b**S(2))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, a**S(2)*x**S(5)/S(5) + a*b*x**S(6)/S(3) + b*c*x**S(8)/S(4) + c**S(2)*x**S(9)/S(9) + x**S(7)*(S(2)*a*c + b**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2)/x, x), x, a**S(2)*x**S(4)/S(4) + S(2)*a*b*x**S(5)/S(5) + S(2)*b*c*x**S(7)/S(7) + c**S(2)*x**S(8)/S(8) + x**S(6)*(S(2)*a*c + b**S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2)/x**S(2), x), x, a**S(2)*x**S(3)/S(3) + a*b*x**S(4)/S(2) + b*c*x**S(6)/S(3) + c**S(2)*x**S(7)/S(7) + x**S(5)*(S(2)*a*c + b**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, -b*x/c**S(2) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(3)*sqrt(-S(4)*a*c + b**S(2))) + x**S(2)/(S(2)*c) + (-a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, -b*log(a + b*x + c*x**S(2))/(S(2)*c**S(2)) + x/c - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, b*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c*sqrt(-S(4)*a*c + b**S(2))) + log(a + b*x + c*x**S(2))/(S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, -S(2)*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, b*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a*sqrt(-S(4)*a*c + b**S(2))) + log(x)/a - log(a + b*x + c*x**S(2))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, -S(1)/(a*x) - b*log(x)/a**S(2) + b*log(a + b*x + c*x**S(2))/(S(2)*a**S(2)) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a*x**S(2) + b*x**S(3) + c*x**S(4))), x), x, -S(1)/(S(2)*a*x**S(2)) + b/(a**S(2)*x) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*sqrt(-S(4)*a*c + b**S(2))) + (-a*c + b**S(2))*log(x)/a**S(3) - (-a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a*x**S(2) + b*x**S(3) + c*x**S(4))), x), x, -S(1)/(S(3)*a*x**S(3)) + b/(S(2)*a**S(2)*x**S(2)) - (-a*c + b**S(2))/(a**S(3)*x) - b*(-S(2)*a*c + b**S(2))*log(x)/a**S(4) + b*(-S(2)*a*c + b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*a**S(4)) - (S(2)*a**S(2)*c**S(2) - S(4)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(4)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, -b*x**S(2)/(c*(-S(4)*a*c + b**S(2))) - b*log(a + b*x + c*x**S(2))/c**S(3) + x**S(3)*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + x*(-S(6)*a*c + S(2)*b**S(2))/(c**S(2)*(-S(4)*a*c + b**S(2))) - (S(12)*a**S(2)*c**S(2) - S(12)*a*b**S(2)*c + S(2)*b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, -b*x/(c*(-S(4)*a*c + b**S(2))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(c**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x**S(2)*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + log(a + b*x + c*x**S(2))/(S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, S(4)*a*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + x*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, -S(2)*b*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + (S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, S(4)*c*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - (b + S(2)*c*x)/((-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(a*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + log(x)/a**S(2) - log(a + b*x + c*x**S(2))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(a*x*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) + (S(6)*a*c - S(2)*b**S(2))/(a**S(2)*x*(-S(4)*a*c + b**S(2))) - S(2)*b*log(x)/a**S(3) + b*log(a + b*x + c*x**S(2))/a**S(3) - (S(12)*a**S(2)*c**S(2) - S(12)*a*b**S(2)*c + S(2)*b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(a*x**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) - (-S(8)*a*c + S(3)*b**S(2))/(S(2)*a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) + b*(-S(11)*a*c + S(3)*b**S(2))/(a**S(3)*x*(-S(4)*a*c + b**S(2))) + b*(S(30)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (-S(2)*a*c + S(3)*b**S(2))*log(x)/a**S(4) - (-S(2)*a*c + S(3)*b**S(2))*log(a + b*x + c*x**S(2))/(S(2)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(-2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(a*x**S(3)*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) - (-S(10)*a*c + S(4)*b**S(2))/(S(3)*a**S(2)*x**S(3)*(-S(4)*a*c + b**S(2))) + b*(-S(7)*a*c + S(2)*b**S(2))/(a**S(3)*x**S(2)*(-S(4)*a*c + b**S(2))) - (S(10)*a**S(2)*c**S(2) - S(18)*a*b**S(2)*c + S(4)*b**S(4))/(a**S(4)*x*(-S(4)*a*c + b**S(2))) - S(2)*b*(-S(3)*a*c + S(2)*b**S(2))*log(x)/a**S(5) + b*(-S(3)*a*c + S(2)*b**S(2))*log(a + b*x + c*x**S(2))/a**S(5) - (-S(20)*a**S(3)*c**S(3) + S(60)*a**S(2)*b**S(2)*c**S(2) - S(30)*a*b**S(4)*c + S(4)*b**S(6))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(5)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a*x**S(2) + b*x**S(3) + c*x**S(4))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x)/(a*x**S(4)*(-S(4)*a*c + b**S(2))*(a + b*x + c*x**S(2))) - (-S(12)*a*c + S(5)*b**S(2))/(S(4)*a**S(2)*x**S(4)*(-S(4)*a*c + b**S(2))) + b*(-S(17)*a*c + S(5)*b**S(2))/(S(3)*a**S(3)*x**S(3)*(-S(4)*a*c + b**S(2))) - (S(12)*a**S(2)*c**S(2) - S(22)*a*b**S(2)*c + S(5)*b**S(4))/(S(2)*a**S(4)*x**S(2)*(-S(4)*a*c + b**S(2))) + b*(S(29)*a**S(2)*c**S(2) - S(27)*a*b**S(2)*c + S(5)*b**S(4))/(a**S(5)*x*(-S(4)*a*c + b**S(2))) + b*(-S(70)*a**S(3)*c**S(3) + S(105)*a**S(2)*b**S(2)*c**S(2) - S(42)*a*b**S(4)*c + S(5)*b**S(6))*atanh((b + S(2)*c*x)/sqrt(-S(4)*a*c + b**S(2)))/(a**S(6)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (S(3)*a**S(2)*c**S(2) - S(12)*a*b**S(2)*c + S(5)*b**S(4))*log(x)/a**S(6) - (S(3)*a**S(2)*c**S(2) - S(12)*a*b**S(2)*c + S(5)*b**S(4))*log(a + b*x + c*x**S(2))/(S(2)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, b*(-S(116)*a*c + S(35)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(960)*c**S(3)) + b*x*(-S(12)*a*c + S(7)*b**S(2))*(-S(4)*a*c + b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(256)*c**(S(9)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + x**S(2)*(b + S(8)*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(40)*c) - x*(-S(16)*a*c + S(7)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(240)*c**S(2)) - sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(256)*a**S(2)*c**S(2) - S(460)*a*b**S(2)*c + S(105)*b**S(4))/(S(1920)*c**S(4)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, b*(-S(52)*a*c + S(15)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(192)*c**S(3)*x) + x*(b + S(6)*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(24)*c) - (-S(12)*a*c + S(5)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(96)*c**S(2)) - x*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(5)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(128)*c**(S(7)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, -b*(b + S(2)*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(8)*c**S(2)*x) + b*(-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(16)*c**(S(5)/2)*x*sqrt(a + b*x + c*x**S(2))) + (a + b*x + c*x**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(3)*c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/x, x), x, (b + S(2)*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*c*x) - x*(-S(4)*a*c + b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(8)*c**(S(3)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/x**S(2), x), x, -sqrt(a)*x*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)) + b*x*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(2)*sqrt(c)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/x**S(3), x), x, sqrt(c)*x*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)) - sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/x**S(2) - b*x*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(2)*sqrt(a)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/x**S(4), x), x, -sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(2)*x**S(3)) - b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*a*x**S(2)) + x*(-S(4)*a*c + b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(8)*a**(S(3)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/x**S(5), x), x, -sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(3)*x**S(4)) - b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(12)*a*x**S(3)) + (-S(8)*a*c + S(3)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(24)*a**S(2)*x**S(2)) - b*x*(-S(4)*a*c + b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(16)*a**(S(5)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/x**S(6), x), x, -sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*x**S(5)) - b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(24)*a*x**S(4)) + (-S(12)*a*c + S(5)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(96)*a**S(2)*x**S(3)) - b*(-S(52)*a*c + S(15)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(192)*a**S(3)*x**S(2)) + x*(-S(4)*a*c + b**S(2))*(-S(4)*a*c + S(5)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(128)*a**(S(7)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, -b*x*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(2416)*a**S(2)*c**S(2) - S(1560)*a*b**S(2)*c + S(231)*b**S(4))/(S(71680)*c**S(4)) - b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(-S(58816)*a**S(3)*c**S(3) + S(81648)*a**S(2)*b**S(2)*c**S(2) - S(30660)*a*b**S(4)*c + S(3465)*b**S(6))/(S(573440)*c**S(6)*x) + x*(S(3)*b + S(14)*c*x)*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(112)*c) - x**S(3)*(b*(S(68)*a*c + S(11)*b**S(2)) + S(10)*c*x*(-S(28)*a*c + S(11)*b**S(2)))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4480)*c**S(2)) + x**S(2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(560)*a**S(2)*c**S(2) - S(568)*a*b**S(2)*c + S(99)*b**S(4))/(S(35840)*c**S(3)) + sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(-S(6720)*a**S(3)*c**S(3) + S(18896)*a**S(2)*b**S(2)*c**S(2) - S(8988)*a*b**S(4)*c + S(1155)*b**S(6))/(S(286720)*c**S(5)) + S(3)*x*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x + c*x**S(2))*(S(16)*a**S(2)*c**S(2) - S(72)*a*b**S(2)*c + S(33)*b**S(4))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(32768)*c**(S(13)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, -b*x**S(2)*(-S(44)*a*c + S(9)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(2240)*c**S(2)) - b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(1168)*a**S(2)*c**S(2) - S(728)*a*b**S(2)*c + S(105)*b**S(4))/(S(17920)*c**S(4)) - S(3)*b*x*(-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(3)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(2048)*c**(S(11)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + x*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/S(7) + x**S(3)*(S(24)*a*c + b**S(2) + S(10)*b*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(280)*c) + x*(-S(32)*a*c + S(7)*b**S(2))*(-S(4)*a*c + S(3)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4480)*c**S(3)) + sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(-S(2048)*a**S(3)*c**S(3) + S(5488)*a**S(2)*b**S(2)*c**S(2) - S(2520)*a*b**S(4)*c + S(315)*b**S(6))/(S(35840)*c**S(5)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x, x), x, -b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(1296)*a**S(2)*c**S(2) - S(760)*a*b**S(2)*c + S(105)*b**S(4))/(S(7680)*c**S(4)*x) + (S(3)*b + S(10)*c*x)*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(60)*c*x) - x*(b*(S(12)*a*c + S(7)*b**S(2)) + S(6)*c*x*(-S(20)*a*c + S(7)*b**S(2)))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(960)*c**S(2)) + sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(240)*a**S(2)*c**S(2) - S(216)*a*b**S(2)*c + S(35)*b**S(4))/(S(3840)*c**S(3)) + x*(-S(4)*a*c + b**S(2))**S(2)*(-S(4)*a*c + S(7)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(1024)*c**(S(9)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(2), x), x, -b*(b + S(2)*c*x)*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(16)*c**S(2)*x**S(3)) + S(3)*b*(b + S(2)*c*x)*(-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(128)*c**S(3)*x) - S(3)*b*x*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(256)*c**(S(7)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + (a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(5)/2)/(S(5)*c*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(3), x), x, (b + S(2)*c*x)*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(8)*c*x**S(3)) - (b + S(2)*c*x)*(-S(12)*a*c + S(3)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(64)*c**S(2)*x) + S(3)*x*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(128)*c**(S(5)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(4), x), x, -a**(S(3)/2)*x*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)) - b*x*(-S(12)*a*c + b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(16)*c**(S(3)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + (a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(3)*x**S(3)) + (S(8)*a*c + b**S(2) + S(2)*b*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(8)*c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(5), x), x, -S(3)*sqrt(a)*b*x*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + (S(9)*b + S(6)*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*x) - (a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(4) + x*(S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(8)*sqrt(c)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(6), x), x, S(3)*b*sqrt(c)*x*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) - (S(3)*b - S(6)*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*x**S(2)) - (a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(2)*x**S(5)) - x*(S(12)*a*c + S(3)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(8)*sqrt(a)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(7), x), x, c**(S(3)/2)*x*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)) - (a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(3)*x**S(6)) - b*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(4)*a*x**S(5)) + (-S(8)*a*c + b**S(2) + S(2)*b*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(8)*a*x**S(2)) + b*x*(-S(12)*a*c + b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(16)*a**(S(3)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(8), x), x, -(b + S(6)*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(8)*x**S(4)) - (a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(4)*x**S(7)) - (-S(12)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(32)*a*x**S(3)) + b*(-S(20)*a*c + S(3)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(64)*a**S(2)*x**S(2)) - S(3)*x*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(128)*a**(S(5)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/x**S(9), x), x, -(S(3)*b + S(12)*c*x)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(40)*x**S(5)) - (a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)/(S(5)*x**S(8)) - (-S(8)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(80)*a*x**S(4)) + b*(-S(28)*a*c + S(5)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(320)*a**S(2)*x**S(3)) - sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(128)*a**S(2)*c**S(2) - S(100)*a*b**S(2)*c + S(15)*b**S(4))/(S(640)*a**S(3)*x**S(2)) + S(3)*b*x*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(256)*a**(S(7)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, -S(3)*b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*c**S(2)*x) + sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(2)*c) + x*(-S(4)*a*c + S(3)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(8)*c**(S(5)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, -b*x*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(2)*c**(S(3)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, x*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(sqrt(c)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4)), x), x, -x*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(sqrt(a)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), x), x, -sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(a*x**S(2)) + b*x*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(2)*a**(S(3)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), x), x, -sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(2)*a*x**S(3)) + S(3)*b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*a**S(2)*x**S(2)) - x*(-S(4)*a*c + S(3)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(8)*a**(S(5)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, -S(2)*b*x*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(c*(-S(4)*a*c + b**S(2))) - b*(-S(52)*a*c + S(15)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*c**S(3)*x*(-S(4)*a*c + b**S(2))) + S(2)*x**S(4)*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + (-S(12)*a*c + S(5)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))) + x*(-S(12)*a*c + S(15)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(8)*c**(S(7)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, -S(2)*b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(c*(-S(4)*a*c + b**S(2))) - S(3)*b*x*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(S(2)*c**(S(5)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + S(2)*x**S(3)*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + (-S(8)*a*c + S(3)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(c**S(2)*x*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, -S(2)*b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(c*x*(-S(4)*a*c + b**S(2))) + S(2)*x**S(2)*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) + x*sqrt(a + b*x + c*x**S(2))*atanh((b + S(2)*c*x)/(S(2)*sqrt(c)*sqrt(a + b*x + c*x**S(2))))/(c**(S(3)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, S(2)*x*(S(2)*a + b*x)/((-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, -S(2)*x*(b + S(2)*c*x)/((-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, S(2)*x*(-S(2)*a*c + b**S(2) + b*c*x)/(a*(-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) - x*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(a**(S(3)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x)/(a*(-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) - (-S(8)*a*c + S(3)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) + S(3)*b*x*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(2)*a**(S(5)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(-3)/2), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x)/(a*x*(-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) - (-S(12)*a*c + S(5)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(2)*a**S(2)*x**S(3)*(-S(4)*a*c + b**S(2))) + b*(-S(52)*a*c + S(15)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*a**S(3)*x**S(2)*(-S(4)*a*c + b**S(2))) - x*(-S(12)*a*c + S(15)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(8)*a**(S(7)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x)/(a*x**S(2)*(-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) - (-S(16)*a*c + S(7)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(3)*a**S(2)*x**S(4)*(-S(4)*a*c + b**S(2))) + b*(-S(116)*a*c + S(35)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(12)*a**S(3)*x**S(3)*(-S(4)*a*c + b**S(2))) - sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(256)*a**S(2)*c**S(2) - S(460)*a*b**S(2)*c + S(105)*b**S(4))/(S(24)*a**S(4)*x**S(2)*(-S(4)*a*c + b**S(2))) + S(5)*b*x*(-S(12)*a*c + S(7)*b**S(2))*sqrt(a + b*x + c*x**S(2))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(16)*a**(S(9)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a*x**S(2) + b*x**S(3) + c*x**S(4))**(S(3)/2)), x), x, (-S(4)*a*c + S(2)*b**S(2) + S(2)*b*c*x)/(a*x**S(3)*(-S(4)*a*c + b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))) - (-S(20)*a*c + S(9)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(4)*a**S(2)*x**S(5)*(-S(4)*a*c + b**S(2))) + b*(-S(68)*a*c + S(21)*b**S(2))*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))/(S(8)*a**S(3)*x**S(4)*(-S(4)*a*c + b**S(2))) - sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(240)*a**S(2)*c**S(2) - S(448)*a*b**S(2)*c + S(105)*b**S(4))/(S(32)*a**S(4)*x**S(3)*(-S(4)*a*c + b**S(2))) + b*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))*(S(1808)*a**S(2)*c**S(2) - S(1680)*a*b**S(2)*c + S(315)*b**S(4))/(S(64)*a**S(5)*x**S(2)*(-S(4)*a*c + b**S(2))) - x*sqrt(a + b*x + c*x**S(2))*(S(240)*a**S(2)*c**S(2) - S(840)*a*b**S(2)*c + S(315)*b**S(4))*atanh((S(2)*a + b*x)/(S(2)*sqrt(a)*sqrt(a + b*x + c*x**S(2))))/(S(128)*a**(S(11)/2)*sqrt(a*x**S(2) + b*x**S(3) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a*x + b*x**S(3) + c*x**S(5)), x), x, a*x**(m + S(2))/(m + S(2)) + b*x**(m + S(4))/(m + S(4)) + c*x**(m + S(6))/(m + S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a*x + b*x**S(3) + c*x**S(5)), x), x, a*x**S(4)/S(4) + b*x**S(6)/S(6) + c*x**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a*x + b*x**S(3) + c*x**S(5)), x), x, a*x**S(3)/S(3) + b*x**S(5)/S(5) + c*x**S(7)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a*x + b*x**S(3) + c*x**S(5), x), x, a*x**S(2)/S(2) + b*x**S(4)/S(4) + c*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))/x, x), x, a*x + b*x**S(3)/S(3) + c*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))/x**S(2), x), x, a*log(x) + b*x**S(2)/S(2) + c*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))/x**S(3), x), x, -a/x + b*x + c*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, a**S(2)*x**(m + S(3))/(m + S(3)) + S(2)*a*b*x**(m + S(5))/(m + S(5)) + S(2)*b*c*x**(m + S(9))/(m + S(9)) + c**S(2)*x**(m + S(11))/(m + S(11)) + x**(m + S(7))*(S(2)*a*c + b**S(2))/(m + S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, a**S(2)*x**S(5)/S(5) + S(2)*a*b*x**S(7)/S(7) + S(2)*b*c*x**S(11)/S(11) + c**S(2)*x**S(13)/S(13) + x**S(9)*(S(2)*a*c + b**S(2))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, a**S(2)*x**S(4)/S(4) + a*b*x**S(6)/S(3) + b*c*x**S(10)/S(5) + c**S(2)*x**S(12)/S(12) + x**S(8)*(S(2)*a*c + b**S(2))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, a**S(2)*x**S(3)/S(3) + S(2)*a*b*x**S(5)/S(5) + S(2)*b*c*x**S(9)/S(9) + c**S(2)*x**S(11)/S(11) + x**S(7)*(S(2)*a*c + b**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))**S(2)/x, x), x, a**S(2)*x**S(2)/S(2) + a*b*x**S(4)/S(2) + b*c*x**S(8)/S(4) + c**S(2)*x**S(10)/S(10) + x**S(6)*(S(2)*a*c + b**S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))**S(2)/x**S(2), x), x, a**S(2)*x + S(2)*a*b*x**S(3)/S(3) + S(2)*b*c*x**S(7)/S(7) + c**S(2)*x**S(9)/S(9) + x**S(5)*(S(2)*a*c + b**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a*x + b*x**S(3) + c*x**S(5)), x), x, -b*x**S(2)/(S(2)*c**S(2)) + b*(-S(3)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(3)*sqrt(-S(4)*a*c + b**S(2))) + x**S(4)/(S(4)*c) + (-a*c + b**S(2))*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a*x + b*x**S(3) + c*x**S(5)), x), x, -b*x/c**S(2) + x**S(3)/(S(3)*c) + sqrt(S(2))*(-a*c + b**S(2) + b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(-a*c + b**S(2) - b*(-S(3)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a*x + b*x**S(3) + c*x**S(5)), x), x, -b*log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)) + x**S(2)/(S(2)*c) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a*x + b*x**S(3) + c*x**S(5)), x), x, x/c - sqrt(S(2))*(b - (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*(b + (-S(2)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a*x + b*x**S(3) + c*x**S(5)), x), x, b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c*sqrt(-S(4)*a*c + b**S(2))) + log(a + b*x**S(2) + c*x**S(4))/(S(4)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*x + b*x**S(3) + c*x**S(5)), x), x, -sqrt(S(2))*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*x + b*x**S(3) + c*x**S(5)), x), x, -atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*x + b*x**S(3) + c*x**S(5)), x), x, -sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))) + sqrt(S(2))*sqrt(c)*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*x + b*x**S(3) + c*x**S(5)), x), x, b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a*sqrt(-S(4)*a*c + b**S(2))) + log(x)/a - log(a + b*x**S(2) + c*x**S(4))/(S(4)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a*x + b*x**S(3) + c*x**S(5))), x), x, -sqrt(S(2))*sqrt(c)*(-b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) - sqrt(S(2))*sqrt(c)*(b/sqrt(-S(4)*a*c + b**S(2)) + S(1))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))) - S(1)/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a*x + b*x**S(3) + c*x**S(5))), x), x, -S(1)/(S(2)*a*x**S(2)) - b*log(x)/a**S(2) + b*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)) - (-S(2)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*sqrt(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(11)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, -b*x**S(4)/(S(2)*c*(-S(4)*a*c + b**S(2))) - b*log(a + b*x**S(2) + c*x**S(4))/(S(2)*c**S(3)) + x**S(6)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + x**S(2)*(-S(3)*a*c + b**S(2))/(c**S(2)*(-S(4)*a*c + b**S(2))) - (S(6)*a**S(2)*c**S(2) - S(6)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(c**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(10)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, -b*x**S(3)/(S(2)*c*(-S(4)*a*c + b**S(2))) + x**S(5)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + x*(-S(10)*a*c + S(3)*b**S(2))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*(-S(13)*a*b*c + S(3)*b**S(3) + (S(20)*a**S(2)*c**S(2) - S(19)*a*b**S(2)*c + S(3)*b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(5)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*(-S(13)*a*b*c + S(3)*b**S(3) - (S(20)*a**S(2)*c**S(2) - S(19)*a*b**S(2)*c + S(3)*b**S(4))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(5)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, -b*x**S(2)/(S(2)*c*(-S(4)*a*c + b**S(2))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*c**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x**S(4)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + log(a + b*x**S(2) + c*x**S(4))/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, -b*x/(S(2)*c*(-S(4)*a*c + b**S(2))) + x**S(3)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(-S(6)*a*c + b**S(2) + b*(-S(8)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(-S(6)*a*c + b**S(2) - b*(-S(8)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*c**(S(3)/2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, S(2)*a*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + x**S(2)*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, x*(S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*(b - (S(4)*a*c + b**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))) + sqrt(S(2))*(S(4)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, -b*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) + (S(2)*a + b*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, -sqrt(S(2))*sqrt(c)*(S(2)*b + sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(S(2)*b - sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - x*(b + S(2)*c*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, S(2)*c*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(-S(4)*a*c + b**S(2))**(S(3)/2) - (b + S(2)*c*x**S(2))/((-S(8)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, -sqrt(S(2))*sqrt(c)*(-S(12)*a*c + b**S(2) - b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(-S(12)*a*c + b**S(2) + b*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + x*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*x + b*x**S(3) + c*x**S(5))**S(2), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + b*(-S(6)*a*c + b**S(2))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(2)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + log(x)/a**S(2) - log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))**(S(-2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*x*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) + sqrt(S(2))*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) - (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - sqrt(S(2))*sqrt(c)*(-S(16)*a*b*c + S(3)*b**S(3) + (-S(10)*a*c + S(3)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(2)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) - (-S(10)*a*c + S(3)*b**S(2))/(S(2)*a**S(2)*x*(-S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a*x + b*x**S(3) + c*x**S(5))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*x**S(2)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (-S(3)*a*c + b**S(2))/(a**S(2)*x**S(2)*(-S(4)*a*c + b**S(2))) - S(2)*b*log(x)/a**S(3) + b*log(a + b*x**S(2) + c*x**S(4))/(S(2)*a**S(3)) - (S(6)*a**S(2)*c**S(2) - S(6)*a*b**S(2)*c + b**S(4))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(a**S(3)*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a*x + b*x**S(3) + c*x**S(5))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*x**S(3)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (-S(14)*a*c + S(5)*b**S(2))/(S(6)*a**S(2)*x**S(3)*(-S(4)*a*c + b**S(2))) + b*(-S(19)*a*c + S(5)*b**S(2))/(S(2)*a**S(3)*x*(-S(4)*a*c + b**S(2))) - sqrt(S(2))*sqrt(c)*(S(28)*a**S(2)*c**S(2) - S(29)*a*b**S(2)*c + S(5)*b**S(4) - b*(-S(19)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(3)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)) + sqrt(S(2))*sqrt(c)*(S(28)*a**S(2)*c**S(2) - S(29)*a*b**S(2)*c + S(5)*b**S(4) + b*(-S(19)*a*c + S(5)*b**S(2))*sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(4)*a**S(3)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))*(-S(4)*a*c + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a*x + b*x**S(3) + c*x**S(5))**S(2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(S(2)*a*x**S(4)*(-S(4)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))) - (-S(8)*a*c + S(3)*b**S(2))/(S(4)*a**S(2)*x**S(4)*(-S(4)*a*c + b**S(2))) + b*(-S(11)*a*c + S(3)*b**S(2))/(S(2)*a**S(3)*x**S(2)*(-S(4)*a*c + b**S(2))) + b*(S(30)*a**S(2)*c**S(2) - S(20)*a*b**S(2)*c + S(3)*b**S(4))*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/(S(2)*a**S(4)*(-S(4)*a*c + b**S(2))**(S(3)/2)) + (-S(2)*a*c + S(3)*b**S(2))*log(x)/a**S(4) - (-S(2)*a*c + S(3)*b**S(2))*log(a + b*x**S(2) + c*x**S(4))/(S(4)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*sqrt(a*x + b*x**S(3) + c*x**S(5)), x), x, S(2)*a**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(15)*c**(S(7)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) - a**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*b*sqrt(c) - S(6)*a*c + S(2)*b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(30)*c**(S(7)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + sqrt(x)*(b + S(3)*c*x**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))/(S(15)*c) - x**(S(3)/2)*(-S(6)*a*c + S(2)*b**S(2))*(a + b*x**S(2) + c*x**S(4))/(S(15)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*sqrt(a*x + b*x**S(3) + c*x**S(5)), x), x, (b + S(2)*c*x**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))/(S(8)*c*sqrt(x)) - sqrt(x)*(-S(4)*a*c + b**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(16)*c**(S(3)/2)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x + b*x**S(3) + c*x**S(5))/sqrt(x), x), x, -a**(S(1)/4)*b*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(3)*c**(S(3)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + a**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(2)*sqrt(a)*sqrt(c) + b)*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(6)*c**(S(3)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + b*x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))/(S(3)*sqrt(c)*(sqrt(a) + sqrt(c)*x**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) + sqrt(x)*sqrt(a*x + b*x**S(3) + c*x**S(5))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x + b*x**S(3) + c*x**S(5))/x**(S(3)/2), x), x, -sqrt(a)*sqrt(x)*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + b*sqrt(x)*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*sqrt(c)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + sqrt(a*x + b*x**S(3) + c*x**S(5))/(S(2)*sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)*(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2), x), x, -S(3)*b*sqrt(x)*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(512)*c**(S(7)/2)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + sqrt(x)*(S(3)*b + S(8)*c*x**S(2))*(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2)/(S(80)*c) - x**(S(3)/2)*(b*(-S(4)*a*c + S(5)*b**S(2)) + S(4)*c*x**S(2)*(-S(16)*a*c + S(5)*b**S(2)))*sqrt(a*x + b*x**S(3) + c*x**S(5))/(S(640)*c**S(2)) + sqrt(a*x + b*x**S(3) + c*x**S(5))*(S(128)*a**S(2)*c**S(2) - S(100)*a*b**S(2)*c + S(15)*b**S(4))/(S(1280)*c**S(3)*sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2), x), x, -a**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(84)*a**S(2)*c**S(2) - S(57)*a*b**S(2)*c + S(8)*b**S(4))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(315)*c**(S(11)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + a**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(S(4)*sqrt(a)*b*sqrt(c)*(-S(6)*a*c + b**S(2)) + S(84)*a**S(2)*c**S(2) - S(57)*a*b**S(2)*c + S(8)*b**S(4))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(630)*c**(S(11)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + (S(3)*b + S(7)*c*x**S(2))*(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2)/(S(63)*c*sqrt(x)) - sqrt(x)*(b*(-S(9)*a*c + S(4)*b**S(2)) + S(6)*c*x**S(2)*(-S(7)*a*c + S(2)*b**S(2)))*sqrt(a*x + b*x**S(3) + c*x**S(5))/(S(315)*c**S(2)) + x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))*(S(84)*a**S(2)*c**S(2) - S(57)*a*b**S(2)*c + S(8)*b**S(4))/(S(315)*c**(S(5)/2)*(sqrt(a) + sqrt(c)*x**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))**(S(3)/2)/sqrt(x), x), x, (b + S(2)*c*x**S(2))*(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2)/(S(16)*c*x**(S(3)/2)) - (b + S(2)*c*x**S(2))*(-S(12)*a*c + S(3)*b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))/(S(128)*c**S(2)*sqrt(x)) + S(3)*sqrt(x)*(-S(4)*a*c + b**S(2))**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(256)*c**(S(5)/2)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + b*x**S(3) + c*x**S(5))**(S(3)/2)/x**(S(3)/2), x), x, S(2)*a**(S(1)/4)*b*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(8)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(35)*c**(S(7)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) - a**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*sqrt(c)*(-S(20)*a*c + b**S(2)) + S(2)*b*(-S(8)*a*c + b**S(2)))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(70)*c**(S(7)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) - S(2)*b*x**(S(3)/2)*(-S(8)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))/(S(35)*c**(S(3)/2)*(sqrt(a) + sqrt(c)*x**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) + (a*x + b*x**S(3) + c*x**S(5))**(S(3)/2)/(S(7)*sqrt(x)) + sqrt(x)*(S(10)*a*c + b**S(2) + S(3)*b*c*x**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))/(S(35)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/sqrt(a*x + b*x**S(3) + c*x**S(5)), x), x, sqrt(x)*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((b + S(2)*c*x**S(2))/(S(2)*sqrt(c)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(c)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/sqrt(a*x + b*x**S(3) + c*x**S(5)), x), x, sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*c**(S(1)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*sqrt(a*x + b*x**S(3) + c*x**S(5))), x), x, -sqrt(x)*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*sqrt(a)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(3)/2)*sqrt(a*x + b*x**S(3) + c*x**S(5))), x), x, sqrt(c)*x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))/(a*(sqrt(a) + sqrt(c)*x**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) - sqrt(a*x + b*x**S(3) + c*x**S(5))/(a*x**(S(3)/2)) - c**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(3)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + c**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(3)/4)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)/2)/(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2), x), x, -b*sqrt(c)*x**(S(3)/2)*(a + b*x**S(2) + c*x**S(4))/(a*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) + x**(S(3)/2)*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) + b*c**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(3)/4)*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) - c**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(3)/4)*(-S(2)*sqrt(a)*sqrt(c) + b)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2), x), x, sqrt(x)*(-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) - sqrt(x)*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(2)*a**(S(3)/2)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*sqrt(x)*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) + S(2)*sqrt(c)*x**(S(3)/2)*(-S(3)*a*c + b**S(2))*(a + b*x**S(2) + c*x**S(4))/(a**S(2)*(sqrt(a) + sqrt(c)*x**S(2))*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) - (-S(6)*a*c + S(2)*b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))/(a**S(2)*x**(S(3)/2)*(-S(4)*a*c + b**S(2))) - S(2)*c**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-S(3)*a*c + b**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(a**(S(7)/4)*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) + c**(S(1)/4)*sqrt(x)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(sqrt(a)*b*sqrt(c) - S(6)*a*c + S(2)*b**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(7)/4)*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(3)/2)*(a*x + b*x**S(3) + c*x**S(5))**(S(3)/2)), x), x, (-S(2)*a*c + b**S(2) + b*c*x**S(2))/(a*x**(S(3)/2)*(-S(4)*a*c + b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))) - (-S(8)*a*c + S(3)*b**S(2))*sqrt(a*x + b*x**S(3) + c*x**S(5))/(S(2)*a**S(2)*x**(S(5)/2)*(-S(4)*a*c + b**S(2))) + S(3)*b*sqrt(x)*sqrt(a + b*x**S(2) + c*x**S(4))*atanh((S(2)*a + b*x**S(2))/(S(2)*sqrt(a)*sqrt(a + b*x**S(2) + c*x**S(4))))/(S(4)*a**(S(5)/2)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(3)*n/S(2) + S(-3)/2)/(a*x**(n + S(-1)) + b*x**n + c*x**(n + S(1)))**(S(3)/2), x), x, -S(2)*x**(n/S(2) + S(-1)/2)*(b + S(2)*c*x)/((-S(4)*a*c + b**S(2))*sqrt(a*x**(n + S(-1)) + b*x**n + c*x**(n + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a*x + b*x**S(3) + c*x**S(5)), x), x, S(2)*x**S(2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/4, S(1)/2, S(1)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(d + e*x**S(2))/sqrt(a*x + b*x**S(3) + c*x**S(5)), x), x, S(2)*d*x**S(2)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(3)/4, S(1)/2, S(1)/2, S(7)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(3)*sqrt(a*x + b*x**S(3) + c*x**S(5))) + S(2)*e*x**S(4)*sqrt(S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))) + S(1))*sqrt(S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))) + S(1))*AppellF1(S(7)/4, S(1)/2, S(1)/2, S(11)/4, -S(2)*c*x**S(2)/(b - sqrt(-S(4)*a*c + b**S(2))), -S(2)*c*x**S(2)/(b + sqrt(-S(4)*a*c + b**S(2))))/(S(7)*sqrt(a*x + b*x**S(3) + c*x**S(5))), expand=True, _diff=True, _numerical=True)
7dcea3ea0e9f1cf8c8f7f756a513ad8ec2426244512d1c49fbe856ed16ab8579
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.rubi import rubi_integrate from sympy.functions import log, sqrt, exp, cos, sin, tan, sec, csc, cot from sympy.functions.elementary.hyperbolic import atanh from sympy.functions.elementary.hyperbolic import asinh from sympy.functions.elementary.hyperbolic import acosh from sympy.functions.elementary.trigonometric import atan from sympy.functions.elementary.trigonometric import asin from sympy.functions.elementary.trigonometric import acos from sympy.integrals.rubi.utility_function import (EllipticE, EllipticF, hypergeom, rubi_test, AppellF1, EllipticPi, Log, Sqrt, ArcTan, ArcTanh, ArcSin, ArcCos, Hypergeometric2F1) from sympy.core.numbers import (I, pi as Pi) from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import exp_polar from sympy.functions.special.elliptic_integrals import (elliptic_e, elliptic_f, elliptic_pi) from sympy.functions.special.hyper import hyper from sympy.simplify.simplify import simplify from sympy.testing.pytest import SKIP from sympy.functions.elementary.hyperbolic import acsch as arccsch from sympy.functions.elementary.trigonometric import acsc as arccsc a, b, c, d, e, f, m, n, x, u , k, p, r, s, t= symbols('a b c d e f m n x u k p r s t') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F',) def test_1(): # difference in apart assert rubi_test(rubi_integrate(S(1)/(S(2)*sqrt(S(3))*b**(S(3)/2) - S(9)*b*x + S(9)*x**S(3)), x), x, -log(sqrt(b) - sqrt(S(3))*x)/(S(27)*b) + log(S(2)*sqrt(b) + sqrt(S(3))*x)/(S(27)*b) + sqrt(S(3))/(S(9)*sqrt(b)*(sqrt(S(3))*sqrt(b) - S(3)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3))**p, x), x, (a + b*x)*(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3))**p/(b*(S(3)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3))**S(3), x), x, (a + b*x)**S(10)/(S(10)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3))**S(2), x), x, (a + b*x)**S(7)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3), x), x, a**S(3)*x + S(3)*a**S(2)*b*x**S(2)/S(2) + a*b**S(2)*x**S(3) + b**S(3)*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3)), x), x, -S(1)/(S(2)*b*(a + b*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3))**(S(-2)), x), x, -S(1)/(S(5)*b*(a + b*x)**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(3) + S(3)*a**S(2)*b*x + S(3)*a*b**S(2)*x**S(2) + b**S(3)*x**S(3))**(S(-3)), x), x, -S(1)/(S(8)*b*(a + b*x)**S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*a*b + S(3)*b**S(2)*x + S(3)*b*c*x**S(2) + c**S(2)*x**S(3))**S(3), x), x, -b**S(3)*x*(-S(3)*a*c + b**S(2))**S(3)/c**S(3) + S(3)*b**S(2)*(b + c*x)**S(4)*(-S(3)*a*c + b**S(2))**S(2)/(S(4)*c**S(4)) - S(3)*b*(b + c*x)**S(7)*(-S(3)*a*c + b**S(2))/(S(7)*c**S(4)) + (b + c*x)**S(10)/(S(10)*c**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*a*b + S(3)*b**S(2)*x + S(3)*b*c*x**S(2) + c**S(2)*x**S(3))**S(2), x), x, b**S(2)*x*(-S(3)*a*c + b**S(2))**S(2)/c**S(2) - b*(b + c*x)**S(4)*(-S(3)*a*c + b**S(2))/(S(2)*c**S(3)) + (b + c*x)**S(7)/(S(7)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(3)*a*b + S(3)*b**S(2)*x + S(3)*b*c*x**S(2) + c**S(2)*x**S(3), x), x, S(3)*a*b*x + S(3)*b**S(2)*x**S(2)/S(2) + b*c*x**S(3) + c**S(2)*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(3)*a*b + S(3)*b**S(2)*x + S(3)*b*c*x**S(2) + c**S(2)*x**S(3)), x), x, log(b**(S(1)/3)*(-S(3)*a*c + b**S(2))**(S(1)/3) - b - c*x)/(S(3)*b**(S(2)/3)*(-S(3)*a*c + b**S(2))**(S(2)/3)) - log(b**(S(2)/3)*(-S(3)*a*c + b**S(2))**(S(2)/3) + b**(S(1)/3)*(b + c*x)*(-S(3)*a*c + b**S(2))**(S(1)/3) + (b + c*x)**S(2))/(S(6)*b**(S(2)/3)*(-S(3)*a*c + b**S(2))**(S(2)/3)) - sqrt(S(3))*atan(sqrt(S(3))*(b**(S(1)/3) + (S(2)*b + S(2)*c*x)/(-S(3)*a*c + b**S(2))**(S(1)/3))/(S(3)*b**(S(1)/3)))/(S(3)*b**(S(2)/3)*(-S(3)*a*c + b**S(2))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*a*b + S(3)*b**S(2)*x + S(3)*b*c*x**S(2) + c**S(2)*x**S(3))**(S(-2)), x), x, c*(b + c*x)/(S(3)*b*(-S(3)*a*c + b**S(2))*(b*(-S(3)*a*c + b**S(2)) - (b + c*x)**S(3))) - S(2)*c*log(b**(S(1)/3)*(-S(3)*a*c + b**S(2))**(S(1)/3) - b - c*x)/(S(9)*b**(S(5)/3)*(-S(3)*a*c + b**S(2))**(S(5)/3)) + c*log(b**(S(2)/3)*(-S(3)*a*c + b**S(2))**(S(2)/3) + b**(S(1)/3)*(b + c*x)*(-S(3)*a*c + b**S(2))**(S(1)/3) + (b + c*x)**S(2))/(S(9)*b**(S(5)/3)*(-S(3)*a*c + b**S(2))**(S(5)/3)) + S(2)*sqrt(S(3))*c*atan(sqrt(S(3))*(b**(S(1)/3) + (S(2)*b + S(2)*c*x)/(-S(3)*a*c + b**S(2))**(S(1)/3))/(S(3)*b**(S(1)/3)))/(S(9)*b**(S(5)/3)*(-S(3)*a*c + b**S(2))**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*a*b + S(3)*b**S(2)*x + S(3)*b*c*x**S(2) + c**S(2)*x**S(3))**(S(-3)), x), x, -c**S(2)*(b + c*x)/(S(6)*b*(-S(3)*a*c + b**S(2))*(b*(-S(3)*a*c + b**S(2)) - (b + c*x)**S(3))**S(2)) - S(5)*c**S(2)*(b + c*x)/(S(18)*b**S(2)*(-S(3)*a*c + b**S(2))**S(2)*(b*(-S(3)*a*c + b**S(2)) - (b + c*x)**S(3))) + S(5)*c**S(2)*log(b**(S(1)/3)*(-S(3)*a*c + b**S(2))**(S(1)/3) - b - c*x)/(S(27)*b**(S(8)/3)*(-S(3)*a*c + b**S(2))**(S(8)/3)) - S(5)*c**S(2)*log(b**(S(2)/3)*(-S(3)*a*c + b**S(2))**(S(2)/3) + b**(S(1)/3)*(b + c*x)*(-S(3)*a*c + b**S(2))**(S(1)/3) + (b + c*x)**S(2))/(S(54)*b**(S(8)/3)*(-S(3)*a*c + b**S(2))**(S(8)/3)) - S(5)*sqrt(S(3))*c**S(2)*atan(sqrt(S(3))*(b**(S(1)/3) + (S(2)*b + S(2)*c*x)/(-S(3)*a*c + b**S(2))**(S(1)/3))/(S(3)*b**(S(1)/3)))/(S(27)*b**(S(8)/3)*(-S(3)*a*c + b**S(2))**(S(8)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*c*e + b*d*f*x**S(3) + x**S(2)*(a*d*f + b*c*f + b*d*e) + x*(a*c*f + a*d*e + b*c*e))**S(3), x), x, a**S(3)*c**S(3)*e**S(3)*x + S(3)*a**S(2)*c**S(2)*e**S(2)*x**S(2)*(a*c*f + a*d*e + b*c*e)/S(2) + a*c*e*x**S(3)*(a**S(2)*(c**S(2)*f**S(2) + S(3)*c*d*e*f + d**S(2)*e**S(2)) + S(3)*a*b*c*e*(c*f + d*e) + b**S(2)*c**S(2)*e**S(2)) + b**S(3)*d**S(3)*f**S(3)*x**S(10)/S(10) + b**S(2)*d**S(2)*f**S(2)*x**S(9)*(a*d*f + b*c*f + b*d*e)/S(3) + S(3)*b*d*f*x**S(8)*(a**S(2)*d**S(2)*f**S(2) + S(3)*a*b*d*f*(c*f + d*e) + b**S(2)*(c**S(2)*f**S(2) + S(3)*c*d*e*f + d**S(2)*e**S(2)))/S(8) + x**S(7)*(a**S(3)*d**S(3)*f**S(3)/S(7) + S(9)*a**S(2)*b*d**S(2)*f**S(2)*(c*f + d*e)/S(7) + S(9)*a*b**S(2)*d*f*(c**S(2)*f**S(2) + S(3)*c*d*e*f + d**S(2)*e**S(2))/S(7) + b**S(3)*(c**S(3)*f**S(3) + S(9)*c**S(2)*d*e*f**S(2) + S(9)*c*d**S(2)*e**S(2)*f + d**S(3)*e**S(3))/S(7)) + x**S(6)*(a**S(3)*d**S(2)*f**S(2)*(c*f + d*e)/S(2) + S(3)*a**S(2)*b*d*f*(c**S(2)*f**S(2) + S(3)*c*d*e*f + d**S(2)*e**S(2))/S(2) + a*b**S(2)*(c**S(3)*f**S(3) + S(9)*c**S(2)*d*e*f**S(2) + S(9)*c*d**S(2)*e**S(2)*f + d**S(3)*e**S(3))/S(2) + b**S(3)*c*e*(c**S(2)*f**S(2) + S(3)*c*d*e*f + d**S(2)*e**S(2))/S(2)) + x**S(5)*(S(3)*a**S(3)*d*f*(c**S(2)*f**S(2) + S(3)*c*d*e*f + d**S(2)*e**S(2))/S(5) + S(3)*a**S(2)*b*(c**S(3)*f**S(3) + S(9)*c**S(2)*d*e*f**S(2) + S(9)*c*d**S(2)*e**S(2)*f + d**S(3)*e**S(3))/S(5) + S(9)*a*b**S(2)*c*e*(c**S(2)*f**S(2) + S(3)*c*d*e*f + d**S(2)*e**S(2))/S(5) + S(3)*b**S(3)*c**S(2)*e**S(2)*(c*f + d*e)/S(5)) + x**S(4)*(a**S(3)*(c**S(3)*f**S(3) + S(9)*c**S(2)*d*e*f**S(2) + S(9)*c*d**S(2)*e**S(2)*f + d**S(3)*e**S(3))/S(4) + S(9)*a**S(2)*b*c*e*(c**S(2)*f**S(2) + S(3)*c*d*e*f + d**S(2)*e**S(2))/S(4) + S(9)*a*b**S(2)*c**S(2)*e**S(2)*(c*f + d*e)/S(4) + b**S(3)*c**S(3)*e**S(3)/S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*c*e + b*d*f*x**S(3) + x**S(2)*(a*d*f + b*c*f + b*d*e) + x*(a*c*f + a*d*e + b*c*e))**S(2), x), x, a**S(2)*c**S(2)*e**S(2)*x + a*c*e*x**S(2)*(a*c*f + a*d*e + b*c*e) + b**S(2)*d**S(2)*f**S(2)*x**S(7)/S(7) + b*d*f*x**S(6)*(a*d*f + b*c*f + b*d*e)/S(3) + x**S(5)*(a**S(2)*d**S(2)*f**S(2)/S(5) + S(4)*a*b*d*f*(c*f + d*e)/S(5) + b**S(2)*(c**S(2)*f**S(2) + S(4)*c*d*e*f + d**S(2)*e**S(2))/S(5)) + x**S(4)*(a**S(2)*d*f*(c*f + d*e)/S(2) + a*b*(c**S(2)*f**S(2) + S(4)*c*d*e*f + d**S(2)*e**S(2))/S(2) + b**S(2)*c*e*(c*f + d*e)/S(2)) + x**S(3)*(a**S(2)*(c**S(2)*f**S(2) + S(4)*c*d*e*f + d**S(2)*e**S(2))/S(3) + S(4)*a*b*c*e*(c*f + d*e)/S(3) + b**S(2)*c**S(2)*e**S(2)/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a*c*e + b*d*f*x**S(3) + x**S(2)*(a*d*f + b*c*f + b*d*e) + x*(a*c*f + a*d*e + b*c*e), x), x, a*c*e*x + b*d*f*x**S(4)/S(4) + x**S(3)*(a*d*f/S(3) + b*c*f/S(3) + b*d*e/S(3)) + x**S(2)*(a*c*f/S(2) + a*d*e/S(2) + b*c*e/S(2)), expand=True, _diff=True, _numerical=True) '''taking a long time assert rubi_test(rubi_integrate(S(1)/(a*c*e + b*d*f*x**S(3) + x**S(2)*(a*d*f + b*c*f + b*d*e) + x*(a*c*f + a*d*e + b*c*e)), x), x, b*log(a + b*x)/((-a*d + b*c)*(-a*f + b*e)) - d*log(c + d*x)/((-a*d + b*c)*(-c*f + d*e)) + f*log(e + f*x)/((-a*f + b*e)*(-c*f + d*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*c*e + b*d*f*x**S(3) + x**S(2)*(a*d*f + b*c*f + b*d*e) + x*(a*c*f + a*d*e + b*c*e))**(S(-2)), x), x, -S(2)*b**S(3)*(-S(2)*a*d*f + b*c*f + b*d*e)*log(a + b*x)/((-a*d + b*c)**S(3)*(-a*f + b*e)**S(3)) - b**S(3)/((a + b*x)*(-a*d + b*c)**S(2)*(-a*f + b*e)**S(2)) + S(2)*d**S(3)*(a*d*f - S(2)*b*c*f + b*d*e)*log(c + d*x)/((-a*d + b*c)**S(3)*(-c*f + d*e)**S(3)) - d**S(3)/((c + d*x)*(-a*d + b*c)**S(2)*(-c*f + d*e)**S(2)) + S(2)*f**S(3)*(-a*d*f - b*c*f + S(2)*b*d*e)*log(e + f*x)/((-a*f + b*e)**S(3)*(-c*f + d*e)**S(3)) - f**S(3)/((e + f*x)*(-a*f + b*e)**S(2)*(-c*f + d*e)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*c*e + b*d*f*x**S(3) + x**S(2)*(a*d*f + b*c*f + b*d*e) + x*(a*c*f + a*d*e + b*c*e))**(S(-3)), x), x, S(3)*b**S(5)*(S(7)*a**S(2)*d**S(2)*f**S(2) - S(7)*a*b*d*f*(c*f + d*e) + b**S(2)*(S(2)*c**S(2)*f**S(2) + S(3)*c*d*e*f + S(2)*d**S(2)*e**S(2)))*log(a + b*x)/((-a*d + b*c)**S(5)*(-a*f + b*e)**S(5)) + S(3)*b**S(5)*(-S(2)*a*d*f + b*c*f + b*d*e)/((a + b*x)*(-a*d + b*c)**S(4)*(-a*f + b*e)**S(4)) - b**S(5)/(S(2)*(a + b*x)**S(2)*(-a*d + b*c)**S(3)*(-a*f + b*e)**S(3)) - S(3)*d**S(5)*(S(2)*a**S(2)*d**S(2)*f**S(2) + a*b*d*f*(-S(7)*c*f + S(3)*d*e) + b**S(2)*(S(7)*c**S(2)*f**S(2) - S(7)*c*d*e*f + S(2)*d**S(2)*e**S(2)))*log(c + d*x)/((-a*d + b*c)**S(5)*(-c*f + d*e)**S(5)) + S(3)*d**S(5)*(a*d*f - S(2)*b*c*f + b*d*e)/((c + d*x)*(-a*d + b*c)**S(4)*(-c*f + d*e)**S(4)) + d**S(5)/(S(2)*(c + d*x)**S(2)*(-a*d + b*c)**S(3)*(-c*f + d*e)**S(3)) + S(3)*f**S(5)*(S(2)*a**S(2)*d**S(2)*f**S(2) - a*b*d*f*(-S(3)*c*f + S(7)*d*e) + b**S(2)*(S(2)*c**S(2)*f**S(2) - S(7)*c*d*e*f + S(7)*d**S(2)*e**S(2)))*log(e + f*x)/((-a*f + b*e)**S(5)*(-c*f + d*e)**S(5)) - S(3)*f**S(5)*(-a*d*f - b*c*f + S(2)*b*d*e)/((e + f*x)*(-a*f + b*e)**S(4)*(-c*f + d*e)**S(4)) - f**S(5)/(S(2)*(e + f*x)**S(2)*(-a*f + b*e)**S(3)*(-c*f + d*e)**S(3)), expand=True, _diff=True, _numerical=True) ''' '''matchpy and mathematica difference assert rubi_test(rubi_integrate(S(1)/(S(16)*x**S(3) - S(4)*x**S(2) + S(4)*x + S(-1)), x), x, log(-S(4)*x + S(1))/S(5) - log(S(4)*x**S(2) + S(1))/S(10) - atan(S(2)*x)/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3) + x**S(2) + x + S(1)), x), x, log(x + S(1))/S(2) - log(x**S(2) + S(1))/S(4) + atan(x)/S(2), expand=True, _diff=True, _numerical=True) ''' assert rubi_test(rubi_integrate(S(1)/(d*x**S(3)), x), x, -S(1)/(S(2)*d*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(c*x**S(2) + d*x**S(3)), x), x, -S(1)/(c*x) - d*log(x)/c**S(2) + d*log(c + d*x)/c**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(b*x + d*x**S(3)), x), x, log(x)/b - log(b + d*x**S(2))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(b*x + c*x**S(2) + d*x**S(3)), x), x, c*atanh((c + S(2)*d*x)/sqrt(-S(4)*b*d + c**S(2)))/(b*sqrt(-S(4)*b*d + c**S(2))) + log(x)/b - log(b + c*x + d*x**S(2))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + d*x**S(3)), x), x, log(a**(S(1)/3) + d**(S(1)/3)*x)/(S(3)*a**(S(2)/3)*d**(S(1)/3)) - log(a**(S(2)/3) - a**(S(1)/3)*d**(S(1)/3)*x + d**(S(2)/3)*x**S(2))/(S(6)*a**(S(2)/3)*d**(S(1)/3)) - sqrt(S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*d**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*d**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x**S(3))**n, x), x, x*(d*x**S(3))**n/(S(3)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2) + d*x**S(3))**n, x), x, x*(S(1) + d*x/c)**(-n)*(c*x**S(2) + d*x**S(3))**n*hyper((-n, S(2)*n + S(1)), (S(2)*n + S(2),), -d*x/c)/(S(2)*n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x + d*x**S(3))**n, x), x, x*(b + d*x**S(2))*(b*x + d*x**S(3))**n*hyper((S(1), S(3)*n/S(2) + S(3)/2), (n/S(2) + S(3)/2,), -d*x**S(2)/b)/(b*(n + S(1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((b*x + d*x**S(3))**n, x), x, x*(S(1) + d*x**S(2)/b)**(-n)*(b*x + d*x**S(3))**n*hyper((-n, n/S(2) + S(1)/2), (n/S(2) + S(3)/2,), -d*x**S(2)/b)/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x + c*x**S(2) + d*x**S(3))**n, x), x, x*(S(2)*d*x/(c - sqrt(-S(4)*b*d + c**S(2))) + S(1))**(-n)*(S(2)*d*x/(c + sqrt(-S(4)*b*d + c**S(2))) + S(1))**(-n)*(b*x + c*x**S(2) + d*x**S(3))**n*AppellF1(n + S(1), -n, -n, n + S(2), -S(2)*d*x/(c - sqrt(-S(4)*b*d + c**S(2))), -S(2)*d*x/(c + sqrt(-S(4)*b*d + c**S(2))))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + d*x**S(3))**n, x), x, x*(a + d*x**S(3))**(n + S(1))*hyper((S(1), n + S(4)/3), (S(4)/3,), -d*x**S(3)/a)/a, expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + d*x**S(3))**n, x), x, x*(S(1) + d*x**S(3)/a)**(-n)*(a + d*x**S(3))**n*hyper((S(1)/3, -n), (S(4)/3,), -d*x**S(3)/a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(5) + S(5)*a**S(4)*b*x + S(10)*a**S(3)*b**S(2)*x**S(2) + S(10)*a**S(2)*b**S(3)*x**S(3) + S(5)*a*b**S(4)*x**S(4) + b**S(5)*x**S(5))**S(3), x), x, (a + b*x)**S(16)/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(5) + S(5)*a**S(4)*b*x + S(10)*a**S(3)*b**S(2)*x**S(2) + S(10)*a**S(2)*b**S(3)*x**S(3) + S(5)*a*b**S(4)*x**S(4) + b**S(5)*x**S(5))**S(2), x), x, (a + b*x)**S(11)/(S(11)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a**S(5) + S(5)*a**S(4)*b*x + S(10)*a**S(3)*b**S(2)*x**S(2) + S(10)*a**S(2)*b**S(3)*x**S(3) + S(5)*a*b**S(4)*x**S(4) + b**S(5)*x**S(5), x), x, (a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(a**S(5) + S(5)*a**S(4)*b*x + S(10)*a**S(3)*b**S(2)*x**S(2) + S(10)*a**S(2)*b**S(3)*x**S(3) + S(5)*a*b**S(4)*x**S(4) + b**S(5)*x**S(5), x), x, a**S(5)*x + S(5)*a**S(4)*b*x**S(2)/S(2) + S(10)*a**S(3)*b**S(2)*x**S(3)/S(3) + S(5)*a**S(2)*b**S(3)*x**S(4)/S(2) + a*b**S(4)*x**S(5) + b**S(5)*x**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a**S(5) + S(5)*a**S(4)*b*x + S(10)*a**S(3)*b**S(2)*x**S(2) + S(10)*a**S(2)*b**S(3)*x**S(3) + S(5)*a*b**S(4)*x**S(4) + b**S(5)*x**S(5)), x), x, -S(1)/(S(4)*b*(a + b*x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(5) + S(5)*a**S(4)*b*x + S(10)*a**S(3)*b**S(2)*x**S(2) + S(10)*a**S(2)*b**S(3)*x**S(3) + S(5)*a*b**S(4)*x**S(4) + b**S(5)*x**S(5))**(S(-2)), x), x, -S(1)/(S(9)*b*(a + b*x)**S(9)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(5) + S(5)*a**S(4)*b*x + S(10)*a**S(3)*b**S(2)*x**S(2) + S(10)*a**S(2)*b**S(3)*x**S(3) + S(5)*a*b**S(4)*x**S(4) + b**S(5)*x**S(5))**(S(-3)), x), x, -S(1)/(S(14)*b*(a + b*x)**S(14)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(c + (a + b*x)**S(2)), x), x, -S(3)*a*x/b**S(3) - a*(a**S(2) - S(3)*c)*atan((a + b*x)/sqrt(c))/(b**S(4)*sqrt(c)) + (a + b*x)**S(2)/(S(2)*b**S(4)) + (S(3)*a**S(2)/S(2) - c/S(2))*log(c + (a + b*x)**S(2))/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(c + (a + b*x)**S(2)), x), x, -a*log(c + (a + b*x)**S(2))/b**S(3) + x/b**S(2) + (a**S(2) - c)*atan((a + b*x)/sqrt(c))/(b**S(3)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(c + (a + b*x)**S(2)), x), x, -a*atan((a + b*x)/sqrt(c))/(b**S(2)*sqrt(c)) + log(c + (a + b*x)**S(2))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(c + (a + b*x)**S(2)), x), x, atan((a + b*x)/sqrt(c))/(b*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(c + (a + b*x)**S(2))), x), x, -a*atan((a + b*x)/sqrt(c))/(sqrt(c)*(a**S(2) + c)) + log(x)/(a**S(2) + c) - log(c + (a + b*x)**S(2))/(S(2)*(a**S(2) + c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(c + (a + b*x)**S(2))), x), x, -S(2)*a*b*log(x)/(a**S(2) + c)**S(2) + a*b*log(c + (a + b*x)**S(2))/(a**S(2) + c)**S(2) + b*(a**S(2) - c)*atan((a + b*x)/sqrt(c))/(sqrt(c)*(a**S(2) + c)**S(2)) - S(1)/(x*(a**S(2) + c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(c + (a + b*x)**S(2))), x), x, -a*b**S(2)*(a**S(2) - S(3)*c)*atan((a + b*x)/sqrt(c))/(sqrt(c)*(a**S(2) + c)**S(3)) + S(2)*a*b/(x*(a**S(2) + c)**S(2)) + b**S(2)*(S(3)*a**S(2) - c)*log(x)/(a**S(2) + c)**S(3) - b**S(2)*(S(3)*a**S(2) - c)*log(c + (a + b*x)**S(2))/(S(2)*(a**S(2) + c)**S(3)) - S(1)/(S(2)*x**S(2)*(a**S(2) + c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*(c + d*x)**S(2)), x), x, atan(sqrt(b)*(c + d*x)/sqrt(a))/(sqrt(a)*sqrt(b)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c + d*x)**S(2))**(S(-2)), x), x, (c/S(2) + d*x/S(2))/(a*d*(a + b*(c + d*x)**S(2))) + atan(sqrt(b)*(c + d*x)/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c + d*x)**S(2))**(S(-3)), x), x, (c/S(4) + d*x/S(4))/(a*d*(a + b*(c + d*x)**S(2))**S(2)) + (S(3)*c/S(8) + S(3)*d*x/S(8))/(a**S(2)*d*(a + b*(c + d*x)**S(2))) + S(3)*atan(sqrt(b)*(c + d*x)/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(b*(c + d*x)**S(2) + sqrt(-a)), x), x, atan(sqrt(b)*(c + d*x)/(-a)**(S(1)/4))/(sqrt(b)*d*(-a)**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)**S(2) + S(1)), x), x, atan(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((c + d*x)**S(2) + S(1))**(S(-2)), x), x, (c/S(2) + d*x/S(2))/(d*((c + d*x)**S(2) + S(1))) + atan(c + d*x)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((c + d*x)**S(2) + S(1))**(S(-3)), x), x, (c/S(4) + d*x/S(4))/(d*((c + d*x)**S(2) + S(1))**S(2)) + (S(3)*c/S(8) + S(3)*d*x/S(8))/(d*((c + d*x)**S(2) + S(1))) + S(3)*atan(c + d*x)/(S(8)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-(c + d*x)**S(2) + S(1)), x), x, atanh(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-(c + d*x)**S(2) + S(1))**(S(-2)), x), x, (c/S(2) + d*x/S(2))/(d*(-(c + d*x)**S(2) + S(1))) + atanh(c + d*x)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-(c + d*x)**S(2) + S(1))**(S(-3)), x), x, (c/S(4) + d*x/S(4))/(d*(-(c + d*x)**S(2) + S(1))**S(2)) + (S(3)*c/S(8) + S(3)*d*x/S(8))/(d*(-(c + d*x)**S(2) + S(1))) + S(3)*atanh(c + d*x)/(S(8)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-(x + S(1))**S(2) + S(1)), x), x, atanh(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-(x + S(1))**S(2) + S(1))**(S(-2)), x), x, (x/S(2) + S(1)/2)/(-(x + S(1))**S(2) + S(1)) + atanh(x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-(x + S(1))**S(2) + S(1))**(S(-3)), x), x, (x/S(4) + S(1)/4)/(-(x + S(1))**S(2) + S(1))**S(2) + (S(3)*x/S(8) + S(3)/8)/(-(x + S(1))**S(2) + S(1)) + S(3)*atanh(x + S(1))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((a + b*x)**S(2) + S(1))**S(2)/x, x), x, a*b*x*(a**S(2) + S(2)) + a*(a + b*x)**S(3)/S(3) + (a + b*x)**S(4)/S(4) + (a + b*x)**S(2)*(a**S(2)/S(2) + S(1)) + (a**S(2) + S(1))**S(2)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((x + S(-1))**S(2) + S(1)), x), x, x + log((x + S(-1))**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(-(x + S(1))**S(2) + S(1)), x), x, -x*sqrt(-(x + S(1))**S(2) + S(1))/S(2) + S(3)*sqrt(-(x + S(1))**S(2) + S(1))/S(2) + S(3)*asin(x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(-(a + b*x)**S(2) + S(1)), x), x, S(3)*a*sqrt(-(a + b*x)**S(2) + S(1))/(S(2)*b**S(3)) - x*sqrt(-(a + b*x)**S(2) + S(1))/(S(2)*b**S(2)) + (a**S(2) + S(1)/2)*asin(a + b*x)/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt((a + b*x)**S(2) + S(1)), x), x, -S(3)*a*sqrt((a + b*x)**S(2) + S(1))/(S(2)*b**S(3)) + x*sqrt((a + b*x)**S(2) + S(1))/(S(2)*b**S(2)) + (a**S(2) + S(-1)/2)*asinh(a + b*x)/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((A + B*x + C*x**S(2) + D*x**S(3))/(a*x**S(4) + a + b*x**S(3) + b*x + c*x**S(2)), x), x, -(D*(b - sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) + S(2)*a*(A - C))*log(S(2)*a*x**S(2) + S(2)*a + x*(b - sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) + (D*(b + sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) + S(2)*a*(A - C))*log(S(2)*a*x**S(2) + S(2)*a + x*(b + sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))))/(S(4)*a*sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) - sqrt(S(2))*(S(4)*B*a**S(2) + D*b*(b + sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) - a*(A*(b + sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) + C*b + C*sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2)) + S(2)*D*c))*atan(sqrt(S(2))*(S(4)*a*x + b + sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2)))/(S(2)*sqrt(S(4)*a**S(2) + S(2)*a*c - b*(b + sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))))))/(S(2)*a*sqrt(S(4)*a**S(2) + S(2)*a*c - b*(b + sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))))*sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) + sqrt(S(2))*(S(4)*B*a**S(2) + D*b*(b - sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) - a*(A*(b - sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))) + C*b - C*sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2)) + S(2)*D*c))*atan(sqrt(S(2))*(S(4)*a*x + b - sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2)))/(S(2)*sqrt(S(4)*a**S(2) + S(2)*a*c - b*(b - sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))))))/(S(2)*a*sqrt(S(4)*a**S(2) + S(2)*a*c - b*(b - sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))))*sqrt(S(8)*a**S(2) - S(4)*a*c + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(3)*x**S(2) + x + S(2)), x), x, x**S(4)/S(4) + x**S(3)/S(3) - S(3)*x**S(2)/S(4) + S(5)*x/S(4) + log(x**S(2) + x + S(1))/S(3) - S(13)*log(S(2)*x**S(2) - x + S(2))/S(48) + sqrt(S(15))*atan(sqrt(S(15))*(-S(4)*x + S(1))/S(15))/S(72) - S(10)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(3)*x**S(2) + x + S(2)), x), x, x**S(3)/S(3) + x**S(2)/S(2) - S(3)*x/S(2) + S(2)*log(x**S(2) + x + S(1))/S(3) - log(S(2)*x**S(2) - x + S(2))/S(24) + S(5)*sqrt(S(15))*atan(sqrt(S(15))*(-S(4)*x + S(1))/S(15))/S(36) + S(8)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(3)*x**S(2) + x + S(2)), x), x, x**S(2)/S(2) + x - log(x**S(2) + x + S(1)) + log(S(2)*x**S(2) - x + S(2))/S(4) + sqrt(S(15))*atan(sqrt(S(15))*(-S(4)*x + S(1))/S(15))/S(18) + S(2)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(3)*x**S(2) + x + S(2)), x), x, x + log(x**S(2) + x + S(1))/S(3) + log(S(2)*x**S(2) - x + S(2))/S(6) - sqrt(S(15))*atan(sqrt(S(15))*(-S(4)*x + S(1))/S(15))/S(9) - S(10)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(3)*x**S(2) + x + S(2)), x), x, S(2)*log(x**S(2) + x + S(1))/S(3) - log(S(2)*x**S(2) - x + S(2))/S(6) - sqrt(S(15))*atan(sqrt(S(15))*(-S(4)*x + S(1))/S(15))/S(9) + S(8)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(x*(S(2)*x**S(4) + x**S(3) + S(3)*x**S(2) + x + S(2))), x), x, S(5)*log(x)/S(2) - log(x**S(2) + x + S(1)) - log(S(2)*x**S(2) - x + S(2))/S(4) + sqrt(S(15))*atan(sqrt(S(15))*(-S(4)*x + S(1))/S(15))/S(18) + S(2)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(x**S(2)*(S(2)*x**S(4) + x**S(3) + S(3)*x**S(2) + x + S(2))), x), x, -S(3)*log(x)/S(4) + log(x**S(2) + x + S(1))/S(3) + log(S(2)*x**S(2) - x + S(2))/S(24) + S(5)*sqrt(S(15))*atan(sqrt(S(15))*(-S(4)*x + S(1))/S(15))/S(36) - S(10)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9) - S(5)/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(x**S(3)*(S(2)*x**S(4) + x**S(3) + S(3)*x**S(2) + x + S(2))), x), x, -S(15)*log(x)/S(8) + S(2)*log(x**S(2) + x + S(1))/S(3) + S(13)*log(S(2)*x**S(2) - x + S(2))/S(48) + sqrt(S(15))*atan(sqrt(S(15))*(-S(4)*x + S(1))/S(15))/S(72) + S(8)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(9) + S(3)/(S(4)*x) - S(5)/(S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(5)*x**S(2) + x + S(2)), x), x, x**S(3)*(S(7) - S(5)*sqrt(S(7))*I)/S(42) + x**S(3)*(S(7) + S(5)*sqrt(S(7))*I)/S(42) + x**S(2)*(S(7) - S(5)*sqrt(S(7))*I)/S(28) + x**S(2)*(S(7) + S(5)*sqrt(S(7))*I)/S(28) - x*(S(35) + S(9)*sqrt(S(7))*I)/S(28) - x*(S(35) - S(9)*sqrt(S(7))*I)/S(28) + S(3)*(S(7) - S(11)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) - sqrt(S(7))*I) + S(4))/S(112) + S(3)*(S(7) + S(11)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) + sqrt(S(7))*I) + S(4))/S(112) - S(11)*(-S(5)*sqrt(S(7)) + S(9)*I)*atan((S(8)*x + S(1) + sqrt(S(7))*I)/sqrt(S(70) - S(2)*sqrt(S(7))*I))/(S(4)*sqrt(S(490) - S(14)*sqrt(S(7))*I)) + S(11)*(S(5)*sqrt(S(7)) + S(9)*I)*atan((S(8)*x + S(1) - sqrt(S(7))*I)/sqrt(S(70) + S(2)*sqrt(S(7))*I))/(S(4)*sqrt(S(490) + S(14)*sqrt(S(7))*I)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(5)*x**S(2) + x + S(2)), x), x, x**S(2)*(S(7) - S(5)*sqrt(S(7))*I)/S(28) + x**S(2)*(S(7) + S(5)*sqrt(S(7))*I)/S(28) + x*(S(7) - S(5)*sqrt(S(7))*I)/S(14) + x*(S(7) + S(5)*sqrt(S(7))*I)/S(14) - (S(35) + S(9)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) - sqrt(S(7))*I) + S(4))/S(56) - (S(35) - S(9)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) + sqrt(S(7))*I) + S(4))/S(56) + (-sqrt(S(7)) + S(53)*I)*atan((S(8)*x + S(1) + sqrt(S(7))*I)/sqrt(S(70) - S(2)*sqrt(S(7))*I))/(S(2)*sqrt(S(490) - S(14)*sqrt(S(7))*I)) - (sqrt(S(7)) + S(53)*I)*atan((S(8)*x + S(1) - sqrt(S(7))*I)/sqrt(S(70) + S(2)*sqrt(S(7))*I))/(S(2)*sqrt(S(490) + S(14)*sqrt(S(7))*I)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(5)*x**S(2) + x + S(2)), x), x, x*(S(7) - S(5)*sqrt(S(7))*I)/S(14) + x*(S(7) + S(5)*sqrt(S(7))*I)/S(14) + (S(7) + S(5)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) - sqrt(S(7))*I) + S(4))/S(28) + (S(7) - S(5)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) + sqrt(S(7))*I) + S(4))/S(28) + (-S(7)*sqrt(S(7)) + S(19)*I)*atan((S(8)*x + S(1) + sqrt(S(7))*I)/sqrt(S(70) - S(2)*sqrt(S(7))*I))/sqrt(S(490) - S(14)*sqrt(S(7))*I) - (S(7)*sqrt(S(7)) + S(19)*I)*atan((S(8)*x + S(1) - sqrt(S(7))*I)/sqrt(S(70) + S(2)*sqrt(S(7))*I))/sqrt(S(490) + S(14)*sqrt(S(7))*I), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(S(2)*x**S(4) + x**S(3) + S(5)*x**S(2) + x + S(2)), x), x, (S(7) + S(5)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) - sqrt(S(7))*I) + S(4))/S(28) + (S(7) - S(5)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) + sqrt(S(7))*I) + S(4))/S(28) - (-S(7)*sqrt(S(7)) + S(19)*I)*atan((S(8)*x + S(1) + sqrt(S(7))*I)/sqrt(S(70) - S(2)*sqrt(S(7))*I))/sqrt(S(490) - S(14)*sqrt(S(7))*I) + (S(7)*sqrt(S(7)) + S(19)*I)*atan((S(8)*x + S(1) - sqrt(S(7))*I)/sqrt(S(70) + S(2)*sqrt(S(7))*I))/sqrt(S(490) + S(14)*sqrt(S(7))*I), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(x*(S(2)*x**S(4) + x**S(3) + S(5)*x**S(2) + x + S(2))), x), x, (S(35) - S(9)*sqrt(S(7))*I)*log(x)/S(28) + (S(35) + S(9)*sqrt(S(7))*I)*log(x)/S(28) - (S(35) + S(9)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) - sqrt(S(7))*I) + S(4))/S(56) - (S(35) - S(9)*sqrt(S(7))*I)*log(S(4)*x**S(2) + x*(S(1) + sqrt(S(7))*I) + S(4))/S(56) - (-sqrt(S(7)) + S(53)*I)*atan((S(8)*x + S(1) + sqrt(S(7))*I)/sqrt(S(70) - S(2)*sqrt(S(7))*I))/(S(2)*sqrt(S(490) - S(14)*sqrt(S(7))*I)) + (sqrt(S(7)) + S(53)*I)*atan((S(8)*x + S(1) - sqrt(S(7))*I)/sqrt(S(70) + S(2)*sqrt(S(7))*I))/(S(2)*sqrt(S(490) + S(14)*sqrt(S(7))*I)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(x**S(2)*(S(2)*x**S(4) + x**S(3) + S(5)*x**S(2) + x + S(2))), x), x, -S(3)*(S(7) + S(11)*sqrt(S(7))*I)*log(x)/S(56) - S(3)*(S(7) - S(11)*sqrt(S(7))*I)*log(x)/S(56) + S(3)*(S(7) + S(11)*sqrt(S(7))*I)*log(S(4)*I*x**S(2) + x*(-sqrt(S(7)) + I) + S(4)*I)/S(112) + S(3)*(S(7) - S(11)*sqrt(S(7))*I)*log(S(4)*I*x**S(2) + x*(sqrt(S(7)) + I) + S(4)*I)/S(112) + S(11)*(S(9) + S(5)*sqrt(S(7))*I)*atanh((S(8)*I*x - sqrt(S(7)) + I)/sqrt(S(70) - S(2)*sqrt(S(7))*I))/(S(4)*sqrt(S(490) - S(14)*sqrt(S(7))*I)) - S(11)*(S(9) - S(5)*sqrt(S(7))*I)*atanh((S(8)*I*x + sqrt(S(7)) + I)/sqrt(S(70) + S(2)*sqrt(S(7))*I))/(S(4)*sqrt(S(490) + S(14)*sqrt(S(7))*I)) + (S(-5)/4 - S(9)*sqrt(S(7))*I/S(28))/x + (S(-5)/4 + S(9)*sqrt(S(7))*I/S(28))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + x + S(5))/(x**S(3)*(S(2)*x**S(4) + x**S(3) + S(5)*x**S(2) + x + S(2))), x), x, -(S(35) + S(9)*sqrt(S(7))*I)*log(x)/S(16) - (S(35) - S(9)*sqrt(S(7))*I)*log(x)/S(16) + (S(35) - S(9)*sqrt(S(7))*I)*log(S(4)*I*x**S(2) + x*(-sqrt(S(7)) + I) + S(4)*I)/S(32) + (S(35) + S(9)*sqrt(S(7))*I)*log(S(4)*I*x**S(2) + x*(sqrt(S(7)) + I) + S(4)*I)/S(32) + (S(355) - S(73)*sqrt(S(7))*I)*atanh((S(8)*I*x - sqrt(S(7)) + I)/sqrt(S(70) - S(2)*sqrt(S(7))*I))/(S(8)*sqrt(S(490) - S(14)*sqrt(S(7))*I)) - (S(355) + S(73)*sqrt(S(7))*I)*atanh((S(8)*I*x + sqrt(S(7)) + I)/sqrt(S(70) + S(2)*sqrt(S(7))*I))/(S(8)*sqrt(S(490) + S(14)*sqrt(S(7))*I)) + (S(3)/8 - S(33)*sqrt(S(7))*I/S(56))/x + (S(3)/8 + S(33)*sqrt(S(7))*I/S(56))/x + (S(-5)/8 - S(9)*sqrt(S(7))*I/S(56))/x**S(2) + (S(-5)/8 + S(9)*sqrt(S(7))*I/S(56))/x**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(3)*x**S(2) + x + S(9))/((x**S(2) + S(1))*(x**S(2) + S(3))), x), x, log(x**S(2) + S(3))/S(2) + S(3)*atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) + x + S(3))/((x**S(2) + S(1))*(x**S(2) + S(3))), x), x, log(x**S(2) + S(3))/S(2) + atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(3) - x**S(2) + S(6)*x + S(-4))/((x**S(2) + S(1))*(x**S(2) + S(2))), x), x, S(3)*log(x**S(2) + S(1))/S(2) - S(3)*atan(x) + sqrt(S(2))*atan(sqrt(S(2))*x/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(3)*x**S(4) + S(1))/((x + S(-2))*(x**S(2) + S(1))**S(2)), x), x, (S(2)*x/S(5) + S(-1)/5)/(x**S(2) + S(1)) - S(47)*log(-x + S(2))/S(25) - S(14)*log(x**S(2) + S(1))/S(25) - S(46)*atan(x)/S(25), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) - S(9)*x + S(-9))/(x**S(3) - S(9)*x), x), x, log(x) - log(-x + S(3)) + S(2)*log(x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(5) + S(2)*x**S(2) + S(1))/(x**S(3) - x), x), x, x**S(3)/S(3) + x - log(x) + S(2)*log(-x + S(1)) + log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(3))/(x*(x + S(-1))**S(2)), x), x, S(3)*log(x) - log(-x + S(1)) + S(5)/(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(-1))/((S(4)*x + S(-1))*(x**S(2) + S(1))), x), x, -S(7)*log(-S(4)*x + S(1))/S(34) + S(6)*log(x**S(2) + S(1))/S(17) + S(3)*atan(x)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(3)*x**S(2) + S(2)*x + S(-3))/(x**S(2) + S(1)), x), x, x**S(2)/S(2) - S(3)*x + log(x**S(2) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(6)*x**S(3) + S(10)*x**S(2) + x)/(x**S(2) + S(6)*x + S(10)), x), x, x**S(3)/S(3) + log(x**S(2) + S(6)*x + S(10))/S(2) - S(3)*atan(x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4) - S(3)*x**S(3) - S(7)*x**S(2) + S(27)*x + S(-18)), x), x, log(-x + S(1))/S(8) - log(-x + S(2))/S(5) + log(-x + S(3))/S(12) - log(x + S(3))/S(120), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(1))/(x + S(-2)), x), x, x**S(3)/S(3) + x**S(2) + S(4)*x + S(9)*log(-x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(3) - S(4)*x**S(2) + S(3)*x)/(x**S(2) + S(1)), x), x, S(3)*x**S(2)/S(2) - S(4)*x + S(4)*atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x + S(5))/(x**S(3) - x**S(2) - x + S(1)), x), x, atanh(x) + S(4)/(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) - x**S(3) - x + S(-1))/(x**S(3) - x**S(2)), x), x, x**S(2)/S(2) + S(2)*log(x) - S(2)*log(-x + S(1)) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) + x + S(2))/(x**S(4) + S(3)*x**S(2) + S(2)), x), x, log(x**S(2) + S(2))/S(2) + atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(5) - x**S(4) + S(4)*x**S(3) - S(4)*x**S(2) + S(8)*x + S(-4))/(x**S(2) + S(2))**S(3), x), x, log(x**S(2) + S(2))/S(2) - sqrt(S(2))*atan(sqrt(S(2))*x/S(2))/S(2) - S(1)/(x**S(2) + S(2))**S(2), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x**S(5) - x**S(4) + S(4)*x**S(3) - S(4)*x**S(2) + S(8)*x + S(-4))/(x**S(2) + S(2))**S(3), x), x, x**S(2)/(S(4)*(x**S(2) + S(2))) + x**S(2)/(S(2)*(x**S(2) + S(2))**S(2)) + log(x**S(2) + S(2))/S(2) - sqrt(S(2))*atan(sqrt(S(2))*x/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(3)*x + S(-1))/(x**S(3) + x**S(2) - S(2)*x), x), x, log(x)/S(2) - log(-x + S(1)) + S(3)*log(x + S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) - S(2)*x**S(3) + S(3)*x**S(2) - x + S(3))/(x**S(3) - S(2)*x**S(2) + S(3)*x), x), x, x**S(2)/S(2) + log(x) - log(x**S(2) - S(2)*x + S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x + S(-1))/(x**S(2) + S(1))**S(2), x), x, -x/(S(2)*(x**S(2) + S(1))) + log(x**S(2) + S(1))/S(2) - atan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(8)*x**S(3) - x**S(2) + S(2)*x + S(1))/((x**S(2) + x)*(x**S(3) + S(1))), x), x, log(x) - S(2)*log(x + S(1)) + log(x**S(2) - x + S(1)) - S(2)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(3) - S(3)/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) - S(5)*x + S(15))/((x**S(2) + S(5))*(x**S(2) + S(2)*x + S(3))), x), x, log(x**S(2) + S(2)*x + S(3))/S(2) + S(5)*sqrt(S(2))*atan(sqrt(S(2))*(x + S(1))/S(2))/S(2) - sqrt(S(5))*atan(sqrt(S(5))*x/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(6) + S(7)*x**S(5) + S(15)*x**S(4) + S(32)*x**S(3) + S(23)*x**S(2) + S(25)*x + S(-3))/((x**S(2) + S(1))**S(2)*(x**S(2) + x + S(2))**S(2)), x), x, log(x**S(2) + S(1)) - log(x**S(2) + x + S(2)) + S(1)/(x**S(2) + x + S(2)) - S(3)/(x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x**S(2) + S(1))*(x**S(2) + S(4))), x), x, -atan(x/S(2))/S(6) + atan(x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(3))/(x**S(2) + S(1)), x), x, a*atan(x) + b*x**S(2)/S(2) - b*log(x**S(2) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + x)/((x + S(4))*(x**S(2) + S(-4))), x), x, log(x + S(4)) - atanh(x/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(4))/((x**S(2) + S(1))*(x**S(2) + S(2))), x), x, S(3)*atan(x) - sqrt(S(2))*atan(sqrt(S(2))*x/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(3)*x**S(2) - S(4)*x + S(5))/((x + S(-1))**S(2)*(x**S(2) + S(1))), x), x, x + log(-x + S(1))/S(2) + S(3)*log(x**S(2) + S(1))/S(4) + S(2)*atan(x) + S(5)/(S(2)*(-x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(1))/(x**S(2) + S(2)), x), x, x**S(3)/S(3) - S(2)*x + S(5)*sqrt(S(2))*atan(sqrt(S(2))*x/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(2)*x + S(2))/(x**S(5) + x**S(4)), x), x, log(x + S(1)) - S(2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) - S(5)*x + S(-1))/(x**S(3) - S(2)*x**S(2) - x + S(2)), x), x, S(2)*log(-x + S(1)) - log(-x + S(2)) + log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x + S(2))/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, x/(x**S(2) + S(1)) + log(x**S(2) + S(1))/S(2) + atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) + S(2)*x + S(1))/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, log(x**S(2) + S(1))/S(2) + atan(x) - S(1)/(S(2)*(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x**S(3) + x**S(2) + S(2)*x + S(1))/(x**S(4) + S(2)*x**S(2) + S(1)), x), x, x**S(2)/(S(2)*(x**S(2) + S(1))) + log(x**S(2) + S(1))/S(2) + atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x + S(3))/((x**S(2) + S(1))*(x**S(2) + S(2))), x), x, S(2)*log(x**S(2) + S(1)) - S(2)*log(x**S(2) + S(2)) + S(3)*atan(x) - S(3)*sqrt(S(2))*atan(sqrt(S(2))*x/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))/((x**S(2) + S(1))*(x**S(2) + S(4))), x), x, log(x**S(2) + S(1))/S(6) - log(x**S(2) + S(4))/S(6) - atan(x/S(2))/S(3) + S(2)*atan(x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - x + S(2))/(x**S(2) - S(6)*x + S(-7)), x), x, x**S(2)/S(2) + S(6)*x + S(169)*log(-x + S(7))/S(4) - log(x + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(5) + S(-1))/(x**S(2) + S(-1)), x), x, x**S(4)/S(4) + x**S(2)/S(2) + log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - x**S(2) + S(2)*x + S(5))/(x**S(2) + x + S(1)), x), x, x**S(2)/S(2) - S(2)*x + S(3)*log(x**S(2) + x + S(1))/S(2) + S(11)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) - S(2)*x**S(3) + x + S(-3))/(S(2)*x**S(2) - S(8)*x + S(10)), x), x, x**S(3)/S(6) + x**S(2)/S(2) + S(3)*x/S(2) + S(3)*log(x**S(2) - S(4)*x + S(5))/S(4) - S(6)*atan(x + S(-2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(3)*x**S(2) + S(2)*x + S(1))/((x + S(-3))*(x + S(-2))*(x + S(-1))), x), x, x + S(7)*log(-x + S(1))/S(2) - S(25)*log(-x + S(2)) + S(61)*log(-x + S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) - x**S(3) + x**S(2) - S(7)*x + S(2))/(x**S(3) + x**S(2) - S(14)*x + S(-24)), x), x, x**S(2)/S(2) - S(2)*x + S(13)*log(-x + S(4))/S(3) - S(22)*log(x + S(2))/S(3) + S(20)*log(x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(2))/(x*(x + S(-1))**S(2)*(x + S(1))), x), x, S(2)*log(x) - S(5)*log(-x + S(1))/S(4) - S(3)*log(x + S(1))/S(4) + S(3)/(S(2)*(-x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) + S(3))/(x**S(2) + S(2))**S(2), x), x, (x/S(4) + S(1))/(x**S(2) + S(2)) + log(x**S(2) + S(2))/S(2) + S(5)*sqrt(S(2))*atan(sqrt(S(2))*x/S(2))/S(8), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x**S(3) + x**S(2) + S(3))/(x**S(2) + S(2))**S(2), x), x, x*(-x/S(2) + S(1)/4)/(x**S(2) + S(2)) + log(x**S(2) + S(2))/S(2) + S(5)*sqrt(S(2))*atan(sqrt(S(2))*x/S(2))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) - S(4)*x**S(2) + S(70)*x + S(-35))/((x**S(2) - S(10)*x + S(26))*(x**S(2) - S(2)*x + S(17))), x), x, S(1003)*log(x**S(2) - S(10)*x + S(26))/S(1025) + S(22)*log(x**S(2) - S(2)*x + S(17))/S(1025) - S(4607)*atan(x/S(4) + S(-1)/4)/S(4100) + S(15033)*atan(x + S(-5))/S(1025), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(2))/((x + S(-5))*(x + S(-3))*(x + S(4))), x), x, -S(11)*log(-x + S(3))/S(14) + S(3)*log(-x + S(5))/S(2) + S(2)*log(x + S(4))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/((x + S(-1))*(x**S(2) + S(2))), x), x, x**S(2)/S(2) + x + log(-x + S(1))/S(3) - S(2)*log(x**S(2) + S(2))/S(3) - S(2)*sqrt(S(2))*atan(sqrt(S(2))*x/S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) + S(7)*x + S(-1))/(x**S(3) + x**S(2) - x + S(-1)), x), x, S(2)*log(-x + S(1)) - S(3)/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x + S(1))/(x**S(3) - S(3)*x**S(2) + S(3)*x + S(-1)), x), x, -(S(2)*x + S(1))**S(2)/(S(6)*(-x + S(1))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(7)*x**S(2) - S(5)*x + S(5))/((x + S(-1))**S(2)*(x + S(1))**S(3)), x), x, -S(2)/(x + S(1))**S(2) + S(1)/(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) + S(3)*x + S(1))/(x**S(3) + S(2)*x**S(2) + S(2)*x + S(1)), x), x, log(x + S(1)) + log(x**S(2) + x + S(1)) - S(2)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(2)*x + S(-1))/(S(2)*x**S(3) + S(3)*x**S(2) - S(2)*x), x), x, log(x)/S(2) + log(-S(2)*x + S(1))/S(10) - log(x + S(2))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) - S(2)*x**S(2) + S(4)*x + S(1))/(x**S(3) - x**S(2) - x + S(1)), x), x, x**S(2)/S(2) + x - S(2)*atanh(x) + S(2)/(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(2) - x + S(4))/(x**S(3) + S(4)*x), x), x, log(x) + log(x**S(2) + S(4))/S(2) - atan(x/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) + S(1))/(x*(x + S(-1))*(x**S(2) + S(1))**S(3)*(x**S(2) + x + S(1))), x), x, S(3)*x/(S(16)*(x**S(2) + S(1))) - (-S(3)*x/S(8) + S(3)/8)/(x**S(2) + S(1)) + (x/S(8) + S(1)/8)/(x**S(2) + S(1))**S(2) - log(x) + log(-x + S(1))/S(8) + S(15)*log(x**S(2) + S(1))/S(16) - log(x**S(2) + x + S(1))/S(2) + S(7)*atan(x)/S(16) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(3) + S(2)*x**S(2) - S(3)*x + S(1))/(x**S(2) + S(1))**S(2), x), x, (-x/S(2) + S(1))/(x**S(2) + S(1)) - log(x**S(2) + S(1))/S(2) + S(3)*atan(x)/S(2), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-x**S(3) + S(2)*x**S(2) - S(3)*x + S(1))/(x**S(2) + S(1))**S(2), x), x, -x*(S(2)*x + S(1))/(S(2)*(x**S(2) + S(1))) - log(x**S(2) + S(1))/S(2) + S(3)*atan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(3) + S(2)*x**S(2) - S(3)*x + S(1))/(x*(x**S(2) + S(1))**S(2)), x), x, (-x + S(-1)/2)/(x**S(2) + S(1)) + log(x) - log(x**S(2) + S(1))/S(2) - S(2)*atan(x), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-x**S(3) + S(2)*x**S(2) - S(3)*x + S(1))/(x*(x**S(2) + S(1))**S(2)), x), x, x*(x/S(2) + S(-1))/(x**S(2) + S(1)) + log(x) - log(x**S(2) + S(1))/S(2) - S(2)*atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + x**S(3) - x**S(2) - x + S(1))/(x**S(3) - x), x), x, x**S(2)/S(2) + x - log(x) + log(-x**S(2) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(4)*x**S(2) + S(2))/((x**S(2) + S(1))*(x**S(2) + S(2))), x), x, -log(x**S(2) + S(1))/S(2) + log(x**S(2) + S(2)) + S(6)*atan(x) - S(5)*sqrt(S(2))*atan(sqrt(S(2))*x/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + x**S(2) + S(1))/((x**S(2) + S(1))*(x**S(2) + S(4))**S(2)), x), x, -S(13)*x/(S(24)*(x**S(2) + S(4))) + S(25)*atan(x/S(2))/S(144) + atan(x)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) + S(1))/(x**S(4) + x**S(3) + S(2)*x**S(2)), x), x, -log(x)/S(4) + S(5)*log(x**S(2) + x + S(2))/S(8) + sqrt(S(7))*atan(sqrt(S(7))*(S(2)*x + S(1))/S(7))/S(28) - S(1)/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) - S(12)*x + S(1))/(x**S(2) + x + S(-12)), x), x, x**S(2)/S(2) - S(2)*atanh(S(2)*x/S(7) + S(1)/7)/S(7), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x**S(3) + x**S(2) - S(12)*x + S(1))/(x**S(2) + x + S(-12)), x), x, x**S(2)/S(2) + log(-x + S(3))/S(7) - log(x + S(4))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(6)*x**S(2) + S(5)*x + S(-3))/(x**S(3) + S(2)*x**S(2) - S(3)*x), x), x, log(x) + S(2)*log(-x + S(1)) + S(3)*log(x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(2) + S(3)*x + S(-2))/(x**S(3) + S(2)*x**S(2)), x), x, S(2)*log(x) + S(3)*log(x + S(2)) + S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(4)*x**S(2) - S(2)*x + S(18))/(x**S(3) + S(4)*x**S(2) + x + S(-6)), x), x, log(-x + S(1)) - S(2)*log(x + S(2)) - S(3)*log(x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(2)*x**S(2) + x + S(1))/(x**S(4) + S(5)*x**S(2) + S(4)), x), x, log(x**S(2) + S(4))/S(2) - S(3)*atan(x/S(2))/S(2) + atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(3) - S(27)*x**S(2) + S(5)*x + S(-32))/(S(30)*x**S(5) - S(13)*x**S(4) + S(50)*x**S(3) - S(286)*x**S(2) - S(299)*x + S(-70)), x), x, -S(3146)*log(-S(3)*x + S(7))/S(80155) - S(334)*log(S(2)*x + S(1))/S(323) + S(4822)*log(S(5)*x + S(2))/S(4879) + S(11049)*log(x**S(2) + x + S(5))/S(260015) + S(3988)*sqrt(S(19))*atan(sqrt(S(19))*(S(2)*x + S(1))/S(19))/S(260015), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(12)*x**S(5) - S(7)*x**S(3) - S(13)*x**S(2) + S(8))/(S(100)*x**S(6) - S(80)*x**S(5) + S(116)*x**S(4) - S(80)*x**S(3) + S(41)*x**S(2) - S(20)*x + S(4)), x), x, (-S(251)*x/S(726) + S(-313)/1452)/(S(2)*x**S(2) + S(1)) - S(59096)*log(-S(5)*x + S(2))/S(99825) + S(2843)*log(S(2)*x**S(2) + S(1))/S(7986) + S(503)*sqrt(S(2))*atan(sqrt(S(2))*x)/S(15972) + S(5828)/(S(9075)*(-S(5)*x + S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((S(12)*x**S(5) - S(7)*x**S(3) - S(13)*x**S(2) + S(8))/(S(100)*x**S(6) - S(80)*x**S(5) + S(116)*x**S(4) - S(80)*x**S(3) + S(41)*x**S(2) - S(20)*x + S(4)), x), x, (-S(251)*x/S(726) + S(-313)/1452)/(S(2)*x**S(2) + S(1)) - S(59096)*log(-S(5)*x + S(2))/S(99825) + S(2843)*log(S(2)*x**S(2) + S(1))/S(7986) + S(503)*sqrt(S(2))*atan(sqrt(S(2))*x)/S(15972) + S(5828)/(S(9075)*(-S(5)*x + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(9))/(x**S(2)*(x**S(2) + S(9))), x), x, x - S(10)*atan(x/S(3))/S(3) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(2)*x)/(x**S(2) + S(1)), x), x, x**S(3)/S(3) - x + log(x**S(2) + S(1)) + atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - x)/((x + S(-1))**S(2)*(x**S(2) + S(1))), x), x, log(-x + S(1)) + atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + S(5)*x + S(2))/(x**S(2) + x + S(1)), x), x, x**S(2) + x + log(x**S(2) + x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(3) - S(5)*x**S(2) - S(4)*x + S(3))/(x**S(3)*(x**S(2) + x + S(-1))), x), x, S(3)*log(x) - (sqrt(S(5)) + S(15))*log(S(2)*x + S(1) + sqrt(S(5)))/S(10) - (-sqrt(S(5)) + S(15))*log(S(2)*x - sqrt(S(5)) + S(1))/S(10) - S(1)/x + S(3)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(5)*x**S(2) + S(8)*x + S(4))/(x**S(2) + S(2)*x + S(2))**S(2), x), x, log(x**S(2) + S(2)*x + S(2)) - atan(x + S(1)) - S(1)/(x**S(2) + S(2)*x + S(2)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((S(2)*x**S(3) + S(5)*x**S(2) + S(8)*x + S(4))/(x**S(2) + S(2)*x + S(2))**S(2), x), x, x*(x + S(2))/(S(2)*(x**S(2) + S(2)*x + S(2))) + log(x**S(2) + S(2)*x + S(2)) - atan(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(x + S(-1))**S(4)/(x**S(2) + S(1)), x), x, x**S(7)/S(7) - S(2)*x**S(6)/S(3) + x**S(5) - S(4)*x**S(3)/S(3) + S(4)*x - S(4)*atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(2) - S(20)*x)/(x**S(4) - S(10)*x**S(2) + S(9)), x), x, log(-x + S(1)) - log(-x + S(3))/S(2) + S(3)*log(x + S(1))/S(2) - S(2)*log(x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(3) + x + S(-1))/(x**S(2)*(x + S(-1))*(x**S(2) + S(1))), x), x, S(2)*log(-x + S(1)) - log(x**S(2) + S(1)) + atan(x) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) - S(4)*x**S(3) + S(2)*x**S(2) - S(3)*x + S(1))/(x**S(2) + S(1))**S(3), x), x, atan(x) - (S(4)*x**S(2) + S(3))**S(2)/(S(4)*(x**S(2) + S(1))**S(2)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x**S(4) - S(4)*x**S(3) + S(2)*x**S(2) - S(3)*x + S(1))/(x**S(2) + S(1))**S(3), x), x, x**S(2)/(S(4)*(x**S(2) + S(1))**S(2)) + atan(x) + S(7)/(S(4)*(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) - S(4)*x**S(3) + S(2)*x**S(2) - S(3)*x + S(1))/(x**S(6) + S(3)*x**S(4) + S(3)*x**S(2) + S(1)), x), x, atan(x) + S(2)/(x**S(2) + S(1)) - S(1)/(S(4)*(x**S(2) + S(1))**S(2)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x**S(4) - S(4)*x**S(3) + S(2)*x**S(2) - S(3)*x + S(1))/(x**S(6) + S(3)*x**S(4) + S(3)*x**S(2) + S(1)), x), x, x**S(2)/(S(4)*(x**S(2) + S(1))**S(2)) + atan(x) + S(7)/(S(4)*(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(2)*x**S(2) + x + S(1))/(x**S(4) + x**S(3) + x**S(2)), x), x, log(x**S(2) + x + S(1)) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x**S(2) - S(4)*x + S(4))*(x**S(2) - S(4)*x + S(5))), x), x, -atan(x + S(-2)) + S(1)/(-x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + x + S(-3))/(x**S(2)*(x + S(-3))), x), x, log(-x + S(3)) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(2) + x + S(1))/(S(4)*x**S(3) + x), x), x, log(x) + atan(S(2)*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) - x + S(1))/(x**S(3) - x**S(2)), x), x, S(3)*log(-x + S(1)) + S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(3)*x + S(4))/(x**S(2) + x), x), x, x + S(4)*log(x) - S(2)*log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) + x + S(4))/(x**S(3) + x), x), x, S(4)*log(x) - log(x**S(2) + S(1))/S(2) + atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(2) - S(4)*x + S(7))/((S(4)*x + S(1))*(x**S(2) + S(1))), x), x, S(2)*log(S(4)*x + S(1)) - atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((x + S(-1))*(x**S(2) + S(2)*x + S(1))), x), x, log(-x + S(1))/S(4) + S(3)*log(x + S(1))/S(4) + S(1)/(S(2)*(x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(3)*x + S(-4))/((S(2)*x + S(-1))**S(2)*(S(2)*x + S(3))), x), x, S(41)*log(-S(2)*x + S(1))/S(128) - S(25)*log(S(2)*x + S(3))/S(128) - S(9)/(S(32)*(-S(2)*x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) - S(4)*x + S(5))/((x + S(-1))*(x**S(2) + S(1))), x), x, S(2)*log(-x + S(1)) + log(x**S(2) + S(1))/S(2) - S(3)*atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) - S(2)*x + S(-1))/((x + S(-1))**S(2)*(x**S(2) + S(1))), x), x, log(-x + S(1)) - log(x**S(2) + S(1))/S(2) + atan(x) + S(1)/(x + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(5))/((x**S(2) - S(6)*x + S(10))*(x**S(2) - x + S(1)/2)), x), x, S(56)*log(x**S(2) - S(6)*x + S(10))/S(221) + S(109)*log(S(2)*x**S(2) - S(2)*x + S(1))/S(442) + S(1026)*atan(x + S(-3))/S(221) + S(261)*atan(S(2)*x + S(-1))/S(221), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(3)*x + S(4))/((x + S(-3))*(x + S(-2))*(x + S(-1))), x), x, S(4)*log(-x + S(1)) - S(14)*log(-x + S(2)) + S(11)*log(-x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(16)*x + S(1))/((x + S(5))**S(2)*(S(2)*x + S(-3))*(x**S(2) + x + S(1))), x), x, S(200)*log(-S(2)*x + S(3))/S(3211) + S(2731)*log(x + S(5))/S(24843) - S(481)*log(x**S(2) + x + S(1))/S(5586) + S(451)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(8379) - S(79)/(S(273)*(x + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(-1))/(x**S(2) + x + S(1)), x), x, x**S(2)/S(2) - x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(-3))/(x**S(2) - S(6)*x + S(-7)), x), x, x**S(2)/S(2) + S(6)*x + S(85)*log(-x + S(7))/S(2) + log(x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(1))/(x**S(2) + S(4)*x + S(13))**S(2), x), x, (S(47)*x/S(18) + S(67)/18)/(x**S(2) + S(4)*x + S(13)) + log(x**S(2) + S(4)*x + S(13))/S(2) - S(61)*atan(x/S(3) + S(2)/3)/S(54), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(5) - S(10)*x**S(4) + S(21)*x**S(3) - S(42)*x**S(2) + S(36)*x + S(-32))/(x*(x**S(2) + S(1))*(x**S(2) + S(4))**S(2)), x), x, -S(2)*log(x) + log(x**S(2) + S(4)) + atan(x/S(2))/S(2) + S(2)*atan(x) + S(1)/(x**S(2) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(9) + S(7)*x**S(5) + x**S(4) + S(-1))/(x**S(8) + S(6)*x**S(4) + S(-7)), x), x, x**S(2)/S(2) - sqrt(S(2))*S(7)**(S(1)/4)*log(x**S(2) - sqrt(S(2))*S(7)**(S(1)/4)*x + sqrt(S(7)))/S(56) + sqrt(S(2))*S(7)**(S(1)/4)*log(x**S(2) + sqrt(S(2))*S(7)**(S(1)/4)*x + sqrt(S(7)))/S(56) + sqrt(S(2))*S(7)**(S(1)/4)*atan(sqrt(S(2))*S(7)**(S(3)/4)*x/S(7) + S(-1))/S(28) + sqrt(S(2))*S(7)**(S(1)/4)*atan(sqrt(S(2))*S(7)**(S(3)/4)*x/S(7) + S(1))/S(28) - atanh(x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(6) + x**S(3) + S(1))/(x**S(5) + x), x), x, x**S(2)/S(2) + log(x) - log(x**S(4) + S(1))/S(4) + sqrt(S(2))*log(x**S(2) - sqrt(S(2))*x + S(1))/S(8) - sqrt(S(2))*log(x**S(2) + sqrt(S(2))*x + S(1))/S(8) - atan(x**S(2))/S(2) + sqrt(S(2))*atan(sqrt(S(2))*x + S(-1))/S(4) + sqrt(S(2))*atan(sqrt(S(2))*x + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(2) - x), x), x, x - log(x) + S(2)*log(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(1))/(x**S(3) - x), x), x, x - log(x) + log(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(1))/(x**S(3) - x**S(2)), x), x, x - log(x) + S(2)*log(-x + S(1)) + S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(5) + S(-1))/(x**S(3) - x), x), x, x**S(3)/S(3) + x + log(x) - log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(1))/(x**S(5) + x**S(3)), x), x, -log(x) + log(x**S(2) + S(1)) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(3) + S(2)*x**S(2) + x), x), x, log(x) + S(2)/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(5) + S(1))/(x**S(3) - S(3)*x**S(2) - S(10)*x), x), x, x**S(3)/S(3) + S(3)*x**S(2)/S(2) + S(19)*x - log(x)/S(10) + S(3126)*log(-x + S(5))/S(35) - S(31)*log(x + S(2))/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) - S(5)*x + S(15))/((x**S(2) + S(5))*(x**S(2) + S(2)*x + S(3))), x), x, log(x**S(2) + S(2)*x + S(3))/S(2) + S(5)*sqrt(S(2))*atan(sqrt(S(2))*(x + S(1))/S(2))/S(2) - sqrt(S(5))*atan(sqrt(S(5))*x/S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x**S(2) + S(1))*(S(10)*x/(x**S(2) + S(1)) + S(3))), x), x, -log(x + S(3))/S(8) + log(S(3)*x + S(1))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(S(15)*x + S(13) + S(2)/x), x), x, x**S(3)/S(45) - S(13)*x**S(2)/S(450) + S(139)*x/S(3375) - S(16)*log(S(3)*x + S(2))/S(567) + log(S(5)*x + S(1))/S(4375), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(S(15)*x + S(13) + S(2)/x), x), x, x**S(2)/S(30) - S(13)*x/S(225) + S(8)*log(S(3)*x + S(2))/S(189) - log(S(5)*x + S(1))/S(875), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(S(15)*x + S(13) + S(2)/x), x), x, x/S(15) - S(4)*log(S(3)*x + S(2))/S(63) + log(S(5)*x + S(1))/S(175), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(15)*x + S(13) + S(2)/x), x), x, S(2)*log(S(3)*x + S(2))/S(21) - log(S(5)*x + S(1))/S(35), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(S(15)*x + S(13) + S(2)/x)), x), x, -log(S(3)*x + S(2))/S(7) + log(S(5)*x + S(1))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(S(15)*x + S(13) + S(2)/x)), x), x, log(x)/S(2) + S(3)*log(S(3)*x + S(2))/S(14) - S(5)*log(S(5)*x + S(1))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(S(15)*x + S(13) + S(2)/x)), x), x, -S(13)*log(x)/S(4) - S(9)*log(S(3)*x + S(2))/S(28) + S(25)*log(S(5)*x + S(1))/S(7) - S(1)/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(S(15)*x + S(13) + S(2)/x)), x), x, S(139)*log(x)/S(8) + S(27)*log(S(3)*x + S(2))/S(56) - S(125)*log(S(5)*x + S(1))/S(7) + S(13)/(S(4)*x) - S(1)/(S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(5)*(S(15)*x + S(13) + S(2)/x)), x), x, -S(1417)*log(x)/S(16) - S(81)*log(S(3)*x + S(2))/S(112) + S(625)*log(S(5)*x + S(1))/S(7) - S(139)/(S(8)*x) + S(13)/(S(8)*x**S(2)) - S(1)/(S(6)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(a + b*(-x**S(2) + S(1))**S(4)), x), x, -atanh(b**(S(1)/8)*x/sqrt(b**(S(1)/4) + I*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/8)*sqrt(-a)*sqrt(b**(S(1)/4) + I*(-a)**(S(1)/4))) + atanh(b**(S(1)/8)*x/sqrt(b**(S(1)/4) + (-a)**(S(1)/4)))/(S(4)*b**(S(3)/8)*sqrt(-a)*sqrt(b**(S(1)/4) + (-a)**(S(1)/4))) + atan(b**(S(1)/8)*x/sqrt(-b**(S(1)/4) + I*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/8)*sqrt(-a)*sqrt(-b**(S(1)/4) + I*(-a)**(S(1)/4))) - atan(b**(S(1)/8)*x/sqrt(-b**(S(1)/4) + (-a)**(S(1)/4)))/(S(4)*b**(S(3)/8)*sqrt(-a)*sqrt(-b**(S(1)/4) + (-a)**(S(1)/4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/(a + b*(x**S(2) + S(-1))**S(4)), x), x, -atanh(b**(S(1)/8)*x/sqrt(b**(S(1)/4) + I*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/8)*sqrt(-a)*sqrt(b**(S(1)/4) + I*(-a)**(S(1)/4))) + atanh(b**(S(1)/8)*x/sqrt(b**(S(1)/4) + (-a)**(S(1)/4)))/(S(4)*b**(S(3)/8)*sqrt(-a)*sqrt(b**(S(1)/4) + (-a)**(S(1)/4))) + atan(b**(S(1)/8)*x/sqrt(-b**(S(1)/4) + I*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/8)*sqrt(-a)*sqrt(-b**(S(1)/4) + I*(-a)**(S(1)/4))) - atan(b**(S(1)/8)*x/sqrt(-b**(S(1)/4) + (-a)**(S(1)/4)))/(S(4)*b**(S(3)/8)*sqrt(-a)*sqrt(-b**(S(1)/4) + (-a)**(S(1)/4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(5) + S(-1))/(x**S(5) + x + S(1))**S(2), x), x, -x/(x**S(5) + x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-a*d - S(2)*a*e*x - S(3)*a*f*x**S(2) + b*c - b*e*x**S(2) - S(2)*b*f*x**S(3))/(c + d*x + e*x**S(2) + f*x**S(3))**S(2), x), x, a/(c + d*x + e*x**S(2) + f*x**S(3)) + b*x/(c + d*x + e*x**S(2) + f*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(39)*x**S(8) + S(26)*x**S(6) + S(24)*x**S(5) + S(174)*x**S(4) - S(18)*x**S(2) - S(40)*x + S(9))/(x**S(4) + S(2)*x**S(2) + S(3))**S(3), x), x, S(13)*x/(x**S(4) + S(2)*x**S(2) + S(3)) + (-S(26)*x**S(3) - S(4)*x**S(2) - S(36)*x + S(2))/(x**S(4) + S(2)*x**S(2) + S(3))**S(2), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-S(39)*x**S(8) + S(26)*x**S(6) + S(24)*x**S(5) + S(174)*x**S(4) - S(18)*x**S(2) - S(40)*x + S(9))/(x**S(4) + S(2)*x**S(2) + S(3))**S(3), x), x, x*(-S(2)*x**S(3) - S(4)*x + S(117))/(S(9)*(x**S(4) + S(2)*x**S(2) + S(3))) - S(2)*x*(x**S(3) + S(39)*x**S(2) + S(8)*x + S(54))/(S(3)*(x**S(4) + S(2)*x**S(2) + S(3))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(30)*x**S(9) - S(8)*x**S(7) - S(15)*x**S(6) - S(140)*x**S(5) + S(34)*x**S(4) - S(12)*x**S(3) - S(5)*x**S(2) + S(36)*x + S(-15))/(x**S(4) + x + S(3))**S(4), x), x, -S(5)*x**S(6)/(x**S(4) + x + S(3))**S(3) + x**S(4)/(x**S(4) + x + S(3))**S(3) + S(5)*x**S(2)/(x**S(4) + x + S(3))**S(3) - S(3)*x/(x**S(4) + x + S(3))**S(3) + S(2)/(x**S(4) + x + S(3))**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(30)*x/(x**S(4) + x + S(3))**S(2) + (-S(8)*x**S(3) - S(75)*x**S(2) - S(320)*x + S(42))/(x**S(4) + x + S(3))**S(3) + (S(57)*x**S(3) + S(360)*x**S(2) + S(684)*x + S(-141))/(x**S(4) + x + S(3))**S(4), x), x, (-S(5)*x**S(6) + x**S(4) + S(5)*x**S(2) - S(3)*x + S(2))/(x**S(4) + x + S(3))**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-(S(12)*x**S(3) + S(3))*(-S(5)*x**S(6) + x**S(4) + S(5)*x**S(2) - S(3)*x + S(2))/(x**S(4) + x + S(3))**S(4) + (-S(30)*x**S(5) + S(4)*x**S(3) + S(10)*x + S(-3))/(x**S(4) + x + S(3))**S(3), x), x, (-S(5)*x**S(6) + x**S(4) + S(5)*x**S(2) - S(3)*x + S(2))/(x**S(4) + x + S(3))**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(-1))/(x**S(2) - x + S(1)), x), x, log(x**S(2) - x + S(1))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-1))/(x**S(3) + S(1)), x), x, log(x**S(2) - x + S(1))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x + S(-4))/(x**S(2) - S(2)*x + S(4)), x), x, S(3)*log(x**S(2) - S(2)*x + S(4))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) + S(2)*x + S(-8))/(x**S(3) + S(8)), x), x, S(3)*log(x**S(2) - S(2)*x + S(4))/S(2) + sqrt(S(3))*atan(sqrt(S(3))*(-x + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x + S(4))/(x**S(2)*(x**S(2) + S(1))), x), x, S(4)*log(x) - S(2)*log(x**S(2) + S(1)) - S(4)*atan(x) - S(4)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x + S(24))/(x*(x**S(2) + S(-4))), x), x, -S(6)*log(x) + S(5)*log(-x + S(2)) + log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-1))/(x**S(3) - S(2)*x), x), x, log(x)/S(2) + log(-x**S(2) + S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x**S(3) + S(3)*x), x), x, log(x)/S(3) + log(x**S(2) + S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + S(3)*b*x**S(2))/(a*x + b*x**S(3)), x), x, log(x) + log(a + b*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x + S(-2))/(x**S(3) - x), x), x, S(2)*log(x) + log(-x + S(1)) - S(3)*log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(4))/(x**S(3) + S(4)*x), x), x, log(x) - log(x**S(2) + S(4))/S(2) + atan(x/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) - x)/(x**S(4) - x**S(2) + S(1)), x), x, log(x**S(4) - x**S(2) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(-3))/(x**S(3) + S(3)*x**S(2) + S(2)*x), x), x, -S(3)*log(x)/S(2) + S(4)*log(x + S(1)) - S(5)*log(x + S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x + S(2))/(x**S(4) + S(2)*x**S(3) + x**S(2)), x), x, -S(2)/(x*(x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(1))/(x**S(3) + x**S(2) - S(6)*x), x), x, -log(x)/S(6) + S(3)*log(-x + S(2))/S(10) - S(2)*log(x + S(3))/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(4)*x**S(2))/(x**S(3) + x), x), x, x + S(2)*log(x**S(2) + S(1)) - atan(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + x)/(x**S(4) + x**S(2))**S(3), x), x, -S(1)/(S(4)*x**S(4)*(x**S(2) + S(1))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(2) + b*x**S(3))/(c*x**S(2) + d*x**S(3)), x), x, b*x/d - (-a*d + b*c)*log(c + d*x)/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + x)/(x**S(3) - x**S(2) - S(2)*x), x), x, log(-x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(5)*x**S(2) + S(1))/(x**S(3)*(x**S(2) + S(1))), x), x, -S(6)*log(x) + S(3)*log(x**S(2) + S(1)) - S(1)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)*x/((x + S(-1))*(x**S(2) + S(5))), x), x, log(-x + S(1))/S(3) - log(x**S(2) + S(5))/S(6) + sqrt(S(5))*atan(sqrt(S(5))*x/S(5))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(2))/(x + S(2)), x), x, x**S(2)/S(2) - S(2)*x + S(6)*log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(-3))*(x**S(2) + S(4))), x), x, log(-x + S(3))/S(13) - log(x**S(2) + S(4))/S(26) - S(3)*atan(x/S(2))/S(26), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(6) + S(-2))/(x*(S(2)*x**S(6) + S(5))), x), x, -S(2)*log(x)/S(5) + S(19)*log(S(2)*x**S(6) + S(5))/S(60), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x + S(3))/((x + S(-2))*(x + S(5))), x), x, log(-x + S(2)) + log(x + S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(x**S(4) + S(5)*x**S(2) + S(4)), x), x, x - S(8)*atan(x/S(2))/S(3) + atan(x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(1))*(x + S(2))**S(2)*(x + S(3))**S(3)), x), x, log(x + S(1))/S(8) + S(2)*log(x + S(2)) - S(17)*log(x + S(3))/S(8) + S(5)/(S(4)*(x + S(3))) + S(1)/(S(4)*(x + S(3))**S(2)) + S(1)/(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(2) + S(-1)), x), x, log(-x**S(2) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-1))**(S(-2)), x), x, x/(S(2)*(-x**S(2) + S(1))) + atanh(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(2) + S(1))**S(2), x), x, -x/(S(2)*(x**S(2) + S(1))) + atan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(3)*x + S(2)), x), x, log(S(3)*x + S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a**S(2) + x**S(2)), x), x, atan(x/a)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*x**S(2)), x), x, atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2) - x + S(2)), x), x, -S(2)*sqrt(S(7))*atan(sqrt(S(7))*(-S(2)*x + S(1))/S(7))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(-x**S(2) + S(4))**S(2), x), x, x**S(7)/S(7) - S(8)*x**S(5)/S(5) + S(16)*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(-x**S(3) + S(1))**S(2), x), x, x**S(8)/S(8) - S(2)*x**S(5)/S(5) + x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(5)*x**S(2) + S(-4))/x**S(2), x), x, x**S(2)/S(2) + S(5)*x + S(4)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(-1))/(S(3)*x**S(2) - S(4)*x + S(3)), x), x, log(S(3)*x**S(2) - S(4)*x + S(3))/S(6) + sqrt(S(5))*atan(sqrt(S(5))*(-S(3)*x + S(2))/S(5))/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(2))**S(2), x), x, x**S(7)/S(7) + x**S(4) + S(4)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-4))/(x + S(2)), x), x, x**S(2)/S(2) - S(2)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(2))*(x**S(2) + S(1))), x), x, log(x + S(2))/S(5) - log(x**S(2) + S(1))/S(10) + S(2)*atan(x)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(1))*(x**S(2) + S(1))), x), x, log(x + S(1))/S(2) - log(x**S(2) + S(1))/S(4) + atan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((x + S(1))*(x**S(2) + S(1))), x), x, -log(x + S(1))/S(2) + log(x**S(2) + S(1))/S(4) + atan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(2)*x)/(x + S(1))**S(2), x), x, (x + S(2))**S(2)/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-10))/(S(2)*x**S(4) + S(9)*x**S(2) + S(4)), x), x, atan(x/S(2)) - S(3)*sqrt(S(2))*atan(sqrt(S(2))*x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x + S(31))/(S(3)*x**S(2) - S(4)*x + S(11)), x), x, S(5)*log(S(3)*x**S(2) - S(4)*x + S(11))/S(6) - S(103)*sqrt(S(29))*atan(sqrt(S(29))*(-S(3)*x + S(2))/S(29))/S(87), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**S(2) + S(-2))/x**S(4), x), x, log(x) - S(1)/x + S(2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x + S(1))/x**S(2), x), x, x**S(2)/S(2) + log(x) - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-2))/(x*(x**S(2) + S(2))), x), x, -log(x) + log(x**S(2) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(-3))*(S(4)*x**S(2) + S(-7)), x), x, x**S(4) - S(4)*x**S(3) - S(7)*x**S(2)/S(2) + S(21)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(7)*x + S(-2))**S(3), x), x, (-S(7)*x + S(2))**S(4)/S(28), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(2) + S(-7))/(S(2)*x + S(3)), x), x, x**S(2) - S(3)*x + log(S(2)*x + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(1))/(x**S(2)*(x + S(-1))), x), x, -S(2)*log(x) + S(2)*log(-x + S(1)) + S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4) + S(4)*x**S(3) + S(4)*x**S(2)), x), x, atanh(x + S(1))/S(2) - S(1)/(S(4)*(x + S(2))) - S(1)/(S(4)*x), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/(x**S(4) + S(4)*x**S(3) + S(4)*x**S(2)), x), x, -log(x)/S(4) + log(x + S(2))/S(4) - S(1)/(S(4)*(x + S(2))) - S(1)/(S(4)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(1))/(x + S(1)), x), x, x**S(2)/S(2) - x + S(2)*log(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(3)*x**S(2) + S(3)*x + S(-1))/x**S(2), x), x, x**S(2)/S(2) - S(3)*x + S(3)*log(x) + S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(3)/2 + sqrt(S(37))/S(2))*(x - sqrt(S(37))/S(2) + S(3)/2), x), x, x**S(3)/S(3) + S(3)*x**S(2)/S(2) - S(7)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(3) + S(3)*x**S(2) + S(4))/(x + S(1))**S(4), x), x, S(2)*log(x + S(1)) + S(3)/(x + S(1)) - S(5)/(S(3)*(x + S(1))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((x + S(1))**S(2)*(x**S(2) + S(1))), x), x, atan(x)/S(2) + S(1)/(S(2)*(x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) - x**S(3) + S(3)*x**S(2) - S(2)*x + S(7))/(x + S(2)), x), x, x**S(4)/S(4) - x**S(3) + S(9)*x**S(2)/S(2) - S(20)*x + S(47)*log(x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(-1))/(x + S(-1)), x), x, x**S(3)/S(3) + x**S(2)/S(2) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x + S(2))/((x + S(-1))**S(3)*(x**S(2) + S(1))), x), x, atan(x) + S(1)/(x + S(-1)) - S(1)/(-x + S(1))**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(b*x + c*(d + e*x)**S(2)), x), x, -S(2)*atanh((b + S(2)*c*d*e + S(2)*c*e**S(2)*x)/(sqrt(b)*sqrt(b + S(4)*c*d*e)))/(sqrt(b)*sqrt(b + S(4)*c*d*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*x + c*(d + e*x)**S(2)), x), x, -S(2)*atanh((b + S(2)*c*d*e + S(2)*c*e**S(2)*x)/sqrt(-S(4)*a*c*e**S(2) + b**S(2) + S(4)*b*c*d*e))/sqrt(-S(4)*a*c*e**S(2) + b**S(2) + S(4)*b*c*d*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((x**S(2) + S(-1))**S(2) + S(1)), x), x, log(x**S(2) - x*sqrt(S(2) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(4)*sqrt(S(2) + S(2)*sqrt(S(2)))) - log(x**S(2) + x*sqrt(S(2) + S(2)*sqrt(S(2))) + sqrt(S(2)))/(S(4)*sqrt(S(2) + S(2)*sqrt(S(2)))) - sqrt(S(1)/2 + sqrt(S(2))/S(2))*atan((-S(2)*x + sqrt(S(2) + S(2)*sqrt(S(2))))/sqrt(S(-2) + S(2)*sqrt(S(2))))/S(2) + sqrt(S(1)/2 + sqrt(S(2))/S(2))*atan((S(2)*x + sqrt(S(2) + S(2)*sqrt(S(2))))/sqrt(S(-2) + S(2)*sqrt(S(2))))/S(2), expand=True, _diff=True, _numerical=True) def test_2(): assert rubi_test(rubi_integrate(x**S(5)*(a + b*x**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)), x), x, b*x**S(6)*sqrt(-c + d*x)*sqrt(c + d*x)/(S(7)*d**S(2)) + S(8)*c**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(7)*a*d**S(2) + S(6)*b*c**S(2))/(S(105)*d**S(8)) + S(4)*c**S(2)*x**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(7)*a*d**S(2) + S(6)*b*c**S(2))/(S(105)*d**S(6)) + x**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(7)*a*d**S(2) + S(6)*b*c**S(2))/(S(35)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)), x), x, b*x**S(5)*sqrt(-c + d*x)*sqrt(c + d*x)/(S(6)*d**S(2)) + c**S(4)*(S(6)*a*d**S(2) + S(5)*b*c**S(2))*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/(S(8)*d**S(7)) + c**S(2)*x*sqrt(-c + d*x)*sqrt(c + d*x)*(S(6)*a*d**S(2) + S(5)*b*c**S(2))/(S(16)*d**S(6)) + x**S(3)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(6)*a*d**S(2) + S(5)*b*c**S(2))/(S(24)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)), x), x, b*x**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)/(S(5)*d**S(2)) + S(2)*c**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(5)*a*d**S(2) + S(4)*b*c**S(2))/(S(15)*d**S(6)) + x**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(5)*a*d**S(2) + S(4)*b*c**S(2))/(S(15)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)), x), x, b*x**S(3)*sqrt(-c + d*x)*sqrt(c + d*x)/(S(4)*d**S(2)) + c**S(2)*(S(4)*a*d**S(2) + S(3)*b*c**S(2))*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/(S(4)*d**S(5)) + x*sqrt(-c + d*x)*sqrt(c + d*x)*(S(4)*a*d**S(2) + S(3)*b*c**S(2))/(S(8)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)), x), x, b*x**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)/(S(3)*d**S(2)) + sqrt(-c + d*x)*sqrt(c + d*x)*(S(3)*a*d**S(2) + S(2)*b*c**S(2))/(S(3)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)), x), x, b*x*sqrt(-c + d*x)*sqrt(c + d*x)/(S(2)*d**S(2)) + (S(2)*a*d**S(2) + b*c**S(2))*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/d**S(3), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)), x), x, S(2)*a*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/d + b*c**S(2)*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/d**S(3) + b*x*sqrt(-c + d*x)*sqrt(c + d*x)/(S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x*sqrt(-c + d*x)*sqrt(c + d*x)), x), x, a*atan(sqrt(-c + d*x)*sqrt(c + d*x)/c)/c + b*sqrt(-c + d*x)*sqrt(c + d*x)/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)), x), x, a*sqrt(-c + d*x)*sqrt(c + d*x)/(c**S(2)*x) + S(2)*b*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(3)*sqrt(-c + d*x)*sqrt(c + d*x)), x), x, a*sqrt(-c + d*x)*sqrt(c + d*x)/(S(2)*c**S(2)*x**S(2)) + (a*d**S(2) + S(2)*b*c**S(2))*atan(sqrt(-c + d*x)*sqrt(c + d*x)/c)/(S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)), x), x, a*sqrt(-c + d*x)*sqrt(c + d*x)/(S(3)*c**S(2)*x**S(3)) + sqrt(-c + d*x)*sqrt(c + d*x)*(S(2)*a*d**S(2) + S(3)*b*c**S(2))/(S(3)*c**S(4)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(5)*sqrt(-c + d*x)*sqrt(c + d*x)), x), x, a*sqrt(-c + d*x)*sqrt(c + d*x)/(S(4)*c**S(2)*x**S(4)) + sqrt(-c + d*x)*sqrt(c + d*x)*(S(3)*a*d**S(2) + S(4)*b*c**S(2))/(S(8)*c**S(4)*x**S(2)) + d**S(2)*(S(3)*a*d**S(2) + S(4)*b*c**S(2))*atan(sqrt(-c + d*x)*sqrt(c + d*x)/c)/(S(8)*c**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(6)*sqrt(-c + d*x)*sqrt(c + d*x)), x), x, a*sqrt(-c + d*x)*sqrt(c + d*x)/(S(5)*c**S(2)*x**S(5)) + sqrt(-c + d*x)*sqrt(c + d*x)*(S(4)*a*d**S(2) + S(5)*b*c**S(2))/(S(15)*c**S(4)*x**S(3)) + S(2)*d**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(4)*a*d**S(2) + S(5)*b*c**S(2))/(S(15)*c**S(6)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a + b*x**S(2))/((-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, b*x**S(6)/(S(5)*d**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)) + S(8)*c**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(5)*a*d**S(2) + S(6)*b*c**S(2))/(S(15)*d**S(8)) - x**S(4)*(S(5)*a*d**S(2) + S(6)*b*c**S(2))/(S(5)*d**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)) + x**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)*(S(20)*a*d**S(2) + S(24)*b*c**S(2))/(S(15)*d**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x**S(2))/((-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, b*x**S(5)/(S(4)*d**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)) + S(3)*c**S(2)*(S(4)*a*d**S(2) + S(5)*b*c**S(2))*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/(S(4)*d**S(7)) - x**S(3)*(S(4)*a*d**S(2) + S(5)*b*c**S(2))/(S(4)*d**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)) + x*sqrt(-c + d*x)*sqrt(c + d*x)*(S(12)*a*d**S(2) + S(15)*b*c**S(2))/(S(8)*d**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x**S(2))/((-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, b*x**S(4)/(S(3)*d**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)) - x**S(2)*(S(3)*a*d**S(2) + S(4)*b*c**S(2))/(S(3)*d**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)) + sqrt(-c + d*x)*sqrt(c + d*x)*(S(6)*a*d**S(2) + S(8)*b*c**S(2))/(S(3)*d**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x**S(2))/((-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, b*x**S(3)/(S(2)*d**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)) - c*(S(2)*a*d**S(2) + S(3)*b*c**S(2))/(S(2)*d**S(5)*sqrt(-c + d*x)*sqrt(c + d*x)) - sqrt(-c + d*x)*(S(2)*a*d**S(2) + S(3)*b*c**S(2))/(S(2)*d**S(5)*sqrt(c + d*x)) + (S(2)*a*d**S(2) + S(3)*b*c**S(2))*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/d**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2))/((-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, -x**S(2)*(a/c**S(2) + b/d**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)) + sqrt(-c + d*x)*sqrt(c + d*x)*(a*d**S(2) + S(2)*b*c**S(2))/(c**S(2)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/((-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, -a*x/(c**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)) - b*c/(d**S(3)*sqrt(-c + d*x)*sqrt(c + d*x)) - b*sqrt(-c + d*x)/(d**S(3)*sqrt(c + d*x)) + S(2)*b*atanh(sqrt(-c + d*x)/sqrt(c + d*x))/d**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x*(-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, -a*atan(sqrt(-c + d*x)*sqrt(c + d*x)/c)/c**S(3) - (a/c**S(2) + b/d**S(2))/(sqrt(-c + d*x)*sqrt(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(2)*(-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, a/(c**S(2)*x*sqrt(-c + d*x)*sqrt(c + d*x)) - x*(S(2)*a*d**S(2) + b*c**S(2))/(c**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(3)*(-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, a/(S(2)*c**S(2)*x**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)) - (S(3)*a*d**S(2) + S(2)*b*c**S(2))/(S(2)*c**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)) - (S(3)*a*d**S(2) + S(2)*b*c**S(2))*atan(sqrt(-c + d*x)*sqrt(c + d*x)/c)/(S(2)*c**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(4)*(-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, a/(S(3)*c**S(2)*x**S(3)*sqrt(-c + d*x)*sqrt(c + d*x)) + (S(4)*a*d**S(2) + S(3)*b*c**S(2))/(S(3)*c**S(4)*x*sqrt(-c + d*x)*sqrt(c + d*x)) - S(2)*d**S(2)*x*(S(4)*a*d**S(2) + S(3)*b*c**S(2))/(S(3)*c**S(6)*sqrt(-c + d*x)*sqrt(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(5)*(-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, a/(S(4)*c**S(2)*x**S(4)*sqrt(-c + d*x)*sqrt(c + d*x)) + (S(5)*a*d**S(2) + S(4)*b*c**S(2))/(S(8)*c**S(4)*x**S(2)*sqrt(-c + d*x)*sqrt(c + d*x)) - S(3)*d**S(2)*(S(5)*a*d**S(2) + S(4)*b*c**S(2))/(S(8)*c**S(6)*sqrt(-c + d*x)*sqrt(c + d*x)) - S(3)*d**S(2)*(S(5)*a*d**S(2) + S(4)*b*c**S(2))*atan(sqrt(-c + d*x)*sqrt(c + d*x)/c)/(S(8)*c**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))/(x**S(6)*(-c + d*x)**(S(3)/2)*(c + d*x)**(S(3)/2)), x), x, a/(S(5)*c**S(2)*x**S(5)*sqrt(-c + d*x)*sqrt(c + d*x)) + (S(6)*a*d**S(2) + S(5)*b*c**S(2))/(S(15)*c**S(4)*x**S(3)*sqrt(-c + d*x)*sqrt(c + d*x)) + S(4)*d**S(2)*(S(6)*a*d**S(2) + S(5)*b*c**S(2))/(S(15)*c**S(6)*x*sqrt(-c + d*x)*sqrt(c + d*x)) - S(8)*d**S(4)*x*(S(6)*a*d**S(2) + S(5)*b*c**S(2))/(S(15)*c**S(8)*sqrt(-c + d*x)*sqrt(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c**S(2)*x**S(2) + S(1))/(x*sqrt(c*x + S(-1))*sqrt(c*x + S(1))), x), x, sqrt(c*x + S(-1))*sqrt(c*x + S(1)) + atan(sqrt(c*x + S(-1))*sqrt(c*x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**n*(c + d*x**S(3)), x), x, S(10)*a**S(2)*d*(a + b*x)**(n + S(4))/(b**S(6)*(n + S(4))) + a**S(2)*(a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)/(b**S(6)*(n + S(1))) - S(5)*a*d*(a + b*x)**(n + S(5))/(b**S(6)*(n + S(5))) - a*(a + b*x)**(n + S(2))*(-S(5)*a**S(3)*d + S(2)*b**S(3)*c)/(b**S(6)*(n + S(2))) + d*(a + b*x)**(n + S(6))/(b**S(6)*(n + S(6))) + (a + b*x)**(n + S(3))*(-S(10)*a**S(3)*d + b**S(3)*c)/(b**S(6)*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**n*(c + d*x**S(3)), x), x, S(6)*a**S(2)*d*(a + b*x)**(n + S(3))/(b**S(5)*(n + S(3))) - S(4)*a*d*(a + b*x)**(n + S(4))/(b**S(5)*(n + S(4))) - a*(a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)/(b**S(5)*(n + S(1))) + d*(a + b*x)**(n + S(5))/(b**S(5)*(n + S(5))) + (a + b*x)**(n + S(2))*(-S(4)*a**S(3)*d + b**S(3)*c)/(b**S(5)*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n*(c + d*x**S(3)), x), x, S(3)*a**S(2)*d*(a + b*x)**(n + S(2))/(b**S(4)*(n + S(2))) - S(3)*a*d*(a + b*x)**(n + S(3))/(b**S(4)*(n + S(3))) + d*(a + b*x)**(n + S(4))/(b**S(4)*(n + S(4))) + (a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)/(b**S(4)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n*(c + d*x**S(3))/x, x), x, a**S(2)*d*(a + b*x)**(n + S(1))/(b**S(3)*(n + S(1))) - S(2)*a*d*(a + b*x)**(n + S(2))/(b**S(3)*(n + S(2))) + d*(a + b*x)**(n + S(3))/(b**S(3)*(n + S(3))) - c*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**n*(c + d*x**S(3))**S(2), x), x, S(28)*a**S(2)*d**S(2)*(a + b*x)**(n + S(7))/(b**S(9)*(n + S(7))) + S(4)*a**S(2)*d*(a + b*x)**(n + S(4))*(-S(14)*a**S(3)*d + S(5)*b**S(3)*c)/(b**S(9)*(n + S(4))) + a**S(2)*(a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)**S(2)/(b**S(9)*(n + S(1))) - S(8)*a*d**S(2)*(a + b*x)**(n + S(8))/(b**S(9)*(n + S(8))) - S(10)*a*d*(a + b*x)**(n + S(5))*(-S(7)*a**S(3)*d + b**S(3)*c)/(b**S(9)*(n + S(5))) - S(2)*a*(a + b*x)**(n + S(2))*(-S(4)*a**S(3)*d + b**S(3)*c)*(-a**S(3)*d + b**S(3)*c)/(b**S(9)*(n + S(2))) + d**S(2)*(a + b*x)**(n + S(9))/(b**S(9)*(n + S(9))) + S(2)*d*(a + b*x)**(n + S(6))*(-S(28)*a**S(3)*d + b**S(3)*c)/(b**S(9)*(n + S(6))) + (a + b*x)**(n + S(3))*(S(28)*a**S(6)*d**S(2) - S(20)*a**S(3)*b**S(3)*c*d + b**S(6)*c**S(2))/(b**S(9)*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**n*(c + d*x**S(3))**S(2), x), x, S(21)*a**S(2)*d**S(2)*(a + b*x)**(n + S(6))/(b**S(8)*(n + S(6))) + S(3)*a**S(2)*d*(a + b*x)**(n + S(3))*(-S(7)*a**S(3)*d + S(4)*b**S(3)*c)/(b**S(8)*(n + S(3))) - S(7)*a*d**S(2)*(a + b*x)**(n + S(7))/(b**S(8)*(n + S(7))) - a*d*(a + b*x)**(n + S(4))*(-S(35)*a**S(3)*d + S(8)*b**S(3)*c)/(b**S(8)*(n + S(4))) - a*(a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)**S(2)/(b**S(8)*(n + S(1))) + d**S(2)*(a + b*x)**(n + S(8))/(b**S(8)*(n + S(8))) + d*(a + b*x)**(n + S(5))*(-S(35)*a**S(3)*d + S(2)*b**S(3)*c)/(b**S(8)*(n + S(5))) + (a + b*x)**(n + S(2))*(-S(7)*a**S(3)*d + b**S(3)*c)*(-a**S(3)*d + b**S(3)*c)/(b**S(8)*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n*(c + d*x**S(3))**S(2), x), x, S(15)*a**S(2)*d**S(2)*(a + b*x)**(n + S(5))/(b**S(7)*(n + S(5))) + S(6)*a**S(2)*d*(a + b*x)**(n + S(2))*(-a**S(3)*d + b**S(3)*c)/(b**S(7)*(n + S(2))) - S(6)*a*d**S(2)*(a + b*x)**(n + S(6))/(b**S(7)*(n + S(6))) - S(3)*a*d*(a + b*x)**(n + S(3))*(-S(5)*a**S(3)*d + S(2)*b**S(3)*c)/(b**S(7)*(n + S(3))) + d**S(2)*(a + b*x)**(n + S(7))/(b**S(7)*(n + S(7))) + S(2)*d*(a + b*x)**(n + S(4))*(-S(10)*a**S(3)*d + b**S(3)*c)/(b**S(7)*(n + S(4))) + (a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)**S(2)/(b**S(7)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n*(c + d*x**S(3))**S(2)/x, x), x, S(10)*a**S(2)*d**S(2)*(a + b*x)**(n + S(4))/(b**S(6)*(n + S(4))) + a**S(2)*d*(a + b*x)**(n + S(1))*(-a**S(3)*d + S(2)*b**S(3)*c)/(b**S(6)*(n + S(1))) - S(5)*a*d**S(2)*(a + b*x)**(n + S(5))/(b**S(6)*(n + S(5))) - a*d*(a + b*x)**(n + S(2))*(-S(5)*a**S(3)*d + S(4)*b**S(3)*c)/(b**S(6)*(n + S(2))) + d**S(2)*(a + b*x)**(n + S(6))/(b**S(6)*(n + S(6))) + S(2)*d*(a + b*x)**(n + S(3))*(-S(5)*a**S(3)*d + b**S(3)*c)/(b**S(6)*(n + S(3))) - c**S(2)*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**n*(c + d*x**S(3))**S(3), x), x, S(55)*a**S(2)*d**S(3)*(a + b*x)**(n + S(10))/(b**S(12)*(n + S(10))) + S(42)*a**S(2)*d**S(2)*(a + b*x)**(n + S(7))*(-S(11)*a**S(3)*d + S(2)*b**S(3)*c)/(b**S(12)*(n + S(7))) + S(3)*a**S(2)*d*(a + b*x)**(n + S(4))*(S(55)*a**S(6)*d**S(2) - S(56)*a**S(3)*b**S(3)*c*d + S(10)*b**S(6)*c**S(2))/(b**S(12)*(n + S(4))) + a**S(2)*(a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)**S(3)/(b**S(12)*(n + S(1))) - S(11)*a*d**S(3)*(a + b*x)**(n + S(11))/(b**S(12)*(n + S(11))) - S(6)*a*d**S(2)*(a + b*x)**(n + S(8))*(-S(55)*a**S(3)*d + S(4)*b**S(3)*c)/(b**S(12)*(n + S(8))) - S(15)*a*d*(a + b*x)**(n + S(5))*(S(22)*a**S(6)*d**S(2) - S(14)*a**S(3)*b**S(3)*c*d + b**S(6)*c**S(2))/(b**S(12)*(n + S(5))) - a*(a + b*x)**(n + S(2))*(-S(11)*a**S(3)*d + S(2)*b**S(3)*c)*(-a**S(3)*d + b**S(3)*c)**S(2)/(b**S(12)*(n + S(2))) + d**S(3)*(a + b*x)**(n + S(12))/(b**S(12)*(n + S(12))) + S(3)*d**S(2)*(a + b*x)**(n + S(9))*(-S(55)*a**S(3)*d + b**S(3)*c)/(b**S(12)*(n + S(9))) + S(3)*d*(a + b*x)**(n + S(6))*(S(154)*a**S(6)*d**S(2) - S(56)*a**S(3)*b**S(3)*c*d + b**S(6)*c**S(2))/(b**S(12)*(n + S(6))) + (a + b*x)**(n + S(3))*(-a**S(3)*d + b**S(3)*c)*(S(55)*a**S(6)*d**S(2) - S(29)*a**S(3)*b**S(3)*c*d + b**S(6)*c**S(2))/(b**S(12)*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**n*(c + d*x**S(3))**S(3), x), x, S(45)*a**S(2)*d**S(3)*(a + b*x)**(n + S(9))/(b**S(11)*(n + S(9))) + S(63)*a**S(2)*d**S(2)*(a + b*x)**(n + S(6))*(-S(4)*a**S(3)*d + b**S(3)*c)/(b**S(11)*(n + S(6))) + S(9)*a**S(2)*d*(a + b*x)**(n + S(3))*(-S(5)*a**S(3)*d + S(2)*b**S(3)*c)*(-a**S(3)*d + b**S(3)*c)/(b**S(11)*(n + S(3))) - S(10)*a*d**S(3)*(a + b*x)**(n + S(10))/(b**S(11)*(n + S(10))) - S(21)*a*d**S(2)*(a + b*x)**(n + S(7))*(-S(10)*a**S(3)*d + b**S(3)*c)/(b**S(11)*(n + S(7))) - S(3)*a*d*(a + b*x)**(n + S(4))*(S(40)*a**S(6)*d**S(2) - S(35)*a**S(3)*b**S(3)*c*d + S(4)*b**S(6)*c**S(2))/(b**S(11)*(n + S(4))) - a*(a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)**S(3)/(b**S(11)*(n + S(1))) + d**S(3)*(a + b*x)**(n + S(11))/(b**S(11)*(n + S(11))) + S(3)*d**S(2)*(a + b*x)**(n + S(8))*(-S(40)*a**S(3)*d + b**S(3)*c)/(b**S(11)*(n + S(8))) + S(3)*d*(a + b*x)**(n + S(5))*(S(70)*a**S(6)*d**S(2) - S(35)*a**S(3)*b**S(3)*c*d + b**S(6)*c**S(2))/(b**S(11)*(n + S(5))) + (a + b*x)**(n + S(2))*(-S(10)*a**S(3)*d + b**S(3)*c)*(-a**S(3)*d + b**S(3)*c)**S(2)/(b**S(11)*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n*(c + d*x**S(3))**S(3), x), x, S(36)*a**S(2)*d**S(3)*(a + b*x)**(n + S(8))/(b**S(10)*(n + S(8))) + S(9)*a**S(2)*d**S(2)*(a + b*x)**(n + S(5))*(-S(14)*a**S(3)*d + S(5)*b**S(3)*c)/(b**S(10)*(n + S(5))) + S(9)*a**S(2)*d*(a + b*x)**(n + S(2))*(-a**S(3)*d + b**S(3)*c)**S(2)/(b**S(10)*(n + S(2))) - S(9)*a*d**S(3)*(a + b*x)**(n + S(9))/(b**S(10)*(n + S(9))) - S(18)*a*d**S(2)*(a + b*x)**(n + S(6))*(-S(7)*a**S(3)*d + b**S(3)*c)/(b**S(10)*(n + S(6))) - S(9)*a*d*(a + b*x)**(n + S(3))*(-S(4)*a**S(3)*d + b**S(3)*c)*(-a**S(3)*d + b**S(3)*c)/(b**S(10)*(n + S(3))) + d**S(3)*(a + b*x)**(n + S(10))/(b**S(10)*(n + S(10))) + S(3)*d**S(2)*(a + b*x)**(n + S(7))*(-S(28)*a**S(3)*d + b**S(3)*c)/(b**S(10)*(n + S(7))) + S(3)*d*(a + b*x)**(n + S(4))*(S(28)*a**S(6)*d**S(2) - S(20)*a**S(3)*b**S(3)*c*d + b**S(6)*c**S(2))/(b**S(10)*(n + S(4))) + (a + b*x)**(n + S(1))*(-a**S(3)*d + b**S(3)*c)**S(3)/(b**S(10)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n*(c + d*x**S(3))**S(3)/x, x), x, S(28)*a**S(2)*d**S(3)*(a + b*x)**(n + S(7))/(b**S(9)*(n + S(7))) + S(2)*a**S(2)*d**S(2)*(a + b*x)**(n + S(4))*(-S(28)*a**S(3)*d + S(15)*b**S(3)*c)/(b**S(9)*(n + S(4))) + a**S(2)*d*(a + b*x)**(n + S(1))*(a**S(6)*d**S(2) - S(3)*a**S(3)*b**S(3)*c*d + S(3)*b**S(6)*c**S(2))/(b**S(9)*(n + S(1))) - S(8)*a*d**S(3)*(a + b*x)**(n + S(8))/(b**S(9)*(n + S(8))) - S(5)*a*d**S(2)*(a + b*x)**(n + S(5))*(-S(14)*a**S(3)*d + S(3)*b**S(3)*c)/(b**S(9)*(n + S(5))) - a*d*(a + b*x)**(n + S(2))*(S(8)*a**S(6)*d**S(2) - S(15)*a**S(3)*b**S(3)*c*d + S(6)*b**S(6)*c**S(2))/(b**S(9)*(n + S(2))) + d**S(3)*(a + b*x)**(n + S(9))/(b**S(9)*(n + S(9))) + d**S(2)*(a + b*x)**(n + S(6))*(-S(56)*a**S(3)*d + S(3)*b**S(3)*c)/(b**S(9)*(n + S(6))) + d*(a + b*x)**(n + S(3))*(S(28)*a**S(6)*d**S(2) - S(30)*a**S(3)*b**S(3)*c*d + S(3)*b**S(6)*c**S(2))/(b**S(9)*(n + S(3))) - c**S(3)*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(e + f*x)**n/(a + b*x**S(3)), x), x, x**(m + S(1))*(S(1) + f*x/e)**(-n)*(e + f*x)**n*AppellF1(m + S(1), -n, S(1), m + S(2), -f*x/e, -b**(S(1)/3)*x/a**(S(1)/3))/(S(3)*a*(m + S(1))) + x**(m + S(1))*(S(1) + f*x/e)**(-n)*(e + f*x)**n*AppellF1(m + S(1), -n, S(1), m + S(2), -f*x/e, (S(-1))**(S(1)/3)*b**(S(1)/3)*x/a**(S(1)/3))/(S(3)*a*(m + S(1))) + x**(m + S(1))*(S(1) + f*x/e)**(-n)*(e + f*x)**n*AppellF1(m + S(1), -n, S(1), m + S(2), -f*x/e, -(S(-1))**(S(2)/3)*b**(S(1)/3)*x/a**(S(1)/3))/(S(3)*a*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(e + f*x)**n/(a + b*x**S(3)), x), x, a*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*b**(S(5)/3)*(n + S(1))*(-(S(-1))**(S(2)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e)) + a*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*b**(S(5)/3)*(n + S(1))*((S(-1))**(S(1)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e)) + a*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*b**(S(5)/3)*(n + S(1))*(-a**(S(1)/3)*f + b**(S(1)/3)*e)) + e**S(2)*(e + f*x)**(n + S(1))/(b*f**S(3)*(n + S(1))) - S(2)*e*(e + f*x)**(n + S(2))/(b*f**S(3)*(n + S(2))) + (e + f*x)**(n + S(3))/(b*f**S(3)*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(e + f*x)**n/(a + b*x**S(3)), x), x, (S(-1))**(S(2)/3)*a**(S(2)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(1)/3)*b**(S(1)/3)*(e + f*x)/(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/(S(3)*b**(S(4)/3)*(n + S(1))*(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e)) + (S(-1))**(S(1)/3)*a**(S(2)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(2)/3)*b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/(S(3)*b**(S(4)/3)*(n + S(1))*(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e)) - a**(S(2)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*b**(S(4)/3)*(n + S(1))*(-a**(S(1)/3)*f + b**(S(1)/3)*e)) - e*(e + f*x)**(n + S(1))/(b*f**S(2)*(n + S(1))) + (e + f*x)**(n + S(2))/(b*f**S(2)*(n + S(2))), expand=True, _diff=True, _numerical=True) # difference in simplify assert rubi_test(rubi_integrate(x**S(3)*(e + f*x)**n/(a + b*x**S(3)), x), x, -a**(S(1)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(1)/3)*b**(S(1)/3)*(e + f*x)/(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/(S(3)*b*(n + S(1))*(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e)) + a**(S(1)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(2)/3)*b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/(S(3)*b*(n + S(1))*(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e)) + a**(S(1)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*b*(n + S(1))*(-a**(S(1)/3)*f + b**(S(1)/3)*e)) + (e + f*x)**(n + S(1))/(b*f*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(e + f*x)**n/(a + b*x**S(3)), x), x, -(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*b**(S(2)/3)*(n + S(1))*(-(S(-1))**(S(2)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e)) - (e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*b**(S(2)/3)*(n + S(1))*((S(-1))**(S(1)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e)) - (e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*b**(S(2)/3)*(n + S(1))*(-a**(S(1)/3)*f + b**(S(1)/3)*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(e + f*x)**n/(a + b*x**S(3)), x), x, -(S(-1))**(S(2)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(1)/3)*b**(S(1)/3)*(e + f*x)/(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/(S(3)*a**(S(1)/3)*b**(S(1)/3)*(n + S(1))*(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e)) - (S(-1))**(S(1)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(2)/3)*b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/(S(3)*a**(S(1)/3)*b**(S(1)/3)*(n + S(1))*(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e)) + (e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*a**(S(1)/3)*b**(S(1)/3)*(n + S(1))*(-a**(S(1)/3)*f + b**(S(1)/3)*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e + f*x)**n/(a + b*x**S(3)), x), x, (e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(1)/3)*b**(S(1)/3)*(e + f*x)/(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/(S(3)*a**(S(2)/3)*(n + S(1))*(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e)) - (e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(2)/3)*b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/(S(3)*a**(S(2)/3)*(n + S(1))*(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e)) - (e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*a**(S(2)/3)*(n + S(1))*(-a**(S(1)/3)*f + b**(S(1)/3)*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e + f*x)**n/(x*(a + b*x**S(3))), x), x, b**(S(1)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*a*(n + S(1))*(-(S(-1))**(S(2)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e)) + b**(S(1)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*a*(n + S(1))*((S(-1))**(S(1)/3)*a**(S(1)/3)*f + b**(S(1)/3)*e)) + b**(S(1)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*a*(n + S(1))*(-a**(S(1)/3)*f + b**(S(1)/3)*e)) - (e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + f*x/e)/(a*e*(n + S(1))), expand=True, _diff=True, _numerical=True) # large time in rubi_test assert rubi_test(rubi_integrate((e + f*x)**n/(x**S(2)*(a + b*x**S(3))), x), x, f*(e + f*x)**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), S(1) + f*x/e)/(a*e**S(2)*(n + S(1))) + (S(-1))**(S(2)/3)*b**(S(2)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(1)/3)*b**(S(1)/3)*(e + f*x)/(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e))/(S(3)*a**(S(4)/3)*(n + S(1))*(a**(S(1)/3)*f + (S(-1))**(S(1)/3)*b**(S(1)/3)*e)) + (S(-1))**(S(1)/3)*b**(S(2)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), (S(-1))**(S(2)/3)*b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e))/(S(3)*a**(S(4)/3)*(n + S(1))*(-a**(S(1)/3)*f + (S(-1))**(S(2)/3)*b**(S(1)/3)*e)) - b**(S(2)/3)*(e + f*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/3)*(e + f*x)/(-a**(S(1)/3)*f + b**(S(1)/3)*e))/(S(3)*a**(S(4)/3)*(n + S(1))*(-a**(S(1)/3)*f + b**(S(1)/3)*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c + d*x)**(n + S(1))/(a + b*x**S(3)), x), x, -(c + d*x)**(n + S(2))*hyper((S(1), n + S(2)), (n + S(3),), b**(S(1)/3)*(c + d*x)/(-(S(-1))**(S(2)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b**(S(2)/3)*(n + S(2))*(-(S(-1))**(S(2)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c)) - (c + d*x)**(n + S(2))*hyper((S(1), n + S(2)), (n + S(3),), b**(S(1)/3)*(c + d*x)/((S(-1))**(S(1)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b**(S(2)/3)*(n + S(2))*((S(-1))**(S(1)/3)*a**(S(1)/3)*d + b**(S(1)/3)*c)) - (c + d*x)**(n + S(2))*hyper((S(1), n + S(2)), (n + S(3),), b**(S(1)/3)*(c + d*x)/(-a**(S(1)/3)*d + b**(S(1)/3)*c))/(S(3)*b**(S(2)/3)*(n + S(2))*(-a**(S(1)/3)*d + b**(S(1)/3)*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(c + d*x)**n/(a + b*x**S(4)), x), x, -(c + d*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(n + S(1))*(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4))) - (c + d*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(n + S(1))*(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4))) - (c + d*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(n + S(1))*(b**(S(1)/4)*c + d*(-a)**(S(1)/4))) - (c + d*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(n + S(1))*(b**(S(1)/4)*c - d*(-a)**(S(1)/4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(c + d*x)**(n + S(1))/(a + b*x**S(4)), x), x, -(c + d*x)**(n + S(2))*hyper((S(1), n + S(2)), (n + S(3),), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(n + S(2))*(b**(S(1)/4)*c + I*d*(-a)**(S(1)/4))) - (c + d*x)**(n + S(2))*hyper((S(1), n + S(2)), (n + S(3),), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(n + S(2))*(b**(S(1)/4)*c - I*d*(-a)**(S(1)/4))) - (c + d*x)**(n + S(2))*hyper((S(1), n + S(2)), (n + S(3),), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c + d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(n + S(2))*(b**(S(1)/4)*c + d*(-a)**(S(1)/4))) - (c + d*x)**(n + S(2))*hyper((S(1), n + S(2)), (n + S(3),), b**(S(1)/4)*(c + d*x)/(b**(S(1)/4)*c - d*(-a)**(S(1)/4)))/(S(4)*b**(S(3)/4)*(n + S(2))*(b**(S(1)/4)*c - d*(-a)**(S(1)/4))), expand=True, _diff=True, _numerical=True) # large time in rubi_test assert rubi_test(rubi_integrate(S(1)/(sqrt(a + b*x**S(4))*(c + d*x + e*x**S(2))), x), x, sqrt(S(2))*e**S(2)*atanh(sqrt(S(2))*(S(4)*a*e**S(2) + b*x**S(2)*(d + sqrt(-S(4)*c*e + d**S(2)))**S(2))/(S(4)*sqrt(a + b*x**S(4))*sqrt(S(2)*a*e**S(4) + S(2)*b*c**S(2)*e**S(2) - S(4)*b*c*d**S(2)*e + b*d**S(4) + b*d*sqrt(-S(4)*c*e + d**S(2))*(-S(2)*c*e + d**S(2)))))/(S(2)*sqrt(-S(4)*c*e + d**S(2))*sqrt(S(2)*a*e**S(4) + S(2)*b*c**S(2)*e**S(2) - S(4)*b*c*d**S(2)*e + b*d**S(4) + b*d*sqrt(-S(4)*c*e + d**S(2))*(-S(2)*c*e + d**S(2)))) - sqrt(S(2))*e**S(2)*atanh(sqrt(S(2))*(S(4)*a*e**S(2) + b*x**S(2)*(d - sqrt(-S(4)*c*e + d**S(2)))**S(2))/(S(4)*sqrt(a + b*x**S(4))*sqrt(S(2)*a*e**S(4) + S(2)*b*c**S(2)*e**S(2) - S(4)*b*c*d**S(2)*e + b*d**S(4) - b*d*sqrt(-S(4)*c*e + d**S(2))*(-S(2)*c*e + d**S(2)))))/(S(2)*sqrt(-S(4)*c*e + d**S(2))*sqrt(S(2)*a*e**S(4) + S(2)*b*c**S(2)*e**S(2) - S(4)*b*c*d**S(2)*e + b*d**S(4) - b*d*sqrt(-S(4)*c*e + d**S(2))*(-S(2)*c*e + d**S(2)))) - S(2)*e*atan(x*sqrt(-(S(16)*a*e**S(4) + b*(d + sqrt(-S(4)*c*e + d**S(2)))**S(4))/(e**S(2)*(d + sqrt(-S(4)*c*e + d**S(2)))**S(2)))/(S(2)*sqrt(a + b*x**S(4))))/(sqrt(-(S(16)*a*e**S(4) + b*(d + sqrt(-S(4)*c*e + d**S(2)))**S(4))/(e**S(2)*(d + sqrt(-S(4)*c*e + d**S(2)))**S(2)))*(d + sqrt(-S(4)*c*e + d**S(2)))*sqrt(-S(4)*c*e + d**S(2))) + S(2)*e*atan(x*sqrt(-(S(16)*a*e**S(4) + b*(d - sqrt(-S(4)*c*e + d**S(2)))**S(4))/(e**S(2)*(d - sqrt(-S(4)*c*e + d**S(2)))**S(2)))/(S(2)*sqrt(a + b*x**S(4))))/(sqrt(-(S(16)*a*e**S(4) + b*(d - sqrt(-S(4)*c*e + d**S(2)))**S(4))/(e**S(2)*(d - sqrt(-S(4)*c*e + d**S(2)))**S(2)))*(d - sqrt(-S(4)*c*e + d**S(2)))*sqrt(-S(4)*c*e + d**S(2))) - e*sqrt((a + b*x**S(4))/(sqrt(a) + sqrt(b)*x**S(2))**S(2))*(sqrt(a) + sqrt(b)*x**S(2))*(S(4)*e**S(2) - sqrt(b)*(d + sqrt(-S(4)*c*e + d**S(2)))**S(2)/sqrt(a))*elliptic_pi(sqrt(a)*(S(4)*e**S(2) + sqrt(b)*(d + sqrt(-S(4)*c*e + d**S(2)))**S(2)/sqrt(a))**S(2)/(S(16)*sqrt(b)*e**S(2)*(d + sqrt(-S(4)*c*e + d**S(2)))**S(2)), S(2)*atan(b**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*b**(S(1)/4)*sqrt(a + b*x**S(4))*(d + sqrt(-S(4)*c*e + d**S(2)))*(S(4)*e**S(2) + sqrt(b)*(d + sqrt(-S(4)*c*e + d**S(2)))**S(2)/sqrt(a))*sqrt(-S(4)*c*e + d**S(2))) + e*sqrt((a + b*x**S(4))/(sqrt(a) + sqrt(b)*x**S(2))**S(2))*(sqrt(a) + sqrt(b)*x**S(2))*(S(4)*e**S(2) - sqrt(b)*(d - sqrt(-S(4)*c*e + d**S(2)))**S(2)/sqrt(a))*elliptic_pi(sqrt(a)*(S(4)*e**S(2) + sqrt(b)*(d - sqrt(-S(4)*c*e + d**S(2)))**S(2)/sqrt(a))**S(2)/(S(16)*sqrt(b)*e**S(2)*(d - sqrt(-S(4)*c*e + d**S(2)))**S(2)), S(2)*atan(b**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*b**(S(1)/4)*sqrt(a + b*x**S(4))*(d - sqrt(-S(4)*c*e + d**S(2)))*(S(4)*e**S(2) + sqrt(b)*(d - sqrt(-S(4)*c*e + d**S(2)))**S(2)/sqrt(a))*sqrt(-S(4)*c*e + d**S(2))) + b**(S(1)/4)*e*sqrt((a + b*x**S(4))/(sqrt(a) + sqrt(b)*x**S(2))**S(2))*(sqrt(a) + sqrt(b)*x**S(2))*(d - sqrt(-S(4)*c*e + d**S(2)))*elliptic_f(S(2)*atan(b**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(a**(S(3)/4)*sqrt(a + b*x**S(4))*(S(4)*e**S(2) + sqrt(b)*(d - sqrt(-S(4)*c*e + d**S(2)))**S(2)/sqrt(a))*sqrt(-S(4)*c*e + d**S(2))) - b**(S(1)/4)*e*sqrt((a + b*x**S(4))/(sqrt(a) + sqrt(b)*x**S(2))**S(2))*(sqrt(a) + sqrt(b)*x**S(2))*(d + sqrt(-S(4)*c*e + d**S(2)))*elliptic_f(S(2)*atan(b**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(a**(S(3)/4)*sqrt(a + b*x**S(4))*(S(4)*e**S(2) + sqrt(b)*(d + sqrt(-S(4)*c*e + d**S(2)))**S(2)/sqrt(a))*sqrt(-S(4)*c*e + d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**p, x), x, x*(c*x**n)**(-S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(1))/(b*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**S(3), x), x, x*(c*x**n)**(-S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**S(2), x), x, x*(c*x**n)**(-S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a + b*(c*x**n)**(S(1)/n), x), x, a*x + b*x*(c*x**n)**(S(1)/n)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*(c*x**n)**(S(1)/n)), x), x, x*(c*x**n)**(-S(1)/n)*log(a + b*(c*x**n)**(S(1)/n))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**(S(-2)), x), x, x/(a**S(2) + a*b*(c*x**n)**(S(1)/n)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**(S(-2)), x), x, -x*(c*x**n)**(-S(1)/n)/(b*(a + b*(c*x**n)**(S(1)/n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**(S(-3)), x), x, -x*(c*x**n)**(-S(1)/n)/(S(2)*b*(a + b*(c*x**n)**(S(1)/n))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(2)/n))**S(3), x), x, a**S(3)*x + a**S(2)*b*x*(c*x**n)**(S(2)/n) + S(3)*a*b**S(2)*x*(c*x**n)**(S(4)/n)/S(5) + b**S(3)*x*(c*x**n)**(S(6)/n)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(2)/n))**S(2), x), x, a**S(2)*x + S(2)*a*b*x*(c*x**n)**(S(2)/n)/S(3) + b**S(2)*x*(c*x**n)**(S(4)/n)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a + b*(c*x**n)**(S(2)/n), x), x, a*x + b*x*(c*x**n)**(S(2)/n)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*(c*x**n)**(S(2)/n)), x), x, x*(c*x**n)**(-S(1)/n)*atan(sqrt(b)*(c*x**n)**(S(1)/n)/sqrt(a))/(sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(2)/n))**(S(-2)), x), x, x/(S(2)*a*(a + b*(c*x**n)**(S(2)/n))) + x*(c*x**n)**(-S(1)/n)*atan(sqrt(b)*(c*x**n)**(S(1)/n)/sqrt(a))/(S(2)*a**(S(3)/2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(2)/n))**(S(-3)), x), x, x/(S(4)*a*(a + b*(c*x**n)**(S(2)/n))**S(2)) + S(3)*x/(S(8)*a**S(2)*(a + b*(c*x**n)**(S(2)/n))) + S(3)*x*(c*x**n)**(-S(1)/n)*atan(sqrt(b)*(c*x**n)**(S(1)/n)/sqrt(a))/(S(8)*a**(S(5)/2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(3)/n))**S(3), x), x, a**S(3)*x + S(3)*a**S(2)*b*x*(c*x**n)**(S(3)/n)/S(4) + S(3)*a*b**S(2)*x*(c*x**n)**(S(6)/n)/S(7) + b**S(3)*x*(c*x**n)**(S(9)/n)/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(3)/n))**S(2), x), x, a**S(2)*x + a*b*x*(c*x**n)**(S(3)/n)/S(2) + b**S(2)*x*(c*x**n)**(S(6)/n)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a + b*(c*x**n)**(S(3)/n), x), x, a*x + b*x*(c*x**n)**(S(3)/n)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*(c*x**n)**(S(3)/n)), x), x, x*(c*x**n)**(-S(1)/n)*log(a**(S(1)/3) + b**(S(1)/3)*(c*x**n)**(S(1)/n))/(S(3)*a**(S(2)/3)*b**(S(1)/3)) - x*(c*x**n)**(-S(1)/n)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c*x**n)**(S(1)/n) + b**(S(2)/3)*(c*x**n)**(S(2)/n))/(S(6)*a**(S(2)/3)*b**(S(1)/3)) - sqrt(S(3))*x*(c*x**n)**(-S(1)/n)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c*x**n)**(S(1)/n))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*b**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(3)/n))**(S(-2)), x), x, x/(S(3)*a*(a + b*(c*x**n)**(S(3)/n))) + S(2)*x*(c*x**n)**(-S(1)/n)*log(a**(S(1)/3) + b**(S(1)/3)*(c*x**n)**(S(1)/n))/(S(9)*a**(S(5)/3)*b**(S(1)/3)) - x*(c*x**n)**(-S(1)/n)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c*x**n)**(S(1)/n) + b**(S(2)/3)*(c*x**n)**(S(2)/n))/(S(9)*a**(S(5)/3)*b**(S(1)/3)) - S(2)*sqrt(S(3))*x*(c*x**n)**(-S(1)/n)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c*x**n)**(S(1)/n))/(S(3)*a**(S(1)/3)))/(S(9)*a**(S(5)/3)*b**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(3)/n))**(S(-3)), x), x, x/(S(6)*a*(a + b*(c*x**n)**(S(3)/n))**S(2)) + S(5)*x/(S(18)*a**S(2)*(a + b*(c*x**n)**(S(3)/n))) + S(5)*x*(c*x**n)**(-S(1)/n)*log(a**(S(1)/3) + b**(S(1)/3)*(c*x**n)**(S(1)/n))/(S(27)*a**(S(8)/3)*b**(S(1)/3)) - S(5)*x*(c*x**n)**(-S(1)/n)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c*x**n)**(S(1)/n) + b**(S(2)/3)*(c*x**n)**(S(2)/n))/(S(54)*a**(S(8)/3)*b**(S(1)/3)) - S(5)*sqrt(S(3))*x*(c*x**n)**(-S(1)/n)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c*x**n)**(S(1)/n))/(S(3)*a**(S(1)/3)))/(S(27)*a**(S(8)/3)*b**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x**S(3))**(S(2)/3) + S(1)), x), x, x*atan((x**S(3))**(S(1)/3))/(x**S(3))**(S(1)/3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x**S(2))**(S(3)/2) + S(1)), x), x, x*log(sqrt(x**S(2)) + S(1))/(S(3)*sqrt(x**S(2))) - x*log(x**S(2) - sqrt(x**S(2)) + S(1))/(S(6)*sqrt(x**S(2))) - sqrt(S(3))*x*atan(sqrt(S(3))*(-S(2)*sqrt(x**S(2)) + S(1))/S(3))/(S(3)*sqrt(x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(4)*sqrt(x**S(4)) + S(1)), x), x, x*atan(S(2)*(x**S(4))**(S(1)/4))/(S(2)*(x**S(4))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-S(4)*sqrt(x**S(4)) + S(1)), x), x, x*atanh(S(2)*(x**S(4))**(S(1)/4))/(S(2)*(x**S(4))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(4)*(x**S(6))**(S(1)/3) + S(1)), x), x, x*atan(S(2)*(x**S(6))**(S(1)/6))/(S(2)*(x**S(6))**(S(1)/6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-S(4)*(x**S(6))**(S(1)/3) + S(1)), x), x, x*atanh(S(2)*(x**S(6))**(S(1)/6))/(S(2)*(x**S(6))**(S(1)/6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(4)*(x**(S(2)*n))**(S(1)/n) + S(1)), x), x, x*(x**(S(2)*n))**(-S(1)/(S(2)*n))*atan(S(2)*(x**(S(2)*n))**(S(1)/(S(2)*n)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-S(4)*(x**(S(2)*n))**(S(1)/n) + S(1)), x), x, x*(x**(S(2)*n))**(-S(1)/(S(2)*n))*atanh(S(2)*(x**(S(2)*n))**(S(1)/(S(2)*n)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*(c*x**n)**(S(1)/n)), x), x, -a**S(3)*x**S(4)*(c*x**n)**(-S(4)/n)*log(a + b*(c*x**n)**(S(1)/n))/b**S(4) + a**S(2)*x**S(4)*(c*x**n)**(-S(3)/n)/b**S(3) - a*x**S(4)*(c*x**n)**(-S(2)/n)/(S(2)*b**S(2)) + x**S(4)*(c*x**n)**(-S(1)/n)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*(c*x**n)**(S(1)/n)), x), x, a**S(2)*x**S(3)*(c*x**n)**(-S(3)/n)*log(a + b*(c*x**n)**(S(1)/n))/b**S(3) - a*x**S(3)*(c*x**n)**(-S(2)/n)/b**S(2) + x**S(3)*(c*x**n)**(-S(1)/n)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*(c*x**n)**(S(1)/n)), x), x, -a*x**S(2)*(c*x**n)**(-S(2)/n)*log(a + b*(c*x**n)**(S(1)/n))/b**S(2) + x**S(2)*(c*x**n)**(-S(1)/n)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*(c*x**n)**(S(1)/n)), x), x, x*(c*x**n)**(-S(1)/n)*log(a + b*(c*x**n)**(S(1)/n))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*(c*x**n)**(S(1)/n))), x), x, log(x)/a - log(a + b*(c*x**n)**(S(1)/n))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*(c*x**n)**(S(1)/n))), x), x, -S(1)/(a*x) - b*(c*x**n)**(S(1)/n)*log(x)/(a**S(2)*x) + b*(c*x**n)**(S(1)/n)*log(a + b*(c*x**n)**(S(1)/n))/(a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*(c*x**n)**(S(1)/n))), x), x, -S(1)/(S(2)*a*x**S(2)) + b*(c*x**n)**(S(1)/n)/(a**S(2)*x**S(2)) + b**S(2)*(c*x**n)**(S(2)/n)*log(x)/(a**S(3)*x**S(2)) - b**S(2)*(c*x**n)**(S(2)/n)*log(a + b*(c*x**n)**(S(1)/n))/(a**S(3)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*(c*x**n)**(S(1)/n))**S(2), x), x, a**S(3)*x**S(4)*(c*x**n)**(-S(4)/n)/(b**S(4)*(a + b*(c*x**n)**(S(1)/n))) + S(3)*a**S(2)*x**S(4)*(c*x**n)**(-S(4)/n)*log(a + b*(c*x**n)**(S(1)/n))/b**S(4) - S(2)*a*x**S(4)*(c*x**n)**(-S(3)/n)/b**S(3) + x**S(4)*(c*x**n)**(-S(2)/n)/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*(c*x**n)**(S(1)/n))**S(2), x), x, -a**S(2)*x**S(3)*(c*x**n)**(-S(3)/n)/(b**S(3)*(a + b*(c*x**n)**(S(1)/n))) - S(2)*a*x**S(3)*(c*x**n)**(-S(3)/n)*log(a + b*(c*x**n)**(S(1)/n))/b**S(3) + x**S(3)*(c*x**n)**(-S(2)/n)/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*(c*x**n)**(S(1)/n))**S(2), x), x, a*x**S(2)*(c*x**n)**(-S(2)/n)/(b**S(2)*(a + b*(c*x**n)**(S(1)/n))) + x**S(2)*(c*x**n)**(-S(2)/n)*log(a + b*(c*x**n)**(S(1)/n))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**(S(-2)), x), x, -x*(c*x**n)**(-S(1)/n)/(b*(a + b*(c*x**n)**(S(1)/n))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*(c*x**n)**(S(1)/n))**S(2)), x), x, S(1)/(a*(a + b*(c*x**n)**(S(1)/n))) + log(x)/a**S(2) - log(a + b*(c*x**n)**(S(1)/n))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*(c*x**n)**(S(1)/n))**S(2)), x), x, -b*(c*x**n)**(S(1)/n)/(a**S(2)*x*(a + b*(c*x**n)**(S(1)/n))) - S(1)/(a**S(2)*x) - S(2)*b*(c*x**n)**(S(1)/n)*log(x)/(a**S(3)*x) + S(2)*b*(c*x**n)**(S(1)/n)*log(a + b*(c*x**n)**(S(1)/n))/(a**S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*(c*x**n)**(S(1)/n))**S(2)), x), x, -S(1)/(S(2)*a**S(2)*x**S(2)) + b**S(2)*(c*x**n)**(S(2)/n)/(a**S(3)*x**S(2)*(a + b*(c*x**n)**(S(1)/n))) + S(2)*b*(c*x**n)**(S(1)/n)/(a**S(3)*x**S(2)) + S(3)*b**S(2)*(c*x**n)**(S(2)/n)*log(x)/(a**S(4)*x**S(2)) - S(3)*b**S(2)*(c*x**n)**(S(2)/n)*log(a + b*(c*x**n)**(S(1)/n))/(a**S(4)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*(c*x**n)**(S(1)/n))**p, x), x, -a**S(3)*x**S(4)*(c*x**n)**(-S(4)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(1))/(b**S(4)*(p + S(1))) + S(3)*a**S(2)*x**S(4)*(c*x**n)**(-S(4)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(2))/(b**S(4)*(p + S(2))) - S(3)*a*x**S(4)*(c*x**n)**(-S(4)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(3))/(b**S(4)*(p + S(3))) + x**S(4)*(c*x**n)**(-S(4)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(4))/(b**S(4)*(p + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*(c*x**n)**(S(1)/n))**p, x), x, a**S(2)*x**S(3)*(c*x**n)**(-S(3)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(1))/(b**S(3)*(p + S(1))) - S(2)*a*x**S(3)*(c*x**n)**(-S(3)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(2))/(b**S(3)*(p + S(2))) + x**S(3)*(c*x**n)**(-S(3)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(3))/(b**S(3)*(p + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*(c*x**n)**(S(1)/n))**p, x), x, -a*x**S(2)*(c*x**n)**(-S(2)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(1))/(b**S(2)*(p + S(1))) + x**S(2)*(c*x**n)**(-S(2)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(2))/(b**S(2)*(p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**p, x), x, x*(c*x**n)**(-S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(1))/(b*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x**n)**(S(1)/n))**p/x, x), x, -(a + b*(c*x**n)**(S(1)/n))**(p + S(1))*hyper((S(1), p + S(1)), (p + S(2),), S(1) + b*(c*x**n)**(S(1)/n)/a)/(a*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((x**n)**(S(1)/n) + S(1))**S(2), x), x, x**S(2)*(x**n)**(-S(2)/n)*log((x**n)**(S(1)/n) + S(1)) + x**S(2)*(x**n)**(-S(2)/n)/((x**n)**(S(1)/n) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a*(b*x**n)**p)**q, x), x, x**(m + S(1))*(a*(b*x**n)**p)**q/(m + n*p*q + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a*(b*x**n)**p)**q, x), x, x**S(3)*(a*(b*x**n)**p)**q/(n*p*q + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a*(b*x**n)**p)**q, x), x, x**S(2)*(a*(b*x**n)**p)**q/(n*p*q + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*x**n)**p)**q, x), x, x*(a*(b*x**n)**p)**q/(n*p*q + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*x**n)**p)**q/x, x), x, (a*(b*x**n)**p)**q/(n*p*q), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*x**n)**p)**q/x**S(2), x), x, -(a*(b*x**n)**p)**q/(x*(-n*p*q + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*x**n)**p)**q/x**S(3), x), x, -(a*(b*x**n)**p)**q/(x**S(2)*(-n*p*q + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a*(b*x**m)**n)**(-S(1)/(m*n)), x), x, x**S(3)*(a*(b*x**m)**n)**(-S(1)/(m*n))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a*(b*x**m)**n)**(-S(1)/(m*n)), x), x, x**S(2)*(a*(b*x**m)**n)**(-S(1)/(m*n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*x**m)**n)**(-S(1)/(m*n)), x), x, x*(a*(b*x**m)**n)**(-S(1)/(m*n))*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*x**m)**n)**(-S(1)/(m*n))/x, x), x, -(a*(b*x**m)**n)**(-S(1)/(m*n)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*x**m)**n)**(-S(1)/(m*n))/x**S(2), x), x, -(a*(b*x**m)**n)**(-S(1)/(m*n))/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n*p*q + S(2))*(a*(b*x**n)**p)**q, x), x, x**(-n*p*q + S(3))*(a*(b*x**n)**p)**q/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n*p*q + S(1))*(a*(b*x**n)**p)**q, x), x, x**(-n*p*q + S(2))*(a*(b*x**n)**p)**q/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n*p*q)*(a*(b*x**n)**p)**q, x), x, x**(-n*p*q + S(1))*(a*(b*x**n)**p)**q, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n*p*q + S(-1))*(a*(b*x**n)**p)**q, x), x, x**(-n*p*q)*(a*(b*x**n)**p)**q*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n*p*q + S(-2))*(a*(b*x**n)**p)**q, x), x, -x**(-n*p*q + S(-1))*(a*(b*x**n)**p)**q, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(c*x**S(2))*(a + b*x)**n, x), x, -a**S(3)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(4)*x*(n + S(1))) + S(3)*a**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(4)*x*(n + S(2))) - S(3)*a*sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(4)*x*(n + S(3))) + sqrt(c*x**S(2))*(a + b*x)**(n + S(4))/(b**S(4)*x*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(c*x**S(2))*(a + b*x)**n, x), x, a**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(3)*x*(n + S(1))) - S(2)*a*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(3)*x*(n + S(2))) + sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(3)*x*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**n, x), x, -a*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(2)*x*(n + S(1))) + sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(2)*x*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**n/x, x), x, sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**n/x**S(2), x), x, -sqrt(c*x**S(2))*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**n/x**S(3), x), x, b*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(2)*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**n/x**S(4), x), x, -b**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))*hyper((S(3), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(3)*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*x**S(2))**(S(3)/2)*(a + b*x)**n, x), x, a**S(4)*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(5)*x*(n + S(1))) - S(4)*a**S(3)*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(5)*x*(n + S(2))) + S(6)*a**S(2)*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(5)*x*(n + S(3))) - S(4)*a*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(4))/(b**S(5)*x*(n + S(4))) + c*sqrt(c*x**S(2))*(a + b*x)**(n + S(5))/(b**S(5)*x*(n + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**n, x), x, -a**S(3)*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(4)*x*(n + S(1))) + S(3)*a**S(2)*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(4)*x*(n + S(2))) - S(3)*a*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(4)*x*(n + S(3))) + c*sqrt(c*x**S(2))*(a + b*x)**(n + S(4))/(b**S(4)*x*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**n/x, x), x, a**S(2)*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(3)*x*(n + S(1))) - S(2)*a*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(3)*x*(n + S(2))) + c*sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(3)*x*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**n/x**S(2), x), x, -a*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(2)*x*(n + S(1))) + c*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(2)*x*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**n/x**S(3), x), x, c*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**n/x**S(4), x), x, -c*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**n/x**S(5), x), x, b*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(2)*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**n/x**S(6), x), x, -b**S(2)*c*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))*hyper((S(3), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(3)*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**n, x), x, -a**S(5)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(6)*x*(n + S(1))) + S(5)*a**S(4)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(6)*x*(n + S(2))) - S(10)*a**S(3)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(6)*x*(n + S(3))) + S(10)*a**S(2)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(4))/(b**S(6)*x*(n + S(4))) - S(5)*a*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(5))/(b**S(6)*x*(n + S(5))) + c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(6))/(b**S(6)*x*(n + S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**n/x, x), x, a**S(4)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(5)*x*(n + S(1))) - S(4)*a**S(3)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(5)*x*(n + S(2))) + S(6)*a**S(2)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(5)*x*(n + S(3))) - S(4)*a*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(4))/(b**S(5)*x*(n + S(4))) + c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(5))/(b**S(5)*x*(n + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**n/x**S(2), x), x, -a**S(3)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(4)*x*(n + S(1))) + S(3)*a**S(2)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(4)*x*(n + S(2))) - S(3)*a*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(4)*x*(n + S(3))) + c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(4))/(b**S(4)*x*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**n/x**S(3), x), x, a**S(2)*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(3)*x*(n + S(1))) - S(2)*a*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(3)*x*(n + S(2))) + c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(3))/(b**S(3)*x*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**n/x**S(4), x), x, -a*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(2)*x*(n + S(1))) + c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(2)*x*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**n/x**S(5), x), x, c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**n/x**S(6), x), x, -c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**n/x**S(7), x), x, b*c**S(2)*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(2)*x*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x)**n/sqrt(c*x**S(2)), x), x, -a**S(3)*x*(a + b*x)**(n + S(1))/(b**S(4)*sqrt(c*x**S(2))*(n + S(1))) + S(3)*a**S(2)*x*(a + b*x)**(n + S(2))/(b**S(4)*sqrt(c*x**S(2))*(n + S(2))) - S(3)*a*x*(a + b*x)**(n + S(3))/(b**S(4)*sqrt(c*x**S(2))*(n + S(3))) + x*(a + b*x)**(n + S(4))/(b**S(4)*sqrt(c*x**S(2))*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)**n/sqrt(c*x**S(2)), x), x, a**S(2)*x*(a + b*x)**(n + S(1))/(b**S(3)*sqrt(c*x**S(2))*(n + S(1))) - S(2)*a*x*(a + b*x)**(n + S(2))/(b**S(3)*sqrt(c*x**S(2))*(n + S(2))) + x*(a + b*x)**(n + S(3))/(b**S(3)*sqrt(c*x**S(2))*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**n/sqrt(c*x**S(2)), x), x, -a*sqrt(c*x**S(2))*(a + b*x)**(n + S(1))/(b**S(2)*c*x*(n + S(1))) + sqrt(c*x**S(2))*(a + b*x)**(n + S(2))/(b**S(2)*c*x*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**n/sqrt(c*x**S(2)), x), x, x*(a + b*x)**(n + S(1))/(b*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n/sqrt(c*x**S(2)), x), x, -x*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n/(x*sqrt(c*x**S(2))), x), x, b*x*(a + b*x)**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(2)*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n/(x**S(2)*sqrt(c*x**S(2))), x), x, -b**S(2)*x*(a + b*x)**(n + S(1))*hyper((S(3), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(3)*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n/(x**S(3)*sqrt(c*x**S(2))), x), x, b**S(3)*x*(a + b*x)**(n + S(1))*hyper((S(4), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(4)*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a + b*x)**n/(c*x**S(2))**(S(3)/2), x), x, -a**S(3)*x*(a + b*x)**(n + S(1))/(b**S(4)*c*sqrt(c*x**S(2))*(n + S(1))) + S(3)*a**S(2)*x*(a + b*x)**(n + S(2))/(b**S(4)*c*sqrt(c*x**S(2))*(n + S(2))) - S(3)*a*x*(a + b*x)**(n + S(3))/(b**S(4)*c*sqrt(c*x**S(2))*(n + S(3))) + x*(a + b*x)**(n + S(4))/(b**S(4)*c*sqrt(c*x**S(2))*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a + b*x)**n/(c*x**S(2))**(S(3)/2), x), x, a**S(2)*x*(a + b*x)**(n + S(1))/(b**S(3)*c*sqrt(c*x**S(2))*(n + S(1))) - S(2)*a*x*(a + b*x)**(n + S(2))/(b**S(3)*c*sqrt(c*x**S(2))*(n + S(2))) + x*(a + b*x)**(n + S(3))/(b**S(3)*c*sqrt(c*x**S(2))*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x)**n/(c*x**S(2))**(S(3)/2), x), x, -a*x*(a + b*x)**(n + S(1))/(b**S(2)*c*sqrt(c*x**S(2))*(n + S(1))) + x*(a + b*x)**(n + S(2))/(b**S(2)*c*sqrt(c*x**S(2))*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)**n/(c*x**S(2))**(S(3)/2), x), x, x*(a + b*x)**(n + S(1))/(b*c*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**n/(c*x**S(2))**(S(3)/2), x), x, -x*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*c*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**n/(c*x**S(2))**(S(3)/2), x), x, b*x*(a + b*x)**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(2)*c*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n/(c*x**S(2))**(S(3)/2), x), x, -b**S(2)*x*(a + b*x)**(n + S(1))*hyper((S(3), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(3)*c*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**n/(x*(c*x**S(2))**(S(3)/2)), x), x, b**S(3)*x*(a + b*x)**(n + S(1))*hyper((S(4), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(4)*c*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(a + b*x)**n/(c*x**S(2))**(S(5)/2), x), x, -a**S(3)*x*(a + b*x)**(n + S(1))/(b**S(4)*c**S(2)*sqrt(c*x**S(2))*(n + S(1))) + S(3)*a**S(2)*x*(a + b*x)**(n + S(2))/(b**S(4)*c**S(2)*sqrt(c*x**S(2))*(n + S(2))) - S(3)*a*x*(a + b*x)**(n + S(3))/(b**S(4)*c**S(2)*sqrt(c*x**S(2))*(n + S(3))) + x*(a + b*x)**(n + S(4))/(b**S(4)*c**S(2)*sqrt(c*x**S(2))*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(a + b*x)**n/(c*x**S(2))**(S(5)/2), x), x, a**S(2)*x*(a + b*x)**(n + S(1))/(b**S(3)*c**S(2)*sqrt(c*x**S(2))*(n + S(1))) - S(2)*a*x*(a + b*x)**(n + S(2))/(b**S(3)*c**S(2)*sqrt(c*x**S(2))*(n + S(2))) + x*(a + b*x)**(n + S(3))/(b**S(3)*c**S(2)*sqrt(c*x**S(2))*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*(a + b*x)**n/(c*x**S(2))**(S(5)/2), x), x, -a*x*(a + b*x)**(n + S(1))/(b**S(2)*c**S(2)*sqrt(c*x**S(2))*(n + S(1))) + x*(a + b*x)**(n + S(2))/(b**S(2)*c**S(2)*sqrt(c*x**S(2))*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*(a + b*x)**n/(c*x**S(2))**(S(5)/2), x), x, x*(a + b*x)**(n + S(1))/(b*c**S(2)*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*(a + b*x)**n/(c*x**S(2))**(S(5)/2), x), x, -x*(a + b*x)**(n + S(1))*hyper((S(1), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a*c**S(2)*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)**n/(c*x**S(2))**(S(5)/2), x), x, b*x*(a + b*x)**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(2)*c**S(2)*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**n/(c*x**S(2))**(S(5)/2), x), x, -b**S(2)*x*(a + b*x)**(n + S(1))*hyper((S(3), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(3)*c**S(2)*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**n/(c*x**S(2))**(S(5)/2), x), x, b**S(3)*x*(a + b*x)**(n + S(1))*hyper((S(4), n + S(1)), (n + S(2),), S(1) + b*x/a)/(a**S(4)*c**S(2)*sqrt(c*x**S(2))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sqrt(c*x**S(2))*(a + b*x), x), x, a*x**(m + S(1))*sqrt(c*x**S(2))/(m + S(2)) + b*x**(m + S(2))*sqrt(c*x**S(2))/(m + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(c*x**S(2))*(a + b*x), x), x, a*x**S(4)*sqrt(c*x**S(2))/S(5) + b*x**S(5)*sqrt(c*x**S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(c*x**S(2))*(a + b*x), x), x, a*x**S(3)*sqrt(c*x**S(2))/S(4) + b*x**S(4)*sqrt(c*x**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(c*x**S(2))*(a + b*x), x), x, a*x**S(2)*sqrt(c*x**S(2))/S(3) + b*x**S(3)*sqrt(c*x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x), x), x, a*x*sqrt(c*x**S(2))/S(2) + b*x**S(2)*sqrt(c*x**S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)/x, x), x, a*sqrt(c*x**S(2)) + b*x*sqrt(c*x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)/x**S(2), x), x, a*sqrt(c*x**S(2))*log(x)/x + b*sqrt(c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)/x**S(3), x), x, -a*sqrt(c*x**S(2))/x**S(2) + b*sqrt(c*x**S(2))*log(x)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)/x**S(4), x), x, -a*sqrt(c*x**S(2))/(S(2)*x**S(3)) - b*sqrt(c*x**S(2))/x**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(c*x**S(2))**(S(3)/2)*(a + b*x), x), x, a*c*x**(m + S(3))*sqrt(c*x**S(2))/(m + S(4)) + b*c*x**(m + S(4))*sqrt(c*x**S(2))/(m + S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(c*x**S(2))**(S(3)/2)*(a + b*x), x), x, a*c*x**S(6)*sqrt(c*x**S(2))/S(7) + b*c*x**S(7)*sqrt(c*x**S(2))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c*x**S(2))**(S(3)/2)*(a + b*x), x), x, a*c*x**S(5)*sqrt(c*x**S(2))/S(6) + b*c*x**S(6)*sqrt(c*x**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*x**S(2))**(S(3)/2)*(a + b*x), x), x, a*c*x**S(4)*sqrt(c*x**S(2))/S(5) + b*c*x**S(5)*sqrt(c*x**S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x), x), x, a*c*x**S(3)*sqrt(c*x**S(2))/S(4) + b*c*x**S(4)*sqrt(c*x**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)/x, x), x, a*c*x**S(2)*sqrt(c*x**S(2))/S(3) + b*c*x**S(3)*sqrt(c*x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)/x**S(2), x), x, a*c*x*sqrt(c*x**S(2))/S(2) + b*c*x**S(2)*sqrt(c*x**S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)/x**S(3), x), x, a*c*sqrt(c*x**S(2)) + b*c*x*sqrt(c*x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)/x**S(4), x), x, a*c*sqrt(c*x**S(2))*log(x)/x + b*c*sqrt(c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(c*x**S(2))**(S(5)/2)*(a + b*x), x), x, a*c**S(2)*x**(m + S(5))*sqrt(c*x**S(2))/(m + S(6)) + b*c**S(2)*x**(m + S(6))*sqrt(c*x**S(2))/(m + S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(c*x**S(2))**(S(5)/2)*(a + b*x), x), x, a*c**S(2)*x**S(8)*sqrt(c*x**S(2))/S(9) + b*c**S(2)*x**S(9)*sqrt(c*x**S(2))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c*x**S(2))**(S(5)/2)*(a + b*x), x), x, a*c**S(2)*x**S(7)*sqrt(c*x**S(2))/S(8) + b*c**S(2)*x**S(8)*sqrt(c*x**S(2))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*x**S(2))**(S(5)/2)*(a + b*x), x), x, a*c**S(2)*x**S(6)*sqrt(c*x**S(2))/S(7) + b*c**S(2)*x**S(7)*sqrt(c*x**S(2))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x), x), x, a*c**S(2)*x**S(5)*sqrt(c*x**S(2))/S(6) + b*c**S(2)*x**S(6)*sqrt(c*x**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)/x, x), x, a*c**S(2)*x**S(4)*sqrt(c*x**S(2))/S(5) + b*c**S(2)*x**S(5)*sqrt(c*x**S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)/x**S(2), x), x, a*c**S(2)*x**S(3)*sqrt(c*x**S(2))/S(4) + b*c**S(2)*x**S(4)*sqrt(c*x**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)/x**S(3), x), x, a*c**S(2)*x**S(2)*sqrt(c*x**S(2))/S(3) + b*c**S(2)*x**S(3)*sqrt(c*x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)/x**S(4), x), x, a*c**S(2)*x*sqrt(c*x**S(2))/S(2) + b*c**S(2)*x**S(2)*sqrt(c*x**S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a + b*x)/sqrt(c*x**S(2)), x), x, a*x**(m + S(1))/(m*sqrt(c*x**S(2))) + b*x**(m + S(2))/(sqrt(c*x**S(2))*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)/sqrt(c*x**S(2)), x), x, a*x**S(4)/(S(3)*sqrt(c*x**S(2))) + b*x**S(5)/(S(4)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)/sqrt(c*x**S(2)), x), x, a*x*sqrt(c*x**S(2))/(S(2)*c) + b*x**S(2)*sqrt(c*x**S(2))/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)/sqrt(c*x**S(2)), x), x, a*x**S(2)/sqrt(c*x**S(2)) + b*x**S(3)/(S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/sqrt(c*x**S(2)), x), x, a*x*log(x)/sqrt(c*x**S(2)) + b*x**S(2)/sqrt(c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x*sqrt(c*x**S(2))), x), x, -a/sqrt(c*x**S(2)) + b*x*log(x)/sqrt(c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(2)*sqrt(c*x**S(2))), x), x, -a/(S(2)*x*sqrt(c*x**S(2))) - b/sqrt(c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(3)*sqrt(c*x**S(2))), x), x, -a/(S(3)*x**S(2)*sqrt(c*x**S(2))) - b/(S(2)*x*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(4)*sqrt(c*x**S(2))), x), x, -a/(S(4)*x**S(3)*sqrt(c*x**S(2))) - b/(S(3)*x**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a + b*x)/(c*x**S(2))**(S(3)/2), x), x, -a*x**(m + S(-1))/(c*sqrt(c*x**S(2))*(-m + S(2))) - b*x**m/(c*sqrt(c*x**S(2))*(-m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)/(c*x**S(2))**(S(3)/2), x), x, a*x**S(2)/(c*sqrt(c*x**S(2))) + b*x**S(3)/(S(2)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)/(c*x**S(2))**(S(3)/2), x), x, a*x*log(x)/(c*sqrt(c*x**S(2))) + b*x**S(2)/(c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)/(c*x**S(2))**(S(3)/2), x), x, -a/(c*sqrt(c*x**S(2))) + b*x*log(x)/(c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(c*x**S(2))**(S(3)/2), x), x, -a/(S(2)*c*x*sqrt(c*x**S(2))) - b/(c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x*(c*x**S(2))**(S(3)/2)), x), x, -a/(S(3)*c*x**S(2)*sqrt(c*x**S(2))) - b/(S(2)*c*x*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(2)*(c*x**S(2))**(S(3)/2)), x), x, -a/(S(4)*c*x**S(3)*sqrt(c*x**S(2))) - b/(S(3)*c*x**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(3)*(c*x**S(2))**(S(3)/2)), x), x, -a/(S(5)*c*x**S(4)*sqrt(c*x**S(2))) - b/(S(4)*c*x**S(3)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(4)*(c*x**S(2))**(S(3)/2)), x), x, -a/(S(6)*c*x**S(5)*sqrt(c*x**S(2))) - b/(S(5)*c*x**S(4)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a + b*x)/(c*x**S(2))**(S(5)/2), x), x, -a*x**(m + S(-3))/(c**S(2)*sqrt(c*x**S(2))*(-m + S(4))) - b*x**(m + S(-2))/(c**S(2)*sqrt(c*x**S(2))*(-m + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)/(c*x**S(2))**(S(5)/2), x), x, -a/(c**S(2)*sqrt(c*x**S(2))) + b*x*log(x)/(c**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)/(c*x**S(2))**(S(5)/2), x), x, -a/(S(2)*c**S(2)*x*sqrt(c*x**S(2))) - b/(c**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)/(c*x**S(2))**(S(5)/2), x), x, -a/(S(3)*c**S(2)*x**S(2)*sqrt(c*x**S(2))) - b/(S(2)*c**S(2)*x*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(c*x**S(2))**(S(5)/2), x), x, -a/(S(4)*c**S(2)*x**S(3)*sqrt(c*x**S(2))) - b/(S(3)*c**S(2)*x**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x*(c*x**S(2))**(S(5)/2)), x), x, -a/(S(5)*c**S(2)*x**S(4)*sqrt(c*x**S(2))) - b/(S(4)*c**S(2)*x**S(3)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(2)*(c*x**S(2))**(S(5)/2)), x), x, -a/(S(6)*c**S(2)*x**S(5)*sqrt(c*x**S(2))) - b/(S(5)*c**S(2)*x**S(4)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(3)*(c*x**S(2))**(S(5)/2)), x), x, -a/(S(7)*c**S(2)*x**S(6)*sqrt(c*x**S(2))) - b/(S(6)*c**S(2)*x**S(5)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)/(x**S(4)*(c*x**S(2))**(S(5)/2)), x), x, -a/(S(8)*c**S(2)*x**S(7)*sqrt(c*x**S(2))) - b/(S(7)*c**S(2)*x**S(6)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sqrt(c*x**S(2))*(a + b*x)**S(2), x), x, a**S(2)*x**(m + S(1))*sqrt(c*x**S(2))/(m + S(2)) + S(2)*a*b*x**(m + S(2))*sqrt(c*x**S(2))/(m + S(3)) + b**S(2)*x**(m + S(3))*sqrt(c*x**S(2))/(m + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(c*x**S(2))*(a + b*x)**S(2), x), x, a**S(2)*x**S(4)*sqrt(c*x**S(2))/S(5) + a*b*x**S(5)*sqrt(c*x**S(2))/S(3) + b**S(2)*x**S(6)*sqrt(c*x**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(c*x**S(2))*(a + b*x)**S(2), x), x, a**S(2)*x**S(3)*sqrt(c*x**S(2))/S(4) + S(2)*a*b*x**S(4)*sqrt(c*x**S(2))/S(5) + b**S(2)*x**S(5)*sqrt(c*x**S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(c*x**S(2))*(a + b*x)**S(2), x), x, a**S(2)*x**S(2)*sqrt(c*x**S(2))/S(3) + a*b*x**S(3)*sqrt(c*x**S(2))/S(2) + b**S(2)*x**S(4)*sqrt(c*x**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**S(2), x), x, a**S(2)*x*sqrt(c*x**S(2))/S(2) + S(2)*a*b*x**S(2)*sqrt(c*x**S(2))/S(3) + b**S(2)*x**S(3)*sqrt(c*x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**S(2)/x, x), x, sqrt(c*x**S(2))*(a + b*x)**S(3)/(S(3)*b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**S(2)/x**S(2), x), x, a**S(2)*sqrt(c*x**S(2))*log(x)/x + S(2)*a*b*sqrt(c*x**S(2)) + b**S(2)*x*sqrt(c*x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**S(2)/x**S(3), x), x, -a**S(2)*sqrt(c*x**S(2))/x**S(2) + S(2)*a*b*sqrt(c*x**S(2))*log(x)/x + b**S(2)*sqrt(c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))*(a + b*x)**S(2)/x**S(4), x), x, -a**S(2)*sqrt(c*x**S(2))/(S(2)*x**S(3)) - S(2)*a*b*sqrt(c*x**S(2))/x**S(2) + b**S(2)*sqrt(c*x**S(2))*log(x)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(c*x**S(2))**(S(3)/2)*(a + b*x)**S(2), x), x, a**S(2)*c*x**(m + S(3))*sqrt(c*x**S(2))/(m + S(4)) + S(2)*a*b*c*x**(m + S(4))*sqrt(c*x**S(2))/(m + S(5)) + b**S(2)*c*x**(m + S(5))*sqrt(c*x**S(2))/(m + S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(c*x**S(2))**(S(3)/2)*(a + b*x)**S(2), x), x, a**S(2)*c*x**S(6)*sqrt(c*x**S(2))/S(7) + a*b*c*x**S(7)*sqrt(c*x**S(2))/S(4) + b**S(2)*c*x**S(8)*sqrt(c*x**S(2))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c*x**S(2))**(S(3)/2)*(a + b*x)**S(2), x), x, a**S(2)*c*x**S(5)*sqrt(c*x**S(2))/S(6) + S(2)*a*b*c*x**S(6)*sqrt(c*x**S(2))/S(7) + b**S(2)*c*x**S(7)*sqrt(c*x**S(2))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*x**S(2))**(S(3)/2)*(a + b*x)**S(2), x), x, a**S(2)*c*x**S(4)*sqrt(c*x**S(2))/S(5) + a*b*c*x**S(5)*sqrt(c*x**S(2))/S(3) + b**S(2)*c*x**S(6)*sqrt(c*x**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2), x), x, a**S(2)*c*x**S(3)*sqrt(c*x**S(2))/S(4) + S(2)*a*b*c*x**S(4)*sqrt(c*x**S(2))/S(5) + b**S(2)*c*x**S(5)*sqrt(c*x**S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)/x, x), x, a**S(2)*c*x**S(2)*sqrt(c*x**S(2))/S(3) + a*b*c*x**S(3)*sqrt(c*x**S(2))/S(2) + b**S(2)*c*x**S(4)*sqrt(c*x**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)/x**S(2), x), x, a**S(2)*c*x*sqrt(c*x**S(2))/S(2) + S(2)*a*b*c*x**S(2)*sqrt(c*x**S(2))/S(3) + b**S(2)*c*x**S(3)*sqrt(c*x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)/x**S(3), x), x, c*sqrt(c*x**S(2))*(a + b*x)**S(3)/(S(3)*b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)/x**S(4), x), x, a**S(2)*c*sqrt(c*x**S(2))*log(x)/x + S(2)*a*b*c*sqrt(c*x**S(2)) + b**S(2)*c*x*sqrt(c*x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(c*x**S(2))**(S(5)/2)*(a + b*x)**S(2), x), x, a**S(2)*c**S(2)*x**(m + S(5))*sqrt(c*x**S(2))/(m + S(6)) + S(2)*a*b*c**S(2)*x**(m + S(6))*sqrt(c*x**S(2))/(m + S(7)) + b**S(2)*c**S(2)*x**(m + S(7))*sqrt(c*x**S(2))/(m + S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(c*x**S(2))**(S(5)/2)*(a + b*x)**S(2), x), x, a**S(2)*c**S(2)*x**S(8)*sqrt(c*x**S(2))/S(9) + a*b*c**S(2)*x**S(9)*sqrt(c*x**S(2))/S(5) + b**S(2)*c**S(2)*x**S(10)*sqrt(c*x**S(2))/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c*x**S(2))**(S(5)/2)*(a + b*x)**S(2), x), x, a**S(2)*c**S(2)*x**S(7)*sqrt(c*x**S(2))/S(8) + S(2)*a*b*c**S(2)*x**S(8)*sqrt(c*x**S(2))/S(9) + b**S(2)*c**S(2)*x**S(9)*sqrt(c*x**S(2))/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*x**S(2))**(S(5)/2)*(a + b*x)**S(2), x), x, a**S(2)*c**S(2)*x**S(6)*sqrt(c*x**S(2))/S(7) + a*b*c**S(2)*x**S(7)*sqrt(c*x**S(2))/S(4) + b**S(2)*c**S(2)*x**S(8)*sqrt(c*x**S(2))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**S(2), x), x, a**S(2)*c**S(2)*x**S(5)*sqrt(c*x**S(2))/S(6) + S(2)*a*b*c**S(2)*x**S(6)*sqrt(c*x**S(2))/S(7) + b**S(2)*c**S(2)*x**S(7)*sqrt(c*x**S(2))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**S(2)/x, x), x, a**S(2)*c**S(2)*x**S(4)*sqrt(c*x**S(2))/S(5) + a*b*c**S(2)*x**S(5)*sqrt(c*x**S(2))/S(3) + b**S(2)*c**S(2)*x**S(6)*sqrt(c*x**S(2))/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**S(2)/x**S(2), x), x, a**S(2)*c**S(2)*x**S(3)*sqrt(c*x**S(2))/S(4) + S(2)*a*b*c**S(2)*x**S(4)*sqrt(c*x**S(2))/S(5) + b**S(2)*c**S(2)*x**S(5)*sqrt(c*x**S(2))/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**S(2)/x**S(3), x), x, a**S(2)*c**S(2)*x**S(2)*sqrt(c*x**S(2))/S(3) + a*b*c**S(2)*x**S(3)*sqrt(c*x**S(2))/S(2) + b**S(2)*c**S(2)*x**S(4)*sqrt(c*x**S(2))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)*(a + b*x)**S(2)/x**S(4), x), x, a**S(2)*c**S(2)*x*sqrt(c*x**S(2))/S(2) + S(2)*a*b*c**S(2)*x**S(2)*sqrt(c*x**S(2))/S(3) + b**S(2)*c**S(2)*x**S(3)*sqrt(c*x**S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a + b*x)**S(2)/sqrt(c*x**S(2)), x), x, a**S(2)*x**(m + S(1))/(m*sqrt(c*x**S(2))) + S(2)*a*b*x**(m + S(2))/(sqrt(c*x**S(2))*(m + S(1))) + b**S(2)*x**(m + S(3))/(sqrt(c*x**S(2))*(m + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)**S(2)/sqrt(c*x**S(2)), x), x, a**S(2)*x**S(4)/(S(3)*sqrt(c*x**S(2))) + a*b*x**S(5)/(S(2)*sqrt(c*x**S(2))) + b**S(2)*x**S(6)/(S(5)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**S(2)/sqrt(c*x**S(2)), x), x, a**S(2)*x*sqrt(c*x**S(2))/(S(2)*c) + S(2)*a*b*x**S(2)*sqrt(c*x**S(2))/(S(3)*c) + b**S(2)*x**S(3)*sqrt(c*x**S(2))/(S(4)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**S(2)/sqrt(c*x**S(2)), x), x, x*(a + b*x)**S(3)/(S(3)*b*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/sqrt(c*x**S(2)), x), x, a**S(2)*x*log(x)/sqrt(c*x**S(2)) + S(2)*a*b*x**S(2)/sqrt(c*x**S(2)) + b**S(2)*x**S(3)/(S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x*sqrt(c*x**S(2))), x), x, -a**S(2)/sqrt(c*x**S(2)) + S(2)*a*b*x*log(x)/sqrt(c*x**S(2)) + b**S(2)*x**S(2)/sqrt(c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(2)*sqrt(c*x**S(2))), x), x, -a**S(2)/(S(2)*x*sqrt(c*x**S(2))) - S(2)*a*b/sqrt(c*x**S(2)) + b**S(2)*x*log(x)/sqrt(c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(3)*sqrt(c*x**S(2))), x), x, -(a + b*x)**S(3)/(S(3)*a*x**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(4)*sqrt(c*x**S(2))), x), x, -a**S(2)/(S(4)*x**S(3)*sqrt(c*x**S(2))) - S(2)*a*b/(S(3)*x**S(2)*sqrt(c*x**S(2))) - b**S(2)/(S(2)*x*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a + b*x)**S(2)/(c*x**S(2))**(S(3)/2), x), x, -a**S(2)*x**(m + S(-1))/(c*sqrt(c*x**S(2))*(-m + S(2))) - S(2)*a*b*x**m/(c*sqrt(c*x**S(2))*(-m + S(1))) + b**S(2)*x**(m + S(1))/(c*m*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)**S(2)/(c*x**S(2))**(S(3)/2), x), x, x*(a + b*x)**S(3)/(S(3)*b*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**S(2)/(c*x**S(2))**(S(3)/2), x), x, a**S(2)*x*log(x)/(c*sqrt(c*x**S(2))) + S(2)*a*b*x**S(2)/(c*sqrt(c*x**S(2))) + b**S(2)*x**S(3)/(S(2)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**S(2)/(c*x**S(2))**(S(3)/2), x), x, -a**S(2)/(c*sqrt(c*x**S(2))) + S(2)*a*b*x*log(x)/(c*sqrt(c*x**S(2))) + b**S(2)*x**S(2)/(c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(c*x**S(2))**(S(3)/2), x), x, -a**S(2)/(S(2)*c*x*sqrt(c*x**S(2))) - S(2)*a*b/(c*sqrt(c*x**S(2))) + b**S(2)*x*log(x)/(c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x*(c*x**S(2))**(S(3)/2)), x), x, -(a + b*x)**S(3)/(S(3)*a*c*x**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(2)*(c*x**S(2))**(S(3)/2)), x), x, -a**S(2)/(S(4)*c*x**S(3)*sqrt(c*x**S(2))) - S(2)*a*b/(S(3)*c*x**S(2)*sqrt(c*x**S(2))) - b**S(2)/(S(2)*c*x*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(3)*(c*x**S(2))**(S(3)/2)), x), x, -a**S(2)/(S(5)*c*x**S(4)*sqrt(c*x**S(2))) - a*b/(S(2)*c*x**S(3)*sqrt(c*x**S(2))) - b**S(2)/(S(3)*c*x**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(4)*(c*x**S(2))**(S(3)/2)), x), x, -a**S(2)/(S(6)*c*x**S(5)*sqrt(c*x**S(2))) - S(2)*a*b/(S(5)*c*x**S(4)*sqrt(c*x**S(2))) - b**S(2)/(S(4)*c*x**S(3)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(a + b*x)**S(2)/(c*x**S(2))**(S(5)/2), x), x, -a**S(2)*x**(m + S(-3))/(c**S(2)*sqrt(c*x**S(2))*(-m + S(4))) - S(2)*a*b*x**(m + S(-2))/(c**S(2)*sqrt(c*x**S(2))*(-m + S(3))) - b**S(2)*x**(m + S(-1))/(c**S(2)*sqrt(c*x**S(2))*(-m + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*x)**S(2)/(c*x**S(2))**(S(5)/2), x), x, -a**S(2)/(c**S(2)*sqrt(c*x**S(2))) + S(2)*a*b*x*log(x)/(c**S(2)*sqrt(c*x**S(2))) + b**S(2)*x**S(2)/(c**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*x)**S(2)/(c*x**S(2))**(S(5)/2), x), x, -a**S(2)/(S(2)*c**S(2)*x*sqrt(c*x**S(2))) - S(2)*a*b/(c**S(2)*sqrt(c*x**S(2))) + b**S(2)*x*log(x)/(c**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x)**S(2)/(c*x**S(2))**(S(5)/2), x), x, -(a + b*x)**S(3)/(S(3)*a*c**S(2)*x**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(c*x**S(2))**(S(5)/2), x), x, -a**S(2)/(S(4)*c**S(2)*x**S(3)*sqrt(c*x**S(2))) - S(2)*a*b/(S(3)*c**S(2)*x**S(2)*sqrt(c*x**S(2))) - b**S(2)/(S(2)*c**S(2)*x*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x*(c*x**S(2))**(S(5)/2)), x), x, -a**S(2)/(S(5)*c**S(2)*x**S(4)*sqrt(c*x**S(2))) - a*b/(S(2)*c**S(2)*x**S(3)*sqrt(c*x**S(2))) - b**S(2)/(S(3)*c**S(2)*x**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(2)*(c*x**S(2))**(S(5)/2)), x), x, -a**S(2)/(S(6)*c**S(2)*x**S(5)*sqrt(c*x**S(2))) - S(2)*a*b/(S(5)*c**S(2)*x**S(4)*sqrt(c*x**S(2))) - b**S(2)/(S(4)*c**S(2)*x**S(3)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(3)*(c*x**S(2))**(S(5)/2)), x), x, -a**S(2)/(S(7)*c**S(2)*x**S(6)*sqrt(c*x**S(2))) - a*b/(S(3)*c**S(2)*x**S(5)*sqrt(c*x**S(2))) - b**S(2)/(S(5)*c**S(2)*x**S(4)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)**S(2)/(x**S(4)*(c*x**S(2))**(S(5)/2)), x), x, -a**S(2)/(S(8)*c**S(2)*x**S(7)*sqrt(c*x**S(2))) - S(2)*a*b/(S(7)*c**S(2)*x**S(6)*sqrt(c*x**S(2))) - b**S(2)/(S(6)*c**S(2)*x**S(5)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(c*x**S(2))/(a + b*x), x), x, a**S(4)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(5)*x) - a**S(3)*sqrt(c*x**S(2))/b**S(4) + a**S(2)*x*sqrt(c*x**S(2))/(S(2)*b**S(3)) - a*x**S(2)*sqrt(c*x**S(2))/(S(3)*b**S(2)) + x**S(3)*sqrt(c*x**S(2))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(c*x**S(2))/(a + b*x), x), x, -a**S(3)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(4)*x) + a**S(2)*sqrt(c*x**S(2))/b**S(3) - a*x*sqrt(c*x**S(2))/(S(2)*b**S(2)) + x**S(2)*sqrt(c*x**S(2))/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(c*x**S(2))/(a + b*x), x), x, a**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(3)*x) - a*sqrt(c*x**S(2))/b**S(2) + x*sqrt(c*x**S(2))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(a + b*x), x), x, -a*sqrt(c*x**S(2))*log(a + b*x)/(b**S(2)*x) + sqrt(c*x**S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(x*(a + b*x)), x), x, sqrt(c*x**S(2))*log(a + b*x)/(b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(x**S(2)*(a + b*x)), x), x, sqrt(c*x**S(2))*log(x)/(a*x) - sqrt(c*x**S(2))*log(a + b*x)/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(x**S(3)*(a + b*x)), x), x, -sqrt(c*x**S(2))/(a*x**S(2)) - b*sqrt(c*x**S(2))*log(x)/(a**S(2)*x) + b*sqrt(c*x**S(2))*log(a + b*x)/(a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(x**S(4)*(a + b*x)), x), x, -sqrt(c*x**S(2))/(S(2)*a*x**S(3)) + b*sqrt(c*x**S(2))/(a**S(2)*x**S(2)) + b**S(2)*sqrt(c*x**S(2))*log(x)/(a**S(3)*x) - b**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(a**S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*x**S(2))**(S(3)/2)/(a + b*x), x), x, a**S(4)*c*sqrt(c*x**S(2))*log(a + b*x)/(b**S(5)*x) - a**S(3)*c*sqrt(c*x**S(2))/b**S(4) + a**S(2)*c*x*sqrt(c*x**S(2))/(S(2)*b**S(3)) - a*c*x**S(2)*sqrt(c*x**S(2))/(S(3)*b**S(2)) + c*x**S(3)*sqrt(c*x**S(2))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(a + b*x), x), x, -a**S(3)*c*sqrt(c*x**S(2))*log(a + b*x)/(b**S(4)*x) + a**S(2)*c*sqrt(c*x**S(2))/b**S(3) - a*c*x*sqrt(c*x**S(2))/(S(2)*b**S(2)) + c*x**S(2)*sqrt(c*x**S(2))/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x*(a + b*x)), x), x, a**S(2)*c*sqrt(c*x**S(2))*log(a + b*x)/(b**S(3)*x) - a*c*sqrt(c*x**S(2))/b**S(2) + c*x*sqrt(c*x**S(2))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(2)*(a + b*x)), x), x, -a*c*sqrt(c*x**S(2))*log(a + b*x)/(b**S(2)*x) + c*sqrt(c*x**S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(3)*(a + b*x)), x), x, c*sqrt(c*x**S(2))*log(a + b*x)/(b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(4)*(a + b*x)), x), x, c*sqrt(c*x**S(2))*log(x)/(a*x) - c*sqrt(c*x**S(2))*log(a + b*x)/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(5)*(a + b*x)), x), x, -c*sqrt(c*x**S(2))/(a*x**S(2)) - b*c*sqrt(c*x**S(2))*log(x)/(a**S(2)*x) + b*c*sqrt(c*x**S(2))*log(a + b*x)/(a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(6)*(a + b*x)), x), x, -c*sqrt(c*x**S(2))/(S(2)*a*x**S(3)) + b*c*sqrt(c*x**S(2))/(a**S(2)*x**S(2)) + b**S(2)*c*sqrt(c*x**S(2))*log(x)/(a**S(3)*x) - b**S(2)*c*sqrt(c*x**S(2))*log(a + b*x)/(a**S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(7)*(a + b*x)), x), x, -c*sqrt(c*x**S(2))/(S(3)*a*x**S(4)) + b*c*sqrt(c*x**S(2))/(S(2)*a**S(2)*x**S(3)) - b**S(2)*c*sqrt(c*x**S(2))/(a**S(3)*x**S(2)) - b**S(3)*c*sqrt(c*x**S(2))*log(x)/(a**S(4)*x) + b**S(3)*c*sqrt(c*x**S(2))*log(a + b*x)/(a**S(4)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)/(a + b*x), x), x, -a**S(5)*c**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(6)*x) + a**S(4)*c**S(2)*sqrt(c*x**S(2))/b**S(5) - a**S(3)*c**S(2)*x*sqrt(c*x**S(2))/(S(2)*b**S(4)) + a**S(2)*c**S(2)*x**S(2)*sqrt(c*x**S(2))/(S(3)*b**S(3)) - a*c**S(2)*x**S(3)*sqrt(c*x**S(2))/(S(4)*b**S(2)) + c**S(2)*x**S(4)*sqrt(c*x**S(2))/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)/(x*(a + b*x)), x), x, a**S(4)*c**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(5)*x) - a**S(3)*c**S(2)*sqrt(c*x**S(2))/b**S(4) + a**S(2)*c**S(2)*x*sqrt(c*x**S(2))/(S(2)*b**S(3)) - a*c**S(2)*x**S(2)*sqrt(c*x**S(2))/(S(3)*b**S(2)) + c**S(2)*x**S(3)*sqrt(c*x**S(2))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)/(x**S(2)*(a + b*x)), x), x, -a**S(3)*c**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(4)*x) + a**S(2)*c**S(2)*sqrt(c*x**S(2))/b**S(3) - a*c**S(2)*x*sqrt(c*x**S(2))/(S(2)*b**S(2)) + c**S(2)*x**S(2)*sqrt(c*x**S(2))/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)/(x**S(3)*(a + b*x)), x), x, a**S(2)*c**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(3)*x) - a*c**S(2)*sqrt(c*x**S(2))/b**S(2) + c**S(2)*x*sqrt(c*x**S(2))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)/(x**S(4)*(a + b*x)), x), x, -a*c**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(2)*x) + c**S(2)*sqrt(c*x**S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)/(x**S(5)*(a + b*x)), x), x, c**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)/(x**S(6)*(a + b*x)), x), x, c**S(2)*sqrt(c*x**S(2))*log(x)/(a*x) - c**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(a*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(5)/2)/(x**S(7)*(a + b*x)), x), x, -c**S(2)*sqrt(c*x**S(2))/(a*x**S(2)) - b*c**S(2)*sqrt(c*x**S(2))*log(x)/(a**S(2)*x) + b*c**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(sqrt(c*x**S(2))*(a + b*x)), x), x, -a**S(3)*x*log(a + b*x)/(b**S(4)*sqrt(c*x**S(2))) + a**S(2)*x**S(2)/(b**S(3)*sqrt(c*x**S(2))) - a*x**S(3)/(S(2)*b**S(2)*sqrt(c*x**S(2))) + x**S(4)/(S(3)*b*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(sqrt(c*x**S(2))*(a + b*x)), x), x, a**S(2)*x*log(a + b*x)/(b**S(3)*sqrt(c*x**S(2))) - a*x**S(2)/(b**S(2)*sqrt(c*x**S(2))) + x**S(3)/(S(2)*b*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(c*x**S(2))*(a + b*x)), x), x, -a*sqrt(c*x**S(2))*log(a + b*x)/(b**S(2)*c*x) + sqrt(c*x**S(2))/(b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(c*x**S(2))*(a + b*x)), x), x, x*log(a + b*x)/(b*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*x**S(2))*(a + b*x)), x), x, x*log(x)/(a*sqrt(c*x**S(2))) - x*log(a + b*x)/(a*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(c*x**S(2))*(a + b*x)), x), x, -S(1)/(a*sqrt(c*x**S(2))) - b*x*log(x)/(a**S(2)*sqrt(c*x**S(2))) + b*x*log(a + b*x)/(a**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(c*x**S(2))*(a + b*x)), x), x, -S(1)/(S(2)*a*x*sqrt(c*x**S(2))) + b/(a**S(2)*sqrt(c*x**S(2))) + b**S(2)*x*log(x)/(a**S(3)*sqrt(c*x**S(2))) - b**S(2)*x*log(a + b*x)/(a**S(3)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(c*x**S(2))*(a + b*x)), x), x, -S(1)/(S(3)*a*x**S(2)*sqrt(c*x**S(2))) + b/(S(2)*a**S(2)*x*sqrt(c*x**S(2))) - b**S(2)/(a**S(3)*sqrt(c*x**S(2))) - b**S(3)*x*log(x)/(a**S(4)*sqrt(c*x**S(2))) + b**S(3)*x*log(a + b*x)/(a**S(4)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/((c*x**S(2))**(S(3)/2)*(a + b*x)), x), x, -a**S(3)*x*log(a + b*x)/(b**S(4)*c*sqrt(c*x**S(2))) + a**S(2)*x**S(2)/(b**S(3)*c*sqrt(c*x**S(2))) - a*x**S(3)/(S(2)*b**S(2)*c*sqrt(c*x**S(2))) + x**S(4)/(S(3)*b*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/((c*x**S(2))**(S(3)/2)*(a + b*x)), x), x, a**S(2)*x*log(a + b*x)/(b**S(3)*c*sqrt(c*x**S(2))) - a*x**S(2)/(b**S(2)*c*sqrt(c*x**S(2))) + x**S(3)/(S(2)*b*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/((c*x**S(2))**(S(3)/2)*(a + b*x)), x), x, -a*x*log(a + b*x)/(b**S(2)*c*sqrt(c*x**S(2))) + x**S(2)/(b*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/((c*x**S(2))**(S(3)/2)*(a + b*x)), x), x, x*log(a + b*x)/(b*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((c*x**S(2))**(S(3)/2)*(a + b*x)), x), x, x*log(x)/(a*c*sqrt(c*x**S(2))) - x*log(a + b*x)/(a*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((c*x**S(2))**(S(3)/2)*(a + b*x)), x), x, -S(1)/(a*c*sqrt(c*x**S(2))) - b*x*log(x)/(a**S(2)*c*sqrt(c*x**S(2))) + b*x*log(a + b*x)/(a**S(2)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*x**S(2))**(S(3)/2)*(a + b*x)), x), x, -S(1)/(S(2)*a*c*x*sqrt(c*x**S(2))) + b/(a**S(2)*c*sqrt(c*x**S(2))) + b**S(2)*x*log(x)/(a**S(3)*c*sqrt(c*x**S(2))) - b**S(2)*x*log(a + b*x)/(a**S(3)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(c*x**S(2))**(S(3)/2)*(a + b*x)), x), x, -S(1)/(S(3)*a*c*x**S(2)*sqrt(c*x**S(2))) + b/(S(2)*a**S(2)*c*x*sqrt(c*x**S(2))) - b**S(2)/(a**S(3)*c*sqrt(c*x**S(2))) - b**S(3)*x*log(x)/(a**S(4)*c*sqrt(c*x**S(2))) + b**S(3)*x*log(a + b*x)/(a**S(4)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(c*x**S(2))/(a + b*x)**S(2), x), x, -a**S(4)*sqrt(c*x**S(2))/(b**S(5)*x*(a + b*x)) - S(4)*a**S(3)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(5)*x) + S(3)*a**S(2)*sqrt(c*x**S(2))/b**S(4) - a*x*sqrt(c*x**S(2))/b**S(3) + x**S(2)*sqrt(c*x**S(2))/(S(3)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(c*x**S(2))/(a + b*x)**S(2), x), x, a**S(3)*sqrt(c*x**S(2))/(b**S(4)*x*(a + b*x)) + S(3)*a**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(b**S(4)*x) - S(2)*a*sqrt(c*x**S(2))/b**S(3) + x*sqrt(c*x**S(2))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(c*x**S(2))/(a + b*x)**S(2), x), x, -a**S(2)*sqrt(c*x**S(2))/(b**S(3)*x*(a + b*x)) - S(2)*a*sqrt(c*x**S(2))*log(a + b*x)/(b**S(3)*x) + sqrt(c*x**S(2))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(a + b*x)**S(2), x), x, a*sqrt(c*x**S(2))/(b**S(2)*x*(a + b*x)) + sqrt(c*x**S(2))*log(a + b*x)/(b**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(x*(a + b*x)**S(2)), x), x, -sqrt(c*x**S(2))/(b*x*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(x**S(2)*(a + b*x)**S(2)), x), x, sqrt(c*x**S(2))/(a*x*(a + b*x)) + sqrt(c*x**S(2))*log(x)/(a**S(2)*x) - sqrt(c*x**S(2))*log(a + b*x)/(a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(x**S(3)*(a + b*x)**S(2)), x), x, -b*sqrt(c*x**S(2))/(a**S(2)*x*(a + b*x)) - sqrt(c*x**S(2))/(a**S(2)*x**S(2)) - S(2)*b*sqrt(c*x**S(2))*log(x)/(a**S(3)*x) + S(2)*b*sqrt(c*x**S(2))*log(a + b*x)/(a**S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*x**S(2))/(x**S(4)*(a + b*x)**S(2)), x), x, -sqrt(c*x**S(2))/(S(2)*a**S(2)*x**S(3)) + b**S(2)*sqrt(c*x**S(2))/(a**S(3)*x*(a + b*x)) + S(2)*b*sqrt(c*x**S(2))/(a**S(3)*x**S(2)) + S(3)*b**S(2)*sqrt(c*x**S(2))*log(x)/(a**S(4)*x) - S(3)*b**S(2)*sqrt(c*x**S(2))*log(a + b*x)/(a**S(4)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*x**S(2))**(S(3)/2)/(a + b*x)**S(2), x), x, -a**S(4)*c*sqrt(c*x**S(2))/(b**S(5)*x*(a + b*x)) - S(4)*a**S(3)*c*sqrt(c*x**S(2))*log(a + b*x)/(b**S(5)*x) + S(3)*a**S(2)*c*sqrt(c*x**S(2))/b**S(4) - a*c*x*sqrt(c*x**S(2))/b**S(3) + c*x**S(2)*sqrt(c*x**S(2))/(S(3)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(a + b*x)**S(2), x), x, a**S(3)*c*sqrt(c*x**S(2))/(b**S(4)*x*(a + b*x)) + S(3)*a**S(2)*c*sqrt(c*x**S(2))*log(a + b*x)/(b**S(4)*x) - S(2)*a*c*sqrt(c*x**S(2))/b**S(3) + c*x*sqrt(c*x**S(2))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x*(a + b*x)**S(2)), x), x, -a**S(2)*c*sqrt(c*x**S(2))/(b**S(3)*x*(a + b*x)) - S(2)*a*c*sqrt(c*x**S(2))*log(a + b*x)/(b**S(3)*x) + c*sqrt(c*x**S(2))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(2)*(a + b*x)**S(2)), x), x, a*c*sqrt(c*x**S(2))/(b**S(2)*x*(a + b*x)) + c*sqrt(c*x**S(2))*log(a + b*x)/(b**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(3)*(a + b*x)**S(2)), x), x, -c*sqrt(c*x**S(2))/(b*x*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(4)*(a + b*x)**S(2)), x), x, c*sqrt(c*x**S(2))/(a*x*(a + b*x)) + c*sqrt(c*x**S(2))*log(x)/(a**S(2)*x) - c*sqrt(c*x**S(2))*log(a + b*x)/(a**S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(5)*(a + b*x)**S(2)), x), x, -b*c*sqrt(c*x**S(2))/(a**S(2)*x*(a + b*x)) - c*sqrt(c*x**S(2))/(a**S(2)*x**S(2)) - S(2)*b*c*sqrt(c*x**S(2))*log(x)/(a**S(3)*x) + S(2)*b*c*sqrt(c*x**S(2))*log(a + b*x)/(a**S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**(S(3)/2)/(x**S(6)*(a + b*x)**S(2)), x), x, -c*sqrt(c*x**S(2))/(S(2)*a**S(2)*x**S(3)) + b**S(2)*c*sqrt(c*x**S(2))/(a**S(3)*x*(a + b*x)) + S(2)*b*c*sqrt(c*x**S(2))/(a**S(3)*x**S(2)) + S(3)*b**S(2)*c*sqrt(c*x**S(2))*log(x)/(a**S(4)*x) - S(3)*b**S(2)*c*sqrt(c*x**S(2))*log(a + b*x)/(a**S(4)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(sqrt(c*x**S(2))*(a + b*x)**S(2)), x), x, -a**S(4)*x/(b**S(5)*sqrt(c*x**S(2))*(a + b*x)) - S(4)*a**S(3)*x*log(a + b*x)/(b**S(5)*sqrt(c*x**S(2))) + S(3)*a**S(2)*x**S(2)/(b**S(4)*sqrt(c*x**S(2))) - a*x**S(3)/(b**S(3)*sqrt(c*x**S(2))) + x**S(4)/(S(3)*b**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(sqrt(c*x**S(2))*(a + b*x)**S(2)), x), x, a**S(3)*x/(b**S(4)*sqrt(c*x**S(2))*(a + b*x)) + S(3)*a**S(2)*x*log(a + b*x)/(b**S(4)*sqrt(c*x**S(2))) - S(2)*a*x**S(2)/(b**S(3)*sqrt(c*x**S(2))) + x**S(3)/(S(2)*b**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(sqrt(c*x**S(2))*(a + b*x)**S(2)), x), x, -a**S(2)*x/(b**S(3)*sqrt(c*x**S(2))*(a + b*x)) - S(2)*a*x*log(a + b*x)/(b**S(3)*sqrt(c*x**S(2))) + x**S(2)/(b**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(c*x**S(2))*(a + b*x)**S(2)), x), x, a*sqrt(c*x**S(2))/(b**S(2)*c*x*(a + b*x)) + sqrt(c*x**S(2))*log(a + b*x)/(b**S(2)*c*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(c*x**S(2))*(a + b*x)**S(2)), x), x, -x/(b*sqrt(c*x**S(2))*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*x**S(2))*(a + b*x)**S(2)), x), x, x/(a*sqrt(c*x**S(2))*(a + b*x)) + x*log(x)/(a**S(2)*sqrt(c*x**S(2))) - x*log(a + b*x)/(a**S(2)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(c*x**S(2))*(a + b*x)**S(2)), x), x, -b*x/(a**S(2)*sqrt(c*x**S(2))*(a + b*x)) - S(1)/(a**S(2)*sqrt(c*x**S(2))) - S(2)*b*x*log(x)/(a**S(3)*sqrt(c*x**S(2))) + S(2)*b*x*log(a + b*x)/(a**S(3)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(c*x**S(2))*(a + b*x)**S(2)), x), x, -S(1)/(S(2)*a**S(2)*x*sqrt(c*x**S(2))) + b**S(2)*x/(a**S(3)*sqrt(c*x**S(2))*(a + b*x)) + S(2)*b/(a**S(3)*sqrt(c*x**S(2))) + S(3)*b**S(2)*x*log(x)/(a**S(4)*sqrt(c*x**S(2))) - S(3)*b**S(2)*x*log(a + b*x)/(a**S(4)*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)), x), x, -a**S(2)*x/(b**S(3)*c*sqrt(c*x**S(2))*(a + b*x)) - S(2)*a*x*log(a + b*x)/(b**S(3)*c*sqrt(c*x**S(2))) + x**S(2)/(b**S(2)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)), x), x, a*x/(b**S(2)*c*sqrt(c*x**S(2))*(a + b*x)) + x*log(a + b*x)/(b**S(2)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)), x), x, -x/(b*c*sqrt(c*x**S(2))*(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)), x), x, x/(a*c*sqrt(c*x**S(2))*(a + b*x)) + x*log(x)/(a**S(2)*c*sqrt(c*x**S(2))) - x*log(a + b*x)/(a**S(2)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)), x), x, -b*x/(a**S(2)*c*sqrt(c*x**S(2))*(a + b*x)) - S(1)/(a**S(2)*c*sqrt(c*x**S(2))) - S(2)*b*x*log(x)/(a**S(3)*c*sqrt(c*x**S(2))) + S(2)*b*x*log(a + b*x)/(a**S(3)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*x**S(2))**(S(3)/2)*(a + b*x)**S(2)), x), x, -S(1)/(S(2)*a**S(2)*c*x*sqrt(c*x**S(2))) + b**S(2)*x/(a**S(3)*c*sqrt(c*x**S(2))*(a + b*x)) + S(2)*b/(a**S(3)*c*sqrt(c*x**S(2))) + S(3)*b**S(2)*x*log(x)/(a**S(4)*c*sqrt(c*x**S(2))) - S(3)*b**S(2)*x*log(a + b*x)/(a**S(4)*c*sqrt(c*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(c*x**S(2))**p*(a + b*x)**(-m - S(2)*p + S(-2)), x), x, x**(m + S(1))*(c*x**S(2))**p*(a + b*x)**(-m - S(2)*p + S(-1))/(a*(m + S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-5)), x), x, x**S(4)*(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-4))/(S(2)*a*(p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-4)), x), x, x**S(3)*(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-3))/(a*(S(2)*p + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-3)), x), x, x**S(2)*(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-2))/(S(2)*a*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-2)), x), x, x*(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-1))/(a*(S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(-1))/x, x), x, (c*x**S(2))**p*(a + b*x)**(-S(2)*p)/(S(2)*a*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**p*(a + b*x)**(-S(2)*p)/x**S(2), x), x, -(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(1))/(a*x*(-S(2)*p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(1))/x**S(3), x), x, -(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(2))/(S(2)*a*x**S(2)*(-p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(2))/x**S(4), x), x, -(c*x**S(2))**p*(a + b*x)**(-S(2)*p + S(3))/(a*x**S(3)*(-S(2)*p + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(23))/sqrt(x**S(5) + S(1)), x), x, sqrt(a*x**S(23))*sqrt(x**S(5) + S(1))/(S(10)*x**S(4)) - S(3)*sqrt(a*x**S(23))*sqrt(x**S(5) + S(1))/(S(20)*x**S(9)) + S(3)*sqrt(a*x**S(23))*asinh(x**(S(5)/2))/(S(20)*x**(S(23)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(13))/sqrt(x**S(5) + S(1)), x), x, sqrt(a*x**S(13))*sqrt(x**S(5) + S(1))/(S(5)*x**S(4)) - sqrt(a*x**S(13))*asinh(x**(S(5)/2))/(S(5)*x**(S(13)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(3))/sqrt(x**S(5) + S(1)), x), x, S(2)*sqrt(a*x**S(3))*asinh(x**(S(5)/2))/(S(5)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x**S(7))/sqrt(x**S(5) + S(1)), x), x, -S(2)*x*sqrt(a/x**S(7))*sqrt(x**S(5) + S(1))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x**S(17))/sqrt(x**S(5) + S(1)), x), x, S(4)*x**S(6)*sqrt(a/x**S(17))*sqrt(x**S(5) + S(1))/S(15) - S(2)*x*sqrt(a/x**S(17))*sqrt(x**S(5) + S(1))/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(6))/(x*(-x**S(4) + S(1))), x), x, -sqrt(a*x**S(6))*atan(x)/(S(2)*x**S(3)) + sqrt(a*x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(6))/(-x**S(5) + x), x), x, -sqrt(a*x**S(6))*atan(x)/(S(2)*x**S(3)) + sqrt(a*x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**S(6))**(S(3)/2)/(x*(-x**S(4) + S(1))), x), x, -a*x**S(2)*sqrt(a*x**S(6))/S(5) - a*sqrt(a*x**S(6))/x**S(2) + a*sqrt(a*x**S(6))*atan(x)/(S(2)*x**S(3)) + a*sqrt(a*x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-x**S(4) + S(1)) - sqrt(a*x**S(6))/(x*(-x**S(4) + S(1))), x), x, atan(x)/S(2) + atanh(x)/S(2) + sqrt(a*x**S(6))*atan(x)/(S(2)*x**S(3)) - sqrt(a*x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-sqrt(a*x**S(6))/(-x**S(5) + x) + S(1)/(-x**S(4) + S(1)), x), x, atan(x)/S(2) + atanh(x)/S(2) + sqrt(a*x**S(6))*atan(x)/(S(2)*x**S(3)) - sqrt(a*x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(3))/(-x**S(3) + x), x), x, -sqrt(a*x**S(3))*atan(sqrt(x))/x**(S(3)/2) + sqrt(a*x**S(3))*atanh(sqrt(x))/x**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(4))/sqrt(x**S(2) + S(1)), x), x, sqrt(a*x**S(4))*sqrt(x**S(2) + S(1))/(S(2)*x) - sqrt(a*x**S(4))*asinh(x)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(3))/sqrt(x**S(2) + S(1)), x), x, S(2)*sqrt(a*x**S(3))*sqrt(x**S(2) + S(1))/(S(3)*x) - sqrt(a*x**S(3))*sqrt((x**S(2) + S(1))/(x + S(1))**S(2))*(x + S(1))*elliptic_f(S(2)*atan(sqrt(x)), S(1)/2)/(S(3)*x**(S(3)/2)*sqrt(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2))/sqrt(x**S(2) + S(1)), x), x, sqrt(a*x**S(2))*sqrt(x**S(2) + S(1))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x)/sqrt(x**S(2) + S(1)), x), x, -S(2)*sqrt(a)*sqrt((x**S(2) + S(1))/(x + S(1))**S(2))*(x + S(1))*elliptic_e(S(2)*atan(sqrt(a*x)/sqrt(a)), S(1)/2)/sqrt(x**S(2) + S(1)) + sqrt(a)*sqrt((x**S(2) + S(1))/(x + S(1))**S(2))*(x + S(1))*elliptic_f(S(2)*atan(sqrt(a*x)/sqrt(a)), S(1)/2)/sqrt(x**S(2) + S(1)) + S(2)*sqrt(a*x)*sqrt(x**S(2) + S(1))/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x)/sqrt(x**S(2) + S(1)), x), x, sqrt(x)*sqrt(a/x)*sqrt((x**S(2) + S(1))/(x + S(1))**S(2))*(x + S(1))*elliptic_f(S(2)*atan(sqrt(x)), S(1)/2)/sqrt(x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x**S(2))/sqrt(x**S(2) + S(1)), x), x, -x*sqrt(a/x**S(2))*atanh(sqrt(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x**S(3))/sqrt(x**S(2) + S(1)), x), x, -S(2)*x**(S(3)/2)*sqrt(a/x**S(3))*sqrt((x**S(2) + S(1))/(x + S(1))**S(2))*(x + S(1))*elliptic_e(S(2)*atan(sqrt(x)), S(1)/2)/sqrt(x**S(2) + S(1)) + x**(S(3)/2)*sqrt(a/x**S(3))*sqrt((x**S(2) + S(1))/(x + S(1))**S(2))*(x + S(1))*elliptic_f(S(2)*atan(sqrt(x)), S(1)/2)/sqrt(x**S(2) + S(1)) + S(2)*x**S(2)*sqrt(a/x**S(3))*sqrt(x**S(2) + S(1))/(x + S(1)) - S(2)*x*sqrt(a/x**S(3))*sqrt(x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x**S(4))/sqrt(x**S(2) + S(1)), x), x, -x*sqrt(a/x**S(4))*sqrt(x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(4))/sqrt(x**S(3) + S(1)), x), x, S(2)*sqrt(a*x**S(4))*sqrt(x**S(3) + S(1))/(S(3)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(3))/sqrt(x**S(3) + S(1)), x), x, -S(3)**(S(1)/4)*sqrt(a*x**S(3))*sqrt((x**S(2) - x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*(x + S(1))*elliptic_e(acos((x*(-sqrt(S(3)) + S(1)) + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))), sqrt(S(3))/S(4) + S(1)/2)/(x*sqrt(x*(x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*sqrt(x**S(3) + S(1))) - S(3)**(S(3)/4)*sqrt(a*x**S(3))*sqrt((x**S(2) - x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*(-sqrt(S(3)) + S(1))*(x + S(1))*elliptic_f(acos((x*(-sqrt(S(3)) + S(1)) + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))), sqrt(S(3))/S(4) + S(1)/2)/(S(6)*x*sqrt(x*(x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*sqrt(x**S(3) + S(1))) + sqrt(a*x**S(3))*(S(1) + sqrt(S(3)))*sqrt(x**S(3) + S(1))/(x*(x*(S(1) + sqrt(S(3))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2))/sqrt(x**S(3) + S(1)), x), x, S(2)*sqrt(a*x**S(2))*sqrt(x**S(3) + S(1))/(x*(x + S(1) + sqrt(S(3)))) - S(3)**(S(1)/4)*sqrt(a*x**S(2))*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(-sqrt(S(3)) + S(2))*(x + S(1))*elliptic_e(asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(x*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))) + S(2)*sqrt(S(2))*S(3)**(S(3)/4)*sqrt(a*x**S(2))*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*(x + S(1))*elliptic_f(asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(3)*x*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x)/sqrt(x**S(3) + S(1)), x), x, S(2)*sqrt(a)*asinh((a*x)**(S(3)/2)/a**(S(3)/2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x)/sqrt(x**S(3) + S(1)), x), x, S(3)**(S(3)/4)*x*sqrt(a/x)*sqrt((x**S(2) - x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*(x + S(1))*elliptic_f(acos((x*(-sqrt(S(3)) + S(1)) + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))), sqrt(S(3))/S(4) + S(1)/2)/(S(3)*sqrt(x*(x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*sqrt(x**S(3) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x**S(2))/sqrt(x**S(3) + S(1)), x), x, -S(2)*x*sqrt(a/x**S(2))*atanh(sqrt(x**S(3) + S(1)))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x**S(3))/sqrt(x**S(3) + S(1)), x), x, -S(2)*S(3)**(S(1)/4)*x**S(2)*sqrt(a/x**S(3))*sqrt((x**S(2) - x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*(x + S(1))*elliptic_e(acos((x*(-sqrt(S(3)) + S(1)) + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))), sqrt(S(3))/S(4) + S(1)/2)/(sqrt(x*(x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*sqrt(x**S(3) + S(1))) - S(3)**(S(3)/4)*x**S(2)*sqrt(a/x**S(3))*sqrt((x**S(2) - x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*(-sqrt(S(3)) + S(1))*(x + S(1))*elliptic_f(acos((x*(-sqrt(S(3)) + S(1)) + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))), sqrt(S(3))/S(4) + S(1)/2)/(S(3)*sqrt(x*(x + S(1))/(x*(S(1) + sqrt(S(3))) + S(1))**S(2))*sqrt(x**S(3) + S(1))) + x**S(2)*sqrt(a/x**S(3))*(S(2) + S(2)*sqrt(S(3)))*sqrt(x**S(3) + S(1))/(x*(S(1) + sqrt(S(3))) + S(1)) - S(2)*x*sqrt(a/x**S(3))*sqrt(x**S(3) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a/x**S(4))/sqrt(x**S(3) + S(1)), x), x, x**S(2)*sqrt(a/x**S(4))*sqrt(x**S(3) + S(1))/(x + S(1) + sqrt(S(3))) - S(3)**(S(1)/4)*x**S(2)*sqrt(a/x**S(4))*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(-sqrt(S(3)) + S(2))*(x + S(1))*elliptic_e(asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(2)*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))) + sqrt(S(2))*S(3)**(S(3)/4)*x**S(2)*sqrt(a/x**S(4))*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*(x + S(1))*elliptic_f(asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(3)*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))) - x*sqrt(a/x**S(4))*sqrt(x**S(3) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**(S(2)*n))/sqrt(x**n + S(1)), x), x, x*sqrt(a*x**(S(2)*n))*hyper((S(1)/2, S(1) + S(1)/n), (S(2) + S(1)/n,), -x**n)/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**n)/sqrt(x**n + S(1)), x), x, S(2)*x*sqrt(a*x**n)*hyper((S(1)/2, S(1)/2 + S(1)/n), (S(3)/2 + S(1)/n,), -x**n)/(n + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**(n/S(2)))/sqrt(x**n + S(1)), x), x, S(4)*x*sqrt(a*x**(n/S(2)))*hyper((S(1)/2, S(1)/4 + S(1)/n), (S(5)/4 + S(1)/n,), -x**n)/(n + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**(S(2)*n))/sqrt(x**n + S(1)) + S(2)*x**(-n)*sqrt(a*x**(S(2)*n))/((n + S(2))*sqrt(x**n + S(1))), x), x, S(2)*x**(-n + S(1))*sqrt(a*x**(S(2)*n))*sqrt(x**n + S(1))/(n + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x)/(sqrt(d + e*x)*sqrt(e + f*x)), x), x, S(2)*sqrt(a*x)*sqrt(e*(e + f*x)/(-d*f + e**S(2)))*sqrt(d*f - e**S(2))*elliptic_e(asin(sqrt(f)*sqrt(d + e*x)/sqrt(d*f - e**S(2))), S(1) - e**S(2)/(d*f))/(e*sqrt(f)*sqrt(-e*x/d)*sqrt(e + f*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**m)**r, x), x, x*(a*x**m)**r/(m*r + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**m)**r*(b*x**n)**s, x), x, x*(a*x**m)**r*(b*x**n)**s/(m*r + n*s + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x**m)**r*(b*x**n)**s*(c*x**p)**t, x), x, x*(a*x**m)**r*(b*x**n)**s*(c*x**p)**t/(m*r + n*s + p*t + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**p, x), x, -a*x*(c*x**n)**(-S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(1))/(b**S(2)*(p + S(1))) + x*(c*x**n)**(-S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**(p + S(2))/(b**S(2)*(p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**S(3), x), x, -a*x*(c*x**n)**(-S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**S(4)/(S(4)*b**S(2)) + x*(c*x**n)**(-S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**S(5)/(S(5)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)*(a + b*(c*x**n)**(S(1)/n))**S(2), x), x, a**S(2)*x*(c*x**n)**(S(1)/n)/S(2) + S(2)*a*b*x*(c*x**n)**(S(2)/n)/S(3) + b**S(2)*x*(c*x**n)**(S(3)/n)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)*(a + b*(c*x**n)**(S(1)/n)), x), x, a*x*(c*x**n)**(S(1)/n)/S(2) + b*x*(c*x**n)**(S(2)/n)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)/(a + b*(c*x**n)**(S(1)/n)), x), x, -a*x*(c*x**n)**(-S(1)/n)*log(a + b*(c*x**n)**(S(1)/n))/b**S(2) + x/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)/(a + b*(c*x**n)**(S(1)/n))**S(2), x), x, a*x*(c*x**n)**(-S(1)/n)/(b**S(2)*(a + b*(c*x**n)**(S(1)/n))) + x*(c*x**n)**(-S(1)/n)*log(a + b*(c*x**n)**(S(1)/n))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)/(a + b*(c*x**n)**(S(1)/n))**S(3), x), x, x*(c*x**n)**(S(1)/n)/(S(2)*a*(a + b*(c*x**n)**(S(1)/n))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)/(a + b*(c*x**n)**(S(1)/n))**S(4), x), x, a*x*(c*x**n)**(-S(1)/n)/(S(3)*b**S(2)*(a + b*(c*x**n)**(S(1)/n))**S(3)) - x*(c*x**n)**(-S(1)/n)/(S(2)*b**S(2)*(a + b*(c*x**n)**(S(1)/n))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*x**n)**(S(1)/n)/(a + b*(c*x**n)**(S(1)/n))**S(5), x), x, a*x*(c*x**n)**(-S(1)/n)/(S(4)*b**S(2)*(a + b*(c*x**n)**(S(1)/n))**S(4)) - x*(c*x**n)**(-S(1)/n)/(S(3)*b**S(2)*(a + b*(c*x**n)**(S(1)/n))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(a + b*x) + sqrt(b*x + c)), x), x, S(2)*a**S(2)*(a + b*x)**(S(3)/2)/(S(3)*b**S(3)*(a - c)) - S(4)*a*(a + b*x)**(S(5)/2)/(S(5)*b**S(3)*(a - c)) - S(2)*c**S(2)*(b*x + c)**(S(3)/2)/(S(3)*b**S(3)*(a - c)) + S(4)*c*(b*x + c)**(S(5)/2)/(S(5)*b**S(3)*(a - c)) + S(2)*(a + b*x)**(S(7)/2)/(S(7)*b**S(3)*(a - c)) - S(2)*(b*x + c)**(S(7)/2)/(S(7)*b**S(3)*(a - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(a + b*x) + sqrt(b*x + c)), x), x, -S(2)*a*(a + b*x)**(S(3)/2)/(S(3)*b**S(2)*(a - c)) + S(2)*c*(b*x + c)**(S(3)/2)/(S(3)*b**S(2)*(a - c)) + S(2)*(a + b*x)**(S(5)/2)/(S(5)*b**S(2)*(a - c)) - S(2)*(b*x + c)**(S(5)/2)/(S(5)*b**S(2)*(a - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + b*x) + sqrt(b*x + c)), x), x, S(2)*(a + b*x)**(S(3)/2)/(S(3)*b*(a - c)) - S(2)*(b*x + c)**(S(3)/2)/(S(3)*b*(a - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(sqrt(a + b*x) + sqrt(b*x + c))), x), x, -S(2)*sqrt(a)*atanh(sqrt(a + b*x)/sqrt(a))/(a - c) + S(2)*sqrt(c)*atanh(sqrt(b*x + c)/sqrt(c))/(a - c) + S(2)*sqrt(a + b*x)/(a - c) - S(2)*sqrt(b*x + c)/(a - c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(sqrt(a + b*x) + sqrt(b*x + c))), x), x, b*atanh(sqrt(b*x + c)/sqrt(c))/(sqrt(c)*(a - c)) - sqrt(a + b*x)/(x*(a - c)) + sqrt(b*x + c)/(x*(a - c)) - b*atanh(sqrt(a + b*x)/sqrt(a))/(sqrt(a)*(a - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(a + b*x) + sqrt(b*x + c))**S(2), x), x, b*x**S(4)/(S(2)*(a - c)**S(2)) + x**S(3)*(a + c)/(S(3)*(a - c)**S(2)) - x*(a + b*x)**(S(3)/2)*(b*x + c)**(S(3)/2)/(S(2)*b**S(2)*(a - c)**S(2)) - (S(4)*a*c - S(5)*(a + c)**S(2))*atanh(sqrt(a + b*x)/sqrt(b*x + c))/(S(32)*b**S(3)) - sqrt(a + b*x)*(S(4)*a*c - S(5)*(a + c)**S(2))*sqrt(b*x + c)/(S(32)*b**S(3)*(a - c)) + (a + b*x)**(S(3)/2)*(S(5)*a + S(5)*c)*(b*x + c)**(S(3)/2)/(S(12)*b**S(3)*(a - c)**S(2)) + (a + b*x)**(S(3)/2)*(S(4)*a*c - S(5)*(a + c)**S(2))*sqrt(b*x + c)/(S(16)*b**S(3)*(a - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(a + b*x) + sqrt(b*x + c))**S(2), x), x, S(2)*b*x**S(3)/(S(3)*(a - c)**S(2)) + x**S(2)*(a + c)/(S(2)*(a - c)**S(2)) - (a + c)*atanh(sqrt(a + b*x)/sqrt(b*x + c))/(S(4)*b**S(2)) - (a + c)*sqrt(a + b*x)*sqrt(b*x + c)/(S(4)*b**S(2)*(a - c)) + (a + c)*(a + b*x)**(S(3)/2)*sqrt(b*x + c)/(S(2)*b**S(2)*(a - c)**S(2)) - S(2)*(a + b*x)**(S(3)/2)*(b*x + c)**(S(3)/2)/(S(3)*b**S(2)*(a - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(a + b*x) + sqrt(b*x + c))**(S(-2)), x), x, (a - c)**S(2)/(S(8)*b*(sqrt(a + b*x) + sqrt(b*x + c))**S(4)) + atanh(sqrt(a + b*x)/sqrt(b*x + c))/(S(2)*b), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((sqrt(a + b*x) + sqrt(b*x + c))**(S(-2)), x), x, b*x**S(2)/(a - c)**S(2) + x*(a + c)/(a - c)**S(2) + atanh(sqrt(a + b*x)/sqrt(b*x + c))/(S(2)*b) + sqrt(a + b*x)*sqrt(b*x + c)/(S(2)*b*(a - c)) - (a + b*x)**(S(3)/2)*sqrt(b*x + c)/(b*(a - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(sqrt(a + b*x) + sqrt(b*x + c))**S(2)), x), x, S(4)*sqrt(a)*sqrt(c)*atanh(sqrt(c)*sqrt(a + b*x)/(sqrt(a)*sqrt(b*x + c)))/(a - c)**S(2) + S(2)*b*x/(a - c)**S(2) + (a + c)*log(x)/(a - c)**S(2) - S(2)*sqrt(a + b*x)*sqrt(b*x + c)/(a - c)**S(2) - (S(2)*a + S(2)*c)*atanh(sqrt(a + b*x)/sqrt(b*x + c))/(a - c)**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(sqrt(a + b*x) + sqrt(b*x + c))**S(2)), x), x, S(2)*b*log(x)/(a - c)**S(2) - S(4)*b*atanh(sqrt(a + b*x)/sqrt(b*x + c))/(a - c)**S(2) - (a + c)/(x*(a - c)**S(2)) + S(2)*sqrt(a + b*x)*sqrt(b*x + c)/(x*(a - c)**S(2)) + S(2)*b*(a + c)*atanh(sqrt(c)*sqrt(a + b*x)/(sqrt(a)*sqrt(b*x + c)))/(sqrt(a)*sqrt(c)*(a - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(a + b*x) + sqrt(b*x + c))**S(3), x), x, -S(8)*a**S(3)*(a + b*x)**(S(3)/2)/(S(3)*b**S(3)*(a - c)**S(3)) + S(2)*a**S(2)*(a + S(3)*c)*(a + b*x)**(S(3)/2)/(S(3)*b**S(3)*(a - c)**S(3)) + S(24)*a**S(2)*(a + b*x)**(S(5)/2)/(S(5)*b**S(3)*(a - c)**S(3)) - S(4)*a*(a + S(3)*c)*(a + b*x)**(S(5)/2)/(S(5)*b**S(3)*(a - c)**S(3)) - S(24)*a*(a + b*x)**(S(7)/2)/(S(7)*b**S(3)*(a - c)**S(3)) + S(8)*c**S(3)*(b*x + c)**(S(3)/2)/(S(3)*b**S(3)*(a - c)**S(3)) - S(2)*c**S(2)*(S(3)*a + c)*(b*x + c)**(S(3)/2)/(S(3)*b**S(3)*(a - c)**S(3)) - S(24)*c**S(2)*(b*x + c)**(S(5)/2)/(S(5)*b**S(3)*(a - c)**S(3)) + S(4)*c*(S(3)*a + c)*(b*x + c)**(S(5)/2)/(S(5)*b**S(3)*(a - c)**S(3)) + S(24)*c*(b*x + c)**(S(7)/2)/(S(7)*b**S(3)*(a - c)**S(3)) + S(8)*(a + b*x)**(S(9)/2)/(S(9)*b**S(3)*(a - c)**S(3)) + (a + b*x)**(S(7)/2)*(S(2)*a + S(6)*c)/(S(7)*b**S(3)*(a - c)**S(3)) - (S(6)*a + S(2)*c)*(b*x + c)**(S(7)/2)/(S(7)*b**S(3)*(a - c)**S(3)) - S(8)*(b*x + c)**(S(9)/2)/(S(9)*b**S(3)*(a - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(a + b*x) + sqrt(b*x + c))**S(3), x), x, S(8)*a**S(2)*(a + b*x)**(S(3)/2)/(S(3)*b**S(2)*(a - c)**S(3)) - S(2)*a*(a + S(3)*c)*(a + b*x)**(S(3)/2)/(S(3)*b**S(2)*(a - c)**S(3)) - S(16)*a*(a + b*x)**(S(5)/2)/(S(5)*b**S(2)*(a - c)**S(3)) - S(8)*c**S(2)*(b*x + c)**(S(3)/2)/(S(3)*b**S(2)*(a - c)**S(3)) + S(2)*c*(S(3)*a + c)*(b*x + c)**(S(3)/2)/(S(3)*b**S(2)*(a - c)**S(3)) + S(16)*c*(b*x + c)**(S(5)/2)/(S(5)*b**S(2)*(a - c)**S(3)) + S(8)*(a + b*x)**(S(7)/2)/(S(7)*b**S(2)*(a - c)**S(3)) + (a + b*x)**(S(5)/2)*(S(2)*a + S(6)*c)/(S(5)*b**S(2)*(a - c)**S(3)) - (S(6)*a + S(2)*c)*(b*x + c)**(S(5)/2)/(S(5)*b**S(2)*(a - c)**S(3)) - S(8)*(b*x + c)**(S(7)/2)/(S(7)*b**S(2)*(a - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(a + b*x) + sqrt(b*x + c))**(S(-3)), x), x, (a - c)**S(2)/(S(10)*b*(sqrt(a + b*x) + sqrt(b*x + c))**S(5)) - S(1)/(S(2)*b*(sqrt(a + b*x) + sqrt(b*x + c))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((sqrt(a + b*x) + sqrt(b*x + c))**(S(-3)), x), x, -S(8)*a*(a + b*x)**(S(3)/2)/(S(3)*b*(a - c)**S(3)) + S(8)*c*(b*x + c)**(S(3)/2)/(S(3)*b*(a - c)**S(3)) + S(8)*(a + b*x)**(S(5)/2)/(S(5)*b*(a - c)**S(3)) + (a + b*x)**(S(3)/2)*(S(2)*a + S(6)*c)/(S(3)*b*(a - c)**S(3)) - (S(6)*a + S(2)*c)*(b*x + c)**(S(3)/2)/(S(3)*b*(a - c)**S(3)) - S(8)*(b*x + c)**(S(5)/2)/(S(5)*b*(a - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(sqrt(a + b*x) + sqrt(b*x + c))**S(3)), x), x, -S(2)*sqrt(a)*(a + S(3)*c)*atanh(sqrt(a + b*x)/sqrt(a))/(a - c)**S(3) + S(2)*sqrt(c)*(S(3)*a + c)*atanh(sqrt(b*x + c)/sqrt(c))/(a - c)**S(3) + S(8)*(a + b*x)**(S(3)/2)/(S(3)*(a - c)**S(3)) + sqrt(a + b*x)*(S(2)*a + S(6)*c)/(a - c)**S(3) - (S(6)*a + S(2)*c)*sqrt(b*x + c)/(a - c)**S(3) - S(8)*(b*x + c)**(S(3)/2)/(S(3)*(a - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(sqrt(a + b*x) + sqrt(b*x + c))**S(3)), x), x, S(8)*b*sqrt(a + b*x)/(a - c)**S(3) - S(8)*b*sqrt(b*x + c)/(a - c)**S(3) - S(3)*b*(a + S(3)*c)*atanh(sqrt(b*x + c)/sqrt(c))/(sqrt(c)*(-a + c)**S(3)) - (a + S(3)*c)*sqrt(a + b*x)/(x*(a - c)**S(3)) + (S(3)*a + c)*sqrt(b*x + c)/(x*(a - c)**S(3)) - S(3)*b*(S(3)*a + c)*atanh(sqrt(a + b*x)/sqrt(a))/(sqrt(a)*(a - c)**S(3)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/(x**S(2)*(sqrt(a + b*x) + sqrt(b*x + c))**S(3)), x), x, -S(8)*sqrt(a)*b*atanh(sqrt(a + b*x)/sqrt(a))/(a - c)**S(3) + S(8)*b*sqrt(c)*atanh(sqrt(b*x + c)/sqrt(c))/(a - c)**S(3) + S(8)*b*sqrt(a + b*x)/(a - c)**S(3) - S(8)*b*sqrt(b*x + c)/(a - c)**S(3) + b*(S(3)*a + c)*atanh(sqrt(b*x + c)/sqrt(c))/(sqrt(c)*(a - c)**S(3)) - (a + S(3)*c)*sqrt(a + b*x)/(x*(a - c)**S(3)) + (S(3)*a + c)*sqrt(b*x + c)/(x*(a - c)**S(3)) - b*(a + S(3)*c)*atanh(sqrt(a + b*x)/sqrt(a))/(sqrt(a)*(a - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x) + sqrt(x + S(1))), x), x, -S(2)*x**(S(3)/2)/S(3) + S(2)*(x + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x) + sqrt(x + S(-1))), x), x, S(2)*x**(S(3)/2)/S(3) - S(2)*(x + S(-1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x + S(-1)) + sqrt(x + S(1))), x), x, -(x + S(-1))**(S(3)/2)/S(3) + (x + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(sqrt(-x + S(1)) + sqrt(x + S(1)))**S(2), x), x, x**S(4)/S(2) + S(2)*(-x**S(2) + S(1))**(S(5)/2)/S(5) - S(2)*(-x**S(2) + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(sqrt(-x + S(1)) + sqrt(x + S(1)))**S(2), x), x, x**S(3)*sqrt(-x**S(2) + S(1))/S(2) + S(2)*x**S(3)/S(3) - x*sqrt(-x**S(2) + S(1))/S(4) + asin(x)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(sqrt(-x + S(1)) + sqrt(x + S(1)))**S(2), x), x, x**S(2) - S(2)*(-x**S(2) + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(-x + S(1)) + sqrt(x + S(1)))**S(2), x), x, x*sqrt(-x**S(2) + S(1)) + S(2)*x + asin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(-x + S(1)) + sqrt(x + S(1)))**S(2)/x, x), x, S(2)*sqrt(-x**S(2) + S(1)) + S(2)*log(x) - S(2)*atanh(sqrt(-x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(-x + S(1)) + sqrt(x + S(1)))**S(2)/x**S(2), x), x, -S(2)*asin(x) - S(2)*sqrt(-x**S(2) + S(1))/x - S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(-x + S(1)) + sqrt(x + S(1)))**S(2)/x**S(3), x), x, atanh(sqrt(-x**S(2) + S(1))) - sqrt(-x**S(2) + S(1))/x**S(2) - S(1)/x**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(sqrt(a + b*x) + sqrt(a + c*x)), x), x, -S(2)*a**S(2)*(a + c*x)**(S(3)/2)/(c**S(3)*(S(3)*b - S(3)*c)) + S(2)*a**S(2)*(a + b*x)**(S(3)/2)/(S(3)*b**S(3)*(b - c)) + S(4)*a*(a + c*x)**(S(5)/2)/(c**S(3)*(S(5)*b - S(5)*c)) - S(4)*a*(a + b*x)**(S(5)/2)/(S(5)*b**S(3)*(b - c)) - S(2)*(a + c*x)**(S(7)/2)/(c**S(3)*(S(7)*b - S(7)*c)) + S(2)*(a + b*x)**(S(7)/2)/(S(7)*b**S(3)*(b - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(a + b*x) + sqrt(a + c*x)), x), x, S(2)*a*(a + c*x)**(S(3)/2)/(c**S(2)*(S(3)*b - S(3)*c)) - S(2)*a*(a + b*x)**(S(3)/2)/(S(3)*b**S(2)*(b - c)) - S(2)*(a + c*x)**(S(5)/2)/(c**S(2)*(S(5)*b - S(5)*c)) + S(2)*(a + b*x)**(S(5)/2)/(S(5)*b**S(2)*(b - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(a + b*x) + sqrt(a + c*x)), x), x, -S(2)*(a + c*x)**(S(3)/2)/(c*(S(3)*b - S(3)*c)) + S(2)*(a + b*x)**(S(3)/2)/(S(3)*b*(b - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + b*x) + sqrt(a + c*x)), x), x, -S(2)*sqrt(a)*atanh(sqrt(a + b*x)/sqrt(a))/(b - c) + S(2)*sqrt(a)*atanh(sqrt(a + c*x)/sqrt(a))/(b - c) + S(2)*sqrt(a + b*x)/(b - c) - S(2)*sqrt(a + c*x)/(b - c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(sqrt(a + b*x) + sqrt(a + c*x))), x), x, -sqrt(a + b*x)/(x*(b - c)) + sqrt(a + c*x)/(x*(b - c)) - b*atanh(sqrt(a + b*x)/sqrt(a))/(sqrt(a)*(b - c)) + c*atanh(sqrt(a + c*x)/sqrt(a))/(sqrt(a)*(b - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(sqrt(a + b*x) + sqrt(a + c*x))), x), x, -sqrt(a + b*x)/(x**S(2)*(S(2)*b - S(2)*c)) + sqrt(a + c*x)/(x**S(2)*(S(2)*b - S(2)*c)) - b*sqrt(a + b*x)/(S(4)*a*x*(b - c)) + c*sqrt(a + c*x)/(S(4)*a*x*(b - c)) + b**S(2)*atanh(sqrt(a + b*x)/sqrt(a))/(S(4)*a**(S(3)/2)*(b - c)) - c**S(2)*atanh(sqrt(a + c*x)/sqrt(a))/(S(4)*a**(S(3)/2)*(b - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(sqrt(a + b*x) + sqrt(a + c*x))**S(2), x), x, -a**S(3)*(b + c)*atanh(sqrt(c)*sqrt(a + b*x)/(sqrt(b)*sqrt(a + c*x)))/(S(4)*b**(S(5)/2)*c**(S(5)/2)) + a**S(2)*sqrt(a + b*x)*sqrt(a + c*x)*(b + c)/(S(4)*b**S(2)*c**S(2)*(b - c)) + a*x**S(2)/(b - c)**S(2) + a*(a + b*x)**(S(3)/2)*sqrt(a + c*x)*(b + c)/(S(2)*b**S(2)*c*(b - c)**S(2)) + x**S(3)*(b + c)/(S(3)*(b - c)**S(2)) - S(2)*(a + b*x)**(S(3)/2)*(a + c*x)**(S(3)/2)/(S(3)*b*c*(b - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(a + b*x) + sqrt(a + c*x))**S(2), x), x, a**S(2)*atanh(sqrt(c)*sqrt(a + b*x)/(sqrt(b)*sqrt(a + c*x)))/(S(2)*b**(S(3)/2)*c**(S(3)/2)) + S(2)*a*x/(b - c)**S(2) - a*sqrt(a + b*x)*sqrt(a + c*x)/(S(2)*b*c*(b - c)) + x**S(2)*(b + c)/(S(2)*(b - c)**S(2)) - (a + b*x)**(S(3)/2)*sqrt(a + c*x)/(b*(b - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(a + b*x) + sqrt(a + c*x))**S(2), x), x, S(2)*a*log(x)/(b - c)**S(2) + S(4)*a*atanh(sqrt(a + b*x)/sqrt(a + c*x))/(b - c)**S(2) - S(2)*a*(b + c)*atanh(sqrt(c)*sqrt(a + b*x)/(sqrt(b)*sqrt(a + c*x)))/(sqrt(b)*sqrt(c)*(b - c)**S(2)) + x*(b + c)/(b - c)**S(2) - S(2)*sqrt(a + b*x)*sqrt(a + c*x)/(b - c)**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(a + b*x) + sqrt(a + c*x))**(S(-2)), x), x, -S(2)*a/(x*(b - c)**S(2)) - S(4)*sqrt(b)*sqrt(c)*atanh(sqrt(c)*sqrt(a + b*x)/(sqrt(b)*sqrt(a + c*x)))/(b - c)**S(2) + (b + c)*log(x)/(b - c)**S(2) + (S(2)*b + S(2)*c)*atanh(sqrt(a + b*x)/sqrt(a + c*x))/(b - c)**S(2) + S(2)*sqrt(a + b*x)*sqrt(a + c*x)/(x*(b - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(sqrt(a + b*x) + sqrt(a + c*x))**S(2)), x), x, -a/(x**S(2)*(b - c)**S(2)) - (b + c)/(x*(b - c)**S(2)) - atanh(sqrt(a + b*x)/sqrt(a + c*x))/(S(2)*a) + sqrt(a + b*x)*sqrt(a + c*x)/(S(2)*a*x*(b - c)) + sqrt(a + b*x)*(a + c*x)**(S(3)/2)/(a*x**S(2)*(b - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(sqrt(a + b*x) + sqrt(a + c*x))**S(2)), x), x, -S(2)*a/(S(3)*x**S(3)*(b - c)**S(2)) - (b + c)/(S(2)*x**S(2)*(b - c)**S(2)) + (b + c)*atanh(sqrt(a + b*x)/sqrt(a + c*x))/(S(4)*a**S(2)) - sqrt(a + b*x)*sqrt(a + c*x)*(b + c)/(S(4)*a**S(2)*x*(b - c)) - sqrt(a + b*x)*(a + c*x)**(S(3)/2)*(b + c)/(S(2)*a**S(2)*x**S(2)*(b - c)**S(2)) + S(2)*(a + b*x)**(S(3)/2)*(a + c*x)**(S(3)/2)/(S(3)*a**S(2)*x**S(3)*(b - c)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/(sqrt(a + b*x) + sqrt(a + c*x))**S(3), x), x, S(8)*a**S(2)*(a + c*x)**(S(3)/2)/(S(3)*c**S(2)*(b - c)**S(3)) - S(2)*a**S(2)*(a + c*x)**(S(3)/2)*(S(3)*b + c)/(S(3)*c**S(3)*(b - c)**S(3)) - S(8)*a**S(2)*(a + b*x)**(S(3)/2)/(S(3)*b**S(2)*(b - c)**S(3)) + S(2)*a**S(2)*(a + b*x)**(S(3)/2)*(b + S(3)*c)/(S(3)*b**S(3)*(b - c)**S(3)) - S(8)*a*(a + c*x)**(S(5)/2)/(S(5)*c**S(2)*(b - c)**S(3)) + S(4)*a*(a + c*x)**(S(5)/2)*(S(3)*b + c)/(S(5)*c**S(3)*(b - c)**S(3)) + S(8)*a*(a + b*x)**(S(5)/2)/(S(5)*b**S(2)*(b - c)**S(3)) - S(4)*a*(a + b*x)**(S(5)/2)*(b + S(3)*c)/(S(5)*b**S(3)*(b - c)**S(3)) - (a + c*x)**(S(7)/2)*(S(6)*b + S(2)*c)/(S(7)*c**S(3)*(b - c)**S(3)) + (a + b*x)**(S(7)/2)*(S(2)*b + S(6)*c)/(S(7)*b**S(3)*(b - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(sqrt(a + b*x) + sqrt(a + c*x))**S(3), x), x, -S(8)*a*(a + c*x)**(S(3)/2)/(S(3)*c*(b - c)**S(3)) + S(2)*a*(a + c*x)**(S(3)/2)*(S(3)*b + c)/(S(3)*c**S(2)*(b - c)**S(3)) + S(8)*a*(a + b*x)**(S(3)/2)/(S(3)*b*(b - c)**S(3)) - S(2)*a*(a + b*x)**(S(3)/2)*(b + S(3)*c)/(S(3)*b**S(2)*(b - c)**S(3)) - (a + c*x)**(S(5)/2)*(S(6)*b + S(2)*c)/(S(5)*c**S(2)*(b - c)**S(3)) + (a + b*x)**(S(5)/2)*(S(2)*b + S(6)*c)/(S(5)*b**S(2)*(b - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(a + b*x) + sqrt(a + c*x))**S(3), x), x, -S(8)*a**(S(3)/2)*atanh(sqrt(a + b*x)/sqrt(a))/(b - c)**S(3) + S(8)*a**(S(3)/2)*atanh(sqrt(a + c*x)/sqrt(a))/(b - c)**S(3) + S(8)*a*sqrt(a + b*x)/(b - c)**S(3) - S(8)*a*sqrt(a + c*x)/(b - c)**S(3) - (a + c*x)**(S(3)/2)*(S(6)*b + S(2)*c)/(S(3)*c*(b - c)**S(3)) + (a + b*x)**(S(3)/2)*(S(2)*b + S(6)*c)/(S(3)*b*(b - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(a + b*x) + sqrt(a + c*x))**S(3), x), x, -S(6)*sqrt(a)*(b + c)*atanh(sqrt(a + b*x)/sqrt(a))/(b - c)**S(3) + S(6)*sqrt(a)*(b + c)*atanh(sqrt(a + c*x)/sqrt(a))/(b - c)**S(3) - S(4)*a*sqrt(a + b*x)/(x*(b - c)**S(3)) + S(4)*a*sqrt(a + c*x)/(x*(b - c)**S(3)) + sqrt(a + b*x)*(S(2)*b + S(6)*c)/(b - c)**S(3) - sqrt(a + c*x)*(S(6)*b + S(2)*c)/(b - c)**S(3), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x/(sqrt(a + b*x) + sqrt(a + c*x))**S(3), x), x, -S(4)*sqrt(a)*b*atanh(sqrt(a + b*x)/sqrt(a))/(b - c)**S(3) + S(4)*sqrt(a)*c*atanh(sqrt(a + c*x)/sqrt(a))/(b - c)**S(3) - S(2)*sqrt(a)*(b + S(3)*c)*atanh(sqrt(a + b*x)/sqrt(a))/(b - c)**S(3) + S(2)*sqrt(a)*(S(3)*b + c)*atanh(sqrt(a + c*x)/sqrt(a))/(b - c)**S(3) - S(4)*a*sqrt(a + b*x)/(x*(b - c)**S(3)) + S(4)*a*sqrt(a + c*x)/(x*(b - c)**S(3)) + sqrt(a + b*x)*(S(2)*b + S(6)*c)/(b - c)**S(3) - sqrt(a + c*x)*(S(6)*b + S(2)*c)/(b - c)**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(a + b*x) + sqrt(a + c*x))**(S(-3)), x), x, -S(2)*a*sqrt(a + b*x)/(x**S(2)*(b - c)**S(3)) + S(2)*a*sqrt(a + c*x)/(x**S(2)*(b - c)**S(3)) - sqrt(a + b*x)*(S(2)*b + S(3)*c)/(x*(b - c)**S(3)) + sqrt(a + c*x)*(S(3)*b + S(2)*c)/(x*(b - c)**S(3)) - S(3)*b*c*atanh(sqrt(a + b*x)/sqrt(a))/(sqrt(a)*(b - c)**S(3)) + S(3)*b*c*atanh(sqrt(a + c*x)/sqrt(a))/(sqrt(a)*(b - c)**S(3)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((sqrt(a + b*x) + sqrt(a + c*x))**(S(-3)), x), x, -S(2)*a*sqrt(a + b*x)/(x**S(2)*(b - c)**S(3)) + S(2)*a*sqrt(a + c*x)/(x**S(2)*(b - c)**S(3)) - b*sqrt(a + b*x)/(x*(b - c)**S(3)) + c*sqrt(a + c*x)/(x*(b - c)**S(3)) - sqrt(a + b*x)*(b + S(3)*c)/(x*(b - c)**S(3)) + sqrt(a + c*x)*(S(3)*b + c)/(x*(b - c)**S(3)) + b**S(2)*atanh(sqrt(a + b*x)/sqrt(a))/(sqrt(a)*(b - c)**S(3)) - b*(b + S(3)*c)*atanh(sqrt(a + b*x)/sqrt(a))/(sqrt(a)*(b - c)**S(3)) - c**S(2)*atanh(sqrt(a + c*x)/sqrt(a))/(sqrt(a)*(b - c)**S(3)) + c*(S(3)*b + c)*atanh(sqrt(a + c*x)/sqrt(a))/(sqrt(a)*(b - c)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x + S(1))*(sqrt(-x + S(1)) + sqrt(x + S(1))), x), x, -x**S(2)/S(2) + x*sqrt(-x**S(2) + S(1))/S(2) + x + asin(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(-sqrt(-x + S(1)) - sqrt(x + S(1)))*(sqrt(-x + S(1)) + sqrt(x + S(1))), x), x, -x**S(4)/S(2) - S(2)*(-x**S(2) + S(1))**(S(5)/2)/S(5) + S(2)*(-x**S(2) + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(-sqrt(-x + S(1)) - sqrt(x + S(1)))*(sqrt(-x + S(1)) + sqrt(x + S(1))), x), x, -x**S(3)*sqrt(-x**S(2) + S(1))/S(2) - S(2)*x**S(3)/S(3) + x*sqrt(-x**S(2) + S(1))/S(4) - asin(x)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(-sqrt(-x + S(1)) - sqrt(x + S(1)))*(sqrt(-x + S(1)) + sqrt(x + S(1))), x), x, -x**S(2) + S(2)*(-x**S(2) + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(-x + S(1)) - sqrt(x + S(1)))*(sqrt(-x + S(1)) + sqrt(x + S(1))), x), x, -x*sqrt(-x**S(2) + S(1)) - S(2)*x - asin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(-x + S(1)) - sqrt(x + S(1)))*(sqrt(-x + S(1)) + sqrt(x + S(1)))/x, x), x, -S(2)*sqrt(-x**S(2) + S(1)) - S(2)*log(x) + S(2)*atanh(sqrt(-x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(-x + S(1)) - sqrt(x + S(1)))*(sqrt(-x + S(1)) + sqrt(x + S(1)))/x**S(2), x), x, S(2)*asin(x) + S(2)*sqrt(-x**S(2) + S(1))/x + S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(-x + S(1)) - sqrt(x + S(1)))*(sqrt(-x + S(1)) + sqrt(x + S(1)))/x**S(3), x), x, -atanh(sqrt(-x**S(2) + S(1))) + sqrt(-x**S(2) + S(1))/x**S(2) + x**(S(-2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(-x + S(1)) + sqrt(x + S(1)))/(-sqrt(-x + S(1)) + sqrt(x + S(1))), x), x, sqrt(-x**S(2) + S(1)) + log(x) - atanh(sqrt(-x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(x + S(-1)) + sqrt(x + S(1)))/(sqrt(x + S(-1)) + sqrt(x + S(1))), x), x, x**S(2)/S(2) - x*sqrt(x + S(-1))*sqrt(x + S(1))/S(2) + acosh(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**n, x), x, a*f**S(2)*(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), (d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/d)/(S(2)*d**S(2)*e*(n + S(1))) + (d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))/(S(2)*e*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**S(3), x), x, -a*d**S(3)*f**S(2)/(S(2)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) + S(3)*a*d**S(2)*f**S(2)*log(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*e) + a*d*f**S(2)*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/e + a*f**S(2)*(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**S(2)/(S(4)*e) + (d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**S(4)/(S(8)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**S(2), x), x, -a*d**S(2)*f**S(2)/(S(2)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) + a*d*f**S(2)*log(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/e + a*f**S(2)*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*e) + (d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**S(3)/(S(6)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)), x), x, a*f**S(2)*atanh(e*x/(f*sqrt(a + e**S(2)*x**S(2)/f**S(2))))/(S(2)*e) + d*x + e*x**S(2)/S(2) + f*x*sqrt(a + e**S(2)*x**S(2)/f**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2))), x), x, -a*f**S(2)/(S(2)*d*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) - a*f**S(2)*log(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*d**S(2)*e) + (a*f**S(2)/d**S(2) + S(1))*log(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(-2)), x), x, -a*f**S(2)/(S(2)*d**S(2)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) - a*f**S(2)*log(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(d**S(3)*e) + a*f**S(2)*log(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(d**S(3)*e) - (a*f**S(2)/d**S(2) + S(1))/(S(2)*e*(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(-3)), x), x, -a*f**S(2)/(d**S(3)*e*(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) - a*f**S(2)/(S(2)*d**S(3)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) - S(3)*a*f**S(2)*log(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*d**S(4)*e) + S(3)*a*f**S(2)*log(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*d**S(4)*e) - (a*f**S(2)/d**S(2) + S(1))/(S(4)*e*(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(5)/2), x), x, -S(5)*a*d**(S(3)/2)*f**S(2)*atanh(sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/sqrt(d))/(S(2)*e) - a*d**S(2)*f**S(2)*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) + S(2)*a*d*f**S(2)*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/e + a*f**S(2)*(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(3)/2)/(S(3)*e) + (d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(7)/2)/(S(7)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(3)/2), x), x, -S(3)*a*sqrt(d)*f**S(2)*atanh(sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/sqrt(d))/(S(2)*e) - a*d*f**S(2)*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) + a*f**S(2)*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/e + (d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(5)/2)/(S(5)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2))), x), x, -a*f**S(2)*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) - a*f**S(2)*atanh(sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/sqrt(d))/(S(2)*sqrt(d)*e) + (d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(3)/2)/(S(3)*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2))), x), x, -a*f**S(2)*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*d*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) + a*f**S(2)*atanh(sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/sqrt(d))/(S(2)*d**(S(3)/2)*e) + sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/e, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(-3)/2), x), x, -a*f**S(2)*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*d**S(2)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) + S(3)*a*f**S(2)*atanh(sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/sqrt(d))/(S(2)*d**(S(5)/2)*e) - (a*f**S(2)/d**S(2) + S(1))/(e*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(-5)/2), x), x, -S(2)*a*f**S(2)/(d**S(3)*e*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) - a*f**S(2)*sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/(S(2)*d**S(3)*e*(e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))) + S(5)*a*f**S(2)*atanh(sqrt(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))/sqrt(d))/(S(2)*d**(S(7)/2)*e) - (a*f**S(2)/d**S(2) + S(1))/(S(3)*e*(d + e*x + f*sqrt(a + e**S(2)*x**S(2)/f**S(2)))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x - sqrt(x**S(2) + S(-4))), x), x, (x - sqrt(x**S(2) + S(-4)))**(S(3)/2)/S(3) + S(4)/sqrt(x - sqrt(x**S(2) + S(-4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x + b*sqrt(a**S(2)*x**S(2)/b**S(2) + c)), x), x, -b**S(2)*c/(a*sqrt(a*x + b*sqrt(a**S(2)*x**S(2)/b**S(2) + c))) + (a*x + b*sqrt(a**S(2)*x**S(2)/b**S(2) + c))**(S(3)/2)/(S(3)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(-x**S(2) + S(1)) + S(1)), x), x, -S(2)*x**S(3)/(S(3)*(sqrt(-x**S(2) + S(1)) + S(1))**(S(3)/2)) + S(2)*x/sqrt(sqrt(-x**S(2) + S(1)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(x**S(2) + S(1)) + S(1)), x), x, S(2)*x**S(3)/(S(3)*(sqrt(x**S(2) + S(1)) + S(1))**(S(3)/2)) + S(2)*x/sqrt(sqrt(x**S(2) + S(1)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(x**S(2) + S(25)) + S(5)), x), x, S(2)*x**S(3)/(S(3)*(sqrt(x**S(2) + S(25)) + S(5))**(S(3)/2)) + S(10)*x/sqrt(sqrt(x**S(2) + S(25)) + S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(a**S(2)/b**S(2) + c*x**S(2))), x), x, S(2)*a*x/sqrt(a + b*sqrt(a**S(2)/b**S(2) + c*x**S(2))) + S(2)*b**S(2)*c*x**S(3)/(S(3)*(a + b*sqrt(a**S(2)/b**S(2) + c*x**S(2)))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**n, x), x, f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))*hyper((S(2), n + S(1)), (n + S(2),), S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(-b*f**S(2) + S(2)*d*e))/(S(2)*e*(n + S(1))*(-b*f**S(2) + S(2)*d*e)**S(2)) + (d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))/(S(2)*e*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**S(3), x), x, (d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**S(4)/(S(8)*e) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**S(2)/(S(16)*e**S(3)) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)*(e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(S(8)*e**S(4)) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)**S(3)/(S(32)*e**S(5)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) + S(3)*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)**S(2)*log(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))/(S(32)*e**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**S(2), x), x, (d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**S(3)/(S(6)*e) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(S(8)*e**S(3)) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)**S(2)/(S(16)*e**S(4)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)*log(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))/(S(8)*e**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)), x), x, d*x + e*x**S(2)/S(2) + f*(b*f**S(2) + S(2)*e**S(2)*x)*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))/(S(4)*e**S(2)) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*atanh((b*f**S(2) + S(2)*e**S(2)*x)/(S(2)*e*f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))/(S(8)*e**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))), x), x, (S(2)*a*e*f**S(2) - S(2)*b*d*f**S(2) + S(2)*d**S(2)*e)*log(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(-b*f**S(2) + S(2)*d*e)**S(2) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))/(S(2)*e*(-b*f**S(2) + S(2)*d*e)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) - f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*log(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))/(S(2)*e*(-b*f**S(2) + S(2)*d*e)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(-2)), x), x, f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))/((-b*f**S(2) + S(2)*d*e)**S(2)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) + S(2)*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*log(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(-b*f**S(2) + S(2)*d*e)**S(3) - S(2)*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*log(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))/(-b*f**S(2) + S(2)*d*e)**S(3) - (S(2)*a*e*f**S(2) - S(2)*b*d*f**S(2) + S(2)*d**S(2)*e)/((-b*f**S(2) + S(2)*d*e)**S(2)*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(-3)), x), x, S(2)*e*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))/((-b*f**S(2) + S(2)*d*e)**S(3)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) + S(6)*e*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*log(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(-b*f**S(2) + S(2)*d*e)**S(4) - S(6)*e*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*log(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))/(-b*f**S(2) + S(2)*d*e)**S(4) - S(2)*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))/((-b*f**S(2) + S(2)*d*e)**S(3)*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))) - (a*e*f**S(2) - b*d*f**S(2) + d**S(2)*e)/((-b*f**S(2) + S(2)*d*e)**S(2)*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(5)/2), x), x, (d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(7)/2)/(S(7)*e) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(3)/2)/(S(12)*e**S(3)) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)**S(2)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(S(16)*e**S(4)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(S(4)*e**S(4)) - S(5)*sqrt(S(2))*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)**(S(3)/2)*atanh(sqrt(S(2))*sqrt(e)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/sqrt(-b*f**S(2) + S(2)*d*e))/(S(32)*e**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(3)/2), x), x, (d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(5)/2)/(S(5)*e) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*(-b*f**S(2) + S(2)*d*e)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(S(8)*e**S(3)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) + f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(S(4)*e**S(3)) - S(3)*sqrt(S(2))*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*sqrt(-b*f**S(2) + S(2)*d*e)*atanh(sqrt(S(2))*sqrt(e)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/sqrt(-b*f**S(2) + S(2)*d*e))/(S(16)*e**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))), x), x, f**S(2)*(S(4)*a - b**S(2)*f**S(2)/e**S(2))*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(-S(4)*b*f**S(2) + S(8)*d*e - S(8)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))) + (d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(3)/2)/(S(3)*e) - sqrt(S(2))*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*atanh(sqrt(S(2))*sqrt(e)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/sqrt(-b*f**S(2) + S(2)*d*e))/(S(8)*e**(S(5)/2)*sqrt(-b*f**S(2) + S(2)*d*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))), x), x, f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/(S(2)*e*(-b*f**S(2) + S(2)*d*e)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) + sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/e + sqrt(S(2))*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*atanh(sqrt(S(2))*sqrt(e)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/sqrt(-b*f**S(2) + S(2)*d*e))/(S(4)*e**(S(3)/2)*(-b*f**S(2) + S(2)*d*e)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(-3)/2), x), x, f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/((-b*f**S(2) + S(2)*d*e)**S(2)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) - (S(4)*a*e*f**S(2) - S(4)*b*d*f**S(2) + S(4)*d**S(2)*e)/((-b*f**S(2) + S(2)*d*e)**S(2)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))) + S(3)*sqrt(S(2))*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*atanh(sqrt(S(2))*sqrt(e)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/sqrt(-b*f**S(2) + S(2)*d*e))/(S(2)*sqrt(e)*(-b*f**S(2) + S(2)*d*e)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(-5)/2), x), x, S(5)*sqrt(S(2))*sqrt(e)*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*atanh(sqrt(S(2))*sqrt(e)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/sqrt(-b*f**S(2) + S(2)*d*e))/(-b*f**S(2) + S(2)*d*e)**(S(7)/2) + S(2)*e*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))/((-b*f**S(2) + S(2)*d*e)**S(3)*(-b*f**S(2) + S(2)*d*e - S(2)*e*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2))))) - S(4)*f**S(2)*(S(4)*a*e**S(2) - b**S(2)*f**S(2))/((-b*f**S(2) + S(2)*d*e)**S(3)*sqrt(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))) - (S(4)*a*e*f**S(2) - S(4)*b*d*f**S(2) + S(4)*d**S(2)*e)/(S(3)*(-b*f**S(2) + S(2)*d*e)**S(2)*(d + e*x + f*sqrt(a + b*x + e**S(2)*x**S(2)/f**S(2)))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2))**S(2)*(x + sqrt(a + x**S(2)))**n, x), x, -a**S(5)*(x + sqrt(a + x**S(2)))**(n + S(-5))/(-S(32)*n + S(160)) - S(5)*a**S(4)*(x + sqrt(a + x**S(2)))**(n + S(-3))/(-S(32)*n + S(96)) - S(5)*a**S(3)*(x + sqrt(a + x**S(2)))**(n + S(-1))/(-S(16)*n + S(16)) + S(5)*a**S(2)*(x + sqrt(a + x**S(2)))**(n + S(1))/(S(16)*n + S(16)) + S(5)*a*(x + sqrt(a + x**S(2)))**(n + S(3))/(S(32)*n + S(96)) + (x + sqrt(a + x**S(2)))**(n + S(5))/(S(32)*n + S(160)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2))*(x + sqrt(a + x**S(2)))**n, x), x, -a**S(3)*(x + sqrt(a + x**S(2)))**(n + S(-3))/(-S(8)*n + S(24)) - S(3)*a**S(2)*(x + sqrt(a + x**S(2)))**(n + S(-1))/(-S(8)*n + S(8)) + S(3)*a*(x + sqrt(a + x**S(2)))**(n + S(1))/(S(8)*n + S(8)) + (x + sqrt(a + x**S(2)))**(n + S(3))/(S(8)*n + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(a + x**S(2)))**n, x), x, -a*(x + sqrt(a + x**S(2)))**(n + S(-1))/(-S(2)*n + S(2)) + (x + sqrt(a + x**S(2)))**(n + S(1))/(S(2)*n + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(a + x**S(2)))**n/(a + x**S(2)), x), x, S(2)*(x + sqrt(a + x**S(2)))**(n + S(1))*hyper((S(1), n/S(2) + S(1)/2), (n/S(2) + S(3)/2,), -(x + sqrt(a + x**S(2)))**S(2)/a)/(a*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(a + x**S(2)))**n/(a + x**S(2))**S(2), x), x, S(8)*(x + sqrt(a + x**S(2)))**(n + S(3))*hyper((S(3), n/S(2) + S(3)/2), (n/S(2) + S(5)/2,), -(x + sqrt(a + x**S(2)))**S(2)/a)/(a**S(3)*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2))**S(2)*(x - sqrt(a + x**S(2)))**n, x), x, -a**S(5)*(x - sqrt(a + x**S(2)))**(n + S(-5))/(-S(32)*n + S(160)) - S(5)*a**S(4)*(x - sqrt(a + x**S(2)))**(n + S(-3))/(-S(32)*n + S(96)) - S(5)*a**S(3)*(x - sqrt(a + x**S(2)))**(n + S(-1))/(-S(16)*n + S(16)) + S(5)*a**S(2)*(x - sqrt(a + x**S(2)))**(n + S(1))/(S(16)*n + S(16)) + S(5)*a*(x - sqrt(a + x**S(2)))**(n + S(3))/(S(32)*n + S(96)) + (x - sqrt(a + x**S(2)))**(n + S(5))/(S(32)*n + S(160)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2))*(x - sqrt(a + x**S(2)))**n, x), x, -a**S(3)*(x - sqrt(a + x**S(2)))**(n + S(-3))/(-S(8)*n + S(24)) - S(3)*a**S(2)*(x - sqrt(a + x**S(2)))**(n + S(-1))/(-S(8)*n + S(8)) + S(3)*a*(x - sqrt(a + x**S(2)))**(n + S(1))/(S(8)*n + S(8)) + (x - sqrt(a + x**S(2)))**(n + S(3))/(S(8)*n + S(24)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x - sqrt(a + x**S(2)))**n, x), x, -a*(x - sqrt(a + x**S(2)))**(n + S(-1))/(-S(2)*n + S(2)) + (x - sqrt(a + x**S(2)))**(n + S(1))/(S(2)*n + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x - sqrt(a + x**S(2)))**n/(a + x**S(2)), x), x, S(2)*(x - sqrt(a + x**S(2)))**(n + S(1))*hyper((S(1), n/S(2) + S(1)/2), (n/S(2) + S(3)/2,), -(x - sqrt(a + x**S(2)))**S(2)/a)/(a*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x - sqrt(a + x**S(2)))**n/(a + x**S(2))**S(2), x), x, S(8)*(x - sqrt(a + x**S(2)))**(n + S(3))*hyper((S(3), n/S(2) + S(3)/2), (n/S(2) + S(5)/2,), -(x - sqrt(a + x**S(2)))**S(2)/a)/(a**S(3)*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2))**(S(5)/2)*(x + sqrt(a + x**S(2)))**n, x), x, -a**S(6)*(x + sqrt(a + x**S(2)))**(n + S(-6))/(-S(64)*n + S(384)) - S(3)*a**S(5)*(x + sqrt(a + x**S(2)))**(n + S(-4))/(-S(32)*n + S(128)) - S(15)*a**S(4)*(x + sqrt(a + x**S(2)))**(n + S(-2))/(-S(64)*n + S(128)) + S(5)*a**S(3)*(x + sqrt(a + x**S(2)))**n/(S(16)*n) + S(15)*a**S(2)*(x + sqrt(a + x**S(2)))**(n + S(2))/(S(64)*n + S(128)) + S(3)*a*(x + sqrt(a + x**S(2)))**(n + S(4))/(S(32)*n + S(128)) + (x + sqrt(a + x**S(2)))**(n + S(6))/(S(64)*n + S(384)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2))**(S(3)/2)*(x + sqrt(a + x**S(2)))**n, x), x, -a**S(4)*(x + sqrt(a + x**S(2)))**(n + S(-4))/(-S(16)*n + S(64)) - a**S(3)*(x + sqrt(a + x**S(2)))**(n + S(-2))/(-S(4)*n + S(8)) + S(3)*a**S(2)*(x + sqrt(a + x**S(2)))**n/(S(8)*n) + a*(x + sqrt(a + x**S(2)))**(n + S(2))/(S(4)*n + S(8)) + (x + sqrt(a + x**S(2)))**(n + S(4))/(S(16)*n + S(64)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + x**S(2))*(x + sqrt(a + x**S(2)))**n, x), x, -a**S(2)*(x + sqrt(a + x**S(2)))**(n + S(-2))/(-S(4)*n + S(8)) + a*(x + sqrt(a + x**S(2)))**n/(S(2)*n) + (x + sqrt(a + x**S(2)))**(n + S(2))/(S(4)*n + S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(a + x**S(2)))**n/sqrt(a + x**S(2)), x), x, (x + sqrt(a + x**S(2)))**n/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(a + x**S(2)))**n/(a + x**S(2))**(S(3)/2), x), x, S(4)*(x + sqrt(a + x**S(2)))**(n + S(2))*hyper((S(2), n/S(2) + S(1)), (n/S(2) + S(2),), -(x + sqrt(a + x**S(2)))**S(2)/a)/(a**S(2)*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(a + x**S(2)))**n/(a + x**S(2))**(S(5)/2), x), x, S(16)*(x + sqrt(a + x**S(2)))**(n + S(4))*hyper((S(4), n/S(2) + S(2)), (n/S(2) + S(3),), -(x + sqrt(a + x**S(2)))**S(2)/a)/(a**S(4)*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2))**(S(5)/2)*(x - sqrt(a + x**S(2)))**n, x), x, a**S(6)*(x - sqrt(a + x**S(2)))**(n + S(-6))/(-S(64)*n + S(384)) + S(3)*a**S(5)*(x - sqrt(a + x**S(2)))**(n + S(-4))/(-S(32)*n + S(128)) + S(15)*a**S(4)*(x - sqrt(a + x**S(2)))**(n + S(-2))/(-S(64)*n + S(128)) - S(5)*a**S(3)*(x - sqrt(a + x**S(2)))**n/(S(16)*n) - S(15)*a**S(2)*(x - sqrt(a + x**S(2)))**(n + S(2))/(S(64)*n + S(128)) - S(3)*a*(x - sqrt(a + x**S(2)))**(n + S(4))/(S(32)*n + S(128)) - (x - sqrt(a + x**S(2)))**(n + S(6))/(S(64)*n + S(384)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + x**S(2))**(S(3)/2)*(x - sqrt(a + x**S(2)))**n, x), x, a**S(4)*(x - sqrt(a + x**S(2)))**(n + S(-4))/(-S(16)*n + S(64)) + a**S(3)*(x - sqrt(a + x**S(2)))**(n + S(-2))/(-S(4)*n + S(8)) - S(3)*a**S(2)*(x - sqrt(a + x**S(2)))**n/(S(8)*n) - a*(x - sqrt(a + x**S(2)))**(n + S(2))/(S(4)*n + S(8)) - (x - sqrt(a + x**S(2)))**(n + S(4))/(S(16)*n + S(64)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + x**S(2))*(x - sqrt(a + x**S(2)))**n, x), x, a**S(2)*(x - sqrt(a + x**S(2)))**(n + S(-2))/(-S(4)*n + S(8)) - a*(x - sqrt(a + x**S(2)))**n/(S(2)*n) - (x - sqrt(a + x**S(2)))**(n + S(2))/(S(4)*n + S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x - sqrt(a + x**S(2)))**n/sqrt(a + x**S(2)), x), x, -(x - sqrt(a + x**S(2)))**n/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x - sqrt(a + x**S(2)))**n/(a + x**S(2))**(S(3)/2), x), x, -S(4)*(x - sqrt(a + x**S(2)))**(n + S(2))*hyper((S(2), n/S(2) + S(1)), (n/S(2) + S(2),), -(x - sqrt(a + x**S(2)))**S(2)/a)/(a**S(2)*(n + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x - sqrt(a + x**S(2)))**n/(a + x**S(2))**(S(5)/2), x), x, -S(16)*(x - sqrt(a + x**S(2)))**(n + S(4))*hyper((S(4), n/S(2) + S(2)), (n/S(2) + S(3),), -(x - sqrt(a + x**S(2)))**S(2)/a)/(a**S(4)*(n + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))**S(2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n, x), x, (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(5))/(S(32)*e*f**S(4)*(n + S(5))) - (-S(5)*a*f**S(2) + S(5)*d**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(3))/(S(32)*e*f**S(4)*(n + S(3))) + S(5)*(-a*f**S(2) + d**S(2))**S(2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))/(S(16)*e*f**S(4)*(n + S(1))) + (-a*f**S(2) + d**S(2))**S(5)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-5))/(S(32)*e*f**S(4)*(-n + S(5))) - S(5)*(-a*f**S(2) + d**S(2))**S(4)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-3))/(S(32)*e*f**S(4)*(-n + S(3))) + S(5)*(-a*f**S(2) + d**S(2))**S(3)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-1))/(S(16)*e*f**S(4)*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n, x), x, (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(3))/(S(8)*e*f**S(2)*(n + S(3))) - (-S(3)*a*f**S(2) + S(3)*d**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))/(S(8)*e*f**S(2)*(n + S(1))) + (-a*f**S(2) + d**S(2))**S(3)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-3))/(S(8)*e*f**S(2)*(-n + S(3))) - S(3)*(-a*f**S(2) + d**S(2))**S(2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-1))/(S(8)*e*f**S(2)*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n, x), x, (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))/(S(2)*e*(n + S(1))) + (-a*f**S(2) + d**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-1))/(S(2)*e*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)), x), x, -S(2)*f**S(2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))*hyper((S(1), n/S(2) + S(1)/2), (n/S(2) + S(3)/2,), (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**S(2)/(-a*f**S(2) + d**S(2)))/(e*(n + S(1))*(-a*f**S(2) + d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))**S(2), x), x, -S(8)*f**S(4)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(3))*hyper((S(3), n/S(2) + S(3)/2), (n/S(2) + S(5)/2,), (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**S(2)/(-a*f**S(2) + d**S(2)))/(e*(n + S(3))*(-a*f**S(2) + d**S(2))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt((a*f**S(2) + e*x*(S(2)*d + e*x))/f**S(2)))**n, x), x, (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))/(S(2)*e*(n + S(1))) + (-a*f**S(2) + d**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-1))/(S(2)*e*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt((a*f**S(2) + e*x*(S(2)*d + e*x))/f**S(2)))**n/(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)), x), x, -S(2)*f**S(2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(1))*hyper((S(1), n/S(2) + S(1)/2), (n/S(2) + S(3)/2,), (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**S(2)/(-a*f**S(2) + d**S(2)))/(e*(n + S(1))*(-a*f**S(2) + d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))**(S(3)/2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n, x), x, (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(4))/(S(16)*e*f**S(3)*(n + S(4))) - (-a*f**S(2) + d**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(2))/(S(4)*e*f**S(3)*(n + S(2))) - (-a*f**S(2) + d**S(2))**S(4)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-4))/(S(16)*e*f**S(3)*(-n + S(4))) + (-a*f**S(2) + d**S(2))**S(3)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-2))/(S(4)*e*f**S(3)*(-n + S(2))) + S(3)*(-a*f**S(2) + d**S(2))**S(2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(S(8)*e*f**S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n, x), x, (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(2))/(S(4)*e*f*(n + S(2))) - (-a*f**S(2) + d**S(2))**S(2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-2))/(S(4)*e*f*(-n + S(2))) - (-a*f**S(2) + d**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(S(2)*e*f*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)), x), x, f*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(e*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))**(S(3)/2), x), x, S(4)*f**S(3)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(2))*hyper((S(2), n/S(2) + S(1)), (n/S(2) + S(2),), (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**S(2)/(-a*f**S(2) + d**S(2)))/(e*(n + S(2))*(-a*f**S(2) + d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt((a*f**S(2) + e*x*(S(2)*d + e*x))/f**S(2)))**n/sqrt((a*f**S(2) + e*x*(S(2)*d + e*x))/f**S(2)), x), x, f*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(e*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n*sqrt(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2)), x), x, (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(2))*sqrt(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2))/(S(4)*e*f*(n + S(2))*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))) - (-a*f**S(2) + d**S(2))**S(2)*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(-2))*sqrt(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2))/(S(4)*e*f*(-n + S(2))*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))) - (-a*f**S(2) + d**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n*sqrt(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2))/(S(2)*e*f*n*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/sqrt(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2)), x), x, f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(e*n*sqrt(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2))**(S(3)/2), x), x, S(4)*f**S(3)*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**(n + S(2))*hyper((S(2), n/S(2) + S(1)), (n/S(2) + S(2),), (d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**S(2)/(-a*f**S(2) + d**S(2)))/(e*g*(n + S(2))*(-a*f**S(2) + d**S(2))**S(2)*sqrt(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x + f*sqrt((a*f**S(2) + e*x*(S(2)*d + e*x))/f**S(2)))**n/sqrt((a*f**S(2)*g + e*g*x*(S(2)*d + e*x))/f**S(2)), x), x, f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2))*(d + e*x + f*sqrt(a + S(2)*d*e*x/f**S(2) + e**S(2)*x**S(2)/f**S(2)))**n/(e*n*sqrt(a*g + S(2)*d*e*g*x/f**S(2) + e**S(2)*g*x**S(2)/f**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + c*x**S(4))*(d + e*x)), x), x, -e*atanh((a*e**S(2) + c*d**S(2)*x**S(2))/(sqrt(a + c*x**S(4))*sqrt(a*e**S(4) + c*d**S(4))))/(S(2)*sqrt(a*e**S(4) + c*d**S(4))) + atan(x*sqrt(-(a*e**S(4) + c*d**S(4))/(d**S(2)*e**S(2)))/sqrt(a + c*x**S(4)))/(S(2)*d*sqrt(-(a*e**S(4) + c*d**S(4))/(d**S(2)*e**S(2)))) + c**(S(1)/4)*d*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*sqrt(a + c*x**S(4))*(sqrt(a)*e**S(2) + sqrt(c)*d**S(2))) - sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*elliptic_pi((sqrt(a)*e**S(2) + sqrt(c)*d**S(2))**S(2)/(S(4)*sqrt(a)*sqrt(c)*d**S(2)*e**S(2)), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(4)*a**(S(1)/4)*c**(S(1)/4)*d*sqrt(a + c*x**S(4))*(sqrt(a)*e**S(2) + sqrt(c)*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + c*x**S(4))*(d + e*x)**S(2)), x), x, -a**(S(1)/4)*c**(S(1)/4)*e**S(2)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(sqrt(a + c*x**S(4))*(a*e**S(4) + c*d**S(4))) - a**(S(1)/4)*c**(S(1)/4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-e**S(2) + sqrt(c)*d**S(2)/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(sqrt(a + c*x**S(4))*(S(2)*a*e**S(4) + S(2)*c*d**S(4))) + sqrt(c)*e**S(2)*x*sqrt(a + c*x**S(4))/((sqrt(a) + sqrt(c)*x**S(2))*(a*e**S(4) + c*d**S(4))) - c*d**S(3)*e*atanh((a*e**S(2) + c*d**S(2)*x**S(2))/(sqrt(a + c*x**S(4))*sqrt(a*e**S(4) + c*d**S(4))))/(a*e**S(4) + c*d**S(4))**(S(3)/2) - c*atan(x*sqrt(-(a*e**S(4) + c*d**S(4))/(d**S(2)*e**S(2)))/sqrt(a + c*x**S(4)))/(e**S(2)*(-(a*e**S(4) + c*d**S(4))/(d**S(2)*e**S(2)))**(S(3)/2)) - e**S(3)*sqrt(a + c*x**S(4))/((d + e*x)*(a*e**S(4) + c*d**S(4))) + c**(S(5)/4)*d**S(4)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(a**(S(1)/4)*sqrt(a + c*x**S(4))*(sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*(a*e**S(4) + c*d**S(4))) - c**(S(3)/4)*d**S(2)*sqrt((a + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*elliptic_pi((sqrt(a)*e**S(2) + sqrt(c)*d**S(2))**S(2)/(S(4)*sqrt(a)*sqrt(c)*d**S(2)*e**S(2)), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*sqrt(a + c*x**S(4))*(sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*(a*e**S(4) + c*d**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -e*atanh((S(2)*a*e**S(2) + b*d**S(2) + x**S(2)*(b*e**S(2) + S(2)*c*d**S(2)))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))))/(S(2)*sqrt(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))) + atan(x*sqrt(-b - (a*e**S(4) + c*d**S(4))/(d**S(2)*e**S(2)))/sqrt(a + b*x**S(2) + c*x**S(4)))/(S(2)*d*sqrt(-b - (a*e**S(4) + c*d**S(4))/(d**S(2)*e**S(2)))) + c**(S(1)/4)*d*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*(sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))) - sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*elliptic_pi((sqrt(a)*e**S(2) + sqrt(c)*d**S(2))**S(2)/(S(4)*sqrt(a)*sqrt(c)*d**S(2)*e**S(2)), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(4)*a**(S(1)/4)*c**(S(1)/4)*d*(sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d + e*x)**S(2)*sqrt(a + b*x**S(2) + c*x**S(4))), x), x, -a**(S(1)/4)*c**(S(1)/4)*e**S(2)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*elliptic_e(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))) - a**(S(1)/4)*c**(S(1)/4)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-e**S(2) + sqrt(c)*d**S(2)/sqrt(a))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(sqrt(a + b*x**S(2) + c*x**S(4))*(S(2)*a*e**S(4) + S(2)*b*d**S(2)*e**S(2) + S(2)*c*d**S(4))) + sqrt(c)*e**S(2)*x*sqrt(a + b*x**S(2) + c*x**S(4))/((sqrt(a) + sqrt(c)*x**S(2))*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))) - d*e*(b*e**S(2) + S(2)*c*d**S(2))*atanh((S(2)*a*e**S(2) + b*d**S(2) + x**S(2)*(b*e**S(2) + S(2)*c*d**S(2)))/(S(2)*sqrt(a + b*x**S(2) + c*x**S(4))*sqrt(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))))/(S(2)*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))**(S(3)/2)) - e**S(3)*sqrt(a + b*x**S(2) + c*x**S(4))/((d + e*x)*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))) - (b*e**S(2) + S(2)*c*d**S(2))*atan(x*sqrt(-b - (a*e**S(4) + c*d**S(4))/(d**S(2)*e**S(2)))/sqrt(a + b*x**S(2) + c*x**S(4)))/(S(2)*d**S(2)*e**S(2)*(-b - (a*e**S(4) + c*d**S(4))/(d**S(2)*e**S(2)))**(S(3)/2)) + c**(S(1)/4)*d**S(2)*sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(b*e**S(2) + S(2)*c*d**S(2))*elliptic_f(S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(2)*a**(S(1)/4)*(sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))) - sqrt((a + b*x**S(2) + c*x**S(4))/(sqrt(a) + sqrt(c)*x**S(2))**S(2))*(sqrt(a) + sqrt(c)*x**S(2))*(-sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*(b*e**S(2) + S(2)*c*d**S(2))*elliptic_pi((sqrt(a)*e**S(2) + sqrt(c)*d**S(2))**S(2)/(S(4)*sqrt(a)*sqrt(c)*d**S(2)*e**S(2)), S(2)*atan(c**(S(1)/4)*x/a**(S(1)/4)), S(1)/2 - b/(S(4)*sqrt(a)*sqrt(c)))/(S(4)*a**(S(1)/4)*c**(S(1)/4)*(sqrt(a)*e**S(2) + sqrt(c)*d**S(2))*sqrt(a + b*x**S(2) + c*x**S(4))*(a*e**S(4) + b*d**S(2)*e**S(2) + c*d**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) + c*x**S(4))/(a*d - c*d*x**S(4)), x), x, -sqrt(-S(2)*sqrt(a)*sqrt(c) + b)*atanh(x*sqrt(-S(2)*sqrt(a)*sqrt(c) + b)/sqrt(a + b*x**S(2) + c*x**S(4)))/(S(4)*sqrt(a)*sqrt(c)*d) + sqrt(S(2)*sqrt(a)*sqrt(c) + b)*atanh(x*sqrt(S(2)*sqrt(a)*sqrt(c) + b)/sqrt(a + b*x**S(2) + c*x**S(4)))/(S(4)*sqrt(a)*sqrt(c)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2) - c*x**S(4))/(a*d + c*d*x**S(4)), x), x, sqrt(S(2))*sqrt(-b + sqrt(S(4)*a*c + b**S(2)))*atanh(sqrt(S(2))*x*sqrt(-b + sqrt(S(4)*a*c + b**S(2)))*(b - S(2)*c*x**S(2) + sqrt(S(4)*a*c + b**S(2)))/(S(4)*sqrt(a)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))))/(S(4)*sqrt(a)*sqrt(c)*d) - sqrt(S(2))*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*x*sqrt(b + sqrt(S(4)*a*c + b**S(2)))*(b - S(2)*c*x**S(2) - sqrt(S(4)*a*c + b**S(2)))/(S(4)*sqrt(a)*sqrt(c)*sqrt(a + b*x**S(2) - c*x**S(4))))/(S(4)*sqrt(a)*sqrt(c)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x), x), x, b*x**S(2)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(c + d*x**S(2) + e*x)**(S(3)/2)/(S(5)*d*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(c + d*x**S(2) + e*x)**(S(3)/2)*(-S(80)*a*d**S(2) + S(32)*b*c*d + S(42)*b*d*e*x - S(35)*b*e**S(2))/(S(240)*d**S(3)*(a + b*x**S(2))) + e*(S(2)*d*x + e)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)*(-S(16)*a*d**S(2) + S(12)*b*c*d - S(7)*b*e**S(2))/(S(128)*d**S(4)*(a + b*x**S(2))) + e*(S(4)*c*d - e**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(-S(16)*a*d**S(2) + S(12)*b*c*d - S(7)*b*e**S(2))*atanh((S(2)*d*x + e)/(S(2)*sqrt(d)*sqrt(c + d*x**S(2) + e*x)))/(S(256)*d**(S(9)/2)*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x), x), x, -b*(-S(6)*d*x + S(5)*e)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(c + d*x**S(2) + e*x)**(S(3)/2)/(S(24)*d**S(2)*(a + b*x**S(2))) - (S(2)*d*x + e)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)*(-S(16)*a*d**S(2) + S(4)*b*c*d - S(5)*b*e**S(2))/(S(64)*d**S(3)*(a + b*x**S(2))) - (S(4)*c*d - e**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(-S(16)*a*d**S(2) + S(4)*b*c*d - S(5)*b*e**S(2))*atanh((S(2)*d*x + e)/(S(2)*sqrt(d)*sqrt(c + d*x**S(2) + e*x)))/(S(128)*d**(S(7)/2)*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)/x, x), x, -a*sqrt(c)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh((S(2)*c + e*x)/(S(2)*sqrt(c)*sqrt(c + d*x**S(2) + e*x)))/(a + b*x**S(2)) + b*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(c + d*x**S(2) + e*x)**(S(3)/2)/(S(3)*d*(a + b*x**S(2))) + sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)*(S(8)*a*d**S(2) - S(2)*b*d*e*x - b*e**S(2))/(S(8)*d**S(2)*(a + b*x**S(2))) + e*(S(8)*a*d**S(2) - b*(S(4)*c*d - e**S(2)))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh((S(2)*d*x + e)/(S(2)*sqrt(d)*sqrt(c + d*x**S(2) + e*x)))/(S(16)*d**(S(5)/2)*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)/x**S(2), x), x, -a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(c + d*x**S(2) + e*x)**(S(3)/2)/(c*x*(a + b*x**S(2))) - a*e*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh((S(2)*c + e*x)/(S(2)*sqrt(c)*sqrt(c + d*x**S(2) + e*x)))/(S(2)*sqrt(c)*(a + b*x**S(2))) + sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(S(8)*a*d**S(2) + S(4)*b*c*d - b*e**S(2))*atanh((S(2)*d*x + e)/(S(2)*sqrt(d)*sqrt(c + d*x**S(2) + e*x)))/(S(8)*d**(S(3)/2)*(a + b*x**S(2))) + (S(2)*d*x*(S(2)*a*d + b*c) + e*(S(4)*a*d + b*c))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)/(S(4)*c*d*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)/x**S(3), x), x, -a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(c + d*x**S(2) + e*x)**(S(3)/2)/(S(2)*c*x**S(2)*(a + b*x**S(2))) + b*e*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh((S(2)*d*x + e)/(S(2)*sqrt(d)*sqrt(c + d*x**S(2) + e*x)))/(S(2)*sqrt(d)*(a + b*x**S(2))) + (a*e + x*(S(2)*a*d + S(4)*b*c))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)/(S(4)*c*x*(a + b*x**S(2))) - sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(S(4)*a*c*d - a*e**S(2) + S(8)*b*c**S(2))*atanh((S(2)*c + e*x)/(S(2)*sqrt(c)*sqrt(c + d*x**S(2) + e*x)))/(S(8)*c**(S(3)/2)*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)/x**S(4), x), x, -a*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*(c + d*x**S(2) + e*x)**(S(3)/2)/(S(3)*c*x**S(3)*(a + b*x**S(2))) + b*sqrt(d)*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh((S(2)*d*x + e)/(S(2)*sqrt(d)*sqrt(c + d*x**S(2) + e*x)))/(a + b*x**S(2)) + (S(2)*a*c*e - x*(-a*e**S(2) + S(8)*b*c**S(2)))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*sqrt(c + d*x**S(2) + e*x)/(S(8)*c**S(2)*x**S(2)*(a + b*x**S(2))) - e*(-a*(S(4)*c*d - e**S(2)) + S(8)*b*c**S(2))*sqrt(a**S(2) + S(2)*a*b*x**S(2) + b**S(2)*x**S(4))*atanh((S(2)*c + e*x)/(S(2)*sqrt(c)*sqrt(c + d*x**S(2) + e*x)))/(S(16)*c**(S(5)/2)*(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(3))*sqrt(x**S(3) + S(1))), x), x, sqrt(S(26))*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*(x + S(1))*atan(sqrt(S(2))*S(3)**(S(3)/4)*sqrt(S(1) - (x - sqrt(S(3)) + S(1))**S(2)/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(-S(13)*sqrt(S(3)) + S(26))/(S(6)*sqrt(-S(4)*sqrt(S(3)) + S(7) + (x - sqrt(S(3)) + S(1))**S(2)/(x + S(1) + sqrt(S(3)))**S(2))))/(S(26)*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))) + S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(S(15)*sqrt(S(3)) + S(26))*(x + S(1))*elliptic_f(asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(3)*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))) - S(4)*S(3)**(S(1)/4)*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*(x + S(1))*elliptic_pi(-S(56)*sqrt(S(3)) + S(97), asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(-sqrt(S(3)) + S(2))*sqrt(x**S(3) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(3))*sqrt(-x**S(3) + S(1))), x), x, -sqrt(S(7))*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*(-x + S(1))*atanh(S(3)**(S(3)/4)*sqrt(S(1) - (-x - sqrt(S(3)) + S(1))**S(2)/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-S(7)*sqrt(S(3)) + S(14))/(S(6)*sqrt(-S(4)*sqrt(S(3)) + S(7) + (-x - sqrt(S(3)) + S(1))**S(2)/(-x + S(1) + sqrt(S(3)))**S(2))))/(S(14)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-x**S(3) + S(1))) - S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(sqrt(S(3)) + S(2))*(-x + S(1))*elliptic_f(asin((-x - sqrt(S(3)) + S(1))/(-x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(3)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*(sqrt(S(3)) + S(4))*sqrt(-x**S(3) + S(1))) - S(4)*S(3)**(S(1)/4)*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(sqrt(S(3)) + S(2))*(-x + S(1))*elliptic_pi(S(304)*sqrt(S(3))/S(169) + S(553)/169, asin((-x - sqrt(S(3)) + S(1))/(-x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(13)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-x**S(3) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(3))*sqrt(x**S(3) + S(-1))), x), x, -sqrt(S(7))*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*(-x + S(1))*atan(S(3)**(S(3)/4)*sqrt(S(7)*sqrt(S(3)) + S(14))*sqrt(-(-x + S(1) + sqrt(S(3)))**S(2)/(-x - sqrt(S(3)) + S(1))**S(2) + S(1))/(S(6)*sqrt((-x + S(1) + sqrt(S(3)))**S(2)/(-x - sqrt(S(3)) + S(1))**S(2) + S(4)*sqrt(S(3)) + S(7))))/(S(14)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))) - S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(-S(3)*sqrt(S(3)) + S(14))*(-x + S(1))*elliptic_f(asin((-x + S(1) + sqrt(S(3)))/(-x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(39)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))) + S(4)*S(3)**(S(1)/4)*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(-sqrt(S(3)) + S(2))*(-x + S(1))*elliptic_pi(-S(304)*sqrt(S(3))/S(169) + S(553)/169, asin((-x + S(1) + sqrt(S(3)))/(-x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(13)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(3))*sqrt(-x**S(3) + S(-1))), x), x, sqrt(S(26))*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*(x + S(1))*atanh(sqrt(S(2))*S(3)**(S(3)/4)*sqrt(S(13)*sqrt(S(3)) + S(26))*sqrt(-(x + S(1) + sqrt(S(3)))**S(2)/(x - sqrt(S(3)) + S(1))**S(2) + S(1))/(S(6)*sqrt((x + S(1) + sqrt(S(3)))**S(2)/(x - sqrt(S(3)) + S(1))**S(2) + S(4)*sqrt(S(3)) + S(7))))/(S(26)*sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-x**S(3) + S(-1))) + S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-S(15)*sqrt(S(3)) + S(26))*(x + S(1))*elliptic_f(asin((x + S(1) + sqrt(S(3)))/(x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(3)*sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-x**S(3) + S(-1))) + S(4)*S(3)**(S(1)/4)*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*(x + S(1))*elliptic_pi(S(56)*sqrt(S(3)) + S(97), asin((x + S(1) + sqrt(S(3)))/(x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(sqrt(S(3)) + S(2))*sqrt(-x**S(3) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((x + S(3))*sqrt(x**S(3) + S(1))), x), x, -S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(S(112)*sqrt(S(3)) + S(194))*(x + S(1))*elliptic_f(asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(3)*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))) + S(12)*S(3)**(S(1)/4)*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*(x + S(1))*elliptic_pi(-S(56)*sqrt(S(3)) + S(97), asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(-sqrt(S(3)) + S(2))*sqrt(x**S(3) + S(1))) - sqrt(S(26))*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*(S(3)*x + S(3))*atan(sqrt(S(2))*S(3)**(S(3)/4)*sqrt(S(1) - (x - sqrt(S(3)) + S(1))**S(2)/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(-S(13)*sqrt(S(3)) + S(26))/(S(6)*sqrt(-S(4)*sqrt(S(3)) + S(7) + (x - sqrt(S(3)) + S(1))**S(2)/(x + S(1) + sqrt(S(3)))**S(2))))/(S(26)*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((x + S(3))*sqrt(-x**S(3) + S(1))), x), x, sqrt(S(7))*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*(-S(3)*x + S(3))*atanh(S(3)**(S(3)/4)*sqrt(S(1) - (-x - sqrt(S(3)) + S(1))**S(2)/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-S(7)*sqrt(S(3)) + S(14))/(S(6)*sqrt(-S(4)*sqrt(S(3)) + S(7) + (-x - sqrt(S(3)) + S(1))**S(2)/(-x + S(1) + sqrt(S(3)))**S(2))))/(S(14)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-x**S(3) + S(1))) - S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(S(40)*sqrt(S(3)) + S(74))*(-x + S(1))*elliptic_f(asin((-x - sqrt(S(3)) + S(1))/(-x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(39)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-x**S(3) + S(1))) + S(12)*S(3)**(S(1)/4)*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(sqrt(S(3)) + S(2))*(-x + S(1))*elliptic_pi(S(304)*sqrt(S(3))/S(169) + S(553)/169, asin((-x - sqrt(S(3)) + S(1))/(-x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(13)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-x**S(3) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((x + S(3))*sqrt(x**S(3) + S(-1))), x), x, sqrt(S(7))*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*(-S(3)*x + S(3))*atan(S(3)**(S(3)/4)*sqrt(S(7)*sqrt(S(3)) + S(14))*sqrt(-(-x + S(1) + sqrt(S(3)))**S(2)/(-x - sqrt(S(3)) + S(1))**S(2) + S(1))/(S(6)*sqrt((-x + S(1) + sqrt(S(3)))**S(2)/(-x - sqrt(S(3)) + S(1))**S(2) + S(4)*sqrt(S(3)) + S(7))))/(S(14)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))) + S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(-S(40)*sqrt(S(3)) + S(74))*(-x + S(1))*elliptic_f(asin((-x + S(1) + sqrt(S(3)))/(-x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(39)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))) - S(12)*S(3)**(S(1)/4)*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(-sqrt(S(3)) + S(2))*(-x + S(1))*elliptic_pi(-S(304)*sqrt(S(3))/S(169) + S(553)/169, asin((-x + S(1) + sqrt(S(3)))/(-x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(13)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((x + S(3))*sqrt(-x**S(3) + S(-1))), x), x, S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-S(112)*sqrt(S(3)) + S(194))*(x + S(1))*elliptic_f(asin((x + S(1) + sqrt(S(3)))/(x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(3)*sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-x**S(3) + S(-1))) - S(12)*S(3)**(S(1)/4)*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*(x + S(1))*elliptic_pi(S(56)*sqrt(S(3)) + S(97), asin((x + S(1) + sqrt(S(3)))/(x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(sqrt(S(3)) + S(2))*sqrt(-x**S(3) + S(-1))) - sqrt(S(26))*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*(S(3)*x + S(3))*atanh(sqrt(S(2))*S(3)**(S(3)/4)*sqrt(S(13)*sqrt(S(3)) + S(26))*sqrt(-(x + S(1) + sqrt(S(3)))**S(2)/(x - sqrt(S(3)) + S(1))**S(2) + S(1))/(S(6)*sqrt((x + S(1) + sqrt(S(3)))**S(2)/(x - sqrt(S(3)) + S(1))**S(2) + S(4)*sqrt(S(3)) + S(7))))/(S(26)*sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-x**S(3) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(3)*x + S(2))/((x + S(3))*sqrt(x**S(3) + S(1))), x), x, S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(S(1560)*sqrt(S(3)) + S(2702))*(x + S(1))*elliptic_f(asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(3)*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))) - S(44)*S(3)**(S(1)/4)*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*(x + S(1))*elliptic_pi(-S(56)*sqrt(S(3)) + S(97), asin((x - sqrt(S(3)) + S(1))/(x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(-sqrt(S(3)) + S(2))*sqrt(x**S(3) + S(1))) + sqrt(S(26))*sqrt((x**S(2) - x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*(S(11)*x + S(11))*atan(sqrt(S(2))*S(3)**(S(3)/4)*sqrt(S(1) - (x - sqrt(S(3)) + S(1))**S(2)/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(-S(13)*sqrt(S(3)) + S(26))/(S(6)*sqrt(-S(4)*sqrt(S(3)) + S(7) + (x - sqrt(S(3)) + S(1))**S(2)/(x + S(1) + sqrt(S(3)))**S(2))))/(S(26)*sqrt((x + S(1))/(x + S(1) + sqrt(S(3)))**S(2))*sqrt(x**S(3) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(3)*x + S(2))/((x + S(3))*sqrt(-x**S(3) + S(1))), x), x, -sqrt(S(7))*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*(-S(11)*x + S(11))*atanh(S(3)**(S(3)/4)*sqrt(S(1) - (-x - sqrt(S(3)) + S(1))**S(2)/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-S(7)*sqrt(S(3)) + S(14))/(S(6)*sqrt(-S(4)*sqrt(S(3)) + S(7) + (-x - sqrt(S(3)) + S(1))**S(2)/(-x + S(1) + sqrt(S(3)))**S(2))))/(S(14)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-x**S(3) + S(1))) + S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(S(168)*sqrt(S(3)) + S(446))*(-x + S(1))*elliptic_f(asin((-x - sqrt(S(3)) + S(1))/(-x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(39)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-x**S(3) + S(1))) - S(44)*S(3)**(S(1)/4)*sqrt((x**S(2) + x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(sqrt(S(3)) + S(2))*(-x + S(1))*elliptic_pi(S(304)*sqrt(S(3))/S(169) + S(553)/169, asin((-x - sqrt(S(3)) + S(1))/(-x + S(1) + sqrt(S(3)))), S(-7) - S(4)*sqrt(S(3)))/(S(13)*sqrt((-x + S(1))/(-x + S(1) + sqrt(S(3)))**S(2))*sqrt(-x**S(3) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(3)*x + S(2))/((x + S(3))*sqrt(x**S(3) + S(-1))), x), x, -sqrt(S(7))*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*(-S(11)*x + S(11))*atan(S(3)**(S(3)/4)*sqrt(S(7)*sqrt(S(3)) + S(14))*sqrt(-(-x + S(1) + sqrt(S(3)))**S(2)/(-x - sqrt(S(3)) + S(1))**S(2) + S(1))/(S(6)*sqrt((-x + S(1) + sqrt(S(3)))**S(2)/(-x - sqrt(S(3)) + S(1))**S(2) + S(4)*sqrt(S(3)) + S(7))))/(S(14)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))) - S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(-S(168)*sqrt(S(3)) + S(446))*(-x + S(1))*elliptic_f(asin((-x + S(1) + sqrt(S(3)))/(-x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(39)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))) + S(44)*S(3)**(S(1)/4)*sqrt((x**S(2) + x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(-sqrt(S(3)) + S(2))*(-x + S(1))*elliptic_pi(-S(304)*sqrt(S(3))/S(169) + S(553)/169, asin((-x + S(1) + sqrt(S(3)))/(-x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(13)*sqrt(-(-x + S(1))/(-x - sqrt(S(3)) + S(1))**S(2))*sqrt(x**S(3) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(3)*x + S(2))/((x + S(3))*sqrt(-x**S(3) + S(-1))), x), x, -S(2)*S(3)**(S(3)/4)*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-S(1560)*sqrt(S(3)) + S(2702))*(x + S(1))*elliptic_f(asin((x + S(1) + sqrt(S(3)))/(x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(S(3)*sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-x**S(3) + S(-1))) + S(44)*S(3)**(S(1)/4)*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*(x + S(1))*elliptic_pi(S(56)*sqrt(S(3)) + S(97), asin((x + S(1) + sqrt(S(3)))/(x - sqrt(S(3)) + S(1))), S(-7) + S(4)*sqrt(S(3)))/(sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(sqrt(S(3)) + S(2))*sqrt(-x**S(3) + S(-1))) + sqrt(S(26))*sqrt((x**S(2) - x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*(S(11)*x + S(11))*atanh(sqrt(S(2))*S(3)**(S(3)/4)*sqrt(S(13)*sqrt(S(3)) + S(26))*sqrt(-(x + S(1) + sqrt(S(3)))**S(2)/(x - sqrt(S(3)) + S(1))**S(2) + S(1))/(S(6)*sqrt((x + S(1) + sqrt(S(3)))**S(2)/(x - sqrt(S(3)) + S(1))**S(2) + S(4)*sqrt(S(3)) + S(7))))/(S(26)*sqrt(-(x + S(1))/(x - sqrt(S(3)) + S(1))**S(2))*sqrt(-x**S(3) + S(-1))), expand=True, _diff=True, _numerical=True) # sympy and mathematica assert rubi_test(rubi_integrate((d**S(3) + e**S(3)*x**S(3))**p/(d + e*x), x), x, (S(1) + (S(2)*d + S(2)*e*x)/(d*(S(-3) + sqrt(S(3))*I)))**(-p)*(S(1) - (S(2)*d + S(2)*e*x)/(d*(S(3) + sqrt(S(3))*I)))**(-p)*(d**S(3) + e**S(3)*x**S(3))**p*AppellF1(p, -p, -p, p + S(1), -(S(2)*d + S(2)*e*x)/(d*(S(-3) + sqrt(S(3))*I)), (S(2)*d + S(2)*e*x)/(d*(S(3) + sqrt(S(3))*I)))/(e*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x)*sqrt(c + d*x**S(2))*sqrt(e + f*x**S(2))), x), x, a*sqrt(e)*sqrt(f)*sqrt(c + d*x**S(2))*elliptic_f(atan(sqrt(f)*x/sqrt(e)), S(1) - d*e/(c*f))/(c*sqrt(e*(c + d*x**S(2))/(c*(e + f*x**S(2))))*sqrt(e + f*x**S(2))*(a**S(2)*f + b**S(2)*e)) - b*atanh(sqrt(c + d*x**S(2))*sqrt(a**S(2)*f + b**S(2)*e)/(sqrt(e + f*x**S(2))*sqrt(a**S(2)*d + b**S(2)*c)))/(sqrt(a**S(2)*d + b**S(2)*c)*sqrt(a**S(2)*f + b**S(2)*e)) + b**S(2)*e**(S(3)/2)*sqrt(c + d*x**S(2))*elliptic_pi(S(1) + b**S(2)*e/(a**S(2)*f), atan(sqrt(f)*x/sqrt(e)), S(1) - d*e/(c*f))/(a*c*sqrt(f)*sqrt(e*(c + d*x**S(2))/(c*(e + f*x**S(2))))*sqrt(e + f*x**S(2))*(a**S(2)*f + b**S(2)*e)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e - S(2)*f*x**S(2))/(S(4)*d*f*x**S(2) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, -log(e - S(2)*sqrt(f)*x*sqrt(-d) + S(2)*f*x**S(2))/(S(4)*sqrt(f)*sqrt(-d)) + log(e + S(2)*sqrt(f)*x*sqrt(-d) + S(2)*f*x**S(2))/(S(4)*sqrt(f)*sqrt(-d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e - S(2)*f*x**S(2))/(-S(4)*d*f*x**S(2) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, -log(-S(2)*sqrt(d)*sqrt(f)*x + e + S(2)*f*x**S(2))/(S(4)*sqrt(d)*sqrt(f)) + log(S(2)*sqrt(d)*sqrt(f)*x + e + S(2)*f*x**S(2))/(S(4)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e - S(4)*f*x**S(3))/(S(4)*d*f*x**S(2) + e**S(2) + S(4)*e*f*x**S(3) + S(4)*f**S(2)*x**S(6)), x), x, atan(S(2)*sqrt(d)*sqrt(f)*x/(e + S(2)*f*x**S(3)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e - S(4)*f*x**S(3))/(-S(4)*d*f*x**S(2) + e**S(2) + S(4)*e*f*x**S(3) + S(4)*f**S(2)*x**S(6)), x), x, atanh(S(2)*sqrt(d)*sqrt(f)*x/(e + S(2)*f*x**S(3)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e - S(2)*f*x**n*(n + S(-1)))/(S(4)*d*f*x**S(2) + e**S(2) + S(4)*e*f*x**n + S(4)*f**S(2)*x**(S(2)*n)), x), x, atan(S(2)*sqrt(d)*sqrt(f)*x/(e + S(2)*f*x**n))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e - S(2)*f*x**n*(n + S(-1)))/(-S(4)*d*f*x**S(2) + e**S(2) + S(4)*e*f*x**n + S(4)*f**S(2)*x**(S(2)*n)), x), x, atanh(S(2)*sqrt(d)*sqrt(f)*x/(e + S(2)*f*x**n))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(S(4)*d*f*x**S(4) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, atan(sqrt(f)*(e + x**S(2)*(S(2)*d + S(2)*f))/(sqrt(d)*e))/(S(4)*sqrt(d)*e*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(-S(4)*d*f*x**S(4) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, -atanh(sqrt(f)*(e - x**S(2)*(S(2)*d - S(2)*f))/(sqrt(d)*e))/(S(4)*sqrt(d)*e*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(S(3)*e + S(2)*f*x**S(2))/(S(4)*d*f*x**S(6) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, atan(S(2)*sqrt(d)*sqrt(f)*x**S(3)/(e + S(2)*f*x**S(2)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(S(3)*e + S(2)*f*x**S(2))/(-S(4)*d*f*x**S(6) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, atanh(S(2)*sqrt(d)*sqrt(f)*x**S(3)/(e + S(2)*f*x**S(2)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(e*(m + S(1)) + S(2)*f*x**S(2)*(m + S(-1)))/(S(4)*d*f*x**(S(2)*m + S(2)) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, atan(S(2)*sqrt(d)*sqrt(f)*x**(m + S(1))/(e + S(2)*f*x**S(2)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**m*(e*(m + S(1)) + S(2)*f*x**S(2)*(m + S(-1)))/(S(4)*d*f*x**(S(2)*m + S(2)) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, atan(S(2)*sqrt(d)*sqrt(f)*x**(m + S(1))*(-m**S(2) + S(1))/((e + S(2)*f*x**S(2))*(-m + S(1))*(m + S(1))))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(e*(m + S(1)) + S(2)*f*x**S(2)*(m + S(-1)))/(-S(4)*d*f*x**(S(2)*m + S(2)) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, atanh(S(2)*sqrt(d)*sqrt(f)*x**(m + S(1))/(e + S(2)*f*x**S(2)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**m*(e*(m + S(1)) + S(2)*f*x**S(2)*(m + S(-1)))/(-S(4)*d*f*x**(S(2)*m + S(2)) + e**S(2) + S(4)*e*f*x**S(2) + S(4)*f**S(2)*x**S(4)), x), x, atanh(S(2)*sqrt(d)*sqrt(f)*x**(m + S(1))*(-m**S(2) + S(1))/((e + S(2)*f*x**S(2))*(-m + S(1))*(m + S(1))))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(2)*e - S(2)*f*x**S(3))/(S(4)*d*f*x**S(4) + e**S(2) + S(4)*e*f*x**S(3) + S(4)*f**S(2)*x**S(6)), x), x, atan(S(2)*sqrt(d)*sqrt(f)*x**S(2)/(e + S(2)*f*x**S(3)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(2)*e - S(2)*f*x**S(3))/(-S(4)*d*f*x**S(4) + e**S(2) + S(4)*e*f*x**S(3) + S(4)*f**S(2)*x**S(6)), x), x, atanh(S(2)*sqrt(d)*sqrt(f)*x**S(2)/(e + S(2)*f*x**S(3)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(S(4)*d*f*x**S(6) + e**S(2) + S(4)*e*f*x**S(3) + S(4)*f**S(2)*x**S(6)), x), x, atan(sqrt(f)*(e + x**S(3)*(S(2)*d + S(2)*f))/(sqrt(d)*e))/(S(6)*sqrt(d)*e*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(-S(4)*d*f*x**S(6) + e**S(2) + S(4)*e*f*x**S(3) + S(4)*f**S(2)*x**S(6)), x), x, -atanh(sqrt(f)*(e - x**S(3)*(S(2)*d - S(2)*f))/(sqrt(d)*e))/(S(6)*sqrt(d)*e*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(e*(m + S(1)) + S(2)*f*x**S(3)*(m + S(-2)))/(S(4)*d*f*x**(S(2)*m + S(2)) + e**S(2) + S(4)*e*f*x**S(3) + S(4)*f**S(2)*x**S(6)), x), x, atan(S(2)*sqrt(d)*sqrt(f)*x**(m + S(1))/(e + S(2)*f*x**S(3)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(e*(m + S(1)) + S(2)*f*x**S(3)*(m + S(-2)))/(-S(4)*d*f*x**(S(2)*m + S(2)) + e**S(2) + S(4)*e*f*x**S(3) + S(4)*f**S(2)*x**S(6)), x), x, atanh(S(2)*sqrt(d)*sqrt(f)*x**(m + S(1))/(e + S(2)*f*x**S(3)))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(e*(m + S(1)) + S(2)*f*x**n*(m - n + S(1)))/(S(4)*d*f*x**(S(2)*m + S(2)) + e**S(2) + S(4)*e*f*x**n + S(4)*f**S(2)*x**(S(2)*n)), x), x, atan(S(2)*sqrt(d)*sqrt(f)*x**(m + S(1))/(e + S(2)*f*x**n))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*(e*(m + S(1)) + S(2)*f*x**n*(m - n + S(1)))/(-S(4)*d*f*x**(S(2)*m + S(2)) + e**S(2) + S(4)*e*f*x**n + S(4)*f**S(2)*x**(S(2)*n)), x), x, atanh(S(2)*sqrt(d)*sqrt(f)*x**(m + S(1))/(e + S(2)*f*x**n))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a*c + b*c*x**S(2) + d*sqrt(a + b*x**S(2))), x), x, -x**S(2)*(S(2)*a*c**S(2) - d**S(2))/(S(2)*b**S(2)*c**S(3)) + (a + b*x**S(2))**S(2)/(S(4)*b**S(3)*c) - d*(a + b*x**S(2))**(S(3)/2)/(S(3)*b**S(3)*c**S(2)) + d*sqrt(a + b*x**S(2))*(S(2)*a*c**S(2) - d**S(2))/(b**S(3)*c**S(4)) + (a*c**S(2) - d**S(2))**S(2)*log(c*sqrt(a + b*x**S(2)) + d)/(b**S(3)*c**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*c + b*c*x**S(2) + d*sqrt(a + b*x**S(2))), x), x, x**S(2)/(S(2)*b*c) - d*sqrt(a + b*x**S(2))/(b**S(2)*c**S(2)) - (a*c**S(2) - d**S(2))*log(c*sqrt(a + b*x**S(2)) + d)/(b**S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*c + b*c*x**S(2) + d*sqrt(a + b*x**S(2))), x), x, log(c*sqrt(a + b*x**S(2)) + d)/(b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a*c + b*c*x**S(2) + d*sqrt(a + b*x**S(2)))), x), x, c*log(x)/(a*c**S(2) - d**S(2)) - c*log(c*sqrt(a + b*x**S(2)) + d)/(a*c**S(2) - d**S(2)) + d*atanh(sqrt(a + b*x**S(2))/sqrt(a))/(sqrt(a)*(a*c**S(2) - d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a*c + b*c*x**S(2) + d*sqrt(a + b*x**S(2)))), x), x, -b*c**S(3)*log(x)/(a*c**S(2) - d**S(2))**S(2) + b*c**S(3)*log(c*sqrt(a + b*x**S(2)) + d)/(a*c**S(2) - d**S(2))**S(2) - (a*c - d*sqrt(a + b*x**S(2)))/(S(2)*a*x**S(2)*(a*c**S(2) - d**S(2))) - b*d*(S(3)*a*c**S(2) - d**S(2))*atanh(sqrt(a + b*x**S(2))/sqrt(a))/(S(2)*a**(S(3)/2)*(a*c**S(2) - d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*c + b*c*x**S(2) + d*sqrt(a + b*x**S(2))), x), x, x/(b*c) - d*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(b**(S(3)/2)*c**S(2)) - sqrt(a*c**S(2) - d**S(2))*atan(sqrt(b)*c*x/sqrt(a*c**S(2) - d**S(2)))/(b**(S(3)/2)*c**S(2)) + sqrt(a*c**S(2) - d**S(2))*atan(sqrt(b)*d*x/(sqrt(a + b*x**S(2))*sqrt(a*c**S(2) - d**S(2))))/(b**(S(3)/2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*c + b*c*x**S(2) + d*sqrt(a + b*x**S(2))), x), x, atan(sqrt(b)*c*x/sqrt(a*c**S(2) - d**S(2)))/(sqrt(b)*sqrt(a*c**S(2) - d**S(2))) - atan(sqrt(b)*d*x/(sqrt(a + b*x**S(2))*sqrt(a*c**S(2) - d**S(2))))/(sqrt(b)*sqrt(a*c**S(2) - d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a*c + b*c*x**S(2) + d*sqrt(a + b*x**S(2)))), x), x, -sqrt(b)*c**S(2)*atan(sqrt(b)*c*x/sqrt(a*c**S(2) - d**S(2)))/(a*c**S(2) - d**S(2))**(S(3)/2) + sqrt(b)*c**S(2)*atan(sqrt(b)*d*x/(sqrt(a + b*x**S(2))*sqrt(a*c**S(2) - d**S(2))))/(a*c**S(2) - d**S(2))**(S(3)/2) - c/(x*(a*c**S(2) - d**S(2))) + d*sqrt(a + b*x**S(2))/(a*x*(a*c**S(2) - d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)/(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3))), x), x, -x**S(3)*(S(2)*a*c**S(2) - d**S(2))/(S(3)*b**S(2)*c**S(3)) + (a + b*x**S(3))**S(2)/(S(6)*b**S(3)*c) - S(2)*d*(a + b*x**S(3))**(S(3)/2)/(S(9)*b**S(3)*c**S(2)) + S(2)*d*sqrt(a + b*x**S(3))*(S(2)*a*c**S(2) - d**S(2))/(S(3)*b**S(3)*c**S(4)) + S(2)*(a*c**S(2) - d**S(2))**S(2)*log(c*sqrt(a + b*x**S(3)) + d)/(S(3)*b**S(3)*c**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3))), x), x, x**S(3)/(S(3)*b*c) - S(2)*d*sqrt(a + b*x**S(3))/(S(3)*b**S(2)*c**S(2)) - (S(2)*a*c**S(2) - S(2)*d**S(2))*log(c*sqrt(a + b*x**S(3)) + d)/(S(3)*b**S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3))), x), x, S(2)*log(c*sqrt(a + b*x**S(3)) + d)/(S(3)*b*c), expand=True, _diff=True, _numerical=True) # taking a long time assert rubi_test(rubi_integrate(S(1)/(x*(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3)))), x), x, -S(2)*c*log(c*sqrt(a + b*x**S(3)) + d)/(S(3)*a*c**S(2) - S(3)*d**S(2)) + c*log(x)/(a*c**S(2) - d**S(2)) + S(2)*d*atanh(sqrt(a + b*x**S(3))/sqrt(a))/(S(3)*sqrt(a)*(a*c**S(2) - d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3)))), x), x, -b*c**S(3)*log(x)/(a*c**S(2) - d**S(2))**S(2) + S(2)*b*c**S(3)*log(c*sqrt(a + b*x**S(3)) + d)/(S(3)*(a*c**S(2) - d**S(2))**S(2)) - (a*c - d*sqrt(a + b*x**S(3)))/(S(3)*a*x**S(3)*(a*c**S(2) - d**S(2))) - b*d*(S(3)*a*c**S(2) - d**S(2))*atanh(sqrt(a + b*x**S(3))/sqrt(a))/(S(3)*a**(S(3)/2)*(a*c**S(2) - d**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3))), x), x, -d*x**S(4)*sqrt(S(1) + b*x**S(3)/a)*AppellF1(S(4)/3, S(1)/2, S(1), S(7)/3, -b*x**S(3)/a, -b*c**S(2)*x**S(3)/(a*c**S(2) - d**S(2)))/(sqrt(a + b*x**S(3))*(S(4)*a*c**S(2) - S(4)*d**S(2))) + x/(b*c) - (a*c**S(2) - d**S(2))**(S(1)/3)*log(b**(S(1)/3)*c**(S(2)/3)*x + (a*c**S(2) - d**S(2))**(S(1)/3))/(S(3)*b**(S(4)/3)*c**(S(5)/3)) + (a*c**S(2) - d**S(2))**(S(1)/3)*log(b**(S(2)/3)*c**(S(4)/3)*x**S(2) - b**(S(1)/3)*c**(S(2)/3)*x*(a*c**S(2) - d**S(2))**(S(1)/3) + (a*c**S(2) - d**S(2))**(S(2)/3))/(S(6)*b**(S(4)/3)*c**(S(5)/3)) + sqrt(S(3))*(a*c**S(2) - d**S(2))**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*b**(S(1)/3)*c**(S(2)/3)*x/(a*c**S(2) - d**S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*b**(S(4)/3)*c**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3))), x), x, -d*x**S(2)*sqrt(S(1) + b*x**S(3)/a)*AppellF1(S(2)/3, S(1)/2, S(1), S(5)/3, -b*x**S(3)/a, -b*c**S(2)*x**S(3)/(a*c**S(2) - d**S(2)))/(sqrt(a + b*x**S(3))*(S(2)*a*c**S(2) - S(2)*d**S(2))) - log(b**(S(1)/3)*c**(S(2)/3)*x + (a*c**S(2) - d**S(2))**(S(1)/3))/(S(3)*b**(S(2)/3)*c**(S(1)/3)*(a*c**S(2) - d**S(2))**(S(1)/3)) + log(b**(S(2)/3)*c**(S(4)/3)*x**S(2) - b**(S(1)/3)*c**(S(2)/3)*x*(a*c**S(2) - d**S(2))**(S(1)/3) + (a*c**S(2) - d**S(2))**(S(2)/3))/(S(6)*b**(S(2)/3)*c**(S(1)/3)*(a*c**S(2) - d**S(2))**(S(1)/3)) - sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*b**(S(1)/3)*c**(S(2)/3)*x/(a*c**S(2) - d**S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*b**(S(2)/3)*c**(S(1)/3)*(a*c**S(2) - d**S(2))**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3))), x), x, -d*x*sqrt(S(1) + b*x**S(3)/a)*AppellF1(S(1)/3, S(1)/2, S(1), S(4)/3, -b*x**S(3)/a, -b*c**S(2)*x**S(3)/(a*c**S(2) - d**S(2)))/(sqrt(a + b*x**S(3))*(a*c**S(2) - d**S(2))) + c**(S(1)/3)*log(b**(S(1)/3)*c**(S(2)/3)*x + (a*c**S(2) - d**S(2))**(S(1)/3))/(S(3)*b**(S(1)/3)*(a*c**S(2) - d**S(2))**(S(2)/3)) - c**(S(1)/3)*log(b**(S(2)/3)*c**(S(4)/3)*x**S(2) - b**(S(1)/3)*c**(S(2)/3)*x*(a*c**S(2) - d**S(2))**(S(1)/3) + (a*c**S(2) - d**S(2))**(S(2)/3))/(S(6)*b**(S(1)/3)*(a*c**S(2) - d**S(2))**(S(2)/3)) - sqrt(S(3))*c**(S(1)/3)*atan(sqrt(S(3))*(-S(2)*b**(S(1)/3)*c**(S(2)/3)*x/(a*c**S(2) - d**S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*b**(S(1)/3)*(a*c**S(2) - d**S(2))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3)))), x), x, b**(S(1)/3)*c**(S(5)/3)*log(b**(S(1)/3)*c**(S(2)/3)*x + (a*c**S(2) - d**S(2))**(S(1)/3))/(S(3)*(a*c**S(2) - d**S(2))**(S(4)/3)) - b**(S(1)/3)*c**(S(5)/3)*log(b**(S(2)/3)*c**(S(4)/3)*x**S(2) - b**(S(1)/3)*c**(S(2)/3)*x*(a*c**S(2) - d**S(2))**(S(1)/3) + (a*c**S(2) - d**S(2))**(S(2)/3))/(S(6)*(a*c**S(2) - d**S(2))**(S(4)/3)) + sqrt(S(3))*b**(S(1)/3)*c**(S(5)/3)*atan(sqrt(S(3))*(-S(2)*b**(S(1)/3)*c**(S(2)/3)*x/(a*c**S(2) - d**S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(a*c**S(2) - d**S(2))**(S(4)/3)) - c/(x*(a*c**S(2) - d**S(2))) + d*sqrt(S(1) + b*x**S(3)/a)*AppellF1(S(-1)/3, S(1)/2, S(1), S(2)/3, -b*x**S(3)/a, -b*c**S(2)*x**S(3)/(a*c**S(2) - d**S(2)))/(x*sqrt(a + b*x**S(3))*(a*c**S(2) - d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a*c + b*c*x**S(3) + d*sqrt(a + b*x**S(3)))), x), x, -b**(S(2)/3)*c**(S(7)/3)*log(b**(S(1)/3)*c**(S(2)/3)*x + (a*c**S(2) - d**S(2))**(S(1)/3))/(S(3)*(a*c**S(2) - d**S(2))**(S(5)/3)) + b**(S(2)/3)*c**(S(7)/3)*log(b**(S(2)/3)*c**(S(4)/3)*x**S(2) - b**(S(1)/3)*c**(S(2)/3)*x*(a*c**S(2) - d**S(2))**(S(1)/3) + (a*c**S(2) - d**S(2))**(S(2)/3))/(S(6)*(a*c**S(2) - d**S(2))**(S(5)/3)) + sqrt(S(3))*b**(S(2)/3)*c**(S(7)/3)*atan(sqrt(S(3))*(-S(2)*b**(S(1)/3)*c**(S(2)/3)*x/(a*c**S(2) - d**S(2))**(S(1)/3) + S(1))/S(3))/(S(3)*(a*c**S(2) - d**S(2))**(S(5)/3)) - c/(x**S(2)*(S(2)*a*c**S(2) - S(2)*d**S(2))) + d*sqrt(S(1) + b*x**S(3)/a)*AppellF1(S(-2)/3, S(1)/2, S(1), S(1)/3, -b*x**S(3)/a, -b*c**S(2)*x**S(3)/(a*c**S(2) - d**S(2)))/(x**S(2)*sqrt(a + b*x**S(3))*(S(2)*a*c**S(2) - S(2)*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a*c + b*c*x**n + d*sqrt(a + b*x**n)), x), x, c*x*hyper((S(1), S(1)/n), (S(1) + S(1)/n,), -b*c**S(2)*x**n/(a*c**S(2) - d**S(2)))/(a*c**S(2) - d**S(2)) - d*x*sqrt(S(1) + b*x**n/a)*AppellF1(S(1)/n, S(1)/2, S(1), S(1) + S(1)/n, -b*x**n/a, -b*c**S(2)*x**n/(a*c**S(2) - d**S(2)))/(sqrt(a + b*x**n)*(a*c**S(2) - d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/(a*c + b*c*x**n + d*sqrt(a + b*x**n)), x), x, c*x**(m + S(1))*hyper((S(1), (m + S(1))/n), ((m + n + S(1))/n,), -b*c**S(2)*x**n/(a*c**S(2) - d**S(2)))/((m + S(1))*(a*c**S(2) - d**S(2))) - d*x**(m + S(1))*sqrt(S(1) + b*x**n/a)*AppellF1((m + S(1))/n, S(1)/2, S(1), (m + n + S(1))/n, -b*x**n/a, -b*c**S(2)*x**n/(a*c**S(2) - d**S(2)))/(sqrt(a + b*x**n)*(m + S(1))*(a*c**S(2) - d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(n + S(-1))/(a*c + b*c*x**n + d*sqrt(a + b*x**n)), x), x, S(2)*log(c*sqrt(a + b*x**n) + d)/(b*c*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(4)*x**(S(3)/2) + sqrt(x)), x), x, atan(S(2)*sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-x**(S(5)/2) + sqrt(x)), x), x, atan(sqrt(x)) + atanh(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-x**(S(1)/4) + sqrt(x)), x), x, S(4)*x**(S(1)/4) + S(2)*sqrt(x) + S(4)*log(-x**(S(1)/4) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(1)/3) + sqrt(x)), x), x, S(6)*x**(S(1)/6) - S(3)*x**(S(1)/3) + S(2)*sqrt(x) - S(6)*log(x**(S(1)/6) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(1)/4) + sqrt(x)), x), x, -S(4)*x**(S(1)/4) + S(2)*sqrt(x) + S(4)*log(x**(S(1)/4) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(2)/3) - x**(S(1)/3)), x), x, S(3)*x**(S(1)/3) + S(3)*log(-x**(S(1)/3) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x) + x**(S(-1)/4)), x), x, S(2)*sqrt(x) + S(4)*log(x**(S(1)/4) + S(1))/S(3) - S(2)*log(-x**(S(1)/4) + sqrt(x) + S(1))/S(3) + S(4)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**(S(1)/4) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(1)/4) + x**(S(1)/3)), x), x, -S(12)*x**(S(7)/12)/S(7) - S(12)*x**(S(5)/12)/S(5) - S(12)*x**(S(1)/12) + S(6)*x**(S(1)/6) - S(4)*x**(S(1)/4) + S(3)*x**(S(2)/3)/S(2) + S(3)*x**(S(1)/3) + S(2)*sqrt(x) + S(12)*log(x**(S(1)/12) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**(S(-1)/3) + x**(S(-1)/4)), x), x, S(12)*x**(S(13)/12)/S(13) + S(12)*x**(S(11)/12)/S(11) + S(12)*x**(S(7)/12)/S(7) + S(12)*x**(S(5)/12)/S(5) + S(12)*x**(S(1)/12) - S(6)*x**(S(7)/6)/S(7) - S(6)*x**(S(5)/6)/S(5) - S(6)*x**(S(1)/6) + S(4)*x**(S(5)/4)/S(5) + S(4)*x**(S(3)/4)/S(3) + S(4)*x**(S(1)/4) - S(3)*x**(S(2)/3)/S(2) - S(3)*x**(S(1)/3) - S(2)*sqrt(x) - x - S(12)*log(x**(S(1)/12) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x) - S(1)/x**(S(1)/3)), x), x, S(2)*sqrt(x) + S(6)*log(-x**(S(1)/6) + S(1))/S(5) - (-S(3)*sqrt(S(5))/S(10) + S(3)/10)*log(x**(S(1)/6) + sqrt(S(5))*x**(S(1)/6) + S(2)*x**(S(1)/3) + S(2)) - (S(3)/10 + S(3)*sqrt(S(5))/S(10))*log(-sqrt(S(5))*x**(S(1)/6) + x**(S(1)/6) + S(2)*x**(S(1)/3) + S(2)) - S(3)*sqrt(S(2)*sqrt(S(5)) + S(10))*atan(sqrt(sqrt(S(5))/S(10) + S(1)/2)*(S(4)*x**(S(1)/6) + S(1) + sqrt(S(5)))/S(2))/S(5) + S(3)*sqrt(-S(2)*sqrt(S(5)) + S(10))*atan((S(4)*x**(S(1)/6) - sqrt(S(5)) + S(1))/sqrt(S(2)*sqrt(S(5)) + S(10)))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(x**S(2) + x), x), x, S(2)*atan(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(S(4)*sqrt(x) + x), x), x, -S(8)*sqrt(x) + x + S(32)*log(sqrt(x) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(x**(S(1)/3) + x), x), x, S(2)*sqrt(x) - S(3)*sqrt(S(2))*log(-sqrt(S(2))*x**(S(1)/6) + x**(S(1)/3) + S(1))/S(4) + S(3)*sqrt(S(2))*log(sqrt(S(2))*x**(S(1)/6) + x**(S(1)/3) + S(1))/S(4) - S(3)*sqrt(S(2))*atan(sqrt(S(2))*x**(S(1)/6) + S(-1))/S(2) - S(3)*sqrt(S(2))*atan(sqrt(S(2))*x**(S(1)/6) + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(1)/3)/(x**(S(1)/4) + sqrt(x)), x), x, -S(12)*x**(S(7)/12)/S(7) - S(12)*x**(S(1)/12) + S(6)*x**(S(5)/6)/S(5) + S(3)*x**(S(1)/3) + S(6)*log(x**(S(1)/12) + S(1)) - S(2)*log(x**(S(1)/4) + S(1)) - S(4)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**(S(1)/12) + S(1))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(x**(S(1)/4) + x**(S(1)/3)), x), x, -S(12)*x**(S(13)/12)/S(13) - S(12)*x**(S(11)/12)/S(11) - S(12)*x**(S(7)/12)/S(7) - S(12)*x**(S(5)/12)/S(5) - S(12)*x**(S(1)/12) + S(6)*x**(S(7)/6)/S(7) + S(6)*x**(S(5)/6)/S(5) + S(6)*x**(S(1)/6) - S(4)*x**(S(3)/4)/S(3) - S(4)*x**(S(1)/4) + S(3)*x**(S(2)/3)/S(2) + S(3)*x**(S(1)/3) + S(2)*sqrt(x) + x + S(12)*log(x**(S(1)/12) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(sqrt(x) - S(1)/x**(S(1)/3)), x), x, S(6)*x**(S(1)/6) + x + S(6)*log(-x**(S(1)/6) + S(1))/S(5) - (S(3)/10 + S(3)*sqrt(S(5))/S(10))*log(x**(S(1)/6) + sqrt(S(5))*x**(S(1)/6) + S(2)*x**(S(1)/3) + S(2)) - (-S(3)*sqrt(S(5))/S(10) + S(3)/10)*log(-sqrt(S(5))*x**(S(1)/6) + x**(S(1)/6) + S(2)*x**(S(1)/3) + S(2)) - S(3)*sqrt(-S(2)*sqrt(S(5)) + S(10))*atan(sqrt(sqrt(S(5))/S(10) + S(1)/2)*(S(4)*x**(S(1)/6) + S(1) + sqrt(S(5)))/S(2))/S(5) - S(3)*sqrt(S(2)*sqrt(S(5)) + S(10))*atan((S(4)*x**(S(1)/6) - sqrt(S(5)) + S(1))/sqrt(S(2)*sqrt(S(5)) + S(10)))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x**S(2) + sqrt(a + b**S(2)*x**S(4)))/sqrt(a + b**S(2)*x**S(4)), x), x, sqrt(S(2))*atanh(sqrt(S(2))*sqrt(b)*x/sqrt(b*x**S(2) + sqrt(a + b**S(2)*x**S(4))))/(S(2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-b*x**S(2) + sqrt(a + b**S(2)*x**S(4)))/sqrt(a + b**S(2)*x**S(4)), x), x, sqrt(S(2))*atan(sqrt(S(2))*sqrt(b)*x/sqrt(-b*x**S(2) + sqrt(a + b**S(2)*x**S(4))))/(S(2)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x**S(2) + sqrt(S(4)*x**S(4) + S(3)))/((c + d*x)*sqrt(S(4)*x**S(4) + S(3))), x), x, -(S(1)/2 + I/S(2))*atanh((-S(2)*I*c*x + sqrt(S(3))*d)/(sqrt(S(2)*I*c**S(2) + sqrt(S(3))*d**S(2))*sqrt(S(2)*I*x**S(2) + sqrt(S(3)))))/sqrt(S(2)*I*c**S(2) + sqrt(S(3))*d**S(2)) + (S(1)/2 - I/S(2))*atan((S(2)*I*c*x + sqrt(S(3))*d)/(sqrt(S(2)*I*c**S(2) - sqrt(S(3))*d**S(2))*sqrt(-S(2)*I*x**S(2) + sqrt(S(3)))))/sqrt(S(2)*I*c**S(2) - sqrt(S(3))*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x**S(2) + sqrt(S(4)*x**S(4) + S(3)))/((c + d*x)**S(2)*sqrt(S(4)*x**S(4) + S(3))), x), x, c*(S(1) - I)*atanh((-S(2)*I*c*x + sqrt(S(3))*d)/(sqrt(S(2)*I*c**S(2) + sqrt(S(3))*d**S(2))*sqrt(S(2)*I*x**S(2) + sqrt(S(3)))))/(S(2)*I*c**S(2) + sqrt(S(3))*d**S(2))**(S(3)/2) + c*(S(1) + I)*atan((S(2)*I*c*x + sqrt(S(3))*d)/(sqrt(S(2)*I*c**S(2) - sqrt(S(3))*d**S(2))*sqrt(-S(2)*I*x**S(2) + sqrt(S(3)))))/(S(2)*I*c**S(2) - sqrt(S(3))*d**S(2))**(S(3)/2) - d*(S(1)/2 + I/S(2))*sqrt(S(2)*I*x**S(2) + sqrt(S(3)))/((c + d*x)*(S(2)*I*c**S(2) + sqrt(S(3))*d**S(2))) + d*(S(1)/2 - I/S(2))*sqrt(-S(2)*I*x**S(2) + sqrt(S(3)))/((c + d*x)*(S(2)*I*c**S(2) - sqrt(S(3))*d**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(-4))/(sqrt(x)*(x**(S(1)/3) + S(1))), x), x, S(6)*x**(S(7)/6)/S(7) - S(6)*x**(S(5)/6)/S(5) - S(30)*x**(S(1)/6) + S(2)*sqrt(x) + S(30)*atan(x**(S(1)/6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(x) + S(1))/(x**(S(7)/6) + x**(S(5)/6)), x), x, S(3)*x**(S(1)/3) - S(3)*log(x**(S(1)/3) + S(1)) + S(6)*atan(x**(S(1)/6)), expand=True, _diff=True, _numerical=True) # difference in simplify assert rubi_test(rubi_integrate((sqrt(x) + S(1))/(sqrt(x)*(x**(S(1)/3) + S(1))), x), x, S(6)*x**(S(1)/6) + S(3)*x**(S(2)/3)/S(2) - S(3)*x**(S(1)/3) + S(3)*log(x**(S(1)/3) + S(1)) - S(6)*atan(x**(S(1)/6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b/x**S(2) + S(2))/(b + S(2)*x**S(2)), x), x, -acsch(sqrt(S(2))*x/sqrt(b))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-b/x**S(2) + S(2))/(-b + S(2)*x**S(2)), x), x, -acsc(sqrt(S(2))*x/sqrt(b))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + c/x**S(2))/(d + e*x), x), x, sqrt(a)*atanh(sqrt(a + c/x**S(2))/sqrt(a))/e - sqrt(c)*atanh(sqrt(c)/(x*sqrt(a + c/x**S(2))))/d - sqrt(a*d**S(2) + c*e**S(2))*atanh((a*d - c*e/x)/(sqrt(a + c/x**S(2))*sqrt(a*d**S(2) + c*e**S(2))))/(d*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b/x + c/x**S(2))/(d + e*x), x), x, sqrt(a)*atanh((S(2)*a + b/x)/(S(2)*sqrt(a)*sqrt(a + b/x + c/x**S(2))))/e - sqrt(c)*atanh((b + S(2)*c/x)/(S(2)*sqrt(c)*sqrt(a + b/x + c/x**S(2))))/d - sqrt(a*d**S(2) - e*(b*d - c*e))*atanh((S(2)*a*d - b*e + (b*d - S(2)*c*e)/x)/(S(2)*sqrt(a*d**S(2) - e*(b*d - c*e))*sqrt(a + b/x + c/x**S(2))))/(d*e), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**(S(1)/6) + (x**S(3))**(S(1)/5))/sqrt(x), x), x, S(3)*x**(S(2)/3)/S(2) + S(10)*sqrt(x)*(x**S(3))**(S(1)/5)/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))/sqrt(-x**S(2) + S(4)*x), x), x, -sqrt(-x**S(2) + S(4)*x) + S(4)*asin(x/S(2) + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(3))/(x**S(2) + S(6)*x)**(S(1)/3), x), x, S(3)*(x**S(2) + S(6)*x)**(S(2)/3)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(4))/(-x**S(2) + S(6)*x)**(S(3)/2), x), x, -(-S(7)*x + S(12))/(S(9)*sqrt(-x**S(2) + S(6)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(1))*sqrt(x**S(2) + S(2)*x)), x), x, atan(sqrt(x**S(2) + S(2)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((S(2)*x + S(1))*sqrt(x**S(2) + x)), x), x, atan(S(2)*sqrt(x**S(2) + x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(-1))/sqrt(-x**S(2) + S(2)*x), x), x, -sqrt(-x**S(2) + S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + x)/(x + S(1)), x), x, sqrt(-x**S(2) + x) + S(3)*asin(S(2)*x + S(-1))/S(2) + sqrt(S(2))*atan(sqrt(S(2))*(-S(3)*x + S(1))/(S(4)*sqrt(-x**S(2) + x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**(S(1)/4) + x), x), x, x**(S(1)/4)*sqrt(x**(S(1)/4) + x)/S(3) + S(2)*x*sqrt(x**(S(1)/4) + x)/S(3) - atanh(sqrt(x)/sqrt(x**(S(1)/4) + x))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**(S(3)/2) + x), x), x, -S(16)*(x**(S(3)/2) + x)**(S(3)/2)/(S(35)*x) + S(4)*(x**(S(3)/2) + x)**(S(3)/2)/(S(7)*sqrt(x)) + S(32)*(x**(S(3)/2) + x)**(S(3)/2)/(S(105)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(x**(S(3)/2) + x), x), x, S(4)*sqrt(x)*(x**(S(3)/2) + x)**(S(3)/2)/S(11) - S(32)*(x**(S(3)/2) + x)**(S(3)/2)/S(99) - S(256)*(x**(S(3)/2) + x)**(S(3)/2)/(S(1155)*x) + S(64)*(x**(S(3)/2) + x)**(S(3)/2)/(S(231)*sqrt(x)) + S(512)*(x**(S(3)/2) + x)**(S(3)/2)/(S(3465)*x**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))*sqrt(S(1)/(-x**S(2) + S(2))), x), x, x/(S(2)*sqrt(S(1)/(-x**S(2) + S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(4) + x**S(3) + x**S(2)), x), x, -(-S(2)*x + S(1))*sqrt(-x**S(4) + x**S(3) + x**S(2))/(S(8)*x) - (-x**S(2) + x + S(1))*sqrt(-x**S(4) + x**S(3) + x**S(2))/(S(3)*x) - S(5)*sqrt(-x**S(4) + x**S(3) + x**S(2))*asin(sqrt(S(5))*(-S(2)*x + S(1))/S(5))/(S(16)*x*sqrt(-x**S(2) + x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((a**S(2) + x**S(2))**S(3)), x), x, x*(a**S(2) + x**S(2))/(a**S(2)*sqrt((a**S(2) + x**S(2))**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(sqrt(x) + x + S(1)), x), x, S(2)*sqrt(x) - log(sqrt(x) + x + S(1)) - S(2)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*sqrt(x) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(x) + x + S(1)), x), x, -S(2)*sqrt(x) + x + S(4)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*sqrt(x) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(sqrt(x) + x + S(1))**(S(7)/2)), x), x, (S(8)*sqrt(x) + S(4))/(S(15)*(sqrt(x) + x + S(1))**(S(5)/2)) + (S(128)*sqrt(x) + S(64))/(S(135)*(sqrt(x) + x + S(1))**(S(3)/2)) + (S(1024)*sqrt(x) + S(512))/(S(405)*sqrt(sqrt(x) + x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(-1))/(sqrt(x**S(2) + S(1)) + S(1)), x), x, sqrt(x**S(2) + S(1)) - log(sqrt(x**S(2) + S(1)) + S(1)) - asinh(x) + sqrt(x**S(2) + S(1))/x - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(1))**(S(2)/3)*(x**S(2) + S(-1))**(S(2)/3)), x), x, S(3)*(x**S(2) + S(-1))**(S(1)/3)/(S(2)*(x + S(1))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(-x**S(2) + S(1))/(x + S(1)), x), x, -sqrt(-x**S(2) + S(1))/S(2) - asin(x)/S(2) - (-x**S(2) + S(1))**(S(3)/2)/(S(2)*x + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(6) + S(1))**(S(2)/3) + (-x**S(6) + S(1))**(S(2)/3)/x**S(6), x), x, x*(-x**S(6) + S(1))**(S(2)/3)/S(5) - (-x**S(6) + S(1))**(S(2)/3)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(-1))*(S(2)*a*m + b*x**n*(S(2)*m - n))/(S(2)*(a + b*x**n)**(S(3)/2)), x), x, x**m/sqrt(a + b*x**n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(2)*x**S(3) + x)/sqrt(S(3)*x + S(2)), x), x, -S(4)*(S(3)*x + S(2))**(S(7)/2)/S(567) + S(8)*(S(3)*x + S(2))**(S(5)/2)/S(135) - S(10)*(S(3)*x + S(2))**(S(3)/2)/S(81) - S(4)*sqrt(S(3)*x + S(2))/S(81), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(1))**(S(1)/4) + sqrt(x + S(1))), x), x, -S(4)*(x + S(1))**(S(1)/4) + S(2)*sqrt(x + S(1)) + S(4)*log((x + S(1))**(S(1)/4) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x + S(1))/sqrt(x**S(2) + x), x), x, S(2)*sqrt(x**S(2) + x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(2)*sqrt(x)*(x + S(1))), x), x, atan(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(-x**S(2) + S(6)*x)), x), x, -sqrt(-x**S(2) + S(6)*x)/(S(3)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*(sqrt(x) + S(1)), x), x, S(2)*x**(S(3)/2)/S(3) + x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(x) + S(1))/x**(S(1)/3), x), x, -S(6)*x**(S(7)/6)/S(7) + S(3)*x**(S(2)/3)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(x**(S(1)/3) + S(1)), x), x, S(6)*x**(S(7)/6)/S(7) - S(6)*x**(S(5)/6)/S(5) - S(6)*x**(S(1)/6) + S(2)*sqrt(x) + S(6)*atan(x**(S(1)/6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(x) + S(1))**(S(1)/3)/x, x), x, S(6)*(sqrt(x) + S(1))**(S(1)/3) - log(x)/S(2) + S(3)*log(-(sqrt(x) + S(1))**(S(1)/3) + S(1)) - S(2)*sqrt(S(3))*atan(sqrt(S(3))*(S(2)*(sqrt(x) + S(1))**(S(1)/3) + S(1))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-sqrt(x) + S(1), x), x, -S(2)*x**(S(3)/2)/S(3) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-x**(S(1)/4) + S(1), x), x, -S(4)*x**(S(5)/4)/S(5) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(x) + S(1))/(x**(S(1)/4) + S(1)), x), x, -S(4)*x**(S(5)/4)/S(5) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((a + b*x)*(c + d*x)), x), x, atanh((a*d + b*c + S(2)*b*d*x)/(S(2)*sqrt(b)*sqrt(d)*sqrt(a*c + b*d*x**S(2) + x*(a*d + b*c))))/(sqrt(b)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((a + b*x)*(c - d*x)), x), x, -atan((-a*d + b*c - S(2)*b*d*x)/(S(2)*sqrt(b)*sqrt(d)*sqrt(a*c - b*d*x**S(2) + x*(-a*d + b*c))))/(sqrt(b)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*(-x**S(2) + S(1))), x), x, atan(sqrt(x)) + atanh(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(-x**S(3) + x), x), x, atan(sqrt(x)) + atanh(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(2) + x*(S(1) + sqrt(S(3))) - sqrt(S(3)) + S(2)), x), x, log(x**S(2) + x*(S(1) + sqrt(S(3))) - sqrt(S(3)) + S(2))/S(2) + sqrt(S(13)/23 + S(8)*sqrt(S(3))/S(23))*atanh((S(2)*x + S(1) + sqrt(S(3)))/sqrt(S(-4) + S(6)*sqrt(S(3)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(3) + x**S(2)), x), x, S(2)*(x**S(3) + x**S(2))**(S(3)/2)/(S(5)*x**S(2)) - S(4)*(x**S(3) + x**S(2))**(S(3)/2)/(S(15)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x + S(1))*sqrt(x**S(2) + S(2)*x)), x), x, atan(sqrt(x**S(2) + S(2)*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*sqrt(-sqrt(x) - x + S(1)), x), x, -sqrt(x)*(-sqrt(x) - x + S(1))**(S(3)/2)/S(2) + (S(9)*sqrt(x)/S(16) + S(9)/32)*sqrt(-sqrt(x) - x + S(1)) + S(5)*(-sqrt(x) - x + S(1))**(S(3)/2)/S(12) + S(45)*asin(sqrt(S(5))*(S(2)*sqrt(x) + S(1))/S(5))/S(64), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(x + S(-3)) + S(1))**(S(1)/3), x), x, S(6)*(sqrt(x + S(-3)) + S(1))**(S(7)/3)/S(7) - S(3)*(sqrt(x + S(-3)) + S(1))**(S(4)/3)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sqrt(S(2)*x + S(-1)) + S(3)), x), x, S(2)*(sqrt(S(2)*x + S(-1)) + S(3))**(S(3)/2)/S(3) - S(6)*sqrt(sqrt(S(2)*x + S(-1)) + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x + S(1))/(sqrt(x) + S(1)), x), x, -sqrt(-x + S(1)) - asin(sqrt(x)) - (-x + S(1))**(S(3)/2)/(sqrt(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x + S(1))/(-sqrt(x) + S(1)), x), x, -sqrt(-x + S(1)) + asin(sqrt(x)) - (-x + S(1))**(S(3)/2)/(-sqrt(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x - sqrt(x**S(2) + S(1))), x), x, -x**S(3)/S(3) - (x**S(2) + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x - sqrt(-x**S(2) + S(1))), x), x, x/S(2) + sqrt(-x**S(2) + S(1))/S(2) - sqrt(S(2))*atanh(sqrt(S(2))*x)/S(4) - sqrt(S(2))*atanh(sqrt(S(2))*sqrt(-x**S(2) + S(1)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x - sqrt(S(2)*x**S(2) + S(1))), x), x, -x - sqrt(S(2)*x**S(2) + S(1)) + atan(x) + atan(sqrt(S(2)*x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)*sqrt(sqrt(x) + x), x), x, sqrt(x)*(sqrt(x) + x)**(S(3)/2)/S(2) + (S(5)*sqrt(x)/S(16) + S(5)/32)*sqrt(sqrt(x) + x) - S(5)*(sqrt(x) + x)**(S(3)/2)/S(12) - S(5)*atanh(sqrt(x)/sqrt(sqrt(x) + x))/S(32), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**(S(1)/3) + S(1))/(sqrt(x) + S(1)), x), x, S(6)*x**(S(5)/6)/S(5) - S(3)*x**(S(1)/3) + S(2)*sqrt(x) - S(4)*log(x**(S(1)/6) + S(1)) - log(-x**(S(1)/6) + x**(S(1)/3) + S(1)) - S(2)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**(S(1)/6) + S(1))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**(S(1)/3) + S(1))/(x**(S(1)/4) + S(1)), x), x, S(12)*x**(S(13)/12)/S(13) + S(12)*x**(S(7)/12)/S(7) + S(12)*x**(S(1)/12) - S(6)*x**(S(5)/6)/S(5) + S(4)*x**(S(3)/4)/S(3) + S(4)*x**(S(1)/4) - S(3)*x**(S(1)/3) - S(2)*sqrt(x) - S(8)*log(x**(S(1)/12) + S(1)) - S(2)*log(-x**(S(1)/12) + x**(S(1)/6) + S(1)) + S(4)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x**(S(1)/12) + S(1))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(x**S(2) + sqrt(-x**S(2) + S(1)) + S(-1)), x), x, x + asin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x + S(1))/x), x), x, x*sqrt(S(1) + S(1)/x) + atanh(sqrt(S(1) + S(1)/x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((-x + S(1))/x), x), x, x*sqrt(S(-1) + S(1)/x) - atan(sqrt(S(-1) + S(1)/x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x + S(-1))/x), x), x, sqrt(x)*sqrt(x + S(-1)) - asinh(sqrt(x + S(-1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt((x + S(-1))/x), x), x, x*sqrt(S(1) - S(1)/x) - atanh(sqrt(S(1) - S(1)/x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x + S(1))/x)/x, x), x, -S(2)*sqrt(S(1) + S(1)/x) + S(2)*atanh(sqrt(S(1) + S(1)/x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x/(x + S(1))), x), x, sqrt(x)*sqrt(x + S(1)) - asinh(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((-x + S(-1))/x), x), x, -x*sqrt(S(-1) - S(1)/x) + atan(sqrt(S(-1) - S(1)/x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x*(-x + S(4))), x), x, (x/S(2) + S(-1))*sqrt(-x**S(2) + S(4)*x) + S(2)*asin(x/S(2) + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x*(-x + S(1))), x), x, asin(S(2)*x + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x*(x + S(2)))**(S(3)/2), x), x, x/sqrt(x**S(2) + S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(1) + S(1)/x)/(-x**S(2) + S(1)), x), x, sqrt(S(2))*atanh(sqrt(S(2))*sqrt(S(1) + S(1)/x)/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-x**S(2) + sqrt(S(5))*x**S(2) + S(1) + sqrt(S(5))), x), x, atan(x*sqrt(-sqrt(S(5))/S(2) + S(3)/2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((-a + x)*(b - x)), x), x, -(a - b)**S(2)*atan((a + b - S(2)*x)/(S(2)*sqrt(-a*b - x**S(2) + x*(a + b))))/S(8) + (-a/S(4) - b/S(4) + x/S(2))*sqrt(-a*b - x**S(2) + x*(a + b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((-a + x)*(b - x)), x), x, -atan((a + b - S(2)*x)/(S(2)*sqrt(-a*b - x**S(2) + x*(a + b)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((-x**S(2) + S(1))*(x**S(2) + S(3))), x), x, x*sqrt(-x**S(4) - S(2)*x**S(2) + S(3))/S(3) - S(2)*sqrt(S(3))*elliptic_e(asin(x), S(-1)/3)/S(3) + S(4)*sqrt(S(3))*elliptic_f(asin(x), S(-1)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((-x**S(2) + S(1))*(x**S(2) + S(3))), x), x, sqrt(S(3))*elliptic_f(asin(x), S(-1)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*x + b*x**S(2)), x), x, S(2)*atanh(sqrt(b)*x/sqrt(a*x + b*x**S(2)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x*(a + b*x)), x), x, S(2)*atanh(sqrt(b)*x/sqrt(a*x + b*x**S(2)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x**S(2)*(a/x + b)), x), x, S(2)*atanh(sqrt(b)*x/sqrt(a*x + b*x**S(2)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x**S(3)*(a/x**S(2) + b/x)), x), x, S(2)*atanh(sqrt(b)*x/sqrt(a*x + b*x**S(2)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((a*x**S(2) + b*x**S(3))/x), x), x, S(2)*atanh(sqrt(b)*x/sqrt(a*x + b*x**S(2)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((a*x**S(3) + b*x**S(4))/x**S(2)), x), x, S(2)*atanh(sqrt(b)*x/sqrt(a*x + b*x**S(2)))/sqrt(b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*c*x + b*c*x**S(2)), x), x, S(2)*atanh(sqrt(b)*sqrt(c)*x/sqrt(a*c*x + b*c*x**S(2)))/(sqrt(b)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(c*(a*x + b*x**S(2))), x), x, S(2)*atanh(sqrt(b)*sqrt(c)*x/sqrt(a*c*x + b*c*x**S(2)))/(sqrt(b)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(c*x*(a + b*x)), x), x, S(2)*atanh(sqrt(b)*sqrt(c)*x/sqrt(a*c*x + b*c*x**S(2)))/(sqrt(b)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(c*x**S(2)*(a/x + b)), x), x, S(2)*atanh(sqrt(b)*sqrt(c)*x/sqrt(a*c*x + b*c*x**S(2)))/(sqrt(b)*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + x*sqrt(x**S(2) + S(-1)) + S(1)), x), x, (S(3)*x/S(4) + sqrt(x**S(2) + S(-1))/S(4))*sqrt(-x**S(2) + x*sqrt(x**S(2) + S(-1)) + S(1)) + S(3)*sqrt(S(2))*asin(x - sqrt(x**S(2) + S(-1)))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(x)*sqrt(x + S(1)) - x)/sqrt(x + S(1)), x), x, (sqrt(x)/S(2) + S(3)*sqrt(x + S(1))/S(2))*sqrt(sqrt(x)*sqrt(x + S(1)) - x) - S(3)*sqrt(S(2))*asin(sqrt(x) - sqrt(x + S(1)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-(x + S(2)*sqrt(x**S(2) + S(1)))/(x**S(3) + x + sqrt(x**S(2) + S(1))), x), x, -sqrt(S(2) + S(2)*sqrt(S(5)))*atan(sqrt(S(-2) + sqrt(S(5)))*(x + sqrt(x**S(2) + S(1)))) + sqrt(S(-2) + S(2)*sqrt(S(5)))*atanh(sqrt(S(2) + sqrt(S(5)))*(x + sqrt(x**S(2) + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x + S(1))/((x**S(2) + S(1))*sqrt(x**S(2) + S(2)*x + S(2))), x), x, -sqrt(S(1)/2 + sqrt(S(5))/S(2))*atan((-x*(sqrt(S(5)) + S(5)) + S(2)*sqrt(S(5)))/(sqrt(S(10) + S(10)*sqrt(S(5)))*sqrt(x**S(2) + S(2)*x + S(2)))) - sqrt(S(-1)/2 + sqrt(S(5))/S(2))*atanh((x*(-sqrt(S(5)) + S(5)) + S(2)*sqrt(S(5)))/(sqrt(S(-10) + S(10)*sqrt(S(5)))*sqrt(x**S(2) + S(2)*x + S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(-x**S(2) + sqrt(x**S(4) + S(1)))*(x**S(4) + S(1))), x), x, atan(x/sqrt(-x**S(2) + sqrt(x**S(4) + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x**S(4))*sqrt(c*x**S(2) + d*sqrt(a + b*x**S(4)))), x), x, atanh(sqrt(c)*x/sqrt(c*x**S(2) + d*sqrt(a + b*x**S(4))))/(a*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x**S(4))*sqrt(-c*x**S(2) + d*sqrt(a + b*x**S(4)))), x), x, atan(sqrt(c)*x/sqrt(-c*x**S(2) + d*sqrt(a + b*x**S(4))))/(a*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*c**S(4) + S(4)*b*c**S(3)*d*x + S(6)*b*c**S(2)*d**S(2)*x**S(2) + S(4)*b*c*d**S(3)*x**S(3) + b*d**S(4)*x**S(4)), x), x, atanh(sqrt(b)*d**S(2)*(c/d + x)**S(2)/sqrt(a + b*d**S(4)*(c/d + x)**S(4)))/(S(2)*sqrt(b)*d**S(2)) - c*sqrt((a + b*d**S(4)*(c/d + x)**S(4))/(sqrt(a) + sqrt(b)*d**S(2)*(c/d + x)**S(2))**S(2))*(sqrt(a) + sqrt(b)*d**S(2)*(c/d + x)**S(2))*elliptic_f(S(2)*atan(b**(S(1)/4)*d*(c/d + x)/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*b**(S(1)/4)*d**S(2)*sqrt(a + b*d**S(4)*(c/d + x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*c**S(4) + S(4)*b*c**S(3)*d*x + S(6)*b*c**S(2)*d**S(2)*x**S(2) + S(4)*b*c*d**S(3)*x**S(3) + b*d**S(4)*x**S(4)), x), x, sqrt((a + b*d**S(4)*(c/d + x)**S(4))/(sqrt(a) + sqrt(b)*d**S(2)*(c/d + x)**S(2))**S(2))*(sqrt(a) + sqrt(b)*d**S(2)*(c/d + x)**S(2))*elliptic_f(S(2)*atan(b**(S(1)/4)*d*(c/d + x)/a**(S(1)/4)), S(1)/2)/(S(2)*a**(S(1)/4)*b**(S(1)/4)*d*sqrt(a + b*d**S(4)*(c/d + x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - c*x**S(4))/(sqrt(a + b*x**S(2) + c*x**S(4))*(a*d + a*e*x**S(2) + c*d*x**S(4))), x), x, atanh(x*sqrt(-a*e + b*d)/(sqrt(d)*sqrt(a + b*x**S(2) + c*x**S(4))))/(sqrt(d)*sqrt(-a*e + b*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - c*x**S(4))/(sqrt(a - b*x**S(2) + c*x**S(4))*(a*d + a*e*x**S(2) + c*d*x**S(4))), x), x, atan(x*sqrt(a*e + b*d)/(sqrt(d)*sqrt(a - b*x**S(2) + c*x**S(4))))/(sqrt(d)*sqrt(a*e + b*d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((x**S(3) + S(8))*sqrt(x**S(2) - S(2)*x + S(5))), x), x, -sqrt(S(3))*atan(sqrt(S(3))*(-x + S(1))/(S(3)*sqrt(x**S(2) - S(2)*x + S(5))))/S(12) - sqrt(S(13))*atanh(sqrt(S(13))*(-S(3)*x + S(7))/(S(13)*sqrt(x**S(2) - S(2)*x + S(5))))/S(156) + atanh(sqrt(x**S(2) - S(2)*x + S(5)))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(2)/(x**S(2) + S(1))), x), x, sqrt(x**S(2) + S(1))*sqrt(x**S(2))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**n/(x**n + S(1))), x), x, S(2)*x*sqrt(x**n)*hyper((S(1)/2, S(1)/2 + S(1)/n), (S(3)/2 + S(1)/n,), -x**n)/(n + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-e*f*x**S(2) + e*f)/((a*d*x**S(2) + a*d + b*d*x)*sqrt(a*x**S(4) + a + b*x**S(3) + b*x + c*x**S(2))), x), x, e*f*atan((a*b*x**S(2) + a*b + x*(S(4)*a**S(2) - S(2)*a*c + b**S(2)))/(S(2)*a*sqrt(S(2)*a - c)*sqrt(a*x**S(4) + a + b*x**S(3) + b*x + c*x**S(2))))/(a*d*sqrt(S(2)*a - c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-e*f*x**S(2) + e*f)/((-a*d*x**S(2) - a*d + b*d*x)*sqrt(-a*x**S(4) - a + b*x**S(3) + b*x + c*x**S(2))), x), x, e*f*atanh((a*b*x**S(2) + a*b - x*(S(4)*a**S(2) + S(2)*a*c + b**S(2)))/(S(2)*a*sqrt(S(2)*a + c)*sqrt(-a*x**S(4) - a + b*x**S(3) + b*x + c*x**S(2))))/(a*d*sqrt(S(2)*a + c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*x**S(2) + b*x*sqrt(a**S(2)*x**S(2)/b**S(2) - a/b**S(2)))/(x*sqrt(a**S(2)*x**S(2)/b**S(2) - a/b**S(2))), x), x, sqrt(S(2))*b*asinh((a*x + b*sqrt(a**S(2)*x**S(2)/b**S(2) - a/b**S(2)))/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a*x**S(2) + b*x*sqrt(a**S(2)*x**S(2)/b**S(2) + a/b**S(2)))/(x*sqrt(a**S(2)*x**S(2)/b**S(2) + a/b**S(2))), x), x, sqrt(S(2))*b*asin((a*x - b*sqrt(a**S(2)*x**S(2)/b**S(2) + a/b**S(2)))/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x*(a*x + b*sqrt(a**S(2)*x**S(2)/b**S(2) - a/b**S(2))))/(x*sqrt(a**S(2)*x**S(2)/b**S(2) - a/b**S(2))), x), x, sqrt(S(2))*b*asinh((a*x + b*sqrt(a**S(2)*x**S(2)/b**S(2) - a/b**S(2)))/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x*(-a*x + b*sqrt(a**S(2)*x**S(2)/b**S(2) + a/b**S(2))))/(x*sqrt(a**S(2)*x**S(2)/b**S(2) + a/b**S(2))), x), x, sqrt(S(2))*b*asin((a*x - b*sqrt(a**S(2)*x**S(2)/b**S(2) + a/b**S(2)))/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x*sqrt(x + S(-4)) + x*sqrt(x + S(-1)) - sqrt(x + S(-4)) - S(4)*sqrt(x + S(-1)))/((x**S(2) - S(5)*x + S(4))*(sqrt(x + S(-4)) + sqrt(x + S(-1)) + S(1))), x), x, S(2)*log(sqrt(x + S(-4)) + sqrt(x + S(-1)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(x**S(2) + S(3)*x + S(3))*(x**S(3) + S(3)*x**S(2) + S(3)*x + S(3))**(S(1)/3)), x), x, S(3)**(S(2)/3)*log(-S(3)**(S(1)/3)*(x + S(1))/((x + S(1))**S(3) + S(2))**(S(1)/3) + S(1))/S(9) - S(3)**(S(2)/3)*log(S(3)**(S(2)/3)*(x + S(1))**S(2)/((x + S(1))**S(3) + S(2))**(S(2)/3) + S(3)**(S(1)/3)*(x + S(1))/((x + S(1))**S(3) + S(2))**(S(1)/3) + S(1))/S(18) - S(3)**(S(1)/6)*atan(sqrt(S(3))*(S(2)*S(3)**(S(1)/3)*(x + S(1))/((x + S(1))**S(3) + S(2))**(S(1)/3) + S(1))/S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(1))/((-x**S(3) + S(1))**(S(2)/3)*(x**S(2) - x + S(1))), x), x, S(3)*S(2)**(S(1)/3)*log(S(2)**(S(1)/3)*(-x + S(1)) + (-x**S(3) + S(1))**(S(1)/3))/S(4) - S(2)**(S(1)/3)*log(-x**S(3) + S(2)*(-x + S(1))**S(3) + S(1))/S(4) + S(2)**(S(1)/3)*sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*S(2)**(S(1)/3)*(-x + S(1))/(-x**S(3) + S(1))**(S(1)/3) + S(1))/S(3))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(sqrt(x**S(4) + S(-1))*(x**S(4) + S(1))), x), x, -atan((x**S(2) + S(1))/(x*sqrt(x**S(4) + S(-1))))/S(4) - atanh((-x**S(2) + S(1))/(x*sqrt(x**S(4) + S(-1))))/S(4), expand=True, _diff=True, _numerical=True) def test_3(): assert rubi_test(rubi_integrate(sqrt(x**S(2) + S(-1))/sqrt(x**S(4) + S(-1)), x), x, sqrt(x**S(2) + S(-1))*sqrt(x**S(2) + S(1))*asinh(x)/sqrt(x**S(4) + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(2) + S(1))/sqrt(x**S(4) + S(-1)), x), x, -sqrt(x**S(4) + S(-1))*asin(x)/sqrt(-x**S(4) + S(1)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(x**S(2) + S(1))/sqrt(x**S(4) + S(-1)), x), x, sqrt(x**S(2) + S(-1))*sqrt(x**S(2) + S(1))*atanh(x/sqrt(x**S(2) + S(-1)))/sqrt(x**S(4) + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(x**S(2) + S(-1)) + sqrt(x**S(2) + S(1)))/sqrt(x**S(4) + S(-1)), x), x, sqrt(x**S(2) + S(-1))*sqrt(x**S(4) + S(-1))*asinh(x)/((-x**S(2) + S(1))*sqrt(x**S(2) + S(1))) - sqrt(x**S(4) + S(-1))*asin(x)/(sqrt(-x**S(2) + S(1))*sqrt(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((-sqrt(x**S(2) + S(-1)) + sqrt(x**S(2) + S(1)))/sqrt(x**S(4) + S(-1)), x), x, -sqrt(x**S(2) + S(-1))*sqrt(x**S(2) + S(1))*asinh(x)/sqrt(x**S(4) + S(-1)) + sqrt(x**S(2) + S(-1))*sqrt(x**S(2) + S(1))*atanh(x/sqrt(x**S(2) + S(-1)))/sqrt(x**S(4) + S(-1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(-x**S(2) + S(1))**S(5), x), x, S(1)/(S(8)*(-x**S(2) + S(1))**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-S(5)/(S(256)*(x + S(1))**S(2)) - S(5)/(S(128)*(x + S(1))**S(3)) - S(3)/(S(64)*(x + S(1))**S(4)) - S(1)/(S(32)*(x + S(1))**S(5)) + S(5)/(S(256)*(x + S(-1))**S(2)) - S(5)/(S(128)*(x + S(-1))**S(3)) + S(3)/(S(64)*(x + S(-1))**S(4)) - S(1)/(S(32)*(x + S(-1))**S(5)), x), x, S(1)/(S(8)*(-x**S(2) + S(1))**S(4)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(-S(5)/(S(256)*(x + S(1))**S(2)) - S(5)/(S(128)*(x + S(1))**S(3)) - S(3)/(S(64)*(x + S(1))**S(4)) - S(1)/(S(32)*(x + S(1))**S(5)) + S(5)/(S(256)*(x + S(-1))**S(2)) - S(5)/(S(128)*(x + S(-1))**S(3)) + S(3)/(S(64)*(x + S(-1))**S(4)) - S(1)/(S(32)*(x + S(-1))**S(5)), x), x, S(5)/(S(256)*(x + S(1))) + S(5)/(S(256)*(x + S(1))**S(2)) + S(1)/(S(64)*(x + S(1))**S(3)) + S(1)/(S(128)*(x + S(1))**S(4)) + S(5)/(S(256)*(-x + S(1))) + S(5)/(S(256)*(-x + S(1))**S(2)) + S(1)/(S(64)*(-x + S(1))**S(3)) + S(1)/(S(128)*(-x + S(1))**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2))/(x**S(2) + S(2)*x + S(-1)), x), x, (-sqrt(S(2)) + S(2))*log(x + S(1) + sqrt(S(2)))/S(4) + (sqrt(S(2)) + S(2))*log(x - sqrt(S(2)) + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-4))/(x**S(3) - S(5)*x + S(2)), x), x, (-sqrt(S(2)) + S(2))*log(x + S(1) + sqrt(S(2)))/S(4) + (sqrt(S(2)) + S(2))*log(x - sqrt(S(2)) + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x**S(8) + S(1))/(x*(x**S(8) + S(1))**(S(3)/2)), x), x, -atanh(sqrt(x**S(8) + S(1)))/S(4) - S(1)/(S(4)*sqrt(x**S(8) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(8) + S(1))*(S(2)*x**S(8) + S(1))/(x**S(17) + S(2)*x**S(9) + x), x), x, -atanh(sqrt(x**S(8) + S(1)))/S(4) - S(1)/(S(4)*sqrt(x**S(8) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-S(9)*x**S(2) + x/sqrt(-S(9)*x**S(2) + S(1)) + S(1), x), x, -S(3)*x**S(3) + x - sqrt(-S(9)*x**S(2) + S(1))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + (-S(9)*x**S(2) + S(1))**(S(3)/2))/sqrt(-S(9)*x**S(2) + S(1)), x), x, -S(3)*x**S(3) + x - sqrt(-S(9)*x**S(2) + S(1))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(3)*sqrt(x) + x)**(S(2)/3)*(S(2)*sqrt(x) + S(-3))/sqrt(x), x), x, S(6)*(-S(3)*sqrt(x) + x)**(S(5)/3)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(9)*sqrt(x) + S(2)*x + S(9))/(-S(3)*sqrt(x) + x)**(S(1)/3), x), x, S(6)*(-S(3)*sqrt(x) + x)**(S(5)/3)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(2)/(S(4)*x**S(2) + S(-1)), x), x, -atanh(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-S(1)/(S(2)*x + S(1)) + S(1)/(S(2)*x + S(-1)), x), x, log(-S(2)*x + S(1))/S(2) - log(S(2)*x + S(1))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-S(9)*x**S(2) + S(4)), x), x, asin(S(3)*x/S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(-S(3)*x + S(2))*sqrt(S(3)*x + S(2))), x), x, asin(S(3)*x/S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((-S(3)*x + S(2))*(S(3)*x + S(2))), x), x, asin(S(3)*x/S(2))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-x**S(2) - S(2)*x + S(15)), x), x, asin(x/S(4) + S(1)/4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(-x + S(3))*sqrt(x + S(5))), x), x, asin(x/S(4) + S(1)/4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((-x + S(3))*(x + S(5))), x), x, asin(x/S(4) + S(1)/4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-x**S(2) - S(8)*x + S(-15)), x), x, asin(x + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(-x + S(-3))*sqrt(x + S(5))), x), x, asin(x + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt((-x + S(-3))*(x + S(5))), x), x, asin(x + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-sqrt(x) + S(1), x), x, -S(2)*x**(S(3)/2)/S(3) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x + S(1))/(sqrt(x) + S(1)), x), x, -S(2)*x**(S(3)/2)/S(3) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(1)/(-x**S(2) + S(1))), x), x, sqrt(-x**S(2) + S(1))*sqrt(S(1)/(-x**S(2) + S(1)))*asin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x**S(2) + S(1))/(-x**S(4) + S(1))), x), x, sqrt(-x**S(2) + S(1))*sqrt(S(1)/(-x**S(2) + S(1)))*asin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(1)/(x**S(2) + S(-1))), x), x, sqrt(x**S(2) + S(-1))*sqrt(S(1)/(x**S(2) + S(-1)))*atanh(x/sqrt(x**S(2) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x**S(2) + S(1))/(x**S(4) + S(-1))), x), x, sqrt(x**S(2) + S(-1))*sqrt(S(1)/(x**S(2) + S(-1)))*atanh(x/sqrt(x**S(2) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(6) + S(1))/(x**S(6) + S(-1)), x), x, x + log(x**S(2) - x + S(1))/S(6) - log(x**S(2) + x + S(1))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(3) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(3) - S(2)*atanh(x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x**(S(-3)))/(x**S(3) - S(1)/x**S(3)), x), x, x + log(x**S(2) - x + S(1))/S(6) - log(x**S(2) + x + S(1))/S(6) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(3) - sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(3) - S(2)*atanh(x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-x + S(1)), x), x, -S(2)*sqrt(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x + S(1))/sqrt(-x**S(2) + S(1)), x), x, -S(2)*sqrt(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x + S(1)), x), x, S(2)*sqrt(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x + S(1))/sqrt(-x**S(2) + S(1)), x), x, S(2)*sqrt(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x + S(1)), x), x, -S(2)*(-x + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + S(1))/sqrt(x + S(1)), x), x, -S(2)*(-x + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x + S(1)), x), x, S(2)*(x + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + S(1))/sqrt(-x + S(1)), x), x, S(2)*(x + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(3)*x + S(2))/sqrt(x + S(1)), x), x, sqrt(x + S(1))*sqrt(S(3)*x + S(2)) - sqrt(S(3))*asinh(sqrt(S(3)*x + S(2)))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x + S(1))*sqrt(S(3)*x + S(2))/sqrt(-x**S(2) + S(1)), x), x, sqrt(x + S(1))*sqrt(S(3)*x + S(2)) - sqrt(S(3))*asinh(sqrt(S(3)*x + S(2)))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(1))**(S(3)/2)/(x*(-x + S(1))**(S(3)/2)), x), x, -asin(x) - atanh(sqrt(-x + S(1))*sqrt(x + S(1))) + S(4)*sqrt(x + S(1))/sqrt(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(1))**S(3)/(x*(-x**S(2) + S(1))**(S(3)/2)), x), x, -asin(x) - atanh(sqrt(-x**S(2) + S(1))) + S(4)*sqrt(-x**S(2) + S(1))/(-x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + S(1))**(S(3)/2)/(x*(-a*x + S(1))**(S(3)/2)), x), x, -asin(a*x) - atanh(sqrt(-a*x + S(1))*sqrt(a*x + S(1))) + S(4)*sqrt(a*x + S(1))/sqrt(-a*x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*x + S(1))**S(3)/(x*(-a**S(2)*x**S(2) + S(1))**(S(3)/2)), x), x, -asin(a*x) - atanh(sqrt(-a**S(2)*x**S(2) + S(1))) + S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(-a*x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-x**S(2) + S(1)), x), x, asin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(2) + S(1))/sqrt(-x**S(4) + S(1)), x), x, asin(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x**S(2) + S(1)), x), x, asinh(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + S(1))/sqrt(-x**S(4) + S(1)), x), x, asinh(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(2) + S(1)), x), x, x*sqrt(-x**S(2) + S(1))/S(2) + asin(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(4) + S(1))/sqrt(x**S(2) + S(1)), x), x, x*sqrt(-x**S(2) + S(1))/S(2) + asin(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(2) + S(1)), x), x, x*sqrt(x**S(2) + S(1))/S(2) + asinh(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(4) + S(1))/sqrt(-x**S(2) + S(1)), x), x, x*sqrt(x**S(2) + S(1))/S(2) + asinh(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2)*c + a**S(2)*d*x + S(2)*a*b*c*x**S(2) + S(2)*a*b*d*x**S(3) + b**S(2)*c*x**S(4) + b**S(2)*d*x**S(5))/(c + d*x), x), x, a**S(2)*x + S(2)*a*b*x**S(3)/S(3) + b**S(2)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2)*c + a**S(2)*d*x + S(2)*a*b*c*x**S(2) + S(2)*a*b*d*x**S(3) + b**S(2)*c*x**S(4) + b**S(2)*d*x**S(5))/(c + d*x)**S(2), x), x, -b**S(2)*c*x**S(3)/(S(3)*d**S(2)) + b**S(2)*x**S(4)/(S(4)*d) - b*c*x*(S(2)*a*d**S(2) + b*c**S(2))/d**S(4) + b*x**S(2)*(S(2)*a*d**S(2) + b*c**S(2))/(S(2)*d**S(3)) + (a*d**S(2) + b*c**S(2))**S(2)*log(c + d*x)/d**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2)*c + a**S(2)*d*x + S(2)*a*b*c*x**S(2) + S(2)*a*b*d*x**S(3) + b**S(2)*c*x**S(4) + b**S(2)*d*x**S(5))/(a + b*x**S(2)), x), x, a*c*x + a*d*x**S(2)/S(2) + b*c*x**S(3)/S(3) + b*d*x**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2)*c + a**S(2)*d*x + S(2)*a*b*c*x**S(2) + S(2)*a*b*d*x**S(3) + b**S(2)*c*x**S(4) + b**S(2)*d*x**S(5))/(a + b*x**S(2))**S(2), x), x, c*x + d*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a**S(2)*c + a**S(2)*d*x + S(2)*a*b*c*x**S(2) + S(2)*a*b*d*x**S(3) + b**S(2)*c*x**S(4) + b**S(2)*d*x**S(5))/(a + b*x**S(2))**S(3), x), x, d*log(a + b*x**S(2))/(S(2)*b) + c*atan(sqrt(b)*x/sqrt(a))/(sqrt(a)*sqrt(b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((a + b + c*x**S(2))/d)**m, x), x, d*x*(c*x**S(2)/d + (a + b)/d)**(m + S(1))*hyper((S(1), m + S(3)/2), (S(3)/2,), -c*x**S(2)/(a + b))/(a + b), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(((a + b + c*x**S(2))/d)**m, x), x, x*(c*x**S(2)/d + (a + b)/d)**m*(c*x**S(2)/(a + b) + S(1))**(-m)*hyper((S(1)/2, -m), (S(3)/2,), -c*x**S(2)/(a + b)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x - sqrt(x**S(2) + S(1))), x), x, -x**S(2)/S(2) - x*sqrt(x**S(2) + S(1))/S(2) - asinh(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x - sqrt(-x**S(2) + S(1))), x), x, log(-S(2)*x**S(2) + S(1))/S(4) - asin(x)/S(2) - atanh(x/sqrt(-x**S(2) + S(1)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x - sqrt(S(2)*x**S(2) + S(1))), x), x, -log(x**S(2) + S(1))/S(2) - sqrt(S(2))*asinh(sqrt(S(2))*x) + atanh(x/sqrt(S(2)*x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(3) + x**S(2)*sqrt(-x**S(2) + S(2)) + S(2)*x)/(S(2)*x**S(2) + S(-2)), x), x, -x**S(2)/S(4) + x*sqrt(-x**S(2) + S(2))/S(4) + log(-x**S(2) + S(1))/S(4) - atanh(x/sqrt(-x**S(2) + S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(-x**S(2) + S(2))/(x - sqrt(-x**S(2) + S(2))), x), x, -x**S(2)/S(4) + x*sqrt(-x**S(2) + S(2))/S(4) + log(-x + S(1))/S(4) + log(x + S(1))/S(4) - atanh(x/sqrt(-x**S(2) + S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(-x + sqrt(-x**S(2) + S(2)*x)), x), x, -x/S(2) - sqrt(-x**S(2) + S(2)*x)/S(2) - log(-x + S(1))/S(2) + atanh(sqrt(-x**S(2) + S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(-x**S(2) + S(2)*x))/(-S(2)*x + S(2)), x), x, -x/S(2) - sqrt(-x**S(2) + S(2)*x)/S(2) - log(-x + S(1))/S(2) + atanh(sqrt(-x**S(2) + S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(x)*sqrt(-x + S(2)) + x)/(-S(2)*x + S(2)), x), x, -x/S(2) - sqrt(-x**S(2) + S(2)*x)/S(2) - log(-x + S(1))/S(2) + atanh(sqrt(-x**S(2) + S(2)*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/(-sqrt(x) + sqrt(-x + S(2))), x), x, -sqrt(x)*sqrt(-x + S(2))/S(2) - x/S(2) - log(-x + S(1))/S(2) + atanh(sqrt(x)*sqrt(-x + S(2)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*sqrt(-x + S(3)) + S(3)/sqrt(x + S(1)))**S(2)/x, x), x, -S(4)*x + S(21)*log(x) - S(9)*log(x + S(1)) - S(12)*asin(x/S(2) + S(-1)/2) - S(24)*sqrt(S(3))*atanh(sqrt(S(3))*sqrt(x + S(1))/sqrt(-x + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + x + S(-1))/(sqrt(x**S(2) + S(1)) + S(1)), x), x, x*sqrt(x**S(2) + S(1))/S(2) - x + sqrt(x**S(2) + S(1)) - log(sqrt(x**S(2) + S(1)) + S(1)) - asinh(x)/S(2) + sqrt(x**S(2) + S(1))/x - S(1)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + x + S(-1))/(x + sqrt(x**S(2) + S(1)) + S(1)), x), x, x**S(3)/S(6) + x**S(2)/S(2) + sqrt(x**S(2) + S(1))*(-S(2)*x**S(2) - S(3)*x + S(4))/S(12) - log(sqrt(x**S(2) + S(1)) + S(1))/S(2) - asinh(x)/S(4), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((x**S(2) + x + S(-1))/(x + sqrt(x**S(2) + S(1)) + S(1)), x), x, x**S(3)/S(6) + x**S(2)/S(2) - x*sqrt(x**S(2) + S(1))/S(4) + x/S(2) - (x**S(2) + S(1))**(S(3)/2)/S(6) + log(x + sqrt(x**S(2) + S(1)))/S(2) - log(x + sqrt(x**S(2) + S(1)) + S(1)) - asinh(x)/S(4) + S(1)/(S(2)*(x + sqrt(x**S(2) + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(2)*sqrt(x + S(-1)))/(x*sqrt(x + S(-1))), x), x, S(2)*sqrt(x + S(-1)) + S(2)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**(S(2)/3) + c*sqrt(x))**S(2), x), x, a**S(2)*x + S(6)*a*b*x**(S(5)/3)/S(5) + S(4)*a*c*x**(S(3)/2)/S(3) + S(3)*b**S(2)*x**(S(7)/3)/S(7) + S(12)*b*c*x**(S(13)/6)/S(13) + c**S(2)*x**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**(S(2)/3) + c*sqrt(x))**S(3), x), x, a**S(3)*x + S(9)*a**S(2)*b*x**(S(5)/3)/S(5) + S(2)*a**S(2)*c*x**(S(3)/2) + S(9)*a*b**S(2)*x**(S(7)/3)/S(7) + S(36)*a*b*c*x**(S(13)/6)/S(13) + S(3)*a*c**S(2)*x**S(2)/S(2) + b**S(3)*x**S(3)/S(3) + S(18)*b**S(2)*c*x**(S(17)/6)/S(17) + S(9)*b*c**S(2)*x**(S(8)/3)/S(8) + S(2)*c**S(3)*x**(S(5)/2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-1))/(x**S(3)*sqrt(a - b + b/x**S(2))), x), x, atanh(sqrt(a - b + b/x**S(2))/sqrt(a - b))/sqrt(a - b) + sqrt(a - b + b/x**S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-1))/(x**S(3)*sqrt(a + b*(S(-1) + x**(S(-2))))), x), x, atanh(sqrt(a - b + b/x**S(2))/sqrt(a - b))/sqrt(a - b) + sqrt(a - b + b/x**S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c + d*x)**S(2)/(a + b*x**S(3)), x), x, -a**(S(1)/3)*d*(-a**(S(1)/3)*d + S(2)*b**(S(1)/3)*c)*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(3)*b**(S(5)/3)) + a**(S(1)/3)*d*(-a**(S(1)/3)*d + S(2)*b**(S(1)/3)*c)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(6)*b**(S(5)/3)) + sqrt(S(3))*a**(S(1)/3)*d*(a**(S(1)/3)*d + S(2)*b**(S(1)/3)*c)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*b**(S(5)/3)) + c**S(2)*log(a + b*x**S(3))/(S(3)*b) + S(2)*c*d*x/b + d**S(2)*x**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(1))/((x**S(2) + S(4))*sqrt(x**S(2) + S(9))), x), x, sqrt(S(5))*atan(sqrt(S(5))*x/(S(2)*sqrt(x**S(2) + S(9))))/S(10) - sqrt(S(5))*atanh(sqrt(S(5))*sqrt(x**S(2) + S(9))/S(5))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(sqrt(-x**S(2) + S(1)) + S(1)), x), x, x**S(2)/S(2) - (-x**S(2) + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(sqrt(-x + S(1))*sqrt(x + S(1)) + S(1)), x), x, x**S(2)/S(2) - (-x**S(2) + S(1))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(1) + S(1)/(sqrt(x + S(2))*sqrt(x + S(3)))), x), x, x**S(2)/S(2) + sqrt(x + S(2))*sqrt(x + S(3)) - S(5)*asinh(sqrt(x + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x - sqrt(x**S(6)))/(x*(-x**S(4) + S(1))), x), x, atan(x)/S(2) + atanh(x)/S(2) + sqrt(x**S(6))*atan(x)/(S(2)*x**S(3)) - sqrt(x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(1) - sqrt(x**S(6))/x)/(-x**S(4) + S(1)), x), x, atan(x)/S(2) + atanh(x)/S(2) + sqrt(x**S(6))*atan(x)/(S(2)*x**S(3)) - sqrt(x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x - sqrt(x**S(6)))/(-x**S(5) + x), x), x, atan(x)/S(2) + atanh(x)/S(2) + sqrt(x**S(6))*atan(x)/(S(2)*x**S(3)) - sqrt(x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x + sqrt(x**S(6))), x), x, atan(x)/S(2) + atanh(x)/S(2) + sqrt(x**S(6))*atan(x)/(S(2)*x**S(3)) - sqrt(x**S(6))*atanh(x)/(S(2)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(x) - sqrt(x**S(3)))/(-x**S(3) + x), x), x, atan(sqrt(x)) + atanh(sqrt(x)) + sqrt(x**S(3))*atan(sqrt(x))/x**(S(3)/2) - sqrt(x**S(3))*atanh(sqrt(x))/x**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x) + sqrt(x**S(3))), x), x, atan(sqrt(x)) + atanh(sqrt(x)) + sqrt(x**S(3))*atan(sqrt(x))/x**(S(3)/2) - sqrt(x**S(3))*atanh(sqrt(x))/x**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x + S(-1)) + sqrt((x + S(-1))**S(3))), x), x, atan(sqrt(x + S(-1))) + atanh(sqrt(x + S(-1))) + sqrt((x + S(-1))**S(3))*atan(sqrt(x + S(-1)))/(x + S(-1))**(S(3)/2) - sqrt((x + S(-1))**S(3))*atanh(sqrt(x + S(-1)))/(x + S(-1))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(4)*x + S(-5))/((S(5)*x + S(4))**S(2)*sqrt(-x**S(2) + S(1))) - S(3)/(S(5)*x + S(4))**S(2), x), x, sqrt(-x**S(2) + S(1))/(S(5)*x + S(4)) + S(3)/(S(5)*(S(5)*x + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(4)*x - S(3)*sqrt(-x**S(2) + S(1)) + S(-5))/((S(5)*x + S(4))**S(2)*sqrt(-x**S(2) + S(1))), x), x, sqrt(-x**S(2) + S(1))/(S(5)*x + S(4)) + S(3)/(S(5)*(S(5)*x + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-S(3)*x**S(2) + (-S(4)*x + S(-5))*sqrt(-x**S(2) + S(1)) + S(3)), x), x, sqrt(-x**S(2) + S(1))/(S(5)*x + S(4)) + S(3)/(S(5)*(S(5)*x + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-S(3)*x**S(2) - S(4)*x*sqrt(-x**S(2) + S(1)) - S(5)*sqrt(-x**S(2) + S(1)) + S(3)), x), x, sqrt(-x**S(2) + S(1))/(S(5)*x + S(4)) + S(3)/(S(5)*(S(5)*x + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(-x**S(2) + S(1)) + S(-1))/(sqrt(-x**S(2) + S(1))*(x - S(2)*sqrt(-x**S(2) + S(1)) + S(2))**S(2)), x), x, sqrt(-x**S(2) + S(1))/(S(5)*x + S(4)) + S(3)/(S(5)*(S(5)*x + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**(n + S(-1)))/(c*x + d*x**n), x), x, b*log(x)/d - (-a*d + b*c)*log(c*x**(-n + S(1)) + d)/(c*d*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(5) + S(2)*x**S(3) - x)/(x**S(4) + S(2)*x**S(2) + S(3))**S(2), x), x, (-S(7)*x**S(2)/S(8) + S(5)/8)/(x**S(4) + S(2)*x**S(2) + S(3)) + S(9)*sqrt(S(2))*atan(sqrt(S(2))*(x**S(2) + S(1))/S(2))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(5) + x)/(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**S(3), x), x, (x**S(2)/S(4) + S(3)/16)/(S(2)*x**S(4) + S(2)*x**S(2) + S(1))**S(2) + (x**S(2) + S(1)/2)/(S(2)*x**S(4) + S(2)*x**S(2) + S(1)) + atan(S(2)*x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x + c*x**S(2))/(d + e*x**S(2) + f*x**S(4)), x), x, -b*atanh((e + S(2)*f*x**S(2))/sqrt(-S(4)*d*f + e**S(2)))/sqrt(-S(4)*d*f + e**S(2)) + sqrt(S(2))*(c + (-S(2)*a*f + c*e)/sqrt(-S(4)*d*f + e**S(2)))*atan(sqrt(S(2))*sqrt(f)*x/sqrt(e + sqrt(-S(4)*d*f + e**S(2))))/(S(2)*sqrt(f)*sqrt(e + sqrt(-S(4)*d*f + e**S(2)))) + sqrt(S(2))*(c + (S(2)*a*f - c*e)/sqrt(-S(4)*d*f + e**S(2)))*atan(sqrt(S(2))*sqrt(f)*x/sqrt(e - sqrt(-S(4)*d*f + e**S(2))))/(S(2)*sqrt(f)*sqrt(e - sqrt(-S(4)*d*f + e**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d + e*x)**S(2)/(a + b*x**S(2) + c*x**S(4)), x), x, -S(2)*d*e*atanh((b + S(2)*c*x**S(2))/sqrt(-S(4)*a*c + b**S(2)))/sqrt(-S(4)*a*c + b**S(2)) + sqrt(S(2))*(e**S(2) + (b*e**S(2) - S(2)*c*d**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b + sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b + sqrt(-S(4)*a*c + b**S(2)))) + sqrt(S(2))*(e**S(2) + (-b*e**S(2) + S(2)*c*d**S(2))/sqrt(-S(4)*a*c + b**S(2)))*atan(sqrt(S(2))*sqrt(c)*x/sqrt(b - sqrt(-S(4)*a*c + b**S(2))))/(S(2)*sqrt(c)*sqrt(b - sqrt(-S(4)*a*c + b**S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x**S(2) + S(1))/(sqrt(S(2)*x**S(2) + S(1)) + S(1)), x), x, x - sqrt(S(2))*asinh(sqrt(S(2))*x)/S(2) + sqrt(S(2)*x**S(2) + S(1))/(S(2)*x) - S(1)/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(4)*x**S(2) + S(-1))/(x + sqrt(S(4)*x**S(2) + S(-1))), x), x, S(4)*x/S(3) - sqrt(S(4)*x**S(2) + S(-1))/S(3) - sqrt(S(3))*atanh(sqrt(S(3))*x)/S(9) + sqrt(S(3))*atanh(sqrt(S(3))*sqrt(S(4)*x**S(2) + S(-1)))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((a + b*x)*(c + d*x)), x), x, a**S(2)*log(a + b*x)/(b**S(2)*(-a*d + b*c)) - c**S(2)*log(c + d*x)/(d**S(2)*(-a*d + b*c)) + x/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((a + b*x**S(2))*(c + d*x)), x), x, -sqrt(a)*c*atan(sqrt(b)*x/sqrt(a))/(sqrt(b)*(a*d**S(2) + b*c**S(2))) + a*d*log(a + b*x**S(2))/(S(2)*b*(a*d**S(2) + b*c**S(2))) + c**S(2)*log(c + d*x)/(d*(a*d**S(2) + b*c**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((a + b*x**S(3))*(c + d*x)), x), x, a**(S(1)/3)*d*(a**(S(1)/3)*d + b**(S(1)/3)*c)*log(a**(S(1)/3) + b**(S(1)/3)*x)/(S(3)*b**(S(2)/3)*(-a*d**S(3) + b*c**S(3))) - a**(S(1)/3)*d*(a**(S(1)/3)*d + b**(S(1)/3)*c)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*x + b**(S(2)/3)*x**S(2))/(S(6)*b**(S(2)/3)*(-a*d**S(3) + b*c**S(3))) - sqrt(S(3))*a**(S(1)/3)*d*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*x)/(S(3)*a**(S(1)/3)))/(S(3)*b**(S(2)/3)*(a**(S(2)/3)*d**S(2) + a**(S(1)/3)*b**(S(1)/3)*c*d + b**(S(2)/3)*c**S(2))) + c**S(2)*log(a + b*x**S(3))/(S(3)*(-a*d**S(3) + b*c**S(3))) - c**S(2)*log(c + d*x)/(-a*d**S(3) + b*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((a + b*x**S(4))*(c + d*x)), x), x, sqrt(a)*d**S(3)*atan(sqrt(b)*x**S(2)/sqrt(a))/(S(2)*sqrt(b)*(a*d**S(4) + b*c**S(4))) - c**S(2)*d*log(a + b*x**S(4))/(S(4)*(a*d**S(4) + b*c**S(4))) + c**S(2)*d*log(c + d*x)/(a*d**S(4) + b*c**S(4)) - sqrt(S(2))*c*(-sqrt(a)*d**S(2) + sqrt(b)*c**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*x/a**(S(1)/4))/(S(4)*a**(S(1)/4)*b**(S(1)/4)*(a*d**S(4) + b*c**S(4))) + sqrt(S(2))*c*(-sqrt(a)*d**S(2) + sqrt(b)*c**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*x/a**(S(1)/4))/(S(4)*a**(S(1)/4)*b**(S(1)/4)*(a*d**S(4) + b*c**S(4))) + sqrt(S(2))*c*(sqrt(a)*d**S(2) + sqrt(b)*c**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*x + sqrt(a) + sqrt(b)*x**S(2))/(S(8)*a**(S(1)/4)*b**(S(1)/4)*(a*d**S(4) + b*c**S(4))) - sqrt(S(2))*c*(sqrt(a)*d**S(2) + sqrt(b)*c**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*x + sqrt(a) + sqrt(b)*x**S(2))/(S(8)*a**(S(1)/4)*b**(S(1)/4)*(a*d**S(4) + b*c**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/((-x + S(1))*(x + S(1))**S(2)), x), x, atanh(x)/S(2) + S(1)/(S(2)*(x + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/((-x**S(2) + S(1))*(x**S(2) + S(1))**S(2)), x), x, -x/(S(4)*(x**S(2) + S(1))) + atanh(x)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/((-x**S(3) + S(1))*(x**S(3) + S(1))**S(2)), x), x, -x/(S(6)*(x**S(3) + S(1))) - log(-x + S(1))/S(12) - log(x + S(1))/S(36) + log(x**S(2) - x + S(1))/S(72) + log(x**S(2) + x + S(1))/S(24) + sqrt(S(3))*atan(sqrt(S(3))*(-S(2)*x + S(1))/S(3))/S(36) + sqrt(S(3))*atan(sqrt(S(3))*(S(2)*x + S(1))/S(3))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x + c*x**S(2))/((d + e*x)**S(3)*sqrt(x**S(2) + S(-1))), x), x, (a*(S(2)*d**S(2) + e**S(2))/S(2) - S(3)*b*d*e/S(2) + c*(d**S(2) + S(2)*e**S(2))/S(2))*atanh((d*x + e)/(sqrt(d**S(2) - e**S(2))*sqrt(x**S(2) + S(-1))))/(d**S(2) - e**S(2))**(S(5)/2) + sqrt(x**S(2) + S(-1))*(c*(d**S(3) - S(4)*d*e**S(2))/S(2) - e*(S(3)*a*d*e - b*(d**S(2) + S(2)*e**S(2)))/S(2))/(e*(d + e*x)*(d**S(2) - e**S(2))**S(2)) - sqrt(x**S(2) + S(-1))*(a*e**S(2)/S(2) - b*d*e/S(2) + c*d**S(2)/S(2))/(e*(d + e*x)**S(2)*(d**S(2) - e**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x + c*x**S(2))/((d + e*x)**S(3)*sqrt(x + S(-1))*sqrt(x + S(1))), x), x, (-S(3)*b*d*e + d**S(2)*(S(2)*a + c) + e**S(2)*(a + S(2)*c))*atanh(sqrt(d + e)*sqrt(x + S(1))/(sqrt(d - e)*sqrt(x + S(-1))))/((d - e)**(S(5)/2)*(d + e)**(S(5)/2)) + sqrt(x + S(-1))*sqrt(x + S(1))*(b*d**S(2)*e/S(2) + b*e**S(3) + c*d**S(3)/S(2) - d*e**S(2)*(S(3)*a + S(4)*c)/S(2))/(e*(d + e*x)*(d**S(2) - e**S(2))**S(2)) - sqrt(x + S(-1))*sqrt(x + S(1))*(a*e**S(2)/S(2) - b*d*e/S(2) + c*d**S(2)/S(2))/(e*(d + e*x)**S(2)*(d**S(2) - e**S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*x + c*x**S(2))/((d + e*x)**S(3)*sqrt(x + S(-1))*sqrt(x + S(1))), x), x, S(2)*c*atanh(sqrt(d + e)*sqrt(x + S(1))/(sqrt(d - e)*sqrt(x + S(-1))))/(e**S(2)*sqrt(d - e)*sqrt(d + e)) - S(3)*d*sqrt(x + S(-1))*sqrt(x + S(1))*(a*e**S(2) - b*d*e + c*d**S(2))/(S(2)*e*(d + e*x)*(d**S(2) - e**S(2))**S(2)) - S(2)*d*(-b*e + S(2)*c*d)*atanh(sqrt(d + e)*sqrt(x + S(1))/(sqrt(d - e)*sqrt(x + S(-1))))/(e**S(2)*(d - e)**(S(3)/2)*(d + e)**(S(3)/2)) + sqrt(x + S(-1))*sqrt(x + S(1))*(-b*e + S(2)*c*d)/(e*(d + e*x)*(d**S(2) - e**S(2))) - sqrt(x + S(-1))*sqrt(x + S(1))*(a*e**S(2)/S(2) - b*d*e/S(2) + c*d**S(2)/S(2))/(e*(d + e*x)**S(2)*(d**S(2) - e**S(2))) + (S(2)*d**S(2) + e**S(2))*(a*e**S(2) - b*d*e + c*d**S(2))*atanh(sqrt(d + e)*sqrt(x + S(1))/(sqrt(d - e)*sqrt(x + S(-1))))/(e**S(2)*(d - e)**(S(5)/2)*(d + e)**(S(5)/2)), expand=True, _diff=True, _numerical=True) def test_4(): assert rubi_test(rubi_integrate((b + S(2)*c*x + S(3)*d*x**S(2))*(a + b*x + c*x**S(2) + d*x**S(3))**n, x), x, (a + b*x + c*x**S(2) + d*x**S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x + S(3)*d*x**S(2))*(b*x + c*x**S(2) + d*x**S(3))**n, x), x, (b*x + c*x**S(2) + d*x**S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**n*(b + c*x + d*x**S(2))**n*(b + S(2)*c*x + S(3)*d*x**S(2)), x), x, x**(n + S(1))*(b + c*x + d*x**S(2))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(3)*d*x**S(2))*(a + b*x + d*x**S(3))**n, x), x, (a + b*x + d*x**S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(3)*d*x**S(2))*(b*x + d*x**S(3))**n, x), x, (b*x + d*x**S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**n*(b + d*x**S(2))**n*(b + S(3)*d*x**S(2)), x), x, x**(n + S(1))*(b + d*x**S(2))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*c*x + S(3)*d*x**S(2))*(a + c*x**S(2) + d*x**S(3))**n, x), x, (a + c*x**S(2) + d*x**S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*c*x + S(3)*d*x**S(2))*(c*x**S(2) + d*x**S(3))**n, x), x, (c*x**S(2) + d*x**S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**n*(c*x + d*x**S(2))**n*(S(2)*c*x + S(3)*d*x**S(2)), x), x, x**(n + S(1))*(c*x + d*x**S(2))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*n)*(c + d*x)**n*(S(2)*c*x + S(3)*d*x**S(2)), x), x, x**(S(2)*n + S(2))*(c + d*x)**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(2)*c + S(3)*d*x)*(a + c*x**S(2) + d*x**S(3))**n, x), x, (a + c*x**S(2) + d*x**S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(2)*c + S(3)*d*x)*(c*x**S(2) + d*x**S(3))**n, x), x, (c*x**S(2) + d*x**S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x + S(3)*d*x**S(2))*(a + b*x + c*x**S(2) + d*x**S(3))**S(7), x), x, (a + b*x + c*x**S(2) + d*x**S(3))**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x + S(3)*d*x**S(2))*(b*x + c*x**S(2) + d*x**S(3))**S(7), x), x, x**S(8)*(b + c*x + d*x**S(2))**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(b + c*x + d*x**S(2))**S(7)*(b + S(2)*c*x + S(3)*d*x**S(2)), x), x, x**S(8)*(b + c*x + d*x**S(2))**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(3)*d*x**S(2))*(a + b*x + d*x**S(3))**S(7), x), x, (a + b*x + d*x**S(3))**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(b + d*x**S(2))**S(7)*(b + S(3)*d*x**S(2)), x), x, x**S(8)*(b + d*x**S(2))**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(3)*d*x**S(2))*(b*x + d*x**S(3))**S(7), x), x, x**S(8)*(b + d*x**S(2))**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*c*x + S(3)*d*x**S(2))*(a + c*x**S(2) + d*x**S(3))**S(7), x), x, (a + c*x**S(2) + d*x**S(3))**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*c*x + S(3)*d*x**S(2))*(c*x**S(2) + d*x**S(3))**S(7), x), x, x**S(16)*(c + d*x)**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(7)*(c*x + d*x**S(2))**S(7)*(S(2)*c*x + S(3)*d*x**S(2)), x), x, x**S(16)*(c + d*x)**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(14)*(c + d*x)**S(7)*(S(2)*c*x + S(3)*d*x**S(2)), x), x, x**S(16)*(c + d*x)**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(2)*c + S(3)*d*x)*(a + c*x**S(2) + d*x**S(3))**S(7), x), x, (a + c*x**S(2) + d*x**S(3))**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(S(2)*c + S(3)*d*x)*(c*x**S(2) + d*x**S(3))**S(7), x), x, x**S(16)*(c + d*x)**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*(S(2)*c + S(3)*d*x)*(c*x + d*x**S(2))**S(7), x), x, x**S(16)*(c + d*x)**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(15)*(c + d*x)**S(7)*(S(2)*c + S(3)*d*x), x), x, x**S(16)*(c + d*x)**S(8)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*((a*x + b*x**S(2)/S(2))**S(4) + S(1)), x), x, a*x + b*x**S(2)/S(2) + (a*x + b*x**S(2)/S(2))**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*((a*x + b*x**S(2)/S(2) + c)**S(4) + S(1)), x), x, a*x + b*x**S(2)/S(2) + (a*x + b*x**S(2)/S(2) + c)**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*((a*x + b*x**S(2)/S(2))**n + S(1)), x), x, a*x + b*x**S(2)/S(2) + (a*x + b*x**S(2)/S(2))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x)*((a*x + b*x**S(2)/S(2) + c)**n + S(1)), x), x, a*x + b*x**S(2)/S(2) + (a*x + b*x**S(2)/S(2) + c)**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**S(2))*((a*x + c*x**S(3)/S(3))**S(5) + S(1)), x), x, a*x + c*x**S(3)/S(3) + (a*x + c*x**S(3)/S(3))**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**S(2))*((a*x + c*x**S(3)/S(3) + d)**S(5) + S(1)), x), x, a*x + c*x**S(3)/S(3) + (a*x + c*x**S(3)/S(3) + d)**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x + c*x**S(2))*((b*x**S(2)/S(2) + c*x**S(3)/S(3))**S(5) + S(1)), x), x, b*x**S(2)/S(2) + c*x**S(3)/S(3) + (b*x**S(2)/S(2) + c*x**S(3)/S(3))**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x + c*x**S(2))*((b*x**S(2)/S(2) + c*x**S(3)/S(3) + d)**S(5) + S(1)), x), x, b*x**S(2)/S(2) + c*x**S(3)/S(3) + (b*x**S(2)/S(2) + c*x**S(3)/S(3) + d)**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3))**S(5) + S(1))*(a + b*x + c*x**S(2)), x), x, a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3) + (a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3))**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3) + d)**S(5) + S(1))*(a + b*x + c*x**S(2)), x), x, a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3) + (a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3) + d)**S(6)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + c*x**S(2))*((a*x + c*x**S(3)/S(3))**n + S(1)), x), x, a*x + c*x**S(3)/S(3) + (a*x + c*x**S(3)/S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x + c*x**S(2))*((b*x**S(2)/S(2) + c*x**S(3)/S(3))**n + S(1)), x), x, b*x**S(2)/S(2) + c*x**S(3)/S(3) + (b*x**S(2)/S(2) + c*x**S(3)/S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3))**n + S(1))*(a + b*x + c*x**S(2)), x), x, a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3) + (a*x + b*x**S(2)/S(2) + c*x**S(3)/S(3))**(n + S(1))/(n + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(b*x + c*x**S(2))**S(13), x), x, (b*x + c*x**S(2))**S(14)/S(14), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(14)*(b + S(2)*c*x**S(2))*(b*x + c*x**S(3))**S(13), x), x, x**S(28)*(b + c*x**S(2))**S(14)/S(28), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(28)*(b + S(2)*c*x**S(3))*(b*x + c*x**S(4))**S(13), x), x, x**S(42)*(b + c*x**S(3))**S(14)/S(42), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(14)*n + S(-14))*(b + S(2)*c*x**n)*(b*x + c*x**(n + S(1)))**S(13), x), x, x**(S(14)*n)*(b + c*x**n)**S(14)/(S(14)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)/(b*x + c*x**S(2)), x), x, log(b*x + c*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x**S(2))/(b*x + c*x**S(3)), x), x, log(x) + log(b + c*x**S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x**S(3))/(b*x + c*x**S(4)), x), x, log(x) + log(b + c*x**S(3))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x**n)/(b*x + c*x**(n + S(1))), x), x, log(x) + log(b + c*x**n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)/(b*x + c*x**S(2))**S(8), x), x, -S(1)/(S(7)*(b*x + c*x**S(2))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x**S(2))/(x**S(7)*(b*x + c*x**S(3))**S(8)), x), x, -S(1)/(S(14)*x**S(14)*(b + c*x**S(2))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x**S(3))/(x**S(14)*(b*x + c*x**S(4))**S(8)), x), x, -S(1)/(S(21)*x**S(21)*(b + c*x**S(3))**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-S(7)*n + S(7))*(b + S(2)*c*x**n)/(b*x + c*x**(n + S(1)))**S(8), x), x, -x**(-S(7)*n)/(S(7)*n*(b + c*x**n)**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b + S(2)*c*x)*(b*x + c*x**S(2))**p, x), x, (b*x + c*x**S(2))**(p + S(1))/(p + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(p + S(1))*(b + S(2)*c*x**S(2))*(b*x + c*x**S(3))**p, x), x, x**(p + S(1))*(b*x + c*x**S(3))**(p + S(1))/(S(2)*p + S(2)), expand=True, _diff=True, _numerical=True) # fails in mathematica too assert rubi_test(rubi_integrate(b*x**(p + S(1))*(b*x + c*x**S(3))**p + S(2)*c*x**(p + S(3))*(b*x + c*x**S(3))**p, x), x, x**(p + S(1))*(b*x + c*x**S(3))**(p + S(1))/(S(2)*p + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(S(2)*p + S(2))*(b + S(2)*c*x**S(3))*(b*x + c*x**S(4))**p, x), x, x**(S(2)*p + S(2))*(b*x + c*x**S(4))**(p + S(1))/(S(3)*p + S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**((n + S(-1))*(p + S(1)))*(b + S(2)*c*x**n)*(b*x + c*x**(n + S(1)))**p, x), x, x**(-(-n + S(1))*(p + S(1)))*(b*x + c*x**(n + S(1)))**(p + S(1))/(n*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(4)*x + S(-4))*(x**S(3) + S(6)*x**S(2) - S(12)*x + S(5)), x), x, (x**S(3) + S(6)*x**S(2) - S(12)*x + S(5))**S(2)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(2)*x)*(x**S(4) + S(4)*x**S(2) + S(1)), x), x, (x**S(4) + S(4)*x**S(2) + S(1))**S(2)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x + S(1))*(x**S(2) + x)**S(3)*(S(7)*(x**S(2) + x)**S(3) + S(-18))**S(2), x), x, S(49)*x**S(10)*(x + S(1))**S(10)/S(10) - S(36)*x**S(7)*(x + S(1))**S(7) + S(81)*x**S(4)*(x + S(1))**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(x + S(1))**S(3)*(S(2)*x + S(1))*(S(7)*x**S(3)*(x + S(1))**S(3) + S(-18))**S(2), x), x, S(49)*x**S(10)*(x + S(1))**S(10)/S(10) - S(36)*x**S(7)*(x + S(1))**S(7) + S(81)*x**S(4)*(x + S(1))**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(2))/(x**S(3) - S(6)*x + S(1))**S(5), x), x, S(1)/(S(12)*(x**S(3) - S(6)*x + S(1))**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(2)*x)/(x**S(3) + S(3)*x**S(2) + S(4)), x), x, log(x**S(3) + S(3)*x**S(2) + S(4))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + x + S(1))/(x**S(4) + S(2)*x**S(2) + S(4)*x), x), x, log(x*(x**S(3) + S(2)*x + S(4)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(-1))/(x**S(4) - S(4)*x)**(S(2)/3), x), x, S(3)*(x**S(4) - S(4)*x)**(S(1)/3)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(2) + S(2))*(-x**S(3) + S(6)*x)**(S(1)/4), x), x, S(4)*(-x**S(3) + S(6)*x)**(S(5)/4)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(4) + S(1))*sqrt(x**S(5) + S(5)*x), x), x, S(2)*(x**S(5) + S(5)*x)**(S(3)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(5)*x**S(4) + S(2))*sqrt(x**S(5) + S(2)*x), x), x, S(2)*(x**S(5) + S(2)*x)**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(2) + x)/sqrt(S(2)*x**S(3) + x**S(2)), x), x, sqrt(S(2)*x**S(3) + x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((-S(5)*x + S(1))**(S(1)/3) + S(2))/((-S(5)*x + S(1))**(S(1)/3) + S(3)), x), x, x + S(3)*(-S(5)*x + S(1))**(S(2)/3)/S(10) - S(9)*(-S(5)*x + S(1))**(S(1)/3)/S(5) + S(27)*log((-S(5)*x + S(1))**(S(1)/3) + S(3))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(x) + S(1))/(sqrt(x) + S(-1)), x), x, S(4)*sqrt(x) + x + S(4)*log(-sqrt(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-sqrt(S(3)*x + S(2)) + S(1))/(sqrt(S(3)*x + S(2)) + S(1)), x), x, -x + S(4)*sqrt(S(3)*x + S(2))/S(3) - S(4)*log(sqrt(S(3)*x + S(2)) + S(1))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sqrt(a + b*x) + S(-1))/(sqrt(a + b*x) + S(1)), x), x, x - S(4)*sqrt(a + b*x)/b + S(4)*log(sqrt(a + b*x) + S(1))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*n*x**(n + S(-1)))/(a*x + b*x**n), x), x, log(a*x + b*x**n), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a + b*n*x**(n + S(-1)))/(a*x + b*x**n), x), x, n*log(x) + log(a*x**(-n + S(1)) + b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(-n)*(a + b*n*x**(n + S(-1)))/(a*x**(-n + S(1)) + b), x), x, n*log(x) + log(a*x**(-n + S(1)) + b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*(c + d*x)**S(3)), x), x, -c*log(a + b*(c + d*x)**S(3))/(b*d**S(4)) + x/(b*d**S(3)) + sqrt(S(3))*(-S(3)*a**(S(1)/3)*b**(S(2)/3)*c**S(2) + a + b*c**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*b**(S(4)/3)*d**S(4)) - (S(3)*a**(S(1)/3)*b**(S(2)/3)*c**S(2) + a + b*c**S(3))*log(a**(S(1)/3) + b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(2)/3)*b**(S(4)/3)*d**S(4)) + (S(3)*a**(S(1)/3)*b**(S(2)/3)*c**S(2) + a + b*c**S(3))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c + d*x) + b**(S(2)/3)*(c + d*x)**S(2))/(S(6)*a**(S(2)/3)*b**(S(4)/3)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*(c + d*x)**S(3)), x), x, log(a + b*(c + d*x)**S(3))/(S(3)*b*d**S(3)) + sqrt(S(3))*c*(S(2)*a**(S(1)/3) - b**(S(1)/3)*c)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*b**(S(2)/3)*d**S(3)) + c*(S(2)*a**(S(1)/3) + b**(S(1)/3)*c)*log(a**(S(1)/3) + b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(2)/3)*b**(S(2)/3)*d**S(3)) - c*(S(2)*a**(S(1)/3) + b**(S(1)/3)*c)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c + d*x) + b**(S(2)/3)*(c + d*x)**S(2))/(S(6)*a**(S(2)/3)*b**(S(2)/3)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*(c + d*x)**S(3)), x), x, -sqrt(S(3))*(a**(S(1)/3) - b**(S(1)/3)*c)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*b**(S(2)/3)*d**S(2)) - (a**(S(1)/3) + b**(S(1)/3)*c)*log(a**(S(1)/3) + b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(2)/3)*b**(S(2)/3)*d**S(2)) + (a**(S(1)/3) + b**(S(1)/3)*c)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c + d*x) + b**(S(2)/3)*(c + d*x)**S(2))/(S(6)*a**(S(2)/3)*b**(S(2)/3)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*(c + d*x)**S(3)), x), x, log(a**(S(1)/3) + b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(2)/3)*b**(S(1)/3)*d) - log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c + d*x) + b**(S(2)/3)*(c + d*x)**S(2))/(S(6)*a**(S(2)/3)*b**(S(1)/3)*d) - sqrt(S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*b**(S(1)/3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*(c + d*x)**S(3))), x), x, log(x)/(a + b*c**S(3)) + sqrt(S(3))*b**(S(1)/3)*c*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*c + b**(S(2)/3)*c**S(2))) - (S(2)*a**(S(1)/3) - b**(S(1)/3)*c)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c + d*x) + b**(S(2)/3)*(c + d*x)**S(2))/(S(6)*a**(S(2)/3)*(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*c + b**(S(2)/3)*c**S(2))) - log(a**(S(1)/3) + b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(2)/3)*(a**(S(1)/3) + b**(S(1)/3)*c)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/(x*(a + b*(c + d*x)**S(3))), x), x, -log(a + b*(c + d*x)**S(3))/(S(3)*a + S(3)*b*c**S(3)) + log(x)/(a + b*c**S(3)) + b**(S(1)/3)*c*(a**(S(1)/3) - b**(S(1)/3)*c)*log(a**(S(1)/3) + b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(2)/3)*(a + b*c**S(3))) - b**(S(1)/3)*c*(a**(S(1)/3) - b**(S(1)/3)*c)*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c + d*x) + b**(S(2)/3)*(c + d*x)**S(2))/(S(6)*a**(S(2)/3)*(a + b*c**S(3))) + sqrt(S(3))*b**(S(1)/3)*c*(a**(S(1)/3) + b**(S(1)/3)*c)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*(a + b*c**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*(c + d*x)**S(3))), x), x, -S(3)*b*c**S(2)*d*log(x)/(a + b*c**S(3))**S(2) + b*c**S(2)*d*log(a + b*(c + d*x)**S(3))/(a + b*c**S(3))**S(2) - S(1)/(x*(a + b*c**S(3))) + sqrt(S(3))*b**(S(1)/3)*d*(a**(S(1)/3) - b**(S(1)/3)*c)*(a**(S(1)/3) + b**(S(1)/3)*c)**S(3)*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*(a + b*c**S(3))**S(2)) + b**(S(1)/3)*d*(a**(S(1)/3)*(a - S(2)*b*c**S(3)) - b**(S(1)/3)*(S(2)*a*c - b*c**S(4)))*log(a**(S(1)/3) + b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(2)/3)*(a + b*c**S(3))**S(2)) - b**(S(1)/3)*d*(a**(S(1)/3)*(a - S(2)*b*c**S(3)) - b**(S(1)/3)*(S(2)*a*c - b*c**S(4)))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c + d*x) + b**(S(2)/3)*(c + d*x)**S(2))/(S(6)*a**(S(2)/3)*(a + b*c**S(3))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*(c + d*x)**S(3))), x), x, S(3)*b*c**S(2)*d/(x*(a + b*c**S(3))**S(2)) - S(3)*b*c*d**S(2)*(a - S(2)*b*c**S(3))*log(x)/(a + b*c**S(3))**S(3) + b*c*d**S(2)*(a - S(2)*b*c**S(3))*log(a + b*(c + d*x)**S(3))/(a + b*c**S(3))**S(3) - S(1)/(x**S(2)*(S(2)*a + S(2)*b*c**S(3))) + sqrt(S(3))*b**(S(2)/3)*d**S(2)*(a**(S(1)/3) + b**(S(1)/3)*c)**S(3)*(-S(3)*a**(S(2)/3)*b**(S(1)/3)*c + a + b*c**S(3))*atan(sqrt(S(3))*(a**(S(1)/3) - S(2)*b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(1)/3)))/(S(3)*a**(S(2)/3)*(a + b*c**S(3))**S(3)) - b**(S(2)/3)*d**S(2)*(S(6)*a**(S(4)/3)*b**(S(2)/3)*c**S(2) - S(3)*a**(S(1)/3)*b**(S(5)/3)*c**S(5) + a**S(2) - S(7)*a*b*c**S(3) + b**S(2)*c**S(6))*log(a**(S(1)/3) + b**(S(1)/3)*(c + d*x))/(S(3)*a**(S(2)/3)*(a + b*c**S(3))**S(3)) + b**(S(2)/3)*d**S(2)*(S(6)*a**(S(4)/3)*b**(S(2)/3)*c**S(2) - S(3)*a**(S(1)/3)*b**(S(5)/3)*c**S(5) + a**S(2) - S(7)*a*b*c**S(3) + b**S(2)*c**S(6))*log(a**(S(2)/3) - a**(S(1)/3)*b**(S(1)/3)*(c + d*x) + b**(S(2)/3)*(c + d*x)**S(2))/(S(6)*a**(S(2)/3)*(a + b*c**S(3))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*(c + d*x)**S(4)), x), x, log(a + b*(c + d*x)**S(4))/(S(4)*b*d**S(4)) + S(3)*c**S(2)*atan(sqrt(b)*(c + d*x)**S(2)/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)*d**S(4)) - sqrt(S(2))*c*(S(3)*sqrt(a) - sqrt(b)*c**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*b**(S(3)/4)*d**S(4)) + sqrt(S(2))*c*(S(3)*sqrt(a) - sqrt(b)*c**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*b**(S(3)/4)*d**S(4)) + sqrt(S(2))*c*(S(3)*sqrt(a) + sqrt(b)*c**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(3)/4)*d**S(4)) - sqrt(S(2))*c*(S(3)*sqrt(a) + sqrt(b)*c**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(3)/4)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*(c + d*x)**S(4)), x), x, -c*atan(sqrt(b)*(c + d*x)**S(2)/sqrt(a))/(sqrt(a)*sqrt(b)*d**S(3)) + sqrt(S(2))*(sqrt(a) - sqrt(b)*c**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*b**(S(3)/4)*d**S(3)) - sqrt(S(2))*(sqrt(a) - sqrt(b)*c**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*b**(S(3)/4)*d**S(3)) - sqrt(S(2))*(sqrt(a) + sqrt(b)*c**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(3)/4)*d**S(3)) + sqrt(S(2))*(sqrt(a) + sqrt(b)*c**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(3)/4)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*(c + d*x)**S(4)), x), x, atan(sqrt(b)*(c + d*x)**S(2)/sqrt(a))/(S(2)*sqrt(a)*sqrt(b)*d**S(2)) + sqrt(S(2))*c*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*b**(S(1)/4)*d**S(2)) - sqrt(S(2))*c*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*b**(S(1)/4)*d**S(2)) + sqrt(S(2))*c*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(1)/4)*d**S(2)) - sqrt(S(2))*c*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(1)/4)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*(c + d*x)**S(4)), x), x, -sqrt(S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*b**(S(1)/4)*d) + sqrt(S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*b**(S(1)/4)*d) - sqrt(S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(1)/4)*d) + sqrt(S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*b**(S(1)/4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*(c + d*x)**S(4))), x), x, -log(a + b*(c + d*x)**S(4))/(S(4)*a + S(4)*b*c**S(4)) + log(x)/(a + b*c**S(4)) - sqrt(b)*c**S(2)*atan(sqrt(b)*(c + d*x)**S(2)/sqrt(a))/(S(2)*sqrt(a)*(a + b*c**S(4))) - sqrt(S(2))*b**(S(1)/4)*c*(sqrt(a) - sqrt(b)*c**S(2))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*(a + b*c**S(4))) + sqrt(S(2))*b**(S(1)/4)*c*(sqrt(a) - sqrt(b)*c**S(2))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*(a + b*c**S(4))) + sqrt(S(2))*b**(S(1)/4)*c*(sqrt(a) + sqrt(b)*c**S(2))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*(a + b*c**S(4))) - sqrt(S(2))*b**(S(1)/4)*c*(sqrt(a) + sqrt(b)*c**S(2))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*(a + b*c**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*(c + d*x)**S(4))), x), x, -S(4)*b*c**S(3)*d*log(x)/(a + b*c**S(4))**S(2) + b*c**S(3)*d*log(a + b*(c + d*x)**S(4))/(a + b*c**S(4))**S(2) - S(1)/(x*(a + b*c**S(4))) - sqrt(b)*c*d*(a - b*c**S(4))*atan(sqrt(b)*(c + d*x)**S(2)/sqrt(a))/(sqrt(a)*(a + b*c**S(4))**S(2)) + sqrt(S(2))*b**(S(1)/4)*d*(sqrt(a)*(a - S(3)*b*c**S(4)) + sqrt(b)*c**S(2)*(S(3)*a - b*c**S(4)))*atan(S(1) - sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*(a + b*c**S(4))**S(2)) - sqrt(S(2))*b**(S(1)/4)*d*(sqrt(a)*(a - S(3)*b*c**S(4)) + sqrt(b)*c**S(2)*(S(3)*a - b*c**S(4)))*atan(S(1) + sqrt(S(2))*b**(S(1)/4)*(c + d*x)/a**(S(1)/4))/(S(4)*a**(S(3)/4)*(a + b*c**S(4))**S(2)) - sqrt(S(2))*b**(S(1)/4)*d*(a**(S(3)/2) - S(3)*sqrt(a)*b*c**S(4) - S(3)*a*sqrt(b)*c**S(2) + b**(S(3)/2)*c**S(6))*log(-sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*(a + b*c**S(4))**S(2)) + sqrt(S(2))*b**(S(1)/4)*d*(a**(S(3)/2) - S(3)*sqrt(a)*b*c**S(4) - S(3)*a*sqrt(b)*c**S(2) + b**(S(3)/2)*c**S(6))*log(sqrt(S(2))*a**(S(1)/4)*b**(S(1)/4)*(c + d*x) + sqrt(a) + sqrt(b)*(c + d*x)**S(2))/(S(8)*a**(S(3)/4)*(a + b*c**S(4))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*sqrt(c + d*x))**S(2), x), x, -a**S(2)*c**S(3)*x/d**S(3) - S(4)*a*b*c**S(3)*(c + d*x)**(S(3)/2)/(S(3)*d**S(4)) + S(12)*a*b*c**S(2)*(c + d*x)**(S(5)/2)/(S(5)*d**S(4)) - S(12)*a*b*c*(c + d*x)**(S(7)/2)/(S(7)*d**S(4)) + S(4)*a*b*(c + d*x)**(S(9)/2)/(S(9)*d**S(4)) + b**S(2)*(c + d*x)**S(5)/(S(5)*d**S(4)) + c**S(2)*(S(3)*a**S(2) - b**S(2)*c)*(c + d*x)**S(2)/(S(2)*d**S(4)) - c*(a**S(2) - b**S(2)*c)*(c + d*x)**S(3)/d**S(4) + (a**S(2) - S(3)*b**S(2)*c)*(c + d*x)**S(4)/(S(4)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*sqrt(c + d*x))**S(2), x), x, a**S(2)*c**S(2)*x/d**S(2) + S(4)*a*b*c**S(2)*(c + d*x)**(S(3)/2)/(S(3)*d**S(3)) - S(8)*a*b*c*(c + d*x)**(S(5)/2)/(S(5)*d**S(3)) + S(4)*a*b*(c + d*x)**(S(7)/2)/(S(7)*d**S(3)) + b**S(2)*(c + d*x)**S(4)/(S(4)*d**S(3)) - c*(S(2)*a**S(2) - b**S(2)*c)*(c + d*x)**S(2)/(S(2)*d**S(3)) + (a**S(2) - S(2)*b**S(2)*c)*(c + d*x)**S(3)/(S(3)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*sqrt(c + d*x))**S(2), x), x, -a**S(2)*c*x/d - S(4)*a*b*c*(c + d*x)**(S(3)/2)/(S(3)*d**S(2)) + S(4)*a*b*(c + d*x)**(S(5)/2)/(S(5)*d**S(2)) + b**S(2)*(c + d*x)**S(3)/(S(3)*d**S(2)) + (a**S(2) - b**S(2)*c)*(c + d*x)**S(2)/(S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sqrt(c + d*x))**S(2), x), x, a**S(2)*x + S(4)*a*b*(c + d*x)**(S(3)/2)/(S(3)*d) + b**S(2)*(c + d*x)**S(2)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sqrt(c + d*x))**S(2)/x, x), x, -S(4)*a*b*sqrt(c)*atanh(sqrt(c + d*x)/sqrt(c)) + S(4)*a*b*sqrt(c + d*x) + b**S(2)*d*x + (a**S(2) + b**S(2)*c)*log(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sqrt(c + d*x))**S(2)/x**S(2), x), x, -S(2)*a*b*d*atanh(sqrt(c + d*x)/sqrt(c))/sqrt(c) + b**S(2)*d*log(x) - (a + b*sqrt(c + d*x))**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sqrt(c + d*x))**S(2)/x**S(3), x), x, a*b*d**S(2)*atanh(sqrt(c + d*x)/sqrt(c))/(S(2)*c**(S(3)/2)) - b*d*(a*sqrt(c + d*x) + b*c)/(S(2)*c*x) - (a + b*sqrt(c + d*x))**S(2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(a + b*sqrt(c + d*x)), x), x, -S(28)*a*(a + b*sqrt(c + d*x))**(S(15)/2)/(S(15)*b**S(8)*d**S(4)) - S(20)*a*(a + b*sqrt(c + d*x))**(S(11)/2)*(S(7)*a**S(2) - S(3)*b**S(2)*c)/(S(11)*b**S(8)*d**S(4)) - S(12)*a*(a + b*sqrt(c + d*x))**(S(7)/2)*(a**S(2) - b**S(2)*c)*(S(7)*a**S(2) - S(3)*b**S(2)*c)/(S(7)*b**S(8)*d**S(4)) - S(4)*a*(a + b*sqrt(c + d*x))**(S(3)/2)*(a**S(2) - b**S(2)*c)**S(3)/(S(3)*b**S(8)*d**S(4)) + S(4)*(a + b*sqrt(c + d*x))**(S(17)/2)/(S(17)*b**S(8)*d**S(4)) + (a + b*sqrt(c + d*x))**(S(13)/2)*(S(84)*a**S(2) - S(12)*b**S(2)*c)/(S(13)*b**S(8)*d**S(4)) + (a + b*sqrt(c + d*x))**(S(9)/2)*(S(140)*a**S(4) - S(120)*a**S(2)*b**S(2)*c + S(12)*b**S(4)*c**S(2))/(S(9)*b**S(8)*d**S(4)) + S(4)*(a + b*sqrt(c + d*x))**(S(5)/2)*(a**S(2) - b**S(2)*c)**S(2)*(S(7)*a**S(2) - b**S(2)*c)/(S(5)*b**S(8)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a + b*sqrt(c + d*x)), x), x, -S(20)*a*(a + b*sqrt(c + d*x))**(S(11)/2)/(S(11)*b**S(6)*d**S(3)) - S(8)*a*(a + b*sqrt(c + d*x))**(S(7)/2)*(S(5)*a**S(2) - S(3)*b**S(2)*c)/(S(7)*b**S(6)*d**S(3)) - S(4)*a*(a + b*sqrt(c + d*x))**(S(3)/2)*(a**S(2) - b**S(2)*c)**S(2)/(S(3)*b**S(6)*d**S(3)) + S(4)*(a + b*sqrt(c + d*x))**(S(13)/2)/(S(13)*b**S(6)*d**S(3)) + (a + b*sqrt(c + d*x))**(S(9)/2)*(S(40)*a**S(2) - S(8)*b**S(2)*c)/(S(9)*b**S(6)*d**S(3)) + (a + b*sqrt(c + d*x))**(S(5)/2)*(S(20)*a**S(4) - S(24)*a**S(2)*b**S(2)*c + S(4)*b**S(4)*c**S(2))/(S(5)*b**S(6)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*sqrt(c + d*x)), x), x, -S(12)*a*(a + b*sqrt(c + d*x))**(S(7)/2)/(S(7)*b**S(4)*d**S(2)) - S(4)*a*(a + b*sqrt(c + d*x))**(S(3)/2)*(a**S(2) - b**S(2)*c)/(S(3)*b**S(4)*d**S(2)) + S(4)*(a + b*sqrt(c + d*x))**(S(9)/2)/(S(9)*b**S(4)*d**S(2)) + (a + b*sqrt(c + d*x))**(S(5)/2)*(S(12)*a**S(2) - S(4)*b**S(2)*c)/(S(5)*b**S(4)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c + d*x)), x), x, -S(4)*a*(a + b*sqrt(c + d*x))**(S(3)/2)/(S(3)*b**S(2)*d) + S(4)*(a + b*sqrt(c + d*x))**(S(5)/2)/(S(5)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c + d*x))/x, x), x, -S(2)*sqrt(a - b*sqrt(c))*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a - b*sqrt(c))) - S(2)*sqrt(a + b*sqrt(c))*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a + b*sqrt(c))) + S(4)*sqrt(a + b*sqrt(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c + d*x))/x**S(2), x), x, -b*d*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a + b*sqrt(c)))/(S(2)*sqrt(c)*sqrt(a + b*sqrt(c))) + b*d*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a - b*sqrt(c)))/(S(2)*sqrt(c)*sqrt(a - b*sqrt(c))) - sqrt(a + b*sqrt(c + d*x))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c + d*x))/x**S(3), x), x, b*d*sqrt(a + b*sqrt(c + d*x))*(-a*sqrt(c + d*x) + b*c)/(S(8)*c*x*(a**S(2) - b**S(2)*c)) + b*d**S(2)*(S(2)*a + S(3)*b*sqrt(c))*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a + b*sqrt(c)))/(S(16)*c**(S(3)/2)*(a + b*sqrt(c))**(S(3)/2)) - b*d**S(2)*(S(2)*a - S(3)*b*sqrt(c))*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a - b*sqrt(c)))/(S(16)*c**(S(3)/2)*(a - b*sqrt(c))**(S(3)/2)) - sqrt(a + b*sqrt(c + d*x))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*sqrt(c + d*x)), x), x, -a*(c + d*x)**S(3)/(S(3)*b**S(2)*d**S(4)) - a*(a**S(2) - S(3)*b**S(2)*c)*(c + d*x)**S(2)/(S(2)*b**S(4)*d**S(4)) - a*x*(a**S(4) - S(3)*a**S(2)*b**S(2)*c + S(3)*b**S(4)*c**S(2))/(b**S(6)*d**S(3)) - S(2)*a*(a**S(2) - b**S(2)*c)**S(3)*log(a + b*sqrt(c + d*x))/(b**S(8)*d**S(4)) + S(2)*(c + d*x)**(S(7)/2)/(S(7)*b*d**S(4)) + (S(2)*a**S(2) - S(6)*b**S(2)*c)*(c + d*x)**(S(5)/2)/(S(5)*b**S(3)*d**S(4)) + (c + d*x)**(S(3)/2)*(S(2)*a**S(4) - S(6)*a**S(2)*b**S(2)*c + S(6)*b**S(4)*c**S(2))/(S(3)*b**S(5)*d**S(4)) + S(2)*(a**S(2) - b**S(2)*c)**S(3)*sqrt(c + d*x)/(b**S(7)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*sqrt(c + d*x)), x), x, -a*(c + d*x)**S(2)/(S(2)*b**S(2)*d**S(3)) - a*x*(a**S(2) - S(2)*b**S(2)*c)/(b**S(4)*d**S(2)) - S(2)*a*(a**S(2) - b**S(2)*c)**S(2)*log(a + b*sqrt(c + d*x))/(b**S(6)*d**S(3)) + S(2)*(c + d*x)**(S(5)/2)/(S(5)*b*d**S(3)) + (S(2)*a**S(2) - S(4)*b**S(2)*c)*(c + d*x)**(S(3)/2)/(S(3)*b**S(3)*d**S(3)) + S(2)*(a**S(2) - b**S(2)*c)**S(2)*sqrt(c + d*x)/(b**S(5)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*sqrt(c + d*x)), x), x, -a*x/(b**S(2)*d) - S(2)*a*(a**S(2) - b**S(2)*c)*log(a + b*sqrt(c + d*x))/(b**S(4)*d**S(2)) + S(2)*(c + d*x)**(S(3)/2)/(S(3)*b*d**S(2)) + (S(2)*a**S(2) - S(2)*b**S(2)*c)*sqrt(c + d*x)/(b**S(3)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*sqrt(c + d*x)), x), x, -S(2)*a*log(a + b*sqrt(c + d*x))/(b**S(2)*d) + S(2)*sqrt(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*sqrt(c + d*x))), x), x, a*log(x)/(a**S(2) - b**S(2)*c) - S(2)*a*log(a + b*sqrt(c + d*x))/(a**S(2) - b**S(2)*c) + S(2)*b*sqrt(c)*atanh(sqrt(c + d*x)/sqrt(c))/(a**S(2) - b**S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*sqrt(c + d*x))), x), x, a*b**S(2)*d*log(x)/(a**S(2) - b**S(2)*c)**S(2) - S(2)*a*b**S(2)*d*log(a + b*sqrt(c + d*x))/(a**S(2) - b**S(2)*c)**S(2) + b*d*(a**S(2) + b**S(2)*c)*atanh(sqrt(c + d*x)/sqrt(c))/(sqrt(c)*(a**S(2) - b**S(2)*c)**S(2)) - (a - b*sqrt(c + d*x))/(x*(a**S(2) - b**S(2)*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*sqrt(c + d*x))), x), x, a*b**S(4)*d**S(2)*log(x)/(a**S(2) - b**S(2)*c)**S(3) - S(2)*a*b**S(4)*d**S(2)*log(a + b*sqrt(c + d*x))/(a**S(2) - b**S(2)*c)**S(3) - b*d*(S(4)*a*b*c - (a**S(2) + S(3)*b**S(2)*c)*sqrt(c + d*x))/(S(4)*c*x*(a**S(2) - b**S(2)*c)**S(2)) - b*d**S(2)*(a**S(4) - S(6)*a**S(2)*b**S(2)*c - S(3)*b**S(4)*c**S(2))*atanh(sqrt(c + d*x)/sqrt(c))/(S(4)*c**(S(3)/2)*(a**S(2) - b**S(2)*c)**S(3)) - (a - b*sqrt(c + d*x))/(x**S(2)*(S(2)*a**S(2) - S(2)*b**S(2)*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/(a + b*sqrt(c + d*x))**S(2), x), x, -S(4)*a*(c + d*x)**(S(5)/2)/(S(5)*b**S(3)*d**S(4)) - S(4)*a*(S(2)*a**S(2) - S(3)*b**S(2)*c)*(c + d*x)**(S(3)/2)/(S(3)*b**S(5)*d**S(4)) - S(12)*a*(a**S(2) - b**S(2)*c)**S(2)*sqrt(c + d*x)/(b**S(7)*d**S(4)) + S(2)*a*(a**S(2) - b**S(2)*c)**S(3)/(b**S(8)*d**S(4)*(a + b*sqrt(c + d*x))) + (c + d*x)**S(3)/(S(3)*b**S(2)*d**S(4)) + (S(3)*a**S(2) - S(3)*b**S(2)*c)*(c + d*x)**S(2)/(S(2)*b**S(4)*d**S(4)) + x*(S(5)*a**S(4) - S(9)*a**S(2)*b**S(2)*c + S(3)*b**S(4)*c**S(2))/(b**S(6)*d**S(3)) + S(2)*(a**S(2) - b**S(2)*c)**S(2)*(S(7)*a**S(2) - b**S(2)*c)*log(a + b*sqrt(c + d*x))/(b**S(8)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*sqrt(c + d*x))**S(2), x), x, -S(4)*a*(c + d*x)**(S(3)/2)/(S(3)*b**S(3)*d**S(3)) - S(8)*a*(a**S(2) - b**S(2)*c)*sqrt(c + d*x)/(b**S(5)*d**S(3)) + S(2)*a*(a**S(2) - b**S(2)*c)**S(2)/(b**S(6)*d**S(3)*(a + b*sqrt(c + d*x))) + (c + d*x)**S(2)/(S(2)*b**S(2)*d**S(3)) + x*(S(3)*a**S(2) - S(2)*b**S(2)*c)/(b**S(4)*d**S(2)) + (S(10)*a**S(4) - S(12)*a**S(2)*b**S(2)*c + S(2)*b**S(4)*c**S(2))*log(a + b*sqrt(c + d*x))/(b**S(6)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*sqrt(c + d*x))**S(2), x), x, -S(4)*a*sqrt(c + d*x)/(b**S(3)*d**S(2)) + S(2)*a*(a**S(2) - b**S(2)*c)/(b**S(4)*d**S(2)*(a + b*sqrt(c + d*x))) + x/(b**S(2)*d) + (S(6)*a**S(2) - S(2)*b**S(2)*c)*log(a + b*sqrt(c + d*x))/(b**S(4)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sqrt(c + d*x))**(S(-2)), x), x, S(2)*a/(b**S(2)*d*(a + b*sqrt(c + d*x))) + S(2)*log(a + b*sqrt(c + d*x))/(b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*sqrt(c + d*x))**S(2)), x), x, S(4)*a*b*sqrt(c)*atanh(sqrt(c + d*x)/sqrt(c))/(a**S(2) - b**S(2)*c)**S(2) + S(2)*a/((a + b*sqrt(c + d*x))*(a**S(2) - b**S(2)*c)) + (a**S(2) + b**S(2)*c)*log(x)/(a**S(2) - b**S(2)*c)**S(2) - (S(2)*a**S(2) + S(2)*b**S(2)*c)*log(a + b*sqrt(c + d*x))/(a**S(2) - b**S(2)*c)**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*sqrt(c + d*x))**S(2)), x), x, S(4)*a*b**S(2)*d/((a + b*sqrt(c + d*x))*(a**S(2) - b**S(2)*c)**S(2)) + S(2)*a*b*d*(a**S(2) + S(3)*b**S(2)*c)*atanh(sqrt(c + d*x)/sqrt(c))/(sqrt(c)*(a**S(2) - b**S(2)*c)**S(3)) + b**S(2)*d*(S(3)*a**S(2) + b**S(2)*c)*log(x)/(a**S(2) - b**S(2)*c)**S(3) - S(2)*b**S(2)*d*(S(3)*a**S(2) + b**S(2)*c)*log(a + b*sqrt(c + d*x))/(a**S(2) - b**S(2)*c)**S(3) - (a - b*sqrt(c + d*x))/(x*(a + b*sqrt(c + d*x))*(a**S(2) - b**S(2)*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*(a + b*sqrt(c + d*x))**S(2)), x), x, a*b**S(2)*d**S(2)*(a**S(2) + S(11)*b**S(2)*c)/(S(2)*c*(a + b*sqrt(c + d*x))*(a**S(2) - b**S(2)*c)**S(3)) - a*b*d**S(2)*(a**S(4) - S(10)*a**S(2)*b**S(2)*c - S(15)*b**S(4)*c**S(2))*atanh(sqrt(c + d*x)/sqrt(c))/(S(2)*c**(S(3)/2)*(a**S(2) - b**S(2)*c)**S(4)) + b**S(4)*d**S(2)*(S(5)*a**S(2) + b**S(2)*c)*log(x)/(a**S(2) - b**S(2)*c)**S(4) - S(2)*b**S(4)*d**S(2)*(S(5)*a**S(2) + b**S(2)*c)*log(a + b*sqrt(c + d*x))/(a**S(2) - b**S(2)*c)**S(4) - b*d*(S(3)*a*b*c - (a**S(2) + S(2)*b**S(2)*c)*sqrt(c + d*x))/(S(2)*c*x*(a + b*sqrt(c + d*x))*(a**S(2) - b**S(2)*c)**S(2)) - (a - b*sqrt(c + d*x))/(x**S(2)*(a + b*sqrt(c + d*x))*(S(2)*a**S(2) - S(2)*b**S(2)*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(a + b*sqrt(c + d*x)), x), x, -S(28)*a*(a + b*sqrt(c + d*x))**(S(13)/2)/(S(13)*b**S(8)*d**S(4)) - S(20)*a*(a + b*sqrt(c + d*x))**(S(9)/2)*(S(7)*a**S(2) - S(3)*b**S(2)*c)/(S(9)*b**S(8)*d**S(4)) - S(12)*a*(a + b*sqrt(c + d*x))**(S(5)/2)*(a**S(2) - b**S(2)*c)*(S(7)*a**S(2) - S(3)*b**S(2)*c)/(S(5)*b**S(8)*d**S(4)) - S(4)*a*sqrt(a + b*sqrt(c + d*x))*(a**S(2) - b**S(2)*c)**S(3)/(b**S(8)*d**S(4)) + S(4)*(a + b*sqrt(c + d*x))**(S(15)/2)/(S(15)*b**S(8)*d**S(4)) + (a + b*sqrt(c + d*x))**(S(11)/2)*(S(84)*a**S(2) - S(12)*b**S(2)*c)/(S(11)*b**S(8)*d**S(4)) + (a + b*sqrt(c + d*x))**(S(7)/2)*(S(140)*a**S(4) - S(120)*a**S(2)*b**S(2)*c + S(12)*b**S(4)*c**S(2))/(S(7)*b**S(8)*d**S(4)) + S(4)*(a + b*sqrt(c + d*x))**(S(3)/2)*(a**S(2) - b**S(2)*c)**S(2)*(S(7)*a**S(2) - b**S(2)*c)/(S(3)*b**S(8)*d**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*sqrt(c + d*x)), x), x, -S(20)*a*(a + b*sqrt(c + d*x))**(S(9)/2)/(S(9)*b**S(6)*d**S(3)) - S(8)*a*(a + b*sqrt(c + d*x))**(S(5)/2)*(S(5)*a**S(2) - S(3)*b**S(2)*c)/(S(5)*b**S(6)*d**S(3)) - S(4)*a*sqrt(a + b*sqrt(c + d*x))*(a**S(2) - b**S(2)*c)**S(2)/(b**S(6)*d**S(3)) + S(4)*(a + b*sqrt(c + d*x))**(S(11)/2)/(S(11)*b**S(6)*d**S(3)) + (a + b*sqrt(c + d*x))**(S(7)/2)*(S(40)*a**S(2) - S(8)*b**S(2)*c)/(S(7)*b**S(6)*d**S(3)) + (a + b*sqrt(c + d*x))**(S(3)/2)*(S(20)*a**S(4) - S(24)*a**S(2)*b**S(2)*c + S(4)*b**S(4)*c**S(2))/(S(3)*b**S(6)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*sqrt(c + d*x)), x), x, -S(12)*a*(a + b*sqrt(c + d*x))**(S(5)/2)/(S(5)*b**S(4)*d**S(2)) - S(4)*a*sqrt(a + b*sqrt(c + d*x))*(a**S(2) - b**S(2)*c)/(b**S(4)*d**S(2)) + S(4)*(a + b*sqrt(c + d*x))**(S(7)/2)/(S(7)*b**S(4)*d**S(2)) + (a + b*sqrt(c + d*x))**(S(3)/2)*(S(12)*a**S(2) - S(4)*b**S(2)*c)/(S(3)*b**S(4)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*sqrt(c + d*x)), x), x, -S(4)*a*sqrt(a + b*sqrt(c + d*x))/(b**S(2)*d) + S(4)*(a + b*sqrt(c + d*x))**(S(3)/2)/(S(3)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*sqrt(c + d*x))), x), x, -S(2)*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a + b*sqrt(c)))/sqrt(a + b*sqrt(c)) - S(2)*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a - b*sqrt(c)))/sqrt(a - b*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*sqrt(c + d*x))), x), x, b*d*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a + b*sqrt(c)))/(S(2)*sqrt(c)*(a + b*sqrt(c))**(S(3)/2)) - b*d*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a - b*sqrt(c)))/(S(2)*sqrt(c)*(a - b*sqrt(c))**(S(3)/2)) - (a - b*sqrt(c + d*x))*sqrt(a + b*sqrt(c + d*x))/(x*(a**S(2) - b**S(2)*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a + b*sqrt(c + d*x))), x), x, -b*d*sqrt(a + b*sqrt(c + d*x))*(S(6)*a*b*c - (a**S(2) + S(5)*b**S(2)*c)*sqrt(c + d*x))/(S(8)*c*x*(a**S(2) - b**S(2)*c)**S(2)) - b*d**S(2)*(S(2)*a + S(5)*b*sqrt(c))*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a + b*sqrt(c)))/(S(16)*c**(S(3)/2)*(a + b*sqrt(c))**(S(5)/2)) + b*d**S(2)*(S(2)*a - S(5)*b*sqrt(c))*atanh(sqrt(a + b*sqrt(c + d*x))/sqrt(a - b*sqrt(c)))/(S(16)*c**(S(3)/2)*(a - b*sqrt(c))**(S(5)/2)) - (a - b*sqrt(c + d*x))*sqrt(a + b*sqrt(c + d*x))/(x**S(2)*(S(2)*a**S(2) - S(2)*b**S(2)*c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*sqrt(c + d*x))**p, x), x, -S(2)*a*(a + b*sqrt(c + d*x))**(p + S(1))*(a**S(2) - b**S(2)*c)**S(3)/(b**S(8)*d**S(4)*(p + S(1))) - S(6)*a*(a + b*sqrt(c + d*x))**(p + S(3))*(a**S(2) - b**S(2)*c)*(S(7)*a**S(2) - S(3)*b**S(2)*c)/(b**S(8)*d**S(4)*(p + S(3))) - S(10)*a*(a + b*sqrt(c + d*x))**(p + S(5))*(S(7)*a**S(2) - S(3)*b**S(2)*c)/(b**S(8)*d**S(4)*(p + S(5))) - S(14)*a*(a + b*sqrt(c + d*x))**(p + S(7))/(b**S(8)*d**S(4)*(p + S(7))) + S(2)*(a + b*sqrt(c + d*x))**(p + S(2))*(a**S(2) - b**S(2)*c)**S(2)*(S(7)*a**S(2) - b**S(2)*c)/(b**S(8)*d**S(4)*(p + S(2))) + (a + b*sqrt(c + d*x))**(p + S(4))*(S(70)*a**S(4) - S(60)*a**S(2)*b**S(2)*c + S(6)*b**S(4)*c**S(2))/(b**S(8)*d**S(4)*(p + S(4))) + (a + b*sqrt(c + d*x))**(p + S(6))*(S(42)*a**S(2) - S(6)*b**S(2)*c)/(b**S(8)*d**S(4)*(p + S(6))) + S(2)*(a + b*sqrt(c + d*x))**(p + S(8))/(b**S(8)*d**S(4)*(p + S(8))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*sqrt(c + d*x))**p, x), x, -S(2)*a*(a + b*sqrt(c + d*x))**(p + S(1))*(a**S(2) - b**S(2)*c)**S(2)/(b**S(6)*d**S(3)*(p + S(1))) - S(4)*a*(a + b*sqrt(c + d*x))**(p + S(3))*(S(5)*a**S(2) - S(3)*b**S(2)*c)/(b**S(6)*d**S(3)*(p + S(3))) - S(10)*a*(a + b*sqrt(c + d*x))**(p + S(5))/(b**S(6)*d**S(3)*(p + S(5))) + (a + b*sqrt(c + d*x))**(p + S(2))*(S(10)*a**S(4) - S(12)*a**S(2)*b**S(2)*c + S(2)*b**S(4)*c**S(2))/(b**S(6)*d**S(3)*(p + S(2))) + (a + b*sqrt(c + d*x))**(p + S(4))*(S(20)*a**S(2) - S(4)*b**S(2)*c)/(b**S(6)*d**S(3)*(p + S(4))) + S(2)*(a + b*sqrt(c + d*x))**(p + S(6))/(b**S(6)*d**S(3)*(p + S(6))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*sqrt(c + d*x))**p, x), x, -S(2)*a*(a + b*sqrt(c + d*x))**(p + S(1))*(a**S(2) - b**S(2)*c)/(b**S(4)*d**S(2)*(p + S(1))) - S(6)*a*(a + b*sqrt(c + d*x))**(p + S(3))/(b**S(4)*d**S(2)*(p + S(3))) + (a + b*sqrt(c + d*x))**(p + S(2))*(S(6)*a**S(2) - S(2)*b**S(2)*c)/(b**S(4)*d**S(2)*(p + S(2))) + S(2)*(a + b*sqrt(c + d*x))**(p + S(4))/(b**S(4)*d**S(2)*(p + S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sqrt(c + d*x))**p, x), x, -S(2)*a*(a + b*sqrt(c + d*x))**(p + S(1))/(b**S(2)*d*(p + S(1))) + S(2)*(a + b*sqrt(c + d*x))**(p + S(2))/(b**S(2)*d*(p + S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sqrt(c + d*x))**p/x, x), x, -(a + b*sqrt(c + d*x))**(p + S(1))*hyper((S(1), p + S(1)), (p + S(2),), (a + b*sqrt(c + d*x))/(a + b*sqrt(c)))/((a + b*sqrt(c))*(p + S(1))) - (a + b*sqrt(c + d*x))**(p + S(1))*hyper((S(1), p + S(1)), (p + S(2),), (a + b*sqrt(c + d*x))/(a - b*sqrt(c)))/((a - b*sqrt(c))*(p + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x)**n)**(S(5)/2)/x, x), x, -S(2)*a**(S(5)/2)*atanh(sqrt(a + b*(c*x)**n)/sqrt(a))/n + S(2)*a**S(2)*sqrt(a + b*(c*x)**n)/n + S(2)*a*(a + b*(c*x)**n)**(S(3)/2)/(S(3)*n) + S(2)*(a + b*(c*x)**n)**(S(5)/2)/(S(5)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*(c*x)**n)**(S(3)/2)/x, x), x, -S(2)*a**(S(3)/2)*atanh(sqrt(a + b*(c*x)**n)/sqrt(a))/n + S(2)*a*sqrt(a + b*(c*x)**n)/n + S(2)*(a + b*(c*x)**n)**(S(3)/2)/(S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*(c*x)**n)/x, x), x, -S(2)*sqrt(a)*atanh(sqrt(a + b*(c*x)**n)/sqrt(a))/n + S(2)*sqrt(a + b*(c*x)**n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*(c*x)**n)), x), x, -S(2)*atanh(sqrt(a + b*(c*x)**n)/sqrt(a))/(sqrt(a)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*(c*x)**n)**(S(3)/2)), x), x, S(2)/(a*n*sqrt(a + b*(c*x)**n)) - S(2)*atanh(sqrt(a + b*(c*x)**n)/sqrt(a))/(a**(S(3)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*(c*x)**n)**(S(5)/2)), x), x, S(2)/(S(3)*a*n*(a + b*(c*x)**n)**(S(3)/2)) + S(2)/(a**S(2)*n*sqrt(a + b*(c*x)**n)) - S(2)*atanh(sqrt(a + b*(c*x)**n)/sqrt(a))/(a**(S(5)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-a + b*(c*x)**n)**(S(5)/2)/x, x), x, -S(2)*a**(S(5)/2)*atan(sqrt(-a + b*(c*x)**n)/sqrt(a))/n + S(2)*a**S(2)*sqrt(-a + b*(c*x)**n)/n - S(2)*a*(-a + b*(c*x)**n)**(S(3)/2)/(S(3)*n) + S(2)*(-a + b*(c*x)**n)**(S(5)/2)/(S(5)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-a + b*(c*x)**n)**(S(3)/2)/x, x), x, S(2)*a**(S(3)/2)*atan(sqrt(-a + b*(c*x)**n)/sqrt(a))/n - S(2)*a*sqrt(-a + b*(c*x)**n)/n + S(2)*(-a + b*(c*x)**n)**(S(3)/2)/(S(3)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a + b*(c*x)**n)/x, x), x, -S(2)*sqrt(a)*atan(sqrt(-a + b*(c*x)**n)/sqrt(a))/n + S(2)*sqrt(-a + b*(c*x)**n)/n, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(-a + b*(c*x)**n)), x), x, S(2)*atan(sqrt(-a + b*(c*x)**n)/sqrt(a))/(sqrt(a)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(-a + b*(c*x)**n)**(S(3)/2)), x), x, -S(2)/(a*n*sqrt(-a + b*(c*x)**n)) - S(2)*atan(sqrt(-a + b*(c*x)**n)/sqrt(a))/(a**(S(3)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(-a + b*(c*x)**n)**(S(5)/2)), x), x, -S(2)/(S(3)*a*n*(-a + b*(c*x)**n)**(S(3)/2)) + S(2)/(a**S(2)*n*sqrt(-a + b*(c*x)**n)) + S(2)*atan(sqrt(-a + b*(c*x)**n)/sqrt(a))/(a**(S(5)/2)*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*x)), x), x, -S(2)*atanh(sqrt(a + b*x)/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*(c*x)**m)), x), x, -S(2)*atanh(sqrt(a + b*(c*x)**m)/sqrt(a))/(sqrt(a)*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*(c*(d*x)**m)**n)), x), x, -S(2)*atanh(sqrt(a + b*(c*(d*x)**m)**n)/sqrt(a))/(sqrt(a)*m*n), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*(c*(d*(e*x)**m)**n)**p)), x), x, -S(2)*atanh(sqrt(a + b*(c*(d*(e*x)**m)**n)**p)/sqrt(a))/(sqrt(a)*m*n*p), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*(c*(d*(e*(f*x)**m)**n)**p)**q)), x), x, -S(2)*atanh(sqrt(a + b*(c*(d*(e*(f*x)**m)**n)**p)**q)/sqrt(a))/(sqrt(a)*m*n*p*q), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(-1) + x**(S(-2)))*(x**S(2) + S(-1))**S(3)/x, x), x, -x**S(6)*(S(-1) + x**(S(-2)))**(S(7)/2)/S(6) - S(7)*x**S(4)*(S(-1) + x**(S(-2)))**(S(5)/2)/S(24) - S(35)*x**S(2)*(S(-1) + x**(S(-2)))**(S(3)/2)/S(48) + S(35)*sqrt(S(-1) + x**(S(-2)))/S(16) - S(35)*atan(sqrt(S(-1) + x**(S(-2))))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(-1) + x**(S(-2)))*(x**S(2) + S(-1))**S(2)/x, x), x, x**S(4)*(S(-1) + x**(S(-2)))**(S(5)/2)/S(4) + S(5)*x**S(2)*(S(-1) + x**(S(-2)))**(S(3)/2)/S(8) - S(15)*sqrt(S(-1) + x**(S(-2)))/S(8) + S(15)*atan(sqrt(S(-1) + x**(S(-2))))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(-1) + x**(S(-2)))*(x**S(2) + S(-1))/x, x), x, -x**S(2)*(S(-1) + x**(S(-2)))**(S(3)/2)/S(2) + S(3)*sqrt(S(-1) + x**(S(-2)))/S(2) - S(3)*atan(sqrt(S(-1) + x**(S(-2))))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(-1) + x**(S(-2)))/(x*(x**S(2) + S(-1))), x), x, sqrt(S(-1) + x**(S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(-1) + x**(S(-2)))/(x*(x**S(2) + S(-1))**S(2)), x), x, -sqrt(S(-1) + x**(S(-2))) + S(1)/sqrt(S(-1) + x**(S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(-1) + x**(S(-2)))/(x*(x**S(2) + S(-1))**S(3)), x), x, sqrt(S(-1) + x**(S(-2))) - S(2)/sqrt(S(-1) + x**(S(-2))) - S(1)/(S(3)*(S(-1) + x**(S(-2)))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(S(1) + x**(S(-2)))/(x**S(2) + S(1))**S(2), x), x, S(1)/sqrt(S(1) + x**(S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(S(1) + x**(S(-2)))*(x**S(2) + S(1))), x), x, S(1)/sqrt(S(1) + x**(S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*x**S(2) + sqrt(a + b*x**S(2))), x), x, log(sqrt(a + b*x**S(2)) + S(1))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(x**S(2) - (x**S(2))**(S(1)/3)), x), x, S(3)*log(-(x**S(2))**(S(2)/3) + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(x**S(2) + S(1))**S(3)*sqrt(x**S(4) + S(2)*x**S(2) + S(2)), x), x, (x**S(2) + S(1))**S(2)*(x**S(4) + S(2)*x**S(2) + S(2))**(S(3)/2)/S(10) - (x**S(4) + S(2)*x**S(2) + S(2))**(S(3)/2)/S(15), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt((-x**S(2) + S(1))/(x**S(2) + S(1))), x), x, sqrt((-x**S(2) + S(1))/(x**S(2) + S(1)))*(x**S(2) + S(1))/S(2) - atan(sqrt((-x**S(2) + S(1))/(x**S(2) + S(1)))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x*sqrt((-x**S(2) + S(1))/(x**S(2) + S(1))), x), x, sqrt((-x**S(2) + S(1))/(x**S(2) + S(1)))/((-x**S(2) + S(1))/(x**S(2) + S(1)) + S(1)) - atan(sqrt((-x**S(2) + S(1))/(x**S(2) + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt((-S(7)*x**S(2) + S(5))/(S(5)*x**S(2) + S(7))), x), x, sqrt((-S(7)*x**S(2) + S(5))/(S(5)*x**S(2) + S(7)))*(S(5)*x**S(2) + S(7))/S(10) - S(37)*sqrt(S(35))*atan(sqrt(S(35))*sqrt((-S(7)*x**S(2) + S(5))/(S(5)*x**S(2) + S(7)))/S(7))/S(175), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x*sqrt((-S(7)*x**S(2) + S(5))/(S(5)*x**S(2) + S(7))), x), x, S(37)*sqrt((-S(7)*x**S(2) + S(5))/(S(5)*x**S(2) + S(7)))/(S(5)*(-S(35)*x**S(2) + S(25))/(S(5)*x**S(2) + S(7)) + S(35)) - S(37)*sqrt(S(35))*atan(sqrt(S(35))*sqrt((-S(7)*x**S(2) + S(5))/(S(5)*x**S(2) + S(7)))/S(7))/S(175), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt((-x**S(3) + S(1))/(x**S(3) + S(1))), x), x, sqrt((-x**S(3) + S(1))/(x**S(3) + S(1)))*(x**S(3) + S(1))/S(3) - S(2)*atan(sqrt((-x**S(3) + S(1))/(x**S(3) + S(1))))/S(3), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(2)*sqrt((-x**S(3) + S(1))/(x**S(3) + S(1))), x), x, S(2)*sqrt((-x**S(3) + S(1))/(x**S(3) + S(1)))/(S(3)*(-x**S(3) + S(1))/(x**S(3) + S(1)) + S(3)) - S(2)*atan(sqrt((-x**S(3) + S(1))/(x**S(3) + S(1))))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*sqrt(-x**S(3) + S(1))*(x**S(9) + S(1))**S(2), x), x, S(2)*(-x**S(3) + S(1))**(S(17)/2)/S(51) - S(14)*(-x**S(3) + S(1))**(S(15)/2)/S(45) + S(14)*(-x**S(3) + S(1))**(S(13)/2)/S(13) - S(74)*(-x**S(3) + S(1))**(S(11)/2)/S(33) + S(86)*(-x**S(3) + S(1))**(S(9)/2)/S(27) - S(22)*(-x**S(3) + S(1))**(S(7)/2)/S(7) + S(32)*(-x**S(3) + S(1))**(S(5)/2)/S(15) - S(8)*(-x**S(3) + S(1))**(S(3)/2)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(8)*sqrt((-x**S(3) + S(1))/(x**S(3) + S(1))), x), x, -S(8)*((-x**S(3) + S(1))/(x**S(3) + S(1)))**(S(3)/2)/(S(9)*((-x**S(3) + S(1))/(x**S(3) + S(1)) + S(1))**S(3)) + sqrt((-x**S(3) + S(1))/(x**S(3) + S(1)))/((-x**S(3) + S(1))/(x**S(3) + S(1)) + S(1)) - S(2)*sqrt((-x**S(3) + S(1))/(x**S(3) + S(1)))/(S(3)*((-x**S(3) + S(1))/(x**S(3) + S(1)) + S(1))**S(2)) - atan(sqrt((-x**S(3) + S(1))/(x**S(3) + S(1))))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(9)*sqrt((-S(7)*x**S(5) + S(5))/(S(5)*x**S(5) + S(7))), x), x, -S(999)*sqrt((-S(7)*x**S(5) + S(5))/(S(5)*x**S(5) + S(7)))/(S(175)*(-S(35)*x**S(5) + S(25))/(S(5)*x**S(5) + S(7)) + S(1225)) + S(2738)*sqrt((-S(7)*x**S(5) + S(5))/(S(5)*x**S(5) + S(7)))/(S(125)*((-S(35)*x**S(5) + S(25))/(S(5)*x**S(5) + S(7)) + S(7))**S(2)) + S(2257)*sqrt(S(35))*atan(sqrt(S(35))*sqrt((-S(7)*x**S(5) + S(5))/(S(5)*x**S(5) + S(7)))/S(7))/S(30625), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(a + b*x**S(2))*(x**S(2) + S(1))) + x/(a + b*x**S(2))**(S(3)/2), x), x, -atanh(sqrt(a + b*x**S(2))/sqrt(a - b))/sqrt(a - b) - S(1)/(b*sqrt(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*x**S(2) + x**S(2) + S(1))/((a + b*x**S(2))**(S(3)/2)*(x**S(2) + S(1))), x), x, -atanh(sqrt(a + b*x**S(2))/sqrt(a - b))/sqrt(a - b) - S(1)/(b*sqrt(a + b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(a + b*x**S(2))*(x**S(2) + S(1))) + x/(a + b*x**S(2))**(S(3)/2) + x/(a + b*x**S(2))**(S(5)/2), x), x, -atanh(sqrt(a + b*x**S(2))/sqrt(a - b))/sqrt(a - b) - S(1)/(b*sqrt(a + b*x**S(2))) - S(1)/(S(3)*b*(a + b*x**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a**S(2) + S(2)*a*b*x**S(2) + a*x**S(2) + a + b**S(2)*x**S(4) + b*x**S(4) + b*x**S(2) + x**S(2) + S(1))/((a + b*x**S(2))**(S(5)/2)*(x**S(2) + S(1))), x), x, -atanh(sqrt(a + b*x**S(2))/sqrt(a - b))/sqrt(a - b) - S(1)/(b*sqrt(a + b*x**S(2))) - S(1)/(S(3)*b*(a + b*x**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sqrt(x) + x), x), x, S(2)*sqrt(sqrt(x) + x) - S(2)*atanh(sqrt(x)/sqrt(sqrt(x) + x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(x) + x), x), x, sqrt(x)*sqrt(sqrt(x) + x)/S(6) + S(2)*x*sqrt(sqrt(x) + x)/S(3) - sqrt(sqrt(x) + x)/S(4) + atanh(sqrt(x)/sqrt(sqrt(x) + x))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x)*(x + sqrt(-x)), x), x, -x**S(2)/S(2) + S(2)*(-x)**(S(5)/2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**(S(1)/4) + S(5))/(x + S(-6)), x), x, S(4)*x**(S(1)/4) + S(5)*log(-x + S(6)) - S(2)*S(6)**(S(1)/4)*atan(S(6)**(S(3)/4)*x**(S(1)/4)/S(6)) - S(2)*S(6)**(S(1)/4)*atanh(S(6)**(S(3)/4)*x**(S(1)/4)/S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(-x + sqrt(-x + S(4)) + S(4)), x), x, -S(2)*log(sqrt(-x + S(4)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x - sqrt(x + S(2)) + S(1)), x), x, (sqrt(S(5))/S(5) + S(1))*log(-S(2)*sqrt(x + S(2)) + S(1) + sqrt(S(5))) + (-sqrt(S(5))/S(5) + S(1))*log(-S(2)*sqrt(x + S(2)) - sqrt(S(5)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x + sqrt(x + S(1)) + S(4)), x), x, log(x + sqrt(x + S(1)) + S(4)) - S(2)*sqrt(S(11))*atan(sqrt(S(11))*(S(2)*sqrt(x + S(1)) + S(1))/S(11))/S(11), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x - sqrt(x + S(1))), x), x, (sqrt(S(5))/S(5) + S(1))*log(-S(2)*sqrt(x + S(1)) + S(1) + sqrt(S(5))) + (-sqrt(S(5))/S(5) + S(1))*log(-S(2)*sqrt(x + S(1)) - sqrt(S(5)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x - sqrt(x + S(2))), x), x, S(4)*log(-sqrt(x + S(2)) + S(2))/S(3) + S(2)*log(sqrt(x + S(2)) + S(1))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x - sqrt(-x + S(1))), x), x, (sqrt(S(5))/S(5) + S(1))*log(S(2)*sqrt(-x + S(1)) + S(1) + sqrt(S(5))) + (-sqrt(S(5))/S(5) + S(1))*log(S(2)*sqrt(-x + S(1)) - sqrt(S(5)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(x) + x + S(1)), x), x, (-sqrt(x)/S(2) + S(-1)/4)*sqrt(sqrt(x) + x + S(1)) + S(2)*(sqrt(x) + x + S(1))**(S(3)/2)/S(3) - S(3)*asinh(sqrt(S(3))*(S(2)*sqrt(x) + S(1))/S(3))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x + sqrt(x + S(1)) + S(1)), x), x, -(S(2)*sqrt(x + S(1)) + S(1))*sqrt(x + sqrt(x + S(1)) + S(1))/S(4) + S(2)*(x + sqrt(x + S(1)) + S(1))**(S(3)/2)/S(3) + atanh(sqrt(x + S(1))/sqrt(x + sqrt(x + S(1)) + S(1)))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x + sqrt(x + S(-1))), x), x, S(2)*(x + sqrt(x + S(-1)))**(S(3)/2)/S(3) + sqrt(x + sqrt(x + S(-1)))*(-sqrt(x + S(-1))/S(2) + S(-1)/4) - S(3)*asinh(sqrt(S(3))*(S(2)*sqrt(x + S(-1)) + S(1))/S(3))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x + sqrt(S(2)*x + S(-1))), x), x, (S(2)*x + sqrt(S(2)*x + S(-1)))**(S(3)/2)/S(3) - sqrt(S(2)*x + sqrt(S(2)*x + S(-1)))*(S(2)*sqrt(S(2)*x + S(-1)) + S(1))/S(8) - S(3)*asinh(sqrt(S(3))*(S(2)*sqrt(S(2)*x + S(-1)) + S(1))/S(3))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(3)*x + sqrt(S(8)*x + S(-7))), x), x, sqrt(S(2))*(S(24)*x + S(8)*sqrt(S(8)*x + S(-7)))**(S(3)/2)/S(144) - sqrt(S(2))*sqrt(S(24)*x + S(8)*sqrt(S(8)*x + S(-7)))*(S(3)*sqrt(S(8)*x + S(-7)) + S(4))/S(72) - S(47)*sqrt(S(6))*asinh(sqrt(S(47))*(S(3)*sqrt(S(8)*x + S(-7)) + S(4))/S(47))/S(216), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x + sqrt(x + S(1))), x), x, S(2)*sqrt(x + sqrt(x + S(1))) - atanh((S(2)*sqrt(x + S(1)) + S(1))/(S(2)*sqrt(x + sqrt(x + S(1))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + S(1))/(x + sqrt(S(6)*x + S(-9)) + S(4)), x), x, x - S(2)*sqrt(S(3))*sqrt(S(2)*x + S(-3)) + S(3)*log(x + sqrt(S(3))*sqrt(S(2)*x + S(-3)) + S(4)) + S(4)*sqrt(S(6))*atan(sqrt(S(6))*(sqrt(S(6)*x + S(-9)) + S(3))/S(12)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x + S(12))/(x + sqrt(S(6)*x + S(-9)) + S(4)), x), x, -x + S(2)*sqrt(S(3))*sqrt(S(2)*x + S(-3)) + S(10)*log(x + sqrt(S(3))*sqrt(S(2)*x + S(-3)) + S(4)) - S(21)*sqrt(S(6))*atan(sqrt(S(6))*(sqrt(S(6)*x + S(-9)) + S(3))/S(12))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(-1))/(sqrt(x)*(x**S(2) + S(1))), x), x, S(2)*x**(S(3)/2)/S(3) - sqrt(S(2))*atan(sqrt(S(2))*sqrt(x) + S(-1)) - sqrt(S(2))*atan(sqrt(S(2))*sqrt(x) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(2)*sqrt(x + S(-1))*sqrt(x - sqrt(x + S(-1)))), x), x, -asinh(sqrt(S(3))*(-S(2)*sqrt(x + S(-1)) + S(1))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**(S(7)/2) + S(1))/(-x**S(2) + S(1)), x), x, -S(2)*x**(S(5)/2)/S(5) - S(2)*sqrt(x) - log(-sqrt(x) + S(1)) + log(x + S(1))/S(2) + atan(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x + S(4))/((S(2)*x + S(-1))**(S(1)/3) + sqrt(S(2)*x + S(-1))), x), x, -x + S(3)*(S(2)*x + S(-1))**(S(7)/6)/S(7) + S(3)*(S(2)*x + S(-1))**(S(5)/6)/S(5) + S(18)*(S(2)*x + S(-1))**(S(1)/6) - S(3)*(S(2)*x + S(-1))**(S(4)/3)/S(8) - S(3)*(S(2)*x + S(-1))**(S(2)/3)/S(4) - S(9)*(S(2)*x + S(-1))**(S(1)/3) + (S(2)*x + S(-1))**(S(3)/2)/S(3) + S(6)*sqrt(S(2)*x + S(-1)) - S(18)*log((S(2)*x + S(-1))**(S(1)/6) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sqrt(sqrt(x) + S(1)) + S(2)), x), x, S(8)*(sqrt(sqrt(x) + S(1)) + S(2))**(S(7)/2)/S(7) - S(48)*(sqrt(sqrt(x) + S(1)) + S(2))**(S(5)/2)/S(5) + S(88)*(sqrt(sqrt(x) + S(1)) + S(2))**(S(3)/2)/S(3) - S(48)*sqrt(sqrt(sqrt(x) + S(1)) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(sqrt(x) + S(4)) + S(2)), x), x, S(8)*(sqrt(sqrt(x) + S(4)) + S(2))**(S(9)/2)/S(9) - S(48)*(sqrt(sqrt(x) + S(4)) + S(2))**(S(7)/2)/S(7) + S(64)*(sqrt(sqrt(x) + S(4)) + S(2))**(S(5)/2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-sqrt(sqrt(S(5)*x + S(-9)) + S(4)) + S(2)), x), x, S(8)*(-sqrt(sqrt(S(5)*x + S(-9)) + S(4)) + S(2))**(S(9)/2)/S(45) - S(48)*(-sqrt(sqrt(S(5)*x + S(-9)) + S(4)) + S(2))**(S(7)/2)/S(35) + S(64)*(-sqrt(sqrt(S(5)*x + S(-9)) + S(4)) + S(2))**(S(5)/2)/S(25), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sqrt(sqrt(x) + S(1)) + S(2)), x), x, S(8)*(sqrt(sqrt(x) + S(1)) + S(2))**(S(7)/2)/S(7) - S(48)*(sqrt(sqrt(x) + S(1)) + S(2))**(S(5)/2)/S(5) + S(88)*(sqrt(sqrt(x) + S(1)) + S(2))**(S(3)/2)/S(3) - S(48)*sqrt(sqrt(sqrt(x) + S(1)) + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(sqrt(sqrt(x) + S(1)) + S(1)) + S(1)), x), x, S(16)*(sqrt(sqrt(sqrt(x) + S(1)) + S(1)) + S(1))**(S(17)/2)/S(17) - S(112)*(sqrt(sqrt(sqrt(x) + S(1)) + S(1)) + S(1))**(S(15)/2)/S(15) + S(288)*(sqrt(sqrt(sqrt(x) + S(1)) + S(1)) + S(1))**(S(13)/2)/S(13) - S(320)*(sqrt(sqrt(sqrt(x) + S(1)) + S(1)) + S(1))**(S(11)/2)/S(11) + S(112)*(sqrt(sqrt(sqrt(x) + S(1)) + S(1)) + S(1))**(S(9)/2)/S(9) + S(48)*(sqrt(sqrt(sqrt(x) + S(1)) + S(1)) + S(1))**(S(7)/2)/S(7) - S(32)*(sqrt(sqrt(sqrt(x) + S(1)) + S(1)) + S(1))**(S(5)/2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2)), x), x, S(4)*(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2))**(S(17)/2)/S(17) - S(56)*(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2))**(S(15)/2)/S(15) + S(300)*(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2))**(S(13)/2)/S(13) - S(760)*(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2))**(S(11)/2)/S(11) + S(304)*(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2))**(S(9)/2)/S(3) - S(480)*(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2))**(S(7)/2)/S(7) + S(136)*(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2))**(S(5)/2)/S(5) - S(16)*(sqrt(sqrt(S(2)*sqrt(x) + S(-1)) + S(3)) + S(2))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(sqrt(sqrt(x + S(-1)) + S(1)) + S(1)), x), x, S(8)*(sqrt(sqrt(x + S(-1)) + S(1)) + S(1))**(S(17)/2)/S(17) - S(56)*(sqrt(sqrt(x + S(-1)) + S(1)) + S(1))**(S(15)/2)/S(15) + S(144)*(sqrt(sqrt(x + S(-1)) + S(1)) + S(1))**(S(13)/2)/S(13) - S(160)*(sqrt(sqrt(x + S(-1)) + S(1)) + S(1))**(S(11)/2)/S(11) + S(8)*(sqrt(sqrt(x + S(-1)) + S(1)) + S(1))**(S(9)/2) - S(24)*(sqrt(sqrt(x + S(-1)) + S(1)) + S(1))**(S(7)/2)/S(7) + S(16)*(sqrt(sqrt(x + S(-1)) + S(1)) + S(1))**(S(5)/2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x + S(-1))*sqrt(x - sqrt(x + S(-1)))), x), x, -S(2)*asinh(sqrt(S(3))*(-S(2)*sqrt(x + S(-1)) + S(1))/S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x + sqrt(S(2)*x + S(-1)) + S(1)), x), x, S(2)*sqrt(x + sqrt(S(2)*x + S(-1)) + S(1)) - sqrt(S(2))*asinh(sqrt(S(2))*(sqrt(S(2)*x + S(-1)) + S(1))/S(2)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(S(1)/sqrt(x + sqrt(S(2)*x + S(-1)) + S(1)), x), x, sqrt(S(2))*sqrt(S(2)*x + S(2)*sqrt(S(2)*x + S(-1)) + S(2)) - sqrt(S(2))*asinh(sqrt(S(2))*(sqrt(S(2)*x + S(-1)) + S(1))/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((p*x + q)/((f + sqrt(a*x + b))*sqrt(a*x + b)), x), x, p*x/a - S(2)*f*p*sqrt(a*x + b)/a**S(2) - (-S(2)*a*q + S(2)*b*p - S(2)*f**S(2)*p)*log(f + sqrt(a*x + b))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-sqrt(x) - x + S(1)), x), x, (-sqrt(x)/S(2) + S(-1)/4)*sqrt(-sqrt(x) - x + S(1)) - S(2)*(-sqrt(x) - x + S(1))**(S(3)/2)/S(3) - S(5)*asin(sqrt(S(5))*(S(2)*sqrt(x) + S(1))/S(5))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(6)*sqrt(x) + x + S(9))/(S(4)*sqrt(x) + x), x), x, S(4)*sqrt(x) + x + S(2)*log(sqrt(x) + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-S(8)*x**(S(7)/2) + S(6))/(-S(9)*sqrt(x) + S(5)), x), x, S(80)*x**(S(7)/2)/S(567) + S(400)*x**(S(5)/2)/S(6561) + S(50000)*x**(S(3)/2)/S(1594323) - S(56145628)*sqrt(x)/S(43046721) + S(2)*x**S(4)/S(9) + S(200)*x**S(3)/S(2187) + S(2500)*x**S(2)/S(59049) + S(125000)*x/S(4782969) - S(280728140)*log(-S(9)*sqrt(x) + S(5))/S(387420489), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x + S(1))*(x**S(3) + S(1))/(x**S(2) + S(1)), x), x, S(2)*(x + S(1))**(S(5)/2)/S(5) - S(2)*(x + S(1))**(S(3)/2)/S(3) - S(2)*sqrt(x + S(1)) + (S(1) - I)**(S(3)/2)*atanh(sqrt(x + S(1))/sqrt(S(1) - I)) + (S(1) + I)**(S(3)/2)*atanh(sqrt(x + S(1))/sqrt(S(1) + I)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(x + S(1))*(x**S(3) + S(1))/(x**S(2) + S(1)), x), x, S(2)*(x + S(1))**(S(5)/2)/S(5) - S(2)*(x + S(1))**(S(3)/2)/S(3) - S(2)*sqrt(x + S(1)) - log(x - sqrt(S(2) + S(2)*sqrt(S(2)))*sqrt(x + S(1)) + S(1) + sqrt(S(2)))/(S(2)*sqrt(S(1) + sqrt(S(2)))) + log(x + sqrt(S(2) + S(2)*sqrt(S(2)))*sqrt(x + S(1)) + S(1) + sqrt(S(2)))/(S(2)*sqrt(S(1) + sqrt(S(2)))) - sqrt(S(1) + sqrt(S(2)))*atan((-S(2)*sqrt(x + S(1)) + sqrt(S(2) + S(2)*sqrt(S(2))))/sqrt(S(-2) + S(2)*sqrt(S(2)))) + sqrt(S(1) + sqrt(S(2)))*atan((S(2)*sqrt(x + S(1)) + sqrt(S(2) + S(2)*sqrt(S(2))))/sqrt(S(-2) + S(2)*sqrt(S(2)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-sqrt(x) + x + S(-1))/(sqrt(x)*(x + S(-1))), x), x, atan((-sqrt(x) + S(3))/(S(2)*sqrt(-sqrt(x) + x + S(-1)))) - S(2)*atanh((-S(2)*sqrt(x) + S(1))/(S(2)*sqrt(-sqrt(x) + x + S(-1)))) - atanh((S(3)*sqrt(x) + S(1))/(S(2)*sqrt(-sqrt(x) + x + S(-1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*sqrt(x + S(1)) + S(1))/(x*sqrt(x + S(1))*sqrt(x + sqrt(x + S(1)))), x), x, -atan((sqrt(x + S(1)) + S(3))/(S(2)*sqrt(x + sqrt(x + S(1))))) + S(3)*atanh((-S(3)*sqrt(x + S(1)) + S(1))/(S(2)*sqrt(x + sqrt(x + S(1))))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(x)*sqrt(x + S(1))), x), x, S(2)*asinh(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x/(x + S(1)))/x, x), x, S(2)*asinh(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x)/sqrt(x + S(1)), x), x, sqrt(x)*sqrt(x + S(1)) - asinh(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x/(x + S(1))), x), x, sqrt(x)*sqrt(x + S(1)) - asinh(sqrt(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x + S(-1))/(x**S(2)*sqrt(x + S(1))), x), x, atan(sqrt(x + S(-1))*sqrt(x + S(1))) - sqrt(x + S(-1))*sqrt(x + S(1))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x + S(-1))/(x + S(1)))/x**S(2), x), x, atan(sqrt(x + S(-1))*sqrt(x + S(1))) - sqrt(x + S(-1))*sqrt(x + S(1))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(x + S(-1))/sqrt(x + S(1)), x), x, x**S(2)*(x + S(-1))**(S(3)/2)*sqrt(x + S(1))/S(4) + (-x/S(12) + S(7)/24)*(x + S(-1))**(S(3)/2)*sqrt(x + S(1)) - S(3)*sqrt(x + S(-1))*sqrt(x + S(1))/S(8) + S(3)*acosh(x)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt((x + S(-1))/(x + S(1))), x), x, x**S(2)*(x + S(-1))**(S(3)/2)*sqrt(x + S(1))/S(4) + (-x/S(12) + S(7)/24)*(x + S(-1))**(S(3)/2)*sqrt(x + S(1)) - S(3)*sqrt(x + S(-1))*sqrt(x + S(1))/S(8) + S(3)*acosh(x)/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x/(x + S(1)))/x, x), x, S(2)*atan(sqrt(-x/(x + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((-x + S(1))/(x + S(1)))/(x + S(-1)), x), x, S(2)*atan(sqrt((-x + S(1))/(x + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((a + b*x)/(-b*x + c))/(a + b*x), x), x, S(2)*atan(sqrt((a + b*x)/(-b*x + c)))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((a + b*x)/(c + d*x))/(a + b*x), x), x, S(2)*atanh(sqrt(d)*sqrt((a + b*x)/(c + d*x))/sqrt(b))/(sqrt(b)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x/(x + S(1))), x), x, sqrt(-x/(x + S(1)))*(x + S(1)) - atan(sqrt(-x/(x + S(1)))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(-x/(x + S(1))), x), x, sqrt(-x/(x + S(1)))/(-x/(x + S(1)) + S(1)) - atan(sqrt(-x/(x + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((-x + S(1))/(x + S(1))), x), x, sqrt((-x + S(1))/(x + S(1)))*(x + S(1)) - S(2)*atan(sqrt((-x + S(1))/(x + S(1)))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt((-x + S(1))/(x + S(1))), x), x, S(2)*sqrt((-x + S(1))/(x + S(1)))/((-x + S(1))/(x + S(1)) + S(1)) - S(2)*atan(sqrt((-x + S(1))/(x + S(1)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((a + x)/(a - x)), x), x, S(2)*a*atan(sqrt((a + x)/(a - x))) - sqrt((a + x)/(a - x))*(a - x), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt((a + x)/(a - x)), x), x, -S(2)*a*sqrt((a + x)/(a - x))/(S(1) + (a + x)/(a - x)) + S(2)*a*atan(sqrt((a + x)/(a - x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((-a + x)/(a + x)), x), x, -S(2)*a*atanh(sqrt(-(a - x)/(a + x))) + sqrt(-(a - x)/(a + x))*(a + x), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt((-a + x)/(a + x)), x), x, S(2)*a*sqrt(-(a - x)/(a + x))/((a - x)/(a + x) + S(1)) - S(2)*a*atanh(sqrt(-(a - x)/(a + x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((a + b*x)/(c + d*x)), x), x, sqrt((a + b*x)/(c + d*x))*(c + d*x)/d - (-a*d + b*c)*atanh(sqrt(d)*sqrt((a + b*x)/(c + d*x))/sqrt(b))/(sqrt(b)*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt((a + b*x)/(c + d*x)), x), x, sqrt((a + b*x)/(c + d*x))*(-a*d + b*c)/(d*(b - d*(a + b*x)/(c + d*x))) - (-a*d + b*c)*atanh(sqrt(d)*sqrt((a + b*x)/(c + d*x))/sqrt(b))/(sqrt(b)*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x + S(-1))/(S(3)*x + S(5))), x), x, sqrt(x + S(-1))*sqrt(S(3)*x + S(5))/S(3) - S(8)*sqrt(S(3))*asinh(sqrt(S(6))*sqrt(x + S(-1))/S(4))/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((S(5)*x + S(-1))/(S(7)*x + S(1)))/x**S(2), x), x, -S(12)*atan(sqrt(S(7)*x + S(1))/sqrt(S(5)*x + S(-1))) - sqrt(S(5)*x + S(-1))*sqrt(S(7)*x + S(1))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt((-x + S(1))/(x + S(1)))*(x + S(1))), x), x, -(-x + S(1))/sqrt((-x + S(1))/(x + S(1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x/(sqrt((-x + S(1))/(x + S(1)))*(x + S(1))), x), x, -S(2)*sqrt((-x + S(1))/(x + S(1)))/((-x + S(1))/(x + S(1)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt(S(-1) + S(2)/(x + S(1)))*(x + S(1))), x), x, -sqrt(S(-1) + S(2)/(x + S(1)))*(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(sqrt((x + S(2))/(x + S(3)))*(x + S(1))), x), x, sqrt(x + S(2))*sqrt(x + S(3)) - asinh(sqrt(x + S(2))) + S(2)*sqrt(S(2))*atanh(sqrt(S(2))*sqrt(x + S(2))/sqrt(x + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(1) + S(1)/x)/(x + S(1))**S(2), x), x, S(2)/sqrt(S(1) + S(1)/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(1) + S(1)/x)/sqrt(-x**S(2) + S(1)), x), x, sqrt(x)*sqrt(S(1) + S(1)/x)*asin(S(2)*x + S(-1))/sqrt(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sqrt(a + b*sqrt(c/x)), x), x, S(4)*x**(m + S(1))*(a + b*sqrt(c/x))**(S(3)/2)*hyper((S(1), -S(2)*m + S(-1)/2), (S(5)/2,), (a + b*sqrt(c/x))/a)/(S(3)*a), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**m*sqrt(a + b*sqrt(c/x)), x), x, S(4)*b**S(2)*c*x**m*(-b*sqrt(c/x)/a)**(S(2)*m)*(a + b*sqrt(c/x))**(S(3)/2)*hyper((S(3)/2, S(2)*m + S(3)), (S(5)/2,), S(1) + b*sqrt(c/x)/a)/(S(3)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*sqrt(c/x)), x), x, x**S(2)*sqrt(a + b*sqrt(c/x))/S(2) + b*c**S(2)*sqrt(a + b*sqrt(c/x))/(S(12)*a*(c/x)**(S(3)/2)) - S(5)*b**S(2)*c*x*sqrt(a + b*sqrt(c/x))/(S(48)*a**S(2)) + S(5)*b**S(3)*c**S(2)*sqrt(a + b*sqrt(c/x))/(S(32)*a**S(3)*sqrt(c/x)) - S(5)*b**S(4)*c**S(2)*atanh(sqrt(a + b*sqrt(c/x))/sqrt(a))/(S(32)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c/x)), x), x, x*sqrt(a + b*sqrt(c/x)) + b*c*sqrt(a + b*sqrt(c/x))/(S(2)*a*sqrt(c/x)) - b**S(2)*c*atanh(sqrt(a + b*sqrt(c/x))/sqrt(a))/(S(2)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c/x))/x, x), x, S(4)*sqrt(a)*atanh(sqrt(a + b*sqrt(c/x))/sqrt(a)) - S(4)*sqrt(a + b*sqrt(c/x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c/x))/x**S(2), x), x, S(4)*a*(a + b*sqrt(c/x))**(S(3)/2)/(S(3)*b**S(2)*c) - S(4)*(a + b*sqrt(c/x))**(S(5)/2)/(S(5)*b**S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c/x))/x**S(3), x), x, S(4)*a**S(3)*(a + b*sqrt(c/x))**(S(3)/2)/(S(3)*b**S(4)*c**S(2)) - S(12)*a**S(2)*(a + b*sqrt(c/x))**(S(5)/2)/(S(5)*b**S(4)*c**S(2)) + S(12)*a*(a + b*sqrt(c/x))**(S(7)/2)/(S(7)*b**S(4)*c**S(2)) - S(4)*(a + b*sqrt(c/x))**(S(9)/2)/(S(9)*b**S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(c/x))/x**S(4), x), x, S(4)*a**S(5)*(a + b*sqrt(c/x))**(S(3)/2)/(S(3)*b**S(6)*c**S(3)) - S(4)*a**S(4)*(a + b*sqrt(c/x))**(S(5)/2)/(b**S(6)*c**S(3)) + S(40)*a**S(3)*(a + b*sqrt(c/x))**(S(7)/2)/(S(7)*b**S(6)*c**S(3)) - S(40)*a**S(2)*(a + b*sqrt(c/x))**(S(9)/2)/(S(9)*b**S(6)*c**S(3)) + S(20)*a*(a + b*sqrt(c/x))**(S(11)/2)/(S(11)*b**S(6)*c**S(3)) - S(4)*(a + b*sqrt(c/x))**(S(13)/2)/(S(13)*b**S(6)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/sqrt(a + b*sqrt(c/x)), x), x, S(4)*x**(m + S(1))*sqrt(a + b*sqrt(c/x))*hyper((S(1), -S(2)*m + S(-3)/2), (S(3)/2,), (a + b*sqrt(c/x))/a)/a, expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**m/sqrt(a + b*sqrt(c/x)), x), x, S(4)*b**S(2)*c*x**m*(-b*sqrt(c/x)/a)**(S(2)*m)*sqrt(a + b*sqrt(c/x))*hyper((S(1)/2, S(2)*m + S(3)), (S(3)/2,), S(1) + b*sqrt(c/x)/a)/a**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*sqrt(c/x)), x), x, x**S(2)*sqrt(a + b*sqrt(c/x))/(S(2)*a) - S(7)*b*c**S(2)*sqrt(a + b*sqrt(c/x))/(S(12)*a**S(2)*(c/x)**(S(3)/2)) + S(35)*b**S(2)*c*x*sqrt(a + b*sqrt(c/x))/(S(48)*a**S(3)) - S(35)*b**S(3)*c**S(2)*sqrt(a + b*sqrt(c/x))/(S(32)*a**S(4)*sqrt(c/x)) + S(35)*b**S(4)*c**S(2)*atanh(sqrt(a + b*sqrt(c/x))/sqrt(a))/(S(32)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*sqrt(c/x)), x), x, x*sqrt(a + b*sqrt(c/x))/a - S(3)*b*c*sqrt(a + b*sqrt(c/x))/(S(2)*a**S(2)*sqrt(c/x)) + S(3)*b**S(2)*c*atanh(sqrt(a + b*sqrt(c/x))/sqrt(a))/(S(2)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*sqrt(c/x))), x), x, S(4)*atanh(sqrt(a + b*sqrt(c/x))/sqrt(a))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*sqrt(c/x))), x), x, S(4)*a*sqrt(a + b*sqrt(c/x))/(b**S(2)*c) - S(4)*(a + b*sqrt(c/x))**(S(3)/2)/(S(3)*b**S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a + b*sqrt(c/x))), x), x, S(4)*a**S(3)*sqrt(a + b*sqrt(c/x))/(b**S(4)*c**S(2)) - S(4)*a**S(2)*(a + b*sqrt(c/x))**(S(3)/2)/(b**S(4)*c**S(2)) + S(12)*a*(a + b*sqrt(c/x))**(S(5)/2)/(S(5)*b**S(4)*c**S(2)) - S(4)*(a + b*sqrt(c/x))**(S(7)/2)/(S(7)*b**S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a + b*sqrt(c/x))), x), x, S(4)*a**S(5)*sqrt(a + b*sqrt(c/x))/(b**S(6)*c**S(3)) - S(20)*a**S(4)*(a + b*sqrt(c/x))**(S(3)/2)/(S(3)*b**S(6)*c**S(3)) + S(8)*a**S(3)*(a + b*sqrt(c/x))**(S(5)/2)/(b**S(6)*c**S(3)) - S(40)*a**S(2)*(a + b*sqrt(c/x))**(S(7)/2)/(S(7)*b**S(6)*c**S(3)) + S(20)*a*(a + b*sqrt(c/x))**(S(9)/2)/(S(9)*b**S(6)*c**S(3)) - S(4)*(a + b*sqrt(c/x))**(S(11)/2)/(S(11)*b**S(6)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sqrt(S(1)/x) + S(1)), x), x, x*sqrt(sqrt(S(1)/x) + S(1)) - S(3)*sqrt(sqrt(S(1)/x) + S(1))/(S(2)*sqrt(S(1)/x)) + S(3)*atanh(sqrt(sqrt(S(1)/x) + S(1)))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sqrt(a + b*sqrt(d/x) + c/x), x), x, x**(m + S(1))*sqrt(a + b*sqrt(d/x) + c/x)*AppellF1(-S(2)*m + S(-2), S(-1)/2, S(-1)/2, -S(2)*m + S(-1), -S(2)*c*sqrt(d/x)/(sqrt(d)*(b*sqrt(d) - sqrt(-S(4)*a*c + b**S(2)*d))), -S(2)*c*sqrt(d/x)/(sqrt(d)*(b*sqrt(d) + sqrt(-S(4)*a*c + b**S(2)*d))))/((m + S(1))*sqrt(S(2)*c*sqrt(d/x)/(sqrt(d)*(b*sqrt(d) - sqrt(-S(4)*a*c + b**S(2)*d))) + S(1))*sqrt(S(2)*c*sqrt(d/x)/(sqrt(d)*(b*sqrt(d) + sqrt(-S(4)*a*c + b**S(2)*d))) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a + b*sqrt(d/x) + c/x), x), x, x**S(3)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(3)*a) - S(3)*b*d**S(3)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(10)*a**S(2)*(d/x)**(S(5)/2)) - x**S(2)*(S(20)*a*c - S(21)*b**S(2)*d)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(80)*a**S(3)) + S(7)*b*d**S(2)*(S(28)*a*c - S(15)*b**S(2)*d)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(480)*a**S(4)*(d/x)**(S(3)/2)) + x*(S(2)*a + b*sqrt(d/x))*sqrt(a + b*sqrt(d/x) + c/x)*(S(16)*a**S(2)*c**S(2) - S(56)*a*b**S(2)*c*d + S(21)*b**S(4)*d**S(2))/(S(256)*a**S(5)) + (S(4)*a*c - b**S(2)*d)*(S(16)*a**S(2)*c**S(2) - S(56)*a*b**S(2)*c*d + S(21)*b**S(4)*d**S(2))*atanh((S(2)*a + b*sqrt(d/x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(512)*a**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*sqrt(d/x) + c/x), x), x, x**S(2)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(2)*a) - S(5)*b*d**S(2)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(12)*a**S(2)*(d/x)**(S(3)/2)) - x*(S(2)*a + b*sqrt(d/x))*(S(4)*a*c - S(5)*b**S(2)*d)*sqrt(a + b*sqrt(d/x) + c/x)/(S(32)*a**S(3)) - (S(4)*a*c - S(5)*b**S(2)*d)*(S(4)*a*c - b**S(2)*d)*atanh((S(2)*a + b*sqrt(d/x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(64)*a**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(d/x) + c/x), x), x, x*(S(2)*a + b*sqrt(d/x))*sqrt(a + b*sqrt(d/x) + c/x)/(S(2)*a) + (S(4)*a*c - b**S(2)*d)*atanh((S(2)*a + b*sqrt(d/x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(4)*a**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(d/x) + c/x)/x, x), x, S(2)*sqrt(a)*atanh((S(2)*a + b*sqrt(d/x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(d/x) + c/x))) - b*sqrt(d)*atanh((b*d + S(2)*c*sqrt(d/x))/(S(2)*sqrt(c)*sqrt(d)*sqrt(a + b*sqrt(d/x) + c/x)))/sqrt(c) - S(2)*sqrt(a + b*sqrt(d/x) + c/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(d/x) + c/x)/x**S(2), x), x, b*(b*d + S(2)*c*sqrt(d/x))*sqrt(a + b*sqrt(d/x) + c/x)/(S(4)*c**S(2)) + b*sqrt(d)*(S(4)*a*c - b**S(2)*d)*atanh((b*d + S(2)*c*sqrt(d/x))/(S(2)*sqrt(c)*sqrt(d)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(8)*c**(S(5)/2)) - S(2)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(d/x) + c/x)/x**S(3), x), x, -b*(S(12)*a*c - S(7)*b**S(2)*d)*(b*d + S(2)*c*sqrt(d/x))*sqrt(a + b*sqrt(d/x) + c/x)/(S(64)*c**S(4)) - b*sqrt(d)*(S(4)*a*c - b**S(2)*d)*(S(12)*a*c - S(7)*b**S(2)*d)*atanh((b*d + S(2)*c*sqrt(d/x))/(S(2)*sqrt(c)*sqrt(d)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(128)*c**(S(9)/2)) - S(2)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(5)*c*x) + (a + b*sqrt(d/x) + c/x)**(S(3)/2)*(S(32)*a*c - S(35)*b**S(2)*d + S(42)*b*c*sqrt(d/x))/(S(120)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*sqrt(d/x) + c/x)/x**S(4), x), x, S(11)*b*(d/x)**(S(3)/2)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(42)*c**S(2)*d) + b*(b*d + S(2)*c*sqrt(d/x))*sqrt(a + b*sqrt(d/x) + c/x)*(S(80)*a**S(2)*c**S(2) - S(120)*a*b**S(2)*c*d + S(33)*b**S(4)*d**S(2))/(S(512)*c**S(6)) + b*sqrt(d)*(S(4)*a*c - b**S(2)*d)*(S(80)*a**S(2)*c**S(2) - S(120)*a*b**S(2)*c*d + S(33)*b**S(4)*d**S(2))*atanh((b*d + S(2)*c*sqrt(d/x))/(S(2)*sqrt(c)*sqrt(d)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(1024)*c**(S(13)/2)) - S(2)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(7)*c*x**S(2)) + (S(32)*a*c - S(33)*b**S(2)*d)*(a + b*sqrt(d/x) + c/x)**(S(3)/2)/(S(140)*c**S(3)*x) - (a + b*sqrt(d/x) + c/x)**(S(3)/2)*(S(1024)*a**S(2)*c**S(2) - S(3276)*a*b**S(2)*c*d + S(1155)*b**S(4)*d**S(2) + S(18)*b*c*sqrt(d/x)*(S(148)*a*c - S(77)*b**S(2)*d))/(S(6720)*c**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/sqrt(a + b*sqrt(d/x) + c/x), x), x, x**(m + S(1))*sqrt(S(2)*c*sqrt(d/x)/(sqrt(d)*(b*sqrt(d) - sqrt(-S(4)*a*c + b**S(2)*d))) + S(1))*sqrt(S(2)*c*sqrt(d/x)/(sqrt(d)*(b*sqrt(d) + sqrt(-S(4)*a*c + b**S(2)*d))) + S(1))*AppellF1(-S(2)*m + S(-2), S(1)/2, S(1)/2, -S(2)*m + S(-1), -S(2)*c*sqrt(d/x)/(sqrt(d)*(b*sqrt(d) - sqrt(-S(4)*a*c + b**S(2)*d))), -S(2)*c*sqrt(d/x)/(sqrt(d)*(b*sqrt(d) + sqrt(-S(4)*a*c + b**S(2)*d))))/((m + S(1))*sqrt(a + b*sqrt(d/x) + c/x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*sqrt(d/x) + c/x), x), x, x**S(3)*sqrt(a + b*sqrt(d/x) + c/x)/(S(3)*a) - S(11)*b*d**S(3)*sqrt(a + b*sqrt(d/x) + c/x)/(S(30)*a**S(2)*(d/x)**(S(5)/2)) - x**S(2)*(S(100)*a*c - S(99)*b**S(2)*d)*sqrt(a + b*sqrt(d/x) + c/x)/(S(240)*a**S(3)) + b*d**S(2)*(S(156)*a*c - S(77)*b**S(2)*d)*sqrt(a + b*sqrt(d/x) + c/x)/(S(160)*a**S(4)*(d/x)**(S(3)/2)) + x*sqrt(a + b*sqrt(d/x) + c/x)*(S(400)*a**S(2)*c**S(2) - S(1176)*a*b**S(2)*c*d + S(385)*b**S(4)*d**S(2))/(S(640)*a**S(5)) - S(7)*b*d*sqrt(a + b*sqrt(d/x) + c/x)*(S(528)*a**S(2)*c**S(2) - S(680)*a*b**S(2)*c*d + S(165)*b**S(4)*d**S(2))/(S(1280)*a**S(6)*sqrt(d/x)) - (S(320)*a**S(3)*c**S(3) - S(1680)*a**S(2)*b**S(2)*c**S(2)*d + S(1260)*a*b**S(4)*c*d**S(2) - S(231)*b**S(6)*d**S(3))*atanh((S(2)*a + b*sqrt(d/x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(512)*a**(S(13)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*sqrt(d/x) + c/x), x), x, x**S(2)*sqrt(a + b*sqrt(d/x) + c/x)/(S(2)*a) - S(7)*b*d**S(2)*sqrt(a + b*sqrt(d/x) + c/x)/(S(12)*a**S(2)*(d/x)**(S(3)/2)) - x*(S(36)*a*c - S(35)*b**S(2)*d)*sqrt(a + b*sqrt(d/x) + c/x)/(S(48)*a**S(3)) + S(5)*b*d*(S(44)*a*c - S(21)*b**S(2)*d)*sqrt(a + b*sqrt(d/x) + c/x)/(S(96)*a**S(4)*sqrt(d/x)) + (S(48)*a**S(2)*c**S(2) - S(120)*a*b**S(2)*c*d + S(35)*b**S(4)*d**S(2))*atanh((S(2)*a + b*sqrt(d/x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(64)*a**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*sqrt(d/x) + c/x), x), x, x*sqrt(a + b*sqrt(d/x) + c/x)/a - S(3)*b*d*sqrt(a + b*sqrt(d/x) + c/x)/(S(2)*a**S(2)*sqrt(d/x)) - (S(4)*a*c - S(3)*b**S(2)*d)*atanh((S(2)*a + b*sqrt(d/x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(4)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*sqrt(d/x) + c/x)), x), x, S(2)*atanh((S(2)*a + b*sqrt(d/x))/(S(2)*sqrt(a)*sqrt(a + b*sqrt(d/x) + c/x)))/sqrt(a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*sqrt(d/x) + c/x)), x), x, b*sqrt(d)*atanh((b*d + S(2)*c*sqrt(d/x))/(S(2)*sqrt(c)*sqrt(d)*sqrt(a + b*sqrt(d/x) + c/x)))/c**(S(3)/2) - S(2)*sqrt(a + b*sqrt(d/x) + c/x)/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(3)*sqrt(a + b*sqrt(d/x) + c/x)), x), x, -b*sqrt(d)*(S(12)*a*c - S(5)*b**S(2)*d)*atanh((b*d + S(2)*c*sqrt(d/x))/(S(2)*sqrt(c)*sqrt(d)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(8)*c**(S(7)/2)) - S(2)*sqrt(a + b*sqrt(d/x) + c/x)/(S(3)*c*x) + sqrt(a + b*sqrt(d/x) + c/x)*(S(16)*a*c - S(15)*b**S(2)*d + S(10)*b*c*sqrt(d/x))/(S(12)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(4)*sqrt(a + b*sqrt(d/x) + c/x)), x), x, S(9)*b*(d/x)**(S(3)/2)*sqrt(a + b*sqrt(d/x) + c/x)/(S(20)*c**S(2)*d) + b*sqrt(d)*(S(240)*a**S(2)*c**S(2) - S(280)*a*b**S(2)*c*d + S(63)*b**S(4)*d**S(2))*atanh((b*d + S(2)*c*sqrt(d/x))/(S(2)*sqrt(c)*sqrt(d)*sqrt(a + b*sqrt(d/x) + c/x)))/(S(128)*c**(S(11)/2)) - S(2)*sqrt(a + b*sqrt(d/x) + c/x)/(S(5)*c*x**S(2)) + (S(64)*a*c - S(63)*b**S(2)*d)*sqrt(a + b*sqrt(d/x) + c/x)/(S(120)*c**S(3)*x) - sqrt(a + b*sqrt(d/x) + c/x)*(S(1024)*a**S(2)*c**S(2) - S(2940)*a*b**S(2)*c*d + S(945)*b**S(4)*d**S(2) + S(14)*b*c*sqrt(d/x)*(S(92)*a*c - S(45)*b**S(2)*d))/(S(960)*c**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(S(1)/x) + S(1)/x), x), x, S(4)*(sqrt(S(1)/x) + S(1)/x)**(S(3)/2)/(S(3)*(S(1)/x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sqrt(S(1)/x) + S(2) + S(1)/x), x), x, x*(sqrt(S(1)/x)/S(4) + S(1))*sqrt(sqrt(S(1)/x) + S(2) + S(1)/x) + S(7)*sqrt(S(2))*atanh(sqrt(S(2))*(sqrt(S(1)/x) + S(4))/(S(4)*sqrt(sqrt(S(1)/x) + S(2) + S(1)/x)))/S(16), expand=True, _diff=True, _numerical=True) # difference in simplify assert rubi_test(rubi_integrate(S(1)/(x + sqrt(-x**S(2) - S(2)*x + S(3))), x), x, -log(-(-x - sqrt(S(3))*sqrt(-x**S(2) - S(2)*x + S(3)) + S(3))/x**S(2))/S(2) + (-sqrt(S(7))/S(14) + S(1)/2)*log(S(1) + sqrt(S(3)) + sqrt(S(7)) - sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x) + (sqrt(S(7))/S(14) + S(1)/2)*log(-sqrt(S(7)) + S(1) + sqrt(S(3)) - sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x) + atan((-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(-x**S(2) - S(2)*x + S(3)))**(S(-2)), x), x, (-S(2)*sqrt(S(3)) + S(8) + S(2)*(-S(3)*sqrt(-x**S(2) - S(2)*x + S(3)) + S(3)*sqrt(S(3)))/x)/(-S(7)*sqrt(S(3)) + S(14) - S(7)*(S(2) + S(2)*sqrt(S(3)))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x + S(7)*sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))**S(2)/x**S(2)) - S(8)*sqrt(S(7))*atanh(sqrt(S(7))*(S(1) + sqrt(S(3)) - sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x)/S(7))/S(49), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(-x**S(2) - S(2)*x + S(3)))**(S(-3)), x), x, S(4)*sqrt(S(3))*(S(1) + sqrt(S(3)) - sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x)/(-S(49)*sqrt(S(3)) + S(98) - S(49)*(S(2) + S(2)*sqrt(S(3)))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x + S(49)*sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))**S(2)/x**S(2)) - sqrt(S(3))*(-S(2)*sqrt(S(3)) + S(8) + S(2)*(-S(7)*sqrt(S(3)) + S(10))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x)/(S(21)*(-sqrt(S(3)) + S(2) - (S(2) + S(2)*sqrt(S(3)))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x + sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))**S(2)/x**S(2))**S(2)) - S(12)*sqrt(S(7))*atanh(sqrt(S(7))*(S(1) + sqrt(S(3)) - sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x)/S(7))/S(343) + (S(6) + S(4)*sqrt(S(3)))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))**S(2)/(S(3)*x**S(2)*(-sqrt(S(3)) + S(2) - (S(2) + S(2)*sqrt(S(3)))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x + sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))**S(2)/x**S(2))**S(2)) - S(2)*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))**S(3)/(x**S(3)*(-sqrt(S(3)) + S(2) - (S(2) + S(2)*sqrt(S(3)))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))/x + sqrt(S(3))*(-sqrt(-x**S(2) - S(2)*x + S(3)) + sqrt(S(3)))**S(2)/x**S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x + sqrt(x**S(2) - S(2)*x + S(-3))), x), x, -S(3)*log(x + sqrt(x**S(2) - S(2)*x + S(-3)))/S(2) + S(2)*log(-x - sqrt(x**S(2) - S(2)*x + S(-3)) + S(1)) - S(2)/(-x - sqrt(x**S(2) - S(2)*x + S(-3)) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(x**S(2) - S(2)*x + S(-3)))**(S(-2)), x), x, -S(4)*log(x + sqrt(x**S(2) - S(2)*x + S(-3))) + S(4)*log(-x - sqrt(x**S(2) - S(2)*x + S(-3)) + S(1)) - S(2)/(-x - sqrt(x**S(2) - S(2)*x + S(-3)) + S(1)) + S(3)/(S(2)*x + S(2)*sqrt(x**S(2) - S(2)*x + S(-3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(x**S(2) - S(2)*x + S(-3)))**(S(-3)), x), x, -S(6)*log(x + sqrt(x**S(2) - S(2)*x + S(-3))) + S(6)*log(-x - sqrt(x**S(2) - S(2)*x + S(-3)) + S(1)) - S(2)/(-x - sqrt(x**S(2) - S(2)*x + S(-3)) + S(1)) + S(4)/(x + sqrt(x**S(2) - S(2)*x + S(-3))) + S(3)/(S(4)*(x + sqrt(x**S(2) - S(2)*x + S(-3)))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x + sqrt(-x**S(2) - S(4)*x + S(-3))), x), x, log((x*sqrt(-x + S(-1)) + x*sqrt(x + S(3)) + S(3)*sqrt(-x + S(-1)))/(x + S(3))**(S(3)/2))/S(2) - log(S(1)/(x + S(3)))/S(2) - sqrt(S(2))*atan(sqrt(S(2))*(-S(3)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(1))/S(2)) - atan(sqrt(-x + S(-1))/sqrt(x + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(-x**S(2) - S(4)*x + S(-3)))**(S(-2)), x), x, (-sqrt(-x + S(-1))/sqrt(x + S(3)) + S(1))/(-S(2)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(1) - (S(3)*x + S(3))/(x + S(3))) + sqrt(S(2))*atan(sqrt(S(2))*(-S(3)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(1))/S(2))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x + sqrt(-x**S(2) - S(4)*x + S(-3)))**(S(-3)), x), x, -(-S(9)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(5))/(-S(18)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(9) - S(9)*(S(3)*x + S(3))/(x + S(3))) - (-S(3)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(1))/(-S(12)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(6) - S(6)*(S(3)*x + S(3))/(x + S(3))) - (-S(2)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(4))/(S(9)*(-S(2)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(1) - (S(3)*x + S(3))/(x + S(3)))**S(2)) - S(3)*sqrt(S(2))*atan(sqrt(S(2))*(-S(3)*sqrt(-x + S(-1))/sqrt(x + S(3)) + S(1))/S(2))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(x + S(1))**S(3)*(S(2)*x + S(1))*sqrt(-x**S(4) - S(2)*x**S(3) - x**S(2) + S(1)), x), x, -(-x**S(4) - S(2)*x**S(3) - x**S(2) + S(1))**(S(3)/2)*(S(3)*x**S(4) + S(6)*x**S(3) + S(3)*x**S(2) + S(2))/S(15), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(3)*(x + S(1))**S(3)*(S(2)*x + S(1))*sqrt(-x**S(4) - S(2)*x**S(3) - x**S(2) + S(1)), x), x, -(-S(4)*(x + S(1)/2)**S(2) + S(1))**S(2)*(-S(16)*(x + S(1)/2)**S(4) + S(8)*(x + S(1)/2)**S(2) + S(15))**(S(3)/2)/S(5120) - (-S(16)*(x + S(1)/2)**S(4) + S(8)*(x + S(1)/2)**S(2) + S(15))**(S(3)/2)/S(480), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x + S(1))*(x**S(2) + x)**S(3)*sqrt(-(x**S(2) + x)**S(2) + S(1)), x), x, -(-x**S(4) - S(2)*x**S(3) - x**S(2) + S(1))**(S(3)/2)*(S(3)*x**S(4) + S(6)*x**S(3) + S(3)*x**S(2) + S(2))/S(15), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((S(2)*x + S(1))*(x**S(2) + x)**S(3)*sqrt(-(x**S(2) + x)**S(2) + S(1)), x), x, -(-S(4)*(x + S(1)/2)**S(2) + S(1))**S(2)*(-S(16)*(x + S(1)/2)**S(4) + S(8)*(x + S(1)/2)**S(2) + S(15))**(S(3)/2)/S(5120) - (-S(16)*(x + S(1)/2)**S(4) + S(8)*(x + S(1)/2)**S(2) + S(15))**(S(3)/2)/S(480), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) + S(3)*x**S(2) + S(3)*x)/(x**S(4) + S(4)*x**S(3) + S(6)*x**S(2) + S(4)*x + S(1)), x), x, log(x + S(1)) + S(1)/(S(3)*(x + S(1))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(3) - S(3)*x**S(2) + S(3)*x + S(-1))/(x**S(4) + S(4)*x**S(3) + S(6)*x**S(2) + S(4)*x + S(1)), x), x, log(x + S(1)) + S(6)/(x + S(1)) - S(6)/(x + S(1))**S(2) + S(8)/(S(3)*(x + S(1))**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**(S(3)/2), x), x, (x + S(-1))*(-S(6)*(x + S(-1))**S(2)/S(35) + S(26)/35)*sqrt(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + (x + S(-1))*(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2)/S(7) - S(16)*sqrt(S(3))*elliptic_e(asin(x + S(-1)), S(-1)/3)/S(5) + S(176)*sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(35), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, (x + S(-1))*sqrt(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))/S(3) - S(2)*sqrt(S(3))*elliptic_e(asin(x + S(-1)), S(-1)/3)/S(3) + S(4)*sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(-x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**(S(-3)/2), x), x, (x + S(-1))*((x + S(-1))**S(2) + S(5))/(S(24)*sqrt(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) - sqrt(S(3))*elliptic_e(asin(x + S(-1)), S(-1)/3)/S(24) + sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((-x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**(S(-5)/2), x), x, (x + S(-1))*((x + S(-1))**S(2) + S(5))/(S(72)*(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2)) + (x + S(-1))*(S(7)*(x + S(-1))**S(2) + S(26))/(S(432)*sqrt(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) - S(7)*sqrt(S(3))*elliptic_e(asin(x + S(-1)), S(-1)/3)/S(432) + S(11)*sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(432), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x*(-x + S(2))*(x**S(2) - S(2)*x + S(4)))**(S(3)/2), x), x, (x + S(-1))*(-S(6)*(x + S(-1))**S(2)/S(35) + S(26)/35)*sqrt(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + (x + S(-1))*(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2)/S(7) - S(16)*sqrt(S(3))*elliptic_e(asin(x + S(-1)), S(-1)/3)/S(5) + S(176)*sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(35), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x*(-x + S(2))*(x**S(2) - S(2)*x + S(4))), x), x, (x + S(-1))*sqrt(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))/S(3) - S(2)*sqrt(S(3))*elliptic_e(asin(x + S(-1)), S(-1)/3)/S(3) + S(4)*sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(x*(-x + S(2))*(x**S(2) - S(2)*x + S(4))), x), x, sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x*(-x + S(2))*(x**S(2) - S(2)*x + S(4)))**(S(-3)/2), x), x, (x + S(-1))*((x + S(-1))**S(2) + S(5))/(S(24)*sqrt(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) - sqrt(S(3))*elliptic_e(asin(x + S(-1)), S(-1)/3)/S(24) + sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x*(-x + S(2))*(x**S(2) - S(2)*x + S(4)))**(S(-5)/2), x), x, (x + S(-1))*((x + S(-1))**S(2) + S(5))/(S(72)*(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2)) + (x + S(-1))*(S(7)*(x + S(-1))**S(2) + S(26))/(S(432)*sqrt(-(x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) - S(7)*sqrt(S(3))*elliptic_e(asin(x + S(-1)), S(-1)/3)/S(432) + S(11)*sqrt(S(3))*elliptic_f(asin(x + S(-1)), S(-1)/3)/S(432), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4))**S(4), x), x, -S(8)*c**S(5)*(S(4)*a*d**S(2) + c**S(3))**S(3)*(c/d + x)**S(3)/(S(3)*d**S(6)) - S(8)*c**S(4)*(S(4)*a*d**S(2) + c**S(3))*(S(12)*a*d**S(2) + S(7)*c**S(3))*(c/d + x)**S(7)/(S(7)*d**S(2)) + c**S(4)*x*(S(4)*a*d**S(2) + c**S(3))**S(4)/d**S(8) - S(8)*c**S(3)*d**S(2)*(S(12)*a*d**S(2) + S(7)*c**S(3))*(c/d + x)**S(11)/S(11) + S(4)*c**S(3)*(S(4)*a*d**S(2) + c**S(3))**S(2)*(S(4)*a*d**S(2) + S(7)*c**S(3))*(c/d + x)**S(5)/(S(5)*d**S(4)) - S(8)*c**S(2)*d**S(6)*(c/d + x)**S(15)/S(15) + S(2)*c**S(2)*(c/d + x)**S(9)*(S(48)*a**S(2)*d**S(4) + S(120)*a*c**S(3)*d**S(2) + S(35)*c**S(6))/S(9) + S(4)*c*d**S(4)*(S(4)*a*d**S(2) + S(7)*c**S(3))*(c/d + x)**S(13)/S(13) + d**S(8)*(c/d + x)**S(17)/S(17), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4))**S(3), x), x, S(64)*a**S(3)*c**S(3)*x + S(64)*a**S(2)*c**S(4)*x**S(3) + S(48)*a**S(2)*c**S(3)*d*x**S(4) + S(64)*a*c**S(4)*d*x**S(6) + S(48)*a*c**S(2)*x**S(5)*(a*d**S(2) + S(4)*c**S(3))/S(5) + S(16)*c**S(3)*d**S(3)*x**S(10) + S(32)*c**S(3)*x**S(7)*(S(9)*a*d**S(2) + S(2)*c**S(3))/S(7) + S(60)*c**S(2)*d**S(4)*x**S(11)/S(11) + S(12)*c**S(2)*d*x**S(8)*(a*d**S(2) + S(2)*c**S(3)) + c*d**S(5)*x**S(12) + S(4)*c*d**S(2)*x**S(9)*(a*d**S(2) + S(20)*c**S(3))/S(3) + d**S(6)*x**S(13)/S(13), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4))**S(2), x), x, S(16)*a**S(2)*c**S(2)*x + S(32)*a*c**S(3)*x**S(3)/S(3) + S(8)*a*c**S(2)*d*x**S(4) + S(16)*c**S(3)*d*x**S(6)/S(3) + S(24)*c**S(2)*d**S(2)*x**S(7)/S(7) + c*d**S(3)*x**S(8) + S(8)*c*x**S(5)*(a*d**S(2) + S(2)*c**S(3))/S(5) + d**S(4)*x**S(9)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4), x), x, S(4)*a*c*x + S(4)*c**S(2)*x**S(3)/S(3) + c*d*x**S(4) + d**S(2)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4)), x), x, -atanh(d*(c/d + x)/(c**(S(1)/4)*sqrt(c**(S(3)/2) + S(2)*d*sqrt(-a))))/(S(4)*c**(S(3)/4)*sqrt(-a)*sqrt(c**(S(3)/2) + S(2)*d*sqrt(-a))) + atanh(d*(c/d + x)/(c**(S(1)/4)*sqrt(c**(S(3)/2) - S(2)*d*sqrt(-a))))/(S(4)*c**(S(3)/4)*sqrt(-a)*sqrt(c**(S(3)/2) - S(2)*d*sqrt(-a))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4))**(S(-2)), x), x, (S(6)*a*d**S(2) + c**(S(3)/2)*d*sqrt(-a) + c**S(3))*atanh(d*(c/d + x)/(c**(S(1)/4)*sqrt(c**(S(3)/2) + S(2)*d*sqrt(-a))))/(S(32)*c**(S(7)/4)*(-a)**(S(3)/2)*sqrt(c**(S(3)/2) + S(2)*d*sqrt(-a))*(S(4)*a*d**S(2) + c**S(3))) - (S(6)*a*d**S(2) - c**(S(3)/2)*d*sqrt(-a) + c**S(3))*atanh(d*(c/d + x)/(c**(S(1)/4)*sqrt(c**(S(3)/2) - S(2)*d*sqrt(-a))))/(S(32)*c**(S(7)/4)*(-a)**(S(3)/2)*sqrt(c**(S(3)/2) - S(2)*d*sqrt(-a))*(S(4)*a*d**S(2) + c**S(3))) - (c/d + x)*(-S(4)*a*d**S(2) + c**S(3) - c*d**S(2)*(c/d + x)**S(2))/(S(16)*a*c*(S(4)*a*d**S(2) + c**S(3))*(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4))**(S(3)/2), x), x, S(16)*c**(S(13)/4)*sqrt((-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/((S(4)*a + c**S(3)/d**S(2))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))**S(2)))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*(S(4)*a*d**S(2) + c**S(3))**(S(3)/4)*(S(8)*a*d**S(2) + c**S(3))*elliptic_e(S(2)*atan(d*(c/d + x)/(c**(S(1)/4)*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4))), c**(S(3)/2)/(S(2)*sqrt(S(4)*a*d**S(2) + c**S(3))) + S(1)/2)/(S(35)*d**S(5)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))) + S(8)*c**(S(7)/4)*sqrt((-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/((S(4)*a + c**S(3)/d**S(2))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))**S(2)))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*(S(4)*a*d**S(2) + c**S(3))**(S(3)/4)*(-c**(S(3)/2)*(S(8)*a*d**S(2) + c**S(3)) + sqrt(S(4)*a*d**S(2) + c**S(3))*(S(5)*a*d**S(2) + c**S(3)))*elliptic_f(S(2)*atan(d*(c/d + x)/(c**(S(1)/4)*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4))), c**(S(3)/2)/(S(2)*sqrt(S(4)*a*d**S(2) + c**S(3))) + S(1)/2)/(S(35)*d**S(5)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))) - S(16)*c**S(3)*(S(8)*a*d**S(2) + c**S(3))*(c/d + x)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/(S(35)*d**S(2)*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*sqrt(S(4)*a*d**S(2) + c**S(3))) + S(2)*c*(c/d + x)*(S(20)*a*d**S(2) + S(7)*c**S(3) - S(3)*c*d**S(2)*(c/d + x)**S(2))*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/(S(35)*d**S(2)) + (c/(S(7)*d) + x/S(7))*(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4)), x), x, S(2)*c**(S(9)/4)*sqrt((-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/((S(4)*a + c**S(3)/d**S(2))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))**S(2)))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*(S(4)*a*d**S(2) + c**S(3))**(S(3)/4)*elliptic_e(S(2)*atan(d*(c/d + x)/(c**(S(1)/4)*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4))), c**(S(3)/2)/(S(2)*sqrt(S(4)*a*d**S(2) + c**S(3))) + S(1)/2)/(S(3)*d**S(3)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))) + c**(S(3)/4)*sqrt((-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/((S(4)*a + c**S(3)/d**S(2))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))**S(2)))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4)*(S(4)*a*d**S(2) - c**(S(3)/2)*sqrt(S(4)*a*d**S(2) + c**S(3)) + c**S(3))*elliptic_f(S(2)*atan(d*(c/d + x)/(c**(S(1)/4)*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4))), c**(S(3)/2)/(S(2)*sqrt(S(4)*a*d**S(2) + c**S(3))) + S(1)/2)/(S(3)*d**S(3)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))) - S(2)*c**S(2)*(c/d + x)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/(S(3)*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*sqrt(S(4)*a*d**S(2) + c**S(3))) + (c/(S(3)*d) + x/S(3))*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4)), x), x, sqrt((-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/((S(4)*a + c**S(3)/d**S(2))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))**S(2)))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4)*elliptic_f(S(2)*atan(d*(c/d + x)/(c**(S(1)/4)*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4))), c**(S(3)/2)/(S(2)*sqrt(S(4)*a*d**S(2) + c**S(3))) + S(1)/2)/(S(2)*c**(S(1)/4)*d*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*a*c + S(4)*c**S(2)*x**S(2) + S(4)*c*d*x**S(3) + d**S(2)*x**S(4))**(S(-3)/2), x), x, c**(S(1)/4)*sqrt((-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/((S(4)*a + c**S(3)/d**S(2))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))**S(2)))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*elliptic_e(S(2)*atan(d*(c/d + x)/(c**(S(1)/4)*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4))), c**(S(3)/2)/(S(2)*sqrt(S(4)*a*d**S(2) + c**S(3))) + S(1)/2)/(S(8)*a*d*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))) - d**S(2)*(c/d + x)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/(S(8)*a*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*(S(4)*a*d**S(2) + c**S(3))**(S(3)/2)) - (c/d + x)*(-S(4)*a*d**S(2) + c**S(3) - c*d**S(2)*(c/d + x)**S(2))/(S(8)*a*c*(S(4)*a*d**S(2) + c**S(3))*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))) + sqrt((-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))/((S(4)*a + c**S(3)/d**S(2))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))**S(2)))*(sqrt(c) + d**S(2)*(c/d + x)**S(2)/sqrt(S(4)*a*d**S(2) + c**S(3)))*(S(4)*a*d**S(2) - c**(S(3)/2)*sqrt(S(4)*a*d**S(2) + c**S(3)) + c**S(3))*elliptic_f(S(2)*atan(d*(c/d + x)/(c**(S(1)/4)*(S(4)*a*d**S(2) + c**S(3))**(S(1)/4))), c**(S(3)/2)/(S(2)*sqrt(S(4)*a*d**S(2) + c**S(3))) + S(1)/2)/(S(16)*a*c**(S(5)/4)*d*(S(4)*a*d**S(2) + c**S(3))**(S(3)/4)*sqrt(-S(2)*c**S(2)*(c/d + x)**S(2) + c*(S(4)*a + c**S(3)/d**S(2)) + d**S(2)*(c/d + x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*a*e**S(2) - d**S(3)*x + S(8)*d*e**S(2)*x**S(3) + S(8)*e**S(3)*x**S(4))**S(4), x), x, -S(2048)*d**S(2)*e**S(10)*(d/(S(4)*e) + x)**S(15)/S(5) - S(72)*d**S(2)*e**S(6)*(S(256)*a*e**S(3) + S(17)*d**S(4))*(d/(S(4)*e) + x)**S(11)/S(11) - S(9)*d**S(2)*e**S(2)*(d/(S(4)*e) + x)**S(7)*(S(65536)*a**S(2)*e**S(6) + S(5632)*a*d**S(4)*e**S(3) + S(85)*d**S(8))/S(224) - d**S(2)*(S(256)*a*e**S(3) + S(5)*d**S(4))**S(3)*(d/(S(4)*e) + x)**S(3)/(S(8192)*e**S(2)) + S(4096)*e**S(12)*(d/(S(4)*e) + x)**S(17)/S(17) + S(64)*e**S(8)*(S(256)*a*e**S(3) + S(59)*d**S(4))*(d/(S(4)*e) + x)**S(13)/S(13) + e**S(4)*(d/(S(4)*e) + x)**S(9)*(S(65536)*a**S(2)*e**S(6) + S(20992)*a*d**S(4)*e**S(3) + S(601)*d**S(8))/S(24) + (S(256)*a*e**S(3) + S(5)*d**S(4))**S(2)*(S(256)*a*e**S(3) + S(59)*d**S(4))*(d/(S(4)*e) + x)**S(5)/S(5120) + x*(S(256)*a*e**S(3) + S(5)*d**S(4))**S(4)/(S(1048576)*e**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*a*e**S(2) - d**S(3)*x + S(8)*d*e**S(2)*x**S(3) + S(8)*e**S(3)*x**S(4))**S(3), x), x, S(512)*a**S(3)*e**S(6)*x - S(96)*a**S(2)*d**S(3)*e**S(4)*x**S(2) + S(8)*a*d**S(6)*e**S(2)*x**S(3) - S(384)*a*e**S(4)*x**S(5)*(-S(4)*a*e**S(3) + d**S(4))/S(5) + S(32)*d**S(3)*e**S(6)*x**S(10) + S(4)*d**S(3)*e**S(2)*x**S(6)*(-S(16)*a*e**S(3) + d**S(4)) + S(1536)*d**S(2)*e**S(7)*x**S(11)/S(11) + S(24)*d**S(2)*e**S(3)*x**S(7)*(S(64)*a*e**S(3) + d**S(4))/S(7) + S(128)*d*e**S(8)*x**S(12) - S(24)*d*e**S(4)*x**S(8)*(-S(16)*a*e**S(3) + d**S(4)) - d*x**S(4)*(-S(1536)*a**S(2)*e**S(6) + d**S(8))/S(4) + S(512)*e**S(9)*x**S(13)/S(13) - S(128)*e**S(5)*x**S(9)*(-S(4)*a*e**S(3) + d**S(4))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*a*e**S(2) - d**S(3)*x + S(8)*d*e**S(2)*x**S(3) + S(8)*e**S(3)*x**S(4))**S(2), x), x, S(64)*a**S(2)*e**S(4)*x - S(8)*a*d**S(3)*e**S(2)*x**S(2) + S(32)*a*d*e**S(4)*x**S(4) + d**S(6)*x**S(3)/S(3) - S(8)*d**S(3)*e**S(3)*x**S(6)/S(3) + S(64)*d**S(2)*e**S(4)*x**S(7)/S(7) + S(16)*d*e**S(5)*x**S(8) + S(64)*e**S(6)*x**S(9)/S(9) - S(16)*e**S(2)*x**S(5)*(-S(8)*a*e**S(3) + d**S(4))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(8)*a*e**S(2) - d**S(3)*x + S(8)*d*e**S(2)*x**S(3) + S(8)*e**S(3)*x**S(4), x), x, S(8)*a*e**S(2)*x - d**S(3)*x**S(2)/S(2) + S(2)*d*e**S(2)*x**S(4) + S(8)*e**S(3)*x**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(8)*a*e**S(2) - d**S(3)*x + S(8)*d*e**S(2)*x**S(3) + S(8)*e**S(3)*x**S(4)), x), x, -S(2)*atanh(S(4)*e*(d/(S(4)*e) + x)/sqrt(S(3)*d**S(2) + S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4))))/(sqrt(S(3)*d**S(2) + S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4)))*sqrt(-S(64)*a*e**S(3) + d**S(4))) + S(2)*atanh(S(4)*e*(d/(S(4)*e) + x)/sqrt(S(3)*d**S(2) - S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4))))/(sqrt(S(3)*d**S(2) - S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4)))*sqrt(-S(64)*a*e**S(3) + d**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*a*e**S(2) - d**S(3)*x + S(8)*d*e**S(2)*x**S(3) + S(8)*e**S(3)*x**S(4))**(S(-2)), x), x, S(64)*e*(d/(S(4)*e) + x)*(-S(256)*a*e**S(3) + S(13)*d**S(4) - S(48)*d**S(2)*e**S(2)*(d/(S(4)*e) + x)**S(2))/((-S(16384)*a**S(2)*e**S(6) - S(64)*a*d**S(4)*e**S(3) + S(5)*d**S(8))*(S(256)*a*e**S(2) + S(5)*d**S(4)/e - S(96)*d**S(2)*e*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(3)*(d/(S(4)*e) + x)**S(4))) + S(24)*e*(S(128)*a*e**S(3) + d**S(4) + d**S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4)))*atanh(S(4)*e*(d/(S(4)*e) + x)/sqrt(S(3)*d**S(2) + S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4))))/(sqrt(S(3)*d**S(2) + S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4)))*(-S(64)*a*e**S(3) + d**S(4))**(S(3)/2)*(S(256)*a*e**S(3) + S(5)*d**S(4))) - S(24)*e*(S(128)*a*e**S(3) + d**S(4) - d**S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4)))*atanh(S(4)*e*(d/(S(4)*e) + x)/sqrt(S(3)*d**S(2) - S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4))))/(sqrt(S(3)*d**S(2) - S(2)*sqrt(-S(64)*a*e**S(3) + d**S(4)))*(-S(64)*a*e**S(3) + d**S(4))**(S(3)/2)*(S(256)*a*e**S(3) + S(5)*d**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(8)*a*e**S(2) - d**S(3)*x + S(8)*d*e**S(2)*x**S(3) + S(8)*e**S(3)*x**S(4)), x), x, -sqrt(S(2))*d**S(2)*(d/(S(4)*e) + x)*sqrt(S(256)*a*e**S(2) + S(5)*d**S(4)/e - S(96)*d**S(2)*e*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(3)*(d/(S(4)*e) + x)**S(4))/(S(4)*sqrt(S(256)*a*e**S(3) + S(5)*d**S(4))*(S(16)*e**S(2)*(d/(S(4)*e) + x)**S(2)/sqrt(S(256)*a*e**S(3) + S(5)*d**S(4)) + S(1))) + sqrt(S(2))*d**S(2)*sqrt((S(256)*a*e**S(3) + S(5)*d**S(4) - S(96)*d**S(2)*e**S(2)*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(4)*(d/(S(4)*e) + x)**S(4))/((S(256)*a*e**S(3) + S(5)*d**S(4))*(S(16)*e**S(2)*(d/(S(4)*e) + x)**S(2)/sqrt(S(256)*a*e**S(3) + S(5)*d**S(4)) + S(1))**S(2)))*(S(256)*a*e**S(3) + S(5)*d**S(4))**(S(3)/4)*(S(16)*e**S(2)*(d/(S(4)*e) + x)**S(2)/sqrt(S(256)*a*e**S(3) + S(5)*d**S(4)) + S(1))*elliptic_e(S(2)*atan(S(4)*e*(d/(S(4)*e) + x)/(S(256)*a*e**S(3) + S(5)*d**S(4))**(S(1)/4)), S(3)*d**S(2)/(S(2)*sqrt(S(256)*a*e**S(3) + S(5)*d**S(4))) + S(1)/2)/(S(16)*e**S(2)*sqrt(S(256)*a*e**S(2) + S(5)*d**S(4)/e - S(96)*d**S(2)*e*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(3)*(d/(S(4)*e) + x)**S(4))) + sqrt(S(2))*(d/(S(4)*e) + x)*sqrt(S(256)*a*e**S(2) + S(5)*d**S(4)/e - S(96)*d**S(2)*e*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(3)*(d/(S(4)*e) + x)**S(4))/S(24) + sqrt(S(2))*sqrt((S(256)*a*e**S(3) + S(5)*d**S(4) - S(96)*d**S(2)*e**S(2)*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(4)*(d/(S(4)*e) + x)**S(4))/((S(256)*a*e**S(3) + S(5)*d**S(4))*(S(16)*e**S(2)*(d/(S(4)*e) + x)**S(2)/sqrt(S(256)*a*e**S(3) + S(5)*d**S(4)) + S(1))**S(2)))*(S(256)*a*e**S(3) + S(5)*d**S(4))**(S(1)/4)*(S(16)*e**S(2)*(d/(S(4)*e) + x)**S(2)/sqrt(S(256)*a*e**S(3) + S(5)*d**S(4)) + S(1))*(S(256)*a*e**S(3) + S(5)*d**S(4) - S(3)*d**S(2)*sqrt(S(256)*a*e**S(3) + S(5)*d**S(4)))*elliptic_f(S(2)*atan(S(4)*e*(d/(S(4)*e) + x)/(S(256)*a*e**S(3) + S(5)*d**S(4))**(S(1)/4)), S(3)*d**S(2)/(S(2)*sqrt(S(256)*a*e**S(3) + S(5)*d**S(4))) + S(1)/2)/(S(96)*e**S(2)*sqrt(S(256)*a*e**S(2) + S(5)*d**S(4)/e - S(96)*d**S(2)*e*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(3)*(d/(S(4)*e) + x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(8)*a*e**S(2) - d**S(3)*x + S(8)*d*e**S(2)*x**S(3) + S(8)*e**S(3)*x**S(4)), x), x, sqrt(S(2))*sqrt((S(256)*a*e**S(3) + S(5)*d**S(4) - S(96)*d**S(2)*e**S(2)*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(4)*(d/(S(4)*e) + x)**S(4))/((S(256)*a*e**S(3) + S(5)*d**S(4))*(S(16)*e**S(2)*(d/(S(4)*e) + x)**S(2)/sqrt(S(256)*a*e**S(3) + S(5)*d**S(4)) + S(1))**S(2)))*(S(256)*a*e**S(3) + S(5)*d**S(4))**(S(1)/4)*(S(16)*e**S(2)*(d/(S(4)*e) + x)**S(2)/sqrt(S(256)*a*e**S(3) + S(5)*d**S(4)) + S(1))*elliptic_f(S(2)*atan(S(4)*e*(d/(S(4)*e) + x)/(S(256)*a*e**S(3) + S(5)*d**S(4))**(S(1)/4)), S(3)*d**S(2)/(S(2)*sqrt(S(256)*a*e**S(3) + S(5)*d**S(4))) + S(1)/2)/(S(2)*e*sqrt(S(256)*a*e**S(2) + S(5)*d**S(4)/e - S(96)*d**S(2)*e*(d/(S(4)*e) + x)**S(2) + S(256)*e**S(3)*(d/(S(4)*e) + x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(4), x), x, x*(a + S(3))**S(4) + (-S(4)*a/S(5) + S(12)/5)*(a + S(3))**S(2)*(x + S(-1))**S(5) + (-S(4)*a/S(13) + S(12)/13)*(x + S(-1))**S(13) - S(8)*(a + S(3))**S(3)*(x + S(-1))**S(3)/S(3) + (S(8)*a/S(7) + S(24)/7)*(S(3)*a + S(5))*(x + S(-1))**S(7) - (S(24)*a/S(11) + S(40)/11)*(x + S(-1))**S(11) + (x + S(-1))**S(17)/S(17) + S(8)*(x + S(-1))**S(15)/S(15) - (x + S(-1))**S(9)*(-S(2)*a**S(2)/S(3) + S(4)*a/S(3) + S(74)/9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(3), x), x, a**S(3)*x + S(12)*a**S(2)*x**S(2) + a*x**S(3)*(-S(8)*a + S(64)) - x**S(13)/S(13) + x**S(12) - S(72)*x**S(11)/S(11) + S(28)*x**S(10) - x**S(9)*(-a/S(3) + S(256)/3) + x**S(8)*(-S(3)*a + S(192)) - x**S(7)*(-S(96)*a/S(7) + S(320)) + x**S(6)*(-S(40)*a + S(384)) - x**S(5)*(S(3)*a**S(2)/S(5) - S(384)*a/S(5) + S(1536)/5) + x**S(4)*(S(3)*a**S(2) - S(96)*a + S(128)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(2), x), x, a**S(2)*x + S(8)*a*x**S(2) + x**S(9)/S(9) - x**S(8) + S(32)*x**S(7)/S(7) - S(40)*x**S(6)/S(3) + x**S(5)*(-S(2)*a/S(5) + S(128)/5) - x**S(4)*(-S(2)*a + S(32)) + x**S(3)*(-S(16)*a/S(3) + S(64)/3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x, x), x, a*x - x**S(5)/S(5) + x**S(4) - S(8)*x**S(3)/S(3) + S(4)*x**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1)))/(S(2)*sqrt(a + S(4))*sqrt(sqrt(a + S(4)) + S(1))) - atan((x + S(-1))/sqrt(-sqrt(a + S(4)) + S(1)))/(S(2)*sqrt(a + S(4))*sqrt(-sqrt(a + S(4)) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**(S(-2)), x), x, (x + S(-1))*(a + (x + S(-1))**S(2) + S(5))/((S(4)*a**S(2) + S(28)*a + S(48))*(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (S(3)*a - sqrt(a + S(4)) + S(10))*atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1)))/((a + S(4))**(S(3)/2)*(S(8)*a + S(24))*sqrt(sqrt(a + S(4)) + S(1))) - (S(3)*a + sqrt(a + S(4)) + S(10))*atan((x + S(-1))/sqrt(-sqrt(a + S(4)) + S(1)))/((a + S(4))**(S(3)/2)*(S(8)*a + S(24))*sqrt(-sqrt(a + S(4)) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(4), x), x, a**S(4)*x**S(2)/S(2) + S(32)*a**S(3)*x**S(3)/S(3) + a**S(2)*x**S(4)*(-S(8)*a + S(96)) + S(16)*a*x**S(5)*(a**S(2) - S(48)*a + S(128))/S(5) + x**S(18)/S(18) - S(16)*x**S(17)/S(17) + S(8)*x**S(16) - S(224)*x**S(15)/S(5) + x**S(14)*(-S(2)*a/S(7) + S(1280)/7) - x**S(13)*(-S(48)*a/S(13) + S(7424)/13) + x**S(12)*(-S(24)*a + S(4192)/3) - x**S(11)*(-S(1120)*a/S(11) + S(29696)/11) + x**S(10)*(S(3)*a**S(2)/S(5) - S(1536)*a/S(5) + S(4096)) - x**S(9)*(S(16)*a**S(2)/S(3) - S(2048)*a/S(3) + S(14336)/3) + x**S(8)*(-S(24)*a + S(1024))*(-a + S(4)) - x**S(7)*(S(480)*a**S(2)/S(7) - S(9216)*a/S(7) + S(16384)/7) + x**S(6)*(-S(2)*a**S(3)/S(3) + S(128)*a**S(2) - S(1024)*a + S(2048)/3), expand=True, _diff=True, _numerical=True) # long time in rubi_int assert rubi_test(rubi_integrate(x*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(3), x), x, a**S(3)*x**S(2)/S(2) + S(8)*a**S(2)*x**S(3) + a*x**S(4)*(-S(6)*a + S(48)) - x**S(14)/S(14) + S(12)*x**S(13)/S(13) - S(6)*x**S(12) + S(280)*x**S(11)/S(11) - x**S(10)*(-S(3)*a/S(10) + S(384)/5) + x**S(9)*(-S(8)*a/S(3) + S(512)/3) - x**S(8)*(-S(12)*a + S(280)) + x**S(7)*(-S(240)*a/S(7) + S(2304)/7) - x**S(6)*(a**S(2)/S(2) - S(64)*a + S(256)) + x**S(5)*(S(12)*a**S(2)/S(5) - S(384)*a/S(5) + S(512)/5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(2), x), x, a**S(2)*x**S(2)/S(2) + S(16)*a*x**S(3)/S(3) + x**S(10)/S(10) - S(8)*x**S(9)/S(9) + S(4)*x**S(8) - S(80)*x**S(7)/S(7) + x**S(6)*(-a/S(3) + S(64)/3) - x**S(5)*(-S(8)*a/S(5) + S(128)/5) + x**S(4)*(-S(4)*a + S(16)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, a*x**S(2)/S(2) - x**S(6)/S(6) + S(4)*x**S(5)/S(5) - S(2)*x**S(4) + S(8)*x**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, atanh(((x + S(-1))**S(2) + S(1))/sqrt(a + S(4)))/(S(2)*sqrt(a + S(4))) + atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1)))/(S(2)*sqrt(a + S(4))*sqrt(sqrt(a + S(4)) + S(1))) - atan((x + S(-1))/sqrt(-sqrt(a + S(4)) + S(1)))/(S(2)*sqrt(a + S(4))*sqrt(-sqrt(a + S(4)) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(2), x), x, (x + S(-1))*(a + (a + S(5))*(x + S(-1)) + (x + S(-1))**S(3) + (x + S(-1))**S(2) + S(5))/((S(4)*a**S(2) + S(28)*a + S(48))*(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + atanh(((x + S(-1))**S(2) + S(1))/sqrt(a + S(4)))/(S(4)*(a + S(4))**(S(3)/2)) + (S(3)*a - sqrt(a + S(4)) + S(10))*atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1)))/((a + S(4))**(S(3)/2)*(S(8)*a + S(24))*sqrt(sqrt(a + S(4)) + S(1))) - (S(3)*a + sqrt(a + S(4)) + S(10))*atan((x + S(-1))/sqrt(-sqrt(a + S(4)) + S(1)))/((a + S(4))**(S(3)/2)*(S(8)*a + S(24))*sqrt(-sqrt(a + S(4)) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(4), x), x, a**S(4)*x**S(3)/S(3) + S(8)*a**S(3)*x**S(4) + a**S(2)*x**S(5)*(-S(32)*a/S(5) + S(384)/5) + S(8)*a*x**S(6)*(a**S(2) - S(48)*a + S(128))/S(3) + x**S(19)/S(19) - S(8)*x**S(18)/S(9) + S(128)*x**S(17)/S(17) - S(42)*x**S(16) + x**S(15)*(-S(4)*a/S(15) + S(512)/3) - x**S(14)*(-S(24)*a/S(7) + S(3712)/7) + x**S(13)*(-S(288)*a/S(13) + S(16768)/13) - x**S(12)*(-S(280)*a/S(3) + S(7424)/3) + x**S(11)*(S(6)*a**S(2)/S(11) - S(3072)*a/S(11) + S(40960)/11) - x**S(10)*(S(24)*a**S(2)/S(5) - S(3072)*a/S(5) + S(21504)/5) + x**S(9)*(-S(64)*a/S(3) + S(8192)/9)*(-a + S(4)) - x**S(8)*(S(60)*a**S(2) - S(1152)*a + S(2048)) + x**S(7)*(-S(4)*a**S(3)/S(7) + S(768)*a**S(2)/S(7) - S(6144)*a/S(7) + S(4096)/7), expand=True, _diff=True, _numerical=True) # long time in rubi_int assert rubi_test(rubi_integrate(x**S(2)*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(3), x), x, a**S(3)*x**S(3)/S(3) + S(6)*a**S(2)*x**S(4) + a*x**S(5)*(-S(24)*a/S(5) + S(192)/5) - x**S(15)/S(15) + S(6)*x**S(14)/S(7) - S(72)*x**S(13)/S(13) + S(70)*x**S(12)/S(3) - x**S(11)*(-S(3)*a/S(11) + S(768)/11) + x**S(10)*(-S(12)*a/S(5) + S(768)/5) - x**S(9)*(-S(32)*a/S(3) + S(2240)/9) + x**S(8)*(-S(30)*a + S(288)) - x**S(7)*(S(3)*a**S(2)/S(7) - S(384)*a/S(7) + S(1536)/7) + x**S(6)*(S(2)*a**S(2) - S(64)*a + S(256)/3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(2), x), x, a**S(2)*x**S(3)/S(3) + S(4)*a*x**S(4) + x**S(11)/S(11) - S(4)*x**S(10)/S(5) + S(32)*x**S(9)/S(9) - S(10)*x**S(8) + x**S(7)*(-S(2)*a/S(7) + S(128)/7) - x**S(6)*(-S(4)*a/S(3) + S(64)/3) + x**S(5)*(-S(16)*a/S(5) + S(64)/5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, a*x**S(3)/S(3) - x**S(7)/S(7) + S(2)*x**S(6)/S(3) - S(8)*x**S(5)/S(5) + S(2)*x**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, -atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1)))/(S(2)*sqrt(sqrt(a + S(4)) + S(1))) - atan((x + S(-1))/sqrt(-sqrt(a + S(4)) + S(1)))/(S(2)*sqrt(-sqrt(a + S(4)) + S(1))) + atanh(((x + S(-1))**S(2) + S(1))/sqrt(a + S(4)))/sqrt(a + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**S(2), x), x, (x + S(-1))*(S(2)*a + (a + S(4))*(x + S(-1))**S(2) + (S(2)*a + S(10))*(x + S(-1)) + S(2)*(x + S(-1))**S(3) + S(8))/((S(4)*a**S(2) + S(28)*a + S(48))*(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (-sqrt(a + S(4)) + S(1))*atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1)))/(sqrt(a + S(4))*(S(8)*a + S(24))*sqrt(sqrt(a + S(4)) + S(1))) - (sqrt(a + S(4)) + S(1))*atan((x + S(-1))/sqrt(-sqrt(a + S(4)) + S(1)))/(sqrt(a + S(4))*(S(8)*a + S(24))*sqrt(-sqrt(a + S(4)) + S(1))) + atanh(((x + S(-1))**S(2) + S(1))/sqrt(a + S(4)))/(S(2)*(a + S(4))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**(S(3)/2), x), x, -(S(32)*a + S(112))*(x + S(-1))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))/(S(35)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (x + S(-1))*(S(2)*a/S(7) - S(6)*(x + S(-1))**S(2)/S(35) + S(26)/35)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + (x + S(-1))*(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2)/S(7) + (S(4)*a + S(12))*(S(5)*a + S(16))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(35)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (S(32)*a + S(112))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_e(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(35)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, -(x + S(-1))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-S(2)*sqrt(a + S(4)) + S(2))/(S(3)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (x + S(-1))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))/S(3) + (S(2)*a + S(6))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(3)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + ((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-S(2)*sqrt(a + S(4)) + S(2))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_e(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(3)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, ((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**(S(3)/2), x), x, (S(3)*a/S(16) + S(3)/4)*((x + S(-1))**S(2) + S(1))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + S(3)*(a + S(4))**S(2)*atan(((x + S(-1))**S(2) + S(1))/sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)))/S(16) - (S(32)*a + S(112))*(x + S(-1))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))/(S(35)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (x + S(-1))*(S(2)*a/S(7) - S(6)*(x + S(-1))**S(2)/S(35) + S(26)/35)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + (x + S(-1))*(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2)/S(7) + ((x + S(-1))**S(2)/S(8) + S(1)/8)*(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2) + (S(4)*a + S(12))*(S(5)*a + S(16))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(35)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (S(32)*a + S(112))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_e(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(35)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, (a/S(4) + S(1))*atan(((x + S(-1))**S(2) + S(1))/sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) - (x + S(-1))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-S(2)*sqrt(a + S(4)) + S(2))/(S(3)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (x + S(-1))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))/S(3) + ((x + S(-1))**S(2)/S(4) + S(1)/4)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + (S(2)*a + S(6))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(3)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + ((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-S(2)*sqrt(a + S(4)) + S(2))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_e(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(3)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, atan(((x + S(-1))**S(2) + S(1))/sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)))/S(2) + ((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**(S(3)/2), x), x, (S(3)*a/S(8) + S(3)/2)*((x + S(-1))**S(2) + S(1))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + S(3)*(a + S(4))**S(2)*atan(((x + S(-1))**S(2) + S(1))/sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)))/S(8) + (x + S(-1))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))*(S(84)*a**S(2) + S(444)*a + S(560))/(S(315)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (x + S(-1))*((x + S(-1))**S(2)/S(9) + S(5)/21)*(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2) + (x + S(-1))*(S(12)*a/S(35) + S(2)*(S(21)*a + S(60))*(x + S(-1))**S(2)/S(315) + S(64)/63)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + ((x + S(-1))**S(2)/S(4) + S(1)/4)*(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))**(S(3)/2) + (S(4)*a + S(12))*(S(33)*a + S(100))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(315)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) - ((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*(S(84)*a**S(2) + S(444)*a + S(560))*elliptic_e(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(315)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, (a/S(2) + S(2))*atan(((x + S(-1))**S(2) + S(1))/sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (S(6)*a + S(16))*(x + S(-1))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))/(S(15)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (x + S(-1))*((x + S(-1))**S(2)/S(5) + S(7)/15)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + ((x + S(-1))**S(2)/S(2) + S(1)/2)*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) - (S(6)*a + S(16))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_e(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(15)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + (S(8)*a + S(24))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(S(15)*sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x), x), x, (x + S(-1))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))/sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3)) + atan(((x + S(-1))**S(2) + S(1))/sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) - ((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_e(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + ((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_f(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a - x**S(4) + S(4)*x**S(3) - S(8)*x**S(2) + S(8)*x)**(S(3)/2), x), x, (x + S(-1))*(S(2)*a + (a + S(4))*(x + S(-1))**S(2) + (S(2)*a + S(10))*(x + S(-1)) + S(2)*(x + S(-1))**S(3) + S(8))/((S(2)*a**S(2) + S(14)*a + S(24))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))/(a**S(2) + S(7)*a + S(12)) - (x + S(-1))*((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))/((S(2)*a + S(6))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))) + ((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))*(-sqrt(a + S(4)) + S(1))*sqrt(sqrt(a + S(4)) + S(1))*elliptic_e(atan((x + S(-1))/sqrt(sqrt(a + S(4)) + S(1))), -S(2)*sqrt(a + S(4))/(-sqrt(a + S(4)) + S(1)))/(sqrt(((x + S(-1))**S(2)/(-sqrt(a + S(4)) + S(1)) + S(1))/((x + S(-1))**S(2)/(sqrt(a + S(4)) + S(1)) + S(1)))*(S(2)*a + S(6))*sqrt(a - (x + S(-1))**S(4) - S(2)*(x + S(-1))**S(2) + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - x**S(3) + S(8)*x + S(8))**S(4), x), x, S(4096)*x**S(17)/S(17) - S(128)*x**S(16) + S(128)*x**S(15)/S(5) + S(1168)*x**S(14) + S(10241)*x**S(13)/S(13) - S(448)*x**S(12) + S(25312)*x**S(11)/S(11) + S(21488)*x**S(10)/S(5) + S(1408)*x**S(9) + S(1376)*x**S(8) + S(6784)*x**S(7) + S(7168)*x**S(6) + S(14336)*x**S(5)/S(5) + S(3584)*x**S(4) + S(8192)*x**S(3) + S(8192)*x**S(2) + S(4096)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - x**S(3) + S(8)*x + S(8))**S(3), x), x, S(512)*x**S(13)/S(13) - S(16)*x**S(12) + S(24)*x**S(11)/S(11) + S(307)*x**S(10)/S(2) + S(128)*x**S(9) - S(45)*x**S(8) + S(1560)*x**S(7)/S(7) + S(480)*x**S(6) + S(1152)*x**S(5)/S(5) + S(80)*x**S(4) + S(512)*x**S(3) + S(768)*x**S(2) + S(512)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - x**S(3) + S(8)*x + S(8))**S(2), x), x, S(64)*x**S(9)/S(9) - S(2)*x**S(8) + x**S(7)/S(7) + S(64)*x**S(6)/S(3) + S(112)*x**S(5)/S(5) - S(4)*x**S(4) + S(64)*x**S(3)/S(3) + S(64)*x**S(2) + S(64)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(8)*x**S(4) - x**S(3) + S(8)*x + S(8), x), x, S(8)*x**S(5)/S(5) - x**S(4)/S(4) + S(4)*x**S(2) + S(8)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(8)*x**S(4) - x**S(3) + S(8)*x + S(8)), x), x, -sqrt(S(-109)/1218 + S(67)*sqrt(S(29))/S(1218))*log((S(1) + S(4)/x)**S(2) - (S(1) + S(4)/x)*sqrt(S(6) + S(6)*sqrt(S(29))) + S(3)*sqrt(S(29)))/S(24) + sqrt(S(-109)/1218 + S(67)*sqrt(S(29))/S(1218))*log((S(1) + S(4)/x)**S(2) + (S(1) + S(4)/x)*sqrt(S(6) + S(6)*sqrt(S(29))) + S(3)*sqrt(S(29)))/S(24) - sqrt(S(7))*atan(sqrt(S(7))*(-(S(1) + S(4)/x)**S(2) + S(3))/S(42))/S(84) + sqrt(S(109)/1218 + S(67)*sqrt(S(29))/S(1218))*atan((S(-2) + sqrt(S(6) + S(6)*sqrt(S(29))) - S(8)/x)/sqrt(S(-6) + S(6)*sqrt(S(29))))/S(12) - sqrt(S(109)/1218 + S(67)*sqrt(S(29))/S(1218))*atan((S(2) + sqrt(S(6) + S(6)*sqrt(S(29))) + S(8)/x)/sqrt(S(-6) + S(6)*sqrt(S(29))))/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - x**S(3) + S(8)*x + S(8))**(S(-2)), x), x, (S(1) + S(4)/x)*(S(207)*(S(1) + S(4)/x)**S(3) + S(995)*(S(1) + S(4)/x)**S(2) + S(16974) - S(35244)/x)/(S(87696)*(S(1) + S(4)/x)**S(4) - S(526176)*(S(1) + S(4)/x)**S(2) + S(22888656)) - sqrt(S(-180983329)/1218 + S(1583563)*sqrt(S(29))/S(42))*log((S(1) + S(4)/x)**S(2) - (S(1) + S(4)/x)*sqrt(S(6) + S(6)*sqrt(S(29))) + S(3)*sqrt(S(29)))/S(175392) + sqrt(S(-180983329)/1218 + S(1583563)*sqrt(S(29))/S(42))*log((S(1) + S(4)/x)**S(2) + (S(1) + S(4)/x)*sqrt(S(6) + S(6)*sqrt(S(29))) + S(3)*sqrt(S(29)))/S(175392) - S(17)*sqrt(S(7))*atan(sqrt(S(7))*(-(S(1) + S(4)/x)**S(2) + S(3))/S(42))/S(7056) + sqrt(S(180983329)/1218 + S(1583563)*sqrt(S(29))/S(42))*atan((S(-2) + sqrt(S(6) + S(6)*sqrt(S(29))) - S(8)/x)/sqrt(S(-6) + S(6)*sqrt(S(29))))/S(87696) - sqrt(S(180983329)/1218 + S(1583563)*sqrt(S(29))/S(42))*atan((S(2) + sqrt(S(6) + S(6)*sqrt(S(29))) + S(8)/x)/sqrt(S(-6) + S(6)*sqrt(S(29))))/S(87696), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(4) + S(4)*x**S(2) + S(4)*x + S(1))**S(4), x), x, S(256)*x**S(17)/S(17) + S(1024)*x**S(15)/S(15) + S(512)*x**S(14)/S(7) + S(1792)*x**S(13)/S(13) + S(256)*x**S(12) + S(3328)*x**S(11)/S(11) + S(384)*x**S(10) + S(4192)*x**S(9)/S(9) + S(448)*x**S(8) + S(2752)*x**S(7)/S(7) + S(992)*x**S(6)/S(3) + S(1136)*x**S(5)/S(5) + S(112)*x**S(4) + S(112)*x**S(3)/S(3) + S(8)*x**S(2) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(4) + S(4)*x**S(2) + S(4)*x + S(1))**S(3), x), x, S(64)*x**S(13)/S(13) + S(192)*x**S(11)/S(11) + S(96)*x**S(10)/S(5) + S(80)*x**S(9)/S(3) + S(48)*x**S(8) + S(352)*x**S(7)/S(7) + S(48)*x**S(6) + S(252)*x**S(5)/S(5) + S(40)*x**S(4) + S(20)*x**S(3) + S(6)*x**S(2) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(4) + S(4)*x**S(2) + S(4)*x + S(1))**S(2), x), x, S(16)*x**S(9)/S(9) + S(32)*x**S(7)/S(7) + S(16)*x**S(6)/S(3) + S(24)*x**S(5)/S(5) + S(8)*x**S(4) + S(8)*x**S(3) + S(4)*x**S(2) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(4)*x**S(4) + S(4)*x**S(2) + S(4)*x + S(1), x), x, S(4)*x**S(5)/S(5) + S(4)*x**S(3)/S(3) + S(2)*x**S(2) + x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(4)*x**S(4) + S(4)*x**S(2) + S(4)*x + S(1)), x), x, -sqrt(S(-2)/5 + sqrt(S(5))/S(5))*log((S(1) + S(1)/x)**S(2) - (S(1) + S(1)/x)*sqrt(S(2) + S(2)*sqrt(S(5))) + sqrt(S(5)))/S(4) + sqrt(S(-2)/5 + sqrt(S(5))/S(5))*log((S(1) + S(1)/x)**S(2) + (S(1) + S(1)/x)*sqrt(S(2) + S(2)*sqrt(S(5))) + sqrt(S(5)))/S(4) + sqrt(S(2)/5 + sqrt(S(5))/S(5))*atan((S(-2) + sqrt(S(2) + S(2)*sqrt(S(5))) - S(2)/x)/sqrt(S(-2) + S(2)*sqrt(S(5))))/S(2) - sqrt(S(2)/5 + sqrt(S(5))/S(5))*atan((S(2) + sqrt(S(2) + S(2)*sqrt(S(5))) + S(2)/x)/sqrt(S(-2) + S(2)*sqrt(S(5))))/S(2) + atan((S(1) + S(1)/x)**S(2)/S(2) + S(-1)/2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(4) + S(4)*x**S(2) + S(4)*x + S(1))**(S(-2)), x), x, (S(1) + S(1)/x)*(S(17)*(S(1) + S(1)/x)**S(3) - S(17)*(S(1) + S(1)/x)**S(2) + S(30) - S(29)/x)/(S(10)*(S(1) + S(1)/x)**S(4) - S(20)*(S(1) + S(1)/x)**S(2) + S(50)) + sqrt(S(-5959)/10 + S(533)*sqrt(S(5))/S(2))*log((S(1) + S(1)/x)**S(2) - (S(1) + S(1)/x)*sqrt(S(2) + S(2)*sqrt(S(5))) + sqrt(S(5)))/S(40) - sqrt(S(-5959)/10 + S(533)*sqrt(S(5))/S(2))*log((S(1) + S(1)/x)**S(2) + (S(1) + S(1)/x)*sqrt(S(2) + S(2)*sqrt(S(5))) + sqrt(S(5)))/S(40) + sqrt(S(5959)/10 + S(533)*sqrt(S(5))/S(2))*atan((S(-2) + sqrt(S(2) + S(2)*sqrt(S(5))) - S(2)/x)/sqrt(S(-2) + S(2)*sqrt(S(5))))/S(20) - sqrt(S(5959)/10 + S(533)*sqrt(S(5))/S(2))*atan((S(2) + sqrt(S(2) + S(2)*sqrt(S(5))) + S(2)/x)/sqrt(S(-2) + S(2)*sqrt(S(5))))/S(20) + S(7)*atan((S(1) + S(1)/x)**S(2)/S(2) + S(-1)/2)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8))**S(4), x), x, S(4096)*x**S(17)/S(17) - S(1920)*x**S(16) + S(102784)*x**S(15)/S(15) - S(75504)*x**S(14)/S(7) - S(12095)*x**S(13)/S(13) + S(31128)*x**S(12) - S(331040)*x**S(11)/S(11) - S(169584)*x**S(10)/S(5) + S(641152)*x**S(9)/S(9) + S(36384)*x**S(8) - S(566912)*x**S(7)/S(7) - S(30720)*x**S(6) + S(538624)*x**S(5)/S(5) + S(139776)*x**S(4) + S(237568)*x**S(3)/S(3) + S(24576)*x**S(2) + S(4096)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8))**S(3), x), x, S(512)*x**S(13)/S(13) - S(240)*x**S(12) + S(6936)*x**S(11)/S(11) - S(4527)*x**S(10)/S(10) - S(2936)*x**S(9)/S(3) + S(2097)*x**S(8) + S(5528)*x**S(7)/S(7) - S(2976)*x**S(6) - S(384)*x**S(5)/S(5) + S(5040)*x**S(4) + S(5120)*x**S(3) + S(2304)*x**S(2) + S(512)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8))**S(2), x), x, S(64)*x**S(9)/S(9) - S(30)*x**S(8) + S(353)*x**S(7)/S(7) + S(24)*x**S(6) - S(528)*x**S(5)/S(5) + S(36)*x**S(4) + S(704)*x**S(3)/S(3) + S(192)*x**S(2) + S(64)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8), x), x, S(8)*x**S(5)/S(5) - S(15)*x**S(4)/S(4) + S(8)*x**S(3)/S(3) + S(12)*x**S(2) + S(8)*x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8)), x), x, -sqrt(S(-5167)/40326 + S(5)*sqrt(S(517))/S(858))*log((S(3) + S(4)/x)**S(2) - (S(3) + S(4)/x)*sqrt(S(38) + S(2)*sqrt(S(517))) + sqrt(S(517)))/S(8) + sqrt(S(-5167)/40326 + S(5)*sqrt(S(517))/S(858))*log((S(3) + S(4)/x)**S(2) + (S(3) + S(4)/x)*sqrt(S(38) + S(2)*sqrt(S(517))) + sqrt(S(517)))/S(8) - sqrt(S(39))*atan(sqrt(S(39))*(-(S(3) + S(4)/x)**S(2) + S(19))/S(78))/S(52) + sqrt(S(5167)/40326 + S(5)*sqrt(S(517))/S(858))*atan((S(-6) + sqrt(S(38) + S(2)*sqrt(S(517))) - S(8)/x)/sqrt(S(-38) + S(2)*sqrt(S(517))))/S(4) - sqrt(S(5167)/40326 + S(5)*sqrt(S(517))/S(858))*atan((S(6) + sqrt(S(38) + S(2)*sqrt(S(517))) + S(8)/x)/sqrt(S(-38) + S(2)*sqrt(S(517))))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8))**(S(-2)), x), x, (S(3) + S(4)/x)*(S(30231)*(S(3) + S(4)/x)**S(3) - S(129631)*(S(3) + S(4)/x)**S(2) + S(1375210) - S(2603628)/x)/(S(322608)*(S(3) + S(4)/x)**S(4) - S(12259104)*(S(3) + S(4)/x)**S(2) + S(166788336)) - sqrt(S(-59644114671451)/40326 + S(5073830635)*sqrt(S(517))/S(78))*log((S(3) + S(4)/x)**S(2) - (S(3) + S(4)/x)*sqrt(S(38) + S(2)*sqrt(S(517))) + sqrt(S(517)))/S(645216) + sqrt(S(-59644114671451)/40326 + S(5073830635)*sqrt(S(517))/S(78))*log((S(3) + S(4)/x)**S(2) + (S(3) + S(4)/x)*sqrt(S(38) + S(2)*sqrt(S(517))) + sqrt(S(517)))/S(645216) - S(73)*sqrt(S(39))*atan(sqrt(S(39))*(-(S(3) + S(4)/x)**S(2) + S(19))/S(78))/S(2704) + sqrt(S(19)/40326 + sqrt(S(517))/S(40326))*(S(1678181) + S(74897)*sqrt(S(517)))*atan((S(-6) + sqrt(S(38) + S(2)*sqrt(S(517))) - S(8)/x)/sqrt(S(-38) + S(2)*sqrt(S(517))))/S(645216) - sqrt(S(19)/40326 + sqrt(S(517))/S(40326))*(S(1678181) + S(74897)*sqrt(S(517)))*atan((S(6) + sqrt(S(38) + S(2)*sqrt(S(517))) + S(8)/x)/sqrt(S(-38) + S(2)*sqrt(S(517))))/S(645216), expand=True, _diff=True, _numerical=True) '''Takes a long time in rubi test, final results contain subs with Integral assert rubi_test(rubi_integrate(S(1)/sqrt(S(8)*x**S(4) - x**S(3) + S(8)*x + S(8)), x), x, -S(29)**(S(3)/4)*sqrt(S(6))*x**S(2)*sqrt(((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261))/(sqrt(S(29))*(S(1) + S(4)/x)**S(2) + S(87))**S(2))*(sqrt(S(29))*(S(1) + S(4)/x)**S(2) + S(87))*elliptic_f(S(2)*atan(S(29)**(S(3)/4)*sqrt(S(3))*(S(1) + S(4)/x)/S(87)), sqrt(S(29))/S(58) + S(1)/2)/(S(174)*sqrt(x**S(4)*((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - x**S(3) + S(8)*x + S(8))**(S(-3)/2), x), x, S(29)**(S(1)/4)*sqrt(S(6))*x**S(2)*sqrt(((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261))/(sqrt(S(29))*(S(1) + S(4)/x)**S(2) + S(87))**S(2))*(-S(5)*sqrt(S(29)) + S(14))*(sqrt(S(29))*(S(1) + S(4)/x)**S(2) + S(87))*elliptic_f(S(2)*atan(S(29)**(S(3)/4)*sqrt(S(3))*(S(1) + S(4)/x)/S(87)), sqrt(S(29))/S(58) + S(1)/2)/(S(12528)*sqrt(x**S(4)*((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261)))) - S(29)**(S(1)/4)*sqrt(S(6))*x**S(2)*sqrt(((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261))/(sqrt(S(29))*(S(1) + S(4)/x)**S(2) + S(87))**S(2))*(S(7)*sqrt(S(29))*(S(1) + S(4)/x)**S(2) + S(609))*elliptic_e(S(2)*atan(S(29)**(S(3)/4)*sqrt(S(3))*(S(1) + S(4)/x)/S(87)), sqrt(S(29))/S(58) + S(1)/2)/(S(3132)*sqrt(x**S(4)*((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261)))) + sqrt(S(2))*x**S(2)*(S(1) + S(4)/x)*(S(22)*(S(1) + S(4)/x)**S(3) - S(49)*(S(1) + S(4)/x)**S(2) + S(1467) - S(180)/x)/(S(21924)*sqrt(x**S(4)*((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261)))) + sqrt(S(58))*x**S(2)*(S(1) + S(4)/x)*(S(7)*(S(1) + S(4)/x)**S(4) - S(42)*(S(1) + S(4)/x)**S(2) + S(1827))/(S(3132)*sqrt(x**S(4)*((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261)))*(sqrt(S(29))*(S(1) + S(4)/x)**S(2) + S(87))) - sqrt(S(2))*x**S(2)*(S(11)*(S(1) + S(4)/x)**S(4) - S(66)*(S(1) + S(4)/x)**S(2) + S(2871))/(S(10962)*sqrt(x**S(4)*((S(1) + S(4)/x)**S(4) - S(6)*(S(1) + S(4)/x)**S(2) + S(261)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(4)*x**S(4) + S(4)*x**S(2) + S(4)*x + S(1)), x), x, -S(5)**(S(3)/4)*x**S(2)*sqrt(((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5))/((S(1) + S(1)/x)**S(2) + sqrt(S(5)))**S(2))*((S(1) + S(1)/x)**S(2) + sqrt(S(5)))*elliptic_f(S(2)*atan(S(5)**(S(3)/4)*(S(1) + S(1)/x)/S(5)), sqrt(S(5))/S(10) + S(1)/2)/(S(10)*sqrt(x**S(4)*((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(4)*x**S(4) + S(4)*x**S(2) + S(4)*x + S(1))**(S(-3)/2), x), x, S(5)**(S(1)/4)*x**S(2)*sqrt(((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5))/((S(1) + S(1)/x)**S(2) + sqrt(S(5)))**S(2))*(-S(3)*sqrt(S(5)) + S(9))*((S(1) + S(1)/x)**S(2) + sqrt(S(5)))*elliptic_f(S(2)*atan(S(5)**(S(3)/4)*(S(1) + S(1)/x)/S(5)), sqrt(S(5))/S(10) + S(1)/2)/(S(20)*sqrt(x**S(4)*((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5)))) - S(5)**(S(1)/4)*x**S(2)*sqrt(((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5))/((S(1) + S(1)/x)**S(2) + sqrt(S(5)))**S(2))*(S(9)*(S(1) + S(1)/x)**S(2) + S(9)*sqrt(S(5)))*elliptic_e(S(2)*atan(S(5)**(S(3)/4)*(S(1) + S(1)/x)/S(5)), sqrt(S(5))/S(10) + S(1)/2)/(S(10)*sqrt(x**S(4)*((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5)))) + x**S(2)*(S(1) + S(1)/x)*(S(6)*(S(1) + S(1)/x)**S(3) - S(9)*(S(1) + S(1)/x)**S(2) + S(11) - S(2)/x)/(S(10)*sqrt(x**S(4)*((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5)))) + x**S(2)*(S(1) + S(1)/x)*(S(9)*(S(1) + S(1)/x)**S(4) - S(18)*(S(1) + S(1)/x)**S(2) + S(45))/(sqrt(x**S(4)*((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5)))*(S(10)*(S(1) + S(1)/x)**S(2) + S(10)*sqrt(S(5)))) - x**S(2)*(S(3)*(S(1) + S(1)/x)**S(4) - S(6)*(S(1) + S(1)/x)**S(2) + S(15))/(S(5)*sqrt(x**S(4)*((S(1) + S(1)/x)**S(4) - S(2)*(S(1) + S(1)/x)**S(2) + S(5)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8)), x), x, -sqrt(S(2))*S(517)**(S(3)/4)*x**S(2)*sqrt(((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517))/((S(3) + S(4)/x)**S(2) + sqrt(S(517)))**S(2))*((S(3) + S(4)/x)**S(2) + sqrt(S(517)))*elliptic_f(S(2)*atan(S(517)**(S(3)/4)*(S(3) + S(4)/x)/S(517)), S(19)*sqrt(S(517))/S(1034) + S(1)/2)/(S(1034)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8))**(S(-3)/2), x), x, sqrt(S(2))*S(517)**(S(1)/4)*x**S(2)*sqrt(((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517))/((S(3) + S(4)/x)**S(2) + sqrt(S(517)))**S(2))*(-S(203)*sqrt(S(517)) + S(4910))*((S(3) + S(4)/x)**S(2) + sqrt(S(517)))*elliptic_f(S(2)*atan(S(517)**(S(3)/4)*(S(3) + S(4)/x)/S(517)), S(19)*sqrt(S(517))/S(1034) + S(1)/2)/(S(322608)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))) - sqrt(S(2))*S(517)**(S(1)/4)*x**S(2)*sqrt(((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517))/((S(3) + S(4)/x)**S(2) + sqrt(S(517)))**S(2))*(S(2455)*(S(3) + S(4)/x)**S(2) + S(2455)*sqrt(S(517)))*elliptic_e(S(2)*atan(S(517)**(S(3)/4)*(S(3) + S(4)/x)/S(517)), S(19)*sqrt(S(517))/S(1034) + S(1)/2)/(S(80652)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))) + sqrt(S(2))*x**S(2)*(S(3) + S(4)/x)*(S(516)*(S(3) + S(4)/x)**S(3) - S(2455)*(S(3) + S(4)/x)**S(2) + S(24643) - S(35004)/x)/(S(80652)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))) + sqrt(S(2))*x**S(2)*(S(3) + S(4)/x)*(S(2455)*(S(3) + S(4)/x)**S(4) - S(93290)*(S(3) + S(4)/x)**S(2) + S(1269235))/(S(80652)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))*((S(3) + S(4)/x)**S(2) + sqrt(S(517)))) - S(43)*sqrt(S(2))*x**S(2)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517))/(S(6721)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(8)*x**S(4) - S(15)*x**S(3) + S(8)*x**S(2) + S(24)*x + S(8))**(S(-5)/2), x), x, sqrt(S(2))*S(517)**(S(1)/4)*x**S(2)*sqrt(((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517))/((S(3) + S(4)/x)**S(2) + sqrt(S(517)))**S(2))*(-S(175318963)*sqrt(S(517)) + S(4346103976))*((S(3) + S(4)/x)**S(2) + sqrt(S(517)))*elliptic_f(S(2)*atan(S(517)**(S(3)/4)*(S(3) + S(4)/x)/S(517)), S(19)*sqrt(S(517))/S(1034) + S(1)/2)/(S(156113882496)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))) - sqrt(S(2))*S(517)**(S(1)/4)*x**S(2)*sqrt(((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517))/((S(3) + S(4)/x)**S(2) + sqrt(S(517)))**S(2))*(S(543262997)*(S(3) + S(4)/x)**S(2) + S(543262997)*sqrt(S(517)))*elliptic_e(S(2)*atan(S(517)**(S(3)/4)*(S(3) + S(4)/x)/S(517)), S(19)*sqrt(S(517))/S(1034) + S(1)/2)/(S(9757117656)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))) + sqrt(S(2))*x**S(2)*(S(3) + S(4)/x)*(S(223148517)*(S(3) + S(4)/x)**S(3) - S(1086525994)*(S(3) + S(4)/x)**S(2) + S(8668521901) - S(13685866440)/x)/(S(19514235312)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))) + sqrt(S(2))*x**S(2)*(S(3) + S(4)/x)*(S(193467)*(S(3) + S(4)/x)**S(3) - S(718994)*(S(3) + S(4)/x)**S(2) + S(8297705) - S(20727588)/x)/(S(241956)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517))) + sqrt(S(2))*x**S(2)*(S(3) + S(4)/x)*(S(543262997)*(S(3) + S(4)/x)**S(4) - S(20643993886)*(S(3) + S(4)/x)**S(2) + S(280866969449))/(S(9757117656)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))*((S(3) + S(4)/x)**S(2) + sqrt(S(517)))) - sqrt(S(2))*x**S(2)*(S(74382839)*(S(3) + S(4)/x)**S(4) - S(2826547882)*(S(3) + S(4)/x)**S(2) + S(38455927763))/(S(6504745104)*sqrt(x**S(4)*((S(3) + S(4)/x)**S(4) - S(38)*(S(3) + S(4)/x)**S(2) + S(517)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(3)*x**S(4) + S(15)*x**S(3) - S(44)*x**S(2) - S(6)*x + S(9)), x), x, S(613)**(S(3)/4)*x**S(2)*sqrt(((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613))/((S(-1) + S(6)/x)**S(2) + sqrt(S(613)))**S(2))*((S(-1) + S(6)/x)**S(2) + sqrt(S(613)))*elliptic_f(S(2)*atan(S(613)**(S(3)/4)*(S(1) - S(6)/x)/S(613)), S(1)/2 + S(91)*sqrt(S(613))/S(1226))/(S(613)*sqrt(x**S(4)*((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613)))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(3)*x**S(4) + S(15)*x**S(3) - S(44)*x**S(2) - S(6)*x + S(9))**(S(-3)/2), x), x, S(613)**(S(1)/4)*x**S(2)*sqrt(((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613))/((S(-1) + S(6)/x)**S(2) + sqrt(S(613)))**S(2))*(-S(145)*sqrt(S(613)) + S(7444))*((S(-1) + S(6)/x)**S(2) + sqrt(S(613)))*elliptic_f(S(2)*atan(S(613)**(S(3)/4)*(S(1) - S(6)/x)/S(613)), S(1)/2 + S(91)*sqrt(S(613))/S(1226))/(S(10576089)*sqrt(x**S(4)*((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613)))) - S(613)**(S(1)/4)*x**S(2)*sqrt(((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613))/((S(-1) + S(6)/x)**S(2) + sqrt(S(613)))**S(2))*(S(14888)*(S(-1) + S(6)/x)**S(2) + S(14888)*sqrt(S(613)))*elliptic_e(S(2)*atan(S(613)**(S(3)/4)*(S(1) - S(6)/x)/S(613)), S(1)/2 + S(91)*sqrt(S(613))/S(1226))/(S(10576089)*sqrt(x**S(4)*((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613)))) + x**S(2)*(S(1) - S(6)/x)*(S(704)*(S(1) - S(6)/x)**S(3) - S(14888)*(S(1) - S(6)/x)**S(2) + S(109872) + S(430392)/x)/(S(10576089)*sqrt(x**S(4)*((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613)))) + x**S(2)*(S(1) - S(6)/x)*(S(14888)*(S(-1) + S(6)/x)**S(4) - S(2709616)*(S(1) - S(6)/x)**S(2) + S(9126344))/(sqrt(x**S(4)*((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613)))*(S(10576089)*(S(-1) + S(6)/x)**S(2) + S(10576089)*sqrt(S(613)))) - x**S(2)*(S(704)*(S(-1) + S(6)/x)**S(4) - S(128128)*(S(1) - S(6)/x)**S(2) + S(431552))/(S(10576089)*sqrt(x**S(4)*((S(-1) + S(6)/x)**S(4) - S(182)*(S(1) - S(6)/x)**S(2) + S(613)))), expand=True, _diff=True, _numerical=True) ''' def test_5(): assert rubi_test(rubi_integrate(x**m*sqrt(-a/x + b)/sqrt(a - b*x), x), x, S(2)*x**(m + S(1))*sqrt(-a/x + b)/(sqrt(a - b*x)*(S(2)*m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(-a/x + b)/sqrt(a - b*x), x), x, S(2)*x**S(3)*sqrt(-a/x + b)/(S(5)*sqrt(a - b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(-a/x + b)/sqrt(a - b*x), x), x, S(2)*x**S(2)*sqrt(-a/x + b)/(S(3)*sqrt(a - b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a/x + b)/sqrt(a - b*x), x), x, S(2)*x*sqrt(-a/x + b)/sqrt(a - b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a/x + b)/(x*sqrt(a - b*x)), x), x, -S(2)*sqrt(-a/x + b)/sqrt(a - b*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a/x + b)/(x**S(2)*sqrt(a - b*x)), x), x, -S(2)*sqrt(-a/x + b)/(S(3)*x*sqrt(a - b*x)), expand=True, _diff=True, _numerical=True) # appellf1 assert rubi_test(rubi_integrate((a + b/x)**m*(c + d*x)**n, x), x, x*(S(1) + d*x/c)**(-n)*(a + b/x)**m*(c + d*x)**n*(a*x/b + S(1))**(-m)*AppellF1(-m + S(1), -m, -n, -m + S(2), -a*x/b, -d*x/c)/(-m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x)**m*(c + d*x)**S(2), x), x, d**S(2)*x**S(3)*(a + b/x)**(m + S(1))/(S(3)*a) + d*x**S(2)*(a + b/x)**(m + S(1))*(S(6)*a*c - b*d*(-m + S(2)))/(S(6)*a**S(2)) - b*(a + b/x)**(m + S(1))*(S(6)*a**S(2)*c**S(2) - S(6)*a*b*c*d*(-m + S(1)) + b**S(2)*d**S(2)*(m**S(2) - S(3)*m + S(2)))*hyper((S(2), m + S(1)), (m + S(2),), S(1) + b/(a*x))/(S(6)*a**S(4)*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x)**m*(c + d*x), x), x, d*x**S(2)*(a + b/x)**(m + S(1))/(S(2)*a) - b*(a + b/x)**(m + S(1))*(S(2)*a*c - b*d*(-m + S(1)))*hyper((S(2), m + S(1)), (m + S(2),), S(1) + b/(a*x))/(S(2)*a**S(3)*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x)**m, x), x, -b*(a + b/x)**(m + S(1))*hyper((S(2), m + S(1)), (m + S(2),), S(1) + b/(a*x))/(a**S(2)*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x)**m/(c + d*x), x), x, -c*(a + b/x)**(m + S(1))*hyper((S(1), m + S(1)), (m + S(2),), c*(a + b/x)/(a*c - b*d))/(d*(m + S(1))*(a*c - b*d)) + (a + b/x)**(m + S(1))*hyper((S(1), m + S(1)), (m + S(2),), S(1) + b/(a*x))/(a*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x)**m/(c + d*x)**S(2), x), x, -b*(a + b/x)**(m + S(1))*hyper((S(2), m + S(1)), (m + S(2),), c*(a + b/x)/(a*c - b*d))/((m + S(1))*(a*c - b*d)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x)**m/(c + d*x)**S(3), x), x, -b*(a + b/x)**(m + S(1))*(S(2)*a*c - b*d*(m + S(1)))*hyper((S(2), m + S(1)), (m + S(2),), c*(a + b/x)/(a*c - b*d))/(S(2)*c*(m + S(1))*(a*c - b*d)**S(3)) - d*(a + b/x)**(m + S(1))/(S(2)*c*(a*c - b*d)*(c/x + d)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b/x)**m/(c + d*x)**S(4), x), x, -b*(a + b/x)**(m + S(1))*(S(6)*a**S(2)*c**S(2) - S(6)*a*b*c*d*(m + S(1)) + b**S(2)*d**S(2)*(m**S(2) + S(3)*m + S(2)))*hyper((S(2), m + S(1)), (m + S(2),), c*(a + b/x)/(a*c - b*d))/(S(6)*c**S(2)*(m + S(1))*(a*c - b*d)**S(4)) + d**S(2)*(a + b/x)**(m + S(1))/(S(3)*c**S(2)*(a*c - b*d)*(c/x + d)**S(3)) - d*(a + b/x)**(m + S(1))*(S(6)*a*c - b*d*(m + S(4)))/(S(6)*c**S(2)*(a*c - b*d)**S(2)*(c/x + d)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sqrt(-a/x**S(2) + b)/sqrt(a - b*x**S(2)), x), x, x**(m + S(1))*sqrt(-a/x**S(2) + b)/(m*sqrt(a - b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(-a/x**S(2) + b)/sqrt(a - b*x**S(2)), x), x, x**S(3)*sqrt(-a/x**S(2) + b)/(S(2)*sqrt(a - b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(-a/x**S(2) + b)/sqrt(a - b*x**S(2)), x), x, x**S(2)*sqrt(-a/x**S(2) + b)/sqrt(a - b*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a/x**S(2) + b)/sqrt(a - b*x**S(2)), x), x, x*sqrt(-a/x**S(2) + b)*log(x)/sqrt(a - b*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a/x**S(2) + b)/(x*sqrt(a - b*x**S(2))), x), x, -sqrt(-a/x**S(2) + b)/sqrt(a - b*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(-a/x**S(2) + b)/(x**S(2)*sqrt(a - b*x**S(2))), x), x, -sqrt(-a/x**S(2) + b)/(S(2)*x*sqrt(a - b*x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**(S(3)/2)/sqrt(a + b/x**S(2)), x), x, -2*sqrt(b)*c*sqrt(a*(c + d*x)/(a*c - sqrt(b)*d*sqrt(-a)))*(a*c**2 + b*d**2)*sqrt(a*x**2/b + 1)*EllipticF(asin(sqrt(2)*sqrt(1 - x*sqrt(-a)/sqrt(b))/2), -2*sqrt(b)*d*sqrt(-a)/(a*c - sqrt(b)*d*sqrt(-a)))/(5*d*x*(-a)**(3/2)*sqrt(a + b/x**2)*sqrt(c + d*x)) + 2*sqrt(b)*sqrt(c + d*x)*(a*c**2 - 3*b*d**2)*sqrt(a*x**2/b + 1)*EllipticE(asin(sqrt(2)*sqrt(1 - x*sqrt(-a)/sqrt(b))/2), -2*sqrt(b)*d*sqrt(-a)/(a*c - sqrt(b)*d*sqrt(-a)))/(5*d*x*(-a)**(3/2)*sqrt(a*(c + d*x)/(a*c - sqrt(b)*d*sqrt(-a)))*sqrt(a + b/x**2)) + 2*c*sqrt(c + d*x)*(a*x**2 + b)/(5*a*x*sqrt(a + b/x**2)) + 2*(c + d*x)**(3/2)*(a*x**2 + b)/(5*a*x*sqrt(a + b/x**2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))**(S(5)/2)/sqrt(a**S(2) - b**S(2)*x**S(4)), x), x, S(19)*a**S(2)*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a - b*x**S(2)))/(S(8)*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))) - S(9)*a*x*(a - b*x**S(2))*sqrt(a + b*x**S(2))/(S(8)*sqrt(a**S(2) - b**S(2)*x**S(4))) - x*(a - b*x**S(2))*(a + b*x**S(2))**(S(3)/2)/(S(4)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*x**S(2))**(S(3)/2)/sqrt(a**S(2) - b**S(2)*x**S(4)), x), x, S(3)*a*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a - b*x**S(2)))/(S(2)*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))) - x*(a - b*x**S(2))*sqrt(a + b*x**S(2))/(S(2)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*x**S(2))/sqrt(a**S(2) - b**S(2)*x**S(4)), x), x, sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atan(sqrt(b)*x/sqrt(a - b*x**S(2)))/(sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + b*x**S(2))*sqrt(a**S(2) - b**S(2)*x**S(4))), x), x, sqrt(S(2))*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atan(sqrt(S(2))*sqrt(b)*x/sqrt(a - b*x**S(2)))/(S(2)*a*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x**S(2))**(S(3)/2)*sqrt(a**S(2) - b**S(2)*x**S(4))), x), x, x*(a - b*x**S(2))/(S(4)*a**S(2)*sqrt(a + b*x**S(2))*sqrt(a**S(2) - b**S(2)*x**S(4))) + S(3)*sqrt(S(2))*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atan(sqrt(S(2))*sqrt(b)*x/sqrt(a - b*x**S(2)))/(S(8)*a**S(2)*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*x**S(2))**(S(5)/2)*sqrt(a**S(2) - b**S(2)*x**S(4))), x), x, x*(a - b*x**S(2))/(S(8)*a**S(2)*(a + b*x**S(2))**(S(3)/2)*sqrt(a**S(2) - b**S(2)*x**S(4))) + S(9)*x*(a - b*x**S(2))/(S(32)*a**S(3)*sqrt(a + b*x**S(2))*sqrt(a**S(2) - b**S(2)*x**S(4))) + S(19)*sqrt(S(2))*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atan(sqrt(S(2))*sqrt(b)*x/sqrt(a - b*x**S(2)))/(S(64)*a**S(3)*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - b*x**S(2))**(S(5)/2)/sqrt(a**S(2) - b**S(2)*x**S(4)), x), x, S(19)*a**S(2)*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(8)*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))) - S(9)*a*x*sqrt(a - b*x**S(2))*(a + b*x**S(2))/(S(8)*sqrt(a**S(2) - b**S(2)*x**S(4))) - x*(a - b*x**S(2))**(S(3)/2)*(a + b*x**S(2))/(S(4)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a - b*x**S(2))**(S(3)/2)/sqrt(a**S(2) - b**S(2)*x**S(4)), x), x, S(3)*a*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(2)*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))) - x*sqrt(a - b*x**S(2))*(a + b*x**S(2))/(S(2)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a - b*x**S(2))/sqrt(a**S(2) - b**S(2)*x**S(4)), x), x, sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a - b*x**S(2))*sqrt(a**S(2) - b**S(2)*x**S(4))), x), x, sqrt(S(2))*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atanh(sqrt(S(2))*sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(2)*a*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a - b*x**S(2))**(S(3)/2)*sqrt(a**S(2) - b**S(2)*x**S(4))), x), x, x*(a + b*x**S(2))/(S(4)*a**S(2)*sqrt(a - b*x**S(2))*sqrt(a**S(2) - b**S(2)*x**S(4))) + S(3)*sqrt(S(2))*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atanh(sqrt(S(2))*sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(8)*a**S(2)*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a - b*x**S(2))**(S(5)/2)*sqrt(a**S(2) - b**S(2)*x**S(4))), x), x, x*(a + b*x**S(2))/(S(8)*a**S(2)*(a - b*x**S(2))**(S(3)/2)*sqrt(a**S(2) - b**S(2)*x**S(4))) + S(9)*x*(a + b*x**S(2))/(S(32)*a**S(3)*sqrt(a - b*x**S(2))*sqrt(a**S(2) - b**S(2)*x**S(4))) + S(19)*sqrt(S(2))*sqrt(a - b*x**S(2))*sqrt(a + b*x**S(2))*atanh(sqrt(S(2))*sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(64)*a**S(3)*sqrt(b)*sqrt(a**S(2) - b**S(2)*x**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(2)/(x**S(2) + S(-1)))/(x**S(2) + S(1)), x), x, sqrt(S(2))*sqrt(-x**S(2)/(-x**S(2) + S(1)))*sqrt(x**S(2) + S(-1))*atan(sqrt(S(2))*sqrt(x**S(2) + S(-1))/S(2))/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(2)/(a + x**S(2)*(a + S(1)) + S(-1)))/(x**S(2) + S(1)), x), x, sqrt(S(2))*sqrt(-x**S(2)/(-a - x**S(2)*(a + S(1)) + S(1)))*sqrt(a + x**S(2)*(a + S(1)) + S(-1))*atan(sqrt(S(2))*sqrt(a + x**S(2)*(a + S(1)) + S(-1))/S(2))/(S(2)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((x + S(1))*(x**S(2) + S(-1)))**(S(-2)/3), x), x, (S(3)*x**S(2)/S(2) + S(-3)/2)/((-x + S(-1))*(-x**S(2) + S(1)))**(S(2)/3), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(((x + S(1))*(x**S(2) + S(-1)))**(S(-2)/3), x), x, (x + S(1))*(S(3)*x/S(2) + S(-3)/2)/(x**S(3) + x**S(2) - x + S(-1))**(S(2)/3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-1))/(sqrt(x*(x**S(2) + S(1)))*(x**S(2) + S(1))), x), x, -S(2)*x/sqrt(x*(x**S(2) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((x**S(2) + S(-1))/((x**S(2) + S(1))*sqrt(x**S(3) + x)), x), x, -S(2)*x/sqrt(x**S(3) + x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x**S(2) + S(-1))**S(2)/(x*(x**S(2) + S(1))))/(x**S(2) + S(1)), x), x, S(2)*x*sqrt((-x**S(2) + S(1))**S(2)/(x*(x**S(2) + S(1))))/(-x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x**S(2) + S(-1))**S(2)/(x**S(3) + x))/(x**S(2) + S(1)), x), x, S(2)*x*sqrt((-x**S(2) + S(1))**S(2)/(x**S(3) + x))/(-x**S(2) + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(a + b/x**S(2))*sqrt(c + d*x**S(2))), x), x, sqrt(a*x**S(2) + b)*atanh(sqrt(d)*sqrt(a*x**S(2) + b)/(sqrt(a)*sqrt(c + d*x**S(2))))/(sqrt(a)*sqrt(d)*x*sqrt(a + b/x**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(x**S(4) - S(2)*x**S(2))/((x**S(2) + S(-1))*(x**S(2) + S(2))), x), x, S(2)*sqrt(x**S(4) - S(2)*x**S(2))*atan(sqrt(x**S(2) + S(-2))/S(2))/(S(3)*x*sqrt(x**S(2) + S(-2))) - sqrt(x**S(4) - S(2)*x**S(2))*atan(sqrt(x**S(2) + S(-2)))/(S(3)*x*sqrt(x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(1) - S(1)/(x**S(2) + S(-1))**S(2))/(-x**S(2) + S(2)), x), x, sqrt(S(1) - S(1)/(-x**S(2) + S(1))**S(2))*(-x**S(2) + S(1))*atan(sqrt(x**S(2) + S(-2)))/(x*sqrt(x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(sqrt(S(1) - S(1)/(x**S(2) + S(-1))**S(2))/(-x**S(2) + S(2)), x), x, sqrt(S(1) - S(1)/(-x**S(2) + S(1))**S(2))*(-x**S(2) + S(1))*sqrt(x**S(4) - S(2)*x**S(2))*atan(sqrt(x**S(2) + S(-2)))/(x*sqrt(x**S(2) + S(-2))*sqrt((x**S(2) + S(-1))**S(2) + S(-1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt((x**S(4) - S(2)*x**S(2))/(x**S(2) + S(-1))**S(2))/(x**S(2) + S(2)), x), x, sqrt((x**S(4) - S(2)*x**S(2))/(-x**S(2) + S(1))**S(2))*(-x**S(2)/S(3) + S(1)/3)*atan(sqrt(x**S(2) + S(-2)))/(x*sqrt(x**S(2) + S(-2))) + sqrt((x**S(4) - S(2)*x**S(2))/(-x**S(2) + S(1))**S(2))*(S(2)*x**S(2)/S(3) + S(-2)/3)*atan(sqrt(x**S(2) + S(-2))/S(2))/(x*sqrt(x**S(2) + S(-2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x/(x**S(2) + S(1)) + S(1))**(S(5)/2), x), x, -(-x/S(3) + S(1)/3)*(x + S(1))**S(3)*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))/(x**S(2) + S(1)) + (x + S(1))*(S(8)*x/S(3) + S(-4)/3)*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1)) - (S(3)*x + S(4))*(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))/(x + S(1)) + S(5)*sqrt(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))*asinh(x)/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x/(x**S(2) + S(1)) + S(1))**(S(3)/2), x), x, -x*(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))/(x + S(1)) + (x + S(-1))*(x + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1)) + S(3)*sqrt(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))*asinh(x)/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x/(x**S(2) + S(1)) + S(1)), x), x, sqrt(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))*asinh(x)/(x + S(1)) + (x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(S(2)*x/(x**S(2) + S(1)) + S(1)), x), x, (x + S(1))/sqrt(S(2)*x/(x**S(2) + S(1)) + S(1)) - (x + S(1))*asinh(x)/(sqrt(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))) - sqrt(S(2))*(x + S(1))*atanh(sqrt(S(2))*(-x + S(1))/(S(2)*sqrt(x**S(2) + S(1))))/(sqrt(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((S(2)*x/(x**S(2) + S(1)) + S(1))**(S(-3)/2), x), x, (S(3)*x/S(2) + S(3))/sqrt(S(2)*x/(x**S(2) + S(1)) + S(1)) - (S(3)*x + S(3))*asinh(x)/(sqrt(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))) - sqrt(S(2))*(S(9)*x/S(2) + S(9)/2)*atanh(sqrt(S(2))*(-x + S(1))/(S(2)*sqrt(x**S(2) + S(1))))/(S(2)*sqrt(x**S(2) + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))) + (-x**S(2)/S(2) + S(-1)/2)/((x + S(1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))/(x**S(2) + S(1)), x), x, (x + S(-1))*sqrt(S(2)*x/(x**S(2) + S(1)) + S(1))/(x + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c/(a + b*x**S(2)))**(S(3)/2), x), x, -c*x*sqrt(c/(a + b*x**S(2)))/b + c*sqrt(c/(a + b*x**S(2)))*sqrt(a + b*x**S(2))*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/b**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c/(a + b*x**S(2)))**(S(3)/2), x), x, -c*sqrt(c/(a + b*x**S(2)))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c/(a + b*x**S(2)))**(S(3)/2), x), x, c*x*sqrt(c/(a + b*x**S(2)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c/(a + b*x**S(2)))**(S(3)/2)/x, x), x, c*sqrt(c/(a + b*x**S(2)))/a - c*sqrt(c/(a + b*x**S(2)))*sqrt(a + b*x**S(2))*atanh(sqrt(a + b*x**S(2))/sqrt(a))/a**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c/(a + b*x**S(2)))**(S(3)/2)/x**S(2), x), x, -c*sqrt(c/(a + b*x**S(2)))/(a*x) - S(2)*b*c*x*sqrt(c/(a + b*x**S(2)))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c/(a + b*x**S(2)))**(S(3)/2)/x**S(3), x), x, c*sqrt(c/(a + b*x**S(2)))/(a*x**S(2)) - S(3)*c*sqrt(c/(a + b*x**S(2)))*(a + b*x**S(2))/(S(2)*a**S(2)*x**S(2)) + S(3)*b*c*sqrt(c/(a + b*x**S(2)))*sqrt(a + b*x**S(2))*atanh(sqrt(a + b*x**S(2))/sqrt(a))/(S(2)*a**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(c*(a + b*x**S(2))**S(3))**(S(3)/2), x), x, -S(21)*a**S(6)*c*sqrt(c*(a + b*x**S(2))**S(3))*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(1024)*b**(S(3)/2)*(a + b*x**S(2))**(S(3)/2)) + S(21)*a**S(5)*c*x*sqrt(c*(a + b*x**S(2))**S(3))/(S(1024)*b*(a + b*x**S(2))) + S(21)*a**S(4)*c*x**S(3)*sqrt(c*(a + b*x**S(2))**S(3))/(S(512)*(a + b*x**S(2))) + S(7)*a**S(3)*c*x**S(3)*sqrt(c*(a + b*x**S(2))**S(3))/S(128) + S(21)*a**S(2)*c*x**S(3)*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))/S(320) + S(3)*a*c*x**S(3)*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(2)/S(40) + c*x**S(3)*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(3)/S(12), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(c*(a + b*x**S(2))**S(3))**(S(3)/2), x), x, c*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(4)/(S(11)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*(a + b*x**S(2))**S(3))**(S(3)/2), x), x, S(63)*a**S(5)*c*sqrt(c*(a + b*x**S(2))**S(3))*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(256)*sqrt(b)*(a + b*x**S(2))**(S(3)/2)) + S(63)*a**S(4)*c*x*sqrt(c*(a + b*x**S(2))**S(3))/(S(256)*(a + b*x**S(2))) + S(21)*a**S(3)*c*x*sqrt(c*(a + b*x**S(2))**S(3))/S(128) + S(21)*a**S(2)*c*x*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))/S(160) + S(9)*a*c*x*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(2)/S(80) + c*x*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(3)/S(10), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*(a + b*x**S(2))**S(3))**(S(3)/2)/x, x), x, -a**(S(9)/2)*c*sqrt(c*(a + b*x**S(2))**S(3))*atanh(sqrt(a + b*x**S(2))/sqrt(a))/(a + b*x**S(2))**(S(3)/2) + a**S(4)*c*sqrt(c*(a + b*x**S(2))**S(3))/(a + b*x**S(2)) + a**S(3)*c*sqrt(c*(a + b*x**S(2))**S(3))/S(3) + a**S(2)*c*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))/S(5) + a*c*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(2)/S(7) + c*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(3)/S(9), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*(a + b*x**S(2))**S(3))**(S(3)/2)/x**S(2), x), x, S(315)*a**S(4)*sqrt(b)*c*sqrt(c*(a + b*x**S(2))**S(3))*atanh(sqrt(b)*x/sqrt(a + b*x**S(2)))/(S(128)*(a + b*x**S(2))**(S(3)/2)) + S(315)*a**S(3)*b*c*x*sqrt(c*(a + b*x**S(2))**S(3))/(S(128)*(a + b*x**S(2))) + S(105)*a**S(2)*b*c*x*sqrt(c*(a + b*x**S(2))**S(3))/S(64) + S(21)*a*b*c*x*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))/S(16) + S(9)*b*c*x*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(2)/S(8) - c*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(3)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*(a + b*x**S(2))**S(3))**(S(3)/2)/x**S(3), x), x, -S(9)*a**(S(7)/2)*b*c*sqrt(c*(a + b*x**S(2))**S(3))*atanh(sqrt(a + b*x**S(2))/sqrt(a))/(S(2)*(a + b*x**S(2))**(S(3)/2)) + S(9)*a**S(3)*b*c*sqrt(c*(a + b*x**S(2))**S(3))/(S(2)*(a + b*x**S(2))) + S(3)*a**S(2)*b*c*sqrt(c*(a + b*x**S(2))**S(3))/S(2) + S(9)*a*b*c*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))/S(10) + S(9)*b*c*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(2)/S(14) - c*sqrt(c*(a + b*x**S(2))**S(3))*(a + b*x**S(2))**S(3)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True)
0747b840f1db608e48cc935828b6fb5909788fbcee763ede21810a05d3c3c9b5
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.utility_function import ( sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral as Integrate from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec) from sympy.core.numbers import pi as Pi from sympy.integrals.rubi.rubi import rubi_integrate a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j= symbols('a b c d e f m n x u k p r s t i j') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', ) def test_1(): assert rubi_test(rubi_integrate(x**S(4)*asinh(a*x), x), x, x**S(5)*asinh(a*x)/S(5) - (a**S(2)*x**S(2) + S(1))**(S(5)/2)/(S(25)*a**S(5)) + S(2)*(a**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(15)*a**S(5)) - sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asinh(a*x), x), x, x**S(4)*asinh(a*x)/S(4) - x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(16)*a) + S(3)*x*sqrt(a**S(2)*x**S(2) + S(1))/(S(32)*a**S(3)) - S(3)*asinh(a*x)/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asinh(a*x), x), x, x**S(3)*asinh(a*x)/S(3) - (a**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(9)*a**S(3)) + sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asinh(a*x), x), x, x**S(2)*asinh(a*x)/S(2) - x*sqrt(a**S(2)*x**S(2) + S(1))/(S(4)*a) + asinh(a*x)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x), x), x, x*asinh(a*x) - sqrt(a**S(2)*x**S(2) + S(1))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)/x, x), x, PolyLog(S(2), exp(S(2)*asinh(a*x)))/S(2) + log(-exp(S(2)*asinh(a*x)) + S(1))*asinh(a*x) - asinh(a*x)**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)/x**S(2), x), x, -a*atanh(sqrt(a**S(2)*x**S(2) + S(1))) - asinh(a*x)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)/x**S(3), x), x, -a*sqrt(a**S(2)*x**S(2) + S(1))/(S(2)*x) - asinh(a*x)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)/x**S(4), x), x, a**S(3)*atanh(sqrt(a**S(2)*x**S(2) + S(1)))/S(6) - a*sqrt(a**S(2)*x**S(2) + S(1))/(S(6)*x**S(2)) - asinh(a*x)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)/x**S(5), x), x, a**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(6)*x) - a*sqrt(a**S(2)*x**S(2) + S(1))/(S(12)*x**S(3)) - asinh(a*x)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)/x**S(6), x), x, -S(3)*a**S(5)*atanh(sqrt(a**S(2)*x**S(2) + S(1)))/S(40) + S(3)*a**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(40)*x**S(2)) - a*sqrt(a**S(2)*x**S(2) + S(1))/(S(20)*x**S(4)) - asinh(a*x)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asinh(a*x)**S(2), x), x, x**S(5)*asinh(a*x)**S(2)/S(5) + S(2)*x**S(5)/S(125) - S(2)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(25)*a) - S(8)*x**S(3)/(S(225)*a**S(2)) + S(8)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(75)*a**S(3)) + S(16)*x/(S(75)*a**S(4)) - S(16)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(75)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asinh(a*x)**S(2), x), x, x**S(4)*asinh(a*x)**S(2)/S(4) + x**S(4)/S(32) - x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(8)*a) - S(3)*x**S(2)/(S(32)*a**S(2)) + S(3)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(16)*a**S(3)) - S(3)*asinh(a*x)**S(2)/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asinh(a*x)**S(2), x), x, x**S(3)*asinh(a*x)**S(2)/S(3) + S(2)*x**S(3)/S(27) - S(2)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(9)*a) - S(4)*x/(S(9)*a**S(2)) + S(4)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(9)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asinh(a*x)**S(2), x), x, x**S(2)*asinh(a*x)**S(2)/S(2) + x**S(2)/S(4) - x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(2)*a) + asinh(a*x)**S(2)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(2), x), x, x*asinh(a*x)**S(2) + S(2)*x - S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(2)/x, x), x, PolyLog(S(2), exp(S(2)*asinh(a*x)))*asinh(a*x) - PolyLog(S(3), exp(S(2)*asinh(a*x)))/S(2) + log(-exp(S(2)*asinh(a*x)) + S(1))*asinh(a*x)**S(2) - asinh(a*x)**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(2)/x**S(2), x), x, -S(2)*a*PolyLog(S(2), -exp(asinh(a*x))) + S(2)*a*PolyLog(S(2), exp(asinh(a*x))) - S(4)*a*asinh(a*x)*atanh(exp(asinh(a*x))) - asinh(a*x)**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(2)/x**S(3), x), x, a**S(2)*log(x) - a*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/x - asinh(a*x)**S(2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(2)/x**S(4), x), x, a**S(3)*PolyLog(S(2), -exp(asinh(a*x)))/S(3) - a**S(3)*PolyLog(S(2), exp(asinh(a*x)))/S(3) + S(2)*a**S(3)*asinh(a*x)*atanh(exp(asinh(a*x)))/S(3) - a**S(2)/(S(3)*x) - a*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(3)*x**S(2)) - asinh(a*x)**S(2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(2)/x**S(5), x), x, -a**S(4)*log(x)/S(3) + a**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(3)*x) - a**S(2)/(S(12)*x**S(2)) - a*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(6)*x**S(3)) - asinh(a*x)**S(2)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asinh(a*x)**S(3), x), x, x**S(5)*asinh(a*x)**S(3)/S(5) + S(6)*x**S(5)*asinh(a*x)/S(125) - S(3)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(25)*a) - S(8)*x**S(3)*asinh(a*x)/(S(75)*a**S(2)) + S(4)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(25)*a**S(3)) + S(16)*x*asinh(a*x)/(S(25)*a**S(4)) - S(6)*(a**S(2)*x**S(2) + S(1))**(S(5)/2)/(S(625)*a**S(5)) + S(76)*(a**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(1125)*a**S(5)) - S(8)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(25)*a**S(5)) - S(298)*sqrt(a**S(2)*x**S(2) + S(1))/(S(375)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asinh(a*x)**S(3), x), x, x**S(4)*asinh(a*x)**S(3)/S(4) + S(3)*x**S(4)*asinh(a*x)/S(32) - S(3)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(16)*a) - S(3)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(128)*a) - S(9)*x**S(2)*asinh(a*x)/(S(32)*a**S(2)) + S(9)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(32)*a**S(3)) + S(45)*x*sqrt(a**S(2)*x**S(2) + S(1))/(S(256)*a**S(3)) - S(3)*asinh(a*x)**S(3)/(S(32)*a**S(4)) - S(45)*asinh(a*x)/(S(256)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asinh(a*x)**S(3), x), x, x**S(3)*asinh(a*x)**S(3)/S(3) + S(2)*x**S(3)*asinh(a*x)/S(9) - x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(3)*a) - S(4)*x*asinh(a*x)/(S(3)*a**S(2)) - S(2)*(a**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(27)*a**S(3)) + S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(3)*a**S(3)) + S(14)*sqrt(a**S(2)*x**S(2) + S(1))/(S(9)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asinh(a*x)**S(3), x), x, x**S(2)*asinh(a*x)**S(3)/S(2) + S(3)*x**S(2)*asinh(a*x)/S(4) - S(3)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(4)*a) - S(3)*x*sqrt(a**S(2)*x**S(2) + S(1))/(S(8)*a) + asinh(a*x)**S(3)/(S(4)*a**S(2)) + S(3)*asinh(a*x)/(S(8)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(3), x), x, x*asinh(a*x)**S(3) + S(6)*x*asinh(a*x) - S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/a - S(6)*sqrt(a**S(2)*x**S(2) + S(1))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(3)/x, x), x, S(3)*PolyLog(S(2), exp(S(2)*asinh(a*x)))*asinh(a*x)**S(2)/S(2) - S(3)*PolyLog(S(3), exp(S(2)*asinh(a*x)))*asinh(a*x)/S(2) + S(3)*PolyLog(S(4), exp(S(2)*asinh(a*x)))/S(4) + log(-exp(S(2)*asinh(a*x)) + S(1))*asinh(a*x)**S(3) - asinh(a*x)**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(3)/x**S(2), x), x, -S(6)*a*PolyLog(S(2), -exp(asinh(a*x)))*asinh(a*x) + S(6)*a*PolyLog(S(2), exp(asinh(a*x)))*asinh(a*x) + S(6)*a*PolyLog(S(3), -exp(asinh(a*x))) - S(6)*a*PolyLog(S(3), exp(asinh(a*x))) - S(6)*a*asinh(a*x)**S(2)*atanh(exp(asinh(a*x))) - asinh(a*x)**S(3)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(3)/x**S(3), x), x, S(3)*a**S(2)*PolyLog(S(2), exp(S(2)*asinh(a*x)))/S(2) + S(3)*a**S(2)*log(-exp(S(2)*asinh(a*x)) + S(1))*asinh(a*x) - S(3)*a**S(2)*asinh(a*x)**S(2)/S(2) - S(3)*a*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(2)*x) - asinh(a*x)**S(3)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(3)/x**S(4), x), x, a**S(3)*PolyLog(S(2), -exp(asinh(a*x)))*asinh(a*x) - a**S(3)*PolyLog(S(2), exp(asinh(a*x)))*asinh(a*x) - a**S(3)*PolyLog(S(3), -exp(asinh(a*x))) + a**S(3)*PolyLog(S(3), exp(asinh(a*x))) + a**S(3)*asinh(a*x)**S(2)*atanh(exp(asinh(a*x))) - a**S(3)*atanh(sqrt(a**S(2)*x**S(2) + S(1))) - a**S(2)*asinh(a*x)/x - a*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(2)*x**S(2)) - asinh(a*x)**S(3)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(3)/x**S(5), x), x, -a**S(4)*PolyLog(S(2), exp(S(2)*asinh(a*x)))/S(2) - a**S(4)*log(-exp(S(2)*asinh(a*x)) + S(1))*asinh(a*x) + a**S(4)*asinh(a*x)**S(2)/S(2) + a**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(2)*x) - a**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(4)*x) - a**S(2)*asinh(a*x)/(S(4)*x**S(2)) - a*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(2)/(S(4)*x**S(3)) - asinh(a*x)**S(3)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*asinh(a*x)**S(4), x), x, x**S(6)*asinh(a*x)**S(4)/S(6) + x**S(6)*asinh(a*x)**S(2)/S(18) + x**S(6)/S(324) - x**S(5)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(9)*a) - x**S(5)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(54)*a) - S(5)*x**S(4)*asinh(a*x)**S(2)/(S(48)*a**S(2)) - S(65)*x**S(4)/(S(3456)*a**S(2)) + S(5)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(36)*a**S(3)) + S(65)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(864)*a**S(3)) + S(5)*x**S(2)*asinh(a*x)**S(2)/(S(16)*a**S(4)) + S(245)*x**S(2)/(S(1152)*a**S(4)) - S(5)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(24)*a**S(5)) - S(245)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(576)*a**S(5)) + S(5)*asinh(a*x)**S(4)/(S(96)*a**S(6)) + S(245)*asinh(a*x)**S(2)/(S(1152)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asinh(a*x)**S(4), x), x, x**S(5)*asinh(a*x)**S(4)/S(5) + S(12)*x**S(5)*asinh(a*x)**S(2)/S(125) + S(24)*x**S(5)/S(3125) - S(4)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(25)*a) - S(24)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(625)*a) - S(16)*x**S(3)*asinh(a*x)**S(2)/(S(75)*a**S(2)) - S(1088)*x**S(3)/(S(16875)*a**S(2)) + S(16)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(75)*a**S(3)) + S(1088)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(5625)*a**S(3)) + S(32)*x*asinh(a*x)**S(2)/(S(25)*a**S(4)) + S(16576)*x/(S(5625)*a**S(4)) - S(32)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(75)*a**S(5)) - S(16576)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(5625)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asinh(a*x)**S(4), x), x, x**S(4)*asinh(a*x)**S(4)/S(4) + S(3)*x**S(4)*asinh(a*x)**S(2)/S(16) + S(3)*x**S(4)/S(128) - x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(4)*a) - S(3)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(32)*a) - S(9)*x**S(2)*asinh(a*x)**S(2)/(S(16)*a**S(2)) - S(45)*x**S(2)/(S(128)*a**S(2)) + S(3)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(8)*a**S(3)) + S(45)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(64)*a**S(3)) - S(3)*asinh(a*x)**S(4)/(S(32)*a**S(4)) - S(45)*asinh(a*x)**S(2)/(S(128)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asinh(a*x)**S(4), x), x, x**S(3)*asinh(a*x)**S(4)/S(3) + S(4)*x**S(3)*asinh(a*x)**S(2)/S(9) + S(8)*x**S(3)/S(81) - S(4)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(9)*a) - S(8)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(27)*a) - S(8)*x*asinh(a*x)**S(2)/(S(3)*a**S(2)) - S(160)*x/(S(27)*a**S(2)) + S(8)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(9)*a**S(3)) + S(160)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(27)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asinh(a*x)**S(4), x), x, x**S(2)*asinh(a*x)**S(4)/S(2) + S(3)*x**S(2)*asinh(a*x)**S(2)/S(2) + S(3)*x**S(2)/S(4) - x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/a - S(3)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/(S(2)*a) + asinh(a*x)**S(4)/(S(4)*a**S(2)) + S(3)*asinh(a*x)**S(2)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(4), x), x, x*asinh(a*x)**S(4) + S(12)*x*asinh(a*x)**S(2) + S(24)*x - S(4)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/a - S(24)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(4)/x, x), x, S(2)*PolyLog(S(2), exp(S(2)*asinh(a*x)))*asinh(a*x)**S(3) - S(3)*PolyLog(S(3), exp(S(2)*asinh(a*x)))*asinh(a*x)**S(2) + S(3)*PolyLog(S(4), exp(S(2)*asinh(a*x)))*asinh(a*x) - S(3)*PolyLog(S(5), exp(S(2)*asinh(a*x)))/S(2) + log(-exp(S(2)*asinh(a*x)) + S(1))*asinh(a*x)**S(4) - asinh(a*x)**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(4)/x**S(2), x), x, -S(12)*a*PolyLog(S(2), -exp(asinh(a*x)))*asinh(a*x)**S(2) + S(12)*a*PolyLog(S(2), exp(asinh(a*x)))*asinh(a*x)**S(2) + S(24)*a*PolyLog(S(3), -exp(asinh(a*x)))*asinh(a*x) - S(24)*a*PolyLog(S(3), exp(asinh(a*x)))*asinh(a*x) - S(24)*a*PolyLog(S(4), -exp(asinh(a*x))) + S(24)*a*PolyLog(S(4), exp(asinh(a*x))) - S(8)*a*asinh(a*x)**S(3)*atanh(exp(asinh(a*x))) - asinh(a*x)**S(4)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(4)/x**S(3), x), x, S(6)*a**S(2)*PolyLog(S(2), exp(S(2)*asinh(a*x)))*asinh(a*x) - S(3)*a**S(2)*PolyLog(S(3), exp(S(2)*asinh(a*x))) + S(6)*a**S(2)*log(-exp(S(2)*asinh(a*x)) + S(1))*asinh(a*x)**S(2) - S(2)*a**S(2)*asinh(a*x)**S(3) - S(2)*a*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/x - asinh(a*x)**S(4)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**S(4)/x**S(4), x), x, S(2)*a**S(3)*PolyLog(S(2), -exp(asinh(a*x)))*asinh(a*x)**S(2) - S(4)*a**S(3)*PolyLog(S(2), -exp(asinh(a*x))) - S(2)*a**S(3)*PolyLog(S(2), exp(asinh(a*x)))*asinh(a*x)**S(2) + S(4)*a**S(3)*PolyLog(S(2), exp(asinh(a*x))) - S(4)*a**S(3)*PolyLog(S(3), -exp(asinh(a*x)))*asinh(a*x) + S(4)*a**S(3)*PolyLog(S(3), exp(asinh(a*x)))*asinh(a*x) + S(4)*a**S(3)*PolyLog(S(4), -exp(asinh(a*x))) - S(4)*a**S(3)*PolyLog(S(4), exp(asinh(a*x))) + S(4)*a**S(3)*asinh(a*x)**S(3)*atanh(exp(asinh(a*x)))/S(3) - S(8)*a**S(3)*asinh(a*x)*atanh(exp(asinh(a*x))) - S(2)*a**S(2)*asinh(a*x)**S(2)/x - S(2)*a*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**S(3)/(S(3)*x**S(2)) - asinh(a*x)**S(4)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/asinh(a*x), x), x, -S(5)*CoshIntegral(asinh(a*x))/(S(64)*a**S(7)) + S(9)*CoshIntegral(S(3)*asinh(a*x))/(S(64)*a**S(7)) - S(5)*CoshIntegral(S(5)*asinh(a*x))/(S(64)*a**S(7)) + CoshIntegral(S(7)*asinh(a*x))/(S(64)*a**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/asinh(a*x), x), x, S(5)*SinhIntegral(S(2)*asinh(a*x))/(S(32)*a**S(6)) - SinhIntegral(S(4)*asinh(a*x))/(S(8)*a**S(6)) + SinhIntegral(S(6)*asinh(a*x))/(S(32)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asinh(a*x), x), x, CoshIntegral(asinh(a*x))/(S(8)*a**S(5)) - S(3)*CoshIntegral(S(3)*asinh(a*x))/(S(16)*a**S(5)) + CoshIntegral(S(5)*asinh(a*x))/(S(16)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asinh(a*x), x), x, -SinhIntegral(S(2)*asinh(a*x))/(S(4)*a**S(4)) + SinhIntegral(S(4)*asinh(a*x))/(S(8)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asinh(a*x), x), x, -CoshIntegral(asinh(a*x))/(S(4)*a**S(3)) + CoshIntegral(S(3)*asinh(a*x))/(S(4)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asinh(a*x), x), x, SinhIntegral(S(2)*asinh(a*x))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/asinh(a*x), x), x, CoshIntegral(asinh(a*x))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asinh(a*x)), x), x, Integrate(S(1)/(x*asinh(a*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*asinh(a*x)), x), x, Integrate(S(1)/(x**S(2)*asinh(a*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/asinh(a*x)**S(2), x), x, -x**S(6)*sqrt(a**S(2)*x**S(2) + S(1))/(a*asinh(a*x)) - S(5)*SinhIntegral(asinh(a*x))/(S(64)*a**S(7)) + S(27)*SinhIntegral(S(3)*asinh(a*x))/(S(64)*a**S(7)) - S(25)*SinhIntegral(S(5)*asinh(a*x))/(S(64)*a**S(7)) + S(7)*SinhIntegral(S(7)*asinh(a*x))/(S(64)*a**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/asinh(a*x)**S(2), x), x, -x**S(5)*sqrt(a**S(2)*x**S(2) + S(1))/(a*asinh(a*x)) + S(5)*CoshIntegral(S(2)*asinh(a*x))/(S(16)*a**S(6)) - CoshIntegral(S(4)*asinh(a*x))/(S(2)*a**S(6)) + S(3)*CoshIntegral(S(6)*asinh(a*x))/(S(16)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asinh(a*x)**S(2), x), x, -x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))/(a*asinh(a*x)) + SinhIntegral(asinh(a*x))/(S(8)*a**S(5)) - S(9)*SinhIntegral(S(3)*asinh(a*x))/(S(16)*a**S(5)) + S(5)*SinhIntegral(S(5)*asinh(a*x))/(S(16)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asinh(a*x)**S(2), x), x, -x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(a*asinh(a*x)) - CoshIntegral(S(2)*asinh(a*x))/(S(2)*a**S(4)) + CoshIntegral(S(4)*asinh(a*x))/(S(2)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asinh(a*x)**S(2), x), x, -x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(a*asinh(a*x)) - SinhIntegral(asinh(a*x))/(S(4)*a**S(3)) + S(3)*SinhIntegral(S(3)*asinh(a*x))/(S(4)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asinh(a*x)**S(2), x), x, -x*sqrt(a**S(2)*x**S(2) + S(1))/(a*asinh(a*x)) + CoshIntegral(S(2)*asinh(a*x))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(-2)), x), x, -sqrt(a**S(2)*x**S(2) + S(1))/(a*asinh(a*x)) + SinhIntegral(asinh(a*x))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asinh(a*x)**S(2)), x), x, Integrate(S(1)/(x*asinh(a*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*asinh(a*x)**S(2)), x), x, Integrate(S(1)/(x**S(2)*asinh(a*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asinh(a*x)**S(3), x), x, -S(5)*x**S(5)/(S(2)*asinh(a*x)) - x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))/(S(2)*a*asinh(a*x)**S(2)) - S(2)*x**S(3)/(a**S(2)*asinh(a*x)) + CoshIntegral(asinh(a*x))/(S(16)*a**S(5)) - S(27)*CoshIntegral(S(3)*asinh(a*x))/(S(32)*a**S(5)) + S(25)*CoshIntegral(S(5)*asinh(a*x))/(S(32)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asinh(a*x)**S(3), x), x, -S(2)*x**S(4)/asinh(a*x) - x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(2)*a*asinh(a*x)**S(2)) - S(3)*x**S(2)/(S(2)*a**S(2)*asinh(a*x)) - SinhIntegral(S(2)*asinh(a*x))/(S(2)*a**S(4)) + SinhIntegral(S(4)*asinh(a*x))/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asinh(a*x)**S(3), x), x, -S(3)*x**S(3)/(S(2)*asinh(a*x)) - x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(2)*a*asinh(a*x)**S(2)) - x/(a**S(2)*asinh(a*x)) - CoshIntegral(asinh(a*x))/(S(8)*a**S(3)) + S(9)*CoshIntegral(S(3)*asinh(a*x))/(S(8)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asinh(a*x)**S(3), x), x, -x**S(2)/asinh(a*x) - x*sqrt(a**S(2)*x**S(2) + S(1))/(S(2)*a*asinh(a*x)**S(2)) + SinhIntegral(S(2)*asinh(a*x))/a**S(2) - S(1)/(S(2)*a**S(2)*asinh(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(-3)), x), x, -x/(S(2)*asinh(a*x)) - sqrt(a**S(2)*x**S(2) + S(1))/(S(2)*a*asinh(a*x)**S(2)) + CoshIntegral(asinh(a*x))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asinh(a*x)**S(3)), x), x, Integrate(S(1)/(x*asinh(a*x)**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*asinh(a*x)**S(3)), x), x, Integrate(S(1)/(x**S(2)*asinh(a*x)**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asinh(a*x)**S(4), x), x, -S(5)*x**S(5)/(S(6)*asinh(a*x)**S(2)) - S(25)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))/(S(6)*a*asinh(a*x)) - x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**S(3)) - S(2)*x**S(3)/(S(3)*a**S(2)*asinh(a*x)**S(2)) - S(2)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(a**S(3)*asinh(a*x)) + SinhIntegral(asinh(a*x))/(S(48)*a**S(5)) - S(27)*SinhIntegral(S(3)*asinh(a*x))/(S(32)*a**S(5)) + S(125)*SinhIntegral(S(5)*asinh(a*x))/(S(96)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asinh(a*x)**S(4), x), x, -S(2)*x**S(4)/(S(3)*asinh(a*x)**S(2)) - S(8)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)) - x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**S(3)) - x**S(2)/(S(2)*a**S(2)*asinh(a*x)**S(2)) - x*sqrt(a**S(2)*x**S(2) + S(1))/(a**S(3)*asinh(a*x)) - CoshIntegral(S(2)*asinh(a*x))/(S(3)*a**S(4)) + S(4)*CoshIntegral(S(4)*asinh(a*x))/(S(3)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asinh(a*x)**S(4), x), x, -x**S(3)/(S(2)*asinh(a*x)**S(2)) - S(3)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(2)*a*asinh(a*x)) - x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**S(3)) - x/(S(3)*a**S(2)*asinh(a*x)**S(2)) - sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a**S(3)*asinh(a*x)) - SinhIntegral(asinh(a*x))/(S(24)*a**S(3)) + S(9)*SinhIntegral(S(3)*asinh(a*x))/(S(8)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asinh(a*x)**S(4), x), x, -x**S(2)/(S(3)*asinh(a*x)**S(2)) - S(2)*x*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)) - x*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**S(3)) + S(2)*CoshIntegral(S(2)*asinh(a*x))/(S(3)*a**S(2)) - S(1)/(S(6)*a**S(2)*asinh(a*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(-4)), x), x, -x/(S(6)*asinh(a*x)**S(2)) - sqrt(a**S(2)*x**S(2) + S(1))/(S(6)*a*asinh(a*x)) - sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**S(3)) + SinhIntegral(asinh(a*x))/(S(6)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asinh(a*x)**S(4)), x), x, Integrate(S(1)/(x*asinh(a*x)**S(4)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*asinh(a*x)**S(4)), x), x, Integrate(S(1)/(x**S(2)*asinh(a*x)**S(4)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(asinh(a*x)), x), x, -sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(192)*a**S(5)) + sqrt(S(5))*sqrt(Pi)*Erf(sqrt(S(5))*sqrt(asinh(a*x)))/(S(1600)*a**S(5)) + sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(32)*a**S(5)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(192)*a**S(5)) - sqrt(S(5))*sqrt(Pi)*Erfi(sqrt(S(5))*sqrt(asinh(a*x)))/(S(1600)*a**S(5)) - sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(32)*a**S(5)) + x**S(5)*sqrt(asinh(a*x))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(asinh(a*x)), x), x, sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(64)*a**S(4)) - sqrt(Pi)*Erf(S(2)*sqrt(asinh(a*x)))/(S(256)*a**S(4)) + sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(64)*a**S(4)) - sqrt(Pi)*Erfi(S(2)*sqrt(asinh(a*x)))/(S(256)*a**S(4)) + x**S(4)*sqrt(asinh(a*x))/S(4) - S(3)*sqrt(asinh(a*x))/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(asinh(a*x)), x), x, sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(144)*a**S(3)) - sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(16)*a**S(3)) - sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(144)*a**S(3)) + sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(16)*a**S(3)) + x**S(3)*sqrt(asinh(a*x))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(asinh(a*x)), x), x, -sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(32)*a**S(2)) - sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(32)*a**S(2)) + x**S(2)*sqrt(asinh(a*x))/S(2) + sqrt(asinh(a*x))/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(asinh(a*x)), x), x, sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(4)*a) - sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(4)*a) + x*sqrt(asinh(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(asinh(a*x))/x, x), x, Integrate(sqrt(asinh(a*x))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asinh(a*x)**(S(3)/2), x), x, -sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(384)*a**S(5)) + S(3)*sqrt(S(5))*sqrt(Pi)*Erf(sqrt(S(5))*sqrt(asinh(a*x)))/(S(16000)*a**S(5)) + S(3)*sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(64)*a**S(5)) - sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(384)*a**S(5)) + S(3)*sqrt(S(5))*sqrt(Pi)*Erfi(sqrt(S(5))*sqrt(asinh(a*x)))/(S(16000)*a**S(5)) + S(3)*sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(64)*a**S(5)) + x**S(5)*asinh(a*x)**(S(3)/2)/S(5) - S(3)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(50)*a) + S(2)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(25)*a**S(3)) - S(4)*sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(25)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asinh(a*x)**(S(3)/2), x), x, S(3)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(256)*a**S(4)) - S(3)*sqrt(Pi)*Erf(S(2)*sqrt(asinh(a*x)))/(S(2048)*a**S(4)) - S(3)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(256)*a**S(4)) + S(3)*sqrt(Pi)*Erfi(S(2)*sqrt(asinh(a*x)))/(S(2048)*a**S(4)) + x**S(4)*asinh(a*x)**(S(3)/2)/S(4) - S(3)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(32)*a) + S(9)*x*sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(64)*a**S(3)) - S(3)*asinh(a*x)**(S(3)/2)/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asinh(a*x)**(S(3)/2), x), x, sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(288)*a**S(3)) - S(3)*sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(32)*a**S(3)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(288)*a**S(3)) - S(3)*sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(32)*a**S(3)) + x**S(3)*asinh(a*x)**(S(3)/2)/S(3) - x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(6)*a) + sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(3)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asinh(a*x)**(S(3)/2), x), x, -S(3)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(128)*a**S(2)) + S(3)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(128)*a**S(2)) + x**S(2)*asinh(a*x)**(S(3)/2)/S(2) - S(3)*x*sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(8)*a) + asinh(a*x)**(S(3)/2)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(3)/2), x), x, S(3)*sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(8)*a) + S(3)*sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(8)*a) + x*asinh(a*x)**(S(3)/2) - S(3)*sqrt(a**S(2)*x**S(2) + S(1))*sqrt(asinh(a*x))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(3)/2)/x, x), x, Integrate(asinh(a*x)**(S(3)/2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asinh(a*x)**(S(5)/2), x), x, -S(5)*sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(2304)*a**S(5)) + S(3)*sqrt(S(5))*sqrt(Pi)*Erf(sqrt(S(5))*sqrt(asinh(a*x)))/(S(32000)*a**S(5)) + S(15)*sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(128)*a**S(5)) + S(5)*sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(2304)*a**S(5)) - S(3)*sqrt(S(5))*sqrt(Pi)*Erfi(sqrt(S(5))*sqrt(asinh(a*x)))/(S(32000)*a**S(5)) - S(15)*sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(128)*a**S(5)) + x**S(5)*asinh(a*x)**(S(5)/2)/S(5) + S(3)*x**S(5)*sqrt(asinh(a*x))/S(100) - x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(10)*a) - x**S(3)*sqrt(asinh(a*x))/(S(15)*a**S(2)) + S(2)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(15)*a**S(3)) + S(2)*x*sqrt(asinh(a*x))/(S(5)*a**S(4)) - S(4)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(15)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asinh(a*x)**(S(5)/2), x), x, S(15)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(1024)*a**S(4)) - S(15)*sqrt(Pi)*Erf(S(2)*sqrt(asinh(a*x)))/(S(16384)*a**S(4)) + S(15)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(1024)*a**S(4)) - S(15)*sqrt(Pi)*Erfi(S(2)*sqrt(asinh(a*x)))/(S(16384)*a**S(4)) + x**S(4)*asinh(a*x)**(S(5)/2)/S(4) + S(15)*x**S(4)*sqrt(asinh(a*x))/S(256) - S(5)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(32)*a) - S(45)*x**S(2)*sqrt(asinh(a*x))/(S(256)*a**S(2)) + S(15)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(64)*a**S(3)) - S(3)*asinh(a*x)**(S(5)/2)/(S(32)*a**S(4)) - S(225)*sqrt(asinh(a*x))/(S(2048)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asinh(a*x)**(S(5)/2), x), x, S(5)*sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(1728)*a**S(3)) - S(15)*sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(64)*a**S(3)) - S(5)*sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(1728)*a**S(3)) + S(15)*sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(64)*a**S(3)) + x**S(3)*asinh(a*x)**(S(5)/2)/S(3) + S(5)*x**S(3)*sqrt(asinh(a*x))/S(36) - S(5)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(18)*a) - S(5)*x*sqrt(asinh(a*x))/(S(6)*a**S(2)) + S(5)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(9)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asinh(a*x)**(S(5)/2), x), x, -S(15)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(512)*a**S(2)) - S(15)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(512)*a**S(2)) + x**S(2)*asinh(a*x)**(S(5)/2)/S(2) + S(15)*x**S(2)*sqrt(asinh(a*x))/S(32) - S(5)*x*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(8)*a) + asinh(a*x)**(S(5)/2)/(S(4)*a**S(2)) + S(15)*sqrt(asinh(a*x))/(S(64)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(5)/2), x), x, S(15)*sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(16)*a) - S(15)*sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(16)*a) + x*asinh(a*x)**(S(5)/2) + S(15)*x*sqrt(asinh(a*x))/S(4) - S(5)*sqrt(a**S(2)*x**S(2) + S(1))*asinh(a*x)**(S(3)/2)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(5)/2)/x, x), x, Integrate(asinh(a*x)**(S(5)/2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(asinh(a*x)), x), x, -sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(32)*a**S(5)) + sqrt(S(5))*sqrt(Pi)*Erf(sqrt(S(5))*sqrt(asinh(a*x)))/(S(160)*a**S(5)) + sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(16)*a**S(5)) - sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(32)*a**S(5)) + sqrt(S(5))*sqrt(Pi)*Erfi(sqrt(S(5))*sqrt(asinh(a*x)))/(S(160)*a**S(5)) + sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(16)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(asinh(a*x)), x), x, sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(16)*a**S(4)) - sqrt(Pi)*Erf(S(2)*sqrt(asinh(a*x)))/(S(32)*a**S(4)) - sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(16)*a**S(4)) + sqrt(Pi)*Erfi(S(2)*sqrt(asinh(a*x)))/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(asinh(a*x)), x), x, sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(24)*a**S(3)) - sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(8)*a**S(3)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(24)*a**S(3)) - sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(8)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(asinh(a*x)), x), x, -sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(8)*a**S(2)) + sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(8)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(asinh(a*x)), x), x, sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(2)*a) + sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(asinh(a*x))), x), x, Integrate(S(1)/(x*sqrt(asinh(a*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(asinh(a*x))), x), x, Integrate(S(1)/(x**S(2)*sqrt(asinh(a*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asinh(a*x)**(S(3)/2), x), x, S(3)*sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(16)*a**S(5)) - sqrt(S(5))*sqrt(Pi)*Erf(sqrt(S(5))*sqrt(asinh(a*x)))/(S(16)*a**S(5)) - sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(8)*a**S(5)) - S(3)*sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(16)*a**S(5)) + sqrt(S(5))*sqrt(Pi)*Erfi(sqrt(S(5))*sqrt(asinh(a*x)))/(S(16)*a**S(5)) + sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(8)*a**S(5)) - S(2)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))/(a*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asinh(a*x)**(S(3)/2), x), x, -sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(4)*a**S(4)) + sqrt(Pi)*Erf(S(2)*sqrt(asinh(a*x)))/(S(4)*a**S(4)) - sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(4)*a**S(4)) + sqrt(Pi)*Erfi(S(2)*sqrt(asinh(a*x)))/(S(4)*a**S(4)) - S(2)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(a*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asinh(a*x)**(S(3)/2), x), x, -sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(4)*a**S(3)) + sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(4)*a**S(3)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(4)*a**S(3)) - sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(4)*a**S(3)) - S(2)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(a*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asinh(a*x)**(S(3)/2), x), x, sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(2)*a**S(2)) + sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(2)*a**S(2)) - S(2)*x*sqrt(a**S(2)*x**S(2) + S(1))/(a*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(-3)/2), x), x, -sqrt(Pi)*Erf(sqrt(asinh(a*x)))/a + sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/a - S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(a*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asinh(a*x)**(S(3)/2)), x), x, Integrate(S(1)/(x*asinh(a*x)**(S(3)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asinh(a*x)**(S(5)/2), x), x, -S(3)*sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(8)*a**S(5)) + S(5)*sqrt(S(5))*sqrt(Pi)*Erf(sqrt(S(5))*sqrt(asinh(a*x)))/(S(24)*a**S(5)) + sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(12)*a**S(5)) - S(3)*sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(8)*a**S(5)) + S(5)*sqrt(S(5))*sqrt(Pi)*Erfi(sqrt(S(5))*sqrt(asinh(a*x)))/(S(24)*a**S(5)) + sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(12)*a**S(5)) - S(20)*x**S(5)/(S(3)*sqrt(asinh(a*x))) - S(2)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**(S(3)/2)) - S(16)*x**S(3)/(S(3)*a**S(2)*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asinh(a*x)**(S(5)/2), x), x, sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(3)*a**S(4)) - S(2)*sqrt(Pi)*Erf(S(2)*sqrt(asinh(a*x)))/(S(3)*a**S(4)) - sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(3)*a**S(4)) + S(2)*sqrt(Pi)*Erfi(S(2)*sqrt(asinh(a*x)))/(S(3)*a**S(4)) - S(16)*x**S(4)/(S(3)*sqrt(asinh(a*x))) - S(2)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**(S(3)/2)) - S(4)*x**S(2)/(a**S(2)*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asinh(a*x)**(S(5)/2), x), x, sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(2)*a**S(3)) - sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(6)*a**S(3)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(2)*a**S(3)) - sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(6)*a**S(3)) - S(4)*x**S(3)/sqrt(asinh(a*x)) - S(2)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**(S(3)/2)) - S(8)*x/(S(3)*a**S(2)*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asinh(a*x)**(S(5)/2), x), x, -S(2)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(3)*a**S(2)) + S(2)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(3)*a**S(2)) - S(8)*x**S(2)/(S(3)*sqrt(asinh(a*x))) - S(2)*x*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**(S(3)/2)) - S(4)/(S(3)*a**S(2)*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(-5)/2), x), x, S(2)*sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(3)*a) + S(2)*sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(3)*a) - S(4)*x/(S(3)*sqrt(asinh(a*x))) - S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*asinh(a*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asinh(a*x)**(S(5)/2)), x), x, Integrate(S(1)/(x*asinh(a*x)**(S(5)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asinh(a*x)**(S(7)/2), x), x, S(9)*sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(20)*a**S(5)) - S(5)*sqrt(S(5))*sqrt(Pi)*Erf(sqrt(S(5))*sqrt(asinh(a*x)))/(S(12)*a**S(5)) - sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(30)*a**S(5)) - S(9)*sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(20)*a**S(5)) + S(5)*sqrt(S(5))*sqrt(Pi)*Erfi(sqrt(S(5))*sqrt(asinh(a*x)))/(S(12)*a**S(5)) + sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(30)*a**S(5)) - S(4)*x**S(5)/(S(3)*asinh(a*x)**(S(3)/2)) - S(40)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))/(S(3)*a*sqrt(asinh(a*x))) - S(2)*x**S(4)*sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a*asinh(a*x)**(S(5)/2)) - S(16)*x**S(3)/(S(15)*a**S(2)*asinh(a*x)**(S(3)/2)) - S(32)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a**S(3)*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asinh(a*x)**(S(7)/2), x), x, -S(4)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(15)*a**S(4)) + S(16)*sqrt(Pi)*Erf(S(2)*sqrt(asinh(a*x)))/(S(15)*a**S(4)) - S(4)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(15)*a**S(4)) + S(16)*sqrt(Pi)*Erfi(S(2)*sqrt(asinh(a*x)))/(S(15)*a**S(4)) - S(16)*x**S(4)/(S(15)*asinh(a*x)**(S(3)/2)) - S(128)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(15)*a*sqrt(asinh(a*x))) - S(2)*x**S(3)*sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a*asinh(a*x)**(S(5)/2)) - S(4)*x**S(2)/(S(5)*a**S(2)*asinh(a*x)**(S(3)/2)) - S(16)*x*sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a**S(3)*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asinh(a*x)**(S(7)/2), x), x, -S(3)*sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(asinh(a*x)))/(S(5)*a**S(3)) + sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(15)*a**S(3)) + S(3)*sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(asinh(a*x)))/(S(5)*a**S(3)) - sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(15)*a**S(3)) - S(4)*x**S(3)/(S(5)*asinh(a*x)**(S(3)/2)) - S(24)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a*sqrt(asinh(a*x))) - S(2)*x**S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a*asinh(a*x)**(S(5)/2)) - S(8)*x/(S(15)*a**S(2)*asinh(a*x)**(S(3)/2)) - S(16)*sqrt(a**S(2)*x**S(2) + S(1))/(S(15)*a**S(3)*sqrt(asinh(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asinh(a*x)**(S(7)/2), x), x, S(8)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(asinh(a*x)))/(S(15)*a**S(2)) + S(8)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(asinh(a*x)))/(S(15)*a**S(2)) - S(8)*x**S(2)/(S(15)*asinh(a*x)**(S(3)/2)) - S(32)*x*sqrt(a**S(2)*x**S(2) + S(1))/(S(15)*a*sqrt(asinh(a*x))) - S(2)*x*sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a*asinh(a*x)**(S(5)/2)) - S(4)/(S(15)*a**S(2)*asinh(a*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**(S(-7)/2), x), x, -S(4)*sqrt(Pi)*Erf(sqrt(asinh(a*x)))/(S(15)*a) + S(4)*sqrt(Pi)*Erfi(sqrt(asinh(a*x)))/(S(15)*a) - S(4)*x/(S(15)*asinh(a*x)**(S(3)/2)) - S(8)*sqrt(a**S(2)*x**S(2) + S(1))/(S(15)*a*sqrt(asinh(a*x))) - S(2)*sqrt(a**S(2)*x**S(2) + S(1))/(S(5)*a*asinh(a*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asinh(a*x)**(S(7)/2)), x), x, Integrate(S(1)/(x*asinh(a*x)**(S(7)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*asinh(a*x)**S(4), x), x, -S(4)*a*Integrate(x**(m + S(1))*asinh(a*x)**S(3)/sqrt(a**S(2)*x**S(2) + S(1)), x)/(m + S(1)) + x**(m + S(1))*asinh(a*x)**S(4)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*asinh(a*x)**S(3), x), x, -S(3)*a*Integrate(x**(m + S(1))*asinh(a*x)**S(2)/sqrt(a**S(2)*x**S(2) + S(1)), x)/(m + S(1)) + x**(m + S(1))*asinh(a*x)**S(3)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*asinh(a*x)**S(2), x), x, S(2)*a**S(2)*x**(m + S(3))*HypergeometricPFQ(List(S(1), m/S(2) + S(3)/2, m/S(2) + S(3)/2), List(m/S(2) + S(2), m/S(2) + S(5)/2), -a**S(2)*x**S(2))/(m**S(3) + S(6)*m**S(2) + S(11)*m + S(6)) - S(2)*a*x**(m + S(2))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1), m/S(2) + S(2), -a**S(2)*x**S(2))*asinh(a*x)/(m**S(2) + S(3)*m + S(2)) + x**(m + S(1))*asinh(a*x)**S(2)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*asinh(a*x), x), x, -a*x**(m + S(2))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1), m/S(2) + S(2), -a**S(2)*x**S(2))/(m**S(2) + S(3)*m + S(2)) + x**(m + S(1))*asinh(a*x)/(m + S(1)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/asinh(a*x), x), x, Integrate(x**m/asinh(a*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/asinh(a*x)**S(2), x), x, Integrate(x**m/asinh(a*x)**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*asinh(a*x)**(S(5)/2), x), x, Integrate(x**m*asinh(a*x)**(S(5)/2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*asinh(a*x)**(S(3)/2), x), x, Integrate(x**m*asinh(a*x)**(S(3)/2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sqrt(asinh(a*x)), x), x, Integrate(x**m*sqrt(asinh(a*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/sqrt(asinh(a*x)), x), x, Integrate(x**m/sqrt(asinh(a*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m/asinh(a*x)**(S(3)/2), x), x, Integrate(x**m/asinh(a*x)**(S(3)/2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m*asinh(a*x)**n, x), x, Integrate((b*x)**m*asinh(a*x)**n, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asinh(a*x)**n, x), x, -S(5)**(-n + S(-1))*Gamma(n + S(1), S(5)*asinh(a*x))/(S(32)*a**S(5)) + S(5)**(-n + S(-1))*(-asinh(a*x))**(-n)*Gamma(n + S(1), -S(5)*asinh(a*x))*asinh(a*x)**n/(S(32)*a**S(5)) - Gamma(n + S(1), asinh(a*x))/(S(16)*a**S(5)) + (-asinh(a*x))**(-n)*Gamma(n + S(1), -asinh(a*x))*asinh(a*x)**n/(S(16)*a**S(5)) + S(3)**(-n)*Gamma(n + S(1), S(3)*asinh(a*x))/(S(32)*a**S(5)) - S(3)**(-n)*(-asinh(a*x))**(-n)*Gamma(n + S(1), -S(3)*asinh(a*x))*asinh(a*x)**n/(S(32)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asinh(a*x)**n, x), x, -S(3)**(-n + S(-1))*Gamma(n + S(1), S(3)*asinh(a*x))/(S(8)*a**S(3)) + S(3)**(-n + S(-1))*(-asinh(a*x))**(-n)*Gamma(n + S(1), -S(3)*asinh(a*x))*asinh(a*x)**n/(S(8)*a**S(3)) + Gamma(n + S(1), asinh(a*x))/(S(8)*a**S(3)) - (-asinh(a*x))**(-n)*Gamma(n + S(1), -asinh(a*x))*asinh(a*x)**n/(S(8)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asinh(a*x)**n, x), x, S(2)**(-n + S(-3))*Gamma(n + S(1), S(2)*asinh(a*x))/a**S(2) + S(2)**(-n + S(-3))*(-asinh(a*x))**(-n)*Gamma(n + S(1), -S(2)*asinh(a*x))*asinh(a*x)**n/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**n, x), x, -Gamma(n + S(1), asinh(a*x))/(S(2)*a) + (-asinh(a*x))**(-n)*Gamma(n + S(1), -asinh(a*x))*asinh(a*x)**n/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**n/x, x), x, Integrate(asinh(a*x)**n/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asinh(a*x)**n/x**S(2), x), x, Integrate(asinh(a*x)**n/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a + b*asinh(c*x)), x), x, -sqrt(Pi)*sqrt(b)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(16)*c**S(3)) + sqrt(S(3))*sqrt(Pi)*sqrt(b)*Erf(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(3)*a/b)/(S(144)*c**S(3)) + sqrt(Pi)*sqrt(b)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(16)*c**S(3)) - sqrt(S(3))*sqrt(Pi)*sqrt(b)*Erfi(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(3)*a/b)/(S(144)*c**S(3)) + x**S(3)*sqrt(a + b*asinh(c*x))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*asinh(c*x)), x), x, -sqrt(S(2))*sqrt(Pi)*sqrt(b)*Erf(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(2)*a/b)/(S(32)*c**S(2)) - sqrt(S(2))*sqrt(Pi)*sqrt(b)*Erfi(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(2)*a/b)/(S(32)*c**S(2)) + x**S(2)*sqrt(a + b*asinh(c*x))/S(2) + sqrt(a + b*asinh(c*x))/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*asinh(c*x)), x), x, sqrt(Pi)*sqrt(b)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(4)*c) - sqrt(Pi)*sqrt(b)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(4)*c) + x*sqrt(a + b*asinh(c*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*asinh(c*x))**(S(3)/2), x), x, -S(3)*sqrt(Pi)*b**(S(3)/2)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(32)*c**S(3)) + sqrt(S(3))*sqrt(Pi)*b**(S(3)/2)*Erf(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(3)*a/b)/(S(288)*c**S(3)) - S(3)*sqrt(Pi)*b**(S(3)/2)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(32)*c**S(3)) + sqrt(S(3))*sqrt(Pi)*b**(S(3)/2)*Erfi(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(3)*a/b)/(S(288)*c**S(3)) - b*x**S(2)*sqrt(a + b*asinh(c*x))*sqrt(c**S(2)*x**S(2) + S(1))/(S(6)*c) + b*sqrt(a + b*asinh(c*x))*sqrt(c**S(2)*x**S(2) + S(1))/(S(3)*c**S(3)) + x**S(3)*(a + b*asinh(c*x))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*asinh(c*x))**(S(3)/2), x), x, -S(3)*sqrt(S(2))*sqrt(Pi)*b**(S(3)/2)*Erf(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(2)*a/b)/(S(128)*c**S(2)) + S(3)*sqrt(S(2))*sqrt(Pi)*b**(S(3)/2)*Erfi(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(2)*a/b)/(S(128)*c**S(2)) - S(3)*b*x*sqrt(a + b*asinh(c*x))*sqrt(c**S(2)*x**S(2) + S(1))/(S(8)*c) + x**S(2)*(a + b*asinh(c*x))**(S(3)/2)/S(2) + (a + b*asinh(c*x))**(S(3)/2)/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asinh(c*x))**(S(3)/2), x), x, S(3)*sqrt(Pi)*b**(S(3)/2)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(8)*c) + S(3)*sqrt(Pi)*b**(S(3)/2)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(8)*c) - S(3)*b*sqrt(a + b*asinh(c*x))*sqrt(c**S(2)*x**S(2) + S(1))/(S(2)*c) + x*(a + b*asinh(c*x))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*asinh(c*x))**(S(5)/2), x), x, -S(15)*sqrt(Pi)*b**(S(5)/2)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(64)*c**S(3)) + S(5)*sqrt(S(3))*sqrt(Pi)*b**(S(5)/2)*Erf(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(3)*a/b)/(S(1728)*c**S(3)) + S(15)*sqrt(Pi)*b**(S(5)/2)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(64)*c**S(3)) - S(5)*sqrt(S(3))*sqrt(Pi)*b**(S(5)/2)*Erfi(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(3)*a/b)/(S(1728)*c**S(3)) + S(5)*b**S(2)*x**S(3)*sqrt(a + b*asinh(c*x))/S(36) - S(5)*b**S(2)*x*sqrt(a + b*asinh(c*x))/(S(6)*c**S(2)) - S(5)*b*x**S(2)*(a + b*asinh(c*x))**(S(3)/2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(18)*c) + S(5)*b*(a + b*asinh(c*x))**(S(3)/2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(9)*c**S(3)) + x**S(3)*(a + b*asinh(c*x))**(S(5)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*asinh(c*x))**(S(5)/2), x), x, -S(15)*sqrt(S(2))*sqrt(Pi)*b**(S(5)/2)*Erf(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(2)*a/b)/(S(512)*c**S(2)) - S(15)*sqrt(S(2))*sqrt(Pi)*b**(S(5)/2)*Erfi(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(2)*a/b)/(S(512)*c**S(2)) + S(15)*b**S(2)*x**S(2)*sqrt(a + b*asinh(c*x))/S(32) + S(15)*b**S(2)*sqrt(a + b*asinh(c*x))/(S(64)*c**S(2)) - S(5)*b*x*(a + b*asinh(c*x))**(S(3)/2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(8)*c) + x**S(2)*(a + b*asinh(c*x))**(S(5)/2)/S(2) + (a + b*asinh(c*x))**(S(5)/2)/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asinh(c*x))**(S(5)/2), x), x, S(15)*sqrt(Pi)*b**(S(5)/2)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(16)*c) - S(15)*sqrt(Pi)*b**(S(5)/2)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(16)*c) + S(15)*b**S(2)*x*sqrt(a + b*asinh(c*x))/S(4) - S(5)*b*(a + b*asinh(c*x))**(S(3)/2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(2)*c) + x*(a + b*asinh(c*x))**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*asinh(c*x)), x), x, -sqrt(Pi)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(8)*sqrt(b)*c**S(3)) + sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(3)*a/b)/(S(24)*sqrt(b)*c**S(3)) - sqrt(Pi)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(8)*sqrt(b)*c**S(3)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(3)*a/b)/(S(24)*sqrt(b)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*asinh(c*x)), x), x, -sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(2)*a/b)/(S(8)*sqrt(b)*c**S(2)) + sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(2)*a/b)/(S(8)*sqrt(b)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*asinh(c*x)), x), x, sqrt(Pi)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(2)*sqrt(b)*c) + sqrt(Pi)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(2)*sqrt(b)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*asinh(c*x))**(S(3)/2), x), x, sqrt(Pi)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(4)*b**(S(3)/2)*c**S(3)) - sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(3)*a/b)/(S(4)*b**(S(3)/2)*c**S(3)) - sqrt(Pi)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(4)*b**(S(3)/2)*c**S(3)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(3)*a/b)/(S(4)*b**(S(3)/2)*c**S(3)) - S(2)*x**S(2)*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*asinh(c*x))**(S(3)/2), x), x, sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(2)*a/b)/(S(2)*b**(S(3)/2)*c**S(2)) + sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(2)*a/b)/(S(2)*b**(S(3)/2)*c**S(2)) - S(2)*x*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asinh(c*x))**(S(-3)/2), x), x, -sqrt(Pi)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(b**(S(3)/2)*c) + sqrt(Pi)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(b**(S(3)/2)*c) - S(2)*sqrt(c**S(2)*x**S(2) + S(1))/(b*c*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*asinh(c*x))**(S(5)/2), x), x, -sqrt(Pi)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(6)*b**(S(5)/2)*c**S(3)) + sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(3)*a/b)/(S(2)*b**(S(5)/2)*c**S(3)) - sqrt(Pi)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(6)*b**(S(5)/2)*c**S(3)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(3)*a/b)/(S(2)*b**(S(5)/2)*c**S(3)) - S(2)*x**S(2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(3)*b*c*(a + b*asinh(c*x))**(S(3)/2)) - S(4)*x**S(3)/(b**S(2)*sqrt(a + b*asinh(c*x))) - S(8)*x/(S(3)*b**S(2)*c**S(2)*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*asinh(c*x))**(S(5)/2), x), x, -S(2)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(2)*a/b)/(S(3)*b**(S(5)/2)*c**S(2)) + S(2)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(2)*a/b)/(S(3)*b**(S(5)/2)*c**S(2)) - S(2)*x*sqrt(c**S(2)*x**S(2) + S(1))/(S(3)*b*c*(a + b*asinh(c*x))**(S(3)/2)) - S(8)*x**S(2)/(S(3)*b**S(2)*sqrt(a + b*asinh(c*x))) - S(4)/(S(3)*b**S(2)*c**S(2)*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asinh(c*x))**(S(-5)/2), x), x, S(2)*sqrt(Pi)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(3)*b**(S(5)/2)*c) + S(2)*sqrt(Pi)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(3)*b**(S(5)/2)*c) - S(2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(3)*b*c*(a + b*asinh(c*x))**(S(3)/2)) - S(4)*x/(S(3)*b**S(2)*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*asinh(c*x))**(S(7)/2), x), x, sqrt(Pi)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(15)*b**(S(7)/2)*c**S(3)) - S(3)*sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(3)*a/b)/(S(5)*b**(S(7)/2)*c**S(3)) - sqrt(Pi)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(15)*b**(S(7)/2)*c**S(3)) + S(3)*sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(3)*a/b)/(S(5)*b**(S(7)/2)*c**S(3)) - S(2)*x**S(2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(5)*b*c*(a + b*asinh(c*x))**(S(5)/2)) - S(4)*x**S(3)/(S(5)*b**S(2)*(a + b*asinh(c*x))**(S(3)/2)) - S(8)*x/(S(15)*b**S(2)*c**S(2)*(a + b*asinh(c*x))**(S(3)/2)) - S(24)*x**S(2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(5)*b**S(3)*c*sqrt(a + b*asinh(c*x))) - S(16)*sqrt(c**S(2)*x**S(2) + S(1))/(S(15)*b**S(3)*c**S(3)*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*asinh(c*x))**(S(7)/2), x), x, S(8)*sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(S(2)*a/b)/(S(15)*b**(S(7)/2)*c**S(2)) + S(8)*sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-S(2)*a/b)/(S(15)*b**(S(7)/2)*c**S(2)) - S(2)*x*sqrt(c**S(2)*x**S(2) + S(1))/(S(5)*b*c*(a + b*asinh(c*x))**(S(5)/2)) - S(8)*x**S(2)/(S(15)*b**S(2)*(a + b*asinh(c*x))**(S(3)/2)) - S(4)/(S(15)*b**S(2)*c**S(2)*(a + b*asinh(c*x))**(S(3)/2)) - S(32)*x*sqrt(c**S(2)*x**S(2) + S(1))/(S(15)*b**S(3)*c*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asinh(c*x))**(S(-7)/2), x), x, -S(4)*sqrt(Pi)*Erf(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(a/b)/(S(15)*b**(S(7)/2)*c) + S(4)*sqrt(Pi)*Erfi(sqrt(a + b*asinh(c*x))/sqrt(b))*exp(-a/b)/(S(15)*b**(S(7)/2)*c) - S(2)*sqrt(c**S(2)*x**S(2) + S(1))/(S(5)*b*c*(a + b*asinh(c*x))**(S(5)/2)) - S(4)*x/(S(15)*b**S(2)*(a + b*asinh(c*x))**(S(3)/2)) - S(8)*sqrt(c**S(2)*x**S(2) + S(1))/(S(15)*b**S(3)*c*sqrt(a + b*asinh(c*x))), expand=True, _diff=True, _numerical=True)
5c90e023c74df11ad1a25776c7d8cb191ce74c774890e153e6fea938fe6e941b
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.rubi import rubi_integrate from sympy.functions import log, sqrt, exp, cos, sin, tan, sec, csc, cot from sympy.functions.elementary.hyperbolic import atanh as arctanh from sympy.functions.elementary.hyperbolic import asinh as arcsinh from sympy.functions.elementary.hyperbolic import acosh as arccosh from sympy.functions.elementary.trigonometric import atan as arctan from sympy.functions.elementary.trigonometric import asin as arcsin from sympy.functions.elementary.trigonometric import acos as arccos from sympy.integrals.rubi.utility_function import EllipticE, EllipticF, EllipticPi, hypergeom, rubi_test, AppellF1 from sympy.core.numbers import (I, pi as Pi) from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import exp_polar from sympy.functions.special.hyper import hyper from sympy.integrals.integrals import Integral from sympy.simplify.simplify import simplify from sympy.testing.pytest import XFAIL A, B, C, D, a, b, c, d, e, f, g, h, i, m, n, p, x, u = symbols('A B C D a b c d e f g h i m n p x u') def test_1(): ''' Tests for Rubi Algebraic 1.2 rules. Parsed from Maple syntax All tests: http://www.apmaths.uwo.ca/~arich/IntegrationProblems/MapleSyntaxFiles/MapleSyntaxFiles.html Note: Some tests are commented since they depend rules other than Algebraic1.2. ''' test = [ [(a + b*x)**S(2)*(e + f*x)*sqrt(c + d*x)/x, x, S(5), S(2)/S(7)*f*(a + b*x)**S(2)*(c + d*x)**(S(3)/S(2))/d + S(2)/S(105)*(c + d*x)**(S(3)/S(2))*(S(2)*(S(10)*a**S(2)*d**S(2)*f - b**S(2)*c*(S(7)*d*e - S(4)*c*f) + S(7)*a*b*d*(S(5)*d*e - S(2)*c*f)) + S(3)*b*d*(S(7)*b*d*e - S(4)*b*c*f + S(4)*a*d*f)*x)/d**S(3) - S(2)*a**S(2)*e*arctanh(sqrt(c + d*x)/sqrt(c))*sqrt(c) + S(2)*a**S(2)*e*sqrt(c + d*x)], [(a + b*x)*(e + f*x)*sqrt(c + d*x)/x, x, S(4), - S(2)/S(15)*(c + d*x)**(S(3)/S(2))*(S(2)*b*c*f - S(5)*d*(b*e + a*f) - S(3)*b*d*f*x)/d**S(2) - S(2)*a*e*arctanh(sqrt(c + d*x)/sqrt(c))*sqrt(c) + S(2)*a*e*sqrt(c + d*x)], [(c + d*x)**S(2)*(e + f*x)*sqrt(a + b*x)/x, x, S(5), S(2)/S(7)*f*(a + b*x)**(S(3)/S(2))*(c + d*x)**S(2)/b + S(2)/S(105)*(a + b*x)**(S(3)/S(2))*(S(2)*(S(4)*a**S(2)*d**S(2)*f - S(7)*a*b*d*(d*e + S(2)*c*f) + S(5)*b**S(2)*c*(S(7)*d*e + S(2)*c*f)) + S(3)*b*d*(S(7)*b*d*e + S(4)*b*c*f - S(4)*a*d*f)*x)/b**S(3) - S(2)*c**S(2)*e*arctanh(sqrt(a + b*x)/sqrt(a))*sqrt(a) + S(2)*c**S(2)*e*sqrt(a + b*x)], [(c + d*x)*(e + f*x)*sqrt(a + b*x)/x, x, S(4), - S(2)/S(15)*(a + b*x)**(S(3)/S(2))*(S(2)*a*d*f - S(5)*b*(d*e + c*f) - S(3)*b*d*f*x)/b**S(2) - S(2)*c*e*arctanh(sqrt(a + b*x)/sqrt(a))*sqrt(a) + S(2)*c*e*sqrt(a + b*x)], [x**S(4)*(e + f*x)**n/((a + b*x)*(c + d*x)), x, S(8), e**S(2)*(e + f*x)**(S(1) + n)/(b*d*f**S(3)*(S(1) + n)) + (b*c + a*d)*e*(e + f*x)**(S(1) + n)/(b**S(2)*d**S(2)*f**S(2)*(S(1) + n)) + (b**S(2)*c**S(2) + a*b*c*d + a**S(2)*d**S(2))*(e + f*x)**(S(1) + n)/(b**S(3)*d**S(3)*f*(S(1) + n)) - S(2)*e*(e + f*x)**(S(2) + n)/(b*d*f**S(3)*(S(2) + n)) - (b*c + a*d)*(e + f*x)**(S(2) + n)/(b**S(2)*d**S(2)*f**S(2)*(S(2) + n)) + (e + f*x)**(S(3) + n)/(b*d*f**S(3)*(S(3) + n)) - a**S(4)*(e + f*x)**(S(1) + n)*hypergeom([S(1), S(1) + n], [S(2) + n], b*(e + f*x)/(b*e - a*f))/(b**S(3)*(b*c - a*d)*(b*e - a*f)*(S(1) + n)) + c**S(4)*(e + f*x)**(S(1) + n)*hypergeom([S(1), S(1) + n], [S(2) + n], d*(e + f*x)/(d*e - c*f))/(d**S(3)*(b*c - a*d)*(d*e - c*f)*(S(1) + n))], [(a + b*x)*(c + d*x)*(e + f*x)*(g + h*x), x, S(2), a*c*e*g*x + S(1)/S(2)*(b*c*e*g + a*(d*e*g + c*f*g + c*e*h))*x**S(2) + S(1)/S(3)*(b*(d*e*g + c*f*g + c*e*h) + a*(d*f*g + d*e*h + c*f*h))*x**S(3) + S(1)/S(4)*(a*d*f*h + b*(d*f*g + d*e*h + c*f*h))*x**S(4) + S(1)/S(5)*b*d*f*h*x**S(5)], [(a + b*x)*(c + d*x)*(e + f*x)/(g + h*x), x, S(2), (b*(d*g - c*h)*(f*g - e*h) - a*h*(d*f*g - d*e*h - c*f*h))*x/h**S(3) + S(1)/S(2)*(a*d*f*h - b*(d*f*g - d*e*h - c*f*h))*x**S(2)/h**S(2) + S(1)/S(3)*b*d*f*x**S(3)/h - (b*g - a*h)*(d*g - c*h)*(f*g - e*h)*log(g + h*x)/h**S(4)], [(a + b*x)**m*(c + d*x)*(e + f*x)*(g + h*x), x, S(2), (b*c - a*d)*(b*e - a*f)*(b*g - a*h)*(a + b*x)**(S(1) + m)/(b**S(4)*(S(1) + m)) + (S(3)*a**S(2)*d*f*h + b**S(2)*(d*e*g + c*f*g + c*e*h) - S(2)*a*b*(d*f*g + d*e*h + c*f*h))*(a + b*x)**(S(2) + m)/(b**S(4)*(S(2) + m)) - (S(3)*a*d*f*h - b*(d*f*g + d*e*h + c*f*h))*(a + b*x)**(S(3) + m)/(b**S(4)*(S(3) + m)) + d*f*h*(a + b*x)**(S(4) + m)/(b**S(4)*(S(4) + m))], [(c + d*x)**( - S(4) - m)*(e + f*x)**m*(g + h*x), x, S(3), - (d*g - c*h)*(c + d*x)**( - S(3) - m)*(e + f*x)**(S(1) + m)/(d*(d*e - c*f)*(S(3) + m)) + (c*f*h*(S(1) + m) + d*(S(2)*f*g - e*h*(S(3) + m)))*(c + d*x)**( - S(2) - m)*(e + f*x)**(S(1) + m)/(d*(d*e - c*f)**S(2)*(S(2) + m)*(S(3) + m)) - f*(c*f*h*(S(1) + m) + d*(S(2)*f*g - e*h*(S(3) + m)))*(c + d*x)**( - S(1) - m)*(e + f*x)**(S(1) + m)/(d*(d*e - c*f)**S(3)*(S(1) + m)*(S(2) + m)*(S(3) + m))], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) @XFAIL def test_2(): test = [ [x**m*(e + f*x)**n/((a + b*x)*(c + d*x)), x, S(6), b*x**(S(1) + m)*(e + f*x)**n*AppellF1(S(1) + m, - n, S(1), S(2) + m, - f*x/e, - b*x/a)/(a*(b*c - a*d)*(S(1) + m)*(S(1) + f*x/e)**n) - d*x**(S(1) + m)*(e + f*x)**n*AppellF1(S(1) + m, - n, S(1), S(2) + m, - f*x/e, - d*x/c)/(c*(b*c - a*d)*(S(1) + m)*(S(1) + f*x/e)**n)], [(a + b*x)**m*(c + d*x)**n*(e + f*x)*(g + h*x), x, S(3), - (a + b*x)**(S(1) + m)*(c + d*x)**(S(1) + n)*(b*c*f*h*(S(2) + m) + a*d*f*h*(S(2) + n) - b*d*(f*g + e*h)*(S(3) + m + n) - b*d*f*h*(S(2) + m + n)*x)/(b**S(2)*d**S(2)*(S(2) + m + n)*(S(3) + m + n)) + (a**S(2)*d**S(2)*f*h*(S(1) + n)*(S(2) + n) + a*b*d*(S(1) + n)*(S(2)*c*f*h*(S(1) + m) - d*(f*g + e*h)*(S(3) + m + n)) + b**S(2)*(c**S(2)*f*h*(S(1) + m)*(S(2) + m) - c*d*(f*g + e*h)*(S(1) + m)*(S(3) + m + n) + d**S(2)*e*g*(S(2) + m + n)*(S(3) + m + n)))*(a + b*x)**(S(1) + m)*(c + d*x)**n*hypergeom([S(1) + m, - n], [S(2) + m], - d*(a + b*x)/(b*c - a*d))/(b**S(3)*d**S(2)*(S(1) + m)*(S(2) + m + n)*(S(3) + m + n)*(b*(c + d*x)/(b*c - a*d))**n)], [(a + b*x)**m*(A + B*x)*(c + d*x)**n*(e + f*x)**p, x, S(7), (A*b - a*B)*(a + b*x)**(S(1) + m)*(c + d*x)**n*(e + f*x)**p*AppellF1(S(1) + m, - n, - p, S(2) + m, - d*(a + b*x)/(b*c - a*d), - f*(a + b*x)/(b*e - a*f))/(b**S(2)*(S(1) + m)*(b*(c + d*x)/(b*c - a*d))**n*(b*(e + f*x)/(b*e - a*f))**p) + B*(a + b*x)**(S(2) + m)*(c + d*x)**n*(e + f*x)**p*AppellF1(S(2) + m, - n, - p, S(3) + m, - d*(a + b*x)/(b*c - a*d), - f*(a + b*x)/(b*e - a*f))/(b**S(2)*(S(2) + m)*(b*(c + d*x)/(b*c - a*d))**n*(b*(e + f*x)/(b*e - a*f))**p)], [(A + B*x)*(c + d*x)**n*(e + f*x)**p/(a + b*x), x, S(5), - (A*b - a*B)*(c + d*x)**(S(1) + n)*(e + f*x)**p*AppellF1(S(1) + n, S(1), - p, S(2) + n, b*(c + d*x)/(b*c - a*d), - f*(c + d*x)/(d*e - c*f))/(b*(b*c - a*d)*(S(1) + n)*(d*(e + f*x)/(d*e - c*f))**p) - B*(c + d*x)**(S(1) + n)*(e + f*x)**(S(1) + p)*hypergeom([S(1), S(2) + n + p], [S(2) + p], d*(e + f*x)/(d*e - c*f))/(b*(d*e - c*f)*(S(1) + p)), - (A*b - a*B)*(c + d*x)**(S(1) + n)*(e + f*x)**p*AppellF1(S(1) + n, - p, S(1), S(2) + n, - f*(c + d*x)/(d*e - c*f), b*(c + d*x)/(b*c - a*d))/(b*(b*c - a*d)*(S(1) + n)*(d*(e + f*x)/(d*e - c*f))**p) + B*(c + d*x)**(S(1) + n)*(e + f*x)**p*hypergeom([S(1) + n, - p], [S(2) + n], - f*(c + d*x)/(d*e - c*f))/(b*d*(S(1) + n)*(d*(e + f*x)/(d*e - c*f))**p)], [(c*i + d*i*x)/(sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), x, S(3), S(2)*i*EllipticE(sqrt(h)*sqrt(e + f*x)/sqrt( - f*g + e*h), sqrt( - d*(f*g - e*h)/((d*e - c*f)*h)))*sqrt( - f*g + e*h)*sqrt(c + d*x)*sqrt(f*(g + h*x)/(f*g - e*h))/(f*sqrt(h)*sqrt( - f*(c + d*x)/(d*e - c*f))*sqrt(g + h*x))], [(a + b*x)**m*(c + d*x)**n*(e + f*x)**p, x, S(3), (a + b*x)**(S(1) + m)*(c + d*x)**n*(e + f*x)**p*AppellF1(S(1) + m, - n, - p, S(2) + m, - d*(a + b*x)/(b*c - a*d), - f*(a + b*x)/(b*e - a*f))/(b*(S(1) + m)*(b*(c + d*x)/(b*c - a*d))**n*(b*(e + f*x)/(b*e - a*f))**p)], [(a + b*x)**m*(c + d*x)**n*(e + f*x)**p/(g + h*x), x, S(0), Integral((a + b*x)**m*(c + d*x)**n*(e + f*x)**p/(g + h*x), x)], [x**S(3)*(S(1) + a*x)/(sqrt(a*x)*sqrt(S(1) - a*x)), x, S(8), - S(75)/S(128)*arcsin(S(1) - S(2)*a*x)/a**S(4) - S(25)/S(32)*(a*x)**(S(3)/S(2))*sqrt(S(1) - a*x)/a**S(4) - S(5)/S(8)*(a*x)**(S(5)/S(2))*sqrt(S(1) - a*x)/a**S(4) - S(1)/S(4)*(a*x)**(S(7)/S(2))*sqrt(S(1) - a*x)/a**S(4) - S(75)/S(64)*sqrt(a*x)*sqrt(S(1) - a*x)/a**S(4)], ] for index in test: r = rubi_integrate(index[0], index[1]) if len(index) == 5: assert rubi_test(r, index[1], index[3], expand=True, _diff=True) or rubi_test(r, index[1], index[4], expand=True, _diff=True) else: assert rubi_test(r, index[1], index[3], expand=True, _diff=True) @XFAIL def test_numerical(): test = [ #[S(1)/((a + b*x)*sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), x, S(1), - S(2)*EllipticPi(sqrt( - f/(d*e - c*f))*sqrt(c + d*x), - b*(d*e - c*f)/((b*c - a*d)*f), sqrt((d*e - c*f)*h/(f*(d*g - c*h))))*sqrt(d*(e + f*x)/(d*e - c*f))*sqrt(d*(g + h*x)/(d*g - c*h))/((b*c - a*d)*sqrt( - f/(d*e - c*f))*sqrt(e + f*x)*sqrt(g + h*x))], #[S(1)/(sqrt(a + b*x)*sqrt(c + d*x)*sqrt(e + f*x)*sqrt(g + h*x)), x, S(2), - S(2)*(a + b*x)*sqrt(cos(arctan(sqrt(b*e - a*f)*sqrt(g + h*x)/(sqrt(f*g - e*h)*sqrt(a + b*x))))**S(2))/cos(arctan(sqrt(b*e - a*f)*sqrt(g + h*x)/(sqrt(f*g - e*h)*sqrt(a + b*x))))*EllipticF(sin(arctan(sqrt(b*e - a*f)*sqrt(g + h*x)/(sqrt(f*g - e*h)*sqrt(a + b*x)))), sqrt((d*e - c*f)*(b*g - a*h)/((b*e - a*f)*(d*g - c*h))))*sqrt(f*g - e*h)*sqrt((b*g - a*h)*(c + d*x)/((d*g - c*h)*(a + b*x)))*sqrt((b*g - a*h)*(e + f*x)/((f*g - e*h)*(a + b*x)))*sqrt(S(1) + (b*c - a*d)*(g + h*x)/((d*g - c*h)*(a + b*x)))/((b*g - a*h)*sqrt(b*e - a*f)*sqrt(c + d*x)*sqrt(e + f*x)*sqrt((S(1) + (b*c - a*d)*(g + h*x)/((d*g - c*h)*(a + b*x)))/(S(1) + (b*e - a*f)*(g + h*x)/((f*g - e*h)*(a + b*x))))*sqrt(S(1) + (b*e - a*f)*(g + h*x)/((f*g - e*h)*(a + b*x))))], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True, _numerical=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True, _numerical=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True, _numerical=True)
666eff7df6ae6f3f42980b04c99901ba923fd53d572cb633a5585daf3d2b6a2e
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.utility_function import ( sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec) from sympy.core.numbers import pi as Pi from sympy.integrals.rubi.rubi import rubi_integrate a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j= symbols('a b c d e f m n x u k p r s t i j') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', ) def test_1(): assert rubi_test(rubi_integrate(sec(a + b*x), x), x, atanh(sin(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(2), x), x, tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3), x), x, tan(a + b*x)*sec(a + b*x)/(S(2)*b) + atanh(sin(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(4), x), x, tan(a + b*x)**S(3)/(S(3)*b) + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(5), x), x, tan(a + b*x)*sec(a + b*x)**S(3)/(S(4)*b) + S(3)*tan(a + b*x)*sec(a + b*x)/(S(8)*b) + S(3)*atanh(sin(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(6), x), x, tan(a + b*x)**S(5)/(S(5)*b) + S(2)*tan(a + b*x)**S(3)/(S(3)*b) + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(7), x), x, tan(a + b*x)*sec(a + b*x)**S(5)/(S(6)*b) + S(5)*tan(a + b*x)*sec(a + b*x)**S(3)/(S(24)*b) + S(5)*tan(a + b*x)*sec(a + b*x)/(S(16)*b) + S(5)*atanh(sin(a + b*x))/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(8), x), x, tan(a + b*x)**S(7)/(S(7)*b) + S(3)*tan(a + b*x)**S(5)/(S(5)*b) + tan(a + b*x)**S(3)/b + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(7)/2), x), x, -S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(5)*b) + S(2)*sin(a + b*x)*sec(a + b*x)**(S(5)/2)/(S(5)*b) + S(6)*sin(a + b*x)*sqrt(sec(a + b*x))/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(5)/2), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(3)*b) + S(2)*sin(a + b*x)*sec(a + b*x)**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(3)/2), x), x, -S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b + S(2)*sin(a + b*x)*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(a + b*x)), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sec(a + b*x)), x), x, S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-3)/2), x), x, S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(3)*b) + S(2)*sin(a + b*x)/(S(3)*b*sqrt(sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-5)/2), x), x, S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(5)*b) + S(2)*sin(a + b*x)/(S(5)*b*sec(a + b*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-7)/2), x), x, S(10)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))*sqrt(sec(a + b*x))/(S(21)*b) + S(10)*sin(a + b*x)/(S(21)*b*sqrt(sec(a + b*x))) + S(2)*sin(a + b*x)/(S(7)*b*sec(a + b*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(7)/2), x), x, -S(6)*c**S(4)*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))) + S(6)*c**S(3)*sqrt(c*sec(a + b*x))*sin(a + b*x)/(S(5)*b) + S(2)*c*(c*sec(a + b*x))**(S(5)/2)*sin(a + b*x)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2), x), x, S(2)*c**S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*c**S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))) + S(2)*c*sqrt(c*sec(a + b*x))*sin(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x)), x), x, S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(c*sec(a + b*x)), x), x, S(2)*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-3)/2), x), x, S(2)*sin(a + b*x)/(S(3)*b*c*sqrt(c*sec(a + b*x))) + S(2)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-5)/2), x), x, S(2)*sin(a + b*x)/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) + S(6)*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-7)/2), x), x, S(2)*sin(a + b*x)/(S(7)*b*c*(c*sec(a + b*x))**(S(5)/2)) + S(10)*sin(a + b*x)/(S(21)*b*c**S(3)*sqrt(c*sec(a + b*x))) + S(10)*sqrt(c*sec(a + b*x))*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(21)*b*c**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(4)/3), x), x, S(3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(a + b*x)**S(2))*sin(a + b*x)*sec(a + b*x)**(S(1)/3)/(b*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(2)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(4)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(5)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**(S(-4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(7)*b*sqrt(sin(a + b*x)**S(2))*sec(a + b*x)**(S(7)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(4)/3), x), x, S(3)*c*(c*sec(a + b*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(2)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(b*(c*sec(a + b*x))**(S(1)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(1)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(2)*b*(c*sec(a + b*x))**(S(2)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-1)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(a + b*x)**S(2))*sin(a + b*x)/(S(4)*b*(c*sec(a + b*x))**(S(4)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-2)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(5)*b*(c*sec(a + b*x))**(S(5)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(-4)/3), x), x, -S(3)*c*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(a + b*x)**S(2))*sin(a + b*x)/(S(7)*b*(c*sec(a + b*x))**(S(7)/3)*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**n, x), x, -Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)*sec(a + b*x)**(n + S(-1))/(b*(-n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**n, x), x, -c*(c*sec(a + b*x))**(n + S(-1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)/(b*(-n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(7)/2), x), x, (sec(x)**S(2))**(S(5)/2)*tan(x)/S(6) + S(5)*(sec(x)**S(2))**(S(3)/2)*tan(x)/S(24) + S(5)*sqrt(sec(x)**S(2))*tan(x)/S(16) + S(5)*asinh(tan(x))/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(5)/2), x), x, (sec(x)**S(2))**(S(3)/2)*tan(x)/S(4) + S(3)*sqrt(sec(x)**S(2))*tan(x)/S(8) + S(3)*asinh(tan(x))/S(8), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(3)/2), x), x, sqrt(sec(x)**S(2))*tan(x)/S(2) + asinh(tan(x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(x)**S(2)), x), x, asinh(tan(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sec(x)**S(2)), x), x, tan(x)/sqrt(sec(x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-3)/2), x), x, S(2)*tan(x)/(S(3)*sqrt(sec(x)**S(2))) + tan(x)/(S(3)*(sec(x)**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-5)/2), x), x, S(8)*tan(x)/(S(15)*sqrt(sec(x)**S(2))) + S(4)*tan(x)/(S(15)*(sec(x)**S(2))**(S(3)/2)) + tan(x)/(S(5)*(sec(x)**S(2))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((sec(x)**S(2))**(S(-7)/2), x), x, S(16)*tan(x)/(S(35)*sqrt(sec(x)**S(2))) + S(8)*tan(x)/(S(35)*(sec(x)**S(2))**(S(3)/2)) + S(6)*tan(x)/(S(35)*(sec(x)**S(2))**(S(5)/2)) + tan(x)/(S(7)*(sec(x)**S(2))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(7)/2), x), x, S(5)*a**(S(7)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(16) + S(5)*a**S(3)*sqrt(a*sec(x)**S(2))*tan(x)/S(16) + S(5)*a**S(2)*(a*sec(x)**S(2))**(S(3)/2)*tan(x)/S(24) + a*(a*sec(x)**S(2))**(S(5)/2)*tan(x)/S(6), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(5)/2), x), x, S(3)*a**(S(5)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(8) + S(3)*a**S(2)*sqrt(a*sec(x)**S(2))*tan(x)/S(8) + a*(a*sec(x)**S(2))**(S(3)/2)*tan(x)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(3)/2), x), x, a**(S(3)/2)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2)))/S(2) + a*sqrt(a*sec(x)**S(2))*tan(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(2)), x), x, sqrt(a)*atanh(sqrt(a)*tan(x)/sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(2)), x), x, tan(x)/sqrt(a*sec(x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-3)/2), x), x, tan(x)/(S(3)*(a*sec(x)**S(2))**(S(3)/2)) + S(2)*tan(x)/(S(3)*a*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-5)/2), x), x, tan(x)/(S(5)*(a*sec(x)**S(2))**(S(5)/2)) + S(4)*tan(x)/(S(15)*a*(a*sec(x)**S(2))**(S(3)/2)) + S(8)*tan(x)/(S(15)*a**S(2)*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(2))**(S(-7)/2), x), x, tan(x)/(S(7)*(a*sec(x)**S(2))**(S(7)/2)) + S(6)*tan(x)/(S(35)*a*(a*sec(x)**S(2))**(S(5)/2)) + S(8)*tan(x)/(S(35)*a**S(2)*(a*sec(x)**S(2))**(S(3)/2)) + S(16)*tan(x)/(S(35)*a**S(3)*sqrt(a*sec(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(5)/2), x), x, -S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*EllipticE(x/S(2), S(2))*cos(x)**(S(3)/2)/S(195) + S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*sin(x)*cos(x)/S(195) + S(2)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)**S(4)/S(13) + S(22)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)**S(2)/S(117) + S(154)*a**S(2)*sqrt(a*sec(x)**S(3))*tan(x)/S(585), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(3)/2), x), x, S(10)*a*sqrt(a*sec(x)**S(3))*EllipticF(x/S(2), S(2))*cos(x)**(S(3)/2)/S(21) + S(10)*a*sqrt(a*sec(x)**S(3))*sin(x)/S(21) + S(2)*a*sqrt(a*sec(x)**S(3))*tan(x)*sec(x)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(3)), x), x, -S(2)*sqrt(a*sec(x)**S(3))*EllipticE(x/S(2), S(2))*cos(x)**(S(3)/2) + S(2)*sqrt(a*sec(x)**S(3))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(3)), x), x, S(2)*EllipticF(x/S(2), S(2))/(S(3)*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*tan(x)/(S(3)*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(-3)/2), x), x, S(14)*EllipticE(x/S(2), S(2))/(S(15)*a*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*sin(x)*cos(x)**S(2)/(S(9)*a*sqrt(a*sec(x)**S(3))) + S(14)*sin(x)/(S(45)*a*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(3))**(S(-5)/2), x), x, S(26)*EllipticF(x/S(2), S(2))/(S(77)*a**S(2)*sqrt(a*sec(x)**S(3))*cos(x)**(S(3)/2)) + S(2)*sin(x)*cos(x)**S(5)/(S(15)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(26)*sin(x)*cos(x)**S(3)/(S(165)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(78)*sin(x)*cos(x)/(S(385)*a**S(2)*sqrt(a*sec(x)**S(3))) + S(26)*tan(x)/(S(77)*a**S(2)*sqrt(a*sec(x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(7)/2), x), x, a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(11)/S(13) + S(6)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(9)/S(11) + S(5)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(7)/S(3) + S(20)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(5)/S(7) + S(3)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3) + S(2)*a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x) + a**S(3)*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(5)/2), x), x, a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(7)/S(9) + S(4)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(5)/S(7) + S(6)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3)/S(5) + S(4)*a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)/S(3) + a**S(2)*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(3)/2), x), x, a*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)**S(3)/S(5) + S(2)*a*sqrt(a*sec(x)**S(4))*sin(x)**S(2)*tan(x)/S(3) + a*sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sec(x)**S(4)), x), x, sqrt(a*sec(x)**S(4))*sin(x)*cos(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sec(x)**S(4)), x), x, x*sec(x)**S(2)/(S(2)*sqrt(a*sec(x)**S(4))) + tan(x)/(S(2)*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(-3)/2), x), x, S(5)*x*sec(x)**S(2)/(S(16)*a*sqrt(a*sec(x)**S(4))) + sin(x)*cos(x)**S(3)/(S(6)*a*sqrt(a*sec(x)**S(4))) + S(5)*sin(x)*cos(x)/(S(24)*a*sqrt(a*sec(x)**S(4))) + S(5)*tan(x)/(S(16)*a*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(x)**S(4))**(S(-5)/2), x), x, S(63)*x*sec(x)**S(2)/(S(256)*a**S(2)*sqrt(a*sec(x)**S(4))) + sin(x)*cos(x)**S(7)/(S(10)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(9)*sin(x)*cos(x)**S(5)/(S(80)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(21)*sin(x)*cos(x)**S(3)/(S(160)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(21)*sin(x)*cos(x)/(S(128)*a**S(2)*sqrt(a*sec(x)**S(4))) + S(63)*tan(x)/(S(256)*a**S(2)*sqrt(a*sec(x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(((b*sec(c + d*x))**p)**n, x), x, -((b*sec(c + d*x))**p)**n*Hypergeometric2F1(S(1)/2, -n*p/S(2) + S(1)/2, -n*p/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*cos(c + d*x)/(d*(-n*p + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*sec(c + d*x))**p)**n, x), x, -(a*(b*sec(c + d*x))**p)**n*Hypergeometric2F1(S(1)/2, -n*p/S(2) + S(1)/2, -n*p/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*cos(c + d*x)/(d*(-n*p + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(4), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(3), x), x, -S(6)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**S(2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x), x), x, -S(2)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x), x), x, S(2)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(2), x), x, S(2)*b*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(3), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(2)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**S(3), x), x, S(10)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**S(2), x), x, -S(6)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x), x), x, S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2), x), x, -S(2)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x), x), x, S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(2), x), x, S(2)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(3), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b**S(2)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*b*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*cos(c + d*x)**S(6), x), x, S(2)*b**S(5)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(3)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b**S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**S(2), x), x, S(10)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d) + S(10)*b*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x), x), x, -S(6)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2), x), x, S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d) + S(2)*b*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x), x), x, -S(2)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(2), x), x, S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(3), x), x, S(2)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(4), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(5), x), x, S(2)*b**S(4)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(6), x), x, S(2)*b**S(5)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*b**S(3)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*b**S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*cos(c + d*x)**S(7), x), x, S(2)*b**S(6)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b**S(4)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*b**S(3)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(7)/2), x), x, -S(6)*b**S(4)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*b**S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*d) + S(2)*b*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/sqrt(b*sec(c + d*x)), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/sqrt(b*sec(c + d*x)), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/sqrt(b*sec(c + d*x)), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/sqrt(b*sec(c + d*x)), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*sec(c + d*x)), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/sqrt(b*sec(c + d*x)), x), x, S(2)*sin(c + d*x)/(S(3)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/sqrt(b*sec(c + d*x)), x), x, S(2)*b*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(3)/sqrt(b*sec(c + d*x)), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(4)/sqrt(b*sec(c + d*x)), x), x, S(2)*b**S(3)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*b*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(6)/(b*sec(c + d*x))**(S(3)/2), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(2)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/(b*sec(c + d*x))**(S(3)/2), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(2)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/(b*sec(c + d*x))**(S(3)/2), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-3)/2), x), x, S(2)*sin(c + d*x)/(S(3)*b*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*b*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(3)/(b*sec(c + d*x))**(S(3)/2), x), x, S(2)*b**S(2)*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*sin(c + d*x)/(S(45)*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*b*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(7)/(b*sec(c + d*x))**(S(5)/2), x), x, S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(3)*d) + S(10)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(21)*b**S(4)*d) + S(2)*(b*sec(c + d*x))**(S(7)/2)*sin(c + d*x)/(S(7)*b**S(6)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(6)/(b*sec(c + d*x))**(S(5)/2), x), x, -S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(6)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(5)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(5)/2)*sin(c + d*x)/(S(5)*b**S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(5)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(3)*d) + S(2)*(b*sec(c + d*x))**(S(3)/2)*sin(c + d*x)/(S(3)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(4)/(b*sec(c + d*x))**(S(5)/2), x), x, -S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(3)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*EllipticE(c/S(2) + d*x/S(2), S(2))/(b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sin(c + d*x)/(S(3)*b**S(2)*d*sqrt(b*sec(c + d*x))) + S(2)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(3)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-5)/2), x), x, S(2)*sin(c + d*x)/(S(5)*b*d*(b*sec(c + d*x))**(S(3)/2)) + S(6)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(5)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b**S(2)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(5)/2), x), x, S(2)*b*sin(c + d*x)/(S(9)*d*(b*sec(c + d*x))**(S(7)/2)) + S(14)*sin(c + d*x)/(S(45)*b*d*(b*sec(c + d*x))**(S(3)/2)) + S(14)*EllipticE(c/S(2) + d*x/S(2), S(2))/(S(15)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(cos(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-7)/2), x), x, S(2)*sin(c + d*x)/(S(7)*b*d*(b*sec(c + d*x))**(S(5)/2)) + S(10)*sin(c + d*x)/(S(21)*b**S(3)*d*sqrt(b*sec(c + d*x))) + S(10)*sqrt(b*sec(c + d*x))*EllipticF(c/S(2) + d*x/S(2), S(2))*sqrt(cos(c + d*x))/(S(21)*b**S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(9)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(7)/2)/(S(4)*d) + S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(8)*d) + S(3)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(8)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(7)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(3)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x)), x), x, sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), x), x, x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(3)/2), x), x, sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(5)/2), x), x, x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(7)/2), x), x, -sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(c + d*x))/sec(c + d*x)**(S(9)/2), x), x, S(3)*x*sqrt(b*sec(c + d*x))/(S(8)*sqrt(sec(c + d*x))) + S(3)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(8)*d*sec(c + d*x)**(S(3)/2)) + sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(4)*d*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(7)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(7)/2)/(S(4)*d) + S(3)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(8)*d) + S(3)*b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(8)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(5)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(3)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)*sqrt(sec(c + d*x)), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sqrt(sec(c + d*x)), x), x, b*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(3)/2), x), x, b*x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(5)/2), x), x, b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(7)/2), x), x, b*x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(9)/2), x), x, -b*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(3)/2)/sec(c + d*x)**(S(11)/2), x), x, S(3)*b*x*sqrt(b*sec(c + d*x))/(S(8)*sqrt(sec(c + d*x))) + S(3)*b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(8)*d*sec(c + d*x)**(S(3)/2)) + b*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(4)*d*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(7)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(5)*sec(c + d*x)**(S(9)/2)/(S(5)*d) + S(2)*b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(3)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)*sec(c + d*x)**(S(5)/2)/(S(3)*d) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)*sqrt(sec(c + d*x)), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(S(2)*d) + b**S(2)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(S(2)*d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sqrt(sec(c + d*x)), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)*sqrt(sec(c + d*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(3)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*atanh(sin(c + d*x))/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(5)/2), x), x, b**S(2)*x*sqrt(b*sec(c + d*x))/sqrt(sec(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(7)/2), x), x, b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(9)/2), x), x, b**S(2)*x*sqrt(b*sec(c + d*x))/(S(2)*sqrt(sec(c + d*x))) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(S(2)*d*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(5)/2)/sec(c + d*x)**(S(11)/2), x), x, -b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)**S(3)/(S(3)*d*sqrt(sec(c + d*x))) + b**S(2)*sqrt(b*sec(c + d*x))*sin(c + d*x)/(d*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/sqrt(b*sec(c + d*x)), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/sqrt(b*sec(c + d*x)), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/sqrt(b*sec(c + d*x)), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/sqrt(b*sec(c + d*x)), x), x, x*sqrt(sec(c + d*x))/sqrt(b*sec(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(3)/2)), x), x, x*sqrt(sec(c + d*x))/(S(2)*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(9)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*b*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/(b*sec(c + d*x))**(S(3)/2), x), x, x*sqrt(sec(c + d*x))/(b*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/(b*sec(c + d*x))**(S(3)/2), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sqrt(sec(c + d*x))), x), x, x*sqrt(sec(c + d*x))/(S(2)*b*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*b*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(3)/2)), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*b*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(b*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(3)/2)*sec(c + d*x)**(S(5)/2)), x), x, S(3)*x*sqrt(sec(c + d*x))/(S(8)*b*sqrt(b*sec(c + d*x))) + S(3)*sin(c + d*x)/(S(8)*b*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))) + sin(c + d*x)/(S(4)*b*d*sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(11)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(5)/2)/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))) + atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(9)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(7)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, atanh(sin(c + d*x))*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(5)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, x*sqrt(sec(c + d*x))/(b**S(2)*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**(S(3)/2)/(b*sec(c + d*x))**(S(5)/2), x), x, sin(c + d*x)*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sec(c + d*x))/(b*sec(c + d*x))**(S(5)/2), x), x, x*sqrt(sec(c + d*x))/(S(2)*b**S(2)*sqrt(b*sec(c + d*x))) + sin(c + d*x)/(S(2)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(5)/2)*sqrt(sec(c + d*x))), x), x, -sin(c + d*x)**S(3)*sqrt(sec(c + d*x))/(S(3)*b**S(2)*d*sqrt(b*sec(c + d*x))) + sin(c + d*x)*sqrt(sec(c + d*x))/(b**S(2)*d*sqrt(b*sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((b*sec(c + d*x))**(S(5)/2)*sec(c + d*x)**(S(3)/2)), x), x, S(3)*x*sqrt(sec(c + d*x))/(S(8)*b**S(2)*sqrt(b*sec(c + d*x))) + S(3)*sin(c + d*x)/(S(8)*b**S(2)*d*sqrt(b*sec(c + d*x))*sqrt(sec(c + d*x))) + sin(c + d*x)/(S(4)*b**S(2)*d*sqrt(b*sec(c + d*x))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x)**S(2), x), x, S(3)*(b*sec(c + d*x))**(S(4)/3)*Hypergeometric2F1(S(-2)/3, S(1)/2, S(1)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x), x), x, S(3)*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*d*(b*sec(c + d*x))**(S(2)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*cos(c + d*x), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(5)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*cos(c + d*x)**S(2), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(4)/3, S(7)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(8)*d*(b*sec(c + d*x))**(S(8)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x)**S(2), x), x, S(3)*(b*sec(c + d*x))**(S(7)/3)*Hypergeometric2F1(S(-7)/6, S(1)/2, S(-1)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x), x), x, S(3)*(b*sec(c + d*x))**(S(4)/3)*Hypergeometric2F1(S(-2)/3, S(1)/2, S(1)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3), x), x, S(3)*b*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*cos(c + d*x), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*d*(b*sec(c + d*x))**(S(2)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*cos(c + d*x)**S(2), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(5)*d*(b*sec(c + d*x))**(S(5)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(1)/3), x), x, S(3)*(b*sec(c + d*x))**(S(2)/3)*Hypergeometric2F1(S(-1)/3, S(1)/2, S(2)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(2)*b*d*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(b*sec(c + d*x))**(S(1)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-1)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*(b*sec(c + d*x))**(S(4)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(7)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(5)/3, S(8)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(10)*d*(b*sec(c + d*x))**(S(10)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**S(2)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(b*d*(b*sec(c + d*x))**(S(1)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(4)*d*(b*sec(c + d*x))**(S(4)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(-4)/3), x), x, -S(3)*b*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(7)*d*(b*sec(c + d*x))**(S(7)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*b**S(2)*Hypergeometric2F1(S(1)/2, S(5)/3, S(8)/3, cos(c + d*x)**S(2))*sin(c + d*x)/(S(10)*d*(b*sec(c + d*x))**(S(10)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(c + d*x)**S(2)/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*b**S(3)*Hypergeometric2F1(S(1)/2, S(13)/6, S(19)/6, cos(c + d*x)**S(2))*sin(c + d*x)/(S(13)*d*(b*sec(c + d*x))**(S(13)/3)*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(4)/3)*sec(c + d*x)**m, x), x, S(3)*b*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(-1)/6, -m/S(2) + S(5)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**m/(d*(S(3)*m + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(2)/3)*sec(c + d*x)**m, x), x, -S(3)*(b*sec(c + d*x))**(S(2)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(1)/6, -m/S(2) + S(7)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-S(3)*m + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**(S(1)/3)*sec(c + d*x)**m, x), x, -S(3)*(b*sec(c + d*x))**(S(1)/3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(1)/3, -m/S(2) + S(4)/3, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-S(3)*m + S(2))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(1)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(2)/3, -m/S(2) + S(5)/3, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(b*sec(c + d*x))**(S(1)/3)*(-S(3)*m + S(4))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(2)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(5)/6, -m/S(2) + S(11)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(b*sec(c + d*x))**(S(2)/3)*(-S(3)*m + S(5))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(c + d*x)**m/(b*sec(c + d*x))**(S(4)/3), x), x, -S(3)*Hypergeometric2F1(S(1)/2, -m/S(2) + S(7)/6, -m/S(2) + S(13)/6, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-2))/(b*d*(b*sec(c + d*x))**(S(1)/3)*(-S(3)*m + S(7))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**m, x), x, -(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -m/S(2) - n/S(2) + S(1)/2, -m/S(2) - n/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(m + S(-1))/(d*(-m - n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**S(2), x), x, (b*sec(c + d*x))**(n + S(1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-1)/2, -n/S(2) + S(1)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(b*d*(n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x), x), x, (b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2), -n/S(2) + S(1), cos(c + d*x)**S(2))*sin(c + d*x)/(d*n*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n, x), x, -b*(b*sec(c + d*x))**(n + S(-1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x), x), x, -b**S(2)*(b*sec(c + d*x))**(n + S(-2))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1), -n/S(2) + S(2), cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(2))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x)**S(2), x), x, -b**S(3)*(b*sec(c + d*x))**(n + S(-3))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(3)/2, -n/S(2) + S(5)/2, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(3))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*cos(c + d*x)**S(3), x), x, -b**S(4)*(b*sec(c + d*x))**(n + S(-4))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(2), -n/S(2) + S(3), cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-n + S(4))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**(S(5)/2), x), x, S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-3)/4, -n/S(2) + S(1)/4, cos(c + d*x)**S(2))*sin(c + d*x)*sec(c + d*x)**(S(3)/2)/(d*(S(2)*n + S(3))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sec(c + d*x)**(S(3)/2), x), x, S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(-1)/4, -n/S(2) + S(3)/4, cos(c + d*x)**S(2))*sin(c + d*x)*sqrt(sec(c + d*x))/(d*(S(2)*n + S(1))*sqrt(sin(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n*sqrt(sec(c + d*x)), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/4, -n/S(2) + S(5)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(1))*sqrt(sin(c + d*x)**S(2))*sqrt(sec(c + d*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sqrt(sec(c + d*x)), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(3)/4, -n/S(2) + S(7)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(3))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sec(c + d*x)**(S(3)/2), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(5)/4, -n/S(2) + S(9)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(5))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(c + d*x))**n/sec(c + d*x)**(S(5)/2), x), x, -S(2)*(b*sec(c + d*x))**n*Hypergeometric2F1(S(1)/2, -n/S(2) + S(7)/4, -n/S(2) + S(11)/4, cos(c + d*x)**S(2))*sin(c + d*x)/(d*(-S(2)*n + S(7))*sqrt(sin(c + d*x)**S(2))*sec(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(7)/2)*sin(a + b*x), x), x, S(2)*d*(d*sec(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(5)/2)*sin(a + b*x), x), x, S(2)*d*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(3)/2)*sin(a + b*x), x), x, S(2)*d*sqrt(d*sec(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*sec(a + b*x))*sin(a + b*x), x), x, -S(2)*d/(b*sqrt(d*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/sqrt(d*sec(a + b*x)), x), x, -S(2)*d/(S(3)*b*(d*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(5)/2)*sin(a + b*x)**S(3), x), x, S(2)*d**S(3)/(b*sqrt(d*sec(a + b*x))) + S(2)*d*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*sec(a + b*x))**(S(9)/2)*sin(a + b*x)**S(3), x), x, -S(2)*d**S(3)*(d*sec(a + b*x))**(S(3)/2)/(S(3)*b) + S(2)*d*(d*sec(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(9)/2), x), x, -S(4)*c*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(7)*b*sqrt(c*sec(a + b*x))) - S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*sqrt(c*sec(a + b*x))) + S(4)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(7)/2), x), x, -S(8)*c*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*sqrt(c*sec(a + b*x))) - S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(c*sec(a + b*x))) + S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2), x), x, -S(2)*c*d*sqrt(d*csc(a + b*x))/(b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x)), x), x, sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/sqrt(d*csc(a + b*x)), x), x, -sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/(d*csc(a + b*x))**(S(3)/2), x), x, -c/(b*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(2)*b*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sec(a + b*x))/(d*csc(a + b*x))**(S(5)/2), x), x, -c/(S(2)*b*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(9)/2), x), x, S(64)*c*d**S(5)*sqrt(c*sec(a + b*x))/(S(21)*b*sqrt(d*csc(a + b*x))) - S(16)*c*d**S(3)*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(7)/2), x), x, -S(24)*c**S(2)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(24)*c*d**S(5)*sqrt(c*sec(a + b*x))/(S(5)*b*(d*csc(a + b*x))**(S(3)/2)) - S(12)*c*d**S(3)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))/(S(5)*b) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2), x), x, S(8)*c*d**S(3)*sqrt(c*sec(a + b*x))/(S(3)*b*sqrt(d*csc(a + b*x))) - S(2)*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2), x), x, -S(4)*c**S(2)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(4)*c*d**S(3)*sqrt(c*sec(a + b*x))/(b*(d*csc(a + b*x))**(S(3)/2)) - S(2)*c*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x)), x), x, S(2)*c*d*sqrt(c*sec(a + b*x))/(b*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/sqrt(d*csc(a + b*x)), x), x, -S(2)*c**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*d*sqrt(c*sec(a + b*x))/(b*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/(d*csc(a + b*x))**(S(3)/2), x), x, sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*d**S(2)*sqrt(c*sec(a + b*x))) + S(2)*c*sqrt(c*sec(a + b*x))/(b*d*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(3)/2)/(d*csc(a + b*x))**(S(5)/2), x), x, -S(3)*c**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*sqrt(c*sec(a + b*x))/(b*d*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(9)/2), x), x, S(40)*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(21)*b) + S(40)*c*d**S(5)*(c*sec(a + b*x))**(S(3)/2)/(S(21)*b*sqrt(d*csc(a + b*x))) - S(20)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(7)/2), x), x, S(64)*c*d**S(5)*(c*sec(a + b*x))**(S(3)/2)/(S(15)*b*(d*csc(a + b*x))**(S(3)/2)) - S(16)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))/(S(5)*b) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(5)/2), x), x, S(4)*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b) + S(4)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(d*csc(a + b*x))) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2), x), x, S(8)*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*(d*csc(a + b*x))**(S(3)/2)) - S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x)), x), x, S(2)*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b) + S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/sqrt(d*csc(a + b*x)), x), x, S(2)*c*d*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/(d*csc(a + b*x))**(S(3)/2), x), x, -c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b*d**S(2)) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*d*sqrt(d*csc(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sec(a + b*x))**(S(5)/2)/(d*csc(a + b*x))**(S(5)/2), x), x, sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*c**S(2)*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(2)*c*(c*sec(a + b*x))**(S(3)/2)/(S(3)*b*d*(d*csc(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/sqrt(c*sec(a + b*x)), x), x, -S(8)*c*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*(c*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/sqrt(c*sec(a + b*x)), x), x, -S(4)*c*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*(c*sec(a + b*x))**(S(3)/2)) - S(4)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/sqrt(c*sec(a + b*x)), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*(c*sec(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/sqrt(c*sec(a + b*x)), x), x, -S(2)*c*d*sqrt(d*csc(a + b*x))/(b*(c*sec(a + b*x))**(S(3)/2)) - S(2)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/sqrt(c*sec(a + b*x)), x), x, -sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*sqrt(c*sec(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))), x), x, EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(2)*b*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*d**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*d**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*d**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(3)*b*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(2)*b*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(11)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, S(8)*d**S(5)*sqrt(d*csc(a + b*x))/(S(45)*b*c*sqrt(c*sec(a + b*x))) + S(2)*d**S(3)*(d*csc(a + b*x))**(S(5)/2)/(S(45)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d*(d*csc(a + b*x))**(S(9)/2)/(S(9)*b*c*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, S(2)*d**S(3)*(d*csc(a + b*x))**(S(3)/2)/(S(21)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*c*sqrt(c*sec(a + b*x))) - S(2)*d**S(4)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(21)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*(c*sec(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*c*sqrt(c*sec(a + b*x))) - d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/(c*sec(a + b*x))**(S(3)/2), x), x, -S(2)*d*sqrt(d*csc(a + b*x))/(b*c*sqrt(c*sec(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(2)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/(c*sec(a + b*x))**(S(3)/2), x), x, d/(b*c*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(2)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))), x), x, d/(S(2)*b*c*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(8)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(16)*b*c**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(3)*b*d*(c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x))) + S(1)/(S(6)*b*c*d*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))) + sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(12)*b*c**S(2)*d**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(4)*b*d*(c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(3)/(S(16)*b*c*d*sqrt(c*sec(a + b*x))*(d*csc(a + b*x))**(S(3)/2)) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(64)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))/(S(64)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) + S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(128)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))) - S(3)*sqrt(S(2))*sqrt(c*sec(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))/(S(128)*b*c**S(2)*d**S(2)*sqrt(d*csc(a + b*x))*sqrt(tan(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(9)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*c*d*(d*csc(a + b*x))**(S(7)/2)/(S(7)*b*(c*sec(a + b*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(7)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, S(6)*d**S(3)*sqrt(d*csc(a + b*x))/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) - S(2)*d*(d*csc(a + b*x))**(S(5)/2)/(S(5)*b*c*(c*sec(a + b*x))**(S(3)/2)) + S(6)*d**S(4)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(5)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*d*(d*csc(a + b*x))**(S(3)/2)/(S(3)*b*c*(c*sec(a + b*x))**(S(3)/2)) + sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))) + sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*c**S(2)*sqrt(c*sec(a + b*x))) - sqrt(S(2))*d**S(2)*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(4)*b*c**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(a + b*x))**(S(3)/2)/(c*sec(a + b*x))**(S(5)/2), x), x, -S(2)*d*sqrt(d*csc(a + b*x))/(b*c*(c*sec(a + b*x))**(S(3)/2)) - S(3)*d**S(2)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(a + b*x))/(c*sec(a + b*x))**(S(5)/2), x), x, d/(S(2)*b*c*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*c**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(8)*b*c**S(2)*sqrt(c*sec(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*c**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(16)*b*c**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*sqrt(d*csc(a + b*x))), x), x, d/(S(3)*b*c*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(2)*b*c**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(3)/2)), x), x, -c/(S(4)*b*d*(c*sec(a + b*x))**(S(7)/2)*sqrt(d*csc(a + b*x))) + S(1)/(S(16)*b*c*d*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(64)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(64)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) - S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(128)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))) + S(3)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(128)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(5)/2)), x), x, -c/(S(5)*b*d*(c*sec(a + b*x))**(S(7)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(1)/(S(10)*b*c*d*(c*sec(a + b*x))**(S(3)/2)*(d*csc(a + b*x))**(S(3)/2)) + S(3)*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(20)*b*c**S(2)*d**S(2)*sqrt(c*sec(a + b*x))*sqrt(d*csc(a + b*x))*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c*sec(a + b*x))**(S(5)/2)*(d*csc(a + b*x))**(S(7)/2)), x), x, -c/(S(6)*b*d*(c*sec(a + b*x))**(S(7)/2)*(d*csc(a + b*x))**(S(5)/2)) - S(5)*c/(S(48)*b*d**S(3)*(c*sec(a + b*x))**(S(7)/2)*sqrt(d*csc(a + b*x))) + S(5)/(S(192)*b*c*d**S(3)*(c*sec(a + b*x))**(S(3)/2)*sqrt(d*csc(a + b*x))) - S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(-sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(256)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) + S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*ArcTan(sqrt(S(2))*sqrt(tan(a + b*x)) + S(1))*sqrt(tan(a + b*x))/(S(256)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) - S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(-sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(512)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))) + S(5)*sqrt(S(2))*sqrt(d*csc(a + b*x))*log(sqrt(S(2))*sqrt(tan(a + b*x)) + tan(a + b*x) + S(1))*sqrt(tan(a + b*x))/(S(512)*b*c**S(2)*d**S(4)*sqrt(c*sec(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**n*sec(e + f*x)**m, x), x, (cos(e + f*x)**S(2))**(m/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, sin(e + f*x)**S(2))*csc(e + f*x)**(n + S(-1))*sec(e + f*x)**(m + S(1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sec(e + f*x))**m*csc(e + f*x)**n, x), x, -(a*sec(e + f*x))**m*(sin(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(-m/S(2) + S(1)/2, n/S(2) + S(1)/2, -m/S(2) + S(3)/2, cos(e + f*x)**S(2))*cos(e + f*x)*csc(e + f*x)**(n + S(1))/(f*(-m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*csc(e + f*x))**n*sec(e + f*x)**m, x), x, (b*csc(e + f*x))**n*(cos(e + f*x)**S(2))**(m/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, sin(e + f*x)**S(2))*sin(e + f*x)*sec(e + f*x)**(m + S(1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True)
a767dd174fdf8c3021bb1f804ec72f04da5bad80a9aa011eb535690ff2c45243
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.rubi import rubi_integrate from sympy.functions import log, sqrt, exp, cos, sin, tan, sec, csc, cot from sympy.functions.elementary.hyperbolic import atanh as arctanh from sympy.functions.elementary.hyperbolic import asinh as arcsinh from sympy.functions.elementary.hyperbolic import acosh as arccosh from sympy.functions.elementary.trigonometric import atan as arctan from sympy.functions.elementary.trigonometric import asin as arcsin from sympy.functions.elementary.trigonometric import acos as arccos from sympy.integrals.rubi.utility_function import EllipticE, EllipticF, hypergeom, rubi_test from sympy.core.numbers import (I, pi as Pi) from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import exp_polar from sympy.functions.special.hyper import hyper from sympy.simplify.simplify import simplify from sympy.testing.pytest import slow, skip, ON_TRAVIS A, B, C, D, a, b, c, d, e, f, m, n, p, x, u = symbols('A B C D a b c d e f m n p x u', real=True, imaginary=False) @slow def test_1(): if ON_TRAVIS: skip('Too slow for travis.') test = [ [x**S(2)*(a + b*x)*(a*c - b*c*x)**S(3), x, S(2), S(1)/S(3)*a**S(4)*c**S(3)*x**S(3) - S(1)/S(2)*a**S(3)*b*c**S(3)*x**S(4) + S(1)/S(3)*a*b**S(3)*c**S(3)*x**S(6) - S(1)/S(7)*b**S(4)*c**S(3)*x**S(7)], [x*(a + b*x)*(a*c - b*c*x)**S(3), x, S(2), S(1)/S(2)*a**S(4)*c**S(3)*x**S(2) - S(2)/S(3)*a**S(3)*b*c**S(3)*x**S(3) + S(2)/S(5)*a*b**S(3)*c**S(3)*x**S(5) - S(1)/S(6)*b**S(4)*c**S(3)*x**S(6)], [x**S(3)*(a + b*x)*(A + B*x), x, S(2), S(1)/S(4)*a*A*x**S(4) + S(1)/S(5)*(A*b + a*B)*x**S(5) + S(1)/S(6)*b*B*x**S(6)], [x**S(4)*(A + B*x)/(a + b*x), x, S(2), - a**S(3)*(A*b - a*B)*x/b**S(5) + S(1)/S(2)*a**S(2)*(A*b - a*B)*x**S(2)/b**S(4) - S(1)/S(3)*a*(A*b - a*B)*x**S(3)/b**S(3) + S(1)/S(4)*(A*b - a*B)*x**S(4)/b**S(2) + S(1)/S(5)*B*x**S(5)/b + a**S(4)*(A*b - a*B)*log(a + b*x)/b**S(6)], [x**S(2)*(c + d*x)/(a + b*x), x, S(2), - a*(b*c - a*d)*x/b**S(3) + S(1)/S(2)*(b*c - a*d)*x**S(2)/b**S(2) + S(1)/S(3)*d*x**S(3)/b + a**S(2)*(b*c - a*d)*log(a + b*x)/b**S(4)], [x**S(3)*(c + d*x)**S(2)/(a + b*x)**S(2), x, S(2), - S(2)*a*(b*c - S(2)*a*d)*(b*c - a*d)*x/b**S(5) + S(1)/S(2)*(b*c - S(3)*a*d)*(b*c - a*d)*x**S(2)/b**S(4) + S(2)/S(3)*d*(b*c - a*d)*x**S(3)/b**S(3) + S(1)/S(4)*d**S(2)*x**S(4)/b**S(2) + a**S(3)*(b*c - a*d)**S(2)/(b**S(6)*(a + b*x)) + a**S(2)*(S(3)*b*c - S(5)*a*d)*(b*c - a*d)*log(a + b*x)/b**S(6)], [x**S(2)*(c + d*x)**S(3)/(a + b*x)**S(3), x, S(2), S(3)*d*(b*c - S(2)*a*d)*(b*c - a*d)*x/b**S(5) + S(3)/S(2)*d**S(2)*(b*c - a*d)*x**S(2)/b**S(4) + S(1)/S(3)*d**S(3)*x**S(3)/b**S(3) - S(1)/S(2)*a**S(2)*(b*c - a*d)**S(3)/(b**S(6)*(a + b*x)**S(2)) + a*(S(2)*b*c - S(5)*a*d)*(b*c - a*d)**S(2)/(b**S(6)*(a + b*x)) + (b*c - a*d)*(b**S(2)*c**S(2) - S(8)*a*b*c*d + S(10)*a**S(2)*d**S(2))*log(a + b*x)/b**S(6)], [x**(S(5)/S(2))*(A + B*x)/(a + b*x), x, S(6), - S(2)/S(3)*a*(A*b - a*B)*x**(S(3)/S(2))/b**S(3) + S(2)/S(5)*(A*b - a*B)*x**(S(5)/S(2))/b**S(2) + S(2)/S(7)*B*x**(S(7)/S(2))/b - S(2)*a**(S(5)/S(2))*(A*b - a*B)*arctan(sqrt(b)*sqrt(x)/sqrt(a))/b**(S(9)/S(2)) + S(2)*a**S(2)*(A*b - a*B)*sqrt(x)/b**S(4)], [x**m*(a + b*x)**S(3)*(A + B*x), x, S(2), a**S(3)*A*x**(S(1) + m)/(S(1) + m) + a**S(2)*(S(3)*A*b + a*B)*x**(S(2) + m)/(S(2) + m) + S(3)*a*b*(A*b + a*B)*x**(S(3) + m)/(S(3) + m) + b**S(2)*(A*b + S(3)*a*B)*x**(S(4) + m)/(S(4) + m) + b**S(3)*B*x**(S(5) + m)/(S(5) + m)], [x**m*(c + d*x)**S(3)/(a + b*x), x, S(7), d*(S(3)*b**S(2)*c**S(2) - S(3)*a*b*c*d + a**S(2)*d**S(2))*x**(S(1) + m)/(b**S(3)*(S(1) + m)) + d**S(2)*(S(3)*b*c - a*d)*x**(S(2) + m)/(b**S(2)*(S(2) + m)) + d**S(3)*x**(S(3) + m)/(b*(S(3) + m)) + (b*c - a*d)**S(3)*x**(S(1) + m)*hypergeom([S(1), S(1)], [S(1) - m], a/(a + b*x))/(b**S(3)*m*(a + b*x)), c**S(2)*d*x**(S(1) + m)/(b*(S(1) + m)) + c*d*(b*c - a*d)*x**(S(1) + m)/(b**S(2)*(S(1) + m)) + d*(b*c - a*d)**S(2)*x**(S(1) + m)/(b**S(3)*(S(1) + m)) + S(2)*c*d**S(2)*x**(S(2) + m)/(b*(S(2) + m)) + d**S(2)*(b*c - a*d)*x**(S(2) + m)/(b**S(2)*(S(2) + m)) + d**S(3)*x**(S(3) + m)/(b*(S(3) + m)) + (b*c - a*d)**S(3)*x**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], - b*x/a)/(a*b**S(3)*(S(1) + m))], [x**m*(c + d*x)**S(2)/(a + b*x), x, S(5), c*d*x**(S(1) + m)/(b*(S(1) + m)) + d*(b*c - a*d)*x**(S(1) + m)/(b**S(2)*(S(1) + m)) + d**S(2)*x**(S(2) + m)/(b*(S(2) + m)) + (b*c - a*d)**S(2)*x**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], - b*x/a)/(a*b**S(2)*(S(1) + m))], [b**S(2)*x**m/(b + a*x**S(2))**S(2), x, S(2), x**(S(1) + m)*hypergeom([S(2), S(1)/S(2)*(S(1) + m)], [S(1)/S(2)*(S(3) + m)], - a*x**S(2)/b)/(S(1) + m)], [x**m/((S(1) - x*sqrt(a)/sqrt( - b))**S(2)*(S(1) + x*sqrt(a)/sqrt( - b))**S(2)), x, S(2), x**(S(1) + m)*hypergeom([S(2), S(1)/S(2)*(S(1) + m)], [S(1)/S(2)*(S(3) + m)], - a*x**S(2)/b)/(S(1) + m)], [x**S(3)*(A + B*x)*sqrt(a + b*x), x, S(2), - S(2)/S(3)*a**S(3)*(A*b - a*B)*(a + b*x)**(S(3)/S(2))/b**S(5) + S(2)/S(5)*a**S(2)*(S(3)*A*b - S(4)*a*B)*(a + b*x)**(S(5)/S(2))/b**S(5) - S(6)/S(7)*a*(A*b - S(2)*a*B)*(a + b*x)**(S(7)/S(2))/b**S(5) + S(2)/S(9)*(A*b - S(4)*a*B)*(a + b*x)**(S(9)/S(2))/b**S(5) + S(2)/S(11)*B*(a + b*x)**(S(11)/S(2))/b**S(5)], [x**S(3)*(A + B*x)/sqrt(a + b*x), x, S(2), S(2)/S(3)*a**S(2)*(S(3)*A*b - S(4)*a*B)*(a + b*x)**(S(3)/S(2))/b**S(5) - S(6)/S(5)*a*(A*b - S(2)*a*B)*(a + b*x)**(S(5)/S(2))/b**S(5) + S(2)/S(7)*(A*b - S(4)*a*B)*(a + b*x)**(S(7)/S(2))/b**S(5) + S(2)/S(9)*B*(a + b*x)**(S(9)/S(2))/b**S(5) - S(2)*a**S(3)*(A*b - a*B)*sqrt(a + b*x)/b**S(5)], [x**(S(5)/S(2))*(A + B*x)*sqrt(a + b*x), x, S(7), S(1)/S(5)*B*x**(S(7)/S(2))*(a + b*x)**(S(3)/S(2))/b - S(1)/S(128)*a**S(4)*(S(10)*A*b - S(7)*a*B)*arctanh(sqrt(b)*sqrt(x)/sqrt(a + b*x))/b**(S(9)/S(2)) - S(1)/S(192)*a**S(2)*(S(10)*A*b - S(7)*a*B)*x**(S(3)/S(2))*sqrt(a + b*x)/b**S(3) + S(1)/S(240)*a*(S(10)*A*b - S(7)*a*B)*x**(S(5)/S(2))*sqrt(a + b*x)/b**S(2) + S(1)/S(40)*(S(10)*A*b - S(7)*a*B)*x**(S(7)/S(2))*sqrt(a + b*x)/b + S(1)/S(128)*a**S(3)*(S(10)*A*b - S(7)*a*B)*sqrt(x)*sqrt(a + b*x)/b**S(4)], [x**(S(3)/S(2))*(A + B*x)*sqrt(a + b*x), x, S(6), S(1)/S(4)*B*x**(S(5)/S(2))*(a + b*x)**(S(3)/S(2))/b + S(1)/S(64)*a**S(3)*(S(8)*A*b - S(5)*a*B)*arctanh(sqrt(b)*sqrt(x)/sqrt(a + b*x))/b**(S(7)/S(2)) + S(1)/S(96)*a*(S(8)*A*b - S(5)*a*B)*x**(S(3)/S(2))*sqrt(a + b*x)/b**S(2) + S(1)/S(24)*(S(8)*A*b - S(5)*a*B)*x**(S(5)/S(2))*sqrt(a + b*x)/b - S(1)/S(64)*a**S(2)*(S(8)*A*b - S(5)*a*B)*sqrt(x)*sqrt(a + b*x)/b**S(3)], [x**(S(7)/S(2))*(A + B*x)/sqrt(a + b*x), x, S(7), S(7)/S(128)*a**S(4)*(S(10)*A*b - S(9)*a*B)*arctanh(sqrt(b)*sqrt(x)/sqrt(a + b*x))/b**(S(11)/S(2)) + S(7)/S(192)*a**S(2)*(S(10)*A*b - S(9)*a*B)*x**(S(3)/S(2))*sqrt(a + b*x)/b**S(4) - S(7)/S(240)*a*(S(10)*A*b - S(9)*a*B)*x**(S(5)/S(2))*sqrt(a + b*x)/b**S(3) + S(1)/S(40)*(S(10)*A*b - S(9)*a*B)*x**(S(7)/S(2))*sqrt(a + b*x)/b**S(2) + S(1)/S(5)*B*x**(S(9)/S(2))*sqrt(a + b*x)/b - S(7)/S(128)*a**S(3)*(S(10)*A*b - S(9)*a*B)*sqrt(x)*sqrt(a + b*x)/b**S(5)], [x**(S(5)/S(2))*(A + B*x)/sqrt(a + b*x), x, S(6), - S(5)/S(64)*a**S(3)*(S(8)*A*b - S(7)*a*B)*arctanh(sqrt(b)*sqrt(x)/sqrt(a + b*x))/b**(S(9)/S(2)) - S(5)/S(96)*a*(S(8)*A*b - S(7)*a*B)*x**(S(3)/S(2))*sqrt(a + b*x)/b**S(3) + S(1)/S(24)*(S(8)*A*b - S(7)*a*B)*x**(S(5)/S(2))*sqrt(a + b*x)/b**S(2) + S(1)/S(4)*B*x**(S(7)/S(2))*sqrt(a + b*x)/b + S(5)/S(64)*a**S(2)*(S(8)*A*b - S(7)*a*B)*sqrt(x)*sqrt(a + b*x)/b**S(4)], [x**S(3)*sqrt(a + b*x)*sqrt(c + d*x), x, S(6), S(1)/S(5)*x**S(2)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(3)/S(2))/(b*d) + S(1)/S(240)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(3)/S(2))*(S(35)*b**S(2)*c**S(2) + S(38)*a*b*c*d + S(35)*a**S(2)*d**S(2) - S(42)*b*d*(b*c + a*d)*x)/(b**S(3)*d**S(3)) + S(1)/S(128)*(b*c - a*d)**S(2)*(b*c + a*d)*(S(7)*b**S(2)*c**S(2) + S(2)*a*b*c*d + S(7)*a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(9)/S(2))*d**(S(9)/S(2))) - S(1)/S(64)*(b*c + a*d)*(S(7)*b**S(2)*c**S(2) + S(2)*a*b*c*d + S(7)*a**S(2)*d**S(2))*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b**S(4)*d**S(3)) - S(1)/S(128)*(S(7)*b**S(4)*c**S(4) + S(2)*a*b**S(3)*c**S(3)*d - S(2)*a**S(3)*b*c*d**S(3) - S(7)*a**S(4)*d**S(4))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(4)*d**S(4))], [x**S(2)*sqrt(a + b*x)*sqrt(c + d*x), x, S(6), - S(5)/S(24)*(b*c + a*d)*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(3)/S(2))/(b**S(2)*d**S(2)) + S(1)/S(4)*x*(a + b*x)**(S(3)/S(2))*(c + d*x)**(S(3)/S(2))/(b*d) + S(1)/S(64)*(b*c - a*d)**S(2)*(S(4)*a*b*c*d - S(5)*(b*c + a*d)**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(7)/S(2))*d**(S(7)/S(2))) - S(1)/S(32)*(S(4)*a*b*c*d - S(5)*(b*c + a*d)**S(2))*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b**S(3)*d**S(2)) - S(1)/S(64)*(b*c - a*d)*(S(4)*a*b*c*d - S(5)*(b*c + a*d)**S(2))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(3)*d**S(3))], [x**S(3)*sqrt(a + b*x)/sqrt(c + d*x), x, S(5), S(1)/S(64)*(b*c - a*d)*(S(35)*b**S(3)*c**S(3) + S(15)*a*b**S(2)*c**S(2)*d + S(9)*a**S(2)*b*c*d**S(2) + S(5)*a**S(3)*d**S(3))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(7)/S(2))*d**(S(9)/S(2))) + S(1)/S(4)*x**S(2)*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b*d) + S(1)/S(96)*(a + b*x)**(S(3)/S(2))*(S(35)*b**S(2)*c**S(2) + S(22)*a*b*c*d + S(15)*a**S(2)*d**S(2) - S(4)*b*d*(S(7)*b*c + S(5)*a*d)*x)*sqrt(c + d*x)/(b**S(3)*d**S(3)) - S(1)/S(64)*(S(35)*b**S(3)*c**S(3) + S(15)*a*b**S(2)*c**S(2)*d + S(9)*a**S(2)*b*c*d**S(2) + S(5)*a**S(3)*d**S(3))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(3)*d**S(4))], [x**S(2)*sqrt(a + b*x)/sqrt(c + d*x), x, S(5), - S(1)/S(8)*(b*c - a*d)*(S(5)*b**S(2)*c**S(2) + S(2)*a*b*c*d + a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*d**(S(7)/S(2))) - S(1)/S(12)*(S(5)*b*c + S(3)*a*d)*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b**S(2)*d**S(2)) + S(1)/S(3)*x*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b*d) + S(1)/S(8)*(S(5)*b**S(2)*c**S(2) + S(2)*a*b*c*d + a**S(2)*d**S(2))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(2)*d**S(3))], [x**S(2)*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x), x, S(7), - S(1)/S(40)*(S(7)*b*c + S(5)*a*d)*(a + b*x)**(S(5)/S(2))*(c + d*x)**(S(3)/S(2))/(b**S(2)*d**S(2)) + S(1)/S(5)*x*(a + b*x)**(S(5)/S(2))*(c + d*x)**(S(3)/S(2))/(b*d) + S(1)/S(128)*(b*c - a*d)**S(3)*(S(7)*b**S(2)*c**S(2) + S(6)*a*b*c*d + S(3)*a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(7)/S(2))*d**(S(9)/S(2))) + S(1)/S(192)*(b*c - a*d)*(S(7)*b**S(2)*c**S(2) + S(6)*a*b*c*d + S(3)*a**S(2)*d**S(2))*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b**S(3)*d**S(3)) + S(1)/S(48)*(S(7)*b**S(2)*c**S(2) + S(6)*a*b*c*d + S(3)*a**S(2)*d**S(2))*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x)/(b**S(3)*d**S(2)) - S(1)/S(128)*(b*c - a*d)**S(2)*(S(7)*b**S(2)*c**S(2) + S(6)*a*b*c*d + S(3)*a**S(2)*d**S(2))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(3)*d**S(4))], [x*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x), x, S(6), S(1)/S(4)*(a + b*x)**(S(5)/S(2))*(c + d*x)**(S(3)/S(2))/(b*d) - S(1)/S(64)*(b*c - a*d)**S(3)*(S(5)*b*c + S(3)*a*d)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*d**(S(7)/S(2))) - S(1)/S(96)*(b*c - a*d)*(S(5)*b*c + S(3)*a*d)*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b**S(2)*d**S(2)) - S(1)/S(24)*(S(5)*b*c + S(3)*a*d)*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x)/(b**S(2)*d) + S(1)/S(64)*(b*c - a*d)**S(2)*(S(5)*b*c + S(3)*a*d)*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(2)*d**S(3))], [x**S(2)*(a + b*x)**(S(3)/S(2))/sqrt(c + d*x), x, S(6), S(1)/S(64)*(b*c - a*d)**S(2)*(S(35)*b**S(2)*c**S(2) + S(10)*a*b*c*d + S(3)*a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*d**(S(9)/S(2))) + S(1)/S(96)*(S(35)*b**S(2)*c**S(2) + S(10)*a*b*c*d + S(3)*a**S(2)*d**S(2))*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b**S(2)*d**S(3)) - S(1)/S(24)*(S(7)*b*c + S(3)*a*d)*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x)/(b**S(2)*d**S(2)) + S(1)/S(4)*x*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x)/(b*d) - S(1)/S(64)*(b*c - a*d)*(S(35)*b**S(2)*c**S(2) + S(10)*a*b*c*d + S(3)*a**S(2)*d**S(2))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(2)*d**S(4))], [x*(a + b*x)**(S(3)/S(2))/sqrt(c + d*x), x, S(5), - S(1)/S(8)*(b*c - a*d)**S(2)*(S(5)*b*c + a*d)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(3)/S(2))*d**(S(7)/S(2))) - S(1)/S(12)*(S(5)*b*c + a*d)*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b*d**S(2)) + S(1)/S(3)*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x)/(b*d) + S(1)/S(8)*(b*c - a*d)*(S(5)*b*c + a*d)*sqrt(a + b*x)*sqrt(c + d*x)/(b*d**S(3))], [x**S(2)*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x), x, S(8), - S(1)/S(60)*(S(9)*b*c + S(5)*a*d)*(a + b*x)**(S(7)/S(2))*(c + d*x)**(S(3)/S(2))/(b**S(2)*d**S(2)) + S(1)/S(6)*x*(a + b*x)**(S(7)/S(2))*(c + d*x)**(S(3)/S(2))/(b*d) - S(1)/S(512)*(b*c - a*d)**S(4)*(S(21)*b**S(2)*c**S(2) + S(14)*a*b*c*d + S(5)*a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(7)/S(2))*d**(S(11)/S(2))) - S(1)/S(768)*(b*c - a*d)**S(2)*(S(21)*b**S(2)*c**S(2) + S(14)*a*b*c*d + S(5)*a**S(2)*d**S(2))*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b**S(3)*d**S(4)) + S(1)/S(960)*(b*c - a*d)*(S(21)*b**S(2)*c**S(2) + S(14)*a*b*c*d + S(5)*a**S(2)*d**S(2))*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x)/(b**S(3)*d**S(3)) + S(1)/S(160)*(S(21)*b**S(2)*c**S(2) + S(14)*a*b*c*d + S(5)*a**S(2)*d**S(2))*(a + b*x)**(S(7)/S(2))*sqrt(c + d*x)/(b**S(3)*d**S(2)) + S(1)/S(512)*(b*c - a*d)**S(3)*(S(21)*b**S(2)*c**S(2) + S(14)*a*b*c*d + S(5)*a**S(2)*d**S(2))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(3)*d**S(5))], [x*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x), x, S(7), S(1)/S(5)*(a + b*x)**(S(7)/S(2))*(c + d*x)**(S(3)/S(2))/(b*d) + S(1)/S(128)*(b*c - a*d)**S(4)*(S(7)*b*c + S(3)*a*d)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*d**(S(9)/S(2))) + S(1)/S(192)*(b*c - a*d)**S(2)*(S(7)*b*c + S(3)*a*d)*(a + b*x)**(S(3)/S(2))*sqrt(c + d*x)/(b**S(2)*d**S(3)) - S(1)/S(240)*(b*c - a*d)*(S(7)*b*c + S(3)*a*d)*(a + b*x)**(S(5)/S(2))*sqrt(c + d*x)/(b**S(2)*d**S(2)) - S(1)/S(40)*(S(7)*b*c + S(3)*a*d)*(a + b*x)**(S(7)/S(2))*sqrt(c + d*x)/(b**S(2)*d) - S(1)/S(128)*(b*c - a*d)**S(3)*(S(7)*b*c + S(3)*a*d)*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(2)*d**S(4))], [x**S(2)*sqrt(c + d*x)/sqrt(a + b*x), x, S(5), S(1)/S(8)*(b*c - a*d)*(b**S(2)*c**S(2) + S(2)*a*b*c*d + S(5)*a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(7)/S(2))*d**(S(5)/S(2))) - S(1)/S(12)*(S(3)*b*c + S(5)*a*d)*(c + d*x)**(S(3)/S(2))*sqrt(a + b*x)/(b**S(2)*d**S(2)) + S(1)/S(3)*x*(c + d*x)**(S(3)/S(2))*sqrt(a + b*x)/(b*d) + S(1)/S(8)*(b**S(2)*c**S(2) + S(2)*a*b*c*d + S(5)*a**S(2)*d**S(2))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(3)*d**S(2))], [x*sqrt(c + d*x)/sqrt(a + b*x), x, S(4), - S(1)/S(4)*(b*c - a*d)*(b*c + S(3)*a*d)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*d**(S(3)/S(2))) + S(1)/S(2)*(c + d*x)**(S(3)/S(2))*sqrt(a + b*x)/(b*d) - S(1)/S(4)*(b*c + S(3)*a*d)*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(2)*d)], [x**S(3)/(sqrt(a + b*x)*sqrt(c + d*x)), x, S(4), - S(1)/S(8)*(b*c + a*d)*(S(5)*b**S(2)*c**S(2) - S(2)*a*b*c*d + S(5)*a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(7)/S(2))*d**(S(7)/S(2))) + S(1)/S(3)*x**S(2)*sqrt(a + b*x)*sqrt(c + d*x)/(b*d) + S(1)/S(24)*(S(15)*b**S(2)*c**S(2) + S(14)*a*b*c*d + S(15)*a**S(2)*d**S(2) - S(10)*b*d*(b*c + a*d)*x)*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(3)*d**S(3))], [x**S(2)/(sqrt(a + b*x)*sqrt(c + d*x)), x, S(4), - S(1)/S(4)*(S(4)*a*b*c*d - S(3)*(b*c + a*d)**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*d**(S(5)/S(2))) - S(3)/S(4)*(b*c + a*d)*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(2)*d**S(2)) + S(1)/S(2)*x*sqrt(a + b*x)*sqrt(c + d*x)/(b*d)], [x**S(4)/((a + b*x)**(S(3)/S(2))*(c + d*x)**(S(3)/S(2))), x, S(5), S(3)/S(4)*(S(5)*b**S(2)*c**S(2) + S(6)*a*b*c*d + S(5)*a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(7)/S(2))*d**(S(7)/S(2))) + S(2)*a*x**S(3)/(b*(b*c - a*d)*sqrt(a + b*x)*sqrt(c + d*x)) - S(2)*c*(b*c + a*d)*x**S(2)*sqrt(a + b*x)/(b*d*(b*c - a*d)**S(2)*sqrt(c + d*x)) - S(1)/S(4)*((b*c + a*d)*(S(15)*b**S(2)*c**S(2) - S(22)*a*b*c*d + S(15)*a**S(2)*d**S(2)) - S(2)*b*d*(S(5)*b**S(2)*c**S(2) - S(2)*a*b*c*d + S(5)*a**S(2)*d**S(2))*x)*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(3)*d**S(3)*(b*c - a*d)**S(2))], [x**S(3)/((a + b*x)**(S(3)/S(2))*(c + d*x)**(S(3)/S(2))), x, S(4), - S(3)*(b*c + a*d)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*d**(S(5)/S(2))) + S(2)*a*x**S(2)/(b*(b*c - a*d)*sqrt(a + b*x)*sqrt(c + d*x)) + (c*(S(3)*b**S(2)*c**S(2) - S(2)*a*b*c*d + S(3)*a**S(2)*d**S(2)) + d*(b*c - S(3)*a*d)*(b*c - a*d)*x)*sqrt(a + b*x)/(b**S(2)*d**S(2)*(b*c - a*d)**S(2)*sqrt(c + d*x))], [x**S(3)*(a + b*x)**(S(1)/S(4))/(c + d*x)**(S(1)/S(4)), x, S(7), - S(1)/S(512)*(S(195)*b**S(3)*c**S(3) + S(135)*a*b**S(2)*c**S(2)*d + S(105)*a**S(2)*b*c*d**S(2) + S(77)*a**S(3)*d**S(3))*(a + b*x)**(S(1)/S(4))*(c + d*x)**(S(3)/S(4))/(b**S(3)*d**S(4)) + S(1)/S(4)*x**S(2)*(a + b*x)**(S(5)/S(4))*(c + d*x)**(S(3)/S(4))/(b*d) + S(1)/S(384)*(a + b*x)**(S(5)/S(4))*(c + d*x)**(S(3)/S(4))*(S(117)*b**S(2)*c**S(2) + S(94)*a*b*c*d + S(77)*a**S(2)*d**S(2) - S(8)*b*d*(S(13)*b*c + S(11)*a*d)*x)/(b**S(3)*d**S(3)) + S(1)/S(1024)*(b*c - a*d)*(S(195)*b**S(3)*c**S(3) + S(135)*a*b**S(2)*c**S(2)*d + S(105)*a**S(2)*b*c*d**S(2) + S(77)*a**S(3)*d**S(3))*arctan(d**(S(1)/S(4))*(a + b*x)**(S(1)/S(4))/(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))))/(b**(S(15)/S(4))*d**(S(17)/S(4))) + S(1)/S(1024)*(b*c - a*d)*(S(195)*b**S(3)*c**S(3) + S(135)*a*b**S(2)*c**S(2)*d + S(105)*a**S(2)*b*c*d**S(2) + S(77)*a**S(3)*d**S(3))*arctanh(d**(S(1)/S(4))*(a + b*x)**(S(1)/S(4))/(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))))/(b**(S(15)/S(4))*d**(S(17)/S(4)))], [x**S(2)*(a + b*x)**(S(1)/S(4))/(c + d*x)**(S(1)/S(4)), x, S(7), S(1)/S(32)*(S(15)*b**S(2)*c**S(2) + S(10)*a*b*c*d + S(7)*a**S(2)*d**S(2))*(a + b*x)**(S(1)/S(4))*(c + d*x)**(S(3)/S(4))/(b**S(2)*d**S(3)) - S(1)/S(24)*(S(9)*b*c + S(7)*a*d)*(a + b*x)**(S(5)/S(4))*(c + d*x)**(S(3)/S(4))/(b**S(2)*d**S(2)) + S(1)/S(3)*x*(a + b*x)**(S(5)/S(4))*(c + d*x)**(S(3)/S(4))/(b*d) - S(1)/S(64)*(b*c - a*d)*(S(15)*b**S(2)*c**S(2) + S(10)*a*b*c*d + S(7)*a**S(2)*d**S(2))*arctan(d**(S(1)/S(4))*(a + b*x)**(S(1)/S(4))/(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))))/(b**(S(11)/S(4))*d**(S(13)/S(4))) - S(1)/S(64)*(b*c - a*d)*(S(15)*b**S(2)*c**S(2) + S(10)*a*b*c*d + S(7)*a**S(2)*d**S(2))*arctanh(d**(S(1)/S(4))*(a + b*x)**(S(1)/S(4))/(b**(S(1)/S(4))*(c + d*x)**(S(1)/S(4))))/(b**(S(11)/S(4))*d**(S(13)/S(4)))], [x*(a + b*x)**n*(c + d*x), x, S(2), - a*(b*c - a*d)*(a + b*x)**(S(1) + n)/(b**S(3)*(S(1) + n)) + (b*c - S(2)*a*d)*(a + b*x)**(S(2) + n)/(b**S(3)*(S(2) + n)) + d*(a + b*x)**(S(3) + n)/(b**S(3)*(S(3) + n))], [x**S(2)*(a + b*x)**n/(c + d*x), x, S(3), - (b*c + a*d)*(a + b*x)**(S(1) + n)/(b**S(2)*d**S(2)*(S(1) + n)) + (a + b*x)**(S(2) + n)/(b**S(2)*d*(S(2) + n)) + c**S(2)*(a + b*x)**(S(1) + n)*hypergeom([S(1), S(1) + n], [S(2) + n], - d*(a + b*x)/(b*c - a*d))/(d**S(2)*(b*c - a*d)*(S(1) + n))], [x*(a + b*x)**n/(c + d*x), x, S(2), (a + b*x)**(S(1) + n)/(b*d*(S(1) + n)) - c*(a + b*x)**(S(1) + n)*hypergeom([S(1), S(1) + n], [S(2) + n], - d*(a + b*x)/(b*c - a*d))/(d*(b*c - a*d)*(S(1) + n))], [x**m*(S(3) - S(2)*a*x)**(S(2) + n)*(S(6) + S(4)*a*x)**n, x, S(8), S(2)**n*S(9)**(S(1) + n)*x**(S(1) + m)*hypergeom([S(1)/S(2)*(S(1) + m), - n], [S(1)/S(2)*(S(3) + m)], S(4)/S(9)*a**S(2)*x**S(2))/(S(1) + m) - S(2)**(S(2) + n)*S(3)**(S(1) + S(2)*n)*a*x**(S(2) + m)*hypergeom([S(1)/S(2)*(S(2) + m), - n], [S(1)/S(2)*(S(4) + m)], S(4)/S(9)*a**S(2)*x**S(2))/(S(2) + m) + S(2)**(S(2) + n)*S(9)**n*a**S(2)*x**(S(3) + m)*hypergeom([S(1)/S(2)*(S(3) + m), - n], [S(1)/S(2)*(S(5) + m)], S(4)/S(9)*a**S(2)*x**S(2))/(S(3) + m)], [x**m*(S(3) - S(2)*a*x)**(S(1) + n)*(S(6) + S(4)*a*x)**n, x, S(5), S(2)**n*S(3)**(S(1) + S(2)*n)*x**(S(1) + m)*hypergeom([S(1)/S(2)*(S(1) + m), - n], [S(1)/S(2)*(S(3) + m)], S(4)/S(9)*a**S(2)*x**S(2))/(S(1) + m) - S(2)**(S(1) + n)*S(9)**n*a*x**(S(2) + m)*hypergeom([S(1)/S(2)*(S(2) + m), - n], [S(1)/S(2)*(S(4) + m)], S(4)/S(9)*a**S(2)*x**S(2))/(S(2) + m)], [(a + b*x)*(A + B*x)*(d + e*x)**m, x, S(2), (b*d - a*e)*(B*d - A*e)*(d + e*x)**(S(1) + m)/(e**S(3)*(S(1) + m)) - (S(2)*b*B*d - A*b*e - a*B*e)*(d + e*x)**(S(2) + m)/(e**S(3)*(S(2) + m)) + b*B*(d + e*x)**(S(3) + m)/(e**S(3)*(S(3) + m))], [(A + B*x)*(d + e*x)**S(5)/(a + b*x), x, S(2), (A*b - a*B)*e*(b*d - a*e)**S(4)*x/b**S(6) + S(1)/S(2)*(A*b - a*B)*(b*d - a*e)**S(3)*(d + e*x)**S(2)/b**S(5) + S(1)/S(3)*(A*b - a*B)*(b*d - a*e)**S(2)*(d + e*x)**S(3)/b**S(4) + S(1)/S(4)*(A*b - a*B)*(b*d - a*e)*(d + e*x)**S(4)/b**S(3) + S(1)/S(5)*(A*b - a*B)*(d + e*x)**S(5)/b**S(2) + S(1)/S(6)*B*(d + e*x)**S(6)/(b*e) + (A*b - a*B)*(b*d - a*e)**S(5)*log(a + b*x)/b**S(7)], [(S(1) - S(2)*x)*(S(2) + S(3)*x)**m*(S(3) + S(5)*x), x, S(2), - S(7)/S(27)*(S(2) + S(3)*x)**(S(1) + m)/(S(1) + m) + S(37)/S(27)*(S(2) + S(3)*x)**(S(2) + m)/(S(2) + m) - S(10)/S(27)*(S(2) + S(3)*x)**(S(3) + m)/(S(3) + m)], [(S(1) - S(2)*x)*(S(2) + S(3)*x)**S(8)*(S(3) + S(5)*x), x, S(2), - S(7)/S(243)*(S(2) + S(3)*x)**S(9) + S(37)/S(270)*(S(2) + S(3)*x)**S(10) - S(10)/S(297)*(S(2) + S(3)*x)**S(11)], [(S(1) - S(2)*x)*(S(2) + S(3)*x)**m/(S(3) + S(5)*x), x, S(2), - S(2)/S(15)*(S(2) + S(3)*x)**(S(1) + m)/(S(1) + m) - S(11)/S(5)*(S(2) + S(3)*x)**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], S(5)*(S(2) + S(3)*x))/(S(1) + m)], [(S(1) - S(2)*x)*(S(2) + S(3)*x)**S(6)/(S(3) + S(5)*x), x, S(2), S(1666663)/S(78125)*x + S(1777779)/S(31250)*x**S(2) + S(152469)/S(3125)*x**S(3) - S(152469)/S(2500)*x**S(4) - S(106677)/S(625)*x**S(5) - S(7047)/S(50)*x**S(6) - S(1458)/S(35)*x**S(7) + S(11)/S(390625)*log(S(3) + S(5)*x)], [(S(1) - S(2)*x)**S(2)*(S(2) + S(3)*x)**S(8)*(S(3) + S(5)*x), x, S(2), - S(49)/S(729)*(S(2) + S(3)*x)**S(9) + S(91)/S(270)*(S(2) + S(3)*x)**S(10) - S(16)/S(99)*(S(2) + S(3)*x)**S(11) + S(5)/S(243)*(S(2) + S(3)*x)**S(12)], [(S(1) - S(2)*x)**S(2)*(S(2) + S(3)*x)**S(7)*(S(3) + S(5)*x), x, S(2), - S(49)/S(648)*(S(2) + S(3)*x)**S(8) + S(91)/S(243)*(S(2) + S(3)*x)**S(9) - S(8)/S(45)*(S(2) + S(3)*x)**S(10) + S(20)/S(891)*(S(2) + S(3)*x)**S(11)], [(S(1) - S(2)*x)**S(2)*(S(2) + S(3)*x)**S(7)/(S(3) + S(5)*x), x, S(2), S(83333293)/S(1953125)*x + S(80555569)/S(781250)*x**S(2) + S(1327159)/S(78125)*x**S(3) - S(20577159)/S(62500)*x**S(4) - S(7315947)/S(15625)*x**S(5) + S(130383)/S(1250)*x**S(6) + S(672867)/S(875)*x**S(7) + S(16767)/S(25)*x**S(8) + S(972)/S(5)*x**S(9) + S(121)/S(9765625)*log(S(3) + S(5)*x)], [(S(1) - S(2)*x)**S(2)*(S(2) + S(3)*x)**S(6)/(S(3) + S(5)*x), x, S(2), S(8333293)/S(390625)*x + S(5555569)/S(156250)*x**S(2) - S(422841)/S(15625)*x**S(3) - S(1677159)/S(12500)*x**S(4) - S(228447)/S(3125)*x**S(5) + S(35883)/S(250)*x**S(6) + S(34992)/S(175)*x**S(7) + S(729)/S(10)*x**S(8) + S(121)/S(1953125)*log(S(3) + S(5)*x)], [(S(1) - S(2)*x)**S(3)*(S(2) + S(3)*x)**S(8)*(S(3) + S(5)*x), x, S(2), - S(343)/S(2187)*(S(2) + S(3)*x)**S(9) + S(2009)/S(2430)*(S(2) + S(3)*x)**S(10) - S(518)/S(891)*(S(2) + S(3)*x)**S(11) + S(107)/S(729)*(S(2) + S(3)*x)**S(12) - S(40)/S(3159)*(S(2) + S(3)*x)**S(13)], [(S(1) - S(2)*x)**S(3)*(S(2) + S(3)*x)**S(7)*(S(3) + S(5)*x), x, S(2), S(384)*x + S(1184)*x**S(2) + S(480)*x**S(3) - S(5148)*x**S(4) - S(48968)/S(5)*x**S(5) + S(3514)*x**S(6) + S(29106)*x**S(7) + S(208035)/S(8)*x**S(8) - S(15507)*x**S(9) - S(217971)/S(5)*x**S(10) - S(329508)/S(11)*x**S(11) - S(7290)*x**S(12)], [(S(1) - S(2)*x)**S(3)*(S(2) + S(3)*x)**S(6)/(S(3) + S(5)*x), x, S(2), S(41666223)/S(1953125)*x + S(11111259)/S(781250)*x**S(2) - S(17453753)/S(234375)*x**S(3) - S(5848749)/S(62500)*x**S(4) + S(2212083)/S(15625)*x**S(5) + S(331713)/S(1250)*x**S(6) - S(40338)/S(875)*x**S(7) - S(13851)/S(50)*x**S(8) - S(648)/S(5)*x**S(9) + S(1331)/S(9765625)*log(S(3) + S(5)*x)], [(S(1) - S(2)*x)**S(3)*(S(2) + S(3)*x)**S(5)/(S(3) + S(5)*x), x, S(2), S(4166223)/S(390625)*x - S(138741)/S(156250)*x**S(2) - S(1703753)/S(46875)*x**S(3) - S(73749)/S(12500)*x**S(4) + S(243333)/S(3125)*x**S(5) + S(4419)/S(125)*x**S(6) - S(11988)/S(175)*x**S(7) - S(243)/S(5)*x**S(8) + S(1331)/S(1953125)*log(S(3) + S(5)*x)], [(S(2) + S(3)*x)**m*(S(3) + S(5)*x)/(S(1) - S(2)*x), x, S(2), - S(5)/S(6)*(S(2) + S(3)*x)**(S(1) + m)/(S(1) + m) + S(11)/S(14)*(S(2) + S(3)*x)**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], S(2)/S(7)*(S(2) + S(3)*x))/(S(1) + m)], [(S(2) + S(3)*x)**S(8)*(S(3) + S(5)*x)/(S(1) - S(2)*x), x, S(2), - S(63019595)/S(512)*x - S(60332619)/S(512)*x**S(2) - S(17391129)/S(128)*x**S(3) - S(37722699)/S(256)*x**S(4) - S(21272139)/S(160)*x**S(5) - S(2929689)/S(32)*x**S(6) - S(353565)/S(8)*x**S(7) - S(422091)/S(32)*x**S(8) - S(3645)/S(2)*x**S(9) - S(63412811)/S(1024)*log(S(1) - S(2)*x)], [(S(2) + S(3)*x)**m/((S(1) - S(2)*x)*(S(3) + S(5)*x)), x, S(3), S(2)/S(77)*(S(2) + S(3)*x)**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], S(2)/S(7)*(S(2) + S(3)*x))/(S(1) + m) - S(5)/S(11)*(S(2) + S(3)*x)**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], S(5)*(S(2) + S(3)*x))/(S(1) + m)], [(S(2) + S(3)*x)**S(8)*(S(3) + S(5)*x)/(S(1) - S(2)*x)**S(2), x, S(2), S(63412811)/S(1024)/(S(1) - S(2)*x) + S(91609881)/S(256)*x + S(122887143)/S(512)*x**S(2) + S(5892813)/S(32)*x**S(3) + S(32991057)/S(256)*x**S(4) + S(5859459)/S(80)*x**S(5) + S(976617)/S(32)*x**S(6) + S(56862)/S(7)*x**S(7) + S(32805)/S(32)*x**S(8) + S(246239357)/S(1024)*log(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(7)*(S(3) + S(5)*x)/(S(1) - S(2)*x)**S(2), x, S(2), S(9058973)/S(512)/(S(1) - S(2)*x) + S(22333965)/S(256)*x + S(873207)/S(16)*x**S(2) + S(2399985)/S(64)*x**S(3) + S(1423899)/S(64)*x**S(4) + S(793881)/S(80)*x**S(5) + S(11421)/S(4)*x**S(6) + S(10935)/S(28)*x**S(7) + S(15647317)/S(256)*log(S(1) - S(2)*x)], [(a + b*x)**m/(e + f*x)**S(2), x, S(1), b*(a + b*x)**(S(1) + m)*hypergeom([S(2), S(1) + m], [S(2) + m], - f*(a + b*x)/(b*e - a*f))/((b*e - a*f)**S(2)*(S(1) + m))], [(a + b*x)**m/((c + d*x)*(e + f*x)**S(2)), x, S(4), - f*(a + b*x)**(S(1) + m)/((b*e - a*f)*(d*e - c*f)*(e + f*x)) + d**S(2)*(a + b*x)**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], - d*(a + b*x)/(b*c - a*d))/((b*c - a*d)*(d*e - c*f)**S(2)*(S(1) + m)) + f*(a*d*f - b*(d*e*(S(1) - m) + c*f*m))*(a + b*x)**(S(1) + m)*hypergeom([S(1), S(1) + m], [S(2) + m], - f*(a + b*x)/(b*e - a*f))/((b*e - a*f)**S(2)*(d*e - c*f)**S(2)*(S(1) + m))], [(S(2) + S(3)*x)**S(7)*(S(3) + S(5)*x)/(S(1) - S(2)*x)**S(3), x, S(2), S(9058973)/S(1024)/(S(1) - S(2)*x)**S(2) + ( - S(15647317)/S(256))/(S(1) - S(2)*x) - S(24960933)/S(256)*x - S(10989621)/S(256)*x**S(2) - S(631611)/S(32)*x**S(3) - S(235467)/S(32)*x**S(4) - S(147987)/S(80)*x**S(5) - S(3645)/S(16)*x**S(6) - S(23647449)/S(256)*log(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(8)/((S(1) - S(2)*x)**S(3)*(S(3) + S(5)*x)), x, S(2), S(5764801)/S(5632)/(S(1) - S(2)*x)**S(2) + ( - S(188591347)/S(30976))/(S(1) - S(2)*x) - S(2941619571)/S(400000)*x - S(110180817)/S(40000)*x**S(2) - S(124416)/S(125)*x**S(3) - S(408969)/S(1600)*x**S(4) - S(6561)/S(200)*x**S(5) - S(2644396573)/S(340736)*log(S(1) - S(2)*x) + S(1)/S(20796875)*log(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(7)/((S(1) - S(2)*x)**S(3)*(S(3) + S(5)*x)), x, S(2), S(823543)/S(2816)/(S(1) - S(2)*x)**S(2) + ( - S(5764801)/S(3872))/(S(1) - S(2)*x) - S(26161299)/S(20000)*x - S(792423)/S(2000)*x**S(2) - S(40581)/S(400)*x**S(3) - S(2187)/S(160)*x**S(4) - S(269063263)/S(170368)*log(S(1) - S(2)*x) + S(1)/S(4159375)*log(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(6)*(S(3) + S(5)*x)*sqrt(S(1) - S(2)*x), x, S(2), - S(1294139)/S(384)*(S(1) - S(2)*x)**(S(3)/S(2)) + S(3916031)/S(640)*(S(1) - S(2)*x)**(S(5)/S(2)) - S(725445)/S(128)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(406455)/S(128)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(1580985)/S(1408)*(S(1) - S(2)*x)**(S(11)/S(2)) + S(409941)/S(1664)*(S(1) - S(2)*x)**(S(13)/S(2)) - S(19683)/S(640)*(S(1) - S(2)*x)**(S(15)/S(2)) + S(3645)/S(2176)*(S(1) - S(2)*x)**(S(17)/S(2))], [(S(2) + S(3)*x)**S(5)*(S(3) + S(5)*x)*sqrt(S(1) - S(2)*x), x, S(2), - S(184877)/S(192)*(S(1) - S(2)*x)**(S(3)/S(2)) + S(12005)/S(8)*(S(1) - S(2)*x)**(S(5)/S(2)) - S(74235)/S(64)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(4165)/S(8)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(97335)/S(704)*(S(1) - S(2)*x)**(S(11)/S(2)) + S(81)/S(4)*(S(1) - S(2)*x)**(S(13)/S(2)) - S(81)/S(64)*(S(1) - S(2)*x)**(S(15)/S(2))], [(S(2) + S(3)*x)**S(4)*sqrt(S(1) - S(2)*x)/(S(3) + S(5)*x), x, S(5), - S(45473)/S(5000)*(S(1) - S(2)*x)**(S(3)/S(2)) + S(34371)/S(5000)*(S(1) - S(2)*x)**(S(5)/S(2)) - S(2889)/S(1400)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(9)/S(40)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(2)/S(3125)*arctanh(sqrt(S(5)/S(11))*sqrt(S(1) - S(2)*x))*sqrt(S(11)/S(5)) + S(2)/S(3125)*sqrt(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(3)*sqrt(S(1) - S(2)*x)/(S(3) + S(5)*x), x, S(5), - S(1299)/S(500)*(S(1) - S(2)*x)**(S(3)/S(2)) + S(162)/S(125)*(S(1) - S(2)*x)**(S(5)/S(2)) - S(27)/S(140)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(2)/S(625)*arctanh(sqrt(S(5)/S(11))*sqrt(S(1) - S(2)*x))*sqrt(S(11)/S(5)) + S(2)/S(625)*sqrt(S(1) - S(2)*x)], [(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(6)*(S(3) + S(5)*x), x, S(2), - S(1294139)/S(640)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(559433)/S(128)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(564235)/S(128)*(S(1) - S(2)*x)**(S(9)/S(2)) + S(3658095)/S(1408)*(S(1) - S(2)*x)**(S(11)/S(2)) - S(1580985)/S(1664)*(S(1) - S(2)*x)**(S(13)/S(2)) + S(136647)/S(640)*(S(1) - S(2)*x)**(S(15)/S(2)) - S(59049)/S(2176)*(S(1) - S(2)*x)**(S(17)/S(2)) + S(3645)/S(2432)*(S(1) - S(2)*x)**(S(19)/S(2))], [(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(5)*(S(3) + S(5)*x), x, S(2), - S(184877)/S(320)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(8575)/S(8)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(173215)/S(192)*(S(1) - S(2)*x)**(S(9)/S(2)) + S(37485)/S(88)*(S(1) - S(2)*x)**(S(11)/S(2)) - S(97335)/S(832)*(S(1) - S(2)*x)**(S(13)/S(2)) + S(351)/S(20)*(S(1) - S(2)*x)**(S(15)/S(2)) - S(1215)/S(1088)*(S(1) - S(2)*x)**(S(17)/S(2))], [(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(6)/(S(3) + S(5)*x), x, S(6), S(2)/S(234375)*(S(1) - S(2)*x)**(S(3)/S(2)) - S(167115051)/S(2500000)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(70752609)/S(700000)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(665817)/S(10000)*(S(1) - S(2)*x)**(S(9)/S(2)) + S(507627)/S(22000)*(S(1) - S(2)*x)**(S(11)/S(2)) - S(43011)/S(10400)*(S(1) - S(2)*x)**(S(13)/S(2)) + S(243)/S(800)*(S(1) - S(2)*x)**(S(15)/S(2)) - S(22)/S(390625)*arctanh(sqrt(S(5)/S(11))*sqrt(S(1) - S(2)*x))*sqrt(S(11)/S(5)) + S(22)/S(390625)*sqrt(S(1) - S(2)*x)], [(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(5)/(S(3) + S(5)*x), x, S(6), S(2)/S(46875)*(S(1) - S(2)*x)**(S(3)/S(2)) - S(4774713)/S(250000)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(806121)/S(35000)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(5673)/S(500)*(S(1) - S(2)*x)**(S(9)/S(2)) + S(5751)/S(2200)*(S(1) - S(2)*x)**(S(11)/S(2)) - S(243)/S(1040)*(S(1) - S(2)*x)**(S(13)/S(2)) - S(22)/S(78125)*arctanh(sqrt(S(5)/S(11))*sqrt(S(1) - S(2)*x))*sqrt(S(11)/S(5)) + S(22)/S(78125)*sqrt(S(1) - S(2)*x)], [(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(6)*(S(3) + S(5)*x), x, S(2), - S(184877)/S(128)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(3916031)/S(1152)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(5078115)/S(1408)*(S(1) - S(2)*x)**(S(11)/S(2)) + S(3658095)/S(1664)*(S(1) - S(2)*x)**(S(13)/S(2)) - S(105399)/S(128)*(S(1) - S(2)*x)**(S(15)/S(2)) + S(409941)/S(2176)*(S(1) - S(2)*x)**(S(17)/S(2)) - S(59049)/S(2432)*(S(1) - S(2)*x)**(S(19)/S(2)) + S(1215)/S(896)*(S(1) - S(2)*x)**(S(21)/S(2))], [(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(5)*(S(3) + S(5)*x), x, S(2), - S(26411)/S(64)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(60025)/S(72)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(519645)/S(704)*(S(1) - S(2)*x)**(S(11)/S(2)) + S(37485)/S(104)*(S(1) - S(2)*x)**(S(13)/S(2)) - S(6489)/S(64)*(S(1) - S(2)*x)**(S(15)/S(2)) + S(1053)/S(68)*(S(1) - S(2)*x)**(S(17)/S(2)) - S(1215)/S(1216)*(S(1) - S(2)*x)**(S(19)/S(2))], [(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(4)/(S(3) + S(5)*x), x, S(7), S(22)/S(46875)*(S(1) - S(2)*x)**(S(3)/S(2)) + S(2)/S(15625)*(S(1) - S(2)*x)**(S(5)/S(2)) - S(136419)/S(35000)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(3819)/S(1000)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(2889)/S(2200)*(S(1) - S(2)*x)**(S(11)/S(2)) + S(81)/S(520)*(S(1) - S(2)*x)**(S(13)/S(2)) - S(242)/S(78125)*arctanh(sqrt(S(5)/S(11))*sqrt(S(1) - S(2)*x))*sqrt(S(11)/S(5)) + S(242)/S(78125)*sqrt(S(1) - S(2)*x)], [(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(3)/(S(3) + S(5)*x), x, S(7), S(22)/S(9375)*(S(1) - S(2)*x)**(S(3)/S(2)) + S(2)/S(3125)*(S(1) - S(2)*x)**(S(5)/S(2)) - S(3897)/S(3500)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(18)/S(25)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(27)/S(220)*(S(1) - S(2)*x)**(S(11)/S(2)) - S(242)/S(15625)*arctanh(sqrt(S(5)/S(11))*sqrt(S(1) - S(2)*x))*sqrt(S(11)/S(5)) + S(242)/S(15625)*sqrt(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(5)*(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x), x, S(2), S(60025)/S(24)*(S(1) - S(2)*x)**(S(3)/S(2)) - S(103929)/S(64)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(5355)/S(8)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(10815)/S(64)*(S(1) - S(2)*x)**(S(9)/S(2)) + S(1053)/S(44)*(S(1) - S(2)*x)**(S(11)/S(2)) - S(1215)/S(832)*(S(1) - S(2)*x)**(S(13)/S(2)) - S(184877)/S(64)*sqrt(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(4)*(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x), x, S(2), S(57281)/S(96)*(S(1) - S(2)*x)**(S(3)/S(2)) - S(24843)/S(80)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(1539)/S(16)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(519)/S(32)*(S(1) - S(2)*x)**(S(9)/S(2)) + S(405)/S(352)*(S(1) - S(2)*x)**(S(11)/S(2)) - S(26411)/S(32)*sqrt(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(5)/((S(3) + S(5)*x)*sqrt(S(1) - S(2)*x)), x, S(4), S(268707)/S(5000)*(S(1) - S(2)*x)**(S(3)/S(2)) - S(51057)/S(2500)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(5751)/S(1400)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(27)/S(80)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(2)/S(3125)*arctanh(sqrt(S(5)/S(11))*sqrt(S(1) - S(2)*x))/sqrt(S(55)) - S(4774713)/S(50000)*sqrt(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(7)*(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(3)/S(2)), x, S(2), - S(7882483)/S(128)*(S(1) - S(2)*x)**(S(3)/S(2)) + S(4084101)/S(128)*(S(1) - S(2)*x)**(S(5)/S(2)) - S(787185)/S(64)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(422919)/S(128)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(821583)/S(1408)*(S(1) - S(2)*x)**(S(11)/S(2)) + S(101331)/S(1664)*(S(1) - S(2)*x)**(S(13)/S(2)) - S(729)/S(256)*(S(1) - S(2)*x)**(S(15)/S(2)) + S(9058973)/S(256)/sqrt(S(1) - S(2)*x) + S(15647317)/S(128)*sqrt(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(6)*(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(3)/S(2)), x, S(2), - S(1692705)/S(128)*(S(1) - S(2)*x)**(S(3)/S(2)) + S(731619)/S(128)*(S(1) - S(2)*x)**(S(5)/S(2)) - S(225855)/S(128)*(S(1) - S(2)*x)**(S(7)/S(2)) + S(45549)/S(128)*(S(1) - S(2)*x)**(S(9)/S(2)) - S(59049)/S(1408)*(S(1) - S(2)*x)**(S(11)/S(2)) + S(3645)/S(1664)*(S(1) - S(2)*x)**(S(13)/S(2)) + S(1294139)/S(128)/sqrt(S(1) - S(2)*x) + S(3916031)/S(128)*sqrt(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(5)*(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(5)/S(2)), x, S(2), S(184877)/S(192)/(S(1) - S(2)*x)**(S(3)/S(2)) + S(12495)/S(8)*(S(1) - S(2)*x)**(S(3)/S(2)) - S(19467)/S(64)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(1053)/S(28)*(S(1) - S(2)*x)**(S(7)/S(2)) - S(135)/S(64)*(S(1) - S(2)*x)**(S(9)/S(2)) + ( - S(60025)/S(8))/sqrt(S(1) - S(2)*x) - S(519645)/S(64)*sqrt(S(1) - S(2)*x)], [(S(2) + S(3)*x)**S(4)*(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(5)/S(2)), x, S(2), S(26411)/S(96)/(S(1) - S(2)*x)**(S(3)/S(2)) + S(3591)/S(16)*(S(1) - S(2)*x)**(S(3)/S(2)) - S(4671)/S(160)*(S(1) - S(2)*x)**(S(5)/S(2)) + S(405)/S(224)*(S(1) - S(2)*x)**(S(7)/S(2)) + ( - S(57281)/S(32))/sqrt(S(1) - S(2)*x) - S(24843)/S(16)*sqrt(S(1) - S(2)*x)], [(A + B*x)*(d + e*x)**(S(5)/S(2))*sqrt(a + b*x), x, S(7), - S(1)/S(48)*(b*d - a*e)*(S(3)*b*B*d - S(10)*A*b*e + S(7)*a*B*e)*(a + b*x)**(S(3)/S(2))*(d + e*x)**(S(3)/S(2))/(b**S(3)*e) - S(1)/S(40)*(S(3)*b*B*d - S(10)*A*b*e + S(7)*a*B*e)*(a + b*x)**(S(3)/S(2))*(d + e*x)**(S(5)/S(2))/(b**S(2)*e) + S(1)/S(5)*B*(a + b*x)**(S(3)/S(2))*(d + e*x)**(S(7)/S(2))/(b*e) + S(1)/S(128)*(b*d - a*e)**S(4)*(S(3)*b*B*d - S(10)*A*b*e + S(7)*a*B*e)*arctanh(sqrt(e)*sqrt(a + b*x)/(sqrt(b)*sqrt(d + e*x)))/(b**(S(9)/S(2))*e**(S(5)/S(2))) - S(1)/S(64)*(b*d - a*e)**S(2)*(S(3)*b*B*d - S(10)*A*b*e + S(7)*a*B*e)*(a + b*x)**(S(3)/S(2))*sqrt(d + e*x)/(b**S(4)*e) - S(1)/S(128)*(b*d - a*e)**S(3)*(S(3)*b*B*d - S(10)*A*b*e + S(7)*a*B*e)*sqrt(a + b*x)*sqrt(d + e*x)/(b**S(4)*e**S(2))], [(A + B*x)*(d + e*x)**(S(3)/S(2))*sqrt(a + b*x), x, S(6), - S(1)/S(24)*(S(3)*b*B*d - S(8)*A*b*e + S(5)*a*B*e)*(a + b*x)**(S(3)/S(2))*(d + e*x)**(S(3)/S(2))/(b**S(2)*e) + S(1)/S(4)*B*(a + b*x)**(S(3)/S(2))*(d + e*x)**(S(5)/S(2))/(b*e) + S(1)/S(64)*(b*d - a*e)**S(3)*(S(3)*b*B*d - S(8)*A*b*e + S(5)*a*B*e)*arctanh(sqrt(e)*sqrt(a + b*x)/(sqrt(b)*sqrt(d + e*x)))/(b**(S(7)/S(2))*e**(S(5)/S(2))) - S(1)/S(32)*(b*d - a*e)*(S(3)*b*B*d - S(8)*A*b*e + S(5)*a*B*e)*(a + b*x)**(S(3)/S(2))*sqrt(d + e*x)/(b**S(3)*e) - S(1)/S(64)*(b*d - a*e)**S(2)*(S(3)*b*B*d - S(8)*A*b*e + S(5)*a*B*e)*sqrt(a + b*x)*sqrt(d + e*x)/(b**S(3)*e**S(2))], [(A + B*x)*(d + e*x)**(S(5)/S(2))/sqrt(a + b*x), x, S(6), - S(5)/S(64)*(b*d - a*e)**S(3)*(b*B*d - S(8)*A*b*e + S(7)*a*B*e)*arctanh(sqrt(e)*sqrt(a + b*x)/(sqrt(b)*sqrt(d + e*x)))/(b**(S(9)/S(2))*e**(S(3)/S(2))) - S(5)/S(96)*(b*d - a*e)*(b*B*d - S(8)*A*b*e + S(7)*a*B*e)*(d + e*x)**(S(3)/S(2))*sqrt(a + b*x)/(b**S(3)*e) - S(1)/S(24)*(b*B*d - S(8)*A*b*e + S(7)*a*B*e)*(d + e*x)**(S(5)/S(2))*sqrt(a + b*x)/(b**S(2)*e) + S(1)/S(4)*B*(d + e*x)**(S(7)/S(2))*sqrt(a + b*x)/(b*e) - S(5)/S(64)*(b*d - a*e)**S(2)*(b*B*d - S(8)*A*b*e + S(7)*a*B*e)*sqrt(a + b*x)*sqrt(d + e*x)/(b**S(4)*e)], [(A + B*x)*(d + e*x)**(S(3)/S(2))/sqrt(a + b*x), x, S(5), - S(1)/S(8)*(b*d - a*e)**S(2)*(b*B*d - S(6)*A*b*e + S(5)*a*B*e)*arctanh(sqrt(e)*sqrt(a + b*x)/(sqrt(b)*sqrt(d + e*x)))/(b**(S(7)/S(2))*e**(S(3)/S(2))) - S(1)/S(12)*(b*B*d - S(6)*A*b*e + S(5)*a*B*e)*(d + e*x)**(S(3)/S(2))*sqrt(a + b*x)/(b**S(2)*e) + S(1)/S(3)*B*(d + e*x)**(S(5)/S(2))*sqrt(a + b*x)/(b*e) - S(1)/S(8)*(b*d - a*e)*(b*B*d - S(6)*A*b*e + S(5)*a*B*e)*sqrt(a + b*x)*sqrt(d + e*x)/(b**S(3)*e)], [(S(2) + S(3)*x)**S(4)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x), x, S(7), - S(333)/S(2000)*(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(2)*(S(3) + S(5)*x)**(S(3)/S(2)) - S(1)/S(20)*(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(3)*(S(3) + S(5)*x)**(S(3)/S(2)) - S(7)/S(640000)*(S(1) - S(2)*x)**(S(3)/S(2))*(S(3) + S(5)*x)**(S(3)/S(2))*(S(231223) + S(140652)*x) + S(4122385421)/S(51200000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) - S(34069301)/S(5120000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) + S(374762311)/S(51200000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(3)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x), x, S(6), - S(3)/S(50)*(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(2)*(S(3) + S(5)*x)**(S(3)/S(2)) - S(21)/S(16000)*(S(1) - S(2)*x)**(S(3)/S(2))*(S(3) + S(5)*x)**(S(3)/S(2))*(S(731) + S(444)*x) + S(39142411)/S(1280000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) - S(323491)/S(128000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) + S(3558401)/S(1280000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(3)*sqrt(S(1) - S(2)*x)/sqrt(S(3) + S(5)*x), x, S(5), S(525371)/S(64000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) - S(3)/S(40)*(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(2)*sqrt(S(3) + S(5)*x) - S(21)/S(6400)*(S(1) - S(2)*x)**(S(3)/S(2))*(S(335) + S(216)*x)*sqrt(S(3) + S(5)*x) + S(47761)/S(64000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)/sqrt(S(3) + S(5)*x), x, S(5), S(3047)/S(800)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) - S(23)/S(80)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) - S(1)/S(10)*(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)*sqrt(S(3) + S(5)*x) + S(277)/S(800)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x), x, S(7), - S(1)/S(20)*(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(2)*(S(3) + S(5)*x)**(S(3)/S(2)) - S(1)/S(160000)*(S(1) - S(2)*x)**(S(5)/S(2))*(S(3) + S(5)*x)**(S(3)/S(2))*(S(88987) + S(63120)*x) + S(452517373)/S(25600000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(3739813)/S(7680000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) - S(339983)/S(384000)*(S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x) + S(41137943)/S(25600000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(2)*sqrt(S(3) + S(5)*x), x, S(7), - S(567)/S(4000)*(S(1) - S(2)*x)**(S(5)/S(2))*(S(3) + S(5)*x)**(S(3)/S(2)) - S(3)/S(50)*(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)*(S(3) + S(5)*x)**(S(3)/S(2)) + S(5487713)/S(640000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(45353)/S(192000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) - S(4123)/S(9600)*(S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x) + S(498883)/S(640000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(3)/sqrt(S(3) + S(5)*x), x, S(6), S(18648399)/S(3200000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(51373)/S(320000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) - S(3)/S(50)*(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(2)*sqrt(S(3) + S(5)*x) - S(3)/S(80000)*(S(1) - S(2)*x)**(S(5)/S(2))*(S(14629) + S(11580)*x)*sqrt(S(3) + S(5)*x) + S(1695309)/S(3200000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(1) - S(2)*x)**(S(3)/S(2))*(S(2) + S(3)*x)**S(2)/sqrt(S(3) + S(5)*x), x, S(6), S(109263)/S(32000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(301)/S(3200)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) - S(119)/S(800)*(S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x) - S(3)/S(40)*(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)*sqrt(S(3) + S(5)*x) + S(9933)/S(32000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x), x, S(8), - S(3)/S(70)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(2) + S(3)*x)**S(2)*(S(3) + S(5)*x)**(S(3)/S(2)) - S(3)/S(280000)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(3) + S(5)*x)**(S(3)/S(2))*(S(33857) + S(26700)*x) + S(3735929329)/S(256000000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(30875449)/S(76800000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) + S(2806859)/S(19200000)*(S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x) - S(255169)/S(640000)*(S(1) - S(2)*x)**(S(7)/S(2))*sqrt(S(3) + S(5)*x) + S(339629939)/S(256000000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(2)*sqrt(S(3) + S(5)*x), x, S(8), - S(193)/S(2000)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(3) + S(5)*x)**(S(3)/S(2)) - S(1)/S(20)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(2) + S(3)*x)*(S(3) + S(5)*x)**(S(3)/S(2)) + S(105254149)/S(12800000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(869869)/S(3840000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) + S(79079)/S(960000)*(S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x) - S(7189)/S(32000)*(S(1) - S(2)*x)**(S(7)/S(2))*sqrt(S(3) + S(5)*x) + S(9568559)/S(12800000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(4)/sqrt(S(3) + S(5)*x), x, S(8), S(12679836719)/S(1280000000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(104792039)/S(384000000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) + S(9526549)/S(96000000)*(S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x) - S(271)/S(2800)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(2) + S(3)*x)**S(2)*sqrt(S(3) + S(5)*x) - S(3)/S(70)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x) - S(1)/S(22400000)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(12923401) + S(11603280)*x)*sqrt(S(3) + S(5)*x) + S(1152712429)/S(1280000000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(1) - S(2)*x)**(S(5)/S(2))*(S(2) + S(3)*x)**S(3)/sqrt(S(3) + S(5)*x), x, S(7), S(368012183)/S(64000000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(3041423)/S(19200000)*(S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x) + S(276493)/S(4800000)*(S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x) - S(1)/S(20)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(2) + S(3)*x)**S(2)*sqrt(S(3) + S(5)*x) - S(1)/S(160000)*(S(1) - S(2)*x)**(S(7)/S(2))*(S(52951) + S(47280)*x)*sqrt(S(3) + S(5)*x) + S(33455653)/S(64000000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(4)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x), x, S(6), S(1067352517)/S(2560000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) - S(987)/S(4000)*(S(2) + S(3)*x)**S(2)*(S(3) + S(5)*x)**(S(3)/S(2))*sqrt(S(1) - S(2)*x) - S(3)/S(50)*(S(2) + S(3)*x)**S(3)*(S(3) + S(5)*x)**(S(3)/S(2))*sqrt(S(1) - S(2)*x) - S(21)/S(640000)*(S(3) + S(5)*x)**(S(3)/S(2))*(S(194923) + S(92040)*x)*sqrt(S(1) - S(2)*x) - S(97032047)/S(2560000)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x), x, S(5), S(677017)/S(5120)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) - S(3)/S(40)*(S(2) + S(3)*x)**S(2)*(S(3) + S(5)*x)**(S(3)/S(2))*sqrt(S(1) - S(2)*x) - S(3)/S(1280)*(S(3) + S(5)*x)**(S(3)/S(2))*(S(865) + S(408)*x)*sqrt(S(1) - S(2)*x) - S(61547)/S(5120)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(4)/(sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)), x, S(5), S(10866247)/S(128000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) - S(259)/S(800)*(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) - S(3)/S(40)*(S(2) + S(3)*x)**S(3)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) - S(7)/S(128000)*(S(187559) + S(77820)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(3)/(sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)), x, S(4), S(44437)/S(1600)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) - S(1)/S(10)*(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) - S(1)/S(1600)*(S(5363) + S(2220)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(5)*sqrt(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(3)/S(2)), x, S(7), - S(35439958001)/S(5120000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + (S(2) + S(3)*x)**S(5)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x) + S(847637)/S(32000)*(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) + S(10389)/S(1600)*(S(2) + S(3)*x)**S(3)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) + S(33)/S(20)*(S(2) + S(3)*x)**S(4)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) + S(49)/S(5120000)*(S(87394471) + S(36265980)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(4)*sqrt(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(3)/S(2)), x, S(6), - S(92108287)/S(51200)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + (S(2) + S(3)*x)**S(4)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x) + S(2203)/S(320)*(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) + S(27)/S(16)*(S(2) + S(3)*x)**S(3)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) + S(1)/S(51200)*(S(11129753) + S(4618500)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(5)/((S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x)), x, S(6), - S(291096141)/S(256000)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(7)/S(11)*(S(2) + S(3)*x)**S(4)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x) + S(76587)/S(17600)*(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) + S(939)/S(880)*(S(2) + S(3)*x)**S(3)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) + S(21)/S(2816000)*(S(18424549) + S(7645620)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(4)/((S(1) - S(2)*x)**(S(3)/S(2))*sqrt(S(3) + S(5)*x)), x, S(5), - S(184641)/S(640)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(7)/S(11)*(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x) + S(243)/S(220)*(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) + S(9)/S(7040)*(S(27269) + S(11316)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(4)*sqrt(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(5)/S(2)), x, S(6), S(13246251)/S(6400)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(1)/S(3)*(S(2) + S(3)*x)**S(4)*sqrt(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(3)/S(2)) - S(299)/S(66)*(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x) - S(697)/S(88)*(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) - S(1)/S(70400)*(S(17606479) + S(7306140)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(5)/S(2)), x, S(5), S(126513)/S(320)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(1)/S(3)*(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(3)/S(2)) - S(233)/S(66)*(S(2) + S(3)*x)**S(2)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x) - S(1)/S(3520)*(S(168157) + S(69780)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(5)/((S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x)), x, S(6), S(8261577)/S(6400)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(7)/S(33)*(S(2) + S(3)*x)**S(4)*sqrt(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(3)/S(2)) - S(2051)/S(726)*(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x) - S(23909)/S(4840)*(S(2) + S(3)*x)**S(2)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x) - S(1)/S(774400)*(S(120791143) + S(50124540)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(S(2) + S(3)*x)**S(4)/((S(1) - S(2)*x)**(S(5)/S(2))*sqrt(S(3) + S(5)*x)), x, S(5), S(392283)/S(1600)*arcsin(sqrt(S(2)/S(11))*sqrt(S(3) + S(5)*x))/sqrt(S(10)) + S(7)/S(33)*(S(2) + S(3)*x)**S(3)*sqrt(S(3) + S(5)*x)/(S(1) - S(2)*x)**(S(3)/S(2)) - S(1589)/S(726)*(S(2) + S(3)*x)**S(2)*sqrt(S(3) + S(5)*x)/sqrt(S(1) - S(2)*x) - S(1)/S(193600)*(S(5735477) + S(2380020)*x)*sqrt(S(1) - S(2)*x)*sqrt(S(3) + S(5)*x)], [(c + d*x)**(S(1)/S(2))/(x**S(2)*(a + b*x)**S(2)), x, S(7), (S(4)*b*c - a*d)*arctanh(sqrt(c + d*x)/sqrt(c))/(a**S(3)*sqrt(c)) - (S(4)*b*c - S(3)*a*d)*arctanh(sqrt(b)*sqrt(c + d*x)/sqrt(b*c - a*d))*sqrt(b)/(a**S(3)*sqrt(b*c - a*d)) - S(2)*b*sqrt(c + d*x)/(a**S(2)*(a + b*x)) - sqrt(c + d*x)/(a*x*(a + b*x))], [S(1)/(x**S(2)*(a + b*x)**S(2)*(c + d*x)**(S(1)/S(2))), x, S(7), (S(4)*b*c + a*d)*arctanh(sqrt(c + d*x)/sqrt(c))/(a**S(3)*c**(S(3)/S(2))) - b**(S(3)/S(2))*(S(4)*b*c - S(5)*a*d)*arctanh(sqrt(b)*sqrt(c + d*x)/sqrt(b*c - a*d))/(a**S(3)*(b*c - a*d)**(S(3)/S(2))) - b*(S(2)*b*c - a*d)*sqrt(c + d*x)/(a**S(2)*c*(b*c - a*d)*(a + b*x)) - sqrt(c + d*x)/(a*c*x*(a + b*x))], [S(1)/(x**S(2)*(a + b*x)**S(2)*(c + d*x)**(S(3)/S(2))), x, S(8), (S(4)*b*c + S(3)*a*d)*arctanh(sqrt(c + d*x)/sqrt(c))/(a**S(3)*c**(S(5)/S(2))) - b**(S(5)/S(2))*(S(4)*b*c - S(7)*a*d)*arctanh(sqrt(b)*sqrt(c + d*x)/sqrt(b*c - a*d))/(a**S(3)*(b*c - a*d)**(S(5)/S(2))) - d*(S(2)*b**S(2)*c**S(2) - S(2)*a*b*c*d + S(3)*a**S(2)*d**S(2))/(a**S(2)*c**S(2)*(b*c - a*d)**S(2)*sqrt(c + d*x)) - b*(S(2)*b*c - a*d)/(a**S(2)*c*(b*c - a*d)*(a + b*x)*sqrt(c + d*x)) + ( - S(1))/(a*c*x*(a + b*x)*sqrt(c + d*x))], [x**S(3)*(c + d*x)**(S(3)/S(2))/(a + b*x)**(S(3)/S(2)), x, S(6), S(3)/S(64)*(b*c - a*d)*(b**S(3)*c**S(3) + S(5)*a*b**S(2)*c**S(2)*d + S(35)*a**S(2)*b*c*d**S(2) - S(105)*a**S(3)*d**S(3))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(11)/S(2))*d**(S(5)/S(2))) - S(2)*x**S(3)*(c + d*x)**(S(3)/S(2))/(b*sqrt(a + b*x)) + S(9)/S(4)*x**S(2)*(c + d*x)**(S(3)/S(2))*sqrt(a + b*x)/b**S(2) - S(1)/S(32)*(c + d*x)**(S(3)/S(2))*(S(3)*b**S(2)*c**S(2) + S(14)*a*b*c*d - S(105)*a**S(2)*d**S(2) - S(4)*b*d*(b*c - S(21)*a*d)*x)*sqrt(a + b*x)/(b**S(4)*d**S(2)) + S(3)/S(64)*(b**S(3)*c**S(3) + S(5)*a*b**S(2)*c**S(2)*d + S(35)*a**S(2)*b*c*d**S(2) - S(105)*a**S(3)*d**S(3))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(5)*d**S(2))], [x**S(2)*(c + d*x)**(S(3)/S(2))/(a + b*x)**(S(3)/S(2)), x, S(6), - S(1)/S(8)*(b*c - a*d)*(b**S(2)*c**S(2) + S(10)*a*b*c*d - S(35)*a**S(2)*d**S(2))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(9)/S(2))*d**(S(3)/S(2))) - S(2)*a**S(2)*(c + d*x)**(S(5)/S(2))/(b**S(2)*(b*c - a*d)*sqrt(a + b*x)) - S(1)/S(12)*(S(10)*a*c + b*c**S(2)/d - S(35)*a**S(2)*d/b)*(c + d*x)**(S(3)/S(2))*sqrt(a + b*x)/(b**S(2)*(b*c - a*d)) + S(1)/S(3)*(c + d*x)**(S(5)/S(2))*sqrt(a + b*x)/(b**S(2)*d) - S(1)/S(8)*(b**S(2)*c**S(2) + S(10)*a*b*c*d - S(35)*a**S(2)*d**S(2))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(4)*d)], [x**S(3)*(c + d*x)**(S(5)/S(2))/(a + b*x)**(S(5)/S(2)), x, S(7), - S(2)/S(3)*x**S(3)*(c + d*x)**(S(5)/S(2))/(b*(a + b*x)**(S(3)/S(2))) - S(5)/S(64)*(b*c - a*d)*(b**S(3)*c**S(3) + S(21)*a*b**S(2)*c**S(2)*d - S(189)*a**S(2)*b*c*d**S(2) + S(231)*a**S(3)*d**S(3))*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(13)/S(2))*d**(S(3)/S(2))) - S(2)/S(3)*(S(6)*b*c - S(11)*a*d)*x**S(2)*(c + d*x)**(S(5)/S(2))/(b**S(2)*(b*c - a*d)*sqrt(a + b*x)) - S(5)/S(96)*(b**S(3)*c**S(3) + S(21)*a*b**S(2)*c**S(2)*d - S(189)*a**S(2)*b*c*d**S(2) + S(231)*a**S(3)*d**S(3))*(c + d*x)**(S(3)/S(2))*sqrt(a + b*x)/(b**S(5)*d*(b*c - a*d)) + S(1)/S(24)*(c + d*x)**(S(5)/S(2))*(S(5)*b**S(2)*c**S(2) - S(156)*a*b*c*d + S(231)*a**S(2)*d**S(2) + S(2)*b*d*(S(59)*b*c - S(99)*a*d)*x)*sqrt(a + b*x)/(b**S(4)*d*(b*c - a*d)) - S(5)/S(64)*(b**S(3)*c**S(3) + S(21)*a*b**S(2)*c**S(2)*d - S(189)*a**S(2)*b*c*d**S(2) + S(231)*a**S(3)*d**S(3))*sqrt(a + b*x)*sqrt(c + d*x)/(b**S(6)*d)], [x**S(2)/((a + b*x)**(S(5)/S(2))*(c + d*x)**(S(1)/S(2))), x, S(4), S(2)*arctanh(sqrt(d)*sqrt(a + b*x)/(sqrt(b)*sqrt(c + d*x)))/(b**(S(5)/S(2))*sqrt(d)) - S(2)/S(3)*a**S(2)*sqrt(c + d*x)/(b**S(2)*(b*c - a*d)*(a + b*x)**(S(3)/S(2))) + S(4)/S(3)*a*(S(3)*b*c - S(2)*a*d)*sqrt(c + d*x)/(b**S(2)*(b*c - a*d)**S(2)*sqrt(a + b*x))], [x*sqrt(a + b*x)/sqrt( - a - b*x), x, S(2), S(1)/S(2)*x**S(2)*sqrt(a + b*x)/sqrt( - a - b*x)], [(c + d*x)**(S(3)/S(2))/(x*(a + b*x)**S(2)), x, S(6), - S(2)*c**(S(3)/S(2))*arctanh(sqrt(c + d*x)/sqrt(c))/a**S(2) + (S(2)*b*c + a*d)*arctanh(sqrt(b)*sqrt(c + d*x)/sqrt(b*c - a*d))*sqrt(b*c - a*d)/(a**S(2)*b**(S(3)/S(2))) + (b*c - a*d)*sqrt(c + d*x)/(a*b*(a + b*x))], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True, _numerical=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True, _numerical=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True, _numerical=True) def test_simplify(): test = [ [x**S(3)*(a + b*x)**S(2)*(c + d*x)**S(16), x, S(2), - S(1)/S(17)*c**S(3)*(b*c - a*d)**S(2)*(c + d*x)**S(17)/d**S(6) + S(1)/S(18)*c**S(2)*(S(5)*b*c - S(3)*a*d)*(b*c - a*d)*(c + d*x)**S(18)/d**S(6) - S(1)/S(19)*c*(S(10)*b**S(2)*c**S(2) - S(12)*a*b*c*d + S(3)*a**S(2)*d**S(2))*(c + d*x)**S(19)/d**S(6) + S(1)/S(20)*(S(10)*b**S(2)*c**S(2) - S(8)*a*b*c*d + a**S(2)*d**S(2))*(c + d*x)**S(20)/d**S(6) - S(1)/S(21)*b*(S(5)*b*c - S(2)*a*d)*(c + d*x)**S(21)/d**S(6) + S(1)/S(22)*b**S(2)*(c + d*x)**S(22)/d**S(6)], [x**S(5)/((a + b*x)**S(2)*(c + d*x)**S(2)), x, S(2), - S(2)*(b*c + a*d)*x/(b**S(3)*d**S(3)) + S(1)/S(2)*x**S(2)/(b**S(2)*d**S(2)) + a**S(5)/(b**S(4)*(b*c - a*d)**S(2)*(a + b*x)) + c**S(5)/(d**S(4)*(b*c - a*d)**S(2)*(c + d*x)) + a**S(4)*(S(5)*b*c - S(3)*a*d)*log(a + b*x)/(b**S(4)*(b*c - a*d)**S(3)) + c**S(4)*(S(3)*b*c - S(5)*a*d)*log(c + d*x)/(d**S(4)*(b*c - a*d)**S(3))], [x**S(5)/((a + b*x)**S(2)*(c + d*x)**S(2)), x, S(2), - S(2)*(b*c + a*d)*x/(b**S(3)*d**S(3)) + S(1)/S(2)*x**S(2)/(b**S(2)*d**S(2)) + a**S(5)/(b**S(4)*(b*c - a*d)**S(2)*(a + b*x)) + c**S(5)/(d**S(4)*(b*c - a*d)**S(2)*(c + d*x)) + a**S(4)*(S(5)*b*c - S(3)*a*d)*log(a + b*x)/(b**S(4)*(b*c - a*d)**S(3)) + c**S(4)*(S(3)*b*c - S(5)*a*d)*log(c + d*x)/(d**S(4)*(b*c - a*d)**S(3))], [x**S(4)/((a + b*x)*(c + d*x)), x, S(2), (b**S(2)*c**S(2) + a*b*c*d + a**S(2)*d**S(2))*x/(b**S(3)*d**S(3)) - S(1)/S(2)*(b*c + a*d)*x**S(2)/(b**S(2)*d**S(2)) + S(1)/S(3)*x**S(3)/(b*d) + a**S(4)*log(a + b*x)/(b**S(4)*(b*c - a*d)) - c**S(4)*log(c + d*x)/(d**S(4)*(b*c - a*d))], [(a + b*x)*(A + B*x)*(d + e*x)**S(4), x, S(2), S(1)/S(5)*(b*d - a*e)*(B*d - A*e)*(d + e*x)**S(5)/e**S(3) - S(1)/S(6)*(S(2)*b*B*d - A*b*e - a*B*e)*(d + e*x)**S(6)/e**S(3) + S(1)/S(7)*b*B*(d + e*x)**S(7)/e**S(3)], [(a + b*x)**S(3)*(c + d*x)**S(3)*(e + f*x)**S(3), x, S(2), S(1)/S(4)*(b*c - a*d)**S(3)*(b*e - a*f)**S(3)*(a + b*x)**S(4)/b**S(7) + S(3)/S(5)*(b*c - a*d)**S(2)*(b*e - a*f)**S(2)*(b*d*e + b*c*f - S(2)*a*d*f)*(a + b*x)**S(5)/b**S(7) + S(1)/S(2)*(b*c - a*d)*(b*e - a*f)*(S(5)*a**S(2)*d**S(2)*f**S(2) - S(5)*a*b*d*f*(d*e + c*f) + b**S(2)*(d**S(2)*e**S(2) + S(3)*c*d*e*f + c**S(2)*f**S(2)))*(a + b*x)**S(6)/b**S(7) + S(1)/S(7)*(b*d*e + b*c*f - S(2)*a*d*f)*(S(10)*a**S(2)*d**S(2)*f**S(2) - S(10)*a*b*d*f*(d*e + c*f) + b**S(2)*(d**S(2)*e**S(2) + S(8)*c*d*e*f + c**S(2)*f**S(2)))*(a + b*x)**S(7)/b**S(7) + S(3)/S(8)*d*f*(S(5)*a**S(2)*d**S(2)*f**S(2) - S(5)*a*b*d*f*(d*e + c*f) + b**S(2)*(d**S(2)*e**S(2) + S(3)*c*d*e*f + c**S(2)*f**S(2)))*(a + b*x)**S(8)/b**S(7) + S(1)/S(3)*d**S(2)*f**S(2)*(b*d*e + b*c*f - S(2)*a*d*f)*(a + b*x)**S(9)/b**S(7) + S(1)/S(10)*d**S(3)*f**S(3)*(a + b*x)**S(10)/b**S(7)], [(a + b*x)*(A + B*x)*(d + e*x)**(S(5)/S(2)), x, S(2), S(2)/S(7)*(b*d - a*e)*(B*d - A*e)*(d + e*x)**(S(7)/S(2))/e**S(3) - S(2)/S(9)*(S(2)*b*B*d - A*b*e - a*B*e)*(d + e*x)**(S(9)/S(2))/e**S(3) + S(2)/S(11)*b*B*(d + e*x)**(S(11)/S(2))/e**S(3)], [(S(5) - S(4)*x)**S(4)*(S(2) + S(3)*x)**m/(S(1) + S(2)*x)**m, x, S(4), - S(1)/S(45)*(S(88) - m)*(S(5) - S(4)*x)**S(2)*(S(1) + S(2)*x)**(S(1) - m)*(S(2) + S(3)*x)**(S(1) + m) - S(2)/S(15)*(S(5) - S(4)*x)**S(3)*(S(1) + S(2)*x)**(S(1) - m)*(S(2) + S(3)*x)**(S(1) + m) - S(1)/S(1215)*(S(1) + S(2)*x)**(S(1) - m)*(S(2) + S(3)*x)**(S(1) + m)*(S(386850) - S(25441)*m + S(426)*m**S(2) - S(2)*m**S(3) - S(24)*(S(4359) - S(154)*m + m**S(2))*x) + S(1)/S(1215)*S(2)**( - S(1) - m)*(S(3528363) - S(639760)*m + S(29050)*m**S(2) - S(440)*m**S(3) + S(2)*m**S(4))*(S(1) + S(2)*x)**(S(1) - m)*hypergeom([S(1) - m, - m], [S(2) - m], - S(3)*(S(1) + S(2)*x))/(S(1) - m)], [(S(5) - S(4)*x)**S(3)*(S(1) + S(2)*x)**( - S(1) - m)*(S(2) + S(3)*x)**m, x, S(3), - S(2)/S(9)*(S(5) - S(4)*x)**S(2)*(S(2) + S(3)*x)**(S(1) + m)/(S(1) + S(2)*x)**m - S(1)/S(27)*(S(2) + S(3)*x)**(S(1) + m)*(S(9261) - S(512)*m + S(4)*m**S(2) - S(4)*(S(109) - S(2)*m)*m*x)/(m*(S(1) + S(2)*x)**m) + S(1)/S(27)*S(2)**( - S(1) - m)*(S(27783) - S(8324)*m + S(390)*m**S(2) - S(4)*m**S(3))*(S(1) + S(2)*x)**(S(1) - m)*hypergeom([S(1) - m, - m], [S(2) - m], - S(3)*(S(1) + S(2)*x))/((S(1) - m)*m)], [(a + b*x)**m*(c + d*x)**n*((b*c*f + a*d*f + a*d*f*m + b*c*f*n)/(b*d*(S(2) + m + n)) + f*x)**( - S(3) - m - n), x, S(1), b*d*(S(2) + m + n)*(a + b*x)**(S(1) + m)*(c + d*x)**(S(1) + n)*(f*(a*d*(S(1) + m) + b*c*(S(1) + n))/(b*d*(S(2) + m + n)) + f*x)**( - S(2) - m - n)/((b*c - a*d)**S(2)*f*(S(1) + m)*(S(1) + n))], [x**S(3)*(c + d*x)**S(3)/(a + b*x)**S(3), x, S(2), (b*c - a*d)*(b**S(2)*c**S(2) - S(8)*a*b*c*d + S(10)*a**S(2)*d**S(2))*x/b**S(6) + S(3)/S(2)*d*(b*c - S(2)*a*d)*(b*c - a*d)*x**S(2)/b**S(5) + d**S(2)*(b*c - a*d)*x**S(3)/b**S(4) + S(1)/S(4)*d**S(3)*x**S(4)/b**S(3) + S(1)/S(2)*a**S(3)*(b*c - a*d)**S(3)/(b**S(7)*(a + b*x)**S(2)) - S(3)*a**S(2)*(b*c - S(2)*a*d)*(b*c - a*d)**S(2)/(b**S(7)*(a + b*x)) - S(3)*a*(b*c - a*d)*(b**S(2)*c**S(2) - S(5)*a*b*c*d + S(5)*a**S(2)*d**S(2))*log(a + b*x)/b**S(7)], [(S(2) + S(3)*x)**S(8)*(S(3) + S(5)*x)/(S(1) - S(2)*x)**S(3), x, S(2), S(63412811)/S(2048)/(S(1) - S(2)*x)**S(2) + ( - S(246239357)/S(1024))/(S(1) - S(2)*x) - S(120864213)/S(256)*x - S(118841283)/S(512)*x**S(2) - S(16042509)/S(128)*x**S(3) - S(7568235)/S(128)*x**S(4) - S(213597)/S(10)*x**S(5) - S(162567)/S(32)*x**S(6) - S(32805)/S(56)*x**S(7) - S(106237047)/S(256)*log(S(1) - S(2)*x)], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True) or rubi_test(r, i[1], i[4], expand=True) else: assert rubi_test(r, i[1], i[3], expand=True) def test_diff(): test = [ [(a + b*x)*(e + f*x)**(S(3)/S(2))/(c + d*x), x, S(5), - S(2)/S(3)*(b*c - a*d)*(e + f*x)**(S(3)/S(2))/d**S(2) + S(2)/S(5)*b*(e + f*x)**(S(5)/S(2))/(d*f) + S(2)*(b*c - a*d)*(d*e - c*f)**(S(3)/S(2))*arctanh(sqrt(d)*sqrt(e + f*x)/sqrt(d*e - c*f))/d**(S(7)/S(2)) - S(2)*(b*c - a*d)*(d*e - c*f)*sqrt(e + f*x)/d**S(3)], [x**(S(5)/S(2))*(A + B*x)/(a + b*x), x, S(6), - S(2)/S(3)*a*(A*b - a*B)*x**(S(3)/S(2))/b**S(3) + S(2)/S(5)*(A*b - a*B)*x**(S(5)/S(2))/b**S(2) + S(2)/S(7)*B*x**(S(7)/S(2))/b - S(2)*a**(S(5)/S(2))*(A*b - a*B)*arctan(sqrt(b)*sqrt(x)/sqrt(a))/b**(S(9)/S(2)) + S(2)*a**S(2)*(A*b - a*B)*sqrt(x)/b**S(4)], [(a + b*x)**S(2)/((c + d*x)**S(2)*sqrt(e + f*x)), x, S(4), (b*c - a*d)*(S(4)*b*d*e - S(3)*b*c*f - a*d*f)*arctanh(sqrt(d)*sqrt(e + f*x)/sqrt(d*e - c*f))/(d**(S(5)/S(2))*(d*e - c*f)**(S(3)/S(2))) + S(2)*b**S(2)*sqrt(e + f*x)/(d**S(2)*f) - (b*c - a*d)**S(2)*sqrt(e + f*x)/(d**S(2)*(d*e - c*f)*(c + d*x))], ] for i in test: r = rubi_integrate(i[0], i[1]) if len(i) == 5: assert rubi_test(r, i[1], i[3], expand=True, _diff=True) or rubi_test(r, i[1], i[4], expand=True, _diff=True) else: assert rubi_test(r, i[1], i[3], expand=True, _diff=True)
781f350cd37bc714af67a1f975cb54bd0a05c73f91d2f8dd0dd7269ab6c21048
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: disabled = True if sys.version_info[:2] < (3, 6): disabled = True if matchpy: from matchpy import Pattern, ReplacementRule, CustomConstraint, is_match from sympy.integrals.rubi.utility_function import ( sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ, Null, exp, log, Discriminant ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec, atan2) from sympy.core.numbers import pi as Pi from sympy.integrals.rubi.rubi import rubi_integrate from sympy.functions.elementary.exponential import (exp, log) from sympy.integrals.integrals import Integral as Integrate a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z = symbols('a b c d e f g h i j k l m n o p q r s t u v w x y z') A, B, C, F, G, H, J, K, L, M, N, O, P, Q, R, T, U, V, W, X, Y, Z = symbols('A B C F G H J K L M N O P Q R T U V W X Y Z') def test_error_functions(): assert rubi_test(rubi_integrate(x**S(5)*Erf(b*x)**S(2), x), x, x**S(6)*Erf(b*x)**S(2)/S(6) - S(5)*Erf(b*x)**S(2)/(S(16)*b**S(6)) + x**S(4)*exp(-S(2)*b**S(2)*x**S(2))/(S(6)*Pi*b**S(2)) + S(7)*x**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(12)*Pi*b**S(4)) + S(11)*exp(-S(2)*b**S(2)*x**S(2))/(S(12)*Pi*b**S(6)) + x**S(5)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b) + S(5)*x**S(3)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*b**S(3)) + S(5)*x*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*Erf(b*x)**S(2), x), x, x**S(5)*Erf(b*x)**S(2)/S(5) + x**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(5)*Pi*b**S(2)) + S(11)*x*exp(-S(2)*b**S(2)*x**S(2))/(S(20)*Pi*b**S(4)) + S(2)*x**S(4)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b) + S(4)*x**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b**S(3)) + S(4)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b**S(5)) - S(43)*sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(80)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erf(b*x)**S(2), x), x, x**S(4)*Erf(b*x)**S(2)/S(4) - S(3)*Erf(b*x)**S(2)/(S(16)*b**S(4)) + x**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*Pi*b**S(2)) + exp(-S(2)*b**S(2)*x**S(2))/(S(2)*Pi*b**S(4)) + x**S(3)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*sqrt(Pi)*b) + S(3)*x*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erf(b*x)**S(2), x), x, x**S(3)*Erf(b*x)**S(2)/S(3) + x*exp(-S(2)*b**S(2)*x**S(2))/(S(3)*Pi*b**S(2)) + S(2)*x**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b) + S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b**S(3)) - S(5)*sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(12)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erf(b*x)**S(2), x), x, x**S(2)*Erf(b*x)**S(2)/S(2) - Erf(b*x)**S(2)/(S(4)*b**S(2)) + exp(-S(2)*b**S(2)*x**S(2))/(S(2)*Pi*b**S(2)) + x*Erf(b*x)*exp(-b**S(2)*x**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2), x), x, x*Erf(b*x)**S(2) - sqrt(S(2))*sqrt(S(1)/Pi)*Erf(sqrt(S(2))*b*x)/b + S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2)/x, x), x, Integrate(Erf(b*x)**S(2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2)/x**S(2), x), x, Integrate(Erf(b*x)**S(2)/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2)/x**S(3), x), x, -b**S(2)*Erf(b*x)**S(2) - Erf(b*x)**S(2)/(S(2)*x**S(2)) + S(2)*b**S(2)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/Pi - S(2)*b*Erf(b*x)*exp(-b**S(2)*x**S(2))/(sqrt(Pi)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2)/x**S(4), x), x, Integrate(Erf(b*x)**S(2)/x**S(4), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2)/x**S(5), x), x, b**S(4)*Erf(b*x)**S(2)/S(3) - Erf(b*x)**S(2)/(S(4)*x**S(4)) - S(4)*b**S(4)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(3)*Pi) - b**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(3)*Pi*x**S(2)) + S(2)*b**S(3)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x) - b*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2)/x**S(6), x), x, Integrate(Erf(b*x)**S(2)/x**S(6), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2)/x**S(7), x), x, -S(4)*b**S(6)*Erf(b*x)**S(2)/S(45) - Erf(b*x)**S(2)/(S(6)*x**S(6)) + S(28)*b**S(6)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(45)*Pi) + S(2)*b**S(4)*exp(-S(2)*b**S(2)*x**S(2))/(S(9)*Pi*x**S(2)) - b**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(15)*Pi*x**S(4)) - S(8)*b**S(5)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(45)*sqrt(Pi)*x) + S(4)*b**S(3)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(45)*sqrt(Pi)*x**S(3)) - S(2)*b*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(15)*sqrt(Pi)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)**S(2)/x**S(8), x), x, Integrate(Erf(b*x)**S(2)/x**S(8), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erf(a + b*x), x), x, -a**S(4)*Erf(a + b*x)/(S(4)*b**S(4)) - S(3)*a**S(2)*Erf(a + b*x)/(S(4)*b**S(4)) + x**S(4)*Erf(a + b*x)/S(4) - S(3)*Erf(a + b*x)/(S(16)*b**S(4)) - a**S(3)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) + S(3)*a**S(2)*(a + b*x)*exp(-(a + b*x)**S(2))/(S(2)*sqrt(Pi)*b**S(4)) - a*(a + b*x)**S(2)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) - a*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) + (a + b*x)**S(3)*exp(-(a + b*x)**S(2))/(S(4)*sqrt(Pi)*b**S(4)) + (S(3)*a + S(3)*b*x)*exp(-(a + b*x)**S(2))/(S(8)*sqrt(Pi)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erf(a + b*x), x), x, a**S(3)*Erf(a + b*x)/(S(3)*b**S(3)) + a*Erf(a + b*x)/(S(2)*b**S(3)) + x**S(3)*Erf(a + b*x)/S(3) + a**S(2)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) - a*(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) + (a + b*x)**S(2)*exp(-(a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)) + exp(-(a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erf(a + b*x), x), x, -a**S(2)*Erf(a + b*x)/(S(2)*b**S(2)) + x**S(2)*Erf(a + b*x)/S(2) - Erf(a + b*x)/(S(4)*b**S(2)) - a*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(2)) + (a + b*x)*exp(-(a + b*x)**S(2))/(S(2)*sqrt(Pi)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(a + b*x), x), x, (a + b*x)*Erf(a + b*x)/b + exp(-(a + b*x)**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(a + b*x)/x, x), x, Integrate(Erf(a + b*x)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(a + b*x)/x**S(2), x), x, -Erf(a + b*x)/x + S(2)*b*Integrate(exp(-(a + b*x)**S(2))/x, x)/sqrt(Pi), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erf(a + b*x)**S(2), x), x, a**S(2)*(a + b*x)*Erf(a + b*x)**S(2)/b**S(3) - sqrt(S(2))*a**S(2)*sqrt(S(1)/Pi)*Erf(sqrt(S(2))*(a + b*x))/b**S(3) - a*(a + b*x)**S(2)*Erf(a + b*x)**S(2)/b**S(3) + a*Erf(a + b*x)**S(2)/(S(2)*b**S(3)) + (a + b*x)**S(3)*Erf(a + b*x)**S(2)/(S(3)*b**S(3)) - a*exp(-S(2)*(a + b*x)**S(2))/(Pi*b**S(3)) + (a + b*x)*exp(-S(2)*(a + b*x)**S(2))/(S(3)*Pi*b**S(3)) + S(2)*a**S(2)*Erf(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) - S(2)*a*(a + b*x)*Erf(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) + S(2)*(a + b*x)**S(2)*Erf(a + b*x)*exp(-(a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)) - S(5)*sqrt(S(2))*Erf(sqrt(S(2))*(a + b*x))/(S(12)*sqrt(Pi)*b**S(3)) + S(2)*Erf(a + b*x)*exp(-(a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erf(a + b*x)**S(2), x), x, -a*(a + b*x)*Erf(a + b*x)**S(2)/b**S(2) + sqrt(S(2))*a*sqrt(S(1)/Pi)*Erf(sqrt(S(2))*(a + b*x))/b**S(2) + (a + b*x)**S(2)*Erf(a + b*x)**S(2)/(S(2)*b**S(2)) - Erf(a + b*x)**S(2)/(S(4)*b**S(2)) + exp(-S(2)*(a + b*x)**S(2))/(S(2)*Pi*b**S(2)) - S(2)*a*Erf(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(2)) + (a + b*x)*Erf(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(a + b*x)**S(2), x), x, (a + b*x)*Erf(a + b*x)**S(2)/b - sqrt(S(2))*sqrt(S(1)/Pi)*Erf(sqrt(S(2))*(a + b*x))/b + S(2)*Erf(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(a + b*x)**S(2)/x, x), x, Integrate(Erf(a + b*x)**S(2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(a + b*x)**S(2)/x**S(2), x), x, Integrate(Erf(a + b*x)**S(2)/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*Erf(b*x)*exp(-b**S(2)*x**S(2)), x), x, S(15)*sqrt(Pi)*Erf(b*x)**S(2)/(S(32)*b**S(7)) - x**S(5)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - S(5)*x**S(3)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*b**S(4)) - S(15)*x*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(8)*b**S(6)) - x**S(4)*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) - S(7)*x**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(8)*sqrt(Pi)*b**S(5)) - S(11)*exp(-S(2)*b**S(2)*x**S(2))/(S(8)*sqrt(Pi)*b**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*Erf(b*x)*exp(-b**S(2)*x**S(2)), x), x, -x**S(4)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - x**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/b**S(4) - Erf(b*x)*exp(-b**S(2)*x**S(2))/b**S(6) + S(43)*sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(64)*b**S(6)) - x**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) - S(11)*x*exp(-S(2)*b**S(2)*x**S(2))/(S(16)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*Erf(b*x)*exp(-b**S(2)*x**S(2)), x), x, S(3)*sqrt(Pi)*Erf(b*x)**S(2)/(S(16)*b**S(5)) - x**S(3)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - S(3)*x*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*b**S(4)) - x**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) - exp(-S(2)*b**S(2)*x**S(2))/(S(2)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erf(b*x)*exp(-b**S(2)*x**S(2)), x), x, -x**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(4)) + S(5)*sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(16)*b**S(4)) - x*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2)), x), x, sqrt(Pi)*Erf(b*x)**S(2)/(S(8)*b**S(3)) - x*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erf(b*x)*exp(-b**S(2)*x**S(2)), x), x, -Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) + sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(4)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)*exp(-b**S(2)*x**S(2)), x), x, sqrt(Pi)*Erf(b*x)**S(2)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x, x), x, Integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x**S(2), x), x, -sqrt(Pi)*b*Erf(b*x)**S(2)/S(2) - Erf(b*x)*exp(-b**S(2)*x**S(2))/x + b*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/sqrt(Pi), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x**S(3), x), x, -sqrt(S(2))*b**S(2)*Erf(sqrt(S(2))*b*x) - b**S(2)*Integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x, x) - Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*x**S(2)) - b*exp(-S(2)*b**S(2)*x**S(2))/(sqrt(Pi)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x**S(4), x), x, sqrt(Pi)*b**S(3)*Erf(b*x)**S(2)/S(3) + S(2)*b**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*x) - Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*x**S(3)) - S(4)*b**S(3)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)) - b*exp(-S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x**S(5), x), x, S(7)*sqrt(S(2))*b**S(4)*Erf(sqrt(S(2))*b*x)/S(6) + b**S(4)*Integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x, x)/S(2) + b**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*x**S(2)) - Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*x**S(4)) + S(7)*b**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*x) - b*exp(-S(2)*b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erf(b*x)*exp(-b**S(2)*x**S(2))/x**S(6), x), x, -S(2)*sqrt(Pi)*b**S(5)*Erf(b*x)**S(2)/S(15) - S(4)*b**S(4)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(15)*x) + S(2)*b**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(15)*x**S(3)) - Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(5)*x**S(5)) + S(14)*b**S(5)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(15)*sqrt(Pi)) + b**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(2)) - b*exp(-S(2)*b**S(2)*x**S(2))/(S(10)*sqrt(Pi)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(b**S(2)*Erf(b*x)*exp(-b**S(2)*x**S(2))/x + Erf(b*x)*exp(-b**S(2)*x**S(2))/x**S(3), x), x, -sqrt(S(2))*b**S(2)*Erf(sqrt(S(2))*b*x) - Erf(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*x**S(2)) - b*exp(-S(2)*b**S(2)*x**S(2))/(sqrt(Pi)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2)/x**S(8), x), x, Integrate(Erfc(b*x)**S(2)/x**S(8), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2)/x**S(7), x), x, -S(4)*b**S(6)*Erfc(b*x)**S(2)/S(45) - Erfc(b*x)**S(2)/(S(6)*x**S(6)) + S(28)*b**S(6)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(45)*Pi) + S(2)*b**S(4)*exp(-S(2)*b**S(2)*x**S(2))/(S(9)*Pi*x**S(2)) - b**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(15)*Pi*x**S(4)) + S(8)*b**S(5)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(45)*sqrt(Pi)*x) - S(4)*b**S(3)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(45)*sqrt(Pi)*x**S(3)) + S(2)*b*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(15)*sqrt(Pi)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2)/x**S(6), x), x, Integrate(Erfc(b*x)**S(2)/x**S(6), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2)/x**S(5), x), x, b**S(4)*Erfc(b*x)**S(2)/S(3) - Erfc(b*x)**S(2)/(S(4)*x**S(4)) - S(4)*b**S(4)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(3)*Pi) - b**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(3)*Pi*x**S(2)) - S(2)*b**S(3)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x) + b*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2)/x**S(4), x), x, Integrate(Erfc(b*x)**S(2)/x**S(4), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2)/x**S(3), x), x, -b**S(2)*Erfc(b*x)**S(2) - Erfc(b*x)**S(2)/(S(2)*x**S(2)) + S(2)*b**S(2)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/Pi + S(2)*b*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(sqrt(Pi)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2)/x**S(2), x), x, Integrate(Erfc(b*x)**S(2)/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2)/x, x), x, Integrate(Erfc(b*x)**S(2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)**S(2), x), x, x*Erfc(b*x)**S(2) - sqrt(S(2))*sqrt(S(1)/Pi)*Erf(sqrt(S(2))*b*x)/b - S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erfc(b*x)**S(2), x), x, x**S(2)*Erfc(b*x)**S(2)/S(2) - Erfc(b*x)**S(2)/(S(4)*b**S(2)) + exp(-S(2)*b**S(2)*x**S(2))/(S(2)*Pi*b**S(2)) - x*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erfc(b*x)**S(2), x), x, x**S(3)*Erfc(b*x)**S(2)/S(3) + x*exp(-S(2)*b**S(2)*x**S(2))/(S(3)*Pi*b**S(2)) - S(2)*x**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b) - S(5)*sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(12)*sqrt(Pi)*b**S(3)) - S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erfc(b*x)**S(2), x), x, x**S(4)*Erfc(b*x)**S(2)/S(4) - S(3)*Erfc(b*x)**S(2)/(S(16)*b**S(4)) + x**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*Pi*b**S(2)) + exp(-S(2)*b**S(2)*x**S(2))/(S(2)*Pi*b**S(4)) - x**S(3)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*sqrt(Pi)*b) - S(3)*x*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*Erfc(b*x)**S(2), x), x, x**S(5)*Erfc(b*x)**S(2)/S(5) + x**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(5)*Pi*b**S(2)) + S(11)*x*exp(-S(2)*b**S(2)*x**S(2))/(S(20)*Pi*b**S(4)) - S(2)*x**S(4)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b) - S(4)*x**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b**S(3)) - S(43)*sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(80)*sqrt(Pi)*b**S(5)) - S(4)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*Erfc(b*x)**S(2), x), x, x**S(6)*Erfc(b*x)**S(2)/S(6) - S(5)*Erfc(b*x)**S(2)/(S(16)*b**S(6)) + x**S(4)*exp(-S(2)*b**S(2)*x**S(2))/(S(6)*Pi*b**S(2)) + S(7)*x**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(12)*Pi*b**S(4)) + S(11)*exp(-S(2)*b**S(2)*x**S(2))/(S(12)*Pi*b**S(6)) - x**S(5)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b) - S(5)*x**S(3)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*b**S(3)) - S(5)*x*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(a + b*x)/x, x), x, Integrate(Erfc(a + b*x)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(a + b*x), x), x, (a + b*x)*Erfc(a + b*x)/b - exp(-(a + b*x)**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erfc(a + b*x), x), x, a**S(2)*Erf(a + b*x)/(S(2)*b**S(2)) + x**S(2)*Erfc(a + b*x)/S(2) + Erf(a + b*x)/(S(4)*b**S(2)) + a*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(2)) - (a + b*x)*exp(-(a + b*x)**S(2))/(S(2)*sqrt(Pi)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erfc(a + b*x), x), x, -a**S(3)*Erf(a + b*x)/(S(3)*b**S(3)) - a*Erf(a + b*x)/(S(2)*b**S(3)) + x**S(3)*Erfc(a + b*x)/S(3) - a**S(2)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) + a*(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) - (a + b*x)**S(2)*exp(-(a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)) - exp(-(a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erfc(a + b*x), x), x, a**S(4)*Erf(a + b*x)/(S(4)*b**S(4)) + S(3)*a**S(2)*Erf(a + b*x)/(S(4)*b**S(4)) + x**S(4)*Erfc(a + b*x)/S(4) + S(3)*Erf(a + b*x)/(S(16)*b**S(4)) + a**S(3)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) - S(3)*a**S(2)*(a + b*x)*exp(-(a + b*x)**S(2))/(S(2)*sqrt(Pi)*b**S(4)) + a*(a + b*x)**S(2)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) + a*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) - (a + b*x)**S(3)*exp(-(a + b*x)**S(2))/(S(4)*sqrt(Pi)*b**S(4)) - (S(3)*a + S(3)*b*x)*exp(-(a + b*x)**S(2))/(S(8)*sqrt(Pi)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(a + b*x)**S(2)/x, x), x, Integrate(Erfc(a + b*x)**S(2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(a + b*x)**S(2), x), x, (a + b*x)*Erfc(a + b*x)**S(2)/b - sqrt(S(2))*sqrt(S(1)/Pi)*Erf(sqrt(S(2))*(a + b*x))/b - S(2)*Erfc(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erfc(a + b*x)**S(2), x), x, -a*(a + b*x)*Erfc(a + b*x)**S(2)/b**S(2) + sqrt(S(2))*a*sqrt(S(1)/Pi)*Erf(sqrt(S(2))*(a + b*x))/b**S(2) + (a + b*x)**S(2)*Erfc(a + b*x)**S(2)/(S(2)*b**S(2)) - Erfc(a + b*x)**S(2)/(S(4)*b**S(2)) + exp(-S(2)*(a + b*x)**S(2))/(S(2)*Pi*b**S(2)) + S(2)*a*Erfc(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(2)) - (a + b*x)*Erfc(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erfc(a + b*x)**S(2), x), x, a**S(2)*(a + b*x)*Erfc(a + b*x)**S(2)/b**S(3) - sqrt(S(2))*a**S(2)*sqrt(S(1)/Pi)*Erf(sqrt(S(2))*(a + b*x))/b**S(3) - a*(a + b*x)**S(2)*Erfc(a + b*x)**S(2)/b**S(3) + a*Erfc(a + b*x)**S(2)/(S(2)*b**S(3)) + (a + b*x)**S(3)*Erfc(a + b*x)**S(2)/(S(3)*b**S(3)) - a*exp(-S(2)*(a + b*x)**S(2))/(Pi*b**S(3)) + (a + b*x)*exp(-S(2)*(a + b*x)**S(2))/(S(3)*Pi*b**S(3)) - S(2)*a**S(2)*Erfc(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) + S(2)*a*(a + b*x)*Erfc(a + b*x)*exp(-(a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) - S(2)*(a + b*x)**S(2)*Erfc(a + b*x)*exp(-(a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)) - S(5)*sqrt(S(2))*Erf(sqrt(S(2))*(a + b*x))/(S(12)*sqrt(Pi)*b**S(3)) - S(2)*Erfc(a + b*x)*exp(-(a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x**S(8), x), x, -S(4)*sqrt(Pi)*b**S(7)*Erfc(b*x)**S(2)/S(105) + S(8)*b**S(6)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(105)*x) - S(4)*b**S(4)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(105)*x**S(3)) + S(2)*b**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(35)*x**S(5)) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(7)*x**S(7)) + S(16)*b**S(7)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(35)*sqrt(Pi)) + S(4)*b**S(5)*exp(-S(2)*b**S(2)*x**S(2))/(S(21)*sqrt(Pi)*x**S(2)) - S(8)*b**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(105)*sqrt(Pi)*x**S(4)) + b*exp(-S(2)*b**S(2)*x**S(2))/(S(21)*sqrt(Pi)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x**S(7), x), x, S(67)*sqrt(S(2))*b**S(6)*Erf(sqrt(S(2))*b*x)/S(90) - b**S(6)*Integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x, x)/S(6) - b**S(4)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(12)*x**S(2)) + b**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(12)*x**S(4)) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(6)*x**S(6)) + S(67)*b**S(5)*exp(-S(2)*b**S(2)*x**S(2))/(S(90)*sqrt(Pi)*x) - S(13)*b**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(90)*sqrt(Pi)*x**S(3)) + b*exp(-S(2)*b**S(2)*x**S(2))/(S(15)*sqrt(Pi)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x**S(6), x), x, S(2)*sqrt(Pi)*b**S(5)*Erfc(b*x)**S(2)/S(15) - S(4)*b**S(4)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(15)*x) + S(2)*b**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(15)*x**S(3)) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(5)*x**S(5)) - S(14)*b**S(5)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(15)*sqrt(Pi)) - b**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(2)) + b*exp(-S(2)*b**S(2)*x**S(2))/(S(10)*sqrt(Pi)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x**S(5), x), x, -S(7)*sqrt(S(2))*b**S(4)*Erf(sqrt(S(2))*b*x)/S(6) + b**S(4)*Integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x, x)/S(2) + b**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*x**S(2)) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*x**S(4)) - S(7)*b**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*x) + b*exp(-S(2)*b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x**S(4), x), x, -sqrt(Pi)*b**S(3)*Erfc(b*x)**S(2)/S(3) + S(2)*b**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*x) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(3)*x**S(3)) + S(4)*b**S(3)*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)) + b*exp(-S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x**S(3), x), x, sqrt(S(2))*b**S(2)*Erf(sqrt(S(2))*b*x) - b**S(2)*Integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x, x) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*x**S(2)) + b*exp(-S(2)*b**S(2)*x**S(2))/(sqrt(Pi)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x**S(2), x), x, sqrt(Pi)*b*Erfc(b*x)**S(2)/S(2) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/x - b*ExpIntegralEi(-S(2)*b**S(2)*x**S(2))/sqrt(Pi), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x, x), x, Integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfc(b*x)*exp(-b**S(2)*x**S(2)), x), x, -sqrt(Pi)*Erfc(b*x)**S(2)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erfc(b*x)*exp(-b**S(2)*x**S(2)), x), x, -sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(4)*b**S(2)) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2)), x), x, -sqrt(Pi)*Erfc(b*x)**S(2)/(S(8)*b**S(3)) - x*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) + exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erfc(b*x)*exp(-b**S(2)*x**S(2)), x), x, -x**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - S(5)*sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(16)*b**S(4)) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(4)) + x*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*Erfc(b*x)*exp(-b**S(2)*x**S(2)), x), x, -S(3)*sqrt(Pi)*Erfc(b*x)**S(2)/(S(16)*b**S(5)) - x**S(3)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - S(3)*x*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*b**S(4)) + x**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) + exp(-S(2)*b**S(2)*x**S(2))/(S(2)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*Erfc(b*x)*exp(-b**S(2)*x**S(2)), x), x, -x**S(4)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - x**S(2)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/b**S(4) - S(43)*sqrt(S(2))*Erf(sqrt(S(2))*b*x)/(S(64)*b**S(6)) - Erfc(b*x)*exp(-b**S(2)*x**S(2))/b**S(6) + x**S(3)*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) + S(11)*x*exp(-S(2)*b**S(2)*x**S(2))/(S(16)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*Erfc(b*x)*exp(-b**S(2)*x**S(2)), x), x, -S(15)*sqrt(Pi)*Erfc(b*x)**S(2)/(S(32)*b**S(7)) - x**S(5)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(2)*b**S(2)) - S(5)*x**S(3)*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(4)*b**S(4)) - S(15)*x*Erfc(b*x)*exp(-b**S(2)*x**S(2))/(S(8)*b**S(6)) + x**S(4)*exp(-S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) + S(7)*x**S(2)*exp(-S(2)*b**S(2)*x**S(2))/(S(8)*sqrt(Pi)*b**S(5)) + S(11)*exp(-S(2)*b**S(2)*x**S(2))/(S(8)*sqrt(Pi)*b**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2)/x**S(8), x), x, Integrate(Erfi(b*x)**S(2)/x**S(8), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2)/x**S(7), x), x, S(4)*b**S(6)*Erfi(b*x)**S(2)/S(45) - Erfi(b*x)**S(2)/(S(6)*x**S(6)) + S(28)*b**S(6)*ExpIntegralEi(S(2)*b**S(2)*x**S(2))/(S(45)*Pi) - S(2)*b**S(4)*exp(S(2)*b**S(2)*x**S(2))/(S(9)*Pi*x**S(2)) - b**S(2)*exp(S(2)*b**S(2)*x**S(2))/(S(15)*Pi*x**S(4)) - S(8)*b**S(5)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(45)*sqrt(Pi)*x) - S(4)*b**S(3)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(45)*sqrt(Pi)*x**S(3)) - S(2)*b*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(15)*sqrt(Pi)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2)/x**S(6), x), x, Integrate(Erfi(b*x)**S(2)/x**S(6), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2)/x**S(5), x), x, b**S(4)*Erfi(b*x)**S(2)/S(3) - Erfi(b*x)**S(2)/(S(4)*x**S(4)) + S(4)*b**S(4)*ExpIntegralEi(S(2)*b**S(2)*x**S(2))/(S(3)*Pi) - b**S(2)*exp(S(2)*b**S(2)*x**S(2))/(S(3)*Pi*x**S(2)) - S(2)*b**S(3)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x) - b*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2)/x**S(4), x), x, Integrate(Erfi(b*x)**S(2)/x**S(4), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2)/x**S(3), x), x, b**S(2)*Erfi(b*x)**S(2) - Erfi(b*x)**S(2)/(S(2)*x**S(2)) + S(2)*b**S(2)*ExpIntegralEi(S(2)*b**S(2)*x**S(2))/Pi - S(2)*b*Erfi(b*x)*exp(b**S(2)*x**S(2))/(sqrt(Pi)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2)/x**S(2), x), x, Integrate(Erfi(b*x)**S(2)/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2)/x, x), x, Integrate(Erfi(b*x)**S(2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)**S(2), x), x, x*Erfi(b*x)**S(2) + sqrt(S(2))*sqrt(S(1)/Pi)*Erfi(sqrt(S(2))*b*x)/b - S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erfi(b*x)**S(2), x), x, x**S(2)*Erfi(b*x)**S(2)/S(2) + Erfi(b*x)**S(2)/(S(4)*b**S(2)) + exp(S(2)*b**S(2)*x**S(2))/(S(2)*Pi*b**S(2)) - x*Erfi(b*x)*exp(b**S(2)*x**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erfi(b*x)**S(2), x), x, x**S(3)*Erfi(b*x)**S(2)/S(3) + x*exp(S(2)*b**S(2)*x**S(2))/(S(3)*Pi*b**S(2)) - S(2)*x**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b) + S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b**S(3)) - S(5)*sqrt(S(2))*Erfi(sqrt(S(2))*b*x)/(S(12)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erfi(b*x)**S(2), x), x, x**S(4)*Erfi(b*x)**S(2)/S(4) - S(3)*Erfi(b*x)**S(2)/(S(16)*b**S(4)) + x**S(2)*exp(S(2)*b**S(2)*x**S(2))/(S(4)*Pi*b**S(2)) - exp(S(2)*b**S(2)*x**S(2))/(S(2)*Pi*b**S(4)) - x**S(3)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*sqrt(Pi)*b) + S(3)*x*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*Erfi(b*x)**S(2), x), x, x**S(5)*Erfi(b*x)**S(2)/S(5) + x**S(3)*exp(S(2)*b**S(2)*x**S(2))/(S(5)*Pi*b**S(2)) - S(11)*x*exp(S(2)*b**S(2)*x**S(2))/(S(20)*Pi*b**S(4)) - S(2)*x**S(4)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b) + S(4)*x**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b**S(3)) - S(4)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(5)*sqrt(Pi)*b**S(5)) + S(43)*sqrt(S(2))*Erfi(sqrt(S(2))*b*x)/(S(80)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*Erfi(b*x)**S(2), x), x, x**S(6)*Erfi(b*x)**S(2)/S(6) + S(5)*Erfi(b*x)**S(2)/(S(16)*b**S(6)) + x**S(4)*exp(S(2)*b**S(2)*x**S(2))/(S(6)*Pi*b**S(2)) - S(7)*x**S(2)*exp(S(2)*b**S(2)*x**S(2))/(S(12)*Pi*b**S(4)) + S(11)*exp(S(2)*b**S(2)*x**S(2))/(S(12)*Pi*b**S(6)) - x**S(5)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*b) + S(5)*x**S(3)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*b**S(3)) - S(5)*x*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(a + b*x)/x, x), x, Integrate(Erfi(a + b*x)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(a + b*x), x), x, (a + b*x)*Erfi(a + b*x)/b - exp((a + b*x)**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erfi(a + b*x), x), x, -a**S(2)*Erfi(a + b*x)/(S(2)*b**S(2)) + x**S(2)*Erfi(a + b*x)/S(2) + Erfi(a + b*x)/(S(4)*b**S(2)) + a*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(2)) - (a + b*x)*exp((a + b*x)**S(2))/(S(2)*sqrt(Pi)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erfi(a + b*x), x), x, a**S(3)*Erfi(a + b*x)/(S(3)*b**S(3)) - a*Erfi(a + b*x)/(S(2)*b**S(3)) + x**S(3)*Erfi(a + b*x)/S(3) - a**S(2)*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) + a*(a + b*x)*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) - (a + b*x)**S(2)*exp((a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)) + exp((a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erfi(a + b*x), x), x, -a**S(4)*Erfi(a + b*x)/(S(4)*b**S(4)) + S(3)*a**S(2)*Erfi(a + b*x)/(S(4)*b**S(4)) + x**S(4)*Erfi(a + b*x)/S(4) - S(3)*Erfi(a + b*x)/(S(16)*b**S(4)) + a**S(3)*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) - S(3)*a**S(2)*(a + b*x)*exp((a + b*x)**S(2))/(S(2)*sqrt(Pi)*b**S(4)) + a*(a + b*x)**S(2)*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) - a*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(4)) - (a + b*x)**S(3)*exp((a + b*x)**S(2))/(S(4)*sqrt(Pi)*b**S(4)) + S(3)*(a + b*x)*exp((a + b*x)**S(2))/(S(8)*sqrt(Pi)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(a + b*x)**S(2)/x, x), x, Integrate(Erfi(a + b*x)**S(2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(a + b*x)**S(2), x), x, (a + b*x)*Erfi(a + b*x)**S(2)/b + sqrt(S(2))*sqrt(S(1)/Pi)*Erfi(sqrt(S(2))*(a + b*x))/b - S(2)*Erfi(a + b*x)*exp((a + b*x)**S(2))/(sqrt(Pi)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erfi(a + b*x)**S(2), x), x, -a*(a + b*x)*Erfi(a + b*x)**S(2)/b**S(2) - sqrt(S(2))*a*sqrt(S(1)/Pi)*Erfi(sqrt(S(2))*(a + b*x))/b**S(2) + (a + b*x)**S(2)*Erfi(a + b*x)**S(2)/(S(2)*b**S(2)) + Erfi(a + b*x)**S(2)/(S(4)*b**S(2)) + exp(S(2)*(a + b*x)**S(2))/(S(2)*Pi*b**S(2)) + S(2)*a*Erfi(a + b*x)*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(2)) - (a + b*x)*Erfi(a + b*x)*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erfi(a + b*x)**S(2), x), x, a**S(2)*(a + b*x)*Erfi(a + b*x)**S(2)/b**S(3) + sqrt(S(2))*a**S(2)*sqrt(S(1)/Pi)*Erfi(sqrt(S(2))*(a + b*x))/b**S(3) - a*(a + b*x)**S(2)*Erfi(a + b*x)**S(2)/b**S(3) - a*Erfi(a + b*x)**S(2)/(S(2)*b**S(3)) + (a + b*x)**S(3)*Erfi(a + b*x)**S(2)/(S(3)*b**S(3)) - a*exp(S(2)*(a + b*x)**S(2))/(Pi*b**S(3)) + (a + b*x)*exp(S(2)*(a + b*x)**S(2))/(S(3)*Pi*b**S(3)) - S(2)*a**S(2)*Erfi(a + b*x)*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) + S(2)*a*(a + b*x)*Erfi(a + b*x)*exp((a + b*x)**S(2))/(sqrt(Pi)*b**S(3)) - S(2)*(a + b*x)**S(2)*Erfi(a + b*x)*exp((a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)) - S(5)*sqrt(S(2))*Erfi(sqrt(S(2))*(a + b*x))/(S(12)*sqrt(Pi)*b**S(3)) + S(2)*Erfi(a + b*x)*exp((a + b*x)**S(2))/(S(3)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x**S(8), x), x, S(4)*sqrt(Pi)*b**S(7)*Erfi(b*x)**S(2)/S(105) - S(8)*b**S(6)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(105)*x) - S(4)*b**S(4)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(105)*x**S(3)) - S(2)*b**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(35)*x**S(5)) - Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(7)*x**S(7)) + S(16)*b**S(7)*ExpIntegralEi(S(2)*b**S(2)*x**S(2))/(S(35)*sqrt(Pi)) - S(4)*b**S(5)*exp(S(2)*b**S(2)*x**S(2))/(S(21)*sqrt(Pi)*x**S(2)) - S(8)*b**S(3)*exp(S(2)*b**S(2)*x**S(2))/(S(105)*sqrt(Pi)*x**S(4)) - b*exp(S(2)*b**S(2)*x**S(2))/(S(21)*sqrt(Pi)*x**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x**S(7), x), x, S(67)*sqrt(S(2))*b**S(6)*Erfi(sqrt(S(2))*b*x)/S(90) + b**S(6)*Integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x, x)/S(6) - b**S(4)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(12)*x**S(2)) - b**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(12)*x**S(4)) - Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(6)*x**S(6)) - S(67)*b**S(5)*exp(S(2)*b**S(2)*x**S(2))/(S(90)*sqrt(Pi)*x) - S(13)*b**S(3)*exp(S(2)*b**S(2)*x**S(2))/(S(90)*sqrt(Pi)*x**S(3)) - b*exp(S(2)*b**S(2)*x**S(2))/(S(15)*sqrt(Pi)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x**S(6), x), x, S(2)*sqrt(Pi)*b**S(5)*Erfi(b*x)**S(2)/S(15) - S(4)*b**S(4)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(15)*x) - S(2)*b**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(15)*x**S(3)) - Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(5)*x**S(5)) + S(14)*b**S(5)*ExpIntegralEi(S(2)*b**S(2)*x**S(2))/(S(15)*sqrt(Pi)) - b**S(3)*exp(S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(2)) - b*exp(S(2)*b**S(2)*x**S(2))/(S(10)*sqrt(Pi)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x**S(5), x), x, S(7)*sqrt(S(2))*b**S(4)*Erfi(sqrt(S(2))*b*x)/S(6) + b**S(4)*Integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x, x)/S(2) - b**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(4)*x**S(2)) - Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(4)*x**S(4)) - S(7)*b**S(3)*exp(S(2)*b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*x) - b*exp(S(2)*b**S(2)*x**S(2))/(S(6)*sqrt(Pi)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x**S(4), x), x, sqrt(Pi)*b**S(3)*Erfi(b*x)**S(2)/S(3) - S(2)*b**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(3)*x) - Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(3)*x**S(3)) + S(4)*b**S(3)*ExpIntegralEi(S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)) - b*exp(S(2)*b**S(2)*x**S(2))/(S(3)*sqrt(Pi)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x**S(3), x), x, sqrt(S(2))*b**S(2)*Erfi(sqrt(S(2))*b*x) + b**S(2)*Integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x, x) - Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*x**S(2)) - b*exp(S(2)*b**S(2)*x**S(2))/(sqrt(Pi)*x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x**S(2), x), x, sqrt(Pi)*b*Erfi(b*x)**S(2)/S(2) - Erfi(b*x)*exp(b**S(2)*x**S(2))/x + b*ExpIntegralEi(S(2)*b**S(2)*x**S(2))/sqrt(Pi), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x, x), x, Integrate(Erfi(b*x)*exp(b**S(2)*x**S(2))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(Erfi(b*x)*exp(b**S(2)*x**S(2)), x), x, sqrt(Pi)*Erfi(b*x)**S(2)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*Erfi(b*x)*exp(b**S(2)*x**S(2)), x), x, Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*b**S(2)) - sqrt(S(2))*Erfi(sqrt(S(2))*b*x)/(S(4)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2)), x), x, -sqrt(Pi)*Erfi(b*x)**S(2)/(S(8)*b**S(3)) + x*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*b**S(2)) - exp(S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*Erfi(b*x)*exp(b**S(2)*x**S(2)), x), x, x**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*b**S(2)) - Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*b**S(4)) + S(5)*sqrt(S(2))*Erfi(sqrt(S(2))*b*x)/(S(16)*b**S(4)) - x*exp(S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*Erfi(b*x)*exp(b**S(2)*x**S(2)), x), x, S(3)*sqrt(Pi)*Erfi(b*x)**S(2)/(S(16)*b**S(5)) + x**S(3)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*b**S(2)) - S(3)*x*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(4)*b**S(4)) - x**S(2)*exp(S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) + exp(S(2)*b**S(2)*x**S(2))/(S(2)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*Erfi(b*x)*exp(b**S(2)*x**S(2)), x), x, x**S(4)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*b**S(2)) - x**S(2)*Erfi(b*x)*exp(b**S(2)*x**S(2))/b**S(4) + Erfi(b*x)*exp(b**S(2)*x**S(2))/b**S(6) - S(43)*sqrt(S(2))*Erfi(sqrt(S(2))*b*x)/(S(64)*b**S(6)) - x**S(3)*exp(S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) + S(11)*x*exp(S(2)*b**S(2)*x**S(2))/(S(16)*sqrt(Pi)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)*Erfi(b*x)*exp(b**S(2)*x**S(2)), x), x, -S(15)*sqrt(Pi)*Erfi(b*x)**S(2)/(S(32)*b**S(7)) + x**S(5)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(2)*b**S(2)) - S(5)*x**S(3)*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(4)*b**S(4)) + S(15)*x*Erfi(b*x)*exp(b**S(2)*x**S(2))/(S(8)*b**S(6)) - x**S(4)*exp(S(2)*b**S(2)*x**S(2))/(S(4)*sqrt(Pi)*b**S(3)) + S(7)*x**S(2)*exp(S(2)*b**S(2)*x**S(2))/(S(8)*sqrt(Pi)*b**S(5)) - S(11)*exp(S(2)*b**S(2)*x**S(2))/(S(8)*sqrt(Pi)*b**S(7)), expand=True, _diff=True, _numerical=True)
dc153afd3edd01ab1b5c8ad7911cb22f8cf6d2b47d66dcac7a1d2becfae6e496
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.utility_function import ( sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral as Integrate from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec) from sympy.core.numbers import pi as Pi from sympy.integrals.rubi.rubi import rubi_integrate a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j= symbols('a b c d e f m n x u k p r s t i j') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', ) def test_1(): assert rubi_test(rubi_integrate(x**S(4)*asin(a*x), x), x, x**S(5)*asin(a*x)/S(5) + (-a**S(2)*x**S(2) + S(1))**(S(5)/2)/(S(25)*a**S(5)) - S(2)*(-a**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(15)*a**S(5)) + sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asin(a*x), x), x, x**S(4)*asin(a*x)/S(4) + x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(16)*a) + S(3)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(32)*a**S(3)) - S(3)*asin(a*x)/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asin(a*x), x), x, x**S(3)*asin(a*x)/S(3) - (-a**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(9)*a**S(3)) + sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asin(a*x), x), x, x**S(2)*asin(a*x)/S(2) + x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(4)*a) - asin(a*x)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x), x), x, x*asin(a*x) + sqrt(-a**S(2)*x**S(2) + S(1))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)/x, x), x, -I*PolyLog(S(2), exp(S(2)*I*asin(a*x)))/S(2) + log(-exp(S(2)*I*asin(a*x)) + S(1))*asin(a*x) - I*asin(a*x)**S(2)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)/x**S(2), x), x, -a*atanh(sqrt(-a**S(2)*x**S(2) + S(1))) - asin(a*x)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)/x**S(3), x), x, -a*sqrt(-a**S(2)*x**S(2) + S(1))/(S(2)*x) - asin(a*x)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)/x**S(4), x), x, -a**S(3)*atanh(sqrt(-a**S(2)*x**S(2) + S(1)))/S(6) - a*sqrt(-a**S(2)*x**S(2) + S(1))/(S(6)*x**S(2)) - asin(a*x)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)/x**S(5), x), x, -a**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(6)*x) - a*sqrt(-a**S(2)*x**S(2) + S(1))/(S(12)*x**S(3)) - asin(a*x)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)/x**S(6), x), x, -S(3)*a**S(5)*atanh(sqrt(-a**S(2)*x**S(2) + S(1)))/S(40) - S(3)*a**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(40)*x**S(2)) - a*sqrt(-a**S(2)*x**S(2) + S(1))/(S(20)*x**S(4)) - asin(a*x)/(S(5)*x**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asin(a*x)**S(2), x), x, x**S(5)*asin(a*x)**S(2)/S(5) - S(2)*x**S(5)/S(125) + S(2)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(25)*a) - S(8)*x**S(3)/(S(225)*a**S(2)) + S(8)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(75)*a**S(3)) - S(16)*x/(S(75)*a**S(4)) + S(16)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(75)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asin(a*x)**S(2), x), x, x**S(4)*asin(a*x)**S(2)/S(4) - x**S(4)/S(32) + x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(8)*a) - S(3)*x**S(2)/(S(32)*a**S(2)) + S(3)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(16)*a**S(3)) - S(3)*asin(a*x)**S(2)/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asin(a*x)**S(2), x), x, x**S(3)*asin(a*x)**S(2)/S(3) - S(2)*x**S(3)/S(27) + S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(9)*a) - S(4)*x/(S(9)*a**S(2)) + S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(9)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asin(a*x)**S(2), x), x, x**S(2)*asin(a*x)**S(2)/S(2) - x**S(2)/S(4) + x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(2)*a) - asin(a*x)**S(2)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(2), x), x, x*asin(a*x)**S(2) - S(2)*x + S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(2)/x, x), x, -I*PolyLog(S(2), exp(S(2)*I*asin(a*x)))*asin(a*x) + PolyLog(S(3), exp(S(2)*I*asin(a*x)))/S(2) + log(-exp(S(2)*I*asin(a*x)) + S(1))*asin(a*x)**S(2) - I*asin(a*x)**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(2)/x**S(2), x), x, S(2)*I*a*PolyLog(S(2), -exp(I*asin(a*x))) - S(2)*I*a*PolyLog(S(2), exp(I*asin(a*x))) - S(4)*a*asin(a*x)*atanh(exp(I*asin(a*x))) - asin(a*x)**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(2)/x**S(3), x), x, a**S(2)*log(x) - a*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/x - asin(a*x)**S(2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) # sympy and mathematica assert rubi_test(rubi_integrate(asin(a*x)**S(2)/x**S(4), x), x, I*a**S(3)*PolyLog(S(2), -exp(I*asin(a*x)))/S(3) - I*a**S(3)*PolyLog(S(2), exp(I*asin(a*x)))/S(3) - S(2)*a**S(3)*asin(a*x)*atanh(exp(I*asin(a*x)))/S(3) - a**S(2)/(S(3)*x) - a*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(3)*x**S(2)) - asin(a*x)**S(2)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(2)/x**S(5), x), x, a**S(4)*log(x)/S(3) - a**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(3)*x) - a**S(2)/(S(12)*x**S(2)) - a*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(6)*x**S(3)) - asin(a*x)**S(2)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asin(a*x)**S(3), x), x, x**S(5)*asin(a*x)**S(3)/S(5) - S(6)*x**S(5)*asin(a*x)/S(125) + S(3)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(25)*a) - S(8)*x**S(3)*asin(a*x)/(S(75)*a**S(2)) + S(4)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(25)*a**S(3)) - S(16)*x*asin(a*x)/(S(25)*a**S(4)) - S(6)*(-a**S(2)*x**S(2) + S(1))**(S(5)/2)/(S(625)*a**S(5)) + S(76)*(-a**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(1125)*a**S(5)) + S(8)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(25)*a**S(5)) - S(298)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(375)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asin(a*x)**S(3), x), x, x**S(4)*asin(a*x)**S(3)/S(4) - S(3)*x**S(4)*asin(a*x)/S(32) + S(3)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(16)*a) - S(3)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(128)*a) - S(9)*x**S(2)*asin(a*x)/(S(32)*a**S(2)) + S(9)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(32)*a**S(3)) - S(45)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(256)*a**S(3)) - S(3)*asin(a*x)**S(3)/(S(32)*a**S(4)) + S(45)*asin(a*x)/(S(256)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asin(a*x)**S(3), x), x, x**S(3)*asin(a*x)**S(3)/S(3) - S(2)*x**S(3)*asin(a*x)/S(9) + x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(3)*a) - S(4)*x*asin(a*x)/(S(3)*a**S(2)) + S(2)*(-a**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(27)*a**S(3)) + S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(3)*a**S(3)) - S(14)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(9)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asin(a*x)**S(3), x), x, x**S(2)*asin(a*x)**S(3)/S(2) - S(3)*x**S(2)*asin(a*x)/S(4) + S(3)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(4)*a) - S(3)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(8)*a) - asin(a*x)**S(3)/(S(4)*a**S(2)) + S(3)*asin(a*x)/(S(8)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(3), x), x, x*asin(a*x)**S(3) - S(6)*x*asin(a*x) + S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/a - S(6)*sqrt(-a**S(2)*x**S(2) + S(1))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(3)/x, x), x, -S(3)*I*PolyLog(S(2), exp(S(2)*I*asin(a*x)))*asin(a*x)**S(2)/S(2) + S(3)*PolyLog(S(3), exp(S(2)*I*asin(a*x)))*asin(a*x)/S(2) + S(3)*I*PolyLog(S(4), exp(S(2)*I*asin(a*x)))/S(4) + log(-exp(S(2)*I*asin(a*x)) + S(1))*asin(a*x)**S(3) - I*asin(a*x)**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(3)/x**S(2), x), x, S(6)*I*a*PolyLog(S(2), -exp(I*asin(a*x)))*asin(a*x) - S(6)*I*a*PolyLog(S(2), exp(I*asin(a*x)))*asin(a*x) - S(6)*a*PolyLog(S(3), -exp(I*asin(a*x))) + S(6)*a*PolyLog(S(3), exp(I*asin(a*x))) - S(6)*a*asin(a*x)**S(2)*atanh(exp(I*asin(a*x))) - asin(a*x)**S(3)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(3)/x**S(3), x), x, -S(3)*I*a**S(2)*PolyLog(S(2), exp(S(2)*I*asin(a*x)))/S(2) + S(3)*a**S(2)*log(-exp(S(2)*I*asin(a*x)) + S(1))*asin(a*x) - S(3)*I*a**S(2)*asin(a*x)**S(2)/S(2) - S(3)*a*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(2)*x) - asin(a*x)**S(3)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) # sympy and mathematica assert rubi_test(rubi_integrate(asin(a*x)**S(3)/x**S(4), x), x, I*a**S(3)*PolyLog(S(2), -exp(I*asin(a*x)))*asin(a*x) - I*a**S(3)*PolyLog(S(2), exp(I*asin(a*x)))*asin(a*x) - a**S(3)*PolyLog(S(3), -exp(I*asin(a*x))) + a**S(3)*PolyLog(S(3), exp(I*asin(a*x))) - a**S(3)*asin(a*x)**S(2)*atanh(exp(I*asin(a*x))) - a**S(3)*atanh(sqrt(-a**S(2)*x**S(2) + S(1))) - a**S(2)*asin(a*x)/x - a*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(2)*x**S(2)) - asin(a*x)**S(3)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(3)/x**S(5), x), x, -I*a**S(4)*PolyLog(S(2), exp(S(2)*I*asin(a*x)))/S(2) + a**S(4)*log(-exp(S(2)*I*asin(a*x)) + S(1))*asin(a*x) - I*a**S(4)*asin(a*x)**S(2)/S(2) - a**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(2)*x) - a**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(4)*x) - a**S(2)*asin(a*x)/(S(4)*x**S(2)) - a*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(2)/(S(4)*x**S(3)) - asin(a*x)**S(3)/(S(4)*x**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)*asin(a*x)**S(4), x), x, x**S(6)*asin(a*x)**S(4)/S(6) - x**S(6)*asin(a*x)**S(2)/S(18) + x**S(6)/S(324) + x**S(5)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(9)*a) - x**S(5)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(54)*a) - S(5)*x**S(4)*asin(a*x)**S(2)/(S(48)*a**S(2)) + S(65)*x**S(4)/(S(3456)*a**S(2)) + S(5)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(36)*a**S(3)) - S(65)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(864)*a**S(3)) - S(5)*x**S(2)*asin(a*x)**S(2)/(S(16)*a**S(4)) + S(245)*x**S(2)/(S(1152)*a**S(4)) + S(5)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(24)*a**S(5)) - S(245)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(576)*a**S(5)) - S(5)*asin(a*x)**S(4)/(S(96)*a**S(6)) + S(245)*asin(a*x)**S(2)/(S(1152)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asin(a*x)**S(4), x), x, x**S(5)*asin(a*x)**S(4)/S(5) - S(12)*x**S(5)*asin(a*x)**S(2)/S(125) + S(24)*x**S(5)/S(3125) + S(4)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(25)*a) - S(24)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(625)*a) - S(16)*x**S(3)*asin(a*x)**S(2)/(S(75)*a**S(2)) + S(1088)*x**S(3)/(S(16875)*a**S(2)) + S(16)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(75)*a**S(3)) - S(1088)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(5625)*a**S(3)) - S(32)*x*asin(a*x)**S(2)/(S(25)*a**S(4)) + S(16576)*x/(S(5625)*a**S(4)) + S(32)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(75)*a**S(5)) - S(16576)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(5625)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asin(a*x)**S(4), x), x, x**S(4)*asin(a*x)**S(4)/S(4) - S(3)*x**S(4)*asin(a*x)**S(2)/S(16) + S(3)*x**S(4)/S(128) + x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(4)*a) - S(3)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(32)*a) - S(9)*x**S(2)*asin(a*x)**S(2)/(S(16)*a**S(2)) + S(45)*x**S(2)/(S(128)*a**S(2)) + S(3)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(8)*a**S(3)) - S(45)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(64)*a**S(3)) - S(3)*asin(a*x)**S(4)/(S(32)*a**S(4)) + S(45)*asin(a*x)**S(2)/(S(128)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asin(a*x)**S(4), x), x, x**S(3)*asin(a*x)**S(4)/S(3) - S(4)*x**S(3)*asin(a*x)**S(2)/S(9) + S(8)*x**S(3)/S(81) + S(4)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(9)*a) - S(8)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(27)*a) - S(8)*x*asin(a*x)**S(2)/(S(3)*a**S(2)) + S(160)*x/(S(27)*a**S(2)) + S(8)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(9)*a**S(3)) - S(160)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(27)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asin(a*x)**S(4), x), x, x**S(2)*asin(a*x)**S(4)/S(2) - S(3)*x**S(2)*asin(a*x)**S(2)/S(2) + S(3)*x**S(2)/S(4) + x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/a - S(3)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/(S(2)*a) - asin(a*x)**S(4)/(S(4)*a**S(2)) + S(3)*asin(a*x)**S(2)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(4), x), x, x*asin(a*x)**S(4) - S(12)*x*asin(a*x)**S(2) + S(24)*x + S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/a - S(24)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(4)/x, x), x, -S(2)*I*PolyLog(S(2), exp(S(2)*I*asin(a*x)))*asin(a*x)**S(3) + S(3)*PolyLog(S(3), exp(S(2)*I*asin(a*x)))*asin(a*x)**S(2) + S(3)*I*PolyLog(S(4), exp(S(2)*I*asin(a*x)))*asin(a*x) - S(3)*PolyLog(S(5), exp(S(2)*I*asin(a*x)))/S(2) + log(-exp(S(2)*I*asin(a*x)) + S(1))*asin(a*x)**S(4) - I*asin(a*x)**S(5)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(4)/x**S(2), x), x, S(12)*I*a*PolyLog(S(2), -exp(I*asin(a*x)))*asin(a*x)**S(2) - S(12)*I*a*PolyLog(S(2), exp(I*asin(a*x)))*asin(a*x)**S(2) - S(24)*a*PolyLog(S(3), -exp(I*asin(a*x)))*asin(a*x) + S(24)*a*PolyLog(S(3), exp(I*asin(a*x)))*asin(a*x) - S(24)*I*a*PolyLog(S(4), -exp(I*asin(a*x))) + S(24)*I*a*PolyLog(S(4), exp(I*asin(a*x))) - S(8)*a*asin(a*x)**S(3)*atanh(exp(I*asin(a*x))) - asin(a*x)**S(4)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(4)/x**S(3), x), x, -S(6)*I*a**S(2)*PolyLog(S(2), exp(S(2)*I*asin(a*x)))*asin(a*x) + S(3)*a**S(2)*PolyLog(S(3), exp(S(2)*I*asin(a*x))) + S(6)*a**S(2)*log(-exp(S(2)*I*asin(a*x)) + S(1))*asin(a*x)**S(2) - S(2)*I*a**S(2)*asin(a*x)**S(3) - S(2)*a*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/x - asin(a*x)**S(4)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**S(4)/x**S(4), x), x, S(2)*I*a**S(3)*PolyLog(S(2), -exp(I*asin(a*x)))*asin(a*x)**S(2) + S(4)*I*a**S(3)*PolyLog(S(2), -exp(I*asin(a*x))) - S(2)*I*a**S(3)*PolyLog(S(2), exp(I*asin(a*x)))*asin(a*x)**S(2) - S(4)*I*a**S(3)*PolyLog(S(2), exp(I*asin(a*x))) - S(4)*a**S(3)*PolyLog(S(3), -exp(I*asin(a*x)))*asin(a*x) + S(4)*a**S(3)*PolyLog(S(3), exp(I*asin(a*x)))*asin(a*x) - S(4)*I*a**S(3)*PolyLog(S(4), -exp(I*asin(a*x))) + S(4)*I*a**S(3)*PolyLog(S(4), exp(I*asin(a*x))) - S(4)*a**S(3)*asin(a*x)**S(3)*atanh(exp(I*asin(a*x)))/S(3) - S(8)*a**S(3)*asin(a*x)*atanh(exp(I*asin(a*x))) - S(2)*a**S(2)*asin(a*x)**S(2)/x - S(2)*a*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**S(3)/(S(3)*x**S(2)) - asin(a*x)**S(4)/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/asin(a*x), x), x, S(5)*CosIntegral(asin(a*x))/(S(64)*a**S(7)) - S(9)*CosIntegral(S(3)*asin(a*x))/(S(64)*a**S(7)) + S(5)*CosIntegral(S(5)*asin(a*x))/(S(64)*a**S(7)) - CosIntegral(S(7)*asin(a*x))/(S(64)*a**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/asin(a*x), x), x, S(5)*SinIntegral(S(2)*asin(a*x))/(S(32)*a**S(6)) - SinIntegral(S(4)*asin(a*x))/(S(8)*a**S(6)) + SinIntegral(S(6)*asin(a*x))/(S(32)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asin(a*x), x), x, CosIntegral(asin(a*x))/(S(8)*a**S(5)) - S(3)*CosIntegral(S(3)*asin(a*x))/(S(16)*a**S(5)) + CosIntegral(S(5)*asin(a*x))/(S(16)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asin(a*x), x), x, SinIntegral(S(2)*asin(a*x))/(S(4)*a**S(4)) - SinIntegral(S(4)*asin(a*x))/(S(8)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asin(a*x), x), x, CosIntegral(asin(a*x))/(S(4)*a**S(3)) - CosIntegral(S(3)*asin(a*x))/(S(4)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asin(a*x), x), x, SinIntegral(S(2)*asin(a*x))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/asin(a*x), x), x, CosIntegral(asin(a*x))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asin(a*x)), x), x, Integrate(S(1)/(x*asin(a*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*asin(a*x)), x), x, Integrate(S(1)/(x**S(2)*asin(a*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/asin(a*x)**S(2), x), x, -x**S(6)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*asin(a*x)) - S(5)*SinIntegral(asin(a*x))/(S(64)*a**S(7)) + S(27)*SinIntegral(S(3)*asin(a*x))/(S(64)*a**S(7)) - S(25)*SinIntegral(S(5)*asin(a*x))/(S(64)*a**S(7)) + S(7)*SinIntegral(S(7)*asin(a*x))/(S(64)*a**S(7)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/asin(a*x)**S(2), x), x, -x**S(5)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*asin(a*x)) + S(5)*CosIntegral(S(2)*asin(a*x))/(S(16)*a**S(6)) - CosIntegral(S(4)*asin(a*x))/(S(2)*a**S(6)) + S(3)*CosIntegral(S(6)*asin(a*x))/(S(16)*a**S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asin(a*x)**S(2), x), x, -x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*asin(a*x)) - SinIntegral(asin(a*x))/(S(8)*a**S(5)) + S(9)*SinIntegral(S(3)*asin(a*x))/(S(16)*a**S(5)) - S(5)*SinIntegral(S(5)*asin(a*x))/(S(16)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asin(a*x)**S(2), x), x, -x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*asin(a*x)) + CosIntegral(S(2)*asin(a*x))/(S(2)*a**S(4)) - CosIntegral(S(4)*asin(a*x))/(S(2)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asin(a*x)**S(2), x), x, -x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*asin(a*x)) - SinIntegral(asin(a*x))/(S(4)*a**S(3)) + S(3)*SinIntegral(S(3)*asin(a*x))/(S(4)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asin(a*x)**S(2), x), x, -x*sqrt(-a**S(2)*x**S(2) + S(1))/(a*asin(a*x)) + CosIntegral(S(2)*asin(a*x))/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(-2)), x), x, -sqrt(-a**S(2)*x**S(2) + S(1))/(a*asin(a*x)) - SinIntegral(asin(a*x))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asin(a*x)**S(2)), x), x, Integrate(S(1)/(x*asin(a*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*asin(a*x)**S(2)), x), x, Integrate(S(1)/(x**S(2)*asin(a*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asin(a*x)**S(3), x), x, S(5)*x**S(5)/(S(2)*asin(a*x)) - x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(2)*a*asin(a*x)**S(2)) - S(2)*x**S(3)/(a**S(2)*asin(a*x)) - CosIntegral(asin(a*x))/(S(16)*a**S(5)) + S(27)*CosIntegral(S(3)*asin(a*x))/(S(32)*a**S(5)) - S(25)*CosIntegral(S(5)*asin(a*x))/(S(32)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asin(a*x)**S(3), x), x, S(2)*x**S(4)/asin(a*x) - x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(2)*a*asin(a*x)**S(2)) - S(3)*x**S(2)/(S(2)*a**S(2)*asin(a*x)) - SinIntegral(S(2)*asin(a*x))/(S(2)*a**S(4)) + SinIntegral(S(4)*asin(a*x))/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asin(a*x)**S(3), x), x, S(3)*x**S(3)/(S(2)*asin(a*x)) - x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(2)*a*asin(a*x)**S(2)) - x/(a**S(2)*asin(a*x)) - CosIntegral(asin(a*x))/(S(8)*a**S(3)) + S(9)*CosIntegral(S(3)*asin(a*x))/(S(8)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asin(a*x)**S(3), x), x, x**S(2)/asin(a*x) - x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(2)*a*asin(a*x)**S(2)) - SinIntegral(S(2)*asin(a*x))/a**S(2) - S(1)/(S(2)*a**S(2)*asin(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(-3)), x), x, x/(S(2)*asin(a*x)) - sqrt(-a**S(2)*x**S(2) + S(1))/(S(2)*a*asin(a*x)**S(2)) - CosIntegral(asin(a*x))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asin(a*x)**S(3)), x), x, Integrate(S(1)/(x*asin(a*x)**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*asin(a*x)**S(3)), x), x, Integrate(S(1)/(x**S(2)*asin(a*x)**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asin(a*x)**S(4), x), x, S(5)*x**S(5)/(S(6)*asin(a*x)**S(2)) + S(25)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(6)*a*asin(a*x)) - x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**S(3)) - S(2)*x**S(3)/(S(3)*a**S(2)*asin(a*x)**S(2)) - S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(a**S(3)*asin(a*x)) + SinIntegral(asin(a*x))/(S(48)*a**S(5)) - S(27)*SinIntegral(S(3)*asin(a*x))/(S(32)*a**S(5)) + S(125)*SinIntegral(S(5)*asin(a*x))/(S(96)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asin(a*x)**S(4), x), x, S(2)*x**S(4)/(S(3)*asin(a*x)**S(2)) + S(8)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)) - x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**S(3)) - x**S(2)/(S(2)*a**S(2)*asin(a*x)**S(2)) - x*sqrt(-a**S(2)*x**S(2) + S(1))/(a**S(3)*asin(a*x)) - CosIntegral(S(2)*asin(a*x))/(S(3)*a**S(4)) + S(4)*CosIntegral(S(4)*asin(a*x))/(S(3)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asin(a*x)**S(4), x), x, x**S(3)/(S(2)*asin(a*x)**S(2)) + S(3)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(2)*a*asin(a*x)) - x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**S(3)) - x/(S(3)*a**S(2)*asin(a*x)**S(2)) - sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a**S(3)*asin(a*x)) + SinIntegral(asin(a*x))/(S(24)*a**S(3)) - S(9)*SinIntegral(S(3)*asin(a*x))/(S(8)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asin(a*x)**S(4), x), x, x**S(2)/(S(3)*asin(a*x)**S(2)) + S(2)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)) - x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**S(3)) - S(2)*CosIntegral(S(2)*asin(a*x))/(S(3)*a**S(2)) - S(1)/(S(6)*a**S(2)*asin(a*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(-4)), x), x, x/(S(6)*asin(a*x)**S(2)) + sqrt(-a**S(2)*x**S(2) + S(1))/(S(6)*a*asin(a*x)) - sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**S(3)) + SinIntegral(asin(a*x))/(S(6)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asin(a*x)**S(4)), x), x, Integrate(S(1)/(x*asin(a*x)**S(4)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*asin(a*x)**S(4)), x), x, Integrate(S(1)/(x**S(2)*asin(a*x)**S(4)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*sqrt(asin(a*x)), x), x, -sqrt(S(10))*sqrt(Pi)*FresnelS(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(800)*a**S(5)) - sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(16)*a**S(5)) + sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(96)*a**S(5)) + x**S(5)*sqrt(asin(a*x))/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*sqrt(asin(a*x)), x), x, sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(16)*a**S(4)) - sqrt(S(2))*sqrt(Pi)*FresnelC(S(2)*sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(128)*a**S(4)) + x**S(4)*sqrt(asin(a*x))/S(4) - S(3)*sqrt(asin(a*x))/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(asin(a*x)), x), x, -sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8)*a**S(3)) + sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(72)*a**S(3)) + x**S(3)*sqrt(asin(a*x))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(asin(a*x)), x), x, sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(8)*a**S(2)) + x**S(2)*sqrt(asin(a*x))/S(2) - sqrt(asin(a*x))/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(asin(a*x)), x), x, -sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(2)*a) + x*sqrt(asin(a*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(asin(a*x))/x, x), x, Integrate(sqrt(asin(a*x))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asin(a*x)**(S(3)/2), x), x, -S(3)*sqrt(S(10))*sqrt(Pi)*FresnelC(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8000)*a**S(5)) - S(3)*sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(32)*a**S(5)) + sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(192)*a**S(5)) + x**S(5)*asin(a*x)**(S(3)/2)/S(5) + S(3)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(50)*a) + S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(25)*a**S(3)) + S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(25)*a**S(5)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(4)*asin(a*x)**(S(3)/2), x), x, -S(3)*sqrt(S(10))*sqrt(Pi)*FresnelC(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8000)*a**S(5)) - S(3)*sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(32)*a**S(5)) + sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(192)*a**S(5)) + x**S(5)*asin(a*x)**(S(3)/2)/S(5) + S(3)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(50)*a) + S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(25)*a**S(3)) + S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(25)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asin(a*x)**(S(3)/2), x), x, -S(3)*sqrt(Pi)*FresnelS(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(64)*a**S(4)) + S(3)*sqrt(S(2))*sqrt(Pi)*FresnelS(S(2)*sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(1024)*a**S(4)) + x**S(4)*asin(a*x)**(S(3)/2)/S(4) + S(3)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(32)*a) + S(9)*x*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(64)*a**S(3)) - S(3)*asin(a*x)**(S(3)/2)/(S(32)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asin(a*x)**(S(3)/2), x), x, -S(3)*sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(16)*a**S(3)) + sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(144)*a**S(3)) + x**S(3)*asin(a*x)**(S(3)/2)/S(3) + x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(6)*a) + sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(3)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asin(a*x)**(S(3)/2), x), x, -S(3)*sqrt(Pi)*FresnelS(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(32)*a**S(2)) + x**S(2)*asin(a*x)**(S(3)/2)/S(2) + S(3)*x*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(8)*a) - asin(a*x)**(S(3)/2)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(3)/2), x), x, -S(3)*sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(4)*a) + x*asin(a*x)**(S(3)/2) + S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*sqrt(asin(a*x))/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(3)/2)/x, x), x, Integrate(asin(a*x)**(S(3)/2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)*asin(a*x)**(S(5)/2), x), x, S(3)*sqrt(S(10))*sqrt(Pi)*FresnelS(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(16000)*a**S(5)) + S(15)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(64)*a**S(5)) - S(5)*sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(1152)*a**S(5)) + x**S(5)*asin(a*x)**(S(5)/2)/S(5) - S(3)*x**S(5)*sqrt(asin(a*x))/S(100) + x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(10)*a) - x**S(3)*sqrt(asin(a*x))/(S(15)*a**S(2)) + S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(15)*a**S(3)) - S(2)*x*sqrt(asin(a*x))/(S(5)*a**S(4)) + S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(15)*a**S(5)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(4)*asin(a*x)**(S(5)/2), x), x, S(3)*sqrt(S(10))*sqrt(Pi)*FresnelS(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(16000)*a**S(5)) + S(15)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(64)*a**S(5)) - S(5)*sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(1152)*a**S(5)) + x**S(5)*asin(a*x)**(S(5)/2)/S(5) - S(3)*x**S(5)*sqrt(asin(a*x))/S(100) + x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(10)*a) - x**S(3)*sqrt(asin(a*x))/(S(15)*a**S(2)) + S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(15)*a**S(3)) - S(2)*x*sqrt(asin(a*x))/(S(5)*a**S(4)) + S(4)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(15)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*asin(a*x)**(S(5)/2), x), x, -S(15)*sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(256)*a**S(4)) + S(15)*sqrt(S(2))*sqrt(Pi)*FresnelC(S(2)*sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8192)*a**S(4)) + x**S(4)*asin(a*x)**(S(5)/2)/S(4) - S(15)*x**S(4)*sqrt(asin(a*x))/S(256) + S(5)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(32)*a) - S(45)*x**S(2)*sqrt(asin(a*x))/(S(256)*a**S(2)) + S(15)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(64)*a**S(3)) - S(3)*asin(a*x)**(S(5)/2)/(S(32)*a**S(4)) + S(225)*sqrt(asin(a*x))/(S(2048)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asin(a*x)**(S(5)/2), x), x, S(15)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(32)*a**S(3)) - S(5)*sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(864)*a**S(3)) + x**S(3)*asin(a*x)**(S(5)/2)/S(3) - S(5)*x**S(3)*sqrt(asin(a*x))/S(36) + S(5)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(18)*a) - S(5)*x*sqrt(asin(a*x))/(S(6)*a**S(2)) + S(5)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(9)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asin(a*x)**(S(5)/2), x), x, -S(15)*sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(128)*a**S(2)) + x**S(2)*asin(a*x)**(S(5)/2)/S(2) - S(15)*x**S(2)*sqrt(asin(a*x))/S(32) + S(5)*x*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(8)*a) - asin(a*x)**(S(5)/2)/(S(4)*a**S(2)) + S(15)*sqrt(asin(a*x))/(S(64)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(5)/2), x), x, S(15)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8)*a) + x*asin(a*x)**(S(5)/2) - S(15)*x*sqrt(asin(a*x))/S(4) + S(5)*sqrt(-a**S(2)*x**S(2) + S(1))*asin(a*x)**(S(3)/2)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(5)/2)/x, x), x, Integrate(asin(a*x)**(S(5)/2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/sqrt(asin(a*x)), x), x, sqrt(S(10))*sqrt(Pi)*FresnelC(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(80)*a**S(5)) + sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8)*a**S(5)) - sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(16)*a**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/sqrt(asin(a*x)), x), x, sqrt(Pi)*FresnelS(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(4)*a**S(4)) - sqrt(S(2))*sqrt(Pi)*FresnelS(S(2)*sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(16)*a**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(asin(a*x)), x), x, sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(4)*a**S(3)) - sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(12)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(asin(a*x)), x), x, sqrt(Pi)*FresnelS(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(2)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(asin(a*x)), x), x, sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/a, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(asin(a*x))), x), x, Integrate(S(1)/(x*sqrt(asin(a*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(asin(a*x))), x), x, Integrate(S(1)/(x**S(2)*sqrt(asin(a*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(6)/asin(a*x)**(S(3)/2), x), x, -S(5)*sqrt(S(10))*sqrt(Pi)*FresnelS(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(32)*a**S(7)) + sqrt(S(14))*sqrt(Pi)*FresnelS(sqrt(S(14))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(32)*a**S(7)) - S(5)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(32)*a**S(7)) + S(9)*sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(32)*a**S(7)) - S(2)*x**S(6)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(5)/asin(a*x)**(S(3)/2), x), x, S(5)*sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(8)*a**S(6)) - sqrt(S(2))*sqrt(Pi)*FresnelC(S(2)*sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(2)*a**S(6)) + sqrt(S(3))*sqrt(Pi)*FresnelC(S(2)*sqrt(S(3))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8)*a**S(6)) - S(2)*x**S(5)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asin(a*x)**(S(3)/2), x), x, -sqrt(S(10))*sqrt(Pi)*FresnelS(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8)*a**S(5)) - sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(4)*a**S(5)) + S(3)*sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(8)*a**S(5)) - S(2)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asin(a*x)**(S(3)/2), x), x, sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/a**S(4) - sqrt(S(2))*sqrt(Pi)*FresnelC(S(2)*sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(2)*a**S(4)) - S(2)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asin(a*x)**(S(3)/2), x), x, -sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(2)*a**S(3)) + sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(2)*a**S(3)) - S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asin(a*x)**(S(3)/2), x), x, S(2)*sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/a**S(2) - S(2)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(a*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(-3)/2), x), x, -S(2)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/a - S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(a*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asin(a*x)**(S(3)/2)), x), x, Integrate(S(1)/(x*asin(a*x)**(S(3)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asin(a*x)**(S(5)/2), x), x, -S(5)*sqrt(S(10))*sqrt(Pi)*FresnelC(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(12)*a**S(5)) - sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(6)*a**S(5)) + S(3)*sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(4)*a**S(5)) + S(20)*x**S(5)/(S(3)*sqrt(asin(a*x))) - S(2)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**(S(3)/2)) - S(16)*x**S(3)/(S(3)*a**S(2)*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate(x**S(4)/asin(a*x)**(S(5)/2), x), x, -S(5)*sqrt(S(10))*sqrt(Pi)*FresnelC(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(12)*a**S(5)) - sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(6)*a**S(5)) + S(3)*sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(4)*a**S(5)) + S(20)*x**S(5)/(S(3)*sqrt(asin(a*x))) - S(2)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**(S(3)/2)) - S(16)*x**S(3)/(S(3)*a**S(2)*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asin(a*x)**(S(5)/2), x), x, -S(4)*sqrt(Pi)*FresnelS(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(3)*a**S(4)) + S(4)*sqrt(S(2))*sqrt(Pi)*FresnelS(S(2)*sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(3)*a**S(4)) + S(16)*x**S(4)/(S(3)*sqrt(asin(a*x))) - S(2)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**(S(3)/2)) - S(4)*x**S(2)/(a**S(2)*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asin(a*x)**(S(5)/2), x), x, -sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(3)*a**S(3)) + sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/a**S(3) + S(4)*x**S(3)/sqrt(asin(a*x)) - S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**(S(3)/2)) - S(8)*x/(S(3)*a**S(2)*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asin(a*x)**(S(5)/2), x), x, -S(8)*sqrt(Pi)*FresnelS(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(3)*a**S(2)) + S(8)*x**S(2)/(S(3)*sqrt(asin(a*x))) - S(2)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**(S(3)/2)) - S(4)/(S(3)*a**S(2)*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(-5)/2), x), x, -S(4)*sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(3)*a) + S(4)*x/(S(3)*sqrt(asin(a*x))) - S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*asin(a*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asin(a*x)**(S(5)/2)), x), x, Integrate(S(1)/(x*asin(a*x)**(S(5)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(4)/asin(a*x)**(S(7)/2), x), x, S(5)*sqrt(S(10))*sqrt(Pi)*FresnelS(sqrt(S(10))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(6)*a**S(5)) + sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(15)*a**S(5)) - S(9)*sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(10)*a**S(5)) + S(4)*x**S(5)/(S(3)*asin(a*x)**(S(3)/2)) + S(40)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(3)*a*sqrt(asin(a*x))) - S(2)*x**S(4)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a*asin(a*x)**(S(5)/2)) - S(16)*x**S(3)/(S(15)*a**S(2)*asin(a*x)**(S(3)/2)) - S(32)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a**S(3)*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)/asin(a*x)**(S(7)/2), x), x, -S(16)*sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(15)*a**S(4)) + S(32)*sqrt(S(2))*sqrt(Pi)*FresnelC(S(2)*sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(15)*a**S(4)) + S(16)*x**S(4)/(S(15)*asin(a*x)**(S(3)/2)) + S(128)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(15)*a*sqrt(asin(a*x))) - S(2)*x**S(3)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a*asin(a*x)**(S(5)/2)) - S(4)*x**S(2)/(S(5)*a**S(2)*asin(a*x)**(S(3)/2)) - S(16)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a**S(3)*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/asin(a*x)**(S(7)/2), x), x, S(2)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(15)*a**S(3)) - S(6)*sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(5)*a**S(3)) + S(4)*x**S(3)/(S(5)*asin(a*x)**(S(3)/2)) + S(24)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a*sqrt(asin(a*x))) - S(2)*x**S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a*asin(a*x)**(S(5)/2)) - S(8)*x/(S(15)*a**S(2)*asin(a*x)**(S(3)/2)) - S(16)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(15)*a**S(3)*sqrt(asin(a*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/asin(a*x)**(S(7)/2), x), x, -S(32)*sqrt(Pi)*FresnelC(S(2)*sqrt(asin(a*x))/sqrt(Pi))/(S(15)*a**S(2)) + S(8)*x**S(2)/(S(15)*asin(a*x)**(S(3)/2)) + S(32)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(15)*a*sqrt(asin(a*x))) - S(2)*x*sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a*asin(a*x)**(S(5)/2)) - S(4)/(S(15)*a**S(2)*asin(a*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**(S(-7)/2), x), x, S(8)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(S(1)/Pi)*sqrt(asin(a*x)))/(S(15)*a) + S(4)*x/(S(15)*asin(a*x)**(S(3)/2)) + S(8)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(15)*a*sqrt(asin(a*x))) - S(2)*sqrt(-a**S(2)*x**S(2) + S(1))/(S(5)*a*asin(a*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*asin(a*x)**(S(7)/2)), x), x, Integrate(S(1)/(x*asin(a*x)**(S(7)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m*asin(a*x)**S(4), x), x, -S(4)*a*Integrate((b*x)**(m + S(1))*asin(a*x)**S(3)/sqrt(-a**S(2)*x**S(2) + S(1)), x)/(b*(m + S(1))) + (b*x)**(m + S(1))*asin(a*x)**S(4)/(b*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m*asin(a*x)**S(3), x), x, -S(3)*a*Integrate((b*x)**(m + S(1))*asin(a*x)**S(2)/sqrt(-a**S(2)*x**S(2) + S(1)), x)/(b*(m + S(1))) + (b*x)**(m + S(1))*asin(a*x)**S(3)/(b*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m*asin(a*x)**S(2), x), x, S(2)*a**S(2)*(b*x)**(m + S(3))*HypergeometricPFQ(List(S(1), m/S(2) + S(3)/2, m/S(2) + S(3)/2), List(m/S(2) + S(2), m/S(2) + S(5)/2), a**S(2)*x**S(2))/(b**S(3)*(m + S(1))*(m + S(2))*(m + S(3))) - S(2)*a*(b*x)**(m + S(2))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1), m/S(2) + S(2), a**S(2)*x**S(2))*asin(a*x)/(b**S(2)*(m + S(1))*(m + S(2))) + (b*x)**(m + S(1))*asin(a*x)**S(2)/(b*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m*asin(a*x), x), x, -a*(b*x)**(m + S(2))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1), m/S(2) + S(2), a**S(2)*x**S(2))/(b**S(2)*(m + S(1))*(m + S(2))) + (b*x)**(m + S(1))*asin(a*x)/(b*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m/asin(a*x), x), x, Integrate((b*x)**m/asin(a*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m/asin(a*x)**S(2), x), x, Integrate((b*x)**m/asin(a*x)**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m*asin(a*x)**(S(3)/2), x), x, Integrate((b*x)**m*asin(a*x)**(S(3)/2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m*sqrt(asin(a*x)), x), x, Integrate((b*x)**m*sqrt(asin(a*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m/sqrt(asin(a*x)), x), x, Integrate((b*x)**m/sqrt(asin(a*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m/asin(a*x)**(S(3)/2), x), x, Integrate((b*x)**m/asin(a*x)**(S(3)/2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**m*asin(a*x)**n, x), x, Integrate((b*x)**m*asin(a*x)**n, x), expand=True, _diff=True, _numerical=True) # sympy and mathematicA assert rubi_test(rubi_integrate(x**S(3)*asin(a*x)**n, x), x, S(2)**(-S(2)*n + S(-6))*(-I*asin(a*x))**(-n)*Gamma(n + S(1), -S(4)*I*asin(a*x))*asin(a*x)**n/a**S(4) + S(2)**(-S(2)*n + S(-6))*(I*asin(a*x))**(-n)*Gamma(n + S(1), S(4)*I*asin(a*x))*asin(a*x)**n/a**S(4) - S(2)**(-n + S(-4))*(-I*asin(a*x))**(-n)*Gamma(n + S(1), -S(2)*I*asin(a*x))*asin(a*x)**n/a**S(4) - S(2)**(-n + S(-4))*(I*asin(a*x))**(-n)*Gamma(n + S(1), S(2)*I*asin(a*x))*asin(a*x)**n/a**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*asin(a*x)**n, x), x, S(3)**(-n + S(-1))*I*(-I*asin(a*x))**(-n)*Gamma(n + S(1), -S(3)*I*asin(a*x))*asin(a*x)**n/(S(8)*a**S(3)) - S(3)**(-n + S(-1))*I*(I*asin(a*x))**(-n)*Gamma(n + S(1), S(3)*I*asin(a*x))*asin(a*x)**n/(S(8)*a**S(3)) - I*(-I*asin(a*x))**(-n)*Gamma(n + S(1), -I*asin(a*x))*asin(a*x)**n/(S(8)*a**S(3)) + I*(I*asin(a*x))**(-n)*Gamma(n + S(1), I*asin(a*x))*asin(a*x)**n/(S(8)*a**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*asin(a*x)**n, x), x, -S(2)**(-n + S(-3))*(-I*asin(a*x))**(-n)*Gamma(n + S(1), -S(2)*I*asin(a*x))*asin(a*x)**n/a**S(2) - S(2)**(-n + S(-3))*(I*asin(a*x))**(-n)*Gamma(n + S(1), S(2)*I*asin(a*x))*asin(a*x)**n/a**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**n, x), x, -I*(-I*asin(a*x))**(-n)*Gamma(n + S(1), -I*asin(a*x))*asin(a*x)**n/(S(2)*a) + I*(I*asin(a*x))**(-n)*Gamma(n + S(1), I*asin(a*x))*asin(a*x)**n/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**n/x, x), x, Integrate(asin(a*x)**n/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**n/x**S(2), x), x, Integrate(asin(a*x)**n/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*x)**(S(3)/2)*asin(a*x)**n, x), x, Integrate((b*x)**(S(3)/2)*asin(a*x)**n, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*x)*asin(a*x)**n, x), x, Integrate(sqrt(b*x)*asin(a*x)**n, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**n/sqrt(b*x), x), x, Integrate(asin(a*x)**n/sqrt(b*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(asin(a*x)**n/(b*x)**(S(3)/2), x), x, Integrate(asin(a*x)**n/(b*x)**(S(3)/2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(3)*(a + b*asin(c*x)), x), x, b*x**S(3)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(16)*c) + S(3)*b*x*sqrt(-c**S(2)*x**S(2) + S(1))/(S(32)*c**S(3)) - S(3)*b*asin(c*x)/(S(32)*c**S(4)) + x**S(4)*(a + b*asin(c*x))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*asin(c*x)), x), x, -b*(-c**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(9)*c**S(3)) + b*sqrt(-c**S(2)*x**S(2) + S(1))/(S(3)*c**S(3)) + x**S(3)*(a + b*asin(c*x))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*asin(c*x)), x), x, b*x*sqrt(-c**S(2)*x**S(2) + S(1))/(S(4)*c) - b*asin(c*x)/(S(4)*c**S(2)) + x**S(2)*(a + b*asin(c*x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(a + b*asin(c*x), x), x, a*x + b*x*asin(c*x) + b*sqrt(-c**S(2)*x**S(2) + S(1))/c, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))/x, x), x, -I*b*PolyLog(S(2), exp(S(2)*I*asin(c*x)))/S(2) + (a + b*asin(c*x))*log(-exp(S(2)*I*asin(c*x)) + S(1)) - I*(a + b*asin(c*x))**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))/x**S(2), x), x, -b*c*atanh(sqrt(-c**S(2)*x**S(2) + S(1))) - (a + b*asin(c*x))/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))/x**S(3), x), x, -b*c*sqrt(-c**S(2)*x**S(2) + S(1))/(S(2)*x) - (a + b*asin(c*x))/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))/x**S(4), x), x, -b*c**S(3)*atanh(sqrt(-c**S(2)*x**S(2) + S(1)))/S(6) - b*c*sqrt(-c**S(2)*x**S(2) + S(1))/(S(6)*x**S(2)) - (a + b*asin(c*x))/(S(3)*x**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*asin(c*x))**S(2), x), x, -S(2)*b**S(2)*x**S(3)/S(27) - S(4)*b**S(2)*x/(S(9)*c**S(2)) + S(2)*b*x**S(2)*(a + b*asin(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))/(S(9)*c) + S(4)*b*(a + b*asin(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))/(S(9)*c**S(3)) + x**S(3)*(a + b*asin(c*x))**S(2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*asin(c*x))**S(2), x), x, -b**S(2)*x**S(2)/S(4) + b*x*(a + b*asin(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))/(S(2)*c) + x**S(2)*(a + b*asin(c*x))**S(2)/S(2) - (a + b*asin(c*x))**S(2)/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(2), x), x, -S(2)*b**S(2)*x + S(2)*b*(a + b*asin(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))/c + x*(a + b*asin(c*x))**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(2)/x, x), x, b**S(2)*PolyLog(S(3), exp(S(2)*I*asin(c*x)))/S(2) - I*b*(a + b*asin(c*x))*PolyLog(S(2), exp(S(2)*I*asin(c*x))) + (a + b*asin(c*x))**S(2)*log(-exp(S(2)*I*asin(c*x)) + S(1)) - I*(a + b*asin(c*x))**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(2)/x**S(2), x), x, S(2)*I*b**S(2)*c*PolyLog(S(2), -exp(I*asin(c*x))) - S(2)*I*b**S(2)*c*PolyLog(S(2), exp(I*asin(c*x))) - S(4)*b*c*(a + b*asin(c*x))*atanh(exp(I*asin(c*x))) - (a + b*asin(c*x))**S(2)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*asin(c*x))**S(3), x), x, -S(4)*a*b**S(2)*x/(S(3)*c**S(2)) - S(4)*b**S(3)*x*asin(c*x)/(S(3)*c**S(2)) + S(2)*b**S(3)*(-c**S(2)*x**S(2) + S(1))**(S(3)/2)/(S(27)*c**S(3)) - S(14)*b**S(3)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(9)*c**S(3)) - S(2)*b**S(2)*x**S(3)*(a + b*asin(c*x))/S(9) + b*x**S(2)*(a + b*asin(c*x))**S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(3)*c) + S(2)*b*(a + b*asin(c*x))**S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(3)*c**S(3)) + x**S(3)*(a + b*asin(c*x))**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*asin(c*x))**S(3), x), x, -S(3)*b**S(3)*x*sqrt(-c**S(2)*x**S(2) + S(1))/(S(8)*c) + S(3)*b**S(3)*asin(c*x)/(S(8)*c**S(2)) - S(3)*b**S(2)*x**S(2)*(a + b*asin(c*x))/S(4) + S(3)*b*x*(a + b*asin(c*x))**S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(4)*c) + x**S(2)*(a + b*asin(c*x))**S(3)/S(2) - (a + b*asin(c*x))**S(3)/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(3), x), x, -S(6)*a*b**S(2)*x - S(6)*b**S(3)*x*asin(c*x) - S(6)*b**S(3)*sqrt(-c**S(2)*x**S(2) + S(1))/c + S(3)*b*(a + b*asin(c*x))**S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/c + x*(a + b*asin(c*x))**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(3)/x, x), x, S(3)*I*b**S(3)*PolyLog(S(4), exp(S(2)*I*asin(c*x)))/S(4) + S(3)*b**S(2)*(a + b*asin(c*x))*PolyLog(S(3), exp(S(2)*I*asin(c*x)))/S(2) - S(3)*I*b*(a + b*asin(c*x))**S(2)*PolyLog(S(2), exp(S(2)*I*asin(c*x)))/S(2) + (a + b*asin(c*x))**S(3)*log(-exp(S(2)*I*asin(c*x)) + S(1)) - I*(a + b*asin(c*x))**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(3)/x**S(2), x), x, -S(6)*b**S(3)*c*PolyLog(S(3), -exp(I*asin(c*x))) + S(6)*b**S(3)*c*PolyLog(S(3), exp(I*asin(c*x))) + S(6)*I*b**S(2)*c*(a + b*asin(c*x))*PolyLog(S(2), -exp(I*asin(c*x))) - S(6)*I*b**S(2)*c*(a + b*asin(c*x))*PolyLog(S(2), exp(I*asin(c*x))) - S(6)*b*c*(a + b*asin(c*x))**S(2)*atanh(exp(I*asin(c*x))) - (a + b*asin(c*x))**S(3)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*asin(c*x)), x), x, CosIntegral(a/b + asin(c*x))*cos(a/b)/(S(4)*b*c**S(3)) - CosIntegral(S(3)*a/b + S(3)*asin(c*x))*cos(S(3)*a/b)/(S(4)*b*c**S(3)) + SinIntegral(a/b + asin(c*x))*sin(a/b)/(S(4)*b*c**S(3)) - SinIntegral(S(3)*a/b + S(3)*asin(c*x))*sin(S(3)*a/b)/(S(4)*b*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*asin(c*x)), x), x, -CosIntegral(S(2)*a/b + S(2)*asin(c*x))*sin(S(2)*a/b)/(S(2)*b*c**S(2)) + SinIntegral(S(2)*a/b + S(2)*asin(c*x))*cos(S(2)*a/b)/(S(2)*b*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(a + b*asin(c*x)), x), x, CosIntegral((a + b*asin(c*x))/b)*cos(a/b)/(b*c) + SinIntegral((a + b*asin(c*x))/b)*sin(a/b)/(b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*asin(c*x))), x), x, Integrate(S(1)/(x*(a + b*asin(c*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*asin(c*x))), x), x, Integrate(S(1)/(x**S(2)*(a + b*asin(c*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*asin(c*x))**S(2), x), x, -x**S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(a + b*asin(c*x))) + CosIntegral(a/b + asin(c*x))*sin(a/b)/(S(4)*b**S(2)*c**S(3)) - S(3)*CosIntegral(S(3)*a/b + S(3)*asin(c*x))*sin(S(3)*a/b)/(S(4)*b**S(2)*c**S(3)) - SinIntegral(a/b + asin(c*x))*cos(a/b)/(S(4)*b**S(2)*c**S(3)) + S(3)*SinIntegral(S(3)*a/b + S(3)*asin(c*x))*cos(S(3)*a/b)/(S(4)*b**S(2)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*asin(c*x))**S(2), x), x, -x*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(a + b*asin(c*x))) + CosIntegral(S(2)*a/b + S(2)*asin(c*x))*cos(S(2)*a/b)/(b**S(2)*c**S(2)) + SinIntegral(S(2)*a/b + S(2)*asin(c*x))*sin(S(2)*a/b)/(b**S(2)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(-2)), x), x, -sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*(a + b*asin(c*x))) + CosIntegral(a/b + asin(c*x))*sin(a/b)/(b**S(2)*c) - SinIntegral(a/b + asin(c*x))*cos(a/b)/(b**S(2)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*asin(c*x))**S(2)), x), x, Integrate(S(1)/(x*(a + b*asin(c*x))**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*asin(c*x))**S(2)), x), x, Integrate(S(1)/(x**S(2)*(a + b*asin(c*x))**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*asin(c*x))**S(3), x), x, -x**S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(2)*b*c*(a + b*asin(c*x))**S(2)) + S(3)*x**S(3)/(S(2)*b**S(2)*(a + b*asin(c*x))) - x/(b**S(2)*c**S(2)*(a + b*asin(c*x))) + CosIntegral((a + b*asin(c*x))/b)*cos(a/b)/(b**S(3)*c**S(3)) - S(9)*CosIntegral(a/b + asin(c*x))*cos(a/b)/(S(8)*b**S(3)*c**S(3)) + S(9)*CosIntegral(S(3)*a/b + S(3)*asin(c*x))*cos(S(3)*a/b)/(S(8)*b**S(3)*c**S(3)) + SinIntegral((a + b*asin(c*x))/b)*sin(a/b)/(b**S(3)*c**S(3)) - S(9)*SinIntegral(a/b + asin(c*x))*sin(a/b)/(S(8)*b**S(3)*c**S(3)) + S(9)*SinIntegral(S(3)*a/b + S(3)*asin(c*x))*sin(S(3)*a/b)/(S(8)*b**S(3)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*asin(c*x))**S(3), x), x, -x*sqrt(-c**S(2)*x**S(2) + S(1))/(S(2)*b*c*(a + b*asin(c*x))**S(2)) + x**S(2)/(b**S(2)*(a + b*asin(c*x))) - S(1)/(S(2)*b**S(2)*c**S(2)*(a + b*asin(c*x))) + CosIntegral(S(2)*a/b + S(2)*asin(c*x))*sin(S(2)*a/b)/(b**S(3)*c**S(2)) - SinIntegral(S(2)*a/b + S(2)*asin(c*x))*cos(S(2)*a/b)/(b**S(3)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(-3)), x), x, -sqrt(-c**S(2)*x**S(2) + S(1))/(S(2)*b*c*(a + b*asin(c*x))**S(2)) + x/(S(2)*b**S(2)*(a + b*asin(c*x))) - CosIntegral((a + b*asin(c*x))/b)*cos(a/b)/(S(2)*b**S(3)*c) - SinIntegral((a + b*asin(c*x))/b)*sin(a/b)/(S(2)*b**S(3)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*asin(c*x))**S(3)), x), x, Integrate(S(1)/(x*(a + b*asin(c*x))**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*asin(c*x))**S(3)), x), x, Integrate(S(1)/(x**S(2)*(a + b*asin(c*x))**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(a + b*asin(c*x)), x), x, sqrt(S(2))*sqrt(Pi)*sqrt(b)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(8)*c**S(3)) - sqrt(S(6))*sqrt(Pi)*sqrt(b)*FresnelC(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(S(3)*a/b)/(S(72)*c**S(3)) - sqrt(S(2))*sqrt(Pi)*sqrt(b)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(8)*c**S(3)) + sqrt(S(6))*sqrt(Pi)*sqrt(b)*FresnelS(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(S(3)*a/b)/(S(72)*c**S(3)) + x**S(3)*sqrt(a + b*asin(c*x))/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(a + b*asin(c*x)), x), x, sqrt(Pi)*sqrt(b)*FresnelC(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*cos(S(2)*a/b)/(S(8)*c**S(2)) + sqrt(Pi)*sqrt(b)*FresnelS(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*sin(S(2)*a/b)/(S(8)*c**S(2)) + x**S(2)*sqrt(a + b*asin(c*x))/S(2) - sqrt(a + b*asin(c*x))/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*asin(c*x)), x), x, sqrt(S(2))*sqrt(Pi)*sqrt(b)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(2)*c) - sqrt(S(2))*sqrt(Pi)*sqrt(b)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(2)*c) + x*sqrt(a + b*asin(c*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*asin(c*x))/x, x), x, Integrate(sqrt(a + b*asin(c*x))/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a + b*asin(c*x))/x**S(2), x), x, Integrate(sqrt(a + b*asin(c*x))/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*asin(c*x))**(S(3)/2), x), x, -S(3)*sqrt(S(2))*sqrt(Pi)*b**(S(3)/2)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(16)*c**S(3)) + sqrt(S(6))*sqrt(Pi)*b**(S(3)/2)*FresnelC(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(S(3)*a/b)/(S(144)*c**S(3)) - S(3)*sqrt(S(2))*sqrt(Pi)*b**(S(3)/2)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(16)*c**S(3)) + sqrt(S(6))*sqrt(Pi)*b**(S(3)/2)*FresnelS(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(S(3)*a/b)/(S(144)*c**S(3)) + b*x**S(2)*sqrt(a + b*asin(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))/(S(6)*c) + b*sqrt(a + b*asin(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))/(S(3)*c**S(3)) + x**S(3)*(a + b*asin(c*x))**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*asin(c*x))**(S(3)/2), x), x, S(3)*sqrt(Pi)*b**(S(3)/2)*FresnelC(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*sin(S(2)*a/b)/(S(32)*c**S(2)) - S(3)*sqrt(Pi)*b**(S(3)/2)*FresnelS(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*cos(S(2)*a/b)/(S(32)*c**S(2)) + S(3)*b*x*sqrt(a + b*asin(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))/(S(8)*c) + x**S(2)*(a + b*asin(c*x))**(S(3)/2)/S(2) - (a + b*asin(c*x))**(S(3)/2)/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(3)/2), x), x, -S(3)*sqrt(S(2))*sqrt(Pi)*b**(S(3)/2)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(4)*c) - S(3)*sqrt(S(2))*sqrt(Pi)*b**(S(3)/2)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(4)*c) + S(3)*b*sqrt(a + b*asin(c*x))*sqrt(-c**S(2)*x**S(2) + S(1))/(S(2)*c) + x*(a + b*asin(c*x))**(S(3)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(3)/2)/x, x), x, Integrate((a + b*asin(c*x))**(S(3)/2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(3)/2)/x**S(2), x), x, Integrate((a + b*asin(c*x))**(S(3)/2)/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*(a + b*asin(c*x))**(S(5)/2), x), x, -S(15)*sqrt(S(2))*sqrt(Pi)*b**(S(5)/2)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(32)*c**S(3)) + S(5)*sqrt(S(6))*sqrt(Pi)*b**(S(5)/2)*FresnelC(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(S(3)*a/b)/(S(864)*c**S(3)) + S(15)*sqrt(S(2))*sqrt(Pi)*b**(S(5)/2)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(32)*c**S(3)) - S(5)*sqrt(S(6))*sqrt(Pi)*b**(S(5)/2)*FresnelS(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(S(3)*a/b)/(S(864)*c**S(3)) - S(5)*b**S(2)*x**S(3)*sqrt(a + b*asin(c*x))/S(36) - S(5)*b**S(2)*x*sqrt(a + b*asin(c*x))/(S(6)*c**S(2)) + S(5)*b*x**S(2)*(a + b*asin(c*x))**(S(3)/2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(18)*c) + S(5)*b*(a + b*asin(c*x))**(S(3)/2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(9)*c**S(3)) + x**S(3)*(a + b*asin(c*x))**(S(5)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*(a + b*asin(c*x))**(S(5)/2), x), x, -S(15)*sqrt(Pi)*b**(S(5)/2)*FresnelC(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*cos(S(2)*a/b)/(S(128)*c**S(2)) - S(15)*sqrt(Pi)*b**(S(5)/2)*FresnelS(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*sin(S(2)*a/b)/(S(128)*c**S(2)) - S(15)*b**S(2)*x**S(2)*sqrt(a + b*asin(c*x))/S(32) + S(15)*b**S(2)*sqrt(a + b*asin(c*x))/(S(64)*c**S(2)) + S(5)*b*x*(a + b*asin(c*x))**(S(3)/2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(8)*c) + x**S(2)*(a + b*asin(c*x))**(S(5)/2)/S(2) - (a + b*asin(c*x))**(S(5)/2)/(S(4)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(5)/2), x), x, -S(15)*sqrt(S(2))*sqrt(Pi)*b**(S(5)/2)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(8)*c) + S(15)*sqrt(S(2))*sqrt(Pi)*b**(S(5)/2)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(8)*c) - S(15)*b**S(2)*x*sqrt(a + b*asin(c*x))/S(4) + S(5)*b*(a + b*asin(c*x))**(S(3)/2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(2)*c) + x*(a + b*asin(c*x))**(S(5)/2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(5)/2)/x, x), x, Integrate((a + b*asin(c*x))**(S(5)/2)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(5)/2)/x**S(2), x), x, Integrate((a + b*asin(c*x))**(S(5)/2)/x**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/sqrt(a + b*asin(c*x)), x), x, sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(4)*sqrt(b)*c**S(3)) - sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(S(3)*a/b)/(S(12)*sqrt(b)*c**S(3)) + sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(4)*sqrt(b)*c**S(3)) - sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(S(3)*a/b)/(S(12)*sqrt(b)*c**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/sqrt(a + b*asin(c*x)), x), x, -sqrt(Pi)*FresnelC(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*sin(S(2)*a/b)/(S(2)*sqrt(b)*c**S(2)) + sqrt(Pi)*FresnelS(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*cos(S(2)*a/b)/(S(2)*sqrt(b)*c**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a + b*asin(c*x)), x), x, sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(sqrt(b)*c) + sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(sqrt(b)*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(a + b*asin(c*x))), x), x, Integrate(S(1)/(x*sqrt(a + b*asin(c*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(a + b*asin(c*x))), x), x, Integrate(S(1)/(x**S(2)*sqrt(a + b*asin(c*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*asin(c*x))**(S(3)/2), x), x, sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(2)*b**(S(3)/2)*c**S(3)) - sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(S(3)*a/b)/(S(2)*b**(S(3)/2)*c**S(3)) - sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(2)*b**(S(3)/2)*c**S(3)) + sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(S(3)*a/b)/(S(2)*b**(S(3)/2)*c**S(3)) - S(2)*x**S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*sqrt(a + b*asin(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*asin(c*x))**(S(3)/2), x), x, S(2)*sqrt(Pi)*FresnelC(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*cos(S(2)*a/b)/(b**(S(3)/2)*c**S(2)) + S(2)*sqrt(Pi)*FresnelS(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*sin(S(2)*a/b)/(b**(S(3)/2)*c**S(2)) - S(2)*x*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*sqrt(a + b*asin(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(-3)/2), x), x, S(2)*sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(b**(S(3)/2)*c) - S(2)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(b**(S(3)/2)*c) - S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(b*c*sqrt(a + b*asin(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*asin(c*x))**(S(3)/2)), x), x, Integrate(S(1)/(x*(a + b*asin(c*x))**(S(3)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*asin(c*x))**(S(3)/2)), x), x, Integrate(S(1)/(x**S(2)*(a + b*asin(c*x))**(S(3)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)/(a + b*asin(c*x))**(S(5)/2), x), x, -sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(3)*b**(S(5)/2)*c**S(3)) + sqrt(S(6))*sqrt(Pi)*FresnelC(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(S(3)*a/b)/(b**(S(5)/2)*c**S(3)) - sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(3)*b**(S(5)/2)*c**S(3)) + sqrt(S(6))*sqrt(Pi)*FresnelS(sqrt(S(6))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(S(3)*a/b)/(b**(S(5)/2)*c**S(3)) - S(2)*x**S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(3)*b*c*(a + b*asin(c*x))**(S(3)/2)) + S(4)*x**S(3)/(b**S(2)*sqrt(a + b*asin(c*x))) - S(8)*x/(S(3)*b**S(2)*c**S(2)*sqrt(a + b*asin(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(a + b*asin(c*x))**(S(5)/2), x), x, S(8)*sqrt(Pi)*FresnelC(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*sin(S(2)*a/b)/(S(3)*b**(S(5)/2)*c**S(2)) - S(8)*sqrt(Pi)*FresnelS(S(2)*sqrt(a + b*asin(c*x))/(sqrt(Pi)*sqrt(b)))*cos(S(2)*a/b)/(S(3)*b**(S(5)/2)*c**S(2)) - S(2)*x*sqrt(-c**S(2)*x**S(2) + S(1))/(S(3)*b*c*(a + b*asin(c*x))**(S(3)/2)) + S(8)*x**S(2)/(S(3)*b**S(2)*sqrt(a + b*asin(c*x))) - S(4)/(S(3)*b**S(2)*c**S(2)*sqrt(a + b*asin(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**(S(-5)/2), x), x, -S(4)*sqrt(S(2))*sqrt(Pi)*FresnelC(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*cos(a/b)/(S(3)*b**(S(5)/2)*c) - S(4)*sqrt(S(2))*sqrt(Pi)*FresnelS(sqrt(S(2))*sqrt(a + b*asin(c*x))*sqrt(S(1)/Pi)/sqrt(b))*sin(a/b)/(S(3)*b**(S(5)/2)*c) - S(2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(3)*b*c*(a + b*asin(c*x))**(S(3)/2)) + S(4)*x/(S(3)*b**S(2)*sqrt(a + b*asin(c*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(a + b*asin(c*x))**(S(5)/2)), x), x, Integrate(S(1)/(x*(a + b*asin(c*x))**(S(5)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(a + b*asin(c*x))**(S(5)/2)), x), x, Integrate(S(1)/(x**S(2)*(a + b*asin(c*x))**(S(5)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)*(a + b*asin(c*x)), x), x, S(4)*b*(d*x)**(S(5)/2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(49)*c) + S(20)*b*d**S(2)*sqrt(d*x)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(147)*c**S(3)) - S(20)*b*d**(S(5)/2)*EllipticF(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/(S(147)*c**(S(7)/2)) + S(2)*(d*x)**(S(7)/2)*(a + b*asin(c*x))/(S(7)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a + b*asin(c*x)), x), x, S(4)*b*(d*x)**(S(3)/2)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(25)*c) - S(12)*b*d**(S(3)/2)*EllipticE(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/(S(25)*c**(S(5)/2)) + S(12)*b*d**(S(3)/2)*EllipticF(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/(S(25)*c**(S(5)/2)) + S(2)*(d*x)**(S(5)/2)*(a + b*asin(c*x))/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a + b*asin(c*x)), x), x, S(4)*b*sqrt(d*x)*sqrt(-c**S(2)*x**S(2) + S(1))/(S(9)*c) - S(4)*b*sqrt(d)*EllipticF(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/(S(9)*c**(S(3)/2)) + S(2)*(d*x)**(S(3)/2)*(a + b*asin(c*x))/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))/sqrt(d*x), x), x, -S(4)*b*EllipticE(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/(sqrt(c)*sqrt(d)) + S(4)*b*EllipticF(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/(sqrt(c)*sqrt(d)) + S(2)*sqrt(d*x)*(a + b*asin(c*x))/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))/(d*x)**(S(3)/2), x), x, S(4)*b*sqrt(c)*EllipticF(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/d**(S(3)/2) - (S(2)*a + S(2)*b*asin(c*x))/(d*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))/(d*x)**(S(5)/2), x), x, -S(4)*b*c**(S(3)/2)*EllipticE(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/(S(3)*d**(S(5)/2)) + S(4)*b*c**(S(3)/2)*EllipticF(asin(sqrt(c)*sqrt(d*x)/sqrt(d)), S(-1))/(S(3)*d**(S(5)/2)) - S(4)*b*c*sqrt(-c**S(2)*x**S(2) + S(1))/(S(3)*d**S(2)*sqrt(d*x)) - (S(2)*a + S(2)*b*asin(c*x))/(S(3)*d*(d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(5)/2)*(a + b*asin(c*x))**S(2), x), x, S(16)*b**S(2)*c**S(2)*(d*x)**(S(11)/2)*HypergeometricPFQ(List(S(1), S(11)/4, S(11)/4), List(S(13)/4, S(15)/4), c**S(2)*x**S(2))/(S(693)*d**S(3)) - S(8)*b*c*(d*x)**(S(9)/2)*(a + b*asin(c*x))*Hypergeometric2F1(S(1)/2, S(9)/4, S(13)/4, c**S(2)*x**S(2))/(S(63)*d**S(2)) + S(2)*(d*x)**(S(7)/2)*(a + b*asin(c*x))**S(2)/(S(7)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a + b*asin(c*x))**S(2), x), x, S(16)*b**S(2)*c**S(2)*(d*x)**(S(9)/2)*HypergeometricPFQ(List(S(1), S(9)/4, S(9)/4), List(S(11)/4, S(13)/4), c**S(2)*x**S(2))/(S(315)*d**S(3)) - S(8)*b*c*(d*x)**(S(7)/2)*(a + b*asin(c*x))*Hypergeometric2F1(S(1)/2, S(7)/4, S(11)/4, c**S(2)*x**S(2))/(S(35)*d**S(2)) + S(2)*(d*x)**(S(5)/2)*(a + b*asin(c*x))**S(2)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a + b*asin(c*x))**S(2), x), x, S(16)*b**S(2)*c**S(2)*(d*x)**(S(7)/2)*HypergeometricPFQ(List(S(1), S(7)/4, S(7)/4), List(S(9)/4, S(11)/4), c**S(2)*x**S(2))/(S(105)*d**S(3)) - S(8)*b*c*(d*x)**(S(5)/2)*(a + b*asin(c*x))*Hypergeometric2F1(S(1)/2, S(5)/4, S(9)/4, c**S(2)*x**S(2))/(S(15)*d**S(2)) + S(2)*(d*x)**(S(3)/2)*(a + b*asin(c*x))**S(2)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(2)/sqrt(d*x), x), x, S(16)*b**S(2)*c**S(2)*(d*x)**(S(5)/2)*HypergeometricPFQ(List(S(1), S(5)/4, S(5)/4), List(S(7)/4, S(9)/4), c**S(2)*x**S(2))/(S(15)*d**S(3)) - S(8)*b*c*(d*x)**(S(3)/2)*(a + b*asin(c*x))*Hypergeometric2F1(S(1)/2, S(3)/4, S(7)/4, c**S(2)*x**S(2))/(S(3)*d**S(2)) + S(2)*sqrt(d*x)*(a + b*asin(c*x))**S(2)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(2)/(d*x)**(S(3)/2), x), x, -S(16)*b**S(2)*c**S(2)*(d*x)**(S(3)/2)*HypergeometricPFQ(List(S(3)/4, S(3)/4, S(1)), List(S(5)/4, S(7)/4), c**S(2)*x**S(2))/(S(3)*d**S(3)) + S(8)*b*c*sqrt(d*x)*(a + b*asin(c*x))*Hypergeometric2F1(S(1)/4, S(1)/2, S(5)/4, c**S(2)*x**S(2))/d**S(2) - S(2)*(a + b*asin(c*x))**S(2)/(d*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(2)/(d*x)**(S(5)/2), x), x, S(16)*b**S(2)*c**S(2)*sqrt(d*x)*HypergeometricPFQ(List(S(1)/4, S(1)/4, S(1)), List(S(3)/4, S(5)/4), c**S(2)*x**S(2))/(S(3)*d**S(3)) - S(8)*b*c*(a + b*asin(c*x))*Hypergeometric2F1(S(-1)/4, S(1)/2, S(3)/4, c**S(2)*x**S(2))/(S(3)*d**S(2)*sqrt(d*x)) - S(2)*(a + b*asin(c*x))**S(2)/(S(3)*d*(d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*(a + b*asin(c*x))**S(3), x), x, -S(6)*b*c*Integrate((d*x)**(S(5)/2)*(a + b*asin(c*x))**S(2)/sqrt(-c**S(2)*x**S(2) + S(1)), x)/(S(5)*d) + S(2)*(d*x)**(S(5)/2)*(a + b*asin(c*x))**S(3)/(S(5)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*(a + b*asin(c*x))**S(3), x), x, -S(2)*b*c*Integrate((d*x)**(S(3)/2)*(a + b*asin(c*x))**S(2)/sqrt(-c**S(2)*x**S(2) + S(1)), x)/d + S(2)*(d*x)**(S(3)/2)*(a + b*asin(c*x))**S(3)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(3)/sqrt(d*x), x), x, -S(6)*b*c*Integrate(sqrt(d*x)*(a + b*asin(c*x))**S(2)/sqrt(-c**S(2)*x**S(2) + S(1)), x)/d + S(2)*sqrt(d*x)*(a + b*asin(c*x))**S(3)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(3)/(d*x)**(S(3)/2), x), x, S(6)*b*c*Integrate((a + b*asin(c*x))**S(2)/(sqrt(d*x)*sqrt(-c**S(2)*x**S(2) + S(1))), x)/d - S(2)*(a + b*asin(c*x))**S(3)/(d*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*asin(c*x))**S(3)/(d*x)**(S(5)/2), x), x, S(2)*b*c*Integrate((a + b*asin(c*x))**S(2)/((d*x)**(S(3)/2)*sqrt(-c**S(2)*x**S(2) + S(1))), x)/d - S(2)*(a + b*asin(c*x))**S(3)/(S(3)*d*(d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/(a + b*asin(c*x)), x), x, Integrate((d*x)**(S(3)/2)/(a + b*asin(c*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/(a + b*asin(c*x)), x), x, Integrate(sqrt(d*x)/(a + b*asin(c*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*(a + b*asin(c*x))), x), x, Integrate(S(1)/(sqrt(d*x)*(a + b*asin(c*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*(a + b*asin(c*x))), x), x, Integrate(S(1)/((d*x)**(S(3)/2)*(a + b*asin(c*x))), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)/(a + b*asin(c*x))**S(2), x), x, Integrate((d*x)**(S(3)/2)/(a + b*asin(c*x))**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)/(a + b*asin(c*x))**S(2), x), x, Integrate(sqrt(d*x)/(a + b*asin(c*x))**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(d*x)*(a + b*asin(c*x))**S(2)), x), x, Integrate(S(1)/(sqrt(d*x)*(a + b*asin(c*x))**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((d*x)**(S(3)/2)*(a + b*asin(c*x))**S(2)), x), x, Integrate(S(1)/((d*x)**(S(3)/2)*(a + b*asin(c*x))**S(2)), x), expand=True, _diff=True, _numerical=True)
722e9bdeb34deeba74d2c3a001ae00432c7403d41732c242e7aad5a69b4686f8
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.utility_function import ( sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral as Integrate from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec) from sympy.core.numbers import pi as Pi from sympy.integrals.rubi.rubi import rubi_integrate a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j= symbols('a b c d e f m n x u k p r s t i j') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', ) def test_1(): assert rubi_test(rubi_integrate((c + d*x)**S(4)*sinh(a + b*x), x), x, (c + d*x)**S(4)*cosh(a + b*x)/b - S(4)*d*(c + d*x)**S(3)*sinh(a + b*x)/b**S(2) + S(12)*d**S(2)*(c + d*x)**S(2)*cosh(a + b*x)/b**S(3) - S(24)*d**S(3)*(c + d*x)*sinh(a + b*x)/b**S(4) + S(24)*d**S(4)*cosh(a + b*x)/b**S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)*sinh(a + b*x), x), x, (c + d*x)**S(3)*cosh(a + b*x)/b - S(3)*d*(c + d*x)**S(2)*sinh(a + b*x)/b**S(2) + S(6)*d**S(2)*(c + d*x)*cosh(a + b*x)/b**S(3) - S(6)*d**S(3)*sinh(a + b*x)/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)*sinh(a + b*x), x), x, (c + d*x)**S(2)*cosh(a + b*x)/b - S(2)*d*(c + d*x)*sinh(a + b*x)/b**S(2) + S(2)*d**S(2)*cosh(a + b*x)/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)*sinh(a + b*x), x), x, (c + d*x)*cosh(a + b*x)/b - d*sinh(a + b*x)/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)/(c + d*x), x), x, CoshIntegral(b*c/d + b*x)*sinh(a - b*c/d)/d + SinhIntegral(b*c/d + b*x)*cosh(a - b*c/d)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)/(c + d*x)**S(2), x), x, b*CoshIntegral(b*c/d + b*x)*cosh(a - b*c/d)/d**S(2) + b*SinhIntegral(b*c/d + b*x)*sinh(a - b*c/d)/d**S(2) - sinh(a + b*x)/(d*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)/(c + d*x)**S(3), x), x, b**S(2)*CoshIntegral(b*c/d + b*x)*sinh(a - b*c/d)/(S(2)*d**S(3)) + b**S(2)*SinhIntegral(b*c/d + b*x)*cosh(a - b*c/d)/(S(2)*d**S(3)) - b*cosh(a + b*x)/(S(2)*d**S(2)*(c + d*x)) - sinh(a + b*x)/(S(2)*d*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(4)*sinh(a + b*x)**S(2), x), x, -(c + d*x)**S(5)/(S(10)*d) + (c + d*x)**S(4)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b) - d*(c + d*x)**S(3)*sinh(a + b*x)**S(2)/b**S(2) - d*(c + d*x)**S(3)/(S(2)*b**S(2)) + S(3)*d**S(2)*(c + d*x)**S(2)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b**S(3)) - S(3)*d**S(4)*x/(S(4)*b**S(4)) - S(3)*d**S(3)*(c + d*x)*sinh(a + b*x)**S(2)/(S(2)*b**S(4)) + S(3)*d**S(4)*sinh(a + b*x)*cosh(a + b*x)/(S(4)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)*sinh(a + b*x)**S(2), x), x, -(c + d*x)**S(4)/(S(8)*d) + (c + d*x)**S(3)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b) - S(3)*c*d**S(2)*x/(S(4)*b**S(2)) - S(3)*d**S(3)*x**S(2)/(S(8)*b**S(2)) - S(3)*d*(c + d*x)**S(2)*sinh(a + b*x)**S(2)/(S(4)*b**S(2)) + S(3)*d**S(2)*(c + d*x)*sinh(a + b*x)*cosh(a + b*x)/(S(4)*b**S(3)) - S(3)*d**S(3)*sinh(a + b*x)**S(2)/(S(8)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)*sinh(a + b*x)**S(2), x), x, -(c + d*x)**S(3)/(S(6)*d) + (c + d*x)**S(2)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b) - d**S(2)*x/(S(4)*b**S(2)) - d*(c + d*x)*sinh(a + b*x)**S(2)/(S(2)*b**S(2)) + d**S(2)*sinh(a + b*x)*cosh(a + b*x)/(S(4)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)*sinh(a + b*x)**S(2), x), x, -c*x/S(2) - d*x**S(2)/S(4) + (c + d*x)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b) - d*sinh(a + b*x)**S(2)/(S(4)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/(c + d*x), x), x, CoshIntegral(S(2)*b*c/d + S(2)*b*x)*cosh(S(2)*a - S(2)*b*c/d)/(S(2)*d) + SinhIntegral(S(2)*b*c/d + S(2)*b*x)*sinh(S(2)*a - S(2)*b*c/d)/(S(2)*d) - log(c + d*x)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/(c + d*x)**S(2), x), x, b*CoshIntegral(S(2)*b*c/d + S(2)*b*x)*sinh(S(2)*a - S(2)*b*c/d)/d**S(2) + b*SinhIntegral(S(2)*b*c/d + S(2)*b*x)*cosh(S(2)*a - S(2)*b*c/d)/d**S(2) - sinh(a + b*x)**S(2)/(d*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/(c + d*x)**S(3), x), x, b**S(2)*CoshIntegral(S(2)*b*c/d + S(2)*b*x)*cosh(S(2)*a - S(2)*b*c/d)/d**S(3) + b**S(2)*SinhIntegral(S(2)*b*c/d + S(2)*b*x)*sinh(S(2)*a - S(2)*b*c/d)/d**S(3) - b*sinh(a + b*x)*cosh(a + b*x)/(d**S(2)*(c + d*x)) - sinh(a + b*x)**S(2)/(S(2)*d*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/(c + d*x)**S(4), x), x, S(2)*b**S(3)*CoshIntegral(S(2)*b*c/d + S(2)*b*x)*sinh(S(2)*a - S(2)*b*c/d)/(S(3)*d**S(4)) + S(2)*b**S(3)*SinhIntegral(S(2)*b*c/d + S(2)*b*x)*cosh(S(2)*a - S(2)*b*c/d)/(S(3)*d**S(4)) - S(2)*b**S(2)*sinh(a + b*x)**S(2)/(S(3)*d**S(3)*(c + d*x)) - b**S(2)/(S(3)*d**S(3)*(c + d*x)) - b*sinh(a + b*x)*cosh(a + b*x)/(S(3)*d**S(2)*(c + d*x)**S(2)) - sinh(a + b*x)**S(2)/(S(3)*d*(c + d*x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(4)*sinh(a + b*x)**S(3), x), x, (c + d*x)**S(4)*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(3)*b) - S(2)*(c + d*x)**S(4)*cosh(a + b*x)/(S(3)*b) - S(4)*d*(c + d*x)**S(3)*sinh(a + b*x)**S(3)/(S(9)*b**S(2)) + S(8)*d*(c + d*x)**S(3)*sinh(a + b*x)/(S(3)*b**S(2)) + S(4)*d**S(2)*(c + d*x)**S(2)*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(9)*b**S(3)) - S(80)*d**S(2)*(c + d*x)**S(2)*cosh(a + b*x)/(S(9)*b**S(3)) - S(8)*d**S(3)*(c + d*x)*sinh(a + b*x)**S(3)/(S(27)*b**S(4)) + S(160)*d**S(3)*(c + d*x)*sinh(a + b*x)/(S(9)*b**S(4)) + S(8)*d**S(4)*cosh(a + b*x)**S(3)/(S(81)*b**S(5)) - S(488)*d**S(4)*cosh(a + b*x)/(S(27)*b**S(5)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)*sinh(a + b*x)**S(3), x), x, (c + d*x)**S(3)*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(3)*b) - S(2)*(c + d*x)**S(3)*cosh(a + b*x)/(S(3)*b) - d*(c + d*x)**S(2)*sinh(a + b*x)**S(3)/(S(3)*b**S(2)) + S(2)*d*(c + d*x)**S(2)*sinh(a + b*x)/b**S(2) + S(2)*d**S(2)*(c + d*x)*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(9)*b**S(3)) - S(40)*d**S(2)*(c + d*x)*cosh(a + b*x)/(S(9)*b**S(3)) - S(2)*d**S(3)*sinh(a + b*x)**S(3)/(S(27)*b**S(4)) + S(40)*d**S(3)*sinh(a + b*x)/(S(9)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)*sinh(a + b*x)**S(3), x), x, (c + d*x)**S(2)*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(3)*b) - S(2)*(c + d*x)**S(2)*cosh(a + b*x)/(S(3)*b) - S(2)*d*(c + d*x)*sinh(a + b*x)**S(3)/(S(9)*b**S(2)) + S(4)*d*(c + d*x)*sinh(a + b*x)/(S(3)*b**S(2)) + S(2)*d**S(2)*cosh(a + b*x)**S(3)/(S(27)*b**S(3)) - S(14)*d**S(2)*cosh(a + b*x)/(S(9)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)*sinh(a + b*x)**S(3), x), x, (c + d*x)*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(3)*b) - S(2)*(c + d*x)*cosh(a + b*x)/(S(3)*b) - d*sinh(a + b*x)**S(3)/(S(9)*b**S(2)) + S(2)*d*sinh(a + b*x)/(S(3)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(3)/(c + d*x), x), x, -S(3)*CoshIntegral(b*c/d + b*x)*sinh(a - b*c/d)/(S(4)*d) + CoshIntegral(S(3)*b*c/d + S(3)*b*x)*sinh(S(3)*a - S(3)*b*c/d)/(S(4)*d) - S(3)*SinhIntegral(b*c/d + b*x)*cosh(a - b*c/d)/(S(4)*d) + SinhIntegral(S(3)*b*c/d + S(3)*b*x)*cosh(S(3)*a - S(3)*b*c/d)/(S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(3)/(c + d*x)**S(2), x), x, -S(3)*b*CoshIntegral(b*c/d + b*x)*cosh(a - b*c/d)/(S(4)*d**S(2)) + S(3)*b*CoshIntegral(S(3)*b*c/d + S(3)*b*x)*cosh(S(3)*a - S(3)*b*c/d)/(S(4)*d**S(2)) - S(3)*b*SinhIntegral(b*c/d + b*x)*sinh(a - b*c/d)/(S(4)*d**S(2)) + S(3)*b*SinhIntegral(S(3)*b*c/d + S(3)*b*x)*sinh(S(3)*a - S(3)*b*c/d)/(S(4)*d**S(2)) - sinh(a + b*x)**S(3)/(d*(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(3)/(c + d*x)**S(3), x), x, -S(3)*b**S(2)*CoshIntegral(b*c/d + b*x)*sinh(a - b*c/d)/(S(8)*d**S(3)) + S(9)*b**S(2)*CoshIntegral(S(3)*b*c/d + S(3)*b*x)*sinh(S(3)*a - S(3)*b*c/d)/(S(8)*d**S(3)) - S(3)*b**S(2)*SinhIntegral(b*c/d + b*x)*cosh(a - b*c/d)/(S(8)*d**S(3)) + S(9)*b**S(2)*SinhIntegral(S(3)*b*c/d + S(3)*b*x)*cosh(S(3)*a - S(3)*b*c/d)/(S(8)*d**S(3)) - S(3)*b*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(2)*d**S(2)*(c + d*x)) - sinh(a + b*x)**S(3)/(S(2)*d*(c + d*x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)/sinh(a + b*x), x), x, -S(2)*(c + d*x)**S(3)*atanh(exp(a + b*x))/b - S(3)*d*(c + d*x)**S(2)*PolyLog(S(2), -exp(a + b*x))/b**S(2) + S(3)*d*(c + d*x)**S(2)*PolyLog(S(2), exp(a + b*x))/b**S(2) + S(6)*d**S(2)*(c + d*x)*PolyLog(S(3), -exp(a + b*x))/b**S(3) - S(6)*d**S(2)*(c + d*x)*PolyLog(S(3), exp(a + b*x))/b**S(3) - S(6)*d**S(3)*PolyLog(S(4), -exp(a + b*x))/b**S(4) + S(6)*d**S(3)*PolyLog(S(4), exp(a + b*x))/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)/sinh(a + b*x), x), x, -S(2)*(c + d*x)**S(2)*atanh(exp(a + b*x))/b - S(2)*d*(c + d*x)*PolyLog(S(2), -exp(a + b*x))/b**S(2) + S(2)*d*(c + d*x)*PolyLog(S(2), exp(a + b*x))/b**S(2) + S(2)*d**S(2)*PolyLog(S(3), -exp(a + b*x))/b**S(3) - S(2)*d**S(2)*PolyLog(S(3), exp(a + b*x))/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)/sinh(a + b*x), x), x, -S(2)*(c + d*x)*atanh(exp(a + b*x))/b - d*PolyLog(S(2), -exp(a + b*x))/b**S(2) + d*PolyLog(S(2), exp(a + b*x))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)*sinh(a + b*x)), x), x, Integrate(S(1)/((c + d*x)*sinh(a + b*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)**S(2)*sinh(a + b*x)), x), x, Integrate(S(1)/((c + d*x)**S(2)*sinh(a + b*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)/sinh(a + b*x)**S(2), x), x, -(c + d*x)**S(3)/b - (c + d*x)**S(3)/(b*tanh(a + b*x)) + S(3)*d*(c + d*x)**S(2)*log(-exp(S(2)*a + S(2)*b*x) + S(1))/b**S(2) + S(3)*d**S(2)*(c + d*x)*PolyLog(S(2), exp(S(2)*a + S(2)*b*x))/b**S(3) - S(3)*d**S(3)*PolyLog(S(3), exp(S(2)*a + S(2)*b*x))/(S(2)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)/sinh(a + b*x)**S(2), x), x, -(c + d*x)**S(2)/b - (c + d*x)**S(2)/(b*tanh(a + b*x)) + S(2)*d*(c + d*x)*log(-exp(S(2)*a + S(2)*b*x) + S(1))/b**S(2) + d**S(2)*PolyLog(S(2), exp(S(2)*a + S(2)*b*x))/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)/sinh(a + b*x)**S(2), x), x, -(c + d*x)/(b*tanh(a + b*x)) + d*log(sinh(a + b*x))/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)*sinh(a + b*x)**S(2)), x), x, Integrate(S(1)/((c + d*x)*sinh(a + b*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)**S(2)*sinh(a + b*x)**S(2)), x), x, Integrate(S(1)/((c + d*x)**S(2)*sinh(a + b*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)/sinh(a + b*x)**S(3), x), x, (c + d*x)**S(3)*atanh(exp(a + b*x))/b - (c + d*x)**S(3)/(S(2)*b*sinh(a + b*x)*tanh(a + b*x)) + S(3)*d*(c + d*x)**S(2)*PolyLog(S(2), -exp(a + b*x))/(S(2)*b**S(2)) - S(3)*d*(c + d*x)**S(2)*PolyLog(S(2), exp(a + b*x))/(S(2)*b**S(2)) - S(3)*d*(c + d*x)**S(2)/(S(2)*b**S(2)*sinh(a + b*x)) - S(3)*d**S(2)*(c + d*x)*PolyLog(S(3), -exp(a + b*x))/b**S(3) + S(3)*d**S(2)*(c + d*x)*PolyLog(S(3), exp(a + b*x))/b**S(3) - S(6)*d**S(2)*(c + d*x)*atanh(exp(a + b*x))/b**S(3) - S(3)*d**S(3)*PolyLog(S(2), -exp(a + b*x))/b**S(4) + S(3)*d**S(3)*PolyLog(S(2), exp(a + b*x))/b**S(4) + S(3)*d**S(3)*PolyLog(S(4), -exp(a + b*x))/b**S(4) - S(3)*d**S(3)*PolyLog(S(4), exp(a + b*x))/b**S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)/sinh(a + b*x)**S(3), x), x, (c + d*x)**S(2)*atanh(exp(a + b*x))/b - (c + d*x)**S(2)/(S(2)*b*sinh(a + b*x)*tanh(a + b*x)) + d*(c + d*x)*PolyLog(S(2), -exp(a + b*x))/b**S(2) - d*(c + d*x)*PolyLog(S(2), exp(a + b*x))/b**S(2) - d*(c + d*x)/(b**S(2)*sinh(a + b*x)) - d**S(2)*PolyLog(S(3), -exp(a + b*x))/b**S(3) + d**S(2)*PolyLog(S(3), exp(a + b*x))/b**S(3) - d**S(2)*atanh(cosh(a + b*x))/b**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)/sinh(a + b*x)**S(3), x), x, (c + d*x)*atanh(exp(a + b*x))/b - (c + d*x)/(S(2)*b*sinh(a + b*x)*tanh(a + b*x)) + d*PolyLog(S(2), -exp(a + b*x))/(S(2)*b**S(2)) - d*PolyLog(S(2), exp(a + b*x))/(S(2)*b**S(2)) - d/(S(2)*b**S(2)*sinh(a + b*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)*sinh(a + b*x)**S(3)), x), x, Integrate(S(1)/((c + d*x)*sinh(a + b*x)**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)**S(2)*sinh(a + b*x)**S(3)), x), x, Integrate(S(1)/((c + d*x)**S(2)*sinh(a + b*x)**S(3)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**(S(5)/2)*sinh(a + b*x), x), x, -S(15)*sqrt(Pi)*d**(S(5)/2)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(16)*b**(S(7)/2)) - S(15)*sqrt(Pi)*d**(S(5)/2)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(16)*b**(S(7)/2)) + (c + d*x)**(S(5)/2)*cosh(a + b*x)/b - S(5)*d*(c + d*x)**(S(3)/2)*sinh(a + b*x)/(S(2)*b**S(2)) + S(15)*d**S(2)*sqrt(c + d*x)*cosh(a + b*x)/(S(4)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**(S(3)/2)*sinh(a + b*x), x), x, -S(3)*sqrt(Pi)*d**(S(3)/2)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(8)*b**(S(5)/2)) + S(3)*sqrt(Pi)*d**(S(3)/2)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(8)*b**(S(5)/2)) + (c + d*x)**(S(3)/2)*cosh(a + b*x)/b - S(3)*d*sqrt(c + d*x)*sinh(a + b*x)/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c + d*x)*sinh(a + b*x), x), x, -sqrt(Pi)*sqrt(d)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(4)*b**(S(3)/2)) - sqrt(Pi)*sqrt(d)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(4)*b**(S(3)/2)) + sqrt(c + d*x)*cosh(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)/sqrt(c + d*x), x), x, -sqrt(Pi)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(2)*sqrt(b)*sqrt(d)) + sqrt(Pi)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(2)*sqrt(b)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)/(c + d*x)**(S(3)/2), x), x, sqrt(Pi)*sqrt(b)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/d**(S(3)/2) + sqrt(Pi)*sqrt(b)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/d**(S(3)/2) - S(2)*sinh(a + b*x)/(d*sqrt(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)/(c + d*x)**(S(5)/2), x), x, -S(2)*sqrt(Pi)*b**(S(3)/2)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(3)*d**(S(5)/2)) + S(2)*sqrt(Pi)*b**(S(3)/2)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(3)*d**(S(5)/2)) - S(4)*b*cosh(a + b*x)/(S(3)*d**S(2)*sqrt(c + d*x)) - S(2)*sinh(a + b*x)/(S(3)*d*(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)/(c + d*x)**(S(7)/2), x), x, S(4)*sqrt(Pi)*b**(S(5)/2)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(15)*d**(S(7)/2)) + S(4)*sqrt(Pi)*b**(S(5)/2)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(15)*d**(S(7)/2)) - S(8)*b**S(2)*sinh(a + b*x)/(S(15)*d**S(3)*sqrt(c + d*x)) - S(4)*b*cosh(a + b*x)/(S(15)*d**S(2)*(c + d*x)**(S(3)/2)) - S(2)*sinh(a + b*x)/(S(5)*d*(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**(S(5)/2)*sinh(a + b*x)**S(2), x), x, S(15)*sqrt(S(2))*sqrt(Pi)*d**(S(5)/2)*Erf(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(2)*a + S(2)*b*c/d)/(S(512)*b**(S(7)/2)) - S(15)*sqrt(S(2))*sqrt(Pi)*d**(S(5)/2)*Erfi(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(2)*a - S(2)*b*c/d)/(S(512)*b**(S(7)/2)) - (c + d*x)**(S(7)/2)/(S(7)*d) + (c + d*x)**(S(5)/2)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b) - S(5)*d*(c + d*x)**(S(3)/2)*sinh(a + b*x)**S(2)/(S(8)*b**S(2)) - S(5)*d*(c + d*x)**(S(3)/2)/(S(16)*b**S(2)) + S(15)*d**S(2)*sqrt(c + d*x)*sinh(S(2)*a + S(2)*b*x)/(S(64)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**(S(3)/2)*sinh(a + b*x)**S(2), x), x, S(3)*sqrt(S(2))*sqrt(Pi)*d**(S(3)/2)*Erf(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(2)*a + S(2)*b*c/d)/(S(128)*b**(S(5)/2)) + S(3)*sqrt(S(2))*sqrt(Pi)*d**(S(3)/2)*Erfi(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(2)*a - S(2)*b*c/d)/(S(128)*b**(S(5)/2)) - (c + d*x)**(S(5)/2)/(S(5)*d) + (c + d*x)**(S(3)/2)*sinh(a + b*x)*cosh(a + b*x)/(S(2)*b) - S(3)*d*sqrt(c + d*x)*sinh(a + b*x)**S(2)/(S(8)*b**S(2)) - S(3)*d*sqrt(c + d*x)/(S(16)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c + d*x)*sinh(a + b*x)**S(2), x), x, sqrt(S(2))*sqrt(Pi)*sqrt(d)*Erf(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(2)*a + S(2)*b*c/d)/(S(32)*b**(S(3)/2)) - sqrt(S(2))*sqrt(Pi)*sqrt(d)*Erfi(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(2)*a - S(2)*b*c/d)/(S(32)*b**(S(3)/2)) - (c + d*x)**(S(3)/2)/(S(3)*d) + sqrt(c + d*x)*sinh(S(2)*a + S(2)*b*x)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/sqrt(c + d*x), x), x, sqrt(S(2))*sqrt(Pi)*Erf(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(2)*a + S(2)*b*c/d)/(S(8)*sqrt(b)*sqrt(d)) + sqrt(S(2))*sqrt(Pi)*Erfi(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(2)*a - S(2)*b*c/d)/(S(8)*sqrt(b)*sqrt(d)) - sqrt(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/(c + d*x)**(S(3)/2), x), x, -sqrt(S(2))*sqrt(Pi)*sqrt(b)*Erf(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(2)*a + S(2)*b*c/d)/(S(2)*d**(S(3)/2)) + sqrt(S(2))*sqrt(Pi)*sqrt(b)*Erfi(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(2)*a - S(2)*b*c/d)/(S(2)*d**(S(3)/2)) - S(2)*sinh(a + b*x)**S(2)/(d*sqrt(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/(c + d*x)**(S(5)/2), x), x, S(2)*sqrt(S(2))*sqrt(Pi)*b**(S(3)/2)*Erf(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(2)*a + S(2)*b*c/d)/(S(3)*d**(S(5)/2)) + S(2)*sqrt(S(2))*sqrt(Pi)*b**(S(3)/2)*Erfi(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(2)*a - S(2)*b*c/d)/(S(3)*d**(S(5)/2)) - S(8)*b*sinh(a + b*x)*cosh(a + b*x)/(S(3)*d**S(2)*sqrt(c + d*x)) - S(2)*sinh(a + b*x)**S(2)/(S(3)*d*(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/(c + d*x)**(S(7)/2), x), x, -S(8)*sqrt(S(2))*sqrt(Pi)*b**(S(5)/2)*Erf(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(2)*a + S(2)*b*c/d)/(S(15)*d**(S(7)/2)) + S(8)*sqrt(S(2))*sqrt(Pi)*b**(S(5)/2)*Erfi(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(2)*a - S(2)*b*c/d)/(S(15)*d**(S(7)/2)) - S(32)*b**S(2)*sinh(a + b*x)**S(2)/(S(15)*d**S(3)*sqrt(c + d*x)) - S(16)*b**S(2)/(S(15)*d**S(3)*sqrt(c + d*x)) - S(8)*b*sinh(a + b*x)*cosh(a + b*x)/(S(15)*d**S(2)*(c + d*x)**(S(3)/2)) - S(2)*sinh(a + b*x)**S(2)/(S(5)*d*(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) # taking long time assert rubi_test(rubi_integrate(sinh(a + b*x)**S(2)/(c + d*x)**(S(9)/2), x), x, S(32)*sqrt(S(2))*sqrt(Pi)*b**(S(7)/2)*Erf(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(2)*a + S(2)*b*c/d)/(S(105)*d**(S(9)/2)) + S(32)*sqrt(S(2))*sqrt(Pi)*b**(S(7)/2)*Erfi(sqrt(S(2))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(2)*a - S(2)*b*c/d)/(S(105)*d**(S(9)/2)) - S(128)*b**S(3)*sinh(a + b*x)*cosh(a + b*x)/(S(105)*d**S(4)*sqrt(c + d*x)) - S(32)*b**S(2)*sinh(a + b*x)**S(2)/(S(105)*d**S(3)*(c + d*x)**(S(3)/2)) - S(16)*b**S(2)/(S(105)*d**S(3)*(c + d*x)**(S(3)/2)) - S(8)*b*sinh(a + b*x)*cosh(a + b*x)/(S(35)*d**S(2)*(c + d*x)**(S(5)/2)) - S(2)*sinh(a + b*x)**S(2)/(S(7)*d*(c + d*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**(S(5)/2)*sinh(a + b*x)**S(3), x), x, S(45)*sqrt(Pi)*d**(S(5)/2)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(64)*b**(S(7)/2)) - S(5)*sqrt(S(3))*sqrt(Pi)*d**(S(5)/2)*Erf(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(3)*a + S(3)*b*c/d)/(S(1728)*b**(S(7)/2)) + S(45)*sqrt(Pi)*d**(S(5)/2)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(64)*b**(S(7)/2)) - S(5)*sqrt(S(3))*sqrt(Pi)*d**(S(5)/2)*Erfi(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(3)*a - S(3)*b*c/d)/(S(1728)*b**(S(7)/2)) + (c + d*x)**(S(5)/2)*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(3)*b) - S(2)*(c + d*x)**(S(5)/2)*cosh(a + b*x)/(S(3)*b) - S(5)*d*(c + d*x)**(S(3)/2)*sinh(a + b*x)**S(3)/(S(18)*b**S(2)) + S(5)*d*(c + d*x)**(S(3)/2)*sinh(a + b*x)/(S(3)*b**S(2)) - S(45)*d**S(2)*sqrt(c + d*x)*cosh(a + b*x)/(S(16)*b**S(3)) + S(5)*d**S(2)*sqrt(c + d*x)*cosh(S(3)*a + S(3)*b*x)/(S(144)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**(S(3)/2)*sinh(a + b*x)**S(3), x), x, S(9)*sqrt(Pi)*d**(S(3)/2)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(32)*b**(S(5)/2)) - sqrt(S(3))*sqrt(Pi)*d**(S(3)/2)*Erf(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(3)*a + S(3)*b*c/d)/(S(288)*b**(S(5)/2)) - S(9)*sqrt(Pi)*d**(S(3)/2)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(32)*b**(S(5)/2)) + sqrt(S(3))*sqrt(Pi)*d**(S(3)/2)*Erfi(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(3)*a - S(3)*b*c/d)/(S(288)*b**(S(5)/2)) + (c + d*x)**(S(3)/2)*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(3)*b) - S(2)*(c + d*x)**(S(3)/2)*cosh(a + b*x)/(S(3)*b) - d*sqrt(c + d*x)*sinh(a + b*x)**S(3)/(S(6)*b**S(2)) + d*sqrt(c + d*x)*sinh(a + b*x)/b**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c + d*x)*sinh(a + b*x)**S(3), x), x, S(3)*sqrt(Pi)*sqrt(d)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(16)*b**(S(3)/2)) - sqrt(S(3))*sqrt(Pi)*sqrt(d)*Erf(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(3)*a + S(3)*b*c/d)/(S(144)*b**(S(3)/2)) + S(3)*sqrt(Pi)*sqrt(d)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(16)*b**(S(3)/2)) - sqrt(S(3))*sqrt(Pi)*sqrt(d)*Erfi(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(3)*a - S(3)*b*c/d)/(S(144)*b**(S(3)/2)) - S(3)*sqrt(c + d*x)*cosh(a + b*x)/(S(4)*b) + sqrt(c + d*x)*cosh(S(3)*a + S(3)*b*x)/(S(12)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(3)/sqrt(c + d*x), x), x, S(3)*sqrt(Pi)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(8)*sqrt(b)*sqrt(d)) - sqrt(S(3))*sqrt(Pi)*Erf(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(3)*a + S(3)*b*c/d)/(S(24)*sqrt(b)*sqrt(d)) - S(3)*sqrt(Pi)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(8)*sqrt(b)*sqrt(d)) + sqrt(S(3))*sqrt(Pi)*Erfi(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(3)*a - S(3)*b*c/d)/(S(24)*sqrt(b)*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(3)/(c + d*x)**(S(3)/2), x), x, -S(3)*sqrt(Pi)*sqrt(b)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(4)*d**(S(3)/2)) + sqrt(S(3))*sqrt(Pi)*sqrt(b)*Erf(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(3)*a + S(3)*b*c/d)/(S(4)*d**(S(3)/2)) - S(3)*sqrt(Pi)*sqrt(b)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(4)*d**(S(3)/2)) + sqrt(S(3))*sqrt(Pi)*sqrt(b)*Erfi(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(3)*a - S(3)*b*c/d)/(S(4)*d**(S(3)/2)) - S(2)*sinh(a + b*x)**S(3)/(d*sqrt(c + d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(a + b*x)**S(3)/(c + d*x)**(S(5)/2), x), x, sqrt(Pi)*b**(S(3)/2)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(2)*d**(S(5)/2)) - sqrt(S(3))*sqrt(Pi)*b**(S(3)/2)*Erf(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(3)*a + S(3)*b*c/d)/(S(2)*d**(S(5)/2)) - sqrt(Pi)*b**(S(3)/2)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(2)*d**(S(5)/2)) + sqrt(S(3))*sqrt(Pi)*b**(S(3)/2)*Erfi(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(3)*a - S(3)*b*c/d)/(S(2)*d**(S(5)/2)) - S(4)*b*sinh(a + b*x)**S(2)*cosh(a + b*x)/(d**S(2)*sqrt(c + d*x)) - S(2)*sinh(a + b*x)**S(3)/(S(3)*d*(c + d*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate(sinh(a + b*x)**S(3)/(c + d*x)**(S(7)/2), x), x, -sqrt(Pi)*b**(S(5)/2)*Erf(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-a + b*c/d)/(S(5)*d**(S(7)/2)) + S(3)*sqrt(S(3))*sqrt(Pi)*b**(S(5)/2)*Erf(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(-S(3)*a + S(3)*b*c/d)/(S(5)*d**(S(7)/2)) - sqrt(Pi)*b**(S(5)/2)*Erfi(sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(a - b*c/d)/(S(5)*d**(S(7)/2)) + S(3)*sqrt(S(3))*sqrt(Pi)*b**(S(5)/2)*Erfi(sqrt(S(3))*sqrt(b)*sqrt(c + d*x)/sqrt(d))*exp(S(3)*a - S(3)*b*c/d)/(S(5)*d**(S(7)/2)) - S(24)*b**S(2)*sinh(a + b*x)**S(3)/(S(5)*d**S(3)*sqrt(c + d*x)) - S(16)*b**S(2)*sinh(a + b*x)/(S(5)*d**S(3)*sqrt(c + d*x)) - S(4)*b*sinh(a + b*x)**S(2)*cosh(a + b*x)/(S(5)*d**S(2)*(c + d*x)**(S(3)/2)) - S(2)*sinh(a + b*x)**S(3)/(S(5)*d*(c + d*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*x)**(S(3)/2)*sinh(f*x), x), x, -S(3)*sqrt(Pi)*d**(S(3)/2)*Erf(sqrt(f)*sqrt(d*x)/sqrt(d))/(S(8)*f**(S(5)/2)) + S(3)*sqrt(Pi)*d**(S(3)/2)*Erfi(sqrt(f)*sqrt(d*x)/sqrt(d))/(S(8)*f**(S(5)/2)) - S(3)*d*sqrt(d*x)*sinh(f*x)/(S(2)*f**S(2)) + (d*x)**(S(3)/2)*cosh(f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*x)*sinh(f*x), x), x, -sqrt(Pi)*sqrt(d)*Erf(sqrt(f)*sqrt(d*x)/sqrt(d))/(S(4)*f**(S(3)/2)) - sqrt(Pi)*sqrt(d)*Erfi(sqrt(f)*sqrt(d*x)/sqrt(d))/(S(4)*f**(S(3)/2)) + sqrt(d*x)*cosh(f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(f*x)/sqrt(d*x), x), x, -sqrt(Pi)*Erf(sqrt(f)*sqrt(d*x)/sqrt(d))/(S(2)*sqrt(d)*sqrt(f)) + sqrt(Pi)*Erfi(sqrt(f)*sqrt(d*x)/sqrt(d))/(S(2)*sqrt(d)*sqrt(f)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(f*x)/(d*x)**(S(3)/2), x), x, sqrt(Pi)*sqrt(f)*Erf(sqrt(f)*sqrt(d*x)/sqrt(d))/d**(S(3)/2) + sqrt(Pi)*sqrt(f)*Erfi(sqrt(f)*sqrt(d*x)/sqrt(d))/d**(S(3)/2) - S(2)*sinh(f*x)/(d*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(f*x)/(d*x)**(S(5)/2), x), x, -S(2)*sqrt(Pi)*f**(S(3)/2)*Erf(sqrt(f)*sqrt(d*x)/sqrt(d))/(S(3)*d**(S(5)/2)) + S(2)*sqrt(Pi)*f**(S(3)/2)*Erfi(sqrt(f)*sqrt(d*x)/sqrt(d))/(S(3)*d**(S(5)/2)) - S(2)*sinh(f*x)/(S(3)*d*(d*x)**(S(3)/2)) - S(4)*f*cosh(f*x)/(S(3)*d**S(2)*sqrt(d*x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c + d*x)/sinh(a + b*x), x), x, Integrate(sqrt(c + d*x)/sinh(a + b*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c + d*x)*sinh(a + b*x)), x), x, Integrate(S(1)/(sqrt(c + d*x)*sinh(a + b*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sinh(x)**(S(3)/2)/x**S(3), x), x, S(3)*Integrate(S(1)/(x*sqrt(sinh(x))), x)/S(8) + S(9)*Integrate(sinh(x)**(S(3)/2)/x, x)/S(8) - S(3)*sqrt(sinh(x))*cosh(x)/(S(4)*x) - sinh(x)**(S(3)/2)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-x*sqrt(sinh(x)) + x/sinh(x)**(S(3)/2), x), x, -S(2)*x*cosh(x)/sqrt(sinh(x)) + S(4)*sqrt(sinh(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x/(S(3)*sqrt(sinh(x))) + x/sinh(x)**(S(5)/2), x), x, -S(2)*x*cosh(x)/(S(3)*sinh(x)**(S(3)/2)) - S(4)/(S(3)*sqrt(sinh(x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(3)*x*sqrt(sinh(x))/S(5) + x/sinh(x)**(S(7)/2), x), x, S(6)*x*cosh(x)/(S(5)*sqrt(sinh(x))) - S(2)*x*cosh(x)/(S(5)*sinh(x)**(S(5)/2)) - S(12)*sqrt(sinh(x))/S(5) - S(4)/(S(15)*sinh(x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-x**S(2)*sqrt(sinh(x)) + x**S(2)/sinh(x)**(S(3)/2), x), x, -S(2)*x**S(2)*cosh(x)/sqrt(sinh(x)) + S(8)*x*sqrt(sinh(x)) - S(16)*I*EllipticE(Pi/S(4) - I*x/S(2), S(2))*sqrt(sinh(x))/sqrt(I*sinh(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sinh(e + f*x))**n*(c + d*x)**m, x), x, Integrate((b*sinh(e + f*x))**n*(c + d*x)**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m*sinh(a + b*x)**S(3), x), x, S(3)**(-m + S(-1))*(-b*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -S(3)*b*(c + d*x)/d)*exp(S(3)*a - S(3)*b*c/d)/(S(8)*b) + S(3)**(-m + S(-1))*(b*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), S(3)*b*(c + d*x)/d)*exp(-S(3)*a + S(3)*b*c/d)/(S(8)*b) - S(3)*(-b*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -b*(c + d*x)/d)*exp(a - b*c/d)/(S(8)*b) - S(3)*(b*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), b*(c + d*x)/d)*exp(-a + b*c/d)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m*sinh(a + b*x)**S(2), x), x, S(2)**(-m + S(-3))*(-b*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -S(2)*b*(c + d*x)/d)*exp(S(2)*a - S(2)*b*c/d)/b - S(2)**(-m + S(-3))*(b*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), S(2)*b*(c + d*x)/d)*exp(-S(2)*a + S(2)*b*c/d)/b - (c + d*x)**(m + S(1))/(S(2)*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m*sinh(a + b*x), x), x, (-b*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -b*(c + d*x)/d)*exp(a - b*c/d)/(S(2)*b) + (b*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), b*(c + d*x)/d)*exp(-a + b*c/d)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m/sinh(a + b*x), x), x, Integrate((c + d*x)**m/sinh(a + b*x), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m/sinh(a + b*x)**S(2), x), x, Integrate((c + d*x)**m/sinh(a + b*x)**S(2), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(3))*sinh(a + b*x), x), x, -x**m*(-b*x)**(-m)*Gamma(m + S(4), -b*x)*exp(a)/(S(2)*b**S(4)) + x**m*(b*x)**(-m)*Gamma(m + S(4), b*x)*exp(-a)/(S(2)*b**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(2))*sinh(a + b*x), x), x, x**m*(-b*x)**(-m)*Gamma(m + S(3), -b*x)*exp(a)/(S(2)*b**S(3)) + x**m*(b*x)**(-m)*Gamma(m + S(3), b*x)*exp(-a)/(S(2)*b**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(1))*sinh(a + b*x), x), x, -x**m*(-b*x)**(-m)*Gamma(m + S(2), -b*x)*exp(a)/(S(2)*b**S(2)) + x**m*(b*x)**(-m)*Gamma(m + S(2), b*x)*exp(-a)/(S(2)*b**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sinh(a + b*x), x), x, x**m*(-b*x)**(-m)*Gamma(m + S(1), -b*x)*exp(a)/(S(2)*b) + x**m*(b*x)**(-m)*Gamma(m + S(1), b*x)*exp(-a)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(-1))*sinh(a + b*x), x), x, -x**m*(-b*x)**(-m)*Gamma(m, -b*x)*exp(a)/S(2) + x**m*(b*x)**(-m)*Gamma(m, b*x)*exp(-a)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(-2))*sinh(a + b*x), x), x, b*x**m*(-b*x)**(-m)*Gamma(m + S(-1), -b*x)*exp(a)/S(2) + b*x**m*(b*x)**(-m)*Gamma(m + S(-1), b*x)*exp(-a)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(-3))*sinh(a + b*x), x), x, -b**S(2)*x**m*(-b*x)**(-m)*Gamma(m + S(-2), -b*x)*exp(a)/S(2) + b**S(2)*x**m*(b*x)**(-m)*Gamma(m + S(-2), b*x)*exp(-a)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(3))*sinh(a + b*x)**S(2), x), x, -S(2)**(-m + S(-6))*x**m*(-b*x)**(-m)*Gamma(m + S(4), -S(2)*b*x)*exp(S(2)*a)/b**S(4) - S(2)**(-m + S(-6))*x**m*(b*x)**(-m)*Gamma(m + S(4), S(2)*b*x)*exp(-S(2)*a)/b**S(4) - x**(m + S(4))/(S(2)*m + S(8)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(2))*sinh(a + b*x)**S(2), x), x, S(2)**(-m + S(-5))*x**m*(-b*x)**(-m)*Gamma(m + S(3), -S(2)*b*x)*exp(S(2)*a)/b**S(3) - S(2)**(-m + S(-5))*x**m*(b*x)**(-m)*Gamma(m + S(3), S(2)*b*x)*exp(-S(2)*a)/b**S(3) - x**(m + S(3))/(S(2)*m + S(6)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(1))*sinh(a + b*x)**S(2), x), x, -S(2)**(-m + S(-4))*x**m*(-b*x)**(-m)*Gamma(m + S(2), -S(2)*b*x)*exp(S(2)*a)/b**S(2) - S(2)**(-m + S(-4))*x**m*(b*x)**(-m)*Gamma(m + S(2), S(2)*b*x)*exp(-S(2)*a)/b**S(2) - x**(m + S(2))/(S(2)*m + S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**m*sinh(a + b*x)**S(2), x), x, S(2)**(-m + S(-3))*x**m*(-b*x)**(-m)*Gamma(m + S(1), -S(2)*b*x)*exp(S(2)*a)/b - S(2)**(-m + S(-3))*x**m*(b*x)**(-m)*Gamma(m + S(1), S(2)*b*x)*exp(-S(2)*a)/b - x**(m + S(1))/(S(2)*m + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(-1))*sinh(a + b*x)**S(2), x), x, -S(2)**(-m + S(-2))*x**m*(-b*x)**(-m)*Gamma(m, -S(2)*b*x)*exp(S(2)*a) - S(2)**(-m + S(-2))*x**m*(b*x)**(-m)*Gamma(m, S(2)*b*x)*exp(-S(2)*a) - x**m/(S(2)*m), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(-2))*sinh(a + b*x)**S(2), x), x, S(2)**(-m + S(-1))*b*x**m*(-b*x)**(-m)*Gamma(m + S(-1), -S(2)*b*x)*exp(S(2)*a) - S(2)**(-m + S(-1))*b*x**m*(b*x)**(-m)*Gamma(m + S(-1), S(2)*b*x)*exp(-S(2)*a) + x**(m + S(-1))/(-S(2)*m + S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**(m + S(-3))*sinh(a + b*x)**S(2), x), x, x**(m + S(-2))/(-S(2)*m + S(4)) - S(2)**(-m)*b**S(2)*x**m*(-b*x)**(-m)*Gamma(m + S(-2), -S(2)*b*x)*exp(S(2)*a) - S(2)**(-m)*b**S(2)*x**m*(b*x)**(-m)*Gamma(m + S(-2), S(2)*b*x)*exp(-S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x*sqrt(S(1)/sinh(x))/S(3) + x/(S(1)/sinh(x))**(S(3)/2), x), x, S(2)*x*cosh(x)/(S(3)*sqrt(S(1)/sinh(x))) - S(4)/(S(9)*(S(1)/sinh(x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(3)*x/(S(5)*sqrt(S(1)/sinh(x))) + x/(S(1)/sinh(x))**(S(5)/2), x), x, S(2)*x*cosh(x)/(S(5)*(S(1)/sinh(x))**(S(3)/2)) - S(4)/(S(25)*(S(1)/sinh(x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(-S(5)*x*sqrt(S(1)/sinh(x))/S(21) + x/(S(1)/sinh(x))**(S(7)/2), x), x, -S(10)*x*cosh(x)/(S(21)*sqrt(S(1)/sinh(x))) + S(2)*x*cosh(x)/(S(7)*(S(1)/sinh(x))**(S(5)/2)) + S(20)/(S(63)*(S(1)/sinh(x))**(S(3)/2)) - S(4)/(S(49)*(S(1)/sinh(x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(x**S(2)*sqrt(S(1)/sinh(x))/S(3) + x**S(2)/(S(1)/sinh(x))**(S(3)/2), x), x, S(2)*x**S(2)*cosh(x)/(S(3)*sqrt(S(1)/sinh(x))) - S(8)*x/(S(9)*(S(1)/sinh(x))**(S(3)/2)) - S(16)*I*sqrt(I*sinh(x))*sqrt(S(1)/sinh(x))*EllipticF(Pi/S(4) - I*x/S(2), S(2))/S(27) + S(16)*cosh(x)/(S(27)*sqrt(S(1)/sinh(x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)*(I*a*sinh(e + f*x) + a), x), x, -S(6)*I*a*d**S(3)*sinh(e + f*x)/f**S(4) + S(6)*I*a*d**S(2)*(c + d*x)*cosh(e + f*x)/f**S(3) - S(3)*I*a*d*(c + d*x)**S(2)*sinh(e + f*x)/f**S(2) + I*a*(c + d*x)**S(3)*cosh(e + f*x)/f + a*(c + d*x)**S(4)/(S(4)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)*(I*a*sinh(e + f*x) + a), x), x, S(2)*I*a*d**S(2)*cosh(e + f*x)/f**S(3) - S(2)*I*a*d*(c + d*x)*sinh(e + f*x)/f**S(2) + I*a*(c + d*x)**S(2)*cosh(e + f*x)/f + a*(c + d*x)**S(3)/(S(3)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)*(I*a*sinh(e + f*x) + a), x), x, -I*a*d*sinh(e + f*x)/f**S(2) + I*a*(c + d*x)*cosh(e + f*x)/f + a*(c + d*x)**S(2)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((I*a*sinh(e + f*x) + a)/(c + d*x), x), x, I*a*CoshIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d + I*a*SinhIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d + a*log(c + d*x)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((I*a*sinh(e + f*x) + a)/(c + d*x)**S(2), x), x, -I*a*sinh(e + f*x)/(d*(c + d*x)) - a/(d*(c + d*x)) + I*a*f*CoshIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d**S(2) + I*a*f*SinhIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((I*a*sinh(e + f*x) + a)/(c + d*x)**S(3), x), x, -I*a*sinh(e + f*x)/(S(2)*d*(c + d*x)**S(2)) - a/(S(2)*d*(c + d*x)**S(2)) - I*a*f*cosh(e + f*x)/(S(2)*d**S(2)*(c + d*x)) + I*a*f**S(2)*CoshIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/(S(2)*d**S(3)) + I*a*f**S(2)*SinhIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/(S(2)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)*(I*a*sinh(e + f*x) + a)**S(2), x), x, S(3)*a**S(2)*c*d**S(2)*x/(S(4)*f**S(2)) + S(3)*a**S(2)*d**S(3)*x**S(2)/(S(8)*f**S(2)) + S(3)*a**S(2)*d**S(3)*sinh(e + f*x)**S(2)/(S(8)*f**S(4)) - S(12)*I*a**S(2)*d**S(3)*sinh(e + f*x)/f**S(4) - S(3)*a**S(2)*d**S(2)*(c + d*x)*sinh(e + f*x)*cosh(e + f*x)/(S(4)*f**S(3)) + S(12)*I*a**S(2)*d**S(2)*(c + d*x)*cosh(e + f*x)/f**S(3) + S(3)*a**S(2)*d*(c + d*x)**S(2)*sinh(e + f*x)**S(2)/(S(4)*f**S(2)) - S(6)*I*a**S(2)*d*(c + d*x)**S(2)*sinh(e + f*x)/f**S(2) - a**S(2)*(c + d*x)**S(3)*sinh(e + f*x)*cosh(e + f*x)/(S(2)*f) + S(2)*I*a**S(2)*(c + d*x)**S(3)*cosh(e + f*x)/f + S(3)*a**S(2)*(c + d*x)**S(4)/(S(8)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)*(I*a*sinh(e + f*x) + a)**S(2), x), x, a**S(2)*d**S(2)*x/(S(4)*f**S(2)) - a**S(2)*d**S(2)*sinh(e + f*x)*cosh(e + f*x)/(S(4)*f**S(3)) + S(4)*I*a**S(2)*d**S(2)*cosh(e + f*x)/f**S(3) + a**S(2)*d*(c + d*x)*sinh(e + f*x)**S(2)/(S(2)*f**S(2)) - S(4)*I*a**S(2)*d*(c + d*x)*sinh(e + f*x)/f**S(2) - a**S(2)*(c + d*x)**S(2)*sinh(e + f*x)*cosh(e + f*x)/(S(2)*f) + S(2)*I*a**S(2)*(c + d*x)**S(2)*cosh(e + f*x)/f + a**S(2)*(c + d*x)**S(3)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)*(I*a*sinh(e + f*x) + a)**S(2), x), x, a**S(2)*c*x/S(2) + a**S(2)*d*x**S(2)/S(4) + a**S(2)*d*sinh(e + f*x)**S(2)/(S(4)*f**S(2)) - S(2)*I*a**S(2)*d*sinh(e + f*x)/f**S(2) - a**S(2)*(c + d*x)*sinh(e + f*x)*cosh(e + f*x)/(S(2)*f) + S(2)*I*a**S(2)*(c + d*x)*cosh(e + f*x)/f + a**S(2)*(c + d*x)**S(2)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((I*a*sinh(e + f*x) + a)**S(2)/(c + d*x), x), x, S(2)*I*a**S(2)*CoshIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d - a**S(2)*CoshIntegral(S(2)*c*f/d + S(2)*f*x)*cosh(-S(2)*c*f/d + S(2)*e)/(S(2)*d) + S(2)*I*a**S(2)*SinhIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d - a**S(2)*SinhIntegral(S(2)*c*f/d + S(2)*f*x)*sinh(-S(2)*c*f/d + S(2)*e)/(S(2)*d) + S(3)*a**S(2)*log(c + d*x)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((I*a*sinh(e + f*x) + a)**S(2)/(c + d*x)**S(2), x), x, -S(4)*a**S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(4)/(d*(c + d*x)) + S(2)*I*a**S(2)*f*CoshIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d**S(2) - a**S(2)*f*CoshIntegral(S(2)*c*f/d + S(2)*f*x)*sinh(-S(2)*c*f/d + S(2)*e)/d**S(2) + S(2)*I*a**S(2)*f*SinhIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d**S(2) - a**S(2)*f*SinhIntegral(S(2)*c*f/d + S(2)*f*x)*cosh(-S(2)*c*f/d + S(2)*e)/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((I*a*sinh(e + f*x) + a)**S(2)/(c + d*x)**S(3), x), x, -S(2)*a**S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(4)/(d*(c + d*x)**S(2)) - S(4)*a**S(2)*f*sinh(I*Pi/S(4) + e/S(2) + f*x/S(2))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(3)/(d**S(2)*(c + d*x)) + I*a**S(2)*f**S(2)*CoshIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d**S(3) - a**S(2)*f**S(2)*CoshIntegral(S(2)*c*f/d + S(2)*f*x)*cosh(-S(2)*c*f/d + S(2)*e)/d**S(3) + I*a**S(2)*f**S(2)*SinhIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d**S(3) - a**S(2)*f**S(2)*SinhIntegral(S(2)*c*f/d + S(2)*f*x)*sinh(-S(2)*c*f/d + S(2)*e)/d**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)/(I*a*sinh(e + f*x) + a), x), x, S(12)*d**S(3)*PolyLog(S(3), -exp(I*Pi/S(2) + e + f*x))/(a*f**S(4)) - S(12)*d**S(2)*(c + d*x)*PolyLog(S(2), -exp(I*Pi/S(2) + e + f*x))/(a*f**S(3)) - S(6)*d*(c + d*x)**S(2)*log(exp(I*Pi/S(2) + e + f*x) + S(1))/(a*f**S(2)) + (c + d*x)**S(3)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f) + (c + d*x)**S(3)/(a*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)/(I*a*sinh(e + f*x) + a), x), x, -S(4)*d**S(2)*PolyLog(S(2), -exp(I*Pi/S(2) + e + f*x))/(a*f**S(3)) - S(4)*d*(c + d*x)*log(exp(I*Pi/S(2) + e + f*x) + S(1))/(a*f**S(2)) + (c + d*x)**S(2)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f) + (c + d*x)**S(2)/(a*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)/(I*a*sinh(e + f*x) + a), x), x, -S(2)*d*log(cosh(I*Pi/S(4) + e/S(2) + f*x/S(2)))/(a*f**S(2)) + (c + d*x)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)*(I*a*sinh(e + f*x) + a)), x), x, Integrate(S(1)/((c + d*x)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2)), x)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)**S(2)*(I*a*sinh(e + f*x) + a)), x), x, Integrate(S(1)/((c + d*x)**S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2)), x)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)/(I*a*sinh(e + f*x) + a)**S(2), x), x, S(4)*d**S(3)*PolyLog(S(3), -exp(I*Pi/S(2) + e + f*x))/(a**S(2)*f**S(4)) + S(4)*d**S(3)*log(cosh(I*Pi/S(4) + e/S(2) + f*x/S(2)))/(a**S(2)*f**S(4)) - S(4)*d**S(2)*(c + d*x)*PolyLog(S(2), -exp(I*Pi/S(2) + e + f*x))/(a**S(2)*f**S(3)) - S(2)*d**S(2)*(c + d*x)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a**S(2)*f**S(3)) - S(2)*d*(c + d*x)**S(2)*log(exp(I*Pi/S(2) + e + f*x) + S(1))/(a**S(2)*f**S(2)) + d*(c + d*x)**S(2)/(S(2)*a**S(2)*f**S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2)) + (c + d*x)**S(3)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(3)*a**S(2)*f) + (c + d*x)**S(3)/(S(3)*a**S(2)*f) + (c + d*x)**S(3)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(6)*a**S(2)*f*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)/(I*a*sinh(e + f*x) + a)**S(2), x), x, -S(4)*d**S(2)*PolyLog(S(2), -exp(I*Pi/S(2) + e + f*x))/(S(3)*a**S(2)*f**S(3)) - S(2)*d**S(2)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(3)*a**S(2)*f**S(3)) - S(4)*d*(c + d*x)*log(exp(I*Pi/S(2) + e + f*x) + S(1))/(S(3)*a**S(2)*f**S(2)) + d*(c + d*x)/(S(3)*a**S(2)*f**S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2)) + (c + d*x)**S(2)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(3)*a**S(2)*f) + (c + d*x)**S(2)/(S(3)*a**S(2)*f) + (c + d*x)**S(2)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(6)*a**S(2)*f*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)/(I*a*sinh(e + f*x) + a)**S(2), x), x, -S(2)*d*log(cosh(I*Pi/S(4) + e/S(2) + f*x/S(2)))/(S(3)*a**S(2)*f**S(2)) + d/(S(6)*a**S(2)*f**S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2)) + (c + d*x)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(3)*a**S(2)*f) + (c + d*x)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(6)*a**S(2)*f*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)*(I*a*sinh(e + f*x) + a)**S(2)), x), x, Integrate(S(1)/((c + d*x)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(4)), x)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((c + d*x)**S(2)*(I*a*sinh(e + f*x) + a)**S(2)), x), x, Integrate(S(1)/((c + d*x)**S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(4)), x)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(I*a*sinh(e + f*x) + a)/x, x), x, sqrt(I*a*sinh(e + f*x) + a)*CoshIntegral(f*x/S(2))*cosh(I*Pi/S(4) + e/S(2))/cosh(I*Pi/S(4) + e/S(2) + f*x/S(2)) + sqrt(I*a*sinh(e + f*x) + a)*SinhIntegral(f*x/S(2))*sinh(I*Pi/S(4) + e/S(2))/cosh(I*Pi/S(4) + e/S(2) + f*x/S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(I*a*sinh(e + f*x) + a)/x**S(2), x), x, f*sqrt(I*a*sinh(e + f*x) + a)*CoshIntegral(f*x/S(2))*sinh(I*Pi/S(4) + e/S(2))/(S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))) + f*sqrt(I*a*sinh(e + f*x) + a)*SinhIntegral(f*x/S(2))*cosh(I*Pi/S(4) + e/S(2))/(S(2)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))) - sqrt(I*a*sinh(e + f*x) + a)/x, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(I*a*sinh(e + f*x) + a)/x**S(3), x), x, f**S(2)*sqrt(I*a*sinh(e + f*x) + a)*CoshIntegral(f*x/S(2))*cosh(I*Pi/S(4) + e/S(2))/(S(8)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))) + f**S(2)*sqrt(I*a*sinh(e + f*x) + a)*SinhIntegral(f*x/S(2))*sinh(I*Pi/S(4) + e/S(2))/(S(8)*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))) - f*sqrt(I*a*sinh(e + f*x) + a)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(4)*x) - sqrt(I*a*sinh(e + f*x) + a)/(S(2)*x**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*sqrt(I*a*sinh(e + f*x) + a)), x), x, Integrate(S(1)/(x*sqrt(I*a*sinh(e + f*x) + a)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*sqrt(I*a*sinh(e + f*x) + a)), x), x, Integrate(S(1)/(x**S(2)*sqrt(I*a*sinh(e + f*x) + a)), x), expand=True, _diff=True, _numerical=True) ''' long time # assert rubi_test(rubi_integrate(x**S(3)/(I*a*sinh(e + f*x) + a)**(S(3)/2), x), x, x**S(3)*ArcTan(exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f*sqrt(I*a*sinh(e + f*x) + a)) + x**S(3)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(2)*a*f*sqrt(I*a*sinh(e + f*x) + a)) - S(3)*I*x**S(2)*PolyLog(S(2), -I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)) + S(3)*I*x**S(2)*PolyLog(S(2), I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)) + S(3)*x**S(2)/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)) - S(24)*x*ArcTan(exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(3)*sqrt(I*a*sinh(e + f*x) + a)) + S(12)*I*x*PolyLog(S(3), -I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(3)*sqrt(I*a*sinh(e + f*x) + a)) - S(12)*I*x*PolyLog(S(3), I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(3)*sqrt(I*a*sinh(e + f*x) + a)) + S(24)*I*PolyLog(S(2), -I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(4)*sqrt(I*a*sinh(e + f*x) + a)) - S(24)*I*PolyLog(S(2), I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(4)*sqrt(I*a*sinh(e + f*x) + a)) - S(24)*I*PolyLog(S(4), -I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(4)*sqrt(I*a*sinh(e + f*x) + a)) + S(24)*I*PolyLog(S(4), I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(4)*sqrt(I*a*sinh(e + f*x) + a)), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(x**S(2)/(I*a*sinh(e + f*x) + a)**(S(3)/2), x), x, x**S(2)*ArcTan(exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f*sqrt(I*a*sinh(e + f*x) + a)) + x**S(2)*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(2)*a*f*sqrt(I*a*sinh(e + f*x) + a)) - S(2)*I*x*PolyLog(S(2), -I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)) + S(2)*I*x*PolyLog(S(2), I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)) + S(2)*x/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)) - S(4)*ArcTan(sinh(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(3)*sqrt(I*a*sinh(e + f*x) + a)) + S(4)*I*PolyLog(S(3), -I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(3)*sqrt(I*a*sinh(e + f*x) + a)) - S(4)*I*PolyLog(S(3), I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(3)*sqrt(I*a*sinh(e + f*x) + a)), expand=True, _diff=True, _numerical=True) # assert rubi_test(rubi_integrate(x/(I*a*sinh(e + f*x) + a)**(S(3)/2), x), x, x*ArcTan(exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f*sqrt(I*a*sinh(e + f*x) + a)) + x*tanh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(S(2)*a*f*sqrt(I*a*sinh(e + f*x) + a)) - I*PolyLog(S(2), -I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)) + I*PolyLog(S(2), I*exp(I*Pi/S(4) + e/S(2) + f*x/S(2)))*cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)) + S(1)/(a*f**S(2)*sqrt(I*a*sinh(e + f*x) + a)), expand=True, _diff=True, _numerical=True) ''' assert rubi_test(rubi_integrate(S(1)/(x*(I*a*sinh(e + f*x) + a)**(S(3)/2)), x), x, Integrate(S(1)/(x*(I*a*sinh(e + f*x) + a)**(S(3)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x**S(2)*(I*a*sinh(e + f*x) + a)**(S(3)/2)), x), x, Integrate(S(1)/(x**S(2)*(I*a*sinh(e + f*x) + a)**(S(3)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(x*(I*a*sinh(c + d*x) + a)**(S(5)/2)), x), x, Integrate(S(1)/(x*(I*a*sinh(c + d*x) + a)**(S(5)/2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((I*a*sinh(e + f*x) + a)**(S(1)/3)/x, x), x, Integrate((I*a*sinh(e + f*x) + a)**(S(1)/3)/x, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m*(I*a*sinh(e + f*x) + a)**n, x), x, Integrate((c + d*x)**m*(I*a*sinh(e + f*x) + a)**n, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m*(I*a*sinh(e + f*x) + a)**S(3), x), x, -S(3)*S(2)**(-m + S(-3))*a**S(3)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -S(2)*f*(c + d*x)/d)*exp(-S(2)*c*f/d + S(2)*e)/f + S(3)*S(2)**(-m + S(-3))*a**S(3)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), S(2)*f*(c + d*x)/d)*exp(S(2)*c*f/d - S(2)*e)/f - S(3)**(-m + S(-1))*I*a**S(3)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -S(3)*f*(c + d*x)/d)*exp(-S(3)*c*f/d + S(3)*e)/(S(8)*f) - S(3)**(-m + S(-1))*I*a**S(3)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), S(3)*f*(c + d*x)/d)*exp(S(3)*c*f/d - S(3)*e)/(S(8)*f) + S(15)*I*a**S(3)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -f*(c + d*x)/d)*exp(-c*f/d + e)/(S(8)*f) + S(15)*I*a**S(3)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), f*(c + d*x)/d)*exp(c*f/d - e)/(S(8)*f) + S(5)*a**S(3)*(c + d*x)**(m + S(1))/(S(2)*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m*(I*a*sinh(e + f*x) + a)**S(2), x), x, -S(2)**(-m + S(-3))*a**S(2)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -S(2)*f*(c + d*x)/d)*exp(-S(2)*c*f/d + S(2)*e)/f + S(2)**(-m + S(-3))*a**S(2)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), S(2)*f*(c + d*x)/d)*exp(S(2)*c*f/d - S(2)*e)/f + I*a**S(2)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -f*(c + d*x)/d)*exp(-c*f/d + e)/f + I*a**S(2)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), f*(c + d*x)/d)*exp(c*f/d - e)/f + S(3)*a**S(2)*(c + d*x)**(m + S(1))/(S(2)*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m*(I*a*sinh(e + f*x) + a), x), x, I*a*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -f*(c + d*x)/d)*exp(-c*f/d + e)/(S(2)*f) + I*a*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), f*(c + d*x)/d)*exp(c*f/d - e)/(S(2)*f) + a*(c + d*x)**(m + S(1))/(d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m/(I*a*sinh(e + f*x) + a), x), x, Integrate((c + d*x)**m/cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(2), x)/(S(2)*a), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m/(I*a*sinh(e + f*x) + a)**S(2), x), x, Integrate((c + d*x)**m/cosh(I*Pi/S(4) + e/S(2) + f*x/S(2))**S(4), x)/(S(4)*a**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))*(c + d*x)**S(3), x), x, a*(c + d*x)**S(4)/(S(4)*d) - S(6)*b*d**S(3)*sinh(e + f*x)/f**S(4) + S(6)*b*d**S(2)*(c + d*x)*cosh(e + f*x)/f**S(3) - S(3)*b*d*(c + d*x)**S(2)*sinh(e + f*x)/f**S(2) + b*(c + d*x)**S(3)*cosh(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))*(c + d*x)**S(2), x), x, a*(c + d*x)**S(3)/(S(3)*d) + S(2)*b*d**S(2)*cosh(e + f*x)/f**S(3) - S(2)*b*d*(c + d*x)*sinh(e + f*x)/f**S(2) + b*(c + d*x)**S(2)*cosh(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))*(c + d*x), x), x, a*(c + d*x)**S(2)/(S(2)*d) - b*d*sinh(e + f*x)/f**S(2) + b*(c + d*x)*cosh(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))/(c + d*x), x), x, a*log(c + d*x)/d + b*CoshIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d + b*SinhIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))/(c + d*x)**S(2), x), x, -a/(d*(c + d*x)) - b*sinh(e + f*x)/(d*(c + d*x)) + b*f*CoshIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d**S(2) + b*f*SinhIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))/(c + d*x)**S(3), x), x, -a/(S(2)*d*(c + d*x)**S(2)) - b*sinh(e + f*x)/(S(2)*d*(c + d*x)**S(2)) - b*f*cosh(e + f*x)/(S(2)*d**S(2)*(c + d*x)) + b*f**S(2)*CoshIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/(S(2)*d**S(3)) + b*f**S(2)*SinhIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/(S(2)*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**S(2)*(c + d*x)**S(3), x), x, a**S(2)*(c + d*x)**S(4)/(S(4)*d) - S(12)*a*b*d**S(3)*sinh(e + f*x)/f**S(4) + S(12)*a*b*d**S(2)*(c + d*x)*cosh(e + f*x)/f**S(3) - S(6)*a*b*d*(c + d*x)**S(2)*sinh(e + f*x)/f**S(2) + S(2)*a*b*(c + d*x)**S(3)*cosh(e + f*x)/f - S(3)*b**S(2)*c*d**S(2)*x/(S(4)*f**S(2)) - S(3)*b**S(2)*d**S(3)*x**S(2)/(S(8)*f**S(2)) - S(3)*b**S(2)*d**S(3)*sinh(e + f*x)**S(2)/(S(8)*f**S(4)) + S(3)*b**S(2)*d**S(2)*(c + d*x)*sinh(e + f*x)*cosh(e + f*x)/(S(4)*f**S(3)) - S(3)*b**S(2)*d*(c + d*x)**S(2)*sinh(e + f*x)**S(2)/(S(4)*f**S(2)) + b**S(2)*(c + d*x)**S(3)*sinh(e + f*x)*cosh(e + f*x)/(S(2)*f) - b**S(2)*(c + d*x)**S(4)/(S(8)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**S(2)*(c + d*x)**S(2), x), x, a**S(2)*(c + d*x)**S(3)/(S(3)*d) + S(4)*a*b*d**S(2)*cosh(e + f*x)/f**S(3) - S(4)*a*b*d*(c + d*x)*sinh(e + f*x)/f**S(2) + S(2)*a*b*(c + d*x)**S(2)*cosh(e + f*x)/f - b**S(2)*d**S(2)*x/(S(4)*f**S(2)) + b**S(2)*d**S(2)*sinh(e + f*x)*cosh(e + f*x)/(S(4)*f**S(3)) - b**S(2)*d*(c + d*x)*sinh(e + f*x)**S(2)/(S(2)*f**S(2)) + b**S(2)*(c + d*x)**S(2)*sinh(e + f*x)*cosh(e + f*x)/(S(2)*f) - b**S(2)*(c + d*x)**S(3)/(S(6)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**S(2)*(c + d*x), x), x, a**S(2)*(c + d*x)**S(2)/(S(2)*d) - S(2)*a*b*d*sinh(e + f*x)/f**S(2) + S(2)*a*b*(c + d*x)*cosh(e + f*x)/f - b**S(2)*c*x/S(2) - b**S(2)*d*x**S(2)/S(4) - b**S(2)*d*sinh(e + f*x)**S(2)/(S(4)*f**S(2)) + b**S(2)*(c + d*x)*sinh(e + f*x)*cosh(e + f*x)/(S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**S(2)/(c + d*x), x), x, a**S(2)*log(c + d*x)/d + S(2)*a*b*CoshIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d + S(2)*a*b*SinhIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d + b**S(2)*CoshIntegral(S(2)*c*f/d + S(2)*f*x)*cosh(-S(2)*c*f/d + S(2)*e)/(S(2)*d) + b**S(2)*SinhIntegral(S(2)*c*f/d + S(2)*f*x)*sinh(-S(2)*c*f/d + S(2)*e)/(S(2)*d) - b**S(2)*log(c + d*x)/(S(2)*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**S(2)/(c + d*x)**S(2), x), x, -a**S(2)/(d*(c + d*x)) - S(2)*a*b*sinh(e + f*x)/(d*(c + d*x)) + S(2)*a*b*f*CoshIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d**S(2) + S(2)*a*b*f*SinhIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d**S(2) - b**S(2)*sinh(e + f*x)**S(2)/(d*(c + d*x)) + b**S(2)*f*CoshIntegral(S(2)*c*f/d + S(2)*f*x)*sinh(-S(2)*c*f/d + S(2)*e)/d**S(2) + b**S(2)*f*SinhIntegral(S(2)*c*f/d + S(2)*f*x)*cosh(-S(2)*c*f/d + S(2)*e)/d**S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**S(2)/(c + d*x)**S(3), x), x, -a**S(2)/(S(2)*d*(c + d*x)**S(2)) - a*b*sinh(e + f*x)/(d*(c + d*x)**S(2)) - a*b*f*cosh(e + f*x)/(d**S(2)*(c + d*x)) + a*b*f**S(2)*CoshIntegral(c*f/d + f*x)*sinh(-c*f/d + e)/d**S(3) + a*b*f**S(2)*SinhIntegral(c*f/d + f*x)*cosh(-c*f/d + e)/d**S(3) - b**S(2)*sinh(e + f*x)**S(2)/(S(2)*d*(c + d*x)**S(2)) - b**S(2)*f*sinh(e + f*x)*cosh(e + f*x)/(d**S(2)*(c + d*x)) + b**S(2)*f**S(2)*CoshIntegral(S(2)*c*f/d + S(2)*f*x)*cosh(-S(2)*c*f/d + S(2)*e)/d**S(3) + b**S(2)*f**S(2)*SinhIntegral(S(2)*c*f/d + S(2)*f*x)*sinh(-S(2)*c*f/d + S(2)*e)/d**S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)/(a + b*sinh(e + f*x)), x), x, S(6)*d**S(3)*PolyLog(S(4), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(4)*sqrt(a**S(2) + b**S(2))) - S(6)*d**S(3)*PolyLog(S(4), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(4)*sqrt(a**S(2) + b**S(2))) - S(6)*d**S(2)*(c + d*x)*PolyLog(S(3), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(3)*sqrt(a**S(2) + b**S(2))) + S(6)*d**S(2)*(c + d*x)*PolyLog(S(3), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(3)*sqrt(a**S(2) + b**S(2))) + S(3)*d*(c + d*x)**S(2)*PolyLog(S(2), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(2)*sqrt(a**S(2) + b**S(2))) - S(3)*d*(c + d*x)**S(2)*PolyLog(S(2), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(2)*sqrt(a**S(2) + b**S(2))) + (c + d*x)**S(3)*log(b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(f*sqrt(a**S(2) + b**S(2))) - (c + d*x)**S(3)*log(b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(f*sqrt(a**S(2) + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)/(a + b*sinh(e + f*x)), x), x, -S(2)*d**S(2)*PolyLog(S(3), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(3)*sqrt(a**S(2) + b**S(2))) + S(2)*d**S(2)*PolyLog(S(3), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(3)*sqrt(a**S(2) + b**S(2))) + S(2)*d*(c + d*x)*PolyLog(S(2), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(2)*sqrt(a**S(2) + b**S(2))) - S(2)*d*(c + d*x)*PolyLog(S(2), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(2)*sqrt(a**S(2) + b**S(2))) + (c + d*x)**S(2)*log(b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(f*sqrt(a**S(2) + b**S(2))) - (c + d*x)**S(2)*log(b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(f*sqrt(a**S(2) + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)/(a + b*sinh(e + f*x)), x), x, d*PolyLog(S(2), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(2)*sqrt(a**S(2) + b**S(2))) - d*PolyLog(S(2), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(2)*sqrt(a**S(2) + b**S(2))) + (c + d*x)*log(b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(f*sqrt(a**S(2) + b**S(2))) - (c + d*x)*log(b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(f*sqrt(a**S(2) + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*sinh(e + f*x))*(c + d*x)), x), x, Integrate(S(1)/((a + b*sinh(e + f*x))*(c + d*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*sinh(e + f*x))*(c + d*x)**S(2)), x), x, Integrate(S(1)/((a + b*sinh(e + f*x))*(c + d*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(3)/(a + b*sinh(e + f*x))**S(2), x), x, S(6)*a*d**S(3)*PolyLog(S(4), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(4)*(a**S(2) + b**S(2))**(S(3)/2)) - S(6)*a*d**S(3)*PolyLog(S(4), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(4)*(a**S(2) + b**S(2))**(S(3)/2)) - S(6)*a*d**S(2)*(c + d*x)*PolyLog(S(3), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(3)*(a**S(2) + b**S(2))**(S(3)/2)) + S(6)*a*d**S(2)*(c + d*x)*PolyLog(S(3), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(3)*(a**S(2) + b**S(2))**(S(3)/2)) + S(3)*a*d*(c + d*x)**S(2)*PolyLog(S(2), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) - S(3)*a*d*(c + d*x)**S(2)*PolyLog(S(2), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) + a*(c + d*x)**S(3)*log(b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(f*(a**S(2) + b**S(2))**(S(3)/2)) - a*(c + d*x)**S(3)*log(b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(f*(a**S(2) + b**S(2))**(S(3)/2)) - b*(c + d*x)**S(3)*cosh(e + f*x)/(f*(a + b*sinh(e + f*x))*(a**S(2) + b**S(2))) - S(6)*d**S(3)*PolyLog(S(3), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(4)*(a**S(2) + b**S(2))) - S(6)*d**S(3)*PolyLog(S(3), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(4)*(a**S(2) + b**S(2))) + S(6)*d**S(2)*(c + d*x)*PolyLog(S(2), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(3)*(a**S(2) + b**S(2))) + S(6)*d**S(2)*(c + d*x)*PolyLog(S(2), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(3)*(a**S(2) + b**S(2))) + S(3)*d*(c + d*x)**S(2)*log(b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(f**S(2)*(a**S(2) + b**S(2))) + S(3)*d*(c + d*x)**S(2)*log(b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(f**S(2)*(a**S(2) + b**S(2))) - (c + d*x)**S(3)/(f*(a**S(2) + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**S(2)/(a + b*sinh(e + f*x))**S(2), x), x, -S(2)*a*d**S(2)*PolyLog(S(3), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(3)*(a**S(2) + b**S(2))**(S(3)/2)) + S(2)*a*d**S(2)*PolyLog(S(3), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(3)*(a**S(2) + b**S(2))**(S(3)/2)) + S(2)*a*d*(c + d*x)*PolyLog(S(2), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) - S(2)*a*d*(c + d*x)*PolyLog(S(2), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) + a*(c + d*x)**S(2)*log(b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(f*(a**S(2) + b**S(2))**(S(3)/2)) - a*(c + d*x)**S(2)*log(b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(f*(a**S(2) + b**S(2))**(S(3)/2)) - b*(c + d*x)**S(2)*cosh(e + f*x)/(f*(a + b*sinh(e + f*x))*(a**S(2) + b**S(2))) + S(2)*d**S(2)*PolyLog(S(2), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(3)*(a**S(2) + b**S(2))) + S(2)*d**S(2)*PolyLog(S(2), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(3)*(a**S(2) + b**S(2))) + S(2)*d*(c + d*x)*log(b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(f**S(2)*(a**S(2) + b**S(2))) + S(2)*d*(c + d*x)*log(b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(f**S(2)*(a**S(2) + b**S(2))) - (c + d*x)**S(2)/(f*(a**S(2) + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)/(a + b*sinh(e + f*x))**S(2), x), x, a*d*PolyLog(S(2), -b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))))/(f**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) - a*d*PolyLog(S(2), -b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))))/(f**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) + a*(c + d*x)*log(b*exp(e + f*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(f*(a**S(2) + b**S(2))**(S(3)/2)) - a*(c + d*x)*log(b*exp(e + f*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(f*(a**S(2) + b**S(2))**(S(3)/2)) - b*(c + d*x)*cosh(e + f*x)/(f*(a + b*sinh(e + f*x))*(a**S(2) + b**S(2))) + d*log(a + b*sinh(e + f*x))/(f**S(2)*(a**S(2) + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*sinh(e + f*x))**S(2)*(c + d*x)), x), x, Integrate(S(1)/((a + b*sinh(e + f*x))**S(2)*(c + d*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*sinh(e + f*x))**S(2)*(c + d*x)**S(2)), x), x, Integrate(S(1)/((a + b*sinh(e + f*x))**S(2)*(c + d*x)**S(2)), x), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((e + f*x)**S(2)/(a + b*sinh(c + d*x))**S(3), x), x, S(3)*a**S(2)*(e + f*x)**S(2)*log(b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(S(2)*d*(a**S(2) + b**S(2))**(S(5)/2)) - S(3)*a**S(2)*(e + f*x)**S(2)*log(b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(S(2)*d*(a**S(2) + b**S(2))**(S(5)/2)) + S(3)*a**S(2)*f*(e + f*x)*PolyLog(S(2), -b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))))/(d**S(2)*(a**S(2) + b**S(2))**(S(5)/2)) - S(3)*a**S(2)*f*(e + f*x)*PolyLog(S(2), -b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))))/(d**S(2)*(a**S(2) + b**S(2))**(S(5)/2)) - S(3)*a**S(2)*f**S(2)*PolyLog(S(3), -b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))))/(d**S(3)*(a**S(2) + b**S(2))**(S(5)/2)) + S(3)*a**S(2)*f**S(2)*PolyLog(S(3), -b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))))/(d**S(3)*(a**S(2) + b**S(2))**(S(5)/2)) - S(3)*a*b*(e + f*x)**S(2)*cosh(c + d*x)/(S(2)*d*(a + b*sinh(c + d*x))*(a**S(2) + b**S(2))**S(2)) - S(3)*a*(e + f*x)**S(2)/(S(2)*d*(a**S(2) + b**S(2))**S(2)) + S(3)*a*f*(e + f*x)*log(b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(d**S(2)*(a**S(2) + b**S(2))**S(2)) + S(3)*a*f*(e + f*x)*log(b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(d**S(2)*(a**S(2) + b**S(2))**S(2)) + S(3)*a*f**S(2)*PolyLog(S(2), -b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))))/(d**S(3)*(a**S(2) + b**S(2))**S(2)) + S(3)*a*f**S(2)*PolyLog(S(2), -b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))))/(d**S(3)*(a**S(2) + b**S(2))**S(2)) - b*(e + f*x)**S(2)*cosh(c + d*x)/(S(2)*d*(a + b*sinh(c + d*x))**S(2)*(a**S(2) + b**S(2))) - (e + f*x)**S(2)*log(b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(S(2)*d*(a**S(2) + b**S(2))**(S(3)/2)) + (e + f*x)**S(2)*log(b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(S(2)*d*(a**S(2) + b**S(2))**(S(3)/2)) - f*(e + f*x)*PolyLog(S(2), -b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))))/(d**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) + f*(e + f*x)*PolyLog(S(2), -b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))))/(d**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) - f*(e + f*x)/(d**S(2)*(a + b*sinh(c + d*x))*(a**S(2) + b**S(2))) + f**S(2)*PolyLog(S(3), -b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))))/(d**S(3)*(a**S(2) + b**S(2))**(S(3)/2)) - f**S(2)*PolyLog(S(3), -b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))))/(d**S(3)*(a**S(2) + b**S(2))**(S(3)/2)) - S(2)*f**S(2)*atanh((-a*tanh(c/S(2) + d*x/S(2)) + b)/sqrt(a**S(2) + b**S(2)))/(d**S(3)*(a**S(2) + b**S(2))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((e + f*x)/(a + b*sinh(c + d*x))**S(3), x), x, S(3)*a**S(2)*(e + f*x)*log(b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(S(2)*d*(a**S(2) + b**S(2))**(S(5)/2)) - S(3)*a**S(2)*(e + f*x)*log(b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(S(2)*d*(a**S(2) + b**S(2))**(S(5)/2)) + S(3)*a**S(2)*f*PolyLog(S(2), -b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))))/(S(2)*d**S(2)*(a**S(2) + b**S(2))**(S(5)/2)) - S(3)*a**S(2)*f*PolyLog(S(2), -b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))))/(S(2)*d**S(2)*(a**S(2) + b**S(2))**(S(5)/2)) - S(3)*a*b*(e + f*x)*cosh(c + d*x)/(S(2)*d*(a + b*sinh(c + d*x))*(a**S(2) + b**S(2))**S(2)) + S(3)*a*f*log(a + b*sinh(c + d*x))/(S(2)*d**S(2)*(a**S(2) + b**S(2))**S(2)) - b*(e + f*x)*cosh(c + d*x)/(S(2)*d*(a + b*sinh(c + d*x))**S(2)*(a**S(2) + b**S(2))) - (e + f*x)*log(b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))) + S(1))/(S(2)*d*(a**S(2) + b**S(2))**(S(3)/2)) + (e + f*x)*log(b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))) + S(1))/(S(2)*d*(a**S(2) + b**S(2))**(S(3)/2)) - f*PolyLog(S(2), -b*exp(c + d*x)/(a - sqrt(a**S(2) + b**S(2))))/(S(2)*d**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) + f*PolyLog(S(2), -b*exp(c + d*x)/(a + sqrt(a**S(2) + b**S(2))))/(S(2)*d**S(2)*(a**S(2) + b**S(2))**(S(3)/2)) - f/(S(2)*d**S(2)*(a + b*sinh(c + d*x))*(a**S(2) + b**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*sinh(c + d*x))**S(3)*(e + f*x)), x), x, Integrate(S(1)/((a + b*sinh(c + d*x))**S(3)*(e + f*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/((a + b*sinh(c + d*x))**S(3)*(e + f*x)**S(2)), x), x, Integrate(S(1)/((a + b*sinh(c + d*x))**S(3)*(e + f*x)**S(2)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**n*(c + d*x)**m, x), x, Integrate((a + b*sinh(e + f*x))**n*(c + d*x)**m, x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**S(3)*(c + d*x)**m, x), x, S(3)*S(2)**(-m + S(-3))*a*b**S(2)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -S(2)*f*(c + d*x)/d)*exp(-S(2)*c*f/d + S(2)*e)/f - S(3)*S(2)**(-m + S(-3))*a*b**S(2)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), S(2)*f*(c + d*x)/d)*exp(S(2)*c*f/d - S(2)*e)/f + S(3)**(-m + S(-1))*b**S(3)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -S(3)*f*(c + d*x)/d)*exp(-S(3)*c*f/d + S(3)*e)/(S(8)*f) + S(3)**(-m + S(-1))*b**S(3)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), S(3)*f*(c + d*x)/d)*exp(S(3)*c*f/d - S(3)*e)/(S(8)*f) + a**S(3)*(c + d*x)**(m + S(1))/(d*(m + S(1))) + S(3)*a**S(2)*b*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -f*(c + d*x)/d)*exp(-c*f/d + e)/(S(2)*f) + S(3)*a**S(2)*b*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), f*(c + d*x)/d)*exp(c*f/d - e)/(S(2)*f) - S(3)*a*b**S(2)*(c + d*x)**(m + S(1))/(S(2)*d*(m + S(1))) - S(3)*b**S(3)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -f*(c + d*x)/d)*exp(-c*f/d + e)/(S(8)*f) - S(3)*b**S(3)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), f*(c + d*x)/d)*exp(c*f/d - e)/(S(8)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))**S(2)*(c + d*x)**m, x), x, S(2)**(-m + S(-3))*b**S(2)*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -S(2)*f*(c + d*x)/d)*exp(-S(2)*c*f/d + S(2)*e)/f - S(2)**(-m + S(-3))*b**S(2)*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), S(2)*f*(c + d*x)/d)*exp(S(2)*c*f/d - S(2)*e)/f + a**S(2)*(c + d*x)**(m + S(1))/(d*(m + S(1))) + a*b*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -f*(c + d*x)/d)*exp(-c*f/d + e)/f + a*b*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), f*(c + d*x)/d)*exp(c*f/d - e)/f - b**S(2)*(c + d*x)**(m + S(1))/(S(2)*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a + b*sinh(e + f*x))*(c + d*x)**m, x), x, a*(c + d*x)**(m + S(1))/(d*(m + S(1))) + b*(-f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), -f*(c + d*x)/d)*exp(-c*f/d + e)/(S(2)*f) + b*(f*(c + d*x)/d)**(-m)*(c + d*x)**m*Gamma(m + S(1), f*(c + d*x)/d)*exp(c*f/d - e)/(S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m/(a + b*sinh(e + f*x)), x), x, Integrate((c + d*x)**m/(a + b*sinh(e + f*x)), x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c + d*x)**m/(a + b*sinh(e + f*x))**S(2), x), x, Integrate((c + d*x)**m/(a + b*sinh(e + f*x))**S(2), x), expand=True, _diff=True, _numerical=True)
4a24a35d5588f842d6bfa36e64a06c5281d4c24b7e8b8e4cccad9e2587d373cf
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.utility_function import ( sympy_op_factory, Int, Sum, Set, With, Module, Scan, MapAnd, FalseQ, ZeroQ, NegativeQ, NonzeroQ, FreeQ, NFreeQ, List, Log, PositiveQ, PositiveIntegerQ, NegativeIntegerQ, IntegerQ, IntegersQ, ComplexNumberQ, PureComplexNumberQ, RealNumericQ, PositiveOrZeroQ, NegativeOrZeroQ, FractionOrNegativeQ, NegQ, Equal, Unequal, IntPart, FracPart, RationalQ, ProductQ, SumQ, NonsumQ, Subst, First, Rest, SqrtNumberQ, SqrtNumberSumQ, LinearQ, Sqrt, ArcCosh, Coefficient, Denominator, Hypergeometric2F1, Not, Simplify, FractionalPart, IntegerPart, AppellF1, EllipticPi, EllipticE, EllipticF, ArcTan, ArcCot, ArcCoth, ArcTanh, ArcSin, ArcSinh, ArcCos, ArcCsc, ArcSec, ArcCsch, ArcSech, Sinh, Tanh, Cosh, Sech, Csch, Coth, LessEqual, Less, Greater, GreaterEqual, FractionQ, IntLinearcQ, Expand, IndependentQ, PowerQ, IntegerPowerQ, PositiveIntegerPowerQ, FractionalPowerQ, AtomQ, ExpQ, LogQ, Head, MemberQ, TrigQ, SinQ, CosQ, TanQ, CotQ, SecQ, CscQ, Sin, Cos, Tan, Cot, Sec, Csc, HyperbolicQ, SinhQ, CoshQ, TanhQ, CothQ, SechQ, CschQ, InverseTrigQ, SinCosQ, SinhCoshQ, LeafCount, Numerator, NumberQ, NumericQ, Length, ListQ, Im, Re, InverseHyperbolicQ, InverseFunctionQ, TrigHyperbolicFreeQ, InverseFunctionFreeQ, RealQ, EqQ, FractionalPowerFreeQ, ComplexFreeQ, PolynomialQ, FactorSquareFree, PowerOfLinearQ, Exponent, QuadraticQ, LinearPairQ, BinomialParts, TrinomialParts, PolyQ, EvenQ, OddQ, PerfectSquareQ, NiceSqrtAuxQ, NiceSqrtQ, Together, PosAux, PosQ, CoefficientList, ReplaceAll, ExpandLinearProduct, GCD, ContentFactor, NumericFactor, NonnumericFactors, MakeAssocList, GensymSubst, KernelSubst, ExpandExpression, Apart, SmartApart, MatchQ, PolynomialQuotientRemainder, FreeFactors, NonfreeFactors, RemoveContentAux, RemoveContent, FreeTerms, NonfreeTerms, ExpandAlgebraicFunction, CollectReciprocals, ExpandCleanup, AlgebraicFunctionQ, Coeff, LeadTerm, RemainingTerms, LeadFactor, RemainingFactors, LeadBase, LeadDegree, Numer, Denom, hypergeom, Expon, MergeMonomials, PolynomialDivide, BinomialQ, TrinomialQ, GeneralizedBinomialQ, GeneralizedTrinomialQ, FactorSquareFreeList, PerfectPowerTest, SquareFreeFactorTest, RationalFunctionQ, RationalFunctionFactors, NonrationalFunctionFactors, Reverse, RationalFunctionExponents, RationalFunctionExpand, ExpandIntegrand, SimplerQ, SimplerSqrtQ, SumSimplerQ, BinomialDegree, TrinomialDegree, CancelCommonFactors, SimplerIntegrandQ, GeneralizedBinomialDegree, GeneralizedBinomialParts, GeneralizedTrinomialDegree, GeneralizedTrinomialParts, MonomialQ, MonomialSumQ, MinimumMonomialExponent, MonomialExponent, LinearMatchQ, PowerOfLinearMatchQ, QuadraticMatchQ, CubicMatchQ, BinomialMatchQ, TrinomialMatchQ, GeneralizedBinomialMatchQ, GeneralizedTrinomialMatchQ, QuotientOfLinearsMatchQ, PolynomialTermQ, PolynomialTerms, NonpolynomialTerms, PseudoBinomialParts, NormalizePseudoBinomial, PseudoBinomialPairQ, PseudoBinomialQ, PolynomialGCD, PolyGCD, AlgebraicFunctionFactors, NonalgebraicFunctionFactors, QuotientOfLinearsP, QuotientOfLinearsParts, QuotientOfLinearsQ, Flatten, Sort, AbsurdNumberQ, AbsurdNumberFactors, NonabsurdNumberFactors, SumSimplerAuxQ, Prepend, Drop, CombineExponents, FactorInteger, FactorAbsurdNumber, SubstForInverseFunction, SubstForFractionalPower, SubstForFractionalPowerOfQuotientOfLinears, FractionalPowerOfQuotientOfLinears, SubstForFractionalPowerQ, SubstForFractionalPowerAuxQ, FractionalPowerOfSquareQ, FractionalPowerSubexpressionQ, Apply, FactorNumericGcd, MergeableFactorQ, MergeFactor, MergeFactors, TrigSimplifyQ, TrigSimplify, TrigSimplifyRecur, Order, FactorOrder, Smallest, OrderedQ, MinimumDegree, PositiveFactors, Sign, NonpositiveFactors, PolynomialInAuxQ, PolynomialInQ, ExponentInAux, ExponentIn, PolynomialInSubstAux, PolynomialInSubst, Distrib, DistributeDegree, FunctionOfPower, DivideDegreesOfFactors, MonomialFactor, FullSimplify, FunctionOfLinearSubst, FunctionOfLinear, NormalizeIntegrand, NormalizeIntegrandAux, NormalizeIntegrandFactor, NormalizeIntegrandFactorBase, NormalizeTogether, NormalizeLeadTermSigns, AbsorbMinusSign, NormalizeSumFactors, SignOfFactor, NormalizePowerOfLinear, SimplifyIntegrand, SimplifyTerm, TogetherSimplify, SmartSimplify, SubstForExpn, ExpandToSum, UnifySum, UnifyTerms, UnifyTerm, CalculusQ, FunctionOfInverseLinear, PureFunctionOfSinhQ, PureFunctionOfTanhQ, PureFunctionOfCoshQ, IntegerQuotientQ, OddQuotientQ, EvenQuotientQ, FindTrigFactor, FunctionOfSinhQ, FunctionOfCoshQ, OddHyperbolicPowerQ, FunctionOfTanhQ, FunctionOfTanhWeight, FunctionOfHyperbolicQ, SmartNumerator, SmartDenominator, SubstForAux, ActivateTrig, ExpandTrig, TrigExpand, SubstForTrig, SubstForHyperbolic, InertTrigFreeQ, LCM, SubstForFractionalPowerOfLinear, FractionalPowerOfLinear, InverseFunctionOfLinear, InertTrigQ, InertReciprocalQ, DeactivateTrig, FixInertTrigFunction, DeactivateTrigAux, PowerOfInertTrigSumQ, PiecewiseLinearQ, KnownTrigIntegrandQ, KnownSineIntegrandQ, KnownTangentIntegrandQ, KnownCotangentIntegrandQ, KnownSecantIntegrandQ, TryPureTanSubst, TryTanhSubst, TryPureTanhSubst, AbsurdNumberGCD, AbsurdNumberGCDList, ExpandTrigExpand, ExpandTrigReduce, ExpandTrigReduceAux, NormalizeTrig, TrigToExp, ExpandTrigToExp, TrigReduce, FunctionOfTrig, AlgebraicTrigFunctionQ, FunctionOfHyperbolic, FunctionOfQ, FunctionOfExpnQ, PureFunctionOfSinQ, PureFunctionOfCosQ, PureFunctionOfTanQ, PureFunctionOfCotQ, FunctionOfCosQ, FunctionOfSinQ, OddTrigPowerQ, FunctionOfTanQ, FunctionOfTanWeight, FunctionOfTrigQ, FunctionOfDensePolynomialsQ, FunctionOfLog, PowerVariableExpn, PowerVariableDegree, PowerVariableSubst, EulerIntegrandQ, FunctionOfSquareRootOfQuadratic, SquareRootOfQuadraticSubst, Divides, EasyDQ, ProductOfLinearPowersQ, Rt, NthRoot, AtomBaseQ, SumBaseQ, NegSumBaseQ, AllNegTermQ, SomeNegTermQ, TrigSquareQ, RtAux, TrigSquare, IntSum, IntTerm, Map2, ConstantFactor, SameQ, ReplacePart, CommonFactors, MostMainFactorPosition, FunctionOfExponentialQ, FunctionOfExponential, FunctionOfExponentialFunction, FunctionOfExponentialFunctionAux, FunctionOfExponentialTest, FunctionOfExponentialTestAux, stdev, rubi_test, If, IntQuadraticQ, IntBinomialQ, RectifyTangent, RectifyCotangent, Inequality, Condition, Simp, SimpHelp, SplitProduct, SplitSum, SubstFor, SubstForAux, FresnelS, FresnelC, Erfc, Erfi, Gamma, FunctionOfTrigOfLinearQ, ElementaryFunctionQ, Complex, UnsameQ, _SimpFixFactor, SimpFixFactor, _FixSimplify, FixSimplify, _SimplifyAntiderivativeSum, SimplifyAntiderivativeSum, _SimplifyAntiderivative, SimplifyAntiderivative, _TrigSimplifyAux, TrigSimplifyAux, Cancel, Part, PolyLog, D, Dist, Sum_doit, PolynomialQuotient, Floor, PolynomialRemainder, Factor, PolyLog, CosIntegral, SinIntegral, LogIntegral, SinhIntegral, CoshIntegral, Rule, Erf, PolyGamma, ExpIntegralEi, ExpIntegralE, LogGamma , UtilityOperator, Factorial, Zeta, ProductLog, DerivativeDivides, HypergeometricPFQ, IntHide, OneQ ) from sympy.core.add import Add from sympy.core.mod import Mod from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.functions.elementary.complexes import Abs from sympy.functions.elementary.miscellaneous import sqrt from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Or) from sympy.simplify.simplify import simplify from sympy.integrals.rubi.symbol import WC from sympy.core.symbol import symbols, Symbol from sympy.functions import (sin, cos, tan, cot, csc, sec, sqrt, erf, exp, log) from sympy.functions.elementary.hyperbolic import (acosh, asinh, atanh, acoth, acsch, asech, cosh, sinh, tanh, coth, sech, csch) from sympy.functions.elementary.trigonometric import (atan, acsc, asin, acot, acos, asec) from sympy.core.numbers import pi as Pi from sympy.integrals.rubi.rubi import rubi_integrate a, b, c, d, e, f, m, n, x, u , k, p, r, s, t, i, j= symbols('a b c d e f m n x u k p r s t i j') A, B, C, D, a, b, c, d, e, f, g, h, y, z, m, n, p, q, u, v, w, F = symbols('A B C D a b c d e f g h y z m n p q u v w F', ) def test_1(): assert rubi_test(rubi_integrate(sin(a + b*x), x), x, -cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2), x), x, x/S(2) - sin(a + b*x)*cos(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3), x), x, cos(a + b*x)**S(3)/(S(3)*b) - cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4), x), x, S(3)*x/S(8) - sin(a + b*x)**S(3)*cos(a + b*x)/(S(4)*b) - S(3)*sin(a + b*x)*cos(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5), x), x, -cos(a + b*x)**S(5)/(S(5)*b) + S(2)*cos(a + b*x)**S(3)/(S(3)*b) - cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(6), x), x, S(5)*x/S(16) - sin(a + b*x)**S(5)*cos(a + b*x)/(S(6)*b) - S(5)*sin(a + b*x)**S(3)*cos(a + b*x)/(S(24)*b) - S(5)*sin(a + b*x)*cos(a + b*x)/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(7), x), x, cos(a + b*x)**S(7)/(S(7)*b) - S(3)*cos(a + b*x)**S(5)/(S(5)*b) + cos(a + b*x)**S(3)/b - cos(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(8), x), x, S(35)*x/S(128) - sin(a + b*x)**S(7)*cos(a + b*x)/(S(8)*b) - S(7)*sin(a + b*x)**S(5)*cos(a + b*x)/(S(48)*b) - S(35)*sin(a + b*x)**S(3)*cos(a + b*x)/(S(192)*b) - S(35)*sin(a + b*x)*cos(a + b*x)/(S(128)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(7)/2), x), x, S(10)*EllipticF(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(S(21)*b) - S(2)*sin(a + b*x)**(S(5)/2)*cos(a + b*x)/(S(7)*b) - S(10)*sqrt(sin(a + b*x))*cos(a + b*x)/(S(21)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(5)/2), x), x, S(6)*EllipticE(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(S(5)*b) - S(2)*sin(a + b*x)**(S(3)/2)*cos(a + b*x)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(3)/2), x), x, S(2)*EllipticF(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(S(3)*b) - S(2)*sqrt(sin(a + b*x))*cos(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sin(a + b*x)), x), x, S(2)*EllipticE(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(sin(a + b*x)), x), x, S(2)*EllipticF(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(-3)/2), x), x, -S(2)*EllipticE(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/b - S(2)*cos(a + b*x)/(b*sqrt(sin(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(-5)/2), x), x, S(2)*EllipticF(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(S(3)*b) - S(2)*cos(a + b*x)/(S(3)*b*sin(a + b*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(-7)/2), x), x, -S(6)*EllipticE(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(S(5)*b) - S(6)*cos(a + b*x)/(S(5)*b*sqrt(sin(a + b*x))) - S(2)*cos(a + b*x)/(S(5)*b*sin(a + b*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(7)/2), x), x, S(10)*c**S(4)*EllipticF(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))*sqrt(sin(a + b*x))/(S(21)*b*sqrt(c*sin(a + b*x))) - S(10)*c**S(3)*sqrt(c*sin(a + b*x))*cos(a + b*x)/(S(21)*b) - S(2)*c*(c*sin(a + b*x))**(S(5)/2)*cos(a + b*x)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2), x), x, S(6)*c**S(2)*sqrt(c*sin(a + b*x))*EllipticE(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(S(5)*b*sqrt(sin(a + b*x))) - S(2)*c*(c*sin(a + b*x))**(S(3)/2)*cos(a + b*x)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2), x), x, S(2)*c**S(2)*EllipticF(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))*sqrt(sin(a + b*x))/(S(3)*b*sqrt(c*sin(a + b*x))) - S(2)*c*sqrt(c*sin(a + b*x))*cos(a + b*x)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x)), x), x, S(2)*sqrt(c*sin(a + b*x))*EllipticE(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(b*sqrt(sin(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(c*sin(a + b*x)), x), x, S(2)*EllipticF(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))*sqrt(sin(a + b*x))/(b*sqrt(c*sin(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(-3)/2), x), x, -S(2)*cos(a + b*x)/(b*c*sqrt(c*sin(a + b*x))) - S(2)*sqrt(c*sin(a + b*x))*EllipticE(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(b*c**S(2)*sqrt(sin(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(-5)/2), x), x, -S(2)*cos(a + b*x)/(S(3)*b*c*(c*sin(a + b*x))**(S(3)/2)) + S(2)*EllipticF(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))*sqrt(sin(a + b*x))/(S(3)*b*c**S(2)*sqrt(c*sin(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(-7)/2), x), x, -S(2)*cos(a + b*x)/(S(5)*b*c*(c*sin(a + b*x))**(S(5)/2)) - S(6)*cos(a + b*x)/(S(5)*b*c**S(3)*sqrt(c*sin(a + b*x))) - S(6)*sqrt(c*sin(a + b*x))*EllipticE(-Pi/S(4) + a/S(2) + b*x/S(2), S(2))/(S(5)*b*c**S(4)*sqrt(sin(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(4)/3), x), x, S(3)*(c*sin(a + b*x))**(S(7)/3)*Hypergeometric2F1(S(1)/2, S(7)/6, S(13)/6, sin(a + b*x)**S(2))*cos(a + b*x)/(S(7)*b*c*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(2)/3), x), x, S(3)*(c*sin(a + b*x))**(S(5)/3)*Hypergeometric2F1(S(1)/2, S(5)/6, S(11)/6, sin(a + b*x)**S(2))*cos(a + b*x)/(S(5)*b*c*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(1)/3), x), x, -S(3)*c**(S(1)/3)*sqrt(S(1) - (c*sin(a + b*x))**(S(2)/3)/c**(S(2)/3))*sqrt(S(9)/2 - S(3)*sqrt(S(3))*I/S(2))*sqrt((-sqrt(S(3)) + I)/(-sqrt(S(3)) + S(3)*I) + S(2)*(c*sin(a + b*x))**(S(2)/3)/(c**(S(2)/3)*(S(3) + sqrt(S(3))*I)))*sqrt((sqrt(S(3)) + I)/(sqrt(S(3)) + S(3)*I) + S(2)*(c*sin(a + b*x))**(S(2)/3)/(c**(S(2)/3)*(S(3) - sqrt(S(3))*I)))*EllipticE(asin(sqrt(S(2))*sqrt(S(1) - (c*sin(a + b*x))**(S(2)/3)/c**(S(2)/3))/sqrt(S(3) + sqrt(S(3))*I)), (-sqrt(S(3)) + S(3)*I)/(sqrt(S(3)) + S(3)*I))*sec(a + b*x)/b + S(3)*sqrt(S(2))*c**(S(1)/3)*(S(1) - sqrt(S(3))*I)*sqrt(S(1) - (c*sin(a + b*x))**(S(2)/3)/c**(S(2)/3))*sqrt(S(3) - sqrt(S(3))*I)*sqrt((-sqrt(S(3)) + I)/(-sqrt(S(3)) + S(3)*I) + S(2)*(c*sin(a + b*x))**(S(2)/3)/(c**(S(2)/3)*(S(3) + sqrt(S(3))*I)))*sqrt((sqrt(S(3)) + I)/(sqrt(S(3)) + S(3)*I) + S(2)*(c*sin(a + b*x))**(S(2)/3)/(c**(S(2)/3)*(S(3) - sqrt(S(3))*I)))*EllipticF(asin(sqrt(S(2))*sqrt(S(1) - (c*sin(a + b*x))**(S(2)/3)/c**(S(2)/3))/sqrt(S(3) - sqrt(S(3))*I)), (sqrt(S(3)) + S(3)*I)/(-sqrt(S(3)) + S(3)*I))*sec(a + b*x)/(S(4)*b), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((c*sin(a + b*x))**(S(1)/3), x), x, S(3)*(c*sin(a + b*x))**(S(4)/3)*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, sin(a + b*x)**S(2))*cos(a + b*x)/(S(4)*b*c*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(-1)/3), x), x, -S(3)*sqrt(S(2))*sqrt(S(1) - (c*sin(a + b*x))**(S(2)/3)/c**(S(2)/3))*sqrt(S(3) - sqrt(S(3))*I)*sqrt((-sqrt(S(3)) + I)/(-sqrt(S(3)) + S(3)*I) + S(2)*(c*sin(a + b*x))**(S(2)/3)/(c**(S(2)/3)*(S(3) + sqrt(S(3))*I)))*sqrt((sqrt(S(3)) + I)/(sqrt(S(3)) + S(3)*I) + S(2)*(c*sin(a + b*x))**(S(2)/3)/(c**(S(2)/3)*(S(3) - sqrt(S(3))*I)))*EllipticF(asin(sqrt(S(2))*sqrt(S(1) - (c*sin(a + b*x))**(S(2)/3)/c**(S(2)/3))/sqrt(S(3) - sqrt(S(3))*I)), (sqrt(S(3)) + S(3)*I)/(-sqrt(S(3)) + S(3)*I))*sec(a + b*x)/(S(2)*b*c**(S(1)/3)), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((c*sin(a + b*x))**(S(-1)/3), x), x, S(3)*(c*sin(a + b*x))**(S(2)/3)*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, sin(a + b*x)**S(2))*cos(a + b*x)/(S(2)*b*c*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(-2)/3), x), x, S(3)**(S(3)/4)*(c*sin(a + b*x))**(S(1)/3)*sqrt(c**(S(4)/3)*(S(1) + (c*sin(a + b*x))**(S(2)/3)/c**(S(2)/3) + (c*sin(a + b*x))**(S(4)/3)/c**(S(4)/3))/(c**(S(2)/3) - (c*sin(a + b*x))**(S(2)/3)*(S(1) + sqrt(S(3))))**S(2))*(c**(S(2)/3) - (c*sin(a + b*x))**(S(2)/3))*EllipticF(acos((c**(S(2)/3) - (c*sin(a + b*x))**(S(2)/3)*(-sqrt(S(3)) + S(1)))/(c**(S(2)/3) - (c*sin(a + b*x))**(S(2)/3)*(S(1) + sqrt(S(3))))), sqrt(S(3))/S(4) + S(1)/2)*sec(a + b*x)/(S(2)*b*c**(S(5)/3)*sqrt(-(c*sin(a + b*x))**(S(2)/3)*(c**(S(2)/3) - (c*sin(a + b*x))**(S(2)/3))/(c**(S(2)/3) - (c*sin(a + b*x))**(S(2)/3)*(S(1) + sqrt(S(3))))**S(2))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((c*sin(a + b*x))**(S(-2)/3), x), x, S(3)*(c*sin(a + b*x))**(S(1)/3)*Hypergeometric2F1(S(1)/6, S(1)/2, S(7)/6, sin(a + b*x)**S(2))*cos(a + b*x)/(b*c*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(-4)/3), x), x, -S(3)*Hypergeometric2F1(S(-1)/6, S(1)/2, S(5)/6, sin(a + b*x)**S(2))*cos(a + b*x)/(b*c*(c*sin(a + b*x))**(S(1)/3)*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**n, x), x, Hypergeometric2F1(S(1)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)**(n + S(1))*cos(a + b*x)/(b*(n + S(1))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**n, x), x, (c*sin(a + b*x))**(n + S(1))*Hypergeometric2F1(S(1)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, sin(a + b*x)**S(2))*cos(a + b*x)/(b*c*(n + S(1))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(2))**(S(5)/2), x), x, -S(8)*a**S(2)*sqrt(a*sin(x)**S(2))*cot(x)/S(15) - S(4)*a*(a*sin(x)**S(2))**(S(3)/2)*cot(x)/S(15) - (a*sin(x)**S(2))**(S(5)/2)*cot(x)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(2))**(S(3)/2), x), x, -S(2)*a*sqrt(a*sin(x)**S(2))*cot(x)/S(3) - (a*sin(x)**S(2))**(S(3)/2)*cot(x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sin(x)**S(2)), x), x, -sqrt(a*sin(x)**S(2))*cot(x), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sin(x)**S(2)), x), x, -sin(x)*atanh(cos(x))/sqrt(a*sin(x)**S(2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(2))**(S(-3)/2), x), x, -sin(x)*atanh(cos(x))/(S(2)*a*sqrt(a*sin(x)**S(2))) - cot(x)/(S(2)*a*sqrt(a*sin(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(2))**(S(-5)/2), x), x, -cot(x)/(S(4)*a*(a*sin(x)**S(2))**(S(3)/2)) - S(3)*sin(x)*atanh(cos(x))/(S(8)*a**S(2)*sqrt(a*sin(x)**S(2))) - S(3)*cot(x)/(S(8)*a**S(2)*sqrt(a*sin(x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(3))**(S(5)/2), x), x, -S(26)*a**S(2)*sqrt(a*sin(x)**S(3))*EllipticF(Pi/S(4) - x/S(2), S(2))/(S(77)*sin(x)**(S(3)/2)) - S(2)*a**S(2)*sqrt(a*sin(x)**S(3))*sin(x)**S(5)*cos(x)/S(15) - S(26)*a**S(2)*sqrt(a*sin(x)**S(3))*sin(x)**S(3)*cos(x)/S(165) - S(78)*a**S(2)*sqrt(a*sin(x)**S(3))*sin(x)*cos(x)/S(385) - S(26)*a**S(2)*sqrt(a*sin(x)**S(3))*cot(x)/S(77), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(3))**(S(3)/2), x), x, -S(14)*a*sqrt(a*sin(x)**S(3))*EllipticE(Pi/S(4) - x/S(2), S(2))/(S(15)*sin(x)**(S(3)/2)) - S(2)*a*sqrt(a*sin(x)**S(3))*sin(x)**S(2)*cos(x)/S(9) - S(14)*a*sqrt(a*sin(x)**S(3))*cos(x)/S(45), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sin(x)**S(3)), x), x, -S(2)*sqrt(a*sin(x)**S(3))*EllipticF(Pi/S(4) - x/S(2), S(2))/(S(3)*sin(x)**(S(3)/2)) - S(2)*sqrt(a*sin(x)**S(3))*cot(x)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sin(x)**S(3)), x), x, S(2)*EllipticE(Pi/S(4) - x/S(2), S(2))*sin(x)**(S(3)/2)/sqrt(a*sin(x)**S(3)) - S(2)*sin(x)*cos(x)/sqrt(a*sin(x)**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(3))**(S(-3)/2), x), x, -S(10)*EllipticF(Pi/S(4) - x/S(2), S(2))*sin(x)**(S(3)/2)/(S(21)*a*sqrt(a*sin(x)**S(3))) - S(10)*cos(x)/(S(21)*a*sqrt(a*sin(x)**S(3))) - S(2)*cot(x)*csc(x)/(S(7)*a*sqrt(a*sin(x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(3))**(S(-5)/2), x), x, S(154)*EllipticE(Pi/S(4) - x/S(2), S(2))*sin(x)**(S(3)/2)/(S(195)*a**S(2)*sqrt(a*sin(x)**S(3))) - S(154)*sin(x)*cos(x)/(S(195)*a**S(2)*sqrt(a*sin(x)**S(3))) - S(2)*cot(x)*csc(x)**S(4)/(S(13)*a**S(2)*sqrt(a*sin(x)**S(3))) - S(22)*cot(x)*csc(x)**S(2)/(S(117)*a**S(2)*sqrt(a*sin(x)**S(3))) - S(154)*cot(x)/(S(585)*a**S(2)*sqrt(a*sin(x)**S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(4))**(S(5)/2), x), x, S(63)*a**S(2)*x*sqrt(a*sin(x)**S(4))*csc(x)**S(2)/S(256) - a**S(2)*sqrt(a*sin(x)**S(4))*sin(x)**S(7)*cos(x)/S(10) - S(9)*a**S(2)*sqrt(a*sin(x)**S(4))*sin(x)**S(5)*cos(x)/S(80) - S(21)*a**S(2)*sqrt(a*sin(x)**S(4))*sin(x)**S(3)*cos(x)/S(160) - S(21)*a**S(2)*sqrt(a*sin(x)**S(4))*sin(x)*cos(x)/S(128) - S(63)*a**S(2)*sqrt(a*sin(x)**S(4))*cot(x)/S(256), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(4))**(S(3)/2), x), x, S(5)*a*x*sqrt(a*sin(x)**S(4))*csc(x)**S(2)/S(16) - a*sqrt(a*sin(x)**S(4))*sin(x)**S(3)*cos(x)/S(6) - S(5)*a*sqrt(a*sin(x)**S(4))*sin(x)*cos(x)/S(24) - S(5)*a*sqrt(a*sin(x)**S(4))*cot(x)/S(16), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(a*sin(x)**S(4)), x), x, x*sqrt(a*sin(x)**S(4))*csc(x)**S(2)/S(2) - sqrt(a*sin(x)**S(4))*cot(x)/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(a*sin(x)**S(4)), x), x, -sin(x)*cos(x)/sqrt(a*sin(x)**S(4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(4))**(S(-3)/2), x), x, -sin(x)*cos(x)/(a*sqrt(a*sin(x)**S(4))) - cos(x)**S(2)*cot(x)**S(3)/(S(5)*a*sqrt(a*sin(x)**S(4))) - S(2)*cos(x)**S(2)*cot(x)/(S(3)*a*sqrt(a*sin(x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(x)**S(4))**(S(-5)/2), x), x, -sin(x)*cos(x)/(a**S(2)*sqrt(a*sin(x)**S(4))) - cos(x)**S(2)*cot(x)**S(7)/(S(9)*a**S(2)*sqrt(a*sin(x)**S(4))) - S(4)*cos(x)**S(2)*cot(x)**S(5)/(S(7)*a**S(2)*sqrt(a*sin(x)**S(4))) - S(6)*cos(x)**S(2)*cot(x)**S(3)/(S(5)*a**S(2)*sqrt(a*sin(x)**S(4))) - S(4)*cos(x)**S(2)*cot(x)/(S(3)*a**S(2)*sqrt(a*sin(x)**S(4))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(c + d*x)**p)**n, x), x, (b*sin(c + d*x)**p)**n*Hypergeometric2F1(S(1)/2, n*p/S(2) + S(1)/2, n*p/S(2) + S(3)/2, sin(c + d*x)**S(2))*sin(c + d*x)*cos(c + d*x)/(d*(n*p + S(1))*sqrt(cos(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x)**S(2))**n, x), x, (c*sin(a + b*x)**S(2))**n*Hypergeometric2F1(S(1)/2, n + S(1)/2, n + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)*cos(a + b*x)/(b*(S(2)*n + S(1))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x)**S(3))**n, x), x, (c*sin(a + b*x)**S(3))**n*Hypergeometric2F1(S(1)/2, S(3)*n/S(2) + S(1)/2, S(3)*n/S(2) + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)*cos(a + b*x)/(b*(S(3)*n + S(1))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x)**S(4))**n, x), x, (c*sin(a + b*x)**S(4))**n*Hypergeometric2F1(S(1)/2, S(2)*n + S(1)/2, S(2)*n + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)*cos(a + b*x)/(b*(S(4)*n + S(1))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x)**m)**(S(5)/2), x), x, S(2)*c**S(2)*sqrt(c*sin(a + b*x)**m)*Hypergeometric2F1(S(1)/2, S(5)*m/S(4) + S(1)/2, S(5)*m/S(4) + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)**(S(2)*m + S(1))*cos(a + b*x)/(b*(S(5)*m + S(2))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x)**m)**(S(3)/2), x), x, S(2)*c*sqrt(c*sin(a + b*x)**m)*Hypergeometric2F1(S(1)/2, S(3)*m/S(4) + S(1)/2, S(3)*m/S(4) + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)**(m + S(1))*cos(a + b*x)/(b*(S(3)*m + S(2))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x)**m), x), x, S(2)*sqrt(c*sin(a + b*x)**m)*Hypergeometric2F1(S(1)/2, m/S(4) + S(1)/2, m/S(4) + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)*cos(a + b*x)/(b*(m + S(2))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(c*sin(a + b*x)**m), x), x, S(2)*Hypergeometric2F1(S(1)/2, -m/S(4) + S(1)/2, -m/S(4) + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)*cos(a + b*x)/(b*sqrt(c*sin(a + b*x)**m)*(-m + S(2))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x)**m)**(S(-3)/2), x), x, S(2)*Hypergeometric2F1(S(1)/2, -S(3)*m/S(4) + S(1)/2, -S(3)*m/S(4) + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)**(-m + S(1))*cos(a + b*x)/(b*c*sqrt(c*sin(a + b*x)**m)*(-S(3)*m + S(2))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x)**m)**(S(-5)/2), x), x, S(2)*Hypergeometric2F1(S(1)/2, -S(5)*m/S(4) + S(1)/2, -S(5)*m/S(4) + S(3)/2, sin(a + b*x)**S(2))*sin(a + b*x)**(-S(2)*m + S(1))*cos(a + b*x)/(b*c**S(2)*sqrt(c*sin(a + b*x)**m)*(-S(5)*m + S(2))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x)**m)**(S(1)/m), x), x, -(c*sin(a + b*x)**m)**(S(1)/m)*cot(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*(b*sin(c + d*x))**p)**n, x), x, (a*(b*sin(c + d*x))**p)**n*Hypergeometric2F1(S(1)/2, n*p/S(2) + S(1)/2, n*p/S(2) + S(3)/2, sin(c + d*x)**S(2))*sin(c + d*x)*cos(c + d*x)/(d*(n*p + S(1))*sqrt(cos(c + d*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(e + f*x))**m*(b*sin(e + f*x))**n, x), x, (a*sin(e + f*x))**(m + S(1))*(b*sin(e + f*x))**n*Hypergeometric2F1(S(1)/2, m/S(2) + n/S(2) + S(1)/2, m/S(2) + n/S(2) + S(3)/2, sin(e + f*x)**S(2))*cos(e + f*x)/(a*f*(m + n + S(1))*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)*cos(a + b*x)**S(3), x), x, -cos(a + b*x)**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)*cos(a + b*x)**S(2), x), x, -cos(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)*cos(a + b*x), x), x, sin(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)*sec(a + b*x), x), x, -log(cos(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)*sec(a + b*x)**S(2), x), x, sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)*sec(a + b*x)**S(3), x), x, sec(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)*sec(a + b*x)**S(4), x), x, sec(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*cos(a + b*x)**S(7), x), x, -sin(a + b*x)**S(9)/(S(9)*b) + S(3)*sin(a + b*x)**S(7)/(S(7)*b) - S(3)*sin(a + b*x)**S(5)/(S(5)*b) + sin(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*cos(a + b*x)**S(5), x), x, sin(a + b*x)**S(7)/(S(7)*b) - S(2)*sin(a + b*x)**S(5)/(S(5)*b) + sin(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*cos(a + b*x)**S(3), x), x, -sin(a + b*x)**S(5)/(S(5)*b) + sin(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*cos(a + b*x), x), x, sin(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x)**S(2), x), x, -x + tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x)**S(4), x), x, tan(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x)**S(6), x), x, tan(a + b*x)**S(5)/(S(5)*b) + tan(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x)**S(8), x), x, tan(a + b*x)**S(7)/(S(7)*b) + S(2)*tan(a + b*x)**S(5)/(S(5)*b) + tan(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x)**S(10), x), x, tan(a + b*x)**S(9)/(S(9)*b) + S(3)*tan(a + b*x)**S(7)/(S(7)*b) + S(3)*tan(a + b*x)**S(5)/(S(5)*b) + tan(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*cos(a + b*x)**S(6), x), x, S(5)*x/S(128) - sin(a + b*x)*cos(a + b*x)**S(7)/(S(8)*b) + sin(a + b*x)*cos(a + b*x)**S(5)/(S(48)*b) + S(5)*sin(a + b*x)*cos(a + b*x)**S(3)/(S(192)*b) + S(5)*sin(a + b*x)*cos(a + b*x)/(S(128)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*cos(a + b*x)**S(4), x), x, x/S(16) - sin(a + b*x)*cos(a + b*x)**S(5)/(S(6)*b) + sin(a + b*x)*cos(a + b*x)**S(3)/(S(24)*b) + sin(a + b*x)*cos(a + b*x)/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*cos(a + b*x)**S(2), x), x, x/S(8) - sin(a + b*x)*cos(a + b*x)**S(3)/(S(4)*b) + sin(a + b*x)*cos(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2), x), x, x/S(2) - sin(a + b*x)*cos(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x), x), x, -sin(a + b*x)/b + atanh(sin(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x)**S(3), x), x, tan(a + b*x)*sec(a + b*x)/(S(2)*b) - atanh(sin(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x)**S(5), x), x, tan(a + b*x)*sec(a + b*x)**S(3)/(S(4)*b) - tan(a + b*x)*sec(a + b*x)/(S(8)*b) - atanh(sin(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)*sec(a + b*x)**S(7), x), x, tan(a + b*x)*sec(a + b*x)**S(5)/(S(6)*b) - tan(a + b*x)*sec(a + b*x)**S(3)/(S(24)*b) - tan(a + b*x)*sec(a + b*x)/(S(16)*b) - atanh(sin(a + b*x))/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*cos(a + b*x)**S(5), x), x, cos(a + b*x)**S(8)/(S(8)*b) - cos(a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*cos(a + b*x)**S(4), x), x, cos(a + b*x)**S(7)/(S(7)*b) - cos(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*cos(a + b*x)**S(3), x), x, -sin(a + b*x)**S(6)/(S(6)*b) + sin(a + b*x)**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*cos(a + b*x)**S(2), x), x, cos(a + b*x)**S(5)/(S(5)*b) - cos(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*cos(a + b*x), x), x, sin(a + b*x)**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x), x), x, -log(cos(a + b*x))/b + cos(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x)**S(2), x), x, cos(a + b*x)/b + sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x)**S(3), x), x, log(cos(a + b*x))/b + tan(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x)**S(4), x), x, sec(a + b*x)**S(3)/(S(3)*b) - sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x)**S(5), x), x, tan(a + b*x)**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x)**S(6), x), x, sec(a + b*x)**S(5)/(S(5)*b) - sec(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x)**S(7), x), x, sec(a + b*x)**S(6)/(S(6)*b) - sec(a + b*x)**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x)**S(8), x), x, sec(a + b*x)**S(7)/(S(7)*b) - sec(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)*sec(a + b*x)**S(9), x), x, sec(a + b*x)**S(8)/(S(8)*b) - sec(a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*cos(a + b*x)**S(7), x), x, -sin(a + b*x)**S(11)/(S(11)*b) + sin(a + b*x)**S(9)/(S(3)*b) - S(3)*sin(a + b*x)**S(7)/(S(7)*b) + sin(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*cos(a + b*x)**S(5), x), x, sin(a + b*x)**S(9)/(S(9)*b) - S(2)*sin(a + b*x)**S(7)/(S(7)*b) + sin(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*cos(a + b*x)**S(3), x), x, -sin(a + b*x)**S(7)/(S(7)*b) + sin(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*cos(a + b*x), x), x, sin(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(2), x), x, -S(3)*x/S(2) - sin(a + b*x)**S(2)*tan(a + b*x)/(S(2)*b) + S(3)*tan(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(4), x), x, x + tan(a + b*x)**S(3)/(S(3)*b) - tan(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(6), x), x, tan(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(8), x), x, tan(a + b*x)**S(7)/(S(7)*b) + tan(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(10), x), x, tan(a + b*x)**S(9)/(S(9)*b) + S(2)*tan(a + b*x)**S(7)/(S(7)*b) + tan(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*cos(a + b*x)**S(6), x), x, S(3)*x/S(256) - sin(a + b*x)**S(3)*cos(a + b*x)**S(7)/(S(10)*b) - S(3)*sin(a + b*x)*cos(a + b*x)**S(7)/(S(80)*b) + sin(a + b*x)*cos(a + b*x)**S(5)/(S(160)*b) + sin(a + b*x)*cos(a + b*x)**S(3)/(S(128)*b) + S(3)*sin(a + b*x)*cos(a + b*x)/(S(256)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*cos(a + b*x)**S(4), x), x, S(3)*x/S(128) - sin(a + b*x)**S(3)*cos(a + b*x)**S(5)/(S(8)*b) - sin(a + b*x)*cos(a + b*x)**S(5)/(S(16)*b) + sin(a + b*x)*cos(a + b*x)**S(3)/(S(64)*b) + S(3)*sin(a + b*x)*cos(a + b*x)/(S(128)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*cos(a + b*x)**S(2), x), x, x/S(16) - sin(a + b*x)**S(3)*cos(a + b*x)**S(3)/(S(6)*b) - sin(a + b*x)*cos(a + b*x)**S(3)/(S(8)*b) + sin(a + b*x)*cos(a + b*x)/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4), x), x, S(3)*x/S(8) - sin(a + b*x)**S(3)*cos(a + b*x)/(S(4)*b) - S(3)*sin(a + b*x)*cos(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x), x), x, -sin(a + b*x)**S(3)/(S(3)*b) - sin(a + b*x)/b + atanh(sin(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(3), x), x, sin(a + b*x)*tan(a + b*x)**S(2)/(S(2)*b) + S(3)*sin(a + b*x)/(S(2)*b) - S(3)*atanh(sin(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(5), x), x, tan(a + b*x)**S(3)*sec(a + b*x)/(S(4)*b) - S(3)*tan(a + b*x)*sec(a + b*x)/(S(8)*b) + S(3)*atanh(sin(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(7), x), x, tan(a + b*x)**S(3)*sec(a + b*x)**S(3)/(S(6)*b) - tan(a + b*x)*sec(a + b*x)**S(3)/(S(8)*b) + tan(a + b*x)*sec(a + b*x)/(S(16)*b) + atanh(sin(a + b*x))/(S(16)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)*sec(a + b*x)**S(9), x), x, tan(a + b*x)**S(3)*sec(a + b*x)**S(5)/(S(8)*b) - tan(a + b*x)*sec(a + b*x)**S(5)/(S(16)*b) + tan(a + b*x)*sec(a + b*x)**S(3)/(S(64)*b) + S(3)*tan(a + b*x)*sec(a + b*x)/(S(128)*b) + S(3)*atanh(sin(a + b*x))/(S(128)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*cos(a + b*x)**S(7), x), x, -cos(a + b*x)**S(12)/(S(12)*b) + cos(a + b*x)**S(10)/(S(5)*b) - cos(a + b*x)**S(8)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*cos(a + b*x)**S(6), x), x, -cos(a + b*x)**S(11)/(S(11)*b) + S(2)*cos(a + b*x)**S(9)/(S(9)*b) - cos(a + b*x)**S(7)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*cos(a + b*x)**S(5), x), x, sin(a + b*x)**S(10)/(S(10)*b) - sin(a + b*x)**S(8)/(S(4)*b) + sin(a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*cos(a + b*x)**S(4), x), x, -cos(a + b*x)**S(9)/(S(9)*b) + S(2)*cos(a + b*x)**S(7)/(S(7)*b) - cos(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*cos(a + b*x)**S(3), x), x, -sin(a + b*x)**S(8)/(S(8)*b) + sin(a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*cos(a + b*x)**S(2), x), x, -cos(a + b*x)**S(7)/(S(7)*b) + S(2)*cos(a + b*x)**S(5)/(S(5)*b) - cos(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*cos(a + b*x), x), x, sin(a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x), x), x, -log(cos(a + b*x))/b - cos(a + b*x)**S(4)/(S(4)*b) + cos(a + b*x)**S(2)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(2), x), x, -cos(a + b*x)**S(3)/(S(3)*b) + S(2)*cos(a + b*x)/b + sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(3), x), x, S(2)*log(cos(a + b*x))/b - cos(a + b*x)**S(2)/(S(2)*b) + sec(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(4), x), x, -cos(a + b*x)/b + sec(a + b*x)**S(3)/(S(3)*b) - S(2)*sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(5), x), x, -log(cos(a + b*x))/b + tan(a + b*x)**S(4)/(S(4)*b) - tan(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(6), x), x, sec(a + b*x)**S(5)/(S(5)*b) - S(2)*sec(a + b*x)**S(3)/(S(3)*b) + sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(7), x), x, tan(a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(8), x), x, sec(a + b*x)**S(7)/(S(7)*b) - S(2)*sec(a + b*x)**S(5)/(S(5)*b) + sec(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(9), x), x, tan(a + b*x)**S(8)/(S(8)*b) + tan(a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(10), x), x, sec(a + b*x)**S(9)/(S(9)*b) - S(2)*sec(a + b*x)**S(7)/(S(7)*b) + sec(a + b*x)**S(5)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(11), x), x, sec(a + b*x)**S(10)/(S(10)*b) - sec(a + b*x)**S(8)/(S(4)*b) + sec(a + b*x)**S(6)/(S(6)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(12), x), x, sec(a + b*x)**S(11)/(S(11)*b) - S(2)*sec(a + b*x)**S(9)/(S(9)*b) + sec(a + b*x)**S(7)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*sec(a + b*x)**S(13), x), x, sec(a + b*x)**S(12)/(S(12)*b) - sec(a + b*x)**S(10)/(S(5)*b) + sec(a + b*x)**S(8)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(6)*sec(a + b*x)**S(3), x), x, sin(a + b*x)**S(3)*tan(a + b*x)**S(2)/(S(2)*b) + S(5)*sin(a + b*x)**S(3)/(S(6)*b) + S(5)*sin(a + b*x)/(S(2)*b) - S(5)*atanh(sin(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(7)*sec(a + b*x)**S(6), x), x, cos(a + b*x)/b + sec(a + b*x)**S(5)/(S(5)*b) - sec(a + b*x)**S(3)/b + S(3)*sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(6)/sin(a + b*x), x), x, cos(a + b*x)**S(5)/(S(5)*b) + cos(a + b*x)**S(3)/(S(3)*b) + cos(a + b*x)/b - atanh(cos(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(5)/sin(a + b*x), x), x, log(sin(a + b*x))/b + sin(a + b*x)**S(4)/(S(4)*b) - sin(a + b*x)**S(2)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(4)/sin(a + b*x), x), x, cos(a + b*x)**S(3)/(S(3)*b) + cos(a + b*x)/b - atanh(cos(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(3)/sin(a + b*x), x), x, log(sin(a + b*x))/b - sin(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(2)/sin(a + b*x), x), x, cos(a + b*x)/b - atanh(cos(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)/sin(a + b*x), x), x, log(sin(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)/sin(a + b*x), x), x, log(tan(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(2)/sin(a + b*x), x), x, -atanh(cos(a + b*x))/b + sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3)/sin(a + b*x), x), x, log(tan(a + b*x))/b + tan(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(4)/sin(a + b*x), x), x, -atanh(cos(a + b*x))/b + sec(a + b*x)**S(3)/(S(3)*b) + sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(5)/sin(a + b*x), x), x, log(tan(a + b*x))/b + tan(a + b*x)**S(4)/(S(4)*b) + tan(a + b*x)**S(2)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(6)/sin(a + b*x), x), x, -atanh(cos(a + b*x))/b + sec(a + b*x)**S(5)/(S(5)*b) + sec(a + b*x)**S(3)/(S(3)*b) + sec(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(7)/sin(a + b*x), x), x, log(tan(a + b*x))/b + tan(a + b*x)**S(6)/(S(6)*b) + S(3)*tan(a + b*x)**S(4)/(S(4)*b) + S(3)*tan(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(7)/sin(a + b*x)**S(2), x), x, -sin(a + b*x)**S(5)/(S(5)*b) + sin(a + b*x)**S(3)/b - S(3)*sin(a + b*x)/b - csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(6)/sin(a + b*x)**S(2), x), x, -S(15)*x/S(8) + cos(a + b*x)**S(4)*cot(a + b*x)/(S(4)*b) + S(5)*cos(a + b*x)**S(2)*cot(a + b*x)/(S(8)*b) - S(15)*cot(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(5)/sin(a + b*x)**S(2), x), x, sin(a + b*x)**S(3)/(S(3)*b) - S(2)*sin(a + b*x)/b - csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(4)/sin(a + b*x)**S(2), x), x, -S(3)*x/S(2) + cos(a + b*x)**S(2)*cot(a + b*x)/(S(2)*b) - S(3)*cot(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(3)/sin(a + b*x)**S(2), x), x, -sin(a + b*x)/b - csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(2)/sin(a + b*x)**S(2), x), x, -x - cot(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)/sin(a + b*x)**S(2), x), x, -csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)/sin(a + b*x)**S(2), x), x, atanh(sin(a + b*x))/b - csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(2)/sin(a + b*x)**S(2), x), x, tan(a + b*x)/b - cot(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3)/sin(a + b*x)**S(2), x), x, S(3)*atanh(sin(a + b*x))/(S(2)*b) + csc(a + b*x)*sec(a + b*x)**S(2)/(S(2)*b) - S(3)*csc(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(4)/sin(a + b*x)**S(2), x), x, tan(a + b*x)**S(3)/(S(3)*b) + S(2)*tan(a + b*x)/b - cot(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(5)/sin(a + b*x)**S(2), x), x, S(15)*atanh(sin(a + b*x))/(S(8)*b) + csc(a + b*x)*sec(a + b*x)**S(4)/(S(4)*b) + S(5)*csc(a + b*x)*sec(a + b*x)**S(2)/(S(8)*b) - S(15)*csc(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(7)/sin(a + b*x)**S(3), x), x, -S(3)*log(sin(a + b*x))/b - sin(a + b*x)**S(4)/(S(4)*b) + S(3)*sin(a + b*x)**S(2)/(S(2)*b) - csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(6)/sin(a + b*x)**S(3), x), x, -cos(a + b*x)**S(3)*cot(a + b*x)**S(2)/(S(2)*b) - S(5)*cos(a + b*x)**S(3)/(S(6)*b) - S(5)*cos(a + b*x)/(S(2)*b) + S(5)*atanh(cos(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(5)/sin(a + b*x)**S(3), x), x, -S(2)*log(sin(a + b*x))/b + sin(a + b*x)**S(2)/(S(2)*b) - csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(4)/sin(a + b*x)**S(3), x), x, -cos(a + b*x)*cot(a + b*x)**S(2)/(S(2)*b) - S(3)*cos(a + b*x)/(S(2)*b) + S(3)*atanh(cos(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(3)/sin(a + b*x)**S(3), x), x, -log(sin(a + b*x))/b - cot(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(2)/sin(a + b*x)**S(3), x), x, -cot(a + b*x)*csc(a + b*x)/(S(2)*b) + atanh(cos(a + b*x))/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)/sin(a + b*x)**S(3), x), x, -csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)/sin(a + b*x)**S(3), x), x, log(tan(a + b*x))/b - cot(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(2)/sin(a + b*x)**S(3), x), x, -S(3)*atanh(cos(a + b*x))/(S(2)*b) - csc(a + b*x)**S(2)*sec(a + b*x)/(S(2)*b) + S(3)*sec(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3)/sin(a + b*x)**S(3), x), x, S(2)*log(tan(a + b*x))/b + tan(a + b*x)**S(2)/(S(2)*b) - cot(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(4)/sin(a + b*x)**S(3), x), x, -S(5)*atanh(cos(a + b*x))/(S(2)*b) - csc(a + b*x)**S(2)*sec(a + b*x)**S(3)/(S(2)*b) + S(5)*sec(a + b*x)**S(3)/(S(6)*b) + S(5)*sec(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(5)/sin(a + b*x)**S(3), x), x, S(3)*log(tan(a + b*x))/b + tan(a + b*x)**S(4)/(S(4)*b) + S(3)*tan(a + b*x)**S(2)/(S(2)*b) - cot(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(9)/sin(a + b*x)**S(4), x), x, sin(a + b*x)**S(5)/(S(5)*b) - S(4)*sin(a + b*x)**S(3)/(S(3)*b) + S(6)*sin(a + b*x)/b - csc(a + b*x)**S(3)/(S(3)*b) + S(4)*csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(8)/sin(a + b*x)**S(4), x), x, S(35)*x/S(8) + cos(a + b*x)**S(4)*cot(a + b*x)**S(3)/(S(4)*b) + S(7)*cos(a + b*x)**S(2)*cot(a + b*x)**S(3)/(S(8)*b) - S(35)*cot(a + b*x)**S(3)/(S(24)*b) + S(35)*cot(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(7)/sin(a + b*x)**S(4), x), x, -sin(a + b*x)**S(3)/(S(3)*b) + S(3)*sin(a + b*x)/b - csc(a + b*x)**S(3)/(S(3)*b) + S(3)*csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(6)/sin(a + b*x)**S(4), x), x, S(5)*x/S(2) + cos(a + b*x)**S(2)*cot(a + b*x)**S(3)/(S(2)*b) - S(5)*cot(a + b*x)**S(3)/(S(6)*b) + S(5)*cot(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(5)/sin(a + b*x)**S(4), x), x, sin(a + b*x)/b - csc(a + b*x)**S(3)/(S(3)*b) + S(2)*csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(4)/sin(a + b*x)**S(4), x), x, x - cot(a + b*x)**S(3)/(S(3)*b) + cot(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(3)/sin(a + b*x)**S(4), x), x, -csc(a + b*x)**S(3)/(S(3)*b) + csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(2)/sin(a + b*x)**S(4), x), x, -cot(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)/sin(a + b*x)**S(4), x), x, -csc(a + b*x)**S(3)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)/sin(a + b*x)**S(4), x), x, atanh(sin(a + b*x))/b - csc(a + b*x)**S(3)/(S(3)*b) - csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(2)/sin(a + b*x)**S(4), x), x, tan(a + b*x)/b - cot(a + b*x)**S(3)/(S(3)*b) - S(2)*cot(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3)/sin(a + b*x)**S(4), x), x, S(5)*atanh(sin(a + b*x))/(S(2)*b) + csc(a + b*x)**S(3)*sec(a + b*x)**S(2)/(S(2)*b) - S(5)*csc(a + b*x)**S(3)/(S(6)*b) - S(5)*csc(a + b*x)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(4)/sin(a + b*x)**S(4), x), x, tan(a + b*x)**S(3)/(S(3)*b) + S(3)*tan(a + b*x)/b - cot(a + b*x)**S(3)/(S(3)*b) - S(3)*cot(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(5)/sin(a + b*x)**S(4), x), x, S(35)*atanh(sin(a + b*x))/(S(8)*b) + csc(a + b*x)**S(3)*sec(a + b*x)**S(4)/(S(4)*b) + S(7)*csc(a + b*x)**S(3)*sec(a + b*x)**S(2)/(S(8)*b) - S(35)*csc(a + b*x)**S(3)/(S(24)*b) - S(35)*csc(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(9)/sin(a + b*x)**S(5), x), x, S(6)*log(sin(a + b*x))/b + sin(a + b*x)**S(4)/(S(4)*b) - S(2)*sin(a + b*x)**S(2)/b - csc(a + b*x)**S(4)/(S(4)*b) + S(2)*csc(a + b*x)**S(2)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(8)/sin(a + b*x)**S(5), x), x, -cos(a + b*x)**S(3)*cot(a + b*x)**S(4)/(S(4)*b) + S(7)*cos(a + b*x)**S(3)*cot(a + b*x)**S(2)/(S(8)*b) + S(35)*cos(a + b*x)**S(3)/(S(24)*b) + S(35)*cos(a + b*x)/(S(8)*b) - S(35)*atanh(cos(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(7)/sin(a + b*x)**S(5), x), x, S(3)*log(sin(a + b*x))/b - sin(a + b*x)**S(2)/(S(2)*b) - csc(a + b*x)**S(4)/(S(4)*b) + S(3)*csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(6)/sin(a + b*x)**S(5), x), x, -cos(a + b*x)*cot(a + b*x)**S(4)/(S(4)*b) + S(5)*cos(a + b*x)*cot(a + b*x)**S(2)/(S(8)*b) + S(15)*cos(a + b*x)/(S(8)*b) - S(15)*atanh(cos(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(5)/sin(a + b*x)**S(5), x), x, log(sin(a + b*x))/b - cot(a + b*x)**S(4)/(S(4)*b) + cot(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(4)/sin(a + b*x)**S(5), x), x, -cot(a + b*x)**S(3)*csc(a + b*x)/(S(4)*b) + S(3)*cot(a + b*x)*csc(a + b*x)/(S(8)*b) - S(3)*atanh(cos(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(3)/sin(a + b*x)**S(5), x), x, -cot(a + b*x)**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**S(2)/sin(a + b*x)**S(5), x), x, -cot(a + b*x)*csc(a + b*x)**S(3)/(S(4)*b) + cot(a + b*x)*csc(a + b*x)/(S(8)*b) + atanh(cos(a + b*x))/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)/sin(a + b*x)**S(5), x), x, -csc(a + b*x)**S(4)/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)/sin(a + b*x)**S(5), x), x, log(tan(a + b*x))/b - cot(a + b*x)**S(4)/(S(4)*b) - cot(a + b*x)**S(2)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(2)/sin(a + b*x)**S(5), x), x, -S(15)*atanh(cos(a + b*x))/(S(8)*b) - csc(a + b*x)**S(4)*sec(a + b*x)/(S(4)*b) - S(5)*csc(a + b*x)**S(2)*sec(a + b*x)/(S(8)*b) + S(15)*sec(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(3)/sin(a + b*x)**S(5), x), x, S(3)*log(tan(a + b*x))/b + tan(a + b*x)**S(2)/(S(2)*b) - cot(a + b*x)**S(4)/(S(4)*b) - S(3)*cot(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(4)/sin(a + b*x)**S(5), x), x, -S(35)*atanh(cos(a + b*x))/(S(8)*b) - csc(a + b*x)**S(4)*sec(a + b*x)**S(3)/(S(4)*b) - S(7)*csc(a + b*x)**S(2)*sec(a + b*x)**S(3)/(S(8)*b) + S(35)*sec(a + b*x)**S(3)/(S(24)*b) + S(35)*sec(a + b*x)/(S(8)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(a + b*x)**S(5)/sin(a + b*x)**S(5), x), x, S(6)*log(tan(a + b*x))/b + tan(a + b*x)**S(4)/(S(4)*b) + S(2)*tan(a + b*x)**S(2)/b - cot(a + b*x)**S(4)/(S(4)*b) - S(2)*cot(a + b*x)**S(2)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(x)**S(2)/sin(x)**S(6), x), x, -cot(x)**S(5)/S(5) - cot(x)**S(3)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(x)**S(3)/sin(x)**S(7), x), x, -csc(x)**S(6)/S(6) + csc(x)**S(4)/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(3)/2)*sin(a + b*x), x), x, -S(2)*(d*cos(a + b*x))**(S(5)/2)/(S(5)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cos(a + b*x))*sin(a + b*x), x), x, -S(2)*(d*cos(a + b*x))**(S(3)/2)/(S(3)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/sqrt(d*cos(a + b*x)), x), x, -S(2)*sqrt(d*cos(a + b*x))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/(d*cos(a + b*x))**(S(3)/2), x), x, S(2)/(b*d*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/(d*cos(a + b*x))**(S(5)/2), x), x, S(2)/(S(3)*b*d*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/(d*cos(a + b*x))**(S(7)/2), x), x, S(2)/(S(5)*b*d*(d*cos(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)/(d*cos(a + b*x))**(S(9)/2), x), x, S(2)/(S(7)*b*d*(d*cos(a + b*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(9)/2)*sin(a + b*x)**S(2), x), x, S(28)*d**S(4)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(195)*b*sqrt(cos(a + b*x))) + S(28)*d**S(3)*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(585)*b) + S(4)*d*(d*cos(a + b*x))**(S(7)/2)*sin(a + b*x)/(S(117)*b) - S(2)*(d*cos(a + b*x))**(S(11)/2)*sin(a + b*x)/(S(13)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(7)/2)*sin(a + b*x)**S(2), x), x, S(20)*d**S(4)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(231)*b*sqrt(d*cos(a + b*x))) + S(20)*d**S(3)*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(231)*b) + S(4)*d*(d*cos(a + b*x))**(S(5)/2)*sin(a + b*x)/(S(77)*b) - S(2)*(d*cos(a + b*x))**(S(9)/2)*sin(a + b*x)/(S(11)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(5)/2)*sin(a + b*x)**S(2), x), x, S(4)*d**S(2)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(15)*b*sqrt(cos(a + b*x))) + S(4)*d*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(45)*b) - S(2)*(d*cos(a + b*x))**(S(7)/2)*sin(a + b*x)/(S(9)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)**S(2), x), x, S(4)*d**S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(21)*b*sqrt(d*cos(a + b*x))) + S(4)*d*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(21)*b) - S(2)*(d*cos(a + b*x))**(S(5)/2)*sin(a + b*x)/(S(7)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cos(a + b*x))*sin(a + b*x)**S(2), x), x, S(4)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*sqrt(cos(a + b*x))) - S(2)*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(5)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)/sqrt(d*cos(a + b*x)), x), x, S(4)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b*sqrt(d*cos(a + b*x))) - S(2)*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(3)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)/(d*cos(a + b*x))**(S(3)/2), x), x, S(2)*sin(a + b*x)/(b*d*sqrt(d*cos(a + b*x))) - S(4)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*d**S(2)*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)/(d*cos(a + b*x))**(S(5)/2), x), x, S(2)*sin(a + b*x)/(S(3)*b*d*(d*cos(a + b*x))**(S(3)/2)) - S(4)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b*d**S(2)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)/(d*cos(a + b*x))**(S(7)/2), x), x, S(2)*sin(a + b*x)/(S(5)*b*d*(d*cos(a + b*x))**(S(5)/2)) - S(4)*sin(a + b*x)/(S(5)*b*d**S(3)*sqrt(d*cos(a + b*x))) + S(4)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*d**S(4)*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(2)/(d*cos(a + b*x))**(S(9)/2), x), x, S(2)*sin(a + b*x)/(S(7)*b*d*(d*cos(a + b*x))**(S(7)/2)) - S(4)*sin(a + b*x)/(S(21)*b*d**S(3)*(d*cos(a + b*x))**(S(3)/2)) - S(4)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(21)*b*d**S(4)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cos(a + b*x))*sin(a + b*x)**S(3), x), x, -S(2)*(d*cos(a + b*x))**(S(3)/2)/(S(3)*b*d) + S(2)*(d*cos(a + b*x))**(S(7)/2)/(S(7)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/sqrt(d*cos(a + b*x)), x), x, -S(2)*sqrt(d*cos(a + b*x))/(b*d) + S(2)*(d*cos(a + b*x))**(S(5)/2)/(S(5)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/(d*cos(a + b*x))**(S(3)/2), x), x, S(2)/(b*d*sqrt(d*cos(a + b*x))) + S(2)*(d*cos(a + b*x))**(S(3)/2)/(S(3)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/(d*cos(a + b*x))**(S(5)/2), x), x, S(2)/(S(3)*b*d*(d*cos(a + b*x))**(S(3)/2)) + S(2)*sqrt(d*cos(a + b*x))/(b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/(d*cos(a + b*x))**(S(7)/2), x), x, S(2)/(S(5)*b*d*(d*cos(a + b*x))**(S(5)/2)) - S(2)/(b*d**S(3)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/(d*cos(a + b*x))**(S(9)/2), x), x, S(2)/(S(7)*b*d*(d*cos(a + b*x))**(S(7)/2)) - S(2)/(S(3)*b*d**S(3)*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(3)/(d*cos(a + b*x))**(S(11)/2), x), x, S(2)/(S(9)*b*d*(d*cos(a + b*x))**(S(9)/2)) - S(2)/(S(5)*b*d**S(3)*(d*cos(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(9)/2)*sin(a + b*x)**S(4), x), x, S(56)*d**S(4)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(1105)*b*sqrt(cos(a + b*x))) + S(56)*d**S(3)*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(3315)*b) + S(8)*d*(d*cos(a + b*x))**(S(7)/2)*sin(a + b*x)/(S(663)*b) - S(2)*(d*cos(a + b*x))**(S(11)/2)*sin(a + b*x)**S(3)/(S(17)*b*d) - S(12)*(d*cos(a + b*x))**(S(11)/2)*sin(a + b*x)/(S(221)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(7)/2)*sin(a + b*x)**S(4), x), x, S(8)*d**S(4)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(231)*b*sqrt(d*cos(a + b*x))) + S(8)*d**S(3)*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(231)*b) + S(8)*d*(d*cos(a + b*x))**(S(5)/2)*sin(a + b*x)/(S(385)*b) - S(2)*(d*cos(a + b*x))**(S(9)/2)*sin(a + b*x)**S(3)/(S(15)*b*d) - S(4)*(d*cos(a + b*x))**(S(9)/2)*sin(a + b*x)/(S(55)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(5)/2)*sin(a + b*x)**S(4), x), x, S(8)*d**S(2)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(65)*b*sqrt(cos(a + b*x))) + S(8)*d*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(195)*b) - S(2)*(d*cos(a + b*x))**(S(7)/2)*sin(a + b*x)**S(3)/(S(13)*b*d) - S(4)*(d*cos(a + b*x))**(S(7)/2)*sin(a + b*x)/(S(39)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)**S(4), x), x, S(8)*d**S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(77)*b*sqrt(d*cos(a + b*x))) + S(8)*d*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(77)*b) - S(2)*(d*cos(a + b*x))**(S(5)/2)*sin(a + b*x)**S(3)/(S(11)*b*d) - S(12)*(d*cos(a + b*x))**(S(5)/2)*sin(a + b*x)/(S(77)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cos(a + b*x))*sin(a + b*x)**S(4), x), x, S(8)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(15)*b*sqrt(cos(a + b*x))) - S(2)*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)**S(3)/(S(9)*b*d) - S(4)*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(15)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)/sqrt(d*cos(a + b*x)), x), x, S(8)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(7)*b*sqrt(d*cos(a + b*x))) - S(2)*sqrt(d*cos(a + b*x))*sin(a + b*x)**S(3)/(S(7)*b*d) - S(4)*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(7)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)/(d*cos(a + b*x))**(S(3)/2), x), x, S(2)*sin(a + b*x)**S(3)/(b*d*sqrt(d*cos(a + b*x))) - S(24)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*d**S(2)*sqrt(cos(a + b*x))) + S(12)*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(5)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)/(d*cos(a + b*x))**(S(5)/2), x), x, S(2)*sin(a + b*x)**S(3)/(S(3)*b*d*(d*cos(a + b*x))**(S(3)/2)) - S(8)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b*d**S(2)*sqrt(d*cos(a + b*x))) + S(4)*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(3)*b*d**S(3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)/(d*cos(a + b*x))**(S(7)/2), x), x, S(2)*sin(a + b*x)**S(3)/(S(5)*b*d*(d*cos(a + b*x))**(S(5)/2)) - S(12)*sin(a + b*x)/(S(5)*b*d**S(3)*sqrt(d*cos(a + b*x))) + S(24)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*d**S(4)*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(4)/(d*cos(a + b*x))**(S(9)/2), x), x, S(2)*sin(a + b*x)**S(3)/(S(7)*b*d*(d*cos(a + b*x))**(S(7)/2)) - S(4)*sin(a + b*x)/(S(7)*b*d**S(3)*(d*cos(a + b*x))**(S(3)/2)) + S(8)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(7)*b*d**S(4)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**S(5)*cos(a + b*x)**(S(3)/2), x), x, -S(2)*cos(a + b*x)**(S(13)/2)/(S(13)*b) + S(4)*cos(a + b*x)**(S(9)/2)/(S(9)*b) - S(2)*cos(a + b*x)**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(9)/2)*csc(a + b*x), x), x, d**(S(9)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/b - d**(S(9)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/b + S(2)*d**S(3)*(d*cos(a + b*x))**(S(3)/2)/(S(3)*b) + S(2)*d*(d*cos(a + b*x))**(S(7)/2)/(S(7)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(7)/2)*csc(a + b*x), x), x, -d**(S(7)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/b - d**(S(7)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/b + S(2)*d**S(3)*sqrt(d*cos(a + b*x))/b + S(2)*d*(d*cos(a + b*x))**(S(5)/2)/(S(5)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(5)/2)*csc(a + b*x), x), x, d**(S(5)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/b - d**(S(5)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/b + S(2)*d*(d*cos(a + b*x))**(S(3)/2)/(S(3)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(3)/2)*csc(a + b*x), x), x, -d**(S(3)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/b - d**(S(3)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/b + S(2)*d*sqrt(d*cos(a + b*x))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cos(a + b*x))*csc(a + b*x), x), x, sqrt(d)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/b - sqrt(d)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)/sqrt(d*cos(a + b*x)), x), x, -ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(b*sqrt(d)) - atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(b*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)/(d*cos(a + b*x))**(S(3)/2), x), x, S(2)/(b*d*sqrt(d*cos(a + b*x))) + ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(b*d**(S(3)/2)) - atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(b*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)/(d*cos(a + b*x))**(S(5)/2), x), x, S(2)/(S(3)*b*d*(d*cos(a + b*x))**(S(3)/2)) - ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(b*d**(S(5)/2)) - atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(b*d**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)/(d*cos(a + b*x))**(S(7)/2), x), x, S(2)/(S(5)*b*d*(d*cos(a + b*x))**(S(5)/2)) + S(2)/(b*d**S(3)*sqrt(d*cos(a + b*x))) + ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(b*d**(S(7)/2)) - atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(b*d**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)/(d*cos(a + b*x))**(S(9)/2), x), x, S(2)/(S(7)*b*d*(d*cos(a + b*x))**(S(7)/2)) + S(2)/(S(3)*b*d**S(3)*(d*cos(a + b*x))**(S(3)/2)) - ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(b*d**(S(9)/2)) - atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(b*d**(S(9)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(11)/2)*csc(a + b*x)**S(2), x), x, -S(15)*d**S(6)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(7)*b*sqrt(d*cos(a + b*x))) - S(15)*d**S(5)*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(7)*b) - S(9)*d**S(3)*(d*cos(a + b*x))**(S(5)/2)*sin(a + b*x)/(S(7)*b) - d*(d*cos(a + b*x))**(S(9)/2)*csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(9)/2)*csc(a + b*x)**S(2), x), x, -S(21)*d**S(4)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*sqrt(cos(a + b*x))) - S(7)*d**S(3)*(d*cos(a + b*x))**(S(3)/2)*sin(a + b*x)/(S(5)*b) - d*(d*cos(a + b*x))**(S(7)/2)*csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(7)/2)*csc(a + b*x)**S(2), x), x, -S(5)*d**S(4)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b*sqrt(d*cos(a + b*x))) - S(5)*d**S(3)*sqrt(d*cos(a + b*x))*sin(a + b*x)/(S(3)*b) - d*(d*cos(a + b*x))**(S(5)/2)*csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(5)/2)*csc(a + b*x)**S(2), x), x, -S(3)*d**S(2)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*sqrt(cos(a + b*x))) - d*(d*cos(a + b*x))**(S(3)/2)*csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(3)/2)*csc(a + b*x)**S(2), x), x, -d**S(2)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(b*sqrt(d*cos(a + b*x))) - d*sqrt(d*cos(a + b*x))*csc(a + b*x)/b, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cos(a + b*x))*csc(a + b*x)**S(2), x), x, -sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*sqrt(cos(a + b*x))) - (d*cos(a + b*x))**(S(3)/2)*csc(a + b*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(2)/sqrt(d*cos(a + b*x)), x), x, EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(b*sqrt(d*cos(a + b*x))) - sqrt(d*cos(a + b*x))*csc(a + b*x)/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(2)/(d*cos(a + b*x))**(S(3)/2), x), x, S(3)*sin(a + b*x)/(b*d*sqrt(d*cos(a + b*x))) - csc(a + b*x)/(b*d*sqrt(d*cos(a + b*x))) - S(3)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(b*d**S(2)*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(2)/(d*cos(a + b*x))**(S(5)/2), x), x, S(5)*sin(a + b*x)/(S(3)*b*d*(d*cos(a + b*x))**(S(3)/2)) - csc(a + b*x)/(b*d*(d*cos(a + b*x))**(S(3)/2)) + S(5)*EllipticF(a/S(2) + b*x/S(2), S(2))*sqrt(cos(a + b*x))/(S(3)*b*d**S(2)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(2)/(d*cos(a + b*x))**(S(7)/2), x), x, S(7)*sin(a + b*x)/(S(5)*b*d*(d*cos(a + b*x))**(S(5)/2)) - csc(a + b*x)/(b*d*(d*cos(a + b*x))**(S(5)/2)) + S(21)*sin(a + b*x)/(S(5)*b*d**S(3)*sqrt(d*cos(a + b*x))) - S(21)*sqrt(d*cos(a + b*x))*EllipticE(a/S(2) + b*x/S(2), S(2))/(S(5)*b*d**S(4)*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(11)/2)*csc(a + b*x)**S(3), x), x, S(9)*d**(S(11)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) + S(9)*d**(S(11)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) - S(9)*d**S(5)*sqrt(d*cos(a + b*x))/(S(2)*b) - S(9)*d**S(3)*(d*cos(a + b*x))**(S(5)/2)/(S(10)*b) - d*(d*cos(a + b*x))**(S(9)/2)*csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(9)/2)*csc(a + b*x)**S(3), x), x, -S(7)*d**(S(9)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) + S(7)*d**(S(9)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) - S(7)*d**S(3)*(d*cos(a + b*x))**(S(3)/2)/(S(6)*b) - d*(d*cos(a + b*x))**(S(7)/2)*csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(7)/2)*csc(a + b*x)**S(3), x), x, S(5)*d**(S(7)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) + S(5)*d**(S(7)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) - S(5)*d**S(3)*sqrt(d*cos(a + b*x))/(S(2)*b) - d*(d*cos(a + b*x))**(S(5)/2)*csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(5)/2)*csc(a + b*x)**S(3), x), x, -S(3)*d**(S(5)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) + S(3)*d**(S(5)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) - d*(d*cos(a + b*x))**(S(3)/2)*csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(3)/2)*csc(a + b*x)**S(3), x), x, d**(S(3)/2)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) + d**(S(3)/2)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) - d*sqrt(d*cos(a + b*x))*csc(a + b*x)**S(2)/(S(2)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cos(a + b*x))*csc(a + b*x)**S(3), x), x, sqrt(d)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) - sqrt(d)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b) - (d*cos(a + b*x))**(S(3)/2)*csc(a + b*x)**S(2)/(S(2)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(3)/sqrt(d*cos(a + b*x)), x), x, -sqrt(d*cos(a + b*x))*csc(a + b*x)**S(2)/(S(2)*b*d) - S(3)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b*sqrt(d)) - S(3)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(3)/(d*cos(a + b*x))**(S(3)/2), x), x, -csc(a + b*x)**S(2)/(S(2)*b*d*sqrt(d*cos(a + b*x))) + S(5)/(S(2)*b*d*sqrt(d*cos(a + b*x))) + S(5)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b*d**(S(3)/2)) - S(5)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b*d**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(3)/(d*cos(a + b*x))**(S(5)/2), x), x, -csc(a + b*x)**S(2)/(S(2)*b*d*(d*cos(a + b*x))**(S(3)/2)) + S(7)/(S(6)*b*d*(d*cos(a + b*x))**(S(3)/2)) - S(7)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b*d**(S(5)/2)) - S(7)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b*d**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(a + b*x)**S(3)/(d*cos(a + b*x))**(S(7)/2), x), x, -csc(a + b*x)**S(2)/(S(2)*b*d*(d*cos(a + b*x))**(S(5)/2)) + S(9)/(S(10)*b*d*(d*cos(a + b*x))**(S(5)/2)) + S(9)/(S(2)*b*d**S(3)*sqrt(d*cos(a + b*x))) + S(9)*ArcTan(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b*d**(S(7)/2)) - S(9)*atanh(sqrt(d*cos(a + b*x))/sqrt(d))/(S(4)*b*d**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(1)/5)*sin(a + b*x), x), x, -S(5)*(d*cos(a + b*x))**(S(6)/5)/(S(6)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sin(x))*cos(x)**S(3), x), x, -S(2)*sin(x)**(S(7)/2)/S(7) + S(2)*sin(x)**(S(3)/2)/S(3), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(x)**(S(3)/2)*cos(x)**S(3), x), x, -S(2)*sin(x)**(S(9)/2)/S(9) + S(2)*sin(x)**(S(5)/2)/S(5), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(x)**(S(5)/2)*cos(x)**S(3), x), x, -S(2)*sin(x)**(S(11)/2)/S(11) + S(2)*sin(x)**(S(7)/2)/S(7), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(x)**S(3)/sqrt(sin(x)), x), x, -S(2)*sin(x)**(S(5)/2)/S(5) + S(2)*sqrt(sin(x)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(9)/2), x), x, S(7)*d**S(4)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(20)*b*sqrt(sin(S(2)*a + S(2)*b*x))) + S(7)*d**S(3)*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(3)/2)/(S(30)*b*c) + d*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(7)/2)/(S(5)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(5)/2), x), x, d**S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(2)*b*sqrt(sin(S(2)*a + S(2)*b*x))) + d*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(3)/2)/(S(3)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x)), x), x, sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*sqrt(sin(S(2)*a + S(2)*b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))/(d*cos(a + b*x))**(S(3)/2), x), x, -S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*d**S(2)*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*(c*sin(a + b*x))**(S(3)/2)/(b*c*d*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))/(d*cos(a + b*x))**(S(7)/2), x), x, -S(4)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*d**S(4)*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*(c*sin(a + b*x))**(S(3)/2)/(S(5)*b*c*d*(d*cos(a + b*x))**(S(5)/2)) + S(4)*(c*sin(a + b*x))**(S(3)/2)/(S(5)*b*c*d**S(3)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(3)/2), x), x, -sqrt(S(2))*sqrt(c)*d**(S(3)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/(sqrt(c)*sqrt(d*cos(a + b*x))))/(S(8)*b) + sqrt(S(2))*sqrt(c)*d**(S(3)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/(sqrt(c)*sqrt(d*cos(a + b*x))))/(S(8)*b) + sqrt(S(2))*sqrt(c)*d**(S(3)/2)*log(sqrt(c)*tan(a + b*x) + sqrt(c) - sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)))/(S(16)*b) - sqrt(S(2))*sqrt(c)*d**(S(3)/2)*log(sqrt(c)*tan(a + b*x) + sqrt(c) + sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)))/(S(16)*b) + d*(c*sin(a + b*x))**(S(3)/2)*sqrt(d*cos(a + b*x))/(S(2)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)), x), x, -sqrt(S(2))*sqrt(c)*ArcTan(S(1) - sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/(sqrt(c)*sqrt(d*cos(a + b*x))))/(S(2)*b*sqrt(d)) + sqrt(S(2))*sqrt(c)*ArcTan(S(1) + sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/(sqrt(c)*sqrt(d*cos(a + b*x))))/(S(2)*b*sqrt(d)) + sqrt(S(2))*sqrt(c)*log(sqrt(c)*tan(a + b*x) + sqrt(c) - sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)))/(S(4)*b*sqrt(d)) - sqrt(S(2))*sqrt(c)*log(sqrt(c)*tan(a + b*x) + sqrt(c) + sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)))/(S(4)*b*sqrt(d)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))/(d*cos(a + b*x))**(S(5)/2), x), x, S(2)*(c*sin(a + b*x))**(S(3)/2)/(S(3)*b*c*d*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))/(d*cos(a + b*x))**(S(9)/2), x), x, S(2)*(c*sin(a + b*x))**(S(3)/2)/(S(7)*b*c*d*(d*cos(a + b*x))**(S(7)/2)) + S(8)*(c*sin(a + b*x))**(S(3)/2)/(S(21)*b*c*d**S(3)*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))/(d*cos(a + b*x))**(S(13)/2), x), x, S(2)*(c*sin(a + b*x))**(S(3)/2)/(S(11)*b*c*d*(d*cos(a + b*x))**(S(11)/2)) + S(16)*(c*sin(a + b*x))**(S(3)/2)/(S(77)*b*c*d**S(3)*(d*cos(a + b*x))**(S(7)/2)) + S(64)*(c*sin(a + b*x))**(S(3)/2)/(S(231)*b*c*d**S(5)*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(3)/2), x), x, c**S(2)*d**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(12)*b*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))) + c*d*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))/(S(6)*b) - c*sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(5)/2)/(S(3)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)/sqrt(d*cos(a + b*x)), x), x, c**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(2)*b*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))) - c*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))/(b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)/(d*cos(a + b*x))**(S(5)/2), x), x, -c**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b*d**S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))) + S(2)*c*sqrt(c*sin(a + b*x))/(S(3)*b*d*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)/(d*cos(a + b*x))**(S(9)/2), x), x, -S(2)*c**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(21)*b*d**S(4)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))) + S(2)*c*sqrt(c*sin(a + b*x))/(S(7)*b*d*(d*cos(a + b*x))**(S(7)/2)) - S(2)*c*sqrt(c*sin(a + b*x))/(S(21)*b*d**S(3)*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)*sqrt(d*cos(a + b*x)), x), x, sqrt(S(2))*c**(S(3)/2)*sqrt(d)*ArcTan(-sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/(sqrt(d)*sqrt(c*sin(a + b*x))) + S(1))/(S(8)*b) - sqrt(S(2))*c**(S(3)/2)*sqrt(d)*ArcTan(sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/(sqrt(d)*sqrt(c*sin(a + b*x))) + S(1))/(S(8)*b) - sqrt(S(2))*c**(S(3)/2)*sqrt(d)*log(-sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/sqrt(c*sin(a + b*x)) + sqrt(d)*cot(a + b*x) + sqrt(d))/(S(16)*b) + sqrt(S(2))*c**(S(3)/2)*sqrt(d)*log(sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/sqrt(c*sin(a + b*x)) + sqrt(d)*cot(a + b*x) + sqrt(d))/(S(16)*b) - c*sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(3)/2)/(S(2)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)/(d*cos(a + b*x))**(S(3)/2), x), x, -sqrt(S(2))*c**(S(3)/2)*ArcTan(-sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/(sqrt(d)*sqrt(c*sin(a + b*x))) + S(1))/(S(2)*b*d**(S(3)/2)) + sqrt(S(2))*c**(S(3)/2)*ArcTan(sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/(sqrt(d)*sqrt(c*sin(a + b*x))) + S(1))/(S(2)*b*d**(S(3)/2)) + sqrt(S(2))*c**(S(3)/2)*log(-sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/sqrt(c*sin(a + b*x)) + sqrt(d)*cot(a + b*x) + sqrt(d))/(S(4)*b*d**(S(3)/2)) - sqrt(S(2))*c**(S(3)/2)*log(sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/sqrt(c*sin(a + b*x)) + sqrt(d)*cot(a + b*x) + sqrt(d))/(S(4)*b*d**(S(3)/2)) + S(2)*c*sqrt(c*sin(a + b*x))/(b*d*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)/(d*cos(a + b*x))**(S(7)/2), x), x, S(2)*(c*sin(a + b*x))**(S(5)/2)/(S(5)*b*c*d*(d*cos(a + b*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)/(d*cos(a + b*x))**(S(11)/2), x), x, S(2)*c*sqrt(c*sin(a + b*x))/(S(9)*b*d*(d*cos(a + b*x))**(S(9)/2)) - S(2)*c*sqrt(c*sin(a + b*x))/(S(45)*b*d**S(3)*(d*cos(a + b*x))**(S(5)/2)) - S(8)*c*sqrt(c*sin(a + b*x))/(S(45)*b*d**S(5)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)/(d*cos(a + b*x))**(S(15)/2), x), x, S(2)*c*sqrt(c*sin(a + b*x))/(S(13)*b*d*(d*cos(a + b*x))**(S(13)/2)) - S(2)*c*sqrt(c*sin(a + b*x))/(S(117)*b*d**S(3)*(d*cos(a + b*x))**(S(9)/2)) - S(16)*c*sqrt(c*sin(a + b*x))/(S(585)*b*d**S(5)*(d*cos(a + b*x))**(S(5)/2)) - S(64)*c*sqrt(c*sin(a + b*x))/(S(585)*b*d**S(7)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)*(d*cos(a + b*x))**(S(9)/2), x), x, S(3)*c**S(2)*d**S(4)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(40)*b*sqrt(sin(S(2)*a + S(2)*b*x))) + c*d**S(3)*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(3)/2)/(S(20)*b) + S(3)*c*d*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(7)/2)/(S(70)*b) - c*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(11)/2)/(S(7)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)*(d*cos(a + b*x))**(S(5)/2), x), x, S(3)*c**S(2)*d**S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(20)*b*sqrt(sin(S(2)*a + S(2)*b*x))) + c*d*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(3)/2)/(S(10)*b) - c*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(7)/2)/(S(5)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)*sqrt(d*cos(a + b*x)), x), x, c**S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(2)*b*sqrt(sin(S(2)*a + S(2)*b*x))) - c*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(S(3)/2)/(S(3)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)/(d*cos(a + b*x))**(S(3)/2), x), x, -S(3)*c**S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(b*d**S(2)*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*(c*sin(a + b*x))**(S(3)/2)/(b*d*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)/(d*cos(a + b*x))**(S(7)/2), x), x, S(6)*c**S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(5)*b*d**S(4)*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*(c*sin(a + b*x))**(S(3)/2)/(S(5)*b*d*(d*cos(a + b*x))**(S(5)/2)) - S(6)*c*(c*sin(a + b*x))**(S(3)/2)/(S(5)*b*d**S(3)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)/(d*cos(a + b*x))**(S(11)/2), x), x, S(4)*c**S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))*EllipticE(-Pi/S(4) + a + b*x, S(2))/(S(15)*b*d**S(6)*sqrt(sin(S(2)*a + S(2)*b*x))) + S(2)*c*(c*sin(a + b*x))**(S(3)/2)/(S(9)*b*d*(d*cos(a + b*x))**(S(9)/2)) - S(2)*c*(c*sin(a + b*x))**(S(3)/2)/(S(15)*b*d**S(3)*(d*cos(a + b*x))**(S(5)/2)) - S(4)*c*(c*sin(a + b*x))**(S(3)/2)/(S(15)*b*d**S(5)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)/sqrt(d*cos(a + b*x)), x), x, -S(3)*sqrt(S(2))*c**(S(5)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/(sqrt(c)*sqrt(d*cos(a + b*x))))/(S(8)*b*sqrt(d)) + S(3)*sqrt(S(2))*c**(S(5)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/(sqrt(c)*sqrt(d*cos(a + b*x))))/(S(8)*b*sqrt(d)) + S(3)*sqrt(S(2))*c**(S(5)/2)*log(sqrt(c)*tan(a + b*x) + sqrt(c) - sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)))/(S(16)*b*sqrt(d)) - S(3)*sqrt(S(2))*c**(S(5)/2)*log(sqrt(c)*tan(a + b*x) + sqrt(c) + sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)))/(S(16)*b*sqrt(d)) - c*(c*sin(a + b*x))**(S(3)/2)*sqrt(d*cos(a + b*x))/(S(2)*b*d), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)/(d*cos(a + b*x))**(S(5)/2), x), x, sqrt(S(2))*c**(S(5)/2)*ArcTan(S(1) - sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/(sqrt(c)*sqrt(d*cos(a + b*x))))/(S(2)*b*d**(S(5)/2)) - sqrt(S(2))*c**(S(5)/2)*ArcTan(S(1) + sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/(sqrt(c)*sqrt(d*cos(a + b*x))))/(S(2)*b*d**(S(5)/2)) - sqrt(S(2))*c**(S(5)/2)*log(sqrt(c)*tan(a + b*x) + sqrt(c) - sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)))/(S(4)*b*d**(S(5)/2)) + sqrt(S(2))*c**(S(5)/2)*log(sqrt(c)*tan(a + b*x) + sqrt(c) + sqrt(S(2))*sqrt(d)*sqrt(c*sin(a + b*x))/sqrt(d*cos(a + b*x)))/(S(4)*b*d**(S(5)/2)) + S(2)*c*(c*sin(a + b*x))**(S(3)/2)/(S(3)*b*d*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)/(d*cos(a + b*x))**(S(9)/2), x), x, S(2)*(c*sin(a + b*x))**(S(7)/2)/(S(7)*b*c*d*(d*cos(a + b*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)/(d*cos(a + b*x))**(S(13)/2), x), x, S(2)*c*(c*sin(a + b*x))**(S(3)/2)/(S(11)*b*d*(d*cos(a + b*x))**(S(11)/2)) - S(6)*c*(c*sin(a + b*x))**(S(3)/2)/(S(77)*b*d**S(3)*(d*cos(a + b*x))**(S(7)/2)) - S(8)*c*(c*sin(a + b*x))**(S(3)/2)/(S(77)*b*d**S(5)*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)/(d*cos(a + b*x))**(S(17)/2), x), x, S(2)*c*(c*sin(a + b*x))**(S(3)/2)/(S(15)*b*d*(d*cos(a + b*x))**(S(15)/2)) - S(2)*c*(c*sin(a + b*x))**(S(3)/2)/(S(55)*b*d**S(3)*(d*cos(a + b*x))**(S(11)/2)) - S(16)*c*(c*sin(a + b*x))**(S(3)/2)/(S(385)*b*d**S(5)*(d*cos(a + b*x))**(S(7)/2)) - S(64)*c*(c*sin(a + b*x))**(S(3)/2)/(S(1155)*b*d**S(7)*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(7)/2)/cos(a + b*x)**(S(7)/2), x), x, sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(2)*b) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(2)*b) - sqrt(S(2))*log(cot(a + b*x) + S(1) - sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(4)*b) + sqrt(S(2))*log(cot(a + b*x) + S(1) + sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(4)*b) + S(2)*sin(a + b*x)**(S(5)/2)/(S(5)*b*cos(a + b*x)**(S(5)/2)) - S(2)*sqrt(sin(a + b*x))/(b*sqrt(cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(x)**(S(3)/2)/cos(x)**(S(7)/2), x), x, S(2)*sin(x)**(S(5)/2)/(S(5)*cos(x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sin(x))/sqrt(cos(x)), x), x, -sqrt(S(2))*ArcTan(-sqrt(S(2))*sqrt(sin(x))/sqrt(cos(x)) + S(1))/S(2) + sqrt(S(2))*ArcTan(sqrt(S(2))*sqrt(sin(x))/sqrt(cos(x)) + S(1))/S(2) + sqrt(S(2))*log(-sqrt(S(2))*sqrt(sin(x))/sqrt(cos(x)) + tan(x) + S(1))/S(4) - sqrt(S(2))*log(sqrt(S(2))*sqrt(sin(x))/sqrt(cos(x)) + tan(x) + S(1))/S(4), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(x)**(S(5)/2)/sqrt(cos(x)), x), x, -S(3)*sqrt(S(2))*ArcTan(-sqrt(S(2))*sqrt(sin(x))/sqrt(cos(x)) + S(1))/S(8) + S(3)*sqrt(S(2))*ArcTan(sqrt(S(2))*sqrt(sin(x))/sqrt(cos(x)) + S(1))/S(8) + S(3)*sqrt(S(2))*log(-sqrt(S(2))*sqrt(sin(x))/sqrt(cos(x)) + tan(x) + S(1))/S(16) - S(3)*sqrt(S(2))*log(sqrt(S(2))*sqrt(sin(x))/sqrt(cos(x)) + tan(x) + S(1))/S(16) - sin(x)**(S(3)/2)*sqrt(cos(x))/S(2), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(7)/2)/sqrt(c*sin(a + b*x)), x), x, S(5)*d**S(4)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(12)*b*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))) + S(5)*d**S(3)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))/(S(6)*b*c) + d*sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(5)/2)/(S(3)*b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**(S(3)/2)/sqrt(c*sin(a + b*x)), x), x, d**S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(2)*b*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))) + d*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))/(b*c), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))), x), x, EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(b*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(5)/2)), x), x, S(2)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(3)*b*d**S(2)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))) + S(2)*sqrt(c*sin(a + b*x))/(S(3)*b*c*d*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(9)/2)), x), x, S(4)*EllipticF(-Pi/S(4) + a + b*x, S(2))*sqrt(sin(S(2)*a + S(2)*b*x))/(S(7)*b*d**S(4)*sqrt(c*sin(a + b*x))*sqrt(d*cos(a + b*x))) + S(2)*sqrt(c*sin(a + b*x))/(S(7)*b*c*d*(d*cos(a + b*x))**(S(7)/2)) + S(4)*sqrt(c*sin(a + b*x))/(S(7)*b*c*d**S(3)*(d*cos(a + b*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*cos(a + b*x))/sqrt(c*sin(a + b*x)), x), x, sqrt(S(2))*sqrt(d)*ArcTan(-sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/(sqrt(d)*sqrt(c*sin(a + b*x))) + S(1))/(S(2)*b*sqrt(c)) - sqrt(S(2))*sqrt(d)*ArcTan(sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/(sqrt(d)*sqrt(c*sin(a + b*x))) + S(1))/(S(2)*b*sqrt(c)) - sqrt(S(2))*sqrt(d)*log(-sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/sqrt(c*sin(a + b*x)) + sqrt(d)*cot(a + b*x) + sqrt(d))/(S(4)*b*sqrt(c)) + sqrt(S(2))*sqrt(d)*log(sqrt(S(2))*sqrt(c)*sqrt(d*cos(a + b*x))/sqrt(c*sin(a + b*x)) + sqrt(d)*cot(a + b*x) + sqrt(d))/(S(4)*b*sqrt(c)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(3)/2)), x), x, S(2)*sqrt(c*sin(a + b*x))/(b*c*d*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(7)/2)), x), x, S(2)*sqrt(c*sin(a + b*x))/(S(5)*b*c*d*(d*cos(a + b*x))**(S(5)/2)) + S(8)*sqrt(c*sin(a + b*x))/(S(5)*b*c*d**S(3)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(S(11)/2)), x), x, S(2)*sqrt(c*sin(a + b*x))/(S(9)*b*c*d*(d*cos(a + b*x))**(S(9)/2)) + S(16)*sqrt(c*sin(a + b*x))/(S(45)*b*c*d**S(3)*(d*cos(a + b*x))**(S(5)/2)) + S(64)*sqrt(c*sin(a + b*x))/(S(45)*b*c*d**S(5)*sqrt(d*cos(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(cos(a + b*x))/sqrt(sin(a + b*x)), x), x, sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(2)*b) - sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(2)*b) - sqrt(S(2))*log(cot(a + b*x) + S(1) - sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(4)*b) + sqrt(S(2))*log(cot(a + b*x) + S(1) + sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**(S(3)/2)/sin(a + b*x)**(S(3)/2), x), x, sqrt(S(2))*ArcTan(-sqrt(S(2))*sqrt(sin(a + b*x))/sqrt(cos(a + b*x)) + S(1))/(S(2)*b) - sqrt(S(2))*ArcTan(sqrt(S(2))*sqrt(sin(a + b*x))/sqrt(cos(a + b*x)) + S(1))/(S(2)*b) - sqrt(S(2))*log(-sqrt(S(2))*sqrt(sin(a + b*x))/sqrt(cos(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b) + sqrt(S(2))*log(sqrt(S(2))*sqrt(sin(a + b*x))/sqrt(cos(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b) - S(2)*sqrt(cos(a + b*x))/(b*sqrt(sin(a + b*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**(S(5)/2)/sin(a + b*x)**(S(5)/2), x), x, -sqrt(S(2))*ArcTan(S(1) - sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(2)*b) + sqrt(S(2))*ArcTan(S(1) + sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(2)*b) + sqrt(S(2))*log(cot(a + b*x) + S(1) - sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(4)*b) - sqrt(S(2))*log(cot(a + b*x) + S(1) + sqrt(S(2))*sqrt(cos(a + b*x))/sqrt(sin(a + b*x)))/(S(4)*b) - S(2)*cos(a + b*x)**(S(3)/2)/(S(3)*b*sin(a + b*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**(S(7)/2)/sin(a + b*x)**(S(7)/2), x), x, -sqrt(S(2))*ArcTan(-sqrt(S(2))*sqrt(sin(a + b*x))/sqrt(cos(a + b*x)) + S(1))/(S(2)*b) + sqrt(S(2))*ArcTan(sqrt(S(2))*sqrt(sin(a + b*x))/sqrt(cos(a + b*x)) + S(1))/(S(2)*b) + sqrt(S(2))*log(-sqrt(S(2))*sqrt(sin(a + b*x))/sqrt(cos(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b) - sqrt(S(2))*log(sqrt(S(2))*sqrt(sin(a + b*x))/sqrt(cos(a + b*x)) + tan(a + b*x) + S(1))/(S(4)*b) + S(2)*sqrt(cos(a + b*x))/(b*sqrt(sin(a + b*x))) - S(2)*cos(a + b*x)**(S(5)/2)/(S(5)*b*sin(a + b*x)**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(1)/3)*cos(e + f*x)**S(4), x), x, S(3)*(b*sin(e + f*x))**(S(4)/3)*Hypergeometric2F1(S(-3)/2, S(2)/3, S(5)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(4)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(1)/3)*cos(e + f*x)**S(2), x), x, S(3)*(b*sin(e + f*x))**(S(4)/3)*Hypergeometric2F1(S(-1)/2, S(2)/3, S(5)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(4)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(1)/3), x), x, S(3)*(b*sin(e + f*x))**(S(4)/3)*Hypergeometric2F1(S(1)/2, S(2)/3, S(5)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(4)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(1)/3)*sec(e + f*x)**S(2), x), x, S(3)*(b*sin(e + f*x))**(S(4)/3)*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(2)/3, S(3)/2, S(5)/3, sin(e + f*x)**S(2))*sec(e + f*x)/(S(4)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(1)/3)*sec(e + f*x)**S(4), x), x, S(3)*(b*sin(e + f*x))**(S(4)/3)*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(2)/3, S(5)/2, S(5)/3, sin(e + f*x)**S(2))*sec(e + f*x)/(S(4)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(5)/3)*cos(e + f*x)**S(4), x), x, S(3)*(b*sin(e + f*x))**(S(8)/3)*Hypergeometric2F1(S(-3)/2, S(4)/3, S(7)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(8)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(5)/3)*cos(e + f*x)**S(2), x), x, S(3)*(b*sin(e + f*x))**(S(8)/3)*Hypergeometric2F1(S(-1)/2, S(4)/3, S(7)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(8)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(5)/3), x), x, S(3)*(b*sin(e + f*x))**(S(8)/3)*Hypergeometric2F1(S(1)/2, S(4)/3, S(7)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(8)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(5)/3)*sec(e + f*x)**S(2), x), x, S(3)*(b*sin(e + f*x))**(S(8)/3)*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(4)/3, S(3)/2, S(7)/3, sin(e + f*x)**S(2))*sec(e + f*x)/(S(8)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(5)/3)*sec(e + f*x)**S(4), x), x, S(3)*(b*sin(e + f*x))**(S(8)/3)*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(4)/3, S(5)/2, S(7)/3, sin(e + f*x)**S(2))*sec(e + f*x)/(S(8)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(e + f*x)**S(4)/(b*sin(e + f*x))**(S(1)/3), x), x, S(3)*(b*sin(e + f*x))**(S(2)/3)*Hypergeometric2F1(S(-3)/2, S(1)/3, S(4)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(2)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(e + f*x)**S(2)/(b*sin(e + f*x))**(S(1)/3), x), x, S(3)*(b*sin(e + f*x))**(S(2)/3)*Hypergeometric2F1(S(-1)/2, S(1)/3, S(4)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(2)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(-1)/3), x), x, S(3)*(b*sin(e + f*x))**(S(2)/3)*Hypergeometric2F1(S(1)/3, S(1)/2, S(4)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(2)*b*f*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(e + f*x)**S(2)/(b*sin(e + f*x))**(S(1)/3), x), x, S(3)*(b*sin(e + f*x))**(S(2)/3)*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(1)/3, S(3)/2, S(4)/3, sin(e + f*x)**S(2))*sec(e + f*x)/(S(2)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(e + f*x)**S(4)/(b*sin(e + f*x))**(S(1)/3), x), x, S(3)*(b*sin(e + f*x))**(S(2)/3)*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(1)/3, S(5)/2, S(4)/3, sin(e + f*x)**S(2))*sec(e + f*x)/(S(2)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(e + f*x)**S(4)/(b*sin(e + f*x))**(S(5)/3), x), x, -S(3)*Hypergeometric2F1(S(-3)/2, S(-1)/3, S(2)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(2)*b*f*(b*sin(e + f*x))**(S(2)/3)*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(e + f*x)**S(2)/(b*sin(e + f*x))**(S(5)/3), x), x, -S(3)*Hypergeometric2F1(S(-1)/2, S(-1)/3, S(2)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(2)*b*f*(b*sin(e + f*x))**(S(2)/3)*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**(S(-5)/3), x), x, -S(3)*Hypergeometric2F1(S(-1)/3, S(1)/2, S(2)/3, sin(e + f*x)**S(2))*cos(e + f*x)/(S(2)*b*f*(b*sin(e + f*x))**(S(2)/3)*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(e + f*x)**S(2)/(b*sin(e + f*x))**(S(5)/3), x), x, -S(3)*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(-1)/3, S(3)/2, S(2)/3, sin(e + f*x)**S(2))*sec(e + f*x)/(S(2)*b*f*(b*sin(e + f*x))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sec(e + f*x)**S(4)/(b*sin(e + f*x))**(S(5)/3), x), x, -S(3)*sqrt(cos(e + f*x)**S(2))*Hypergeometric2F1(S(-1)/3, S(5)/2, S(2)/3, sin(e + f*x)**S(2))*sec(e + f*x)/(S(2)*b*f*(b*sin(e + f*x))**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3), x), x, -sqrt(S(3))*ArcTan(sqrt(S(3))*(-S(2)*sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/S(3))/(S(2)*b) - log(sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/(S(2)*b) + log(sin(a + b*x)**(S(4)/3)/cos(a + b*x)**(S(4)/3) - sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3), x), x, ArcTan(sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3))/b - ArcTan(-S(2)*sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3) + sqrt(S(3)))/(S(2)*b) + ArcTan(S(2)*sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3) + sqrt(S(3)))/(S(2)*b) + sqrt(S(3))*log(sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) - sqrt(S(3))*sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3) + S(1))/(S(4)*b) - sqrt(S(3))*log(sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + sqrt(S(3))*sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3) + S(1))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(4)/3)/cos(a + b*x)**(S(4)/3), x), x, ArcTan(cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3))/b - ArcTan(sqrt(S(3)) - S(2)*cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3))/(S(2)*b) + ArcTan(sqrt(S(3)) + S(2)*cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3))/(S(2)*b) + sqrt(S(3))*log(S(1) - sqrt(S(3))*cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3) + cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/(S(4)*b) - sqrt(S(3))*log(S(1) + sqrt(S(3))*cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3) + cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/(S(4)*b) + S(3)*sin(a + b*x)**(S(1)/3)/(b*cos(a + b*x)**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(5)/3)/cos(a + b*x)**(S(5)/3), x), x, -sqrt(S(3))*ArcTan(sqrt(S(3))*(S(1) - S(2)*cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/S(3))/(S(2)*b) - log(S(1) + cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/(S(2)*b) + log(S(1) - cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3) + cos(a + b*x)**(S(4)/3)/sin(a + b*x)**(S(4)/3))/(S(4)*b) + S(3)*sin(a + b*x)**(S(2)/3)/(S(2)*b*cos(a + b*x)**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(a + b*x)**(S(7)/3)/cos(a + b*x)**(S(7)/3), x), x, sqrt(S(3))*ArcTan(sqrt(S(3))*(-S(2)*sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/S(3))/(S(2)*b) + log(sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/(S(2)*b) - log(sin(a + b*x)**(S(4)/3)/cos(a + b*x)**(S(4)/3) - sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/(S(4)*b) + S(3)*sin(a + b*x)**(S(4)/3)/(S(4)*b*cos(a + b*x)**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3), x), x, sqrt(S(3))*ArcTan(sqrt(S(3))*(S(1) - S(2)*cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/S(3))/(S(2)*b) + log(S(1) + cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/(S(2)*b) - log(S(1) - cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3) + cos(a + b*x)**(S(4)/3)/sin(a + b*x)**(S(4)/3))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3), x), x, -ArcTan(cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3))/b + ArcTan(sqrt(S(3)) - S(2)*cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3))/(S(2)*b) - ArcTan(sqrt(S(3)) + S(2)*cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3))/(S(2)*b) - sqrt(S(3))*log(S(1) - sqrt(S(3))*cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3) + cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/(S(4)*b) + sqrt(S(3))*log(S(1) + sqrt(S(3))*cos(a + b*x)**(S(1)/3)/sin(a + b*x)**(S(1)/3) + cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/(S(4)*b), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**(S(4)/3)/sin(a + b*x)**(S(4)/3), x), x, -ArcTan(sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3))/b + ArcTan(-S(2)*sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3) + sqrt(S(3)))/(S(2)*b) - ArcTan(S(2)*sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3) + sqrt(S(3)))/(S(2)*b) - sqrt(S(3))*log(sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) - sqrt(S(3))*sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3) + S(1))/(S(4)*b) + sqrt(S(3))*log(sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + sqrt(S(3))*sin(a + b*x)**(S(1)/3)/cos(a + b*x)**(S(1)/3) + S(1))/(S(4)*b) - S(3)*cos(a + b*x)**(S(1)/3)/(b*sin(a + b*x)**(S(1)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**(S(5)/3)/sin(a + b*x)**(S(5)/3), x), x, sqrt(S(3))*ArcTan(sqrt(S(3))*(-S(2)*sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/S(3))/(S(2)*b) + log(sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/(S(2)*b) - log(sin(a + b*x)**(S(4)/3)/cos(a + b*x)**(S(4)/3) - sin(a + b*x)**(S(2)/3)/cos(a + b*x)**(S(2)/3) + S(1))/(S(4)*b) - S(3)*cos(a + b*x)**(S(2)/3)/(S(2)*b*sin(a + b*x)**(S(2)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(a + b*x)**(S(7)/3)/sin(a + b*x)**(S(7)/3), x), x, -sqrt(S(3))*ArcTan(sqrt(S(3))*(S(1) - S(2)*cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/S(3))/(S(2)*b) - log(S(1) + cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3))/(S(2)*b) + log(S(1) - cos(a + b*x)**(S(2)/3)/sin(a + b*x)**(S(2)/3) + cos(a + b*x)**(S(4)/3)/sin(a + b*x)**(S(4)/3))/(S(4)*b) - S(3)*cos(a + b*x)**(S(4)/3)/(S(4)*b*sin(a + b*x)**(S(4)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(cos(x)**(S(2)/3)/sin(x)**(S(8)/3), x), x, -S(3)*cos(x)**(S(5)/3)/(S(5)*sin(x)**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(x)**(S(2)/3)/cos(x)**(S(8)/3), x), x, S(3)*sin(x)**(S(5)/3)/(S(5)*cos(x)**(S(5)/3)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**m*cos(e + f*x)**n, x), x, (cos(e + f*x)**S(2))**(-n/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(e + f*x)**S(2))*sin(e + f*x)**(m + S(1))*cos(e + f*x)**(n + S(-1))/(f*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(e + f*x))**n*sin(e + f*x)**m, x), x, -(d*cos(e + f*x))**(n + S(1))*(sin(e + f*x)**S(2))**(-m/S(2) + S(1)/2)*Hypergeometric2F1(-m/S(2) + S(1)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(e + f*x)**S(2))*sin(e + f*x)**(m + S(-1))/(d*f*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*cos(e + f*x)**n, x), x, (b*sin(e + f*x))**(m + S(1))*(cos(e + f*x)**S(2))**(-n/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(e + f*x)**S(2))*cos(e + f*x)**(n + S(-1))/(b*f*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sin(e + f*x))**m*(d*cos(e + f*x))**n, x), x, d*(b*sin(e + f*x))**(m + S(1))*(d*cos(e + f*x))**(n + S(-1))*(cos(e + f*x)**S(2))**(-n/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, -n/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(e + f*x)**S(2))/(b*f*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*cos(a + b*x)**S(5), x), x, (c*sin(a + b*x))**(m + S(1))/(b*c*(m + S(1))) - S(2)*(c*sin(a + b*x))**(m + S(3))/(b*c**S(3)*(m + S(3))) + (c*sin(a + b*x))**(m + S(5))/(b*c**S(5)*(m + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*cos(a + b*x)**S(3), x), x, (c*sin(a + b*x))**(m + S(1))/(b*c*(m + S(1))) - (c*sin(a + b*x))**(m + S(3))/(b*c**S(3)*(m + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*cos(a + b*x), x), x, (c*sin(a + b*x))**(m + S(1))/(b*c*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*sec(a + b*x), x), x, (c*sin(a + b*x))**(m + S(1))*Hypergeometric2F1(S(1), m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*sec(a + b*x)**S(3), x), x, (c*sin(a + b*x))**(m + S(1))*Hypergeometric2F1(S(2), m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*cos(a + b*x)**S(4), x), x, (c*sin(a + b*x))**(m + S(1))*Hypergeometric2F1(S(-3)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))*cos(a + b*x)/(b*c*(m + S(1))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*cos(a + b*x)**S(2), x), x, (c*sin(a + b*x))**(m + S(1))*Hypergeometric2F1(S(-1)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))*cos(a + b*x)/(b*c*(m + S(1))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m, x), x, (c*sin(a + b*x))**(m + S(1))*Hypergeometric2F1(S(1)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))*cos(a + b*x)/(b*c*(m + S(1))*sqrt(cos(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*sec(a + b*x)**S(2), x), x, (c*sin(a + b*x))**(m + S(1))*sqrt(cos(a + b*x)**S(2))*Hypergeometric2F1(S(3)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))*sec(a + b*x)/(b*c*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*sec(a + b*x)**S(4), x), x, (c*sin(a + b*x))**(m + S(1))*sqrt(cos(a + b*x)**S(2))*Hypergeometric2F1(S(5)/2, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))*sec(a + b*x)/(b*c*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*(d*cos(a + b*x))**(S(3)/2), x), x, d*(c*sin(a + b*x))**(m + S(1))*sqrt(d*cos(a + b*x))*Hypergeometric2F1(S(-1)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*(m + S(1))*(cos(a + b*x)**S(2))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*sqrt(d*cos(a + b*x)), x), x, d*(c*sin(a + b*x))**(m + S(1))*(cos(a + b*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(1)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*sqrt(d*cos(a + b*x))*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m/sqrt(d*cos(a + b*x)), x), x, d*(c*sin(a + b*x))**(m + S(1))*(cos(a + b*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(3)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*(d*cos(a + b*x))**(S(3)/2)*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m/(d*cos(a + b*x))**(S(3)/2), x), x, (c*sin(a + b*x))**(m + S(1))*(cos(a + b*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*d*sqrt(d*cos(a + b*x))*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m/(d*cos(a + b*x))**(S(5)/2), x), x, (c*sin(a + b*x))**(m + S(1))*(cos(a + b*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(7)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*d*(d*cos(a + b*x))**(S(3)/2)*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*sin(a + b*x)**S(5), x), x, -(d*cos(a + b*x))**(n + S(1))/(b*d*(n + S(1))) + S(2)*(d*cos(a + b*x))**(n + S(3))/(b*d**S(3)*(n + S(3))) - (d*cos(a + b*x))**(n + S(5))/(b*d**S(5)*(n + S(5))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*sin(a + b*x)**S(3), x), x, -(d*cos(a + b*x))**(n + S(1))/(b*d*(n + S(1))) + (d*cos(a + b*x))**(n + S(3))/(b*d**S(3)*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*sin(a + b*x), x), x, -(d*cos(a + b*x))**(n + S(1))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*csc(a + b*x), x), x, -(d*cos(a + b*x))**(n + S(1))*Hypergeometric2F1(S(1), n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*csc(a + b*x)**S(3), x), x, -(d*cos(a + b*x))**(n + S(1))*Hypergeometric2F1(S(2), n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*csc(a + b*x)**S(5), x), x, -(d*cos(a + b*x))**(n + S(1))*Hypergeometric2F1(S(3), n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*sin(a + b*x)**S(4), x), x, -(d*cos(a + b*x))**(n + S(1))*Hypergeometric2F1(S(-3)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)/(b*d*(n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*sin(a + b*x)**S(2), x), x, -(d*cos(a + b*x))**(n + S(1))*Hypergeometric2F1(S(-1)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)/(b*d*(n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n, x), x, -(d*cos(a + b*x))**(n + S(1))*Hypergeometric2F1(S(1)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))*sin(a + b*x)/(b*d*(n + S(1))*sqrt(sin(a + b*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*csc(a + b*x)**S(2), x), x, -(d*cos(a + b*x))**(n + S(1))*sqrt(sin(a + b*x)**S(2))*Hypergeometric2F1(S(3)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))*csc(a + b*x)/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n*csc(a + b*x)**S(4), x), x, -(d*cos(a + b*x))**(n + S(1))*sqrt(sin(a + b*x)**S(2))*Hypergeometric2F1(S(5)/2, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))*csc(a + b*x)/(b*d*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(5)/2)*(d*cos(a + b*x))**n, x), x, -c*(c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**(n + S(1))*Hypergeometric2F1(S(-3)/4, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))/(b*d*(n + S(1))*(sin(a + b*x)**S(2))**(S(3)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**(S(3)/2)*(d*cos(a + b*x))**n, x), x, -c*sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**(n + S(1))*Hypergeometric2F1(S(-1)/4, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))/(b*d*(n + S(1))*(sin(a + b*x)**S(2))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(c*sin(a + b*x))*(d*cos(a + b*x))**n, x), x, -c*(d*cos(a + b*x))**(n + S(1))*(sin(a + b*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(1)/4, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))/(b*d*sqrt(c*sin(a + b*x))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n/sqrt(c*sin(a + b*x)), x), x, -c*(d*cos(a + b*x))**(n + S(1))*(sin(a + b*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(3)/4, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))/(b*d*(c*sin(a + b*x))**(S(3)/2)*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*cos(a + b*x))**n/(c*sin(a + b*x))**(S(3)/2), x), x, -(d*cos(a + b*x))**(n + S(1))*(sin(a + b*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/4, n/S(2) + S(1)/2, n/S(2) + S(3)/2, cos(a + b*x)**S(2))/(b*c*d*sqrt(c*sin(a + b*x))*(n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*sin(e + f*x)**S(7), x), x, S(2)*b**S(7)/(S(13)*f*(b*sec(e + f*x))**(S(13)/2)) - S(2)*b**S(5)/(S(3)*f*(b*sec(e + f*x))**(S(9)/2)) + S(6)*b**S(3)/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)) - S(2)*b/(f*sqrt(b*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*sin(e + f*x)**S(5), x), x, -S(2)*b**S(5)/(S(9)*f*(b*sec(e + f*x))**(S(9)/2)) + S(4)*b**S(3)/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)) - S(2)*b/(f*sqrt(b*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*sin(e + f*x)**S(3), x), x, S(2)*b**S(3)/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)) - S(2)*b/(f*sqrt(b*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*sin(e + f*x), x), x, -S(2)*b/(f*sqrt(b*sec(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*csc(e + f*x), x), x, sqrt(b)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/f - sqrt(b)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*csc(e + f*x)**S(3), x), x, S(3)*sqrt(b)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*f) - S(3)*sqrt(b)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*f) - (b*sec(e + f*x))**(S(3)/2)*cot(e + f*x)**S(2)/(S(2)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*csc(e + f*x)**S(5), x), x, S(21)*sqrt(b)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*f) - S(21)*sqrt(b)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*f) - S(7)*(b*sec(e + f*x))**(S(3)/2)*cot(e + f*x)**S(2)/(S(16)*b*f) - (b*sec(e + f*x))**(S(7)/2)*cot(e + f*x)**S(4)/(S(4)*b**S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*sin(e + f*x)**S(6), x), x, -S(2)*b*sin(e + f*x)**S(5)/(S(11)*f*sqrt(b*sec(e + f*x))) - S(20)*b*sin(e + f*x)**S(3)/(S(77)*f*sqrt(b*sec(e + f*x))) - S(40)*b*sin(e + f*x)/(S(77)*f*sqrt(b*sec(e + f*x))) + S(80)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(77)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*sin(e + f*x)**S(4), x), x, -S(2)*b*sin(e + f*x)**S(3)/(S(7)*f*sqrt(b*sec(e + f*x))) - S(4)*b*sin(e + f*x)/(S(7)*f*sqrt(b*sec(e + f*x))) + S(8)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(7)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*sin(e + f*x)**S(2), x), x, -S(2)*b*sin(e + f*x)/(S(3)*f*sqrt(b*sec(e + f*x))) + S(4)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x)), x), x, S(2)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*csc(e + f*x)**S(2), x), x, -b*csc(e + f*x)/(f*sqrt(b*sec(e + f*x))) + sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*csc(e + f*x)**S(4), x), x, -b*csc(e + f*x)**S(3)/(S(3)*f*sqrt(b*sec(e + f*x))) - S(5)*b*csc(e + f*x)/(S(6)*f*sqrt(b*sec(e + f*x))) + S(5)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(6)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(b*sec(e + f*x))*csc(e + f*x)**S(6), x), x, -b*csc(e + f*x)**S(5)/(S(5)*f*sqrt(b*sec(e + f*x))) - S(3)*b*csc(e + f*x)**S(3)/(S(10)*f*sqrt(b*sec(e + f*x))) - S(3)*b*csc(e + f*x)/(S(4)*f*sqrt(b*sec(e + f*x))) + S(3)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(4)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**S(7), x), x, S(2)*b**S(7)/(S(11)*f*(b*sec(e + f*x))**(S(11)/2)) - S(6)*b**S(5)/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)) + S(2)*b**S(3)/(f*(b*sec(e + f*x))**(S(3)/2)) + S(2)*b*sqrt(b*sec(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**S(5), x), x, -S(2)*b**S(5)/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)) + S(4)*b**S(3)/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)) + S(2)*b*sqrt(b*sec(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**S(3), x), x, S(2)*b**S(3)/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)) + S(2)*b*sqrt(b*sec(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*sin(e + f*x), x), x, S(2)*b*sqrt(b*sec(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*csc(e + f*x), x), x, -b**(S(3)/2)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/f - b**(S(3)/2)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/f + S(2)*b*sqrt(b*sec(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*csc(e + f*x)**S(3), x), x, -S(5)*b**(S(3)/2)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*f) - S(5)*b**(S(3)/2)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*f) + S(5)*b*sqrt(b*sec(e + f*x))/(S(2)*f) - (b*sec(e + f*x))**(S(5)/2)*cot(e + f*x)**S(2)/(S(2)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**S(6), x), x, S(20)*b**S(3)*sin(e + f*x)**S(3)/(S(9)*f*(b*sec(e + f*x))**(S(3)/2)) + S(8)*b**S(3)*sin(e + f*x)/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)) - S(16)*b**S(2)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(3)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))) + S(2)*b*sqrt(b*sec(e + f*x))*sin(e + f*x)**S(5)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**S(4), x), x, S(12)*b**S(3)*sin(e + f*x)/(S(5)*f*(b*sec(e + f*x))**(S(3)/2)) - S(24)*b**S(2)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(5)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))) + S(2)*b*sqrt(b*sec(e + f*x))*sin(e + f*x)**S(3)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**S(2), x), x, -S(4)*b**S(2)*EllipticE(e/S(2) + f*x/S(2), S(2))/(f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))) + S(2)*b*sqrt(b*sec(e + f*x))*sin(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2), x), x, -S(2)*b**S(2)*EllipticE(e/S(2) + f*x/S(2), S(2))/(f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))) + S(2)*b*sqrt(b*sec(e + f*x))*sin(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*csc(e + f*x)**S(2), x), x, -S(3)*b**S(2)*EllipticE(e/S(2) + f*x/S(2), S(2))/(f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))) + S(3)*b*sqrt(b*sec(e + f*x))*sin(e + f*x)/f - b*sqrt(b*sec(e + f*x))*csc(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(3)/2)*csc(e + f*x)**S(4), x), x, -S(7)*b**S(2)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(2)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))) + S(7)*b*sqrt(b*sec(e + f*x))*sin(e + f*x)/(S(2)*f) - b*sqrt(b*sec(e + f*x))*csc(e + f*x)**S(3)/(S(3)*f) - S(7)*b*sqrt(b*sec(e + f*x))*csc(e + f*x)/(S(6)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*sin(e + f*x)**S(7), x), x, S(2)*b**S(7)/(S(9)*f*(b*sec(e + f*x))**(S(9)/2)) - S(6)*b**S(5)/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)) + S(6)*b**S(3)/(f*sqrt(b*sec(e + f*x))) + S(2)*b*(b*sec(e + f*x))**(S(3)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*sin(e + f*x)**S(5), x), x, -S(2)*b**S(5)/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)) + S(4)*b**S(3)/(f*sqrt(b*sec(e + f*x))) + S(2)*b*(b*sec(e + f*x))**(S(3)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*sin(e + f*x)**S(3), x), x, S(2)*b**S(3)/(f*sqrt(b*sec(e + f*x))) + S(2)*b*(b*sec(e + f*x))**(S(3)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*sin(e + f*x), x), x, S(2)*b*(b*sec(e + f*x))**(S(3)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*csc(e + f*x), x), x, b**(S(5)/2)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/f - b**(S(5)/2)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/f + S(2)*b*(b*sec(e + f*x))**(S(3)/2)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*csc(e + f*x)**S(3), x), x, S(7)*b**(S(5)/2)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*f) - S(7)*b**(S(5)/2)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*f) + S(7)*b*(b*sec(e + f*x))**(S(3)/2)/(S(6)*f) - (b*sec(e + f*x))**(S(7)/2)*cot(e + f*x)**S(2)/(S(2)*b*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*csc(e + f*x)**S(5), x), x, S(77)*b**(S(5)/2)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*f) - S(77)*b**(S(5)/2)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*f) + S(77)*b*(b*sec(e + f*x))**(S(3)/2)/(S(48)*f) - S(11)*(b*sec(e + f*x))**(S(7)/2)*cot(e + f*x)**S(2)/(S(16)*b*f) - (b*sec(e + f*x))**(S(11)/2)*cot(e + f*x)**S(4)/(S(4)*b**S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*sin(e + f*x)**S(6), x), x, S(20)*b**S(3)*sin(e + f*x)**S(3)/(S(21)*f*sqrt(b*sec(e + f*x))) + S(40)*b**S(3)*sin(e + f*x)/(S(21)*f*sqrt(b*sec(e + f*x))) - S(80)*b**S(2)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(21)*f) + S(2)*b*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**S(5)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*sin(e + f*x)**S(4), x), x, S(4)*b**S(3)*sin(e + f*x)/(S(3)*f*sqrt(b*sec(e + f*x))) - S(8)*b**S(2)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(3)*f) + S(2)*b*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**S(3)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*sin(e + f*x)**S(2), x), x, -S(4)*b**S(2)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(3)*f) + S(2)*b*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2), x), x, S(2)*b**S(2)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(3)*f) + S(2)*b*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*csc(e + f*x)**S(2), x), x, S(5)*b**S(2)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(3)*f) + S(5)*b*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)/(S(3)*f) - b*(b*sec(e + f*x))**(S(3)/2)*csc(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(5)/2)*csc(e + f*x)**S(4), x), x, S(5)*b**S(2)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(2)*f) + S(5)*b*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)/(S(2)*f) - b*(b*sec(e + f*x))**(S(3)/2)*csc(e + f*x)**S(3)/(S(3)*f) - S(3)*b*(b*sec(e + f*x))**(S(3)/2)*csc(e + f*x)/(S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(7)/sqrt(b*sec(e + f*x)), x), x, S(2)*b**S(7)/(S(15)*f*(b*sec(e + f*x))**(S(15)/2)) - S(6)*b**S(5)/(S(11)*f*(b*sec(e + f*x))**(S(11)/2)) + S(6)*b**S(3)/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)) - S(2)*b/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(5)/sqrt(b*sec(e + f*x)), x), x, -S(2)*b**S(5)/(S(11)*f*(b*sec(e + f*x))**(S(11)/2)) + S(4)*b**S(3)/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)) - S(2)*b/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(3)/sqrt(b*sec(e + f*x)), x), x, S(2)*b**S(3)/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)) - S(2)*b/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)/sqrt(b*sec(e + f*x)), x), x, -S(2)*b/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)/sqrt(b*sec(e + f*x)), x), x, -ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(sqrt(b)*f) - atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(sqrt(b)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(3)/sqrt(b*sec(e + f*x)), x), x, -sqrt(b*sec(e + f*x))*cot(e + f*x)**S(2)/(S(2)*b*f) - ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*sqrt(b)*f) - atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*sqrt(b)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(5)/sqrt(b*sec(e + f*x)), x), x, -S(5)*sqrt(b*sec(e + f*x))*cot(e + f*x)**S(2)/(S(16)*b*f) - (b*sec(e + f*x))**(S(5)/2)*cot(e + f*x)**S(4)/(S(4)*b**S(3)*f) - S(5)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*sqrt(b)*f) - S(5)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*sqrt(b)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(6)/sqrt(b*sec(e + f*x)), x), x, -S(2)*b*sin(e + f*x)**S(5)/(S(13)*f*(b*sec(e + f*x))**(S(3)/2)) - S(20)*b*sin(e + f*x)**S(3)/(S(117)*f*(b*sec(e + f*x))**(S(3)/2)) - S(8)*b*sin(e + f*x)/(S(39)*f*(b*sec(e + f*x))**(S(3)/2)) + S(16)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(39)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(4)/sqrt(b*sec(e + f*x)), x), x, -S(2)*b*sin(e + f*x)**S(3)/(S(9)*f*(b*sec(e + f*x))**(S(3)/2)) - S(4)*b*sin(e + f*x)/(S(15)*f*(b*sec(e + f*x))**(S(3)/2)) + S(8)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(15)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(2)/sqrt(b*sec(e + f*x)), x), x, -S(2)*b*sin(e + f*x)/(S(5)*f*(b*sec(e + f*x))**(S(3)/2)) + S(4)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(5)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(b*sec(e + f*x)), x), x, S(2)*EllipticE(e/S(2) + f*x/S(2), S(2))/(f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(2)/sqrt(b*sec(e + f*x)), x), x, -b*csc(e + f*x)/(f*(b*sec(e + f*x))**(S(3)/2)) - EllipticE(e/S(2) + f*x/S(2), S(2))/(f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(4)/sqrt(b*sec(e + f*x)), x), x, -b*csc(e + f*x)**S(3)/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)) - b*csc(e + f*x)/(S(2)*f*(b*sec(e + f*x))**(S(3)/2)) - EllipticE(e/S(2) + f*x/S(2), S(2))/(S(2)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(6)/sqrt(b*sec(e + f*x)), x), x, -b*csc(e + f*x)**S(5)/(S(5)*f*(b*sec(e + f*x))**(S(3)/2)) - S(7)*b*csc(e + f*x)**S(3)/(S(30)*f*(b*sec(e + f*x))**(S(3)/2)) - S(7)*b*csc(e + f*x)/(S(20)*f*(b*sec(e + f*x))**(S(3)/2)) - S(7)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(20)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(7)/(b*sec(e + f*x))**(S(3)/2), x), x, S(2)*b**S(7)/(S(17)*f*(b*sec(e + f*x))**(S(17)/2)) - S(6)*b**S(5)/(S(13)*f*(b*sec(e + f*x))**(S(13)/2)) + S(2)*b**S(3)/(S(3)*f*(b*sec(e + f*x))**(S(9)/2)) - S(2)*b/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(5)/(b*sec(e + f*x))**(S(3)/2), x), x, -S(2)*b**S(5)/(S(13)*f*(b*sec(e + f*x))**(S(13)/2)) + S(4)*b**S(3)/(S(9)*f*(b*sec(e + f*x))**(S(9)/2)) - S(2)*b/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(3)/(b*sec(e + f*x))**(S(3)/2), x), x, S(2)*b**S(3)/(S(9)*f*(b*sec(e + f*x))**(S(9)/2)) - S(2)*b/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)/(b*sec(e + f*x))**(S(3)/2), x), x, -S(2)*b/(S(5)*f*(b*sec(e + f*x))**(S(5)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)/(b*sec(e + f*x))**(S(3)/2), x), x, S(2)/(b*f*sqrt(b*sec(e + f*x))) + ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(b**(S(3)/2)*f) - atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(b**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(3)/(b*sec(e + f*x))**(S(3)/2), x), x, -(b*sec(e + f*x))**(S(3)/2)*cot(e + f*x)**S(2)/(S(2)*b**S(3)*f) - ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*b**(S(3)/2)*f) + atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*b**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(5)/(b*sec(e + f*x))**(S(3)/2), x), x, -(b*sec(e + f*x))**(S(3)/2)*cot(e + f*x)**S(4)/(S(4)*b**S(3)*f) - S(3)*(b*sec(e + f*x))**(S(3)/2)*cot(e + f*x)**S(2)/(S(16)*b**S(3)*f) - S(3)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*b**(S(3)/2)*f) + S(3)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*b**(S(3)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(4)/(b*sec(e + f*x))**(S(3)/2), x), x, -S(2)*b*sin(e + f*x)**S(3)/(S(11)*f*(b*sec(e + f*x))**(S(5)/2)) - S(12)*b*sin(e + f*x)/(S(77)*f*(b*sec(e + f*x))**(S(5)/2)) + S(8)*sin(e + f*x)/(S(77)*b*f*sqrt(b*sec(e + f*x))) + S(8)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(77)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(2)/(b*sec(e + f*x))**(S(3)/2), x), x, -S(2)*b*sin(e + f*x)/(S(7)*f*(b*sec(e + f*x))**(S(5)/2)) + S(4)*sin(e + f*x)/(S(21)*b*f*sqrt(b*sec(e + f*x))) + S(4)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(21)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(-3)/2), x), x, S(2)*sin(e + f*x)/(S(3)*b*f*sqrt(b*sec(e + f*x))) + S(2)*sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(3)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(2)/(b*sec(e + f*x))**(S(3)/2), x), x, -csc(e + f*x)/(b*f*sqrt(b*sec(e + f*x))) - sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(4)/(b*sec(e + f*x))**(S(3)/2), x), x, -csc(e + f*x)**S(3)/(S(3)*b*f*sqrt(b*sec(e + f*x))) + csc(e + f*x)/(S(6)*b*f*sqrt(b*sec(e + f*x))) - sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(6)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(6)/(b*sec(e + f*x))**(S(3)/2), x), x, -csc(e + f*x)**S(5)/(S(5)*b*f*sqrt(b*sec(e + f*x))) + csc(e + f*x)**S(3)/(S(30)*b*f*sqrt(b*sec(e + f*x))) + csc(e + f*x)/(S(12)*b*f*sqrt(b*sec(e + f*x))) - sqrt(b*sec(e + f*x))*EllipticF(e/S(2) + f*x/S(2), S(2))*sqrt(cos(e + f*x))/(S(12)*b**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(7)/(b*sec(e + f*x))**(S(5)/2), x), x, S(2)*b**S(7)/(S(19)*f*(b*sec(e + f*x))**(S(19)/2)) - S(2)*b**S(5)/(S(5)*f*(b*sec(e + f*x))**(S(15)/2)) + S(6)*b**S(3)/(S(11)*f*(b*sec(e + f*x))**(S(11)/2)) - S(2)*b/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(5)/(b*sec(e + f*x))**(S(5)/2), x), x, -S(2)*b**S(5)/(S(15)*f*(b*sec(e + f*x))**(S(15)/2)) + S(4)*b**S(3)/(S(11)*f*(b*sec(e + f*x))**(S(11)/2)) - S(2)*b/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(3)/(b*sec(e + f*x))**(S(5)/2), x), x, S(2)*b**S(3)/(S(11)*f*(b*sec(e + f*x))**(S(11)/2)) - S(2)*b/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)/(b*sec(e + f*x))**(S(5)/2), x), x, -S(2)*b/(S(7)*f*(b*sec(e + f*x))**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)/(b*sec(e + f*x))**(S(5)/2), x), x, S(2)/(S(3)*b*f*(b*sec(e + f*x))**(S(3)/2)) - ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(b**(S(5)/2)*f) - atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(b**(S(5)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(3)/(b*sec(e + f*x))**(S(5)/2), x), x, -sqrt(b*sec(e + f*x))*cot(e + f*x)**S(2)/(S(2)*b**S(3)*f) + S(3)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*b**(S(5)/2)*f) + S(3)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(4)*b**(S(5)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(5)/(b*sec(e + f*x))**(S(5)/2), x), x, -sqrt(b*sec(e + f*x))*cot(e + f*x)**S(4)/(S(4)*b**S(3)*f) - sqrt(b*sec(e + f*x))*cot(e + f*x)**S(2)/(S(16)*b**S(3)*f) + S(3)*ArcTan(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*b**(S(5)/2)*f) + S(3)*atanh(sqrt(b*sec(e + f*x))/sqrt(b))/(S(32)*b**(S(5)/2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(4)/(b*sec(e + f*x))**(S(5)/2), x), x, -S(2)*b*sin(e + f*x)**S(3)/(S(13)*f*(b*sec(e + f*x))**(S(7)/2)) - S(4)*b*sin(e + f*x)/(S(39)*f*(b*sec(e + f*x))**(S(7)/2)) + S(8)*sin(e + f*x)/(S(195)*b*f*(b*sec(e + f*x))**(S(3)/2)) + S(8)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(65)*b**S(2)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(2)/(b*sec(e + f*x))**(S(5)/2), x), x, -S(2)*b*sin(e + f*x)/(S(9)*f*(b*sec(e + f*x))**(S(7)/2)) + S(4)*sin(e + f*x)/(S(45)*b*f*(b*sec(e + f*x))**(S(3)/2)) + S(4)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(15)*b**S(2)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**(S(-5)/2), x), x, S(2)*sin(e + f*x)/(S(5)*b*f*(b*sec(e + f*x))**(S(3)/2)) + S(6)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(5)*b**S(2)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(2)/(b*sec(e + f*x))**(S(5)/2), x), x, -csc(e + f*x)/(b*f*(b*sec(e + f*x))**(S(3)/2)) - S(3)*EllipticE(e/S(2) + f*x/S(2), S(2))/(b**S(2)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(4)/(b*sec(e + f*x))**(S(5)/2), x), x, -csc(e + f*x)**S(3)/(S(3)*b*f*(b*sec(e + f*x))**(S(3)/2)) + csc(e + f*x)/(S(2)*b*f*(b*sec(e + f*x))**(S(3)/2)) + EllipticE(e/S(2) + f*x/S(2), S(2))/(S(2)*b**S(2)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(6)/(b*sec(e + f*x))**(S(5)/2), x), x, -csc(e + f*x)**S(5)/(S(5)*b*f*(b*sec(e + f*x))**(S(3)/2)) + csc(e + f*x)**S(3)/(S(10)*b*f*(b*sec(e + f*x))**(S(3)/2)) + S(3)*csc(e + f*x)/(S(20)*b*f*(b*sec(e + f*x))**(S(3)/2)) + S(3)*EllipticE(e/S(2) + f*x/S(2), S(2))/(S(20)*b**S(2)*f*sqrt(b*sec(e + f*x))*sqrt(cos(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**(S(9)/2)/sqrt(b*sec(e + f*x)), x), x, -b*sin(e + f*x)**(S(7)/2)/(S(5)*f*(b*sec(e + f*x))**(S(3)/2)) - S(7)*b*sin(e + f*x)**(S(3)/2)/(S(30)*f*(b*sec(e + f*x))**(S(3)/2)) + S(7)*sqrt(b*sec(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(e + f*x))*cos(e + f*x)/(S(20)*b*f*sqrt(sin(S(2)*e + S(2)*f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**(S(5)/2)/sqrt(b*sec(e + f*x)), x), x, -b*sin(e + f*x)**(S(3)/2)/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)) + sqrt(b*sec(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(e + f*x))*cos(e + f*x)/(S(2)*b*f*sqrt(sin(S(2)*e + S(2)*f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(sin(e + f*x))/sqrt(b*sec(e + f*x)), x), x, sqrt(b*sec(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(e + f*x))*cos(e + f*x)/(b*f*sqrt(sin(S(2)*e + S(2)*f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(e + f*x))*sin(e + f*x)**(S(3)/2)), x), x, -S(2)*b/(f*(b*sec(e + f*x))**(S(3)/2)*sqrt(sin(e + f*x))) - S(2)*sqrt(b*sec(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(e + f*x))*cos(e + f*x)/(b*f*sqrt(sin(S(2)*e + S(2)*f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(e + f*x))*sin(e + f*x)**(S(7)/2)), x), x, -S(4)*b/(S(5)*f*(b*sec(e + f*x))**(S(3)/2)*sqrt(sin(e + f*x))) - S(2)*b/(S(5)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(5)/2)) - S(4)*sqrt(b*sec(e + f*x))*EllipticE(-Pi/S(4) + e + f*x, S(2))*sqrt(sin(e + f*x))*cos(e + f*x)/(S(5)*b*f*sqrt(sin(S(2)*e + S(2)*f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**(S(3)/2)/sqrt(b*sec(e + f*x)), x), x, -b*sqrt(sin(e + f*x))/(S(2)*f*(b*sec(e + f*x))**(S(3)/2)) + sqrt(S(2))*sqrt(cos(e + f*x)/b)*sqrt(b*sec(e + f*x))*ArcTan(-sqrt(S(2))*sqrt(b)*sqrt(cos(e + f*x)/b)/sqrt(sin(e + f*x)) + S(1))/(S(8)*sqrt(b)*f) - sqrt(S(2))*sqrt(cos(e + f*x)/b)*sqrt(b*sec(e + f*x))*ArcTan(sqrt(S(2))*sqrt(b)*sqrt(cos(e + f*x)/b)/sqrt(sin(e + f*x)) + S(1))/(S(8)*sqrt(b)*f) - sqrt(S(2))*sqrt(cos(e + f*x)/b)*sqrt(b*sec(e + f*x))*log(-sqrt(S(2))*sqrt(b)*sqrt(cos(e + f*x)/b)/sqrt(sin(e + f*x)) + cot(e + f*x) + S(1))/(S(16)*sqrt(b)*f) + sqrt(S(2))*sqrt(cos(e + f*x)/b)*sqrt(b*sec(e + f*x))*log(sqrt(S(2))*sqrt(b)*sqrt(cos(e + f*x)/b)/sqrt(sin(e + f*x)) + cot(e + f*x) + S(1))/(S(16)*sqrt(b)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(e + f*x))*sqrt(sin(e + f*x))), x), x, sqrt(S(2))*sqrt(cos(e + f*x)/b)*sqrt(b*sec(e + f*x))*ArcTan(-sqrt(S(2))*sqrt(b)*sqrt(cos(e + f*x)/b)/sqrt(sin(e + f*x)) + S(1))/(S(2)*sqrt(b)*f) - sqrt(S(2))*sqrt(cos(e + f*x)/b)*sqrt(b*sec(e + f*x))*ArcTan(sqrt(S(2))*sqrt(b)*sqrt(cos(e + f*x)/b)/sqrt(sin(e + f*x)) + S(1))/(S(2)*sqrt(b)*f) - sqrt(S(2))*sqrt(cos(e + f*x)/b)*sqrt(b*sec(e + f*x))*log(-sqrt(S(2))*sqrt(b)*sqrt(cos(e + f*x)/b)/sqrt(sin(e + f*x)) + cot(e + f*x) + S(1))/(S(4)*sqrt(b)*f) + sqrt(S(2))*sqrt(cos(e + f*x)/b)*sqrt(b*sec(e + f*x))*log(sqrt(S(2))*sqrt(b)*sqrt(cos(e + f*x)/b)/sqrt(sin(e + f*x)) + cot(e + f*x) + S(1))/(S(4)*sqrt(b)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(e + f*x))*sin(e + f*x)**(S(5)/2)), x), x, -S(2)*b/(S(3)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(3)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(e + f*x))*sin(e + f*x)**(S(9)/2)), x), x, -S(8)*b/(S(21)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(3)/2)) - S(2)*b/(S(7)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(7)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(e + f*x))*sin(e + f*x)**(S(13)/2)), x), x, -S(64)*b/(S(231)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(3)/2)) - S(16)*b/(S(77)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(7)/2)) - S(2)*b/(S(11)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(11)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/(sqrt(b*sec(e + f*x))*sin(e + f*x)**(S(17)/2)), x), x, -S(256)*b/(S(1155)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(3)/2)) - S(64)*b/(S(385)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(7)/2)) - S(8)*b/(S(55)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(11)/2)) - S(2)*b/(S(15)*f*(b*sec(e + f*x))**(S(3)/2)*sin(e + f*x)**(S(15)/2)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*(d*sec(a + b*x))**(S(5)/2), x), x, d**S(2)*(c*sin(a + b*x))**(m + S(1))*sqrt(d*sec(a + b*x))*(cos(a + b*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(7)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))*sec(a + b*x)/(b*c*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*(d*sec(a + b*x))**(S(3)/2), x), x, d*(c*sin(a + b*x))**(m + S(1))*sqrt(d*sec(a + b*x))*(cos(a + b*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m*sqrt(d*sec(a + b*x)), x), x, (c*sin(a + b*x))**(m + S(1))*sqrt(d*sec(a + b*x))*(cos(a + b*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(3)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))*sec(a + b*x)/(b*c*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m/sqrt(d*sec(a + b*x)), x), x, (c*sin(a + b*x))**(m + S(1))*sqrt(d*sec(a + b*x))*(cos(a + b*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(1)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))/(b*c*d*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((c*sin(a + b*x))**m/(d*sec(a + b*x))**(S(3)/2), x), x, (c*sin(a + b*x))**(m + S(1))*sqrt(d*sec(a + b*x))*Hypergeometric2F1(S(-1)/4, m/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(a + b*x)**S(2))*cos(a + b*x)/(b*c*d**S(2)*(m + S(1))*(cos(a + b*x)**S(2))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**m*sec(e + f*x)**n, x), x, (cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, n/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(e + f*x)**S(2))*sin(e + f*x)**(m + S(1))*sec(e + f*x)**(n + S(1))/(f*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(e + f*x))**m*sec(e + f*x)**n, x), x, (a*sin(e + f*x))**(m + S(1))*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, n/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(e + f*x)**S(2))*sec(e + f*x)**(n + S(1))/(a*f*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*sin(e + f*x)**m, x), x, -b*(b*sec(e + f*x))**(n + S(-1))*(sin(e + f*x)**S(2))**(-m/S(2) + S(1)/2)*Hypergeometric2F1(-m/S(2) + S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(e + f*x)**S(2))*sin(e + f*x)**(m + S(-1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((b*sec(e + f*x))**n*sin(e + f*x)**m, x), x, -(b*sec(e + f*x))**n*(sin(e + f*x)**S(2))**(-m/S(2) + S(1)/2)*Hypergeometric2F1(-m/S(2) + S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(e + f*x)**S(2))*sin(e + f*x)**(m + S(-1))*cos(e + f*x)/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(e + f*x))**m*(b*sec(e + f*x))**n, x), x, (a*sin(e + f*x))**(m + S(1))*(b*sec(e + f*x))**(n + S(1))*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, n/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(e + f*x)**S(2))/(a*b*f*(m + S(1))), expand=True, _diff=True, _numerical=True) or rubi_test(rubi_integrate((a*sin(e + f*x))**m*(b*sec(e + f*x))**n, x), x, (a*sin(e + f*x))**(m + S(1))*(b*sec(e + f*x))**n*(cos(e + f*x)**S(2))**(n/S(2) + S(1)/2)*Hypergeometric2F1(m/S(2) + S(1)/2, n/S(2) + S(1)/2, m/S(2) + S(3)/2, sin(e + f*x)**S(2))*sec(e + f*x)/(a*f*(m + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*sin(e + f*x)**S(5), x), x, -b**S(5)*(b*sec(e + f*x))**(n + S(-5))/(f*(-n + S(5))) + S(2)*b**S(3)*(b*sec(e + f*x))**(n + S(-3))/(f*(-n + S(3))) - b*(b*sec(e + f*x))**(n + S(-1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*sin(e + f*x)**S(3), x), x, b**S(3)*(b*sec(e + f*x))**(n + S(-3))/(f*(-n + S(3))) - b*(b*sec(e + f*x))**(n + S(-1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*sin(e + f*x), x), x, -b*(b*sec(e + f*x))**(n + S(-1))/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*csc(e + f*x), x), x, -(b*sec(e + f*x))**(n + S(1))*Hypergeometric2F1(S(1), n/S(2) + S(1)/2, n/S(2) + S(3)/2, sec(e + f*x)**S(2))/(b*f*(n + S(1))), expand=True, _diff=True, _numerical=True) # long time assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*csc(e + f*x)**S(3), x), x, (b*sec(e + f*x))**(n + S(3))*Hypergeometric2F1(S(2), n/S(2) + S(3)/2, n/S(2) + S(5)/2, sec(e + f*x)**S(2))/(b**S(3)*f*(n + S(3))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*sin(e + f*x)**S(6), x), x, -(b*sec(e + f*x))**n*Hypergeometric2F1(S(-5)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(e + f*x)**S(2))*sin(e + f*x)*cos(e + f*x)/(f*(-n + S(1))*sqrt(sin(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*sin(e + f*x)**S(4), x), x, -(b*sec(e + f*x))**n*Hypergeometric2F1(S(-3)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(e + f*x)**S(2))*sin(e + f*x)*cos(e + f*x)/(f*(-n + S(1))*sqrt(sin(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*sin(e + f*x)**S(2), x), x, -(b*sec(e + f*x))**n*Hypergeometric2F1(S(-1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(e + f*x)**S(2))*sin(e + f*x)*cos(e + f*x)/(f*(-n + S(1))*sqrt(sin(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n, x), x, -b*(b*sec(e + f*x))**(n + S(-1))*Hypergeometric2F1(S(1)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(e + f*x)**S(2))*sin(e + f*x)/(f*(-n + S(1))*sqrt(sin(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*csc(e + f*x)**S(2), x), x, -(b*sec(e + f*x))**n*sqrt(sin(e + f*x)**S(2))*Hypergeometric2F1(S(3)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(e + f*x)**S(2))*cot(e + f*x)/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(e + f*x))**n*csc(e + f*x)**S(4), x), x, -(b*sec(e + f*x))**n*sqrt(sin(e + f*x)**S(2))*Hypergeometric2F1(S(5)/2, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(e + f*x)**S(2))*cot(e + f*x)/(f*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(a + b*x))**n*(c*sin(a + b*x))**(S(3)/2), x), x, -c*(b*sec(a + b*x))**n*sqrt(c*sin(a + b*x))*Hypergeometric2F1(S(-1)/4, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*cos(a + b*x)/(b*(-n + S(1))*(sin(a + b*x)**S(2))**(S(1)/4)), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(a + b*x))**n*sqrt(c*sin(a + b*x)), x), x, -c*(b*sec(a + b*x))**n*(sin(a + b*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(1)/4, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*cos(a + b*x)/(b*sqrt(c*sin(a + b*x))*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(a + b*x))**n/sqrt(c*sin(a + b*x)), x), x, -c*(b*sec(a + b*x))**n*(sin(a + b*x)**S(2))**(S(3)/4)*Hypergeometric2F1(S(3)/4, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*cos(a + b*x)/(b*(c*sin(a + b*x))**(S(3)/2)*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((b*sec(a + b*x))**n/(c*sin(a + b*x))**(S(3)/2), x), x, -(b*sec(a + b*x))**n*(sin(a + b*x)**S(2))**(S(1)/4)*Hypergeometric2F1(S(5)/4, -n/S(2) + S(1)/2, -n/S(2) + S(3)/2, cos(a + b*x)**S(2))*cos(a + b*x)/(b*c*sqrt(c*sin(a + b*x))*(-n + S(1))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(e + f*x))*sin(e + f*x)**S(4), x), x, -S(2)*d**S(3)*cos(e + f*x)/(S(7)*f*(d*csc(e + f*x))**(S(5)/2)) - S(10)*d*cos(e + f*x)/(S(21)*f*sqrt(d*csc(e + f*x))) + S(10)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(21)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(e + f*x))*sin(e + f*x)**S(3), x), x, -S(2)*d**S(2)*cos(e + f*x)/(S(5)*f*(d*csc(e + f*x))**(S(3)/2)) + S(6)*d*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(e + f*x))*sin(e + f*x)**S(2), x), x, -S(2)*d*cos(e + f*x)/(S(3)*f*sqrt(d*csc(e + f*x))) + S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(e + f*x))*sin(e + f*x), x), x, S(2)*d*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(e + f*x)), x), x, S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(e + f*x))*csc(e + f*x), x), x, -S(2)*d*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))) - S(2)*sqrt(d*csc(e + f*x))*cos(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(e + f*x))*csc(e + f*x)**S(2), x), x, S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*f) - S(2)*(d*csc(e + f*x))**(S(3)/2)*cos(e + f*x)/(S(3)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sqrt(d*csc(e + f*x))*csc(e + f*x)**S(3), x), x, -S(6)*d*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))) - S(6)*sqrt(d*csc(e + f*x))*cos(e + f*x)/(S(5)*f) - S(2)*(d*csc(e + f*x))**(S(5)/2)*cos(e + f*x)/(S(5)*d**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(3)/2)*sin(e + f*x)**S(5), x), x, -S(2)*d**S(4)*cos(e + f*x)/(S(7)*f*(d*csc(e + f*x))**(S(5)/2)) - S(10)*d**S(2)*cos(e + f*x)/(S(21)*f*sqrt(d*csc(e + f*x))) + S(10)*d*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(21)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(3)/2)*sin(e + f*x)**S(4), x), x, -S(2)*d**S(3)*cos(e + f*x)/(S(5)*f*(d*csc(e + f*x))**(S(3)/2)) + S(6)*d**S(2)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(3)/2)*sin(e + f*x)**S(3), x), x, -S(2)*d**S(2)*cos(e + f*x)/(S(3)*f*sqrt(d*csc(e + f*x))) + S(2)*d*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(3)/2)*sin(e + f*x)**S(2), x), x, S(2)*d**S(2)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(3)/2)*sin(e + f*x), x), x, S(2)*d*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(3)/2), x), x, -S(2)*d**S(2)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))) - S(2)*d*sqrt(d*csc(e + f*x))*cos(e + f*x)/f, expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(3)/2)*csc(e + f*x), x), x, S(2)*d*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*f) - S(2)*(d*csc(e + f*x))**(S(3)/2)*cos(e + f*x)/(S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(3)/2)*csc(e + f*x)**S(2), x), x, -S(6)*d**S(2)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))) - S(6)*d*sqrt(d*csc(e + f*x))*cos(e + f*x)/(S(5)*f) - S(2)*(d*csc(e + f*x))**(S(5)/2)*cos(e + f*x)/(S(5)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(3)/sqrt(d*csc(e + f*x)), x), x, -S(2)*d**S(2)*cos(e + f*x)/(S(7)*f*(d*csc(e + f*x))**(S(5)/2)) - S(10)*cos(e + f*x)/(S(21)*f*sqrt(d*csc(e + f*x))) + S(10)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(21)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(2)/sqrt(d*csc(e + f*x)), x), x, -S(2)*d*cos(e + f*x)/(S(5)*f*(d*csc(e + f*x))**(S(3)/2)) + S(6)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)/sqrt(d*csc(e + f*x)), x), x, -S(2)*cos(e + f*x)/(S(3)*f*sqrt(d*csc(e + f*x))) + S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(S(1)/sqrt(d*csc(e + f*x)), x), x, S(2)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)/sqrt(d*csc(e + f*x)), x), x, S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(2)/sqrt(d*csc(e + f*x)), x), x, -S(2)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))) - S(2)*sqrt(d*csc(e + f*x))*cos(e + f*x)/(d*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(3)/sqrt(d*csc(e + f*x)), x), x, S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*d*f) - S(2)*(d*csc(e + f*x))**(S(3)/2)*cos(e + f*x)/(S(3)*d**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)**S(2)/(d*csc(e + f*x))**(S(3)/2), x), x, -S(2)*d*cos(e + f*x)/(S(7)*f*(d*csc(e + f*x))**(S(5)/2)) - S(10)*cos(e + f*x)/(S(21)*d*f*sqrt(d*csc(e + f*x))) + S(10)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(21)*d**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(sin(e + f*x)/(d*csc(e + f*x))**(S(3)/2), x), x, -S(2)*cos(e + f*x)/(S(5)*f*(d*csc(e + f*x))**(S(3)/2)) + S(6)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*d*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((d*csc(e + f*x))**(S(-3)/2), x), x, -S(2)*cos(e + f*x)/(S(3)*d*f*sqrt(d*csc(e + f*x))) + S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*d**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)/(d*csc(e + f*x))**(S(3)/2), x), x, S(2)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(d*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(2)/(d*csc(e + f*x))**(S(3)/2), x), x, S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(d**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(3)/(d*csc(e + f*x))**(S(3)/2), x), x, -S(2)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(d*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))) - S(2)*sqrt(d*csc(e + f*x))*cos(e + f*x)/(d**S(2)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(4)/(d*csc(e + f*x))**(S(3)/2), x), x, S(2)*sqrt(d*csc(e + f*x))*EllipticF(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))*sqrt(sin(e + f*x))/(S(3)*d**S(2)*f) - S(2)*(d*csc(e + f*x))**(S(3)/2)*cos(e + f*x)/(S(3)*d**S(3)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate(csc(e + f*x)**S(5)/(d*csc(e + f*x))**(S(3)/2), x), x, -S(6)*EllipticE(-Pi/S(4) + e/S(2) + f*x/S(2), S(2))/(S(5)*d*f*sqrt(d*csc(e + f*x))*sqrt(sin(e + f*x))) - S(6)*sqrt(d*csc(e + f*x))*cos(e + f*x)/(S(5)*d**S(2)*f) - S(2)*(d*csc(e + f*x))**(S(5)/2)*cos(e + f*x)/(S(5)*d**S(4)*f), expand=True, _diff=True, _numerical=True) assert rubi_test(rubi_integrate((a*sin(e + f*x))**m*(b*csc(e + f*x))**n, x), x, (a*sin(e + f*x))**(m + S(1))*(b*csc(e + f*x))**n*Hypergeometric2F1(S(1)/2, m/S(2) - n/S(2) + S(1)/2, m/S(2) - n/S(2) + S(3)/2, sin(e + f*x)**S(2))*cos(e + f*x)/(a*f*(m - n + S(1))*sqrt(cos(e + f*x)**S(2))), expand=True, _diff=True, _numerical=True)
706a1f55f95463e1024a51d60495fba796af662826ae591c39cf081b178ceab2
import sys from sympy.external import import_module matchpy = import_module("matchpy") if not matchpy: #bin/test will not execute any tests now disabled = True if sys.version_info[:2] < (3, 6): disabled = True from sympy.integrals.rubi.parsetools.parse import (rubi_rule_parser, get_default_values, add_wildcards, parse_freeq, seperate_freeq, get_free_symbols, divide_constraint, generate_sympy_from_parsed, setWC, replaceWith, rubi_printer, set_matchq_in_constraint, contains_diff_return_type, process_return_type, extract_set) from sympy.core.symbol import (Symbol, symbols) from sympy.core.sympify import sympify from sympy.logic.boolalg import Not a, b, c, d, e, j, m, n, p, q, x, Pq, Pqq = symbols('a b c d e j m n p q x Pq Pqq') def test_rubi_rule_parser(): header = ''' from matchpy import Operation, CommutativeOperation rubi = ManyToOneReplacer() ''' fullform = 'List[RuleDelayed[HoldPattern[Int[Power[Pattern[x,Blank[]],Optional[Pattern[m,Blank[]]]],Pattern[x,Blank[Symbol]]]],Condition[Times[Power[x,Plus[m,1]],Power[Plus[m,1],-1]],NonzeroQ[Plus[m,1]]]]]' rules, constraint = rubi_rule_parser(fullform, header) result_rule = ''' from matchpy import Operation, CommutativeOperation rubi = ManyToOneReplacer() from sympy.integrals.rubi.constraints import cons1 pattern1 = Pattern(Integral(x_**WC('m', S(1)), x_), cons1) def replacement1(m, x): rubi.append(1) return x**(m + S(1))/(m + S(1)) rule1 = ReplacementRule(pattern1, replacement1) return [rule1, ] ''' result_constraint = ''' from matchpy import Operation, CommutativeOperation def cons_f1(m): return NonzeroQ(m + S(1)) cons1 = CustomConstraint(cons_f1) ''' assert len(result_rule.strip()) == len(rules.strip()) # failing randomly while using `result.strip() == rules` assert len(result_constraint.strip()) == len(constraint.strip()) def test_get_default_values(): s = ['Int', ['Power', ['Plus', ['Optional', ['Pattern', 'a', ['Blank']]], ['Times', ['Optional', ['Pattern', 'b', ['Blank']]], ['Pattern', 'x', ['Blank']]]], ['Pattern', 'm', ['Blank']]], ['Pattern', 'x', ['Blank', 'Symbol']]] assert get_default_values(s, {}) == {'a': 0, 'b': 1} s = ['Int', ['Power', ['Pattern', 'x', ['Blank']], ['Optional', ['Pattern', 'm', ['Blank']]]], ['Pattern', 'x', ['Blank', 'Symbol']]] assert get_default_values(s, {}) == {'m': 1} def test_add_wildcards(): s = 'Integral(Pow(Pattern(x, Blank), Optional(Pattern(m, Blank))), Pattern(x, Blank(Symbol)))' assert add_wildcards(s, {'m': 1}) == ("Integral(Pow(x_, WC('m', S(1))), x_)", ['m', 'x', 'x']) def test_seperate_freeq(): s = ['FreeQ', ['List', 'a', 'b'], 'x'] assert seperate_freeq(s) == (['a', 'b'], 'x') def test_parse_freeq(): l = ['a', 'b'] x = 'x' symbols = ['x', 'a', 'b'] assert parse_freeq(l, x, 0, {}, [], symbols) == (', cons1, cons2', '\n def cons_f1(a, x):\n return FreeQ(a, x)\n\n cons1 = CustomConstraint(cons_f1)\n\n def cons_f2(b, x):\n return FreeQ(b, x)\n\n cons2 = CustomConstraint(cons_f2)\n', 2) def test_get_free_symbols(): s = ['NonzeroQ', ['Plus', 'm', '1']] symbols = ['m', 'x'] assert get_free_symbols(s, symbols, []) == ['m'] def test_divide_constraint(): s = ['And', ['FreeQ', 'm', 'x'], ['NonzeroQ', ['Plus', 'm', '1']]] assert divide_constraint(s, ['m', 'x'], 0, {}, []) == (', cons1', '\n def cons_f1(m):\n return NonzeroQ(m + S(1))\n\n cons1 = CustomConstraint(cons_f1)\n', 1) def test_setWC(): assert setWC('Integral(x_**WC(m, S(1)), x_)') == "Integral(x_**WC('m', S(1)), x_)" def test_replaceWith(): s = sympify('Module(List(Set(r, Numerator(Rt(a/b, n))), Set(s, Denominator(Rt(a/b, n))), k, u), CompoundExpression(Set(u, Integral((r - s*x*cos(Pi*(2*k - 1)/n))/(r**2 - 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x)), Dist(2*r/(a*n), _Sum(u, List(k, 1, n/2 - 1/2)), x) + r*Integral(1/(r + s*x), x)/(a*n)))') symbols = ['x', 'a', 'n', 'b'] assert replaceWith(s, symbols, 1) == (" def With1(x, a, n, b):\n r = Numerator(Rt(a/b, n))\n s = Denominator(Rt(a/b, n))\n k = Symbol('k')\n u = Symbol('u')\n u = Integral((r - s*x*cos(Pi*(S(2)*k + S(-1))/n))/(r**S(2) - S(2)*r*s*x*cos(Pi*(S(2)*k + S(-1))/n) + s**S(2)*x**S(2)), x)\n u = Integral((r - s*x*cos(Pi*(2*k - 1)/n))/(r**2 - 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x)\n rubi.append(1)\n return Dist(S(2)*r/(a*n), _Sum(u, List(k, S(1), n/S(2) + S(-1)/2)), x) + r*Integral(S(1)/(r + s*x), x)/(a*n)", ' ', None) def test_generate_sympy_from_parsed(): s = ['Int', ['Power', ['Plus', ['Pattern', 'a', ['Blank']], ['Times', ['Optional', ['Pattern', 'b', ['Blank']]], ['Power', ['Pattern', 'x', ['Blank']], ['Pattern', 'n', ['Blank']]]]], '-1'], ['Pattern', 'x', ['Blank', 'Symbol']]] assert generate_sympy_from_parsed(s, wild=True) == 'Int(Pow(Add(Pattern(a, Blank), Mul(Optional(Pattern(b, Blank)), Pow(Pattern(x, Blank), Pattern(n, Blank)))), S(-1)), Pattern(x, Blank(Symbol)))' assert generate_sympy_from_parsed(s ,replace_Int=True) == 'Integral(Pow(Add(Pattern(a, Blank), Mul(Optional(Pattern(b, Blank)), Pow(Pattern(x, Blank), Pattern(n, Blank)))), S(-1)), Pattern(x, Blank(Symbol)))' s = ['And', ['FreeQ', ['List', 'a', 'b'], 'x'], ['PositiveIntegerQ', ['Times', ['Plus', 'n', '-3'], ['Power', '2', '-1']]], ['PosQ', ['Times', 'a', ['Power', 'b', '-1']]]] assert generate_sympy_from_parsed(s) == 'And(FreeQ(List(a, b), x), PositiveIntegerQ(Mul(Add(n, S(-3)), Pow(S(2), S(-1)))), PosQ(Mul(a, Pow(b, S(-1)))))' def test_rubi_printer(): #14819 a = Symbol('a') assert rubi_printer(Not(a)) == 'Not(a)' def test_contains_diff_return_type(): assert contains_diff_return_type(['Plus', ['BinomialDegree', 'u', 'x'], ['Times', '-1', ['BinomialDegree', 'z', 'x']]]) def test_set_matchq_in_constraint(): expected = ('result_matchq', " def _cons_f_1229(g, m):\n return FreeQ(List(g, m), x)\n _cons_1229 = CustomConstraint(_cons_f_1229)\n pat = Pattern(UtilityOperator((x*WC('g', S(1)))**WC('m', S(1)), x), _cons_1229)\n result_matchq = is_match(UtilityOperator(v, x), pat)") expected1 = ('result_matchq', " def _cons_f_1229(m, g):\n return FreeQ(List(g, m), x)\n _cons_1229 = CustomConstraint(_cons_f_1229)\n pat = Pattern(UtilityOperator((x*WC('g', S(1)))**WC('m', S(1)), x), _cons_1229)\n result_matchq = is_match(UtilityOperator(v, x), pat)") result = set_matchq_in_constraint(['MatchQ', 'v', ['Condition', ['Power', ['Times', ['Optional',\ ['Pattern', 'g', ['Blank']]], 'x'], ['Optional', ['Pattern', 'm', ['Blank']]]], ['FreeQ', ['List', 'g', 'm'], 'x']]], 1229) assert result == expected1 or result == expected def test_process_return_type(): from sympy.core.function import Function Int = Function("Int") ExpandToSum = Function("ExpandToSum") s = ('\n q = Expon(Pq, x)\n Pqq = Coeff(Pq, x, q)', 'With(List(Set(Pqq, Coeff(Pq, x, q))), Pqq*c**(n - q + S(-1))*(c*x)**(m - n + q + S(1))*(a*x**j + b*x**n)**(p + S(1))/(b*(m + n*p + q + S(1))) + Int((c*x)**m*(a*x**j + b*x**n)**p*ExpandToSum(Pq - Pqq*a*x**(-n + q)*(m - n + q + S(1))/(b*(m + n*p + q + S(1))) - Pqq*x**q, x), x))') result = process_return_type(s, []) expected = ('\n Pqq = Coeff(Pq, x, q)',\ Pqq*c**(n - q - 1)*(c*x)**(m - n + q + 1)*(a*x**j + b*x**n)**(p + 1)/(b*(m + n*p + q + 1)) + Int((c*x)**m*(a*x**j + b*x**n)**p*ExpandToSum(Pq - Pqq*a*x**(-n + q)*(m - n + q + 1)/(b*(m + n*p + q + 1)) - Pqq*x**q, x), x),\ True) assert result == expected def test_extract_set(): s = sympify('Module(List(Set(r, Numerator(Rt(a/b, n))), Set(s, Denominator(Rt(a/b, n))), k, u), CompoundExpression(Set(u, Integral((r - s*x*cos(Pi*(2*k - 1)/n))/(r**2 - 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x)), Dist(2*r/(a*n), _Sum(u, List(k, 1, n/2 - 1/2)), x) + r*Integral(1/(r + s*x), x)/(a*n)))') expected = list(sympify('Set(r, Numerator(Rt(a/b, n))), Set(s, Denominator(Rt(a/b, n))), Set(u, Integral((r - s*x*cos(Pi*(2*k - 1)/n))/(r**2 - 2*r*s*x*cos(Pi*(2*k - 1)/n) + s**2*x**2), x))')) assert extract_set(s, []) == expected
7ef71b3a4b255dd003aa25ff6a688bf81114b6b5c17dd89365e3ad6e22366ae2
from sympy.core.numbers import Integer, Rational, integer_nthroot, igcd, pi, oo from sympy.core.singleton import S i3 = Integer(3) i4 = Integer(4) r34 = Rational(3, 4) q45 = Rational(4, 5) def timeit_Integer_create(): Integer(2) def timeit_Integer_int(): int(i3) def timeit_neg_one(): -S.One def timeit_Integer_neg(): -i3 def timeit_Integer_abs(): abs(i3) def timeit_Integer_sub(): i3 - i3 def timeit_abs_pi(): abs(pi) def timeit_neg_oo(): -oo def timeit_Integer_add_i1(): i3 + 1 def timeit_Integer_add_ij(): i3 + i4 def timeit_Integer_add_Rational(): i3 + r34 def timeit_Integer_mul_i4(): i3*4 def timeit_Integer_mul_ij(): i3*i4 def timeit_Integer_mul_Rational(): i3*r34 def timeit_Integer_eq_i3(): i3 == 3 def timeit_Integer_ed_Rational(): i3 == r34 def timeit_integer_nthroot(): integer_nthroot(100, 2) def timeit_number_igcd_23_17(): igcd(23, 17) def timeit_number_igcd_60_3600(): igcd(60, 3600) def timeit_Rational_add_r1(): r34 + 1 def timeit_Rational_add_rq(): r34 + q45
035cc84b2cc0bbf4b0f1c3c35efa0d410417c9dd21044f19c2be2100b9460175
from sympy.core.basic import Basic from sympy.core.containers import Tuple from sympy.core.sorting import default_sort_key from sympy.core.symbol import symbols from sympy.core.singleton import S from sympy.core.function import expand from sympy.core.numbers import I from sympy.integrals.integrals import Integral from sympy.polys.polytools import factor from sympy.core.traversal import preorder_traversal, use, postorder_traversal from sympy.functions.elementary.piecewise import ExprCondPair, Piecewise b1 = Basic() b2 = Basic(b1) b3 = Basic(b2) b21 = Basic(b2, b1) def test_preorder_traversal(): expr = Basic(b21, b3) assert list( preorder_traversal(expr)) == [expr, b21, b2, b1, b1, b3, b2, b1] assert list(preorder_traversal(('abc', ('d', 'ef')))) == [ ('abc', ('d', 'ef')), 'abc', ('d', 'ef'), 'd', 'ef'] result = [] pt = preorder_traversal(expr) for i in pt: result.append(i) if i == b2: pt.skip() assert result == [expr, b21, b2, b1, b3, b2] w, x, y, z = symbols('w:z') expr = z + w*(x + y) assert list(preorder_traversal([expr], keys=default_sort_key)) == \ [[w*(x + y) + z], w*(x + y) + z, z, w*(x + y), w, x + y, x, y] assert list(preorder_traversal((x + y)*z, keys=True)) == \ [z*(x + y), z, x + y, x, y] def test_use(): x, y = symbols('x y') assert use(0, expand) == 0 f = (x + y)**2*x + 1 assert use(f, expand, level=0) == x**3 + 2*x**2*y + x*y**2 + + 1 assert use(f, expand, level=1) == x**3 + 2*x**2*y + x*y**2 + + 1 assert use(f, expand, level=2) == 1 + x*(2*x*y + x**2 + y**2) assert use(f, expand, level=3) == (x + y)**2*x + 1 f = (x**2 + 1)**2 - 1 kwargs = {'gaussian': True} assert use(f, factor, level=0, kwargs=kwargs) == x**2*(x**2 + 2) assert use(f, factor, level=1, kwargs=kwargs) == (x + I)**2*(x - I)**2 - 1 assert use(f, factor, level=2, kwargs=kwargs) == (x + I)**2*(x - I)**2 - 1 assert use(f, factor, level=3, kwargs=kwargs) == (x**2 + 1)**2 - 1 def test_postorder_traversal(): x, y, z, w = symbols('x y z w') expr = z + w*(x + y) expected = [z, w, x, y, x + y, w*(x + y), w*(x + y) + z] assert list(postorder_traversal(expr, keys=default_sort_key)) == expected assert list(postorder_traversal(expr, keys=True)) == expected expr = Piecewise((x, x < 1), (x**2, True)) expected = [ x, 1, x, x < 1, ExprCondPair(x, x < 1), 2, x, x**2, S.true, ExprCondPair(x**2, True), Piecewise((x, x < 1), (x**2, True)) ] assert list(postorder_traversal(expr, keys=default_sort_key)) == expected assert list(postorder_traversal( [expr], keys=default_sort_key)) == expected + [[expr]] assert list(postorder_traversal(Integral(x**2, (x, 0, 1)), keys=default_sort_key)) == [ 2, x, x**2, 0, 1, x, Tuple(x, 0, 1), Integral(x**2, Tuple(x, 0, 1)) ] assert list(postorder_traversal(('abc', ('d', 'ef')))) == [ 'abc', 'd', 'ef', ('d', 'ef'), ('abc', ('d', 'ef'))]
f35f1fd9627d581c6d248aca1da7088650ba4c2499e89cabd231f0f808a835e7
from sympy.calculus.util import AccumBounds from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.containers import (Dict, Tuple) from sympy.core.function import (Derivative, Function, Lambda, Subs) from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Integer, Rational, oo, pi, zoo) from sympy.core.relational import Eq from sympy.core.singleton import S from sympy.core.symbol import (Symbol, Wild, symbols) from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import (atan2, cos, cot, sin, tan) from sympy.matrices.dense import (Matrix, zeros) from sympy.matrices.expressions.special import ZeroMatrix from sympy.polys.polytools import factor from sympy.polys.rootoftools import RootOf from sympy.simplify.cse_main import cse from sympy.simplify.simplify import nsimplify from sympy.core.basic import _aresame from sympy.testing.pytest import XFAIL from sympy.abc import a, x, y, z, t def test_subs(): n3 = Rational(3) e = x e = e.subs(x, n3) assert e == Rational(3) e = 2*x assert e == 2*x e = e.subs(x, n3) assert e == Rational(6) def test_subs_Matrix(): z = zeros(2) z1 = ZeroMatrix(2, 2) assert (x*y).subs({x:z, y:0}) in [z, z1] assert (x*y).subs({y:z, x:0}) == 0 assert (x*y).subs({y:z, x:0}, simultaneous=True) in [z, z1] assert (x + y).subs({x: z, y: z}, simultaneous=True) in [z, z1] assert (x + y).subs({x: z, y: z}) in [z, z1] # Issue #15528 assert Mul(Matrix([[3]]), x).subs(x, 2.0) == Matrix([[6.0]]) # Does not raise a TypeError, see comment on the MatAdd postprocessor assert Add(Matrix([[3]]), x).subs(x, 2.0) == Add(Matrix([[3]]), 2.0) def test_subs_AccumBounds(): e = x e = e.subs(x, AccumBounds(1, 3)) assert e == AccumBounds(1, 3) e = 2*x e = e.subs(x, AccumBounds(1, 3)) assert e == AccumBounds(2, 6) e = x + x**2 e = e.subs(x, AccumBounds(-1, 1)) assert e == AccumBounds(-1, 2) def test_trigonometric(): n3 = Rational(3) e = (sin(x)**2).diff(x) assert e == 2*sin(x)*cos(x) e = e.subs(x, n3) assert e == 2*cos(n3)*sin(n3) e = (sin(x)**2).diff(x) assert e == 2*sin(x)*cos(x) e = e.subs(sin(x), cos(x)) assert e == 2*cos(x)**2 assert exp(pi).subs(exp, sin) == 0 assert cos(exp(pi)).subs(exp, sin) == 1 i = Symbol('i', integer=True) zoo = S.ComplexInfinity assert tan(x).subs(x, pi/2) is zoo assert cot(x).subs(x, pi) is zoo assert cot(i*x).subs(x, pi) is zoo assert tan(i*x).subs(x, pi/2) == tan(i*pi/2) assert tan(i*x).subs(x, pi/2).subs(i, 1) is zoo o = Symbol('o', odd=True) assert tan(o*x).subs(x, pi/2) == tan(o*pi/2) def test_powers(): assert sqrt(1 - sqrt(x)).subs(x, 4) == I assert (sqrt(1 - x**2)**3).subs(x, 2) == - 3*I*sqrt(3) assert (x**Rational(1, 3)).subs(x, 27) == 3 assert (x**Rational(1, 3)).subs(x, -27) == 3*(-1)**Rational(1, 3) assert ((-x)**Rational(1, 3)).subs(x, 27) == 3*(-1)**Rational(1, 3) n = Symbol('n', negative=True) assert (x**n).subs(x, 0) is S.ComplexInfinity assert exp(-1).subs(S.Exp1, 0) is S.ComplexInfinity assert (x**(4.0*y)).subs(x**(2.0*y), n) == n**2.0 assert (2**(x + 2)).subs(2, 3) == 3**(x + 3) def test_logexppow(): # no eval() x = Symbol('x', real=True) w = Symbol('w') e = (3**(1 + x) + 2**(1 + x))/(3**x + 2**x) assert e.subs(2**x, w) != e assert e.subs(exp(x*log(Rational(2))), w) != e def test_bug(): x1 = Symbol('x1') x2 = Symbol('x2') y = x1*x2 assert y.subs(x1, Float(3.0)) == Float(3.0)*x2 def test_subbug1(): # see that they don't fail (x**x).subs(x, 1) (x**x).subs(x, 1.0) def test_subbug2(): # Ensure this does not cause infinite recursion assert Float(7.7).epsilon_eq(abs(x).subs(x, -7.7)) def test_dict_set(): a, b, c = map(Wild, 'abc') f = 3*cos(4*x) r = f.match(a*cos(b*x)) assert r == {a: 3, b: 4} e = a/b*sin(b*x) assert e.subs(r) == r[a]/r[b]*sin(r[b]*x) assert e.subs(r) == 3*sin(4*x) / 4 s = set(r.items()) assert e.subs(s) == r[a]/r[b]*sin(r[b]*x) assert e.subs(s) == 3*sin(4*x) / 4 assert e.subs(r) == r[a]/r[b]*sin(r[b]*x) assert e.subs(r) == 3*sin(4*x) / 4 assert x.subs(Dict((x, 1))) == 1 def test_dict_ambigous(): # see issue 3566 f = x*exp(x) g = z*exp(z) df = {x: y, exp(x): y} dg = {z: y, exp(z): y} assert f.subs(df) == y**2 assert g.subs(dg) == y**2 # and this is how order can affect the result assert f.subs(x, y).subs(exp(x), y) == y*exp(y) assert f.subs(exp(x), y).subs(x, y) == y**2 # length of args and count_ops are the same so # default_sort_key resolves ordering...if one # doesn't want this result then an unordered # sequence should not be used. e = 1 + x*y assert e.subs({x: y, y: 2}) == 5 # here, there are no obviously clashing keys or values # but the results depend on the order assert exp(x/2 + y).subs({exp(y + 1): 2, x: 2}) == exp(y + 1) def test_deriv_sub_bug3(): f = Function('f') pat = Derivative(f(x), x, x) assert pat.subs(y, y**2) == Derivative(f(x), x, x) assert pat.subs(y, y**2) != Derivative(f(x), x) def test_equality_subs1(): f = Function('f') eq = Eq(f(x)**2, x) res = Eq(Integer(16), x) assert eq.subs(f(x), 4) == res def test_equality_subs2(): f = Function('f') eq = Eq(f(x)**2, 16) assert bool(eq.subs(f(x), 3)) is False assert bool(eq.subs(f(x), 4)) is True def test_issue_3742(): e = sqrt(x)*exp(y) assert e.subs(sqrt(x), 1) == exp(y) def test_subs_dict1(): assert (1 + x*y).subs(x, pi) == 1 + pi*y assert (1 + x*y).subs({x: pi, y: 2}) == 1 + 2*pi c2, c3, q1p, q2p, c1, s1, s2, s3 = symbols('c2 c3 q1p q2p c1 s1 s2 s3') test = (c2**2*q2p*c3 + c1**2*s2**2*q2p*c3 + s1**2*s2**2*q2p*c3 - c1**2*q1p*c2*s3 - s1**2*q1p*c2*s3) assert (test.subs({c1**2: 1 - s1**2, c2**2: 1 - s2**2, c3**3: 1 - s3**2}) == c3*q2p*(1 - s2**2) + c3*q2p*s2**2*(1 - s1**2) - c2*q1p*s3*(1 - s1**2) + c3*q2p*s1**2*s2**2 - c2*q1p*s3*s1**2) def test_mul(): x, y, z, a, b, c = symbols('x y z a b c') A, B, C = symbols('A B C', commutative=0) assert (x*y*z).subs(z*x, y) == y**2 assert (z*x).subs(1/x, z) == 1 assert (x*y/z).subs(1/z, a) == a*x*y assert (x*y/z).subs(x/z, a) == a*y assert (x*y/z).subs(y/z, a) == a*x assert (x*y/z).subs(x/z, 1/a) == y/a assert (x*y/z).subs(x, 1/a) == y/(z*a) assert (2*x*y).subs(5*x*y, z) != z*Rational(2, 5) assert (x*y*A).subs(x*y, a) == a*A assert (x**2*y**(x*Rational(3, 2))).subs(x*y**(x/2), 2) == 4*y**(x/2) assert (x*exp(x*2)).subs(x*exp(x), 2) == 2*exp(x) assert ((x**(2*y))**3).subs(x**y, 2) == 64 assert (x*A*B).subs(x*A, y) == y*B assert (x*y*(1 + x)*(1 + x*y)).subs(x*y, 2) == 6*(1 + x) assert ((1 + A*B)*A*B).subs(A*B, x*A*B) assert (x*a/z).subs(x/z, A) == a*A assert (x**3*A).subs(x**2*A, a) == a*x assert (x**2*A*B).subs(x**2*B, a) == a*A assert (x**2*A*B).subs(x**2*A, a) == a*B assert (b*A**3/(a**3*c**3)).subs(a**4*c**3*A**3/b**4, z) == \ b*A**3/(a**3*c**3) assert (6*x).subs(2*x, y) == 3*y assert (y*exp(x*Rational(3, 2))).subs(y*exp(x), 2) == 2*exp(x/2) assert (y*exp(x*Rational(3, 2))).subs(y*exp(x), 2) == 2*exp(x/2) assert (A**2*B*A**2*B*A**2).subs(A*B*A, C) == A*C**2*A assert (x*A**3).subs(x*A, y) == y*A**2 assert (x**2*A**3).subs(x*A, y) == y**2*A assert (x*A**3).subs(x*A, B) == B*A**2 assert (x*A*B*A*exp(x*A*B)).subs(x*A, B) == B**2*A*exp(B*B) assert (x**2*A*B*A*exp(x*A*B)).subs(x*A, B) == B**3*exp(B**2) assert (x**3*A*exp(x*A*B)*A*exp(x*A*B)).subs(x*A, B) == \ x*B*exp(B**2)*B*exp(B**2) assert (x*A*B*C*A*B).subs(x*A*B, C) == C**2*A*B assert (-I*a*b).subs(a*b, 2) == -2*I # issue 6361 assert (-8*I*a).subs(-2*a, 1) == 4*I assert (-I*a).subs(-a, 1) == I # issue 6441 assert (4*x**2).subs(2*x, y) == y**2 assert (2*4*x**2).subs(2*x, y) == 2*y**2 assert (-x**3/9).subs(-x/3, z) == -z**2*x assert (-x**3/9).subs(x/3, z) == -z**2*x assert (-2*x**3/9).subs(x/3, z) == -2*x*z**2 assert (-2*x**3/9).subs(-x/3, z) == -2*x*z**2 assert (-2*x**3/9).subs(-2*x, z) == z*x**2/9 assert (-2*x**3/9).subs(2*x, z) == -z*x**2/9 assert (2*(3*x/5/7)**2).subs(3*x/5, z) == 2*(Rational(1, 7))**2*z**2 assert (4*x).subs(-2*x, z) == 4*x # try keep subs literal def test_subs_simple(): a = symbols('a', commutative=True) x = symbols('x', commutative=False) assert (2*a).subs(1, 3) == 2*a assert (2*a).subs(2, 3) == 3*a assert (2*a).subs(a, 3) == 6 assert sin(2).subs(1, 3) == sin(2) assert sin(2).subs(2, 3) == sin(3) assert sin(a).subs(a, 3) == sin(3) assert (2*x).subs(1, 3) == 2*x assert (2*x).subs(2, 3) == 3*x assert (2*x).subs(x, 3) == 6 assert sin(x).subs(x, 3) == sin(3) def test_subs_constants(): a, b = symbols('a b', commutative=True) x, y = symbols('x y', commutative=False) assert (a*b).subs(2*a, 1) == a*b assert (1.5*a*b).subs(a, 1) == 1.5*b assert (2*a*b).subs(2*a, 1) == b assert (2*a*b).subs(4*a, 1) == 2*a*b assert (x*y).subs(2*x, 1) == x*y assert (1.5*x*y).subs(x, 1) == 1.5*y assert (2*x*y).subs(2*x, 1) == y assert (2*x*y).subs(4*x, 1) == 2*x*y def test_subs_commutative(): a, b, c, d, K = symbols('a b c d K', commutative=True) assert (a*b).subs(a*b, K) == K assert (a*b*a*b).subs(a*b, K) == K**2 assert (a*a*b*b).subs(a*b, K) == K**2 assert (a*b*c*d).subs(a*b*c, K) == d*K assert (a*b**c).subs(a, K) == K*b**c assert (a*b**c).subs(b, K) == a*K**c assert (a*b**c).subs(c, K) == a*b**K assert (a*b*c*b*a).subs(a*b, K) == c*K**2 assert (a**3*b**2*a).subs(a*b, K) == a**2*K**2 def test_subs_noncommutative(): w, x, y, z, L = symbols('w x y z L', commutative=False) alpha = symbols('alpha', commutative=True) someint = symbols('someint', commutative=True, integer=True) assert (x*y).subs(x*y, L) == L assert (w*y*x).subs(x*y, L) == w*y*x assert (w*x*y*z).subs(x*y, L) == w*L*z assert (x*y*x*y).subs(x*y, L) == L**2 assert (x*x*y).subs(x*y, L) == x*L assert (x*x*y*y).subs(x*y, L) == x*L*y assert (w*x*y).subs(x*y*z, L) == w*x*y assert (x*y**z).subs(x, L) == L*y**z assert (x*y**z).subs(y, L) == x*L**z assert (x*y**z).subs(z, L) == x*y**L assert (w*x*y*z*x*y).subs(x*y*z, L) == w*L*x*y assert (w*x*y*y*w*x*x*y*x*y*y*x*y).subs(x*y, L) == w*L*y*w*x*L**2*y*L # Check fractional power substitutions. It should not do # substitutions that choose a value for noncommutative log, # or inverses that don't already appear in the expressions. assert (x*x*x).subs(x*x, L) == L*x assert (x*x*x*y*x*x*x*x).subs(x*x, L) == L*x*y*L**2 for p in range(1, 5): for k in range(10): assert (y * x**k).subs(x**p, L) == y * L**(k//p) * x**(k % p) assert (x**Rational(3, 2)).subs(x**S.Half, L) == x**Rational(3, 2) assert (x**S.Half).subs(x**S.Half, L) == L assert (x**Rational(-1, 2)).subs(x**S.Half, L) == x**Rational(-1, 2) assert (x**Rational(-1, 2)).subs(x**Rational(-1, 2), L) == L assert (x**(2*someint)).subs(x**someint, L) == L**2 assert (x**(2*someint + 3)).subs(x**someint, L) == L**2*x**3 assert (x**(3*someint + 3)).subs(x**someint, L) == L**3*x**3 assert (x**(3*someint)).subs(x**(2*someint), L) == L * x**someint assert (x**(4*someint)).subs(x**(2*someint), L) == L**2 assert (x**(4*someint + 1)).subs(x**(2*someint), L) == L**2 * x assert (x**(4*someint)).subs(x**(3*someint), L) == L * x**someint assert (x**(4*someint + 1)).subs(x**(3*someint), L) == L * x**(someint + 1) assert (x**(2*alpha)).subs(x**alpha, L) == x**(2*alpha) assert (x**(2*alpha + 2)).subs(x**2, L) == x**(2*alpha + 2) assert ((2*z)**alpha).subs(z**alpha, y) == (2*z)**alpha assert (x**(2*someint*alpha)).subs(x**someint, L) == x**(2*someint*alpha) assert (x**(2*someint + alpha)).subs(x**someint, L) == x**(2*someint + alpha) # This could in principle be substituted, but is not currently # because it requires recognizing that someint**2 is divisible by # someint. assert (x**(someint**2 + 3)).subs(x**someint, L) == x**(someint**2 + 3) # alpha**z := exp(log(alpha) z) is usually well-defined assert (4**z).subs(2**z, y) == y**2 # Negative powers assert (x**(-1)).subs(x**3, L) == x**(-1) assert (x**(-2)).subs(x**3, L) == x**(-2) assert (x**(-3)).subs(x**3, L) == L**(-1) assert (x**(-4)).subs(x**3, L) == L**(-1) * x**(-1) assert (x**(-5)).subs(x**3, L) == L**(-1) * x**(-2) assert (x**(-1)).subs(x**(-3), L) == x**(-1) assert (x**(-2)).subs(x**(-3), L) == x**(-2) assert (x**(-3)).subs(x**(-3), L) == L assert (x**(-4)).subs(x**(-3), L) == L * x**(-1) assert (x**(-5)).subs(x**(-3), L) == L * x**(-2) assert (x**1).subs(x**(-3), L) == x assert (x**2).subs(x**(-3), L) == x**2 assert (x**3).subs(x**(-3), L) == L**(-1) assert (x**4).subs(x**(-3), L) == L**(-1) * x assert (x**5).subs(x**(-3), L) == L**(-1) * x**2 def test_subs_basic_funcs(): a, b, c, d, K = symbols('a b c d K', commutative=True) w, x, y, z, L = symbols('w x y z L', commutative=False) assert (x + y).subs(x + y, L) == L assert (x - y).subs(x - y, L) == L assert (x/y).subs(x, L) == L/y assert (x**y).subs(x, L) == L**y assert (x**y).subs(y, L) == x**L assert ((a - c)/b).subs(b, K) == (a - c)/K assert (exp(x*y - z)).subs(x*y, L) == exp(L - z) assert (a*exp(x*y - w*z) + b*exp(x*y + w*z)).subs(z, 0) == \ a*exp(x*y) + b*exp(x*y) assert ((a - b)/(c*d - a*b)).subs(c*d - a*b, K) == (a - b)/K assert (w*exp(a*b - c)*x*y/4).subs(x*y, L) == w*exp(a*b - c)*L/4 def test_subs_wild(): R, S, T, U = symbols('R S T U', cls=Wild) assert (R*S).subs(R*S, T) == T assert (S*R).subs(R*S, T) == T assert (R + S).subs(R + S, T) == T assert (R**S).subs(R, T) == T**S assert (R**S).subs(S, T) == R**T assert (R*S**T).subs(R, U) == U*S**T assert (R*S**T).subs(S, U) == R*U**T assert (R*S**T).subs(T, U) == R*S**U def test_subs_mixed(): a, b, c, d, K = symbols('a b c d K', commutative=True) w, x, y, z, L = symbols('w x y z L', commutative=False) R, S, T, U = symbols('R S T U', cls=Wild) assert (a*x*y).subs(x*y, L) == a*L assert (a*b*x*y*x).subs(x*y, L) == a*b*L*x assert (R*x*y*exp(x*y)).subs(x*y, L) == R*L*exp(L) assert (a*x*y*y*x - x*y*z*exp(a*b)).subs(x*y, L) == a*L*y*x - L*z*exp(a*b) e = c*y*x*y*x**(R*S - a*b) - T*(a*R*b*S) assert e.subs(x*y, L).subs(a*b, K).subs(R*S, U) == \ c*y*L*x**(U - K) - T*(U*K) def test_division(): a, b, c = symbols('a b c', commutative=True) x, y, z = symbols('x y z', commutative=True) assert (1/a).subs(a, c) == 1/c assert (1/a**2).subs(a, c) == 1/c**2 assert (1/a**2).subs(a, -2) == Rational(1, 4) assert (-(1/a**2)).subs(a, -2) == Rational(-1, 4) assert (1/x).subs(x, z) == 1/z assert (1/x**2).subs(x, z) == 1/z**2 assert (1/x**2).subs(x, -2) == Rational(1, 4) assert (-(1/x**2)).subs(x, -2) == Rational(-1, 4) #issue 5360 assert (1/x).subs(x, 0) == 1/S.Zero def test_add(): a, b, c, d, x, y, t = symbols('a b c d x y t') assert (a**2 - b - c).subs(a**2 - b, d) in [d - c, a**2 - b - c] assert (a**2 - c).subs(a**2 - c, d) == d assert (a**2 - b - c).subs(a**2 - c, d) in [d - b, a**2 - b - c] assert (a**2 - x - c).subs(a**2 - c, d) in [d - x, a**2 - x - c] assert (a**2 - b - sqrt(a)).subs(a**2 - sqrt(a), c) == c - b assert (a + b + exp(a + b)).subs(a + b, c) == c + exp(c) assert (c + b + exp(c + b)).subs(c + b, a) == a + exp(a) assert (a + b + c + d).subs(b + c, x) == a + d + x assert (a + b + c + d).subs(-b - c, x) == a + d - x assert ((x + 1)*y).subs(x + 1, t) == t*y assert ((-x - 1)*y).subs(x + 1, t) == -t*y assert ((x - 1)*y).subs(x + 1, t) == y*(t - 2) assert ((-x + 1)*y).subs(x + 1, t) == y*(-t + 2) # this should work every time: e = a**2 - b - c assert e.subs(Add(*e.args[:2]), d) == d + e.args[2] assert e.subs(a**2 - c, d) == d - b # the fallback should recognize when a change has # been made; while .1 == Rational(1, 10) they are not the same # and the change should be made assert (0.1 + a).subs(0.1, Rational(1, 10)) == Rational(1, 10) + a e = (-x*(-y + 1) - y*(y - 1)) ans = (-x*(x) - y*(-x)).expand() assert e.subs(-y + 1, x) == ans #Test issue 18747 assert (exp(x) + cos(x)).subs(x, oo) == oo assert Add(*[AccumBounds(-1, 1), oo]) == oo assert Add(*[oo, AccumBounds(-1, 1)]) == oo def test_subs_issue_4009(): assert (I*Symbol('a')).subs(1, 2) == I*Symbol('a') def test_functions_subs(): f, g = symbols('f g', cls=Function) l = Lambda((x, y), sin(x) + y) assert (g(y, x) + cos(x)).subs(g, l) == sin(y) + x + cos(x) assert (f(x)**2).subs(f, sin) == sin(x)**2 assert (f(x, y)).subs(f, log) == log(x, y) assert (f(x, y)).subs(f, sin) == f(x, y) assert (sin(x) + atan2(x, y)).subs([[atan2, f], [sin, g]]) == \ f(x, y) + g(x) assert (g(f(x + y, x))).subs([[f, l], [g, exp]]) == exp(x + sin(x + y)) def test_derivative_subs(): f = Function('f') g = Function('g') assert Derivative(f(x), x).subs(f(x), y) != 0 # need xreplace to put the function back, see #13803 assert Derivative(f(x), x).subs(f(x), y).xreplace({y: f(x)}) == \ Derivative(f(x), x) # issues 5085, 5037 assert cse(Derivative(f(x), x) + f(x))[1][0].has(Derivative) assert cse(Derivative(f(x, y), x) + Derivative(f(x, y), y))[1][0].has(Derivative) eq = Derivative(g(x), g(x)) assert eq.subs(g, f) == Derivative(f(x), f(x)) assert eq.subs(g(x), f(x)) == Derivative(f(x), f(x)) assert eq.subs(g, cos) == Subs(Derivative(y, y), y, cos(x)) def test_derivative_subs2(): f_func, g_func = symbols('f g', cls=Function) f, g = f_func(x, y, z), g_func(x, y, z) assert Derivative(f, x, y).subs(Derivative(f, x, y), g) == g assert Derivative(f, y, x).subs(Derivative(f, x, y), g) == g assert Derivative(f, x, y).subs(Derivative(f, x), g) == Derivative(g, y) assert Derivative(f, x, y).subs(Derivative(f, y), g) == Derivative(g, x) assert (Derivative(f, x, y, z).subs( Derivative(f, x, z), g) == Derivative(g, y)) assert (Derivative(f, x, y, z).subs( Derivative(f, z, y), g) == Derivative(g, x)) assert (Derivative(f, x, y, z).subs( Derivative(f, z, y, x), g) == g) # Issue 9135 assert (Derivative(f, x, x, y).subs( Derivative(f, y, y), g) == Derivative(f, x, x, y)) assert (Derivative(f, x, y, y, z).subs( Derivative(f, x, y, y, y), g) == Derivative(f, x, y, y, z)) assert Derivative(f, x, y).subs(Derivative(f_func(x), x, y), g) == Derivative(f, x, y) def test_derivative_subs3(): dex = Derivative(exp(x), x) assert Derivative(dex, x).subs(dex, exp(x)) == dex assert dex.subs(exp(x), dex) == Derivative(exp(x), x, x) def test_issue_5284(): A, B = symbols('A B', commutative=False) assert (x*A).subs(x**2*A, B) == x*A assert (A**2).subs(A**3, B) == A**2 assert (A**6).subs(A**3, B) == B**2 def test_subs_iter(): assert x.subs(reversed([[x, y]])) == y it = iter([[x, y]]) assert x.subs(it) == y assert x.subs(Tuple((x, y))) == y def test_subs_dict(): a, b, c, d, e = symbols('a b c d e') assert (2*x + y + z).subs(dict(x=1, y=2)) == 4 + z l = [(sin(x), 2), (x, 1)] assert (sin(x)).subs(l) == \ (sin(x)).subs(dict(l)) == 2 assert sin(x).subs(reversed(l)) == sin(1) expr = sin(2*x) + sqrt(sin(2*x))*cos(2*x)*sin(exp(x)*x) reps = dict([ (sin(2*x), c), (sqrt(sin(2*x)), a), (cos(2*x), b), (exp(x), e), (x, d), ]) assert expr.subs(reps) == c + a*b*sin(d*e) l = [(x, 3), (y, x**2)] assert (x + y).subs(l) == 3 + x**2 assert (x + y).subs(reversed(l)) == 12 # If changes are made to convert lists into dictionaries and do # a dictionary-lookup replacement, these tests will help to catch # some logical errors that might occur l = [(y, z + 2), (1 + z, 5), (z, 2)] assert (y - 1 + 3*x).subs(l) == 5 + 3*x l = [(y, z + 2), (z, 3)] assert (y - 2).subs(l) == 3 def test_no_arith_subs_on_floats(): assert (x + 3).subs(x + 3, a) == a assert (x + 3).subs(x + 2, a) == a + 1 assert (x + y + 3).subs(x + 3, a) == a + y assert (x + y + 3).subs(x + 2, a) == a + y + 1 assert (x + 3.0).subs(x + 3.0, a) == a assert (x + 3.0).subs(x + 2.0, a) == x + 3.0 assert (x + y + 3.0).subs(x + 3.0, a) == a + y assert (x + y + 3.0).subs(x + 2.0, a) == x + y + 3.0 def test_issue_5651(): a, b, c, K = symbols('a b c K', commutative=True) assert (a/(b*c)).subs(b*c, K) == a/K assert (a/(b**2*c**3)).subs(b*c, K) == a/(c*K**2) assert (1/(x*y)).subs(x*y, 2) == S.Half assert ((1 + x*y)/(x*y)).subs(x*y, 1) == 2 assert (x*y*z).subs(x*y, 2) == 2*z assert ((1 + x*y)/(x*y)/z).subs(x*y, 1) == 2/z def test_issue_6075(): assert Tuple(1, True).subs(1, 2) == Tuple(2, True) def test_issue_6079(): # since x + 2.0 == x + 2 we can't do a simple equality test assert _aresame((x + 2.0).subs(2, 3), x + 2.0) assert _aresame((x + 2.0).subs(2.0, 3), x + 3) assert not _aresame(x + 2, x + 2.0) assert not _aresame(Basic(cos, 1), Basic(cos, 1.)) assert _aresame(cos, cos) assert not _aresame(1, S.One) assert not _aresame(x, symbols('x', positive=True)) def test_issue_4680(): N = Symbol('N') assert N.subs(dict(N=3)) == 3 def test_issue_6158(): assert (x - 1).subs(1, y) == x - y assert (x - 1).subs(-1, y) == x + y assert (x - oo).subs(oo, y) == x - y assert (x - oo).subs(-oo, y) == x + y def test_Function_subs(): f, g, h, i = symbols('f g h i', cls=Function) p = Piecewise((g(f(x, y)), x < -1), (g(x), x <= 1)) assert p.subs(g, h) == Piecewise((h(f(x, y)), x < -1), (h(x), x <= 1)) assert (f(y) + g(x)).subs({f: h, g: i}) == i(x) + h(y) def test_simultaneous_subs(): reps = {x: 0, y: 0} assert (x/y).subs(reps) != (y/x).subs(reps) assert (x/y).subs(reps, simultaneous=True) == \ (y/x).subs(reps, simultaneous=True) reps = reps.items() assert (x/y).subs(reps) != (y/x).subs(reps) assert (x/y).subs(reps, simultaneous=True) == \ (y/x).subs(reps, simultaneous=True) assert Derivative(x, y, z).subs(reps, simultaneous=True) == \ Subs(Derivative(0, y, z), y, 0) def test_issue_6419_6421(): assert (1/(1 + x/y)).subs(x/y, x) == 1/(1 + x) assert (-2*I).subs(2*I, x) == -x assert (-I*x).subs(I*x, x) == -x assert (-3*I*y**4).subs(3*I*y**2, x) == -x*y**2 def test_issue_6559(): assert (-12*x + y).subs(-x, 1) == 12 + y # though this involves cse it generated a failure in Mul._eval_subs x0, x1 = symbols('x0 x1') e = -log(-12*sqrt(2) + 17)/24 - log(-2*sqrt(2) + 3)/12 + sqrt(2)/3 # XXX modify cse so x1 is eliminated and x0 = -sqrt(2)? assert cse(e) == ( [(x0, sqrt(2))], [x0/3 - log(-12*x0 + 17)/24 - log(-2*x0 + 3)/12]) def test_issue_5261(): x = symbols('x', real=True) e = I*x assert exp(e).subs(exp(x), y) == y**I assert (2**e).subs(2**x, y) == y**I eq = (-2)**e assert eq.subs((-2)**x, y) == eq def test_issue_6923(): assert (-2*x*sqrt(2)).subs(2*x, y) == -sqrt(2)*y def test_2arg_hack(): N = Symbol('N', commutative=False) ans = Mul(2, y + 1, evaluate=False) assert (2*x*(y + 1)).subs(x, 1, hack2=True) == ans assert (2*(y + 1 + N)).subs(N, 0, hack2=True) == ans @XFAIL def test_mul2(): """When this fails, remove things labelled "2-arg hack" 1) remove special handling in the fallback of subs that was added in the same commit as this test 2) remove the special handling in Mul.flatten """ assert (2*(x + 1)).is_Mul def test_noncommutative_subs(): x,y = symbols('x,y', commutative=False) assert (x*y*x).subs([(x, x*y), (y, x)], simultaneous=True) == (x*y*x**2*y) def test_issue_2877(): f = Float(2.0) assert (x + f).subs({f: 2}) == x + 2 def r(a, b, c): return factor(a*x**2 + b*x + c) e = r(5.0/6, 10, 5) assert nsimplify(e) == 5*x**2/6 + 10*x + 5 def test_issue_5910(): t = Symbol('t') assert (1/(1 - t)).subs(t, 1) is zoo n = t d = t - 1 assert (n/d).subs(t, 1) is zoo assert (-n/-d).subs(t, 1) is zoo def test_issue_5217(): s = Symbol('s') z = (1 - 2*x*x) w = (1 + 2*x*x) q = 2*x*x*2*y*y sub = {2*x*x: s} assert w.subs(sub) == 1 + s assert z.subs(sub) == 1 - s assert q == 4*x**2*y**2 assert q.subs(sub) == 2*y**2*s def test_issue_10829(): assert (4**x).subs(2**x, y) == y**2 assert (9**x).subs(3**x, y) == y**2 def test_pow_eval_subs_no_cache(): # Tests pull request 9376 is working from sympy.core.cache import clear_cache s = 1/sqrt(x**2) # This bug only appeared when the cache was turned off. # We need to approximate running this test without the cache. # This creates approximately the same situation. clear_cache() # This used to fail with a wrong result. # It incorrectly returned 1/sqrt(x**2) before this pull request. result = s.subs(sqrt(x**2), y) assert result == 1/y def test_RootOf_issue_10092(): x = Symbol('x', real=True) eq = x**3 - 17*x**2 + 81*x - 118 r = RootOf(eq, 0) assert (x < r).subs(x, r) is S.false def test_issue_8886(): from sympy.physics.mechanics import ReferenceFrame as R # if something can't be sympified we assume that it # doesn't play well with SymPy and disallow the # substitution v = R('A').x assert x.subs(x, v) == x assert v.subs(v, x) == v assert v.__eq__(x) is False def test_issue_12657(): # treat -oo like the atom that it is reps = [(-oo, 1), (oo, 2)] assert (x < -oo).subs(reps) == (x < 1) assert (x < -oo).subs(list(reversed(reps))) == (x < 1) reps = [(-oo, 2), (oo, 1)] assert (x < oo).subs(reps) == (x < 1) assert (x < oo).subs(list(reversed(reps))) == (x < 1) def test_recurse_Application_args(): F = Lambda((x, y), exp(2*x + 3*y)) f = Function('f') A = f(x, f(x, x)) C = F(x, F(x, x)) assert A.subs(f, F) == A.replace(f, F) == C def test_Subs_subs(): assert Subs(x*y, x, x).subs(x, y) == Subs(x*y, x, y) assert Subs(x*y, x, x + 1).subs(x, y) == \ Subs(x*y, x, y + 1) assert Subs(x*y, y, x + 1).subs(x, y) == \ Subs(y**2, y, y + 1) a = Subs(x*y*z, (y, x, z), (x + 1, x + z, x)) b = Subs(x*y*z, (y, x, z), (x + 1, y + z, y)) assert a.subs(x, y) == b and \ a.doit().subs(x, y) == a.subs(x, y).doit() f = Function('f') g = Function('g') assert Subs(2*f(x, y) + g(x), f(x, y), 1).subs(y, 2) == Subs( 2*f(x, y) + g(x), (f(x, y), y), (1, 2)) def test_issue_13333(): eq = 1/x assert eq.subs(dict(x='1/2')) == 2 assert eq.subs(dict(x='(1/2)')) == 2 def test_issue_15234(): x, y = symbols('x y', real=True) p = 6*x**5 + x**4 - 4*x**3 + 4*x**2 - 2*x + 3 p_subbed = 6*x**5 - 4*x**3 - 2*x + y**4 + 4*y**2 + 3 assert p.subs([(x**i, y**i) for i in [2, 4]]) == p_subbed x, y = symbols('x y', complex=True) p = 6*x**5 + x**4 - 4*x**3 + 4*x**2 - 2*x + 3 p_subbed = 6*x**5 - 4*x**3 - 2*x + y**4 + 4*y**2 + 3 assert p.subs([(x**i, y**i) for i in [2, 4]]) == p_subbed def test_issue_6976(): x, y = symbols('x y') assert (sqrt(x)**3 + sqrt(x) + x + x**2).subs(sqrt(x), y) == \ y**4 + y**3 + y**2 + y assert (x**4 + x**3 + x**2 + x + sqrt(x)).subs(x**2, y) == \ sqrt(x) + x**3 + x + y**2 + y assert x.subs(x**3, y) == x assert x.subs(x**Rational(1, 3), y) == y**3 # More substitutions are possible with nonnegative symbols x, y = symbols('x y', nonnegative=True) assert (x**4 + x**3 + x**2 + x + sqrt(x)).subs(x**2, y) == \ y**Rational(1, 4) + y**Rational(3, 2) + sqrt(y) + y**2 + y assert x.subs(x**3, y) == y**Rational(1, 3) def test_issue_11746(): assert (1/x).subs(x**2, 1) == 1/x assert (1/(x**3)).subs(x**2, 1) == x**(-3) assert (1/(x**4)).subs(x**2, 1) == 1 assert (1/(x**3)).subs(x**4, 1) == x**(-3) assert (1/(y**5)).subs(x**5, 1) == y**(-5) def test_issue_17823(): from sympy.physics.mechanics import dynamicsymbols q1, q2 = dynamicsymbols('q1, q2') expr = q1.diff().diff()**2*q1 + q1.diff()*q2.diff() reps={q1: a, q1.diff(): a*x*y, q1.diff().diff(): z} assert expr.subs(reps) == a*x*y*Derivative(q2, t) + a*z**2 def test_issue_19326(): x, y = [i(t) for i in map(Function, 'xy')] assert (x*y).subs({x: 1 + x, y: x}) == (1 + x)*x def test_issue_19558(): e = (7*x*cos(x) - 12*log(x)**3)*(-log(x)**4 + 2*sin(x) + 1)**2/ \ (2*(x*cos(x) - 2*log(x)**3)*(3*log(x)**4 - 7*sin(x) + 3)**2) assert e.subs(x, oo) == AccumBounds(-oo, oo) assert (sin(x) + cos(x)).subs(x, oo) == AccumBounds(-2, 2) def test_guard_against_indeterminate_evaluation(): eq = x**y assert eq.subs([(x, 1), (y, oo)]) == 1 # because 1**y == 1 assert eq.subs([(y, oo), (x, 1)]) is S.NaN assert eq.subs({x: 1, y: oo}) is S.NaN assert eq.subs([(x, 1), (y, oo)],simultaneous=True) is S.NaN
44bc7cd652245c3727f348b6b2b55f5a3379e71efa779fd1e6c676f9a4aa2e03
from sympy.assumptions.refine import refine from sympy.concrete.summations import Sum from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.containers import Tuple from sympy.core.expr import (ExprBuilder, unchanged, Expr, UnevaluatedExpr) from sympy.core.function import (Function, expand, WildFunction, AppliedUndef, Derivative, diff) from sympy.core.mul import Mul from sympy.core.numbers import (NumberSymbol, E, zoo, oo, Float, I, Rational, nan, Integer, Number, pi) from sympy.core.power import Pow from sympy.core.relational import Ge, Lt, Gt, Le from sympy.core.singleton import S from sympy.core.sorting import default_sort_key from sympy.core.symbol import Symbol, symbols, Dummy, Wild from sympy.core.sympify import sympify from sympy.functions.combinatorial.factorials import factorial from sympy.functions.elementary.exponential import exp_polar, exp, log from sympy.functions.elementary.miscellaneous import sqrt, Max from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import tan, sin, cos from sympy.functions.special.delta_functions import (Heaviside, DiracDelta) from sympy.functions.special.error_functions import Si from sympy.functions.special.gamma_functions import gamma from sympy.integrals.integrals import integrate, Integral from sympy.physics.secondquant import FockState from sympy.polys.partfrac import apart from sympy.polys.polytools import factor, cancel, Poly from sympy.polys.rationaltools import together from sympy.series.order import O from sympy.simplify.combsimp import combsimp from sympy.simplify.gammasimp import gammasimp from sympy.simplify.powsimp import powsimp from sympy.simplify.radsimp import collect, radsimp from sympy.simplify.ratsimp import ratsimp from sympy.simplify.simplify import simplify, nsimplify from sympy.simplify.trigsimp import trigsimp from sympy.physics.units import meter from sympy.testing.pytest import raises, XFAIL from sympy.abc import a, b, c, n, t, u, x, y, z class DummyNumber: """ Minimal implementation of a number that works with SymPy. If one has a Number class (e.g. Sage Integer, or some other custom class) that one wants to work well with SymPy, one has to implement at least the methods of this class DummyNumber, resp. its subclasses I5 and F1_1. Basically, one just needs to implement either __int__() or __float__() and then one needs to make sure that the class works with Python integers and with itself. """ def __radd__(self, a): if isinstance(a, (int, float)): return a + self.number return NotImplemented def __add__(self, a): if isinstance(a, (int, float, DummyNumber)): return self.number + a return NotImplemented def __rsub__(self, a): if isinstance(a, (int, float)): return a - self.number return NotImplemented def __sub__(self, a): if isinstance(a, (int, float, DummyNumber)): return self.number - a return NotImplemented def __rmul__(self, a): if isinstance(a, (int, float)): return a * self.number return NotImplemented def __mul__(self, a): if isinstance(a, (int, float, DummyNumber)): return self.number * a return NotImplemented def __rtruediv__(self, a): if isinstance(a, (int, float)): return a / self.number return NotImplemented def __truediv__(self, a): if isinstance(a, (int, float, DummyNumber)): return self.number / a return NotImplemented def __rpow__(self, a): if isinstance(a, (int, float)): return a ** self.number return NotImplemented def __pow__(self, a): if isinstance(a, (int, float, DummyNumber)): return self.number ** a return NotImplemented def __pos__(self): return self.number def __neg__(self): return - self.number class I5(DummyNumber): number = 5 def __int__(self): return self.number class F1_1(DummyNumber): number = 1.1 def __float__(self): return self.number i5 = I5() f1_1 = F1_1() # basic SymPy objects basic_objs = [ Rational(2), Float("1.3"), x, y, pow(x, y)*y, ] # all supported objects all_objs = basic_objs + [ 5, 5.5, i5, f1_1 ] def dotest(s): for xo in all_objs: for yo in all_objs: s(xo, yo) return True def test_basic(): def j(a, b): x = a x = +a x = -a x = a + b x = a - b x = a*b x = a/b x = a**b del x assert dotest(j) def test_ibasic(): def s(a, b): x = a x += b x = a x -= b x = a x *= b x = a x /= b assert dotest(s) class NonBasic: '''This class represents an object that knows how to implement binary operations like +, -, etc with Expr but is not a subclass of Basic itself. The NonExpr subclass below does subclass Basic but not Expr. For both NonBasic and NonExpr it should be possible for them to override Expr.__add__ etc because Expr.__add__ should be returning NotImplemented for non Expr classes. Otherwise Expr.__add__ would create meaningless objects like Add(Integer(1), FiniteSet(2)) and it wouldn't be possible for other classes to override these operations when interacting with Expr. ''' def __add__(self, other): return SpecialOp('+', self, other) def __radd__(self, other): return SpecialOp('+', other, self) def __sub__(self, other): return SpecialOp('-', self, other) def __rsub__(self, other): return SpecialOp('-', other, self) def __mul__(self, other): return SpecialOp('*', self, other) def __rmul__(self, other): return SpecialOp('*', other, self) def __truediv__(self, other): return SpecialOp('/', self, other) def __rtruediv__(self, other): return SpecialOp('/', other, self) def __floordiv__(self, other): return SpecialOp('//', self, other) def __rfloordiv__(self, other): return SpecialOp('//', other, self) def __mod__(self, other): return SpecialOp('%', self, other) def __rmod__(self, other): return SpecialOp('%', other, self) def __divmod__(self, other): return SpecialOp('divmod', self, other) def __rdivmod__(self, other): return SpecialOp('divmod', other, self) def __pow__(self, other): return SpecialOp('**', self, other) def __rpow__(self, other): return SpecialOp('**', other, self) def __lt__(self, other): return SpecialOp('<', self, other) def __gt__(self, other): return SpecialOp('>', self, other) def __le__(self, other): return SpecialOp('<=', self, other) def __ge__(self, other): return SpecialOp('>=', self, other) class NonExpr(Basic, NonBasic): '''Like NonBasic above except this is a subclass of Basic but not Expr''' pass class SpecialOp(Basic): '''Represents the results of operations with NonBasic and NonExpr''' def __new__(cls, op, arg1, arg2): return Basic.__new__(cls, op, arg1, arg2) class NonArithmetic(Basic): '''Represents a Basic subclass that does not support arithmetic operations''' pass def test_cooperative_operations(): '''Tests that Expr uses binary operations cooperatively. In particular it should be possible for non-Expr classes to override binary operators like +, - etc when used with Expr instances. This should work for non-Expr classes whether they are Basic subclasses or not. Also non-Expr classes that do not define binary operators with Expr should give TypeError. ''' # A bunch of instances of Expr subclasses exprs = [ Expr(), S.Zero, S.One, S.Infinity, S.NegativeInfinity, S.ComplexInfinity, S.Half, Float(0.5), Integer(2), Symbol('x'), Mul(2, Symbol('x')), Add(2, Symbol('x')), Pow(2, Symbol('x')), ] for e in exprs: # Test that these classes can override arithmetic operations in # combination with various Expr types. for ne in [NonBasic(), NonExpr()]: results = [ (ne + e, ('+', ne, e)), (e + ne, ('+', e, ne)), (ne - e, ('-', ne, e)), (e - ne, ('-', e, ne)), (ne * e, ('*', ne, e)), (e * ne, ('*', e, ne)), (ne / e, ('/', ne, e)), (e / ne, ('/', e, ne)), (ne // e, ('//', ne, e)), (e // ne, ('//', e, ne)), (ne % e, ('%', ne, e)), (e % ne, ('%', e, ne)), (divmod(ne, e), ('divmod', ne, e)), (divmod(e, ne), ('divmod', e, ne)), (ne ** e, ('**', ne, e)), (e ** ne, ('**', e, ne)), (e < ne, ('>', ne, e)), (ne < e, ('<', ne, e)), (e > ne, ('<', ne, e)), (ne > e, ('>', ne, e)), (e <= ne, ('>=', ne, e)), (ne <= e, ('<=', ne, e)), (e >= ne, ('<=', ne, e)), (ne >= e, ('>=', ne, e)), ] for res, args in results: assert type(res) is SpecialOp and res.args == args # These classes do not support binary operators with Expr. Every # operation should raise in combination with any of the Expr types. for na in [NonArithmetic(), object()]: raises(TypeError, lambda : e + na) raises(TypeError, lambda : na + e) raises(TypeError, lambda : e - na) raises(TypeError, lambda : na - e) raises(TypeError, lambda : e * na) raises(TypeError, lambda : na * e) raises(TypeError, lambda : e / na) raises(TypeError, lambda : na / e) raises(TypeError, lambda : e // na) raises(TypeError, lambda : na // e) raises(TypeError, lambda : e % na) raises(TypeError, lambda : na % e) raises(TypeError, lambda : divmod(e, na)) raises(TypeError, lambda : divmod(na, e)) raises(TypeError, lambda : e ** na) raises(TypeError, lambda : na ** e) raises(TypeError, lambda : e > na) raises(TypeError, lambda : na > e) raises(TypeError, lambda : e < na) raises(TypeError, lambda : na < e) raises(TypeError, lambda : e >= na) raises(TypeError, lambda : na >= e) raises(TypeError, lambda : e <= na) raises(TypeError, lambda : na <= e) def test_relational(): from sympy.core.relational import Lt assert (pi < 3) is S.false assert (pi <= 3) is S.false assert (pi > 3) is S.true assert (pi >= 3) is S.true assert (-pi < 3) is S.true assert (-pi <= 3) is S.true assert (-pi > 3) is S.false assert (-pi >= 3) is S.false r = Symbol('r', real=True) assert (r - 2 < r - 3) is S.false assert Lt(x + I, x + I + 2).func == Lt # issue 8288 def test_relational_assumptions(): m1 = Symbol("m1", nonnegative=False) m2 = Symbol("m2", positive=False) m3 = Symbol("m3", nonpositive=False) m4 = Symbol("m4", negative=False) assert (m1 < 0) == Lt(m1, 0) assert (m2 <= 0) == Le(m2, 0) assert (m3 > 0) == Gt(m3, 0) assert (m4 >= 0) == Ge(m4, 0) m1 = Symbol("m1", nonnegative=False, real=True) m2 = Symbol("m2", positive=False, real=True) m3 = Symbol("m3", nonpositive=False, real=True) m4 = Symbol("m4", negative=False, real=True) assert (m1 < 0) is S.true assert (m2 <= 0) is S.true assert (m3 > 0) is S.true assert (m4 >= 0) is S.true m1 = Symbol("m1", negative=True) m2 = Symbol("m2", nonpositive=True) m3 = Symbol("m3", positive=True) m4 = Symbol("m4", nonnegative=True) assert (m1 < 0) is S.true assert (m2 <= 0) is S.true assert (m3 > 0) is S.true assert (m4 >= 0) is S.true m1 = Symbol("m1", negative=False, real=True) m2 = Symbol("m2", nonpositive=False, real=True) m3 = Symbol("m3", positive=False, real=True) m4 = Symbol("m4", nonnegative=False, real=True) assert (m1 < 0) is S.false assert (m2 <= 0) is S.false assert (m3 > 0) is S.false assert (m4 >= 0) is S.false # See https://github.com/sympy/sympy/issues/17708 #def test_relational_noncommutative(): # from sympy import Lt, Gt, Le, Ge # A, B = symbols('A,B', commutative=False) # assert (A < B) == Lt(A, B) # assert (A <= B) == Le(A, B) # assert (A > B) == Gt(A, B) # assert (A >= B) == Ge(A, B) def test_basic_nostr(): for obj in basic_objs: raises(TypeError, lambda: obj + '1') raises(TypeError, lambda: obj - '1') if obj == 2: assert obj * '1' == '11' else: raises(TypeError, lambda: obj * '1') raises(TypeError, lambda: obj / '1') raises(TypeError, lambda: obj ** '1') def test_series_expansion_for_uniform_order(): assert (1/x + y + x).series(x, 0, 0) == 1/x + O(1, x) assert (1/x + y + x).series(x, 0, 1) == 1/x + y + O(x) assert (1/x + 1 + x).series(x, 0, 0) == 1/x + O(1, x) assert (1/x + 1 + x).series(x, 0, 1) == 1/x + 1 + O(x) assert (1/x + x).series(x, 0, 0) == 1/x + O(1, x) assert (1/x + y + y*x + x).series(x, 0, 0) == 1/x + O(1, x) assert (1/x + y + y*x + x).series(x, 0, 1) == 1/x + y + O(x) def test_leadterm(): assert (3 + 2*x**(log(3)/log(2) - 1)).leadterm(x) == (3, 0) assert (1/x**2 + 1 + x + x**2).leadterm(x)[1] == -2 assert (1/x + 1 + x + x**2).leadterm(x)[1] == -1 assert (x**2 + 1/x).leadterm(x)[1] == -1 assert (1 + x**2).leadterm(x)[1] == 0 assert (x + 1).leadterm(x)[1] == 0 assert (x + x**2).leadterm(x)[1] == 1 assert (x**2).leadterm(x)[1] == 2 def test_as_leading_term(): assert (3 + 2*x**(log(3)/log(2) - 1)).as_leading_term(x) == 3 assert (1/x**2 + 1 + x + x**2).as_leading_term(x) == 1/x**2 assert (1/x + 1 + x + x**2).as_leading_term(x) == 1/x assert (x**2 + 1/x).as_leading_term(x) == 1/x assert (1 + x**2).as_leading_term(x) == 1 assert (x + 1).as_leading_term(x) == 1 assert (x + x**2).as_leading_term(x) == x assert (x**2).as_leading_term(x) == x**2 assert (x + oo).as_leading_term(x) is oo raises(ValueError, lambda: (x + 1).as_leading_term(1)) # https://github.com/sympy/sympy/issues/21177 f = -3*x + (x + Rational(3, 2) - sqrt(3)*S.ImaginaryUnit/2)**2\ - Rational(3, 2) + 3*sqrt(3)*S.ImaginaryUnit/2 assert f.as_leading_term(x) == \ (12*sqrt(3)*x - 12*S.ImaginaryUnit*x)/(4*sqrt(3) + 12*S.ImaginaryUnit) # https://github.com/sympy/sympy/issues/21245 f = 1 - x - x**2 fi = (1 + sqrt(5))/2 assert f.subs(x, y + 1/fi).as_leading_term(y) == \ (-576*sqrt(5)*y - 1280*y)/(256*sqrt(5) + 576) def test_leadterm2(): assert (x*cos(1)*cos(1 + sin(1)) + sin(1 + sin(1))).leadterm(x) == \ (sin(1 + sin(1)), 0) def test_leadterm3(): assert (y + z + x).leadterm(x) == (y + z, 0) def test_as_leading_term2(): assert (x*cos(1)*cos(1 + sin(1)) + sin(1 + sin(1))).as_leading_term(x) == \ sin(1 + sin(1)) def test_as_leading_term3(): assert (2 + pi + x).as_leading_term(x) == 2 + pi assert (2*x + pi*x + x**2).as_leading_term(x) == 2*x + pi*x def test_as_leading_term4(): # see issue 6843 n = Symbol('n', integer=True, positive=True) r = -n**3/(2*n**2 + 4*n + 2) - n**2/(n**2 + 2*n + 1) + \ n**2/(n + 1) - n/(2*n**2 + 4*n + 2) + n/(n*x + x) + 2*n/(n + 1) - \ 1 + 1/(n*x + x) + 1/(n + 1) - 1/x assert r.as_leading_term(x).cancel() == n/2 def test_as_leading_term_stub(): class foo(Function): pass assert foo(1/x).as_leading_term(x) == foo(1/x) assert foo(1).as_leading_term(x) == foo(1) raises(NotImplementedError, lambda: foo(x).as_leading_term(x)) def test_as_leading_term_deriv_integral(): # related to issue 11313 assert Derivative(x ** 3, x).as_leading_term(x) == 3*x**2 assert Derivative(x ** 3, y).as_leading_term(x) == 0 assert Integral(x ** 3, x).as_leading_term(x) == x**4/4 assert Integral(x ** 3, y).as_leading_term(x) == y*x**3 assert Derivative(exp(x), x).as_leading_term(x) == 1 assert Derivative(log(x), x).as_leading_term(x) == (1/x).as_leading_term(x) def test_atoms(): assert x.atoms() == {x} assert (1 + x).atoms() == {x, S.One} assert (1 + 2*cos(x)).atoms(Symbol) == {x} assert (1 + 2*cos(x)).atoms(Symbol, Number) == {S.One, S(2), x} assert (2*(x**(y**x))).atoms() == {S(2), x, y} assert S.Half.atoms() == {S.Half} assert S.Half.atoms(Symbol) == set() assert sin(oo).atoms(oo) == set() assert Poly(0, x).atoms() == {S.Zero, x} assert Poly(1, x).atoms() == {S.One, x} assert Poly(x, x).atoms() == {x} assert Poly(x, x, y).atoms() == {x, y} assert Poly(x + y, x, y).atoms() == {x, y} assert Poly(x + y, x, y, z).atoms() == {x, y, z} assert Poly(x + y*t, x, y, z).atoms() == {t, x, y, z} assert (I*pi).atoms(NumberSymbol) == {pi} assert (I*pi).atoms(NumberSymbol, I) == \ (I*pi).atoms(I, NumberSymbol) == {pi, I} assert exp(exp(x)).atoms(exp) == {exp(exp(x)), exp(x)} assert (1 + x*(2 + y) + exp(3 + z)).atoms(Add) == \ {1 + x*(2 + y) + exp(3 + z), 2 + y, 3 + z} # issue 6132 f = Function('f') e = (f(x) + sin(x) + 2) assert e.atoms(AppliedUndef) == \ {f(x)} assert e.atoms(AppliedUndef, Function) == \ {f(x), sin(x)} assert e.atoms(Function) == \ {f(x), sin(x)} assert e.atoms(AppliedUndef, Number) == \ {f(x), S(2)} assert e.atoms(Function, Number) == \ {S(2), sin(x), f(x)} def test_is_polynomial(): k = Symbol('k', nonnegative=True, integer=True) assert Rational(2).is_polynomial(x, y, z) is True assert (S.Pi).is_polynomial(x, y, z) is True assert x.is_polynomial(x) is True assert x.is_polynomial(y) is True assert (x**2).is_polynomial(x) is True assert (x**2).is_polynomial(y) is True assert (x**(-2)).is_polynomial(x) is False assert (x**(-2)).is_polynomial(y) is True assert (2**x).is_polynomial(x) is False assert (2**x).is_polynomial(y) is True assert (x**k).is_polynomial(x) is False assert (x**k).is_polynomial(k) is False assert (x**x).is_polynomial(x) is False assert (k**k).is_polynomial(k) is False assert (k**x).is_polynomial(k) is False assert (x**(-k)).is_polynomial(x) is False assert ((2*x)**k).is_polynomial(x) is False assert (x**2 + 3*x - 8).is_polynomial(x) is True assert (x**2 + 3*x - 8).is_polynomial(y) is True assert (x**2 + 3*x - 8).is_polynomial() is True assert sqrt(x).is_polynomial(x) is False assert (sqrt(x)**3).is_polynomial(x) is False assert (x**2 + 3*x*sqrt(y) - 8).is_polynomial(x) is True assert (x**2 + 3*x*sqrt(y) - 8).is_polynomial(y) is False assert ((x**2)*(y**2) + x*(y**2) + y*x + exp(2)).is_polynomial() is True assert ((x**2)*(y**2) + x*(y**2) + y*x + exp(x)).is_polynomial() is False assert ( (x**2)*(y**2) + x*(y**2) + y*x + exp(2)).is_polynomial(x, y) is True assert ( (x**2)*(y**2) + x*(y**2) + y*x + exp(x)).is_polynomial(x, y) is False def test_is_rational_function(): assert Integer(1).is_rational_function() is True assert Integer(1).is_rational_function(x) is True assert Rational(17, 54).is_rational_function() is True assert Rational(17, 54).is_rational_function(x) is True assert (12/x).is_rational_function() is True assert (12/x).is_rational_function(x) is True assert (x/y).is_rational_function() is True assert (x/y).is_rational_function(x) is True assert (x/y).is_rational_function(x, y) is True assert (x**2 + 1/x/y).is_rational_function() is True assert (x**2 + 1/x/y).is_rational_function(x) is True assert (x**2 + 1/x/y).is_rational_function(x, y) is True assert (sin(y)/x).is_rational_function() is False assert (sin(y)/x).is_rational_function(y) is False assert (sin(y)/x).is_rational_function(x) is True assert (sin(y)/x).is_rational_function(x, y) is False assert (S.NaN).is_rational_function() is False assert (S.Infinity).is_rational_function() is False assert (S.NegativeInfinity).is_rational_function() is False assert (S.ComplexInfinity).is_rational_function() is False def test_is_meromorphic(): f = a/x**2 + b + x + c*x**2 assert f.is_meromorphic(x, 0) is True assert f.is_meromorphic(x, 1) is True assert f.is_meromorphic(x, zoo) is True g = 3 + 2*x**(log(3)/log(2) - 1) assert g.is_meromorphic(x, 0) is False assert g.is_meromorphic(x, 1) is True assert g.is_meromorphic(x, zoo) is False n = Symbol('n', integer=True) h = sin(1/x)**n*x assert h.is_meromorphic(x, 0) is False assert h.is_meromorphic(x, 1) is True assert h.is_meromorphic(x, zoo) is False e = log(x)**pi assert e.is_meromorphic(x, 0) is False assert e.is_meromorphic(x, 1) is False assert e.is_meromorphic(x, 2) is True assert e.is_meromorphic(x, zoo) is False assert (log(x)**a).is_meromorphic(x, 0) is False assert (log(x)**a).is_meromorphic(x, 1) is False assert (a**log(x)).is_meromorphic(x, 0) is None assert (3**log(x)).is_meromorphic(x, 0) is False assert (3**log(x)).is_meromorphic(x, 1) is True def test_is_algebraic_expr(): assert sqrt(3).is_algebraic_expr(x) is True assert sqrt(3).is_algebraic_expr() is True eq = ((1 + x**2)/(1 - y**2))**(S.One/3) assert eq.is_algebraic_expr(x) is True assert eq.is_algebraic_expr(y) is True assert (sqrt(x) + y**(S(2)/3)).is_algebraic_expr(x) is True assert (sqrt(x) + y**(S(2)/3)).is_algebraic_expr(y) is True assert (sqrt(x) + y**(S(2)/3)).is_algebraic_expr() is True assert (cos(y)/sqrt(x)).is_algebraic_expr() is False assert (cos(y)/sqrt(x)).is_algebraic_expr(x) is True assert (cos(y)/sqrt(x)).is_algebraic_expr(y) is False assert (cos(y)/sqrt(x)).is_algebraic_expr(x, y) is False def test_SAGE1(): #see https://github.com/sympy/sympy/issues/3346 class MyInt: def _sympy_(self): return Integer(5) m = MyInt() e = Rational(2)*m assert e == 10 raises(TypeError, lambda: Rational(2)*MyInt) def test_SAGE2(): class MyInt: def __int__(self): return 5 assert sympify(MyInt()) == 5 e = Rational(2)*MyInt() assert e == 10 raises(TypeError, lambda: Rational(2)*MyInt) def test_SAGE3(): class MySymbol: def __rmul__(self, other): return ('mys', other, self) o = MySymbol() e = x*o assert e == ('mys', x, o) def test_len(): e = x*y assert len(e.args) == 2 e = x + y + z assert len(e.args) == 3 def test_doit(): a = Integral(x**2, x) assert isinstance(a.doit(), Integral) is False assert isinstance(a.doit(integrals=True), Integral) is False assert isinstance(a.doit(integrals=False), Integral) is True assert (2*Integral(x, x)).doit() == x**2 def test_attribute_error(): raises(AttributeError, lambda: x.cos()) raises(AttributeError, lambda: x.sin()) raises(AttributeError, lambda: x.exp()) def test_args(): assert (x*y).args in ((x, y), (y, x)) assert (x + y).args in ((x, y), (y, x)) assert (x*y + 1).args in ((x*y, 1), (1, x*y)) assert sin(x*y).args == (x*y,) assert sin(x*y).args[0] == x*y assert (x**y).args == (x, y) assert (x**y).args[0] == x assert (x**y).args[1] == y def test_noncommutative_expand_issue_3757(): A, B, C = symbols('A,B,C', commutative=False) assert A*B - B*A != 0 assert (A*(A + B)*B).expand() == A**2*B + A*B**2 assert (A*(A + B + C)*B).expand() == A**2*B + A*B**2 + A*C*B def test_as_numer_denom(): a, b, c = symbols('a, b, c') assert nan.as_numer_denom() == (nan, 1) assert oo.as_numer_denom() == (oo, 1) assert (-oo).as_numer_denom() == (-oo, 1) assert zoo.as_numer_denom() == (zoo, 1) assert (-zoo).as_numer_denom() == (zoo, 1) assert x.as_numer_denom() == (x, 1) assert (1/x).as_numer_denom() == (1, x) assert (x/y).as_numer_denom() == (x, y) assert (x/2).as_numer_denom() == (x, 2) assert (x*y/z).as_numer_denom() == (x*y, z) assert (x/(y*z)).as_numer_denom() == (x, y*z) assert S.Half.as_numer_denom() == (1, 2) assert (1/y**2).as_numer_denom() == (1, y**2) assert (x/y**2).as_numer_denom() == (x, y**2) assert ((x**2 + 1)/y).as_numer_denom() == (x**2 + 1, y) assert (x*(y + 1)/y**7).as_numer_denom() == (x*(y + 1), y**7) assert (x**-2).as_numer_denom() == (1, x**2) assert (a/x + b/2/x + c/3/x).as_numer_denom() == \ (6*a + 3*b + 2*c, 6*x) assert (a/x + b/2/x + c/3/y).as_numer_denom() == \ (2*c*x + y*(6*a + 3*b), 6*x*y) assert (a/x + b/2/x + c/.5/x).as_numer_denom() == \ (2*a + b + 4.0*c, 2*x) # this should take no more than a few seconds assert int(log(Add(*[Dummy()/i/x for i in range(1, 705)] ).as_numer_denom()[1]/x).n(4)) == 705 for i in [S.Infinity, S.NegativeInfinity, S.ComplexInfinity]: assert (i + x/3).as_numer_denom() == \ (x + i, 3) assert (S.Infinity + x/3 + y/4).as_numer_denom() == \ (4*x + 3*y + S.Infinity, 12) assert (oo*x + zoo*y).as_numer_denom() == \ (zoo*y + oo*x, 1) A, B, C = symbols('A,B,C', commutative=False) assert (A*B*C**-1).as_numer_denom() == (A*B*C**-1, 1) assert (A*B*C**-1/x).as_numer_denom() == (A*B*C**-1, x) assert (C**-1*A*B).as_numer_denom() == (C**-1*A*B, 1) assert (C**-1*A*B/x).as_numer_denom() == (C**-1*A*B, x) assert ((A*B*C)**-1).as_numer_denom() == ((A*B*C)**-1, 1) assert ((A*B*C)**-1/x).as_numer_denom() == ((A*B*C)**-1, x) def test_trunc(): import math x, y = symbols('x y') assert math.trunc(2) == 2 assert math.trunc(4.57) == 4 assert math.trunc(-5.79) == -5 assert math.trunc(pi) == 3 assert math.trunc(log(7)) == 1 assert math.trunc(exp(5)) == 148 assert math.trunc(cos(pi)) == -1 assert math.trunc(sin(5)) == 0 raises(TypeError, lambda: math.trunc(x)) raises(TypeError, lambda: math.trunc(x + y**2)) raises(TypeError, lambda: math.trunc(oo)) def test_as_independent(): assert S.Zero.as_independent(x, as_Add=True) == (0, 0) assert S.Zero.as_independent(x, as_Add=False) == (0, 0) assert (2*x*sin(x) + y + x).as_independent(x) == (y, x + 2*x*sin(x)) assert (2*x*sin(x) + y + x).as_independent(y) == (x + 2*x*sin(x), y) assert (2*x*sin(x) + y + x).as_independent(x, y) == (0, y + x + 2*x*sin(x)) assert (x*sin(x)*cos(y)).as_independent(x) == (cos(y), x*sin(x)) assert (x*sin(x)*cos(y)).as_independent(y) == (x*sin(x), cos(y)) assert (x*sin(x)*cos(y)).as_independent(x, y) == (1, x*sin(x)*cos(y)) assert (sin(x)).as_independent(x) == (1, sin(x)) assert (sin(x)).as_independent(y) == (sin(x), 1) assert (2*sin(x)).as_independent(x) == (2, sin(x)) assert (2*sin(x)).as_independent(y) == (2*sin(x), 1) # issue 4903 = 1766b n1, n2, n3 = symbols('n1 n2 n3', commutative=False) assert (n1 + n1*n2).as_independent(n2) == (n1, n1*n2) assert (n2*n1 + n1*n2).as_independent(n2) == (0, n1*n2 + n2*n1) assert (n1*n2*n1).as_independent(n2) == (n1, n2*n1) assert (n1*n2*n1).as_independent(n1) == (1, n1*n2*n1) assert (3*x).as_independent(x, as_Add=True) == (0, 3*x) assert (3*x).as_independent(x, as_Add=False) == (3, x) assert (3 + x).as_independent(x, as_Add=True) == (3, x) assert (3 + x).as_independent(x, as_Add=False) == (1, 3 + x) # issue 5479 assert (3*x).as_independent(Symbol) == (3, x) # issue 5648 assert (n1*x*y).as_independent(x) == (n1*y, x) assert ((x + n1)*(x - y)).as_independent(x) == (1, (x + n1)*(x - y)) assert ((x + n1)*(x - y)).as_independent(y) == (x + n1, x - y) assert (DiracDelta(x - n1)*DiracDelta(x - y)).as_independent(x) \ == (1, DiracDelta(x - n1)*DiracDelta(x - y)) assert (x*y*n1*n2*n3).as_independent(n2) == (x*y*n1, n2*n3) assert (x*y*n1*n2*n3).as_independent(n1) == (x*y, n1*n2*n3) assert (x*y*n1*n2*n3).as_independent(n3) == (x*y*n1*n2, n3) assert (DiracDelta(x - n1)*DiracDelta(y - n1)*DiracDelta(x - n2)).as_independent(y) == \ (DiracDelta(x - n1)*DiracDelta(x - n2), DiracDelta(y - n1)) # issue 5784 assert (x + Integral(x, (x, 1, 2))).as_independent(x, strict=True) == \ (Integral(x, (x, 1, 2)), x) eq = Add(x, -x, 2, -3, evaluate=False) assert eq.as_independent(x) == (-1, Add(x, -x, evaluate=False)) eq = Mul(x, 1/x, 2, -3, evaluate=False) eq.as_independent(x) == (-6, Mul(x, 1/x, evaluate=False)) assert (x*y).as_independent(z, as_Add=True) == (x*y, 0) @XFAIL def test_call_2(): # TODO UndefinedFunction does not subclass Expr f = Function('f') assert (2*f)(x) == 2*f(x) def test_replace(): f = log(sin(x)) + tan(sin(x**2)) assert f.replace(sin, cos) == log(cos(x)) + tan(cos(x**2)) assert f.replace( sin, lambda a: sin(2*a)) == log(sin(2*x)) + tan(sin(2*x**2)) a = Wild('a') b = Wild('b') assert f.replace(sin(a), cos(a)) == log(cos(x)) + tan(cos(x**2)) assert f.replace( sin(a), lambda a: sin(2*a)) == log(sin(2*x)) + tan(sin(2*x**2)) # test exact assert (2*x).replace(a*x + b, b - a, exact=True) == 2*x assert (2*x).replace(a*x + b, b - a) == 2*x assert (2*x).replace(a*x + b, b - a, exact=False) == 2/x assert (2*x).replace(a*x + b, lambda a, b: b - a, exact=True) == 2*x assert (2*x).replace(a*x + b, lambda a, b: b - a) == 2*x assert (2*x).replace(a*x + b, lambda a, b: b - a, exact=False) == 2/x g = 2*sin(x**3) assert g.replace( lambda expr: expr.is_Number, lambda expr: expr**2) == 4*sin(x**9) assert cos(x).replace(cos, sin, map=True) == (sin(x), {cos(x): sin(x)}) assert sin(x).replace(cos, sin) == sin(x) cond, func = lambda x: x.is_Mul, lambda x: 2*x assert (x*y).replace(cond, func, map=True) == (2*x*y, {x*y: 2*x*y}) assert (x*(1 + x*y)).replace(cond, func, map=True) == \ (2*x*(2*x*y + 1), {x*(2*x*y + 1): 2*x*(2*x*y + 1), x*y: 2*x*y}) assert (y*sin(x)).replace(sin, lambda expr: sin(expr)/y, map=True) == \ (sin(x), {sin(x): sin(x)/y}) # if not simultaneous then y*sin(x) -> y*sin(x)/y = sin(x) -> sin(x)/y assert (y*sin(x)).replace(sin, lambda expr: sin(expr)/y, simultaneous=False) == sin(x)/y assert (x**2 + O(x**3)).replace(Pow, lambda b, e: b**e/e ) == x**2/2 + O(x**3) assert (x**2 + O(x**3)).replace(Pow, lambda b, e: b**e/e, simultaneous=False) == x**2/2 + O(x**3) assert (x*(x*y + 3)).replace(lambda x: x.is_Mul, lambda x: 2 + x) == \ x*(x*y + 5) + 2 e = (x*y + 1)*(2*x*y + 1) + 1 assert e.replace(cond, func, map=True) == ( 2*((2*x*y + 1)*(4*x*y + 1)) + 1, {2*x*y: 4*x*y, x*y: 2*x*y, (2*x*y + 1)*(4*x*y + 1): 2*((2*x*y + 1)*(4*x*y + 1))}) assert x.replace(x, y) == y assert (x + 1).replace(1, 2) == x + 2 # https://groups.google.com/forum/#!topic/sympy/8wCgeC95tz0 n1, n2, n3 = symbols('n1:4', commutative=False) f = Function('f') assert (n1*f(n2)).replace(f, lambda x: x) == n1*n2 assert (n3*f(n2)).replace(f, lambda x: x) == n3*n2 # issue 16725 assert S.Zero.replace(Wild('x'), 1) == 1 # let the user override the default decision of False assert S.Zero.replace(Wild('x'), 1, exact=True) == 0 def test_find(): expr = (x + y + 2 + sin(3*x)) assert expr.find(lambda u: u.is_Integer) == {S(2), S(3)} assert expr.find(lambda u: u.is_Symbol) == {x, y} assert expr.find(lambda u: u.is_Integer, group=True) == {S(2): 1, S(3): 1} assert expr.find(lambda u: u.is_Symbol, group=True) == {x: 2, y: 1} assert expr.find(Integer) == {S(2), S(3)} assert expr.find(Symbol) == {x, y} assert expr.find(Integer, group=True) == {S(2): 1, S(3): 1} assert expr.find(Symbol, group=True) == {x: 2, y: 1} a = Wild('a') expr = sin(sin(x)) + sin(x) + cos(x) + x assert expr.find(lambda u: type(u) is sin) == {sin(x), sin(sin(x))} assert expr.find( lambda u: type(u) is sin, group=True) == {sin(x): 2, sin(sin(x)): 1} assert expr.find(sin(a)) == {sin(x), sin(sin(x))} assert expr.find(sin(a), group=True) == {sin(x): 2, sin(sin(x)): 1} assert expr.find(sin) == {sin(x), sin(sin(x))} assert expr.find(sin, group=True) == {sin(x): 2, sin(sin(x)): 1} def test_count(): expr = (x + y + 2 + sin(3*x)) assert expr.count(lambda u: u.is_Integer) == 2 assert expr.count(lambda u: u.is_Symbol) == 3 assert expr.count(Integer) == 2 assert expr.count(Symbol) == 3 assert expr.count(2) == 1 a = Wild('a') assert expr.count(sin) == 1 assert expr.count(sin(a)) == 1 assert expr.count(lambda u: type(u) is sin) == 1 f = Function('f') assert f(x).count(f(x)) == 1 assert f(x).diff(x).count(f(x)) == 1 assert f(x).diff(x).count(x) == 2 def test_has_basics(): f = Function('f') g = Function('g') p = Wild('p') assert sin(x).has(x) assert sin(x).has(sin) assert not sin(x).has(y) assert not sin(x).has(cos) assert f(x).has(x) assert f(x).has(f) assert not f(x).has(y) assert not f(x).has(g) assert f(x).diff(x).has(x) assert f(x).diff(x).has(f) assert f(x).diff(x).has(Derivative) assert not f(x).diff(x).has(y) assert not f(x).diff(x).has(g) assert not f(x).diff(x).has(sin) assert (x**2).has(Symbol) assert not (x**2).has(Wild) assert (2*p).has(Wild) assert not x.has() def test_has_multiple(): f = x**2*y + sin(2**t + log(z)) assert f.has(x) assert f.has(y) assert f.has(z) assert f.has(t) assert not f.has(u) assert f.has(x, y, z, t) assert f.has(x, y, z, t, u) i = Integer(4400) assert not i.has(x) assert (i*x**i).has(x) assert not (i*y**i).has(x) assert (i*y**i).has(x, y) assert not (i*y**i).has(x, z) def test_has_piecewise(): f = (x*y + 3/y)**(3 + 2) g = Function('g') h = Function('h') p = Piecewise((g(x), x < -1), (1, x <= 1), (f, True)) assert p.has(x) assert p.has(y) assert not p.has(z) assert p.has(1) assert p.has(3) assert not p.has(4) assert p.has(f) assert p.has(g) assert not p.has(h) def test_has_iterative(): A, B, C = symbols('A,B,C', commutative=False) f = x*gamma(x)*sin(x)*exp(x*y)*A*B*C*cos(x*A*B) assert f.has(x) assert f.has(x*y) assert f.has(x*sin(x)) assert not f.has(x*sin(y)) assert f.has(x*A) assert f.has(x*A*B) assert not f.has(x*A*C) assert f.has(x*A*B*C) assert not f.has(x*A*C*B) assert f.has(x*sin(x)*A*B*C) assert not f.has(x*sin(x)*A*C*B) assert not f.has(x*sin(y)*A*B*C) assert f.has(x*gamma(x)) assert not f.has(x + sin(x)) assert (x & y & z).has(x & z) def test_has_integrals(): f = Integral(x**2 + sin(x*y*z), (x, 0, x + y + z)) assert f.has(x + y) assert f.has(x + z) assert f.has(y + z) assert f.has(x*y) assert f.has(x*z) assert f.has(y*z) assert not f.has(2*x + y) assert not f.has(2*x*y) def test_has_tuple(): f = Function('f') g = Function('g') h = Function('h') assert Tuple(x, y).has(x) assert not Tuple(x, y).has(z) assert Tuple(f(x), g(x)).has(x) assert not Tuple(f(x), g(x)).has(y) assert Tuple(f(x), g(x)).has(f) assert Tuple(f(x), g(x)).has(f(x)) assert not Tuple(f, g).has(x) assert Tuple(f, g).has(f) assert not Tuple(f, g).has(h) assert Tuple(True).has(True) is True # .has(1) will also be True def test_has_units(): from sympy.physics.units import m, s assert (x*m/s).has(x) assert (x*m/s).has(y, z) is False def test_has_polys(): poly = Poly(x**2 + x*y*sin(z), x, y, t) assert poly.has(x) assert poly.has(x, y, z) assert poly.has(x, y, z, t) def test_has_physics(): assert FockState((x, y)).has(x) def test_as_poly_as_expr(): f = x**2 + 2*x*y assert f.as_poly().as_expr() == f assert f.as_poly(x, y).as_expr() == f assert (f + sin(x)).as_poly(x, y) is None p = Poly(f, x, y) assert p.as_poly() == p # https://github.com/sympy/sympy/issues/20610 assert S(2).as_poly() is None assert sqrt(2).as_poly(extension=True) is None raises(AttributeError, lambda: Tuple(x, x).as_poly(x)) raises(AttributeError, lambda: Tuple(x ** 2, x, y).as_poly(x)) def test_nonzero(): assert bool(S.Zero) is False assert bool(S.One) is True assert bool(x) is True assert bool(x + y) is True assert bool(x - x) is False assert bool(x*y) is True assert bool(x*1) is True assert bool(x*0) is False def test_is_number(): assert Float(3.14).is_number is True assert Integer(737).is_number is True assert Rational(3, 2).is_number is True assert Rational(8).is_number is True assert x.is_number is False assert (2*x).is_number is False assert (x + y).is_number is False assert log(2).is_number is True assert log(x).is_number is False assert (2 + log(2)).is_number is True assert (8 + log(2)).is_number is True assert (2 + log(x)).is_number is False assert (8 + log(2) + x).is_number is False assert (1 + x**2/x - x).is_number is True assert Tuple(Integer(1)).is_number is False assert Add(2, x).is_number is False assert Mul(3, 4).is_number is True assert Pow(log(2), 2).is_number is True assert oo.is_number is True g = WildFunction('g') assert g.is_number is False assert (2*g).is_number is False assert (x**2).subs(x, 3).is_number is True # test extensibility of .is_number # on subinstances of Basic class A(Basic): pass a = A() assert a.is_number is False def test_as_coeff_add(): assert S(2).as_coeff_add() == (2, ()) assert S(3.0).as_coeff_add() == (0, (S(3.0),)) assert S(-3.0).as_coeff_add() == (0, (S(-3.0),)) assert x.as_coeff_add() == (0, (x,)) assert (x - 1).as_coeff_add() == (-1, (x,)) assert (x + 1).as_coeff_add() == (1, (x,)) assert (x + 2).as_coeff_add() == (2, (x,)) assert (x + y).as_coeff_add(y) == (x, (y,)) assert (3*x).as_coeff_add(y) == (3*x, ()) # don't do expansion e = (x + y)**2 assert e.as_coeff_add(y) == (0, (e,)) def test_as_coeff_mul(): assert S(2).as_coeff_mul() == (2, ()) assert S(3.0).as_coeff_mul() == (1, (S(3.0),)) assert S(-3.0).as_coeff_mul() == (-1, (S(3.0),)) assert S(-3.0).as_coeff_mul(rational=False) == (-S(3.0), ()) assert x.as_coeff_mul() == (1, (x,)) assert (-x).as_coeff_mul() == (-1, (x,)) assert (2*x).as_coeff_mul() == (2, (x,)) assert (x*y).as_coeff_mul(y) == (x, (y,)) assert (3 + x).as_coeff_mul() == (1, (3 + x,)) assert (3 + x).as_coeff_mul(y) == (3 + x, ()) # don't do expansion e = exp(x + y) assert e.as_coeff_mul(y) == (1, (e,)) e = 2**(x + y) assert e.as_coeff_mul(y) == (1, (e,)) assert (1.1*x).as_coeff_mul(rational=False) == (1.1, (x,)) assert (1.1*x).as_coeff_mul() == (1, (1.1, x)) assert (-oo*x).as_coeff_mul(rational=True) == (-1, (oo, x)) def test_as_coeff_exponent(): assert (3*x**4).as_coeff_exponent(x) == (3, 4) assert (2*x**3).as_coeff_exponent(x) == (2, 3) assert (4*x**2).as_coeff_exponent(x) == (4, 2) assert (6*x**1).as_coeff_exponent(x) == (6, 1) assert (3*x**0).as_coeff_exponent(x) == (3, 0) assert (2*x**0).as_coeff_exponent(x) == (2, 0) assert (1*x**0).as_coeff_exponent(x) == (1, 0) assert (0*x**0).as_coeff_exponent(x) == (0, 0) assert (-1*x**0).as_coeff_exponent(x) == (-1, 0) assert (-2*x**0).as_coeff_exponent(x) == (-2, 0) assert (2*x**3 + pi*x**3).as_coeff_exponent(x) == (2 + pi, 3) assert (x*log(2)/(2*x + pi*x)).as_coeff_exponent(x) == \ (log(2)/(2 + pi), 0) # issue 4784 D = Derivative f = Function('f') fx = D(f(x), x) assert fx.as_coeff_exponent(f(x)) == (fx, 0) def test_extractions(): for base in (2, S.Exp1): assert Pow(base**x, 3, evaluate=False ).extract_multiplicatively(base**x) == base**(2*x) assert (base**(5*x)).extract_multiplicatively( base**(3*x)) == base**(2*x) assert ((x*y)**3).extract_multiplicatively(x**2 * y) == x*y**2 assert ((x*y)**3).extract_multiplicatively(x**4 * y) is None assert (2*x).extract_multiplicatively(2) == x assert (2*x).extract_multiplicatively(3) is None assert (2*x).extract_multiplicatively(-1) is None assert (S.Half*x).extract_multiplicatively(3) == x/6 assert (sqrt(x)).extract_multiplicatively(x) is None assert (sqrt(x)).extract_multiplicatively(1/x) is None assert x.extract_multiplicatively(-x) is None assert (-2 - 4*I).extract_multiplicatively(-2) == 1 + 2*I assert (-2 - 4*I).extract_multiplicatively(3) is None assert (-2*x - 4*y - 8).extract_multiplicatively(-2) == x + 2*y + 4 assert (-2*x*y - 4*x**2*y).extract_multiplicatively(-2*y) == 2*x**2 + x assert (2*x*y + 4*x**2*y).extract_multiplicatively(2*y) == 2*x**2 + x assert (-4*y**2*x).extract_multiplicatively(-3*y) is None assert (2*x).extract_multiplicatively(1) == 2*x assert (-oo).extract_multiplicatively(5) is -oo assert (oo).extract_multiplicatively(5) is oo assert ((x*y)**3).extract_additively(1) is None assert (x + 1).extract_additively(x) == 1 assert (x + 1).extract_additively(2*x) is None assert (x + 1).extract_additively(-x) is None assert (-x + 1).extract_additively(2*x) is None assert (2*x + 3).extract_additively(x) == x + 3 assert (2*x + 3).extract_additively(2) == 2*x + 1 assert (2*x + 3).extract_additively(3) == 2*x assert (2*x + 3).extract_additively(-2) is None assert (2*x + 3).extract_additively(3*x) is None assert (2*x + 3).extract_additively(2*x) == 3 assert x.extract_additively(0) == x assert S(2).extract_additively(x) is None assert S(2.).extract_additively(2) is S.Zero assert S(2*x + 3).extract_additively(x + 1) == x + 2 assert S(2*x + 3).extract_additively(y + 1) is None assert S(2*x - 3).extract_additively(x + 1) is None assert S(2*x - 3).extract_additively(y + z) is None assert ((a + 1)*x*4 + y).extract_additively(x).expand() == \ 4*a*x + 3*x + y assert ((a + 1)*x*4 + 3*y).extract_additively(x + 2*y).expand() == \ 4*a*x + 3*x + y assert (y*(x + 1)).extract_additively(x + 1) is None assert ((y + 1)*(x + 1) + 3).extract_additively(x + 1) == \ y*(x + 1) + 3 assert ((x + y)*(x + 1) + x + y + 3).extract_additively(x + y) == \ x*(x + y) + 3 assert (x + y + 2*((x + y)*(x + 1)) + 3).extract_additively((x + y)*(x + 1)) == \ x + y + (x + 1)*(x + y) + 3 assert ((y + 1)*(x + 2*y + 1) + 3).extract_additively(y + 1) == \ (x + 2*y)*(y + 1) + 3 n = Symbol("n", integer=True) assert (Integer(-3)).could_extract_minus_sign() is True assert (-n*x + x).could_extract_minus_sign() != \ (n*x - x).could_extract_minus_sign() assert (x - y).could_extract_minus_sign() != \ (-x + y).could_extract_minus_sign() assert (1 - x - y).could_extract_minus_sign() is True assert (1 - x + y).could_extract_minus_sign() is False assert ((-x - x*y)/y).could_extract_minus_sign() is False assert ((x + x*y)/(-y)).could_extract_minus_sign() is True assert ((x + x*y)/y).could_extract_minus_sign() is False assert ((-x - y)/(x + y)).could_extract_minus_sign() is False class sign_invariant(Function, Expr): nargs = 1 def __neg__(self): return self foo = sign_invariant(x) assert foo == -foo assert foo.could_extract_minus_sign() is False assert (x - y).could_extract_minus_sign() is False assert (-x + y).could_extract_minus_sign() is True assert (x - 1).could_extract_minus_sign() is False assert (1 - x).could_extract_minus_sign() is True assert (sqrt(2) - 1).could_extract_minus_sign() is True assert (1 - sqrt(2)).could_extract_minus_sign() is False # check that result is canonical eq = (3*x + 15*y).extract_multiplicatively(3) assert eq.args == eq.func(*eq.args).args def test_nan_extractions(): for r in (1, 0, I, nan): assert nan.extract_additively(r) is None assert nan.extract_multiplicatively(r) is None def test_coeff(): assert (x + 1).coeff(x + 1) == 1 assert (3*x).coeff(0) == 0 assert (z*(1 + x)*x**2).coeff(1 + x) == z*x**2 assert (1 + 2*x*x**(1 + x)).coeff(x*x**(1 + x)) == 2 assert (1 + 2*x**(y + z)).coeff(x**(y + z)) == 2 assert (3 + 2*x + 4*x**2).coeff(1) == 0 assert (3 + 2*x + 4*x**2).coeff(-1) == 0 assert (3 + 2*x + 4*x**2).coeff(x) == 2 assert (3 + 2*x + 4*x**2).coeff(x**2) == 4 assert (3 + 2*x + 4*x**2).coeff(x**3) == 0 assert (-x/8 + x*y).coeff(x) == Rational(-1, 8) + y assert (-x/8 + x*y).coeff(-x) == S.One/8 assert (4*x).coeff(2*x) == 0 assert (2*x).coeff(2*x) == 1 assert (-oo*x).coeff(x*oo) == -1 assert (10*x).coeff(x, 0) == 0 assert (10*x).coeff(10*x, 0) == 0 n1, n2 = symbols('n1 n2', commutative=False) assert (n1*n2).coeff(n1) == 1 assert (n1*n2).coeff(n2) == n1 assert (n1*n2 + x*n1).coeff(n1) == 1 # 1*n1*(n2+x) assert (n2*n1 + x*n1).coeff(n1) == n2 + x assert (n2*n1 + x*n1**2).coeff(n1) == n2 assert (n1**x).coeff(n1) == 0 assert (n1*n2 + n2*n1).coeff(n1) == 0 assert (2*(n1 + n2)*n2).coeff(n1 + n2, right=1) == n2 assert (2*(n1 + n2)*n2).coeff(n1 + n2, right=0) == 2 f = Function('f') assert (2*f(x) + 3*f(x).diff(x)).coeff(f(x)) == 2 expr = z*(x + y)**2 expr2 = z*(x + y)**2 + z*(2*x + 2*y)**2 assert expr.coeff(z) == (x + y)**2 assert expr.coeff(x + y) == 0 assert expr2.coeff(z) == (x + y)**2 + (2*x + 2*y)**2 assert (x + y + 3*z).coeff(1) == x + y assert (-x + 2*y).coeff(-1) == x assert (x - 2*y).coeff(-1) == 2*y assert (3 + 2*x + 4*x**2).coeff(1) == 0 assert (-x - 2*y).coeff(2) == -y assert (x + sqrt(2)*x).coeff(sqrt(2)) == x assert (3 + 2*x + 4*x**2).coeff(x) == 2 assert (3 + 2*x + 4*x**2).coeff(x**2) == 4 assert (3 + 2*x + 4*x**2).coeff(x**3) == 0 assert (z*(x + y)**2).coeff((x + y)**2) == z assert (z*(x + y)**2).coeff(x + y) == 0 assert (2 + 2*x + (x + 1)*y).coeff(x + 1) == y assert (x + 2*y + 3).coeff(1) == x assert (x + 2*y + 3).coeff(x, 0) == 2*y + 3 assert (x**2 + 2*y + 3*x).coeff(x**2, 0) == 2*y + 3*x assert x.coeff(0, 0) == 0 assert x.coeff(x, 0) == 0 n, m, o, l = symbols('n m o l', commutative=False) assert n.coeff(n) == 1 assert y.coeff(n) == 0 assert (3*n).coeff(n) == 3 assert (2 + n).coeff(x*m) == 0 assert (2*x*n*m).coeff(x) == 2*n*m assert (2 + n).coeff(x*m*n + y) == 0 assert (2*x*n*m).coeff(3*n) == 0 assert (n*m + m*n*m).coeff(n) == 1 + m assert (n*m + m*n*m).coeff(n, right=True) == m # = (1 + m)*n*m assert (n*m + m*n).coeff(n) == 0 assert (n*m + o*m*n).coeff(m*n) == o assert (n*m + o*m*n).coeff(m*n, right=True) == 1 assert (n*m + n*m*n).coeff(n*m, right=True) == 1 + n # = n*m*(n + 1) assert (x*y).coeff(z, 0) == x*y assert (x*n + y*n + z*m).coeff(n) == x + y assert (n*m + n*o + o*l).coeff(n, right=True) == m + o assert (x*n*m*n + y*n*m*o + z*l).coeff(m, right=True) == x*n + y*o assert (x*n*m*n + x*n*m*o + z*l).coeff(m, right=True) == n + o assert (x*n*m*n + x*n*m*o + z*l).coeff(m) == x*n def test_coeff2(): r, kappa = symbols('r, kappa') psi = Function("psi") g = 1/r**2 * (2*r*psi(r).diff(r, 1) + r**2 * psi(r).diff(r, 2)) g = g.expand() assert g.coeff(psi(r).diff(r)) == 2/r def test_coeff2_0(): r, kappa = symbols('r, kappa') psi = Function("psi") g = 1/r**2 * (2*r*psi(r).diff(r, 1) + r**2 * psi(r).diff(r, 2)) g = g.expand() assert g.coeff(psi(r).diff(r, 2)) == 1 def test_coeff_expand(): expr = z*(x + y)**2 expr2 = z*(x + y)**2 + z*(2*x + 2*y)**2 assert expr.coeff(z) == (x + y)**2 assert expr2.coeff(z) == (x + y)**2 + (2*x + 2*y)**2 def test_integrate(): assert x.integrate(x) == x**2/2 assert x.integrate((x, 0, 1)) == S.Half def test_as_base_exp(): assert x.as_base_exp() == (x, S.One) assert (x*y*z).as_base_exp() == (x*y*z, S.One) assert (x + y + z).as_base_exp() == (x + y + z, S.One) assert ((x + y)**z).as_base_exp() == (x + y, z) def test_issue_4963(): assert hasattr(Mul(x, y), "is_commutative") assert hasattr(Mul(x, y, evaluate=False), "is_commutative") assert hasattr(Pow(x, y), "is_commutative") assert hasattr(Pow(x, y, evaluate=False), "is_commutative") expr = Mul(Pow(2, 2, evaluate=False), 3, evaluate=False) + 1 assert hasattr(expr, "is_commutative") def test_action_verbs(): assert nsimplify(1/(exp(3*pi*x/5) + 1)) == \ (1/(exp(3*pi*x/5) + 1)).nsimplify() assert ratsimp(1/x + 1/y) == (1/x + 1/y).ratsimp() assert trigsimp(log(x), deep=True) == (log(x)).trigsimp(deep=True) assert radsimp(1/(2 + sqrt(2))) == (1/(2 + sqrt(2))).radsimp() assert radsimp(1/(a + b*sqrt(c)), symbolic=False) == \ (1/(a + b*sqrt(c))).radsimp(symbolic=False) assert powsimp(x**y*x**z*y**z, combine='all') == \ (x**y*x**z*y**z).powsimp(combine='all') assert (x**t*y**t).powsimp(force=True) == (x*y)**t assert simplify(x**y*x**z*y**z) == (x**y*x**z*y**z).simplify() assert together(1/x + 1/y) == (1/x + 1/y).together() assert collect(a*x**2 + b*x**2 + a*x - b*x + c, x) == \ (a*x**2 + b*x**2 + a*x - b*x + c).collect(x) assert apart(y/(y + 2)/(y + 1), y) == (y/(y + 2)/(y + 1)).apart(y) assert combsimp(y/(x + 2)/(x + 1)) == (y/(x + 2)/(x + 1)).combsimp() assert gammasimp(gamma(x)/gamma(x-5)) == (gamma(x)/gamma(x-5)).gammasimp() assert factor(x**2 + 5*x + 6) == (x**2 + 5*x + 6).factor() assert refine(sqrt(x**2)) == sqrt(x**2).refine() assert cancel((x**2 + 5*x + 6)/(x + 2)) == ((x**2 + 5*x + 6)/(x + 2)).cancel() def test_as_powers_dict(): assert x.as_powers_dict() == {x: 1} assert (x**y*z).as_powers_dict() == {x: y, z: 1} assert Mul(2, 2, evaluate=False).as_powers_dict() == {S(2): S(2)} assert (x*y).as_powers_dict()[z] == 0 assert (x + y).as_powers_dict()[z] == 0 def test_as_coefficients_dict(): check = [S.One, x, y, x*y, 1] assert [Add(3*x, 2*x, y, 3).as_coefficients_dict()[i] for i in check] == \ [3, 5, 1, 0, 3] assert [Add(3*x, 2*x, y, 3, evaluate=False).as_coefficients_dict()[i] for i in check] == [3, 5, 1, 0, 3] assert [(3*x*y).as_coefficients_dict()[i] for i in check] == \ [0, 0, 0, 3, 0] assert [(3.0*x*y).as_coefficients_dict()[i] for i in check] == \ [0, 0, 0, 3.0, 0] assert (3.0*x*y).as_coefficients_dict()[3.0*x*y] == 0 def test_args_cnc(): A = symbols('A', commutative=False) assert (x + A).args_cnc() == \ [[], [x + A]] assert (x + a).args_cnc() == \ [[a + x], []] assert (x*a).args_cnc() == \ [[a, x], []] assert (x*y*A*(A + 1)).args_cnc(cset=True) == \ [{x, y}, [A, 1 + A]] assert Mul(x, x, evaluate=False).args_cnc(cset=True, warn=False) == \ [{x}, []] assert Mul(x, x**2, evaluate=False).args_cnc(cset=True, warn=False) == \ [{x, x**2}, []] raises(ValueError, lambda: Mul(x, x, evaluate=False).args_cnc(cset=True)) assert Mul(x, y, x, evaluate=False).args_cnc() == \ [[x, y, x], []] # always split -1 from leading number assert (-1.*x).args_cnc() == [[-1, 1.0, x], []] def test_new_rawargs(): n = Symbol('n', commutative=False) a = x + n assert a.is_commutative is False assert a._new_rawargs(x).is_commutative assert a._new_rawargs(x, y).is_commutative assert a._new_rawargs(x, n).is_commutative is False assert a._new_rawargs(x, y, n).is_commutative is False m = x*n assert m.is_commutative is False assert m._new_rawargs(x).is_commutative assert m._new_rawargs(n).is_commutative is False assert m._new_rawargs(x, y).is_commutative assert m._new_rawargs(x, n).is_commutative is False assert m._new_rawargs(x, y, n).is_commutative is False assert m._new_rawargs(x, n, reeval=False).is_commutative is False assert m._new_rawargs(S.One) is S.One def test_issue_5226(): assert Add(evaluate=False) == 0 assert Mul(evaluate=False) == 1 assert Mul(x + y, evaluate=False).is_Add def test_free_symbols(): # free_symbols should return the free symbols of an object assert S.One.free_symbols == set() assert x.free_symbols == {x} assert Integral(x, (x, 1, y)).free_symbols == {y} assert (-Integral(x, (x, 1, y))).free_symbols == {y} assert meter.free_symbols == set() assert (meter**x).free_symbols == {x} def test_issue_5300(): x = Symbol('x', commutative=False) assert x*sqrt(2)/sqrt(6) == x*sqrt(3)/3 def test_floordiv(): from sympy.functions.elementary.integers import floor assert x // y == floor(x / y) def test_as_coeff_Mul(): assert Integer(3).as_coeff_Mul() == (Integer(3), Integer(1)) assert Rational(3, 4).as_coeff_Mul() == (Rational(3, 4), Integer(1)) assert Float(5.0).as_coeff_Mul() == (Float(5.0), Integer(1)) assert (Integer(3)*x).as_coeff_Mul() == (Integer(3), x) assert (Rational(3, 4)*x).as_coeff_Mul() == (Rational(3, 4), x) assert (Float(5.0)*x).as_coeff_Mul() == (Float(5.0), x) assert (Integer(3)*x*y).as_coeff_Mul() == (Integer(3), x*y) assert (Rational(3, 4)*x*y).as_coeff_Mul() == (Rational(3, 4), x*y) assert (Float(5.0)*x*y).as_coeff_Mul() == (Float(5.0), x*y) assert (x).as_coeff_Mul() == (S.One, x) assert (x*y).as_coeff_Mul() == (S.One, x*y) assert (-oo*x).as_coeff_Mul(rational=True) == (-1, oo*x) def test_as_coeff_Add(): assert Integer(3).as_coeff_Add() == (Integer(3), Integer(0)) assert Rational(3, 4).as_coeff_Add() == (Rational(3, 4), Integer(0)) assert Float(5.0).as_coeff_Add() == (Float(5.0), Integer(0)) assert (Integer(3) + x).as_coeff_Add() == (Integer(3), x) assert (Rational(3, 4) + x).as_coeff_Add() == (Rational(3, 4), x) assert (Float(5.0) + x).as_coeff_Add() == (Float(5.0), x) assert (Float(5.0) + x).as_coeff_Add(rational=True) == (0, Float(5.0) + x) assert (Integer(3) + x + y).as_coeff_Add() == (Integer(3), x + y) assert (Rational(3, 4) + x + y).as_coeff_Add() == (Rational(3, 4), x + y) assert (Float(5.0) + x + y).as_coeff_Add() == (Float(5.0), x + y) assert (x).as_coeff_Add() == (S.Zero, x) assert (x*y).as_coeff_Add() == (S.Zero, x*y) def test_expr_sorting(): f, g = symbols('f,g', cls=Function) exprs = [1/x**2, 1/x, sqrt(sqrt(x)), sqrt(x), x, sqrt(x)**3, x**2] assert sorted(exprs, key=default_sort_key) == exprs exprs = [x, 2*x, 2*x**2, 2*x**3, x**n, 2*x**n, sin(x), sin(x)**n, sin(x**2), cos(x), cos(x**2), tan(x)] assert sorted(exprs, key=default_sort_key) == exprs exprs = [x + 1, x**2 + x + 1, x**3 + x**2 + x + 1] assert sorted(exprs, key=default_sort_key) == exprs exprs = [S(4), x - 3*I/2, x + 3*I/2, x - 4*I + 1, x + 4*I + 1] assert sorted(exprs, key=default_sort_key) == exprs exprs = [f(1), f(2), f(3), f(1, 2, 3), g(1), g(2), g(3), g(1, 2, 3)] assert sorted(exprs, key=default_sort_key) == exprs exprs = [f(x), g(x), exp(x), sin(x), cos(x), factorial(x)] assert sorted(exprs, key=default_sort_key) == exprs exprs = [Tuple(x, y), Tuple(x, z), Tuple(x, y, z)] assert sorted(exprs, key=default_sort_key) == exprs exprs = [[3], [1, 2]] assert sorted(exprs, key=default_sort_key) == exprs exprs = [[1, 2], [2, 3]] assert sorted(exprs, key=default_sort_key) == exprs exprs = [[1, 2], [1, 2, 3]] assert sorted(exprs, key=default_sort_key) == exprs exprs = [{x: -y}, {x: y}] assert sorted(exprs, key=default_sort_key) == exprs exprs = [{1}, {1, 2}] assert sorted(exprs, key=default_sort_key) == exprs a, b = exprs = [Dummy('x'), Dummy('x')] assert sorted([b, a], key=default_sort_key) == exprs def test_as_ordered_factors(): f, g = symbols('f,g', cls=Function) assert x.as_ordered_factors() == [x] assert (2*x*x**n*sin(x)*cos(x)).as_ordered_factors() \ == [Integer(2), x, x**n, sin(x), cos(x)] args = [f(1), f(2), f(3), f(1, 2, 3), g(1), g(2), g(3), g(1, 2, 3)] expr = Mul(*args) assert expr.as_ordered_factors() == args A, B = symbols('A,B', commutative=False) assert (A*B).as_ordered_factors() == [A, B] assert (B*A).as_ordered_factors() == [B, A] def test_as_ordered_terms(): f, g = symbols('f,g', cls=Function) assert x.as_ordered_terms() == [x] assert (sin(x)**2*cos(x) + sin(x)*cos(x)**2 + 1).as_ordered_terms() \ == [sin(x)**2*cos(x), sin(x)*cos(x)**2, 1] args = [f(1), f(2), f(3), f(1, 2, 3), g(1), g(2), g(3), g(1, 2, 3)] expr = Add(*args) assert expr.as_ordered_terms() == args assert (1 + 4*sqrt(3)*pi*x).as_ordered_terms() == [4*pi*x*sqrt(3), 1] assert ( 2 + 3*I).as_ordered_terms() == [2, 3*I] assert (-2 + 3*I).as_ordered_terms() == [-2, 3*I] assert ( 2 - 3*I).as_ordered_terms() == [2, -3*I] assert (-2 - 3*I).as_ordered_terms() == [-2, -3*I] assert ( 4 + 3*I).as_ordered_terms() == [4, 3*I] assert (-4 + 3*I).as_ordered_terms() == [-4, 3*I] assert ( 4 - 3*I).as_ordered_terms() == [4, -3*I] assert (-4 - 3*I).as_ordered_terms() == [-4, -3*I] f = x**2*y**2 + x*y**4 + y + 2 assert f.as_ordered_terms(order="lex") == [x**2*y**2, x*y**4, y, 2] assert f.as_ordered_terms(order="grlex") == [x*y**4, x**2*y**2, y, 2] assert f.as_ordered_terms(order="rev-lex") == [2, y, x*y**4, x**2*y**2] assert f.as_ordered_terms(order="rev-grlex") == [2, y, x**2*y**2, x*y**4] k = symbols('k') assert k.as_ordered_terms(data=True) == ([(k, ((1.0, 0.0), (1,), ()))], [k]) def test_sort_key_atomic_expr(): from sympy.physics.units import m, s assert sorted([-m, s], key=lambda arg: arg.sort_key()) == [-m, s] def test_eval_interval(): assert exp(x)._eval_interval(*Tuple(x, 0, 1)) == exp(1) - exp(0) # issue 4199 a = x/y raises(NotImplementedError, lambda: a._eval_interval(x, S.Zero, oo)._eval_interval(y, oo, S.Zero)) raises(NotImplementedError, lambda: a._eval_interval(x, S.Zero, oo)._eval_interval(y, S.Zero, oo)) a = x - y raises(NotImplementedError, lambda: a._eval_interval(x, S.One, oo)._eval_interval(y, oo, S.One)) raises(ValueError, lambda: x._eval_interval(x, None, None)) a = -y*Heaviside(x - y) assert a._eval_interval(x, -oo, oo) == -y assert a._eval_interval(x, oo, -oo) == y def test_eval_interval_zoo(): # Test that limit is used when zoo is returned assert Si(1/x)._eval_interval(x, S.Zero, S.One) == -pi/2 + Si(1) def test_primitive(): assert (3*(x + 1)**2).primitive() == (3, (x + 1)**2) assert (6*x + 2).primitive() == (2, 3*x + 1) assert (x/2 + 3).primitive() == (S.Half, x + 6) eq = (6*x + 2)*(x/2 + 3) assert eq.primitive()[0] == 1 eq = (2 + 2*x)**2 assert eq.primitive()[0] == 1 assert (4.0*x).primitive() == (1, 4.0*x) assert (4.0*x + y/2).primitive() == (S.Half, 8.0*x + y) assert (-2*x).primitive() == (2, -x) assert Add(5*z/7, 0.5*x, 3*y/2, evaluate=False).primitive() == \ (S.One/14, 7.0*x + 21*y + 10*z) for i in [S.Infinity, S.NegativeInfinity, S.ComplexInfinity]: assert (i + x/3).primitive() == \ (S.One/3, i + x) assert (S.Infinity + 2*x/3 + 4*y/7).primitive() == \ (S.One/21, 14*x + 12*y + oo) assert S.Zero.primitive() == (S.One, S.Zero) def test_issue_5843(): a = 1 + x assert (2*a).extract_multiplicatively(a) == 2 assert (4*a).extract_multiplicatively(2*a) == 2 assert ((3*a)*(2*a)).extract_multiplicatively(a) == 6*a def test_is_constant(): from sympy.solvers.solvers import checksol assert Sum(x, (x, 1, 10)).is_constant() is True assert Sum(x, (x, 1, n)).is_constant() is False assert Sum(x, (x, 1, n)).is_constant(y) is True assert Sum(x, (x, 1, n)).is_constant(n) is False assert Sum(x, (x, 1, n)).is_constant(x) is True eq = a*cos(x)**2 + a*sin(x)**2 - a assert eq.is_constant() is True assert eq.subs({x: pi, a: 2}) == eq.subs({x: pi, a: 3}) == 0 assert x.is_constant() is False assert x.is_constant(y) is True assert log(x/y).is_constant() is False assert checksol(x, x, Sum(x, (x, 1, n))) is False assert checksol(x, x, Sum(x, (x, 1, n))) is False f = Function('f') assert f(1).is_constant assert checksol(x, x, f(x)) is False assert Pow(x, S.Zero, evaluate=False).is_constant() is True # == 1 assert Pow(S.Zero, x, evaluate=False).is_constant() is False # == 0 or 1 assert (2**x).is_constant() is False assert Pow(S(2), S(3), evaluate=False).is_constant() is True z1, z2 = symbols('z1 z2', zero=True) assert (z1 + 2*z2).is_constant() is True assert meter.is_constant() is True assert (3*meter).is_constant() is True assert (x*meter).is_constant() is False def test_equals(): assert (-3 - sqrt(5) + (-sqrt(10)/2 - sqrt(2)/2)**2).equals(0) assert (x**2 - 1).equals((x + 1)*(x - 1)) assert (cos(x)**2 + sin(x)**2).equals(1) assert (a*cos(x)**2 + a*sin(x)**2).equals(a) r = sqrt(2) assert (-1/(r + r*x) + 1/r/(1 + x)).equals(0) assert factorial(x + 1).equals((x + 1)*factorial(x)) assert sqrt(3).equals(2*sqrt(3)) is False assert (sqrt(5)*sqrt(3)).equals(sqrt(3)) is False assert (sqrt(5) + sqrt(3)).equals(0) is False assert (sqrt(5) + pi).equals(0) is False assert meter.equals(0) is False assert (3*meter**2).equals(0) is False eq = -(-1)**(S(3)/4)*6**(S.One/4) + (-6)**(S.One/4)*I if eq != 0: # if canonicalization makes this zero, skip the test assert eq.equals(0) assert sqrt(x).equals(0) is False # from integrate(x*sqrt(1 + 2*x), x); # diff is zero only when assumptions allow i = 2*sqrt(2)*x**(S(5)/2)*(1 + 1/(2*x))**(S(5)/2)/5 + \ 2*sqrt(2)*x**(S(3)/2)*(1 + 1/(2*x))**(S(5)/2)/(-6 - 3/x) ans = sqrt(2*x + 1)*(6*x**2 + x - 1)/15 diff = i - ans assert diff.equals(0) is None # should be False, but previously this was False due to wrong intermediate result assert diff.subs(x, Rational(-1, 2)/2) == 7*sqrt(2)/120 # there are regions for x for which the expression is True, for # example, when x < -1/2 or x > 0 the expression is zero p = Symbol('p', positive=True) assert diff.subs(x, p).equals(0) is True assert diff.subs(x, -1).equals(0) is True # prove via minimal_polynomial or self-consistency eq = sqrt(1 + sqrt(3)) + sqrt(3 + 3*sqrt(3)) - sqrt(10 + 6*sqrt(3)) assert eq.equals(0) q = 3**Rational(1, 3) + 3 p = expand(q**3)**Rational(1, 3) assert (p - q).equals(0) # issue 6829 # eq = q*x + q/4 + x**4 + x**3 + 2*x**2 - S.One/3 # z = eq.subs(x, solve(eq, x)[0]) q = symbols('q') z = (q*(-sqrt(-2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/12)/2 - sqrt((2*q - S(7)/4)/sqrt(-2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/12) + 2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/6)/2 - S.One/4) + q/4 + (-sqrt(-2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/12)/2 - sqrt((2*q - S(7)/4)/sqrt(-2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/12) + 2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/6)/2 - S.One/4)**4 + (-sqrt(-2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/12)/2 - sqrt((2*q - S(7)/4)/sqrt(-2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/12) + 2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/6)/2 - S.One/4)**3 + 2*(-sqrt(-2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/12)/2 - sqrt((2*q - S(7)/4)/sqrt(-2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/12) + 2*(-(q - S(7)/8)**S(2)/8 - S(2197)/13824)**(S.One/3) - S(13)/6)/2 - S.One/4)**2 - Rational(1, 3)) assert z.equals(0) def test_random(): from sympy.functions.combinatorial.numbers import lucas from sympy.simplify.simplify import posify assert posify(x)[0]._random() is not None assert lucas(n)._random(2, -2, 0, -1, 1) is None # issue 8662 assert Piecewise((Max(x, y), z))._random() is None def test_round(): assert str(Float('0.1249999').round(2)) == '0.12' d20 = 12345678901234567890 ans = S(d20).round(2) assert ans.is_Integer and ans == d20 ans = S(d20).round(-2) assert ans.is_Integer and ans == 12345678901234567900 assert str(S('1/7').round(4)) == '0.1429' assert str(S('.[12345]').round(4)) == '0.1235' assert str(S('.1349').round(2)) == '0.13' n = S(12345) ans = n.round() assert ans.is_Integer assert ans == n ans = n.round(1) assert ans.is_Integer assert ans == n ans = n.round(4) assert ans.is_Integer assert ans == n assert n.round(-1) == 12340 r = Float(str(n)).round(-4) assert r == 10000 assert n.round(-5) == 0 assert str((pi + sqrt(2)).round(2)) == '4.56' assert (10*(pi + sqrt(2))).round(-1) == 50 raises(TypeError, lambda: round(x + 2, 2)) assert str(S(2.3).round(1)) == '2.3' # rounding in SymPy (as in Decimal) should be # exact for the given precision; we check here # that when a 5 follows the last digit that # the rounded digit will be even. for i in range(-99, 100): # construct a decimal that ends in 5, e.g. 123 -> 0.1235 s = str(abs(i)) p = len(s) # we are going to round to the last digit of i n = '0.%s5' % s # put a 5 after i's digits j = p + 2 # 2 for '0.' if i < 0: # 1 for '-' j += 1 n = '-' + n v = str(Float(n).round(p))[:j] # pertinent digits if v.endswith('.'): continue # it ends with 0 which is even L = int(v[-1]) # last digit assert L % 2 == 0, (n, '->', v) assert (Float(.3, 3) + 2*pi).round() == 7 assert (Float(.3, 3) + 2*pi*100).round() == 629 assert (pi + 2*E*I).round() == 3 + 5*I # don't let request for extra precision give more than # what is known (in this case, only 3 digits) assert str((Float(.03, 3) + 2*pi/100).round(5)) == '0.0928' assert str((Float(.03, 3) + 2*pi/100).round(4)) == '0.0928' assert S.Zero.round() == 0 a = (Add(1, Float('1.' + '9'*27, ''), evaluate=0)) assert a.round(10) == Float('3.0000000000', '') assert a.round(25) == Float('3.0000000000000000000000000', '') assert a.round(26) == Float('3.00000000000000000000000000', '') assert a.round(27) == Float('2.999999999999999999999999999', '') assert a.round(30) == Float('2.999999999999999999999999999', '') raises(TypeError, lambda: x.round()) f = Function('f') raises(TypeError, lambda: f(1).round()) # exact magnitude of 10 assert str(S.One.round()) == '1' assert str(S(100).round()) == '100' # applied to real and imaginary portions assert (2*pi + E*I).round() == 6 + 3*I assert (2*pi + I/10).round() == 6 assert (pi/10 + 2*I).round() == 2*I # the lhs re and im parts are Float with dps of 2 # and those on the right have dps of 15 so they won't compare # equal unless we use string or compare components (which will # then coerce the floats to the same precision) or re-create # the floats assert str((pi/10 + E*I).round(2)) == '0.31 + 2.72*I' assert str((pi/10 + E*I).round(2).as_real_imag()) == '(0.31, 2.72)' assert str((pi/10 + E*I).round(2)) == '0.31 + 2.72*I' # issue 6914 assert (I**(I + 3)).round(3) == Float('-0.208', '')*I # issue 8720 assert S(-123.6).round() == -124 assert S(-1.5).round() == -2 assert S(-100.5).round() == -100 assert S(-1.5 - 10.5*I).round() == -2 - 10*I # issue 7961 assert str(S(0.006).round(2)) == '0.01' assert str(S(0.00106).round(4)) == '0.0011' # issue 8147 assert S.NaN.round() is S.NaN assert S.Infinity.round() is S.Infinity assert S.NegativeInfinity.round() is S.NegativeInfinity assert S.ComplexInfinity.round() is S.ComplexInfinity # check that types match for i in range(2): f = float(i) # 2 args assert all(type(round(i, p)) is int for p in (-1, 0, 1)) assert all(S(i).round(p).is_Integer for p in (-1, 0, 1)) assert all(type(round(f, p)) is float for p in (-1, 0, 1)) assert all(S(f).round(p).is_Float for p in (-1, 0, 1)) # 1 arg (p is None) assert type(round(i)) is int assert S(i).round().is_Integer assert type(round(f)) is int assert S(f).round().is_Integer def test_held_expression_UnevaluatedExpr(): x = symbols("x") he = UnevaluatedExpr(1/x) e1 = x*he assert isinstance(e1, Mul) assert e1.args == (x, he) assert e1.doit() == 1 assert UnevaluatedExpr(Derivative(x, x)).doit(deep=False ) == Derivative(x, x) assert UnevaluatedExpr(Derivative(x, x)).doit() == 1 xx = Mul(x, x, evaluate=False) assert xx != x**2 ue2 = UnevaluatedExpr(xx) assert isinstance(ue2, UnevaluatedExpr) assert ue2.args == (xx,) assert ue2.doit() == x**2 assert ue2.doit(deep=False) == xx x2 = UnevaluatedExpr(2)*2 assert type(x2) is Mul assert x2.args == (2, UnevaluatedExpr(2)) def test_round_exception_nostr(): # Don't use the string form of the expression in the round exception, as # it's too slow s = Symbol('bad') try: s.round() except TypeError as e: assert 'bad' not in str(e) else: # Did not raise raise AssertionError("Did not raise") def test_extract_branch_factor(): assert exp_polar(2.0*I*pi).extract_branch_factor() == (1, 1) def test_identity_removal(): assert Add.make_args(x + 0) == (x,) assert Mul.make_args(x*1) == (x,) def test_float_0(): assert Float(0.0) + 1 == Float(1.0) @XFAIL def test_float_0_fail(): assert Float(0.0)*x == Float(0.0) assert (x + Float(0.0)).is_Add def test_issue_6325(): ans = (b**2 + z**2 - (b*(a + b*t) + z*(c + t*z))**2/( (a + b*t)**2 + (c + t*z)**2))/sqrt((a + b*t)**2 + (c + t*z)**2) e = sqrt((a + b*t)**2 + (c + z*t)**2) assert diff(e, t, 2) == ans assert e.diff(t, 2) == ans assert diff(e, t, 2, simplify=False) != ans def test_issue_7426(): f1 = a % c f2 = x % z assert f1.equals(f2) is None def test_issue_11122(): x = Symbol('x', extended_positive=False) assert unchanged(Gt, x, 0) # (x > 0) # (x > 0) should remain unevaluated after PR #16956 x = Symbol('x', positive=False, real=True) assert (x > 0) is S.false def test_issue_10651(): x = Symbol('x', real=True) e1 = (-1 + x)/(1 - x) e3 = (4*x**2 - 4)/((1 - x)*(1 + x)) e4 = 1/(cos(x)**2) - (tan(x))**2 x = Symbol('x', positive=True) e5 = (1 + x)/x assert e1.is_constant() is None assert e3.is_constant() is None assert e4.is_constant() is None assert e5.is_constant() is False def test_issue_10161(): x = symbols('x', real=True) assert x*abs(x)*abs(x) == x**3 def test_issue_10755(): x = symbols('x') raises(TypeError, lambda: int(log(x))) raises(TypeError, lambda: log(x).round(2)) def test_issue_11877(): x = symbols('x') assert integrate(log(S.Half - x), (x, 0, S.Half)) == Rational(-1, 2) -log(2)/2 def test_normal(): x = symbols('x') e = Mul(S.Half, 1 + x, evaluate=False) assert e.normal() == e def test_expr(): x = symbols('x') raises(TypeError, lambda: tan(x).series(x, 2, oo, "+")) def test_ExprBuilder(): eb = ExprBuilder(Mul) eb.args.extend([x, x]) assert eb.build() == x**2 def test_issue_22020(): from sympy.parsing.sympy_parser import parse_expr x = parse_expr("log((2*V/3-V)/C)/-(R+r)*C") y = parse_expr("log((2*V/3-V)/C)/-(R+r)*2") assert x.equals(y) is False def test_non_string_equality(): # Expressions should not compare equal to strings x = symbols('x') one = sympify(1) assert (x == 'x') is False assert (x != 'x') is True assert (one == '1') is False assert (one != '1') is True assert (x + 1 == 'x + 1') is False assert (x + 1 != 'x + 1') is True # Make sure == doesn't try to convert the resulting expression to a string # (e.g., by calling sympify() instead of _sympify()) class BadRepr: def __repr__(self): raise RuntimeError assert (x == BadRepr()) is False assert (x != BadRepr()) is True def test_21494(): from sympy.testing.pytest import warns_deprecated_sympy with warns_deprecated_sympy(): assert x.expr_free_symbols == {x}
5368123f102cca1a953e32112e08e3c8a217f4300b9e08be42dedf44765e86a0
"""Test whether all elements of cls.args are instances of Basic. """ # NOTE: keep tests sorted by (module, class name) key. If a class can't # be instantiated, add it here anyway with @SKIP("abstract class) (see # e.g. Function). import os import re from sympy.assumptions.ask import Q from sympy.core.basic import Basic from sympy.core.function import (Function, Lambda) from sympy.core.numbers import (Rational, oo, pi) from sympy.core.relational import Eq from sympy.core.singleton import S from sympy.core.symbol import symbols from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import sin from sympy.testing.pytest import XFAIL, SKIP a, b, c, x, y, z = symbols('a,b,c,x,y,z') whitelist = [ "sympy.assumptions.predicates", # tested by test_predicates() "sympy.assumptions.relation.equality", # tested by test_predicates() ] def test_all_classes_are_tested(): this = os.path.split(__file__)[0] path = os.path.join(this, os.pardir, os.pardir) sympy_path = os.path.abspath(path) prefix = os.path.split(sympy_path)[0] + os.sep re_cls = re.compile(r"^class ([A-Za-z][A-Za-z0-9_]*)\s*\(", re.MULTILINE) modules = {} for root, dirs, files in os.walk(sympy_path): module = root.replace(prefix, "").replace(os.sep, ".") for file in files: if file.startswith(("_", "test_", "bench_")): continue if not file.endswith(".py"): continue with open(os.path.join(root, file), encoding='utf-8') as f: text = f.read() submodule = module + '.' + file[:-3] if any(submodule.startswith(wpath) for wpath in whitelist): continue names = re_cls.findall(text) if not names: continue try: mod = __import__(submodule, fromlist=names) except ImportError: continue def is_Basic(name): cls = getattr(mod, name) if hasattr(cls, '_sympy_deprecated_func'): cls = cls._sympy_deprecated_func if not isinstance(cls, type): # check instance of singleton class with same name cls = type(cls) return issubclass(cls, Basic) names = list(filter(is_Basic, names)) if names: modules[submodule] = names ns = globals() failed = [] for module, names in modules.items(): mod = module.replace('.', '__') for name in names: test = 'test_' + mod + '__' + name if test not in ns: failed.append(module + '.' + name) assert not failed, "Missing classes: %s. Please add tests for these to sympy/core/tests/test_args.py." % ", ".join(failed) def _test_args(obj): all_basic = all(isinstance(arg, Basic) for arg in obj.args) # Ideally obj.func(*obj.args) would always recreate the object, but for # now, we only require it for objects with non-empty .args recreatable = not obj.args or obj.func(*obj.args) == obj return all_basic and recreatable def test_sympy__algebras__quaternion__Quaternion(): from sympy.algebras.quaternion import Quaternion assert _test_args(Quaternion(x, 1, 2, 3)) def test_sympy__assumptions__assume__AppliedPredicate(): from sympy.assumptions.assume import AppliedPredicate, Predicate assert _test_args(AppliedPredicate(Predicate("test"), 2)) assert _test_args(Q.is_true(True)) @SKIP("abstract class") def test_sympy__assumptions__assume__Predicate(): pass def test_predicates(): predicates = [ getattr(Q, attr) for attr in Q.__class__.__dict__ if not attr.startswith('__')] for p in predicates: assert _test_args(p) def test_sympy__assumptions__assume__UndefinedPredicate(): from sympy.assumptions.assume import Predicate assert _test_args(Predicate("test")) @SKIP('abstract class') def test_sympy__assumptions__relation__binrel__BinaryRelation(): pass def test_sympy__assumptions__relation__binrel__AppliedBinaryRelation(): assert _test_args(Q.eq(1, 2)) def test_sympy__assumptions__wrapper__AssumptionsWrapper(): from sympy.assumptions.wrapper import AssumptionsWrapper assert _test_args(AssumptionsWrapper(x, Q.positive(x))) @SKIP("abstract Class") def test_sympy__codegen__ast__CodegenAST(): from sympy.codegen.ast import CodegenAST assert _test_args(CodegenAST()) @SKIP("abstract Class") def test_sympy__codegen__ast__AssignmentBase(): from sympy.codegen.ast import AssignmentBase assert _test_args(AssignmentBase(x, 1)) @SKIP("abstract Class") def test_sympy__codegen__ast__AugmentedAssignment(): from sympy.codegen.ast import AugmentedAssignment assert _test_args(AugmentedAssignment(x, 1)) def test_sympy__codegen__ast__AddAugmentedAssignment(): from sympy.codegen.ast import AddAugmentedAssignment assert _test_args(AddAugmentedAssignment(x, 1)) def test_sympy__codegen__ast__SubAugmentedAssignment(): from sympy.codegen.ast import SubAugmentedAssignment assert _test_args(SubAugmentedAssignment(x, 1)) def test_sympy__codegen__ast__MulAugmentedAssignment(): from sympy.codegen.ast import MulAugmentedAssignment assert _test_args(MulAugmentedAssignment(x, 1)) def test_sympy__codegen__ast__DivAugmentedAssignment(): from sympy.codegen.ast import DivAugmentedAssignment assert _test_args(DivAugmentedAssignment(x, 1)) def test_sympy__codegen__ast__ModAugmentedAssignment(): from sympy.codegen.ast import ModAugmentedAssignment assert _test_args(ModAugmentedAssignment(x, 1)) def test_sympy__codegen__ast__CodeBlock(): from sympy.codegen.ast import CodeBlock, Assignment assert _test_args(CodeBlock(Assignment(x, 1), Assignment(y, 2))) def test_sympy__codegen__ast__For(): from sympy.codegen.ast import For, CodeBlock, AddAugmentedAssignment from sympy.sets import Range assert _test_args(For(x, Range(10), CodeBlock(AddAugmentedAssignment(y, 1)))) def test_sympy__codegen__ast__Token(): from sympy.codegen.ast import Token assert _test_args(Token()) def test_sympy__codegen__ast__ContinueToken(): from sympy.codegen.ast import ContinueToken assert _test_args(ContinueToken()) def test_sympy__codegen__ast__BreakToken(): from sympy.codegen.ast import BreakToken assert _test_args(BreakToken()) def test_sympy__codegen__ast__NoneToken(): from sympy.codegen.ast import NoneToken assert _test_args(NoneToken()) def test_sympy__codegen__ast__String(): from sympy.codegen.ast import String assert _test_args(String('foobar')) def test_sympy__codegen__ast__QuotedString(): from sympy.codegen.ast import QuotedString assert _test_args(QuotedString('foobar')) def test_sympy__codegen__ast__Comment(): from sympy.codegen.ast import Comment assert _test_args(Comment('this is a comment')) def test_sympy__codegen__ast__Node(): from sympy.codegen.ast import Node assert _test_args(Node()) assert _test_args(Node(attrs={1, 2, 3})) def test_sympy__codegen__ast__Type(): from sympy.codegen.ast import Type assert _test_args(Type('float128')) def test_sympy__codegen__ast__IntBaseType(): from sympy.codegen.ast import IntBaseType assert _test_args(IntBaseType('bigint')) def test_sympy__codegen__ast___SizedIntType(): from sympy.codegen.ast import _SizedIntType assert _test_args(_SizedIntType('int128', 128)) def test_sympy__codegen__ast__SignedIntType(): from sympy.codegen.ast import SignedIntType assert _test_args(SignedIntType('int128_with_sign', 128)) def test_sympy__codegen__ast__UnsignedIntType(): from sympy.codegen.ast import UnsignedIntType assert _test_args(UnsignedIntType('unt128', 128)) def test_sympy__codegen__ast__FloatBaseType(): from sympy.codegen.ast import FloatBaseType assert _test_args(FloatBaseType('positive_real')) def test_sympy__codegen__ast__FloatType(): from sympy.codegen.ast import FloatType assert _test_args(FloatType('float242', 242, nmant=142, nexp=99)) def test_sympy__codegen__ast__ComplexBaseType(): from sympy.codegen.ast import ComplexBaseType assert _test_args(ComplexBaseType('positive_cmplx')) def test_sympy__codegen__ast__ComplexType(): from sympy.codegen.ast import ComplexType assert _test_args(ComplexType('complex42', 42, nmant=15, nexp=5)) def test_sympy__codegen__ast__Attribute(): from sympy.codegen.ast import Attribute assert _test_args(Attribute('noexcept')) def test_sympy__codegen__ast__Variable(): from sympy.codegen.ast import Variable, Type, value_const assert _test_args(Variable(x)) assert _test_args(Variable(y, Type('float32'), {value_const})) assert _test_args(Variable(z, type=Type('float64'))) def test_sympy__codegen__ast__Pointer(): from sympy.codegen.ast import Pointer, Type, pointer_const assert _test_args(Pointer(x)) assert _test_args(Pointer(y, type=Type('float32'))) assert _test_args(Pointer(z, Type('float64'), {pointer_const})) def test_sympy__codegen__ast__Declaration(): from sympy.codegen.ast import Declaration, Variable, Type vx = Variable(x, type=Type('float')) assert _test_args(Declaration(vx)) def test_sympy__codegen__ast__While(): from sympy.codegen.ast import While, AddAugmentedAssignment assert _test_args(While(abs(x) < 1, [AddAugmentedAssignment(x, -1)])) def test_sympy__codegen__ast__Scope(): from sympy.codegen.ast import Scope, AddAugmentedAssignment assert _test_args(Scope([AddAugmentedAssignment(x, -1)])) def test_sympy__codegen__ast__Stream(): from sympy.codegen.ast import Stream assert _test_args(Stream('stdin')) def test_sympy__codegen__ast__Print(): from sympy.codegen.ast import Print assert _test_args(Print([x, y])) assert _test_args(Print([x, y], "%d %d")) def test_sympy__codegen__ast__FunctionPrototype(): from sympy.codegen.ast import FunctionPrototype, real, Declaration, Variable inp_x = Declaration(Variable(x, type=real)) assert _test_args(FunctionPrototype(real, 'pwer', [inp_x])) def test_sympy__codegen__ast__FunctionDefinition(): from sympy.codegen.ast import FunctionDefinition, real, Declaration, Variable, Assignment inp_x = Declaration(Variable(x, type=real)) assert _test_args(FunctionDefinition(real, 'pwer', [inp_x], [Assignment(x, x**2)])) def test_sympy__codegen__ast__Return(): from sympy.codegen.ast import Return assert _test_args(Return(x)) def test_sympy__codegen__ast__FunctionCall(): from sympy.codegen.ast import FunctionCall assert _test_args(FunctionCall('pwer', [x])) def test_sympy__codegen__ast__Element(): from sympy.codegen.ast import Element assert _test_args(Element('x', range(3))) def test_sympy__codegen__cnodes__CommaOperator(): from sympy.codegen.cnodes import CommaOperator assert _test_args(CommaOperator(1, 2)) def test_sympy__codegen__cnodes__goto(): from sympy.codegen.cnodes import goto assert _test_args(goto('early_exit')) def test_sympy__codegen__cnodes__Label(): from sympy.codegen.cnodes import Label assert _test_args(Label('early_exit')) def test_sympy__codegen__cnodes__PreDecrement(): from sympy.codegen.cnodes import PreDecrement assert _test_args(PreDecrement(x)) def test_sympy__codegen__cnodes__PostDecrement(): from sympy.codegen.cnodes import PostDecrement assert _test_args(PostDecrement(x)) def test_sympy__codegen__cnodes__PreIncrement(): from sympy.codegen.cnodes import PreIncrement assert _test_args(PreIncrement(x)) def test_sympy__codegen__cnodes__PostIncrement(): from sympy.codegen.cnodes import PostIncrement assert _test_args(PostIncrement(x)) def test_sympy__codegen__cnodes__struct(): from sympy.codegen.ast import real, Variable from sympy.codegen.cnodes import struct assert _test_args(struct(declarations=[ Variable(x, type=real), Variable(y, type=real) ])) def test_sympy__codegen__cnodes__union(): from sympy.codegen.ast import float32, int32, Variable from sympy.codegen.cnodes import union assert _test_args(union(declarations=[ Variable(x, type=float32), Variable(y, type=int32) ])) def test_sympy__codegen__cxxnodes__using(): from sympy.codegen.cxxnodes import using assert _test_args(using('std::vector')) assert _test_args(using('std::vector', 'vec')) def test_sympy__codegen__fnodes__Program(): from sympy.codegen.fnodes import Program assert _test_args(Program('foobar', [])) def test_sympy__codegen__fnodes__Module(): from sympy.codegen.fnodes import Module assert _test_args(Module('foobar', [], [])) def test_sympy__codegen__fnodes__Subroutine(): from sympy.codegen.fnodes import Subroutine x = symbols('x', real=True) assert _test_args(Subroutine('foo', [x], [])) def test_sympy__codegen__fnodes__GoTo(): from sympy.codegen.fnodes import GoTo assert _test_args(GoTo([10])) assert _test_args(GoTo([10, 20], x > 1)) def test_sympy__codegen__fnodes__FortranReturn(): from sympy.codegen.fnodes import FortranReturn assert _test_args(FortranReturn(10)) def test_sympy__codegen__fnodes__Extent(): from sympy.codegen.fnodes import Extent assert _test_args(Extent()) assert _test_args(Extent(None)) assert _test_args(Extent(':')) assert _test_args(Extent(-3, 4)) assert _test_args(Extent(x, y)) def test_sympy__codegen__fnodes__use_rename(): from sympy.codegen.fnodes import use_rename assert _test_args(use_rename('loc', 'glob')) def test_sympy__codegen__fnodes__use(): from sympy.codegen.fnodes import use assert _test_args(use('modfoo', only='bar')) def test_sympy__codegen__fnodes__SubroutineCall(): from sympy.codegen.fnodes import SubroutineCall assert _test_args(SubroutineCall('foo', ['bar', 'baz'])) def test_sympy__codegen__fnodes__Do(): from sympy.codegen.fnodes import Do assert _test_args(Do([], 'i', 1, 42)) def test_sympy__codegen__fnodes__ImpliedDoLoop(): from sympy.codegen.fnodes import ImpliedDoLoop assert _test_args(ImpliedDoLoop('i', 'i', 1, 42)) def test_sympy__codegen__fnodes__ArrayConstructor(): from sympy.codegen.fnodes import ArrayConstructor assert _test_args(ArrayConstructor([1, 2, 3])) from sympy.codegen.fnodes import ImpliedDoLoop idl = ImpliedDoLoop('i', 'i', 1, 42) assert _test_args(ArrayConstructor([1, idl, 3])) def test_sympy__codegen__fnodes__sum_(): from sympy.codegen.fnodes import sum_ assert _test_args(sum_('arr')) def test_sympy__codegen__fnodes__product_(): from sympy.codegen.fnodes import product_ assert _test_args(product_('arr')) def test_sympy__codegen__numpy_nodes__logaddexp(): from sympy.codegen.numpy_nodes import logaddexp assert _test_args(logaddexp(x, y)) def test_sympy__codegen__numpy_nodes__logaddexp2(): from sympy.codegen.numpy_nodes import logaddexp2 assert _test_args(logaddexp2(x, y)) def test_sympy__codegen__pynodes__List(): from sympy.codegen.pynodes import List assert _test_args(List(1, 2, 3)) def test_sympy__codegen__scipy_nodes__cosm1(): from sympy.codegen.scipy_nodes import cosm1 assert _test_args(cosm1(x)) @XFAIL def test_sympy__combinatorics__graycode__GrayCode(): from sympy.combinatorics.graycode import GrayCode # an integer is given and returned from GrayCode as the arg assert _test_args(GrayCode(3, start='100')) assert _test_args(GrayCode(3, rank=1)) def test_sympy__combinatorics__permutations__Permutation(): from sympy.combinatorics.permutations import Permutation assert _test_args(Permutation([0, 1, 2, 3])) def test_sympy__combinatorics__permutations__AppliedPermutation(): from sympy.combinatorics.permutations import Permutation from sympy.combinatorics.permutations import AppliedPermutation p = Permutation([0, 1, 2, 3]) assert _test_args(AppliedPermutation(p, 1)) def test_sympy__combinatorics__perm_groups__PermutationGroup(): from sympy.combinatorics.permutations import Permutation from sympy.combinatorics.perm_groups import PermutationGroup assert _test_args(PermutationGroup([Permutation([0, 1])])) def test_sympy__combinatorics__polyhedron__Polyhedron(): from sympy.combinatorics.permutations import Permutation from sympy.combinatorics.polyhedron import Polyhedron from sympy.abc import w, x, y, z pgroup = [Permutation([[0, 1, 2], [3]]), Permutation([[0, 1, 3], [2]]), Permutation([[0, 2, 3], [1]]), Permutation([[1, 2, 3], [0]]), Permutation([[0, 1], [2, 3]]), Permutation([[0, 2], [1, 3]]), Permutation([[0, 3], [1, 2]]), Permutation([[0, 1, 2, 3]])] corners = [w, x, y, z] faces = [(w, x, y), (w, y, z), (w, z, x), (x, y, z)] assert _test_args(Polyhedron(corners, faces, pgroup)) @XFAIL def test_sympy__combinatorics__prufer__Prufer(): from sympy.combinatorics.prufer import Prufer assert _test_args(Prufer([[0, 1], [0, 2], [0, 3]], 4)) def test_sympy__combinatorics__partitions__Partition(): from sympy.combinatorics.partitions import Partition assert _test_args(Partition([1])) @XFAIL def test_sympy__combinatorics__partitions__IntegerPartition(): from sympy.combinatorics.partitions import IntegerPartition assert _test_args(IntegerPartition([1])) def test_sympy__concrete__products__Product(): from sympy.concrete.products import Product assert _test_args(Product(x, (x, 0, 10))) assert _test_args(Product(x, (x, 0, y), (y, 0, 10))) @SKIP("abstract Class") def test_sympy__concrete__expr_with_limits__ExprWithLimits(): from sympy.concrete.expr_with_limits import ExprWithLimits assert _test_args(ExprWithLimits(x, (x, 0, 10))) assert _test_args(ExprWithLimits(x*y, (x, 0, 10.),(y,1.,3))) @SKIP("abstract Class") def test_sympy__concrete__expr_with_limits__AddWithLimits(): from sympy.concrete.expr_with_limits import AddWithLimits assert _test_args(AddWithLimits(x, (x, 0, 10))) assert _test_args(AddWithLimits(x*y, (x, 0, 10),(y,1,3))) @SKIP("abstract Class") def test_sympy__concrete__expr_with_intlimits__ExprWithIntLimits(): from sympy.concrete.expr_with_intlimits import ExprWithIntLimits assert _test_args(ExprWithIntLimits(x, (x, 0, 10))) assert _test_args(ExprWithIntLimits(x*y, (x, 0, 10),(y,1,3))) def test_sympy__concrete__summations__Sum(): from sympy.concrete.summations import Sum assert _test_args(Sum(x, (x, 0, 10))) assert _test_args(Sum(x, (x, 0, y), (y, 0, 10))) def test_sympy__core__add__Add(): from sympy.core.add import Add assert _test_args(Add(x, y, z, 2)) def test_sympy__core__basic__Atom(): from sympy.core.basic import Atom assert _test_args(Atom()) def test_sympy__core__basic__Basic(): from sympy.core.basic import Basic assert _test_args(Basic()) def test_sympy__core__containers__Dict(): from sympy.core.containers import Dict assert _test_args(Dict({x: y, y: z})) def test_sympy__core__containers__Tuple(): from sympy.core.containers import Tuple assert _test_args(Tuple(x, y, z, 2)) def test_sympy__core__expr__AtomicExpr(): from sympy.core.expr import AtomicExpr assert _test_args(AtomicExpr()) def test_sympy__core__expr__Expr(): from sympy.core.expr import Expr assert _test_args(Expr()) def test_sympy__core__expr__UnevaluatedExpr(): from sympy.core.expr import UnevaluatedExpr from sympy.abc import x assert _test_args(UnevaluatedExpr(x)) def test_sympy__core__function__Application(): from sympy.core.function import Application assert _test_args(Application(1, 2, 3)) def test_sympy__core__function__AppliedUndef(): from sympy.core.function import AppliedUndef assert _test_args(AppliedUndef(1, 2, 3)) def test_sympy__core__function__Derivative(): from sympy.core.function import Derivative assert _test_args(Derivative(2, x, y, 3)) @SKIP("abstract class") def test_sympy__core__function__Function(): pass def test_sympy__core__function__Lambda(): assert _test_args(Lambda((x, y), x + y + z)) def test_sympy__core__function__Subs(): from sympy.core.function import Subs assert _test_args(Subs(x + y, x, 2)) def test_sympy__core__function__WildFunction(): from sympy.core.function import WildFunction assert _test_args(WildFunction('f')) def test_sympy__core__mod__Mod(): from sympy.core.mod import Mod assert _test_args(Mod(x, 2)) def test_sympy__core__mul__Mul(): from sympy.core.mul import Mul assert _test_args(Mul(2, x, y, z)) def test_sympy__core__numbers__Catalan(): from sympy.core.numbers import Catalan assert _test_args(Catalan()) def test_sympy__core__numbers__ComplexInfinity(): from sympy.core.numbers import ComplexInfinity assert _test_args(ComplexInfinity()) def test_sympy__core__numbers__EulerGamma(): from sympy.core.numbers import EulerGamma assert _test_args(EulerGamma()) def test_sympy__core__numbers__Exp1(): from sympy.core.numbers import Exp1 assert _test_args(Exp1()) def test_sympy__core__numbers__Float(): from sympy.core.numbers import Float assert _test_args(Float(1.23)) def test_sympy__core__numbers__GoldenRatio(): from sympy.core.numbers import GoldenRatio assert _test_args(GoldenRatio()) def test_sympy__core__numbers__TribonacciConstant(): from sympy.core.numbers import TribonacciConstant assert _test_args(TribonacciConstant()) def test_sympy__core__numbers__Half(): from sympy.core.numbers import Half assert _test_args(Half()) def test_sympy__core__numbers__ImaginaryUnit(): from sympy.core.numbers import ImaginaryUnit assert _test_args(ImaginaryUnit()) def test_sympy__core__numbers__Infinity(): from sympy.core.numbers import Infinity assert _test_args(Infinity()) def test_sympy__core__numbers__Integer(): from sympy.core.numbers import Integer assert _test_args(Integer(7)) @SKIP("abstract class") def test_sympy__core__numbers__IntegerConstant(): pass def test_sympy__core__numbers__NaN(): from sympy.core.numbers import NaN assert _test_args(NaN()) def test_sympy__core__numbers__NegativeInfinity(): from sympy.core.numbers import NegativeInfinity assert _test_args(NegativeInfinity()) def test_sympy__core__numbers__NegativeOne(): from sympy.core.numbers import NegativeOne assert _test_args(NegativeOne()) def test_sympy__core__numbers__Number(): from sympy.core.numbers import Number assert _test_args(Number(1, 7)) def test_sympy__core__numbers__NumberSymbol(): from sympy.core.numbers import NumberSymbol assert _test_args(NumberSymbol()) def test_sympy__core__numbers__One(): from sympy.core.numbers import One assert _test_args(One()) def test_sympy__core__numbers__Pi(): from sympy.core.numbers import Pi assert _test_args(Pi()) def test_sympy__core__numbers__Rational(): from sympy.core.numbers import Rational assert _test_args(Rational(1, 7)) @SKIP("abstract class") def test_sympy__core__numbers__RationalConstant(): pass def test_sympy__core__numbers__Zero(): from sympy.core.numbers import Zero assert _test_args(Zero()) @SKIP("abstract class") def test_sympy__core__operations__AssocOp(): pass @SKIP("abstract class") def test_sympy__core__operations__LatticeOp(): pass def test_sympy__core__power__Pow(): from sympy.core.power import Pow assert _test_args(Pow(x, 2)) def test_sympy__core__relational__Equality(): from sympy.core.relational import Equality assert _test_args(Equality(x, 2)) def test_sympy__core__relational__GreaterThan(): from sympy.core.relational import GreaterThan assert _test_args(GreaterThan(x, 2)) def test_sympy__core__relational__LessThan(): from sympy.core.relational import LessThan assert _test_args(LessThan(x, 2)) @SKIP("abstract class") def test_sympy__core__relational__Relational(): pass def test_sympy__core__relational__StrictGreaterThan(): from sympy.core.relational import StrictGreaterThan assert _test_args(StrictGreaterThan(x, 2)) def test_sympy__core__relational__StrictLessThan(): from sympy.core.relational import StrictLessThan assert _test_args(StrictLessThan(x, 2)) def test_sympy__core__relational__Unequality(): from sympy.core.relational import Unequality assert _test_args(Unequality(x, 2)) @SKIP("deprecated class") def test_sympy__core__trace__Tr(): pass def test_sympy__sandbox__indexed_integrals__IndexedIntegral(): from sympy.tensor import IndexedBase, Idx from sympy.sandbox.indexed_integrals import IndexedIntegral A = IndexedBase('A') i, j = symbols('i j', integer=True) a1, a2 = symbols('a1:3', cls=Idx) assert _test_args(IndexedIntegral(A[a1], A[a2])) assert _test_args(IndexedIntegral(A[i], A[j])) def test_sympy__calculus__util__AccumulationBounds(): from sympy.calculus.util import AccumulationBounds assert _test_args(AccumulationBounds(0, 1)) def test_sympy__sets__ordinals__OmegaPower(): from sympy.sets.ordinals import OmegaPower assert _test_args(OmegaPower(1, 1)) def test_sympy__sets__ordinals__Ordinal(): from sympy.sets.ordinals import Ordinal, OmegaPower assert _test_args(Ordinal(OmegaPower(2, 1))) def test_sympy__sets__ordinals__OrdinalOmega(): from sympy.sets.ordinals import OrdinalOmega assert _test_args(OrdinalOmega()) def test_sympy__sets__ordinals__OrdinalZero(): from sympy.sets.ordinals import OrdinalZero assert _test_args(OrdinalZero()) def test_sympy__sets__powerset__PowerSet(): from sympy.sets.powerset import PowerSet from sympy.core.singleton import S assert _test_args(PowerSet(S.EmptySet)) def test_sympy__sets__sets__EmptySet(): from sympy.sets.sets import EmptySet assert _test_args(EmptySet()) def test_sympy__sets__sets__UniversalSet(): from sympy.sets.sets import UniversalSet assert _test_args(UniversalSet()) def test_sympy__sets__sets__FiniteSet(): from sympy.sets.sets import FiniteSet assert _test_args(FiniteSet(x, y, z)) def test_sympy__sets__sets__Interval(): from sympy.sets.sets import Interval assert _test_args(Interval(0, 1)) def test_sympy__sets__sets__ProductSet(): from sympy.sets.sets import ProductSet, Interval assert _test_args(ProductSet(Interval(0, 1), Interval(0, 1))) @SKIP("does it make sense to test this?") def test_sympy__sets__sets__Set(): from sympy.sets.sets import Set assert _test_args(Set()) def test_sympy__sets__sets__Intersection(): from sympy.sets.sets import Intersection, Interval from sympy.core.symbol import Symbol x = Symbol('x') y = Symbol('y') S = Intersection(Interval(0, x), Interval(y, 1)) assert isinstance(S, Intersection) assert _test_args(S) def test_sympy__sets__sets__Union(): from sympy.sets.sets import Union, Interval assert _test_args(Union(Interval(0, 1), Interval(2, 3))) def test_sympy__sets__sets__Complement(): from sympy.sets.sets import Complement, Interval assert _test_args(Complement(Interval(0, 2), Interval(0, 1))) def test_sympy__sets__sets__SymmetricDifference(): from sympy.sets.sets import FiniteSet, SymmetricDifference assert _test_args(SymmetricDifference(FiniteSet(1, 2, 3), \ FiniteSet(2, 3, 4))) def test_sympy__sets__sets__DisjointUnion(): from sympy.sets.sets import FiniteSet, DisjointUnion assert _test_args(DisjointUnion(FiniteSet(1, 2, 3), \ FiniteSet(2, 3, 4))) def test_sympy__physics__quantum__trace__Tr(): from sympy.physics.quantum.trace import Tr a, b = symbols('a b') assert _test_args(Tr(a + b)) def test_sympy__sets__setexpr__SetExpr(): from sympy.sets.setexpr import SetExpr from sympy.sets.sets import Interval assert _test_args(SetExpr(Interval(0, 1))) def test_sympy__sets__fancysets__Rationals(): from sympy.sets.fancysets import Rationals assert _test_args(Rationals()) def test_sympy__sets__fancysets__Naturals(): from sympy.sets.fancysets import Naturals assert _test_args(Naturals()) def test_sympy__sets__fancysets__Naturals0(): from sympy.sets.fancysets import Naturals0 assert _test_args(Naturals0()) def test_sympy__sets__fancysets__Integers(): from sympy.sets.fancysets import Integers assert _test_args(Integers()) def test_sympy__sets__fancysets__Reals(): from sympy.sets.fancysets import Reals assert _test_args(Reals()) def test_sympy__sets__fancysets__Complexes(): from sympy.sets.fancysets import Complexes assert _test_args(Complexes()) def test_sympy__sets__fancysets__ComplexRegion(): from sympy.sets.fancysets import ComplexRegion from sympy.core.singleton import S from sympy.sets import Interval a = Interval(0, 1) b = Interval(2, 3) theta = Interval(0, 2*S.Pi) assert _test_args(ComplexRegion(a*b)) assert _test_args(ComplexRegion(a*theta, polar=True)) def test_sympy__sets__fancysets__CartesianComplexRegion(): from sympy.sets.fancysets import CartesianComplexRegion from sympy.sets import Interval a = Interval(0, 1) b = Interval(2, 3) assert _test_args(CartesianComplexRegion(a*b)) def test_sympy__sets__fancysets__PolarComplexRegion(): from sympy.sets.fancysets import PolarComplexRegion from sympy.core.singleton import S from sympy.sets import Interval a = Interval(0, 1) theta = Interval(0, 2*S.Pi) assert _test_args(PolarComplexRegion(a*theta)) def test_sympy__sets__fancysets__ImageSet(): from sympy.sets.fancysets import ImageSet from sympy.core.singleton import S from sympy.core.symbol import Symbol x = Symbol('x') assert _test_args(ImageSet(Lambda(x, x**2), S.Naturals)) def test_sympy__sets__fancysets__Range(): from sympy.sets.fancysets import Range assert _test_args(Range(1, 5, 1)) def test_sympy__sets__conditionset__ConditionSet(): from sympy.sets.conditionset import ConditionSet from sympy.core.singleton import S from sympy.core.symbol import Symbol x = Symbol('x') assert _test_args(ConditionSet(x, Eq(x**2, 1), S.Reals)) def test_sympy__sets__contains__Contains(): from sympy.sets.fancysets import Range from sympy.sets.contains import Contains assert _test_args(Contains(x, Range(0, 10, 2))) # STATS from sympy.stats.crv_types import NormalDistribution nd = NormalDistribution(0, 1) from sympy.stats.frv_types import DieDistribution die = DieDistribution(6) def test_sympy__stats__crv__ContinuousDomain(): from sympy.sets.sets import Interval from sympy.stats.crv import ContinuousDomain assert _test_args(ContinuousDomain({x}, Interval(-oo, oo))) def test_sympy__stats__crv__SingleContinuousDomain(): from sympy.sets.sets import Interval from sympy.stats.crv import SingleContinuousDomain assert _test_args(SingleContinuousDomain(x, Interval(-oo, oo))) def test_sympy__stats__crv__ProductContinuousDomain(): from sympy.sets.sets import Interval from sympy.stats.crv import SingleContinuousDomain, ProductContinuousDomain D = SingleContinuousDomain(x, Interval(-oo, oo)) E = SingleContinuousDomain(y, Interval(0, oo)) assert _test_args(ProductContinuousDomain(D, E)) def test_sympy__stats__crv__ConditionalContinuousDomain(): from sympy.sets.sets import Interval from sympy.stats.crv import (SingleContinuousDomain, ConditionalContinuousDomain) D = SingleContinuousDomain(x, Interval(-oo, oo)) assert _test_args(ConditionalContinuousDomain(D, x > 0)) def test_sympy__stats__crv__ContinuousPSpace(): from sympy.sets.sets import Interval from sympy.stats.crv import ContinuousPSpace, SingleContinuousDomain D = SingleContinuousDomain(x, Interval(-oo, oo)) assert _test_args(ContinuousPSpace(D, nd)) def test_sympy__stats__crv__SingleContinuousPSpace(): from sympy.stats.crv import SingleContinuousPSpace assert _test_args(SingleContinuousPSpace(x, nd)) @SKIP("abstract class") def test_sympy__stats__rv__Distribution(): pass @SKIP("abstract class") def test_sympy__stats__crv__SingleContinuousDistribution(): pass def test_sympy__stats__drv__SingleDiscreteDomain(): from sympy.stats.drv import SingleDiscreteDomain assert _test_args(SingleDiscreteDomain(x, S.Naturals)) def test_sympy__stats__drv__ProductDiscreteDomain(): from sympy.stats.drv import SingleDiscreteDomain, ProductDiscreteDomain X = SingleDiscreteDomain(x, S.Naturals) Y = SingleDiscreteDomain(y, S.Integers) assert _test_args(ProductDiscreteDomain(X, Y)) def test_sympy__stats__drv__SingleDiscretePSpace(): from sympy.stats.drv import SingleDiscretePSpace from sympy.stats.drv_types import PoissonDistribution assert _test_args(SingleDiscretePSpace(x, PoissonDistribution(1))) def test_sympy__stats__drv__DiscretePSpace(): from sympy.stats.drv import DiscretePSpace, SingleDiscreteDomain density = Lambda(x, 2**(-x)) domain = SingleDiscreteDomain(x, S.Naturals) assert _test_args(DiscretePSpace(domain, density)) def test_sympy__stats__drv__ConditionalDiscreteDomain(): from sympy.stats.drv import ConditionalDiscreteDomain, SingleDiscreteDomain X = SingleDiscreteDomain(x, S.Naturals0) assert _test_args(ConditionalDiscreteDomain(X, x > 2)) def test_sympy__stats__joint_rv__JointPSpace(): from sympy.stats.joint_rv import JointPSpace, JointDistribution assert _test_args(JointPSpace('X', JointDistribution(1))) def test_sympy__stats__joint_rv__JointRandomSymbol(): from sympy.stats.joint_rv import JointRandomSymbol assert _test_args(JointRandomSymbol(x)) def test_sympy__stats__joint_rv_types__JointDistributionHandmade(): from sympy.tensor.indexed import Indexed from sympy.stats.joint_rv_types import JointDistributionHandmade x1, x2 = (Indexed('x', i) for i in (1, 2)) assert _test_args(JointDistributionHandmade(x1 + x2, S.Reals**2)) def test_sympy__stats__joint_rv__MarginalDistribution(): from sympy.stats.rv import RandomSymbol from sympy.stats.joint_rv import MarginalDistribution r = RandomSymbol(S('r')) assert _test_args(MarginalDistribution(r, (r,))) def test_sympy__stats__compound_rv__CompoundDistribution(): from sympy.stats.compound_rv import CompoundDistribution from sympy.stats.drv_types import PoissonDistribution, Poisson r = Poisson('r', 10) assert _test_args(CompoundDistribution(PoissonDistribution(r))) def test_sympy__stats__compound_rv__CompoundPSpace(): from sympy.stats.compound_rv import CompoundPSpace, CompoundDistribution from sympy.stats.drv_types import PoissonDistribution, Poisson r = Poisson('r', 5) C = CompoundDistribution(PoissonDistribution(r)) assert _test_args(CompoundPSpace('C', C)) @SKIP("abstract class") def test_sympy__stats__drv__SingleDiscreteDistribution(): pass @SKIP("abstract class") def test_sympy__stats__drv__DiscreteDistribution(): pass @SKIP("abstract class") def test_sympy__stats__drv__DiscreteDomain(): pass def test_sympy__stats__rv__RandomDomain(): from sympy.stats.rv import RandomDomain from sympy.sets.sets import FiniteSet assert _test_args(RandomDomain(FiniteSet(x), FiniteSet(1, 2, 3))) def test_sympy__stats__rv__SingleDomain(): from sympy.stats.rv import SingleDomain from sympy.sets.sets import FiniteSet assert _test_args(SingleDomain(x, FiniteSet(1, 2, 3))) def test_sympy__stats__rv__ConditionalDomain(): from sympy.stats.rv import ConditionalDomain, RandomDomain from sympy.sets.sets import FiniteSet D = RandomDomain(FiniteSet(x), FiniteSet(1, 2)) assert _test_args(ConditionalDomain(D, x > 1)) def test_sympy__stats__rv__MatrixDomain(): from sympy.stats.rv import MatrixDomain from sympy.matrices import MatrixSet from sympy.core.singleton import S assert _test_args(MatrixDomain(x, MatrixSet(2, 2, S.Reals))) def test_sympy__stats__rv__PSpace(): from sympy.stats.rv import PSpace, RandomDomain from sympy.sets.sets import FiniteSet D = RandomDomain(FiniteSet(x), FiniteSet(1, 2, 3, 4, 5, 6)) assert _test_args(PSpace(D, die)) @SKIP("abstract Class") def test_sympy__stats__rv__SinglePSpace(): pass def test_sympy__stats__rv__RandomSymbol(): from sympy.stats.rv import RandomSymbol from sympy.stats.crv import SingleContinuousPSpace A = SingleContinuousPSpace(x, nd) assert _test_args(RandomSymbol(x, A)) @SKIP("abstract Class") def test_sympy__stats__rv__ProductPSpace(): pass def test_sympy__stats__rv__IndependentProductPSpace(): from sympy.stats.rv import IndependentProductPSpace from sympy.stats.crv import SingleContinuousPSpace A = SingleContinuousPSpace(x, nd) B = SingleContinuousPSpace(y, nd) assert _test_args(IndependentProductPSpace(A, B)) def test_sympy__stats__rv__ProductDomain(): from sympy.sets.sets import Interval from sympy.stats.rv import ProductDomain, SingleDomain D = SingleDomain(x, Interval(-oo, oo)) E = SingleDomain(y, Interval(0, oo)) assert _test_args(ProductDomain(D, E)) def test_sympy__stats__symbolic_probability__Probability(): from sympy.stats.symbolic_probability import Probability from sympy.stats import Normal X = Normal('X', 0, 1) assert _test_args(Probability(X > 0)) def test_sympy__stats__symbolic_probability__Expectation(): from sympy.stats.symbolic_probability import Expectation from sympy.stats import Normal X = Normal('X', 0, 1) assert _test_args(Expectation(X > 0)) def test_sympy__stats__symbolic_probability__Covariance(): from sympy.stats.symbolic_probability import Covariance from sympy.stats import Normal X = Normal('X', 0, 1) Y = Normal('Y', 0, 3) assert _test_args(Covariance(X, Y)) def test_sympy__stats__symbolic_probability__Variance(): from sympy.stats.symbolic_probability import Variance from sympy.stats import Normal X = Normal('X', 0, 1) assert _test_args(Variance(X)) def test_sympy__stats__symbolic_probability__Moment(): from sympy.stats.symbolic_probability import Moment from sympy.stats import Normal X = Normal('X', 0, 1) assert _test_args(Moment(X, 3, 2, X > 3)) def test_sympy__stats__symbolic_probability__CentralMoment(): from sympy.stats.symbolic_probability import CentralMoment from sympy.stats import Normal X = Normal('X', 0, 1) assert _test_args(CentralMoment(X, 2, X > 1)) def test_sympy__stats__frv_types__DiscreteUniformDistribution(): from sympy.stats.frv_types import DiscreteUniformDistribution from sympy.core.containers import Tuple assert _test_args(DiscreteUniformDistribution(Tuple(*list(range(6))))) def test_sympy__stats__frv_types__DieDistribution(): assert _test_args(die) def test_sympy__stats__frv_types__BernoulliDistribution(): from sympy.stats.frv_types import BernoulliDistribution assert _test_args(BernoulliDistribution(S.Half, 0, 1)) def test_sympy__stats__frv_types__BinomialDistribution(): from sympy.stats.frv_types import BinomialDistribution assert _test_args(BinomialDistribution(5, S.Half, 1, 0)) def test_sympy__stats__frv_types__BetaBinomialDistribution(): from sympy.stats.frv_types import BetaBinomialDistribution assert _test_args(BetaBinomialDistribution(5, 1, 1)) def test_sympy__stats__frv_types__HypergeometricDistribution(): from sympy.stats.frv_types import HypergeometricDistribution assert _test_args(HypergeometricDistribution(10, 5, 3)) def test_sympy__stats__frv_types__RademacherDistribution(): from sympy.stats.frv_types import RademacherDistribution assert _test_args(RademacherDistribution()) def test_sympy__stats__frv_types__IdealSolitonDistribution(): from sympy.stats.frv_types import IdealSolitonDistribution assert _test_args(IdealSolitonDistribution(10)) def test_sympy__stats__frv_types__RobustSolitonDistribution(): from sympy.stats.frv_types import RobustSolitonDistribution assert _test_args(RobustSolitonDistribution(1000, 0.5, 0.1)) def test_sympy__stats__frv__FiniteDomain(): from sympy.stats.frv import FiniteDomain assert _test_args(FiniteDomain({(x, 1), (x, 2)})) # x can be 1 or 2 def test_sympy__stats__frv__SingleFiniteDomain(): from sympy.stats.frv import SingleFiniteDomain assert _test_args(SingleFiniteDomain(x, {1, 2})) # x can be 1 or 2 def test_sympy__stats__frv__ProductFiniteDomain(): from sympy.stats.frv import SingleFiniteDomain, ProductFiniteDomain xd = SingleFiniteDomain(x, {1, 2}) yd = SingleFiniteDomain(y, {1, 2}) assert _test_args(ProductFiniteDomain(xd, yd)) def test_sympy__stats__frv__ConditionalFiniteDomain(): from sympy.stats.frv import SingleFiniteDomain, ConditionalFiniteDomain xd = SingleFiniteDomain(x, {1, 2}) assert _test_args(ConditionalFiniteDomain(xd, x > 1)) def test_sympy__stats__frv__FinitePSpace(): from sympy.stats.frv import FinitePSpace, SingleFiniteDomain xd = SingleFiniteDomain(x, {1, 2, 3, 4, 5, 6}) assert _test_args(FinitePSpace(xd, {(x, 1): S.Half, (x, 2): S.Half})) xd = SingleFiniteDomain(x, {1, 2}) assert _test_args(FinitePSpace(xd, {(x, 1): S.Half, (x, 2): S.Half})) def test_sympy__stats__frv__SingleFinitePSpace(): from sympy.stats.frv import SingleFinitePSpace from sympy.core.symbol import Symbol assert _test_args(SingleFinitePSpace(Symbol('x'), die)) def test_sympy__stats__frv__ProductFinitePSpace(): from sympy.stats.frv import SingleFinitePSpace, ProductFinitePSpace from sympy.core.symbol import Symbol xp = SingleFinitePSpace(Symbol('x'), die) yp = SingleFinitePSpace(Symbol('y'), die) assert _test_args(ProductFinitePSpace(xp, yp)) @SKIP("abstract class") def test_sympy__stats__frv__SingleFiniteDistribution(): pass @SKIP("abstract class") def test_sympy__stats__crv__ContinuousDistribution(): pass def test_sympy__stats__frv_types__FiniteDistributionHandmade(): from sympy.stats.frv_types import FiniteDistributionHandmade from sympy.core.containers import Dict assert _test_args(FiniteDistributionHandmade(Dict({1: 1}))) def test_sympy__stats__crv_types__ContinuousDistributionHandmade(): from sympy.stats.crv_types import ContinuousDistributionHandmade from sympy.core.function import Lambda from sympy.sets.sets import Interval from sympy.abc import x assert _test_args(ContinuousDistributionHandmade(Lambda(x, 2*x), Interval(0, 1))) def test_sympy__stats__drv_types__DiscreteDistributionHandmade(): from sympy.stats.drv_types import DiscreteDistributionHandmade from sympy.core.function import Lambda from sympy.sets.sets import FiniteSet from sympy.abc import x assert _test_args(DiscreteDistributionHandmade(Lambda(x, Rational(1, 10)), FiniteSet(*range(10)))) def test_sympy__stats__rv__Density(): from sympy.stats.rv import Density from sympy.stats.crv_types import Normal assert _test_args(Density(Normal('x', 0, 1))) def test_sympy__stats__crv_types__ArcsinDistribution(): from sympy.stats.crv_types import ArcsinDistribution assert _test_args(ArcsinDistribution(0, 1)) def test_sympy__stats__crv_types__BeniniDistribution(): from sympy.stats.crv_types import BeniniDistribution assert _test_args(BeniniDistribution(1, 1, 1)) def test_sympy__stats__crv_types__BetaDistribution(): from sympy.stats.crv_types import BetaDistribution assert _test_args(BetaDistribution(1, 1)) def test_sympy__stats__crv_types__BetaNoncentralDistribution(): from sympy.stats.crv_types import BetaNoncentralDistribution assert _test_args(BetaNoncentralDistribution(1, 1, 1)) def test_sympy__stats__crv_types__BetaPrimeDistribution(): from sympy.stats.crv_types import BetaPrimeDistribution assert _test_args(BetaPrimeDistribution(1, 1)) def test_sympy__stats__crv_types__BoundedParetoDistribution(): from sympy.stats.crv_types import BoundedParetoDistribution assert _test_args(BoundedParetoDistribution(1, 1, 2)) def test_sympy__stats__crv_types__CauchyDistribution(): from sympy.stats.crv_types import CauchyDistribution assert _test_args(CauchyDistribution(0, 1)) def test_sympy__stats__crv_types__ChiDistribution(): from sympy.stats.crv_types import ChiDistribution assert _test_args(ChiDistribution(1)) def test_sympy__stats__crv_types__ChiNoncentralDistribution(): from sympy.stats.crv_types import ChiNoncentralDistribution assert _test_args(ChiNoncentralDistribution(1,1)) def test_sympy__stats__crv_types__ChiSquaredDistribution(): from sympy.stats.crv_types import ChiSquaredDistribution assert _test_args(ChiSquaredDistribution(1)) def test_sympy__stats__crv_types__DagumDistribution(): from sympy.stats.crv_types import DagumDistribution assert _test_args(DagumDistribution(1, 1, 1)) def test_sympy__stats__crv_types__ExGaussianDistribution(): from sympy.stats.crv_types import ExGaussianDistribution assert _test_args(ExGaussianDistribution(1, 1, 1)) def test_sympy__stats__crv_types__ExponentialDistribution(): from sympy.stats.crv_types import ExponentialDistribution assert _test_args(ExponentialDistribution(1)) def test_sympy__stats__crv_types__ExponentialPowerDistribution(): from sympy.stats.crv_types import ExponentialPowerDistribution assert _test_args(ExponentialPowerDistribution(0, 1, 1)) def test_sympy__stats__crv_types__FDistributionDistribution(): from sympy.stats.crv_types import FDistributionDistribution assert _test_args(FDistributionDistribution(1, 1)) def test_sympy__stats__crv_types__FisherZDistribution(): from sympy.stats.crv_types import FisherZDistribution assert _test_args(FisherZDistribution(1, 1)) def test_sympy__stats__crv_types__FrechetDistribution(): from sympy.stats.crv_types import FrechetDistribution assert _test_args(FrechetDistribution(1, 1, 1)) def test_sympy__stats__crv_types__GammaInverseDistribution(): from sympy.stats.crv_types import GammaInverseDistribution assert _test_args(GammaInverseDistribution(1, 1)) def test_sympy__stats__crv_types__GammaDistribution(): from sympy.stats.crv_types import GammaDistribution assert _test_args(GammaDistribution(1, 1)) def test_sympy__stats__crv_types__GumbelDistribution(): from sympy.stats.crv_types import GumbelDistribution assert _test_args(GumbelDistribution(1, 1, False)) def test_sympy__stats__crv_types__GompertzDistribution(): from sympy.stats.crv_types import GompertzDistribution assert _test_args(GompertzDistribution(1, 1)) def test_sympy__stats__crv_types__KumaraswamyDistribution(): from sympy.stats.crv_types import KumaraswamyDistribution assert _test_args(KumaraswamyDistribution(1, 1)) def test_sympy__stats__crv_types__LaplaceDistribution(): from sympy.stats.crv_types import LaplaceDistribution assert _test_args(LaplaceDistribution(0, 1)) def test_sympy__stats__crv_types__LevyDistribution(): from sympy.stats.crv_types import LevyDistribution assert _test_args(LevyDistribution(0, 1)) def test_sympy__stats__crv_types__LogCauchyDistribution(): from sympy.stats.crv_types import LogCauchyDistribution assert _test_args(LogCauchyDistribution(0, 1)) def test_sympy__stats__crv_types__LogisticDistribution(): from sympy.stats.crv_types import LogisticDistribution assert _test_args(LogisticDistribution(0, 1)) def test_sympy__stats__crv_types__LogLogisticDistribution(): from sympy.stats.crv_types import LogLogisticDistribution assert _test_args(LogLogisticDistribution(1, 1)) def test_sympy__stats__crv_types__LogitNormalDistribution(): from sympy.stats.crv_types import LogitNormalDistribution assert _test_args(LogitNormalDistribution(0, 1)) def test_sympy__stats__crv_types__LogNormalDistribution(): from sympy.stats.crv_types import LogNormalDistribution assert _test_args(LogNormalDistribution(0, 1)) def test_sympy__stats__crv_types__LomaxDistribution(): from sympy.stats.crv_types import LomaxDistribution assert _test_args(LomaxDistribution(1, 2)) def test_sympy__stats__crv_types__MaxwellDistribution(): from sympy.stats.crv_types import MaxwellDistribution assert _test_args(MaxwellDistribution(1)) def test_sympy__stats__crv_types__MoyalDistribution(): from sympy.stats.crv_types import MoyalDistribution assert _test_args(MoyalDistribution(1,2)) def test_sympy__stats__crv_types__NakagamiDistribution(): from sympy.stats.crv_types import NakagamiDistribution assert _test_args(NakagamiDistribution(1, 1)) def test_sympy__stats__crv_types__NormalDistribution(): from sympy.stats.crv_types import NormalDistribution assert _test_args(NormalDistribution(0, 1)) def test_sympy__stats__crv_types__GaussianInverseDistribution(): from sympy.stats.crv_types import GaussianInverseDistribution assert _test_args(GaussianInverseDistribution(1, 1)) def test_sympy__stats__crv_types__ParetoDistribution(): from sympy.stats.crv_types import ParetoDistribution assert _test_args(ParetoDistribution(1, 1)) def test_sympy__stats__crv_types__PowerFunctionDistribution(): from sympy.stats.crv_types import PowerFunctionDistribution assert _test_args(PowerFunctionDistribution(2,0,1)) def test_sympy__stats__crv_types__QuadraticUDistribution(): from sympy.stats.crv_types import QuadraticUDistribution assert _test_args(QuadraticUDistribution(1, 2)) def test_sympy__stats__crv_types__RaisedCosineDistribution(): from sympy.stats.crv_types import RaisedCosineDistribution assert _test_args(RaisedCosineDistribution(1, 1)) def test_sympy__stats__crv_types__RayleighDistribution(): from sympy.stats.crv_types import RayleighDistribution assert _test_args(RayleighDistribution(1)) def test_sympy__stats__crv_types__ReciprocalDistribution(): from sympy.stats.crv_types import ReciprocalDistribution assert _test_args(ReciprocalDistribution(5, 30)) def test_sympy__stats__crv_types__ShiftedGompertzDistribution(): from sympy.stats.crv_types import ShiftedGompertzDistribution assert _test_args(ShiftedGompertzDistribution(1, 1)) def test_sympy__stats__crv_types__StudentTDistribution(): from sympy.stats.crv_types import StudentTDistribution assert _test_args(StudentTDistribution(1)) def test_sympy__stats__crv_types__TrapezoidalDistribution(): from sympy.stats.crv_types import TrapezoidalDistribution assert _test_args(TrapezoidalDistribution(1, 2, 3, 4)) def test_sympy__stats__crv_types__TriangularDistribution(): from sympy.stats.crv_types import TriangularDistribution assert _test_args(TriangularDistribution(-1, 0, 1)) def test_sympy__stats__crv_types__UniformDistribution(): from sympy.stats.crv_types import UniformDistribution assert _test_args(UniformDistribution(0, 1)) def test_sympy__stats__crv_types__UniformSumDistribution(): from sympy.stats.crv_types import UniformSumDistribution assert _test_args(UniformSumDistribution(1)) def test_sympy__stats__crv_types__VonMisesDistribution(): from sympy.stats.crv_types import VonMisesDistribution assert _test_args(VonMisesDistribution(1, 1)) def test_sympy__stats__crv_types__WeibullDistribution(): from sympy.stats.crv_types import WeibullDistribution assert _test_args(WeibullDistribution(1, 1)) def test_sympy__stats__crv_types__WignerSemicircleDistribution(): from sympy.stats.crv_types import WignerSemicircleDistribution assert _test_args(WignerSemicircleDistribution(1)) def test_sympy__stats__drv_types__GeometricDistribution(): from sympy.stats.drv_types import GeometricDistribution assert _test_args(GeometricDistribution(.5)) def test_sympy__stats__drv_types__HermiteDistribution(): from sympy.stats.drv_types import HermiteDistribution assert _test_args(HermiteDistribution(1, 2)) def test_sympy__stats__drv_types__LogarithmicDistribution(): from sympy.stats.drv_types import LogarithmicDistribution assert _test_args(LogarithmicDistribution(.5)) def test_sympy__stats__drv_types__NegativeBinomialDistribution(): from sympy.stats.drv_types import NegativeBinomialDistribution assert _test_args(NegativeBinomialDistribution(.5, .5)) def test_sympy__stats__drv_types__FlorySchulzDistribution(): from sympy.stats.drv_types import FlorySchulzDistribution assert _test_args(FlorySchulzDistribution(.5)) def test_sympy__stats__drv_types__PoissonDistribution(): from sympy.stats.drv_types import PoissonDistribution assert _test_args(PoissonDistribution(1)) def test_sympy__stats__drv_types__SkellamDistribution(): from sympy.stats.drv_types import SkellamDistribution assert _test_args(SkellamDistribution(1, 1)) def test_sympy__stats__drv_types__YuleSimonDistribution(): from sympy.stats.drv_types import YuleSimonDistribution assert _test_args(YuleSimonDistribution(.5)) def test_sympy__stats__drv_types__ZetaDistribution(): from sympy.stats.drv_types import ZetaDistribution assert _test_args(ZetaDistribution(1.5)) def test_sympy__stats__joint_rv__JointDistribution(): from sympy.stats.joint_rv import JointDistribution assert _test_args(JointDistribution(1, 2, 3, 4)) def test_sympy__stats__joint_rv_types__MultivariateNormalDistribution(): from sympy.stats.joint_rv_types import MultivariateNormalDistribution assert _test_args( MultivariateNormalDistribution([0, 1], [[1, 0],[0, 1]])) def test_sympy__stats__joint_rv_types__MultivariateLaplaceDistribution(): from sympy.stats.joint_rv_types import MultivariateLaplaceDistribution assert _test_args(MultivariateLaplaceDistribution([0, 1], [[1, 0],[0, 1]])) def test_sympy__stats__joint_rv_types__MultivariateTDistribution(): from sympy.stats.joint_rv_types import MultivariateTDistribution assert _test_args(MultivariateTDistribution([0, 1], [[1, 0],[0, 1]], 1)) def test_sympy__stats__joint_rv_types__NormalGammaDistribution(): from sympy.stats.joint_rv_types import NormalGammaDistribution assert _test_args(NormalGammaDistribution(1, 2, 3, 4)) def test_sympy__stats__joint_rv_types__GeneralizedMultivariateLogGammaDistribution(): from sympy.stats.joint_rv_types import GeneralizedMultivariateLogGammaDistribution v, l, mu = (4, [1, 2, 3, 4], [1, 2, 3, 4]) assert _test_args(GeneralizedMultivariateLogGammaDistribution(S.Half, v, l, mu)) def test_sympy__stats__joint_rv_types__MultivariateBetaDistribution(): from sympy.stats.joint_rv_types import MultivariateBetaDistribution assert _test_args(MultivariateBetaDistribution([1, 2, 3])) def test_sympy__stats__joint_rv_types__MultivariateEwensDistribution(): from sympy.stats.joint_rv_types import MultivariateEwensDistribution assert _test_args(MultivariateEwensDistribution(5, 1)) def test_sympy__stats__joint_rv_types__MultinomialDistribution(): from sympy.stats.joint_rv_types import MultinomialDistribution assert _test_args(MultinomialDistribution(5, [0.5, 0.1, 0.3])) def test_sympy__stats__joint_rv_types__NegativeMultinomialDistribution(): from sympy.stats.joint_rv_types import NegativeMultinomialDistribution assert _test_args(NegativeMultinomialDistribution(5, [0.5, 0.1, 0.3])) def test_sympy__stats__rv__RandomIndexedSymbol(): from sympy.stats.rv import RandomIndexedSymbol, pspace from sympy.stats.stochastic_process_types import DiscreteMarkovChain X = DiscreteMarkovChain("X") assert _test_args(RandomIndexedSymbol(X[0].symbol, pspace(X[0]))) def test_sympy__stats__rv__RandomMatrixSymbol(): from sympy.stats.rv import RandomMatrixSymbol from sympy.stats.random_matrix import RandomMatrixPSpace pspace = RandomMatrixPSpace('P') assert _test_args(RandomMatrixSymbol('M', 3, 3, pspace)) def test_sympy__stats__stochastic_process__StochasticPSpace(): from sympy.stats.stochastic_process import StochasticPSpace from sympy.stats.stochastic_process_types import StochasticProcess from sympy.stats.frv_types import BernoulliDistribution assert _test_args(StochasticPSpace("Y", StochasticProcess("Y", [1, 2, 3]), BernoulliDistribution(S.Half, 1, 0))) def test_sympy__stats__stochastic_process_types__StochasticProcess(): from sympy.stats.stochastic_process_types import StochasticProcess assert _test_args(StochasticProcess("Y", [1, 2, 3])) def test_sympy__stats__stochastic_process_types__MarkovProcess(): from sympy.stats.stochastic_process_types import MarkovProcess assert _test_args(MarkovProcess("Y", [1, 2, 3])) def test_sympy__stats__stochastic_process_types__DiscreteTimeStochasticProcess(): from sympy.stats.stochastic_process_types import DiscreteTimeStochasticProcess assert _test_args(DiscreteTimeStochasticProcess("Y", [1, 2, 3])) def test_sympy__stats__stochastic_process_types__ContinuousTimeStochasticProcess(): from sympy.stats.stochastic_process_types import ContinuousTimeStochasticProcess assert _test_args(ContinuousTimeStochasticProcess("Y", [1, 2, 3])) def test_sympy__stats__stochastic_process_types__TransitionMatrixOf(): from sympy.stats.stochastic_process_types import TransitionMatrixOf, DiscreteMarkovChain from sympy.matrices.expressions.matexpr import MatrixSymbol DMC = DiscreteMarkovChain("Y") assert _test_args(TransitionMatrixOf(DMC, MatrixSymbol('T', 3, 3))) def test_sympy__stats__stochastic_process_types__GeneratorMatrixOf(): from sympy.stats.stochastic_process_types import GeneratorMatrixOf, ContinuousMarkovChain from sympy.matrices.expressions.matexpr import MatrixSymbol DMC = ContinuousMarkovChain("Y") assert _test_args(GeneratorMatrixOf(DMC, MatrixSymbol('T', 3, 3))) def test_sympy__stats__stochastic_process_types__StochasticStateSpaceOf(): from sympy.stats.stochastic_process_types import StochasticStateSpaceOf, DiscreteMarkovChain DMC = DiscreteMarkovChain("Y") assert _test_args(StochasticStateSpaceOf(DMC, [0, 1, 2])) def test_sympy__stats__stochastic_process_types__DiscreteMarkovChain(): from sympy.stats.stochastic_process_types import DiscreteMarkovChain from sympy.matrices.expressions.matexpr import MatrixSymbol assert _test_args(DiscreteMarkovChain("Y", [0, 1, 2], MatrixSymbol('T', 3, 3))) def test_sympy__stats__stochastic_process_types__ContinuousMarkovChain(): from sympy.stats.stochastic_process_types import ContinuousMarkovChain from sympy.matrices.expressions.matexpr import MatrixSymbol assert _test_args(ContinuousMarkovChain("Y", [0, 1, 2], MatrixSymbol('T', 3, 3))) def test_sympy__stats__stochastic_process_types__BernoulliProcess(): from sympy.stats.stochastic_process_types import BernoulliProcess assert _test_args(BernoulliProcess("B", 0.5, 1, 0)) def test_sympy__stats__stochastic_process_types__CountingProcess(): from sympy.stats.stochastic_process_types import CountingProcess assert _test_args(CountingProcess("C")) def test_sympy__stats__stochastic_process_types__PoissonProcess(): from sympy.stats.stochastic_process_types import PoissonProcess assert _test_args(PoissonProcess("X", 2)) def test_sympy__stats__stochastic_process_types__WienerProcess(): from sympy.stats.stochastic_process_types import WienerProcess assert _test_args(WienerProcess("X")) def test_sympy__stats__stochastic_process_types__GammaProcess(): from sympy.stats.stochastic_process_types import GammaProcess assert _test_args(GammaProcess("X", 1, 2)) def test_sympy__stats__random_matrix__RandomMatrixPSpace(): from sympy.stats.random_matrix import RandomMatrixPSpace from sympy.stats.random_matrix_models import RandomMatrixEnsembleModel model = RandomMatrixEnsembleModel('R', 3) assert _test_args(RandomMatrixPSpace('P', model=model)) def test_sympy__stats__random_matrix_models__RandomMatrixEnsembleModel(): from sympy.stats.random_matrix_models import RandomMatrixEnsembleModel assert _test_args(RandomMatrixEnsembleModel('R', 3)) def test_sympy__stats__random_matrix_models__GaussianEnsembleModel(): from sympy.stats.random_matrix_models import GaussianEnsembleModel assert _test_args(GaussianEnsembleModel('G', 3)) def test_sympy__stats__random_matrix_models__GaussianUnitaryEnsembleModel(): from sympy.stats.random_matrix_models import GaussianUnitaryEnsembleModel assert _test_args(GaussianUnitaryEnsembleModel('U', 3)) def test_sympy__stats__random_matrix_models__GaussianOrthogonalEnsembleModel(): from sympy.stats.random_matrix_models import GaussianOrthogonalEnsembleModel assert _test_args(GaussianOrthogonalEnsembleModel('U', 3)) def test_sympy__stats__random_matrix_models__GaussianSymplecticEnsembleModel(): from sympy.stats.random_matrix_models import GaussianSymplecticEnsembleModel assert _test_args(GaussianSymplecticEnsembleModel('U', 3)) def test_sympy__stats__random_matrix_models__CircularEnsembleModel(): from sympy.stats.random_matrix_models import CircularEnsembleModel assert _test_args(CircularEnsembleModel('C', 3)) def test_sympy__stats__random_matrix_models__CircularUnitaryEnsembleModel(): from sympy.stats.random_matrix_models import CircularUnitaryEnsembleModel assert _test_args(CircularUnitaryEnsembleModel('U', 3)) def test_sympy__stats__random_matrix_models__CircularOrthogonalEnsembleModel(): from sympy.stats.random_matrix_models import CircularOrthogonalEnsembleModel assert _test_args(CircularOrthogonalEnsembleModel('O', 3)) def test_sympy__stats__random_matrix_models__CircularSymplecticEnsembleModel(): from sympy.stats.random_matrix_models import CircularSymplecticEnsembleModel assert _test_args(CircularSymplecticEnsembleModel('S', 3)) def test_sympy__stats__symbolic_multivariate_probability__ExpectationMatrix(): from sympy.stats import ExpectationMatrix from sympy.stats.rv import RandomMatrixSymbol assert _test_args(ExpectationMatrix(RandomMatrixSymbol('R', 2, 1))) def test_sympy__stats__symbolic_multivariate_probability__VarianceMatrix(): from sympy.stats import VarianceMatrix from sympy.stats.rv import RandomMatrixSymbol assert _test_args(VarianceMatrix(RandomMatrixSymbol('R', 3, 1))) def test_sympy__stats__symbolic_multivariate_probability__CrossCovarianceMatrix(): from sympy.stats import CrossCovarianceMatrix from sympy.stats.rv import RandomMatrixSymbol assert _test_args(CrossCovarianceMatrix(RandomMatrixSymbol('R', 3, 1), RandomMatrixSymbol('X', 3, 1))) def test_sympy__stats__matrix_distributions__MatrixPSpace(): from sympy.stats.matrix_distributions import MatrixDistribution, MatrixPSpace from sympy.matrices.dense import Matrix M = MatrixDistribution(1, Matrix([[1, 0], [0, 1]])) assert _test_args(MatrixPSpace('M', M, 2, 2)) def test_sympy__stats__matrix_distributions__MatrixDistribution(): from sympy.stats.matrix_distributions import MatrixDistribution from sympy.matrices.dense import Matrix assert _test_args(MatrixDistribution(1, Matrix([[1, 0], [0, 1]]))) def test_sympy__stats__matrix_distributions__MatrixGammaDistribution(): from sympy.stats.matrix_distributions import MatrixGammaDistribution from sympy.matrices.dense import Matrix assert _test_args(MatrixGammaDistribution(3, 4, Matrix([[1, 0], [0, 1]]))) def test_sympy__stats__matrix_distributions__WishartDistribution(): from sympy.stats.matrix_distributions import WishartDistribution from sympy.matrices.dense import Matrix assert _test_args(WishartDistribution(3, Matrix([[1, 0], [0, 1]]))) def test_sympy__stats__matrix_distributions__MatrixNormalDistribution(): from sympy.stats.matrix_distributions import MatrixNormalDistribution from sympy.matrices.expressions.matexpr import MatrixSymbol L = MatrixSymbol('L', 1, 2) S1 = MatrixSymbol('S1', 1, 1) S2 = MatrixSymbol('S2', 2, 2) assert _test_args(MatrixNormalDistribution(L, S1, S2)) def test_sympy__stats__matrix_distributions__MatrixStudentTDistribution(): from sympy.stats.matrix_distributions import MatrixStudentTDistribution from sympy.matrices.expressions.matexpr import MatrixSymbol v = symbols('v', positive=True) Omega = MatrixSymbol('Omega', 3, 3) Sigma = MatrixSymbol('Sigma', 1, 1) Location = MatrixSymbol('Location', 1, 3) assert _test_args(MatrixStudentTDistribution(v, Location, Omega, Sigma)) def test_sympy__utilities__matchpy_connector__WildDot(): from sympy.utilities.matchpy_connector import WildDot assert _test_args(WildDot("w_")) def test_sympy__utilities__matchpy_connector__WildPlus(): from sympy.utilities.matchpy_connector import WildPlus assert _test_args(WildPlus("w__")) def test_sympy__utilities__matchpy_connector__WildStar(): from sympy.utilities.matchpy_connector import WildStar assert _test_args(WildStar("w___")) def test_sympy__core__symbol__Str(): from sympy.core.symbol import Str assert _test_args(Str('t')) def test_sympy__core__symbol__Dummy(): from sympy.core.symbol import Dummy assert _test_args(Dummy('t')) def test_sympy__core__symbol__Symbol(): from sympy.core.symbol import Symbol assert _test_args(Symbol('t')) def test_sympy__core__symbol__Wild(): from sympy.core.symbol import Wild assert _test_args(Wild('x', exclude=[x])) @SKIP("abstract class") def test_sympy__functions__combinatorial__factorials__CombinatorialFunction(): pass def test_sympy__functions__combinatorial__factorials__FallingFactorial(): from sympy.functions.combinatorial.factorials import FallingFactorial assert _test_args(FallingFactorial(2, x)) def test_sympy__functions__combinatorial__factorials__MultiFactorial(): from sympy.functions.combinatorial.factorials import MultiFactorial assert _test_args(MultiFactorial(x)) def test_sympy__functions__combinatorial__factorials__RisingFactorial(): from sympy.functions.combinatorial.factorials import RisingFactorial assert _test_args(RisingFactorial(2, x)) def test_sympy__functions__combinatorial__factorials__binomial(): from sympy.functions.combinatorial.factorials import binomial assert _test_args(binomial(2, x)) def test_sympy__functions__combinatorial__factorials__subfactorial(): from sympy.functions.combinatorial.factorials import subfactorial assert _test_args(subfactorial(1)) def test_sympy__functions__combinatorial__factorials__factorial(): from sympy.functions.combinatorial.factorials import factorial assert _test_args(factorial(x)) def test_sympy__functions__combinatorial__factorials__factorial2(): from sympy.functions.combinatorial.factorials import factorial2 assert _test_args(factorial2(x)) def test_sympy__functions__combinatorial__numbers__bell(): from sympy.functions.combinatorial.numbers import bell assert _test_args(bell(x, y)) def test_sympy__functions__combinatorial__numbers__bernoulli(): from sympy.functions.combinatorial.numbers import bernoulli assert _test_args(bernoulli(x)) def test_sympy__functions__combinatorial__numbers__catalan(): from sympy.functions.combinatorial.numbers import catalan assert _test_args(catalan(x)) def test_sympy__functions__combinatorial__numbers__genocchi(): from sympy.functions.combinatorial.numbers import genocchi assert _test_args(genocchi(x)) def test_sympy__functions__combinatorial__numbers__euler(): from sympy.functions.combinatorial.numbers import euler assert _test_args(euler(x)) def test_sympy__functions__combinatorial__numbers__carmichael(): from sympy.functions.combinatorial.numbers import carmichael assert _test_args(carmichael(x)) def test_sympy__functions__combinatorial__numbers__motzkin(): from sympy.functions.combinatorial.numbers import motzkin assert _test_args(motzkin(5)) def test_sympy__functions__combinatorial__numbers__fibonacci(): from sympy.functions.combinatorial.numbers import fibonacci assert _test_args(fibonacci(x)) def test_sympy__functions__combinatorial__numbers__tribonacci(): from sympy.functions.combinatorial.numbers import tribonacci assert _test_args(tribonacci(x)) def test_sympy__functions__combinatorial__numbers__harmonic(): from sympy.functions.combinatorial.numbers import harmonic assert _test_args(harmonic(x, 2)) def test_sympy__functions__combinatorial__numbers__lucas(): from sympy.functions.combinatorial.numbers import lucas assert _test_args(lucas(x)) def test_sympy__functions__combinatorial__numbers__partition(): from sympy.core.symbol import Symbol from sympy.functions.combinatorial.numbers import partition assert _test_args(partition(Symbol('a', integer=True))) def test_sympy__functions__elementary__complexes__Abs(): from sympy.functions.elementary.complexes import Abs assert _test_args(Abs(x)) def test_sympy__functions__elementary__complexes__adjoint(): from sympy.functions.elementary.complexes import adjoint assert _test_args(adjoint(x)) def test_sympy__functions__elementary__complexes__arg(): from sympy.functions.elementary.complexes import arg assert _test_args(arg(x)) def test_sympy__functions__elementary__complexes__conjugate(): from sympy.functions.elementary.complexes import conjugate assert _test_args(conjugate(x)) def test_sympy__functions__elementary__complexes__im(): from sympy.functions.elementary.complexes import im assert _test_args(im(x)) def test_sympy__functions__elementary__complexes__re(): from sympy.functions.elementary.complexes import re assert _test_args(re(x)) def test_sympy__functions__elementary__complexes__sign(): from sympy.functions.elementary.complexes import sign assert _test_args(sign(x)) def test_sympy__functions__elementary__complexes__polar_lift(): from sympy.functions.elementary.complexes import polar_lift assert _test_args(polar_lift(x)) def test_sympy__functions__elementary__complexes__periodic_argument(): from sympy.functions.elementary.complexes import periodic_argument assert _test_args(periodic_argument(x, y)) def test_sympy__functions__elementary__complexes__principal_branch(): from sympy.functions.elementary.complexes import principal_branch assert _test_args(principal_branch(x, y)) def test_sympy__functions__elementary__complexes__transpose(): from sympy.functions.elementary.complexes import transpose assert _test_args(transpose(x)) def test_sympy__functions__elementary__exponential__LambertW(): from sympy.functions.elementary.exponential import LambertW assert _test_args(LambertW(2)) @SKIP("abstract class") def test_sympy__functions__elementary__exponential__ExpBase(): pass def test_sympy__functions__elementary__exponential__exp(): from sympy.functions.elementary.exponential import exp assert _test_args(exp(2)) def test_sympy__functions__elementary__exponential__exp_polar(): from sympy.functions.elementary.exponential import exp_polar assert _test_args(exp_polar(2)) def test_sympy__functions__elementary__exponential__log(): from sympy.functions.elementary.exponential import log assert _test_args(log(2)) @SKIP("abstract class") def test_sympy__functions__elementary__hyperbolic__HyperbolicFunction(): pass @SKIP("abstract class") def test_sympy__functions__elementary__hyperbolic__ReciprocalHyperbolicFunction(): pass @SKIP("abstract class") def test_sympy__functions__elementary__hyperbolic__InverseHyperbolicFunction(): pass def test_sympy__functions__elementary__hyperbolic__acosh(): from sympy.functions.elementary.hyperbolic import acosh assert _test_args(acosh(2)) def test_sympy__functions__elementary__hyperbolic__acoth(): from sympy.functions.elementary.hyperbolic import acoth assert _test_args(acoth(2)) def test_sympy__functions__elementary__hyperbolic__asinh(): from sympy.functions.elementary.hyperbolic import asinh assert _test_args(asinh(2)) def test_sympy__functions__elementary__hyperbolic__atanh(): from sympy.functions.elementary.hyperbolic import atanh assert _test_args(atanh(2)) def test_sympy__functions__elementary__hyperbolic__asech(): from sympy.functions.elementary.hyperbolic import asech assert _test_args(asech(2)) def test_sympy__functions__elementary__hyperbolic__acsch(): from sympy.functions.elementary.hyperbolic import acsch assert _test_args(acsch(2)) def test_sympy__functions__elementary__hyperbolic__cosh(): from sympy.functions.elementary.hyperbolic import cosh assert _test_args(cosh(2)) def test_sympy__functions__elementary__hyperbolic__coth(): from sympy.functions.elementary.hyperbolic import coth assert _test_args(coth(2)) def test_sympy__functions__elementary__hyperbolic__csch(): from sympy.functions.elementary.hyperbolic import csch assert _test_args(csch(2)) def test_sympy__functions__elementary__hyperbolic__sech(): from sympy.functions.elementary.hyperbolic import sech assert _test_args(sech(2)) def test_sympy__functions__elementary__hyperbolic__sinh(): from sympy.functions.elementary.hyperbolic import sinh assert _test_args(sinh(2)) def test_sympy__functions__elementary__hyperbolic__tanh(): from sympy.functions.elementary.hyperbolic import tanh assert _test_args(tanh(2)) @SKIP("does this work at all?") def test_sympy__functions__elementary__integers__RoundFunction(): from sympy.functions.elementary.integers import RoundFunction assert _test_args(RoundFunction()) def test_sympy__functions__elementary__integers__ceiling(): from sympy.functions.elementary.integers import ceiling assert _test_args(ceiling(x)) def test_sympy__functions__elementary__integers__floor(): from sympy.functions.elementary.integers import floor assert _test_args(floor(x)) def test_sympy__functions__elementary__integers__frac(): from sympy.functions.elementary.integers import frac assert _test_args(frac(x)) def test_sympy__functions__elementary__miscellaneous__IdentityFunction(): from sympy.functions.elementary.miscellaneous import IdentityFunction assert _test_args(IdentityFunction()) def test_sympy__functions__elementary__miscellaneous__Max(): from sympy.functions.elementary.miscellaneous import Max assert _test_args(Max(x, 2)) def test_sympy__functions__elementary__miscellaneous__Min(): from sympy.functions.elementary.miscellaneous import Min assert _test_args(Min(x, 2)) @SKIP("abstract class") def test_sympy__functions__elementary__miscellaneous__MinMaxBase(): pass def test_sympy__functions__elementary__miscellaneous__Rem(): from sympy.functions.elementary.miscellaneous import Rem assert _test_args(Rem(x, 2)) def test_sympy__functions__elementary__piecewise__ExprCondPair(): from sympy.functions.elementary.piecewise import ExprCondPair assert _test_args(ExprCondPair(1, True)) def test_sympy__functions__elementary__piecewise__Piecewise(): from sympy.functions.elementary.piecewise import Piecewise assert _test_args(Piecewise((1, x >= 0), (0, True))) @SKIP("abstract class") def test_sympy__functions__elementary__trigonometric__TrigonometricFunction(): pass @SKIP("abstract class") def test_sympy__functions__elementary__trigonometric__ReciprocalTrigonometricFunction(): pass @SKIP("abstract class") def test_sympy__functions__elementary__trigonometric__InverseTrigonometricFunction(): pass def test_sympy__functions__elementary__trigonometric__acos(): from sympy.functions.elementary.trigonometric import acos assert _test_args(acos(2)) def test_sympy__functions__elementary__trigonometric__acot(): from sympy.functions.elementary.trigonometric import acot assert _test_args(acot(2)) def test_sympy__functions__elementary__trigonometric__asin(): from sympy.functions.elementary.trigonometric import asin assert _test_args(asin(2)) def test_sympy__functions__elementary__trigonometric__asec(): from sympy.functions.elementary.trigonometric import asec assert _test_args(asec(2)) def test_sympy__functions__elementary__trigonometric__acsc(): from sympy.functions.elementary.trigonometric import acsc assert _test_args(acsc(2)) def test_sympy__functions__elementary__trigonometric__atan(): from sympy.functions.elementary.trigonometric import atan assert _test_args(atan(2)) def test_sympy__functions__elementary__trigonometric__atan2(): from sympy.functions.elementary.trigonometric import atan2 assert _test_args(atan2(2, 3)) def test_sympy__functions__elementary__trigonometric__cos(): from sympy.functions.elementary.trigonometric import cos assert _test_args(cos(2)) def test_sympy__functions__elementary__trigonometric__csc(): from sympy.functions.elementary.trigonometric import csc assert _test_args(csc(2)) def test_sympy__functions__elementary__trigonometric__cot(): from sympy.functions.elementary.trigonometric import cot assert _test_args(cot(2)) def test_sympy__functions__elementary__trigonometric__sin(): assert _test_args(sin(2)) def test_sympy__functions__elementary__trigonometric__sinc(): from sympy.functions.elementary.trigonometric import sinc assert _test_args(sinc(2)) def test_sympy__functions__elementary__trigonometric__sec(): from sympy.functions.elementary.trigonometric import sec assert _test_args(sec(2)) def test_sympy__functions__elementary__trigonometric__tan(): from sympy.functions.elementary.trigonometric import tan assert _test_args(tan(2)) @SKIP("abstract class") def test_sympy__functions__special__bessel__BesselBase(): pass @SKIP("abstract class") def test_sympy__functions__special__bessel__SphericalBesselBase(): pass @SKIP("abstract class") def test_sympy__functions__special__bessel__SphericalHankelBase(): pass def test_sympy__functions__special__bessel__besseli(): from sympy.functions.special.bessel import besseli assert _test_args(besseli(x, 1)) def test_sympy__functions__special__bessel__besselj(): from sympy.functions.special.bessel import besselj assert _test_args(besselj(x, 1)) def test_sympy__functions__special__bessel__besselk(): from sympy.functions.special.bessel import besselk assert _test_args(besselk(x, 1)) def test_sympy__functions__special__bessel__bessely(): from sympy.functions.special.bessel import bessely assert _test_args(bessely(x, 1)) def test_sympy__functions__special__bessel__hankel1(): from sympy.functions.special.bessel import hankel1 assert _test_args(hankel1(x, 1)) def test_sympy__functions__special__bessel__hankel2(): from sympy.functions.special.bessel import hankel2 assert _test_args(hankel2(x, 1)) def test_sympy__functions__special__bessel__jn(): from sympy.functions.special.bessel import jn assert _test_args(jn(0, x)) def test_sympy__functions__special__bessel__yn(): from sympy.functions.special.bessel import yn assert _test_args(yn(0, x)) def test_sympy__functions__special__bessel__hn1(): from sympy.functions.special.bessel import hn1 assert _test_args(hn1(0, x)) def test_sympy__functions__special__bessel__hn2(): from sympy.functions.special.bessel import hn2 assert _test_args(hn2(0, x)) def test_sympy__functions__special__bessel__AiryBase(): pass def test_sympy__functions__special__bessel__airyai(): from sympy.functions.special.bessel import airyai assert _test_args(airyai(2)) def test_sympy__functions__special__bessel__airybi(): from sympy.functions.special.bessel import airybi assert _test_args(airybi(2)) def test_sympy__functions__special__bessel__airyaiprime(): from sympy.functions.special.bessel import airyaiprime assert _test_args(airyaiprime(2)) def test_sympy__functions__special__bessel__airybiprime(): from sympy.functions.special.bessel import airybiprime assert _test_args(airybiprime(2)) def test_sympy__functions__special__bessel__marcumq(): from sympy.functions.special.bessel import marcumq assert _test_args(marcumq(x, y, z)) def test_sympy__functions__special__elliptic_integrals__elliptic_k(): from sympy.functions.special.elliptic_integrals import elliptic_k as K assert _test_args(K(x)) def test_sympy__functions__special__elliptic_integrals__elliptic_f(): from sympy.functions.special.elliptic_integrals import elliptic_f as F assert _test_args(F(x, y)) def test_sympy__functions__special__elliptic_integrals__elliptic_e(): from sympy.functions.special.elliptic_integrals import elliptic_e as E assert _test_args(E(x)) assert _test_args(E(x, y)) def test_sympy__functions__special__elliptic_integrals__elliptic_pi(): from sympy.functions.special.elliptic_integrals import elliptic_pi as P assert _test_args(P(x, y)) assert _test_args(P(x, y, z)) def test_sympy__functions__special__delta_functions__DiracDelta(): from sympy.functions.special.delta_functions import DiracDelta assert _test_args(DiracDelta(x, 1)) def test_sympy__functions__special__singularity_functions__SingularityFunction(): from sympy.functions.special.singularity_functions import SingularityFunction assert _test_args(SingularityFunction(x, y, z)) def test_sympy__functions__special__delta_functions__Heaviside(): from sympy.functions.special.delta_functions import Heaviside assert _test_args(Heaviside(x)) def test_sympy__functions__special__error_functions__erf(): from sympy.functions.special.error_functions import erf assert _test_args(erf(2)) def test_sympy__functions__special__error_functions__erfc(): from sympy.functions.special.error_functions import erfc assert _test_args(erfc(2)) def test_sympy__functions__special__error_functions__erfi(): from sympy.functions.special.error_functions import erfi assert _test_args(erfi(2)) def test_sympy__functions__special__error_functions__erf2(): from sympy.functions.special.error_functions import erf2 assert _test_args(erf2(2, 3)) def test_sympy__functions__special__error_functions__erfinv(): from sympy.functions.special.error_functions import erfinv assert _test_args(erfinv(2)) def test_sympy__functions__special__error_functions__erfcinv(): from sympy.functions.special.error_functions import erfcinv assert _test_args(erfcinv(2)) def test_sympy__functions__special__error_functions__erf2inv(): from sympy.functions.special.error_functions import erf2inv assert _test_args(erf2inv(2, 3)) @SKIP("abstract class") def test_sympy__functions__special__error_functions__FresnelIntegral(): pass def test_sympy__functions__special__error_functions__fresnels(): from sympy.functions.special.error_functions import fresnels assert _test_args(fresnels(2)) def test_sympy__functions__special__error_functions__fresnelc(): from sympy.functions.special.error_functions import fresnelc assert _test_args(fresnelc(2)) def test_sympy__functions__special__error_functions__erfs(): from sympy.functions.special.error_functions import _erfs assert _test_args(_erfs(2)) def test_sympy__functions__special__error_functions__Ei(): from sympy.functions.special.error_functions import Ei assert _test_args(Ei(2)) def test_sympy__functions__special__error_functions__li(): from sympy.functions.special.error_functions import li assert _test_args(li(2)) def test_sympy__functions__special__error_functions__Li(): from sympy.functions.special.error_functions import Li assert _test_args(Li(2)) @SKIP("abstract class") def test_sympy__functions__special__error_functions__TrigonometricIntegral(): pass def test_sympy__functions__special__error_functions__Si(): from sympy.functions.special.error_functions import Si assert _test_args(Si(2)) def test_sympy__functions__special__error_functions__Ci(): from sympy.functions.special.error_functions import Ci assert _test_args(Ci(2)) def test_sympy__functions__special__error_functions__Shi(): from sympy.functions.special.error_functions import Shi assert _test_args(Shi(2)) def test_sympy__functions__special__error_functions__Chi(): from sympy.functions.special.error_functions import Chi assert _test_args(Chi(2)) def test_sympy__functions__special__error_functions__expint(): from sympy.functions.special.error_functions import expint assert _test_args(expint(y, x)) def test_sympy__functions__special__gamma_functions__gamma(): from sympy.functions.special.gamma_functions import gamma assert _test_args(gamma(x)) def test_sympy__functions__special__gamma_functions__loggamma(): from sympy.functions.special.gamma_functions import loggamma assert _test_args(loggamma(2)) def test_sympy__functions__special__gamma_functions__lowergamma(): from sympy.functions.special.gamma_functions import lowergamma assert _test_args(lowergamma(x, 2)) def test_sympy__functions__special__gamma_functions__polygamma(): from sympy.functions.special.gamma_functions import polygamma assert _test_args(polygamma(x, 2)) def test_sympy__functions__special__gamma_functions__digamma(): from sympy.functions.special.gamma_functions import digamma assert _test_args(digamma(x)) def test_sympy__functions__special__gamma_functions__trigamma(): from sympy.functions.special.gamma_functions import trigamma assert _test_args(trigamma(x)) def test_sympy__functions__special__gamma_functions__uppergamma(): from sympy.functions.special.gamma_functions import uppergamma assert _test_args(uppergamma(x, 2)) def test_sympy__functions__special__gamma_functions__multigamma(): from sympy.functions.special.gamma_functions import multigamma assert _test_args(multigamma(x, 1)) def test_sympy__functions__special__beta_functions__beta(): from sympy.functions.special.beta_functions import beta assert _test_args(beta(x)) assert _test_args(beta(x, x)) def test_sympy__functions__special__beta_functions__betainc(): from sympy.functions.special.beta_functions import betainc assert _test_args(betainc(a, b, x, y)) def test_sympy__functions__special__beta_functions__betainc_regularized(): from sympy.functions.special.beta_functions import betainc_regularized assert _test_args(betainc_regularized(a, b, x, y)) def test_sympy__functions__special__mathieu_functions__MathieuBase(): pass def test_sympy__functions__special__mathieu_functions__mathieus(): from sympy.functions.special.mathieu_functions import mathieus assert _test_args(mathieus(1, 1, 1)) def test_sympy__functions__special__mathieu_functions__mathieuc(): from sympy.functions.special.mathieu_functions import mathieuc assert _test_args(mathieuc(1, 1, 1)) def test_sympy__functions__special__mathieu_functions__mathieusprime(): from sympy.functions.special.mathieu_functions import mathieusprime assert _test_args(mathieusprime(1, 1, 1)) def test_sympy__functions__special__mathieu_functions__mathieucprime(): from sympy.functions.special.mathieu_functions import mathieucprime assert _test_args(mathieucprime(1, 1, 1)) @SKIP("abstract class") def test_sympy__functions__special__hyper__TupleParametersBase(): pass @SKIP("abstract class") def test_sympy__functions__special__hyper__TupleArg(): pass def test_sympy__functions__special__hyper__hyper(): from sympy.functions.special.hyper import hyper assert _test_args(hyper([1, 2, 3], [4, 5], x)) def test_sympy__functions__special__hyper__meijerg(): from sympy.functions.special.hyper import meijerg assert _test_args(meijerg([1, 2, 3], [4, 5], [6], [], x)) @SKIP("abstract class") def test_sympy__functions__special__hyper__HyperRep(): pass def test_sympy__functions__special__hyper__HyperRep_power1(): from sympy.functions.special.hyper import HyperRep_power1 assert _test_args(HyperRep_power1(x, y)) def test_sympy__functions__special__hyper__HyperRep_power2(): from sympy.functions.special.hyper import HyperRep_power2 assert _test_args(HyperRep_power2(x, y)) def test_sympy__functions__special__hyper__HyperRep_log1(): from sympy.functions.special.hyper import HyperRep_log1 assert _test_args(HyperRep_log1(x)) def test_sympy__functions__special__hyper__HyperRep_atanh(): from sympy.functions.special.hyper import HyperRep_atanh assert _test_args(HyperRep_atanh(x)) def test_sympy__functions__special__hyper__HyperRep_asin1(): from sympy.functions.special.hyper import HyperRep_asin1 assert _test_args(HyperRep_asin1(x)) def test_sympy__functions__special__hyper__HyperRep_asin2(): from sympy.functions.special.hyper import HyperRep_asin2 assert _test_args(HyperRep_asin2(x)) def test_sympy__functions__special__hyper__HyperRep_sqrts1(): from sympy.functions.special.hyper import HyperRep_sqrts1 assert _test_args(HyperRep_sqrts1(x, y)) def test_sympy__functions__special__hyper__HyperRep_sqrts2(): from sympy.functions.special.hyper import HyperRep_sqrts2 assert _test_args(HyperRep_sqrts2(x, y)) def test_sympy__functions__special__hyper__HyperRep_log2(): from sympy.functions.special.hyper import HyperRep_log2 assert _test_args(HyperRep_log2(x)) def test_sympy__functions__special__hyper__HyperRep_cosasin(): from sympy.functions.special.hyper import HyperRep_cosasin assert _test_args(HyperRep_cosasin(x, y)) def test_sympy__functions__special__hyper__HyperRep_sinasin(): from sympy.functions.special.hyper import HyperRep_sinasin assert _test_args(HyperRep_sinasin(x, y)) def test_sympy__functions__special__hyper__appellf1(): from sympy.functions.special.hyper import appellf1 a, b1, b2, c, x, y = symbols('a b1 b2 c x y') assert _test_args(appellf1(a, b1, b2, c, x, y)) @SKIP("abstract class") def test_sympy__functions__special__polynomials__OrthogonalPolynomial(): pass def test_sympy__functions__special__polynomials__jacobi(): from sympy.functions.special.polynomials import jacobi assert _test_args(jacobi(x, 2, 2, 2)) def test_sympy__functions__special__polynomials__gegenbauer(): from sympy.functions.special.polynomials import gegenbauer assert _test_args(gegenbauer(x, 2, 2)) def test_sympy__functions__special__polynomials__chebyshevt(): from sympy.functions.special.polynomials import chebyshevt assert _test_args(chebyshevt(x, 2)) def test_sympy__functions__special__polynomials__chebyshevt_root(): from sympy.functions.special.polynomials import chebyshevt_root assert _test_args(chebyshevt_root(3, 2)) def test_sympy__functions__special__polynomials__chebyshevu(): from sympy.functions.special.polynomials import chebyshevu assert _test_args(chebyshevu(x, 2)) def test_sympy__functions__special__polynomials__chebyshevu_root(): from sympy.functions.special.polynomials import chebyshevu_root assert _test_args(chebyshevu_root(3, 2)) def test_sympy__functions__special__polynomials__hermite(): from sympy.functions.special.polynomials import hermite assert _test_args(hermite(x, 2)) def test_sympy__functions__special__polynomials__legendre(): from sympy.functions.special.polynomials import legendre assert _test_args(legendre(x, 2)) def test_sympy__functions__special__polynomials__assoc_legendre(): from sympy.functions.special.polynomials import assoc_legendre assert _test_args(assoc_legendre(x, 0, y)) def test_sympy__functions__special__polynomials__laguerre(): from sympy.functions.special.polynomials import laguerre assert _test_args(laguerre(x, 2)) def test_sympy__functions__special__polynomials__assoc_laguerre(): from sympy.functions.special.polynomials import assoc_laguerre assert _test_args(assoc_laguerre(x, 0, y)) def test_sympy__functions__special__spherical_harmonics__Ynm(): from sympy.functions.special.spherical_harmonics import Ynm assert _test_args(Ynm(1, 1, x, y)) def test_sympy__functions__special__spherical_harmonics__Znm(): from sympy.functions.special.spherical_harmonics import Znm assert _test_args(Znm(1, 1, x, y)) def test_sympy__functions__special__tensor_functions__LeviCivita(): from sympy.functions.special.tensor_functions import LeviCivita assert _test_args(LeviCivita(x, y, 2)) def test_sympy__functions__special__tensor_functions__KroneckerDelta(): from sympy.functions.special.tensor_functions import KroneckerDelta assert _test_args(KroneckerDelta(x, y)) def test_sympy__functions__special__zeta_functions__dirichlet_eta(): from sympy.functions.special.zeta_functions import dirichlet_eta assert _test_args(dirichlet_eta(x)) def test_sympy__functions__special__zeta_functions__riemann_xi(): from sympy.functions.special.zeta_functions import riemann_xi assert _test_args(riemann_xi(x)) def test_sympy__functions__special__zeta_functions__zeta(): from sympy.functions.special.zeta_functions import zeta assert _test_args(zeta(101)) def test_sympy__functions__special__zeta_functions__lerchphi(): from sympy.functions.special.zeta_functions import lerchphi assert _test_args(lerchphi(x, y, z)) def test_sympy__functions__special__zeta_functions__polylog(): from sympy.functions.special.zeta_functions import polylog assert _test_args(polylog(x, y)) def test_sympy__functions__special__zeta_functions__stieltjes(): from sympy.functions.special.zeta_functions import stieltjes assert _test_args(stieltjes(x, y)) def test_sympy__integrals__integrals__Integral(): from sympy.integrals.integrals import Integral assert _test_args(Integral(2, (x, 0, 1))) def test_sympy__integrals__risch__NonElementaryIntegral(): from sympy.integrals.risch import NonElementaryIntegral assert _test_args(NonElementaryIntegral(exp(-x**2), x)) @SKIP("abstract class") def test_sympy__integrals__transforms__IntegralTransform(): pass def test_sympy__integrals__transforms__MellinTransform(): from sympy.integrals.transforms import MellinTransform assert _test_args(MellinTransform(2, x, y)) def test_sympy__integrals__transforms__InverseMellinTransform(): from sympy.integrals.transforms import InverseMellinTransform assert _test_args(InverseMellinTransform(2, x, y, 0, 1)) def test_sympy__integrals__transforms__LaplaceTransform(): from sympy.integrals.transforms import LaplaceTransform assert _test_args(LaplaceTransform(2, x, y)) def test_sympy__integrals__transforms__InverseLaplaceTransform(): from sympy.integrals.transforms import InverseLaplaceTransform assert _test_args(InverseLaplaceTransform(2, x, y, 0)) @SKIP("abstract class") def test_sympy__integrals__transforms__FourierTypeTransform(): pass def test_sympy__integrals__transforms__InverseFourierTransform(): from sympy.integrals.transforms import InverseFourierTransform assert _test_args(InverseFourierTransform(2, x, y)) def test_sympy__integrals__transforms__FourierTransform(): from sympy.integrals.transforms import FourierTransform assert _test_args(FourierTransform(2, x, y)) @SKIP("abstract class") def test_sympy__integrals__transforms__SineCosineTypeTransform(): pass def test_sympy__integrals__transforms__InverseSineTransform(): from sympy.integrals.transforms import InverseSineTransform assert _test_args(InverseSineTransform(2, x, y)) def test_sympy__integrals__transforms__SineTransform(): from sympy.integrals.transforms import SineTransform assert _test_args(SineTransform(2, x, y)) def test_sympy__integrals__transforms__InverseCosineTransform(): from sympy.integrals.transforms import InverseCosineTransform assert _test_args(InverseCosineTransform(2, x, y)) def test_sympy__integrals__transforms__CosineTransform(): from sympy.integrals.transforms import CosineTransform assert _test_args(CosineTransform(2, x, y)) @SKIP("abstract class") def test_sympy__integrals__transforms__HankelTypeTransform(): pass def test_sympy__integrals__transforms__InverseHankelTransform(): from sympy.integrals.transforms import InverseHankelTransform assert _test_args(InverseHankelTransform(2, x, y, 0)) def test_sympy__integrals__transforms__HankelTransform(): from sympy.integrals.transforms import HankelTransform assert _test_args(HankelTransform(2, x, y, 0)) @XFAIL def test_sympy__liealgebras__cartan_type__CartanType_generator(): from sympy.liealgebras.cartan_type import CartanType_generator assert _test_args(CartanType_generator("A2")) @XFAIL def test_sympy__liealgebras__cartan_type__Standard_Cartan(): from sympy.liealgebras.cartan_type import Standard_Cartan assert _test_args(Standard_Cartan("A", 2)) @XFAIL def test_sympy__liealgebras__weyl_group__WeylGroup(): from sympy.liealgebras.weyl_group import WeylGroup assert _test_args(WeylGroup("B4")) @XFAIL def test_sympy__liealgebras__root_system__RootSystem(): from sympy.liealgebras.root_system import RootSystem assert _test_args(RootSystem("A2")) @XFAIL def test_sympy__liealgebras__type_a__TypeA(): from sympy.liealgebras.type_a import TypeA assert _test_args(TypeA(2)) @XFAIL def test_sympy__liealgebras__type_b__TypeB(): from sympy.liealgebras.type_b import TypeB assert _test_args(TypeB(4)) @XFAIL def test_sympy__liealgebras__type_c__TypeC(): from sympy.liealgebras.type_c import TypeC assert _test_args(TypeC(4)) @XFAIL def test_sympy__liealgebras__type_d__TypeD(): from sympy.liealgebras.type_d import TypeD assert _test_args(TypeD(4)) @XFAIL def test_sympy__liealgebras__type_e__TypeE(): from sympy.liealgebras.type_e import TypeE assert _test_args(TypeE(6)) @XFAIL def test_sympy__liealgebras__type_f__TypeF(): from sympy.liealgebras.type_f import TypeF assert _test_args(TypeF(4)) @XFAIL def test_sympy__liealgebras__type_g__TypeG(): from sympy.liealgebras.type_g import TypeG assert _test_args(TypeG(2)) def test_sympy__logic__boolalg__And(): from sympy.logic.boolalg import And assert _test_args(And(x, y, 1)) @SKIP("abstract class") def test_sympy__logic__boolalg__Boolean(): pass def test_sympy__logic__boolalg__BooleanFunction(): from sympy.logic.boolalg import BooleanFunction assert _test_args(BooleanFunction(1, 2, 3)) @SKIP("abstract class") def test_sympy__logic__boolalg__BooleanAtom(): pass def test_sympy__logic__boolalg__BooleanTrue(): from sympy.logic.boolalg import true assert _test_args(true) def test_sympy__logic__boolalg__BooleanFalse(): from sympy.logic.boolalg import false assert _test_args(false) def test_sympy__logic__boolalg__Equivalent(): from sympy.logic.boolalg import Equivalent assert _test_args(Equivalent(x, 2)) def test_sympy__logic__boolalg__ITE(): from sympy.logic.boolalg import ITE assert _test_args(ITE(x, y, 1)) def test_sympy__logic__boolalg__Implies(): from sympy.logic.boolalg import Implies assert _test_args(Implies(x, y)) def test_sympy__logic__boolalg__Nand(): from sympy.logic.boolalg import Nand assert _test_args(Nand(x, y, 1)) def test_sympy__logic__boolalg__Nor(): from sympy.logic.boolalg import Nor assert _test_args(Nor(x, y)) def test_sympy__logic__boolalg__Not(): from sympy.logic.boolalg import Not assert _test_args(Not(x)) def test_sympy__logic__boolalg__Or(): from sympy.logic.boolalg import Or assert _test_args(Or(x, y)) def test_sympy__logic__boolalg__Xor(): from sympy.logic.boolalg import Xor assert _test_args(Xor(x, y, 2)) def test_sympy__logic__boolalg__Xnor(): from sympy.logic.boolalg import Xnor assert _test_args(Xnor(x, y, 2)) def test_sympy__logic__boolalg__Exclusive(): from sympy.logic.boolalg import Exclusive assert _test_args(Exclusive(x, y, z)) def test_sympy__matrices__matrices__DeferredVector(): from sympy.matrices.matrices import DeferredVector assert _test_args(DeferredVector("X")) @SKIP("abstract class") def test_sympy__matrices__expressions__matexpr__MatrixBase(): pass @SKIP("abstract class") def test_sympy__matrices__immutable__ImmutableRepMatrix(): pass def test_sympy__matrices__immutable__ImmutableDenseMatrix(): from sympy.matrices.immutable import ImmutableDenseMatrix m = ImmutableDenseMatrix([[1, 2], [3, 4]]) assert _test_args(m) assert _test_args(Basic(*list(m))) m = ImmutableDenseMatrix(1, 1, [1]) assert _test_args(m) assert _test_args(Basic(*list(m))) m = ImmutableDenseMatrix(2, 2, lambda i, j: 1) assert m[0, 0] is S.One m = ImmutableDenseMatrix(2, 2, lambda i, j: 1/(1 + i) + 1/(1 + j)) assert m[1, 1] is S.One # true div. will give 1.0 if i,j not sympified assert _test_args(m) assert _test_args(Basic(*list(m))) def test_sympy__matrices__immutable__ImmutableSparseMatrix(): from sympy.matrices.immutable import ImmutableSparseMatrix m = ImmutableSparseMatrix([[1, 2], [3, 4]]) assert _test_args(m) assert _test_args(Basic(*list(m))) m = ImmutableSparseMatrix(1, 1, {(0, 0): 1}) assert _test_args(m) assert _test_args(Basic(*list(m))) m = ImmutableSparseMatrix(1, 1, [1]) assert _test_args(m) assert _test_args(Basic(*list(m))) m = ImmutableSparseMatrix(2, 2, lambda i, j: 1) assert m[0, 0] is S.One m = ImmutableSparseMatrix(2, 2, lambda i, j: 1/(1 + i) + 1/(1 + j)) assert m[1, 1] is S.One # true div. will give 1.0 if i,j not sympified assert _test_args(m) assert _test_args(Basic(*list(m))) def test_sympy__matrices__expressions__slice__MatrixSlice(): from sympy.matrices.expressions.slice import MatrixSlice from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', 4, 4) assert _test_args(MatrixSlice(X, (0, 2), (0, 2))) def test_sympy__matrices__expressions__applyfunc__ElementwiseApplyFunction(): from sympy.matrices.expressions.applyfunc import ElementwiseApplyFunction from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol("X", x, x) func = Lambda(x, x**2) assert _test_args(ElementwiseApplyFunction(func, X)) def test_sympy__matrices__expressions__blockmatrix__BlockDiagMatrix(): from sympy.matrices.expressions.blockmatrix import BlockDiagMatrix from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', x, x) Y = MatrixSymbol('Y', y, y) assert _test_args(BlockDiagMatrix(X, Y)) def test_sympy__matrices__expressions__blockmatrix__BlockMatrix(): from sympy.matrices.expressions.blockmatrix import BlockMatrix from sympy.matrices.expressions import MatrixSymbol, ZeroMatrix X = MatrixSymbol('X', x, x) Y = MatrixSymbol('Y', y, y) Z = MatrixSymbol('Z', x, y) O = ZeroMatrix(y, x) assert _test_args(BlockMatrix([[X, Z], [O, Y]])) def test_sympy__matrices__expressions__inverse__Inverse(): from sympy.matrices.expressions.inverse import Inverse from sympy.matrices.expressions import MatrixSymbol assert _test_args(Inverse(MatrixSymbol('A', 3, 3))) def test_sympy__matrices__expressions__matadd__MatAdd(): from sympy.matrices.expressions.matadd import MatAdd from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', x, y) Y = MatrixSymbol('Y', x, y) assert _test_args(MatAdd(X, Y)) @SKIP("abstract class") def test_sympy__matrices__expressions__matexpr__MatrixExpr(): pass def test_sympy__matrices__expressions__matexpr__MatrixElement(): from sympy.matrices.expressions.matexpr import MatrixSymbol, MatrixElement from sympy.core.singleton import S assert _test_args(MatrixElement(MatrixSymbol('A', 3, 5), S(2), S(3))) def test_sympy__matrices__expressions__matexpr__MatrixSymbol(): from sympy.matrices.expressions.matexpr import MatrixSymbol assert _test_args(MatrixSymbol('A', 3, 5)) def test_sympy__matrices__expressions__special__OneMatrix(): from sympy.matrices.expressions.special import OneMatrix assert _test_args(OneMatrix(3, 5)) def test_sympy__matrices__expressions__special__ZeroMatrix(): from sympy.matrices.expressions.special import ZeroMatrix assert _test_args(ZeroMatrix(3, 5)) def test_sympy__matrices__expressions__special__GenericZeroMatrix(): from sympy.matrices.expressions.special import GenericZeroMatrix assert _test_args(GenericZeroMatrix()) def test_sympy__matrices__expressions__special__Identity(): from sympy.matrices.expressions.special import Identity assert _test_args(Identity(3)) def test_sympy__matrices__expressions__special__GenericIdentity(): from sympy.matrices.expressions.special import GenericIdentity assert _test_args(GenericIdentity()) def test_sympy__matrices__expressions__sets__MatrixSet(): from sympy.matrices.expressions.sets import MatrixSet from sympy.core.singleton import S assert _test_args(MatrixSet(2, 2, S.Reals)) def test_sympy__matrices__expressions__matmul__MatMul(): from sympy.matrices.expressions.matmul import MatMul from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', x, y) Y = MatrixSymbol('Y', y, x) assert _test_args(MatMul(X, Y)) def test_sympy__matrices__expressions__dotproduct__DotProduct(): from sympy.matrices.expressions.dotproduct import DotProduct from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', x, 1) Y = MatrixSymbol('Y', x, 1) assert _test_args(DotProduct(X, Y)) def test_sympy__matrices__expressions__diagonal__DiagonalMatrix(): from sympy.matrices.expressions.diagonal import DiagonalMatrix from sympy.matrices.expressions import MatrixSymbol x = MatrixSymbol('x', 10, 1) assert _test_args(DiagonalMatrix(x)) def test_sympy__matrices__expressions__diagonal__DiagonalOf(): from sympy.matrices.expressions.diagonal import DiagonalOf from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('x', 10, 10) assert _test_args(DiagonalOf(X)) def test_sympy__matrices__expressions__diagonal__DiagMatrix(): from sympy.matrices.expressions.diagonal import DiagMatrix from sympy.matrices.expressions import MatrixSymbol x = MatrixSymbol('x', 10, 1) assert _test_args(DiagMatrix(x)) def test_sympy__matrices__expressions__hadamard__HadamardProduct(): from sympy.matrices.expressions.hadamard import HadamardProduct from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', x, y) Y = MatrixSymbol('Y', x, y) assert _test_args(HadamardProduct(X, Y)) def test_sympy__matrices__expressions__hadamard__HadamardPower(): from sympy.matrices.expressions.hadamard import HadamardPower from sympy.matrices.expressions import MatrixSymbol from sympy.core.symbol import Symbol X = MatrixSymbol('X', x, y) n = Symbol("n") assert _test_args(HadamardPower(X, n)) def test_sympy__matrices__expressions__kronecker__KroneckerProduct(): from sympy.matrices.expressions.kronecker import KroneckerProduct from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', x, y) Y = MatrixSymbol('Y', x, y) assert _test_args(KroneckerProduct(X, Y)) def test_sympy__matrices__expressions__matpow__MatPow(): from sympy.matrices.expressions.matpow import MatPow from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', x, x) assert _test_args(MatPow(X, 2)) def test_sympy__matrices__expressions__transpose__Transpose(): from sympy.matrices.expressions.transpose import Transpose from sympy.matrices.expressions import MatrixSymbol assert _test_args(Transpose(MatrixSymbol('A', 3, 5))) def test_sympy__matrices__expressions__adjoint__Adjoint(): from sympy.matrices.expressions.adjoint import Adjoint from sympy.matrices.expressions import MatrixSymbol assert _test_args(Adjoint(MatrixSymbol('A', 3, 5))) def test_sympy__matrices__expressions__trace__Trace(): from sympy.matrices.expressions.trace import Trace from sympy.matrices.expressions import MatrixSymbol assert _test_args(Trace(MatrixSymbol('A', 3, 3))) def test_sympy__matrices__expressions__determinant__Determinant(): from sympy.matrices.expressions.determinant import Determinant from sympy.matrices.expressions import MatrixSymbol assert _test_args(Determinant(MatrixSymbol('A', 3, 3))) def test_sympy__matrices__expressions__determinant__Permanent(): from sympy.matrices.expressions.determinant import Permanent from sympy.matrices.expressions import MatrixSymbol assert _test_args(Permanent(MatrixSymbol('A', 3, 4))) def test_sympy__matrices__expressions__funcmatrix__FunctionMatrix(): from sympy.matrices.expressions.funcmatrix import FunctionMatrix from sympy.core.symbol import symbols i, j = symbols('i,j') assert _test_args(FunctionMatrix(3, 3, Lambda((i, j), i - j) )) def test_sympy__matrices__expressions__fourier__DFT(): from sympy.matrices.expressions.fourier import DFT from sympy.core.singleton import S assert _test_args(DFT(S(2))) def test_sympy__matrices__expressions__fourier__IDFT(): from sympy.matrices.expressions.fourier import IDFT from sympy.core.singleton import S assert _test_args(IDFT(S(2))) from sympy.matrices.expressions import MatrixSymbol X = MatrixSymbol('X', 10, 10) def test_sympy__matrices__expressions__factorizations__LofLU(): from sympy.matrices.expressions.factorizations import LofLU assert _test_args(LofLU(X)) def test_sympy__matrices__expressions__factorizations__UofLU(): from sympy.matrices.expressions.factorizations import UofLU assert _test_args(UofLU(X)) def test_sympy__matrices__expressions__factorizations__QofQR(): from sympy.matrices.expressions.factorizations import QofQR assert _test_args(QofQR(X)) def test_sympy__matrices__expressions__factorizations__RofQR(): from sympy.matrices.expressions.factorizations import RofQR assert _test_args(RofQR(X)) def test_sympy__matrices__expressions__factorizations__LofCholesky(): from sympy.matrices.expressions.factorizations import LofCholesky assert _test_args(LofCholesky(X)) def test_sympy__matrices__expressions__factorizations__UofCholesky(): from sympy.matrices.expressions.factorizations import UofCholesky assert _test_args(UofCholesky(X)) def test_sympy__matrices__expressions__factorizations__EigenVectors(): from sympy.matrices.expressions.factorizations import EigenVectors assert _test_args(EigenVectors(X)) def test_sympy__matrices__expressions__factorizations__EigenValues(): from sympy.matrices.expressions.factorizations import EigenValues assert _test_args(EigenValues(X)) def test_sympy__matrices__expressions__factorizations__UofSVD(): from sympy.matrices.expressions.factorizations import UofSVD assert _test_args(UofSVD(X)) def test_sympy__matrices__expressions__factorizations__VofSVD(): from sympy.matrices.expressions.factorizations import VofSVD assert _test_args(VofSVD(X)) def test_sympy__matrices__expressions__factorizations__SofSVD(): from sympy.matrices.expressions.factorizations import SofSVD assert _test_args(SofSVD(X)) @SKIP("abstract class") def test_sympy__matrices__expressions__factorizations__Factorization(): pass def test_sympy__matrices__expressions__permutation__PermutationMatrix(): from sympy.combinatorics import Permutation from sympy.matrices.expressions.permutation import PermutationMatrix assert _test_args(PermutationMatrix(Permutation([2, 0, 1]))) def test_sympy__matrices__expressions__permutation__MatrixPermute(): from sympy.combinatorics import Permutation from sympy.matrices.expressions.matexpr import MatrixSymbol from sympy.matrices.expressions.permutation import MatrixPermute A = MatrixSymbol('A', 3, 3) assert _test_args(MatrixPermute(A, Permutation([2, 0, 1]))) def test_sympy__matrices__expressions__companion__CompanionMatrix(): from sympy.core.symbol import Symbol from sympy.matrices.expressions.companion import CompanionMatrix from sympy.polys.polytools import Poly x = Symbol('x') p = Poly([1, 2, 3], x) assert _test_args(CompanionMatrix(p)) def test_sympy__physics__vector__frame__CoordinateSym(): from sympy.physics.vector import CoordinateSym from sympy.physics.vector import ReferenceFrame assert _test_args(CoordinateSym('R_x', ReferenceFrame('R'), 0)) def test_sympy__physics__paulialgebra__Pauli(): from sympy.physics.paulialgebra import Pauli assert _test_args(Pauli(1)) def test_sympy__physics__quantum__anticommutator__AntiCommutator(): from sympy.physics.quantum.anticommutator import AntiCommutator assert _test_args(AntiCommutator(x, y)) def test_sympy__physics__quantum__cartesian__PositionBra3D(): from sympy.physics.quantum.cartesian import PositionBra3D assert _test_args(PositionBra3D(x, y, z)) def test_sympy__physics__quantum__cartesian__PositionKet3D(): from sympy.physics.quantum.cartesian import PositionKet3D assert _test_args(PositionKet3D(x, y, z)) def test_sympy__physics__quantum__cartesian__PositionState3D(): from sympy.physics.quantum.cartesian import PositionState3D assert _test_args(PositionState3D(x, y, z)) def test_sympy__physics__quantum__cartesian__PxBra(): from sympy.physics.quantum.cartesian import PxBra assert _test_args(PxBra(x, y, z)) def test_sympy__physics__quantum__cartesian__PxKet(): from sympy.physics.quantum.cartesian import PxKet assert _test_args(PxKet(x, y, z)) def test_sympy__physics__quantum__cartesian__PxOp(): from sympy.physics.quantum.cartesian import PxOp assert _test_args(PxOp(x, y, z)) def test_sympy__physics__quantum__cartesian__XBra(): from sympy.physics.quantum.cartesian import XBra assert _test_args(XBra(x)) def test_sympy__physics__quantum__cartesian__XKet(): from sympy.physics.quantum.cartesian import XKet assert _test_args(XKet(x)) def test_sympy__physics__quantum__cartesian__XOp(): from sympy.physics.quantum.cartesian import XOp assert _test_args(XOp(x)) def test_sympy__physics__quantum__cartesian__YOp(): from sympy.physics.quantum.cartesian import YOp assert _test_args(YOp(x)) def test_sympy__physics__quantum__cartesian__ZOp(): from sympy.physics.quantum.cartesian import ZOp assert _test_args(ZOp(x)) def test_sympy__physics__quantum__cg__CG(): from sympy.physics.quantum.cg import CG from sympy.core.singleton import S assert _test_args(CG(Rational(3, 2), Rational(3, 2), S.Half, Rational(-1, 2), 1, 1)) def test_sympy__physics__quantum__cg__Wigner3j(): from sympy.physics.quantum.cg import Wigner3j assert _test_args(Wigner3j(6, 0, 4, 0, 2, 0)) def test_sympy__physics__quantum__cg__Wigner6j(): from sympy.physics.quantum.cg import Wigner6j assert _test_args(Wigner6j(1, 2, 3, 2, 1, 2)) def test_sympy__physics__quantum__cg__Wigner9j(): from sympy.physics.quantum.cg import Wigner9j assert _test_args(Wigner9j(2, 1, 1, Rational(3, 2), S.Half, 1, S.Half, S.Half, 0)) def test_sympy__physics__quantum__circuitplot__Mz(): from sympy.physics.quantum.circuitplot import Mz assert _test_args(Mz(0)) def test_sympy__physics__quantum__circuitplot__Mx(): from sympy.physics.quantum.circuitplot import Mx assert _test_args(Mx(0)) def test_sympy__physics__quantum__commutator__Commutator(): from sympy.physics.quantum.commutator import Commutator A, B = symbols('A,B', commutative=False) assert _test_args(Commutator(A, B)) def test_sympy__physics__quantum__constants__HBar(): from sympy.physics.quantum.constants import HBar assert _test_args(HBar()) def test_sympy__physics__quantum__dagger__Dagger(): from sympy.physics.quantum.dagger import Dagger from sympy.physics.quantum.state import Ket assert _test_args(Dagger(Dagger(Ket('psi')))) def test_sympy__physics__quantum__gate__CGate(): from sympy.physics.quantum.gate import CGate, Gate assert _test_args(CGate((0, 1), Gate(2))) def test_sympy__physics__quantum__gate__CGateS(): from sympy.physics.quantum.gate import CGateS, Gate assert _test_args(CGateS((0, 1), Gate(2))) def test_sympy__physics__quantum__gate__CNotGate(): from sympy.physics.quantum.gate import CNotGate assert _test_args(CNotGate(0, 1)) def test_sympy__physics__quantum__gate__Gate(): from sympy.physics.quantum.gate import Gate assert _test_args(Gate(0)) def test_sympy__physics__quantum__gate__HadamardGate(): from sympy.physics.quantum.gate import HadamardGate assert _test_args(HadamardGate(0)) def test_sympy__physics__quantum__gate__IdentityGate(): from sympy.physics.quantum.gate import IdentityGate assert _test_args(IdentityGate(0)) def test_sympy__physics__quantum__gate__OneQubitGate(): from sympy.physics.quantum.gate import OneQubitGate assert _test_args(OneQubitGate(0)) def test_sympy__physics__quantum__gate__PhaseGate(): from sympy.physics.quantum.gate import PhaseGate assert _test_args(PhaseGate(0)) def test_sympy__physics__quantum__gate__SwapGate(): from sympy.physics.quantum.gate import SwapGate assert _test_args(SwapGate(0, 1)) def test_sympy__physics__quantum__gate__TGate(): from sympy.physics.quantum.gate import TGate assert _test_args(TGate(0)) def test_sympy__physics__quantum__gate__TwoQubitGate(): from sympy.physics.quantum.gate import TwoQubitGate assert _test_args(TwoQubitGate(0)) def test_sympy__physics__quantum__gate__UGate(): from sympy.physics.quantum.gate import UGate from sympy.matrices.immutable import ImmutableDenseMatrix from sympy.core.containers import Tuple from sympy.core.numbers import Integer assert _test_args( UGate(Tuple(Integer(1)), ImmutableDenseMatrix([[1, 0], [0, 2]]))) def test_sympy__physics__quantum__gate__XGate(): from sympy.physics.quantum.gate import XGate assert _test_args(XGate(0)) def test_sympy__physics__quantum__gate__YGate(): from sympy.physics.quantum.gate import YGate assert _test_args(YGate(0)) def test_sympy__physics__quantum__gate__ZGate(): from sympy.physics.quantum.gate import ZGate assert _test_args(ZGate(0)) @SKIP("TODO: sympy.physics") def test_sympy__physics__quantum__grover__OracleGate(): from sympy.physics.quantum.grover import OracleGate assert _test_args(OracleGate()) def test_sympy__physics__quantum__grover__WGate(): from sympy.physics.quantum.grover import WGate assert _test_args(WGate(1)) def test_sympy__physics__quantum__hilbert__ComplexSpace(): from sympy.physics.quantum.hilbert import ComplexSpace assert _test_args(ComplexSpace(x)) def test_sympy__physics__quantum__hilbert__DirectSumHilbertSpace(): from sympy.physics.quantum.hilbert import DirectSumHilbertSpace, ComplexSpace, FockSpace c = ComplexSpace(2) f = FockSpace() assert _test_args(DirectSumHilbertSpace(c, f)) def test_sympy__physics__quantum__hilbert__FockSpace(): from sympy.physics.quantum.hilbert import FockSpace assert _test_args(FockSpace()) def test_sympy__physics__quantum__hilbert__HilbertSpace(): from sympy.physics.quantum.hilbert import HilbertSpace assert _test_args(HilbertSpace()) def test_sympy__physics__quantum__hilbert__L2(): from sympy.physics.quantum.hilbert import L2 from sympy.core.numbers import oo from sympy.sets.sets import Interval assert _test_args(L2(Interval(0, oo))) def test_sympy__physics__quantum__hilbert__TensorPowerHilbertSpace(): from sympy.physics.quantum.hilbert import TensorPowerHilbertSpace, FockSpace f = FockSpace() assert _test_args(TensorPowerHilbertSpace(f, 2)) def test_sympy__physics__quantum__hilbert__TensorProductHilbertSpace(): from sympy.physics.quantum.hilbert import TensorProductHilbertSpace, FockSpace, ComplexSpace c = ComplexSpace(2) f = FockSpace() assert _test_args(TensorProductHilbertSpace(f, c)) def test_sympy__physics__quantum__innerproduct__InnerProduct(): from sympy.physics.quantum import Bra, Ket, InnerProduct b = Bra('b') k = Ket('k') assert _test_args(InnerProduct(b, k)) def test_sympy__physics__quantum__operator__DifferentialOperator(): from sympy.physics.quantum.operator import DifferentialOperator from sympy.core.function import (Derivative, Function) f = Function('f') assert _test_args(DifferentialOperator(1/x*Derivative(f(x), x), f(x))) def test_sympy__physics__quantum__operator__HermitianOperator(): from sympy.physics.quantum.operator import HermitianOperator assert _test_args(HermitianOperator('H')) def test_sympy__physics__quantum__operator__IdentityOperator(): from sympy.physics.quantum.operator import IdentityOperator assert _test_args(IdentityOperator(5)) def test_sympy__physics__quantum__operator__Operator(): from sympy.physics.quantum.operator import Operator assert _test_args(Operator('A')) def test_sympy__physics__quantum__operator__OuterProduct(): from sympy.physics.quantum.operator import OuterProduct from sympy.physics.quantum import Ket, Bra b = Bra('b') k = Ket('k') assert _test_args(OuterProduct(k, b)) def test_sympy__physics__quantum__operator__UnitaryOperator(): from sympy.physics.quantum.operator import UnitaryOperator assert _test_args(UnitaryOperator('U')) def test_sympy__physics__quantum__piab__PIABBra(): from sympy.physics.quantum.piab import PIABBra assert _test_args(PIABBra('B')) def test_sympy__physics__quantum__boson__BosonOp(): from sympy.physics.quantum.boson import BosonOp assert _test_args(BosonOp('a')) assert _test_args(BosonOp('a', False)) def test_sympy__physics__quantum__boson__BosonFockKet(): from sympy.physics.quantum.boson import BosonFockKet assert _test_args(BosonFockKet(1)) def test_sympy__physics__quantum__boson__BosonFockBra(): from sympy.physics.quantum.boson import BosonFockBra assert _test_args(BosonFockBra(1)) def test_sympy__physics__quantum__boson__BosonCoherentKet(): from sympy.physics.quantum.boson import BosonCoherentKet assert _test_args(BosonCoherentKet(1)) def test_sympy__physics__quantum__boson__BosonCoherentBra(): from sympy.physics.quantum.boson import BosonCoherentBra assert _test_args(BosonCoherentBra(1)) def test_sympy__physics__quantum__fermion__FermionOp(): from sympy.physics.quantum.fermion import FermionOp assert _test_args(FermionOp('c')) assert _test_args(FermionOp('c', False)) def test_sympy__physics__quantum__fermion__FermionFockKet(): from sympy.physics.quantum.fermion import FermionFockKet assert _test_args(FermionFockKet(1)) def test_sympy__physics__quantum__fermion__FermionFockBra(): from sympy.physics.quantum.fermion import FermionFockBra assert _test_args(FermionFockBra(1)) def test_sympy__physics__quantum__pauli__SigmaOpBase(): from sympy.physics.quantum.pauli import SigmaOpBase assert _test_args(SigmaOpBase()) def test_sympy__physics__quantum__pauli__SigmaX(): from sympy.physics.quantum.pauli import SigmaX assert _test_args(SigmaX()) def test_sympy__physics__quantum__pauli__SigmaY(): from sympy.physics.quantum.pauli import SigmaY assert _test_args(SigmaY()) def test_sympy__physics__quantum__pauli__SigmaZ(): from sympy.physics.quantum.pauli import SigmaZ assert _test_args(SigmaZ()) def test_sympy__physics__quantum__pauli__SigmaMinus(): from sympy.physics.quantum.pauli import SigmaMinus assert _test_args(SigmaMinus()) def test_sympy__physics__quantum__pauli__SigmaPlus(): from sympy.physics.quantum.pauli import SigmaPlus assert _test_args(SigmaPlus()) def test_sympy__physics__quantum__pauli__SigmaZKet(): from sympy.physics.quantum.pauli import SigmaZKet assert _test_args(SigmaZKet(0)) def test_sympy__physics__quantum__pauli__SigmaZBra(): from sympy.physics.quantum.pauli import SigmaZBra assert _test_args(SigmaZBra(0)) def test_sympy__physics__quantum__piab__PIABHamiltonian(): from sympy.physics.quantum.piab import PIABHamiltonian assert _test_args(PIABHamiltonian('P')) def test_sympy__physics__quantum__piab__PIABKet(): from sympy.physics.quantum.piab import PIABKet assert _test_args(PIABKet('K')) def test_sympy__physics__quantum__qexpr__QExpr(): from sympy.physics.quantum.qexpr import QExpr assert _test_args(QExpr(0)) def test_sympy__physics__quantum__qft__Fourier(): from sympy.physics.quantum.qft import Fourier assert _test_args(Fourier(0, 1)) def test_sympy__physics__quantum__qft__IQFT(): from sympy.physics.quantum.qft import IQFT assert _test_args(IQFT(0, 1)) def test_sympy__physics__quantum__qft__QFT(): from sympy.physics.quantum.qft import QFT assert _test_args(QFT(0, 1)) def test_sympy__physics__quantum__qft__RkGate(): from sympy.physics.quantum.qft import RkGate assert _test_args(RkGate(0, 1)) def test_sympy__physics__quantum__qubit__IntQubit(): from sympy.physics.quantum.qubit import IntQubit assert _test_args(IntQubit(0)) def test_sympy__physics__quantum__qubit__IntQubitBra(): from sympy.physics.quantum.qubit import IntQubitBra assert _test_args(IntQubitBra(0)) def test_sympy__physics__quantum__qubit__IntQubitState(): from sympy.physics.quantum.qubit import IntQubitState, QubitState assert _test_args(IntQubitState(QubitState(0, 1))) def test_sympy__physics__quantum__qubit__Qubit(): from sympy.physics.quantum.qubit import Qubit assert _test_args(Qubit(0, 0, 0)) def test_sympy__physics__quantum__qubit__QubitBra(): from sympy.physics.quantum.qubit import QubitBra assert _test_args(QubitBra('1', 0)) def test_sympy__physics__quantum__qubit__QubitState(): from sympy.physics.quantum.qubit import QubitState assert _test_args(QubitState(0, 1)) def test_sympy__physics__quantum__density__Density(): from sympy.physics.quantum.density import Density from sympy.physics.quantum.state import Ket assert _test_args(Density([Ket(0), 0.5], [Ket(1), 0.5])) @SKIP("TODO: sympy.physics.quantum.shor: Cmod Not Implemented") def test_sympy__physics__quantum__shor__CMod(): from sympy.physics.quantum.shor import CMod assert _test_args(CMod()) def test_sympy__physics__quantum__spin__CoupledSpinState(): from sympy.physics.quantum.spin import CoupledSpinState assert _test_args(CoupledSpinState(1, 0, (1, 1))) assert _test_args(CoupledSpinState(1, 0, (1, S.Half, S.Half))) assert _test_args(CoupledSpinState( 1, 0, (1, S.Half, S.Half), ((2, 3, S.Half), (1, 2, 1)) )) j, m, j1, j2, j3, j12, x = symbols('j m j1:4 j12 x') assert CoupledSpinState( j, m, (j1, j2, j3)).subs(j2, x) == CoupledSpinState(j, m, (j1, x, j3)) assert CoupledSpinState(j, m, (j1, j2, j3), ((1, 3, j12), (1, 2, j)) ).subs(j12, x) == \ CoupledSpinState(j, m, (j1, j2, j3), ((1, 3, x), (1, 2, j)) ) def test_sympy__physics__quantum__spin__J2Op(): from sympy.physics.quantum.spin import J2Op assert _test_args(J2Op('J')) def test_sympy__physics__quantum__spin__JminusOp(): from sympy.physics.quantum.spin import JminusOp assert _test_args(JminusOp('J')) def test_sympy__physics__quantum__spin__JplusOp(): from sympy.physics.quantum.spin import JplusOp assert _test_args(JplusOp('J')) def test_sympy__physics__quantum__spin__JxBra(): from sympy.physics.quantum.spin import JxBra assert _test_args(JxBra(1, 0)) def test_sympy__physics__quantum__spin__JxBraCoupled(): from sympy.physics.quantum.spin import JxBraCoupled assert _test_args(JxBraCoupled(1, 0, (1, 1))) def test_sympy__physics__quantum__spin__JxKet(): from sympy.physics.quantum.spin import JxKet assert _test_args(JxKet(1, 0)) def test_sympy__physics__quantum__spin__JxKetCoupled(): from sympy.physics.quantum.spin import JxKetCoupled assert _test_args(JxKetCoupled(1, 0, (1, 1))) def test_sympy__physics__quantum__spin__JxOp(): from sympy.physics.quantum.spin import JxOp assert _test_args(JxOp('J')) def test_sympy__physics__quantum__spin__JyBra(): from sympy.physics.quantum.spin import JyBra assert _test_args(JyBra(1, 0)) def test_sympy__physics__quantum__spin__JyBraCoupled(): from sympy.physics.quantum.spin import JyBraCoupled assert _test_args(JyBraCoupled(1, 0, (1, 1))) def test_sympy__physics__quantum__spin__JyKet(): from sympy.physics.quantum.spin import JyKet assert _test_args(JyKet(1, 0)) def test_sympy__physics__quantum__spin__JyKetCoupled(): from sympy.physics.quantum.spin import JyKetCoupled assert _test_args(JyKetCoupled(1, 0, (1, 1))) def test_sympy__physics__quantum__spin__JyOp(): from sympy.physics.quantum.spin import JyOp assert _test_args(JyOp('J')) def test_sympy__physics__quantum__spin__JzBra(): from sympy.physics.quantum.spin import JzBra assert _test_args(JzBra(1, 0)) def test_sympy__physics__quantum__spin__JzBraCoupled(): from sympy.physics.quantum.spin import JzBraCoupled assert _test_args(JzBraCoupled(1, 0, (1, 1))) def test_sympy__physics__quantum__spin__JzKet(): from sympy.physics.quantum.spin import JzKet assert _test_args(JzKet(1, 0)) def test_sympy__physics__quantum__spin__JzKetCoupled(): from sympy.physics.quantum.spin import JzKetCoupled assert _test_args(JzKetCoupled(1, 0, (1, 1))) def test_sympy__physics__quantum__spin__JzOp(): from sympy.physics.quantum.spin import JzOp assert _test_args(JzOp('J')) def test_sympy__physics__quantum__spin__Rotation(): from sympy.physics.quantum.spin import Rotation assert _test_args(Rotation(pi, 0, pi/2)) def test_sympy__physics__quantum__spin__SpinState(): from sympy.physics.quantum.spin import SpinState assert _test_args(SpinState(1, 0)) def test_sympy__physics__quantum__spin__WignerD(): from sympy.physics.quantum.spin import WignerD assert _test_args(WignerD(0, 1, 2, 3, 4, 5)) def test_sympy__physics__quantum__state__Bra(): from sympy.physics.quantum.state import Bra assert _test_args(Bra(0)) def test_sympy__physics__quantum__state__BraBase(): from sympy.physics.quantum.state import BraBase assert _test_args(BraBase(0)) def test_sympy__physics__quantum__state__Ket(): from sympy.physics.quantum.state import Ket assert _test_args(Ket(0)) def test_sympy__physics__quantum__state__KetBase(): from sympy.physics.quantum.state import KetBase assert _test_args(KetBase(0)) def test_sympy__physics__quantum__state__State(): from sympy.physics.quantum.state import State assert _test_args(State(0)) def test_sympy__physics__quantum__state__StateBase(): from sympy.physics.quantum.state import StateBase assert _test_args(StateBase(0)) def test_sympy__physics__quantum__state__OrthogonalBra(): from sympy.physics.quantum.state import OrthogonalBra assert _test_args(OrthogonalBra(0)) def test_sympy__physics__quantum__state__OrthogonalKet(): from sympy.physics.quantum.state import OrthogonalKet assert _test_args(OrthogonalKet(0)) def test_sympy__physics__quantum__state__OrthogonalState(): from sympy.physics.quantum.state import OrthogonalState assert _test_args(OrthogonalState(0)) def test_sympy__physics__quantum__state__TimeDepBra(): from sympy.physics.quantum.state import TimeDepBra assert _test_args(TimeDepBra('psi', 't')) def test_sympy__physics__quantum__state__TimeDepKet(): from sympy.physics.quantum.state import TimeDepKet assert _test_args(TimeDepKet('psi', 't')) def test_sympy__physics__quantum__state__TimeDepState(): from sympy.physics.quantum.state import TimeDepState assert _test_args(TimeDepState('psi', 't')) def test_sympy__physics__quantum__state__Wavefunction(): from sympy.physics.quantum.state import Wavefunction from sympy.functions import sin from sympy.functions.elementary.piecewise import Piecewise n = 1 L = 1 g = Piecewise((0, x < 0), (0, x > L), (sqrt(2//L)*sin(n*pi*x/L), True)) assert _test_args(Wavefunction(g, x)) def test_sympy__physics__quantum__tensorproduct__TensorProduct(): from sympy.physics.quantum.tensorproduct import TensorProduct assert _test_args(TensorProduct(x, y)) def test_sympy__physics__quantum__identitysearch__GateIdentity(): from sympy.physics.quantum.gate import X from sympy.physics.quantum.identitysearch import GateIdentity assert _test_args(GateIdentity(X(0), X(0))) def test_sympy__physics__quantum__sho1d__SHOOp(): from sympy.physics.quantum.sho1d import SHOOp assert _test_args(SHOOp('a')) def test_sympy__physics__quantum__sho1d__RaisingOp(): from sympy.physics.quantum.sho1d import RaisingOp assert _test_args(RaisingOp('a')) def test_sympy__physics__quantum__sho1d__LoweringOp(): from sympy.physics.quantum.sho1d import LoweringOp assert _test_args(LoweringOp('a')) def test_sympy__physics__quantum__sho1d__NumberOp(): from sympy.physics.quantum.sho1d import NumberOp assert _test_args(NumberOp('N')) def test_sympy__physics__quantum__sho1d__Hamiltonian(): from sympy.physics.quantum.sho1d import Hamiltonian assert _test_args(Hamiltonian('H')) def test_sympy__physics__quantum__sho1d__SHOState(): from sympy.physics.quantum.sho1d import SHOState assert _test_args(SHOState(0)) def test_sympy__physics__quantum__sho1d__SHOKet(): from sympy.physics.quantum.sho1d import SHOKet assert _test_args(SHOKet(0)) def test_sympy__physics__quantum__sho1d__SHOBra(): from sympy.physics.quantum.sho1d import SHOBra assert _test_args(SHOBra(0)) def test_sympy__physics__secondquant__AnnihilateBoson(): from sympy.physics.secondquant import AnnihilateBoson assert _test_args(AnnihilateBoson(0)) def test_sympy__physics__secondquant__AnnihilateFermion(): from sympy.physics.secondquant import AnnihilateFermion assert _test_args(AnnihilateFermion(0)) @SKIP("abstract class") def test_sympy__physics__secondquant__Annihilator(): pass def test_sympy__physics__secondquant__AntiSymmetricTensor(): from sympy.physics.secondquant import AntiSymmetricTensor i, j = symbols('i j', below_fermi=True) a, b = symbols('a b', above_fermi=True) assert _test_args(AntiSymmetricTensor('v', (a, i), (b, j))) def test_sympy__physics__secondquant__BosonState(): from sympy.physics.secondquant import BosonState assert _test_args(BosonState((0, 1))) @SKIP("abstract class") def test_sympy__physics__secondquant__BosonicOperator(): pass def test_sympy__physics__secondquant__Commutator(): from sympy.physics.secondquant import Commutator assert _test_args(Commutator(x, y)) def test_sympy__physics__secondquant__CreateBoson(): from sympy.physics.secondquant import CreateBoson assert _test_args(CreateBoson(0)) def test_sympy__physics__secondquant__CreateFermion(): from sympy.physics.secondquant import CreateFermion assert _test_args(CreateFermion(0)) @SKIP("abstract class") def test_sympy__physics__secondquant__Creator(): pass def test_sympy__physics__secondquant__Dagger(): from sympy.physics.secondquant import Dagger from sympy.core.numbers import I assert _test_args(Dagger(2*I)) def test_sympy__physics__secondquant__FermionState(): from sympy.physics.secondquant import FermionState assert _test_args(FermionState((0, 1))) def test_sympy__physics__secondquant__FermionicOperator(): from sympy.physics.secondquant import FermionicOperator assert _test_args(FermionicOperator(0)) def test_sympy__physics__secondquant__FockState(): from sympy.physics.secondquant import FockState assert _test_args(FockState((0, 1))) def test_sympy__physics__secondquant__FockStateBosonBra(): from sympy.physics.secondquant import FockStateBosonBra assert _test_args(FockStateBosonBra((0, 1))) def test_sympy__physics__secondquant__FockStateBosonKet(): from sympy.physics.secondquant import FockStateBosonKet assert _test_args(FockStateBosonKet((0, 1))) def test_sympy__physics__secondquant__FockStateBra(): from sympy.physics.secondquant import FockStateBra assert _test_args(FockStateBra((0, 1))) def test_sympy__physics__secondquant__FockStateFermionBra(): from sympy.physics.secondquant import FockStateFermionBra assert _test_args(FockStateFermionBra((0, 1))) def test_sympy__physics__secondquant__FockStateFermionKet(): from sympy.physics.secondquant import FockStateFermionKet assert _test_args(FockStateFermionKet((0, 1))) def test_sympy__physics__secondquant__FockStateKet(): from sympy.physics.secondquant import FockStateKet assert _test_args(FockStateKet((0, 1))) def test_sympy__physics__secondquant__InnerProduct(): from sympy.physics.secondquant import InnerProduct from sympy.physics.secondquant import FockStateKet, FockStateBra assert _test_args(InnerProduct(FockStateBra((0, 1)), FockStateKet((0, 1)))) def test_sympy__physics__secondquant__NO(): from sympy.physics.secondquant import NO, F, Fd assert _test_args(NO(Fd(x)*F(y))) def test_sympy__physics__secondquant__PermutationOperator(): from sympy.physics.secondquant import PermutationOperator assert _test_args(PermutationOperator(0, 1)) def test_sympy__physics__secondquant__SqOperator(): from sympy.physics.secondquant import SqOperator assert _test_args(SqOperator(0)) def test_sympy__physics__secondquant__TensorSymbol(): from sympy.physics.secondquant import TensorSymbol assert _test_args(TensorSymbol(x)) def test_sympy__physics__control__lti__LinearTimeInvariant(): # Direct instances of LinearTimeInvariant class are not allowed. # func(*args) tests for its derived classes (TransferFunction, # Series, Parallel and TransferFunctionMatrix) should pass. pass def test_sympy__physics__control__lti__SISOLinearTimeInvariant(): # Direct instances of SISOLinearTimeInvariant class are not allowed. pass def test_sympy__physics__control__lti__MIMOLinearTimeInvariant(): # Direct instances of MIMOLinearTimeInvariant class are not allowed. pass def test_sympy__physics__control__lti__TransferFunction(): from sympy.physics.control.lti import TransferFunction assert _test_args(TransferFunction(2, 3, x)) def test_sympy__physics__control__lti__Series(): from sympy.physics.control import Series, TransferFunction tf1 = TransferFunction(x**2 - y**3, y - z, x) tf2 = TransferFunction(y - x, z + y, x) assert _test_args(Series(tf1, tf2)) def test_sympy__physics__control__lti__MIMOSeries(): from sympy.physics.control import MIMOSeries, TransferFunction, TransferFunctionMatrix tf1 = TransferFunction(x**2 - y**3, y - z, x) tf2 = TransferFunction(y - x, z + y, x) tfm_1 = TransferFunctionMatrix([[tf2, tf1]]) tfm_2 = TransferFunctionMatrix([[tf1, tf2], [tf2, tf1]]) tfm_3 = TransferFunctionMatrix([[tf1], [tf2]]) assert _test_args(MIMOSeries(tfm_3, tfm_2, tfm_1)) def test_sympy__physics__control__lti__Parallel(): from sympy.physics.control import Parallel, TransferFunction tf1 = TransferFunction(x**2 - y**3, y - z, x) tf2 = TransferFunction(y - x, z + y, x) assert _test_args(Parallel(tf1, tf2)) def test_sympy__physics__control__lti__MIMOParallel(): from sympy.physics.control import MIMOParallel, TransferFunction, TransferFunctionMatrix tf1 = TransferFunction(x**2 - y**3, y - z, x) tf2 = TransferFunction(y - x, z + y, x) tfm_1 = TransferFunctionMatrix([[tf1, tf2], [tf2, tf1]]) tfm_2 = TransferFunctionMatrix([[tf2, tf1], [tf1, tf2]]) assert _test_args(MIMOParallel(tfm_1, tfm_2)) def test_sympy__physics__control__lti__Feedback(): from sympy.physics.control import TransferFunction, Feedback tf1 = TransferFunction(x**2 - y**3, y - z, x) tf2 = TransferFunction(y - x, z + y, x) assert _test_args(Feedback(tf1, tf2)) assert _test_args(Feedback(tf1, tf2, 1)) def test_sympy__physics__control__lti__MIMOFeedback(): from sympy.physics.control import TransferFunction, MIMOFeedback, TransferFunctionMatrix tf1 = TransferFunction(x**2 - y**3, y - z, x) tf2 = TransferFunction(y - x, z + y, x) tfm_1 = TransferFunctionMatrix([[tf2, tf1], [tf1, tf2]]) tfm_2 = TransferFunctionMatrix([[tf1, tf2], [tf2, tf1]]) assert _test_args(MIMOFeedback(tfm_1, tfm_2)) assert _test_args(MIMOFeedback(tfm_1, tfm_2, 1)) def test_sympy__physics__control__lti__TransferFunctionMatrix(): from sympy.physics.control import TransferFunction, TransferFunctionMatrix tf1 = TransferFunction(x**2 - y**3, y - z, x) tf2 = TransferFunction(y - x, z + y, x) assert _test_args(TransferFunctionMatrix([[tf1, tf2]])) def test_sympy__physics__units__dimensions__Dimension(): from sympy.physics.units.dimensions import Dimension assert _test_args(Dimension("length", "L")) def test_sympy__physics__units__dimensions__DimensionSystem(): from sympy.physics.units.dimensions import DimensionSystem from sympy.physics.units.definitions.dimension_definitions import length, time, velocity assert _test_args(DimensionSystem((length, time), (velocity,))) def test_sympy__physics__units__quantities__Quantity(): from sympy.physics.units.quantities import Quantity assert _test_args(Quantity("dam")) def test_sympy__physics__units__prefixes__Prefix(): from sympy.physics.units.prefixes import Prefix assert _test_args(Prefix('kilo', 'k', 3)) def test_sympy__core__numbers__AlgebraicNumber(): from sympy.core.numbers import AlgebraicNumber assert _test_args(AlgebraicNumber(sqrt(2), [1, 2, 3])) def test_sympy__polys__polytools__GroebnerBasis(): from sympy.polys.polytools import GroebnerBasis assert _test_args(GroebnerBasis([x, y, z], x, y, z)) def test_sympy__polys__polytools__Poly(): from sympy.polys.polytools import Poly assert _test_args(Poly(2, x, y)) def test_sympy__polys__polytools__PurePoly(): from sympy.polys.polytools import PurePoly assert _test_args(PurePoly(2, x, y)) @SKIP('abstract class') def test_sympy__polys__rootoftools__RootOf(): pass def test_sympy__polys__rootoftools__ComplexRootOf(): from sympy.polys.rootoftools import ComplexRootOf assert _test_args(ComplexRootOf(x**3 + x + 1, 0)) def test_sympy__polys__rootoftools__RootSum(): from sympy.polys.rootoftools import RootSum assert _test_args(RootSum(x**3 + x + 1, sin)) def test_sympy__series__limits__Limit(): from sympy.series.limits import Limit assert _test_args(Limit(x, x, 0, dir='-')) def test_sympy__series__order__Order(): from sympy.series.order import Order assert _test_args(Order(1, x, y)) @SKIP('Abstract Class') def test_sympy__series__sequences__SeqBase(): pass def test_sympy__series__sequences__EmptySequence(): # Need to imort the instance from series not the class from # series.sequence from sympy.series import EmptySequence assert _test_args(EmptySequence) @SKIP('Abstract Class') def test_sympy__series__sequences__SeqExpr(): pass def test_sympy__series__sequences__SeqPer(): from sympy.series.sequences import SeqPer assert _test_args(SeqPer((1, 2, 3), (0, 10))) def test_sympy__series__sequences__SeqFormula(): from sympy.series.sequences import SeqFormula assert _test_args(SeqFormula(x**2, (0, 10))) def test_sympy__series__sequences__RecursiveSeq(): from sympy.series.sequences import RecursiveSeq y = Function("y") n = symbols("n") assert _test_args(RecursiveSeq(y(n - 1) + y(n - 2), y(n), n, (0, 1))) assert _test_args(RecursiveSeq(y(n - 1) + y(n - 2), y(n), n)) def test_sympy__series__sequences__SeqExprOp(): from sympy.series.sequences import SeqExprOp, sequence s1 = sequence((1, 2, 3)) s2 = sequence(x**2) assert _test_args(SeqExprOp(s1, s2)) def test_sympy__series__sequences__SeqAdd(): from sympy.series.sequences import SeqAdd, sequence s1 = sequence((1, 2, 3)) s2 = sequence(x**2) assert _test_args(SeqAdd(s1, s2)) def test_sympy__series__sequences__SeqMul(): from sympy.series.sequences import SeqMul, sequence s1 = sequence((1, 2, 3)) s2 = sequence(x**2) assert _test_args(SeqMul(s1, s2)) @SKIP('Abstract Class') def test_sympy__series__series_class__SeriesBase(): pass def test_sympy__series__fourier__FourierSeries(): from sympy.series.fourier import fourier_series assert _test_args(fourier_series(x, (x, -pi, pi))) def test_sympy__series__fourier__FiniteFourierSeries(): from sympy.series.fourier import fourier_series assert _test_args(fourier_series(sin(pi*x), (x, -1, 1))) def test_sympy__series__formal__FormalPowerSeries(): from sympy.series.formal import fps assert _test_args(fps(log(1 + x), x)) def test_sympy__series__formal__Coeff(): from sympy.series.formal import fps assert _test_args(fps(x**2 + x + 1, x)) @SKIP('Abstract Class') def test_sympy__series__formal__FiniteFormalPowerSeries(): pass def test_sympy__series__formal__FormalPowerSeriesProduct(): from sympy.series.formal import fps f1, f2 = fps(sin(x)), fps(exp(x)) assert _test_args(f1.product(f2, x)) def test_sympy__series__formal__FormalPowerSeriesCompose(): from sympy.series.formal import fps f1, f2 = fps(exp(x)), fps(sin(x)) assert _test_args(f1.compose(f2, x)) def test_sympy__series__formal__FormalPowerSeriesInverse(): from sympy.series.formal import fps f1 = fps(exp(x)) assert _test_args(f1.inverse(x)) def test_sympy__simplify__hyperexpand__Hyper_Function(): from sympy.simplify.hyperexpand import Hyper_Function assert _test_args(Hyper_Function([2], [1])) def test_sympy__simplify__hyperexpand__G_Function(): from sympy.simplify.hyperexpand import G_Function assert _test_args(G_Function([2], [1], [], [])) @SKIP("abstract class") def test_sympy__tensor__array__ndim_array__ImmutableNDimArray(): pass def test_sympy__tensor__array__dense_ndim_array__ImmutableDenseNDimArray(): from sympy.tensor.array.dense_ndim_array import ImmutableDenseNDimArray densarr = ImmutableDenseNDimArray(range(10, 34), (2, 3, 4)) assert _test_args(densarr) def test_sympy__tensor__array__sparse_ndim_array__ImmutableSparseNDimArray(): from sympy.tensor.array.sparse_ndim_array import ImmutableSparseNDimArray sparr = ImmutableSparseNDimArray(range(10, 34), (2, 3, 4)) assert _test_args(sparr) def test_sympy__tensor__array__array_comprehension__ArrayComprehension(): from sympy.tensor.array.array_comprehension import ArrayComprehension arrcom = ArrayComprehension(x, (x, 1, 5)) assert _test_args(arrcom) def test_sympy__tensor__array__array_comprehension__ArrayComprehensionMap(): from sympy.tensor.array.array_comprehension import ArrayComprehensionMap arrcomma = ArrayComprehensionMap(lambda: 0, (x, 1, 5)) assert _test_args(arrcomma) def test_sympy__tensor__array__arrayop__Flatten(): from sympy.tensor.array.arrayop import Flatten from sympy.tensor.array.dense_ndim_array import ImmutableDenseNDimArray fla = Flatten(ImmutableDenseNDimArray(range(24)).reshape(2, 3, 4)) assert _test_args(fla) def test_sympy__tensor__array__array_derivatives__ArrayDerivative(): from sympy.tensor.array.array_derivatives import ArrayDerivative A = MatrixSymbol("A", 2, 2) arrder = ArrayDerivative(A, A, evaluate=False) assert _test_args(arrder) def test_sympy__tensor__array__expressions__array_expressions__ArraySymbol(): from sympy.tensor.array.expressions.array_expressions import ArraySymbol m, n, k = symbols("m n k") array = ArraySymbol("A", (m, n, k, 2)) assert _test_args(array) def test_sympy__tensor__array__expressions__array_expressions__ArrayElement(): from sympy.tensor.array.expressions.array_expressions import ArrayElement m, n, k = symbols("m n k") ae = ArrayElement("A", (m, n, k, 2)) assert _test_args(ae) def test_sympy__tensor__array__expressions__array_expressions__ZeroArray(): from sympy.tensor.array.expressions.array_expressions import ZeroArray m, n, k = symbols("m n k") za = ZeroArray(m, n, k, 2) assert _test_args(za) def test_sympy__tensor__array__expressions__array_expressions__OneArray(): from sympy.tensor.array.expressions.array_expressions import OneArray m, n, k = symbols("m n k") za = OneArray(m, n, k, 2) assert _test_args(za) def test_sympy__tensor__functions__TensorProduct(): from sympy.tensor.functions import TensorProduct A = MatrixSymbol('A', 3, 3) B = MatrixSymbol('B', 3, 3) tp = TensorProduct(A, B) assert _test_args(tp) def test_sympy__tensor__indexed__Idx(): from sympy.tensor.indexed import Idx assert _test_args(Idx('test')) assert _test_args(Idx(1, (0, 10))) def test_sympy__tensor__indexed__Indexed(): from sympy.tensor.indexed import Indexed, Idx assert _test_args(Indexed('A', Idx('i'), Idx('j'))) def test_sympy__tensor__indexed__IndexedBase(): from sympy.tensor.indexed import IndexedBase assert _test_args(IndexedBase('A', shape=(x, y))) assert _test_args(IndexedBase('A', 1)) assert _test_args(IndexedBase('A')[0, 1]) def test_sympy__tensor__tensor__TensorIndexType(): from sympy.tensor.tensor import TensorIndexType assert _test_args(TensorIndexType('Lorentz')) @SKIP("deprecated class") def test_sympy__tensor__tensor__TensorType(): pass def test_sympy__tensor__tensor__TensorSymmetry(): from sympy.tensor.tensor import TensorSymmetry, get_symmetric_group_sgs assert _test_args(TensorSymmetry(get_symmetric_group_sgs(2))) def test_sympy__tensor__tensor__TensorHead(): from sympy.tensor.tensor import TensorIndexType, TensorSymmetry, get_symmetric_group_sgs, TensorHead Lorentz = TensorIndexType('Lorentz', dummy_name='L') sym = TensorSymmetry(get_symmetric_group_sgs(1)) assert _test_args(TensorHead('p', [Lorentz], sym, 0)) def test_sympy__tensor__tensor__TensorIndex(): from sympy.tensor.tensor import TensorIndexType, TensorIndex Lorentz = TensorIndexType('Lorentz', dummy_name='L') assert _test_args(TensorIndex('i', Lorentz)) @SKIP("abstract class") def test_sympy__tensor__tensor__TensExpr(): pass def test_sympy__tensor__tensor__TensAdd(): from sympy.tensor.tensor import TensorIndexType, TensorSymmetry, get_symmetric_group_sgs, tensor_indices, TensAdd, tensor_heads Lorentz = TensorIndexType('Lorentz', dummy_name='L') a, b = tensor_indices('a,b', Lorentz) sym = TensorSymmetry(get_symmetric_group_sgs(1)) p, q = tensor_heads('p,q', [Lorentz], sym) t1 = p(a) t2 = q(a) assert _test_args(TensAdd(t1, t2)) def test_sympy__tensor__tensor__Tensor(): from sympy.tensor.tensor import TensorIndexType, TensorSymmetry, get_symmetric_group_sgs, tensor_indices, TensorHead Lorentz = TensorIndexType('Lorentz', dummy_name='L') a, b = tensor_indices('a,b', Lorentz) sym = TensorSymmetry(get_symmetric_group_sgs(1)) p = TensorHead('p', [Lorentz], sym) assert _test_args(p(a)) def test_sympy__tensor__tensor__TensMul(): from sympy.tensor.tensor import TensorIndexType, TensorSymmetry, get_symmetric_group_sgs, tensor_indices, tensor_heads Lorentz = TensorIndexType('Lorentz', dummy_name='L') a, b = tensor_indices('a,b', Lorentz) sym = TensorSymmetry(get_symmetric_group_sgs(1)) p, q = tensor_heads('p, q', [Lorentz], sym) assert _test_args(3*p(a)*q(b)) def test_sympy__tensor__tensor__TensorElement(): from sympy.tensor.tensor import TensorIndexType, TensorHead, TensorElement L = TensorIndexType("L") A = TensorHead("A", [L, L]) telem = TensorElement(A(x, y), {x: 1}) assert _test_args(telem) def test_sympy__tensor__toperators__PartialDerivative(): from sympy.tensor.tensor import TensorIndexType, tensor_indices, TensorHead from sympy.tensor.toperators import PartialDerivative Lorentz = TensorIndexType('Lorentz', dummy_name='L') a, b = tensor_indices('a,b', Lorentz) A = TensorHead("A", [Lorentz]) assert _test_args(PartialDerivative(A(a), A(b))) def test_as_coeff_add(): assert (7, (3*x, 4*x**2)) == (7 + 3*x + 4*x**2).as_coeff_add() def test_sympy__geometry__curve__Curve(): from sympy.geometry.curve import Curve assert _test_args(Curve((x, 1), (x, 0, 1))) def test_sympy__geometry__point__Point(): from sympy.geometry.point import Point assert _test_args(Point(0, 1)) def test_sympy__geometry__point__Point2D(): from sympy.geometry.point import Point2D assert _test_args(Point2D(0, 1)) def test_sympy__geometry__point__Point3D(): from sympy.geometry.point import Point3D assert _test_args(Point3D(0, 1, 2)) def test_sympy__geometry__ellipse__Ellipse(): from sympy.geometry.ellipse import Ellipse assert _test_args(Ellipse((0, 1), 2, 3)) def test_sympy__geometry__ellipse__Circle(): from sympy.geometry.ellipse import Circle assert _test_args(Circle((0, 1), 2)) def test_sympy__geometry__parabola__Parabola(): from sympy.geometry.parabola import Parabola from sympy.geometry.line import Line assert _test_args(Parabola((0, 0), Line((2, 3), (4, 3)))) @SKIP("abstract class") def test_sympy__geometry__line__LinearEntity(): pass def test_sympy__geometry__line__Line(): from sympy.geometry.line import Line assert _test_args(Line((0, 1), (2, 3))) def test_sympy__geometry__line__Ray(): from sympy.geometry.line import Ray assert _test_args(Ray((0, 1), (2, 3))) def test_sympy__geometry__line__Segment(): from sympy.geometry.line import Segment assert _test_args(Segment((0, 1), (2, 3))) @SKIP("abstract class") def test_sympy__geometry__line__LinearEntity2D(): pass def test_sympy__geometry__line__Line2D(): from sympy.geometry.line import Line2D assert _test_args(Line2D((0, 1), (2, 3))) def test_sympy__geometry__line__Ray2D(): from sympy.geometry.line import Ray2D assert _test_args(Ray2D((0, 1), (2, 3))) def test_sympy__geometry__line__Segment2D(): from sympy.geometry.line import Segment2D assert _test_args(Segment2D((0, 1), (2, 3))) @SKIP("abstract class") def test_sympy__geometry__line__LinearEntity3D(): pass def test_sympy__geometry__line__Line3D(): from sympy.geometry.line import Line3D assert _test_args(Line3D((0, 1, 1), (2, 3, 4))) def test_sympy__geometry__line__Segment3D(): from sympy.geometry.line import Segment3D assert _test_args(Segment3D((0, 1, 1), (2, 3, 4))) def test_sympy__geometry__line__Ray3D(): from sympy.geometry.line import Ray3D assert _test_args(Ray3D((0, 1, 1), (2, 3, 4))) def test_sympy__geometry__plane__Plane(): from sympy.geometry.plane import Plane assert _test_args(Plane((1, 1, 1), (-3, 4, -2), (1, 2, 3))) def test_sympy__geometry__polygon__Polygon(): from sympy.geometry.polygon import Polygon assert _test_args(Polygon((0, 1), (2, 3), (4, 5), (6, 7))) def test_sympy__geometry__polygon__RegularPolygon(): from sympy.geometry.polygon import RegularPolygon assert _test_args(RegularPolygon((0, 1), 2, 3, 4)) def test_sympy__geometry__polygon__Triangle(): from sympy.geometry.polygon import Triangle assert _test_args(Triangle((0, 1), (2, 3), (4, 5))) def test_sympy__geometry__entity__GeometryEntity(): from sympy.geometry.entity import GeometryEntity from sympy.geometry.point import Point assert _test_args(GeometryEntity(Point(1, 0), 1, [1, 2])) @SKIP("abstract class") def test_sympy__geometry__entity__GeometrySet(): pass def test_sympy__diffgeom__diffgeom__Manifold(): from sympy.diffgeom import Manifold assert _test_args(Manifold('name', 3)) def test_sympy__diffgeom__diffgeom__Patch(): from sympy.diffgeom import Manifold, Patch assert _test_args(Patch('name', Manifold('name', 3))) def test_sympy__diffgeom__diffgeom__CoordSystem(): from sympy.diffgeom import Manifold, Patch, CoordSystem assert _test_args(CoordSystem('name', Patch('name', Manifold('name', 3)))) assert _test_args(CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c])) def test_sympy__diffgeom__diffgeom__CoordinateSymbol(): from sympy.diffgeom import Manifold, Patch, CoordSystem, CoordinateSymbol assert _test_args(CoordinateSymbol(CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]), 0)) def test_sympy__diffgeom__diffgeom__Point(): from sympy.diffgeom import Manifold, Patch, CoordSystem, Point assert _test_args(Point( CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]), [x, y])) def test_sympy__diffgeom__diffgeom__BaseScalarField(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseScalarField cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) assert _test_args(BaseScalarField(cs, 0)) def test_sympy__diffgeom__diffgeom__BaseVectorField(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseVectorField cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) assert _test_args(BaseVectorField(cs, 0)) def test_sympy__diffgeom__diffgeom__Differential(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseScalarField, Differential cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) assert _test_args(Differential(BaseScalarField(cs, 0))) def test_sympy__diffgeom__diffgeom__Commutator(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseVectorField, Commutator cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) cs1 = CoordSystem('name1', Patch('name', Manifold('name', 3)), [a, b, c]) v = BaseVectorField(cs, 0) v1 = BaseVectorField(cs1, 0) assert _test_args(Commutator(v, v1)) def test_sympy__diffgeom__diffgeom__TensorProduct(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseScalarField, Differential, TensorProduct cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) d = Differential(BaseScalarField(cs, 0)) assert _test_args(TensorProduct(d, d)) def test_sympy__diffgeom__diffgeom__WedgeProduct(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseScalarField, Differential, WedgeProduct cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) d = Differential(BaseScalarField(cs, 0)) d1 = Differential(BaseScalarField(cs, 1)) assert _test_args(WedgeProduct(d, d1)) def test_sympy__diffgeom__diffgeom__LieDerivative(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseScalarField, Differential, BaseVectorField, LieDerivative cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) d = Differential(BaseScalarField(cs, 0)) v = BaseVectorField(cs, 0) assert _test_args(LieDerivative(v, d)) @XFAIL def test_sympy__diffgeom__diffgeom__BaseCovarDerivativeOp(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseCovarDerivativeOp cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) assert _test_args(BaseCovarDerivativeOp(cs, 0, [[[0, ]*3, ]*3, ]*3)) def test_sympy__diffgeom__diffgeom__CovarDerivativeOp(): from sympy.diffgeom import Manifold, Patch, CoordSystem, BaseVectorField, CovarDerivativeOp cs = CoordSystem('name', Patch('name', Manifold('name', 3)), [a, b, c]) v = BaseVectorField(cs, 0) _test_args(CovarDerivativeOp(v, [[[0, ]*3, ]*3, ]*3)) def test_sympy__categories__baseclasses__Class(): from sympy.categories.baseclasses import Class assert _test_args(Class()) def test_sympy__categories__baseclasses__Object(): from sympy.categories import Object assert _test_args(Object("A")) @XFAIL def test_sympy__categories__baseclasses__Morphism(): from sympy.categories import Object, Morphism assert _test_args(Morphism(Object("A"), Object("B"))) def test_sympy__categories__baseclasses__IdentityMorphism(): from sympy.categories import Object, IdentityMorphism assert _test_args(IdentityMorphism(Object("A"))) def test_sympy__categories__baseclasses__NamedMorphism(): from sympy.categories import Object, NamedMorphism assert _test_args(NamedMorphism(Object("A"), Object("B"), "f")) def test_sympy__categories__baseclasses__CompositeMorphism(): from sympy.categories import Object, NamedMorphism, CompositeMorphism A = Object("A") B = Object("B") C = Object("C") f = NamedMorphism(A, B, "f") g = NamedMorphism(B, C, "g") assert _test_args(CompositeMorphism(f, g)) def test_sympy__categories__baseclasses__Diagram(): from sympy.categories import Object, NamedMorphism, Diagram A = Object("A") B = Object("B") f = NamedMorphism(A, B, "f") d = Diagram([f]) assert _test_args(d) def test_sympy__categories__baseclasses__Category(): from sympy.categories import Object, NamedMorphism, Diagram, Category A = Object("A") B = Object("B") C = Object("C") f = NamedMorphism(A, B, "f") g = NamedMorphism(B, C, "g") d1 = Diagram([f, g]) d2 = Diagram([f]) K = Category("K", commutative_diagrams=[d1, d2]) assert _test_args(K) def test_sympy__ntheory__factor___totient(): from sympy.ntheory.factor_ import totient k = symbols('k', integer=True) t = totient(k) assert _test_args(t) def test_sympy__ntheory__factor___reduced_totient(): from sympy.ntheory.factor_ import reduced_totient k = symbols('k', integer=True) t = reduced_totient(k) assert _test_args(t) def test_sympy__ntheory__factor___divisor_sigma(): from sympy.ntheory.factor_ import divisor_sigma k = symbols('k', integer=True) n = symbols('n', integer=True) t = divisor_sigma(n, k) assert _test_args(t) def test_sympy__ntheory__factor___udivisor_sigma(): from sympy.ntheory.factor_ import udivisor_sigma k = symbols('k', integer=True) n = symbols('n', integer=True) t = udivisor_sigma(n, k) assert _test_args(t) def test_sympy__ntheory__factor___primenu(): from sympy.ntheory.factor_ import primenu n = symbols('n', integer=True) t = primenu(n) assert _test_args(t) def test_sympy__ntheory__factor___primeomega(): from sympy.ntheory.factor_ import primeomega n = symbols('n', integer=True) t = primeomega(n) assert _test_args(t) def test_sympy__ntheory__residue_ntheory__mobius(): from sympy.ntheory import mobius assert _test_args(mobius(2)) def test_sympy__ntheory__generate__primepi(): from sympy.ntheory import primepi n = symbols('n') t = primepi(n) assert _test_args(t) def test_sympy__physics__optics__waves__TWave(): from sympy.physics.optics import TWave A, f, phi = symbols('A, f, phi') assert _test_args(TWave(A, f, phi)) def test_sympy__physics__optics__gaussopt__BeamParameter(): from sympy.physics.optics import BeamParameter assert _test_args(BeamParameter(530e-9, 1, w=1e-3)) def test_sympy__physics__optics__medium__Medium(): from sympy.physics.optics import Medium assert _test_args(Medium('m')) def test_sympy__tensor__array__expressions__array_expressions__ArrayContraction(): from sympy.tensor.array.expressions.array_expressions import ArrayContraction from sympy.tensor.indexed import IndexedBase A = symbols("A", cls=IndexedBase) assert _test_args(ArrayContraction(A, (0, 1))) def test_sympy__tensor__array__expressions__array_expressions__ArrayDiagonal(): from sympy.tensor.array.expressions.array_expressions import ArrayDiagonal from sympy.tensor.indexed import IndexedBase A = symbols("A", cls=IndexedBase) assert _test_args(ArrayDiagonal(A, (0, 1))) def test_sympy__tensor__array__expressions__array_expressions__ArrayTensorProduct(): from sympy.tensor.array.expressions.array_expressions import ArrayTensorProduct from sympy.tensor.indexed import IndexedBase A, B = symbols("A B", cls=IndexedBase) assert _test_args(ArrayTensorProduct(A, B)) def test_sympy__tensor__array__expressions__array_expressions__ArrayAdd(): from sympy.tensor.array.expressions.array_expressions import ArrayAdd from sympy.tensor.indexed import IndexedBase A, B = symbols("A B", cls=IndexedBase) assert _test_args(ArrayAdd(A, B)) def test_sympy__tensor__array__expressions__array_expressions__PermuteDims(): from sympy.tensor.array.expressions.array_expressions import PermuteDims A = MatrixSymbol("A", 4, 4) assert _test_args(PermuteDims(A, (1, 0))) def test_sympy__tensor__array__expressions__array_expressions__ArrayElementwiseApplyFunc(): from sympy.tensor.array.expressions.array_expressions import ArraySymbol, ArrayElementwiseApplyFunc A = ArraySymbol("A", (4,)) assert _test_args(ArrayElementwiseApplyFunc(exp, A)) def test_sympy__codegen__ast__Assignment(): from sympy.codegen.ast import Assignment assert _test_args(Assignment(x, y)) def test_sympy__codegen__cfunctions__expm1(): from sympy.codegen.cfunctions import expm1 assert _test_args(expm1(x)) def test_sympy__codegen__cfunctions__log1p(): from sympy.codegen.cfunctions import log1p assert _test_args(log1p(x)) def test_sympy__codegen__cfunctions__exp2(): from sympy.codegen.cfunctions import exp2 assert _test_args(exp2(x)) def test_sympy__codegen__cfunctions__log2(): from sympy.codegen.cfunctions import log2 assert _test_args(log2(x)) def test_sympy__codegen__cfunctions__fma(): from sympy.codegen.cfunctions import fma assert _test_args(fma(x, y, z)) def test_sympy__codegen__cfunctions__log10(): from sympy.codegen.cfunctions import log10 assert _test_args(log10(x)) def test_sympy__codegen__cfunctions__Sqrt(): from sympy.codegen.cfunctions import Sqrt assert _test_args(Sqrt(x)) def test_sympy__codegen__cfunctions__Cbrt(): from sympy.codegen.cfunctions import Cbrt assert _test_args(Cbrt(x)) def test_sympy__codegen__cfunctions__hypot(): from sympy.codegen.cfunctions import hypot assert _test_args(hypot(x, y)) def test_sympy__codegen__fnodes__FFunction(): from sympy.codegen.fnodes import FFunction assert _test_args(FFunction('f')) def test_sympy__codegen__fnodes__F95Function(): from sympy.codegen.fnodes import F95Function assert _test_args(F95Function('f')) def test_sympy__codegen__fnodes__isign(): from sympy.codegen.fnodes import isign assert _test_args(isign(1, x)) def test_sympy__codegen__fnodes__dsign(): from sympy.codegen.fnodes import dsign assert _test_args(dsign(1, x)) def test_sympy__codegen__fnodes__cmplx(): from sympy.codegen.fnodes import cmplx assert _test_args(cmplx(x, y)) def test_sympy__codegen__fnodes__kind(): from sympy.codegen.fnodes import kind assert _test_args(kind(x)) def test_sympy__codegen__fnodes__merge(): from sympy.codegen.fnodes import merge assert _test_args(merge(1, 2, Eq(x, 0))) def test_sympy__codegen__fnodes___literal(): from sympy.codegen.fnodes import _literal assert _test_args(_literal(1)) def test_sympy__codegen__fnodes__literal_sp(): from sympy.codegen.fnodes import literal_sp assert _test_args(literal_sp(1)) def test_sympy__codegen__fnodes__literal_dp(): from sympy.codegen.fnodes import literal_dp assert _test_args(literal_dp(1)) def test_sympy__codegen__matrix_nodes__MatrixSolve(): from sympy.matrices import MatrixSymbol from sympy.codegen.matrix_nodes import MatrixSolve A = MatrixSymbol('A', 3, 3) v = MatrixSymbol('x', 3, 1) assert _test_args(MatrixSolve(A, v)) def test_sympy__vector__coordsysrect__CoordSys3D(): from sympy.vector.coordsysrect import CoordSys3D assert _test_args(CoordSys3D('C')) def test_sympy__vector__point__Point(): from sympy.vector.point import Point assert _test_args(Point('P')) def test_sympy__vector__basisdependent__BasisDependent(): #from sympy.vector.basisdependent import BasisDependent #These classes have been created to maintain an OOP hierarchy #for Vectors and Dyadics. Are NOT meant to be initialized pass def test_sympy__vector__basisdependent__BasisDependentMul(): #from sympy.vector.basisdependent import BasisDependentMul #These classes have been created to maintain an OOP hierarchy #for Vectors and Dyadics. Are NOT meant to be initialized pass def test_sympy__vector__basisdependent__BasisDependentAdd(): #from sympy.vector.basisdependent import BasisDependentAdd #These classes have been created to maintain an OOP hierarchy #for Vectors and Dyadics. Are NOT meant to be initialized pass def test_sympy__vector__basisdependent__BasisDependentZero(): #from sympy.vector.basisdependent import BasisDependentZero #These classes have been created to maintain an OOP hierarchy #for Vectors and Dyadics. Are NOT meant to be initialized pass def test_sympy__vector__vector__BaseVector(): from sympy.vector.vector import BaseVector from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(BaseVector(0, C, ' ', ' ')) def test_sympy__vector__vector__VectorAdd(): from sympy.vector.vector import VectorAdd, VectorMul from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') from sympy.abc import a, b, c, x, y, z v1 = a*C.i + b*C.j + c*C.k v2 = x*C.i + y*C.j + z*C.k assert _test_args(VectorAdd(v1, v2)) assert _test_args(VectorMul(x, v1)) def test_sympy__vector__vector__VectorMul(): from sympy.vector.vector import VectorMul from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') from sympy.abc import a assert _test_args(VectorMul(a, C.i)) def test_sympy__vector__vector__VectorZero(): from sympy.vector.vector import VectorZero assert _test_args(VectorZero()) def test_sympy__vector__vector__Vector(): #from sympy.vector.vector import Vector #Vector is never to be initialized using args pass def test_sympy__vector__vector__Cross(): from sympy.vector.vector import Cross from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') _test_args(Cross(C.i, C.j)) def test_sympy__vector__vector__Dot(): from sympy.vector.vector import Dot from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') _test_args(Dot(C.i, C.j)) def test_sympy__vector__dyadic__Dyadic(): #from sympy.vector.dyadic import Dyadic #Dyadic is never to be initialized using args pass def test_sympy__vector__dyadic__BaseDyadic(): from sympy.vector.dyadic import BaseDyadic from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(BaseDyadic(C.i, C.j)) def test_sympy__vector__dyadic__DyadicMul(): from sympy.vector.dyadic import BaseDyadic, DyadicMul from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(DyadicMul(3, BaseDyadic(C.i, C.j))) def test_sympy__vector__dyadic__DyadicAdd(): from sympy.vector.dyadic import BaseDyadic, DyadicAdd from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(2 * DyadicAdd(BaseDyadic(C.i, C.i), BaseDyadic(C.i, C.j))) def test_sympy__vector__dyadic__DyadicZero(): from sympy.vector.dyadic import DyadicZero assert _test_args(DyadicZero()) def test_sympy__vector__deloperator__Del(): from sympy.vector.deloperator import Del assert _test_args(Del()) def test_sympy__vector__implicitregion__ImplicitRegion(): from sympy.vector.implicitregion import ImplicitRegion from sympy.abc import x, y assert _test_args(ImplicitRegion((x, y), y**3 - 4*x)) def test_sympy__vector__integrals__ParametricIntegral(): from sympy.vector.integrals import ParametricIntegral from sympy.vector.parametricregion import ParametricRegion from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(ParametricIntegral(C.y*C.i - 10*C.j,\ ParametricRegion((x, y), (x, 1, 3), (y, -2, 2)))) def test_sympy__vector__operators__Curl(): from sympy.vector.operators import Curl from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(Curl(C.i)) def test_sympy__vector__operators__Laplacian(): from sympy.vector.operators import Laplacian from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(Laplacian(C.i)) def test_sympy__vector__operators__Divergence(): from sympy.vector.operators import Divergence from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(Divergence(C.i)) def test_sympy__vector__operators__Gradient(): from sympy.vector.operators import Gradient from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(Gradient(C.x)) def test_sympy__vector__orienters__Orienter(): #from sympy.vector.orienters import Orienter #Not to be initialized pass def test_sympy__vector__orienters__ThreeAngleOrienter(): #from sympy.vector.orienters import ThreeAngleOrienter #Not to be initialized pass def test_sympy__vector__orienters__AxisOrienter(): from sympy.vector.orienters import AxisOrienter from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(AxisOrienter(x, C.i)) def test_sympy__vector__orienters__BodyOrienter(): from sympy.vector.orienters import BodyOrienter assert _test_args(BodyOrienter(x, y, z, '123')) def test_sympy__vector__orienters__SpaceOrienter(): from sympy.vector.orienters import SpaceOrienter assert _test_args(SpaceOrienter(x, y, z, '123')) def test_sympy__vector__orienters__QuaternionOrienter(): from sympy.vector.orienters import QuaternionOrienter a, b, c, d = symbols('a b c d') assert _test_args(QuaternionOrienter(a, b, c, d)) def test_sympy__vector__parametricregion__ParametricRegion(): from sympy.abc import t from sympy.vector.parametricregion import ParametricRegion assert _test_args(ParametricRegion((t, t**3), (t, 0, 2))) def test_sympy__vector__scalar__BaseScalar(): from sympy.vector.scalar import BaseScalar from sympy.vector.coordsysrect import CoordSys3D C = CoordSys3D('C') assert _test_args(BaseScalar(0, C, ' ', ' ')) def test_sympy__physics__wigner__Wigner3j(): from sympy.physics.wigner import Wigner3j assert _test_args(Wigner3j(0, 0, 0, 0, 0, 0)) def test_sympy__integrals__rubi__symbol__matchpyWC(): from sympy.integrals.rubi.symbol import matchpyWC assert _test_args(matchpyWC(1, True, 'a')) def test_sympy__integrals__rubi__utility_function__rubi_unevaluated_expr(): from sympy.integrals.rubi.utility_function import rubi_unevaluated_expr a = symbols('a') assert _test_args(rubi_unevaluated_expr(a)) def test_sympy__integrals__rubi__utility_function__rubi_exp(): from sympy.integrals.rubi.utility_function import rubi_exp assert _test_args(rubi_exp(5)) def test_sympy__integrals__rubi__utility_function__rubi_log(): from sympy.integrals.rubi.utility_function import rubi_log assert _test_args(rubi_log(5)) def test_sympy__integrals__rubi__utility_function__Int(): from sympy.integrals.rubi.utility_function import Int assert _test_args(Int(5, x)) def test_sympy__integrals__rubi__utility_function__Util_Coefficient(): from sympy.integrals.rubi.utility_function import Util_Coefficient a, x = symbols('a x') assert _test_args(Util_Coefficient(a, x)) def test_sympy__integrals__rubi__utility_function__Gamma(): from sympy.integrals.rubi.utility_function import Gamma assert _test_args(Gamma(5)) def test_sympy__integrals__rubi__utility_function__Util_Part(): from sympy.integrals.rubi.utility_function import Util_Part a, b = symbols('a b') assert _test_args(Util_Part(a + b, 0)) def test_sympy__integrals__rubi__utility_function__PolyGamma(): from sympy.integrals.rubi.utility_function import PolyGamma assert _test_args(PolyGamma(1, 1)) def test_sympy__integrals__rubi__utility_function__ProductLog(): from sympy.integrals.rubi.utility_function import ProductLog assert _test_args(ProductLog(1)) def test_sympy__combinatorics__schur_number__SchurNumber(): from sympy.combinatorics.schur_number import SchurNumber assert _test_args(SchurNumber(1)) def test_sympy__combinatorics__perm_groups__SymmetricPermutationGroup(): from sympy.combinatorics.perm_groups import SymmetricPermutationGroup assert _test_args(SymmetricPermutationGroup(5)) def test_sympy__combinatorics__perm_groups__Coset(): from sympy.combinatorics.permutations import Permutation from sympy.combinatorics.perm_groups import PermutationGroup, Coset a = Permutation(1, 2) b = Permutation(0, 1) G = PermutationGroup([a, b]) assert _test_args(Coset(a, G))
df6c5679882da0a58c106320b0825c51d5e504989e8e0e2604b005730d2e0856
from sympy.core.numbers import (I, Rational, pi) from sympy.core.relational import (GreaterThan, LessThan, StrictGreaterThan, StrictLessThan) from sympy.core.symbol import (Dummy, Symbol, Wild, symbols) from sympy.core.sympify import sympify # can't import as S yet from sympy.core.symbol import uniquely_named_symbol, _symbol, Str from sympy.testing.pytest import raises from sympy.core.symbol import disambiguate def test_Str(): a1 = Str('a') a2 = Str('a') b = Str('b') assert a1 == a2 != b raises(TypeError, lambda: Str()) def test_Symbol(): a = Symbol("a") x1 = Symbol("x") x2 = Symbol("x") xdummy1 = Dummy("x") xdummy2 = Dummy("x") assert a != x1 assert a != x2 assert x1 == x2 assert x1 != xdummy1 assert xdummy1 != xdummy2 assert Symbol("x") == Symbol("x") assert Dummy("x") != Dummy("x") d = symbols('d', cls=Dummy) assert isinstance(d, Dummy) c, d = symbols('c,d', cls=Dummy) assert isinstance(c, Dummy) assert isinstance(d, Dummy) raises(TypeError, lambda: Symbol()) def test_Dummy(): assert Dummy() != Dummy() def test_Dummy_force_dummy_index(): raises(AssertionError, lambda: Dummy(dummy_index=1)) assert Dummy('d', dummy_index=2) == Dummy('d', dummy_index=2) assert Dummy('d1', dummy_index=2) != Dummy('d2', dummy_index=2) d1 = Dummy('d', dummy_index=3) d2 = Dummy('d') # might fail if d1 were created with dummy_index >= 10**6 assert d1 != d2 d3 = Dummy('d', dummy_index=3) assert d1 == d3 assert Dummy()._count == Dummy('d', dummy_index=3)._count def test_lt_gt(): S = sympify x, y = Symbol('x'), Symbol('y') assert (x >= y) == GreaterThan(x, y) assert (x >= 0) == GreaterThan(x, 0) assert (x <= y) == LessThan(x, y) assert (x <= 0) == LessThan(x, 0) assert (0 <= x) == GreaterThan(x, 0) assert (0 >= x) == LessThan(x, 0) assert (S(0) >= x) == GreaterThan(0, x) assert (S(0) <= x) == LessThan(0, x) assert (x > y) == StrictGreaterThan(x, y) assert (x > 0) == StrictGreaterThan(x, 0) assert (x < y) == StrictLessThan(x, y) assert (x < 0) == StrictLessThan(x, 0) assert (0 < x) == StrictGreaterThan(x, 0) assert (0 > x) == StrictLessThan(x, 0) assert (S(0) > x) == StrictGreaterThan(0, x) assert (S(0) < x) == StrictLessThan(0, x) e = x**2 + 4*x + 1 assert (e >= 0) == GreaterThan(e, 0) assert (0 <= e) == GreaterThan(e, 0) assert (e > 0) == StrictGreaterThan(e, 0) assert (0 < e) == StrictGreaterThan(e, 0) assert (e <= 0) == LessThan(e, 0) assert (0 >= e) == LessThan(e, 0) assert (e < 0) == StrictLessThan(e, 0) assert (0 > e) == StrictLessThan(e, 0) assert (S(0) >= e) == GreaterThan(0, e) assert (S(0) <= e) == LessThan(0, e) assert (S(0) < e) == StrictLessThan(0, e) assert (S(0) > e) == StrictGreaterThan(0, e) def test_no_len(): # there should be no len for numbers x = Symbol('x') raises(TypeError, lambda: len(x)) def test_ineq_unequal(): S = sympify x, y, z = symbols('x,y,z') e = ( S(-1) >= x, S(-1) >= y, S(-1) >= z, S(-1) > x, S(-1) > y, S(-1) > z, S(-1) <= x, S(-1) <= y, S(-1) <= z, S(-1) < x, S(-1) < y, S(-1) < z, S(0) >= x, S(0) >= y, S(0) >= z, S(0) > x, S(0) > y, S(0) > z, S(0) <= x, S(0) <= y, S(0) <= z, S(0) < x, S(0) < y, S(0) < z, S('3/7') >= x, S('3/7') >= y, S('3/7') >= z, S('3/7') > x, S('3/7') > y, S('3/7') > z, S('3/7') <= x, S('3/7') <= y, S('3/7') <= z, S('3/7') < x, S('3/7') < y, S('3/7') < z, S(1.5) >= x, S(1.5) >= y, S(1.5) >= z, S(1.5) > x, S(1.5) > y, S(1.5) > z, S(1.5) <= x, S(1.5) <= y, S(1.5) <= z, S(1.5) < x, S(1.5) < y, S(1.5) < z, S(2) >= x, S(2) >= y, S(2) >= z, S(2) > x, S(2) > y, S(2) > z, S(2) <= x, S(2) <= y, S(2) <= z, S(2) < x, S(2) < y, S(2) < z, x >= -1, y >= -1, z >= -1, x > -1, y > -1, z > -1, x <= -1, y <= -1, z <= -1, x < -1, y < -1, z < -1, x >= 0, y >= 0, z >= 0, x > 0, y > 0, z > 0, x <= 0, y <= 0, z <= 0, x < 0, y < 0, z < 0, x >= 1.5, y >= 1.5, z >= 1.5, x > 1.5, y > 1.5, z > 1.5, x <= 1.5, y <= 1.5, z <= 1.5, x < 1.5, y < 1.5, z < 1.5, x >= 2, y >= 2, z >= 2, x > 2, y > 2, z > 2, x <= 2, y <= 2, z <= 2, x < 2, y < 2, z < 2, x >= y, x >= z, y >= x, y >= z, z >= x, z >= y, x > y, x > z, y > x, y > z, z > x, z > y, x <= y, x <= z, y <= x, y <= z, z <= x, z <= y, x < y, x < z, y < x, y < z, z < x, z < y, x - pi >= y + z, y - pi >= x + z, z - pi >= x + y, x - pi > y + z, y - pi > x + z, z - pi > x + y, x - pi <= y + z, y - pi <= x + z, z - pi <= x + y, x - pi < y + z, y - pi < x + z, z - pi < x + y, True, False ) left_e = e[:-1] for i, e1 in enumerate( left_e ): for e2 in e[i + 1:]: assert e1 != e2 def test_Wild_properties(): S = sympify # these tests only include Atoms x = Symbol("x") y = Symbol("y") p = Symbol("p", positive=True) k = Symbol("k", integer=True) n = Symbol("n", integer=True, positive=True) given_patterns = [ x, y, p, k, -k, n, -n, S(-3), S(3), pi, Rational(3, 2), I ] integerp = lambda k: k.is_integer positivep = lambda k: k.is_positive symbolp = lambda k: k.is_Symbol realp = lambda k: k.is_extended_real S = Wild("S", properties=[symbolp]) R = Wild("R", properties=[realp]) Y = Wild("Y", exclude=[x, p, k, n]) P = Wild("P", properties=[positivep]) K = Wild("K", properties=[integerp]) N = Wild("N", properties=[positivep, integerp]) given_wildcards = [ S, R, Y, P, K, N ] goodmatch = { S: (x, y, p, k, n), R: (p, k, -k, n, -n, -3, 3, pi, Rational(3, 2)), Y: (y, -3, 3, pi, Rational(3, 2), I ), P: (p, n, 3, pi, Rational(3, 2)), K: (k, -k, n, -n, -3, 3), N: (n, 3)} for A in given_wildcards: for pat in given_patterns: d = pat.match(A) if pat in goodmatch[A]: assert d[A] in goodmatch[A] else: assert d is None def test_symbols(): x = Symbol('x') y = Symbol('y') z = Symbol('z') assert symbols('x') == x assert symbols('x ') == x assert symbols(' x ') == x assert symbols('x,') == (x,) assert symbols('x, ') == (x,) assert symbols('x ,') == (x,) assert symbols('x , y') == (x, y) assert symbols('x,y,z') == (x, y, z) assert symbols('x y z') == (x, y, z) assert symbols('x,y,z,') == (x, y, z) assert symbols('x y z ') == (x, y, z) xyz = Symbol('xyz') abc = Symbol('abc') assert symbols('xyz') == xyz assert symbols('xyz,') == (xyz,) assert symbols('xyz,abc') == (xyz, abc) assert symbols(('xyz',)) == (xyz,) assert symbols(('xyz,',)) == ((xyz,),) assert symbols(('x,y,z,',)) == ((x, y, z),) assert symbols(('xyz', 'abc')) == (xyz, abc) assert symbols(('xyz,abc',)) == ((xyz, abc),) assert symbols(('xyz,abc', 'x,y,z')) == ((xyz, abc), (x, y, z)) assert symbols(('x', 'y', 'z')) == (x, y, z) assert symbols(['x', 'y', 'z']) == [x, y, z] assert symbols({'x', 'y', 'z'}) == {x, y, z} raises(ValueError, lambda: symbols('')) raises(ValueError, lambda: symbols(',')) raises(ValueError, lambda: symbols('x,,y,,z')) raises(ValueError, lambda: symbols(('x', '', 'y', '', 'z'))) a, b = symbols('x,y', real=True) assert a.is_real and b.is_real x0 = Symbol('x0') x1 = Symbol('x1') x2 = Symbol('x2') y0 = Symbol('y0') y1 = Symbol('y1') assert symbols('x0:0') == () assert symbols('x0:1') == (x0,) assert symbols('x0:2') == (x0, x1) assert symbols('x0:3') == (x0, x1, x2) assert symbols('x:0') == () assert symbols('x:1') == (x0,) assert symbols('x:2') == (x0, x1) assert symbols('x:3') == (x0, x1, x2) assert symbols('x1:1') == () assert symbols('x1:2') == (x1,) assert symbols('x1:3') == (x1, x2) assert symbols('x1:3,x,y,z') == (x1, x2, x, y, z) assert symbols('x:3,y:2') == (x0, x1, x2, y0, y1) assert symbols(('x:3', 'y:2')) == ((x0, x1, x2), (y0, y1)) a = Symbol('a') b = Symbol('b') c = Symbol('c') d = Symbol('d') assert symbols('x:z') == (x, y, z) assert symbols('a:d,x:z') == (a, b, c, d, x, y, z) assert symbols(('a:d', 'x:z')) == ((a, b, c, d), (x, y, z)) aa = Symbol('aa') ab = Symbol('ab') ac = Symbol('ac') ad = Symbol('ad') assert symbols('aa:d') == (aa, ab, ac, ad) assert symbols('aa:d,x:z') == (aa, ab, ac, ad, x, y, z) assert symbols(('aa:d','x:z')) == ((aa, ab, ac, ad), (x, y, z)) # issue 6675 def sym(s): return str(symbols(s)) assert sym('a0:4') == '(a0, a1, a2, a3)' assert sym('a2:4,b1:3') == '(a2, a3, b1, b2)' assert sym('a1(2:4)') == '(a12, a13)' assert sym('a0:2.0:2') == '(a0.0, a0.1, a1.0, a1.1)' assert sym('aa:cz') == '(aaz, abz, acz)' assert sym('aa:c0:2') == '(aa0, aa1, ab0, ab1, ac0, ac1)' assert sym('aa:ba:b') == '(aaa, aab, aba, abb)' assert sym('a:3b') == '(a0b, a1b, a2b)' assert sym('a-1:3b') == '(a-1b, a-2b)' assert sym(r'a:2\,:2' + chr(0)) == '(a0,0%s, a0,1%s, a1,0%s, a1,1%s)' % ( (chr(0),)*4) assert sym('x(:a:3)') == '(x(a0), x(a1), x(a2))' assert sym('x(:c):1') == '(xa0, xb0, xc0)' assert sym('x((:a)):3') == '(x(a)0, x(a)1, x(a)2)' assert sym('x(:a:3') == '(x(a0, x(a1, x(a2)' assert sym(':2') == '(0, 1)' assert sym(':b') == '(a, b)' assert sym(':b:2') == '(a0, a1, b0, b1)' assert sym(':2:2') == '(00, 01, 10, 11)' assert sym(':b:b') == '(aa, ab, ba, bb)' raises(ValueError, lambda: symbols(':')) raises(ValueError, lambda: symbols('a:')) raises(ValueError, lambda: symbols('::')) raises(ValueError, lambda: symbols('a::')) raises(ValueError, lambda: symbols(':a:')) raises(ValueError, lambda: symbols('::a')) def test_symbols_become_functions_issue_3539(): from sympy.abc import alpha, phi, beta, t raises(TypeError, lambda: beta(2)) raises(TypeError, lambda: beta(2.5)) raises(TypeError, lambda: phi(2.5)) raises(TypeError, lambda: alpha(2.5)) raises(TypeError, lambda: phi(t)) def test_unicode(): xu = Symbol('x') x = Symbol('x') assert x == xu raises(TypeError, lambda: Symbol(1)) def testuniquely_named_symbol_and__symbol(): F = uniquely_named_symbol x = Symbol('x') assert F(x) == x assert F('x') == x assert str(F('x', x)) == 'x0' assert str(F('x', (x + 1, 1/x))) == 'x0' _x = Symbol('x', real=True) assert F(('x', _x)) == _x assert F((x, _x)) == _x assert F('x', real=True).is_real y = Symbol('y') assert F(('x', y), real=True).is_real r = Symbol('x', real=True) assert F(('x', r)).is_real assert F(('x', r), real=False).is_real assert F('x1', Symbol('x1'), compare=lambda i: str(i).rstrip('1')).name == 'x1' assert F('x1', Symbol('x1'), modify=lambda i: i + '_').name == 'x1_' assert _symbol(x, _x) == x def test_disambiguate(): x, y, y_1, _x, x_1, x_2 = symbols('x y y_1 _x x_1 x_2') t1 = Dummy('y'), _x, Dummy('x'), Dummy('x') t2 = Dummy('x'), Dummy('x') t3 = Dummy('x'), Dummy('y') t4 = x, Dummy('x') t5 = Symbol('x', integer=True), x, Symbol('x_1') assert disambiguate(*t1) == (y, x_2, x, x_1) assert disambiguate(*t2) == (x, x_1) assert disambiguate(*t3) == (x, y) assert disambiguate(*t4) == (x_1, x) assert disambiguate(*t5) == (t5[0], x_2, x_1) assert disambiguate(*t5)[0] != x # assumptions are retained t6 = _x, Dummy('x')/y t7 = y*Dummy('y'), y assert disambiguate(*t6) == (x_1, x/y) assert disambiguate(*t7) == (y*y_1, y_1) assert disambiguate(Dummy('x_1'), Dummy('x_1') ) == (x_1, Symbol('x_1_1'))
7880365af0ae58a5d50491067d6a09ae7e967d4b215ff357b6daeb7f22db3672
from sympy.concrete.summations import Sum from sympy.core.basic import Basic from sympy.core.function import (Derivative, Function, count_ops) from sympy.core.numbers import (I, Rational, pi) from sympy.core.relational import (Eq, Rel) from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.functions.elementary.exponential import exp from sympy.functions.elementary.trigonometric import (cos, sin) from sympy.integrals.integrals import Integral from sympy.logic.boolalg import (And, Equivalent, ITE, Implies, Nand, Nor, Not, Or, Xor) from sympy.matrices.expressions.matexpr import MatrixSymbol from sympy.core.containers import Tuple x, y, z = symbols('x,y,z') a, b, c = symbols('a,b,c') def test_count_ops_non_visual(): def count(val): return count_ops(val, visual=False) assert count(x) == 0 assert count(x) is not S.Zero assert count(x + y) == 1 assert count(x + y) is not S.One assert count(x + y*x + 2*y) == 4 assert count({x + y: x}) == 1 assert count({x + y: S(2) + x}) is not S.One assert count(x < y) == 1 assert count(Or(x,y)) == 1 assert count(And(x,y)) == 1 assert count(Not(x)) == 1 assert count(Nor(x,y)) == 2 assert count(Nand(x,y)) == 2 assert count(Xor(x,y)) == 1 assert count(Implies(x,y)) == 1 assert count(Equivalent(x,y)) == 1 assert count(ITE(x,y,z)) == 1 assert count(ITE(True,x,y)) == 0 def test_count_ops_visual(): ADD, MUL, POW, SIN, COS, EXP, AND, D, G, M = symbols( 'Add Mul Pow sin cos exp And Derivative Integral Sum'.upper()) DIV, SUB, NEG = symbols('DIV SUB NEG') LT, LE, GT, GE, EQ, NE = symbols('LT LE GT GE EQ NE') NOT, OR, AND, XOR, IMPLIES, EQUIVALENT, _ITE, BASIC, TUPLE = symbols( 'Not Or And Xor Implies Equivalent ITE Basic Tuple'.upper()) def count(val): return count_ops(val, visual=True) assert count(7) is S.Zero assert count(S(7)) is S.Zero assert count(-1) == NEG assert count(-2) == NEG assert count(S(2)/3) == DIV assert count(Rational(2, 3)) == DIV assert count(pi/3) == DIV assert count(-pi/3) == DIV + NEG assert count(I - 1) == SUB assert count(1 - I) == SUB assert count(1 - 2*I) == SUB + MUL assert count(x) is S.Zero assert count(-x) == NEG assert count(-2*x/3) == NEG + DIV + MUL assert count(Rational(-2, 3)*x) == NEG + DIV + MUL assert count(1/x) == DIV assert count(1/(x*y)) == DIV + MUL assert count(-1/x) == NEG + DIV assert count(-2/x) == NEG + DIV assert count(x/y) == DIV assert count(-x/y) == NEG + DIV assert count(x**2) == POW assert count(-x**2) == POW + NEG assert count(-2*x**2) == POW + MUL + NEG assert count(x + pi/3) == ADD + DIV assert count(x + S.One/3) == ADD + DIV assert count(x + Rational(1, 3)) == ADD + DIV assert count(x + y) == ADD assert count(x - y) == SUB assert count(y - x) == SUB assert count(-1/(x - y)) == DIV + NEG + SUB assert count(-1/(y - x)) == DIV + NEG + SUB assert count(1 + x**y) == ADD + POW assert count(1 + x + y) == 2*ADD assert count(1 + x + y + z) == 3*ADD assert count(1 + x**y + 2*x*y + y**2) == 3*ADD + 2*POW + 2*MUL assert count(2*z + y + x + 1) == 3*ADD + MUL assert count(2*z + y**17 + x + 1) == 3*ADD + MUL + POW assert count(2*z + y**17 + x + sin(x)) == 3*ADD + POW + MUL + SIN assert count(2*z + y**17 + x + sin(x**2)) == 3*ADD + MUL + 2*POW + SIN assert count(2*z + y**17 + x + sin( x**2) + exp(cos(x))) == 4*ADD + MUL + 2*POW + EXP + COS + SIN assert count(Derivative(x, x)) == D assert count(Integral(x, x) + 2*x/(1 + x)) == G + DIV + MUL + 2*ADD assert count(Sum(x, (x, 1, x + 1)) + 2*x/(1 + x)) == M + DIV + MUL + 3*ADD assert count(Basic()) is S.Zero assert count({x + 1: sin(x)}) == ADD + SIN assert count([x + 1, sin(x) + y, None]) == ADD + SIN + ADD assert count({x + 1: sin(x), y: cos(x) + 1}) == SIN + COS + 2*ADD assert count({}) is S.Zero assert count([x + 1, sin(x)*y, None]) == SIN + ADD + MUL assert count([]) is S.Zero assert count(Basic()) == 0 assert count(Basic(Basic(),Basic(x,x+y))) == ADD + 2*BASIC assert count(Basic(x, x + y)) == ADD + BASIC assert [count(Rel(x, y, op)) for op in '< <= > >= == <> !='.split() ] == [LT, LE, GT, GE, EQ, NE, NE] assert count(Or(x, y)) == OR assert count(And(x, y)) == AND assert count(Or(x, Or(y, And(z, a)))) == AND + OR assert count(Nor(x, y)) == NOT + OR assert count(Nand(x, y)) == NOT + AND assert count(Xor(x, y)) == XOR assert count(Implies(x, y)) == IMPLIES assert count(Equivalent(x, y)) == EQUIVALENT assert count(ITE(x, y, z)) == _ITE assert count([Or(x, y), And(x, y), Basic(x + y)] ) == ADD + AND + BASIC + OR assert count(Basic(Tuple(x))) == BASIC + TUPLE #It checks that TUPLE is counted as an operation. assert count(Eq(x + y, S(2))) == ADD + EQ def test_issue_9324(): def count(val): return count_ops(val, visual=False) M = MatrixSymbol('M', 10, 10) assert count(M[0, 0]) == 0 assert count(2 * M[0, 0] + M[5, 7]) == 2 P = MatrixSymbol('P', 3, 3) Q = MatrixSymbol('Q', 3, 3) assert count(P + Q) == 1 m = Symbol('m', integer=True) n = Symbol('n', integer=True) M = MatrixSymbol('M', m + n, m * m) assert count(M[0, 1]) == 2 def test_issue_21532(): f = Function('f') g = Function('g') FUNC_F, FUNC_G = symbols('FUNC_F, FUNC_G') assert f(x).count_ops(visual=True) == FUNC_F assert g(x).count_ops(visual=True) == FUNC_G
45a4eb36319200700d08a9bc4fdceaf8f5468baf23bf58766baa0a750ee05b63
import numbers as nums import decimal from sympy.concrete.summations import Sum from sympy.core import (EulerGamma, Catalan, TribonacciConstant, GoldenRatio) from sympy.core.containers import Tuple from sympy.core.logic import fuzzy_not from sympy.core.mul import Mul from sympy.core.numbers import (mpf_norm, mod_inverse, igcd, seterr, igcd_lehmer, Integer, I, pi, comp, ilcm, Rational, E, nan, igcd2, oo, AlgebraicNumber, igcdex, Number, Float, zoo) from sympy.core.power import Pow from sympy.core.relational import Ge, Gt, Le, Lt from sympy.core.singleton import S from sympy.core.symbol import Dummy, Symbol from sympy.core.sympify import sympify from sympy.functions.combinatorial.factorials import factorial from sympy.functions.combinatorial.numbers import fibonacci from sympy.functions.elementary.exponential import exp, log from sympy.functions.elementary.miscellaneous import sqrt, cbrt from sympy.functions.elementary.trigonometric import cos, sin from sympy.polys.domains.realfield import RealField from sympy.printing.latex import latex from sympy.printing.repr import srepr from sympy.simplify import simplify from sympy.core.power import integer_nthroot, isqrt, integer_log from sympy.polys.domains.groundtypes import PythonRational from sympy.utilities.decorator import conserve_mpmath_dps from sympy.utilities.iterables import permutations from sympy.testing.pytest import XFAIL, raises, _both_exp_pow from mpmath import mpf from mpmath.rational import mpq import mpmath from sympy.core import numbers t = Symbol('t', real=False) _ninf = float(-oo) _inf = float(oo) def same_and_same_prec(a, b): # stricter matching for Floats return a == b and a._prec == b._prec def test_seterr(): seterr(divide=True) raises(ValueError, lambda: S.Zero/S.Zero) seterr(divide=False) assert S.Zero / S.Zero is S.NaN def test_mod(): x = S.Half y = Rational(3, 4) z = Rational(5, 18043) assert x % x == 0 assert x % y == S.Half assert x % z == Rational(3, 36086) assert y % x == Rational(1, 4) assert y % y == 0 assert y % z == Rational(9, 72172) assert z % x == Rational(5, 18043) assert z % y == Rational(5, 18043) assert z % z == 0 a = Float(2.6) assert (a % .2) == 0.0 assert (a % 2).round(15) == 0.6 assert (a % 0.5).round(15) == 0.1 p = Symbol('p', infinite=True) assert oo % oo is nan assert zoo % oo is nan assert 5 % oo is nan assert p % 5 is nan # In these two tests, if the precision of m does # not match the precision of the ans, then it is # likely that the change made now gives an answer # with degraded accuracy. r = Rational(500, 41) f = Float('.36', 3) m = r % f ans = Float(r % Rational(f), 3) assert m == ans and m._prec == ans._prec f = Float('8.36', 3) m = f % r ans = Float(Rational(f) % r, 3) assert m == ans and m._prec == ans._prec s = S.Zero assert s % float(1) == 0.0 # No rounding required since these numbers can be represented # exactly. assert Rational(3, 4) % Float(1.1) == 0.75 assert Float(1.5) % Rational(5, 4) == 0.25 assert Rational(5, 4).__rmod__(Float('1.5')) == 0.25 assert Float('1.5').__rmod__(Float('2.75')) == Float('1.25') assert 2.75 % Float('1.5') == Float('1.25') a = Integer(7) b = Integer(4) assert type(a % b) == Integer assert a % b == Integer(3) assert Integer(1) % Rational(2, 3) == Rational(1, 3) assert Rational(7, 5) % Integer(1) == Rational(2, 5) assert Integer(2) % 1.5 == 0.5 assert Integer(3).__rmod__(Integer(10)) == Integer(1) assert Integer(10) % 4 == Integer(2) assert 15 % Integer(4) == Integer(3) def test_divmod(): assert divmod(S(12), S(8)) == Tuple(1, 4) assert divmod(-S(12), S(8)) == Tuple(-2, 4) assert divmod(S.Zero, S.One) == Tuple(0, 0) raises(ZeroDivisionError, lambda: divmod(S.Zero, S.Zero)) raises(ZeroDivisionError, lambda: divmod(S.One, S.Zero)) assert divmod(S(12), 8) == Tuple(1, 4) assert divmod(12, S(8)) == Tuple(1, 4) assert divmod(S("2"), S("3/2")) == Tuple(S("1"), S("1/2")) assert divmod(S("3/2"), S("2")) == Tuple(S("0"), S("3/2")) assert divmod(S("2"), S("3.5")) == Tuple(S("0"), S("2")) assert divmod(S("3.5"), S("2")) == Tuple(S("1"), S("1.5")) assert divmod(S("2"), S("1/3")) == Tuple(S("6"), S("0")) assert divmod(S("1/3"), S("2")) == Tuple(S("0"), S("1/3")) assert divmod(S("2"), S("1/10")) == Tuple(S("20"), S("0")) assert divmod(S("2"), S(".1"))[0] == 19 assert divmod(S("0.1"), S("2")) == Tuple(S("0"), S("0.1")) assert divmod(S("2"), 2) == Tuple(S("1"), S("0")) assert divmod(2, S("2")) == Tuple(S("1"), S("0")) assert divmod(S("2"), 1.5) == Tuple(S("1"), S("0.5")) assert divmod(1.5, S("2")) == Tuple(S("0"), S("1.5")) assert divmod(0.3, S("2")) == Tuple(S("0"), S("0.3")) assert divmod(S("3/2"), S("3.5")) == Tuple(S("0"), S("3/2")) assert divmod(S("3.5"), S("3/2")) == Tuple(S("2"), S("0.5")) assert divmod(S("3/2"), S("1/3")) == Tuple(S("4"), S("1/6")) assert divmod(S("1/3"), S("3/2")) == Tuple(S("0"), S("1/3")) assert divmod(S("3/2"), S("0.1"))[0] == 14 assert divmod(S("0.1"), S("3/2")) == Tuple(S("0"), S("0.1")) assert divmod(S("3/2"), 2) == Tuple(S("0"), S("3/2")) assert divmod(2, S("3/2")) == Tuple(S("1"), S("1/2")) assert divmod(S("3/2"), 1.5) == Tuple(S("1"), S("0")) assert divmod(1.5, S("3/2")) == Tuple(S("1"), S("0")) assert divmod(S("3/2"), 0.3) == Tuple(S("5"), S("0")) assert divmod(0.3, S("3/2")) == Tuple(S("0"), S("0.3")) assert divmod(S("1/3"), S("3.5")) == Tuple(S("0"), S("1/3")) assert divmod(S("3.5"), S("0.1")) == Tuple(S("35"), S("0")) assert divmod(S("0.1"), S("3.5")) == Tuple(S("0"), S("0.1")) assert divmod(S("3.5"), 2) == Tuple(S("1"), S("1.5")) assert divmod(2, S("3.5")) == Tuple(S("0"), S("2")) assert divmod(S("3.5"), 1.5) == Tuple(S("2"), S("0.5")) assert divmod(1.5, S("3.5")) == Tuple(S("0"), S("1.5")) assert divmod(0.3, S("3.5")) == Tuple(S("0"), S("0.3")) assert divmod(S("0.1"), S("1/3")) == Tuple(S("0"), S("0.1")) assert divmod(S("1/3"), 2) == Tuple(S("0"), S("1/3")) assert divmod(2, S("1/3")) == Tuple(S("6"), S("0")) assert divmod(S("1/3"), 1.5) == Tuple(S("0"), S("1/3")) assert divmod(0.3, S("1/3")) == Tuple(S("0"), S("0.3")) assert divmod(S("0.1"), 2) == Tuple(S("0"), S("0.1")) assert divmod(2, S("0.1"))[0] == 19 assert divmod(S("0.1"), 1.5) == Tuple(S("0"), S("0.1")) assert divmod(1.5, S("0.1")) == Tuple(S("15"), S("0")) assert divmod(S("0.1"), 0.3) == Tuple(S("0"), S("0.1")) assert str(divmod(S("2"), 0.3)) == '(6, 0.2)' assert str(divmod(S("3.5"), S("1/3"))) == '(10, 0.166666666666667)' assert str(divmod(S("3.5"), 0.3)) == '(11, 0.2)' assert str(divmod(S("1/3"), S("0.1"))) == '(3, 0.0333333333333333)' assert str(divmod(1.5, S("1/3"))) == '(4, 0.166666666666667)' assert str(divmod(S("1/3"), 0.3)) == '(1, 0.0333333333333333)' assert str(divmod(0.3, S("0.1"))) == '(2, 0.1)' assert divmod(-3, S(2)) == (-2, 1) assert divmod(S(-3), S(2)) == (-2, 1) assert divmod(S(-3), 2) == (-2, 1) assert divmod(S(4), S(-3.1)) == Tuple(-2, -2.2) assert divmod(S(4), S(-2.1)) == divmod(4, -2.1) assert divmod(S(-8), S(-2.5) ) == Tuple(3, -0.5) assert divmod(oo, 1) == (S.NaN, S.NaN) assert divmod(S.NaN, 1) == (S.NaN, S.NaN) assert divmod(1, S.NaN) == (S.NaN, S.NaN) ans = [(-1, oo), (-1, oo), (0, 0), (0, 1), (0, 2)] OO = float('inf') ANS = [tuple(map(float, i)) for i in ans] assert [divmod(i, oo) for i in range(-2, 3)] == ans ans = [(0, -2), (0, -1), (0, 0), (-1, -oo), (-1, -oo)] ANS = [tuple(map(float, i)) for i in ans] assert [divmod(i, -oo) for i in range(-2, 3)] == ans assert [divmod(i, -OO) for i in range(-2, 3)] == ANS assert divmod(S(3.5), S(-2)) == divmod(3.5, -2) assert divmod(-S(3.5), S(-2)) == divmod(-3.5, -2) assert divmod(S(0.0), S(9)) == divmod(0.0, 9) assert divmod(S(0), S(9.0)) == divmod(0, 9.0) def test_igcd(): assert igcd(0, 0) == 0 assert igcd(0, 1) == 1 assert igcd(1, 0) == 1 assert igcd(0, 7) == 7 assert igcd(7, 0) == 7 assert igcd(7, 1) == 1 assert igcd(1, 7) == 1 assert igcd(-1, 0) == 1 assert igcd(0, -1) == 1 assert igcd(-1, -1) == 1 assert igcd(-1, 7) == 1 assert igcd(7, -1) == 1 assert igcd(8, 2) == 2 assert igcd(4, 8) == 4 assert igcd(8, 16) == 8 assert igcd(7, -3) == 1 assert igcd(-7, 3) == 1 assert igcd(-7, -3) == 1 assert igcd(*[10, 20, 30]) == 10 raises(TypeError, lambda: igcd()) raises(TypeError, lambda: igcd(2)) raises(ValueError, lambda: igcd(0, None)) raises(ValueError, lambda: igcd(1, 2.2)) for args in permutations((45.1, 1, 30)): raises(ValueError, lambda: igcd(*args)) for args in permutations((1, 2, None)): raises(ValueError, lambda: igcd(*args)) def test_igcd_lehmer(): a, b = fibonacci(10001), fibonacci(10000) # len(str(a)) == 2090 # small divisors, long Euclidean sequence assert igcd_lehmer(a, b) == 1 c = fibonacci(100) assert igcd_lehmer(a*c, b*c) == c # big divisor assert igcd_lehmer(a, 10**1000) == 1 # swapping argmument assert igcd_lehmer(1, 2) == igcd_lehmer(2, 1) def test_igcd2(): # short loop assert igcd2(2**100 - 1, 2**99 - 1) == 1 # Lehmer's algorithm a, b = int(fibonacci(10001)), int(fibonacci(10000)) assert igcd2(a, b) == 1 def test_ilcm(): assert ilcm(0, 0) == 0 assert ilcm(1, 0) == 0 assert ilcm(0, 1) == 0 assert ilcm(1, 1) == 1 assert ilcm(2, 1) == 2 assert ilcm(8, 2) == 8 assert ilcm(8, 6) == 24 assert ilcm(8, 7) == 56 assert ilcm(*[10, 20, 30]) == 60 raises(ValueError, lambda: ilcm(8.1, 7)) raises(ValueError, lambda: ilcm(8, 7.1)) raises(TypeError, lambda: ilcm(8)) def test_igcdex(): assert igcdex(2, 3) == (-1, 1, 1) assert igcdex(10, 12) == (-1, 1, 2) assert igcdex(100, 2004) == (-20, 1, 4) assert igcdex(0, 0) == (0, 1, 0) assert igcdex(1, 0) == (1, 0, 1) def _strictly_equal(a, b): return (a.p, a.q, type(a.p), type(a.q)) == \ (b.p, b.q, type(b.p), type(b.q)) def _test_rational_new(cls): """ Tests that are common between Integer and Rational. """ assert cls(0) is S.Zero assert cls(1) is S.One assert cls(-1) is S.NegativeOne # These look odd, but are similar to int(): assert cls('1') is S.One assert cls('-1') is S.NegativeOne i = Integer(10) assert _strictly_equal(i, cls('10')) assert _strictly_equal(i, cls('10')) assert _strictly_equal(i, cls(int(10))) assert _strictly_equal(i, cls(i)) raises(TypeError, lambda: cls(Symbol('x'))) def test_Integer_new(): """ Test for Integer constructor """ _test_rational_new(Integer) assert _strictly_equal(Integer(0.9), S.Zero) assert _strictly_equal(Integer(10.5), Integer(10)) raises(ValueError, lambda: Integer("10.5")) assert Integer(Rational('1.' + '9'*20)) == 1 def test_Rational_new(): """" Test for Rational constructor """ _test_rational_new(Rational) n1 = S.Half assert n1 == Rational(Integer(1), 2) assert n1 == Rational(Integer(1), Integer(2)) assert n1 == Rational(1, Integer(2)) assert n1 == Rational(S.Half) assert 1 == Rational(n1, n1) assert Rational(3, 2) == Rational(S.Half, Rational(1, 3)) assert Rational(3, 1) == Rational(1, Rational(1, 3)) n3_4 = Rational(3, 4) assert Rational('3/4') == n3_4 assert -Rational('-3/4') == n3_4 assert Rational('.76').limit_denominator(4) == n3_4 assert Rational(19, 25).limit_denominator(4) == n3_4 assert Rational('19/25').limit_denominator(4) == n3_4 assert Rational(1.0, 3) == Rational(1, 3) assert Rational(1, 3.0) == Rational(1, 3) assert Rational(Float(0.5)) == S.Half assert Rational('1e2/1e-2') == Rational(10000) assert Rational('1 234') == Rational(1234) assert Rational('1/1 234') == Rational(1, 1234) assert Rational(-1, 0) is S.ComplexInfinity assert Rational(1, 0) is S.ComplexInfinity # Make sure Rational doesn't lose precision on Floats assert Rational(pi.evalf(100)).evalf(100) == pi.evalf(100) raises(TypeError, lambda: Rational('3**3')) raises(TypeError, lambda: Rational('1/2 + 2/3')) # handle fractions.Fraction instances try: import fractions assert Rational(fractions.Fraction(1, 2)) == S.Half except ImportError: pass assert Rational(mpq(2, 6)) == Rational(1, 3) assert Rational(PythonRational(2, 6)) == Rational(1, 3) assert Rational(2, 4, gcd=1).q == 4 n = Rational(2, -4, gcd=1) assert n.q == 4 assert n.p == -2 def test_Number_new(): """" Test for Number constructor """ # Expected behavior on numbers and strings assert Number(1) is S.One assert Number(2).__class__ is Integer assert Number(-622).__class__ is Integer assert Number(5, 3).__class__ is Rational assert Number(5.3).__class__ is Float assert Number('1') is S.One assert Number('2').__class__ is Integer assert Number('-622').__class__ is Integer assert Number('5/3').__class__ is Rational assert Number('5.3').__class__ is Float raises(ValueError, lambda: Number('cos')) raises(TypeError, lambda: Number(cos)) a = Rational(3, 5) assert Number(a) is a # Check idempotence on Numbers u = ['inf', '-inf', 'nan', 'iNF', '+inf'] v = [oo, -oo, nan, oo, oo] for i, a in zip(u, v): assert Number(i) is a, (i, Number(i), a) def test_Number_cmp(): n1 = Number(1) n2 = Number(2) n3 = Number(-3) assert n1 < n2 assert n1 <= n2 assert n3 < n1 assert n2 > n3 assert n2 >= n3 raises(TypeError, lambda: n1 < S.NaN) raises(TypeError, lambda: n1 <= S.NaN) raises(TypeError, lambda: n1 > S.NaN) raises(TypeError, lambda: n1 >= S.NaN) def test_Rational_cmp(): n1 = Rational(1, 4) n2 = Rational(1, 3) n3 = Rational(2, 4) n4 = Rational(2, -4) n5 = Rational(0) n6 = Rational(1) n7 = Rational(3) n8 = Rational(-3) assert n8 < n5 assert n5 < n6 assert n6 < n7 assert n8 < n7 assert n7 > n8 assert (n1 + 1)**n2 < 2 assert ((n1 + n6)/n7) < 1 assert n4 < n3 assert n2 < n3 assert n1 < n2 assert n3 > n1 assert not n3 < n1 assert not (Rational(-1) > 0) assert Rational(-1) < 0 raises(TypeError, lambda: n1 < S.NaN) raises(TypeError, lambda: n1 <= S.NaN) raises(TypeError, lambda: n1 > S.NaN) raises(TypeError, lambda: n1 >= S.NaN) def test_Float(): def eq(a, b): t = Float("1.0E-15") return (-t < a - b < t) zeros = (0, S.Zero, 0., Float(0)) for i, j in permutations(zeros, 2): assert i == j for z in zeros: assert z in zeros assert S.Zero.is_zero a = Float(2) ** Float(3) assert eq(a.evalf(), Float(8)) assert eq((pi ** -1).evalf(), Float("0.31830988618379067")) a = Float(2) ** Float(4) assert eq(a.evalf(), Float(16)) assert (S(.3) == S(.5)) is False mpf = (0, 5404319552844595, -52, 53) x_str = Float((0, '13333333333333', -52, 53)) x_0xstr = Float((0, '0x13333333333333', -52, 53)) x2_str = Float((0, '26666666666666', -53, 54)) x_hex = Float((0, int(0x13333333333333), -52, 53)) x_dec = Float(mpf) assert x_str == x_0xstr == x_hex == x_dec == Float(1.2) # x2_str was entered slightly malformed in that the mantissa # was even -- it should be odd and the even part should be # included with the exponent, but this is resolved by normalization # ONLY IF REQUIREMENTS of mpf_norm are met: the bitcount must # be exact: double the mantissa ==> increase bc by 1 assert Float(1.2)._mpf_ == mpf assert x2_str._mpf_ == mpf assert Float((0, int(0), -123, -1)) is S.NaN assert Float((0, int(0), -456, -2)) is S.Infinity assert Float((1, int(0), -789, -3)) is S.NegativeInfinity # if you don't give the full signature, it's not special assert Float((0, int(0), -123)) == Float(0) assert Float((0, int(0), -456)) == Float(0) assert Float((1, int(0), -789)) == Float(0) raises(ValueError, lambda: Float((0, 7, 1, 3), '')) assert Float('0.0').is_finite is True assert Float('0.0').is_negative is False assert Float('0.0').is_positive is False assert Float('0.0').is_infinite is False assert Float('0.0').is_zero is True # rationality properties # if the integer test fails then the use of intlike # should be removed from gamma_functions.py assert Float(1).is_integer is False assert Float(1).is_rational is None assert Float(1).is_irrational is None assert sqrt(2).n(15).is_rational is None assert sqrt(2).n(15).is_irrational is None # do not automatically evalf def teq(a): assert (a.evalf() == a) is False assert (a.evalf() != a) is True assert (a == a.evalf()) is False assert (a != a.evalf()) is True teq(pi) teq(2*pi) teq(cos(0.1, evaluate=False)) # long integer i = 12345678901234567890 assert same_and_same_prec(Float(12, ''), Float('12', '')) assert same_and_same_prec(Float(Integer(i), ''), Float(i, '')) assert same_and_same_prec(Float(i, ''), Float(str(i), 20)) assert same_and_same_prec(Float(str(i)), Float(i, '')) assert same_and_same_prec(Float(i), Float(i, '')) # inexact floats (repeating binary = denom not multiple of 2) # cannot have precision greater than 15 assert Float(.125, 22) == .125 assert Float(2.0, 22) == 2 assert float(Float('.12500000000000001', '')) == .125 raises(ValueError, lambda: Float(.12500000000000001, '')) # allow spaces Float('123 456.123 456') == Float('123456.123456') Integer('123 456') == Integer('123456') Rational('123 456.123 456') == Rational('123456.123456') assert Float(' .3e2') == Float('0.3e2') # allow underscore assert Float('1_23.4_56') == Float('123.456') assert Float('1_') == Float('1.0') assert Float('1_.') == Float('1.0') assert Float('1._') == Float('1.0') assert Float('1__2') == Float('12.0') # assert Float('1_23.4_5_6', 12) == Float('123.456', 12) # ...but not in all cases (per Py 3.6) raises(ValueError, lambda: Float('_1')) raises(ValueError, lambda: Float('_inf')) # allow auto precision detection assert Float('.1', '') == Float(.1, 1) assert Float('.125', '') == Float(.125, 3) assert Float('.100', '') == Float(.1, 3) assert Float('2.0', '') == Float('2', 2) raises(ValueError, lambda: Float("12.3d-4", "")) raises(ValueError, lambda: Float(12.3, "")) raises(ValueError, lambda: Float('.')) raises(ValueError, lambda: Float('-.')) zero = Float('0.0') assert Float('-0') == zero assert Float('.0') == zero assert Float('-.0') == zero assert Float('-0.0') == zero assert Float(0.0) == zero assert Float(0) == zero assert Float(0, '') == Float('0', '') assert Float(1) == Float(1.0) assert Float(S.Zero) == zero assert Float(S.One) == Float(1.0) assert Float(decimal.Decimal('0.1'), 3) == Float('.1', 3) assert Float(decimal.Decimal('nan')) is S.NaN assert Float(decimal.Decimal('Infinity')) is S.Infinity assert Float(decimal.Decimal('-Infinity')) is S.NegativeInfinity assert '{:.3f}'.format(Float(4.236622)) == '4.237' assert '{:.35f}'.format(Float(pi.n(40), 40)) == \ '3.14159265358979323846264338327950288' # unicode assert Float('0.73908513321516064100000000') == \ Float('0.73908513321516064100000000') assert Float('0.73908513321516064100000000', 28) == \ Float('0.73908513321516064100000000', 28) # binary precision # Decimal value 0.1 cannot be expressed precisely as a base 2 fraction a = Float(S.One/10, dps=15) b = Float(S.One/10, dps=16) p = Float(S.One/10, precision=53) q = Float(S.One/10, precision=54) assert a._mpf_ == p._mpf_ assert not a._mpf_ == q._mpf_ assert not b._mpf_ == q._mpf_ # Precision specifying errors raises(ValueError, lambda: Float("1.23", dps=3, precision=10)) raises(ValueError, lambda: Float("1.23", dps="", precision=10)) raises(ValueError, lambda: Float("1.23", dps=3, precision="")) raises(ValueError, lambda: Float("1.23", dps="", precision="")) # from NumberSymbol assert same_and_same_prec(Float(pi, 32), pi.evalf(32)) assert same_and_same_prec(Float(Catalan), Catalan.evalf()) # oo and nan u = ['inf', '-inf', 'nan', 'iNF', '+inf'] v = [oo, -oo, nan, oo, oo] for i, a in zip(u, v): assert Float(i) is a def test_zero_not_false(): # https://github.com/sympy/sympy/issues/20796 assert (S(0.0) == S.false) is False assert (S.false == S(0.0)) is False assert (S(0) == S.false) is False assert (S.false == S(0)) is False @conserve_mpmath_dps def test_float_mpf(): import mpmath mpmath.mp.dps = 100 mp_pi = mpmath.pi() assert Float(mp_pi, 100) == Float(mp_pi._mpf_, 100) == pi.evalf(100) mpmath.mp.dps = 15 assert Float(mp_pi, 100) == Float(mp_pi._mpf_, 100) == pi.evalf(100) def test_Float_RealElement(): repi = RealField(dps=100)(pi.evalf(100)) # We still have to pass the precision because Float doesn't know what # RealElement is, but make sure it keeps full precision from the result. assert Float(repi, 100) == pi.evalf(100) def test_Float_default_to_highprec_from_str(): s = str(pi.evalf(128)) assert same_and_same_prec(Float(s), Float(s, '')) def test_Float_eval(): a = Float(3.2) assert (a**2).is_Float def test_Float_issue_2107(): a = Float(0.1, 10) b = Float("0.1", 10) assert a - a == 0 assert a + (-a) == 0 assert S.Zero + a - a == 0 assert S.Zero + a + (-a) == 0 assert b - b == 0 assert b + (-b) == 0 assert S.Zero + b - b == 0 assert S.Zero + b + (-b) == 0 def test_issue_14289(): from sympy.polys.numberfields import to_number_field a = 1 - sqrt(2) b = to_number_field(a) assert b.as_expr() == a assert b.minpoly(a).expand() == 0 def test_Float_from_tuple(): a = Float((0, '1L', 0, 1)) b = Float((0, '1', 0, 1)) assert a == b def test_Infinity(): assert oo != 1 assert 1*oo is oo assert 1 != oo assert oo != -oo assert oo != Symbol("x")**3 assert oo + 1 is oo assert 2 + oo is oo assert 3*oo + 2 is oo assert S.Half**oo == 0 assert S.Half**(-oo) is oo assert -oo*3 is -oo assert oo + oo is oo assert -oo + oo*(-5) is -oo assert 1/oo == 0 assert 1/(-oo) == 0 assert 8/oo == 0 assert oo % 2 is nan assert 2 % oo is nan assert oo/oo is nan assert oo/-oo is nan assert -oo/oo is nan assert -oo/-oo is nan assert oo - oo is nan assert oo - -oo is oo assert -oo - oo is -oo assert -oo - -oo is nan assert oo + -oo is nan assert -oo + oo is nan assert oo + oo is oo assert -oo + oo is nan assert oo + -oo is nan assert -oo + -oo is -oo assert oo*oo is oo assert -oo*oo is -oo assert oo*-oo is -oo assert -oo*-oo is oo assert oo/0 is oo assert -oo/0 is -oo assert 0/oo == 0 assert 0/-oo == 0 assert oo*0 is nan assert -oo*0 is nan assert 0*oo is nan assert 0*-oo is nan assert oo + 0 is oo assert -oo + 0 is -oo assert 0 + oo is oo assert 0 + -oo is -oo assert oo - 0 is oo assert -oo - 0 is -oo assert 0 - oo is -oo assert 0 - -oo is oo assert oo/2 is oo assert -oo/2 is -oo assert oo/-2 is -oo assert -oo/-2 is oo assert oo*2 is oo assert -oo*2 is -oo assert oo*-2 is -oo assert 2/oo == 0 assert 2/-oo == 0 assert -2/oo == 0 assert -2/-oo == 0 assert 2*oo is oo assert 2*-oo is -oo assert -2*oo is -oo assert -2*-oo is oo assert 2 + oo is oo assert 2 - oo is -oo assert -2 + oo is oo assert -2 - oo is -oo assert 2 + -oo is -oo assert 2 - -oo is oo assert -2 + -oo is -oo assert -2 - -oo is oo assert S(2) + oo is oo assert S(2) - oo is -oo assert oo/I == -oo*I assert -oo/I == oo*I assert oo*float(1) == _inf and (oo*float(1)) is oo assert -oo*float(1) == _ninf and (-oo*float(1)) is -oo assert oo/float(1) == _inf and (oo/float(1)) is oo assert -oo/float(1) == _ninf and (-oo/float(1)) is -oo assert oo*float(-1) == _ninf and (oo*float(-1)) is -oo assert -oo*float(-1) == _inf and (-oo*float(-1)) is oo assert oo/float(-1) == _ninf and (oo/float(-1)) is -oo assert -oo/float(-1) == _inf and (-oo/float(-1)) is oo assert oo + float(1) == _inf and (oo + float(1)) is oo assert -oo + float(1) == _ninf and (-oo + float(1)) is -oo assert oo - float(1) == _inf and (oo - float(1)) is oo assert -oo - float(1) == _ninf and (-oo - float(1)) is -oo assert float(1)*oo == _inf and (float(1)*oo) is oo assert float(1)*-oo == _ninf and (float(1)*-oo) is -oo assert float(1)/oo == 0 assert float(1)/-oo == 0 assert float(-1)*oo == _ninf and (float(-1)*oo) is -oo assert float(-1)*-oo == _inf and (float(-1)*-oo) is oo assert float(-1)/oo == 0 assert float(-1)/-oo == 0 assert float(1) + oo is oo assert float(1) + -oo is -oo assert float(1) - oo is -oo assert float(1) - -oo is oo assert oo == float(oo) assert (oo != float(oo)) is False assert type(float(oo)) is float assert -oo == float(-oo) assert (-oo != float(-oo)) is False assert type(float(-oo)) is float assert Float('nan') is nan assert nan*1.0 is nan assert -1.0*nan is nan assert nan*oo is nan assert nan*-oo is nan assert nan/oo is nan assert nan/-oo is nan assert nan + oo is nan assert nan + -oo is nan assert nan - oo is nan assert nan - -oo is nan assert -oo * S.Zero is nan assert oo*nan is nan assert -oo*nan is nan assert oo/nan is nan assert -oo/nan is nan assert oo + nan is nan assert -oo + nan is nan assert oo - nan is nan assert -oo - nan is nan assert S.Zero * oo is nan assert oo.is_Rational is False assert isinstance(oo, Rational) is False assert S.One/oo == 0 assert -S.One/oo == 0 assert S.One/-oo == 0 assert -S.One/-oo == 0 assert S.One*oo is oo assert -S.One*oo is -oo assert S.One*-oo is -oo assert -S.One*-oo is oo assert S.One/nan is nan assert S.One - -oo is oo assert S.One + nan is nan assert S.One - nan is nan assert nan - S.One is nan assert nan/S.One is nan assert -oo - S.One is -oo def test_Infinity_2(): x = Symbol('x') assert oo*x != oo assert oo*(pi - 1) is oo assert oo*(1 - pi) is -oo assert (-oo)*x != -oo assert (-oo)*(pi - 1) is -oo assert (-oo)*(1 - pi) is oo assert (-1)**S.NaN is S.NaN assert oo - _inf is S.NaN assert oo + _ninf is S.NaN assert oo*0 is S.NaN assert oo/_inf is S.NaN assert oo/_ninf is S.NaN assert oo**S.NaN is S.NaN assert -oo + _inf is S.NaN assert -oo - _ninf is S.NaN assert -oo*S.NaN is S.NaN assert -oo*0 is S.NaN assert -oo/_inf is S.NaN assert -oo/_ninf is S.NaN assert -oo/S.NaN is S.NaN assert abs(-oo) is oo assert all((-oo)**i is S.NaN for i in (oo, -oo, S.NaN)) assert (-oo)**3 is -oo assert (-oo)**2 is oo assert abs(S.ComplexInfinity) is oo def test_Mul_Infinity_Zero(): assert Float(0)*_inf is nan assert Float(0)*_ninf is nan assert Float(0)*_inf is nan assert Float(0)*_ninf is nan assert _inf*Float(0) is nan assert _ninf*Float(0) is nan assert _inf*Float(0) is nan assert _ninf*Float(0) is nan def test_Div_By_Zero(): assert 1/S.Zero is zoo assert 1/Float(0) is zoo assert 0/S.Zero is nan assert 0/Float(0) is nan assert S.Zero/0 is nan assert Float(0)/0 is nan assert -1/S.Zero is zoo assert -1/Float(0) is zoo @_both_exp_pow def test_Infinity_inequations(): assert oo > pi assert not (oo < pi) assert exp(-3) < oo assert _inf > pi assert not (_inf < pi) assert exp(-3) < _inf raises(TypeError, lambda: oo < I) raises(TypeError, lambda: oo <= I) raises(TypeError, lambda: oo > I) raises(TypeError, lambda: oo >= I) raises(TypeError, lambda: -oo < I) raises(TypeError, lambda: -oo <= I) raises(TypeError, lambda: -oo > I) raises(TypeError, lambda: -oo >= I) raises(TypeError, lambda: I < oo) raises(TypeError, lambda: I <= oo) raises(TypeError, lambda: I > oo) raises(TypeError, lambda: I >= oo) raises(TypeError, lambda: I < -oo) raises(TypeError, lambda: I <= -oo) raises(TypeError, lambda: I > -oo) raises(TypeError, lambda: I >= -oo) assert oo > -oo and oo >= -oo assert (oo < -oo) == False and (oo <= -oo) == False assert -oo < oo and -oo <= oo assert (-oo > oo) == False and (-oo >= oo) == False assert (oo < oo) == False # issue 7775 assert (oo > oo) == False assert (-oo > -oo) == False and (-oo < -oo) == False assert oo >= oo and oo <= oo and -oo >= -oo and -oo <= -oo assert (-oo < -_inf) == False assert (oo > _inf) == False assert -oo >= -_inf assert oo <= _inf x = Symbol('x') b = Symbol('b', finite=True, real=True) assert (x < oo) == Lt(x, oo) # issue 7775 assert b < oo and b > -oo and b <= oo and b >= -oo assert oo > b and oo >= b and (oo < b) == False and (oo <= b) == False assert (-oo > b) == False and (-oo >= b) == False and -oo < b and -oo <= b assert (oo < x) == Lt(oo, x) and (oo > x) == Gt(oo, x) assert (oo <= x) == Le(oo, x) and (oo >= x) == Ge(oo, x) assert (-oo < x) == Lt(-oo, x) and (-oo > x) == Gt(-oo, x) assert (-oo <= x) == Le(-oo, x) and (-oo >= x) == Ge(-oo, x) def test_NaN(): assert nan is nan assert nan != 1 assert 1*nan is nan assert 1 != nan assert -nan is nan assert oo != Symbol("x")**3 assert 2 + nan is nan assert 3*nan + 2 is nan assert -nan*3 is nan assert nan + nan is nan assert -nan + nan*(-5) is nan assert 8/nan is nan raises(TypeError, lambda: nan > 0) raises(TypeError, lambda: nan < 0) raises(TypeError, lambda: nan >= 0) raises(TypeError, lambda: nan <= 0) raises(TypeError, lambda: 0 < nan) raises(TypeError, lambda: 0 > nan) raises(TypeError, lambda: 0 <= nan) raises(TypeError, lambda: 0 >= nan) assert nan**0 == 1 # as per IEEE 754 assert 1**nan is nan # IEEE 754 is not the best choice for symbolic work # test Pow._eval_power's handling of NaN assert Pow(nan, 0, evaluate=False)**2 == 1 for n in (1, 1., S.One, S.NegativeOne, Float(1)): assert n + nan is nan assert n - nan is nan assert nan + n is nan assert nan - n is nan assert n/nan is nan assert nan/n is nan def test_special_numbers(): assert isinstance(S.NaN, Number) is True assert isinstance(S.Infinity, Number) is True assert isinstance(S.NegativeInfinity, Number) is True assert S.NaN.is_number is True assert S.Infinity.is_number is True assert S.NegativeInfinity.is_number is True assert S.ComplexInfinity.is_number is True assert isinstance(S.NaN, Rational) is False assert isinstance(S.Infinity, Rational) is False assert isinstance(S.NegativeInfinity, Rational) is False assert S.NaN.is_rational is not True assert S.Infinity.is_rational is not True assert S.NegativeInfinity.is_rational is not True def test_powers(): assert integer_nthroot(1, 2) == (1, True) assert integer_nthroot(1, 5) == (1, True) assert integer_nthroot(2, 1) == (2, True) assert integer_nthroot(2, 2) == (1, False) assert integer_nthroot(2, 5) == (1, False) assert integer_nthroot(4, 2) == (2, True) assert integer_nthroot(123**25, 25) == (123, True) assert integer_nthroot(123**25 + 1, 25) == (123, False) assert integer_nthroot(123**25 - 1, 25) == (122, False) assert integer_nthroot(1, 1) == (1, True) assert integer_nthroot(0, 1) == (0, True) assert integer_nthroot(0, 3) == (0, True) assert integer_nthroot(10000, 1) == (10000, True) assert integer_nthroot(4, 2) == (2, True) assert integer_nthroot(16, 2) == (4, True) assert integer_nthroot(26, 2) == (5, False) assert integer_nthroot(1234567**7, 7) == (1234567, True) assert integer_nthroot(1234567**7 + 1, 7) == (1234567, False) assert integer_nthroot(1234567**7 - 1, 7) == (1234566, False) b = 25**1000 assert integer_nthroot(b, 1000) == (25, True) assert integer_nthroot(b + 1, 1000) == (25, False) assert integer_nthroot(b - 1, 1000) == (24, False) c = 10**400 c2 = c**2 assert integer_nthroot(c2, 2) == (c, True) assert integer_nthroot(c2 + 1, 2) == (c, False) assert integer_nthroot(c2 - 1, 2) == (c - 1, False) assert integer_nthroot(2, 10**10) == (1, False) p, r = integer_nthroot(int(factorial(10000)), 100) assert p % (10**10) == 5322420655 assert not r # Test that this is fast assert integer_nthroot(2, 10**10) == (1, False) # output should be int if possible assert type(integer_nthroot(2**61, 2)[0]) is int def test_integer_nthroot_overflow(): assert integer_nthroot(10**(50*50), 50) == (10**50, True) assert integer_nthroot(10**100000, 10000) == (10**10, True) def test_integer_log(): raises(ValueError, lambda: integer_log(2, 1)) raises(ValueError, lambda: integer_log(0, 2)) raises(ValueError, lambda: integer_log(1.1, 2)) raises(ValueError, lambda: integer_log(1, 2.2)) assert integer_log(1, 2) == (0, True) assert integer_log(1, 3) == (0, True) assert integer_log(2, 3) == (0, False) assert integer_log(3, 3) == (1, True) assert integer_log(3*2, 3) == (1, False) assert integer_log(3**2, 3) == (2, True) assert integer_log(3*4, 3) == (2, False) assert integer_log(3**3, 3) == (3, True) assert integer_log(27, 5) == (2, False) assert integer_log(2, 3) == (0, False) assert integer_log(-4, -2) == (2, False) assert integer_log(27, -3) == (3, False) assert integer_log(-49, 7) == (0, False) assert integer_log(-49, -7) == (2, False) def test_isqrt(): from math import sqrt as _sqrt limit = 4503599761588223 assert int(_sqrt(limit)) == integer_nthroot(limit, 2)[0] assert int(_sqrt(limit + 1)) != integer_nthroot(limit + 1, 2)[0] assert isqrt(limit + 1) == integer_nthroot(limit + 1, 2)[0] assert isqrt(limit + S.Half) == integer_nthroot(limit, 2)[0] assert isqrt(limit + 1 + S.Half) == integer_nthroot(limit + 1, 2)[0] assert isqrt(limit + 2 + S.Half) == integer_nthroot(limit + 2, 2)[0] # Regression tests for https://github.com/sympy/sympy/issues/17034 assert isqrt(4503599761588224) == 67108864 assert isqrt(9999999999999999) == 99999999 # Other corner cases, especially involving non-integers. raises(ValueError, lambda: isqrt(-1)) raises(ValueError, lambda: isqrt(-10**1000)) raises(ValueError, lambda: isqrt(Rational(-1, 2))) tiny = Rational(1, 10**1000) raises(ValueError, lambda: isqrt(-tiny)) assert isqrt(1-tiny) == 0 assert isqrt(4503599761588224-tiny) == 67108864 assert isqrt(10**100 - tiny) == 10**50 - 1 # Check that using an inaccurate math.sqrt doesn't affect the results. from sympy.core import power old_sqrt = power._sqrt power._sqrt = lambda x: 2.999999999 try: assert isqrt(9) == 3 assert isqrt(10000) == 100 finally: power._sqrt = old_sqrt def test_powers_Integer(): """Test Integer._eval_power""" # check infinity assert S.One ** S.Infinity is S.NaN assert S.NegativeOne** S.Infinity is S.NaN assert S(2) ** S.Infinity is S.Infinity assert S(-2)** S.Infinity == zoo assert S(0) ** S.Infinity is S.Zero # check Nan assert S.One ** S.NaN is S.NaN assert S.NegativeOne ** S.NaN is S.NaN # check for exact roots assert S.NegativeOne ** Rational(6, 5) == - (-1)**(S.One/5) assert sqrt(S(4)) == 2 assert sqrt(S(-4)) == I * 2 assert S(16) ** Rational(1, 4) == 2 assert S(-16) ** Rational(1, 4) == 2 * (-1)**Rational(1, 4) assert S(9) ** Rational(3, 2) == 27 assert S(-9) ** Rational(3, 2) == -27*I assert S(27) ** Rational(2, 3) == 9 assert S(-27) ** Rational(2, 3) == 9 * (S.NegativeOne ** Rational(2, 3)) assert (-2) ** Rational(-2, 1) == Rational(1, 4) # not exact roots assert sqrt(-3) == I*sqrt(3) assert (3) ** (Rational(3, 2)) == 3 * sqrt(3) assert (-3) ** (Rational(3, 2)) == - 3 * sqrt(-3) assert (-3) ** (Rational(5, 2)) == 9 * I * sqrt(3) assert (-3) ** (Rational(7, 2)) == - I * 27 * sqrt(3) assert (2) ** (Rational(3, 2)) == 2 * sqrt(2) assert (2) ** (Rational(-3, 2)) == sqrt(2) / 4 assert (81) ** (Rational(2, 3)) == 9 * (S(3) ** (Rational(2, 3))) assert (-81) ** (Rational(2, 3)) == 9 * (S(-3) ** (Rational(2, 3))) assert (-3) ** Rational(-7, 3) == \ -(-1)**Rational(2, 3)*3**Rational(2, 3)/27 assert (-3) ** Rational(-2, 3) == \ -(-1)**Rational(1, 3)*3**Rational(1, 3)/3 # join roots assert sqrt(6) + sqrt(24) == 3*sqrt(6) assert sqrt(2) * sqrt(3) == sqrt(6) # separate symbols & constansts x = Symbol("x") assert sqrt(49 * x) == 7 * sqrt(x) assert sqrt((3 - sqrt(pi)) ** 2) == 3 - sqrt(pi) # check that it is fast for big numbers assert (2**64 + 1) ** Rational(4, 3) assert (2**64 + 1) ** Rational(17, 25) # negative rational power and negative base assert (-3) ** Rational(-7, 3) == \ -(-1)**Rational(2, 3)*3**Rational(2, 3)/27 assert (-3) ** Rational(-2, 3) == \ -(-1)**Rational(1, 3)*3**Rational(1, 3)/3 assert (-2) ** Rational(-10, 3) == \ (-1)**Rational(2, 3)*2**Rational(2, 3)/16 assert abs(Pow(-2, Rational(-10, 3)).n() - Pow(-2, Rational(-10, 3), evaluate=False).n()) < 1e-16 # negative base and rational power with some simplification assert (-8) ** Rational(2, 5) == \ 2*(-1)**Rational(2, 5)*2**Rational(1, 5) assert (-4) ** Rational(9, 5) == \ -8*(-1)**Rational(4, 5)*2**Rational(3, 5) assert S(1234).factors() == {617: 1, 2: 1} assert Rational(2*3, 3*5*7).factors() == {2: 1, 5: -1, 7: -1} # test that eval_power factors numbers bigger than # the current limit in factor_trial_division (2**15) from sympy.ntheory.generate import nextprime n = nextprime(2**15) assert sqrt(n**2) == n assert sqrt(n**3) == n*sqrt(n) assert sqrt(4*n) == 2*sqrt(n) # check that factors of base with powers sharing gcd with power are removed assert (2**4*3)**Rational(1, 6) == 2**Rational(2, 3)*3**Rational(1, 6) assert (2**4*3)**Rational(5, 6) == 8*2**Rational(1, 3)*3**Rational(5, 6) # check that bases sharing a gcd are exptracted assert 2**Rational(1, 3)*3**Rational(1, 4)*6**Rational(1, 5) == \ 2**Rational(8, 15)*3**Rational(9, 20) assert sqrt(8)*24**Rational(1, 3)*6**Rational(1, 5) == \ 4*2**Rational(7, 10)*3**Rational(8, 15) assert sqrt(8)*(-24)**Rational(1, 3)*(-6)**Rational(1, 5) == \ 4*(-3)**Rational(8, 15)*2**Rational(7, 10) assert 2**Rational(1, 3)*2**Rational(8, 9) == 2*2**Rational(2, 9) assert 2**Rational(2, 3)*6**Rational(1, 3) == 2*3**Rational(1, 3) assert 2**Rational(2, 3)*6**Rational(8, 9) == \ 2*2**Rational(5, 9)*3**Rational(8, 9) assert (-2)**Rational(2, S(3))*(-4)**Rational(1, S(3)) == -2*2**Rational(1, 3) assert 3*Pow(3, 2, evaluate=False) == 3**3 assert 3*Pow(3, Rational(-1, 3), evaluate=False) == 3**Rational(2, 3) assert (-2)**Rational(1, 3)*(-3)**Rational(1, 4)*(-5)**Rational(5, 6) == \ -(-1)**Rational(5, 12)*2**Rational(1, 3)*3**Rational(1, 4) * \ 5**Rational(5, 6) assert Integer(-2)**Symbol('', even=True) == \ Integer(2)**Symbol('', even=True) assert (-1)**Float(.5) == 1.0*I def test_powers_Rational(): """Test Rational._eval_power""" # check infinity assert S.Half ** S.Infinity == 0 assert Rational(3, 2) ** S.Infinity is S.Infinity assert Rational(-1, 2) ** S.Infinity == 0 assert Rational(-3, 2) ** S.Infinity == zoo # check Nan assert Rational(3, 4) ** S.NaN is S.NaN assert Rational(-2, 3) ** S.NaN is S.NaN # exact roots on numerator assert sqrt(Rational(4, 3)) == 2 * sqrt(3) / 3 assert Rational(4, 3) ** Rational(3, 2) == 8 * sqrt(3) / 9 assert sqrt(Rational(-4, 3)) == I * 2 * sqrt(3) / 3 assert Rational(-4, 3) ** Rational(3, 2) == - I * 8 * sqrt(3) / 9 assert Rational(27, 2) ** Rational(1, 3) == 3 * (2 ** Rational(2, 3)) / 2 assert Rational(5**3, 8**3) ** Rational(4, 3) == Rational(5**4, 8**4) # exact root on denominator assert sqrt(Rational(1, 4)) == S.Half assert sqrt(Rational(1, -4)) == I * S.Half assert sqrt(Rational(3, 4)) == sqrt(3) / 2 assert sqrt(Rational(3, -4)) == I * sqrt(3) / 2 assert Rational(5, 27) ** Rational(1, 3) == (5 ** Rational(1, 3)) / 3 # not exact roots assert sqrt(S.Half) == sqrt(2) / 2 assert sqrt(Rational(-4, 7)) == I * sqrt(Rational(4, 7)) assert Rational(-3, 2)**Rational(-7, 3) == \ -4*(-1)**Rational(2, 3)*2**Rational(1, 3)*3**Rational(2, 3)/27 assert Rational(-3, 2)**Rational(-2, 3) == \ -(-1)**Rational(1, 3)*2**Rational(2, 3)*3**Rational(1, 3)/3 assert Rational(-3, 2)**Rational(-10, 3) == \ 8*(-1)**Rational(2, 3)*2**Rational(1, 3)*3**Rational(2, 3)/81 assert abs(Pow(Rational(-2, 3), Rational(-7, 4)).n() - Pow(Rational(-2, 3), Rational(-7, 4), evaluate=False).n()) < 1e-16 # negative integer power and negative rational base assert Rational(-2, 3) ** Rational(-2, 1) == Rational(9, 4) a = Rational(1, 10) assert a**Float(a, 2) == Float(a, 2)**Float(a, 2) assert Rational(-2, 3)**Symbol('', even=True) == \ Rational(2, 3)**Symbol('', even=True) def test_powers_Float(): assert str((S('-1/10')**S('3/10')).n()) == str(Float(-.1)**(.3)) def test_lshift_Integer(): assert Integer(0) << Integer(2) == Integer(0) assert Integer(0) << 2 == Integer(0) assert 0 << Integer(2) == Integer(0) assert Integer(0b11) << Integer(0) == Integer(0b11) assert Integer(0b11) << 0 == Integer(0b11) assert 0b11 << Integer(0) == Integer(0b11) assert Integer(0b11) << Integer(2) == Integer(0b11 << 2) assert Integer(0b11) << 2 == Integer(0b11 << 2) assert 0b11 << Integer(2) == Integer(0b11 << 2) assert Integer(-0b11) << Integer(2) == Integer(-0b11 << 2) assert Integer(-0b11) << 2 == Integer(-0b11 << 2) assert -0b11 << Integer(2) == Integer(-0b11 << 2) raises(TypeError, lambda: Integer(2) << 0.0) raises(TypeError, lambda: 0.0 << Integer(2)) raises(ValueError, lambda: Integer(1) << Integer(-1)) def test_rshift_Integer(): assert Integer(0) >> Integer(2) == Integer(0) assert Integer(0) >> 2 == Integer(0) assert 0 >> Integer(2) == Integer(0) assert Integer(0b11) >> Integer(0) == Integer(0b11) assert Integer(0b11) >> 0 == Integer(0b11) assert 0b11 >> Integer(0) == Integer(0b11) assert Integer(0b11) >> Integer(2) == Integer(0) assert Integer(0b11) >> 2 == Integer(0) assert 0b11 >> Integer(2) == Integer(0) assert Integer(-0b11) >> Integer(2) == Integer(-1) assert Integer(-0b11) >> 2 == Integer(-1) assert -0b11 >> Integer(2) == Integer(-1) assert Integer(0b1100) >> Integer(2) == Integer(0b1100 >> 2) assert Integer(0b1100) >> 2 == Integer(0b1100 >> 2) assert 0b1100 >> Integer(2) == Integer(0b1100 >> 2) assert Integer(-0b1100) >> Integer(2) == Integer(-0b1100 >> 2) assert Integer(-0b1100) >> 2 == Integer(-0b1100 >> 2) assert -0b1100 >> Integer(2) == Integer(-0b1100 >> 2) raises(TypeError, lambda: Integer(0b10) >> 0.0) raises(TypeError, lambda: 0.0 >> Integer(2)) raises(ValueError, lambda: Integer(1) >> Integer(-1)) def test_and_Integer(): assert Integer(0b01010101) & Integer(0b10101010) == Integer(0) assert Integer(0b01010101) & 0b10101010 == Integer(0) assert 0b01010101 & Integer(0b10101010) == Integer(0) assert Integer(0b01010101) & Integer(0b11011011) == Integer(0b01010001) assert Integer(0b01010101) & 0b11011011 == Integer(0b01010001) assert 0b01010101 & Integer(0b11011011) == Integer(0b01010001) assert -Integer(0b01010101) & Integer(0b11011011) == Integer(-0b01010101 & 0b11011011) assert Integer(-0b01010101) & 0b11011011 == Integer(-0b01010101 & 0b11011011) assert -0b01010101 & Integer(0b11011011) == Integer(-0b01010101 & 0b11011011) assert Integer(0b01010101) & -Integer(0b11011011) == Integer(0b01010101 & -0b11011011) assert Integer(0b01010101) & -0b11011011 == Integer(0b01010101 & -0b11011011) assert 0b01010101 & Integer(-0b11011011) == Integer(0b01010101 & -0b11011011) raises(TypeError, lambda: Integer(2) & 0.0) raises(TypeError, lambda: 0.0 & Integer(2)) def test_xor_Integer(): assert Integer(0b01010101) ^ Integer(0b11111111) == Integer(0b10101010) assert Integer(0b01010101) ^ 0b11111111 == Integer(0b10101010) assert 0b01010101 ^ Integer(0b11111111) == Integer(0b10101010) assert Integer(0b01010101) ^ Integer(0b11011011) == Integer(0b10001110) assert Integer(0b01010101) ^ 0b11011011 == Integer(0b10001110) assert 0b01010101 ^ Integer(0b11011011) == Integer(0b10001110) assert -Integer(0b01010101) ^ Integer(0b11011011) == Integer(-0b01010101 ^ 0b11011011) assert Integer(-0b01010101) ^ 0b11011011 == Integer(-0b01010101 ^ 0b11011011) assert -0b01010101 ^ Integer(0b11011011) == Integer(-0b01010101 ^ 0b11011011) assert Integer(0b01010101) ^ -Integer(0b11011011) == Integer(0b01010101 ^ -0b11011011) assert Integer(0b01010101) ^ -0b11011011 == Integer(0b01010101 ^ -0b11011011) assert 0b01010101 ^ Integer(-0b11011011) == Integer(0b01010101 ^ -0b11011011) raises(TypeError, lambda: Integer(2) ^ 0.0) raises(TypeError, lambda: 0.0 ^ Integer(2)) def test_or_Integer(): assert Integer(0b01010101) | Integer(0b10101010) == Integer(0b11111111) assert Integer(0b01010101) | 0b10101010 == Integer(0b11111111) assert 0b01010101 | Integer(0b10101010) == Integer(0b11111111) assert Integer(0b01010101) | Integer(0b11011011) == Integer(0b11011111) assert Integer(0b01010101) | 0b11011011 == Integer(0b11011111) assert 0b01010101 | Integer(0b11011011) == Integer(0b11011111) assert -Integer(0b01010101) | Integer(0b11011011) == Integer(-0b01010101 | 0b11011011) assert Integer(-0b01010101) | 0b11011011 == Integer(-0b01010101 | 0b11011011) assert -0b01010101 | Integer(0b11011011) == Integer(-0b01010101 | 0b11011011) assert Integer(0b01010101) | -Integer(0b11011011) == Integer(0b01010101 | -0b11011011) assert Integer(0b01010101) | -0b11011011 == Integer(0b01010101 | -0b11011011) assert 0b01010101 | Integer(-0b11011011) == Integer(0b01010101 | -0b11011011) raises(TypeError, lambda: Integer(2) | 0.0) raises(TypeError, lambda: 0.0 | Integer(2)) def test_invert_Integer(): assert ~Integer(0b01010101) == Integer(-0b01010110) assert ~Integer(0b01010101) == Integer(~0b01010101) assert ~(~Integer(0b01010101)) == Integer(0b01010101) def test_abs1(): assert Rational(1, 6) != Rational(-1, 6) assert abs(Rational(1, 6)) == abs(Rational(-1, 6)) def test_accept_int(): assert Float(4) == 4 def test_dont_accept_str(): assert Float("0.2") != "0.2" assert not (Float("0.2") == "0.2") def test_int(): a = Rational(5) assert int(a) == 5 a = Rational(9, 10) assert int(a) == int(-a) == 0 assert 1/(-1)**Rational(2, 3) == -(-1)**Rational(1, 3) # issue 10368 a = Rational(32442016954, 78058255275) assert type(int(a)) is type(int(-a)) is int def test_int_NumberSymbols(): assert int(Catalan) == 0 assert int(EulerGamma) == 0 assert int(pi) == 3 assert int(E) == 2 assert int(GoldenRatio) == 1 assert int(TribonacciConstant) == 1 for i in [Catalan, E, EulerGamma, GoldenRatio, TribonacciConstant, pi]: a, b = i.approximation_interval(Integer) ia = int(i) assert ia == a assert isinstance(ia, int) assert b == a + 1 assert a.is_Integer and b.is_Integer def test_real_bug(): x = Symbol("x") assert str(2.0*x*x) in ["(2.0*x)*x", "2.0*x**2", "2.00000000000000*x**2"] assert str(2.1*x*x) != "(2.0*x)*x" def test_bug_sqrt(): assert ((sqrt(Rational(2)) + 1)*(sqrt(Rational(2)) - 1)).expand() == 1 def test_pi_Pi(): "Test that pi (instance) is imported, but Pi (class) is not" from sympy import pi # noqa with raises(ImportError): from sympy import Pi # noqa def test_no_len(): # there should be no len for numbers raises(TypeError, lambda: len(Rational(2))) raises(TypeError, lambda: len(Rational(2, 3))) raises(TypeError, lambda: len(Integer(2))) def test_issue_3321(): assert sqrt(Rational(1, 5)) == Rational(1, 5)**S.Half assert 5 * sqrt(Rational(1, 5)) == sqrt(5) def test_issue_3692(): assert ((-1)**Rational(1, 6)).expand(complex=True) == I/2 + sqrt(3)/2 assert ((-5)**Rational(1, 6)).expand(complex=True) == \ 5**Rational(1, 6)*I/2 + 5**Rational(1, 6)*sqrt(3)/2 assert ((-64)**Rational(1, 6)).expand(complex=True) == I + sqrt(3) def test_issue_3423(): x = Symbol("x") assert sqrt(x - 1).as_base_exp() == (x - 1, S.Half) assert sqrt(x - 1) != I*sqrt(1 - x) def test_issue_3449(): x = Symbol("x") assert sqrt(x - 1).subs(x, 5) == 2 def test_issue_13890(): x = Symbol("x") e = (-x/4 - S.One/12)**x - 1 f = simplify(e) a = Rational(9, 5) assert abs(e.subs(x,a).evalf() - f.subs(x,a).evalf()) < 1e-15 def test_Integer_factors(): def F(i): return Integer(i).factors() assert F(1) == {} assert F(2) == {2: 1} assert F(3) == {3: 1} assert F(4) == {2: 2} assert F(5) == {5: 1} assert F(6) == {2: 1, 3: 1} assert F(7) == {7: 1} assert F(8) == {2: 3} assert F(9) == {3: 2} assert F(10) == {2: 1, 5: 1} assert F(11) == {11: 1} assert F(12) == {2: 2, 3: 1} assert F(13) == {13: 1} assert F(14) == {2: 1, 7: 1} assert F(15) == {3: 1, 5: 1} assert F(16) == {2: 4} assert F(17) == {17: 1} assert F(18) == {2: 1, 3: 2} assert F(19) == {19: 1} assert F(20) == {2: 2, 5: 1} assert F(21) == {3: 1, 7: 1} assert F(22) == {2: 1, 11: 1} assert F(23) == {23: 1} assert F(24) == {2: 3, 3: 1} assert F(25) == {5: 2} assert F(26) == {2: 1, 13: 1} assert F(27) == {3: 3} assert F(28) == {2: 2, 7: 1} assert F(29) == {29: 1} assert F(30) == {2: 1, 3: 1, 5: 1} assert F(31) == {31: 1} assert F(32) == {2: 5} assert F(33) == {3: 1, 11: 1} assert F(34) == {2: 1, 17: 1} assert F(35) == {5: 1, 7: 1} assert F(36) == {2: 2, 3: 2} assert F(37) == {37: 1} assert F(38) == {2: 1, 19: 1} assert F(39) == {3: 1, 13: 1} assert F(40) == {2: 3, 5: 1} assert F(41) == {41: 1} assert F(42) == {2: 1, 3: 1, 7: 1} assert F(43) == {43: 1} assert F(44) == {2: 2, 11: 1} assert F(45) == {3: 2, 5: 1} assert F(46) == {2: 1, 23: 1} assert F(47) == {47: 1} assert F(48) == {2: 4, 3: 1} assert F(49) == {7: 2} assert F(50) == {2: 1, 5: 2} assert F(51) == {3: 1, 17: 1} def test_Rational_factors(): def F(p, q, visual=None): return Rational(p, q).factors(visual=visual) assert F(2, 3) == {2: 1, 3: -1} assert F(2, 9) == {2: 1, 3: -2} assert F(2, 15) == {2: 1, 3: -1, 5: -1} assert F(6, 10) == {3: 1, 5: -1} def test_issue_4107(): assert pi*(E + 10) + pi*(-E - 10) != 0 assert pi*(E + 10**10) + pi*(-E - 10**10) != 0 assert pi*(E + 10**20) + pi*(-E - 10**20) != 0 assert pi*(E + 10**80) + pi*(-E - 10**80) != 0 assert (pi*(E + 10) + pi*(-E - 10)).expand() == 0 assert (pi*(E + 10**10) + pi*(-E - 10**10)).expand() == 0 assert (pi*(E + 10**20) + pi*(-E - 10**20)).expand() == 0 assert (pi*(E + 10**80) + pi*(-E - 10**80)).expand() == 0 def test_IntegerInteger(): a = Integer(4) b = Integer(a) assert a == b def test_Rational_gcd_lcm_cofactors(): assert Integer(4).gcd(2) == Integer(2) assert Integer(4).lcm(2) == Integer(4) assert Integer(4).gcd(Integer(2)) == Integer(2) assert Integer(4).lcm(Integer(2)) == Integer(4) a, b = 720**99911, 480**12342 assert Integer(a).lcm(b) == a*b/Integer(a).gcd(b) assert Integer(4).gcd(3) == Integer(1) assert Integer(4).lcm(3) == Integer(12) assert Integer(4).gcd(Integer(3)) == Integer(1) assert Integer(4).lcm(Integer(3)) == Integer(12) assert Rational(4, 3).gcd(2) == Rational(2, 3) assert Rational(4, 3).lcm(2) == Integer(4) assert Rational(4, 3).gcd(Integer(2)) == Rational(2, 3) assert Rational(4, 3).lcm(Integer(2)) == Integer(4) assert Integer(4).gcd(Rational(2, 9)) == Rational(2, 9) assert Integer(4).lcm(Rational(2, 9)) == Integer(4) assert Rational(4, 3).gcd(Rational(2, 9)) == Rational(2, 9) assert Rational(4, 3).lcm(Rational(2, 9)) == Rational(4, 3) assert Rational(4, 5).gcd(Rational(2, 9)) == Rational(2, 45) assert Rational(4, 5).lcm(Rational(2, 9)) == Integer(4) assert Rational(5, 9).lcm(Rational(3, 7)) == Rational(Integer(5).lcm(3),Integer(9).gcd(7)) assert Integer(4).cofactors(2) == (Integer(2), Integer(2), Integer(1)) assert Integer(4).cofactors(Integer(2)) == \ (Integer(2), Integer(2), Integer(1)) assert Integer(4).gcd(Float(2.0)) == S.One assert Integer(4).lcm(Float(2.0)) == Float(8.0) assert Integer(4).cofactors(Float(2.0)) == (S.One, Integer(4), Float(2.0)) assert S.Half.gcd(Float(2.0)) == S.One assert S.Half.lcm(Float(2.0)) == Float(1.0) assert S.Half.cofactors(Float(2.0)) == \ (S.One, S.Half, Float(2.0)) def test_Float_gcd_lcm_cofactors(): assert Float(2.0).gcd(Integer(4)) == S.One assert Float(2.0).lcm(Integer(4)) == Float(8.0) assert Float(2.0).cofactors(Integer(4)) == (S.One, Float(2.0), Integer(4)) assert Float(2.0).gcd(S.Half) == S.One assert Float(2.0).lcm(S.Half) == Float(1.0) assert Float(2.0).cofactors(S.Half) == \ (S.One, Float(2.0), S.Half) def test_issue_4611(): assert abs(pi._evalf(50) - 3.14159265358979) < 1e-10 assert abs(E._evalf(50) - 2.71828182845905) < 1e-10 assert abs(Catalan._evalf(50) - 0.915965594177219) < 1e-10 assert abs(EulerGamma._evalf(50) - 0.577215664901533) < 1e-10 assert abs(GoldenRatio._evalf(50) - 1.61803398874989) < 1e-10 assert abs(TribonacciConstant._evalf(50) - 1.83928675521416) < 1e-10 x = Symbol("x") assert (pi + x).evalf() == pi.evalf() + x assert (E + x).evalf() == E.evalf() + x assert (Catalan + x).evalf() == Catalan.evalf() + x assert (EulerGamma + x).evalf() == EulerGamma.evalf() + x assert (GoldenRatio + x).evalf() == GoldenRatio.evalf() + x assert (TribonacciConstant + x).evalf() == TribonacciConstant.evalf() + x @conserve_mpmath_dps def test_conversion_to_mpmath(): assert mpmath.mpmathify(Integer(1)) == mpmath.mpf(1) assert mpmath.mpmathify(S.Half) == mpmath.mpf(0.5) assert mpmath.mpmathify(Float('1.23', 15)) == mpmath.mpf('1.23') assert mpmath.mpmathify(I) == mpmath.mpc(1j) assert mpmath.mpmathify(1 + 2*I) == mpmath.mpc(1 + 2j) assert mpmath.mpmathify(1.0 + 2*I) == mpmath.mpc(1 + 2j) assert mpmath.mpmathify(1 + 2.0*I) == mpmath.mpc(1 + 2j) assert mpmath.mpmathify(1.0 + 2.0*I) == mpmath.mpc(1 + 2j) assert mpmath.mpmathify(S.Half + S.Half*I) == mpmath.mpc(0.5 + 0.5j) assert mpmath.mpmathify(2*I) == mpmath.mpc(2j) assert mpmath.mpmathify(2.0*I) == mpmath.mpc(2j) assert mpmath.mpmathify(S.Half*I) == mpmath.mpc(0.5j) mpmath.mp.dps = 100 assert mpmath.mpmathify(pi.evalf(100) + pi.evalf(100)*I) == mpmath.pi + mpmath.pi*mpmath.j assert mpmath.mpmathify(pi.evalf(100)*I) == mpmath.pi*mpmath.j def test_relational(): # real x = S(.1) assert (x != cos) is True assert (x == cos) is False # rational x = Rational(1, 3) assert (x != cos) is True assert (x == cos) is False # integer defers to rational so these tests are omitted # number symbol x = pi assert (x != cos) is True assert (x == cos) is False def test_Integer_as_index(): assert 'hello'[Integer(2):] == 'llo' def test_Rational_int(): assert int( Rational(7, 5)) == 1 assert int( S.Half) == 0 assert int(Rational(-1, 2)) == 0 assert int(-Rational(7, 5)) == -1 def test_zoo(): b = Symbol('b', finite=True) nz = Symbol('nz', nonzero=True) p = Symbol('p', positive=True) n = Symbol('n', negative=True) im = Symbol('i', imaginary=True) c = Symbol('c', complex=True) pb = Symbol('pb', positive=True, finite=True) nb = Symbol('nb', negative=True, finite=True) imb = Symbol('ib', imaginary=True, finite=True) for i in [I, S.Infinity, S.NegativeInfinity, S.Zero, S.One, S.Pi, S.Half, S(3), log(3), b, nz, p, n, im, pb, nb, imb, c]: if i.is_finite and (i.is_real or i.is_imaginary): assert i + zoo is zoo assert i - zoo is zoo assert zoo + i is zoo assert zoo - i is zoo elif i.is_finite is not False: assert (i + zoo).is_Add assert (i - zoo).is_Add assert (zoo + i).is_Add assert (zoo - i).is_Add else: assert (i + zoo) is S.NaN assert (i - zoo) is S.NaN assert (zoo + i) is S.NaN assert (zoo - i) is S.NaN if fuzzy_not(i.is_zero) and (i.is_extended_real or i.is_imaginary): assert i*zoo is zoo assert zoo*i is zoo elif i.is_zero: assert i*zoo is S.NaN assert zoo*i is S.NaN else: assert (i*zoo).is_Mul assert (zoo*i).is_Mul if fuzzy_not((1/i).is_zero) and (i.is_real or i.is_imaginary): assert zoo/i is zoo elif (1/i).is_zero: assert zoo/i is S.NaN elif i.is_zero: assert zoo/i is zoo else: assert (zoo/i).is_Mul assert (I*oo).is_Mul # allow directed infinity assert zoo + zoo is S.NaN assert zoo * zoo is zoo assert zoo - zoo is S.NaN assert zoo/zoo is S.NaN assert zoo**zoo is S.NaN assert zoo**0 is S.One assert zoo**2 is zoo assert 1/zoo is S.Zero assert Mul.flatten([S.NegativeOne, oo, S(0)]) == ([S.NaN], [], None) def test_issue_4122(): x = Symbol('x', nonpositive=True) assert oo + x is oo x = Symbol('x', extended_nonpositive=True) assert (oo + x).is_Add x = Symbol('x', finite=True) assert (oo + x).is_Add # x could be imaginary x = Symbol('x', nonnegative=True) assert oo + x is oo x = Symbol('x', extended_nonnegative=True) assert oo + x is oo x = Symbol('x', finite=True, real=True) assert oo + x is oo # similarly for negative infinity x = Symbol('x', nonnegative=True) assert -oo + x is -oo x = Symbol('x', extended_nonnegative=True) assert (-oo + x).is_Add x = Symbol('x', finite=True) assert (-oo + x).is_Add x = Symbol('x', nonpositive=True) assert -oo + x is -oo x = Symbol('x', extended_nonpositive=True) assert -oo + x is -oo x = Symbol('x', finite=True, real=True) assert -oo + x is -oo def test_GoldenRatio_expand(): assert GoldenRatio.expand(func=True) == S.Half + sqrt(5)/2 def test_TribonacciConstant_expand(): assert TribonacciConstant.expand(func=True) == \ (1 + cbrt(19 - 3*sqrt(33)) + cbrt(19 + 3*sqrt(33))) / 3 def test_as_content_primitive(): assert S.Zero.as_content_primitive() == (1, 0) assert S.Half.as_content_primitive() == (S.Half, 1) assert (Rational(-1, 2)).as_content_primitive() == (S.Half, -1) assert S(3).as_content_primitive() == (3, 1) assert S(3.1).as_content_primitive() == (1, 3.1) def test_hashing_sympy_integers(): # Test for issue 5072 assert {Integer(3)} == {int(3)} assert hash(Integer(4)) == hash(int(4)) def test_rounding_issue_4172(): assert int((E**100).round()) == \ 26881171418161354484126255515800135873611119 assert int((pi**100).round()) == \ 51878483143196131920862615246303013562686760680406 assert int((Rational(1)/EulerGamma**100).round()) == \ 734833795660954410469466 @XFAIL def test_mpmath_issues(): from mpmath.libmp.libmpf import _normalize import mpmath.libmp as mlib rnd = mlib.round_nearest mpf = (0, int(0), -123, -1, 53, rnd) # nan assert _normalize(mpf, 53) != (0, int(0), 0, 0) mpf = (0, int(0), -456, -2, 53, rnd) # +inf assert _normalize(mpf, 53) != (0, int(0), 0, 0) mpf = (1, int(0), -789, -3, 53, rnd) # -inf assert _normalize(mpf, 53) != (0, int(0), 0, 0) from mpmath.libmp.libmpf import fnan assert mlib.mpf_eq(fnan, fnan) def test_Catalan_EulerGamma_prec(): n = GoldenRatio f = Float(n.n(), 5) assert f._mpf_ == (0, int(212079), -17, 18) assert f._prec == 20 assert n._as_mpf_val(20) == f._mpf_ n = EulerGamma f = Float(n.n(), 5) assert f._mpf_ == (0, int(302627), -19, 19) assert f._prec == 20 assert n._as_mpf_val(20) == f._mpf_ def test_Catalan_rewrite(): k = Dummy('k', integer=True, nonnegative=True) assert Catalan.rewrite(Sum).dummy_eq( Sum((-1)**k/(2*k + 1)**2, (k, 0, oo))) assert Catalan.rewrite() == Catalan def test_bool_eq(): assert 0 == False assert S(0) == False assert S(0) != S.false assert 1 == True assert S.One == True assert S.One != S.true def test_Float_eq(): # all .5 values are the same assert Float(.5, 10) == Float(.5, 11) == Float(.5, 1) # but floats that aren't exact in base-2 still # don't compare the same because they have different # underlying mpf values assert Float(.12, 3) != Float(.12, 4) assert Float(.12, 3) != .12 assert 0.12 != Float(.12, 3) assert Float('.12', 22) != .12 # issue 11707 # but Float/Rational -- except for 0 -- # are exact so Rational(x) = Float(y) only if # Rational(x) == Rational(Float(y)) assert Float('1.1') != Rational(11, 10) assert Rational(11, 10) != Float('1.1') # coverage assert not Float(3) == 2 assert not Float(2**2) == S.Half assert Float(2**2) == 4 assert not Float(2**-2) == 1 assert Float(2**-1) == S.Half assert not Float(2*3) == 3 assert not Float(2*3) == S.Half assert Float(2*3) == 6 assert not Float(2*3) == 8 assert Float(.75) == Rational(3, 4) assert Float(5/18) == 5/18 # 4473 assert Float(2.) != 3 assert Float((0,1,-3)) == S.One/8 assert Float((0,1,-3)) != S.One/9 # 16196 assert 2 == Float(2) # as per Python # but in a computation... assert t**2 != t**2.0 def test_issue_6640(): from mpmath.libmp.libmpf import finf, fninf # fnan is not included because Float no longer returns fnan, # but otherwise, the same sort of test could apply assert Float(finf).is_zero is False assert Float(fninf).is_zero is False assert bool(Float(0)) is False def test_issue_6349(): assert Float('23.e3', '')._prec == 10 assert Float('23e3', '')._prec == 20 assert Float('23000', '')._prec == 20 assert Float('-23000', '')._prec == 20 def test_mpf_norm(): assert mpf_norm((1, 0, 1, 0), 10) == mpf('0')._mpf_ assert Float._new((1, 0, 1, 0), 10)._mpf_ == mpf('0')._mpf_ def test_latex(): assert latex(pi) == r"\pi" assert latex(E) == r"e" assert latex(GoldenRatio) == r"\phi" assert latex(TribonacciConstant) == r"\text{TribonacciConstant}" assert latex(EulerGamma) == r"\gamma" assert latex(oo) == r"\infty" assert latex(-oo) == r"-\infty" assert latex(zoo) == r"\tilde{\infty}" assert latex(nan) == r"\text{NaN}" assert latex(I) == r"i" def test_issue_7742(): assert -oo % 1 is nan def test_simplify_AlgebraicNumber(): A = AlgebraicNumber e = 3**(S.One/6)*(3 + (135 + 78*sqrt(3))**Rational(2, 3))/(45 + 26*sqrt(3))**(S.One/3) assert simplify(A(e)) == A(12) # wester test_C20 e = (41 + 29*sqrt(2))**(S.One/5) assert simplify(A(e)) == A(1 + sqrt(2)) # wester test_C21 e = (3 + 4*I)**Rational(3, 2) assert simplify(A(e)) == A(2 + 11*I) # issue 4401 def test_Float_idempotence(): x = Float('1.23', '') y = Float(x) z = Float(x, 15) assert same_and_same_prec(y, x) assert not same_and_same_prec(z, x) x = Float(10**20) y = Float(x) z = Float(x, 15) assert same_and_same_prec(y, x) assert not same_and_same_prec(z, x) def test_comp1(): # sqrt(2) = 1.414213 5623730950... a = sqrt(2).n(7) assert comp(a, 1.4142129) is False assert comp(a, 1.4142130) # ... assert comp(a, 1.4142141) assert comp(a, 1.4142142) is False assert comp(sqrt(2).n(2), '1.4') assert comp(sqrt(2).n(2), Float(1.4, 2), '') assert comp(sqrt(2).n(2), 1.4, '') assert comp(sqrt(2).n(2), Float(1.4, 3), '') is False assert comp(sqrt(2) + sqrt(3)*I, 1.4 + 1.7*I, .1) assert not comp(sqrt(2) + sqrt(3)*I, (1.5 + 1.7*I)*0.89, .1) assert comp(sqrt(2) + sqrt(3)*I, (1.5 + 1.7*I)*0.90, .1) assert comp(sqrt(2) + sqrt(3)*I, (1.5 + 1.7*I)*1.07, .1) assert not comp(sqrt(2) + sqrt(3)*I, (1.5 + 1.7*I)*1.08, .1) assert [(i, j) for i in range(130, 150) for j in range(170, 180) if comp((sqrt(2)+ I*sqrt(3)).n(3), i/100. + I*j/100.)] == [ (141, 173), (142, 173)] raises(ValueError, lambda: comp(t, '1')) raises(ValueError, lambda: comp(t, 1)) assert comp(0, 0.0) assert comp(.5, S.Half) assert comp(2 + sqrt(2), 2.0 + sqrt(2)) assert not comp(0, 1) assert not comp(2, sqrt(2)) assert not comp(2 + I, 2.0 + sqrt(2)) assert not comp(2.0 + sqrt(2), 2 + I) assert not comp(2.0 + sqrt(2), sqrt(3)) assert comp(1/pi.n(4), 0.3183, 1e-5) assert not comp(1/pi.n(4), 0.3183, 8e-6) def test_issue_9491(): assert oo**zoo is nan def test_issue_10063(): assert 2**Float(3) == Float(8) def test_issue_10020(): assert oo**I is S.NaN assert oo**(1 + I) is S.ComplexInfinity assert oo**(-1 + I) is S.Zero assert (-oo)**I is S.NaN assert (-oo)**(-1 + I) is S.Zero assert oo**t == Pow(oo, t, evaluate=False) assert (-oo)**t == Pow(-oo, t, evaluate=False) def test_invert_numbers(): assert S(2).invert(5) == 3 assert S(2).invert(Rational(5, 2)) == S.Half assert S(2).invert(5.) == 0.5 assert S(2).invert(S(5)) == 3 assert S(2.).invert(5) == 0.5 assert S(sqrt(2)).invert(5) == 1/sqrt(2) assert S(sqrt(2)).invert(sqrt(3)) == 1/sqrt(2) def test_mod_inverse(): assert mod_inverse(3, 11) == 4 assert mod_inverse(5, 11) == 9 assert mod_inverse(21124921, 521512) == 7713 assert mod_inverse(124215421, 5125) == 2981 assert mod_inverse(214, 12515) == 1579 assert mod_inverse(5823991, 3299) == 1442 assert mod_inverse(123, 44) == 39 assert mod_inverse(2, 5) == 3 assert mod_inverse(-2, 5) == 2 assert mod_inverse(2, -5) == -2 assert mod_inverse(-2, -5) == -3 assert mod_inverse(-3, -7) == -5 x = Symbol('x') assert S(2).invert(x) == S.Half raises(TypeError, lambda: mod_inverse(2, x)) raises(ValueError, lambda: mod_inverse(2, S.Half)) raises(ValueError, lambda: mod_inverse(2, cos(1)**2 + sin(1)**2)) def test_golden_ratio_rewrite_as_sqrt(): assert GoldenRatio.rewrite(sqrt) == S.Half + sqrt(5)*S.Half def test_tribonacci_constant_rewrite_as_sqrt(): assert TribonacciConstant.rewrite(sqrt) == \ (1 + cbrt(19 - 3*sqrt(33)) + cbrt(19 + 3*sqrt(33))) / 3 def test_comparisons_with_unknown_type(): class Foo: """ Class that is unaware of Basic, and relies on both classes returning the NotImplemented singleton for equivalence to evaluate to False. """ ni, nf, nr = Integer(3), Float(1.0), Rational(1, 3) foo = Foo() for n in ni, nf, nr, oo, -oo, zoo, nan: assert n != foo assert foo != n assert not n == foo assert not foo == n raises(TypeError, lambda: n < foo) raises(TypeError, lambda: foo > n) raises(TypeError, lambda: n > foo) raises(TypeError, lambda: foo < n) raises(TypeError, lambda: n <= foo) raises(TypeError, lambda: foo >= n) raises(TypeError, lambda: n >= foo) raises(TypeError, lambda: foo <= n) class Bar: """ Class that considers itself equal to any instance of Number except infinities and nans, and relies on SymPy types returning the NotImplemented singleton for symmetric equality relations. """ def __eq__(self, other): if other in (oo, -oo, zoo, nan): return False if isinstance(other, Number): return True return NotImplemented def __ne__(self, other): return not self == other bar = Bar() for n in ni, nf, nr: assert n == bar assert bar == n assert not n != bar assert not bar != n for n in oo, -oo, zoo, nan: assert n != bar assert bar != n assert not n == bar assert not bar == n for n in ni, nf, nr, oo, -oo, zoo, nan: raises(TypeError, lambda: n < bar) raises(TypeError, lambda: bar > n) raises(TypeError, lambda: n > bar) raises(TypeError, lambda: bar < n) raises(TypeError, lambda: n <= bar) raises(TypeError, lambda: bar >= n) raises(TypeError, lambda: n >= bar) raises(TypeError, lambda: bar <= n) def test_NumberSymbol_comparison(): from sympy.core.tests.test_relational import rel_check rpi = Rational('905502432259640373/288230376151711744') fpi = Float(float(pi)) assert rel_check(rpi, fpi) def test_Integer_precision(): # Make sure Integer inputs for keyword args work assert Float('1.0', dps=Integer(15))._prec == 53 assert Float('1.0', precision=Integer(15))._prec == 15 assert type(Float('1.0', precision=Integer(15))._prec) == int assert sympify(srepr(Float('1.0', precision=15))) == Float('1.0', precision=15) def test_numpy_to_float(): from sympy.testing.pytest import skip from sympy.external import import_module np = import_module('numpy') if not np: skip('numpy not installed. Abort numpy tests.') def check_prec_and_relerr(npval, ratval): prec = np.finfo(npval).nmant + 1 x = Float(npval) assert x._prec == prec y = Float(ratval, precision=prec) assert abs((x - y)/y) < 2**(-(prec + 1)) check_prec_and_relerr(np.float16(2.0/3), Rational(2, 3)) check_prec_and_relerr(np.float32(2.0/3), Rational(2, 3)) check_prec_and_relerr(np.float64(2.0/3), Rational(2, 3)) # extended precision, on some arch/compilers: x = np.longdouble(2)/3 check_prec_and_relerr(x, Rational(2, 3)) y = Float(x, precision=10) assert same_and_same_prec(y, Float(Rational(2, 3), precision=10)) raises(TypeError, lambda: Float(np.complex64(1+2j))) raises(TypeError, lambda: Float(np.complex128(1+2j))) def test_Integer_ceiling_floor(): a = Integer(4) assert a.floor() == a assert a.ceiling() == a def test_ComplexInfinity(): assert zoo.floor() is zoo assert zoo.ceiling() is zoo assert zoo**zoo is S.NaN def test_Infinity_floor_ceiling_power(): assert oo.floor() is oo assert oo.ceiling() is oo assert oo**S.NaN is S.NaN assert oo**zoo is S.NaN def test_One_power(): assert S.One**12 is S.One assert S.NegativeOne**S.NaN is S.NaN def test_NegativeInfinity(): assert (-oo).floor() is -oo assert (-oo).ceiling() is -oo assert (-oo)**11 is -oo assert (-oo)**12 is oo def test_issue_6133(): raises(TypeError, lambda: (-oo < None)) raises(TypeError, lambda: (S(-2) < None)) raises(TypeError, lambda: (oo < None)) raises(TypeError, lambda: (oo > None)) raises(TypeError, lambda: (S(2) < None)) def test_abc(): x = numbers.Float(5) assert(isinstance(x, nums.Number)) assert(isinstance(x, numbers.Number)) assert(isinstance(x, nums.Real)) y = numbers.Rational(1, 3) assert(isinstance(y, nums.Number)) assert(y.numerator == 1) assert(y.denominator == 3) assert(isinstance(y, nums.Rational)) z = numbers.Integer(3) assert(isinstance(z, nums.Number)) assert(isinstance(z, numbers.Number)) assert(isinstance(z, nums.Rational)) assert(isinstance(z, numbers.Rational)) assert(isinstance(z, nums.Integral)) def test_floordiv(): assert S(2)//S.Half == 4 def test_negation(): assert -S.Zero is S.Zero assert -Float(0) is not S.Zero and -Float(0) == 0
85ec4ffb4ab69cdf61fddca128b0aebea15780b0bd7bf1eba278bc2dd6f5e8aa
from sympy.core.function import (Function, FunctionClass) from sympy.core.symbol import (Symbol, var) from sympy.testing.pytest import raises def test_var(): ns = {"var": var, "raises": raises} eval("var('a')", ns) assert ns["a"] == Symbol("a") eval("var('b bb cc zz _x')", ns) assert ns["b"] == Symbol("b") assert ns["bb"] == Symbol("bb") assert ns["cc"] == Symbol("cc") assert ns["zz"] == Symbol("zz") assert ns["_x"] == Symbol("_x") v = eval("var(['d', 'e', 'fg'])", ns) assert ns['d'] == Symbol('d') assert ns['e'] == Symbol('e') assert ns['fg'] == Symbol('fg') # check return value assert v != ['d', 'e', 'fg'] assert v == [Symbol('d'), Symbol('e'), Symbol('fg')] def test_var_return(): ns = {"var": var, "raises": raises} "raises(ValueError, lambda: var(''))" v2 = eval("var('q')", ns) v3 = eval("var('q p')", ns) assert v2 == Symbol('q') assert v3 == (Symbol('q'), Symbol('p')) def test_var_accepts_comma(): ns = {"var": var} v1 = eval("var('x y z')", ns) v2 = eval("var('x,y,z')", ns) v3 = eval("var('x,y z')", ns) assert v1 == v2 assert v1 == v3 def test_var_keywords(): ns = {"var": var} eval("var('x y', real=True)", ns) assert ns['x'].is_real and ns['y'].is_real def test_var_cls(): ns = {"var": var, "Function": Function} eval("var('f', cls=Function)", ns) assert isinstance(ns['f'], FunctionClass) eval("var('g,h', cls=Function)", ns) assert isinstance(ns['g'], FunctionClass) assert isinstance(ns['h'], FunctionClass)
23d668d5554af61aeb2559735ce3ff5fdd4c33977fc5c35816c5babd16bf6262
from sympy.concrete.summations import Sum from sympy.core.basic import Basic, _aresame from sympy.core.cache import clear_cache from sympy.core.containers import Dict, Tuple from sympy.core.expr import Expr, unchanged from sympy.core.function import (Subs, Function, diff, Lambda, expand, nfloat, Derivative) from sympy.core.numbers import E, Float, zoo, Rational, pi, I, oo, nan from sympy.core.power import Pow from sympy.core.relational import Eq from sympy.core.singleton import S from sympy.core.symbol import symbols, Dummy, Symbol from sympy.functions.elementary.complexes import im, re from sympy.functions.elementary.exponential import log, exp from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric import sin, cos, acos from sympy.functions.special.error_functions import expint from sympy.functions.special.gamma_functions import loggamma, polygamma from sympy.matrices.dense import Matrix from sympy.printing.str import sstr from sympy.series.order import O from sympy.tensor.indexed import Indexed from sympy.core.function import (PoleError, _mexpand, arity, BadSignatureError, BadArgumentsError) from sympy.core.parameters import _exp_is_pow from sympy.core.sympify import sympify from sympy.matrices import MutableMatrix, ImmutableMatrix from sympy.sets.sets import FiniteSet from sympy.solvers.solveset import solveset from sympy.tensor.array import NDimArray from sympy.utilities.iterables import subsets, variations from sympy.testing.pytest import XFAIL, raises, warns_deprecated_sympy, _both_exp_pow from sympy.abc import t, w, x, y, z f, g, h = symbols('f g h', cls=Function) _xi_1, _xi_2, _xi_3 = [Dummy() for i in range(3)] def test_f_expand_complex(): x = Symbol('x', real=True) assert f(x).expand(complex=True) == I*im(f(x)) + re(f(x)) assert exp(x).expand(complex=True) == exp(x) assert exp(I*x).expand(complex=True) == cos(x) + I*sin(x) assert exp(z).expand(complex=True) == cos(im(z))*exp(re(z)) + \ I*sin(im(z))*exp(re(z)) def test_bug1(): e = sqrt(-log(w)) assert e.subs(log(w), -x) == sqrt(x) e = sqrt(-5*log(w)) assert e.subs(log(w), -x) == sqrt(5*x) def test_general_function(): nu = Function('nu') e = nu(x) edx = e.diff(x) edy = e.diff(y) edxdx = e.diff(x).diff(x) edxdy = e.diff(x).diff(y) assert e == nu(x) assert edx != nu(x) assert edx == diff(nu(x), x) assert edy == 0 assert edxdx == diff(diff(nu(x), x), x) assert edxdy == 0 def test_general_function_nullary(): nu = Function('nu') e = nu() edx = e.diff(x) edxdx = e.diff(x).diff(x) assert e == nu() assert edx != nu() assert edx == 0 assert edxdx == 0 def test_derivative_subs_bug(): e = diff(g(x), x) assert e.subs(g(x), f(x)) != e assert e.subs(g(x), f(x)) == Derivative(f(x), x) assert e.subs(g(x), -f(x)) == Derivative(-f(x), x) assert e.subs(x, y) == Derivative(g(y), y) def test_derivative_subs_self_bug(): d = diff(f(x), x) assert d.subs(d, y) == y def test_derivative_linearity(): assert diff(-f(x), x) == -diff(f(x), x) assert diff(8*f(x), x) == 8*diff(f(x), x) assert diff(8*f(x), x) != 7*diff(f(x), x) assert diff(8*f(x)*x, x) == 8*f(x) + 8*x*diff(f(x), x) assert diff(8*f(x)*y*x, x).expand() == 8*y*f(x) + 8*y*x*diff(f(x), x) def test_derivative_evaluate(): assert Derivative(sin(x), x) != diff(sin(x), x) assert Derivative(sin(x), x).doit() == diff(sin(x), x) assert Derivative(Derivative(f(x), x), x) == diff(f(x), x, x) assert Derivative(sin(x), x, 0) == sin(x) assert Derivative(sin(x), (x, y), (x, -y)) == sin(x) def test_diff_symbols(): assert diff(f(x, y, z), x, y, z) == Derivative(f(x, y, z), x, y, z) assert diff(f(x, y, z), x, x, x) == Derivative(f(x, y, z), x, x, x) == Derivative(f(x, y, z), (x, 3)) assert diff(f(x, y, z), x, 3) == Derivative(f(x, y, z), x, 3) # issue 5028 assert [diff(-z + x/y, sym) for sym in (z, x, y)] == [-1, 1/y, -x/y**2] assert diff(f(x, y, z), x, y, z, 2) == Derivative(f(x, y, z), x, y, z, z) assert diff(f(x, y, z), x, y, z, 2, evaluate=False) == \ Derivative(f(x, y, z), x, y, z, z) assert Derivative(f(x, y, z), x, y, z)._eval_derivative(z) == \ Derivative(f(x, y, z), x, y, z, z) assert Derivative(Derivative(f(x, y, z), x), y)._eval_derivative(z) == \ Derivative(f(x, y, z), x, y, z) raises(TypeError, lambda: cos(x).diff((x, y)).variables) assert cos(x).diff((x, y))._wrt_variables == [x] def test_Function(): class myfunc(Function): @classmethod def eval(cls): # zero args return assert myfunc.nargs == FiniteSet(0) assert myfunc().nargs == FiniteSet(0) raises(TypeError, lambda: myfunc(x).nargs) class myfunc(Function): @classmethod def eval(cls, x): # one arg return assert myfunc.nargs == FiniteSet(1) assert myfunc(x).nargs == FiniteSet(1) raises(TypeError, lambda: myfunc(x, y).nargs) class myfunc(Function): @classmethod def eval(cls, *x): # star args return assert myfunc.nargs == S.Naturals0 assert myfunc(x).nargs == S.Naturals0 def test_nargs(): f = Function('f') assert f.nargs == S.Naturals0 assert f(1).nargs == S.Naturals0 assert Function('f', nargs=2)(1, 2).nargs == FiniteSet(2) assert sin.nargs == FiniteSet(1) assert sin(2).nargs == FiniteSet(1) assert log.nargs == FiniteSet(1, 2) assert log(2).nargs == FiniteSet(1, 2) assert Function('f', nargs=2).nargs == FiniteSet(2) assert Function('f', nargs=0).nargs == FiniteSet(0) assert Function('f', nargs=(0, 1)).nargs == FiniteSet(0, 1) assert Function('f', nargs=None).nargs == S.Naturals0 raises(ValueError, lambda: Function('f', nargs=())) def test_nargs_inheritance(): class f1(Function): nargs = 2 class f2(f1): pass class f3(f2): pass class f4(f3): nargs = 1,2 class f5(f4): pass class f6(f5): pass class f7(f6): nargs=None class f8(f7): pass class f9(f8): pass class f10(f9): nargs = 1 class f11(f10): pass assert f1.nargs == FiniteSet(2) assert f2.nargs == FiniteSet(2) assert f3.nargs == FiniteSet(2) assert f4.nargs == FiniteSet(1, 2) assert f5.nargs == FiniteSet(1, 2) assert f6.nargs == FiniteSet(1, 2) assert f7.nargs == S.Naturals0 assert f8.nargs == S.Naturals0 assert f9.nargs == S.Naturals0 assert f10.nargs == FiniteSet(1) assert f11.nargs == FiniteSet(1) def test_arity(): f = lambda x, y: 1 assert arity(f) == 2 def f(x, y, z=None): pass assert arity(f) == (2, 3) assert arity(lambda *x: x) is None assert arity(log) == (1, 2) def test_Lambda(): e = Lambda(x, x**2) assert e(4) == 16 assert e(x) == x**2 assert e(y) == y**2 assert Lambda((), 42)() == 42 assert unchanged(Lambda, (), 42) assert Lambda((), 42) != Lambda((), 43) assert Lambda((), f(x))() == f(x) assert Lambda((), 42).nargs == FiniteSet(0) assert unchanged(Lambda, (x,), x**2) assert Lambda(x, x**2) == Lambda((x,), x**2) assert Lambda(x, x**2) != Lambda(x, x**2 + 1) assert Lambda((x, y), x**y) != Lambda((y, x), y**x) assert Lambda((x, y), x**y) != Lambda((x, y), y**x) assert Lambda((x, y), x**y)(x, y) == x**y assert Lambda((x, y), x**y)(3, 3) == 3**3 assert Lambda((x, y), x**y)(x, 3) == x**3 assert Lambda((x, y), x**y)(3, y) == 3**y assert Lambda(x, f(x))(x) == f(x) assert Lambda(x, x**2)(e(x)) == x**4 assert e(e(x)) == x**4 x1, x2 = (Indexed('x', i) for i in (1, 2)) assert Lambda((x1, x2), x1 + x2)(x, y) == x + y assert Lambda((x, y), x + y).nargs == FiniteSet(2) p = x, y, z, t assert Lambda(p, t*(x + y + z))(*p) == t * (x + y + z) eq = Lambda(x, 2*x) + Lambda(y, 2*y) assert eq != 2*Lambda(x, 2*x) assert eq.as_dummy() == 2*Lambda(x, 2*x).as_dummy() assert Lambda(x, 2*x) not in [ Lambda(x, x) ] raises(BadSignatureError, lambda: Lambda(1, x)) assert Lambda(x, 1)(1) is S.One raises(BadSignatureError, lambda: Lambda((x, x), x + 2)) raises(BadSignatureError, lambda: Lambda(((x, x), y), x)) raises(BadSignatureError, lambda: Lambda(((y, x), x), x)) raises(BadSignatureError, lambda: Lambda(((y, 1), 2), x)) with warns_deprecated_sympy(): assert Lambda([x, y], x+y) == Lambda((x, y), x+y) flam = Lambda(((x, y),), x + y) assert flam((2, 3)) == 5 flam = Lambda(((x, y), z), x + y + z) assert flam((2, 3), 1) == 6 flam = Lambda((((x, y), z),), x + y + z) assert flam(((2, 3), 1)) == 6 raises(BadArgumentsError, lambda: flam(1, 2, 3)) flam = Lambda( (x,), (x, x)) assert flam(1,) == (1, 1) assert flam((1,)) == ((1,), (1,)) flam = Lambda( ((x,),), (x, x)) raises(BadArgumentsError, lambda: flam(1)) assert flam((1,)) == (1, 1) # Previously TypeError was raised so this is potentially needed for # backwards compatibility. assert issubclass(BadSignatureError, TypeError) assert issubclass(BadArgumentsError, TypeError) # These are tested to see they don't raise: hash(Lambda(x, 2*x)) hash(Lambda(x, x)) # IdentityFunction subclass def test_IdentityFunction(): assert Lambda(x, x) is Lambda(y, y) is S.IdentityFunction assert Lambda(x, 2*x) is not S.IdentityFunction assert Lambda((x, y), x) is not S.IdentityFunction def test_Lambda_symbols(): assert Lambda(x, 2*x).free_symbols == set() assert Lambda(x, x*y).free_symbols == {y} assert Lambda((), 42).free_symbols == set() assert Lambda((), x*y).free_symbols == {x,y} def test_functionclas_symbols(): assert f.free_symbols == set() def test_Lambda_arguments(): raises(TypeError, lambda: Lambda(x, 2*x)(x, y)) raises(TypeError, lambda: Lambda((x, y), x + y)(x)) raises(TypeError, lambda: Lambda((), 42)(x)) def test_Lambda_equality(): assert Lambda((x, y), 2*x) == Lambda((x, y), 2*x) # these, of course, should never be equal assert Lambda(x, 2*x) != Lambda((x, y), 2*x) assert Lambda(x, 2*x) != 2*x # But it is tempting to want expressions that differ only # in bound symbols to compare the same. But this is not what # Python's `==` is intended to do; two objects that compare # as equal means that they are indistibguishable and cache to the # same value. We wouldn't want to expression that are # mathematically the same but written in different variables to be # interchanged else what is the point of allowing for different # variable names? assert Lambda(x, 2*x) != Lambda(y, 2*y) def test_Subs(): assert Subs(1, (), ()) is S.One # check null subs influence on hashing assert Subs(x, y, z) != Subs(x, y, 1) # neutral subs works assert Subs(x, x, 1).subs(x, y).has(y) # self mapping var/point assert Subs(Derivative(f(x), (x, 2)), x, x).doit() == f(x).diff(x, x) assert Subs(x, x, 0).has(x) # it's a structural answer assert not Subs(x, x, 0).free_symbols assert Subs(Subs(x + y, x, 2), y, 1) == Subs(x + y, (x, y), (2, 1)) assert Subs(x, (x,), (0,)) == Subs(x, x, 0) assert Subs(x, x, 0) == Subs(y, y, 0) assert Subs(x, x, 0).subs(x, 1) == Subs(x, x, 0) assert Subs(y, x, 0).subs(y, 1) == Subs(1, x, 0) assert Subs(f(x), x, 0).doit() == f(0) assert Subs(f(x**2), x**2, 0).doit() == f(0) assert Subs(f(x, y, z), (x, y, z), (0, 1, 1)) != \ Subs(f(x, y, z), (x, y, z), (0, 0, 1)) assert Subs(x, y, 2).subs(x, y).doit() == 2 assert Subs(f(x, y), (x, y, z), (0, 1, 1)) != \ Subs(f(x, y) + z, (x, y, z), (0, 1, 0)) assert Subs(f(x, y), (x, y), (0, 1)).doit() == f(0, 1) assert Subs(Subs(f(x, y), x, 0), y, 1).doit() == f(0, 1) raises(ValueError, lambda: Subs(f(x, y), (x, y), (0, 0, 1))) raises(ValueError, lambda: Subs(f(x, y), (x, x, y), (0, 0, 1))) assert len(Subs(f(x, y), (x, y), (0, 1)).variables) == 2 assert Subs(f(x, y), (x, y), (0, 1)).point == Tuple(0, 1) assert Subs(f(x), x, 0) == Subs(f(y), y, 0) assert Subs(f(x, y), (x, y), (0, 1)) == Subs(f(x, y), (y, x), (1, 0)) assert Subs(f(x)*y, (x, y), (0, 1)) == Subs(f(y)*x, (y, x), (0, 1)) assert Subs(f(x)*y, (x, y), (1, 1)) == Subs(f(y)*x, (x, y), (1, 1)) assert Subs(f(x), x, 0).subs(x, 1).doit() == f(0) assert Subs(f(x), x, y).subs(y, 0) == Subs(f(x), x, 0) assert Subs(y*f(x), x, y).subs(y, 2) == Subs(2*f(x), x, 2) assert (2 * Subs(f(x), x, 0)).subs(Subs(f(x), x, 0), y) == 2*y assert Subs(f(x), x, 0).free_symbols == set() assert Subs(f(x, y), x, z).free_symbols == {y, z} assert Subs(f(x).diff(x), x, 0).doit(), Subs(f(x).diff(x), x, 0) assert Subs(1 + f(x).diff(x), x, 0).doit(), 1 + Subs(f(x).diff(x), x, 0) assert Subs(y*f(x, y).diff(x), (x, y), (0, 2)).doit() == \ 2*Subs(Derivative(f(x, 2), x), x, 0) assert Subs(y**2*f(x), x, 0).diff(y) == 2*y*f(0) e = Subs(y**2*f(x), x, y) assert e.diff(y) == e.doit().diff(y) == y**2*Derivative(f(y), y) + 2*y*f(y) assert Subs(f(x), x, 0) + Subs(f(x), x, 0) == 2*Subs(f(x), x, 0) e1 = Subs(z*f(x), x, 1) e2 = Subs(z*f(y), y, 1) assert e1 + e2 == 2*e1 assert e1.__hash__() == e2.__hash__() assert Subs(z*f(x + 1), x, 1) not in [ e1, e2 ] assert Derivative(f(x), x).subs(x, g(x)) == Derivative(f(g(x)), g(x)) assert Derivative(f(x), x).subs(x, x + y) == Subs(Derivative(f(x), x), x, x + y) assert Subs(f(x)*cos(y) + z, (x, y), (0, pi/3)).n(2) == \ Subs(f(x)*cos(y) + z, (x, y), (0, pi/3)).evalf(2) == \ z + Rational('1/2').n(2)*f(0) assert f(x).diff(x).subs(x, 0).subs(x, y) == f(x).diff(x).subs(x, 0) assert (x*f(x).diff(x).subs(x, 0)).subs(x, y) == y*f(x).diff(x).subs(x, 0) assert Subs(Derivative(g(x)**2, g(x), x), g(x), exp(x) ).doit() == 2*exp(x) assert Subs(Derivative(g(x)**2, g(x), x), g(x), exp(x) ).doit(deep=False) == 2*Derivative(exp(x), x) assert Derivative(f(x, g(x)), x).doit() == Derivative( f(x, g(x)), g(x))*Derivative(g(x), x) + Subs(Derivative( f(y, g(x)), y), y, x) def test_doitdoit(): done = Derivative(f(x, g(x)), x, g(x)).doit() assert done == done.doit() @XFAIL def test_Subs2(): # this reflects a limitation of subs(), probably won't fix assert Subs(f(x), x**2, x).doit() == f(sqrt(x)) def test_expand_function(): assert expand(x + y) == x + y assert expand(x + y, complex=True) == I*im(x) + I*im(y) + re(x) + re(y) assert expand((x + y)**11, modulus=11) == x**11 + y**11 def test_function_comparable(): assert sin(x).is_comparable is False assert cos(x).is_comparable is False assert sin(Float('0.1')).is_comparable is True assert cos(Float('0.1')).is_comparable is True assert sin(E).is_comparable is True assert cos(E).is_comparable is True assert sin(Rational(1, 3)).is_comparable is True assert cos(Rational(1, 3)).is_comparable is True def test_function_comparable_infinities(): assert sin(oo).is_comparable is False assert sin(-oo).is_comparable is False assert sin(zoo).is_comparable is False assert sin(nan).is_comparable is False def test_deriv1(): # These all require derivatives evaluated at a point (issue 4719) to work. # See issue 4624 assert f(2*x).diff(x) == 2*Subs(Derivative(f(x), x), x, 2*x) assert (f(x)**3).diff(x) == 3*f(x)**2*f(x).diff(x) assert (f(2*x)**3).diff(x) == 6*f(2*x)**2*Subs( Derivative(f(x), x), x, 2*x) assert f(2 + x).diff(x) == Subs(Derivative(f(x), x), x, x + 2) assert f(2 + 3*x).diff(x) == 3*Subs( Derivative(f(x), x), x, 3*x + 2) assert f(3*sin(x)).diff(x) == 3*cos(x)*Subs( Derivative(f(x), x), x, 3*sin(x)) # See issue 8510 assert f(x, x + z).diff(x) == ( Subs(Derivative(f(y, x + z), y), y, x) + Subs(Derivative(f(x, y), y), y, x + z)) assert f(x, x**2).diff(x) == ( 2*x*Subs(Derivative(f(x, y), y), y, x**2) + Subs(Derivative(f(y, x**2), y), y, x)) # but Subs is not always necessary assert f(x, g(y)).diff(g(y)) == Derivative(f(x, g(y)), g(y)) def test_deriv2(): assert (x**3).diff(x) == 3*x**2 assert (x**3).diff(x, evaluate=False) != 3*x**2 assert (x**3).diff(x, evaluate=False) == Derivative(x**3, x) assert diff(x**3, x) == 3*x**2 assert diff(x**3, x, evaluate=False) != 3*x**2 assert diff(x**3, x, evaluate=False) == Derivative(x**3, x) def test_func_deriv(): assert f(x).diff(x) == Derivative(f(x), x) # issue 4534 assert f(x, y).diff(x, y) - f(x, y).diff(y, x) == 0 assert Derivative(f(x, y), x, y).args[1:] == ((x, 1), (y, 1)) assert Derivative(f(x, y), y, x).args[1:] == ((y, 1), (x, 1)) assert (Derivative(f(x, y), x, y) - Derivative(f(x, y), y, x)).doit() == 0 def test_suppressed_evaluation(): a = sin(0, evaluate=False) assert a != 0 assert a.func is sin assert a.args == (0,) def test_function_evalf(): def eq(a, b, eps): return abs(a - b) < eps assert eq(sin(1).evalf(15), Float("0.841470984807897"), 1e-13) assert eq( sin(2).evalf(25), Float("0.9092974268256816953960199", 25), 1e-23) assert eq(sin(1 + I).evalf( 15), Float("1.29845758141598") + Float("0.634963914784736")*I, 1e-13) assert eq(exp(1 + I).evalf(15), Float( "1.46869393991588") + Float("2.28735528717884239")*I, 1e-13) assert eq(exp(-0.5 + 1.5*I).evalf(15), Float( "0.0429042815937374") + Float("0.605011292285002")*I, 1e-13) assert eq(log(pi + sqrt(2)*I).evalf( 15), Float("1.23699044022052") + Float("0.422985442737893")*I, 1e-13) assert eq(cos(100).evalf(15), Float("0.86231887228768"), 1e-13) def test_extensibility_eval(): class MyFunc(Function): @classmethod def eval(cls, *args): return (0, 0, 0) assert MyFunc(0) == (0, 0, 0) @_both_exp_pow def test_function_non_commutative(): x = Symbol('x', commutative=False) assert f(x).is_commutative is False assert sin(x).is_commutative is False assert exp(x).is_commutative is False assert log(x).is_commutative is False assert f(x).is_complex is False assert sin(x).is_complex is False assert exp(x).is_complex is False assert log(x).is_complex is False def test_function_complex(): x = Symbol('x', complex=True) xzf = Symbol('x', complex=True, zero=False) assert f(x).is_commutative is True assert sin(x).is_commutative is True assert exp(x).is_commutative is True assert log(x).is_commutative is True assert f(x).is_complex is None assert sin(x).is_complex is True assert exp(x).is_complex is True assert log(x).is_complex is None assert log(xzf).is_complex is True def test_function__eval_nseries(): n = Symbol('n') assert sin(x)._eval_nseries(x, 2, None) == x + O(x**2) assert sin(x + 1)._eval_nseries(x, 2, None) == x*cos(1) + sin(1) + O(x**2) assert sin(pi*(1 - x))._eval_nseries(x, 2, None) == pi*x + O(x**2) assert acos(1 - x**2)._eval_nseries(x, 2, None) == sqrt(2)*sqrt(x**2) + O(x**2) assert polygamma(n, x + 1)._eval_nseries(x, 2, None) == \ polygamma(n, 1) + polygamma(n + 1, 1)*x + O(x**2) raises(PoleError, lambda: sin(1/x)._eval_nseries(x, 2, None)) assert acos(1 - x)._eval_nseries(x, 2, None) == sqrt(2)*sqrt(x) + sqrt(2)*x**(S(3)/2)/12 + O(x**2) assert acos(1 + x)._eval_nseries(x, 2, None) == sqrt(2)*sqrt(-x) + sqrt(2)*(-x)**(S(3)/2)/12 + O(x**2) assert loggamma(1/x)._eval_nseries(x, 0, None) == \ log(x)/2 - log(x)/x - 1/x + O(1, x) assert loggamma(log(1/x)).nseries(x, n=1, logx=y) == loggamma(-y) # issue 6725: assert expint(Rational(3, 2), -x)._eval_nseries(x, 5, None) == \ 2 - 2*sqrt(pi)*sqrt(-x) - 2*x + x**2 + x**3/3 + x**4/12 + 4*I*x**(S(3)/2)*sqrt(-x)/3 + \ 2*I*x**(S(5)/2)*sqrt(-x)/5 + 2*I*x**(S(7)/2)*sqrt(-x)/21 + O(x**5) assert sin(sqrt(x))._eval_nseries(x, 3, None) == \ sqrt(x) - x**Rational(3, 2)/6 + x**Rational(5, 2)/120 + O(x**3) # issue 19065: s1 = f(x,y).series(y, n=2) assert {i.name for i in s1.atoms(Symbol)} == {'x', 'xi', 'y'} xi = Symbol('xi') s2 = f(xi, y).series(y, n=2) assert {i.name for i in s2.atoms(Symbol)} == {'xi', 'xi0', 'y'} def test_doit(): n = Symbol('n', integer=True) f = Sum(2 * n * x, (n, 1, 3)) d = Derivative(f, x) assert d.doit() == 12 assert d.doit(deep=False) == Sum(2*n, (n, 1, 3)) def test_evalf_default(): from sympy.functions.special.gamma_functions import polygamma assert type(sin(4.0)) == Float assert type(re(sin(I + 1.0))) == Float assert type(im(sin(I + 1.0))) == Float assert type(sin(4)) == sin assert type(polygamma(2.0, 4.0)) == Float assert type(sin(Rational(1, 4))) == sin def test_issue_5399(): args = [x, y, S(2), S.Half] def ok(a): """Return True if the input args for diff are ok""" if not a: return False if a[0].is_Symbol is False: return False s_at = [i for i in range(len(a)) if a[i].is_Symbol] n_at = [i for i in range(len(a)) if not a[i].is_Symbol] # every symbol is followed by symbol or int # every number is followed by a symbol return (all(a[i + 1].is_Symbol or a[i + 1].is_Integer for i in s_at if i + 1 < len(a)) and all(a[i + 1].is_Symbol for i in n_at if i + 1 < len(a))) eq = x**10*y**8 for a in subsets(args): for v in variations(a, len(a)): if ok(v): eq.diff(*v) # does not raise else: raises(ValueError, lambda: eq.diff(*v)) def test_derivative_numerically(): from random import random z0 = random() + I*random() assert abs(Derivative(sin(x), x).doit_numerically(z0) - cos(z0)) < 1e-15 def test_fdiff_argument_index_error(): from sympy.core.function import ArgumentIndexError class myfunc(Function): nargs = 1 # define since there is no eval routine def fdiff(self, idx): raise ArgumentIndexError mf = myfunc(x) assert mf.diff(x) == Derivative(mf, x) raises(TypeError, lambda: myfunc(x, x)) def test_deriv_wrt_function(): x = f(t) xd = diff(x, t) xdd = diff(xd, t) y = g(t) yd = diff(y, t) assert diff(x, t) == xd assert diff(2 * x + 4, t) == 2 * xd assert diff(2 * x + 4 + y, t) == 2 * xd + yd assert diff(2 * x + 4 + y * x, t) == 2 * xd + x * yd + xd * y assert diff(2 * x + 4 + y * x, x) == 2 + y assert (diff(4 * x**2 + 3 * x + x * y, t) == 3 * xd + x * yd + xd * y + 8 * x * xd) assert (diff(4 * x**2 + 3 * xd + x * y, t) == 3 * xdd + x * yd + xd * y + 8 * x * xd) assert diff(4 * x**2 + 3 * xd + x * y, xd) == 3 assert diff(4 * x**2 + 3 * xd + x * y, xdd) == 0 assert diff(sin(x), t) == xd * cos(x) assert diff(exp(x), t) == xd * exp(x) assert diff(sqrt(x), t) == xd / (2 * sqrt(x)) def test_diff_wrt_value(): assert Expr()._diff_wrt is False assert x._diff_wrt is True assert f(x)._diff_wrt is True assert Derivative(f(x), x)._diff_wrt is True assert Derivative(x**2, x)._diff_wrt is False def test_diff_wrt(): fx = f(x) dfx = diff(f(x), x) ddfx = diff(f(x), x, x) assert diff(sin(fx) + fx**2, fx) == cos(fx) + 2*fx assert diff(sin(dfx) + dfx**2, dfx) == cos(dfx) + 2*dfx assert diff(sin(ddfx) + ddfx**2, ddfx) == cos(ddfx) + 2*ddfx assert diff(fx**2, dfx) == 0 assert diff(fx**2, ddfx) == 0 assert diff(dfx**2, fx) == 0 assert diff(dfx**2, ddfx) == 0 assert diff(ddfx**2, dfx) == 0 assert diff(fx*dfx*ddfx, fx) == dfx*ddfx assert diff(fx*dfx*ddfx, dfx) == fx*ddfx assert diff(fx*dfx*ddfx, ddfx) == fx*dfx assert diff(f(x), x).diff(f(x)) == 0 assert (sin(f(x)) - cos(diff(f(x), x))).diff(f(x)) == cos(f(x)) assert diff(sin(fx), fx, x) == diff(sin(fx), x, fx) # Chain rule cases assert f(g(x)).diff(x) == \ Derivative(g(x), x)*Derivative(f(g(x)), g(x)) assert diff(f(g(x), h(y)), x) == \ Derivative(g(x), x)*Derivative(f(g(x), h(y)), g(x)) assert diff(f(g(x), h(x)), x) == ( Derivative(f(g(x), h(x)), g(x))*Derivative(g(x), x) + Derivative(f(g(x), h(x)), h(x))*Derivative(h(x), x)) assert f( sin(x)).diff(x) == cos(x)*Subs(Derivative(f(x), x), x, sin(x)) assert diff(f(g(x)), g(x)) == Derivative(f(g(x)), g(x)) def test_diff_wrt_func_subs(): assert f(g(x)).diff(x).subs(g, Lambda(x, 2*x)).doit() == f(2*x).diff(x) def test_subs_in_derivative(): expr = sin(x*exp(y)) u = Function('u') v = Function('v') assert Derivative(expr, y).subs(expr, y) == Derivative(y, y) assert Derivative(expr, y).subs(y, x).doit() == \ Derivative(expr, y).doit().subs(y, x) assert Derivative(f(x, y), y).subs(y, x) == Subs(Derivative(f(x, y), y), y, x) assert Derivative(f(x, y), y).subs(x, y) == Subs(Derivative(f(x, y), y), x, y) assert Derivative(f(x, y), y).subs(y, g(x, y)) == Subs(Derivative(f(x, y), y), y, g(x, y)).doit() assert Derivative(f(x, y), y).subs(x, g(x, y)) == Subs(Derivative(f(x, y), y), x, g(x, y)) assert Derivative(f(x, y), g(y)).subs(x, g(x, y)) == Derivative(f(g(x, y), y), g(y)) assert Derivative(f(u(x), h(y)), h(y)).subs(h(y), g(x, y)) == \ Subs(Derivative(f(u(x), h(y)), h(y)), h(y), g(x, y)).doit() assert Derivative(f(x, y), y).subs(y, z) == Derivative(f(x, z), z) assert Derivative(f(x, y), y).subs(y, g(y)) == Derivative(f(x, g(y)), g(y)) assert Derivative(f(g(x), h(y)), h(y)).subs(h(y), u(y)) == \ Derivative(f(g(x), u(y)), u(y)) assert Derivative(f(x, f(x, x)), f(x, x)).subs( f, Lambda((x, y), x + y)) == Subs( Derivative(z + x, z), z, 2*x) assert Subs(Derivative(f(f(x)), x), f, cos).doit() == sin(x)*sin(cos(x)) assert Subs(Derivative(f(f(x)), f(x)), f, cos).doit() == -sin(cos(x)) # Issue 13791. No comparison (it's a long formula) but this used to raise an exception. assert isinstance(v(x, y, u(x, y)).diff(y).diff(x).diff(y), Expr) # This is also related to issues 13791 and 13795; issue 15190 F = Lambda((x, y), exp(2*x + 3*y)) abstract = f(x, f(x, x)).diff(x, 2) concrete = F(x, F(x, x)).diff(x, 2) assert (abstract.subs(f, F).doit() - concrete).simplify() == 0 # don't introduce a new symbol if not necessary assert x in f(x).diff(x).subs(x, 0).atoms() # case (4) assert Derivative(f(x,f(x,y)), x, y).subs(x, g(y) ) == Subs(Derivative(f(x, f(x, y)), x, y), x, g(y)) assert Derivative(f(x, x), x).subs(x, 0 ) == Subs(Derivative(f(x, x), x), x, 0) # issue 15194 assert Derivative(f(y, g(x)), (x, z)).subs(z, x ) == Derivative(f(y, g(x)), (x, x)) df = f(x).diff(x) assert df.subs(df, 1) is S.One assert df.diff(df) is S.One dxy = Derivative(f(x, y), x, y) dyx = Derivative(f(x, y), y, x) assert dxy.subs(Derivative(f(x, y), y, x), 1) is S.One assert dxy.diff(dyx) is S.One assert Derivative(f(x, y), x, 2, y, 3).subs( dyx, g(x, y)) == Derivative(g(x, y), x, 1, y, 2) assert Derivative(f(x, x - y), y).subs(x, x + y) == Subs( Derivative(f(x, x - y), y), x, x + y) def test_diff_wrt_not_allowed(): # issue 7027 included for wrt in ( cos(x), re(x), x**2, x*y, 1 + x, Derivative(cos(x), x), Derivative(f(f(x)), x)): raises(ValueError, lambda: diff(f(x), wrt)) # if we don't differentiate wrt then don't raise error assert diff(exp(x*y), x*y, 0) == exp(x*y) def test_klein_gordon_lagrangian(): m = Symbol('m') phi = f(x, t) L = -(diff(phi, t)**2 - diff(phi, x)**2 - m**2*phi**2)/2 eqna = Eq( diff(L, phi) - diff(L, diff(phi, x), x) - diff(L, diff(phi, t), t), 0) eqnb = Eq(diff(phi, t, t) - diff(phi, x, x) + m**2*phi, 0) assert eqna == eqnb def test_sho_lagrangian(): m = Symbol('m') k = Symbol('k') x = f(t) L = m*diff(x, t)**2/2 - k*x**2/2 eqna = Eq(diff(L, x), diff(L, diff(x, t), t)) eqnb = Eq(-k*x, m*diff(x, t, t)) assert eqna == eqnb assert diff(L, x, t) == diff(L, t, x) assert diff(L, diff(x, t), t) == m*diff(x, t, 2) assert diff(L, t, diff(x, t)) == -k*x + m*diff(x, t, 2) def test_straight_line(): F = f(x) Fd = F.diff(x) L = sqrt(1 + Fd**2) assert diff(L, F) == 0 assert diff(L, Fd) == Fd/sqrt(1 + Fd**2) def test_sort_variable(): vsort = Derivative._sort_variable_count def vsort0(*v, reverse=False): return [i[0] for i in vsort([(i, 0) for i in ( reversed(v) if reverse else v)])] for R in range(2): assert vsort0(y, x, reverse=R) == [x, y] assert vsort0(f(x), x, reverse=R) == [x, f(x)] assert vsort0(f(y), f(x), reverse=R) == [f(x), f(y)] assert vsort0(g(x), f(y), reverse=R) == [f(y), g(x)] assert vsort0(f(x, y), f(x), reverse=R) == [f(x), f(x, y)] fx = f(x).diff(x) assert vsort0(fx, y, reverse=R) == [y, fx] fy = f(y).diff(y) assert vsort0(fy, fx, reverse=R) == [fx, fy] fxx = fx.diff(x) assert vsort0(fxx, fx, reverse=R) == [fx, fxx] assert vsort0(Basic(x), f(x), reverse=R) == [f(x), Basic(x)] assert vsort0(Basic(y), Basic(x), reverse=R) == [Basic(x), Basic(y)] assert vsort0(Basic(y, z), Basic(x), reverse=R) == [ Basic(x), Basic(y, z)] assert vsort0(fx, x, reverse=R) == [ x, fx] if R else [fx, x] assert vsort0(Basic(x), x, reverse=R) == [ x, Basic(x)] if R else [Basic(x), x] assert vsort0(Basic(f(x)), f(x), reverse=R) == [ f(x), Basic(f(x))] if R else [Basic(f(x)), f(x)] assert vsort0(Basic(x, z), Basic(x), reverse=R) == [ Basic(x), Basic(x, z)] if R else [Basic(x, z), Basic(x)] assert vsort([]) == [] assert _aresame(vsort([(x, 1)]), [Tuple(x, 1)]) assert vsort([(x, y), (x, z)]) == [(x, y + z)] assert vsort([(y, 1), (x, 1 + y)]) == [(x, 1 + y), (y, 1)] # coverage complete; legacy tests below assert vsort([(x, 3), (y, 2), (z, 1)]) == [(x, 3), (y, 2), (z, 1)] assert vsort([(h(x), 1), (g(x), 1), (f(x), 1)]) == [ (f(x), 1), (g(x), 1), (h(x), 1)] assert vsort([(z, 1), (y, 2), (x, 3), (h(x), 1), (g(x), 1), (f(x), 1)]) == [(x, 3), (y, 2), (z, 1), (f(x), 1), (g(x), 1), (h(x), 1)] assert vsort([(x, 1), (f(x), 1), (y, 1), (f(y), 1)]) == [(x, 1), (y, 1), (f(x), 1), (f(y), 1)] assert vsort([(y, 1), (x, 2), (g(x), 1), (f(x), 1), (z, 1), (h(x), 1), (y, 2), (x, 1)]) == [(x, 3), (y, 3), (z, 1), (f(x), 1), (g(x), 1), (h(x), 1)] assert vsort([(z, 1), (y, 1), (f(x), 1), (x, 1), (f(x), 1), (g(x), 1)]) == [(x, 1), (y, 1), (z, 1), (f(x), 2), (g(x), 1)] assert vsort([(z, 1), (y, 2), (f(x), 1), (x, 2), (f(x), 2), (g(x), 1), (z, 2), (z, 1), (y, 1), (x, 1)]) == [(x, 3), (y, 3), (z, 4), (f(x), 3), (g(x), 1)] assert vsort(((y, 2), (x, 1), (y, 1), (x, 1))) == [(x, 2), (y, 3)] assert isinstance(vsort([(x, 3), (y, 2), (z, 1)])[0], Tuple) assert vsort([(x, 1), (f(x), 1), (x, 1)]) == [(x, 2), (f(x), 1)] assert vsort([(y, 2), (x, 3), (z, 1)]) == [(x, 3), (y, 2), (z, 1)] assert vsort([(h(y), 1), (g(x), 1), (f(x), 1)]) == [ (f(x), 1), (g(x), 1), (h(y), 1)] assert vsort([(x, 1), (y, 1), (x, 1)]) == [(x, 2), (y, 1)] assert vsort([(f(x), 1), (f(y), 1), (f(x), 1)]) == [ (f(x), 2), (f(y), 1)] dfx = f(x).diff(x) self = [(dfx, 1), (x, 1)] assert vsort(self) == self assert vsort([ (dfx, 1), (y, 1), (f(x), 1), (x, 1), (f(y), 1), (x, 1)]) == [ (y, 1), (f(x), 1), (f(y), 1), (dfx, 1), (x, 2)] dfy = f(y).diff(y) assert vsort([(dfy, 1), (dfx, 1)]) == [(dfx, 1), (dfy, 1)] d2fx = dfx.diff(x) assert vsort([(d2fx, 1), (dfx, 1)]) == [(dfx, 1), (d2fx, 1)] def test_multiple_derivative(): # Issue #15007 assert f(x, y).diff(y, y, x, y, x ) == Derivative(f(x, y), (x, 2), (y, 3)) def test_unhandled(): class MyExpr(Expr): def _eval_derivative(self, s): if not s.name.startswith('xi'): return self else: return None eq = MyExpr(f(x), y, z) assert diff(eq, x, y, f(x), z) == Derivative(eq, f(x)) assert diff(eq, f(x), x) == Derivative(eq, f(x)) assert f(x, y).diff(x,(y, z)) == Derivative(f(x, y), x, (y, z)) assert f(x, y).diff(x,(y, 0)) == Derivative(f(x, y), x) def test_nfloat(): from sympy.core.basic import _aresame from sympy.polys.rootoftools import rootof x = Symbol("x") eq = x**Rational(4, 3) + 4*x**(S.One/3)/3 assert _aresame(nfloat(eq), x**Rational(4, 3) + (4.0/3)*x**(S.One/3)) assert _aresame(nfloat(eq, exponent=True), x**(4.0/3) + (4.0/3)*x**(1.0/3)) eq = x**Rational(4, 3) + 4*x**(x/3)/3 assert _aresame(nfloat(eq), x**Rational(4, 3) + (4.0/3)*x**(x/3)) big = 12345678901234567890 # specify precision to match value used in nfloat Float_big = Float(big, 15) assert _aresame(nfloat(big), Float_big) assert _aresame(nfloat(big*x), Float_big*x) assert _aresame(nfloat(x**big, exponent=True), x**Float_big) assert nfloat(cos(x + sqrt(2))) == cos(x + nfloat(sqrt(2))) # issue 6342 f = S('x*lamda + lamda**3*(x/2 + 1/2) + lamda**2 + 1/4') assert not any(a.free_symbols for a in solveset(f.subs(x, -0.139))) # issue 6632 assert nfloat(-100000*sqrt(2500000001) + 5000000001) == \ 9.99999999800000e-11 # issue 7122 eq = cos(3*x**4 + y)*rootof(x**5 + 3*x**3 + 1, 0) assert str(nfloat(eq, exponent=False, n=1)) == '-0.7*cos(3.0*x**4 + y)' # issue 10933 for ti in (dict, Dict): d = ti({S.Half: S.Half}) n = nfloat(d) assert isinstance(n, ti) assert _aresame(list(n.items()).pop(), (S.Half, Float(.5))) for ti in (dict, Dict): d = ti({S.Half: S.Half}) n = nfloat(d, dkeys=True) assert isinstance(n, ti) assert _aresame(list(n.items()).pop(), (Float(.5), Float(.5))) d = [S.Half] n = nfloat(d) assert type(n) is list assert _aresame(n[0], Float(.5)) assert _aresame(nfloat(Eq(x, S.Half)).rhs, Float(.5)) assert _aresame(nfloat(S(True)), S(True)) assert _aresame(nfloat(Tuple(S.Half))[0], Float(.5)) assert nfloat(Eq((3 - I)**2/2 + I, 0)) == S.false # pass along kwargs assert nfloat([{S.Half: x}], dkeys=True) == [{Float(0.5): x}] # Issue 17706 A = MutableMatrix([[1, 2], [3, 4]]) B = MutableMatrix( [[Float('1.0', precision=53), Float('2.0', precision=53)], [Float('3.0', precision=53), Float('4.0', precision=53)]]) assert _aresame(nfloat(A), B) A = ImmutableMatrix([[1, 2], [3, 4]]) B = ImmutableMatrix( [[Float('1.0', precision=53), Float('2.0', precision=53)], [Float('3.0', precision=53), Float('4.0', precision=53)]]) assert _aresame(nfloat(A), B) def test_issue_7068(): from sympy.abc import a, b f = Function('f') y1 = Dummy('y') y2 = Dummy('y') func1 = f(a + y1 * b) func2 = f(a + y2 * b) func1_y = func1.diff(y1) func2_y = func2.diff(y2) assert func1_y != func2_y z1 = Subs(f(a), a, y1) z2 = Subs(f(a), a, y2) assert z1 != z2 def test_issue_7231(): from sympy.abc import a ans1 = f(x).series(x, a) res = (f(a) + (-a + x)*Subs(Derivative(f(y), y), y, a) + (-a + x)**2*Subs(Derivative(f(y), y, y), y, a)/2 + (-a + x)**3*Subs(Derivative(f(y), y, y, y), y, a)/6 + (-a + x)**4*Subs(Derivative(f(y), y, y, y, y), y, a)/24 + (-a + x)**5*Subs(Derivative(f(y), y, y, y, y, y), y, a)/120 + O((-a + x)**6, (x, a))) assert res == ans1 ans2 = f(x).series(x, a) assert res == ans2 def test_issue_7687(): from sympy.core.function import Function from sympy.abc import x f = Function('f')(x) ff = Function('f')(x) match_with_cache = ff.matches(f) assert isinstance(f, type(ff)) clear_cache() ff = Function('f')(x) assert isinstance(f, type(ff)) assert match_with_cache == ff.matches(f) def test_issue_7688(): from sympy.core.function import Function, UndefinedFunction f = Function('f') # actually an UndefinedFunction clear_cache() class A(UndefinedFunction): pass a = A('f') assert isinstance(a, type(f)) def test_mexpand(): from sympy.abc import x assert _mexpand(None) is None assert _mexpand(1) is S.One assert _mexpand(x*(x + 1)**2) == (x*(x + 1)**2).expand() def test_issue_8469(): # This should not take forever to run N = 40 def g(w, theta): return 1/(1+exp(w-theta)) ws = symbols(['w%i'%i for i in range(N)]) import functools expr = functools.reduce(g, ws) assert isinstance(expr, Pow) def test_issue_12996(): # foo=True imitates the sort of arguments that Derivative can get # from Integral when it passes doit to the expression assert Derivative(im(x), x).doit(foo=True) == Derivative(im(x), x) def test_should_evalf(): # This should not take forever to run (see #8506) assert isinstance(sin((1.0 + 1.0*I)**10000 + 1), sin) def test_Derivative_as_finite_difference(): # Central 1st derivative at gridpoint x, h = symbols('x h', real=True) dfdx = f(x).diff(x) assert (dfdx.as_finite_difference([x-2, x-1, x, x+1, x+2]) - (S.One/12*(f(x-2)-f(x+2)) + Rational(2, 3)*(f(x+1)-f(x-1)))).simplify() == 0 # Central 1st derivative "half-way" assert (dfdx.as_finite_difference() - (f(x + S.Half)-f(x - S.Half))).simplify() == 0 assert (dfdx.as_finite_difference(h) - (f(x + h/S(2))-f(x - h/S(2)))/h).simplify() == 0 assert (dfdx.as_finite_difference([x - 3*h, x-h, x+h, x + 3*h]) - (S(9)/(8*2*h)*(f(x+h) - f(x-h)) + S.One/(24*2*h)*(f(x - 3*h) - f(x + 3*h)))).simplify() == 0 # One sided 1st derivative at gridpoint assert (dfdx.as_finite_difference([0, 1, 2], 0) - (Rational(-3, 2)*f(0) + 2*f(1) - f(2)/2)).simplify() == 0 assert (dfdx.as_finite_difference([x, x+h], x) - (f(x+h) - f(x))/h).simplify() == 0 assert (dfdx.as_finite_difference([x-h, x, x+h], x-h) - (-S(3)/(2*h)*f(x-h) + 2/h*f(x) - S.One/(2*h)*f(x+h))).simplify() == 0 # One sided 1st derivative "half-way" assert (dfdx.as_finite_difference([x-h, x+h, x + 3*h, x + 5*h, x + 7*h]) - 1/(2*h)*(-S(11)/(12)*f(x-h) + S(17)/(24)*f(x+h) + Rational(3, 8)*f(x + 3*h) - Rational(5, 24)*f(x + 5*h) + S.One/24*f(x + 7*h))).simplify() == 0 d2fdx2 = f(x).diff(x, 2) # Central 2nd derivative at gridpoint assert (d2fdx2.as_finite_difference([x-h, x, x+h]) - h**-2 * (f(x-h) + f(x+h) - 2*f(x))).simplify() == 0 assert (d2fdx2.as_finite_difference([x - 2*h, x-h, x, x+h, x + 2*h]) - h**-2 * (Rational(-1, 12)*(f(x - 2*h) + f(x + 2*h)) + Rational(4, 3)*(f(x+h) + f(x-h)) - Rational(5, 2)*f(x))).simplify() == 0 # Central 2nd derivative "half-way" assert (d2fdx2.as_finite_difference([x - 3*h, x-h, x+h, x + 3*h]) - (2*h)**-2 * (S.Half*(f(x - 3*h) + f(x + 3*h)) - S.Half*(f(x+h) + f(x-h)))).simplify() == 0 # One sided 2nd derivative at gridpoint assert (d2fdx2.as_finite_difference([x, x+h, x + 2*h, x + 3*h]) - h**-2 * (2*f(x) - 5*f(x+h) + 4*f(x+2*h) - f(x+3*h))).simplify() == 0 # One sided 2nd derivative at "half-way" assert (d2fdx2.as_finite_difference([x-h, x+h, x + 3*h, x + 5*h]) - (2*h)**-2 * (Rational(3, 2)*f(x-h) - Rational(7, 2)*f(x+h) + Rational(5, 2)*f(x + 3*h) - S.Half*f(x + 5*h))).simplify() == 0 d3fdx3 = f(x).diff(x, 3) # Central 3rd derivative at gridpoint assert (d3fdx3.as_finite_difference() - (-f(x - Rational(3, 2)) + 3*f(x - S.Half) - 3*f(x + S.Half) + f(x + Rational(3, 2)))).simplify() == 0 assert (d3fdx3.as_finite_difference( [x - 3*h, x - 2*h, x-h, x, x+h, x + 2*h, x + 3*h]) - h**-3 * (S.One/8*(f(x - 3*h) - f(x + 3*h)) - f(x - 2*h) + f(x + 2*h) + Rational(13, 8)*(f(x-h) - f(x+h)))).simplify() == 0 # Central 3rd derivative at "half-way" assert (d3fdx3.as_finite_difference([x - 3*h, x-h, x+h, x + 3*h]) - (2*h)**-3 * (f(x + 3*h)-f(x - 3*h) + 3*(f(x-h)-f(x+h)))).simplify() == 0 # One sided 3rd derivative at gridpoint assert (d3fdx3.as_finite_difference([x, x+h, x + 2*h, x + 3*h]) - h**-3 * (f(x + 3*h)-f(x) + 3*(f(x+h)-f(x + 2*h)))).simplify() == 0 # One sided 3rd derivative at "half-way" assert (d3fdx3.as_finite_difference([x-h, x+h, x + 3*h, x + 5*h]) - (2*h)**-3 * (f(x + 5*h)-f(x-h) + 3*(f(x+h)-f(x + 3*h)))).simplify() == 0 # issue 11007 y = Symbol('y', real=True) d2fdxdy = f(x, y).diff(x, y) ref0 = Derivative(f(x + S.Half, y), y) - Derivative(f(x - S.Half, y), y) assert (d2fdxdy.as_finite_difference(wrt=x) - ref0).simplify() == 0 half = S.Half xm, xp, ym, yp = x-half, x+half, y-half, y+half ref2 = f(xm, ym) + f(xp, yp) - f(xp, ym) - f(xm, yp) assert (d2fdxdy.as_finite_difference() - ref2).simplify() == 0 def test_issue_11159(): # Tests Application._eval_subs with _exp_is_pow(False): expr1 = E expr0 = expr1 * expr1 expr1 = expr0.subs(expr1,expr0) assert expr0 == expr1 with _exp_is_pow(True): expr1 = E expr0 = expr1 * expr1 expr2 = expr0.subs(expr1, expr0) assert expr2 == E ** 4 def test_issue_12005(): e1 = Subs(Derivative(f(x), x), x, x) assert e1.diff(x) == Derivative(f(x), x, x) e2 = Subs(Derivative(f(x), x), x, x**2 + 1) assert e2.diff(x) == 2*x*Subs(Derivative(f(x), x, x), x, x**2 + 1) e3 = Subs(Derivative(f(x) + y**2 - y, y), y, y**2) assert e3.diff(y) == 4*y e4 = Subs(Derivative(f(x + y), y), y, (x**2)) assert e4.diff(y) is S.Zero e5 = Subs(Derivative(f(x), x), (y, z), (y, z)) assert e5.diff(x) == Derivative(f(x), x, x) assert f(g(x)).diff(g(x), g(x)) == Derivative(f(g(x)), g(x), g(x)) def test_issue_13843(): x = symbols('x') f = Function('f') m, n = symbols('m n', integer=True) assert Derivative(Derivative(f(x), (x, m)), (x, n)) == Derivative(f(x), (x, m + n)) assert Derivative(Derivative(f(x), (x, m+5)), (x, n+3)) == Derivative(f(x), (x, m + n + 8)) assert Derivative(f(x), (x, n)).doit() == Derivative(f(x), (x, n)) def test_order_could_be_zero(): x, y = symbols('x, y') n = symbols('n', integer=True, nonnegative=True) m = symbols('m', integer=True, positive=True) assert diff(y, (x, n)) == Piecewise((y, Eq(n, 0)), (0, True)) assert diff(y, (x, n + 1)) is S.Zero assert diff(y, (x, m)) is S.Zero def test_undefined_function_eq(): f = Function('f') f2 = Function('f') g = Function('g') f_real = Function('f', is_real=True) # This test may only be meaningful if the cache is turned off assert f == f2 assert hash(f) == hash(f2) assert f == f assert f != g assert f != f_real def test_function_assumptions(): x = Symbol('x') f = Function('f') f_real = Function('f', real=True) f_real1 = Function('f', real=1) f_real_inherit = Function(Symbol('f', real=True)) assert f_real == f_real1 # assumptions are sanitized assert f != f_real assert f(x) != f_real(x) assert f(x).is_real is None assert f_real(x).is_real is True assert f_real_inherit(x).is_real is True and f_real_inherit.name == 'f' # Can also do it this way, but it won't be equal to f_real because of the # way UndefinedFunction.__new__ works. Any non-recognized assumptions # are just added literally as something which is used in the hash f_real2 = Function('f', is_real=True) assert f_real2(x).is_real is True def test_undef_fcn_float_issue_6938(): f = Function('ceil') assert not f(0.3).is_number f = Function('sin') assert not f(0.3).is_number assert not f(pi).evalf().is_number x = Symbol('x') assert not f(x).evalf(subs={x:1.2}).is_number def test_undefined_function_eval(): # Issue 15170. Make sure UndefinedFunction with eval defined works # properly. The issue there was that the hash was determined before _nargs # was set, which is included in the hash, hence changing the hash. The # class is added to sympy.core.core.all_classes before the hash is # changed, meaning "temp in all_classes" would fail, causing sympify(temp(t)) # to give a new class. We will eventually remove all_classes, but make # sure this continues to work. fdiff = lambda self, argindex=1: cos(self.args[argindex - 1]) eval = classmethod(lambda cls, t: None) _imp_ = classmethod(lambda cls, t: sin(t)) temp = Function('temp', fdiff=fdiff, eval=eval, _imp_=_imp_) expr = temp(t) assert sympify(expr) == expr assert type(sympify(expr)).fdiff.__name__ == "<lambda>" assert expr.diff(t) == cos(t) def test_issue_15241(): F = f(x) Fx = F.diff(x) assert (F + x*Fx).diff(x, Fx) == 2 assert (F + x*Fx).diff(Fx, x) == 1 assert (x*F + x*Fx*F).diff(F, x) == x*Fx.diff(x) + Fx + 1 assert (x*F + x*Fx*F).diff(x, F) == x*Fx.diff(x) + Fx + 1 y = f(x) G = f(y) Gy = G.diff(y) assert (G + y*Gy).diff(y, Gy) == 2 assert (G + y*Gy).diff(Gy, y) == 1 assert (y*G + y*Gy*G).diff(G, y) == y*Gy.diff(y) + Gy + 1 assert (y*G + y*Gy*G).diff(y, G) == y*Gy.diff(y) + Gy + 1 def test_issue_15226(): assert Subs(Derivative(f(y), x, y), y, g(x)).doit() != 0 def test_issue_7027(): for wrt in (cos(x), re(x), Derivative(cos(x), x)): raises(ValueError, lambda: diff(f(x), wrt)) def test_derivative_quick_exit(): assert f(x).diff(y) == 0 assert f(x).diff(y, f(x)) == 0 assert f(x).diff(x, f(y)) == 0 assert f(f(x)).diff(x, f(x), f(y)) == 0 assert f(f(x)).diff(x, f(x), y) == 0 assert f(x).diff(g(x)) == 0 assert f(x).diff(x, f(x).diff(x)) == 1 df = f(x).diff(x) assert f(x).diff(df) == 0 dg = g(x).diff(x) assert dg.diff(df).doit() == 0 def test_issue_15084_13166(): eq = f(x, g(x)) assert eq.diff((g(x), y)) == Derivative(f(x, g(x)), (g(x), y)) # issue 13166 assert eq.diff(x, 2).doit() == ( (Derivative(f(x, g(x)), (g(x), 2))*Derivative(g(x), x) + Subs(Derivative(f(x, _xi_2), _xi_2, x), _xi_2, g(x)))*Derivative(g(x), x) + Derivative(f(x, g(x)), g(x))*Derivative(g(x), (x, 2)) + Derivative(g(x), x)*Subs(Derivative(f(_xi_1, g(x)), _xi_1, g(x)), _xi_1, x) + Subs(Derivative(f(_xi_1, g(x)), (_xi_1, 2)), _xi_1, x)) # issue 6681 assert diff(f(x, t, g(x, t)), x).doit() == ( Derivative(f(x, t, g(x, t)), g(x, t))*Derivative(g(x, t), x) + Subs(Derivative(f(_xi_1, t, g(x, t)), _xi_1), _xi_1, x)) # make sure the order doesn't matter when using diff assert eq.diff(x, g(x)) == eq.diff(g(x), x) def test_negative_counts(): # issue 13873 raises(ValueError, lambda: sin(x).diff(x, -1)) def test_Derivative__new__(): raises(TypeError, lambda: f(x).diff((x, 2), 0)) assert f(x, y).diff([(x, y), 0]) == f(x, y) assert f(x, y).diff([(x, y), 1]) == NDimArray([ Derivative(f(x, y), x), Derivative(f(x, y), y)]) assert f(x,y).diff(y, (x, z), y, x) == Derivative( f(x, y), (x, z + 1), (y, 2)) assert Matrix([x]).diff(x, 2) == Matrix([0]) # is_zero exit def test_issue_14719_10150(): class V(Expr): _diff_wrt = True is_scalar = False assert V().diff(V()) == Derivative(V(), V()) assert (2*V()).diff(V()) == 2*Derivative(V(), V()) class X(Expr): _diff_wrt = True assert X().diff(X()) == 1 assert (2*X()).diff(X()) == 2 def test_noncommutative_issue_15131(): x = Symbol('x', commutative=False) t = Symbol('t', commutative=False) fx = Function('Fx', commutative=False)(x) ft = Function('Ft', commutative=False)(t) A = Symbol('A', commutative=False) eq = fx * A * ft eqdt = eq.diff(t) assert eqdt.args[-1] == ft.diff(t) def test_Subs_Derivative(): a = Derivative(f(g(x), h(x)), g(x), h(x),x) b = Derivative(Derivative(f(g(x), h(x)), g(x), h(x)),x) c = f(g(x), h(x)).diff(g(x), h(x), x) d = f(g(x), h(x)).diff(g(x), h(x)).diff(x) e = Derivative(f(g(x), h(x)), x) eqs = (a, b, c, d, e) subs = lambda arg: arg.subs(f, Lambda((x, y), exp(x + y)) ).subs(g(x), 1/x).subs(h(x), x**3) ans = 3*x**2*exp(1/x)*exp(x**3) - exp(1/x)*exp(x**3)/x**2 assert all(subs(i).doit().expand() == ans for i in eqs) assert all(subs(i.doit()).doit().expand() == ans for i in eqs) def test_issue_15360(): f = Function('f') assert f.name == 'f' def test_issue_15947(): assert f._diff_wrt is False raises(TypeError, lambda: f(f)) raises(TypeError, lambda: f(x).diff(f)) def test_Derivative_free_symbols(): f = Function('f') n = Symbol('n', integer=True, positive=True) assert diff(f(x), (x, n)).free_symbols == {n, x} def test_issue_20683(): x = Symbol('x') y = Symbol('y') z = Symbol('z') y = Derivative(z, x).subs(x,0) assert y.doit() == 0 y = Derivative(8, x).subs(x,0) assert y.doit() == 0 def test_issue_10503(): f = exp(x**3)*cos(x**6) assert f.series(x, 0, 14) == 1 + x**3 + x**6/2 + x**9/6 - 11*x**12/24 + O(x**14) def test_issue_17382(): # copied from sympy/core/tests/test_evalf.py def NS(e, n=15, **options): return sstr(sympify(e).evalf(n, **options), full_prec=True) x = Symbol('x') expr = solveset(2 * cos(x) * cos(2 * x) - 1, x, S.Reals) expected = "Union(" \ "ImageSet(Lambda(_n, 6.28318530717959*_n + 5.79812359592087), Integers), " \ "ImageSet(Lambda(_n, 6.28318530717959*_n + 0.485061711258717), Integers))" assert NS(expr) == expected
9962011242228f2d1c07d170d2b6d5cc3dfebc6358b6ae084b88d44395fda2e7
"""This tests sympy/core/basic.py with (ideally) no reference to subclasses of Basic or Atom.""" import collections from sympy.core.basic import (Basic, Atom, as_Basic, _atomic, _aresame) from sympy.core.singleton import S from sympy.core.symbol import symbols, Symbol, Dummy from sympy.core.sympify import SympifyError from sympy.core.function import Function, Lambda from sympy.assumptions.ask import Q from sympy.concrete.summations import Sum from sympy.core.containers import Tuple from sympy.functions.elementary.trigonometric import (cos, sin) from sympy.functions.special.gamma_functions import gamma from sympy.integrals.integrals import Integral from sympy.functions.elementary.exponential import exp from sympy.testing.pytest import raises from sympy.core import I, pi b1 = Basic() b2 = Basic(b1) b3 = Basic(b2) b21 = Basic(b2, b1) def test__aresame(): assert not _aresame(Basic([]), Basic()) assert not _aresame(Basic([]), Basic(())) assert not _aresame(Basic(2), Basic(2.)) def test_structure(): assert b21.args == (b2, b1) assert b21.func(*b21.args) == b21 assert bool(b1) def test_immutable(): assert not hasattr(b1, '__dict__') with raises(AttributeError): b1.x = 1 def test_equality(): instances = [b1, b2, b3, b21, Basic(b1, b1, b1), Basic] for i, b_i in enumerate(instances): for j, b_j in enumerate(instances): assert (b_i == b_j) == (i == j) assert (b_i != b_j) == (i != j) assert Basic() != [] assert not(Basic() == []) assert Basic() != 0 assert not(Basic() == 0) class Foo: """ Class that is unaware of Basic, and relies on both classes returning the NotImplemented singleton for equivalence to evaluate to False. """ b = Basic() foo = Foo() assert b != foo assert foo != b assert not b == foo assert not foo == b class Bar: """ Class that considers itself equal to any instance of Basic, and relies on Basic returning the NotImplemented singleton in order to achieve a symmetric equivalence relation. """ def __eq__(self, other): if isinstance(other, Basic): return True return NotImplemented def __ne__(self, other): return not self == other bar = Bar() assert b == bar assert bar == b assert not b != bar assert not bar != b def test_matches_basic(): instances = [Basic(b1, b1, b2), Basic(b1, b2, b1), Basic(b2, b1, b1), Basic(b1, b2), Basic(b2, b1), b2, b1] for i, b_i in enumerate(instances): for j, b_j in enumerate(instances): if i == j: assert b_i.matches(b_j) == {} else: assert b_i.matches(b_j) is None assert b1.match(b1) == {} def test_has(): assert b21.has(b1) assert b21.has(b3, b1) assert b21.has(Basic) assert not b1.has(b21, b3) assert not b21.has() raises(SympifyError, lambda: Symbol("x").has("x")) def test_subs(): assert b21.subs(b2, b1) == Basic(b1, b1) assert b21.subs(b2, b21) == Basic(b21, b1) assert b3.subs(b2, b1) == b2 assert b21.subs([(b2, b1), (b1, b2)]) == Basic(b2, b2) assert b21.subs({b1: b2, b2: b1}) == Basic(b2, b2) assert b21.subs(collections.ChainMap({b1: b2}, {b2: b1})) == Basic(b2, b2) assert b21.subs(collections.OrderedDict([(b2, b1), (b1, b2)])) == Basic(b2, b2) raises(ValueError, lambda: b21.subs('bad arg')) raises(ValueError, lambda: b21.subs(b1, b2, b3)) # dict(b1=foo) creates a string 'b1' but leaves foo unchanged; subs # will convert the first to a symbol but will raise an error if foo # cannot be sympified; sympification is strict if foo is not string raises(ValueError, lambda: b21.subs(b1='bad arg')) assert Symbol("text").subs({"text": b1}) == b1 assert Symbol("s").subs({"s": 1}) == 1 def test_subs_with_unicode_symbols(): expr = Symbol('var1') replaced = expr.subs('var1', 'x') assert replaced.name == 'x' replaced = expr.subs('var1', 'x') assert replaced.name == 'x' def test_atoms(): assert b21.atoms() == {Basic()} def test_free_symbols_empty(): assert b21.free_symbols == set() def test_doit(): assert b21.doit() == b21 assert b21.doit(deep=False) == b21 def test_S(): assert repr(S) == 'S' def test_xreplace(): assert b21.xreplace({b2: b1}) == Basic(b1, b1) assert b21.xreplace({b2: b21}) == Basic(b21, b1) assert b3.xreplace({b2: b1}) == b2 assert Basic(b1, b2).xreplace({b1: b2, b2: b1}) == Basic(b2, b1) assert Atom(b1).xreplace({b1: b2}) == Atom(b1) assert Atom(b1).xreplace({Atom(b1): b2}) == b2 raises(TypeError, lambda: b1.xreplace()) raises(TypeError, lambda: b1.xreplace([b1, b2])) for f in (exp, Function('f')): assert f.xreplace({}) == f assert f.xreplace({}, hack2=True) == f assert f.xreplace({f: b1}) == b1 assert f.xreplace({f: b1}, hack2=True) == b1 def test_sorted_args(): x = symbols('x') assert b21._sorted_args == b21.args raises(AttributeError, lambda: x._sorted_args) def test_call(): x, y = symbols('x y') # See the long history of this in issues 5026 and 5105. raises(TypeError, lambda: sin(x)({ x : 1, sin(x) : 2})) raises(TypeError, lambda: sin(x)(1)) # No effect as there are no callables assert sin(x).rcall(1) == sin(x) assert (1 + sin(x)).rcall(1) == 1 + sin(x) # Effect in the pressence of callables l = Lambda(x, 2*x) assert (l + x).rcall(y) == 2*y + x assert (x**l).rcall(2) == x**4 # TODO UndefinedFunction does not subclass Expr #f = Function('f') #assert (2*f)(x) == 2*f(x) assert (Q.real & Q.positive).rcall(x) == Q.real(x) & Q.positive(x) def test_rewrite(): x, y, z = symbols('x y z') a, b = symbols('a b') f1 = sin(x) + cos(x) assert f1.rewrite(cos,exp) == exp(I*x)/2 + sin(x) + exp(-I*x)/2 assert f1.rewrite([cos],sin) == sin(x) + sin(x + pi/2, evaluate=False) f2 = sin(x) + cos(y)/gamma(z) assert f2.rewrite(sin,exp) == -I*(exp(I*x) - exp(-I*x))/2 + cos(y)/gamma(z) assert f1.rewrite() == f1 def test_literal_evalf_is_number_is_zero_is_comparable(): x = symbols('x') f = Function('f') # issue 5033 assert f.is_number is False # issue 6646 assert f(1).is_number is False i = Integral(0, (x, x, x)) # expressions that are symbolically 0 can be difficult to prove # so in case there is some easy way to know if something is 0 # it should appear in the is_zero property for that object; # if is_zero is true evalf should always be able to compute that # zero assert i.n() == 0 assert i.is_zero assert i.is_number is False assert i.evalf(2, strict=False) == 0 # issue 10268 n = sin(1)**2 + cos(1)**2 - 1 assert n.is_comparable is False assert n.n(2).is_comparable is False assert n.n(2).n(2).is_comparable def test_as_Basic(): assert as_Basic(1) is S.One assert as_Basic(()) == Tuple() raises(TypeError, lambda: as_Basic([])) def test_atomic(): g, h = map(Function, 'gh') x = symbols('x') assert _atomic(g(x + h(x))) == {g(x + h(x))} assert _atomic(g(x + h(x)), recursive=True) == {h(x), x, g(x + h(x))} assert _atomic(1) == set() assert _atomic(Basic(1,2)) == {Basic(1, 2)} def test_as_dummy(): u, v, x, y, z, _0, _1 = symbols('u v x y z _0 _1') assert Lambda(x, x + 1).as_dummy() == Lambda(_0, _0 + 1) assert Lambda(x, x + _0).as_dummy() == Lambda(_1, _0 + _1) eq = (1 + Sum(x, (x, 1, x))) ans = 1 + Sum(_0, (_0, 1, x)) once = eq.as_dummy() assert once == ans twice = once.as_dummy() assert twice == ans assert Integral(x + _0, (x, x + 1), (_0, 1, 2) ).as_dummy() == Integral(_0 + _1, (_0, x + 1), (_1, 1, 2)) for T in (Symbol, Dummy): d = T('x', real=True) D = d.as_dummy() assert D != d and D.func == Dummy and D.is_real is None assert Dummy().as_dummy().is_commutative assert Dummy(commutative=False).as_dummy().is_commutative is False def test_canonical_variables(): x, i0, i1 = symbols('x _:2') assert Integral(x, (x, x + 1)).canonical_variables == {x: i0} assert Integral(x, (x, x + 1), (i0, 1, 2)).canonical_variables == { x: i0, i0: i1} assert Integral(x, (x, x + i0)).canonical_variables == {x: i1} def test_replace_exceptions(): from sympy.core.symbol import Wild x, y = symbols('x y') e = (x**2 + x*y) raises(TypeError, lambda: e.replace(sin, 2)) b = Wild('b') c = Wild('c') raises(TypeError, lambda: e.replace(b*c, c.is_real)) raises(TypeError, lambda: e.replace(b.is_real, 1)) raises(TypeError, lambda: e.replace(lambda d: d.is_Number, 1))
a349199f7a1a32275561d36379962dc78b94281a04dc0dad5a7d8d4b886eef64
from sympy.core.function import Function from sympy.core.numbers import (I, Rational) from sympy.core.singleton import S from sympy.core.symbol import Symbol from sympy.functions.elementary.exponential import exp from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import (cos, tan) from sympy.testing.pytest import XFAIL def test_add_eval(): a = Symbol("a") b = Symbol("b") c = Rational(1) p = Rational(5) assert a*b + c + p == a*b + 6 assert c + a + p == a + 6 assert c + a - p == a + (-4) assert a + a == 2*a assert a + p + a == 2*a + 5 assert c + p == Rational(6) assert b + a - b == a def test_addmul_eval(): a = Symbol("a") b = Symbol("b") c = Rational(1) p = Rational(5) assert c + a + b*c + a - p == 2*a + b + (-4) assert a*2 + p + a == a*2 + 5 + a assert a*2 + p + a == 3*a + 5 assert a*2 + a == 3*a def test_pow_eval(): # XXX Pow does not fully support conversion of negative numbers # to their complex equivalent assert sqrt(-1) == I assert sqrt(-4) == 2*I assert sqrt( 4) == 2 assert (8)**Rational(1, 3) == 2 assert (-8)**Rational(1, 3) == 2*((-1)**Rational(1, 3)) assert sqrt(-2) == I*sqrt(2) assert (-1)**Rational(1, 3) != I assert (-10)**Rational(1, 3) != I*((10)**Rational(1, 3)) assert (-2)**Rational(1, 4) != (2)**Rational(1, 4) assert 64**Rational(1, 3) == 4 assert 64**Rational(2, 3) == 16 assert 24/sqrt(64) == 3 assert (-27)**Rational(1, 3) == 3*(-1)**Rational(1, 3) assert (cos(2) / tan(2))**2 == (cos(2) / tan(2))**2 @XFAIL def test_pow_eval_X1(): assert (-1)**Rational(1, 3) == S.Half + S.Half*I*sqrt(3) def test_mulpow_eval(): x = Symbol('x') assert sqrt(50)/(sqrt(2)*x) == 5/x assert sqrt(27)/sqrt(3) == 3 def test_evalpow_bug(): x = Symbol("x") assert 1/(1/x) == x assert 1/(-1/x) == -x def test_symbol_expand(): x = Symbol('x') y = Symbol('y') f = x**4*y**4 assert f == x**4*y**4 assert f == f.expand() g = (x*y)**4 assert g == f assert g.expand() == f assert g.expand() == g.expand().expand() def test_function(): f, l = map(Function, 'fl') x = Symbol('x') assert exp(l(x))*l(x)/exp(l(x)) == l(x) assert exp(f(x))*f(x)/exp(f(x)) == f(x)
468389baee2431ee11924ede37254e268bf94b5efbd181e25408b388d20a776a
from sympy.core.numbers import Rational from sympy.core.symbol import (Dummy, Symbol) from sympy.functions.elementary.exponential import exp def test_equal(): b = Symbol("b") a = Symbol("a") e1 = a + b e2 = 2*a*b e3 = a**3*b**2 e4 = a*b + b*a assert not e1 == e2 assert not e1 == e2 assert e1 != e2 assert e2 == e4 assert e2 != e3 assert not e2 == e3 x = Symbol("x") e1 = exp(x + 1/x) y = Symbol("x") e2 = exp(y + 1/y) assert e1 == e2 assert not e1 != e2 y = Symbol("y") e2 = exp(y + 1/y) assert not e1 == e2 assert e1 != e2 e5 = Rational(3) + 2*x - x - x assert e5 == 3 assert 3 == e5 assert e5 != 4 assert 4 != e5 assert e5 != 3 + x assert 3 + x != e5 def test_expevalbug(): x = Symbol("x") e1 = exp(1*x) e3 = exp(x) assert e1 == e3 def test_cmp_bug1(): class T: pass t = T() x = Symbol("x") assert not (x == t) assert (x != t) def test_cmp_bug2(): class T: pass t = T() assert not (Symbol == t) assert (Symbol != t) def test_cmp_issue_4357(): """ Check that Basic subclasses can be compared with sympifiable objects. https://github.com/sympy/sympy/issues/4357 """ assert not (Symbol == 1) assert (Symbol != 1) assert not (Symbol == 'x') assert (Symbol != 'x') def test_dummy_eq(): x = Symbol('x') y = Symbol('y') u = Dummy('u') assert (u**2 + 1).dummy_eq(x**2 + 1) is True assert ((u**2 + 1) == (x**2 + 1)) is False assert (u**2 + y).dummy_eq(x**2 + y, x) is True assert (u**2 + y).dummy_eq(x**2 + y, y) is False
16bfa56a099ede5c0bac1a5d6963fb3bba0f7b38486ad9f95fc7d862cfbc6cdf
from sympy.core.function import (Derivative, Function, diff) from sympy.core.symbol import symbols from sympy.functions.elementary.trigonometric import sin from sympy.core.multidimensional import vectorize x, y, z = symbols('x y z') f, g, h = list(map(Function, 'fgh')) def test_vectorize(): @vectorize(0) def vsin(x): return sin(x) assert vsin([1, x, y]) == [sin(1), sin(x), sin(y)] @vectorize(0, 1) def vdiff(f, y): return diff(f, y) assert vdiff([f(x, y, z), g(x, y, z), h(x, y, z)], [x, y, z]) == \ [[Derivative(f(x, y, z), x), Derivative(f(x, y, z), y), Derivative(f(x, y, z), z)], [Derivative(g(x, y, z), x), Derivative(g(x, y, z), y), Derivative(g(x, y, z), z)], [Derivative(h(x, y, z), x), Derivative(h(x, y, z), y), Derivative(h(x, y, z), z)]]
991c5fb4a96bc71ae7df34b750fc2a905e8daf5e65e42bfa8f77364495f8eace
from sympy.core.expr import Expr from sympy.core.numbers import Integer from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.core.operations import AssocOp, LatticeOp from sympy.testing.pytest import raises from sympy.core.sympify import SympifyError from sympy.core.add import Add, add from sympy.core.mul import Mul, mul # create the simplest possible Lattice class class join(LatticeOp): zero = Integer(0) identity = Integer(1) def test_lattice_simple(): assert join(join(2, 3), 4) == join(2, join(3, 4)) assert join(2, 3) == join(3, 2) assert join(0, 2) == 0 assert join(1, 2) == 2 assert join(2, 2) == 2 assert join(join(2, 3), 4) == join(2, 3, 4) assert join() == 1 assert join(4) == 4 assert join(1, 4, 2, 3, 1, 3, 2) == join(2, 3, 4) def test_lattice_shortcircuit(): raises(SympifyError, lambda: join(object)) assert join(0, object) == 0 def test_lattice_print(): assert str(join(5, 4, 3, 2)) == 'join(2, 3, 4, 5)' def test_lattice_make_args(): assert join.make_args(join(2, 3, 4)) == {S(2), S(3), S(4)} assert join.make_args(0) == {0} assert list(join.make_args(0))[0] is S.Zero assert Add.make_args(0)[0] is S.Zero def test_issue_14025(): a, b, c, d = symbols('a,b,c,d', commutative=False) assert Mul(a, b, c).has(c*b) == False assert Mul(a, b, c).has(b*c) == True assert Mul(a, b, c, d).has(b*c*d) == True def test_AssocOp_flatten(): a, b, c, d = symbols('a,b,c,d') class MyAssoc(AssocOp): identity = S.One assert MyAssoc(a, MyAssoc(b, c)).args == \ MyAssoc(MyAssoc(a, b), c).args == \ MyAssoc(MyAssoc(a, b, c)).args == \ MyAssoc(a, b, c).args == \ (a, b, c) u = MyAssoc(b, c) v = MyAssoc(u, d, evaluate=False) assert v.args == (u, d) # like Add, any unevaluated outer call will flatten inner args assert MyAssoc(a, v).args == (a, b, c, d) def test_add_dispatcher(): class NewBase(Expr): @property def _add_handler(self): return NewAdd class NewAdd(NewBase, Add): pass add.register_handlerclass((Add, NewAdd), NewAdd) a, b = Symbol('a'), NewBase() # Add called as fallback assert add(1, 2) == Add(1, 2) assert add(a, a) == Add(a, a) # selection by registered priority assert add(a,b,a) == NewAdd(2*a, b) def test_mul_dispatcher(): class NewBase(Expr): @property def _mul_handler(self): return NewMul class NewMul(NewBase, Mul): pass mul.register_handlerclass((Mul, NewMul), NewMul) a, b = Symbol('a'), NewBase() # Mul called as fallback assert mul(1, 2) == Mul(1, 2) assert mul(a, a) == Mul(a, a) # selection by registered priority assert mul(a,b,a) == NewMul(a**2, b)
92834614cb7a50c9b36a12400d28dafde0f6e20afe186e60182b720e0091b4f2
from sympy.core.function import expand_complex from sympy.core.numbers import (I, Integer, Rational, pi) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.functions.elementary.complexes import (Abs, conjugate, im, re, sign) from sympy.functions.elementary.exponential import exp from sympy.functions.elementary.hyperbolic import (cosh, coth, sinh, tanh) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import (cos, cot, sin, tan) def test_complex(): a = Symbol("a", real=True) b = Symbol("b", real=True) e = (a + I*b)*(a - I*b) assert e.expand() == a**2 + b**2 assert sqrt(I) == Pow(I, S.Half) def test_conjugate(): a = Symbol("a", real=True) b = Symbol("b", real=True) c = Symbol("c", imaginary=True) d = Symbol("d", imaginary=True) x = Symbol('x') z = a + I*b + c + I*d zc = a - I*b - c + I*d assert conjugate(z) == zc assert conjugate(exp(z)) == exp(zc) assert conjugate(exp(I*x)) == exp(-I*conjugate(x)) assert conjugate(z**5) == zc**5 assert conjugate(abs(x)) == abs(x) assert conjugate(sign(z)) == sign(zc) assert conjugate(sin(z)) == sin(zc) assert conjugate(cos(z)) == cos(zc) assert conjugate(tan(z)) == tan(zc) assert conjugate(cot(z)) == cot(zc) assert conjugate(sinh(z)) == sinh(zc) assert conjugate(cosh(z)) == cosh(zc) assert conjugate(tanh(z)) == tanh(zc) assert conjugate(coth(z)) == coth(zc) def test_abs1(): a = Symbol("a", real=True) b = Symbol("b", real=True) assert abs(a) == Abs(a) assert abs(-a) == abs(a) assert abs(a + I*b) == sqrt(a**2 + b**2) def test_abs2(): a = Symbol("a", real=False) b = Symbol("b", real=False) assert abs(a) != a assert abs(-a) != a assert abs(a + I*b) != sqrt(a**2 + b**2) def test_evalc(): x = Symbol("x", real=True) y = Symbol("y", real=True) z = Symbol("z") assert ((x + I*y)**2).expand(complex=True) == x**2 + 2*I*x*y - y**2 assert expand_complex(z**(2*I)) == (re((re(z) + I*im(z))**(2*I)) + I*im((re(z) + I*im(z))**(2*I))) assert expand_complex( z**(2*I), deep=False) == I*im(z**(2*I)) + re(z**(2*I)) assert exp(I*x) != cos(x) + I*sin(x) assert exp(I*x).expand(complex=True) == cos(x) + I*sin(x) assert exp(I*x + y).expand(complex=True) == exp(y)*cos(x) + I*sin(x)*exp(y) assert sin(I*x).expand(complex=True) == I * sinh(x) assert sin(x + I*y).expand(complex=True) == sin(x)*cosh(y) + \ I * sinh(y) * cos(x) assert cos(I*x).expand(complex=True) == cosh(x) assert cos(x + I*y).expand(complex=True) == cos(x)*cosh(y) - \ I * sinh(y) * sin(x) assert tan(I*x).expand(complex=True) == tanh(x) * I assert tan(x + I*y).expand(complex=True) == ( sin(2*x)/(cos(2*x) + cosh(2*y)) + I*sinh(2*y)/(cos(2*x) + cosh(2*y))) assert sinh(I*x).expand(complex=True) == I * sin(x) assert sinh(x + I*y).expand(complex=True) == sinh(x)*cos(y) + \ I * sin(y) * cosh(x) assert cosh(I*x).expand(complex=True) == cos(x) assert cosh(x + I*y).expand(complex=True) == cosh(x)*cos(y) + \ I * sin(y) * sinh(x) assert tanh(I*x).expand(complex=True) == tan(x) * I assert tanh(x + I*y).expand(complex=True) == ( (sinh(x)*cosh(x) + I*cos(y)*sin(y)) / (sinh(x)**2 + cos(y)**2)).expand() def test_pythoncomplex(): x = Symbol("x") assert 4j*x != 4*x*I assert 4j*x == 4.0*x*I assert 4.1j*x != 4*x*I def test_rootcomplex(): R = Rational assert ((+1 + I)**R(1, 2)).expand( complex=True) == 2**R(1, 4)*cos( pi/8) + 2**R(1, 4)*sin( pi/8)*I assert ((-1 - I)**R(1, 2)).expand( complex=True) == 2**R(1, 4)*cos(3*pi/8) - 2**R(1, 4)*sin(3*pi/8)*I assert (sqrt(-10)*I).as_real_imag() == (-sqrt(10), 0) def test_expand_inverse(): assert (1/(1 + I)).expand(complex=True) == (1 - I)/2 assert ((1 + 2*I)**(-2)).expand(complex=True) == (-3 - 4*I)/25 assert ((1 + I)**(-8)).expand(complex=True) == Rational(1, 16) def test_expand_complex(): assert ((2 + 3*I)**10).expand(complex=True) == -341525 - 145668*I # the following two tests are to ensure the SymPy uses an efficient # algorithm for calculating powers of complex numbers. They should execute # in something like 0.01s. assert ((2 + 3*I)**1000).expand(complex=True) == \ -81079464736246615951519029367296227340216902563389546989376269312984127074385455204551402940331021387412262494620336565547972162814110386834027871072723273110439771695255662375718498785908345629702081336606863762777939617745464755635193139022811989314881997210583159045854968310911252660312523907616129080027594310008539817935736331124833163907518549408018652090650537035647520296539436440394920287688149200763245475036722326561143851304795139005599209239350981457301460233967137708519975586996623552182807311159141501424576682074392689622074945519232029999 + \ 46938745946789557590804551905243206242164799136976022474337918748798900569942573265747576032611189047943842446167719177749107138603040963603119861476016947257034472364028585381714774667326478071264878108114128915685688115488744955550920239128462489496563930809677159214598114273887061533057125164518549173898349061972857446844052995037423459472376202251620778517659247970283904820245958198842631651569984310559418135975795868314764489884749573052997832686979294085577689571149679540256349988338406458116270429842222666345146926395233040564229555893248370000*I assert ((2 + 3*I/4)**1000).expand(complex=True) == \ Integer(1)*37079892761199059751745775382463070250205990218394308874593455293485167797989691280095867197640410033222367257278387021789651672598831503296531725827158233077451476545928116965316544607115843772405184272449644892857783761260737279675075819921259597776770965829089907990486964515784097181964312256560561065607846661496055417619388874421218472707497847700629822858068783288579581649321248495739224020822198695759609598745114438265083593711851665996586461937988748911532242908776883696631067311443171682974330675406616373422505939887984366289623091300746049101284856530270685577940283077888955692921951247230006346681086274961362500646889925803654263491848309446197554307105991537357310209426736453173441104334496173618419659521888945605315751089087820455852582920963561495787655250624781448951403353654348109893478206364632640344111022531861683064175862889459084900614967785405977231549003280842218501570429860550379522498497412180001/114813069527425452423283320117768198402231770208869520047764273682576626139237031385665948631650626991844596463898746277344711896086305533142593135616665318539129989145312280000688779148240044871428926990063486244781615463646388363947317026040466353970904996558162398808944629605623311649536164221970332681344168908984458505602379484807914058900934776500429002716706625830522008132236281291761267883317206598995396418127021779858404042159853183251540889433902091920554957783589672039160081957216630582755380425583726015528348786419432054508915275783882625175435528800822842770817965453762184851149029376 + \ I*421638390580169706973991429333213477486930178424989246669892530737775352519112934278994501272111385966211392610029433824534634841747911783746811994443436271013377059560245191441549885048056920190833693041257216263519792201852046825443439142932464031501882145407459174948712992271510309541474392303461939389368955986650538525895866713074543004916049550090364398070215427272240155060576252568700906004691224321432509053286859100920489253598392100207663785243368195857086816912514025693453058403158416856847185079684216151337200057494966741268925263085619240941610301610538225414050394612058339070756009433535451561664522479191267503989904464718368605684297071150902631208673621618217106272361061676184840810762902463998065947687814692402219182668782278472952758690939877465065070481351343206840649517150634973307937551168752642148704904383991876969408056379195860410677814566225456558230131911142229028179902418223009651437985670625/1793954211366022694113801876840128100034871409513586250746316776290259783425578615401030447369541046747571819748417910583511123376348523955353017744010395602173906080395504375010762174191250701116076984219741972574712741619474818186676828531882286780795390571221287481389759837587864244524002565968286448146002639202882164150037179450123657170327105882819203167448541028601906377066191895183769810676831353109303069033234715310287563158747705988305326397404720186258671215368588625611876280581509852855552819149745718992630449787803625851701801184123166018366180137512856918294030710215034138299203584 assert ((2 + 3*I)**-1000).expand(complex=True) == \ Integer(1)*-81079464736246615951519029367296227340216902563389546989376269312984127074385455204551402940331021387412262494620336565547972162814110386834027871072723273110439771695255662375718498785908345629702081336606863762777939617745464755635193139022811989314881997210583159045854968310911252660312523907616129080027594310008539817935736331124833163907518549408018652090650537035647520296539436440394920287688149200763245475036722326561143851304795139005599209239350981457301460233967137708519975586996623552182807311159141501424576682074392689622074945519232029999/8777125472973511649630750050295188683351430110097915876250894978429797369155961290321829625004920141758416719066805645579710744290541337680113772670040386863849283653078324415471816788604945889094925784900885812724984087843737442111926413818245854362613018058774368703971604921858023116665586358870612944209398056562604561248859926344335598822815885851096698226775053153403320782439987679978321289537645645163767251396759519805603090332694449553371530571613352311006350058217982509738362083094920649452123351717366337410243853659113315547584871655479914439219520157174729130746351059075207407866012574386726064196992865627149566238044625779078186624347183905913357718850537058578084932880569701242598663149911276357125355850792073635533676541250531086757377369962506979378337216411188347761901006460813413505861461267545723590468627854202034450569581626648934062198718362303420281555886394558137408159453103395918783625713213314350531051312551733021627153081075080140680608080529736975658786227362251632725009435866547613598753584705455955419696609282059191031962604169242974038517575645939316377801594539335940001 - Integer(1)*46938745946789557590804551905243206242164799136976022474337918748798900569942573265747576032611189047943842446167719177749107138603040963603119861476016947257034472364028585381714774667326478071264878108114128915685688115488744955550920239128462489496563930809677159214598114273887061533057125164518549173898349061972857446844052995037423459472376202251620778517659247970283904820245958198842631651569984310559418135975795868314764489884749573052997832686979294085577689571149679540256349988338406458116270429842222666345146926395233040564229555893248370000*I/8777125472973511649630750050295188683351430110097915876250894978429797369155961290321829625004920141758416719066805645579710744290541337680113772670040386863849283653078324415471816788604945889094925784900885812724984087843737442111926413818245854362613018058774368703971604921858023116665586358870612944209398056562604561248859926344335598822815885851096698226775053153403320782439987679978321289537645645163767251396759519805603090332694449553371530571613352311006350058217982509738362083094920649452123351717366337410243853659113315547584871655479914439219520157174729130746351059075207407866012574386726064196992865627149566238044625779078186624347183905913357718850537058578084932880569701242598663149911276357125355850792073635533676541250531086757377369962506979378337216411188347761901006460813413505861461267545723590468627854202034450569581626648934062198718362303420281555886394558137408159453103395918783625713213314350531051312551733021627153081075080140680608080529736975658786227362251632725009435866547613598753584705455955419696609282059191031962604169242974038517575645939316377801594539335940001 assert ((2 + 3*I/4)**-1000).expand(complex=True) == \ Integer(1)*4257256305661027385394552848555894604806501409793288342610746813288539790051927148781268212212078237301273165351052934681382567968787279534591114913777456610214738290619922068269909423637926549603264174216950025398244509039145410016404821694746262142525173737175066432954496592560621330313807235750500564940782099283410261748370262433487444897446779072067625787246390824312580440138770014838135245148574339248259670887549732495841810961088930810608893772914812838358159009303794863047635845688453859317690488124382253918725010358589723156019888846606295866740117645571396817375322724096486161308083462637370825829567578309445855481578518239186117686659177284332344643124760453112513611749309168470605289172320376911472635805822082051716625171429727162039621902266619821870482519063133136820085579315127038372190224739238686708451840610064871885616258831386810233957438253532027049148030157164346719204500373766157143311767338973363806106967439378604898250533766359989107510507493549529158818602327525235240510049484816090584478644771183158342479140194633579061295740839490629457435283873180259847394582069479062820225159699506175855369539201399183443253793905149785994830358114153241481884290274629611529758663543080724574566578220908907477622643689220814376054314972190402285121776593824615083669045183404206291739005554569305329760211752815718335731118664756831942466773261465213581616104242113894521054475516019456867271362053692785300826523328020796670205463390909136593859765912483565093461468865534470710132881677639651348709376/2103100954337624833663208713697737151593634525061637972297915388685604042449504336765884978184588688426595940401280828953096857809292320006227881797146858511436638446932833617514351442216409828605662238790280753075176269765767010004889778647709740770757817960711900340755635772183674511158570690702969774966791073165467918123298694584729211212414462628433370481195120564586361368504153395406845170075275051749019600057116719726628746724489572189061061036426955163696859127711110719502594479795200686212257570291758725259007379710596548777812659422174199194837355646482046783616494013289495563083118517507178847555801163089723056310287760875135196081975602765511153122381201303871673391366630940702817360340900568748719988954847590748960761446218262344767250783946365392689256634180417145926390656439421745644011831124277463643383712803287985472471755648426749842410972650924240795946699346613614779460399530274263580007672855851663196114585312432954432654691485867618908420370875753749297487803461900447407917655296784879220450937110470920633595689721819488638484547259978337741496090602390463594556401615298457456112485536498177883358587125449801777718900375736758266215245325999241624148841915093787519330809347240990363802360596034171167818310322276373120180985148650099673289383722502488957717848531612020897298448601714154586319660314294591620415272119454982220034319689607295960162971300417552364254983071768070124456169427638371140064235083443242844616326538396503937972586505546495649094344512270582463639152160238137952390380581401171977159154009407415523525096743009110916334144716516647041176989758534635251844947906038080852185583742296318878233394998111078843229681030277039104786225656992262073797524057992347971177720807155842376332851559276430280477639539393920006008737472164850104411971830120295750221200029811143140323763349636629725073624360001 - Integer(1)*3098214262599218784594285246258841485430681674561917573155883806818465520660668045042109232930382494608383663464454841313154390741655282039877410154577448327874989496074260116195788919037407420625081798124301494353693248757853222257918294662198297114746822817460991242508743651430439120439020484502408313310689912381846149597061657483084652685283853595100434135149479564507015504022249330340259111426799121454516345905101620532787348293877485702600390665276070250119465888154331218827342488849948540687659846652377277250614246402784754153678374932540789808703029043827352976139228402417432199779415751301480406673762521987999573209628597459357964214510139892316208670927074795773830798600837815329291912002136924506221066071242281626618211060464126372574400100990746934953437169840312584285942093951405864225230033279614235191326102697164613004299868695519642598882914862568516635347204441042798206770888274175592401790040170576311989738272102077819127459014286741435419468254146418098278519775722104890854275995510700298782146199325790002255362719776098816136732897323406228294203133323296591166026338391813696715894870956511298793595675308998014158717167429941371979636895553724830981754579086664608880698350866487717403917070872269853194118364230971216854931998642990452908852258008095741042117326241406479532880476938937997238098399302185675832474590293188864060116934035867037219176916416481757918864533515526389079998129329045569609325290897577497835388451456680707076072624629697883854217331728051953671643278797380171857920000*I/2103100954337624833663208713697737151593634525061637972297915388685604042449504336765884978184588688426595940401280828953096857809292320006227881797146858511436638446932833617514351442216409828605662238790280753075176269765767010004889778647709740770757817960711900340755635772183674511158570690702969774966791073165467918123298694584729211212414462628433370481195120564586361368504153395406845170075275051749019600057116719726628746724489572189061061036426955163696859127711110719502594479795200686212257570291758725259007379710596548777812659422174199194837355646482046783616494013289495563083118517507178847555801163089723056310287760875135196081975602765511153122381201303871673391366630940702817360340900568748719988954847590748960761446218262344767250783946365392689256634180417145926390656439421745644011831124277463643383712803287985472471755648426749842410972650924240795946699346613614779460399530274263580007672855851663196114585312432954432654691485867618908420370875753749297487803461900447407917655296784879220450937110470920633595689721819488638484547259978337741496090602390463594556401615298457456112485536498177883358587125449801777718900375736758266215245325999241624148841915093787519330809347240990363802360596034171167818310322276373120180985148650099673289383722502488957717848531612020897298448601714154586319660314294591620415272119454982220034319689607295960162971300417552364254983071768070124456169427638371140064235083443242844616326538396503937972586505546495649094344512270582463639152160238137952390380581401171977159154009407415523525096743009110916334144716516647041176989758534635251844947906038080852185583742296318878233394998111078843229681030277039104786225656992262073797524057992347971177720807155842376332851559276430280477639539393920006008737472164850104411971830120295750221200029811143140323763349636629725073624360001 a = Symbol('a', real=True) b = Symbol('b', real=True) assert exp(a*(2 + I*b)).expand(complex=True) == \ I*exp(2*a)*sin(a*b) + exp(2*a)*cos(a*b) def test_expand(): f = (16 - 2*sqrt(29))**2 assert f.expand() == 372 - 64*sqrt(29) f = (Integer(1)/2 + I/2)**10 assert f.expand() == I/32 f = (Integer(1)/2 + I)**10 assert f.expand() == Integer(237)/1024 - 779*I/256 def test_re_im1652(): x = Symbol('x') assert re(x) == re(conjugate(x)) assert im(x) == - im(conjugate(x)) assert im(x)*re(conjugate(x)) + im(conjugate(x)) * re(x) == 0 def test_issue_5084(): x = Symbol('x') assert ((x + x*I)/(1 + I)).as_real_imag() == (re((x + I*x)/(1 + I) ), im((x + I*x)/(1 + I))) def test_issue_5236(): assert (cos(1 + I)**3).as_real_imag() == (-3*sin(1)**2*sinh(1)**2*cos(1)*cosh(1) + cos(1)**3*cosh(1)**3, -3*cos(1)**2*cosh(1)**2*sin(1)*sinh(1) + sin(1)**3*sinh(1)**3) def test_real_imag(): x, y, z = symbols('x, y, z') X, Y, Z = symbols('X, Y, Z', commutative=False) a = Symbol('a', real=True) assert (2*a*x).as_real_imag() == (2*a*re(x), 2*a*im(x)) # issue 5395: assert (x*x.conjugate()).as_real_imag() == (Abs(x)**2, 0) assert im(x*x.conjugate()) == 0 assert im(x*y.conjugate()*z*y) == im(x*z)*Abs(y)**2 assert im(x*y.conjugate()*x*y) == im(x**2)*Abs(y)**2 assert im(Z*y.conjugate()*X*y) == im(Z*X)*Abs(y)**2 assert im(X*X.conjugate()) == im(X*X.conjugate(), evaluate=False) assert (sin(x)*sin(x).conjugate()).as_real_imag() == \ (Abs(sin(x))**2, 0) # issue 6573: assert (x**2).as_real_imag() == (re(x)**2 - im(x)**2, 2*re(x)*im(x)) # issue 6428: r = Symbol('r', real=True) i = Symbol('i', imaginary=True) assert (i*r*x).as_real_imag() == (I*i*r*im(x), -I*i*r*re(x)) assert (i*r*x*(y + 2)).as_real_imag() == ( I*i*r*(re(y) + 2)*im(x) + I*i*r*re(x)*im(y), -I*i*r*(re(y) + 2)*re(x) + I*i*r*im(x)*im(y)) # issue 7106: assert ((1 + I)/(1 - I)).as_real_imag() == (0, 1) assert ((1 + 2*I)*(1 + 3*I)).as_real_imag() == (-5, 5) def test_pow_issue_1724(): e = ((S.NegativeOne)**(S.One/3)) assert e.conjugate().n() == e.n().conjugate() e = S('-2/3 - (-29/54 + sqrt(93)/18)**(1/3) - 1/(9*(-29/54 + sqrt(93)/18)**(1/3))') assert e.conjugate().n() == e.n().conjugate() e = 2**I assert e.conjugate().n() == e.n().conjugate() def test_issue_5429(): assert sqrt(I).conjugate() != sqrt(I) def test_issue_4124(): from sympy.core.numbers import oo assert expand_complex(I*oo) == oo*I def test_issue_11518(): x = Symbol("x", real=True) y = Symbol("y", real=True) r = sqrt(x**2 + y**2) assert conjugate(r) == r s = abs(x + I * y) assert conjugate(s) == r
eb6a4f5bf6587c50d4bd6142742d3fd72c76f6c3e495475371ae917fbe0fba03
from sympy.core.mul import Mul from sympy.core.numbers import (I, Rational as R, pi) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.core.symbol import Symbol from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import (cos, sin) from sympy.series.order import O from sympy.simplify.radsimp import expand_numer from sympy.core.function import expand, expand_multinomial, expand_power_base from sympy.testing.pytest import raises from sympy.testing.randtest import verify_numerically from sympy.abc import x, y, z def test_expand_no_log(): assert ( (1 + log(x**4))**2).expand(log=False) == 1 + 2*log(x**4) + log(x**4)**2 assert ((1 + log(x**4))*(1 + log(x**3))).expand( log=False) == 1 + log(x**4) + log(x**3) + log(x**4)*log(x**3) def test_expand_no_multinomial(): assert ((1 + x)*(1 + (1 + x)**4)).expand(multinomial=False) == \ 1 + x + (1 + x)**4 + x*(1 + x)**4 def test_expand_negative_integer_powers(): expr = (x + y)**(-2) assert expr.expand() == 1 / (2*x*y + x**2 + y**2) assert expr.expand(multinomial=False) == (x + y)**(-2) expr = (x + y)**(-3) assert expr.expand() == 1 / (3*x*x*y + 3*x*y*y + x**3 + y**3) assert expr.expand(multinomial=False) == (x + y)**(-3) expr = (x + y)**(2) * (x + y)**(-4) assert expr.expand() == 1 / (2*x*y + x**2 + y**2) assert expr.expand(multinomial=False) == (x + y)**(-2) def test_expand_non_commutative(): A = Symbol('A', commutative=False) B = Symbol('B', commutative=False) C = Symbol('C', commutative=False) a = Symbol('a') b = Symbol('b') i = Symbol('i', integer=True) n = Symbol('n', negative=True) m = Symbol('m', negative=True) p = Symbol('p', polar=True) np = Symbol('p', polar=False) assert (C*(A + B)).expand() == C*A + C*B assert (C*(A + B)).expand() != A*C + B*C assert ((A + B)**2).expand() == A**2 + A*B + B*A + B**2 assert ((A + B)**3).expand() == (A**2*B + B**2*A + A*B**2 + B*A**2 + A**3 + B**3 + A*B*A + B*A*B) # issue 6219 assert ((a*A*B*A**-1)**2).expand() == a**2*A*B**2/A # Note that (a*A*B*A**-1)**2 is automatically converted to a**2*(A*B*A**-1)**2 assert ((a*A*B*A**-1)**2).expand(deep=False) == a**2*(A*B*A**-1)**2 assert ((a*A*B*A**-1)**2).expand() == a**2*(A*B**2*A**-1) assert ((a*A*B*A**-1)**2).expand(force=True) == a**2*A*B**2*A**(-1) assert ((a*A*B)**2).expand() == a**2*A*B*A*B assert ((a*A)**2).expand() == a**2*A**2 assert ((a*A*B)**i).expand() == a**i*(A*B)**i assert ((a*A*(B*(A*B/A)**2))**i).expand() == a**i*(A*B*A*B**2/A)**i # issue 6558 assert (A*B*(A*B)**-1).expand() == 1 assert ((a*A)**i).expand() == a**i*A**i assert ((a*A*B*A**-1)**3).expand() == a**3*A*B**3/A assert ((a*A*B*A*B/A)**3).expand() == \ a**3*A*B*(A*B**2)*(A*B**2)*A*B*A**(-1) assert ((a*A*B*A*B/A)**-2).expand() == \ A*B**-1*A**-1*B**-2*A**-1*B**-1*A**-1/a**2 assert ((a*b*A*B*A**-1)**i).expand() == a**i*b**i*(A*B/A)**i assert ((a*(a*b)**i)**i).expand() == a**i*a**(i**2)*b**(i**2) e = Pow(Mul(a, 1/a, A, B, evaluate=False), S(2), evaluate=False) assert e.expand() == A*B*A*B assert sqrt(a*(A*b)**i).expand() == sqrt(a*b**i*A**i) assert (sqrt(-a)**a).expand() == sqrt(-a)**a assert expand((-2*n)**(i/3)) == 2**(i/3)*(-n)**(i/3) assert expand((-2*n*m)**(i/a)) == (-2)**(i/a)*(-n)**(i/a)*(-m)**(i/a) assert expand((-2*a*p)**b) == 2**b*p**b*(-a)**b assert expand((-2*a*np)**b) == 2**b*(-a*np)**b assert expand(sqrt(A*B)) == sqrt(A*B) assert expand(sqrt(-2*a*b)) == sqrt(2)*sqrt(-a*b) def test_expand_radicals(): a = (x + y)**R(1, 2) assert (a**1).expand() == a assert (a**3).expand() == x*a + y*a assert (a**5).expand() == x**2*a + 2*x*y*a + y**2*a assert (1/a**1).expand() == 1/a assert (1/a**3).expand() == 1/(x*a + y*a) assert (1/a**5).expand() == 1/(x**2*a + 2*x*y*a + y**2*a) a = (x + y)**R(1, 3) assert (a**1).expand() == a assert (a**2).expand() == a**2 assert (a**4).expand() == x*a + y*a assert (a**5).expand() == x*a**2 + y*a**2 assert (a**7).expand() == x**2*a + 2*x*y*a + y**2*a def test_expand_modulus(): assert ((x + y)**11).expand(modulus=11) == x**11 + y**11 assert ((x + sqrt(2)*y)**11).expand(modulus=11) == x**11 + 10*sqrt(2)*y**11 assert (x + y/2).expand(modulus=1) == y/2 raises(ValueError, lambda: ((x + y)**11).expand(modulus=0)) raises(ValueError, lambda: ((x + y)**11).expand(modulus=x)) def test_issue_5743(): assert (x*sqrt( x + y)*(1 + sqrt(x + y))).expand() == x**2 + x*y + x*sqrt(x + y) assert (x*sqrt( x + y)*(1 + x*sqrt(x + y))).expand() == x**3 + x**2*y + x*sqrt(x + y) def test_expand_frac(): assert expand((x + y)*y/x/(x + 1), frac=True) == \ (x*y + y**2)/(x**2 + x) assert expand((x + y)*y/x/(x + 1), numer=True) == \ (x*y + y**2)/(x*(x + 1)) assert expand((x + y)*y/x/(x + 1), denom=True) == \ y*(x + y)/(x**2 + x) eq = (x + 1)**2/y assert expand_numer(eq, multinomial=False) == eq def test_issue_6121(): eq = -I*exp(-3*I*pi/4)/(4*pi**(S(3)/2)*sqrt(x)) assert eq.expand(complex=True) # does not give oo recursion eq = -I*exp(-3*I*pi/4)/(4*pi**(R(3, 2))*sqrt(x)) assert eq.expand(complex=True) # does not give oo recursion def test_expand_power_base(): assert expand_power_base((x*y*z)**4) == x**4*y**4*z**4 assert expand_power_base((x*y*z)**x).is_Pow assert expand_power_base((x*y*z)**x, force=True) == x**x*y**x*z**x assert expand_power_base((x*(y*z)**2)**3) == x**3*y**6*z**6 assert expand_power_base((sin((x*y)**2)*y)**z).is_Pow assert expand_power_base( (sin((x*y)**2)*y)**z, force=True) == sin((x*y)**2)**z*y**z assert expand_power_base( (sin((x*y)**2)*y)**z, deep=True) == (sin(x**2*y**2)*y)**z assert expand_power_base(exp(x)**2) == exp(2*x) assert expand_power_base((exp(x)*exp(y))**2) == exp(2*x)*exp(2*y) assert expand_power_base( (exp((x*y)**z)*exp(y))**2) == exp(2*(x*y)**z)*exp(2*y) assert expand_power_base((exp((x*y)**z)*exp( y))**2, deep=True, force=True) == exp(2*x**z*y**z)*exp(2*y) assert expand_power_base((exp(x)*exp(y))**z).is_Pow assert expand_power_base( (exp(x)*exp(y))**z, force=True) == exp(x)**z*exp(y)**z def test_expand_arit(): a = Symbol("a") b = Symbol("b", positive=True) c = Symbol("c") p = R(5) e = (a + b)*c assert e == c*(a + b) assert (e.expand() - a*c - b*c) == R(0) e = (a + b)*(a + b) assert e == (a + b)**2 assert e.expand() == 2*a*b + a**2 + b**2 e = (a + b)*(a + b)**R(2) assert e == (a + b)**3 assert e.expand() == 3*b*a**2 + 3*a*b**2 + a**3 + b**3 assert e.expand() == 3*b*a**2 + 3*a*b**2 + a**3 + b**3 e = (a + b)*(a + c)*(b + c) assert e == (a + c)*(a + b)*(b + c) assert e.expand() == 2*a*b*c + b*a**2 + c*a**2 + b*c**2 + a*c**2 + c*b**2 + a*b**2 e = (a + R(1))**p assert e == (1 + a)**5 assert e.expand() == 1 + 5*a + 10*a**2 + 10*a**3 + 5*a**4 + a**5 e = (a + b + c)*(a + c + p) assert e == (5 + a + c)*(a + b + c) assert e.expand() == 5*a + 5*b + 5*c + 2*a*c + b*c + a*b + a**2 + c**2 x = Symbol("x") s = exp(x*x) - 1 e = s.nseries(x, 0, 6)/x**2 assert e.expand() == 1 + x**2/2 + O(x**4) e = (x*(y + z))**(x*(y + z))*(x + y) assert e.expand(power_exp=False, power_base=False) == x*(x*y + x* z)**(x*y + x*z) + y*(x*y + x*z)**(x*y + x*z) assert e.expand(power_exp=False, power_base=False, deep=False) == x* \ (x*(y + z))**(x*(y + z)) + y*(x*(y + z))**(x*(y + z)) e = x * (x + (y + 1)**2) assert e.expand(deep=False) == x**2 + x*(y + 1)**2 e = (x*(y + z))**z assert e.expand(power_base=True, mul=True, deep=True) in [x**z*(y + z)**z, (x*y + x*z)**z] assert ((2*y)**z).expand() == 2**z*y**z p = Symbol('p', positive=True) assert sqrt(-x).expand().is_Pow assert sqrt(-x).expand(force=True) == I*sqrt(x) assert ((2*y*p)**z).expand() == 2**z*p**z*y**z assert ((2*y*p*x)**z).expand() == 2**z*p**z*(x*y)**z assert ((2*y*p*x)**z).expand(force=True) == 2**z*p**z*x**z*y**z assert ((2*y*p*-pi)**z).expand() == 2**z*pi**z*p**z*(-y)**z assert ((2*y*p*-pi*x)**z).expand() == 2**z*pi**z*p**z*(-x*y)**z n = Symbol('n', negative=True) m = Symbol('m', negative=True) assert ((-2*x*y*n)**z).expand() == 2**z*(-n)**z*(x*y)**z assert ((-2*x*y*n*m)**z).expand() == 2**z*(-m)**z*(-n)**z*(-x*y)**z # issue 5482 assert sqrt(-2*x*n) == sqrt(2)*sqrt(-n)*sqrt(x) # issue 5605 (2) assert (cos(x + y)**2).expand(trig=True) in [ (-sin(x)*sin(y) + cos(x)*cos(y))**2, sin(x)**2*sin(y)**2 - 2*sin(x)*sin(y)*cos(x)*cos(y) + cos(x)**2*cos(y)**2 ] # Check that this isn't too slow x = Symbol('x') W = 1 for i in range(1, 21): W = W * (x - i) W = W.expand() assert W.has(-1672280820*x**15) def test_expand_mul(): # part of issue 20597 e = Mul(2, 3, evaluate=False) assert e.expand() == 6 e = Mul(2, 3, 1/x, evaluate = False) assert e.expand() == 6/x e = Mul(2, R(1, 3), evaluate=False) assert e.expand() == R(2, 3) def test_power_expand(): """Test for Pow.expand()""" a = Symbol('a') b = Symbol('b') p = (a + b)**2 assert p.expand() == a**2 + b**2 + 2*a*b p = (1 + 2*(1 + a))**2 assert p.expand() == 9 + 4*(a**2) + 12*a p = 2**(a + b) assert p.expand() == 2**a*2**b A = Symbol('A', commutative=False) B = Symbol('B', commutative=False) assert (2**(A + B)).expand() == 2**(A + B) assert (A**(a + b)).expand() != A**(a + b) def test_issues_5919_6830(): # issue 5919 n = -1 + 1/x z = n/x/(-n)**2 - 1/n/x assert expand(z) == 1/(x**2 - 2*x + 1) - 1/(x - 2 + 1/x) - 1/(-x + 1) # issue 6830 p = (1 + x)**2 assert expand_multinomial((1 + x*p)**2) == ( x**2*(x**4 + 4*x**3 + 6*x**2 + 4*x + 1) + 2*x*(x**2 + 2*x + 1) + 1) assert expand_multinomial((1 + (y + x)*p)**2) == ( 2*((x + y)*(x**2 + 2*x + 1)) + (x**2 + 2*x*y + y**2)* (x**4 + 4*x**3 + 6*x**2 + 4*x + 1) + 1) A = Symbol('A', commutative=False) p = (1 + A)**2 assert expand_multinomial((1 + x*p)**2) == ( x**2*(1 + 4*A + 6*A**2 + 4*A**3 + A**4) + 2*x*(1 + 2*A + A**2) + 1) assert expand_multinomial((1 + (y + x)*p)**2) == ( (x + y)*(1 + 2*A + A**2)*2 + (x**2 + 2*x*y + y**2)* (1 + 4*A + 6*A**2 + 4*A**3 + A**4) + 1) assert expand_multinomial((1 + (y + x)*p)**3) == ( (x + y)*(1 + 2*A + A**2)*3 + (x**2 + 2*x*y + y**2)*(1 + 4*A + 6*A**2 + 4*A**3 + A**4)*3 + (x**3 + 3*x**2*y + 3*x*y**2 + y**3)*(1 + 6*A + 15*A**2 + 20*A**3 + 15*A**4 + 6*A**5 + A**6) + 1) # unevaluate powers eq = (Pow((x + 1)*((A + 1)**2), 2, evaluate=False)) # - in this case the base is not an Add so no further # expansion is done assert expand_multinomial(eq) == \ (x**2 + 2*x + 1)*(1 + 4*A + 6*A**2 + 4*A**3 + A**4) # - but here, the expanded base *is* an Add so it gets expanded eq = (Pow(((A + 1)**2), 2, evaluate=False)) assert expand_multinomial(eq) == 1 + 4*A + 6*A**2 + 4*A**3 + A**4 # coverage def ok(a, b, n): e = (a + I*b)**n return verify_numerically(e, expand_multinomial(e)) for a in [2, S.Half]: for b in [3, R(1, 3)]: for n in range(2, 6): assert ok(a, b, n) assert expand_multinomial((x + 1 + O(z))**2) == \ 1 + 2*x + x**2 + O(z) assert expand_multinomial((x + 1 + O(z))**3) == \ 1 + 3*x + 3*x**2 + x**3 + O(z) assert expand_multinomial(3**(x + y + 3)) == 27*3**(x + y) def test_expand_log(): t = Symbol('t', positive=True) # after first expansion, -2*log(2) + log(4); then 0 after second assert expand(log(t**2) - log(t**2/4) - 2*log(2)) == 0
22418f72f2cee000958f92cc4f62148328faf05d5106f30a6e6d358aa4ce2b4e
"""Tests for noncommutative symbols and expressions.""" from sympy.core.function import expand from sympy.core.numbers import I from sympy.core.symbol import symbols from sympy.functions.elementary.complexes import (adjoint, conjugate, transpose) from sympy.functions.elementary.trigonometric import (cos, sin) from sympy.polys.polytools import (cancel, factor) from sympy.simplify.combsimp import combsimp from sympy.simplify.gammasimp import gammasimp from sympy.simplify.radsimp import (collect, radsimp, rcollect) from sympy.simplify.ratsimp import ratsimp from sympy.simplify.simplify import (posify, simplify) from sympy.simplify.trigsimp import trigsimp from sympy.abc import x, y, z from sympy.testing.pytest import XFAIL A, B, C = symbols("A B C", commutative=False) X = symbols("X", commutative=False, hermitian=True) Y = symbols("Y", commutative=False, antihermitian=True) def test_adjoint(): assert adjoint(A).is_commutative is False assert adjoint(A*A) == adjoint(A)**2 assert adjoint(A*B) == adjoint(B)*adjoint(A) assert adjoint(A*B**2) == adjoint(B)**2*adjoint(A) assert adjoint(A*B - B*A) == adjoint(B)*adjoint(A) - adjoint(A)*adjoint(B) assert adjoint(A + I*B) == adjoint(A) - I*adjoint(B) assert adjoint(X) == X assert adjoint(-I*X) == I*X assert adjoint(Y) == -Y assert adjoint(-I*Y) == -I*Y assert adjoint(X) == conjugate(transpose(X)) assert adjoint(Y) == conjugate(transpose(Y)) assert adjoint(X) == transpose(conjugate(X)) assert adjoint(Y) == transpose(conjugate(Y)) def test_cancel(): assert cancel(A*B - B*A) == A*B - B*A assert cancel(A*B*(x - 1)) == A*B*(x - 1) assert cancel(A*B*(x**2 - 1)/(x + 1)) == A*B*(x - 1) assert cancel(A*B*(x**2 - 1)/(x + 1) - B*A*(x - 1)) == A*B*(x - 1) + (1 - x)*B*A @XFAIL def test_collect(): assert collect(A*B - B*A, A) == A*B - B*A assert collect(A*B - B*A, B) == A*B - B*A assert collect(A*B - B*A, x) == A*B - B*A def test_combsimp(): assert combsimp(A*B - B*A) == A*B - B*A def test_gammasimp(): assert gammasimp(A*B - B*A) == A*B - B*A def test_conjugate(): assert conjugate(A).is_commutative is False assert (A*A).conjugate() == conjugate(A)**2 assert (A*B).conjugate() == conjugate(A)*conjugate(B) assert (A*B**2).conjugate() == conjugate(A)*conjugate(B)**2 assert (A*B - B*A).conjugate() == \ conjugate(A)*conjugate(B) - conjugate(B)*conjugate(A) assert (A*B).conjugate() - (B*A).conjugate() == \ conjugate(A)*conjugate(B) - conjugate(B)*conjugate(A) assert (A + I*B).conjugate() == conjugate(A) - I*conjugate(B) def test_expand(): assert expand((A*B)**2) == A*B*A*B assert expand(A*B - B*A) == A*B - B*A assert expand((A*B/A)**2) == A*B*B/A assert expand(B*A*(A + B)*B) == B*A**2*B + B*A*B**2 assert expand(B*A*(A + C)*B) == B*A**2*B + B*A*C*B def test_factor(): assert factor(A*B - B*A) == A*B - B*A def test_posify(): assert posify(A)[0].is_commutative is False for q in (A*B/A, (A*B/A)**2, (A*B)**2, A*B - B*A): p = posify(q) assert p[0].subs(p[1]) == q def test_radsimp(): assert radsimp(A*B - B*A) == A*B - B*A @XFAIL def test_ratsimp(): assert ratsimp(A*B - B*A) == A*B - B*A @XFAIL def test_rcollect(): assert rcollect(A*B - B*A, A) == A*B - B*A assert rcollect(A*B - B*A, B) == A*B - B*A assert rcollect(A*B - B*A, x) == A*B - B*A def test_simplify(): assert simplify(A*B - B*A) == A*B - B*A def test_subs(): assert (x*y*A).subs(x*y, z) == A*z assert (x*A*B).subs(x*A, C) == C*B assert (x*A*x*x).subs(x**2*A, C) == x*C assert (x*A*x*B).subs(x**2*A, C) == C*B assert (A**2*B**2).subs(A*B**2, C) == A*C assert (A*A*A + A*B*A).subs(A*A*A, C) == C + A*B*A def test_transpose(): assert transpose(A).is_commutative is False assert transpose(A*A) == transpose(A)**2 assert transpose(A*B) == transpose(B)*transpose(A) assert transpose(A*B**2) == transpose(B)**2*transpose(A) assert transpose(A*B - B*A) == \ transpose(B)*transpose(A) - transpose(A)*transpose(B) assert transpose(A + I*B) == transpose(A) + I*transpose(B) assert transpose(X) == conjugate(X) assert transpose(-I*X) == -I*conjugate(X) assert transpose(Y) == -conjugate(Y) assert transpose(-I*Y) == I*conjugate(Y) def test_trigsimp(): assert trigsimp(A*sin(x)**2 + A*cos(x)**2) == A
70b9f9488811127d956c3ea4d2726be49880287e9e54012f944b765faae52255
"""Tests for tools for manipulating of large commutative expressions. """ from sympy.concrete.summations import Sum from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.containers import (Dict, Tuple) from sympy.core.function import Function from sympy.core.mul import Mul from sympy.core.numbers import (I, Rational, oo) from sympy.core.singleton import S from sympy.core.symbol import (Dummy, Symbol, symbols) from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.miscellaneous import (root, sqrt) from sympy.functions.elementary.trigonometric import (cos, sin) from sympy.integrals.integrals import Integral from sympy.series.order import O from sympy.sets.sets import Interval from sympy.simplify.radsimp import collect from sympy.simplify.simplify import simplify from sympy.core.exprtools import (decompose_power, Factors, Term, _gcd_terms, gcd_terms, factor_terms, factor_nc, _mask_nc, _monotonic_sign) from sympy.core.mul import _keep_coeff as _keep_coeff from sympy.simplify.cse_opts import sub_pre from sympy.testing.pytest import raises from sympy.abc import a, b, t, x, y, z def test_decompose_power(): assert decompose_power(x) == (x, 1) assert decompose_power(x**2) == (x, 2) assert decompose_power(x**(2*y)) == (x**y, 2) assert decompose_power(x**(2*y/3)) == (x**(y/3), 2) assert decompose_power(x**(y*Rational(2, 3))) == (x**(y/3), 2) def test_Factors(): assert Factors() == Factors({}) == Factors(S.One) assert Factors().as_expr() is S.One assert Factors({x: 2, y: 3, sin(x): 4}).as_expr() == x**2*y**3*sin(x)**4 assert Factors(S.Infinity) == Factors({oo: 1}) assert Factors(S.NegativeInfinity) == Factors({oo: 1, -1: 1}) # issue #18059: assert Factors((x**2)**S.Half).as_expr() == (x**2)**S.Half a = Factors({x: 5, y: 3, z: 7}) b = Factors({ y: 4, z: 3, t: 10}) assert a.mul(b) == a*b == Factors({x: 5, y: 7, z: 10, t: 10}) assert a.div(b) == divmod(a, b) == \ (Factors({x: 5, z: 4}), Factors({y: 1, t: 10})) assert a.quo(b) == a/b == Factors({x: 5, z: 4}) assert a.rem(b) == a % b == Factors({y: 1, t: 10}) assert a.pow(3) == a**3 == Factors({x: 15, y: 9, z: 21}) assert b.pow(3) == b**3 == Factors({y: 12, z: 9, t: 30}) assert a.gcd(b) == Factors({y: 3, z: 3}) assert a.lcm(b) == Factors({x: 5, y: 4, z: 7, t: 10}) a = Factors({x: 4, y: 7, t: 7}) b = Factors({z: 1, t: 3}) assert a.normal(b) == (Factors({x: 4, y: 7, t: 4}), Factors({z: 1})) assert Factors(sqrt(2)*x).as_expr() == sqrt(2)*x assert Factors(-I)*I == Factors() assert Factors({S.NegativeOne: S(3)})*Factors({S.NegativeOne: S.One, I: S(5)}) == \ Factors(I) assert Factors(sqrt(I)*I) == Factors(I**(S(3)/2)) == Factors({I: S(3)/2}) assert Factors({I: S(3)/2}).as_expr() == I**(S(3)/2) assert Factors(S(2)**x).div(S(3)**x) == \ (Factors({S(2): x}), Factors({S(3): x})) assert Factors(2**(2*x + 2)).div(S(8)) == \ (Factors({S(2): 2*x + 2}), Factors({S(8): S.One})) # coverage # /!\ things break if this is not True assert Factors({S.NegativeOne: Rational(3, 2)}) == Factors({I: S.One, S.NegativeOne: S.One}) assert Factors({I: S.One, S.NegativeOne: Rational(1, 3)}).as_expr() == I*(-1)**Rational(1, 3) assert Factors(-1.) == Factors({S.NegativeOne: S.One, S(1.): 1}) assert Factors(-2.) == Factors({S.NegativeOne: S.One, S(2.): 1}) assert Factors((-2.)**x) == Factors({S(-2.): x}) assert Factors(S(-2)) == Factors({S.NegativeOne: S.One, S(2): 1}) assert Factors(S.Half) == Factors({S(2): -S.One}) assert Factors(Rational(3, 2)) == Factors({S(3): S.One, S(2): S.NegativeOne}) assert Factors({I: S.One}) == Factors(I) assert Factors({-1.0: 2, I: 1}) == Factors({S(1.0): 1, I: 1}) assert Factors({S.NegativeOne: Rational(-3, 2)}).as_expr() == I A = symbols('A', commutative=False) assert Factors(2*A**2) == Factors({S(2): 1, A**2: 1}) assert Factors(I) == Factors({I: S.One}) assert Factors(x).normal(S(2)) == (Factors(x), Factors(S(2))) assert Factors(x).normal(S.Zero) == (Factors(), Factors(S.Zero)) raises(ZeroDivisionError, lambda: Factors(x).div(S.Zero)) assert Factors(x).mul(S(2)) == Factors(2*x) assert Factors(x).mul(S.Zero).is_zero assert Factors(x).mul(1/x).is_one assert Factors(x**sqrt(2)**3).as_expr() == x**(2*sqrt(2)) assert Factors(x)**Factors(S(2)) == Factors(x**2) assert Factors(x).gcd(S.Zero) == Factors(x) assert Factors(x).lcm(S.Zero).is_zero assert Factors(S.Zero).div(x) == (Factors(S.Zero), Factors()) assert Factors(x).div(x) == (Factors(), Factors()) assert Factors({x: .2})/Factors({x: .2}) == Factors() assert Factors(x) != Factors() assert Factors(S.Zero).normal(x) == (Factors(S.Zero), Factors()) n, d = x**(2 + y), x**2 f = Factors(n) assert f.div(d) == f.normal(d) == (Factors(x**y), Factors()) assert f.gcd(d) == Factors() d = x**y assert f.div(d) == f.normal(d) == (Factors(x**2), Factors()) assert f.gcd(d) == Factors(d) n = d = 2**x f = Factors(n) assert f.div(d) == f.normal(d) == (Factors(), Factors()) assert f.gcd(d) == Factors(d) n, d = 2**x, 2**y f = Factors(n) assert f.div(d) == f.normal(d) == (Factors({S(2): x}), Factors({S(2): y})) assert f.gcd(d) == Factors() # extraction of constant only n = x**(x + 3) assert Factors(n).normal(x**-3) == (Factors({x: x + 6}), Factors({})) assert Factors(n).normal(x**3) == (Factors({x: x}), Factors({})) assert Factors(n).normal(x**4) == (Factors({x: x}), Factors({x: 1})) assert Factors(n).normal(x**(y - 3)) == \ (Factors({x: x + 6}), Factors({x: y})) assert Factors(n).normal(x**(y + 3)) == (Factors({x: x}), Factors({x: y})) assert Factors(n).normal(x**(y + 4)) == \ (Factors({x: x}), Factors({x: y + 1})) assert Factors(n).div(x**-3) == (Factors({x: x + 6}), Factors({})) assert Factors(n).div(x**3) == (Factors({x: x}), Factors({})) assert Factors(n).div(x**4) == (Factors({x: x}), Factors({x: 1})) assert Factors(n).div(x**(y - 3)) == \ (Factors({x: x + 6}), Factors({x: y})) assert Factors(n).div(x**(y + 3)) == (Factors({x: x}), Factors({x: y})) assert Factors(n).div(x**(y + 4)) == \ (Factors({x: x}), Factors({x: y + 1})) assert Factors(3 * x / 2) == Factors({3: 1, 2: -1, x: 1}) assert Factors(x * x / y) == Factors({x: 2, y: -1}) assert Factors(27 * x / y**9) == Factors({27: 1, x: 1, y: -9}) def test_Term(): a = Term(4*x*y**2/z/t**3) b = Term(2*x**3*y**5/t**3) assert a == Term(4, Factors({x: 1, y: 2}), Factors({z: 1, t: 3})) assert b == Term(2, Factors({x: 3, y: 5}), Factors({t: 3})) assert a.as_expr() == 4*x*y**2/z/t**3 assert b.as_expr() == 2*x**3*y**5/t**3 assert a.inv() == \ Term(S.One/4, Factors({z: 1, t: 3}), Factors({x: 1, y: 2})) assert b.inv() == Term(S.Half, Factors({t: 3}), Factors({x: 3, y: 5})) assert a.mul(b) == a*b == \ Term(8, Factors({x: 4, y: 7}), Factors({z: 1, t: 6})) assert a.quo(b) == a/b == Term(2, Factors({}), Factors({x: 2, y: 3, z: 1})) assert a.pow(3) == a**3 == \ Term(64, Factors({x: 3, y: 6}), Factors({z: 3, t: 9})) assert b.pow(3) == b**3 == Term(8, Factors({x: 9, y: 15}), Factors({t: 9})) assert a.pow(-3) == a**(-3) == \ Term(S.One/64, Factors({z: 3, t: 9}), Factors({x: 3, y: 6})) assert b.pow(-3) == b**(-3) == \ Term(S.One/8, Factors({t: 9}), Factors({x: 9, y: 15})) assert a.gcd(b) == Term(2, Factors({x: 1, y: 2}), Factors({t: 3})) assert a.lcm(b) == Term(4, Factors({x: 3, y: 5}), Factors({z: 1, t: 3})) a = Term(4*x*y**2/z/t**3) b = Term(2*x**3*y**5*t**7) assert a.mul(b) == Term(8, Factors({x: 4, y: 7, t: 4}), Factors({z: 1})) assert Term((2*x + 2)**3) == Term(8, Factors({x + 1: 3}), Factors({})) assert Term((2*x + 2)*(3*x + 6)**2) == \ Term(18, Factors({x + 1: 1, x + 2: 2}), Factors({})) def test_gcd_terms(): f = 2*(x + 1)*(x + 4)/(5*x**2 + 5) + (2*x + 2)*(x + 5)/(x**2 + 1)/5 + \ (2*x + 2)*(x + 6)/(5*x**2 + 5) assert _gcd_terms(f) == ((Rational(6, 5))*((1 + x)/(1 + x**2)), 5 + x, 1) assert _gcd_terms(Add.make_args(f)) == \ ((Rational(6, 5))*((1 + x)/(1 + x**2)), 5 + x, 1) newf = (Rational(6, 5))*((1 + x)*(5 + x)/(1 + x**2)) assert gcd_terms(f) == newf args = Add.make_args(f) # non-Basic sequences of terms treated as terms of Add assert gcd_terms(list(args)) == newf assert gcd_terms(tuple(args)) == newf assert gcd_terms(set(args)) == newf # but a Basic sequence is treated as a container assert gcd_terms(Tuple(*args)) != newf assert gcd_terms(Basic(Tuple(1, 3*y + 3*x*y), Tuple(1, 3))) == \ Basic((1, 3*y*(x + 1)), (1, 3)) # but we shouldn't change keys of a dictionary or some may be lost assert gcd_terms(Dict((x*(1 + y), 2), (x + x*y, y + x*y))) == \ Dict({x*(y + 1): 2, x + x*y: y*(1 + x)}) assert gcd_terms((2*x + 2)**3 + (2*x + 2)**2) == 4*(x + 1)**2*(2*x + 3) assert gcd_terms(0) == 0 assert gcd_terms(1) == 1 assert gcd_terms(x) == x assert gcd_terms(2 + 2*x) == Mul(2, 1 + x, evaluate=False) arg = x*(2*x + 4*y) garg = 2*x*(x + 2*y) assert gcd_terms(arg) == garg assert gcd_terms(sin(arg)) == sin(garg) # issue 6139-like alpha, alpha1, alpha2, alpha3 = symbols('alpha:4') a = alpha**2 - alpha*x**2 + alpha + x**3 - x*(alpha + 1) rep = (alpha, (1 + sqrt(5))/2 + alpha1*x + alpha2*x**2 + alpha3*x**3) s = (a/(x - alpha)).subs(*rep).series(x, 0, 1) assert simplify(collect(s, x)) == -sqrt(5)/2 - Rational(3, 2) + O(x) # issue 5917 assert _gcd_terms([S.Zero, S.Zero]) == (0, 0, 1) assert _gcd_terms([2*x + 4]) == (2, x + 2, 1) eq = x/(x + 1/x) assert gcd_terms(eq, fraction=False) == eq eq = x/2/y + 1/x/y assert gcd_terms(eq, fraction=True, clear=True) == \ (x**2 + 2)/(2*x*y) assert gcd_terms(eq, fraction=True, clear=False) == \ (x**2/2 + 1)/(x*y) assert gcd_terms(eq, fraction=False, clear=True) == \ (x + 2/x)/(2*y) assert gcd_terms(eq, fraction=False, clear=False) == \ (x/2 + 1/x)/y def test_factor_terms(): A = Symbol('A', commutative=False) assert factor_terms(9*(x + x*y + 1) + (3*x + 3)**(2 + 2*x)) == \ 9*x*y + 9*x + _keep_coeff(S(3), x + 1)**_keep_coeff(S(2), x + 1) + 9 assert factor_terms(9*(x + x*y + 1) + (3)**(2 + 2*x)) == \ _keep_coeff(S(9), 3**(2*x) + x*y + x + 1) assert factor_terms(3**(2 + 2*x) + a*3**(2 + 2*x)) == \ 9*3**(2*x)*(a + 1) assert factor_terms(x + x*A) == \ x*(1 + A) assert factor_terms(sin(x + x*A)) == \ sin(x*(1 + A)) assert factor_terms((3*x + 3)**((2 + 2*x)/3)) == \ _keep_coeff(S(3), x + 1)**_keep_coeff(Rational(2, 3), x + 1) assert factor_terms(x + (x*y + x)**(3*x + 3)) == \ x + (x*(y + 1))**_keep_coeff(S(3), x + 1) assert factor_terms(a*(x + x*y) + b*(x*2 + y*x*2)) == \ x*(a + 2*b)*(y + 1) i = Integral(x, (x, 0, oo)) assert factor_terms(i) == i assert factor_terms(x/2 + y) == x/2 + y # fraction doesn't apply to integer denominators assert factor_terms(x/2 + y, fraction=True) == x/2 + y # clear *does* apply to the integer denominators assert factor_terms(x/2 + y, clear=True) == Mul(S.Half, x + 2*y, evaluate=False) # check radical extraction eq = sqrt(2) + sqrt(10) assert factor_terms(eq) == eq assert factor_terms(eq, radical=True) == sqrt(2)*(1 + sqrt(5)) eq = root(-6, 3) + root(6, 3) assert factor_terms(eq, radical=True) == 6**(S.One/3)*(1 + (-1)**(S.One/3)) eq = [x + x*y] ans = [x*(y + 1)] for c in [list, tuple, set]: assert factor_terms(c(eq)) == c(ans) assert factor_terms(Tuple(x + x*y)) == Tuple(x*(y + 1)) assert factor_terms(Interval(0, 1)) == Interval(0, 1) e = 1/sqrt(a/2 + 1) assert factor_terms(e, clear=False) == 1/sqrt(a/2 + 1) assert factor_terms(e, clear=True) == sqrt(2)/sqrt(a + 2) eq = x/(x + 1/x) + 1/(x**2 + 1) assert factor_terms(eq, fraction=False) == eq assert factor_terms(eq, fraction=True) == 1 assert factor_terms((1/(x**3 + x**2) + 2/x**2)*y) == \ y*(2 + 1/(x + 1))/x**2 # if not True, then processesing for this in factor_terms is not necessary assert gcd_terms(-x - y) == -x - y assert factor_terms(-x - y) == Mul(-1, x + y, evaluate=False) # if not True, then "special" processesing in factor_terms is not necessary assert gcd_terms(exp(Mul(-1, x + 1))) == exp(-x - 1) e = exp(-x - 2) + x assert factor_terms(e) == exp(Mul(-1, x + 2, evaluate=False)) + x assert factor_terms(e, sign=False) == e assert factor_terms(exp(-4*x - 2) - x) == -x + exp(Mul(-2, 2*x + 1, evaluate=False)) # sum/integral tests for F in (Sum, Integral): assert factor_terms(F(x, (y, 1, 10))) == x * F(1, (y, 1, 10)) assert factor_terms(F(x, (y, 1, 10)) + x) == x * (1 + F(1, (y, 1, 10))) assert factor_terms(F(x*y + x*y**2, (y, 1, 10))) == x*F(y*(y + 1), (y, 1, 10)) def test_xreplace(): e = Mul(2, 1 + x, evaluate=False) assert e.xreplace({}) == e assert e.xreplace({y: x}) == e def test_factor_nc(): x, y = symbols('x,y') k = symbols('k', integer=True) n, m, o = symbols('n,m,o', commutative=False) # mul and multinomial expansion is needed from sympy.core.function import _mexpand e = x*(1 + y)**2 assert _mexpand(e) == x + x*2*y + x*y**2 def factor_nc_test(e): ex = _mexpand(e) assert ex.is_Add f = factor_nc(ex) assert not f.is_Add and _mexpand(f) == ex factor_nc_test(x*(1 + y)) factor_nc_test(n*(x + 1)) factor_nc_test(n*(x + m)) factor_nc_test((x + m)*n) factor_nc_test(n*m*(x*o + n*o*m)*n) s = Sum(x, (x, 1, 2)) factor_nc_test(x*(1 + s)) factor_nc_test(x*(1 + s)*s) factor_nc_test(x*(1 + sin(s))) factor_nc_test((1 + n)**2) factor_nc_test((x + n)*(x + m)*(x + y)) factor_nc_test(x*(n*m + 1)) factor_nc_test(x*(n*m + x)) factor_nc_test(x*(x*n*m + 1)) factor_nc_test(x*n*(x*m + 1)) factor_nc_test(x*(m*n + x*n*m)) factor_nc_test(n*(1 - m)*n**2) factor_nc_test((n + m)**2) factor_nc_test((n - m)*(n + m)**2) factor_nc_test((n + m)**2*(n - m)) factor_nc_test((m - n)*(n + m)**2*(n - m)) assert factor_nc(n*(n + n*m)) == n**2*(1 + m) assert factor_nc(m*(m*n + n*m*n**2)) == m*(m + n*m*n)*n eq = m*sin(n) - sin(n)*m assert factor_nc(eq) == eq # for coverage: from sympy.physics.secondquant import Commutator from sympy.polys.polytools import factor eq = 1 + x*Commutator(m, n) assert factor_nc(eq) == eq eq = x*Commutator(m, n) + x*Commutator(m, o)*Commutator(m, n) assert factor(eq) == x*(1 + Commutator(m, o))*Commutator(m, n) # issue 6534 assert (2*n + 2*m).factor() == 2*(n + m) # issue 6701 assert factor_nc(n**k + n**(k + 1)) == n**k*(1 + n) assert factor_nc((m*n)**k + (m*n)**(k + 1)) == (1 + m*n)*(m*n)**k # issue 6918 assert factor_nc(-n*(2*x**2 + 2*x)) == -2*n*x*(x + 1) def test_issue_6360(): a, b = symbols("a b") apb = a + b eq = apb + apb**2*(-2*a - 2*b) assert factor_terms(sub_pre(eq)) == a + b - 2*(a + b)**3 def test_issue_7903(): a = symbols(r'a', real=True) t = exp(I*cos(a)) + exp(-I*sin(a)) assert t.simplify() def test_issue_8263(): F, G = symbols('F, G', commutative=False, cls=Function) x, y = symbols('x, y') expr, dummies, _ = _mask_nc(F(x)*G(y) - G(y)*F(x)) for v in dummies.values(): assert not v.is_commutative assert not expr.is_zero def test_monotonic_sign(): F = _monotonic_sign x = symbols('x') assert F(x) is None assert F(-x) is None assert F(Dummy(prime=True)) == 2 assert F(Dummy(prime=True, odd=True)) == 3 assert F(Dummy(composite=True)) == 4 assert F(Dummy(composite=True, odd=True)) == 9 assert F(Dummy(positive=True, integer=True)) == 1 assert F(Dummy(positive=True, even=True)) == 2 assert F(Dummy(positive=True, even=True, prime=False)) == 4 assert F(Dummy(negative=True, integer=True)) == -1 assert F(Dummy(negative=True, even=True)) == -2 assert F(Dummy(zero=True)) == 0 assert F(Dummy(nonnegative=True)) == 0 assert F(Dummy(nonpositive=True)) == 0 assert F(Dummy(positive=True) + 1).is_positive assert F(Dummy(positive=True, integer=True) - 1).is_nonnegative assert F(Dummy(positive=True) - 1) is None assert F(Dummy(negative=True) + 1) is None assert F(Dummy(negative=True, integer=True) - 1).is_nonpositive assert F(Dummy(negative=True) - 1).is_negative assert F(-Dummy(positive=True) + 1) is None assert F(-Dummy(positive=True, integer=True) - 1).is_negative assert F(-Dummy(positive=True) - 1).is_negative assert F(-Dummy(negative=True) + 1).is_positive assert F(-Dummy(negative=True, integer=True) - 1).is_nonnegative assert F(-Dummy(negative=True) - 1) is None x = Dummy(negative=True) assert F(x**3).is_nonpositive assert F(x**3 + log(2)*x - 1).is_negative x = Dummy(positive=True) assert F(-x**3).is_nonpositive p = Dummy(positive=True) assert F(1/p).is_positive assert F(p/(p + 1)).is_positive p = Dummy(nonnegative=True) assert F(p/(p + 1)).is_nonnegative p = Dummy(positive=True) assert F(-1/p).is_negative p = Dummy(nonpositive=True) assert F(p/(-p + 1)).is_nonpositive p = Dummy(positive=True, integer=True) q = Dummy(positive=True, integer=True) assert F(-2/p/q).is_negative assert F(-2/(p - 1)/q) is None assert F((p - 1)*q + 1).is_positive assert F(-(p - 1)*q - 1).is_negative def test_issue_17256(): from sympy.sets.fancysets import Range x = Symbol('x') s1 = Sum(x + 1, (x, 1, 9)) s2 = Sum(x + 1, (x, Range(1, 10))) a = Symbol('a') r1 = s1.xreplace({x:a}) r2 = s2.xreplace({x:a}) r1.doit() == r2.doit() s1 = Sum(x + 1, (x, 0, 9)) s2 = Sum(x + 1, (x, Range(10))) a = Symbol('a') r1 = s1.xreplace({x:a}) r2 = s2.xreplace({x:a}) assert r1 == r2 def test_issue_21623(): from sympy.matrices.expressions.matexpr import MatrixSymbol M = MatrixSymbol('X', 2, 2) assert gcd_terms(M[0,0], 1) == M[0,0]
d1deef6d5b8a8b71829b73ca2ed88daaffc0bbbbfa458b75af345d1e20f4f2d3
from sympy.core.basic import Basic from sympy.core.mul import Mul from sympy.core.symbol import (Symbol, symbols) from sympy.testing.pytest import XFAIL class SymbolInMulOnce(Symbol): # Test class for a symbol that can only appear once in a `Mul` expression. pass Basic._constructor_postprocessor_mapping[SymbolInMulOnce] = { "Mul": [lambda x: x], "Pow": [lambda x: x.base if isinstance(x.base, SymbolInMulOnce) else x], "Add": [lambda x: x], } def _postprocess_SymbolRemovesOtherSymbols(expr): args = tuple(i for i in expr.args if not isinstance(i, Symbol) or isinstance(i, SymbolRemovesOtherSymbols)) if args == expr.args: return expr return Mul.fromiter(args) class SymbolRemovesOtherSymbols(Symbol): # Test class for a symbol that removes other symbols in `Mul`. pass Basic._constructor_postprocessor_mapping[SymbolRemovesOtherSymbols] = { "Mul": [_postprocess_SymbolRemovesOtherSymbols], } class SubclassSymbolInMulOnce(SymbolInMulOnce): pass class SubclassSymbolRemovesOtherSymbols(SymbolRemovesOtherSymbols): pass def test_constructor_postprocessors1(): x = SymbolInMulOnce("x") y = SymbolInMulOnce("y") assert isinstance(3*x, Mul) assert (3*x).args == (3, x) assert x*x == x assert 3*x*x == 3*x assert 2*x*x + x == 3*x assert x**3*y*y == x*y assert x**5 + y*x**3 == x + x*y w = SymbolRemovesOtherSymbols("w") assert x*w == w assert (3*w).args == (3, w) assert set((w + x).args) == {x, w} def test_constructor_postprocessors2(): x = SubclassSymbolInMulOnce("x") y = SubclassSymbolInMulOnce("y") assert isinstance(3*x, Mul) assert (3*x).args == (3, x) assert x*x == x assert 3*x*x == 3*x assert 2*x*x + x == 3*x assert x**3*y*y == x*y assert x**5 + y*x**3 == x + x*y w = SubclassSymbolRemovesOtherSymbols("w") assert x*w == w assert (3*w).args == (3, w) assert set((w + x).args) == {x, w} @XFAIL def test_subexpression_postprocessors(): # The postprocessors used to work with subexpressions, but the # functionality was removed. See #15948. a = symbols("a") x = SymbolInMulOnce("x") w = SymbolRemovesOtherSymbols("w") assert 3*a*w**2 == 3*w**2 assert 3*a*x**3*w**2 == 3*w**2 x = SubclassSymbolInMulOnce("x") w = SubclassSymbolRemovesOtherSymbols("w") assert 3*a*w**2 == 3*w**2 assert 3*a*x**3*w**2 == 3*w**2
9516524a18ab4d6ec645f6205370372d1956efdc443ea8bad97b6825e68cb83b
from sympy.abc import x, y from sympy.core.parameters import evaluate from sympy.core import Mul, Add, Pow, S from sympy.core.numbers import oo from sympy.functions.elementary.miscellaneous import sqrt def test_add(): with evaluate(False): p = oo - oo assert isinstance(p, Add) and p.args == (oo, -oo) p = 5 - oo assert isinstance(p, Add) and p.args == (-oo, 5) p = oo - 5 assert isinstance(p, Add) and p.args == (oo, -5) p = oo + 5 assert isinstance(p, Add) and p.args == (oo, 5) p = 5 + oo assert isinstance(p, Add) and p.args == (oo, 5) p = -oo + 5 assert isinstance(p, Add) and p.args == (-oo, 5) p = -5 - oo assert isinstance(p, Add) and p.args == (-oo, -5) with evaluate(False): expr = x + x assert isinstance(expr, Add) assert expr.args == (x, x) with evaluate(True): assert (x + x).args == (2, x) assert (x + x).args == (x, x) assert isinstance(x + x, Mul) with evaluate(False): assert S.One + 1 == Add(1, 1) assert 1 + S.One == Add(1, 1) assert S(4) - 3 == Add(4, -3) assert -3 + S(4) == Add(4, -3) assert S(2) * 4 == Mul(2, 4) assert 4 * S(2) == Mul(2, 4) assert S(6) / 3 == Mul(6, Pow(3, -1)) assert S.One / 3 * 6 == Mul(S.One / 3, 6) assert 9 ** S(2) == Pow(9, 2) assert S(2) ** 9 == Pow(2, 9) assert S(2) / 2 == Mul(2, Pow(2, -1)) assert S.One / 2 * 2 == Mul(S.One / 2, 2) assert S(2) / 3 + 1 == Add(S(2) / 3, 1) assert 1 + S(2) / 3 == Add(1, S(2) / 3) assert S(4) / 7 - 3 == Add(S(4) / 7, -3) assert -3 + S(4) / 7 == Add(-3, S(4) / 7) assert S(2) / 4 * 4 == Mul(S(2) / 4, 4) assert 4 * (S(2) / 4) == Mul(4, S(2) / 4) assert S(6) / 3 == Mul(6, Pow(3, -1)) assert S.One / 3 * 6 == Mul(S.One / 3, 6) assert S.One / 3 + sqrt(3) == Add(S.One / 3, sqrt(3)) assert sqrt(3) + S.One / 3 == Add(sqrt(3), S.One / 3) assert S.One / 2 * 10.333 == Mul(S.One / 2, 10.333) assert 10.333 * (S.One / 2) == Mul(10.333, S.One / 2) assert sqrt(2) * sqrt(2) == Mul(sqrt(2), sqrt(2)) assert S.One / 2 + x == Add(S.One / 2, x) assert x + S.One / 2 == Add(x, S.One / 2) assert S.One / x * x == Mul(S.One / x, x) assert x * (S.One / x) == Mul(x, Pow(x, -1)) assert S.One / 3 == Pow(3, -1) assert S.One / x == Pow(x, -1) assert 1 / S(3) == Pow(3, -1) assert 1 / x == Pow(x, -1) def test_nested(): with evaluate(False): expr = (x + x) + (y + y) assert expr.args == ((x + x), (y + y)) assert expr.args[0].args == (x, x)
96cb26751707f2943fb7d6c8e1fca070273d5abd5dd20978c9321eb316acd4ba
from sympy.core import ( Basic, Rational, Symbol, S, Float, Integer, Mul, Number, Pow, Expr, I, nan, pi, symbols, oo, zoo, N) from sympy.core.parameters import global_parameters from sympy.core.tests.test_evalf import NS from sympy.core.function import expand_multinomial from sympy.functions.elementary.miscellaneous import sqrt, cbrt from sympy.functions.elementary.exponential import exp, log from sympy.functions.special.error_functions import erf from sympy.functions.elementary.trigonometric import ( sin, cos, tan, sec, csc, sinh, cosh, tanh, atan) from sympy.polys import Poly from sympy.series.order import O from sympy.sets import FiniteSet from sympy.core.power import power from sympy.testing.pytest import warns_deprecated_sympy, _both_exp_pow def test_rational(): a = Rational(1, 5) r = sqrt(5)/5 assert sqrt(a) == r assert 2*sqrt(a) == 2*r r = a*a**S.Half assert a**Rational(3, 2) == r assert 2*a**Rational(3, 2) == 2*r r = a**5*a**Rational(2, 3) assert a**Rational(17, 3) == r assert 2 * a**Rational(17, 3) == 2*r def test_large_rational(): e = (Rational(123712**12 - 1, 7) + Rational(1, 7))**Rational(1, 3) assert e == 234232585392159195136 * (Rational(1, 7)**Rational(1, 3)) def test_negative_real(): def feq(a, b): return abs(a - b) < 1E-10 assert feq(S.One / Float(-0.5), -Integer(2)) def test_expand(): x = Symbol('x') assert (2**(-1 - x)).expand() == S.Half*2**(-x) def test_issue_3449(): #test if powers are simplified correctly #see also issue 3995 x = Symbol('x') assert ((x**Rational(1, 3))**Rational(2)) == x**Rational(2, 3) assert ( (x**Rational(3))**Rational(2, 5)) == (x**Rational(3))**Rational(2, 5) a = Symbol('a', real=True) b = Symbol('b', real=True) assert (a**2)**b == (abs(a)**b)**2 assert sqrt(1/a) != 1/sqrt(a) # e.g. for a = -1 assert (a**3)**Rational(1, 3) != a assert (x**a)**b != x**(a*b) # e.g. x = -1, a=2, b=1/2 assert (x**.5)**b == x**(.5*b) assert (x**.5)**.5 == x**.25 assert (x**2.5)**.5 != x**1.25 # e.g. for x = 5*I k = Symbol('k', integer=True) m = Symbol('m', integer=True) assert (x**k)**m == x**(k*m) assert Number(5)**Rational(2, 3) == Number(25)**Rational(1, 3) assert (x**.5)**2 == x**1.0 assert (x**2)**k == (x**k)**2 == x**(2*k) a = Symbol('a', positive=True) assert (a**3)**Rational(2, 5) == a**Rational(6, 5) assert (a**2)**b == (a**b)**2 assert (a**Rational(2, 3))**x == a**(x*Rational(2, 3)) != (a**x)**Rational(2, 3) def test_issue_3866(): assert --sqrt(sqrt(5) - 1) == sqrt(sqrt(5) - 1) def test_negative_one(): x = Symbol('x', complex=True) y = Symbol('y', complex=True) assert 1/x**y == x**(-y) def test_issue_4362(): neg = Symbol('neg', negative=True) nonneg = Symbol('nonneg', nonnegative=True) any = Symbol('any') num, den = sqrt(1/neg).as_numer_denom() assert num == sqrt(-1) assert den == sqrt(-neg) num, den = sqrt(1/nonneg).as_numer_denom() assert num == 1 assert den == sqrt(nonneg) num, den = sqrt(1/any).as_numer_denom() assert num == sqrt(1/any) assert den == 1 def eqn(num, den, pow): return (num/den)**pow npos = 1 nneg = -1 dpos = 2 - sqrt(3) dneg = 1 - sqrt(3) assert dpos > 0 and dneg < 0 and npos > 0 and nneg < 0 # pos or neg integer eq = eqn(npos, dpos, 2) assert eq.is_Pow and eq.as_numer_denom() == (1, dpos**2) eq = eqn(npos, dneg, 2) assert eq.is_Pow and eq.as_numer_denom() == (1, dneg**2) eq = eqn(nneg, dpos, 2) assert eq.is_Pow and eq.as_numer_denom() == (1, dpos**2) eq = eqn(nneg, dneg, 2) assert eq.is_Pow and eq.as_numer_denom() == (1, dneg**2) eq = eqn(npos, dpos, -2) assert eq.is_Pow and eq.as_numer_denom() == (dpos**2, 1) eq = eqn(npos, dneg, -2) assert eq.is_Pow and eq.as_numer_denom() == (dneg**2, 1) eq = eqn(nneg, dpos, -2) assert eq.is_Pow and eq.as_numer_denom() == (dpos**2, 1) eq = eqn(nneg, dneg, -2) assert eq.is_Pow and eq.as_numer_denom() == (dneg**2, 1) # pos or neg rational pow = S.Half eq = eqn(npos, dpos, pow) assert eq.is_Pow and eq.as_numer_denom() == (npos**pow, dpos**pow) eq = eqn(npos, dneg, pow) assert eq.is_Pow is False and eq.as_numer_denom() == ((-npos)**pow, (-dneg)**pow) eq = eqn(nneg, dpos, pow) assert not eq.is_Pow or eq.as_numer_denom() == (nneg**pow, dpos**pow) eq = eqn(nneg, dneg, pow) assert eq.is_Pow and eq.as_numer_denom() == ((-nneg)**pow, (-dneg)**pow) eq = eqn(npos, dpos, -pow) assert eq.is_Pow and eq.as_numer_denom() == (dpos**pow, npos**pow) eq = eqn(npos, dneg, -pow) assert eq.is_Pow is False and eq.as_numer_denom() == (-(-npos)**pow*(-dneg)**pow, npos) eq = eqn(nneg, dpos, -pow) assert not eq.is_Pow or eq.as_numer_denom() == (dpos**pow, nneg**pow) eq = eqn(nneg, dneg, -pow) assert eq.is_Pow and eq.as_numer_denom() == ((-dneg)**pow, (-nneg)**pow) # unknown exponent pow = 2*any eq = eqn(npos, dpos, pow) assert eq.is_Pow and eq.as_numer_denom() == (npos**pow, dpos**pow) eq = eqn(npos, dneg, pow) assert eq.is_Pow and eq.as_numer_denom() == ((-npos)**pow, (-dneg)**pow) eq = eqn(nneg, dpos, pow) assert eq.is_Pow and eq.as_numer_denom() == (nneg**pow, dpos**pow) eq = eqn(nneg, dneg, pow) assert eq.is_Pow and eq.as_numer_denom() == ((-nneg)**pow, (-dneg)**pow) eq = eqn(npos, dpos, -pow) assert eq.as_numer_denom() == (dpos**pow, npos**pow) eq = eqn(npos, dneg, -pow) assert eq.is_Pow and eq.as_numer_denom() == ((-dneg)**pow, (-npos)**pow) eq = eqn(nneg, dpos, -pow) assert eq.is_Pow and eq.as_numer_denom() == (dpos**pow, nneg**pow) eq = eqn(nneg, dneg, -pow) assert eq.is_Pow and eq.as_numer_denom() == ((-dneg)**pow, (-nneg)**pow) x = Symbol('x') y = Symbol('y') assert ((1/(1 + x/3))**(-S.One)).as_numer_denom() == (3 + x, 3) notp = Symbol('notp', positive=False) # not positive does not imply real b = ((1 + x/notp)**-2) assert (b**(-y)).as_numer_denom() == (1, b**y) assert (b**(-S.One)).as_numer_denom() == ((notp + x)**2, notp**2) nonp = Symbol('nonp', nonpositive=True) assert (((1 + x/nonp)**-2)**(-S.One)).as_numer_denom() == ((-nonp - x)**2, nonp**2) n = Symbol('n', negative=True) assert (x**n).as_numer_denom() == (1, x**-n) assert sqrt(1/n).as_numer_denom() == (S.ImaginaryUnit, sqrt(-n)) n = Symbol('0 or neg', nonpositive=True) # if x and n are split up without negating each term and n is negative # then the answer might be wrong; if n is 0 it won't matter since # 1/oo and 1/zoo are both zero as is sqrt(0)/sqrt(-x) unless x is also # zero (in which case the negative sign doesn't matter): # 1/sqrt(1/-1) = -I but sqrt(-1)/sqrt(1) = I assert (1/sqrt(x/n)).as_numer_denom() == (sqrt(-n), sqrt(-x)) c = Symbol('c', complex=True) e = sqrt(1/c) assert e.as_numer_denom() == (e, 1) i = Symbol('i', integer=True) assert ((1 + x/y)**i).as_numer_denom() == ((x + y)**i, y**i) def test_Pow_Expr_args(): x = Symbol('x') bases = [Basic(), Poly(x, x), FiniteSet(x)] for base in bases: with warns_deprecated_sympy(): Pow(base, S.One) def test_Pow_signs(): """Cf. issues 4595 and 5250""" x = Symbol('x') y = Symbol('y') n = Symbol('n', even=True) assert (3 - y)**2 != (y - 3)**2 assert (3 - y)**n != (y - 3)**n assert (-3 + y - x)**2 != (3 - y + x)**2 assert (y - 3)**3 != -(3 - y)**3 def test_power_with_noncommutative_mul_as_base(): x = Symbol('x', commutative=False) y = Symbol('y', commutative=False) assert not (x*y)**3 == x**3*y**3 assert (2*x*y)**3 == 8*(x*y)**3 @_both_exp_pow def test_power_rewrite_exp(): assert (I**I).rewrite(exp) == exp(-pi/2) expr = (2 + 3*I)**(4 + 5*I) assert expr.rewrite(exp) == exp((4 + 5*I)*(log(sqrt(13)) + I*atan(Rational(3, 2)))) assert expr.rewrite(exp).expand() == \ 169*exp(5*I*log(13)/2)*exp(4*I*atan(Rational(3, 2)))*exp(-5*atan(Rational(3, 2))) assert ((6 + 7*I)**5).rewrite(exp) == 7225*sqrt(85)*exp(5*I*atan(Rational(7, 6))) expr = 5**(6 + 7*I) assert expr.rewrite(exp) == exp((6 + 7*I)*log(5)) assert expr.rewrite(exp).expand() == 15625*exp(7*I*log(5)) assert Pow(123, 789, evaluate=False).rewrite(exp) == 123**789 assert (1**I).rewrite(exp) == 1**I assert (0**I).rewrite(exp) == 0**I expr = (-2)**(2 + 5*I) assert expr.rewrite(exp) == exp((2 + 5*I)*(log(2) + I*pi)) assert expr.rewrite(exp).expand() == 4*exp(-5*pi)*exp(5*I*log(2)) assert ((-2)**S(-5)).rewrite(exp) == (-2)**S(-5) x, y = symbols('x y') assert (x**y).rewrite(exp) == exp(y*log(x)) if global_parameters.exp_is_pow: assert (7**x).rewrite(exp) == Pow(S.Exp1, x*log(7), evaluate=False) else: assert (7**x).rewrite(exp) == exp(x*log(7), evaluate=False) assert ((2 + 3*I)**x).rewrite(exp) == exp(x*(log(sqrt(13)) + I*atan(Rational(3, 2)))) assert (y**(5 + 6*I)).rewrite(exp) == exp(log(y)*(5 + 6*I)) assert all((1/func(x)).rewrite(exp) == 1/(func(x).rewrite(exp)) for func in (sin, cos, tan, sec, csc, sinh, cosh, tanh)) def test_zero(): x = Symbol('x') y = Symbol('y') assert 0**x != 0 assert 0**(2*x) == 0**x assert 0**(1.0*x) == 0**x assert 0**(2.0*x) == 0**x assert (0**(2 - x)).as_base_exp() == (0, 2 - x) assert 0**(x - 2) != S.Infinity**(2 - x) assert 0**(2*x*y) == 0**(x*y) assert 0**(-2*x*y) == S.ComplexInfinity**(x*y) assert Float(0)**2 is not S.Zero assert Float(0)**2 == 0.0 assert Float(0)**-2 is zoo assert Float(0)**oo is S.Zero #Test issue 19572 assert 0 ** -oo is zoo assert power(0, -oo) is zoo assert Float(0)**-oo is zoo def test_pow_as_base_exp(): x = Symbol('x') assert (S.Infinity**(2 - x)).as_base_exp() == (S.Infinity, 2 - x) assert (S.Infinity**(x - 2)).as_base_exp() == (S.Infinity, x - 2) p = S.Half**x assert p.base, p.exp == p.as_base_exp() == (S(2), -x) # issue 8344: assert Pow(1, 2, evaluate=False).as_base_exp() == (S.One, S(2)) def test_nseries(): x = Symbol('x') assert sqrt(I*x - 1)._eval_nseries(x, 4, None, 1) == I + x/2 + I*x**2/8 - x**3/16 + O(x**4) assert sqrt(I*x - 1)._eval_nseries(x, 4, None, -1) == -I - x/2 - I*x**2/8 + x**3/16 + O(x**4) assert cbrt(I*x - 1)._eval_nseries(x, 4, None, 1) == (-1)**(S(1)/3) - (-1)**(S(5)/6)*x/3 + \ (-1)**(S(1)/3)*x**2/9 + 5*(-1)**(S(5)/6)*x**3/81 + O(x**4) assert cbrt(I*x - 1)._eval_nseries(x, 4, None, -1) == (-1)**(S(1)/3)*exp(-2*I*pi/3) - \ (-1)**(S(5)/6)*x*exp(-2*I*pi/3)/3 + (-1)**(S(1)/3)*x**2*exp(-2*I*pi/3)/9 + \ 5*(-1)**(S(5)/6)*x**3*exp(-2*I*pi/3)/81 + O(x**4) assert (1 / (exp(-1/x) + 1/x))._eval_nseries(x, 2, None) == x + O(x**2) def test_issue_6100_12942_4473(): x = Symbol('x') y = Symbol('y') assert x**1.0 != x assert x != x**1.0 assert True != x**1.0 assert x**1.0 is not True assert x is not True assert x*y != (x*y)**1.0 # Pow != Symbol assert (x**1.0)**1.0 != x assert (x**1.0)**2.0 != x**2 b = Expr() assert Pow(b, 1.0, evaluate=False) != b # if the following gets distributed as a Mul (x**1.0*y**1.0 then # __eq__ methods could be added to Symbol and Pow to detect the # power-of-1.0 case. assert ((x*y)**1.0).func is Pow def test_issue_6208(): from sympy.functions.elementary.miscellaneous import root assert sqrt(33**(I*Rational(9, 10))) == -33**(I*Rational(9, 20)) assert root((6*I)**(2*I), 3).as_base_exp()[1] == Rational(1, 3) # != 2*I/3 assert root((6*I)**(I/3), 3).as_base_exp()[1] == I/9 assert sqrt(exp(3*I)) == exp(I*Rational(3, 2)) assert sqrt(-sqrt(3)*(1 + 2*I)) == sqrt(sqrt(3))*sqrt(-1 - 2*I) assert sqrt(exp(5*I)) == -exp(I*Rational(5, 2)) assert root(exp(5*I), 3).exp == Rational(1, 3) def test_issue_6990(): x = Symbol('x') a = Symbol('a') b = Symbol('b') assert (sqrt(a + b*x + x**2)).series(x, 0, 3).removeO() == \ sqrt(a)*x**2*(1/(2*a) - b**2/(8*a**2)) + sqrt(a) + b*x/(2*sqrt(a)) def test_issue_6068(): x = Symbol('x') assert sqrt(sin(x)).series(x, 0, 7) == \ sqrt(x) - x**Rational(5, 2)/12 + x**Rational(9, 2)/1440 - \ x**Rational(13, 2)/24192 + O(x**7) assert sqrt(sin(x)).series(x, 0, 9) == \ sqrt(x) - x**Rational(5, 2)/12 + x**Rational(9, 2)/1440 - \ x**Rational(13, 2)/24192 - 67*x**Rational(17, 2)/29030400 + O(x**9) assert sqrt(sin(x**3)).series(x, 0, 19) == \ x**Rational(3, 2) - x**Rational(15, 2)/12 + x**Rational(27, 2)/1440 + O(x**19) assert sqrt(sin(x**3)).series(x, 0, 20) == \ x**Rational(3, 2) - x**Rational(15, 2)/12 + x**Rational(27, 2)/1440 - \ x**Rational(39, 2)/24192 + O(x**20) def test_issue_6782(): x = Symbol('x') assert sqrt(sin(x**3)).series(x, 0, 7) == x**Rational(3, 2) + O(x**7) assert sqrt(sin(x**4)).series(x, 0, 3) == x**2 + O(x**3) def test_issue_6653(): x = Symbol('x') assert (1 / sqrt(1 + sin(x**2))).series(x, 0, 3) == 1 - x**2/2 + O(x**3) def test_issue_6429(): x = Symbol('x') c = Symbol('c') f = (c**2 + x)**(0.5) assert f.series(x, x0=0, n=1) == (c**2)**0.5 + O(x) assert f.taylor_term(0, x) == (c**2)**0.5 assert f.taylor_term(1, x) == 0.5*x*(c**2)**(-0.5) assert f.taylor_term(2, x) == -0.125*x**2*(c**2)**(-1.5) def test_issue_7638(): f = pi/log(sqrt(2)) assert ((1 + I)**(I*f/2))**0.3 == (1 + I)**(0.15*I*f) # if 1/3 -> 1.0/3 this should fail since it cannot be shown that the # sign will be +/-1; for the previous "small arg" case, it didn't matter # that this could not be proved assert (1 + I)**(4*I*f) == ((1 + I)**(12*I*f))**Rational(1, 3) assert (((1 + I)**(I*(1 + 7*f)))**Rational(1, 3)).exp == Rational(1, 3) r = symbols('r', real=True) assert sqrt(r**2) == abs(r) assert cbrt(r**3) != r assert sqrt(Pow(2*I, 5*S.Half)) != (2*I)**Rational(5, 4) p = symbols('p', positive=True) assert cbrt(p**2) == p**Rational(2, 3) assert NS(((0.2 + 0.7*I)**(0.7 + 1.0*I))**(0.5 - 0.1*I), 1) == '0.4 + 0.2*I' assert sqrt(1/(1 + I)) == sqrt(1 - I)/sqrt(2) # or 1/sqrt(1 + I) e = 1/(1 - sqrt(2)) assert sqrt(e) == I/sqrt(-1 + sqrt(2)) assert e**Rational(-1, 2) == -I*sqrt(-1 + sqrt(2)) assert sqrt((cos(1)**2 + sin(1)**2 - 1)**(3 + I)).exp in [S.Half, Rational(3, 2) + I/2] assert sqrt(r**Rational(4, 3)) != r**Rational(2, 3) assert sqrt((p + I)**Rational(4, 3)) == (p + I)**Rational(2, 3) assert sqrt((p - p**2*I)**2) == p - p**2*I assert sqrt((p**2*I - p)**2) == p**2*I - p # XXX ok? assert sqrt((p + r*I)**2) != p + r*I e = (1 + I/5) assert sqrt(e**5) == e**(5*S.Half) assert sqrt(e**6) == e**3 assert sqrt((1 + I*r)**6) != (1 + I*r)**3 def test_issue_8582(): assert 1**oo is nan assert 1**(-oo) is nan assert 1**zoo is nan assert 1**(oo + I) is nan assert 1**(1 + I*oo) is nan assert 1**(oo + I*oo) is nan def test_issue_8650(): n = Symbol('n', integer=True, nonnegative=True) assert (n**n).is_positive is True x = 5*n + 5 assert (x**(5*(n + 1))).is_positive is True def test_issue_13914(): b = Symbol('b') assert (-1)**zoo is nan assert 2**zoo is nan assert (S.Half)**(1 + zoo) is nan assert I**(zoo + I) is nan assert b**(I + zoo) is nan def test_better_sqrt(): n = Symbol('n', integer=True, nonnegative=True) assert sqrt(3 + 4*I) == 2 + I assert sqrt(3 - 4*I) == 2 - I assert sqrt(-3 - 4*I) == 1 - 2*I assert sqrt(-3 + 4*I) == 1 + 2*I assert sqrt(32 + 24*I) == 6 + 2*I assert sqrt(32 - 24*I) == 6 - 2*I assert sqrt(-32 - 24*I) == 2 - 6*I assert sqrt(-32 + 24*I) == 2 + 6*I # triple (3, 4, 5): # parity of 3 matches parity of 5 and # den, 4, is a square assert sqrt((3 + 4*I)/4) == 1 + I/2 # triple (8, 15, 17) # parity of 8 doesn't match parity of 17 but # den/2, 8/2, is a square assert sqrt((8 + 15*I)/8) == (5 + 3*I)/4 # handle the denominator assert sqrt((3 - 4*I)/25) == (2 - I)/5 assert sqrt((3 - 4*I)/26) == (2 - I)/sqrt(26) # mul # issue #12739 assert sqrt((3 + 4*I)/(3 - 4*I)) == (3 + 4*I)/5 assert sqrt(2/(3 + 4*I)) == sqrt(2)/5*(2 - I) assert sqrt(n/(3 + 4*I)).subs(n, 2) == sqrt(2)/5*(2 - I) assert sqrt(-2/(3 + 4*I)) == sqrt(2)/5*(1 + 2*I) assert sqrt(-n/(3 + 4*I)).subs(n, 2) == sqrt(2)/5*(1 + 2*I) # power assert sqrt(1/(3 + I*4)) == (2 - I)/5 assert sqrt(1/(3 - I)) == sqrt(10)*sqrt(3 + I)/10 # symbolic i = symbols('i', imaginary=True) assert sqrt(3/i) == Mul(sqrt(3), 1/sqrt(i), evaluate=False) # multiples of 1/2; don't make this too automatic assert sqrt(3 + 4*I)**3 == (2 + I)**3 assert Pow(3 + 4*I, Rational(3, 2)) == 2 + 11*I assert Pow(6 + 8*I, Rational(3, 2)) == 2*sqrt(2)*(2 + 11*I) n, d = (3 + 4*I), (3 - 4*I)**3 a = n/d assert a.args == (1/d, n) eq = sqrt(a) assert eq.args == (a, S.Half) assert expand_multinomial(eq) == sqrt((-117 + 44*I)*(3 + 4*I))/125 assert eq.expand() == (7 - 24*I)/125 # issue 12775 # pos im part assert sqrt(2*I) == (1 + I) assert sqrt(2*9*I) == Mul(3, 1 + I, evaluate=False) assert Pow(2*I, 3*S.Half) == (1 + I)**3 # neg im part assert sqrt(-I/2) == Mul(S.Half, 1 - I, evaluate=False) # fractional im part assert Pow(Rational(-9, 2)*I, Rational(3, 2)) == 27*(1 - I)**3/8 def test_issue_2993(): x = Symbol('x') assert str((2.3*x - 4)**0.3) == '1.5157165665104*(0.575*x - 1)**0.3' assert str((2.3*x + 4)**0.3) == '1.5157165665104*(0.575*x + 1)**0.3' assert str((-2.3*x + 4)**0.3) == '1.5157165665104*(1 - 0.575*x)**0.3' assert str((-2.3*x - 4)**0.3) == '1.5157165665104*(-0.575*x - 1)**0.3' assert str((2.3*x - 2)**0.3) == '1.28386201800527*(x - 0.869565217391304)**0.3' assert str((-2.3*x - 2)**0.3) == '1.28386201800527*(-x - 0.869565217391304)**0.3' assert str((-2.3*x + 2)**0.3) == '1.28386201800527*(0.869565217391304 - x)**0.3' assert str((2.3*x + 2)**0.3) == '1.28386201800527*(x + 0.869565217391304)**0.3' assert str((2.3*x - 4)**Rational(1, 3)) == '2**(2/3)*(0.575*x - 1)**(1/3)' eq = (2.3*x + 4) assert eq**2 == 16*(0.575*x + 1)**2 assert (1/eq).args == (eq, -1) # don't change trivial power # issue 17735 q=.5*exp(x) - .5*exp(-x) + 0.1 assert int((q**2).subs(x, 1)) == 1 # issue 17756 y = Symbol('y') assert len(sqrt(x/(x + y)**2 + Float('0.008', 30)).subs(y, pi.n(25)).atoms(Float)) == 2 # issue 17756 a, b, c, d, e, f, g = symbols('a:g') expr = sqrt(1 + a*(c**4 + g*d - 2*g*e - f*(-g + d))**2/ (c**3*b**2*(d - 3*e + 2*f)**2))/2 r = [ (a, N('0.0170992456333788667034850458615', 30)), (b, N('0.0966594956075474769169134801223', 30)), (c, N('0.390911862903463913632151616184', 30)), (d, N('0.152812084558656566271750185933', 30)), (e, N('0.137562344465103337106561623432', 30)), (f, N('0.174259178881496659302933610355', 30)), (g, N('0.220745448491223779615401870086', 30))] tru = expr.n(30, subs=dict(r)) seq = expr.subs(r) # although `tru` is the right way to evaluate # expr with numerical values, `seq` will have # significant loss of precision if extraction of # the largest coefficient of a power's base's terms # is done improperly assert seq == tru def test_issue_17450(): assert (erf(cosh(1)**7)**I).is_real is None assert (erf(cosh(1)**7)**I).is_imaginary is False assert (Pow(exp(1+sqrt(2)), ((1-sqrt(2))*I*pi), evaluate=False)).is_real is None assert ((-10)**(10*I*pi/3)).is_real is False assert ((-5)**(4*I*pi)).is_real is False def test_issue_18190(): assert sqrt(1 / tan(1 + I)) == 1 / sqrt(tan(1 + I)) def test_issue_14815(): x = Symbol('x', real=True) assert sqrt(x).is_extended_negative is False x = Symbol('x', real=False) assert sqrt(x).is_extended_negative is None x = Symbol('x', complex=True) assert sqrt(x).is_extended_negative is False x = Symbol('x', extended_real=True) assert sqrt(x).is_extended_negative is False assert sqrt(zoo, evaluate=False).is_extended_negative is None assert sqrt(nan, evaluate=False).is_extended_negative is None def test_issue_18509(): x = Symbol('x', prime=True) assert x**oo is oo assert (1/x)**oo is S.Zero assert (-1/x)**oo is S.Zero assert (-x)**oo is zoo assert (-oo)**(-1 + I) is S.Zero assert (-oo)**(1 + I) is zoo assert (oo)**(-1 + I) is S.Zero assert (oo)**(1 + I) is zoo def test_issue_18762(): e, p = symbols('e p') g0 = sqrt(1 + e**2 - 2*e*cos(p)) assert len(g0.series(e, 1, 3).args) == 4 def test_issue_21860(): x = Symbol('x') e = 3*2**Rational(66666666667,200000000000)*3**Rational(16666666667,50000000000)*x**Rational(66666666667, 200000000000) ans = Mul(Rational(3, 2), Pow(Integer(2), Rational(33333333333, 100000000000)), Pow(Integer(3), Rational(26666666667, 40000000000))) assert e.xreplace({x: Rational(3,8)}) == ans def test_issue_21647(): x = Symbol('x') e = log((Integer(567)/500)**(811*(Integer(567)/500)**x/100)) ans = log(Mul(Rational(64701150190720499096094005280169087619821081527, 76293945312500000000000000000000000000000000000), Pow(Integer(2), Rational(396204892125479941, 781250000000000000)), Pow(Integer(3), Rational(385045107874520059, 390625000000000000)), Pow(Integer(5), Rational(407364676376439823, 1562500000000000000)), Pow(Integer(7), Rational(385045107874520059, 1562500000000000000)))) assert e.xreplace({x: 6}) == ans def test_issue_21762(): x = Symbol('x') e = (x**2 + 6)**(Integer(33333333333333333)/50000000000000000) ans = Mul(Rational(5, 4), Pow(Integer(2), Rational(16666666666666667, 25000000000000000)), Pow(Integer(5), Rational(8333333333333333, 25000000000000000))) assert e.xreplace({x: S.Half}) == ans def test_rational_powers_larger_than_one(): assert Rational(2, 3)**Rational(3, 2) == 2*sqrt(6)/9 assert Rational(1, 6)**Rational(9, 4) == 6**Rational(3, 4)/216 assert Rational(3, 7)**Rational(7, 3) == 9*3**Rational(1, 3)*7**Rational(2, 3)/343 def test_power_dispatcher(): class NewBase(Expr): pass class NewPow(NewBase, Pow): pass a, b = Symbol('a'), NewBase() @power.register(Expr, NewBase) @power.register(NewBase, Expr) @power.register(NewBase, NewBase) def _(a, b): return NewPow(a, b) # Pow called as fallback assert power(2, 3) == 8*S.One assert power(a, 2) == Pow(a, 2) assert power(a, a) == Pow(a, a) # NewPow called by dispatch assert power(a, b) == NewPow(a, b) assert power(b, a) == NewPow(b, a) assert power(b, b) == NewPow(b, b) def test_powers_of_I(): assert [sqrt(I)**i for i in range(13)] == [ 1, sqrt(I), I, sqrt(I)**3, -1, -sqrt(I), -I, -sqrt(I)**3, 1, sqrt(I), I, sqrt(I)**3, -1] assert sqrt(I)**(S(9)/2) == -I**(S(1)/4)
c581cb688be1bd52f038e053d1ca5d78a45b2eba8c5d35fb934f42c78de2e08b
from sympy.core.mod import Mod from sympy.core.numbers import (I, oo, pi) from sympy.functions.combinatorial.factorials import factorial from sympy.functions.elementary.exponential import (exp, log) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import (asin, sin) from sympy.simplify.simplify import simplify from sympy.core import Symbol, S, Rational, Integer, Dummy, Wild, Pow from sympy.core.assumptions import (assumptions, check_assumptions, failing_assumptions, common_assumptions) from sympy.core.facts import InconsistentAssumptions from sympy.testing.pytest import raises, XFAIL def test_symbol_unset(): x = Symbol('x', real=True, integer=True) assert x.is_real is True assert x.is_integer is True assert x.is_imaginary is False assert x.is_noninteger is False assert x.is_number is False def test_zero(): z = Integer(0) assert z.is_commutative is True assert z.is_integer is True assert z.is_rational is True assert z.is_algebraic is True assert z.is_transcendental is False assert z.is_real is True assert z.is_complex is True assert z.is_noninteger is False assert z.is_irrational is False assert z.is_imaginary is False assert z.is_positive is False assert z.is_negative is False assert z.is_nonpositive is True assert z.is_nonnegative is True assert z.is_even is True assert z.is_odd is False assert z.is_finite is True assert z.is_infinite is False assert z.is_comparable is True assert z.is_prime is False assert z.is_composite is False assert z.is_number is True def test_one(): z = Integer(1) assert z.is_commutative is True assert z.is_integer is True assert z.is_rational is True assert z.is_algebraic is True assert z.is_transcendental is False assert z.is_real is True assert z.is_complex is True assert z.is_noninteger is False assert z.is_irrational is False assert z.is_imaginary is False assert z.is_positive is True assert z.is_negative is False assert z.is_nonpositive is False assert z.is_nonnegative is True assert z.is_even is False assert z.is_odd is True assert z.is_finite is True assert z.is_infinite is False assert z.is_comparable is True assert z.is_prime is False assert z.is_number is True assert z.is_composite is False # issue 8807 def test_negativeone(): z = Integer(-1) assert z.is_commutative is True assert z.is_integer is True assert z.is_rational is True assert z.is_algebraic is True assert z.is_transcendental is False assert z.is_real is True assert z.is_complex is True assert z.is_noninteger is False assert z.is_irrational is False assert z.is_imaginary is False assert z.is_positive is False assert z.is_negative is True assert z.is_nonpositive is True assert z.is_nonnegative is False assert z.is_even is False assert z.is_odd is True assert z.is_finite is True assert z.is_infinite is False assert z.is_comparable is True assert z.is_prime is False assert z.is_composite is False assert z.is_number is True def test_infinity(): oo = S.Infinity assert oo.is_commutative is True assert oo.is_integer is False assert oo.is_rational is False assert oo.is_algebraic is False assert oo.is_transcendental is False assert oo.is_extended_real is True assert oo.is_real is False assert oo.is_complex is False assert oo.is_noninteger is True assert oo.is_irrational is False assert oo.is_imaginary is False assert oo.is_nonzero is False assert oo.is_positive is False assert oo.is_negative is False assert oo.is_nonpositive is False assert oo.is_nonnegative is False assert oo.is_extended_nonzero is True assert oo.is_extended_positive is True assert oo.is_extended_negative is False assert oo.is_extended_nonpositive is False assert oo.is_extended_nonnegative is True assert oo.is_even is False assert oo.is_odd is False assert oo.is_finite is False assert oo.is_infinite is True assert oo.is_comparable is True assert oo.is_prime is False assert oo.is_composite is False assert oo.is_number is True def test_neg_infinity(): mm = S.NegativeInfinity assert mm.is_commutative is True assert mm.is_integer is False assert mm.is_rational is False assert mm.is_algebraic is False assert mm.is_transcendental is False assert mm.is_extended_real is True assert mm.is_real is False assert mm.is_complex is False assert mm.is_noninteger is True assert mm.is_irrational is False assert mm.is_imaginary is False assert mm.is_nonzero is False assert mm.is_positive is False assert mm.is_negative is False assert mm.is_nonpositive is False assert mm.is_nonnegative is False assert mm.is_extended_nonzero is True assert mm.is_extended_positive is False assert mm.is_extended_negative is True assert mm.is_extended_nonpositive is True assert mm.is_extended_nonnegative is False assert mm.is_even is False assert mm.is_odd is False assert mm.is_finite is False assert mm.is_infinite is True assert mm.is_comparable is True assert mm.is_prime is False assert mm.is_composite is False assert mm.is_number is True def test_zoo(): zoo = S.ComplexInfinity assert zoo.is_complex is False assert zoo.is_real is False assert zoo.is_prime is False def test_nan(): nan = S.NaN assert nan.is_commutative is True assert nan.is_integer is None assert nan.is_rational is None assert nan.is_algebraic is None assert nan.is_transcendental is None assert nan.is_real is None assert nan.is_complex is None assert nan.is_noninteger is None assert nan.is_irrational is None assert nan.is_imaginary is None assert nan.is_positive is None assert nan.is_negative is None assert nan.is_nonpositive is None assert nan.is_nonnegative is None assert nan.is_even is None assert nan.is_odd is None assert nan.is_finite is None assert nan.is_infinite is None assert nan.is_comparable is False assert nan.is_prime is None assert nan.is_composite is None assert nan.is_number is True def test_pos_rational(): r = Rational(3, 4) assert r.is_commutative is True assert r.is_integer is False assert r.is_rational is True assert r.is_algebraic is True assert r.is_transcendental is False assert r.is_real is True assert r.is_complex is True assert r.is_noninteger is True assert r.is_irrational is False assert r.is_imaginary is False assert r.is_positive is True assert r.is_negative is False assert r.is_nonpositive is False assert r.is_nonnegative is True assert r.is_even is False assert r.is_odd is False assert r.is_finite is True assert r.is_infinite is False assert r.is_comparable is True assert r.is_prime is False assert r.is_composite is False r = Rational(1, 4) assert r.is_nonpositive is False assert r.is_positive is True assert r.is_negative is False assert r.is_nonnegative is True r = Rational(5, 4) assert r.is_negative is False assert r.is_positive is True assert r.is_nonpositive is False assert r.is_nonnegative is True r = Rational(5, 3) assert r.is_nonnegative is True assert r.is_positive is True assert r.is_negative is False assert r.is_nonpositive is False def test_neg_rational(): r = Rational(-3, 4) assert r.is_positive is False assert r.is_nonpositive is True assert r.is_negative is True assert r.is_nonnegative is False r = Rational(-1, 4) assert r.is_nonpositive is True assert r.is_positive is False assert r.is_negative is True assert r.is_nonnegative is False r = Rational(-5, 4) assert r.is_negative is True assert r.is_positive is False assert r.is_nonpositive is True assert r.is_nonnegative is False r = Rational(-5, 3) assert r.is_nonnegative is False assert r.is_positive is False assert r.is_negative is True assert r.is_nonpositive is True def test_pi(): z = S.Pi assert z.is_commutative is True assert z.is_integer is False assert z.is_rational is False assert z.is_algebraic is False assert z.is_transcendental is True assert z.is_real is True assert z.is_complex is True assert z.is_noninteger is True assert z.is_irrational is True assert z.is_imaginary is False assert z.is_positive is True assert z.is_negative is False assert z.is_nonpositive is False assert z.is_nonnegative is True assert z.is_even is False assert z.is_odd is False assert z.is_finite is True assert z.is_infinite is False assert z.is_comparable is True assert z.is_prime is False assert z.is_composite is False def test_E(): z = S.Exp1 assert z.is_commutative is True assert z.is_integer is False assert z.is_rational is False assert z.is_algebraic is False assert z.is_transcendental is True assert z.is_real is True assert z.is_complex is True assert z.is_noninteger is True assert z.is_irrational is True assert z.is_imaginary is False assert z.is_positive is True assert z.is_negative is False assert z.is_nonpositive is False assert z.is_nonnegative is True assert z.is_even is False assert z.is_odd is False assert z.is_finite is True assert z.is_infinite is False assert z.is_comparable is True assert z.is_prime is False assert z.is_composite is False def test_I(): z = S.ImaginaryUnit assert z.is_commutative is True assert z.is_integer is False assert z.is_rational is False assert z.is_algebraic is True assert z.is_transcendental is False assert z.is_real is False assert z.is_complex is True assert z.is_noninteger is False assert z.is_irrational is False assert z.is_imaginary is True assert z.is_positive is False assert z.is_negative is False assert z.is_nonpositive is False assert z.is_nonnegative is False assert z.is_even is False assert z.is_odd is False assert z.is_finite is True assert z.is_infinite is False assert z.is_comparable is False assert z.is_prime is False assert z.is_composite is False def test_symbol_real_false(): # issue 3848 a = Symbol('a', real=False) assert a.is_real is False assert a.is_integer is False assert a.is_zero is False assert a.is_negative is False assert a.is_positive is False assert a.is_nonnegative is False assert a.is_nonpositive is False assert a.is_nonzero is False assert a.is_extended_negative is None assert a.is_extended_positive is None assert a.is_extended_nonnegative is None assert a.is_extended_nonpositive is None assert a.is_extended_nonzero is None def test_symbol_extended_real_false(): # issue 3848 a = Symbol('a', extended_real=False) assert a.is_real is False assert a.is_integer is False assert a.is_zero is False assert a.is_negative is False assert a.is_positive is False assert a.is_nonnegative is False assert a.is_nonpositive is False assert a.is_nonzero is False assert a.is_extended_negative is False assert a.is_extended_positive is False assert a.is_extended_nonnegative is False assert a.is_extended_nonpositive is False assert a.is_extended_nonzero is False def test_symbol_imaginary(): a = Symbol('a', imaginary=True) assert a.is_real is False assert a.is_integer is False assert a.is_negative is False assert a.is_positive is False assert a.is_nonnegative is False assert a.is_nonpositive is False assert a.is_zero is False assert a.is_nonzero is False # since nonzero -> real def test_symbol_zero(): x = Symbol('x', zero=True) assert x.is_positive is False assert x.is_nonpositive assert x.is_negative is False assert x.is_nonnegative assert x.is_zero is True # TODO Change to x.is_nonzero is None # See https://github.com/sympy/sympy/pull/9583 assert x.is_nonzero is False assert x.is_finite is True def test_symbol_positive(): x = Symbol('x', positive=True) assert x.is_positive is True assert x.is_nonpositive is False assert x.is_negative is False assert x.is_nonnegative is True assert x.is_zero is False assert x.is_nonzero is True def test_neg_symbol_positive(): x = -Symbol('x', positive=True) assert x.is_positive is False assert x.is_nonpositive is True assert x.is_negative is True assert x.is_nonnegative is False assert x.is_zero is False assert x.is_nonzero is True def test_symbol_nonpositive(): x = Symbol('x', nonpositive=True) assert x.is_positive is False assert x.is_nonpositive is True assert x.is_negative is None assert x.is_nonnegative is None assert x.is_zero is None assert x.is_nonzero is None def test_neg_symbol_nonpositive(): x = -Symbol('x', nonpositive=True) assert x.is_positive is None assert x.is_nonpositive is None assert x.is_negative is False assert x.is_nonnegative is True assert x.is_zero is None assert x.is_nonzero is None def test_symbol_falsepositive(): x = Symbol('x', positive=False) assert x.is_positive is False assert x.is_nonpositive is None assert x.is_negative is None assert x.is_nonnegative is None assert x.is_zero is None assert x.is_nonzero is None def test_symbol_falsepositive_mul(): # To test pull request 9379 # Explicit handling of arg.is_positive=False was added to Mul._eval_is_positive x = 2*Symbol('x', positive=False) assert x.is_positive is False # This was None before assert x.is_nonpositive is None assert x.is_negative is None assert x.is_nonnegative is None assert x.is_zero is None assert x.is_nonzero is None @XFAIL def test_symbol_infinitereal_mul(): ix = Symbol('ix', infinite=True, extended_real=True) assert (-ix).is_extended_positive is None def test_neg_symbol_falsepositive(): x = -Symbol('x', positive=False) assert x.is_positive is None assert x.is_nonpositive is None assert x.is_negative is False assert x.is_nonnegative is None assert x.is_zero is None assert x.is_nonzero is None def test_neg_symbol_falsenegative(): # To test pull request 9379 # Explicit handling of arg.is_negative=False was added to Mul._eval_is_positive x = -Symbol('x', negative=False) assert x.is_positive is False # This was None before assert x.is_nonpositive is None assert x.is_negative is None assert x.is_nonnegative is None assert x.is_zero is None assert x.is_nonzero is None def test_symbol_falsepositive_real(): x = Symbol('x', positive=False, real=True) assert x.is_positive is False assert x.is_nonpositive is True assert x.is_negative is None assert x.is_nonnegative is None assert x.is_zero is None assert x.is_nonzero is None def test_neg_symbol_falsepositive_real(): x = -Symbol('x', positive=False, real=True) assert x.is_positive is None assert x.is_nonpositive is None assert x.is_negative is False assert x.is_nonnegative is True assert x.is_zero is None assert x.is_nonzero is None def test_symbol_falsenonnegative(): x = Symbol('x', nonnegative=False) assert x.is_positive is False assert x.is_nonpositive is None assert x.is_negative is None assert x.is_nonnegative is False assert x.is_zero is False assert x.is_nonzero is None @XFAIL def test_neg_symbol_falsenonnegative(): x = -Symbol('x', nonnegative=False) assert x.is_positive is None assert x.is_nonpositive is False # this currently returns None assert x.is_negative is False # this currently returns None assert x.is_nonnegative is None assert x.is_zero is False # this currently returns None assert x.is_nonzero is True # this currently returns None def test_symbol_falsenonnegative_real(): x = Symbol('x', nonnegative=False, real=True) assert x.is_positive is False assert x.is_nonpositive is True assert x.is_negative is True assert x.is_nonnegative is False assert x.is_zero is False assert x.is_nonzero is True def test_neg_symbol_falsenonnegative_real(): x = -Symbol('x', nonnegative=False, real=True) assert x.is_positive is True assert x.is_nonpositive is False assert x.is_negative is False assert x.is_nonnegative is True assert x.is_zero is False assert x.is_nonzero is True def test_prime(): assert S.NegativeOne.is_prime is False assert S(-2).is_prime is False assert S(-4).is_prime is False assert S.Zero.is_prime is False assert S.One.is_prime is False assert S(2).is_prime is True assert S(17).is_prime is True assert S(4).is_prime is False def test_composite(): assert S.NegativeOne.is_composite is False assert S(-2).is_composite is False assert S(-4).is_composite is False assert S.Zero.is_composite is False assert S(2).is_composite is False assert S(17).is_composite is False assert S(4).is_composite is True x = Dummy(integer=True, positive=True, prime=False) assert x.is_composite is None # x could be 1 assert (x + 1).is_composite is None x = Dummy(positive=True, even=True, prime=False) assert x.is_integer is True assert x.is_composite is True def test_prime_symbol(): x = Symbol('x', prime=True) assert x.is_prime is True assert x.is_integer is True assert x.is_positive is True assert x.is_negative is False assert x.is_nonpositive is False assert x.is_nonnegative is True x = Symbol('x', prime=False) assert x.is_prime is False assert x.is_integer is None assert x.is_positive is None assert x.is_negative is None assert x.is_nonpositive is None assert x.is_nonnegative is None def test_symbol_noncommutative(): x = Symbol('x', commutative=True) assert x.is_complex is None x = Symbol('x', commutative=False) assert x.is_integer is False assert x.is_rational is False assert x.is_algebraic is False assert x.is_irrational is False assert x.is_real is False assert x.is_complex is False def test_other_symbol(): x = Symbol('x', integer=True) assert x.is_integer is True assert x.is_real is True assert x.is_finite is True x = Symbol('x', integer=True, nonnegative=True) assert x.is_integer is True assert x.is_nonnegative is True assert x.is_negative is False assert x.is_positive is None assert x.is_finite is True x = Symbol('x', integer=True, nonpositive=True) assert x.is_integer is True assert x.is_nonpositive is True assert x.is_positive is False assert x.is_negative is None assert x.is_finite is True x = Symbol('x', odd=True) assert x.is_odd is True assert x.is_even is False assert x.is_integer is True assert x.is_finite is True x = Symbol('x', odd=False) assert x.is_odd is False assert x.is_even is None assert x.is_integer is None assert x.is_finite is None x = Symbol('x', even=True) assert x.is_even is True assert x.is_odd is False assert x.is_integer is True assert x.is_finite is True x = Symbol('x', even=False) assert x.is_even is False assert x.is_odd is None assert x.is_integer is None assert x.is_finite is None x = Symbol('x', integer=True, nonnegative=True) assert x.is_integer is True assert x.is_nonnegative is True assert x.is_finite is True x = Symbol('x', integer=True, nonpositive=True) assert x.is_integer is True assert x.is_nonpositive is True assert x.is_finite is True x = Symbol('x', rational=True) assert x.is_real is True assert x.is_finite is True x = Symbol('x', rational=False) assert x.is_real is None assert x.is_finite is None x = Symbol('x', irrational=True) assert x.is_real is True assert x.is_finite is True x = Symbol('x', irrational=False) assert x.is_real is None assert x.is_finite is None with raises(AttributeError): x.is_real = False x = Symbol('x', algebraic=True) assert x.is_transcendental is False x = Symbol('x', transcendental=True) assert x.is_algebraic is False assert x.is_rational is False assert x.is_integer is False def test_issue_3825(): """catch: hash instability""" x = Symbol("x") y = Symbol("y") a1 = x + y a2 = y + x a2.is_comparable h1 = hash(a1) h2 = hash(a2) assert h1 == h2 def test_issue_4822(): z = (-1)**Rational(1, 3)*(1 - I*sqrt(3)) assert z.is_real in [True, None] def test_hash_vs_typeinfo(): """seemingly different typeinfo, but in fact equal""" # the following two are semantically equal x1 = Symbol('x', even=True) x2 = Symbol('x', integer=True, odd=False) assert hash(x1) == hash(x2) assert x1 == x2 def test_hash_vs_typeinfo_2(): """different typeinfo should mean !eq""" # the following two are semantically different x = Symbol('x') x1 = Symbol('x', even=True) assert x != x1 assert hash(x) != hash(x1) # This might fail with very low probability def test_hash_vs_eq(): """catch: different hash for equal objects""" a = 1 + S.Pi # important: do not fold it into a Number instance ha = hash(a) # it should be Add/Mul/... to trigger the bug a.is_positive # this uses .evalf() and deduces it is positive assert a.is_positive is True # be sure that hash stayed the same assert ha == hash(a) # now b should be the same expression b = a.expand(trig=True) hb = hash(b) assert a == b assert ha == hb def test_Add_is_pos_neg(): # these cover lines not covered by the rest of tests in core n = Symbol('n', extended_negative=True, infinite=True) nn = Symbol('n', extended_nonnegative=True, infinite=True) np = Symbol('n', extended_nonpositive=True, infinite=True) p = Symbol('p', extended_positive=True, infinite=True) r = Dummy(extended_real=True, finite=False) x = Symbol('x') xf = Symbol('xf', finite=True) assert (n + p).is_extended_positive is None assert (n + x).is_extended_positive is None assert (p + x).is_extended_positive is None assert (n + p).is_extended_negative is None assert (n + x).is_extended_negative is None assert (p + x).is_extended_negative is None assert (n + xf).is_extended_positive is False assert (p + xf).is_extended_positive is True assert (n + xf).is_extended_negative is True assert (p + xf).is_extended_negative is False assert (x - S.Infinity).is_extended_negative is None # issue 7798 # issue 8046, 16.2 assert (p + nn).is_extended_positive assert (n + np).is_extended_negative assert (p + r).is_extended_positive is None def test_Add_is_imaginary(): nn = Dummy(nonnegative=True) assert (I*nn + I).is_imaginary # issue 8046, 17 def test_Add_is_algebraic(): a = Symbol('a', algebraic=True) b = Symbol('a', algebraic=True) na = Symbol('na', algebraic=False) nb = Symbol('nb', algebraic=False) x = Symbol('x') assert (a + b).is_algebraic assert (na + nb).is_algebraic is None assert (a + na).is_algebraic is False assert (a + x).is_algebraic is None assert (na + x).is_algebraic is None def test_Mul_is_algebraic(): a = Symbol('a', algebraic=True) b = Symbol('b', algebraic=True) na = Symbol('na', algebraic=False) an = Symbol('an', algebraic=True, nonzero=True) nb = Symbol('nb', algebraic=False) x = Symbol('x') assert (a*b).is_algebraic is True assert (na*nb).is_algebraic is None assert (a*na).is_algebraic is None assert (an*na).is_algebraic is False assert (a*x).is_algebraic is None assert (na*x).is_algebraic is None def test_Pow_is_algebraic(): e = Symbol('e', algebraic=True) assert Pow(1, e, evaluate=False).is_algebraic assert Pow(0, e, evaluate=False).is_algebraic a = Symbol('a', algebraic=True) azf = Symbol('azf', algebraic=True, zero=False) na = Symbol('na', algebraic=False) ia = Symbol('ia', algebraic=True, irrational=True) ib = Symbol('ib', algebraic=True, irrational=True) r = Symbol('r', rational=True) x = Symbol('x') assert (a**2).is_algebraic is True assert (a**r).is_algebraic is None assert (azf**r).is_algebraic is True assert (a**x).is_algebraic is None assert (na**r).is_algebraic is None assert (ia**r).is_algebraic is True assert (ia**ib).is_algebraic is False assert (a**e).is_algebraic is None # Gelfond-Schneider constant: assert Pow(2, sqrt(2), evaluate=False).is_algebraic is False assert Pow(S.GoldenRatio, sqrt(3), evaluate=False).is_algebraic is False # issue 8649 t = Symbol('t', real=True, transcendental=True) n = Symbol('n', integer=True) assert (t**n).is_algebraic is None assert (t**n).is_integer is None assert (pi**3).is_algebraic is False r = Symbol('r', zero=True) assert (pi**r).is_algebraic is True def test_Mul_is_prime_composite(): x = Symbol('x', positive=True, integer=True) y = Symbol('y', positive=True, integer=True) assert (x*y).is_prime is None assert ( (x+1)*(y+1) ).is_prime is False assert ( (x+1)*(y+1) ).is_composite is True x = Symbol('x', positive=True) assert ( (x+1)*(y+1) ).is_prime is None assert ( (x+1)*(y+1) ).is_composite is None def test_Pow_is_pos_neg(): z = Symbol('z', real=True) w = Symbol('w', nonpositive=True) assert (S.NegativeOne**S(2)).is_positive is True assert (S.One**z).is_positive is True assert (S.NegativeOne**S(3)).is_positive is False assert (S.Zero**S.Zero).is_positive is True # 0**0 is 1 assert (w**S(3)).is_positive is False assert (w**S(2)).is_positive is None assert (I**2).is_positive is False assert (I**4).is_positive is True # tests emerging from #16332 issue p = Symbol('p', zero=True) q = Symbol('q', zero=False, real=True) j = Symbol('j', zero=False, even=True) x = Symbol('x', zero=True) y = Symbol('y', zero=True) assert (p**q).is_positive is False assert (p**q).is_negative is False assert (p**j).is_positive is False assert (x**y).is_positive is True # 0**0 assert (x**y).is_negative is False def test_Pow_is_prime_composite(): x = Symbol('x', positive=True, integer=True) y = Symbol('y', positive=True, integer=True) assert (x**y).is_prime is None assert ( x**(y+1) ).is_prime is False assert ( x**(y+1) ).is_composite is None assert ( (x+1)**(y+1) ).is_composite is True assert ( (-x-1)**(2*y) ).is_composite is True x = Symbol('x', positive=True) assert (x**y).is_prime is None def test_Mul_is_infinite(): x = Symbol('x') f = Symbol('f', finite=True) i = Symbol('i', infinite=True) z = Dummy(zero=True) nzf = Dummy(finite=True, zero=False) from sympy.core.mul import Mul assert (x*f).is_finite is None assert (x*i).is_finite is None assert (f*i).is_finite is None assert (x*f*i).is_finite is None assert (z*i).is_finite is None assert (nzf*i).is_finite is False assert (z*f).is_finite is True assert Mul(0, f, evaluate=False).is_finite is True assert Mul(0, i, evaluate=False).is_finite is None assert (x*f).is_infinite is None assert (x*i).is_infinite is None assert (f*i).is_infinite is None assert (x*f*i).is_infinite is None assert (z*i).is_infinite is S.NaN.is_infinite assert (nzf*i).is_infinite is True assert (z*f).is_infinite is False assert Mul(0, f, evaluate=False).is_infinite is False assert Mul(0, i, evaluate=False).is_infinite is S.NaN.is_infinite def test_Add_is_infinite(): x = Symbol('x') f = Symbol('f', finite=True) i = Symbol('i', infinite=True) i2 = Symbol('i2', infinite=True) z = Dummy(zero=True) nzf = Dummy(finite=True, zero=False) from sympy.core.add import Add assert (x+f).is_finite is None assert (x+i).is_finite is None assert (f+i).is_finite is False assert (x+f+i).is_finite is None assert (z+i).is_finite is False assert (nzf+i).is_finite is False assert (z+f).is_finite is True assert (i+i2).is_finite is None assert Add(0, f, evaluate=False).is_finite is True assert Add(0, i, evaluate=False).is_finite is False assert (x+f).is_infinite is None assert (x+i).is_infinite is None assert (f+i).is_infinite is True assert (x+f+i).is_infinite is None assert (z+i).is_infinite is True assert (nzf+i).is_infinite is True assert (z+f).is_infinite is False assert (i+i2).is_infinite is None assert Add(0, f, evaluate=False).is_infinite is False assert Add(0, i, evaluate=False).is_infinite is True def test_special_is_rational(): i = Symbol('i', integer=True) i2 = Symbol('i2', integer=True) ni = Symbol('ni', integer=True, nonzero=True) r = Symbol('r', rational=True) rn = Symbol('r', rational=True, nonzero=True) nr = Symbol('nr', irrational=True) x = Symbol('x') assert sqrt(3).is_rational is False assert (3 + sqrt(3)).is_rational is False assert (3*sqrt(3)).is_rational is False assert exp(3).is_rational is False assert exp(ni).is_rational is False assert exp(rn).is_rational is False assert exp(x).is_rational is None assert exp(log(3), evaluate=False).is_rational is True assert log(exp(3), evaluate=False).is_rational is True assert log(3).is_rational is False assert log(ni + 1).is_rational is False assert log(rn + 1).is_rational is False assert log(x).is_rational is None assert (sqrt(3) + sqrt(5)).is_rational is None assert (sqrt(3) + S.Pi).is_rational is False assert (x**i).is_rational is None assert (i**i).is_rational is True assert (i**i2).is_rational is None assert (r**i).is_rational is None assert (r**r).is_rational is None assert (r**x).is_rational is None assert (nr**i).is_rational is None # issue 8598 assert (nr**Symbol('z', zero=True)).is_rational assert sin(1).is_rational is False assert sin(ni).is_rational is False assert sin(rn).is_rational is False assert sin(x).is_rational is None assert asin(r).is_rational is False assert sin(asin(3), evaluate=False).is_rational is True @XFAIL def test_issue_6275(): x = Symbol('x') # both zero or both Muls...but neither "change would be very appreciated. # This is similar to x/x => 1 even though if x = 0, it is really nan. assert isinstance(x*0, type(0*S.Infinity)) if 0*S.Infinity is S.NaN: b = Symbol('b', finite=None) assert (b*0).is_zero is None def test_sanitize_assumptions(): # issue 6666 for cls in (Symbol, Dummy, Wild): x = cls('x', real=1, positive=0) assert x.is_real is True assert x.is_positive is False assert cls('', real=True, positive=None).is_positive is None raises(ValueError, lambda: cls('', commutative=None)) raises(ValueError, lambda: Symbol._sanitize(dict(commutative=None))) def test_special_assumptions(): e = -3 - sqrt(5) + (-sqrt(10)/2 - sqrt(2)/2)**2 assert simplify(e < 0) is S.false assert simplify(e > 0) is S.false assert (e == 0) is False # it's not a literal 0 assert e.equals(0) is True def test_inconsistent(): # cf. issues 5795 and 5545 raises(InconsistentAssumptions, lambda: Symbol('x', real=True, commutative=False)) def test_issue_6631(): assert ((-1)**(I)).is_real is True assert ((-1)**(I*2)).is_real is True assert ((-1)**(I/2)).is_real is True assert ((-1)**(I*S.Pi)).is_real is True assert (I**(I + 2)).is_real is True def test_issue_2730(): assert (1/(1 + I)).is_real is False def test_issue_4149(): assert (3 + I).is_complex assert (3 + I).is_imaginary is False assert (3*I + S.Pi*I).is_imaginary # as Zero.is_imaginary is False, see issue 7649 y = Symbol('y', real=True) assert (3*I + S.Pi*I + y*I).is_imaginary is None p = Symbol('p', positive=True) assert (3*I + S.Pi*I + p*I).is_imaginary n = Symbol('n', negative=True) assert (-3*I - S.Pi*I + n*I).is_imaginary i = Symbol('i', imaginary=True) assert ([(i**a).is_imaginary for a in range(4)] == [False, True, False, True]) # tests from the PR #7887: e = S("-sqrt(3)*I/2 + 0.866025403784439*I") assert e.is_real is False assert e.is_imaginary def test_issue_2920(): n = Symbol('n', negative=True) assert sqrt(n).is_imaginary def test_issue_7899(): x = Symbol('x', real=True) assert (I*x).is_real is None assert ((x - I)*(x - 1)).is_zero is None assert ((x - I)*(x - 1)).is_real is None @XFAIL def test_issue_7993(): x = Dummy(integer=True) y = Dummy(noninteger=True) assert (x - y).is_zero is False def test_issue_8075(): raises(InconsistentAssumptions, lambda: Dummy(zero=True, finite=False)) raises(InconsistentAssumptions, lambda: Dummy(zero=True, infinite=True)) def test_issue_8642(): x = Symbol('x', real=True, integer=False) assert (x*2).is_integer is None, (x*2).is_integer def test_issues_8632_8633_8638_8675_8992(): p = Dummy(integer=True, positive=True) nn = Dummy(integer=True, nonnegative=True) assert (p - S.Half).is_positive assert (p - 1).is_nonnegative assert (nn + 1).is_positive assert (-p + 1).is_nonpositive assert (-nn - 1).is_negative prime = Dummy(prime=True) assert (prime - 2).is_nonnegative assert (prime - 3).is_nonnegative is None even = Dummy(positive=True, even=True) assert (even - 2).is_nonnegative p = Dummy(positive=True) assert (p/(p + 1) - 1).is_negative assert ((p + 2)**3 - S.Half).is_positive n = Dummy(negative=True) assert (n - 3).is_nonpositive def test_issue_9115_9150(): n = Dummy('n', integer=True, nonnegative=True) assert (factorial(n) >= 1) == True assert (factorial(n) < 1) == False assert factorial(n + 1).is_even is None assert factorial(n + 2).is_even is True assert factorial(n + 2) >= 2 def test_issue_9165(): z = Symbol('z', zero=True) f = Symbol('f', finite=False) assert 0/z is S.NaN assert 0*(1/z) is S.NaN assert 0*f is S.NaN def test_issue_10024(): x = Dummy('x') assert Mod(x, 2*pi).is_zero is None def test_issue_10302(): x = Symbol('x') r = Symbol('r', real=True) u = -(3*2**pi)**(1/pi) + 2*3**(1/pi) i = u + u*I assert i.is_real is None # w/o simplification this should fail assert (u + i).is_zero is None assert (1 + i).is_zero is False a = Dummy('a', zero=True) assert (a + I).is_zero is False assert (a + r*I).is_zero is None assert (a + I).is_imaginary assert (a + x + I).is_imaginary is None assert (a + r*I + I).is_imaginary is None def test_complex_reciprocal_imaginary(): assert (1 / (4 + 3*I)).is_imaginary is False def test_issue_16313(): x = Symbol('x', extended_real=False) k = Symbol('k', real=True) l = Symbol('l', real=True, zero=False) assert (-x).is_real is False assert (k*x).is_real is None # k can be zero also assert (l*x).is_real is False assert (l*x*x).is_real is None # since x*x can be a real number assert (-x).is_positive is False def test_issue_16579(): # extended_real -> finite | infinite x = Symbol('x', extended_real=True, infinite=False) y = Symbol('y', extended_real=True, finite=False) assert x.is_finite is True assert y.is_infinite is True # With PR 16978, complex now implies finite c = Symbol('c', complex=True) assert c.is_finite is True raises(InconsistentAssumptions, lambda: Dummy(complex=True, finite=False)) # Now infinite == !finite nf = Symbol('nf', finite=False) assert nf.is_infinite is True def test_issue_17556(): z = I*oo assert z.is_imaginary is False assert z.is_finite is False def test_issue_21651(): k = Symbol('k', positive=True, integer=True) exp = 2*2**(-k) assert exp.is_integer is None def test_assumptions_copy(): assert assumptions(Symbol('x'), dict(commutative=True) ) == {'commutative': True} assert assumptions(Symbol('x'), ['integer']) == {} assert assumptions(Symbol('x'), ['commutative'] ) == {'commutative': True} assert assumptions(Symbol('x')) == {'commutative': True} assert assumptions(1)['positive'] assert assumptions(3 + I) == { 'algebraic': True, 'commutative': True, 'complex': True, 'composite': False, 'even': False, 'extended_negative': False, 'extended_nonnegative': False, 'extended_nonpositive': False, 'extended_nonzero': False, 'extended_positive': False, 'extended_real': False, 'finite': True, 'imaginary': False, 'infinite': False, 'integer': False, 'irrational': False, 'negative': False, 'noninteger': False, 'nonnegative': False, 'nonpositive': False, 'nonzero': False, 'odd': False, 'positive': False, 'prime': False, 'rational': False, 'real': False, 'transcendental': False, 'zero': False} def test_check_assumptions(): assert check_assumptions(1, 0) is False x = Symbol('x', positive=True) assert check_assumptions(1, x) is True assert check_assumptions(1, 1) is True assert check_assumptions(-1, 1) is False i = Symbol('i', integer=True) # don't know if i is positive (or prime, etc...) assert check_assumptions(i, 1) is None assert check_assumptions(Dummy(integer=None), integer=True) is None assert check_assumptions(Dummy(integer=None), integer=False) is None assert check_assumptions(Dummy(integer=False), integer=True) is False assert check_assumptions(Dummy(integer=True), integer=False) is False # no T/F assumptions to check assert check_assumptions(Dummy(integer=False), integer=None) is True raises(ValueError, lambda: check_assumptions(2*x, x, positive=True)) def test_failing_assumptions(): x = Symbol('x', real=True, positive=True) y = Symbol('y') assert failing_assumptions(6*x + y, **x.assumptions0) == \ {'real': None, 'imaginary': None, 'complex': None, 'hermitian': None, 'positive': None, 'nonpositive': None, 'nonnegative': None, 'nonzero': None, 'negative': None, 'zero': None, 'extended_real': None, 'finite': None, 'infinite': None, 'extended_negative': None, 'extended_nonnegative': None, 'extended_nonpositive': None, 'extended_nonzero': None, 'extended_positive': None } def test_common_assumptions(): assert common_assumptions([0, 1, 2] ) == {'algebraic': True, 'irrational': False, 'hermitian': True, 'extended_real': True, 'real': True, 'extended_negative': False, 'extended_nonnegative': True, 'integer': True, 'rational': True, 'imaginary': False, 'complex': True, 'commutative': True,'noninteger': False, 'composite': False, 'infinite': False, 'nonnegative': True, 'finite': True, 'transcendental': False,'negative': False} assert common_assumptions([0, 1, 2], 'positive integer'.split() ) == {'integer': True} assert common_assumptions([0, 1, 2], []) == {} assert common_assumptions([], ['integer']) == {} assert common_assumptions([0], ['integer']) == {'integer': True}
054453d9a01ffa4fb05e9f26a7804d9a35255b7599e4a29c679205266bff0999
from sympy.core.logic import fuzzy_and from sympy.core.sympify import _sympify from sympy.multipledispatch import dispatch from sympy.testing.pytest import XFAIL, raises, warns_deprecated_sympy from sympy.assumptions.ask import Q from sympy.core.add import Add from sympy.core.basic import Basic from sympy.core.expr import Expr from sympy.core.function import Function from sympy.core.mul import Mul from sympy.core.numbers import (Float, I, Rational, nan, oo, pi, zoo) from sympy.core.power import Pow from sympy.core.singleton import S from sympy.core.symbol import (Symbol, symbols) from sympy.functions.elementary.exponential import (exp, exp_polar, log) from sympy.functions.elementary.integers import (ceiling, floor) from sympy.functions.elementary.miscellaneous import sqrt from sympy.functions.elementary.trigonometric import (cos, sin) from sympy.logic.boolalg import (And, Implies, Not, Or, Xor) from sympy.sets import Reals from sympy.simplify.simplify import simplify from sympy.simplify.trigsimp import trigsimp from sympy.core.relational import (Relational, Equality, Unequality, GreaterThan, LessThan, StrictGreaterThan, StrictLessThan, Rel, Eq, Lt, Le, Gt, Ge, Ne, is_le, is_gt, is_ge, is_lt, is_eq, is_neq) from sympy.sets.sets import Interval, FiniteSet from itertools import combinations x, y, z, t = symbols('x,y,z,t') def rel_check(a, b): from sympy.testing.pytest import raises assert a.is_number and b.is_number for do in range(len({type(a), type(b)})): if S.NaN in (a, b): v = [(a == b), (a != b)] assert len(set(v)) == 1 and v[0] == False assert not (a != b) and not (a == b) assert raises(TypeError, lambda: a < b) assert raises(TypeError, lambda: a <= b) assert raises(TypeError, lambda: a > b) assert raises(TypeError, lambda: a >= b) else: E = [(a == b), (a != b)] assert len(set(E)) == 2 v = [ (a < b), (a <= b), (a > b), (a >= b)] i = [ [True, True, False, False], [False, True, False, True], # <-- i == 1 [False, False, True, True]].index(v) if i == 1: assert E[0] or (a.is_Float != b.is_Float) # ugh else: assert E[1] a, b = b, a return True def test_rel_ne(): assert Relational(x, y, '!=') == Ne(x, y) # issue 6116 p = Symbol('p', positive=True) assert Ne(p, 0) is S.true def test_rel_subs(): e = Relational(x, y, '==') e = e.subs(x, z) assert isinstance(e, Equality) assert e.lhs == z assert e.rhs == y e = Relational(x, y, '>=') e = e.subs(x, z) assert isinstance(e, GreaterThan) assert e.lhs == z assert e.rhs == y e = Relational(x, y, '<=') e = e.subs(x, z) assert isinstance(e, LessThan) assert e.lhs == z assert e.rhs == y e = Relational(x, y, '>') e = e.subs(x, z) assert isinstance(e, StrictGreaterThan) assert e.lhs == z assert e.rhs == y e = Relational(x, y, '<') e = e.subs(x, z) assert isinstance(e, StrictLessThan) assert e.lhs == z assert e.rhs == y e = Eq(x, 0) assert e.subs(x, 0) is S.true assert e.subs(x, 1) is S.false def test_wrappers(): e = x + x**2 res = Relational(y, e, '==') assert Rel(y, x + x**2, '==') == res assert Eq(y, x + x**2) == res res = Relational(y, e, '<') assert Lt(y, x + x**2) == res res = Relational(y, e, '<=') assert Le(y, x + x**2) == res res = Relational(y, e, '>') assert Gt(y, x + x**2) == res res = Relational(y, e, '>=') assert Ge(y, x + x**2) == res res = Relational(y, e, '!=') assert Ne(y, x + x**2) == res def test_Eq_Ne(): assert Eq(x, x) # issue 5719 with warns_deprecated_sympy(): assert Eq(x) == Eq(x, 0) # issue 6116 p = Symbol('p', positive=True) assert Eq(p, 0) is S.false # issue 13348; 19048 # SymPy is strict about 0 and 1 not being # interpreted as Booleans assert Eq(True, 1) is S.false assert Eq(False, 0) is S.false assert Eq(~x, 0) is S.false assert Eq(~x, 1) is S.false assert Ne(True, 1) is S.true assert Ne(False, 0) is S.true assert Ne(~x, 0) is S.true assert Ne(~x, 1) is S.true assert Eq((), 1) is S.false assert Ne((), 1) is S.true def test_as_poly(): from sympy.polys.polytools import Poly # Only Eq should have an as_poly method: assert Eq(x, 1).as_poly() == Poly(x - 1, x, domain='ZZ') raises(AttributeError, lambda: Ne(x, 1).as_poly()) raises(AttributeError, lambda: Ge(x, 1).as_poly()) raises(AttributeError, lambda: Gt(x, 1).as_poly()) raises(AttributeError, lambda: Le(x, 1).as_poly()) raises(AttributeError, lambda: Lt(x, 1).as_poly()) def test_rel_Infinity(): # NOTE: All of these are actually handled by sympy.core.Number, and do # not create Relational objects. assert (oo > oo) is S.false assert (oo > -oo) is S.true assert (oo > 1) is S.true assert (oo < oo) is S.false assert (oo < -oo) is S.false assert (oo < 1) is S.false assert (oo >= oo) is S.true assert (oo >= -oo) is S.true assert (oo >= 1) is S.true assert (oo <= oo) is S.true assert (oo <= -oo) is S.false assert (oo <= 1) is S.false assert (-oo > oo) is S.false assert (-oo > -oo) is S.false assert (-oo > 1) is S.false assert (-oo < oo) is S.true assert (-oo < -oo) is S.false assert (-oo < 1) is S.true assert (-oo >= oo) is S.false assert (-oo >= -oo) is S.true assert (-oo >= 1) is S.false assert (-oo <= oo) is S.true assert (-oo <= -oo) is S.true assert (-oo <= 1) is S.true def test_infinite_symbol_inequalities(): x = Symbol('x', extended_positive=True, infinite=True) y = Symbol('y', extended_positive=True, infinite=True) z = Symbol('z', extended_negative=True, infinite=True) w = Symbol('w', extended_negative=True, infinite=True) inf_set = (x, y, oo) ninf_set = (z, w, -oo) for inf1 in inf_set: assert (inf1 < 1) is S.false assert (inf1 > 1) is S.true assert (inf1 <= 1) is S.false assert (inf1 >= 1) is S.true for inf2 in inf_set: assert (inf1 < inf2) is S.false assert (inf1 > inf2) is S.false assert (inf1 <= inf2) is S.true assert (inf1 >= inf2) is S.true for ninf1 in ninf_set: assert (inf1 < ninf1) is S.false assert (inf1 > ninf1) is S.true assert (inf1 <= ninf1) is S.false assert (inf1 >= ninf1) is S.true assert (ninf1 < inf1) is S.true assert (ninf1 > inf1) is S.false assert (ninf1 <= inf1) is S.true assert (ninf1 >= inf1) is S.false for ninf1 in ninf_set: assert (ninf1 < 1) is S.true assert (ninf1 > 1) is S.false assert (ninf1 <= 1) is S.true assert (ninf1 >= 1) is S.false for ninf2 in ninf_set: assert (ninf1 < ninf2) is S.false assert (ninf1 > ninf2) is S.false assert (ninf1 <= ninf2) is S.true assert (ninf1 >= ninf2) is S.true def test_bool(): assert Eq(0, 0) is S.true assert Eq(1, 0) is S.false assert Ne(0, 0) is S.false assert Ne(1, 0) is S.true assert Lt(0, 1) is S.true assert Lt(1, 0) is S.false assert Le(0, 1) is S.true assert Le(1, 0) is S.false assert Le(0, 0) is S.true assert Gt(1, 0) is S.true assert Gt(0, 1) is S.false assert Ge(1, 0) is S.true assert Ge(0, 1) is S.false assert Ge(1, 1) is S.true assert Eq(I, 2) is S.false assert Ne(I, 2) is S.true raises(TypeError, lambda: Gt(I, 2)) raises(TypeError, lambda: Ge(I, 2)) raises(TypeError, lambda: Lt(I, 2)) raises(TypeError, lambda: Le(I, 2)) a = Float('.000000000000000000001', '') b = Float('.0000000000000000000001', '') assert Eq(pi + a, pi + b) is S.false def test_rich_cmp(): assert (x < y) == Lt(x, y) assert (x <= y) == Le(x, y) assert (x > y) == Gt(x, y) assert (x >= y) == Ge(x, y) def test_doit(): from sympy.core.symbol import Symbol p = Symbol('p', positive=True) n = Symbol('n', negative=True) np = Symbol('np', nonpositive=True) nn = Symbol('nn', nonnegative=True) assert Gt(p, 0).doit() is S.true assert Gt(p, 1).doit() == Gt(p, 1) assert Ge(p, 0).doit() is S.true assert Le(p, 0).doit() is S.false assert Lt(n, 0).doit() is S.true assert Le(np, 0).doit() is S.true assert Gt(nn, 0).doit() == Gt(nn, 0) assert Lt(nn, 0).doit() is S.false assert Eq(x, 0).doit() == Eq(x, 0) def test_new_relational(): x = Symbol('x') assert Eq(x, 0) == Relational(x, 0) # None ==> Equality assert Eq(x, 0) == Relational(x, 0, '==') assert Eq(x, 0) == Relational(x, 0, 'eq') assert Eq(x, 0) == Equality(x, 0) assert Eq(x, 0) != Relational(x, 1) # None ==> Equality assert Eq(x, 0) != Relational(x, 1, '==') assert Eq(x, 0) != Relational(x, 1, 'eq') assert Eq(x, 0) != Equality(x, 1) assert Eq(x, -1) == Relational(x, -1) # None ==> Equality assert Eq(x, -1) == Relational(x, -1, '==') assert Eq(x, -1) == Relational(x, -1, 'eq') assert Eq(x, -1) == Equality(x, -1) assert Eq(x, -1) != Relational(x, 1) # None ==> Equality assert Eq(x, -1) != Relational(x, 1, '==') assert Eq(x, -1) != Relational(x, 1, 'eq') assert Eq(x, -1) != Equality(x, 1) assert Ne(x, 0) == Relational(x, 0, '!=') assert Ne(x, 0) == Relational(x, 0, '<>') assert Ne(x, 0) == Relational(x, 0, 'ne') assert Ne(x, 0) == Unequality(x, 0) assert Ne(x, 0) != Relational(x, 1, '!=') assert Ne(x, 0) != Relational(x, 1, '<>') assert Ne(x, 0) != Relational(x, 1, 'ne') assert Ne(x, 0) != Unequality(x, 1) assert Ge(x, 0) == Relational(x, 0, '>=') assert Ge(x, 0) == Relational(x, 0, 'ge') assert Ge(x, 0) == GreaterThan(x, 0) assert Ge(x, 1) != Relational(x, 0, '>=') assert Ge(x, 1) != Relational(x, 0, 'ge') assert Ge(x, 1) != GreaterThan(x, 0) assert (x >= 1) == Relational(x, 1, '>=') assert (x >= 1) == Relational(x, 1, 'ge') assert (x >= 1) == GreaterThan(x, 1) assert (x >= 0) != Relational(x, 1, '>=') assert (x >= 0) != Relational(x, 1, 'ge') assert (x >= 0) != GreaterThan(x, 1) assert Le(x, 0) == Relational(x, 0, '<=') assert Le(x, 0) == Relational(x, 0, 'le') assert Le(x, 0) == LessThan(x, 0) assert Le(x, 1) != Relational(x, 0, '<=') assert Le(x, 1) != Relational(x, 0, 'le') assert Le(x, 1) != LessThan(x, 0) assert (x <= 1) == Relational(x, 1, '<=') assert (x <= 1) == Relational(x, 1, 'le') assert (x <= 1) == LessThan(x, 1) assert (x <= 0) != Relational(x, 1, '<=') assert (x <= 0) != Relational(x, 1, 'le') assert (x <= 0) != LessThan(x, 1) assert Gt(x, 0) == Relational(x, 0, '>') assert Gt(x, 0) == Relational(x, 0, 'gt') assert Gt(x, 0) == StrictGreaterThan(x, 0) assert Gt(x, 1) != Relational(x, 0, '>') assert Gt(x, 1) != Relational(x, 0, 'gt') assert Gt(x, 1) != StrictGreaterThan(x, 0) assert (x > 1) == Relational(x, 1, '>') assert (x > 1) == Relational(x, 1, 'gt') assert (x > 1) == StrictGreaterThan(x, 1) assert (x > 0) != Relational(x, 1, '>') assert (x > 0) != Relational(x, 1, 'gt') assert (x > 0) != StrictGreaterThan(x, 1) assert Lt(x, 0) == Relational(x, 0, '<') assert Lt(x, 0) == Relational(x, 0, 'lt') assert Lt(x, 0) == StrictLessThan(x, 0) assert Lt(x, 1) != Relational(x, 0, '<') assert Lt(x, 1) != Relational(x, 0, 'lt') assert Lt(x, 1) != StrictLessThan(x, 0) assert (x < 1) == Relational(x, 1, '<') assert (x < 1) == Relational(x, 1, 'lt') assert (x < 1) == StrictLessThan(x, 1) assert (x < 0) != Relational(x, 1, '<') assert (x < 0) != Relational(x, 1, 'lt') assert (x < 0) != StrictLessThan(x, 1) # finally, some fuzz testing from random import randint for i in range(100): while 1: strtype, length = (chr, 65535) if randint(0, 1) else (chr, 255) relation_type = strtype(randint(0, length)) if randint(0, 1): relation_type += strtype(randint(0, length)) if relation_type not in ('==', 'eq', '!=', '<>', 'ne', '>=', 'ge', '<=', 'le', '>', 'gt', '<', 'lt', ':=', '+=', '-=', '*=', '/=', '%='): break raises(ValueError, lambda: Relational(x, 1, relation_type)) assert all(Relational(x, 0, op).rel_op == '==' for op in ('eq', '==')) assert all(Relational(x, 0, op).rel_op == '!=' for op in ('ne', '<>', '!=')) assert all(Relational(x, 0, op).rel_op == '>' for op in ('gt', '>')) assert all(Relational(x, 0, op).rel_op == '<' for op in ('lt', '<')) assert all(Relational(x, 0, op).rel_op == '>=' for op in ('ge', '>=')) assert all(Relational(x, 0, op).rel_op == '<=' for op in ('le', '<=')) def test_relational_arithmetic(): for cls in [Eq, Ne, Le, Lt, Ge, Gt]: rel = cls(x, y) raises(TypeError, lambda: 0+rel) raises(TypeError, lambda: 1*rel) raises(TypeError, lambda: 1**rel) raises(TypeError, lambda: rel**1) raises(TypeError, lambda: Add(0, rel)) raises(TypeError, lambda: Mul(1, rel)) raises(TypeError, lambda: Pow(1, rel)) raises(TypeError, lambda: Pow(rel, 1)) def test_relational_bool_output(): # https://github.com/sympy/sympy/issues/5931 raises(TypeError, lambda: bool(x > 3)) raises(TypeError, lambda: bool(x >= 3)) raises(TypeError, lambda: bool(x < 3)) raises(TypeError, lambda: bool(x <= 3)) raises(TypeError, lambda: bool(Eq(x, 3))) raises(TypeError, lambda: bool(Ne(x, 3))) def test_relational_logic_symbols(): # See issue 6204 assert (x < y) & (z < t) == And(x < y, z < t) assert (x < y) | (z < t) == Or(x < y, z < t) assert ~(x < y) == Not(x < y) assert (x < y) >> (z < t) == Implies(x < y, z < t) assert (x < y) << (z < t) == Implies(z < t, x < y) assert (x < y) ^ (z < t) == Xor(x < y, z < t) assert isinstance((x < y) & (z < t), And) assert isinstance((x < y) | (z < t), Or) assert isinstance(~(x < y), GreaterThan) assert isinstance((x < y) >> (z < t), Implies) assert isinstance((x < y) << (z < t), Implies) assert isinstance((x < y) ^ (z < t), (Or, Xor)) def test_univariate_relational_as_set(): assert (x > 0).as_set() == Interval(0, oo, True, True) assert (x >= 0).as_set() == Interval(0, oo) assert (x < 0).as_set() == Interval(-oo, 0, True, True) assert (x <= 0).as_set() == Interval(-oo, 0) assert Eq(x, 0).as_set() == FiniteSet(0) assert Ne(x, 0).as_set() == Interval(-oo, 0, True, True) + \ Interval(0, oo, True, True) assert (x**2 >= 4).as_set() == Interval(-oo, -2) + Interval(2, oo) @XFAIL def test_multivariate_relational_as_set(): assert (x*y >= 0).as_set() == Interval(0, oo)*Interval(0, oo) + \ Interval(-oo, 0)*Interval(-oo, 0) def test_Not(): assert Not(Equality(x, y)) == Unequality(x, y) assert Not(Unequality(x, y)) == Equality(x, y) assert Not(StrictGreaterThan(x, y)) == LessThan(x, y) assert Not(StrictLessThan(x, y)) == GreaterThan(x, y) assert Not(GreaterThan(x, y)) == StrictLessThan(x, y) assert Not(LessThan(x, y)) == StrictGreaterThan(x, y) def test_evaluate(): assert str(Eq(x, x, evaluate=False)) == 'Eq(x, x)' assert Eq(x, x, evaluate=False).doit() == S.true assert str(Ne(x, x, evaluate=False)) == 'Ne(x, x)' assert Ne(x, x, evaluate=False).doit() == S.false assert str(Ge(x, x, evaluate=False)) == 'x >= x' assert str(Le(x, x, evaluate=False)) == 'x <= x' assert str(Gt(x, x, evaluate=False)) == 'x > x' assert str(Lt(x, x, evaluate=False)) == 'x < x' def assert_all_ineq_raise_TypeError(a, b): raises(TypeError, lambda: a > b) raises(TypeError, lambda: a >= b) raises(TypeError, lambda: a < b) raises(TypeError, lambda: a <= b) raises(TypeError, lambda: b > a) raises(TypeError, lambda: b >= a) raises(TypeError, lambda: b < a) raises(TypeError, lambda: b <= a) def assert_all_ineq_give_class_Inequality(a, b): """All inequality operations on `a` and `b` result in class Inequality.""" from sympy.core.relational import _Inequality as Inequality assert isinstance(a > b, Inequality) assert isinstance(a >= b, Inequality) assert isinstance(a < b, Inequality) assert isinstance(a <= b, Inequality) assert isinstance(b > a, Inequality) assert isinstance(b >= a, Inequality) assert isinstance(b < a, Inequality) assert isinstance(b <= a, Inequality) def test_imaginary_compare_raises_TypeError(): # See issue #5724 assert_all_ineq_raise_TypeError(I, x) def test_complex_compare_not_real(): # two cases which are not real y = Symbol('y', imaginary=True) z = Symbol('z', complex=True, extended_real=False) for w in (y, z): assert_all_ineq_raise_TypeError(2, w) # some cases which should remain un-evaluated t = Symbol('t') x = Symbol('x', real=True) z = Symbol('z', complex=True) for w in (x, z, t): assert_all_ineq_give_class_Inequality(2, w) def test_imaginary_and_inf_compare_raises_TypeError(): # See pull request #7835 y = Symbol('y', imaginary=True) assert_all_ineq_raise_TypeError(oo, y) assert_all_ineq_raise_TypeError(-oo, y) def test_complex_pure_imag_not_ordered(): raises(TypeError, lambda: 2*I < 3*I) # more generally x = Symbol('x', real=True, nonzero=True) y = Symbol('y', imaginary=True) z = Symbol('z', complex=True) assert_all_ineq_raise_TypeError(I, y) t = I*x # an imaginary number, should raise errors assert_all_ineq_raise_TypeError(2, t) t = -I*y # a real number, so no errors assert_all_ineq_give_class_Inequality(2, t) t = I*z # unknown, should be unevaluated assert_all_ineq_give_class_Inequality(2, t) def test_x_minus_y_not_same_as_x_lt_y(): """ A consequence of pull request #7792 is that `x - y < 0` and `x < y` are not synonymous. """ x = I + 2 y = I + 3 raises(TypeError, lambda: x < y) assert x - y < 0 ineq = Lt(x, y, evaluate=False) raises(TypeError, lambda: ineq.doit()) assert ineq.lhs - ineq.rhs < 0 t = Symbol('t', imaginary=True) x = 2 + t y = 3 + t ineq = Lt(x, y, evaluate=False) raises(TypeError, lambda: ineq.doit()) assert ineq.lhs - ineq.rhs < 0 # this one should give error either way x = I + 2 y = 2*I + 3 raises(TypeError, lambda: x < y) raises(TypeError, lambda: x - y < 0) def test_nan_equality_exceptions(): # See issue #7774 import random assert Equality(nan, nan) is S.false assert Unequality(nan, nan) is S.true # See issue #7773 A = (x, S.Zero, S.One/3, pi, oo, -oo) assert Equality(nan, random.choice(A)) is S.false assert Equality(random.choice(A), nan) is S.false assert Unequality(nan, random.choice(A)) is S.true assert Unequality(random.choice(A), nan) is S.true def test_nan_inequality_raise_errors(): # See discussion in pull request #7776. We test inequalities with # a set including examples of various classes. for q in (x, S.Zero, S(10), S.One/3, pi, S(1.3), oo, -oo, nan): assert_all_ineq_raise_TypeError(q, nan) def test_nan_complex_inequalities(): # Comparisons of NaN with non-real raise errors, we're not too # fussy whether its the NaN error or complex error. for r in (I, zoo, Symbol('z', imaginary=True)): assert_all_ineq_raise_TypeError(r, nan) def test_complex_infinity_inequalities(): raises(TypeError, lambda: zoo > 0) raises(TypeError, lambda: zoo >= 0) raises(TypeError, lambda: zoo < 0) raises(TypeError, lambda: zoo <= 0) def test_inequalities_symbol_name_same(): """Using the operator and functional forms should give same results.""" # We test all combinations from a set # FIXME: could replace with random selection after test passes A = (x, y, S.Zero, S.One/3, pi, oo, -oo) for a in A: for b in A: assert Gt(a, b) == (a > b) assert Lt(a, b) == (a < b) assert Ge(a, b) == (a >= b) assert Le(a, b) == (a <= b) for b in (y, S.Zero, S.One/3, pi, oo, -oo): assert Gt(x, b, evaluate=False) == (x > b) assert Lt(x, b, evaluate=False) == (x < b) assert Ge(x, b, evaluate=False) == (x >= b) assert Le(x, b, evaluate=False) == (x <= b) for b in (y, S.Zero, S.One/3, pi, oo, -oo): assert Gt(b, x, evaluate=False) == (b > x) assert Lt(b, x, evaluate=False) == (b < x) assert Ge(b, x, evaluate=False) == (b >= x) assert Le(b, x, evaluate=False) == (b <= x) def test_inequalities_symbol_name_same_complex(): """Using the operator and functional forms should give same results. With complex non-real numbers, both should raise errors. """ # FIXME: could replace with random selection after test passes for a in (x, S.Zero, S.One/3, pi, oo, Rational(1, 3)): raises(TypeError, lambda: Gt(a, I)) raises(TypeError, lambda: a > I) raises(TypeError, lambda: Lt(a, I)) raises(TypeError, lambda: a < I) raises(TypeError, lambda: Ge(a, I)) raises(TypeError, lambda: a >= I) raises(TypeError, lambda: Le(a, I)) raises(TypeError, lambda: a <= I) def test_inequalities_cant_sympify_other(): # see issue 7833 from operator import gt, lt, ge, le bar = "foo" for a in (x, S.Zero, S.One/3, pi, I, zoo, oo, -oo, nan, Rational(1, 3)): for op in (lt, gt, le, ge): raises(TypeError, lambda: op(a, bar)) def test_ineq_avoid_wild_symbol_flip(): # see issue #7951, we try to avoid this internally, e.g., by using # __lt__ instead of "<". from sympy.core.symbol import Wild p = symbols('p', cls=Wild) # x > p might flip, but Gt should not: assert Gt(x, p) == Gt(x, p, evaluate=False) # Previously failed as 'p > x': e = Lt(x, y).subs({y: p}) assert e == Lt(x, p, evaluate=False) # Previously failed as 'p <= x': e = Ge(x, p).doit() assert e == Ge(x, p, evaluate=False) def test_issue_8245(): a = S("6506833320952669167898688709329/5070602400912917605986812821504") assert rel_check(a, a.n(10)) assert rel_check(a, a.n(20)) assert rel_check(a, a.n()) # prec of 30 is enough to fully capture a as mpf assert Float(a, 30) == Float(str(a.p), '')/Float(str(a.q), '') for i in range(31): r = Rational(Float(a, i)) f = Float(r) assert (f < a) == (Rational(f) < a) # test sign handling assert (-f < -a) == (Rational(-f) < -a) # test equivalence handling isa = Float(a.p,'')/Float(a.q,'') assert isa <= a assert not isa < a assert isa >= a assert not isa > a assert isa > 0 a = sqrt(2) r = Rational(str(a.n(30))) assert rel_check(a, r) a = sqrt(2) r = Rational(str(a.n(29))) assert rel_check(a, r) assert Eq(log(cos(2)**2 + sin(2)**2), 0) is S.true def test_issue_8449(): p = Symbol('p', nonnegative=True) assert Lt(-oo, p) assert Ge(-oo, p) is S.false assert Gt(oo, -p) assert Le(oo, -p) is S.false def test_simplify_relational(): assert simplify(x*(y + 1) - x*y - x + 1 < x) == (x > 1) assert simplify(x*(y + 1) - x*y - x - 1 < x) == (x > -1) assert simplify(x < x*(y + 1) - x*y - x + 1) == (x < 1) q, r = symbols("q r") assert (((-q + r) - (q - r)) <= 0).simplify() == (q >= r) root2 = sqrt(2) equation = ((root2 * (-q + r) - root2 * (q - r)) <= 0).simplify() assert equation == (q >= r) r = S.One < x # canonical operations are not the same as simplification, # so if there is no simplification, canonicalization will # be done unless the measure forbids it assert simplify(r) == r.canonical assert simplify(r, ratio=0) != r.canonical # this is not a random test; in _eval_simplify # this will simplify to S.false and that is the # reason for the 'if r.is_Relational' in Relational's # _eval_simplify routine assert simplify(-(2**(pi*Rational(3, 2)) + 6**pi)**(1/pi) + 2*(2**(pi/2) + 3**pi)**(1/pi) < 0) is S.false # canonical at least assert Eq(y, x).simplify() == Eq(x, y) assert Eq(x - 1, 0).simplify() == Eq(x, 1) assert Eq(x - 1, x).simplify() == S.false assert Eq(2*x - 1, x).simplify() == Eq(x, 1) assert Eq(2*x, 4).simplify() == Eq(x, 2) z = cos(1)**2 + sin(1)**2 - 1 # z.is_zero is None assert Eq(z*x, 0).simplify() == S.true assert Ne(y, x).simplify() == Ne(x, y) assert Ne(x - 1, 0).simplify() == Ne(x, 1) assert Ne(x - 1, x).simplify() == S.true assert Ne(2*x - 1, x).simplify() == Ne(x, 1) assert Ne(2*x, 4).simplify() == Ne(x, 2) assert Ne(z*x, 0).simplify() == S.false # No real-valued assumptions assert Ge(y, x).simplify() == Le(x, y) assert Ge(x - 1, 0).simplify() == Ge(x, 1) assert Ge(x - 1, x).simplify() == S.false assert Ge(2*x - 1, x).simplify() == Ge(x, 1) assert Ge(2*x, 4).simplify() == Ge(x, 2) assert Ge(z*x, 0).simplify() == S.true assert Ge(x, -2).simplify() == Ge(x, -2) assert Ge(-x, -2).simplify() == Le(x, 2) assert Ge(x, 2).simplify() == Ge(x, 2) assert Ge(-x, 2).simplify() == Le(x, -2) assert Le(y, x).simplify() == Ge(x, y) assert Le(x - 1, 0).simplify() == Le(x, 1) assert Le(x - 1, x).simplify() == S.true assert Le(2*x - 1, x).simplify() == Le(x, 1) assert Le(2*x, 4).simplify() == Le(x, 2) assert Le(z*x, 0).simplify() == S.true assert Le(x, -2).simplify() == Le(x, -2) assert Le(-x, -2).simplify() == Ge(x, 2) assert Le(x, 2).simplify() == Le(x, 2) assert Le(-x, 2).simplify() == Ge(x, -2) assert Gt(y, x).simplify() == Lt(x, y) assert Gt(x - 1, 0).simplify() == Gt(x, 1) assert Gt(x - 1, x).simplify() == S.false assert Gt(2*x - 1, x).simplify() == Gt(x, 1) assert Gt(2*x, 4).simplify() == Gt(x, 2) assert Gt(z*x, 0).simplify() == S.false assert Gt(x, -2).simplify() == Gt(x, -2) assert Gt(-x, -2).simplify() == Lt(x, 2) assert Gt(x, 2).simplify() == Gt(x, 2) assert Gt(-x, 2).simplify() == Lt(x, -2) assert Lt(y, x).simplify() == Gt(x, y) assert Lt(x - 1, 0).simplify() == Lt(x, 1) assert Lt(x - 1, x).simplify() == S.true assert Lt(2*x - 1, x).simplify() == Lt(x, 1) assert Lt(2*x, 4).simplify() == Lt(x, 2) assert Lt(z*x, 0).simplify() == S.false assert Lt(x, -2).simplify() == Lt(x, -2) assert Lt(-x, -2).simplify() == Gt(x, 2) assert Lt(x, 2).simplify() == Lt(x, 2) assert Lt(-x, 2).simplify() == Gt(x, -2) # Test particulat branches of _eval_simplify m = exp(1) - exp_polar(1) assert simplify(m*x > 1) is S.false # These two tests the same branch assert simplify(m*x + 2*m*y > 1) is S.false assert simplify(m*x + y > 1 + y) is S.false def test_equals(): w, x, y, z = symbols('w:z') f = Function('f') assert Eq(x, 1).equals(Eq(x*(y + 1) - x*y - x + 1, x)) assert Eq(x, y).equals(x < y, True) == False assert Eq(x, f(1)).equals(Eq(x, f(2)), True) == f(1) - f(2) assert Eq(f(1), y).equals(Eq(f(2), y), True) == f(1) - f(2) assert Eq(x, f(1)).equals(Eq(f(2), x), True) == f(1) - f(2) assert Eq(f(1), x).equals(Eq(x, f(2)), True) == f(1) - f(2) assert Eq(w, x).equals(Eq(y, z), True) == False assert Eq(f(1), f(2)).equals(Eq(f(3), f(4)), True) == f(1) - f(3) assert (x < y).equals(y > x, True) == True assert (x < y).equals(y >= x, True) == False assert (x < y).equals(z < y, True) == False assert (x < y).equals(x < z, True) == False assert (x < f(1)).equals(x < f(2), True) == f(1) - f(2) assert (f(1) < x).equals(f(2) < x, True) == f(1) - f(2) def test_reversed(): assert (x < y).reversed == (y > x) assert (x <= y).reversed == (y >= x) assert Eq(x, y, evaluate=False).reversed == Eq(y, x, evaluate=False) assert Ne(x, y, evaluate=False).reversed == Ne(y, x, evaluate=False) assert (x >= y).reversed == (y <= x) assert (x > y).reversed == (y < x) def test_canonical(): c = [i.canonical for i in ( x + y < z, x + 2 > 3, x < 2, S(2) > x, x**2 > -x/y, Gt(3, 2, evaluate=False) )] assert [i.canonical for i in c] == c assert [i.reversed.canonical for i in c] == c assert not any(i.lhs.is_Number and not i.rhs.is_Number for i in c) c = [i.reversed.func(i.rhs, i.lhs, evaluate=False).canonical for i in c] assert [i.canonical for i in c] == c assert [i.reversed.canonical for i in c] == c assert not any(i.lhs.is_Number and not i.rhs.is_Number for i in c) assert Eq(y < x, x > y).canonical is S.true @XFAIL def test_issue_8444_nonworkingtests(): x = symbols('x', real=True) assert (x <= oo) == (x >= -oo) == True x = symbols('x') assert x >= floor(x) assert (x < floor(x)) == False assert x <= ceiling(x) assert (x > ceiling(x)) == False def test_issue_8444_workingtests(): x = symbols('x') assert Gt(x, floor(x)) == Gt(x, floor(x), evaluate=False) assert Ge(x, floor(x)) == Ge(x, floor(x), evaluate=False) assert Lt(x, ceiling(x)) == Lt(x, ceiling(x), evaluate=False) assert Le(x, ceiling(x)) == Le(x, ceiling(x), evaluate=False) i = symbols('i', integer=True) assert (i > floor(i)) == False assert (i < ceiling(i)) == False def test_issue_10304(): d = cos(1)**2 + sin(1)**2 - 1 assert d.is_comparable is False # if this fails, find a new d e = 1 + d*I assert simplify(Eq(e, 0)) is S.false def test_issue_18412(): d = (Rational(1, 6) + z / 4 / y) assert Eq(x, pi * y**3 * d).replace(y**3, z) == Eq(x, pi * z * d) def test_issue_10401(): x = symbols('x') fin = symbols('inf', finite=True) inf = symbols('inf', infinite=True) inf2 = symbols('inf2', infinite=True) infx = symbols('infx', infinite=True, extended_real=True) # Used in the commented tests below: #infx2 = symbols('infx2', infinite=True, extended_real=True) infnx = symbols('inf~x', infinite=True, extended_real=False) infnx2 = symbols('inf~x2', infinite=True, extended_real=False) infp = symbols('infp', infinite=True, extended_positive=True) infp1 = symbols('infp1', infinite=True, extended_positive=True) infn = symbols('infn', infinite=True, extended_negative=True) zero = symbols('z', zero=True) nonzero = symbols('nz', zero=False, finite=True) assert Eq(1/(1/x + 1), 1).func is Eq assert Eq(1/(1/x + 1), 1).subs(x, S.ComplexInfinity) is S.true assert Eq(1/(1/fin + 1), 1) is S.false T, F = S.true, S.false assert Eq(fin, inf) is F assert Eq(inf, inf2) not in (T, F) and inf != inf2 assert Eq(1 + inf, 2 + inf2) not in (T, F) and inf != inf2 assert Eq(infp, infp1) is T assert Eq(infp, infn) is F assert Eq(1 + I*oo, I*oo) is F assert Eq(I*oo, 1 + I*oo) is F assert Eq(1 + I*oo, 2 + I*oo) is F assert Eq(1 + I*oo, 2 + I*infx) is F assert Eq(1 + I*oo, 2 + infx) is F # FIXME: The test below fails because (-infx).is_extended_positive is True # (should be None) #assert Eq(1 + I*infx, 1 + I*infx2) not in (T, F) and infx != infx2 # assert Eq(zoo, sqrt(2) + I*oo) is F assert Eq(zoo, oo) is F r = Symbol('r', real=True) i = Symbol('i', imaginary=True) assert Eq(i*I, r) not in (T, F) assert Eq(infx, infnx) is F assert Eq(infnx, infnx2) not in (T, F) and infnx != infnx2 assert Eq(zoo, oo) is F assert Eq(inf/inf2, 0) is F assert Eq(inf/fin, 0) is F assert Eq(fin/inf, 0) is T assert Eq(zero/nonzero, 0) is T and ((zero/nonzero) != 0) # The commented out test below is incorrect because: assert zoo == -zoo assert Eq(zoo, -zoo) is T assert Eq(oo, -oo) is F assert Eq(inf, -inf) not in (T, F) assert Eq(fin/(fin + 1), 1) is S.false o = symbols('o', odd=True) assert Eq(o, 2*o) is S.false p = symbols('p', positive=True) assert Eq(p/(p - 1), 1) is F def test_issue_10633(): assert Eq(True, False) == False assert Eq(False, True) == False assert Eq(True, True) == True assert Eq(False, False) == True def test_issue_10927(): x = symbols('x') assert str(Eq(x, oo)) == 'Eq(x, oo)' assert str(Eq(x, -oo)) == 'Eq(x, -oo)' def test_issues_13081_12583_12534(): # 13081 r = Rational('905502432259640373/288230376151711744') assert (r < pi) is S.false assert (r > pi) is S.true # 12583 v = sqrt(2) u = sqrt(v) + 2/sqrt(10 - 8/sqrt(2 - v) + 4*v*(1/sqrt(2 - v) - 1)) assert (u >= 0) is S.true # 12534; Rational vs NumberSymbol # here are some precisions for which Rational forms # at a lower and higher precision bracket the value of pi # e.g. for p = 20: # Rational(pi.n(p + 1)).n(25) = 3.14159265358979323846 2834 # pi.n(25) = 3.14159265358979323846 2643 # Rational(pi.n(p )).n(25) = 3.14159265358979323846 1987 assert [p for p in range(20, 50) if (Rational(pi.n(p)) < pi) and (pi < Rational(pi.n(p + 1)))] == [20, 24, 27, 33, 37, 43, 48] # pick one such precision and affirm that the reversed operation # gives the opposite result, i.e. if x < y is true then x > y # must be false for i in (20, 21): v = pi.n(i) assert rel_check(Rational(v), pi) assert rel_check(v, pi) assert rel_check(pi.n(20), pi.n(21)) # Float vs Rational # the rational form is less than the floating representation # at the same precision assert [i for i in range(15, 50) if Rational(pi.n(i)) > pi.n(i)] == [] # this should be the same if we reverse the relational assert [i for i in range(15, 50) if pi.n(i) < Rational(pi.n(i))] == [] def test_issue_18188(): from sympy.sets.conditionset import ConditionSet result1 = Eq(x*cos(x) - 3*sin(x), 0) assert result1.as_set() == ConditionSet(x, Eq(x*cos(x) - 3*sin(x), 0), Reals) result2 = Eq(x**2 + sqrt(x*2) + sin(x), 0) assert result2.as_set() == ConditionSet(x, Eq(sqrt(2)*sqrt(x) + x**2 + sin(x), 0), Reals) def test_binary_symbols(): ans = {x} for f in Eq, Ne: for t in S.true, S.false: eq = f(x, S.true) assert eq.binary_symbols == ans assert eq.reversed.binary_symbols == ans assert f(x, 1).binary_symbols == set() def test_rel_args(): # can't have Boolean args; this is automatic for True/False # with Python 3 and we confirm that SymPy does the same # for true/false for op in ['<', '<=', '>', '>=']: for b in (S.true, x < 1, And(x, y)): for v in (0.1, 1, 2**32, t, S.One): raises(TypeError, lambda: Relational(b, v, op)) def test_Equality_rewrite_as_Add(): eq = Eq(x + y, y - x) assert eq.rewrite(Add) == 2*x assert eq.rewrite(Add, evaluate=None).args == (x, x, y, -y) assert eq.rewrite(Add, evaluate=False).args == (x, y, x, -y) def test_issue_15847(): a = Ne(x*(x+y), x**2 + x*y) assert simplify(a) == False def test_negated_property(): eq = Eq(x, y) assert eq.negated == Ne(x, y) eq = Ne(x, y) assert eq.negated == Eq(x, y) eq = Ge(x + y, y - x) assert eq.negated == Lt(x + y, y - x) for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(x, y).negated.negated == f(x, y) def test_reversedsign_property(): eq = Eq(x, y) assert eq.reversedsign == Eq(-x, -y) eq = Ne(x, y) assert eq.reversedsign == Ne(-x, -y) eq = Ge(x + y, y - x) assert eq.reversedsign == Le(-x - y, x - y) for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(x, y).reversedsign.reversedsign == f(x, y) for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(-x, y).reversedsign.reversedsign == f(-x, y) for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(x, -y).reversedsign.reversedsign == f(x, -y) for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(-x, -y).reversedsign.reversedsign == f(-x, -y) def test_reversed_reversedsign_property(): for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(x, y).reversed.reversedsign == f(x, y).reversedsign.reversed for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(-x, y).reversed.reversedsign == f(-x, y).reversedsign.reversed for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(x, -y).reversed.reversedsign == f(x, -y).reversedsign.reversed for f in (Eq, Ne, Ge, Gt, Le, Lt): assert f(-x, -y).reversed.reversedsign == \ f(-x, -y).reversedsign.reversed def test_improved_canonical(): def test_different_forms(listofforms): for form1, form2 in combinations(listofforms, 2): assert form1.canonical == form2.canonical def generate_forms(expr): return [expr, expr.reversed, expr.reversedsign, expr.reversed.reversedsign] test_different_forms(generate_forms(x > -y)) test_different_forms(generate_forms(x >= -y)) test_different_forms(generate_forms(Eq(x, -y))) test_different_forms(generate_forms(Ne(x, -y))) test_different_forms(generate_forms(pi < x)) test_different_forms(generate_forms(pi - 5*y < -x + 2*y**2 - 7)) assert (pi >= x).canonical == (x <= pi) def test_set_equality_canonical(): a, b, c = symbols('a b c') A = Eq(FiniteSet(a, b, c), FiniteSet(1, 2, 3)) B = Ne(FiniteSet(a, b, c), FiniteSet(4, 5, 6)) assert A.canonical == A.reversed assert B.canonical == B.reversed def test_trigsimp(): # issue 16736 s, c = sin(2*x), cos(2*x) eq = Eq(s, c) assert trigsimp(eq) == eq # no rearrangement of sides # simplification of sides might result in # an unevaluated Eq changed = trigsimp(Eq(s + c, sqrt(2))) assert isinstance(changed, Eq) assert changed.subs(x, pi/8) is S.true # or an evaluated one assert trigsimp(Eq(cos(x)**2 + sin(x)**2, 1)) is S.true def test_polynomial_relation_simplification(): assert Ge(3*x*(x + 1) + 4, 3*x).simplify() in [Ge(x**2, -Rational(4,3)), Le(-x**2, Rational(4, 3))] assert Le(-(3*x*(x + 1) + 4), -3*x).simplify() in [Ge(x**2, -Rational(4,3)), Le(-x**2, Rational(4, 3))] assert ((x**2+3)*(x**2-1)+3*x >= 2*x**2).simplify() in [(x**4 + 3*x >= 3), (-x**4 - 3*x <= -3)] def test_multivariate_linear_function_simplification(): assert Ge(x + y, x - y).simplify() == Ge(y, 0) assert Le(-x + y, -x - y).simplify() == Le(y, 0) assert Eq(2*x + y, 2*x + y - 3).simplify() == False assert (2*x + y > 2*x + y - 3).simplify() == True assert (2*x + y < 2*x + y - 3).simplify() == False assert (2*x + y < 2*x + y + 3).simplify() == True a, b, c, d, e, f, g = symbols('a b c d e f g') assert Lt(a + b + c + 2*d, 3*d - f + g). simplify() == Lt(a, -b - c + d - f + g) def test_nonpolymonial_relations(): assert Eq(cos(x), 0).simplify() == Eq(cos(x), 0) def test_18778(): raises(TypeError, lambda: is_le(Basic(), Basic())) raises(TypeError, lambda: is_gt(Basic(), Basic())) raises(TypeError, lambda: is_ge(Basic(), Basic())) raises(TypeError, lambda: is_lt(Basic(), Basic())) def test_EvalEq(): """ This test exists to ensure backwards compatibility. The method to use is _eval_is_eq """ from sympy.core.expr import Expr class PowTest(Expr): def __new__(cls, base, exp): return Basic.__new__(PowTest, _sympify(base), _sympify(exp)) def _eval_Eq(lhs, rhs): if type(lhs) == PowTest and type(rhs) == PowTest: return lhs.args[0] == rhs.args[0] and lhs.args[1] == rhs.args[1] assert is_eq(PowTest(3, 4), PowTest(3,4)) assert is_eq(PowTest(3, 4), _sympify(4)) is None assert is_neq(PowTest(3, 4), PowTest(3,7)) def test_is_eq(): # test assumptions assert is_eq(x, y, Q.infinite(x) & Q.finite(y)) is False assert is_eq(x, y, Q.infinite(x) & Q.infinite(y) & Q.extended_real(x) & ~Q.extended_real(y)) is False assert is_eq(x, y, Q.infinite(x) & Q.infinite(y) & Q.extended_positive(x) & Q.extended_negative(y)) is False assert is_eq(x+I, y+I, Q.infinite(x) & Q.finite(y)) is False assert is_eq(1+x*I, 1+y*I, Q.infinite(x) & Q.finite(y)) is False assert is_eq(x, S(0), assumptions=Q.zero(x)) assert is_eq(x, S(0), assumptions=~Q.zero(x)) is False assert is_eq(x, S(0), assumptions=Q.nonzero(x)) is False assert is_neq(x, S(0), assumptions=Q.zero(x)) is False assert is_neq(x, S(0), assumptions=~Q.zero(x)) assert is_neq(x, S(0), assumptions=Q.nonzero(x)) # test registration class PowTest(Expr): def __new__(cls, base, exp): return Basic.__new__(cls, _sympify(base), _sympify(exp)) @dispatch(PowTest, PowTest) def _eval_is_eq(lhs, rhs): if type(lhs) == PowTest and type(rhs) == PowTest: return fuzzy_and([is_eq(lhs.args[0], rhs.args[0]), is_eq(lhs.args[1], rhs.args[1])]) assert is_eq(PowTest(3, 4), PowTest(3,4)) assert is_eq(PowTest(3, 4), _sympify(4)) is None assert is_neq(PowTest(3, 4), PowTest(3,7)) def test_is_ge_le(): # test assumptions assert is_ge(x, S(0), Q.nonnegative(x)) is True assert is_ge(x, S(0), Q.negative(x)) is False # test registration class PowTest(Expr): def __new__(cls, base, exp): return Basic.__new__(cls, _sympify(base), _sympify(exp)) @dispatch(PowTest, PowTest) def _eval_is_ge(lhs, rhs): if type(lhs) == PowTest and type(rhs) == PowTest: return fuzzy_and([is_ge(lhs.args[0], rhs.args[0]), is_ge(lhs.args[1], rhs.args[1])]) assert is_ge(PowTest(3, 9), PowTest(3,2)) assert is_gt(PowTest(3, 9), PowTest(3,2)) assert is_le(PowTest(3, 2), PowTest(3,9)) assert is_lt(PowTest(3, 2), PowTest(3,9)) def test_weak_strict(): for func in (Eq, Ne): eq = func(x, 1) assert eq.strict == eq.weak == eq eq = Gt(x, 1) assert eq.weak == Ge(x, 1) assert eq.strict == eq eq = Lt(x, 1) assert eq.weak == Le(x, 1) assert eq.strict == eq eq = Ge(x, 1) assert eq.strict == Gt(x, 1) assert eq.weak == eq eq = Le(x, 1) assert eq.strict == Lt(x, 1) assert eq.weak == eq